4001e950 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 4001e950: 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(); 4001e954: 40 00 06 fa call 4002053c 4001e958: e0 06 00 00 ld [ %i0 ], %l0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4001e95c: c2 14 20 38 lduh [ %l0 + 0x38 ], %g1 4001e960: 91 2a 20 10 sll %o0, 0x10, %o0 4001e964: 91 32 20 10 srl %o0, 0x10, %o0 4001e968: 80 a2 00 01 cmp %o0, %g1 4001e96c: 02 80 00 0a be 4001e994 4001e970: 80 a2 20 00 cmp %o0, 0 4001e974: 22 80 00 09 be,a 4001e998 <== NOT EXECUTED 4001e978: f2 34 20 38 sth %i1, [ %l0 + 0x38 ] <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 4001e97c: 40 00 44 db call 4002fce8 <__errno> <== NOT EXECUTED 4001e980: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001e984: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 4001e988: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001e98c: 81 c7 e0 08 ret <== NOT EXECUTED 4001e990: 81 e8 00 00 restore <== NOT EXECUTED #endif jnode->st_uid = owner; 4001e994: f2 34 20 38 sth %i1, [ %l0 + 0x38 ] jnode->st_gid = group; 4001e998: f4 34 20 3a sth %i2, [ %l0 + 0x3a ] IMFS_update_ctime( jnode ); 4001e99c: 90 07 bf f0 add %fp, -16, %o0 4001e9a0: 7f ff 9e dd call 40006514 4001e9a4: 92 10 20 00 clr %o1 4001e9a8: c2 07 bf f0 ld [ %fp + -16 ], %g1 4001e9ac: c2 24 20 44 st %g1, [ %l0 + 0x44 ] return 0; } 4001e9b0: 81 c7 e0 08 ret 4001e9b4: 91 e8 20 00 restore %g0, 0, %o0 4000d0c8 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 4000d0c8: 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 ) 4000d0cc: a2 96 20 00 orcc %i0, 0, %l1 4000d0d0: 02 80 00 03 be 4000d0dc 4000d0d4: a0 10 20 00 clr %l0 parent = parent_loc->node_access; 4000d0d8: e0 04 40 00 ld [ %l1 ], %l0 /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 4000d0dc: 90 10 20 01 mov 1, %o0 4000d0e0: 7f ff f7 38 call 4000adc0 4000d0e4: 92 10 20 5c mov 0x5c, %o1 if ( !node ) 4000d0e8: b0 92 20 00 orcc %o0, 0, %i0 4000d0ec: 02 80 00 4a be 4000d214 4000d0f0: 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 ); 4000d0f4: 92 10 00 1a mov %i2, %o1 4000d0f8: 94 10 20 20 mov 0x20, %o2 /* * Fill in the basic information */ node->st_nlink = 1; node->type = type; 4000d0fc: f2 26 20 48 st %i1, [ %i0 + 0x48 ] /* * Fill in the basic information */ node->st_nlink = 1; 4000d100: c2 36 20 30 sth %g1, [ %i0 + 0x30 ] node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 4000d104: 40 00 08 33 call 4000f1d0 4000d108: 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; 4000d10c: 03 10 00 64 sethi %hi(0x40019000), %g1 4000d110: c2 00 63 3c ld [ %g1 + 0x33c ], %g1 ! 4001933c /* * Set the type specific information */ switch (type) { 4000d114: 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; 4000d118: c2 10 60 24 lduh [ %g1 + 0x24 ], %g1 4000d11c: 82 2e c0 01 andn %i3, %g1, %g1 #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); 4000d120: 7f ff f7 dd call 4000b094 4000d124: c2 36 20 2e sth %g1, [ %i0 + 0x2e ] node->st_gid = getegid(); 4000d128: 7f ff f7 d7 call 4000b084 4000d12c: d0 36 20 38 sth %o0, [ %i0 + 0x38 ] /* * Now set all the times. */ gettimeofday( &tv, 0 ); 4000d130: 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(); 4000d134: d0 36 20 3a sth %o0, [ %i0 + 0x3a ] /* * Now set all the times. */ gettimeofday( &tv, 0 ); 4000d138: 7f ff f7 db call 4000b0a4 4000d13c: 90 07 bf f0 add %fp, -16, %o0 node->stat_atime = (time_t) tv.tv_sec; 4000d140: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* * Set the type specific information */ switch (type) { 4000d144: 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; 4000d148: c2 26 20 44 st %g1, [ %i0 + 0x44 ] * Now set all the times. */ gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; 4000d14c: c2 26 20 3c st %g1, [ %i0 + 0x3c ] /* * Set the type specific information */ switch (type) { 4000d150: 18 80 00 1d bgu 4000d1c4 4000d154: c2 26 20 40 st %g1, [ %i0 + 0x40 ] 4000d158: 83 2e 60 02 sll %i1, 2, %g1 4000d15c: 05 10 00 34 sethi %hi(0x4000d000), %g2 4000d160: 84 10 a0 b0 or %g2, 0xb0, %g2 ! 4000d0b0 4000d164: c2 00 80 01 ld [ %g2 + %g1 ], %g1 4000d168: 81 c0 40 00 jmp %g1 4000d16c: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000d170: 82 06 20 50 add %i0, 0x50, %g1 the_chain->permanent_null = NULL; 4000d174: 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); 4000d178: c2 26 20 4c st %g1, [ %i0 + 0x4c ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000d17c: 82 06 20 4c add %i0, 0x4c, %g1 4000d180: 10 80 00 19 b 4000d1e4 4000d184: 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; 4000d188: c2 07 00 00 ld [ %i4 ], %g1 4000d18c: 10 80 00 16 b 4000d1e4 4000d190: 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; 4000d194: 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; 4000d198: c4 07 00 00 ld [ %i4 ], %g2 node->info.device.minor = info->device.minor; 4000d19c: 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; 4000d1a0: 10 80 00 11 b 4000d1e4 4000d1a4: 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; 4000d1a8: c0 26 20 4c clr [ %i0 + 0x4c ] <== NOT EXECUTED node->info.linearfile.direct = 0; 4000d1ac: c0 26 20 50 clr [ %i0 + 0x50 ] <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; 4000d1b0: c0 26 20 4c clr [ %i0 + 0x4c ] node->info.file.indirect = 0; 4000d1b4: c0 26 20 50 clr [ %i0 + 0x50 ] node->info.file.doubly_indirect = 0; 4000d1b8: c0 26 20 54 clr [ %i0 + 0x54 ] node->info.file.triply_indirect = 0; 4000d1bc: 10 80 00 0a b 4000d1e4 4000d1c0: c0 26 20 58 clr [ %i0 + 0x58 ] break; default: assert(0); 4000d1c4: 11 10 00 61 sethi %hi(0x40018400), %o0 <== NOT EXECUTED 4000d1c8: 15 10 00 61 sethi %hi(0x40018400), %o2 <== NOT EXECUTED 4000d1cc: 17 10 00 5f sethi %hi(0x40017c00), %o3 <== NOT EXECUTED 4000d1d0: 90 12 22 a8 or %o0, 0x2a8, %o0 <== NOT EXECUTED 4000d1d4: 94 12 a2 f8 or %o2, 0x2f8, %o2 <== NOT EXECUTED 4000d1d8: 96 12 e1 08 or %o3, 0x108, %o3 <== NOT EXECUTED 4000d1dc: 7f ff d7 03 call 40002de8 <__assert_func> <== NOT EXECUTED 4000d1e0: 92 10 20 74 mov 0x74, %o1 <== NOT EXECUTED /* * If this node has a parent, then put it in that directory list. */ if ( parent ) { 4000d1e4: 80 a4 20 00 cmp %l0, 0 4000d1e8: 02 80 00 0b be 4000d214 4000d1ec: 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 ); 4000d1f0: 7f ff e7 2a call 40006e98 <_Chain_Append> 4000d1f4: 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; 4000d1f8: 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; 4000d1fc: e0 26 20 08 st %l0, [ %i0 + 8 ] fs_info = parent_loc->mt_entry->fs_info; 4000d200: c4 00 60 2c ld [ %g1 + 0x2c ], %g2 node->st_ino = ++fs_info->ino_count; 4000d204: c2 00 80 00 ld [ %g2 ], %g1 4000d208: 82 00 60 01 inc %g1 4000d20c: c2 20 80 00 st %g1, [ %g2 ] 4000d210: c2 26 20 34 st %g1, [ %i0 + 0x34 ] } return node; } 4000d214: 81 c7 e0 08 ret 4000d218: 81 e8 00 00 restore 400049e0 : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 400049e0: 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 ); 400049e4: 80 a6 20 00 cmp %i0, 0 400049e8: 12 80 00 0a bne 40004a10 400049ec: 80 a6 60 00 cmp %i1, 0 400049f0: 11 10 00 7b sethi %hi(0x4001ec00), %o0 <== NOT EXECUTED 400049f4: 15 10 00 7c sethi %hi(0x4001f000), %o2 <== NOT EXECUTED 400049f8: 17 10 00 7b sethi %hi(0x4001ec00), %o3 <== NOT EXECUTED 400049fc: 90 12 23 00 or %o0, 0x300, %o0 <== NOT EXECUTED 40004a00: 94 12 a0 b8 or %o2, 0xb8, %o2 <== NOT EXECUTED 40004a04: 96 12 e3 c0 or %o3, 0x3c0, %o3 <== NOT EXECUTED 40004a08: 10 80 00 0b b 40004a34 <== NOT EXECUTED 40004a0c: 92 10 20 7f mov 0x7f, %o1 <== NOT EXECUTED assert( level >= 0 ); 40004a10: 36 80 00 0b bge,a 40004a3c 40004a14: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40004a18: 11 10 00 7b sethi %hi(0x4001ec00), %o0 <== NOT EXECUTED 40004a1c: 15 10 00 7c sethi %hi(0x4001f000), %o2 <== NOT EXECUTED 40004a20: 17 10 00 7b sethi %hi(0x4001ec00), %o3 <== NOT EXECUTED 40004a24: 90 12 23 00 or %o0, 0x300, %o0 <== NOT EXECUTED 40004a28: 94 12 a0 b8 or %o2, 0xb8, %o2 <== NOT EXECUTED 40004a2c: 96 12 e3 d0 or %o3, 0x3d0, %o3 <== NOT EXECUTED 40004a30: 92 10 20 81 mov 0x81, %o1 <== NOT EXECUTED 40004a34: 40 00 01 c3 call 40005140 <__assert_func> <== NOT EXECUTED 40004a38: 01 00 00 00 nop <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); 40004a3c: 80 a0 60 01 cmp %g1, 1 40004a40: 22 80 00 0a be,a 40004a68 40004a44: 03 10 00 84 sethi %hi(0x40021000), %g1 40004a48: 11 10 00 7b sethi %hi(0x4001ec00), %o0 <== NOT EXECUTED 40004a4c: 15 10 00 7c sethi %hi(0x4001f000), %o2 <== NOT EXECUTED 40004a50: 17 10 00 7b sethi %hi(0x4001ec00), %o3 <== NOT EXECUTED 40004a54: 90 12 23 00 or %o0, 0x300, %o0 <== NOT EXECUTED 40004a58: 94 12 a0 b8 or %o2, 0xb8, %o2 <== NOT EXECUTED 40004a5c: 96 12 e3 e0 or %o3, 0x3e0, %o3 <== NOT EXECUTED 40004a60: 10 bf ff f5 b 40004a34 <== NOT EXECUTED 40004a64: 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; 40004a68: 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, "...." ); 40004a6c: a8 10 61 70 or %g1, 0x170, %l4 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 40004a70: 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, "...." ); 40004a74: 03 10 00 7c sethi %hi(0x4001f000), %g1 IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 40004a78: 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, "...." ); 40004a7c: 10 80 00 14 b 40004acc 40004a80: a6 10 60 08 or %g1, 8, %l3 40004a84: c2 05 00 00 ld [ %l4 ], %g1 40004a88: 90 10 00 13 mov %l3, %o0 40004a8c: d2 00 60 08 ld [ %g1 + 8 ], %o1 40004a90: 40 00 37 15 call 400126e4 40004a94: 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++ ) 40004a98: 80 a4 00 19 cmp %l0, %i1 40004a9c: 24 bf ff fb ble,a 40004a88 40004aa0: c2 05 00 00 ld [ %l4 ], %g1 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 40004aa4: 7f ff ff 78 call 40004884 40004aa8: 90 10 00 18 mov %i0, %o0 if ( the_jnode->type == IMFS_DIRECTORY ) 40004aac: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40004ab0: 80 a0 60 01 cmp %g1, 1 40004ab4: 32 80 00 06 bne,a 40004acc 40004ab8: f0 06 00 00 ld [ %i0 ], %i0 IMFS_dump_directory( the_jnode, level + 1 ); 40004abc: 90 10 00 18 mov %i0, %o0 40004ac0: 7f ff ff c8 call 400049e0 40004ac4: 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 ) { 40004ac8: 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 ); 40004acc: 80 a6 00 12 cmp %i0, %l2 40004ad0: 12 bf ff ed bne 40004a84 40004ad4: 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 ); } } 40004ad8: 81 c7 e0 08 ret 40004adc: 81 e8 00 00 restore 4000a210 : int IMFS_eval_path( const char *pathname, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4000a210: 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 ) 4000a214: 03 10 00 64 sethi %hi(0x40019000), %g1 int IMFS_eval_path( const char *pathname, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4000a218: 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 ) 4000a21c: ae 10 63 3c or %g1, 0x33c, %l7 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 4000a220: e0 06 80 00 ld [ %i2 ], %l0 4000a224: a6 10 20 00 clr %l3 4000a228: 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 ); 4000a22c: aa 07 bf c0 add %fp, -64, %l5 4000a230: 10 80 00 6a b 4000a3d8 4000a234: ac 07 bf f4 add %fp, -12, %l6 4000a238: 90 05 00 13 add %l4, %l3, %o0 4000a23c: 92 10 00 15 mov %l5, %o1 4000a240: 40 00 01 a0 call 4000a8c0 4000a244: 94 10 00 16 mov %l6, %o2 i += len; if ( !pathloc->node_access ) 4000a248: 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 ); 4000a24c: a2 10 00 08 mov %o0, %l1 i += len; if ( !pathloc->node_access ) 4000a250: 80 a0 60 00 cmp %g1, 0 4000a254: 02 80 00 59 be 4000a3b8 4000a258: 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 ) 4000a25c: 80 a2 20 00 cmp %o0, 0 4000a260: 22 80 00 12 be,a 4000a2a8 4000a264: a6 04 c0 12 add %l3, %l2, %l3 if ( node->type == IMFS_DIRECTORY ) 4000a268: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000a26c: 80 a0 60 01 cmp %g1, 1 4000a270: 32 80 00 0e bne,a 4000a2a8 4000a274: a6 04 c0 12 add %l3, %l2, %l3 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 4000a278: 90 10 00 1a mov %i2, %o0 4000a27c: 7f ff ff 83 call 4000a088 4000a280: 92 10 20 01 mov 1, %o1 4000a284: 80 a2 20 00 cmp %o0, 0 4000a288: 32 80 00 08 bne,a 4000a2a8 4000a28c: a6 04 c0 12 add %l3, %l2, %l3 rtems_set_errno_and_return_minus_one( EACCES ); 4000a290: 40 00 0e 8e call 4000dcc8 <__errno> 4000a294: b0 10 3f ff mov -1, %i0 4000a298: 82 10 20 0d mov 0xd, %g1 4000a29c: c2 22 00 00 st %g1, [ %o0 ] 4000a2a0: 81 c7 e0 08 ret 4000a2a4: 81 e8 00 00 restore node = pathloc->node_access; switch( type ) { 4000a2a8: 80 a4 60 03 cmp %l1, 3 4000a2ac: 02 80 00 1b be 4000a318 4000a2b0: e0 06 80 00 ld [ %i2 ], %l0 4000a2b4: 80 a4 60 04 cmp %l1, 4 4000a2b8: 02 80 00 44 be 4000a3c8 4000a2bc: 80 a4 60 02 cmp %l1, 2 4000a2c0: 12 80 00 47 bne 4000a3dc 4000a2c4: 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 ) 4000a2c8: c2 05 c0 00 ld [ %l7 ], %g1 4000a2cc: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4000a2d0: 80 a4 00 01 cmp %l0, %g1 4000a2d4: 02 bf ff da be 4000a23c 4000a2d8: 90 05 00 13 add %l4, %l3, %o0 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 4000a2dc: d2 06 a0 0c ld [ %i2 + 0xc ], %o1 4000a2e0: c2 02 60 18 ld [ %o1 + 0x18 ], %g1 4000a2e4: 80 a4 00 01 cmp %l0, %g1 4000a2e8: 32 80 00 04 bne,a 4000a2f8 4000a2ec: 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; 4000a2f0: 10 80 00 48 b 4000a410 4000a2f4: 92 02 60 08 add %o1, 8, %o1 *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),flags,pathloc); } } else { if ( !node->Parent ) 4000a2f8: 80 a4 20 00 cmp %l0, 0 4000a2fc: 32 bf ff cf bne,a 4000a238 4000a300: e0 26 80 00 st %l0, [ %i2 ] rtems_set_errno_and_return_minus_one( ENOENT ); 4000a304: 40 00 0e 71 call 4000dcc8 <__errno> 4000a308: b0 10 3f ff mov -1, %i0 4000a30c: e2 22 00 00 st %l1, [ %o0 ] 4000a310: 81 c7 e0 08 ret 4000a314: 81 e8 00 00 restore case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 4000a318: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000a31c: 80 a0 60 03 cmp %g1, 3 4000a320: 12 80 00 0a bne 4000a348 4000a324: 80 a0 60 04 cmp %g1, 4 IMFS_evaluate_hard_link( pathloc, 0 ); 4000a328: 90 10 00 1a mov %i2, %o0 4000a32c: 7f ff ff 6f call 4000a0e8 4000a330: 92 10 20 00 clr %o1 node = pathloc->node_access; 4000a334: e0 06 80 00 ld [ %i2 ], %l0 if ( !node ) 4000a338: 80 a4 20 00 cmp %l0, 0 4000a33c: 32 80 00 0e bne,a 4000a374 4000a340: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000a344: 30 80 00 0f b,a 4000a380 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 4000a348: 32 80 00 0b bne,a 4000a374 4000a34c: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 result = IMFS_evaluate_sym_link( pathloc, 0 ); 4000a350: 90 10 00 1a mov %i2, %o0 4000a354: 7f ff ff 7d call 4000a148 4000a358: 92 10 20 00 clr %o1 4000a35c: b0 10 00 08 mov %o0, %i0 node = pathloc->node_access; if ( result == -1 ) 4000a360: 80 a2 3f ff cmp %o0, -1 4000a364: 02 bf ff cf be 4000a2a0 4000a368: 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; 4000a36c: a0 10 00 08 mov %o0, %l0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 4000a370: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000a374: 80 a0 60 01 cmp %g1, 1 4000a378: 22 80 00 06 be,a 4000a390 4000a37c: d2 04 20 58 ld [ %l0 + 0x58 ], %o1 rtems_set_errno_and_return_minus_one( ENOTDIR ); 4000a380: 40 00 0e 52 call 4000dcc8 <__errno> 4000a384: b0 10 3f ff mov -1, %i0 4000a388: 10 bf ff c5 b 4000a29c 4000a38c: 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 ) { 4000a390: 80 a2 60 00 cmp %o1, 0 4000a394: 02 80 00 04 be 4000a3a4 4000a398: 90 10 00 10 mov %l0, %o0 newloc = node->info.directory.mt_fs->mt_fs_root; 4000a39c: 10 80 00 1d b 4000a410 4000a3a0: 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 ); 4000a3a4: 40 00 01 1c call 4000a814 4000a3a8: 92 10 00 15 mov %l5, %o1 if ( !node ) 4000a3ac: a0 92 20 00 orcc %o0, 0, %l0 4000a3b0: 32 bf ff a2 bne,a 4000a238 4000a3b4: e0 26 80 00 st %l0, [ %i2 ] rtems_set_errno_and_return_minus_one( ENOENT ); 4000a3b8: 40 00 0e 44 call 4000dcc8 <__errno> 4000a3bc: b0 10 3f ff mov -1, %i0 4000a3c0: 10 bf ff b7 b 4000a29c 4000a3c4: 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 ); 4000a3c8: 40 00 0e 40 call 4000dcc8 <__errno> 4000a3cc: b0 10 3f ff mov -1, %i0 4000a3d0: 10 bf ff b3 b 4000a29c 4000a3d4: 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) ) { 4000a3d8: 80 a4 60 00 cmp %l1, 0 4000a3dc: 22 80 00 06 be,a 4000a3f4 4000a3e0: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000a3e4: 80 a4 60 04 cmp %l1, 4 4000a3e8: 12 bf ff 95 bne 4000a23c 4000a3ec: 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 ) { 4000a3f0: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 <== NOT EXECUTED 4000a3f4: 80 a0 60 01 cmp %g1, 1 4000a3f8: 12 80 00 18 bne 4000a458 4000a3fc: 01 00 00 00 nop if ( node->info.directory.mt_fs != NULL ) { 4000a400: d0 04 20 58 ld [ %l0 + 0x58 ], %o0 4000a404: 80 a2 20 00 cmp %o0, 0 4000a408: 02 80 00 14 be 4000a458 4000a40c: 92 02 20 18 add %o0, 0x18, %o1 newloc = node->info.directory.mt_fs->mt_fs_root; 4000a410: a0 07 bf e4 add %fp, -28, %l0 4000a414: 94 10 20 10 mov 0x10, %o2 4000a418: 40 00 10 1e call 4000e490 4000a41c: 90 10 00 10 mov %l0, %o0 *pathloc = newloc; 4000a420: 92 10 00 10 mov %l0, %o1 4000a424: 94 10 20 10 mov 0x10, %o2 4000a428: 40 00 10 1a call 4000e490 4000a42c: 90 10 00 1a mov %i2, %o0 return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 4000a430: c2 06 a0 08 ld [ %i2 + 8 ], %g1 4000a434: d0 07 bf f4 ld [ %fp + -12 ], %o0 4000a438: c2 00 40 00 ld [ %g1 ], %g1 4000a43c: 90 24 c0 08 sub %l3, %o0, %o0 4000a440: 92 10 00 19 mov %i1, %o1 4000a444: 90 05 00 08 add %l4, %o0, %o0 4000a448: 9f c0 40 00 call %g1 4000a44c: 94 10 00 1a mov %i2, %o2 4000a450: 81 c7 e0 08 ret 4000a454: 91 e8 00 08 restore %g0, %o0, %o0 } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 4000a458: 7f ff fe f3 call 4000a024 4000a45c: 90 10 00 1a mov %i2, %o0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 4000a460: 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 ); 4000a464: b0 10 00 08 mov %o0, %i0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 4000a468: 7f ff ff 08 call 4000a088 4000a46c: 90 10 00 1a mov %i2, %o0 4000a470: 80 a2 20 00 cmp %o0, 0 4000a474: 12 80 00 06 bne 4000a48c 4000a478: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 4000a47c: 40 00 0e 13 call 4000dcc8 <__errno> 4000a480: b0 10 3f ff mov -1, %i0 ! ffffffff 4000a484: 82 10 20 0d mov 0xd, %g1 4000a488: c2 22 00 00 st %g1, [ %o0 ] return result; } 4000a48c: 81 c7 e0 08 ret 4000a490: 81 e8 00 00 restore 4000a54c : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 4000a54c: 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; 4000a550: 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 ) 4000a554: 03 10 00 64 sethi %hi(0x40019000), %g1 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 4000a558: 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 ) 4000a55c: ae 10 63 3c or %g1, 0x33c, %l7 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 4000a560: 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 ); 4000a564: aa 07 bf c0 add %fp, -64, %l5 4000a568: ac 07 bf f4 add %fp, -12, %l6 4000a56c: 90 05 00 12 add %l4, %l2, %o0 4000a570: 92 10 00 15 mov %l5, %o1 4000a574: 40 00 00 d3 call 4000a8c0 4000a578: 94 10 00 16 mov %l6, %o2 i += len; if ( !pathloc->node_access ) 4000a57c: 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 ); 4000a580: a2 10 00 08 mov %o0, %l1 i += len; if ( !pathloc->node_access ) 4000a584: 80 a0 60 00 cmp %g1, 0 4000a588: 02 80 00 82 be 4000a790 4000a58c: e6 07 bf f4 ld [ %fp + -12 ], %l3 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 4000a590: 80 a2 20 00 cmp %o0, 0 4000a594: 22 80 00 10 be,a 4000a5d4 4000a598: a4 04 80 13 add %l2, %l3, %l2 if ( node->type == IMFS_DIRECTORY ) 4000a59c: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000a5a0: 80 a0 60 01 cmp %g1, 1 4000a5a4: 32 80 00 0c bne,a 4000a5d4 4000a5a8: a4 04 80 13 add %l2, %l3, %l2 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 4000a5ac: 90 10 00 19 mov %i1, %o0 4000a5b0: 7f ff fe b6 call 4000a088 4000a5b4: 92 10 20 01 mov 1, %o1 4000a5b8: 80 a2 20 00 cmp %o0, 0 4000a5bc: 32 80 00 06 bne,a 4000a5d4 4000a5c0: a4 04 80 13 add %l2, %l3, %l2 rtems_set_errno_and_return_minus_one( EACCES ); 4000a5c4: 40 00 0d c1 call 4000dcc8 <__errno> 4000a5c8: b0 10 3f ff mov -1, %i0 4000a5cc: 10 80 00 83 b 4000a7d8 4000a5d0: 82 10 20 0d mov 0xd, %g1 node = pathloc->node_access; switch( type ) { 4000a5d4: 80 a4 60 02 cmp %l1, 2 4000a5d8: 02 80 00 0f be 4000a614 4000a5dc: e0 06 40 00 ld [ %i1 ], %l0 4000a5e0: 80 a4 60 02 cmp %l1, 2 4000a5e4: 18 80 00 07 bgu 4000a600 4000a5e8: 80 a4 60 03 cmp %l1, 3 4000a5ec: 80 a4 60 00 cmp %l1, 0 4000a5f0: 02 80 00 56 be 4000a748 4000a5f4: 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 ); 4000a5f8: 10 bf ff de b 4000a570 4000a5fc: 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 ) { 4000a600: 02 80 00 19 be 4000a664 4000a604: 80 a4 60 04 cmp %l1, 4 4000a608: 32 bf ff da bne,a 4000a570 4000a60c: 90 05 00 12 add %l4, %l2, %o0 <== NOT EXECUTED 4000a610: 30 80 00 52 b,a 4000a758 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4000a614: c2 05 c0 00 ld [ %l7 ], %g1 4000a618: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4000a61c: 80 a4 00 01 cmp %l0, %g1 4000a620: 02 bf ff d4 be 4000a570 4000a624: 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){ 4000a628: d2 06 60 0c ld [ %i1 + 0xc ], %o1 4000a62c: c2 02 60 18 ld [ %o1 + 0x18 ], %g1 4000a630: 80 a4 00 01 cmp %l0, %g1 4000a634: 32 80 00 04 bne,a 4000a644 4000a638: 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; 4000a63c: 10 80 00 2a b 4000a6e4 4000a640: 92 02 60 08 add %o1, 8, %o1 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 4000a644: 80 a4 20 00 cmp %l0, 0 4000a648: 32 bf ff c9 bne,a 4000a56c 4000a64c: e0 26 40 00 st %l0, [ %i1 ] rtems_set_errno_and_return_minus_one( ENOENT ); 4000a650: 40 00 0d 9e call 4000dcc8 <__errno> 4000a654: b0 10 3f ff mov -1, %i0 4000a658: e2 22 00 00 st %l1, [ %o0 ] 4000a65c: 81 c7 e0 08 ret 4000a660: 81 e8 00 00 restore pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 4000a664: d0 04 20 48 ld [ %l0 + 0x48 ], %o0 4000a668: 80 a2 20 03 cmp %o0, 3 4000a66c: 12 80 00 0a bne 4000a694 4000a670: 80 a2 20 04 cmp %o0, 4 result = IMFS_evaluate_link( pathloc, 0 ); 4000a674: 90 10 00 19 mov %i1, %o0 4000a678: 7f ff ff 87 call 4000a494 4000a67c: 92 10 20 00 clr %o1 if ( result == -1 ) 4000a680: 80 a2 3f ff cmp %o0, -1 4000a684: 12 80 00 0c bne 4000a6b4 4000a688: b0 10 00 08 mov %o0, %i0 4000a68c: 81 c7 e0 08 ret <== NOT EXECUTED 4000a690: 81 e8 00 00 restore <== NOT EXECUTED return -1; } else if ( node->type == IMFS_SYM_LINK ) { 4000a694: 32 80 00 09 bne,a 4000a6b8 4000a698: d0 06 40 00 ld [ %i1 ], %o0 result = IMFS_evaluate_link( pathloc, 0 ); 4000a69c: 90 10 00 19 mov %i1, %o0 4000a6a0: 7f ff ff 7d call 4000a494 4000a6a4: 92 10 20 00 clr %o1 if ( result == -1 ) 4000a6a8: 80 a2 3f ff cmp %o0, -1 4000a6ac: 02 bf ff ec be 4000a65c 4000a6b0: b0 10 00 08 mov %o0, %i0 return -1; } node = pathloc->node_access; 4000a6b4: d0 06 40 00 ld [ %i1 ], %o0 if ( !node ) 4000a6b8: 80 a2 20 00 cmp %o0, 0 4000a6bc: 02 80 00 44 be 4000a7cc 4000a6c0: 01 00 00 00 nop /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 4000a6c4: c2 02 20 48 ld [ %o0 + 0x48 ], %g1 4000a6c8: 80 a0 60 01 cmp %g1, 1 4000a6cc: 12 80 00 40 bne 4000a7cc 4000a6d0: 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 ) { 4000a6d4: d2 02 20 58 ld [ %o0 + 0x58 ], %o1 4000a6d8: 80 a2 60 00 cmp %o1, 0 4000a6dc: 02 80 00 14 be 4000a72c 4000a6e0: 92 02 60 18 add %o1, 0x18, %o1 newloc = node->info.directory.mt_fs->mt_fs_root; 4000a6e4: a0 07 bf e4 add %fp, -28, %l0 4000a6e8: 94 10 20 10 mov 0x10, %o2 4000a6ec: 40 00 0f 69 call 4000e490 4000a6f0: 90 10 00 10 mov %l0, %o0 *pathloc = newloc; 4000a6f4: 92 10 00 10 mov %l0, %o1 4000a6f8: 94 10 20 10 mov 0x10, %o2 4000a6fc: 40 00 0f 65 call 4000e490 4000a700: 90 10 00 19 mov %i1, %o0 return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4000a704: c2 06 60 08 ld [ %i1 + 8 ], %g1 4000a708: d0 07 bf f4 ld [ %fp + -12 ], %o0 4000a70c: c2 00 60 04 ld [ %g1 + 4 ], %g1 4000a710: 90 24 80 08 sub %l2, %o0, %o0 4000a714: 92 10 00 19 mov %i1, %o1 4000a718: 90 05 00 08 add %l4, %o0, %o0 4000a71c: 9f c0 40 00 call %g1 4000a720: 94 10 00 1a mov %i2, %o2 4000a724: 81 c7 e0 08 ret 4000a728: 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 ); 4000a72c: 40 00 00 3a call 4000a814 4000a730: 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 ) 4000a734: a0 92 20 00 orcc %o0, 0, %l0 4000a738: 02 80 00 0c be 4000a768 4000a73c: c2 07 bf f4 ld [ %fp + -12 ], %g1 done = true; else pathloc->node_access = node; 4000a740: 10 bf ff 8b b 4000a56c 4000a744: e0 26 40 00 st %l0, [ %i1 ] break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 4000a748: 40 00 0d 60 call 4000dcc8 <__errno> 4000a74c: b0 10 3f ff mov -1, %i0 4000a750: 10 80 00 22 b 4000a7d8 4000a754: 82 10 20 11 mov 0x11, %g1 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4000a758: 40 00 0d 5c call 4000dcc8 <__errno> 4000a75c: b0 10 3f ff mov -1, %i0 4000a760: 10 80 00 1e b 4000a7d8 4000a764: 82 10 20 5b mov 0x5b, %g1 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 4000a768: 84 05 00 12 add %l4, %l2, %g2 4000a76c: 82 24 80 01 sub %l2, %g1, %g1 4000a770: 82 05 00 01 add %l4, %g1, %g1 4000a774: 10 80 00 0b b 4000a7a0 4000a778: 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 ] ) ) 4000a77c: 80 a0 60 2f cmp %g1, 0x2f 4000a780: 02 80 00 08 be 4000a7a0 4000a784: 80 a0 60 5c cmp %g1, 0x5c 4000a788: 22 80 00 07 be,a 4000a7a4 4000a78c: c2 48 80 00 ldsb [ %g2 ], %g1 rtems_set_errno_and_return_minus_one( ENOENT ); 4000a790: 40 00 0d 4e call 4000dcc8 <__errno> 4000a794: b0 10 3f ff mov -1, %i0 4000a798: 10 80 00 10 b 4000a7d8 4000a79c: 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++) { 4000a7a0: c2 48 80 00 ldsb [ %g2 ], %g1 4000a7a4: 80 a0 60 00 cmp %g1, 0 4000a7a8: 12 bf ff f5 bne 4000a77c 4000a7ac: 84 00 a0 01 inc %g2 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 4000a7b0: 7f ff fe 1d call 4000a024 4000a7b4: 90 10 00 19 mov %i1, %o0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 4000a7b8: c2 06 40 00 ld [ %i1 ], %g1 4000a7bc: c2 00 60 48 ld [ %g1 + 0x48 ], %g1 4000a7c0: 80 a0 60 01 cmp %g1, 1 4000a7c4: 02 80 00 08 be 4000a7e4 4000a7c8: b0 10 00 08 mov %o0, %i0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 4000a7cc: 40 00 0d 3f call 4000dcc8 <__errno> 4000a7d0: b0 10 3f ff mov -1, %i0 4000a7d4: 82 10 20 14 mov 0x14, %g1 4000a7d8: c2 22 00 00 st %g1, [ %o0 ] 4000a7dc: 81 c7 e0 08 ret 4000a7e0: 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 ) ) 4000a7e4: 90 10 00 19 mov %i1, %o0 4000a7e8: 7f ff fe 28 call 4000a088 4000a7ec: 92 10 20 03 mov 3, %o1 4000a7f0: 80 a2 20 00 cmp %o0, 0 4000a7f4: 12 80 00 06 bne 4000a80c 4000a7f8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 4000a7fc: 40 00 0d 33 call 4000dcc8 <__errno> 4000a800: b0 10 3f ff mov -1, %i0 ! ffffffff 4000a804: 82 10 20 0d mov 0xd, %g1 4000a808: c2 22 00 00 st %g1, [ %o0 ] return result; } 4000a80c: 81 c7 e0 08 ret 4000a810: 81 e8 00 00 restore 4000a0e8 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4000a0e8: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *jnode = node->node_access; 4000a0ec: c4 06 00 00 ld [ %i0 ], %g2 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 4000a0f0: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1 4000a0f4: 80 a0 60 03 cmp %g1, 3 4000a0f8: 22 80 00 04 be,a 4000a108 4000a0fc: c2 00 a0 4c ld [ %g2 + 0x4c ], %g1 rtems_fatal_error_occurred (0xABCD0000); 4000a100: 7f ff f2 68 call 40006aa0 <== NOT EXECUTED 4000a104: 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 ); 4000a108: 90 10 00 18 mov %i0, %o0 4000a10c: 7f ff ff c6 call 4000a024 4000a110: c2 26 00 00 st %g1, [ %i0 ] /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 4000a114: 90 10 00 18 mov %i0, %o0 4000a118: 92 10 00 19 mov %i1, %o1 4000a11c: 7f ff ff db call 4000a088 4000a120: b0 10 20 00 clr %i0 4000a124: 80 a2 20 00 cmp %o0, 0 4000a128: 12 80 00 06 bne 4000a140 4000a12c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 4000a130: 40 00 0e e6 call 4000dcc8 <__errno> <== NOT EXECUTED 4000a134: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4000a138: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 4000a13c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return result; } 4000a140: 81 c7 e0 08 ret 4000a144: 81 e8 00 00 restore 4000a088 : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 4000a088: 9d e3 bf 98 save %sp, -104, %sp } jnode = node->node_access; #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 4000a08c: 40 00 04 02 call 4000b094 4000a090: e2 06 00 00 ld [ %i0 ], %l1 st_gid = getegid(); 4000a094: 40 00 03 fc call 4000b084 4000a098: 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 ) 4000a09c: c2 14 60 38 lduh [ %l1 + 0x38 ], %g1 4000a0a0: a1 2c 20 10 sll %l0, 0x10, %l0 4000a0a4: a1 34 20 10 srl %l0, 0x10, %l0 4000a0a8: 80 a4 00 01 cmp %l0, %g1 4000a0ac: 02 80 00 09 be 4000a0d0 4000a0b0: b1 2e 60 06 sll %i1, 6, %i0 flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 4000a0b4: c4 14 60 3a lduh [ %l1 + 0x3a ], %g2 4000a0b8: 83 2a 20 10 sll %o0, 0x10, %g1 4000a0bc: 83 30 60 10 srl %g1, 0x10, %g1 4000a0c0: 80 a0 40 02 cmp %g1, %g2 4000a0c4: 02 80 00 03 be 4000a0d0 4000a0c8: b1 2e 60 03 sll %i1, 3, %i0 4000a0cc: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED flags_to_test <<= 3; 4000a0d0: c2 14 60 2e lduh [ %l1 + 0x2e ], %g1 4000a0d4: 82 2e 00 01 andn %i0, %g1, %g1 */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } 4000a0d8: 80 a0 00 01 cmp %g0, %g1 4000a0dc: b0 60 3f ff subx %g0, -1, %i0 4000a0e0: 81 c7 e0 08 ret 4000a0e4: 81 e8 00 00 restore 4000a148 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4000a148: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *jnode = node->node_access; 4000a14c: e0 06 00 00 ld [ %i0 ], %l0 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4000a150: a2 10 00 18 mov %i0, %l1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 4000a154: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000a158: 80 a0 60 04 cmp %g1, 4 4000a15c: 12 80 00 07 bne 4000a178 4000a160: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 4000a164: c2 04 20 08 ld [ %l0 + 8 ], %g1 4000a168: 80 a0 60 00 cmp %g1, 0 4000a16c: 32 80 00 05 bne,a 4000a180 4000a170: c2 26 00 00 st %g1, [ %i0 ] rtems_fatal_error_occurred( 0xBAD00000 ); 4000a174: 11 2e b4 00 sethi %hi(0xbad00000), %o0 <== NOT EXECUTED 4000a178: 7f ff f2 4a call 40006aa0 <== NOT EXECUTED 4000a17c: 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( 4000a180: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 4000a184: c2 48 40 00 ldsb [ %g1 ], %g1 4000a188: 80 a0 60 2f cmp %g1, 0x2f 4000a18c: 02 80 00 06 be 4000a1a4 4000a190: 80 a0 60 5c cmp %g1, 0x5c 4000a194: 02 80 00 04 be 4000a1a4 4000a198: 80 a0 60 00 cmp %g1, 0 4000a19c: 12 80 00 09 bne 4000a1c0 4000a1a0: 82 10 20 00 clr %g1 4000a1a4: 03 10 00 64 sethi %hi(0x40019000), %g1 4000a1a8: d2 00 63 3c ld [ %g1 + 0x33c ], %o1 ! 4001933c 4000a1ac: 90 10 00 11 mov %l1, %o0 4000a1b0: 92 02 60 14 add %o1, 0x14, %o1 4000a1b4: 40 00 10 b7 call 4000e490 4000a1b8: 94 10 20 10 mov 0x10, %o2 4000a1bc: 82 10 20 01 mov 1, %g1 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 4000a1c0: d0 04 20 4c ld [ %l0 + 0x4c ], %o0 4000a1c4: 94 10 00 11 mov %l1, %o2 4000a1c8: 90 02 00 01 add %o0, %g1, %o0 4000a1cc: 40 00 00 11 call 4000a210 4000a1d0: 92 10 00 19 mov %i1, %o1 4000a1d4: b0 10 00 08 mov %o0, %i0 &jnode->info.sym_link.name[i], flags, node ); IMFS_Set_handlers( node ); 4000a1d8: 7f ff ff 93 call 4000a024 4000a1dc: 90 10 00 11 mov %l1, %o0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 4000a1e0: 90 10 00 11 mov %l1, %o0 4000a1e4: 7f ff ff a9 call 4000a088 4000a1e8: 92 10 00 19 mov %i1, %o1 4000a1ec: 80 a2 20 00 cmp %o0, 0 4000a1f0: 12 80 00 06 bne 4000a208 4000a1f4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 4000a1f8: 40 00 0e b4 call 4000dcc8 <__errno> <== NOT EXECUTED 4000a1fc: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4000a200: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 4000a204: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return result; } 4000a208: 81 c7 e0 08 ret 4000a20c: 81 e8 00 00 restore 4000d21c : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 4000d21c: 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(); 4000d220: 7f ff f7 9d call 4000b094 4000d224: e0 06 00 00 ld [ %i0 ], %l0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4000d228: c2 14 20 38 lduh [ %l0 + 0x38 ], %g1 4000d22c: 91 2a 20 10 sll %o0, 0x10, %o0 4000d230: 91 32 20 10 srl %o0, 0x10, %o0 4000d234: 80 a2 00 01 cmp %o0, %g1 4000d238: 02 80 00 04 be 4000d248 4000d23c: 80 a2 20 00 cmp %o0, 0 4000d240: 12 80 00 08 bne 4000d260 <== NOT EXECUTED 4000d244: 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 ) ) ) 4000d248: 83 2e 60 10 sll %i1, 0x10, %g1 4000d24c: 83 30 60 10 srl %g1, 0x10, %g1 4000d250: 82 08 7e 00 and %g1, -512, %g1 4000d254: 80 a0 60 00 cmp %g1, 0 4000d258: 22 80 00 08 be,a 4000d278 4000d25c: c2 14 20 2e lduh [ %l0 + 0x2e ], %g1 rtems_set_errno_and_return_minus_one( EPERM ); 4000d260: 40 00 02 9a call 4000dcc8 <__errno> 4000d264: b0 10 3f ff mov -1, %i0 4000d268: 82 10 20 01 mov 1, %g1 4000d26c: c2 22 00 00 st %g1, [ %o0 ] 4000d270: 81 c7 e0 08 ret 4000d274: 81 e8 00 00 restore jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO); jnode->st_mode |= mode; IMFS_update_ctime( jnode ); 4000d278: 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; 4000d27c: 82 08 7e 00 and %g1, -512, %g1 4000d280: 82 16 40 01 or %i1, %g1, %g1 IMFS_update_ctime( jnode ); 4000d284: 92 10 20 00 clr %o1 4000d288: 7f ff f7 87 call 4000b0a4 4000d28c: c2 34 20 2e sth %g1, [ %l0 + 0x2e ] 4000d290: c2 07 bf f0 ld [ %fp + -16 ], %g1 4000d294: c2 24 20 44 st %g1, [ %l0 + 0x44 ] return 0; } 4000d298: 81 c7 e0 08 ret 4000d29c: 91 e8 20 00 restore %g0, 0, %o0 4000a814 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 4000a814: 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 ); 4000a818: 80 a6 20 00 cmp %i0, 0 4000a81c: 12 80 00 0a bne 4000a844 4000a820: 80 a6 60 00 cmp %i1, 0 4000a824: 11 10 00 60 sethi %hi(0x40018000), %o0 <== NOT EXECUTED 4000a828: 15 10 00 60 sethi %hi(0x40018000), %o2 <== NOT EXECUTED 4000a82c: 17 10 00 60 sethi %hi(0x40018000), %o3 <== NOT EXECUTED 4000a830: 90 12 21 c8 or %o0, 0x1c8, %o0 <== NOT EXECUTED 4000a834: 94 12 a2 38 or %o2, 0x238, %o2 <== NOT EXECUTED 4000a838: 96 12 e2 18 or %o3, 0x218, %o3 <== NOT EXECUTED 4000a83c: 7f ff e1 6b call 40002de8 <__assert_func> <== NOT EXECUTED 4000a840: 92 10 20 2a mov 0x2a, %o1 <== NOT EXECUTED if ( !name ) 4000a844: 02 80 00 1c be 4000a8b4 4000a848: 90 10 00 19 mov %i1, %o0 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 4000a84c: 13 10 00 60 sethi %hi(0x40018000), %o1 4000a850: 40 00 11 ee call 4000f008 4000a854: 92 12 62 28 or %o1, 0x228, %o1 ! 40018228 4000a858: 80 a2 20 00 cmp %o0, 0 4000a85c: 02 80 00 09 be 4000a880 4000a860: 90 10 00 19 mov %i1, %o0 return directory; if ( !strcmp( name, dotdotname ) ) 4000a864: 13 10 00 60 sethi %hi(0x40018000), %o1 4000a868: 40 00 11 e8 call 4000f008 4000a86c: 92 12 62 30 or %o1, 0x230, %o1 ! 40018230 4000a870: 80 a2 20 00 cmp %o0, 0 4000a874: 12 80 00 05 bne 4000a888 4000a878: a0 06 20 50 add %i0, 0x50, %l0 return directory->Parent; 4000a87c: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 4000a880: 81 c7 e0 08 ret <== NOT EXECUTED 4000a884: 81 e8 00 00 restore <== NOT EXECUTED the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 4000a888: 10 80 00 08 b 4000a8a8 4000a88c: 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 ) ) 4000a890: 40 00 11 de call 4000f008 4000a894: 92 06 20 0c add %i0, 0xc, %o1 4000a898: 80 a2 20 00 cmp %o0, 0 4000a89c: 02 80 00 07 be 4000a8b8 4000a8a0: 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 ) { 4000a8a4: 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 ); 4000a8a8: 80 a6 00 10 cmp %i0, %l0 4000a8ac: 12 bf ff f9 bne 4000a890 4000a8b0: 90 10 00 19 mov %i1, %o0 4000a8b4: b0 10 20 00 clr %i0 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 4000a8b8: 81 c7 e0 08 ret 4000a8bc: 81 e8 00 00 restore 4001f334 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 4001f334: 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; 4001f338: 94 10 20 10 mov 0x10, %o2 4001f33c: 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; 4001f340: 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 ); 4001f344: 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; 4001f348: 40 00 4c 55 call 4003249c 4001f34c: 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; 4001f350: c0 26 20 18 clr [ %i0 + 0x18 ] do { next = jnode->Parent; loc.node_access = (void *)jnode; 4001f354: e0 27 bf e8 st %l0, [ %fp + -24 ] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 4001f358: f0 04 20 08 ld [ %l0 + 8 ], %i0 loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 4001f35c: 7f ff fd f8 call 4001eb3c 4001f360: 90 10 00 11 mov %l1, %o0 if ( jnode->type != IMFS_DIRECTORY ) { 4001f364: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4001f368: 80 a0 60 01 cmp %g1, 1 4001f36c: 12 80 00 06 bne 4001f384 4001f370: 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 ) ) { 4001f374: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 4001f378: 80 a0 40 02 cmp %g1, %g2 4001f37c: 12 80 00 08 bne 4001f39c 4001f380: 80 a4 20 00 cmp %l0, 0 result = IMFS_unlink( &loc ); 4001f384: 7f ff 9a 7f call 40005d80 4001f388: 90 10 00 11 mov %l1, %o0 if (result != 0) 4001f38c: 80 a2 20 00 cmp %o0, 0 4001f390: 12 80 00 13 bne 4001f3dc 4001f394: a0 10 00 18 mov %i0, %l0 return -1; jnode = next; } if ( jnode != NULL ) { 4001f398: 80 a4 20 00 cmp %l0, 0 4001f39c: 22 80 00 11 be,a 4001f3e0 4001f3a0: b0 10 20 00 clr %i0 if ( jnode->type == IMFS_DIRECTORY ) { 4001f3a4: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4001f3a8: 80 a0 60 01 cmp %g1, 1 4001f3ac: 32 bf ff eb bne,a 4001f358 4001f3b0: e0 27 bf e8 st %l0, [ %fp + -24 ] <== NOT EXECUTED if ( jnode_has_children( jnode ) ) 4001f3b4: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 4001f3b8: 82 04 20 50 add %l0, 0x50, %g1 4001f3bc: 80 a0 80 01 cmp %g2, %g1 4001f3c0: 22 bf ff e6 be,a 4001f358 4001f3c4: e0 27 bf e8 st %l0, [ %fp + -24 ] jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 4001f3c8: a0 90 a0 00 orcc %g2, 0, %l0 4001f3cc: 32 bf ff e3 bne,a 4001f358 4001f3d0: e0 27 bf e8 st %l0, [ %fp + -24 ] 4001f3d4: 81 c7 e0 08 ret <== NOT EXECUTED 4001f3d8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4001f3dc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return 0; } 4001f3e0: 81 c7 e0 08 ret 4001f3e4: 81 e8 00 00 restore 4000a9a8 : 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 ) { 4000a9a8: 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, 4000a9ac: 03 10 00 63 sethi %hi(0x40018c00), %g1 4000a9b0: 84 10 20 10 mov 0x10, %g2 4000a9b4: c6 00 62 1c ld [ %g1 + 0x21c ], %g3 4000a9b8: 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); 4000a9bc: 80 a0 80 03 cmp %g2, %g3 4000a9c0: 02 80 00 06 be 4000a9d8 4000a9c4: 82 00 60 01 inc %g1 4000a9c8: 80 a0 60 06 cmp %g1, 6 4000a9cc: 12 bf ff fc bne 4000a9bc 4000a9d0: 85 28 a0 01 sll %g2, 1, %g2 4000a9d4: 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) 4000a9d8: 03 10 00 66 sethi %hi(0x40019800), %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( 4000a9dc: 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) 4000a9e0: c4 20 61 e4 st %g2, [ %g1 + 0x1e4 ] * 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( 4000a9e4: 92 10 20 01 mov 1, %o1 4000a9e8: 90 10 20 00 clr %o0 4000a9ec: 15 10 00 5f sethi %hi(0x40017c00), %o2 4000a9f0: 17 00 00 10 sethi %hi(0x4000), %o3 4000a9f4: 94 12 a2 d8 or %o2, 0x2d8, %o2 4000a9f8: 40 00 09 b4 call 4000d0c8 4000a9fc: 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; 4000aa00: 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( 4000aa04: 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; 4000aa08: f2 26 20 20 st %i1, [ %i0 + 0x20 ] "", ( S_IFDIR | 0755 ), NULL ); temp_mt_entry->mt_fs_root.handlers = directory_handlers; 4000aa0c: 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; 4000aa10: 13 10 00 61 sethi %hi(0x40018400), %o1 4000aa14: 90 06 20 30 add %i0, 0x30, %o0 4000aa18: 40 00 0e 9e call 4000e490 4000aa1c: 92 12 62 78 or %o1, 0x278, %o1 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 4000aa20: 90 10 20 01 mov 1, %o0 4000aa24: 40 00 00 e7 call 4000adc0 4000aa28: 92 10 20 0c mov 0xc, %o1 if ( !fs_info ){ 4000aa2c: 80 a2 20 00 cmp %o0, 0 4000aa30: 12 80 00 0a bne 4000aa58 4000aa34: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 free(temp_mt_entry->mt_fs_root.node_access); 4000aa38: 40 00 01 2c call 4000aee8 <== NOT EXECUTED 4000aa3c: 90 10 00 02 mov %g2, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 4000aa40: 40 00 0c a2 call 4000dcc8 <__errno> <== NOT EXECUTED 4000aa44: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000aa48: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 4000aa4c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000aa50: 81 c7 e0 08 ret <== NOT EXECUTED 4000aa54: 81 e8 00 00 restore <== NOT EXECUTED /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 4000aa58: 82 10 20 01 mov 1, %g1 4000aa5c: 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; 4000aa60: 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; 4000aa64: f6 22 20 08 st %i3, [ %o0 + 8 ] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 4000aa68: 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; 4000aa6c: 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; } 4000aa70: 81 c7 e0 08 ret 4000aa74: 91 e8 20 00 restore %g0, 0, %o0 40005ae4 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 40005ae4: 9d e3 bf 58 save %sp, -168, %sp /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 40005ae8: c2 06 00 00 ld [ %i0 ], %g1 40005aec: c2 27 bf dc st %g1, [ %fp + -36 ] if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 40005af0: c2 10 60 30 lduh [ %g1 + 0x30 ], %g1 40005af4: 80 a0 60 07 cmp %g1, 7 40005af8: 08 80 00 06 bleu 40005b10 40005afc: 90 10 00 1a mov %i2, %o0 rtems_set_errno_and_return_minus_one( EMLINK ); 40005b00: 40 00 a8 7a call 4002fce8 <__errno> 40005b04: 01 00 00 00 nop 40005b08: 10 80 00 13 b 40005b54 40005b0c: 82 10 20 1f mov 0x1f, %g1 ! 1f /* * Remove any separators at the end of the string. */ IMFS_get_token( token, new_name, &i ); 40005b10: a0 07 bf b8 add %fp, -72, %l0 40005b14: 94 07 bf f4 add %fp, -12, %o2 40005b18: 7f ff ff 7b call 40005904 40005b1c: 92 10 00 10 mov %l0, %o1 /* * Create a new link node. */ new_node = IMFS_create_node( 40005b20: 90 10 00 19 mov %i1, %o0 40005b24: 94 10 00 10 mov %l0, %o2 40005b28: 92 10 20 03 mov 3, %o1 40005b2c: 17 00 00 28 sethi %hi(0xa000), %o3 40005b30: 98 07 bf dc add %fp, -36, %o4 40005b34: 40 00 63 a7 call 4001e9d0 40005b38: 96 12 e1 ff or %o3, 0x1ff, %o3 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 40005b3c: 80 a2 20 00 cmp %o0, 0 40005b40: 12 80 00 08 bne 40005b60 40005b44: c4 07 bf dc ld [ %fp + -36 ], %g2 rtems_set_errno_and_return_minus_one( ENOMEM ); 40005b48: 40 00 a8 68 call 4002fce8 <__errno> <== NOT EXECUTED 40005b4c: 01 00 00 00 nop <== NOT EXECUTED 40005b50: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 40005b54: c2 22 00 00 st %g1, [ %o0 ] 40005b58: 81 c7 e0 08 ret 40005b5c: 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 ); 40005b60: 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++; 40005b64: c2 10 a0 30 lduh [ %g2 + 0x30 ], %g1 IMFS_update_ctime( info.hard_link.link_node ); 40005b68: 92 10 20 00 clr %o1 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 40005b6c: 82 00 60 01 inc %g1 IMFS_update_ctime( info.hard_link.link_node ); 40005b70: 40 00 02 69 call 40006514 40005b74: c2 30 a0 30 sth %g1, [ %g2 + 0x30 ] 40005b78: c4 07 bf ec ld [ %fp + -20 ], %g2 40005b7c: c2 07 bf dc ld [ %fp + -36 ], %g1 40005b80: c4 20 60 44 st %g2, [ %g1 + 0x44 ] return 0; } 40005b84: 81 c7 e0 08 ret 40005b88: 91 e8 20 00 restore %g0, 0, %o0 40027144 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 40027144: 9d e3 bf 98 save %sp, -104, %sp 40027148: 90 10 00 18 mov %i0, %o0 block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 4002714c: 80 a6 20 00 cmp %i0, 0 40027150: 12 80 00 0a bne 40027178 40027154: 92 10 00 19 mov %i1, %o1 40027158: 11 10 01 16 sethi %hi(0x40045800), %o0 <== NOT EXECUTED 4002715c: 15 10 01 17 sethi %hi(0x40045c00), %o2 <== NOT EXECUTED 40027160: 17 10 01 17 sethi %hi(0x40045c00), %o3 <== NOT EXECUTED 40027164: 90 12 23 c8 or %o0, 0x3c8, %o0 <== NOT EXECUTED 40027168: 94 12 a1 88 or %o2, 0x188, %o2 <== NOT EXECUTED 4002716c: 96 12 e0 18 or %o3, 0x18, %o3 <== NOT EXECUTED 40027170: 10 80 00 0c b 400271a0 <== NOT EXECUTED 40027174: 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 ); 40027178: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4002717c: 80 a0 60 05 cmp %g1, 5 40027180: 02 80 00 0a be 400271a8 40027184: 15 10 01 17 sethi %hi(0x40045c00), %o2 40027188: 11 10 01 16 sethi %hi(0x40045800), %o0 <== NOT EXECUTED 4002718c: 17 10 01 17 sethi %hi(0x40045c00), %o3 <== NOT EXECUTED 40027190: 90 12 23 c8 or %o0, 0x3c8, %o0 <== NOT EXECUTED 40027194: 94 12 a1 88 or %o2, 0x188, %o2 <== NOT EXECUTED 40027198: 96 12 e0 28 or %o3, 0x28, %o3 <== NOT EXECUTED 4002719c: 92 10 21 6d mov 0x16d, %o1 <== NOT EXECUTED 400271a0: 7f ff 7b 94 call 40005ff0 <__assert_func> <== NOT EXECUTED 400271a4: 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 ); 400271a8: 7f ff fe 7a call 40026b90 400271ac: 94 10 20 01 mov 1, %o2 ! 1 if ( *block_entry_ptr ) 400271b0: 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 ); 400271b4: b2 10 00 08 mov %o0, %i1 if ( *block_entry_ptr ) 400271b8: 80 a0 60 00 cmp %g1, 0 400271bc: 12 80 00 09 bne 400271e0 400271c0: b0 10 20 00 clr %i0 #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 400271c4: 7f ff fe 66 call 40026b5c 400271c8: b0 10 20 01 mov 1, %i0 if ( !memory ) 400271cc: 80 a2 20 00 cmp %o0, 0 400271d0: 02 80 00 04 be 400271e0 400271d4: 01 00 00 00 nop return 1; *block_entry_ptr = memory; 400271d8: d0 26 40 00 st %o0, [ %i1 ] 400271dc: b0 10 20 00 clr %i0 return 0; } 400271e0: 81 c7 e0 08 ret 400271e4: 81 e8 00 00 restore 400271e8 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 400271e8: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 400271ec: a4 96 20 00 orcc %i0, 0, %l2 400271f0: 32 80 00 0a bne,a 40027218 400271f4: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 400271f8: 11 10 01 16 sethi %hi(0x40045800), %o0 <== NOT EXECUTED 400271fc: 15 10 01 17 sethi %hi(0x40045c00), %o2 <== NOT EXECUTED 40027200: 17 10 01 17 sethi %hi(0x40045c00), %o3 <== NOT EXECUTED 40027204: 90 12 23 c8 or %o0, 0x3c8, %o0 <== NOT EXECUTED 40027208: 94 12 a1 a0 or %o2, 0x1a0, %o2 <== NOT EXECUTED 4002720c: 96 12 e0 18 or %o3, 0x18, %o3 <== NOT EXECUTED 40027210: 10 80 00 0c b 40027240 <== NOT EXECUTED 40027214: 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 ); 40027218: 80 a0 60 05 cmp %g1, 5 4002721c: 02 80 00 0b be 40027248 40027220: 03 10 01 29 sethi %hi(0x4004a400), %g1 40027224: 11 10 01 16 sethi %hi(0x40045800), %o0 <== NOT EXECUTED 40027228: 15 10 01 17 sethi %hi(0x40045c00), %o2 <== NOT EXECUTED 4002722c: 17 10 01 17 sethi %hi(0x40045c00), %o3 <== NOT EXECUTED 40027230: 90 12 23 c8 or %o0, 0x3c8, %o0 <== NOT EXECUTED 40027234: 94 12 a1 a0 or %o2, 0x1a0, %o2 <== NOT EXECUTED 40027238: 96 12 e0 28 or %o3, 0x28, %o3 <== NOT EXECUTED 4002723c: 92 10 21 35 mov 0x135, %o1 <== NOT EXECUTED 40027240: 7f ff 7b 6c call 40005ff0 <__assert_func> <== NOT EXECUTED 40027244: 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 ) 40027248: e2 00 61 c4 ld [ %g1 + 0x1c4 ], %l1 4002724c: a1 34 60 02 srl %l1, 2, %l0 40027250: 92 10 00 10 mov %l0, %o1 40027254: 7f ff 6f c1 call 40003158 <.umul> 40027258: 90 04 20 01 add %l0, 1, %o0 4002725c: 92 10 00 10 mov %l0, %o1 40027260: 7f ff 6f be call 40003158 <.umul> 40027264: 90 02 20 01 inc %o0 40027268: 92 10 00 11 mov %l1, %o1 4002726c: 7f ff 6f bb call 40003158 <.umul> 40027270: 90 02 3f ff add %o0, -1, %o0 40027274: 80 a6 40 08 cmp %i1, %o0 40027278: 2a 80 00 06 bcs,a 40027290 4002727c: e0 04 a0 4c ld [ %l2 + 0x4c ], %l0 rtems_set_errno_and_return_minus_one( EINVAL ); 40027280: 40 00 22 9a call 4002fce8 <__errno> <== NOT EXECUTED 40027284: 01 00 00 00 nop <== NOT EXECUTED 40027288: 10 80 00 1f b 40027304 <== NOT EXECUTED 4002728c: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) 40027290: 80 a6 40 10 cmp %i1, %l0 40027294: 04 80 00 24 ble 40027324 40027298: b0 10 20 00 clr %i0 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 4002729c: 92 10 00 11 mov %l1, %o1 400272a0: 40 00 64 04 call 400402b0 <.div> 400272a4: 90 10 00 19 mov %i1, %o0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 400272a8: 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; 400272ac: b0 10 00 08 mov %o0, %i0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 400272b0: 40 00 64 00 call 400402b0 <.div> 400272b4: 90 10 00 10 mov %l0, %o0 400272b8: a2 10 00 08 mov %o0, %l1 400272bc: 10 80 00 15 b 40027310 400272c0: 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 ) ) { 400272c4: 7f ff ff a0 call 40027144 400272c8: 92 10 00 10 mov %l0, %o1 400272cc: 80 a2 20 00 cmp %o0, 0 400272d0: 22 80 00 10 be,a 40027310 400272d4: a0 04 20 01 inc %l0 for ( ; block>=old_blocks ; block-- ) { 400272d8: 10 80 00 06 b 400272f0 <== NOT EXECUTED 400272dc: 80 a4 00 11 cmp %l0, %l1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 400272e0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400272e4: 7f ff fe d5 call 40026e38 <== NOT EXECUTED 400272e8: 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-- ) { 400272ec: 80 a4 00 11 cmp %l0, %l1 <== NOT EXECUTED 400272f0: 1a bf ff fc bcc 400272e0 <== NOT EXECUTED 400272f4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 400272f8: 40 00 22 7c call 4002fce8 <__errno> <== NOT EXECUTED 400272fc: 01 00 00 00 nop <== NOT EXECUTED 40027300: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 40027304: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40027308: 81 c7 e0 08 ret <== NOT EXECUTED 4002730c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 40027310: 80 a4 00 18 cmp %l0, %i0 40027314: 08 bf ff ec bleu 400272c4 40027318: 90 10 00 12 mov %l2, %o0 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 4002731c: f2 24 a0 4c st %i1, [ %l2 + 0x4c ] 40027320: b0 10 20 00 clr %i0 return 0; } 40027324: 81 c7 e0 08 ret 40027328: 81 e8 00 00 restore 40026b90 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 40026b90: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40026b94: 80 a6 20 00 cmp %i0, 0 40026b98: 32 80 00 0a bne,a 40026bc0 40026b9c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40026ba0: 11 10 01 16 sethi %hi(0x40045800), %o0 <== NOT EXECUTED 40026ba4: 15 10 01 17 sethi %hi(0x40045c00), %o2 <== NOT EXECUTED 40026ba8: 17 10 01 17 sethi %hi(0x40045c00), %o3 <== NOT EXECUTED 40026bac: 90 12 23 c8 or %o0, 0x3c8, %o0 <== NOT EXECUTED 40026bb0: 94 12 a1 00 or %o2, 0x100, %o2 <== NOT EXECUTED 40026bb4: 96 12 e0 18 or %o3, 0x18, %o3 <== NOT EXECUTED 40026bb8: 10 80 00 0c b 40026be8 <== NOT EXECUTED 40026bbc: 92 10 23 86 mov 0x386, %o1 <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 40026bc0: 80 a0 60 05 cmp %g1, 5 40026bc4: 02 80 00 0b be 40026bf0 40026bc8: 03 10 01 29 sethi %hi(0x4004a400), %g1 40026bcc: 11 10 01 16 sethi %hi(0x40045800), %o0 <== NOT EXECUTED 40026bd0: 15 10 01 17 sethi %hi(0x40045c00), %o2 <== NOT EXECUTED 40026bd4: 17 10 01 17 sethi %hi(0x40045c00), %o3 <== NOT EXECUTED 40026bd8: 90 12 23 c8 or %o0, 0x3c8, %o0 <== NOT EXECUTED 40026bdc: 94 12 a1 00 or %o2, 0x100, %o2 <== NOT EXECUTED 40026be0: 96 12 e0 28 or %o3, 0x28, %o3 <== NOT EXECUTED 40026be4: 92 10 23 8a mov 0x38a, %o1 <== NOT EXECUTED 40026be8: 7f ff 7d 02 call 40005ff0 <__assert_func> <== NOT EXECUTED 40026bec: 01 00 00 00 nop <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 40026bf0: c2 00 61 c4 ld [ %g1 + 0x1c4 ], %g1 40026bf4: a3 30 60 02 srl %g1, 2, %l1 40026bf8: 82 04 7f ff add %l1, -1, %g1 40026bfc: 80 a6 40 01 cmp %i1, %g1 40026c00: 18 80 00 13 bgu 40026c4c 40026c04: 90 04 60 01 add %l1, 1, %o0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { 40026c08: 80 a6 a0 00 cmp %i2, 0 40026c0c: 02 80 00 0d be 40026c40 40026c10: c4 06 20 50 ld [ %i0 + 0x50 ], %g2 if ( !p ) { 40026c14: 80 a0 a0 00 cmp %g2, 0 40026c18: 12 80 00 08 bne 40026c38 40026c1c: 01 00 00 00 nop p = memfile_alloc_block(); 40026c20: 7f ff ff cf call 40026b5c 40026c24: 01 00 00 00 nop if ( !p ) 40026c28: 80 a2 20 00 cmp %o0, 0 40026c2c: 22 80 00 81 be,a 40026e30 40026c30: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->indirect = p; 40026c34: d0 26 20 50 st %o0, [ %i0 + 0x50 ] } return &info->indirect[ my_block ]; 40026c38: 10 80 00 2a b 40026ce0 40026c3c: c4 06 20 50 ld [ %i0 + 0x50 ], %g2 } if ( !p ) 40026c40: 80 a0 a0 00 cmp %g2, 0 return 0; return &info->indirect[ my_block ]; 40026c44: 10 80 00 30 b 40026d04 40026c48: 83 2e 60 02 sll %i1, 2, %g1 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 40026c4c: 7f ff 71 43 call 40003158 <.umul> <== NOT EXECUTED 40026c50: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40026c54: 82 02 3f ff add %o0, -1, %g1 <== NOT EXECUTED 40026c58: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 40026c5c: 18 80 00 2e bgu 40026d14 <== NOT EXECUTED 40026c60: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 40026c64: a0 26 40 11 sub %i1, %l1, %l0 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 40026c68: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40026c6c: 40 00 66 3b call 40040558 <.urem> <== NOT EXECUTED 40026c70: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40026c74: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 40026c78: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40026c7c: 40 00 65 8b call 400402a8 <.udiv> <== NOT EXECUTED 40026c80: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 40026c84: 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; 40026c88: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 40026c8c: 02 80 00 17 be 40026ce8 <== NOT EXECUTED 40026c90: d0 06 20 54 ld [ %i0 + 0x54 ], %o0 <== NOT EXECUTED if ( !p ) { 40026c94: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40026c98: 12 80 00 08 bne 40026cb8 <== NOT EXECUTED 40026c9c: 83 2c 20 02 sll %l0, 2, %g1 <== NOT EXECUTED p = memfile_alloc_block(); 40026ca0: 7f ff ff af call 40026b5c <== NOT EXECUTED 40026ca4: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 40026ca8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40026cac: 02 80 00 60 be 40026e2c <== NOT EXECUTED 40026cb0: 83 2c 20 02 sll %l0, 2, %g1 <== NOT EXECUTED return 0; info->doubly_indirect = p; 40026cb4: d0 26 20 54 st %o0, [ %i0 + 0x54 ] <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; 40026cb8: c4 02 00 01 ld [ %o0 + %g1 ], %g2 <== NOT EXECUTED if ( !p1 ) { 40026cbc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40026cc0: 12 80 00 08 bne 40026ce0 <== NOT EXECUTED 40026cc4: a0 02 00 01 add %o0, %g1, %l0 <== NOT EXECUTED p1 = memfile_alloc_block(); 40026cc8: 7f ff ff a5 call 40026b5c <== NOT EXECUTED 40026ccc: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 40026cd0: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 40026cd4: 22 80 00 57 be,a 40026e30 <== NOT EXECUTED 40026cd8: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 40026cdc: c4 24 00 00 st %g2, [ %l0 ] <== NOT EXECUTED } return (block_p *)&p1[ singly ]; 40026ce0: 10 80 00 51 b 40026e24 40026ce4: 83 2e 60 02 sll %i1, 2, %g1 } if ( !p ) 40026ce8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40026cec: 02 80 00 51 be 40026e30 <== NOT EXECUTED 40026cf0: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 40026cf4: 83 2c 20 02 sll %l0, 2, %g1 <== NOT EXECUTED 40026cf8: 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 ]; 40026cfc: 85 2e 60 02 sll %i1, 2, %g2 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 40026d00: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40026d04: 12 80 00 4b bne 40026e30 40026d08: b0 00 40 02 add %g1, %g2, %i0 p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 40026d0c: 81 c7 e0 08 ret <== NOT EXECUTED 40026d10: 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 ) { 40026d14: 90 02 20 01 inc %o0 <== NOT EXECUTED 40026d18: 7f ff 71 10 call 40003158 <.umul> <== NOT EXECUTED 40026d1c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40026d20: 90 02 3f ff add %o0, -1, %o0 <== NOT EXECUTED 40026d24: 80 a6 40 08 cmp %i1, %o0 <== NOT EXECUTED 40026d28: 18 80 00 41 bgu 40026e2c <== NOT EXECUTED 40026d2c: a0 26 40 10 sub %i1, %l0, %l0 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 40026d30: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40026d34: 40 00 66 09 call 40040558 <.urem> <== NOT EXECUTED 40026d38: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40026d3c: 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; 40026d40: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40026d44: 40 00 65 59 call 400402a8 <.udiv> <== NOT EXECUTED 40026d48: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 40026d4c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40026d50: 40 00 65 56 call 400402a8 <.udiv> <== NOT EXECUTED 40026d54: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 40026d58: 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; 40026d5c: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 40026d60: 40 00 65 fe call 40040558 <.urem> <== NOT EXECUTED 40026d64: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 40026d68: 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; 40026d6c: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 40026d70: 02 80 00 23 be 40026dfc <== NOT EXECUTED 40026d74: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 <== NOT EXECUTED if ( !p ) { 40026d78: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40026d7c: 12 80 00 08 bne 40026d9c <== NOT EXECUTED 40026d80: 83 2e 60 02 sll %i1, 2, %g1 <== NOT EXECUTED p = memfile_alloc_block(); 40026d84: 7f ff ff 76 call 40026b5c <== NOT EXECUTED 40026d88: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 40026d8c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40026d90: 02 80 00 27 be 40026e2c <== NOT EXECUTED 40026d94: 83 2e 60 02 sll %i1, 2, %g1 <== NOT EXECUTED return 0; info->triply_indirect = p; 40026d98: d0 26 20 58 st %o0, [ %i0 + 0x58 ] <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 40026d9c: c6 02 00 01 ld [ %o0 + %g1 ], %g3 <== NOT EXECUTED if ( !p1 ) { 40026da0: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40026da4: 12 80 00 08 bne 40026dc4 <== NOT EXECUTED 40026da8: a0 02 00 01 add %o0, %g1, %l0 <== NOT EXECUTED p1 = memfile_alloc_block(); 40026dac: 7f ff ff 6c call 40026b5c <== NOT EXECUTED 40026db0: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 40026db4: 86 92 20 00 orcc %o0, 0, %g3 <== NOT EXECUTED 40026db8: 02 80 00 1e be 40026e30 <== NOT EXECUTED 40026dbc: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 40026dc0: c6 24 00 00 st %g3, [ %l0 ] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 40026dc4: 83 2c 60 02 sll %l1, 2, %g1 <== NOT EXECUTED 40026dc8: d0 00 c0 01 ld [ %g3 + %g1 ], %o0 <== NOT EXECUTED if ( !p2 ) { 40026dcc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40026dd0: 12 80 00 08 bne 40026df0 <== NOT EXECUTED 40026dd4: a0 00 c0 01 add %g3, %g1, %l0 <== NOT EXECUTED p2 = memfile_alloc_block(); 40026dd8: 7f ff ff 61 call 40026b5c <== NOT EXECUTED 40026ddc: 01 00 00 00 nop <== NOT EXECUTED if ( !p2 ) 40026de0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40026de4: 22 80 00 13 be,a 40026e30 <== NOT EXECUTED 40026de8: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 40026dec: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED } return (block_p *)&p2[ singly ]; 40026df0: 83 2c a0 02 sll %l2, 2, %g1 <== NOT EXECUTED 40026df4: 81 c7 e0 08 ret <== NOT EXECUTED 40026df8: 91 ea 00 01 restore %o0, %g1, %o0 <== NOT EXECUTED } if ( !p ) 40026dfc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40026e00: 02 80 00 0c be 40026e30 <== NOT EXECUTED 40026e04: 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 ]; 40026e08: 83 2e 60 02 sll %i1, 2, %g1 <== NOT EXECUTED 40026e0c: d0 02 00 01 ld [ %o0 + %g1 ], %o0 <== NOT EXECUTED if ( !p1 ) 40026e10: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40026e14: 02 80 00 07 be 40026e30 <== NOT EXECUTED 40026e18: 83 2c 60 02 sll %l1, 2, %g1 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 40026e1c: c4 02 00 01 ld [ %o0 + %g1 ], %g2 <== NOT EXECUTED 40026e20: 83 2c a0 02 sll %l2, 2, %g1 <== NOT EXECUTED 40026e24: 81 c7 e0 08 ret 40026e28: 91 e8 80 01 restore %g2, %g1, %o0 40026e2c: b0 10 20 00 clr %i0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 40026e30: 81 c7 e0 08 ret 40026e34: 81 e8 00 00 restore 4002771c : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 4002771c: 9d e3 bf 90 save %sp, -112, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40027720: a6 96 20 00 orcc %i0, 0, %l3 40027724: 32 80 00 0a bne,a 4002774c 40027728: c4 04 e0 48 ld [ %l3 + 0x48 ], %g2 4002772c: 11 10 01 16 sethi %hi(0x40045800), %o0 <== NOT EXECUTED 40027730: 15 10 01 17 sethi %hi(0x40045c00), %o2 <== NOT EXECUTED 40027734: 17 10 01 17 sethi %hi(0x40045c00), %o3 <== NOT EXECUTED 40027738: 90 12 23 c8 or %o0, 0x3c8, %o0 <== NOT EXECUTED 4002773c: 94 12 a1 38 or %o2, 0x138, %o2 <== NOT EXECUTED 40027740: 96 12 e0 18 or %o3, 0x18, %o3 <== NOT EXECUTED 40027744: 10 80 00 0d b 40027778 <== NOT EXECUTED 40027748: 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 || 4002774c: 82 00 bf fb add %g2, -5, %g1 40027750: 80 a0 60 01 cmp %g1, 1 40027754: 08 80 00 0b bleu 40027780 40027758: 80 a6 a0 00 cmp %i2, 0 4002775c: 11 10 01 16 sethi %hi(0x40045800), %o0 <== NOT EXECUTED 40027760: 15 10 01 17 sethi %hi(0x40045c00), %o2 <== NOT EXECUTED 40027764: 17 10 01 17 sethi %hi(0x40045c00), %o3 <== NOT EXECUTED 40027768: 90 12 23 c8 or %o0, 0x3c8, %o0 <== NOT EXECUTED 4002776c: 94 12 a1 38 or %o2, 0x138, %o2 <== NOT EXECUTED 40027770: 96 12 e0 a8 or %o3, 0xa8, %o3 <== NOT EXECUTED 40027774: 92 10 22 4f mov 0x24f, %o1 <== NOT EXECUTED 40027778: 7f ff 7a 1e call 40005ff0 <__assert_func> <== NOT EXECUTED 4002777c: 01 00 00 00 nop <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 40027780: 32 80 00 0a bne,a 400277a8 40027784: 80 a6 e0 00 cmp %i3, 0 40027788: 11 10 01 16 sethi %hi(0x40045800), %o0 <== NOT EXECUTED 4002778c: 15 10 01 17 sethi %hi(0x40045c00), %o2 <== NOT EXECUTED 40027790: 17 10 01 17 sethi %hi(0x40045c00), %o3 <== NOT EXECUTED 40027794: 90 12 23 c8 or %o0, 0x3c8, %o0 <== NOT EXECUTED 40027798: 94 12 a1 38 or %o2, 0x138, %o2 <== NOT EXECUTED 4002779c: 96 12 e0 f8 or %o3, 0xf8, %o3 <== NOT EXECUTED 400277a0: 10 bf ff f6 b 40027778 <== NOT EXECUTED 400277a4: 92 10 22 58 mov 0x258, %o1 <== NOT EXECUTED /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 400277a8: 12 80 00 08 bne 400277c8 400277ac: 80 a0 a0 06 cmp %g2, 6 rtems_set_errno_and_return_minus_one( EINVAL ); 400277b0: 40 00 21 4e call 4002fce8 <__errno> <== NOT EXECUTED 400277b4: 01 00 00 00 nop <== NOT EXECUTED 400277b8: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 400277bc: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 400277c0: 10 80 00 76 b 40027998 <== NOT EXECUTED 400277c4: 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) { 400277c8: 32 80 00 0c bne,a 400277f8 400277cc: 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)) 400277d0: c2 04 e0 4c ld [ %l3 + 0x4c ], %g1 <== NOT EXECUTED 400277d4: b0 20 40 19 sub %g1, %i1, %i0 <== NOT EXECUTED 400277d8: 80 a6 00 1b cmp %i0, %i3 <== NOT EXECUTED 400277dc: 38 80 00 02 bgu,a 400277e4 <== NOT EXECUTED 400277e0: b0 10 00 1b mov %i3, %i0 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 400277e4: d2 04 e0 50 ld [ %l3 + 0x50 ], %o1 <== NOT EXECUTED 400277e8: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED 400277ec: 92 02 40 19 add %o1, %i1, %o1 <== NOT EXECUTED 400277f0: 10 80 00 62 b 40027978 <== NOT EXECUTED 400277f4: 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 ) 400277f8: 82 06 c0 19 add %i3, %i1, %g1 400277fc: 80 a0 40 02 cmp %g1, %g2 40027800: 18 80 00 03 bgu 4002780c 40027804: a0 20 80 19 sub %g2, %i1, %l0 40027808: 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; 4002780c: 03 10 01 29 sethi %hi(0x4004a400), %g1 40027810: f6 00 61 c4 ld [ %g1 + 0x1c4 ], %i3 ! 4004a5c4 40027814: 90 10 00 19 mov %i1, %o0 40027818: 40 00 63 52 call 40040560 <.rem> 4002781c: 92 10 00 1b mov %i3, %o1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40027820: 92 10 00 1b mov %i3, %o1 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 40027824: a2 10 00 08 mov %o0, %l1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40027828: 40 00 62 a2 call 400402b0 <.div> 4002782c: 90 10 00 19 mov %i1, %o0 if ( start_offset ) { 40027830: 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; 40027834: b2 10 00 08 mov %o0, %i1 if ( start_offset ) { 40027838: a4 10 00 1a mov %i2, %l2 4002783c: 02 80 00 1d be 400278b0 40027840: 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 ); 40027844: 90 10 00 13 mov %l3, %o0 40027848: 92 10 00 19 mov %i1, %o1 4002784c: 7f ff fc d1 call 40026b90 40027850: 94 10 20 00 clr %o2 assert( block_ptr ); 40027854: 80 a2 20 00 cmp %o0, 0 40027858: 32 80 00 0a bne,a 40027880 4002785c: 92 26 c0 11 sub %i3, %l1, %o1 40027860: 11 10 01 16 sethi %hi(0x40045800), %o0 <== NOT EXECUTED 40027864: 15 10 01 17 sethi %hi(0x40045c00), %o2 <== NOT EXECUTED 40027868: 17 10 01 17 sethi %hi(0x40045c00), %o3 <== NOT EXECUTED 4002786c: 90 12 23 c8 or %o0, 0x3c8, %o0 <== NOT EXECUTED 40027870: 94 12 a1 38 or %o2, 0x138, %o2 <== NOT EXECUTED 40027874: 96 12 e0 68 or %o3, 0x68, %o3 <== NOT EXECUTED 40027878: 10 bf ff c0 b 40027778 <== NOT EXECUTED 4002787c: 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; 40027880: 80 a4 00 09 cmp %l0, %o1 40027884: 08 80 00 03 bleu 40027890 40027888: 94 10 00 10 mov %l0, %o2 4002788c: 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 ); 40027890: d2 02 00 00 ld [ %o0 ], %o1 dest += to_copy; 40027894: 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 ); 40027898: 92 02 40 11 add %o1, %l1, %o1 dest += to_copy; block++; 4002789c: b2 06 60 01 inc %i1 my_length -= to_copy; 400278a0: a0 24 00 0a sub %l0, %o2, %l0 400278a4: 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 ); 400278a8: 40 00 2a fd call 4003249c 400278ac: 90 10 00 1a mov %i2, %o0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 400278b0: 03 10 01 29 sethi %hi(0x4004a400), %g1 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 400278b4: a2 10 61 c4 or %g1, 0x1c4, %l1 ! 4004a5c4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 400278b8: 10 80 00 17 b 40027914 400278bc: f6 00 61 c4 ld [ %g1 + 0x1c4 ], %i3 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 400278c0: 92 10 00 19 mov %i1, %o1 400278c4: 7f ff fc b3 call 40026b90 400278c8: 94 10 20 00 clr %o2 assert( block_ptr ); 400278cc: 80 a2 20 00 cmp %o0, 0 400278d0: 32 80 00 0a bne,a 400278f8 400278d4: d2 02 00 00 ld [ %o0 ], %o1 400278d8: 11 10 01 16 sethi %hi(0x40045800), %o0 <== NOT EXECUTED 400278dc: 15 10 01 17 sethi %hi(0x40045c00), %o2 <== NOT EXECUTED 400278e0: 17 10 01 17 sethi %hi(0x40045c00), %o3 <== NOT EXECUTED 400278e4: 90 12 23 c8 or %o0, 0x3c8, %o0 <== NOT EXECUTED 400278e8: 94 12 a1 38 or %o2, 0x138, %o2 <== NOT EXECUTED 400278ec: 96 12 e0 68 or %o3, 0x68, %o3 <== NOT EXECUTED 400278f0: 10 bf ff a2 b 40027778 <== NOT EXECUTED 400278f4: 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++; 400278f8: 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 ); 400278fc: 90 10 00 12 mov %l2, %o0 dest += to_copy; block++; my_length -= to_copy; 40027900: a0 24 00 1b sub %l0, %i3, %l0 copied += to_copy; 40027904: 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; 40027908: 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 ); 4002790c: 40 00 2a e4 call 4003249c 40027910: 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 ) { 40027914: c2 04 40 00 ld [ %l1 ], %g1 40027918: 80 a4 00 01 cmp %l0, %g1 4002791c: 1a bf ff e9 bcc 400278c0 40027920: 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 ) { 40027924: 80 a4 20 00 cmp %l0, 0 40027928: 02 80 00 17 be 40027984 4002792c: 90 07 bf f0 add %fp, -16, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40027930: 92 10 00 19 mov %i1, %o1 40027934: 90 10 00 13 mov %l3, %o0 40027938: 7f ff fc 96 call 40026b90 4002793c: 94 10 20 00 clr %o2 assert( block_ptr ); 40027940: 80 a2 20 00 cmp %o0, 0 40027944: 32 80 00 0a bne,a 4002796c 40027948: d2 02 00 00 ld [ %o0 ], %o1 4002794c: 11 10 01 16 sethi %hi(0x40045800), %o0 <== NOT EXECUTED 40027950: 15 10 01 17 sethi %hi(0x40045c00), %o2 <== NOT EXECUTED 40027954: 17 10 01 17 sethi %hi(0x40045c00), %o3 <== NOT EXECUTED 40027958: 90 12 23 c8 or %o0, 0x3c8, %o0 <== NOT EXECUTED 4002795c: 94 12 a1 38 or %o2, 0x138, %o2 <== NOT EXECUTED 40027960: 96 12 e0 68 or %o3, 0x68, %o3 <== NOT EXECUTED 40027964: 10 bf ff 85 b 40027778 <== NOT EXECUTED 40027968: 92 10 22 b7 mov 0x2b7, %o1 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; 4002796c: 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 ); 40027970: 90 10 00 12 mov %l2, %o0 40027974: 94 10 00 10 mov %l0, %o2 40027978: 40 00 2a c9 call 4003249c 4002797c: 01 00 00 00 nop copied += my_length; } IMFS_update_atime( the_jnode ); 40027980: 90 07 bf f0 add %fp, -16, %o0 40027984: 7f ff 7a e4 call 40006514 40027988: 92 10 20 00 clr %o1 4002798c: c2 07 bf f0 ld [ %fp + -16 ], %g1 return copied; 40027990: 94 10 00 18 mov %i0, %o2 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); 40027994: c2 24 e0 3c st %g1, [ %l3 + 0x3c ] return copied; } 40027998: 81 c7 e0 08 ret 4002799c: 91 e8 00 0a restore %g0, %o2, %o0 40026edc : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 40026edc: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40026ee0: 80 a6 20 00 cmp %i0, 0 40026ee4: 32 80 00 0a bne,a 40026f0c 40026ee8: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40026eec: 11 10 01 16 sethi %hi(0x40045800), %o0 <== NOT EXECUTED 40026ef0: 15 10 01 17 sethi %hi(0x40045c00), %o2 <== NOT EXECUTED 40026ef4: 17 10 01 17 sethi %hi(0x40045c00), %o3 <== NOT EXECUTED 40026ef8: 90 12 23 c8 or %o0, 0x3c8, %o0 <== NOT EXECUTED 40026efc: 94 12 a1 50 or %o2, 0x150, %o2 <== NOT EXECUTED 40026f00: 96 12 e0 18 or %o3, 0x18, %o3 <== NOT EXECUTED 40026f04: 10 80 00 0c b 40026f34 <== NOT EXECUTED 40026f08: 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 ); 40026f0c: 80 a0 60 05 cmp %g1, 5 40026f10: 02 80 00 0b be 40026f3c 40026f14: 03 10 01 29 sethi %hi(0x4004a400), %g1 40026f18: 11 10 01 16 sethi %hi(0x40045800), %o0 <== NOT EXECUTED 40026f1c: 15 10 01 17 sethi %hi(0x40045c00), %o2 <== NOT EXECUTED 40026f20: 17 10 01 17 sethi %hi(0x40045c00), %o3 <== NOT EXECUTED 40026f24: 90 12 23 c8 or %o0, 0x3c8, %o0 <== NOT EXECUTED 40026f28: 94 12 a1 50 or %o2, 0x150, %o2 <== NOT EXECUTED 40026f2c: 96 12 e0 28 or %o3, 0x28, %o3 <== NOT EXECUTED 40026f30: 92 10 21 f0 mov 0x1f0, %o1 <== NOT EXECUTED 40026f34: 7f ff 7c 2f call 40005ff0 <__assert_func> <== NOT EXECUTED 40026f38: 01 00 00 00 nop <== NOT EXECUTED * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 40026f3c: 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; 40026f40: c2 00 61 c4 ld [ %g1 + 0x1c4 ], %g1 * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 40026f44: 80 a0 a0 00 cmp %g2, 0 40026f48: 02 80 00 05 be 40026f5c 40026f4c: a7 30 60 02 srl %g1, 2, %l3 memfile_free_blocks_in_table( &info->indirect, to_free ); 40026f50: 90 06 20 50 add %i0, 0x50, %o0 40026f54: 7f ff ff c5 call 40026e68 40026f58: 92 10 00 13 mov %l3, %o1 } if ( info->doubly_indirect ) { 40026f5c: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 40026f60: 80 a0 60 00 cmp %g1, 0 40026f64: 02 80 00 15 be 40026fb8 40026f68: 03 10 01 29 sethi %hi(0x4004a400), %g1 40026f6c: a0 10 20 00 clr %l0 <== NOT EXECUTED for ( i=0 ; i <== NOT EXECUTED 40026f74: a2 10 61 c4 or %g1, 0x1c4, %l1 <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 40026f78: 85 2c 20 02 sll %l0, 2, %g2 <== NOT EXECUTED 40026f7c: c2 02 00 02 ld [ %o0 + %g2 ], %g1 <== NOT EXECUTED 40026f80: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40026f84: 02 80 00 04 be 40026f94 <== NOT EXECUTED 40026f88: 90 02 00 02 add %o0, %g2, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( 40026f8c: 7f ff ff b7 call 40026e68 <== NOT EXECUTED 40026f90: 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 40026fa8: 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 ); 40026fac: 90 06 20 54 add %i0, 0x54, %o0 <== NOT EXECUTED 40026fb0: 7f ff ff ae call 40026e68 <== NOT EXECUTED 40026fb4: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED } if ( info->triply_indirect ) { 40026fb8: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 40026fbc: 80 a0 60 00 cmp %g1, 0 40026fc0: 02 80 00 26 be 40027058 40026fc4: 03 10 01 29 sethi %hi(0x4004a400), %g1 40026fc8: a4 10 20 00 clr %l2 <== NOT EXECUTED for ( i=0 ; i <== NOT EXECUTED 40026fd0: aa 10 61 c4 or %g1, 0x1c4, %l5 <== NOT EXECUTED } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 40026fd4: a9 2c a0 02 sll %l2, 2, %l4 <== NOT EXECUTED for ( i=0 ; itriply_indirect[i]; 40026fd8: d0 00 40 14 ld [ %g1 + %l4 ], %o0 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 40026fdc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40026fe0: 22 80 00 1c be,a 40027050 <== NOT EXECUTED 40026fe4: 90 06 20 58 add %i0, 0x58, %o0 <== NOT EXECUTED break; 40026fe8: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 40026fec: 10 80 00 09 b 40027010 <== NOT EXECUTED 40026ff0: a2 10 20 00 clr %l1 <== NOT EXECUTED for ( j=0 ; j <== NOT EXECUTED 40026ffc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 40027000: 7f ff ff 9a call 40026e68 <== NOT EXECUTED 40027004: 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 40027020: 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( 40027024: 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 40027034: 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 40027048: 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( 4002704c: 90 06 20 58 add %i0, 0x58, %o0 <== NOT EXECUTED 40027050: 7f ff ff 86 call 40026e68 <== NOT EXECUTED 40027054: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 40027058: 81 c7 e0 08 ret 4002705c: 91 e8 20 00 restore %g0, 0, %o0 40026e38 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 40026e38: 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 ); 40026e3c: 94 10 20 00 clr %o2 <== NOT EXECUTED 40026e40: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40026e44: 7f ff ff 53 call 40026b90 <== NOT EXECUTED 40026e48: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED ptr = *block_entry_ptr; 40026e4c: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED *block_entry_ptr = 0; memfile_free_block( ptr ); return 1; } 40026e50: 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; 40026e54: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED memfile_free_block( ptr ); 40026e58: 7f ff ff 38 call 40026b38 <== NOT EXECUTED 40026e5c: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED return 1; } 40026e60: 81 c7 e0 08 ret <== NOT EXECUTED 40026e64: 81 e8 00 00 restore <== NOT EXECUTED 400273f0 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 400273f0: 9d e3 bf 90 save %sp, -112, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 400273f4: a4 96 20 00 orcc %i0, 0, %l2 400273f8: 32 80 00 0a bne,a 40027420 400273fc: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 40027400: 11 10 01 16 sethi %hi(0x40045800), %o0 <== NOT EXECUTED 40027404: 15 10 01 17 sethi %hi(0x40045c00), %o2 <== NOT EXECUTED 40027408: 17 10 01 17 sethi %hi(0x40045c00), %o3 <== NOT EXECUTED 4002740c: 90 12 23 c8 or %o0, 0x3c8, %o0 <== NOT EXECUTED 40027410: 94 12 a1 20 or %o2, 0x120, %o2 <== NOT EXECUTED 40027414: 96 12 e0 18 or %o3, 0x18, %o3 <== NOT EXECUTED 40027418: 10 80 00 82 b 40027620 <== NOT EXECUTED 4002741c: 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 ); 40027420: 80 a0 60 05 cmp %g1, 5 40027424: 02 80 00 0a be 4002744c 40027428: 80 a6 a0 00 cmp %i2, 0 4002742c: 11 10 01 16 sethi %hi(0x40045800), %o0 <== NOT EXECUTED 40027430: 15 10 01 17 sethi %hi(0x40045c00), %o2 <== NOT EXECUTED 40027434: 17 10 01 17 sethi %hi(0x40045c00), %o3 <== NOT EXECUTED 40027438: 90 12 23 c8 or %o0, 0x3c8, %o0 <== NOT EXECUTED 4002743c: 94 12 a1 20 or %o2, 0x120, %o2 <== NOT EXECUTED 40027440: 96 12 e0 28 or %o3, 0x28, %o3 <== NOT EXECUTED 40027444: 10 80 00 77 b 40027620 <== NOT EXECUTED 40027448: 92 10 22 e5 mov 0x2e5, %o1 <== NOT EXECUTED /* * Error check arguments */ assert( source ); 4002744c: 12 80 00 0a bne 40027474 40027450: 80 a6 e0 00 cmp %i3, 0 40027454: 11 10 01 16 sethi %hi(0x40045800), %o0 <== NOT EXECUTED 40027458: 15 10 01 17 sethi %hi(0x40045c00), %o2 <== NOT EXECUTED 4002745c: 17 10 01 17 sethi %hi(0x40045c00), %o3 <== NOT EXECUTED 40027460: 90 12 23 c8 or %o0, 0x3c8, %o0 <== NOT EXECUTED 40027464: 94 12 a1 20 or %o2, 0x120, %o2 <== NOT EXECUTED 40027468: 96 12 e0 60 or %o3, 0x60, %o3 <== NOT EXECUTED 4002746c: 10 80 00 6d b 40027620 <== NOT EXECUTED 40027470: 92 10 22 ed mov 0x2ed, %o1 <== NOT EXECUTED /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 40027474: 32 80 00 06 bne,a 4002748c 40027478: c2 04 a0 4c ld [ %l2 + 0x4c ], %g1 rtems_set_errno_and_return_minus_one( EINVAL ); 4002747c: 40 00 22 1b call 4002fce8 <__errno> <== NOT EXECUTED 40027480: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40027484: 10 80 00 0e b 400274bc <== NOT EXECUTED 40027488: 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; 4002748c: 92 06 c0 19 add %i3, %i1, %o1 if ( last_byte > the_jnode->info.file.size ) { 40027490: 80 a2 40 01 cmp %o1, %g1 40027494: 08 80 00 0d bleu 400274c8 40027498: 03 10 01 29 sethi %hi(0x4004a400), %g1 status = IMFS_memfile_extend( the_jnode, last_byte ); 4002749c: 7f ff ff 53 call 400271e8 400274a0: 90 10 00 12 mov %l2, %o0 if ( status ) 400274a4: 80 a2 20 00 cmp %o0, 0 400274a8: 02 80 00 08 be 400274c8 400274ac: 03 10 01 29 sethi %hi(0x4004a400), %g1 rtems_set_errno_and_return_minus_one( ENOSPC ); 400274b0: 40 00 22 0e call 4002fce8 <__errno> <== NOT EXECUTED 400274b4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400274b8: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 400274bc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400274c0: 81 c7 e0 08 ret <== NOT EXECUTED 400274c4: 81 e8 00 00 restore <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 400274c8: e0 00 61 c4 ld [ %g1 + 0x1c4 ], %l0 400274cc: 90 10 00 19 mov %i1, %o0 400274d0: 40 00 64 24 call 40040560 <.rem> 400274d4: 92 10 00 10 mov %l0, %o1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 400274d8: 92 10 00 10 mov %l0, %o1 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 400274dc: a2 10 00 08 mov %o0, %l1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 400274e0: 40 00 63 74 call 400402b0 <.div> 400274e4: 90 10 00 19 mov %i1, %o0 if ( start_offset ) { 400274e8: 80 a4 60 00 cmp %l1, 0 400274ec: 12 80 00 05 bne 40027500 400274f0: b2 10 00 08 mov %o0, %i1 400274f4: a0 10 00 1a mov %i2, %l0 400274f8: 10 80 00 1c b 40027568 400274fc: 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 ); 40027500: 90 10 00 12 mov %l2, %o0 40027504: 92 10 00 19 mov %i1, %o1 40027508: 7f ff fd a2 call 40026b90 4002750c: 94 10 20 00 clr %o2 assert( block_ptr ); 40027510: 80 a2 20 00 cmp %o0, 0 40027514: 32 80 00 0a bne,a 4002753c 40027518: 94 24 00 11 sub %l0, %l1, %o2 4002751c: 11 10 01 16 sethi %hi(0x40045800), %o0 <== NOT EXECUTED 40027520: 15 10 01 17 sethi %hi(0x40045c00), %o2 <== NOT EXECUTED 40027524: 17 10 01 17 sethi %hi(0x40045c00), %o3 <== NOT EXECUTED 40027528: 90 12 23 c8 or %o0, 0x3c8, %o0 <== NOT EXECUTED 4002752c: 94 12 a1 20 or %o2, 0x120, %o2 <== NOT EXECUTED 40027530: 96 12 e0 68 or %o3, 0x68, %o3 <== NOT EXECUTED 40027534: 10 80 00 3b b 40027620 <== NOT EXECUTED 40027538: 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; 4002753c: 80 a2 80 1b cmp %o2, %i3 40027540: 38 80 00 02 bgu,a 40027548 40027544: 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 ); 40027548: d0 02 00 00 ld [ %o0 ], %o0 src += to_copy; 4002754c: 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 ); 40027550: 90 02 00 11 add %o0, %l1, %o0 src += to_copy; block++; 40027554: b2 06 60 01 inc %i1 my_length -= to_copy; 40027558: b6 26 c0 0a sub %i3, %o2, %i3 copied += to_copy; 4002755c: 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 ); 40027560: 40 00 2b cf call 4003249c 40027564: 92 10 00 1a mov %i2, %o1 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 40027568: 03 10 01 29 sethi %hi(0x4004a400), %g1 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4002756c: a2 10 61 c4 or %g1, 0x1c4, %l1 ! 4004a5c4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 40027570: 10 80 00 17 b 400275cc 40027574: f4 00 61 c4 ld [ %g1 + 0x1c4 ], %i2 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40027578: 92 10 00 19 mov %i1, %o1 4002757c: 7f ff fd 85 call 40026b90 40027580: 94 10 20 00 clr %o2 assert( block_ptr ); 40027584: 80 a2 20 00 cmp %o0, 0 40027588: 32 80 00 0a bne,a 400275b0 4002758c: d0 02 00 00 ld [ %o0 ], %o0 40027590: 11 10 01 16 sethi %hi(0x40045800), %o0 <== NOT EXECUTED 40027594: 15 10 01 17 sethi %hi(0x40045c00), %o2 <== NOT EXECUTED 40027598: 17 10 01 17 sethi %hi(0x40045c00), %o3 <== NOT EXECUTED 4002759c: 90 12 23 c8 or %o0, 0x3c8, %o0 <== NOT EXECUTED 400275a0: 94 12 a1 20 or %o2, 0x120, %o2 <== NOT EXECUTED 400275a4: 96 12 e0 68 or %o3, 0x68, %o3 <== NOT EXECUTED 400275a8: 10 80 00 1e b 40027620 <== NOT EXECUTED 400275ac: 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 ); 400275b0: 92 10 00 10 mov %l0, %o1 src += to_copy; block++; 400275b4: b2 06 60 01 inc %i1 my_length -= to_copy; 400275b8: b6 26 c0 1a sub %i3, %i2, %i3 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 400275bc: 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; 400275c0: 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 ); 400275c4: 40 00 2b b6 call 4003249c 400275c8: 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 ) { 400275cc: c2 04 40 00 ld [ %l1 ], %g1 400275d0: 80 a6 c0 01 cmp %i3, %g1 400275d4: 1a bf ff e9 bcc 40027578 400275d8: 90 10 00 12 mov %l2, %o0 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 400275dc: 80 a6 e0 00 cmp %i3, 0 400275e0: 02 80 00 17 be 4002763c 400275e4: 90 07 bf f0 add %fp, -16, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 400275e8: 92 10 00 19 mov %i1, %o1 400275ec: 90 10 00 12 mov %l2, %o0 400275f0: 7f ff fd 68 call 40026b90 400275f4: 94 10 20 00 clr %o2 assert( block_ptr ); 400275f8: 80 a2 20 00 cmp %o0, 0 400275fc: 32 80 00 0b bne,a 40027628 40027600: d0 02 00 00 ld [ %o0 ], %o0 40027604: 11 10 01 16 sethi %hi(0x40045800), %o0 <== NOT EXECUTED 40027608: 15 10 01 17 sethi %hi(0x40045c00), %o2 <== NOT EXECUTED 4002760c: 17 10 01 17 sethi %hi(0x40045c00), %o3 <== NOT EXECUTED 40027610: 90 12 23 c8 or %o0, 0x3c8, %o0 <== NOT EXECUTED 40027614: 94 12 a1 20 or %o2, 0x120, %o2 <== NOT EXECUTED 40027618: 96 12 e0 68 or %o3, 0x68, %o3 <== NOT EXECUTED 4002761c: 92 10 23 44 mov 0x344, %o1 <== NOT EXECUTED 40027620: 7f ff 7a 74 call 40005ff0 <__assert_func> <== NOT EXECUTED 40027624: 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; 40027628: 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 ); 4002762c: 92 10 00 10 mov %l0, %o1 40027630: 40 00 2b 9b call 4003249c 40027634: 94 10 00 1b mov %i3, %o2 my_length = 0; copied += to_copy; } IMFS_atime_mtime_update( the_jnode ); 40027638: 90 07 bf f0 add %fp, -16, %o0 4002763c: 7f ff 7b b6 call 40006514 40027640: 92 10 20 00 clr %o1 40027644: c2 07 bf f0 ld [ %fp + -16 ], %g1 40027648: c2 24 a0 3c st %g1, [ %l2 + 0x3c ] 4002764c: c2 24 a0 40 st %g1, [ %l2 + 0x40 ] return copied; } 40027650: 81 c7 e0 08 ret 40027654: 81 e8 00 00 restore 4000aa78 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4000aa78: 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 ); 4000aa7c: 90 10 00 18 mov %i0, %o0 4000aa80: 92 07 bf c0 add %fp, -64, %o1 4000aa84: 7f ff ff 8f call 4000a8c0 4000aa88: 94 07 bf f4 add %fp, -12, %o2 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 4000aa8c: 03 00 00 3c sethi %hi(0xf000), %g1 4000aa90: b3 2e 60 10 sll %i1, 0x10, %i1 4000aa94: 97 36 60 10 srl %i1, 0x10, %o3 4000aa98: 84 0a c0 01 and %o3, %g1, %g2 4000aa9c: 03 00 00 10 sethi %hi(0x4000), %g1 4000aaa0: 80 a0 80 01 cmp %g2, %g1 4000aaa4: 02 80 00 17 be 4000ab00 4000aaa8: 90 10 00 1c mov %i4, %o0 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 4000aaac: 03 00 00 20 sethi %hi(0x8000), %g1 4000aab0: 80 a0 80 01 cmp %g2, %g1 4000aab4: 02 80 00 14 be 4000ab04 4000aab8: 92 10 20 05 mov 5, %o1 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 4000aabc: 03 00 00 18 sethi %hi(0x6000), %g1 4000aac0: 80 a0 80 01 cmp %g2, %g1 4000aac4: 02 80 00 05 be 4000aad8 4000aac8: 03 00 00 08 sethi %hi(0x2000), %g1 4000aacc: 80 a0 80 01 cmp %g2, %g1 4000aad0: 12 80 00 06 bne 4000aae8 4000aad4: 01 00 00 00 nop type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 4000aad8: f4 27 bf e4 st %i2, [ %fp + -28 ] 4000aadc: f6 27 bf e8 st %i3, [ %fp + -24 ] 4000aae0: 10 80 00 09 b 4000ab04 4000aae4: 92 10 20 02 mov 2, %o1 } else { rtems_set_errno_and_return_minus_one( EINVAL ); 4000aae8: 40 00 0c 78 call 4000dcc8 <__errno> <== NOT EXECUTED 4000aaec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000aaf0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000aaf4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000aaf8: 81 c7 e0 08 ret <== NOT EXECUTED 4000aafc: 81 e8 00 00 restore <== NOT EXECUTED 4000ab00: 92 10 20 01 mov 1, %o1 /* * Allocate and fill in an IMFS jnode */ new_node = IMFS_create_node( 4000ab04: 94 07 bf c0 add %fp, -64, %o2 4000ab08: 98 07 bf e4 add %fp, -28, %o4 4000ab0c: 40 00 09 6f call 4000d0c8 4000ab10: b0 10 20 00 clr %i0 new_name, mode, &info ); if ( !new_node ) 4000ab14: 80 a2 20 00 cmp %o0, 0 4000ab18: 12 80 00 06 bne 4000ab30 4000ab1c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOMEM ); 4000ab20: 40 00 0c 6a call 4000dcc8 <__errno> <== NOT EXECUTED 4000ab24: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4000ab28: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 4000ab2c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; } 4000ab30: 81 c7 e0 08 ret 4000ab34: 81 e8 00 00 restore 40005c4c : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 40005c4c: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 40005c50: c4 06 20 08 ld [ %i0 + 8 ], %g2 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 40005c54: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1 40005c58: 80 a0 60 01 cmp %g1, 1 40005c5c: 22 80 00 08 be,a 40005c7c 40005c60: f0 20 a0 58 st %i0, [ %g2 + 0x58 ] rtems_set_errno_and_return_minus_one( ENOTDIR ); 40005c64: 40 00 a8 21 call 4002fce8 <__errno> <== NOT EXECUTED 40005c68: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40005c6c: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 40005c70: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40005c74: 81 c7 e0 08 ret <== NOT EXECUTED 40005c78: 81 e8 00 00 restore <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } 40005c7c: 81 c7 e0 08 ret 40005c80: 91 e8 20 00 restore %g0, 0, %o0 40004884 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 40004884: 9d e3 bf 98 save %sp, -104, %sp assert( the_jnode ); 40004888: 80 a6 20 00 cmp %i0, 0 4000488c: 12 80 00 0a bne 400048b4 40004890: 21 10 00 84 sethi %hi(0x40021000), %l0 40004894: 11 10 00 7b sethi %hi(0x4001ec00), %o0 <== NOT EXECUTED 40004898: 15 10 00 7c sethi %hi(0x4001f000), %o2 <== NOT EXECUTED 4000489c: 17 10 00 7b sethi %hi(0x4001ec00), %o3 <== NOT EXECUTED 400048a0: 90 12 23 00 or %o0, 0x300, %o0 <== NOT EXECUTED 400048a4: 94 12 a0 d0 or %o2, 0xd0, %o2 <== NOT EXECUTED 400048a8: 96 12 e3 50 or %o3, 0x350, %o3 <== NOT EXECUTED 400048ac: 10 80 00 3b b 40004998 <== NOT EXECUTED 400048b0: 92 10 20 38 mov 0x38, %o1 <== NOT EXECUTED fprintf(stdout, "%s", the_jnode->name ); 400048b4: c2 04 21 70 ld [ %l0 + 0x170 ], %g1 400048b8: 90 06 20 0c add %i0, 0xc, %o0 400048bc: 40 00 37 8a call 400126e4 400048c0: d2 00 60 08 ld [ %g1 + 8 ], %o1 switch( the_jnode->type ) { 400048c4: d4 06 20 48 ld [ %i0 + 0x48 ], %o2 400048c8: 82 02 bf ff add %o2, -1, %g1 400048cc: 80 a0 60 05 cmp %g1, 5 400048d0: 38 80 00 3b bgu,a 400049bc 400048d4: c2 04 21 70 ld [ %l0 + 0x170 ], %g1 <== NOT EXECUTED 400048d8: 83 28 60 02 sll %g1, 2, %g1 400048dc: 05 10 00 12 sethi %hi(0x40004800), %g2 400048e0: 84 10 a0 30 or %g2, 0x30, %g2 ! 40004830 400048e4: c2 00 80 01 ld [ %g2 + %g1 ], %g1 400048e8: 81 c0 40 00 jmp %g1 400048ec: 01 00 00 00 nop case IMFS_DIRECTORY: fprintf(stdout, "/" ); 400048f0: c2 04 21 70 ld [ %l0 + 0x170 ], %g1 400048f4: 90 10 20 2f mov 0x2f, %o0 400048f8: 40 00 37 43 call 40012604 400048fc: d2 00 60 08 ld [ %g1 + 8 ], %o1 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 40004900: 10 80 00 35 b 400049d4 40004904: 31 10 00 7b sethi %hi(0x4001ec00), %i0 case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 40004908: c2 04 21 70 ld [ %l0 + 0x170 ], %g1 4000490c: 13 10 00 7b sethi %hi(0x4001ec00), %o1 40004910: d6 06 20 50 ld [ %i0 + 0x50 ], %o3 40004914: d0 00 60 08 ld [ %g1 + 8 ], %o0 40004918: d4 06 20 4c ld [ %i0 + 0x4c ], %o2 4000491c: 10 80 00 08 b 4000493c 40004920: 92 12 63 60 or %o1, 0x360, %o1 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 40004924: c2 04 21 70 ld [ %l0 + 0x170 ], %g1 <== NOT EXECUTED 40004928: d6 06 20 50 ld [ %i0 + 0x50 ], %o3 <== NOT EXECUTED 4000492c: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 40004930: d4 06 20 4c ld [ %i0 + 0x4c ], %o2 <== NOT EXECUTED 40004934: 13 10 00 7b sethi %hi(0x4001ec00), %o1 <== NOT EXECUTED 40004938: 92 12 63 78 or %o1, 0x378, %o1 ! 4001ef78 <__func__.4894+0x270> <== NOT EXECUTED 4000493c: 40 00 37 18 call 4001259c 40004940: 31 10 00 7b sethi %hi(0x4001ec00), %i0 40004944: 30 80 00 24 b,a 400049d4 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 40004948: c2 04 21 70 ld [ %l0 + 0x170 ], %g1 4000494c: d4 06 20 4c ld [ %i0 + 0x4c ], %o2 40004950: d0 00 60 08 ld [ %g1 + 8 ], %o0 40004954: 13 10 00 7b sethi %hi(0x4001ec00), %o1 40004958: 40 00 37 11 call 4001259c 4000495c: 92 12 63 88 or %o1, 0x388, %o1 ! 4001ef88 <__func__.4894+0x280> default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 40004960: 10 80 00 1d b 400049d4 40004964: 31 10 00 7b sethi %hi(0x4001ec00), %i0 (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 40004968: c2 04 21 70 ld [ %l0 + 0x170 ], %g1 <== NOT EXECUTED 4000496c: 11 10 00 7b sethi %hi(0x4001ec00), %o0 <== NOT EXECUTED 40004970: d2 00 60 08 ld [ %g1 + 8 ], %o1 <== NOT EXECUTED 40004974: 40 00 37 5c call 400126e4 <== NOT EXECUTED 40004978: 90 12 23 98 or %o0, 0x398, %o0 <== NOT EXECUTED assert(0); 4000497c: 92 10 20 5d mov 0x5d, %o1 <== NOT EXECUTED 40004980: 11 10 00 7b sethi %hi(0x4001ec00), %o0 <== NOT EXECUTED 40004984: 15 10 00 7c sethi %hi(0x4001f000), %o2 <== NOT EXECUTED 40004988: 17 10 00 7b sethi %hi(0x4001ec00), %o3 <== NOT EXECUTED 4000498c: 90 12 23 00 or %o0, 0x300, %o0 <== NOT EXECUTED 40004990: 94 12 a0 d0 or %o2, 0xd0, %o2 <== NOT EXECUTED 40004994: 96 12 e1 00 or %o3, 0x100, %o3 <== NOT EXECUTED 40004998: 40 00 01 ea call 40005140 <__assert_func> <== NOT EXECUTED 4000499c: 01 00 00 00 nop <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 400049a0: c2 04 21 70 ld [ %l0 + 0x170 ], %g1 <== NOT EXECUTED 400049a4: 11 10 00 7b sethi %hi(0x4001ec00), %o0 <== NOT EXECUTED 400049a8: d2 00 60 08 ld [ %g1 + 8 ], %o1 <== NOT EXECUTED 400049ac: 40 00 37 4e call 400126e4 <== NOT EXECUTED 400049b0: 90 12 23 98 or %o0, 0x398, %o0 <== NOT EXECUTED assert(0); 400049b4: 10 bf ff f3 b 40004980 <== NOT EXECUTED 400049b8: 92 10 20 62 mov 0x62, %o1 <== NOT EXECUTED break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 400049bc: 13 10 00 7b sethi %hi(0x4001ec00), %o1 <== NOT EXECUTED 400049c0: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 400049c4: 40 00 36 f6 call 4001259c <== NOT EXECUTED 400049c8: 92 12 63 b0 or %o1, 0x3b0, %o1 <== NOT EXECUTED assert(0); 400049cc: 10 bf ff ed b 40004980 <== NOT EXECUTED 400049d0: 92 10 20 67 mov 0x67, %o1 <== NOT EXECUTED break; } puts(""); 400049d4: 40 00 3d e3 call 40014160 400049d8: 91 ee 22 d0 restore %i0, 0x2d0, %o0 400049dc: 01 00 00 00 nop 40005c90 : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 40005c90: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *node; int i; node = loc->node_access; 40005c94: c6 06 00 00 ld [ %i0 ], %g3 if ( node->type != IMFS_SYM_LINK ) 40005c98: c2 00 e0 48 ld [ %g3 + 0x48 ], %g1 40005c9c: 80 a0 60 04 cmp %g1, 4 40005ca0: 02 80 00 0a be 40005cc8 40005ca4: b0 10 20 00 clr %i0 rtems_set_errno_and_return_minus_one( EINVAL ); 40005ca8: 40 00 a8 10 call 4002fce8 <__errno> <== NOT EXECUTED 40005cac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40005cb0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40005cb4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40005cb8: 81 c7 e0 08 ret <== NOT EXECUTED 40005cbc: 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]; 40005cc0: 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++ ) 40005cc4: b0 06 20 01 inc %i0 40005cc8: 80 a6 00 1a cmp %i0, %i2 40005ccc: 1a 80 00 07 bcc 40005ce8 40005cd0: 01 00 00 00 nop 40005cd4: c2 00 e0 4c ld [ %g3 + 0x4c ], %g1 40005cd8: c4 48 40 18 ldsb [ %g1 + %i0 ], %g2 40005cdc: 80 a0 a0 00 cmp %g2, 0 40005ce0: 12 bf ff f8 bne 40005cc0 40005ce4: c2 08 40 18 ldub [ %g1 + %i0 ], %g1 buf[i] = node->info.sym_link.name[i]; return i; } 40005ce8: 81 c7 e0 08 ret 40005cec: 81 e8 00 00 restore 4000ab44 : */ int IMFS_rmnod( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4000ab44: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4000ab48: 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 ) { 4000ab4c: c2 04 20 08 ld [ %l0 + 8 ], %g1 4000ab50: 80 a0 60 00 cmp %g1, 0 4000ab54: 22 80 00 06 be,a 4000ab6c 4000ab58: 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 ); 4000ab5c: 40 00 06 23 call 4000c3e8 <_Chain_Extract> 4000ab60: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 4000ab64: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4000ab68: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 4000ab6c: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4000ab70: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 4000ab74: 90 07 bf f0 add %fp, -16, %o0 4000ab78: 40 00 01 4b call 4000b0a4 4000ab7c: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 4000ab80: 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) ) { 4000ab84: 90 10 00 10 mov %l0, %o0 4000ab88: 40 00 01 80 call 4000b188 4000ab8c: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 4000ab90: 80 a2 20 00 cmp %o0, 0 4000ab94: 12 80 00 18 bne 4000abf4 4000ab98: 01 00 00 00 nop 4000ab9c: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 4000aba0: 80 a0 60 00 cmp %g1, 0 4000aba4: 12 80 00 14 bne 4000abf4 4000aba8: 03 10 00 64 sethi %hi(0x40019000), %g1 /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 4000abac: c6 00 63 3c ld [ %g1 + 0x33c ], %g3 ! 4001933c 4000abb0: c4 06 00 00 ld [ %i0 ], %g2 4000abb4: c2 00 e0 04 ld [ %g3 + 4 ], %g1 4000abb8: 80 a0 40 02 cmp %g1, %g2 4000abbc: 22 80 00 02 be,a 4000abc4 4000abc0: c0 20 e0 04 clr [ %g3 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 4000abc4: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000abc8: 80 a0 60 04 cmp %g1, 4 4000abcc: 12 80 00 08 bne 4000abec 4000abd0: 01 00 00 00 nop if ( the_jnode->info.sym_link.name ) 4000abd4: d0 04 20 4c ld [ %l0 + 0x4c ], %o0 4000abd8: 80 a2 20 00 cmp %o0, 0 4000abdc: 02 80 00 04 be 4000abec 4000abe0: 01 00 00 00 nop free( (void*) the_jnode->info.sym_link.name ); 4000abe4: 40 00 00 c1 call 4000aee8 4000abe8: 01 00 00 00 nop } free( the_jnode ); 4000abec: 40 00 00 bf call 4000aee8 4000abf0: 90 10 00 10 mov %l0, %o0 } return 0; } 4000abf4: 81 c7 e0 08 ret 4000abf8: 91 e8 20 00 restore %g0, 0, %o0 4000abfc : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 4000abfc: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 4000ac00: f0 06 00 00 ld [ %i0 ], %i0 switch ( the_jnode->type ) { 4000ac04: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4000ac08: 80 a0 60 04 cmp %g1, 4 4000ac0c: 22 80 00 19 be,a 4000ac70 4000ac10: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED 4000ac14: 14 80 00 07 bg 4000ac30 4000ac18: 80 a0 60 06 cmp %g1, 6 4000ac1c: 80 a0 60 02 cmp %g1, 2 4000ac20: 12 80 00 0e bne 4000ac58 4000ac24: 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 ); 4000ac28: 10 80 00 06 b 4000ac40 4000ac2c: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 4000ac30: 14 80 00 0a bg 4000ac58 4000ac34: 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; 4000ac38: 10 80 00 06 b 4000ac50 4000ac3c: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 4000ac40: 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 ); 4000ac44: c2 26 60 04 st %g1, [ %i1 + 4 ] 4000ac48: 10 80 00 0a b 4000ac70 4000ac4c: c4 26 40 00 st %g2, [ %i1 ] break; case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 4000ac50: 10 80 00 08 b 4000ac70 4000ac54: 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 ); 4000ac58: 40 00 0c 1c call 4000dcc8 <__errno> <== NOT EXECUTED 4000ac5c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000ac60: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000ac64: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000ac68: 81 c7 e0 08 ret <== NOT EXECUTED 4000ac6c: 81 e8 00 00 restore <== NOT EXECUTED break; } buf->st_mode = the_jnode->st_mode; 4000ac70: c2 16 20 2e lduh [ %i0 + 0x2e ], %g1 buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4000ac74: 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; 4000ac78: c2 36 60 0c sth %g1, [ %i1 + 0xc ] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4000ac7c: 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; 4000ac80: 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; 4000ac84: 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; 4000ac88: 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; 4000ac8c: 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; 4000ac90: 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; 4000ac94: 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; 4000ac98: 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; 4000ac9c: 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; 4000aca0: 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; 4000aca4: 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; 4000aca8: 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; 4000acac: c2 26 60 34 st %g1, [ %i1 + 0x34 ] return 0; } 4000acb0: 81 c7 e0 08 ret 4000acb4: 91 e8 20 00 restore %g0, 0, %o0 40005cf0 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 40005cf0: 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 ); 40005cf4: 94 07 bf f4 add %fp, -12, %o2 40005cf8: a0 07 bf c0 add %fp, -64, %l0 40005cfc: 90 10 00 1a mov %i2, %o0 40005d00: 7f ff ff 01 call 40005904 40005d04: 92 10 00 10 mov %l0, %o1 /* * Duplicate link name */ info.sym_link.name = strdup( link_name); 40005d08: 40 00 bc ce call 40035040 40005d0c: 90 10 00 19 mov %i1, %o0 40005d10: d0 27 bf e4 st %o0, [ %fp + -28 ] if (info.sym_link.name == NULL) { 40005d14: 80 a2 20 00 cmp %o0, 0 40005d18: 12 80 00 08 bne 40005d38 40005d1c: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( ENOMEM); 40005d20: 40 00 a7 f2 call 4002fce8 <__errno> <== NOT EXECUTED 40005d24: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40005d28: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40005d2c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40005d30: 81 c7 e0 08 ret 40005d34: 81 e8 00 00 restore /* * Create a new link node. */ new_node = IMFS_create_node( 40005d38: 94 10 00 10 mov %l0, %o2 40005d3c: 92 10 20 04 mov 4, %o1 40005d40: 17 00 00 28 sethi %hi(0xa000), %o3 40005d44: 98 07 bf e4 add %fp, -28, %o4 40005d48: 96 12 e1 ff or %o3, 0x1ff, %o3 40005d4c: 40 00 63 21 call 4001e9d0 40005d50: b0 10 20 00 clr %i0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 40005d54: 80 a2 20 00 cmp %o0, 0 40005d58: 12 bf ff f6 bne 40005d30 40005d5c: d0 07 bf e4 ld [ %fp + -28 ], %o0 free( info.sym_link.name); 40005d60: 40 00 01 c3 call 4000646c <== NOT EXECUTED 40005d64: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM); 40005d68: 40 00 a7 e0 call 4002fce8 <__errno> <== NOT EXECUTED 40005d6c: 01 00 00 00 nop <== NOT EXECUTED 40005d70: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 40005d74: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return 0; } 40005d78: 81 c7 e0 08 ret <== NOT EXECUTED 40005d7c: 81 e8 00 00 restore <== NOT EXECUTED 40005d80 : #include int IMFS_unlink( rtems_filesystem_location_info_t *loc /* IN */ ) { 40005d80: 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; 40005d84: 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 ) { 40005d88: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40005d8c: 80 a0 60 03 cmp %g1, 3 40005d90: 32 80 00 29 bne,a 40005e34 40005d94: c2 06 20 04 ld [ %i0 + 4 ], %g1 if ( !node->info.hard_link.link_node ) 40005d98: e2 04 20 4c ld [ %l0 + 0x4c ], %l1 40005d9c: 80 a4 60 00 cmp %l1, 0 40005da0: 12 80 00 08 bne 40005dc0 40005da4: a4 07 bf e0 add %fp, -32, %l2 rtems_set_errno_and_return_minus_one( EINVAL ); 40005da8: 40 00 a7 d0 call 4002fce8 <__errno> <== NOT EXECUTED 40005dac: 01 00 00 00 nop <== NOT EXECUTED 40005db0: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 40005db4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40005db8: 10 80 00 22 b 40005e40 <== NOT EXECUTED 40005dbc: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED the_link = *loc; 40005dc0: 92 10 00 18 mov %i0, %o1 40005dc4: 94 10 20 10 mov 0x10, %o2 40005dc8: 40 00 b1 b5 call 4003249c 40005dcc: 90 10 00 12 mov %l2, %o0 the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 40005dd0: 90 10 00 12 mov %l2, %o0 40005dd4: 40 00 63 5a call 4001eb3c 40005dd8: 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) 40005ddc: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 40005de0: c2 10 a0 30 lduh [ %g2 + 0x30 ], %g1 40005de4: 80 a0 60 01 cmp %g1, 1 40005de8: 12 80 00 0b bne 40005e14 40005dec: 82 00 7f ff add %g1, -1, %g1 { result = (*the_link.handlers->rmnod_h)( &the_link ); 40005df0: c2 07 bf e4 ld [ %fp + -28 ], %g1 40005df4: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 40005df8: 9f c0 40 00 call %g1 40005dfc: 90 10 00 12 mov %l2, %o0 if ( result != 0 ) 40005e00: 80 a2 20 00 cmp %o0, 0 40005e04: 02 80 00 0b be 40005e30 40005e08: 90 10 3f ff mov -1, %o0 */ result = (*loc->handlers->rmnod_h)( loc ); return result; } 40005e0c: 81 c7 e0 08 ret 40005e10: 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 ); 40005e14: 90 07 bf f0 add %fp, -16, %o0 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 40005e18: c2 30 a0 30 sth %g1, [ %g2 + 0x30 ] IMFS_update_ctime( node->info.hard_link.link_node ); 40005e1c: 40 00 01 be call 40006514 40005e20: 92 10 20 00 clr %o1 40005e24: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 40005e28: c2 07 bf f0 ld [ %fp + -16 ], %g1 40005e2c: c2 20 a0 44 st %g1, [ %g2 + 0x44 ] /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( loc ); 40005e30: c2 06 20 04 ld [ %i0 + 4 ], %g1 40005e34: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 40005e38: 9f c0 40 00 call %g1 40005e3c: 90 10 00 18 mov %i0, %o0 return result; } 40005e40: b0 10 00 08 mov %o0, %i0 40005e44: 81 c7 e0 08 ret 40005e48: 81 e8 00 00 restore 40005e4c : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 40005e4c: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 40005e50: c4 06 20 08 ld [ %i0 + 8 ], %g2 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 40005e54: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1 40005e58: 80 a0 60 01 cmp %g1, 1 40005e5c: 22 80 00 06 be,a 40005e74 40005e60: c2 00 a0 58 ld [ %g2 + 0x58 ], %g1 rtems_set_errno_and_return_minus_one( ENOTDIR ); 40005e64: 40 00 a7 a1 call 4002fce8 <__errno> <== NOT EXECUTED 40005e68: 01 00 00 00 nop <== NOT EXECUTED 40005e6c: 10 80 00 08 b 40005e8c <== NOT EXECUTED 40005e70: 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 ) 40005e74: 80 a0 60 00 cmp %g1, 0 40005e78: 32 80 00 08 bne,a 40005e98 40005e7c: c0 20 a0 58 clr [ %g2 + 0x58 ] rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 40005e80: 40 00 a7 9a call 4002fce8 <__errno> <== NOT EXECUTED 40005e84: 01 00 00 00 nop <== NOT EXECUTED 40005e88: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 40005e8c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40005e90: 81 c7 e0 08 ret <== NOT EXECUTED 40005e94: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 40005e98: 81 c7 e0 08 ret 40005e9c: 91 e8 20 00 restore %g0, 0, %o0 40003104 : void RTEMS_Malloc_Initialize( void *start, size_t length, size_t sbrk_amount ) { 40003104: 9d e3 bf 98 save %sp, -104, %sp #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers ) 40003108: 03 10 00 66 sethi %hi(0x40019800), %g1 4000310c: c2 00 60 84 ld [ %g1 + 0x84 ], %g1 ! 40019884 40003110: 80 a0 60 00 cmp %g1, 0 40003114: 02 80 00 05 be 40003128 40003118: 01 00 00 00 nop (*rtems_malloc_statistics_helpers->initialize)(); 4000311c: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 40003120: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003124: 01 00 00 00 nop <== NOT EXECUTED /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 40003128: 40 00 20 bd call 4000b41c 4000312c: a0 10 00 18 mov %i0, %l0 starting_address = start; /* * Initialize the optional sbrk support for extending the heap */ if (rtems_malloc_sbrk_helpers) { 40003130: 03 10 00 66 sethi %hi(0x40019800), %g1 40003134: c2 00 60 88 ld [ %g1 + 0x88 ], %g1 ! 40019888 40003138: 80 a0 60 00 cmp %g1, 0 4000313c: 02 80 00 06 be 40003154 40003140: 90 10 00 18 mov %i0, %o0 starting_address = (*rtems_malloc_sbrk_helpers->initialize)( 40003144: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 40003148: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000314c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 40003150: 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() ) 40003154: 03 10 00 67 sethi %hi(0x40019c00), %g1 40003158: c2 00 61 f8 ld [ %g1 + 0x1f8 ], %g1 ! 40019df8 <_Configuration_Table> 4000315c: c2 08 60 28 ldub [ %g1 + 0x28 ], %g1 40003160: 80 a0 60 00 cmp %g1, 0 40003164: 02 80 00 07 be 40003180 40003168: 92 10 00 10 mov %l0, %o1 memset( starting_address, 0, length ); 4000316c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40003170: 92 10 20 00 clr %o1 <== NOT EXECUTED 40003174: 40 00 2d 00 call 4000e574 <== NOT EXECUTED 40003178: 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 ); 4000317c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40003180: 11 10 00 66 sethi %hi(0x40019800), %o0 40003184: 94 10 00 19 mov %i1, %o2 40003188: 90 12 23 98 or %o0, 0x398, %o0 4000318c: 40 00 10 99 call 400073f0 <_Heap_Initialize> 40003190: 96 10 20 08 mov 8, %o3 &RTEMS_Malloc_Heap, starting_address, length, CPU_HEAP_ALIGNMENT ); if ( !status ) 40003194: 80 a2 20 00 cmp %o0, 0 40003198: 12 80 00 04 bne 400031a8 4000319c: 05 10 00 66 sethi %hi(0x40019800), %g2 rtems_fatal_error_occurred( status ); 400031a0: 40 00 0e 40 call 40006aa0 <== NOT EXECUTED 400031a4: 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); 400031a8: c2 00 a3 f0 ld [ %g2 + 0x3f0 ], %g1 400031ac: 82 06 40 01 add %i1, %g1, %g1 400031b0: c2 20 a3 f0 st %g1, [ %g2 + 0x3f0 ] } 400031b4: 81 c7 e0 08 ret 400031b8: 81 e8 00 00 restore 40004cc8 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 40004cc8: 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 ) 40004ccc: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40004cd0: 02 80 00 4a be 40004df8 <== NOT EXECUTED 40004cd4: 03 10 01 29 sethi %hi(0x4004a400), %g1 <== NOT EXECUTED return; if ( !print_handler ) 40004cd8: e8 00 61 c0 ld [ %g1 + 0x1c0 ], %l4 ! 4004a5c0 <== NOT EXECUTED 40004cdc: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED 40004ce0: 02 80 00 46 be 40004df8 <== NOT EXECUTED 40004ce4: 80 a6 3f ff cmp %i0, -1 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 40004ce8: 32 80 00 0b bne,a 40004d14 <== NOT EXECUTED 40004cec: ec 06 21 48 ld [ %i0 + 0x148 ], %l6 <== NOT EXECUTED if (Stack_check_Interrupt_stack.area) { 40004cf0: 03 10 01 75 sethi %hi(0x4005d400), %g1 <== NOT EXECUTED 40004cf4: 96 10 63 4c or %g1, 0x34c, %o3 ! 4005d74c <== NOT EXECUTED 40004cf8: c2 02 e0 04 ld [ %o3 + 4 ], %g1 <== NOT EXECUTED 40004cfc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004d00: 02 80 00 3e be 40004df8 <== NOT EXECUTED 40004d04: a4 10 00 0b mov %o3, %l2 <== NOT EXECUTED stack = &Stack_check_Interrupt_stack; the_thread = 0; current = 0; } else return; 40004d08: b0 10 20 00 clr %i0 <== NOT EXECUTED 40004d0c: 10 80 00 03 b 40004d18 <== NOT EXECUTED 40004d10: ac 10 20 00 clr %l6 <== NOT EXECUTED } else { stack = &the_thread->Start.Initial_stack; 40004d14: 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); 40004d18: e0 04 a0 04 ld [ %l2 + 4 ], %l0 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 40004d1c: 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); 40004d20: a0 04 20 10 add %l0, 0x10, %l0 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 40004d24: a6 00 7f f0 add %g1, -16, %l3 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 40004d28: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40004d2c: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED 40004d30: 7f ff ff d6 call 40004c88 <== NOT EXECUTED 40004d34: a0 04 00 13 add %l0, %l3, %l0 <== NOT EXECUTED if ( high_water_mark ) 40004d38: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004d3c: 12 80 00 03 bne 40004d48 <== NOT EXECUTED 40004d40: aa 24 00 08 sub %l0, %o0, %l5 <== NOT EXECUTED 40004d44: aa 10 20 00 clr %l5 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { 40004d48: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40004d4c: 02 80 00 10 be 40004d8c <== NOT EXECUTED 40004d50: 03 10 01 29 sethi %hi(0x4004a400), %g1 <== NOT EXECUTED (*print_handler)( 40004d54: e0 06 20 08 ld [ %i0 + 8 ], %l0 <== NOT EXECUTED 40004d58: e2 00 61 bc ld [ %g1 + 0x1bc ], %l1 <== NOT EXECUTED 40004d5c: 94 07 bf f0 add %fp, -16, %o2 <== NOT EXECUTED 40004d60: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40004d64: 40 00 15 06 call 4000a17c <== NOT EXECUTED 40004d68: 92 10 20 05 mov 5, %o1 <== NOT EXECUTED 40004d6c: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 40004d70: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED 40004d74: 13 10 01 0b sethi %hi(0x40042c00), %o1 <== NOT EXECUTED 40004d78: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40004d7c: 9f c5 00 00 call %l4 <== NOT EXECUTED 40004d80: 92 12 61 98 or %o1, 0x198, %o1 <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 40004d84: 10 80 00 08 b 40004da4 <== NOT EXECUTED 40004d88: 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 ); 40004d8c: d0 00 61 bc ld [ %g1 + 0x1bc ], %o0 <== NOT EXECUTED 40004d90: 13 10 01 0b sethi %hi(0x40042c00), %o1 <== NOT EXECUTED 40004d94: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 40004d98: 9f c5 00 00 call %l4 <== NOT EXECUTED 40004d9c: 92 12 61 a8 or %o1, 0x1a8, %o1 <== NOT EXECUTED } (*print_handler)( 40004da0: d6 04 80 00 ld [ %l2 ], %o3 <== NOT EXECUTED 40004da4: d4 04 a0 04 ld [ %l2 + 4 ], %o2 <== NOT EXECUTED 40004da8: 21 10 01 29 sethi %hi(0x4004a400), %l0 <== NOT EXECUTED 40004dac: 23 10 01 29 sethi %hi(0x4004a400), %l1 <== NOT EXECUTED 40004db0: c2 04 21 c0 ld [ %l0 + 0x1c0 ], %g1 <== NOT EXECUTED 40004db4: d0 04 61 bc ld [ %l1 + 0x1bc ], %o0 <== NOT EXECUTED 40004db8: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED 40004dbc: 98 10 00 16 mov %l6, %o4 <== NOT EXECUTED 40004dc0: 96 02 80 0b add %o2, %o3, %o3 <== NOT EXECUTED 40004dc4: 9a 10 00 13 mov %l3, %o5 <== NOT EXECUTED 40004dc8: 13 10 01 0b sethi %hi(0x40042c00), %o1 <== NOT EXECUTED 40004dcc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004dd0: 92 12 61 b8 or %o1, 0x1b8, %o1 ! 40042db8 <__func__.4894+0x218> <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 40004dd4: 03 10 01 29 sethi %hi(0x4004a400), %g1 <== NOT EXECUTED 40004dd8: c2 00 61 b8 ld [ %g1 + 0x1b8 ], %g1 ! 4004a5b8 <== NOT EXECUTED 40004ddc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004de0: 12 80 00 08 bne 40004e00 <== NOT EXECUTED 40004de4: c2 04 21 c0 ld [ %l0 + 0x1c0 ], %g1 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 40004de8: d0 04 61 bc ld [ %l1 + 0x1bc ], %o0 <== NOT EXECUTED 40004dec: 13 10 01 0b sethi %hi(0x40042c00), %o1 <== NOT EXECUTED 40004df0: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004df4: 92 12 61 d8 or %o1, 0x1d8, %o1 ! 40042dd8 <__func__.4894+0x238> <== NOT EXECUTED 40004df8: 81 c7 e0 08 ret <== NOT EXECUTED 40004dfc: 81 e8 00 00 restore <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 40004e00: d0 04 61 bc ld [ %l1 + 0x1bc ], %o0 <== NOT EXECUTED 40004e04: 13 10 01 0b sethi %hi(0x40042c00), %o1 <== NOT EXECUTED 40004e08: 94 10 00 15 mov %l5, %o2 <== NOT EXECUTED 40004e0c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004e10: 92 12 61 e8 or %o1, 0x1e8, %o1 <== NOT EXECUTED 40004e14: 81 c7 e0 08 ret <== NOT EXECUTED 40004e18: 81 e8 00 00 restore <== NOT EXECUTED 40004c88 : /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 40004c88: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 40004c8c: 92 0a 7f fc and %o1, -4, %o1 <== NOT EXECUTED if (*base != U32_PATTERN) 40004c90: 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++) 40004c94: 84 02 00 09 add %o0, %o1, %g2 <== NOT EXECUTED if (*base != U32_PATTERN) 40004c98: 10 80 00 06 b 40004cb0 <== NOT EXECUTED 40004c9c: 86 10 61 a5 or %g1, 0x1a5, %g3 <== NOT EXECUTED 40004ca0: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40004ca4: 12 80 00 07 bne 40004cc0 <== NOT EXECUTED 40004ca8: 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++) 40004cac: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED 40004cb0: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED 40004cb4: 2a bf ff fb bcs,a 40004ca0 <== NOT EXECUTED 40004cb8: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40004cbc: 90 10 20 00 clr %o0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 40004cc0: 81 c3 e0 08 retl <== NOT EXECUTED 40004cc4: 01 00 00 00 nop 40004e90 : */ void Stack_check_report_blown_task( Thread_Control *running, bool pattern_ok ) { 40004e90: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; printk( 40004e94: d4 1e 20 08 ldd [ %i0 + 8 ], %o2 <== NOT EXECUTED 40004e98: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40004e9c: 11 10 01 0b sethi %hi(0x40042c00), %o0 <== NOT EXECUTED 40004ea0: 40 00 0a c5 call 400079b4 <== NOT EXECUTED 40004ea4: 90 12 22 58 or %o0, 0x258, %o0 ! 40042e58 <__func__.4894+0x2b8> <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif printk( 40004ea8: d4 06 20 c4 ld [ %i0 + 0xc4 ], %o2 <== NOT EXECUTED 40004eac: d2 06 20 c8 ld [ %i0 + 0xc8 ], %o1 <== NOT EXECUTED 40004eb0: 96 10 00 0a mov %o2, %o3 <== NOT EXECUTED 40004eb4: 11 10 01 0b sethi %hi(0x40042c00), %o0 <== NOT EXECUTED 40004eb8: 94 02 bf ff add %o2, -1, %o2 <== NOT EXECUTED 40004ebc: 90 12 22 98 or %o0, 0x298, %o0 <== NOT EXECUTED 40004ec0: 40 00 0a bd call 400079b4 <== NOT EXECUTED 40004ec4: 94 02 40 0a add %o1, %o2, %o2 <== NOT EXECUTED stack->area, stack->area + stack->size - 1, stack->size ); if ( !pattern_ok ) { 40004ec8: 80 8e 60 ff btst 0xff, %i1 <== NOT EXECUTED 40004ecc: 12 80 00 07 bne 40004ee8 <== NOT EXECUTED 40004ed0: 11 10 01 0b sethi %hi(0x40042c00), %o0 <== NOT EXECUTED printk( 40004ed4: d2 06 20 c8 ld [ %i0 + 0xc8 ], %o1 <== NOT EXECUTED 40004ed8: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED 40004edc: 90 12 22 c8 or %o0, 0x2c8, %o0 <== NOT EXECUTED 40004ee0: 40 00 0a b5 call 400079b4 <== NOT EXECUTED 40004ee4: 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 ); 40004ee8: 40 00 16 f9 call 4000aacc <== NOT EXECUTED 40004eec: 90 10 20 81 mov 0x81, %o0 <== NOT EXECUTED 40004ef0: 01 00 00 00 nop 40006cf4 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 40006cf4: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40006cf8: 03 10 00 67 sethi %hi(0x40019c00), %g1 40006cfc: e0 00 63 a4 ld [ %g1 + 0x3a4 ], %l0 ! 40019fa4 <_API_extensions_List> 40006d00: 82 10 63 a4 or %g1, 0x3a4, %g1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40006d04: 10 80 00 08 b 40006d24 <_API_extensions_Run_postdriver+0x30> 40006d08: 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 ) 40006d0c: 80 a0 60 00 cmp %g1, 0 40006d10: 22 80 00 05 be,a 40006d24 <_API_extensions_Run_postdriver+0x30> 40006d14: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postdriver_hook)(); 40006d18: 9f c0 40 00 call %g1 40006d1c: 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 ) { 40006d20: 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 ) ; 40006d24: 80 a4 00 11 cmp %l0, %l1 40006d28: 32 bf ff f9 bne,a 40006d0c <_API_extensions_Run_postdriver+0x18> 40006d2c: c2 04 20 0c ld [ %l0 + 0xc ], %g1 the_extension = (API_extensions_Control *) the_node; if ( the_extension->postdriver_hook ) (*the_extension->postdriver_hook)(); } } 40006d30: 81 c7 e0 08 ret 40006d34: 81 e8 00 00 restore 40006d38 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 40006d38: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40006d3c: 03 10 00 67 sethi %hi(0x40019c00), %g1 40006d40: e0 00 63 a4 ld [ %g1 + 0x3a4 ], %l0 ! 40019fa4 <_API_extensions_List> 40006d44: 82 10 63 a4 or %g1, 0x3a4, %g1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40006d48: 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 ); 40006d4c: 03 10 00 67 sethi %hi(0x40019c00), %g1 40006d50: 10 80 00 08 b 40006d70 <_API_extensions_Run_postswitch+0x38> 40006d54: a2 10 62 20 or %g1, 0x220, %l1 ! 40019e20 <_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 ) 40006d58: 80 a0 60 00 cmp %g1, 0 40006d5c: 22 80 00 05 be,a 40006d70 <_API_extensions_Run_postswitch+0x38> 40006d60: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postswitch_hook)( _Thread_Executing ); 40006d64: 9f c0 40 00 call %g1 40006d68: 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 ) { 40006d6c: 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 ) ; 40006d70: 80 a4 00 12 cmp %l0, %l2 40006d74: 32 bf ff f9 bne,a 40006d58 <_API_extensions_Run_postswitch+0x20> 40006d78: 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 ); } } 40006d7c: 81 c7 e0 08 ret 40006d80: 81 e8 00 00 restore 40006cb0 <_API_extensions_Run_predriver>: * * _API_extensions_Run_predriver */ void _API_extensions_Run_predriver( void ) { 40006cb0: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40006cb4: 03 10 00 67 sethi %hi(0x40019c00), %g1 40006cb8: e0 00 63 a4 ld [ %g1 + 0x3a4 ], %l0 ! 40019fa4 <_API_extensions_List> 40006cbc: 82 10 63 a4 or %g1, 0x3a4, %g1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40006cc0: 10 80 00 08 b 40006ce0 <_API_extensions_Run_predriver+0x30> 40006cc4: 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 ) 40006cc8: 80 a0 60 00 cmp %g1, 0 40006ccc: 22 80 00 05 be,a 40006ce0 <_API_extensions_Run_predriver+0x30> 40006cd0: e0 04 00 00 ld [ %l0 ], %l0 (*the_extension->predriver_hook)(); 40006cd4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40006cd8: 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 ) { 40006cdc: 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 ) ; 40006ce0: 80 a4 00 11 cmp %l0, %l1 40006ce4: 32 bf ff f9 bne,a 40006cc8 <_API_extensions_Run_predriver+0x18> 40006ce8: c2 04 20 08 ld [ %l0 + 8 ], %g1 the_extension = (API_extensions_Control *) the_node; if ( the_extension->predriver_hook ) (*the_extension->predriver_hook)(); } } 40006cec: 81 c7 e0 08 ret 40006cf0: 81 e8 00 00 restore 40009068 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 40009068: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing = _Thread_Executing; 4000906c: 03 10 00 72 sethi %hi(0x4001c800), %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 ); 40009070: 7f ff e7 65 call 40002e04 40009074: e0 00 60 b0 ld [ %g1 + 0xb0 ], %l0 ! 4001c8b0 <_Thread_Executing> 40009078: 84 10 00 08 mov %o0, %g2 if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 4000907c: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 40009080: 80 a0 60 00 cmp %g1, 0 40009084: 12 80 00 08 bne 400090a4 <_CORE_RWLock_Release+0x3c> 40009088: 80 a0 60 01 cmp %g1, 1 _ISR_Enable( level ); 4000908c: 7f ff e7 62 call 40002e14 <== NOT EXECUTED 40009090: b0 10 20 00 clr %i0 <== NOT EXECUTED executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 40009094: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 40009098: c2 24 20 34 st %g1, [ %l0 + 0x34 ] <== NOT EXECUTED 4000909c: 81 c7 e0 08 ret <== NOT EXECUTED 400090a0: 81 e8 00 00 restore <== NOT EXECUTED return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 400090a4: 32 80 00 0b bne,a 400090d0 <_CORE_RWLock_Release+0x68> 400090a8: c0 24 20 34 clr [ %l0 + 0x34 ] the_rwlock->number_of_readers -= 1; 400090ac: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 400090b0: 82 00 7f ff add %g1, -1, %g1 if ( the_rwlock->number_of_readers != 0 ) { 400090b4: 80 a0 60 00 cmp %g1, 0 400090b8: 02 80 00 05 be 400090cc <_CORE_RWLock_Release+0x64> 400090bc: c2 26 20 48 st %g1, [ %i0 + 0x48 ] /* must be unlocked again */ _ISR_Enable( level ); 400090c0: 7f ff e7 55 call 40002e14 400090c4: b0 10 20 00 clr %i0 400090c8: 30 80 00 25 b,a 4000915c <_CORE_RWLock_Release+0xf4> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 400090cc: 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; 400090d0: c0 26 20 44 clr [ %i0 + 0x44 ] _ISR_Enable( level ); 400090d4: 7f ff e7 50 call 40002e14 400090d8: 90 10 00 02 mov %g2, %o0 next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 400090dc: 40 00 05 d2 call 4000a824 <_Thread_queue_Dequeue> 400090e0: 90 10 00 18 mov %i0, %o0 if ( next ) { 400090e4: 80 a2 20 00 cmp %o0, 0 400090e8: 22 80 00 1d be,a 4000915c <_CORE_RWLock_Release+0xf4> 400090ec: b0 10 20 00 clr %i0 if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 400090f0: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 400090f4: 80 a0 60 01 cmp %g1, 1 400090f8: 32 80 00 05 bne,a 4000910c <_CORE_RWLock_Release+0xa4> 400090fc: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 40009100: 82 10 20 02 mov 2, %g1 40009104: 10 80 00 15 b 40009158 <_CORE_RWLock_Release+0xf0> 40009108: 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; 4000910c: 84 10 20 01 mov 1, %g2 } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 40009110: 82 00 60 01 inc %g1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 40009114: c4 26 20 44 st %g2, [ %i0 + 0x44 ] } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 40009118: 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 ); 4000911c: 40 00 07 19 call 4000ad80 <_Thread_queue_First> 40009120: 90 10 00 18 mov %i0, %o0 if ( !next || 40009124: 80 a2 20 00 cmp %o0, 0 40009128: 22 80 00 0d be,a 4000915c <_CORE_RWLock_Release+0xf4> 4000912c: b0 10 20 00 clr %i0 40009130: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 40009134: 80 a0 60 01 cmp %g1, 1 40009138: 02 80 00 08 be 40009158 <_CORE_RWLock_Release+0xf0> 4000913c: 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; 40009140: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 40009144: 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; 40009148: 82 00 60 01 inc %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 4000914c: 40 00 06 be call 4000ac44 <_Thread_queue_Extract> 40009150: c2 26 20 48 st %g1, [ %i0 + 0x48 ] 40009154: 30 bf ff f2 b,a 4000911c <_CORE_RWLock_Release+0xb4> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 40009158: b0 10 20 00 clr %i0 4000915c: 81 c7 e0 08 ret 40009160: 81 e8 00 00 restore 400134dc <_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 ) { 400134dc: 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 ) { 400134e0: 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 ) { 400134e4: 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 ) { 400134e8: 80 a6 80 01 cmp %i2, %g1 400134ec: 18 80 00 17 bgu 40013548 <_CORE_message_queue_Broadcast+0x6c> 400134f0: 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 ) { 400134f4: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 400134f8: 80 a0 60 00 cmp %g1, 0 400134fc: 02 80 00 0a be 40013524 <_CORE_message_queue_Broadcast+0x48> 40013500: a2 10 20 00 clr %l1 *count = 0; 40013504: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED 40013508: 81 c7 e0 08 ret <== NOT EXECUTED 4001350c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40013510: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 40013514: 40 00 21 83 call 4001bb20 40013518: a2 04 60 01 inc %l1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 4001351c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 40013520: 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))) { 40013524: 40 00 09 a0 call 40015ba4 <_Thread_queue_Dequeue> 40013528: 90 10 00 12 mov %l2, %o0 4001352c: 92 10 00 19 mov %i1, %o1 40013530: a0 10 00 08 mov %o0, %l0 40013534: 80 a2 20 00 cmp %o0, 0 40013538: 12 bf ff f6 bne 40013510 <_CORE_message_queue_Broadcast+0x34> 4001353c: 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; 40013540: e2 27 40 00 st %l1, [ %i5 ] 40013544: b0 10 20 00 clr %i0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 40013548: 81 c7 e0 08 ret 4001354c: 81 e8 00 00 restore 400132ac <_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 ) { 400132ac: 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 ) { 400132b0: 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 ) { 400132b4: 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 ) { 400132b8: 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 ) { 400132bc: 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 ) { 400132c0: 18 80 00 3f bgu 400133bc <_CORE_message_queue_Submit+0x110> 400132c4: 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 ) { 400132c8: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 400132cc: 80 a0 60 00 cmp %g1, 0 400132d0: 32 80 00 0f bne,a 4001330c <_CORE_message_queue_Submit+0x60> 400132d4: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 400132d8: 7f ff e8 c7 call 4000d5f4 <_Thread_queue_Dequeue> 400132dc: 90 10 00 11 mov %l1, %o0 if ( the_thread ) { 400132e0: a0 92 20 00 orcc %o0, 0, %l0 400132e4: 02 80 00 09 be 40013308 <_CORE_message_queue_Submit+0x5c> 400132e8: 92 10 00 19 mov %i1, %o1 400132ec: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 400132f0: 40 00 13 f1 call 400182b4 400132f4: 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; 400132f8: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 the_thread->Wait.count = submit_type; 400132fc: 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; 40013300: 10 80 00 15 b 40013354 <_CORE_message_queue_Submit+0xa8> 40013304: 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 < 40013308: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 4001330c: c2 04 60 44 ld [ %l1 + 0x44 ], %g1 40013310: 80 a0 80 01 cmp %g2, %g1 40013314: 1a 80 00 12 bcc 4001335c <_CORE_message_queue_Submit+0xb0> 40013318: 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 *) 4001331c: 7f ff e1 ed call 4000bad0 <_Chain_Get> 40013320: 90 04 60 68 add %l1, 0x68, %o0 /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 40013324: a0 92 20 00 orcc %o0, 0, %l0 40013328: 02 80 00 27 be 400133c4 <_CORE_message_queue_Submit+0x118> 4001332c: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40013330: 94 10 00 1a mov %i2, %o2 40013334: 40 00 13 e0 call 400182b4 40013338: 90 04 20 10 add %l0, 0x10, %o0 size ); the_message->Contents.size = size; the_message->priority = submit_type; _CORE_message_queue_Insert_message( 4001333c: 90 10 00 11 mov %l1, %o0 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 40013340: f4 24 20 0c st %i2, [ %l0 + 0xc ] the_message->priority = submit_type; 40013344: fa 24 20 08 st %i5, [ %l0 + 8 ] _CORE_message_queue_Insert_message( 40013348: 92 10 00 10 mov %l0, %o1 4001334c: 40 00 0c 13 call 40016398 <_CORE_message_queue_Insert_message> 40013350: 94 10 00 1d mov %i5, %o2 40013354: 81 c7 e0 08 ret 40013358: 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 ) { 4001335c: 02 80 00 18 be 400133bc <_CORE_message_queue_Submit+0x110> 40013360: 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() ) { 40013364: 03 10 00 a3 sethi %hi(0x40028c00), %g1 40013368: c2 00 62 6c ld [ %g1 + 0x26c ], %g1 ! 40028e6c <_ISR_Nest_level> 4001336c: 80 a0 60 00 cmp %g1, 0 40013370: 32 80 00 13 bne,a 400133bc <_CORE_message_queue_Submit+0x110> 40013374: 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; 40013378: 03 10 00 a3 sethi %hi(0x40028c00), %g1 _ISR_Disable( level ); 4001337c: 7f ff bc 6a call 40002524 40013380: e0 00 62 90 ld [ %g1 + 0x290 ], %l0 ! 40028e90 <_Thread_Executing> 40013384: 82 10 20 01 mov 1, %g1 40013388: 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; 4001338c: 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; 40013390: f6 24 20 20 st %i3, [ %l0 + 0x20 ] executing->Wait.return_argument_second.immutable_object = buffer; 40013394: f2 24 20 2c st %i1, [ %l0 + 0x2c ] executing->Wait.option = (uint32_t) size; 40013398: 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; 4001339c: 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 ); 400133a0: 7f ff bc 65 call 40002534 400133a4: b0 10 20 07 mov 7, %i0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 400133a8: d2 07 a0 60 ld [ %fp + 0x60 ], %o1 400133ac: 90 10 00 11 mov %l1, %o0 400133b0: 15 10 00 36 sethi %hi(0x4000d800), %o2 400133b4: 7f ff e8 f5 call 4000d788 <_Thread_queue_Enqueue_with_handler> 400133b8: 94 12 a3 54 or %o2, 0x354, %o2 ! 4000db54 <_Thread_queue_Timeout> 400133bc: 81 c7 e0 08 ret 400133c0: 81 e8 00 00 restore } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 400133c4: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED } 400133c8: 81 c7 e0 08 ret <== NOT EXECUTED 400133cc: 81 e8 00 00 restore <== NOT EXECUTED 4000c488 <_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 ) { 4000c488: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 4000c48c: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000c490: c4 00 62 20 ld [ %g1 + 0x220 ], %g2 ! 40019e20 <_Thread_Executing> CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 4000c494: d0 06 40 00 ld [ %i1 ], %o0 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4000c498: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4000c49c: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000c4a0: 80 a0 60 00 cmp %g1, 0 4000c4a4: 22 80 00 32 be,a 4000c56c <_CORE_mutex_Seize_interrupt_trylock+0xe4> 4000c4a8: c6 06 20 5c ld [ %i0 + 0x5c ], %g3 the_mutex->lock = CORE_MUTEX_LOCKED; 4000c4ac: c0 26 20 50 clr [ %i0 + 0x50 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000c4b0: 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; 4000c4b4: 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; 4000c4b8: 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; 4000c4bc: c4 26 20 5c st %g2, [ %i0 + 0x5c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4000c4c0: 82 10 20 01 mov 1, %g1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000c4c4: 80 a0 e0 02 cmp %g3, 2 4000c4c8: 02 80 00 05 be 4000c4dc <_CORE_mutex_Seize_interrupt_trylock+0x54> 4000c4cc: c2 26 20 54 st %g1, [ %i0 + 0x54 ] 4000c4d0: 80 a0 e0 03 cmp %g3, 3 4000c4d4: 32 80 00 06 bne,a 4000c4ec <_CORE_mutex_Seize_interrupt_trylock+0x64> 4000c4d8: 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++; 4000c4dc: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 4000c4e0: 82 00 60 01 inc %g1 4000c4e4: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000c4e8: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4000c4ec: 80 a0 60 03 cmp %g1, 3 4000c4f0: 22 80 00 03 be,a 4000c4fc <_CORE_mutex_Seize_interrupt_trylock+0x74> 4000c4f4: c6 06 20 4c ld [ %i0 + 0x4c ], %g3 _ISR_Enable( level ); 4000c4f8: 30 80 00 2c b,a 4000c5a8 <_CORE_mutex_Seize_interrupt_trylock+0x120> { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 4000c4fc: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 if ( current == ceiling ) { 4000c500: 80 a0 40 03 cmp %g1, %g3 4000c504: 12 80 00 03 bne 4000c510 <_CORE_mutex_Seize_interrupt_trylock+0x88> 4000c508: 01 00 00 00 nop _ISR_Enable( level ); 4000c50c: 30 80 00 27 b,a 4000c5a8 <_CORE_mutex_Seize_interrupt_trylock+0x120> <== NOT EXECUTED return 0; } if ( current > ceiling ) { 4000c510: 08 80 00 0f bleu 4000c54c <_CORE_mutex_Seize_interrupt_trylock+0xc4> 4000c514: 82 10 20 06 mov 6, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000c518: 05 10 00 67 sethi %hi(0x40019c00), %g2 4000c51c: c2 00 a1 60 ld [ %g2 + 0x160 ], %g1 ! 40019d60 <_Thread_Dispatch_disable_level> 4000c520: 82 00 60 01 inc %g1 4000c524: c2 20 a1 60 st %g1, [ %g2 + 0x160 ] _Thread_Disable_dispatch(); _ISR_Enable( level ); 4000c528: 7f ff d6 10 call 40001d68 4000c52c: 01 00 00 00 nop _Thread_Change_priority( 4000c530: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 4000c534: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 4000c538: 7f ff ee a1 call 40007fbc <_Thread_Change_priority> 4000c53c: 94 10 20 00 clr %o2 the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 4000c540: 7f ff f0 12 call 40008588 <_Thread_Enable_dispatch> 4000c544: b0 10 20 00 clr %i0 4000c548: 30 80 00 1a b,a 4000c5b0 <_CORE_mutex_Seize_interrupt_trylock+0x128> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4000c54c: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] the_mutex->lock = CORE_MUTEX_UNLOCKED; 4000c550: 82 10 20 01 mov 1, %g1 the_mutex->nest_count = 0; /* undo locking above */ 4000c554: 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; 4000c558: c2 26 20 50 st %g1, [ %i0 + 0x50 ] the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 4000c55c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 4000c560: 82 00 7f ff add %g1, -1, %g1 4000c564: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] _ISR_Enable( level ); 4000c568: 30 80 00 10 b,a 4000c5a8 <_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 ) ) { 4000c56c: 80 a0 c0 02 cmp %g3, %g2 4000c570: 12 80 00 12 bne 4000c5b8 <_CORE_mutex_Seize_interrupt_trylock+0x130> 4000c574: 01 00 00 00 nop switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4000c578: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 4000c57c: 80 a0 60 00 cmp %g1, 0 4000c580: 22 80 00 07 be,a 4000c59c <_CORE_mutex_Seize_interrupt_trylock+0x114> 4000c584: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 4000c588: 80 a0 60 01 cmp %g1, 1 4000c58c: 12 80 00 0b bne 4000c5b8 <_CORE_mutex_Seize_interrupt_trylock+0x130> 4000c590: 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; 4000c594: 10 80 00 05 b 4000c5a8 <_CORE_mutex_Seize_interrupt_trylock+0x120> 4000c598: 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++; 4000c59c: 82 00 60 01 inc %g1 4000c5a0: c2 26 20 54 st %g1, [ %i0 + 0x54 ] _ISR_Enable( level ); 4000c5a4: 30 80 00 01 b,a 4000c5a8 <_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 ); 4000c5a8: 7f ff d5 f0 call 40001d68 4000c5ac: b0 10 20 00 clr %i0 4000c5b0: 81 c7 e0 08 ret 4000c5b4: 81 e8 00 00 restore return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 4000c5b8: 81 c7 e0 08 ret 4000c5bc: 91 e8 20 01 restore %g0, 1, %o0 400070b0 <_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 ) { 400070b0: 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 ) { 400070b4: 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 ) { 400070b8: 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 ) { 400070bc: 80 a0 60 00 cmp %g1, 0 400070c0: 02 80 00 07 be 400070dc <_CORE_mutex_Surrender+0x2c> 400070c4: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !_Thread_Is_executing( holder ) ) 400070c8: 03 10 00 67 sethi %hi(0x40019c00), %g1 400070cc: c2 00 62 20 ld [ %g1 + 0x220 ], %g1 ! 40019e20 <_Thread_Executing> 400070d0: 80 a2 00 01 cmp %o0, %g1 400070d4: 12 80 00 52 bne 4000721c <_CORE_mutex_Surrender+0x16c> 400070d8: 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 ) 400070dc: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 400070e0: 80 a0 60 00 cmp %g1, 0 400070e4: 02 80 00 4d be 40007218 <_CORE_mutex_Surrender+0x168> 400070e8: 82 00 7f ff add %g1, -1, %g1 return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; if ( the_mutex->nest_count != 0 ) { 400070ec: 80 a0 60 00 cmp %g1, 0 400070f0: 02 80 00 09 be 40007114 <_CORE_mutex_Surrender+0x64> 400070f4: c2 24 20 54 st %g1, [ %l0 + 0x54 ] switch ( the_mutex->Attributes.lock_nesting_behavior ) { 400070f8: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 400070fc: 80 a0 60 00 cmp %g1, 0 40007100: 02 80 00 47 be 4000721c <_CORE_mutex_Surrender+0x16c> 40007104: b0 10 20 00 clr %i0 40007108: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4000710c: 02 80 00 44 be 4000721c <_CORE_mutex_Surrender+0x16c> <== NOT EXECUTED 40007110: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED 40007114: 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 ) || 40007118: 80 a0 60 02 cmp %g1, 2 4000711c: 02 80 00 04 be 4000712c <_CORE_mutex_Surrender+0x7c> 40007120: 80 a0 60 03 cmp %g1, 3 40007124: 32 80 00 07 bne,a 40007140 <_CORE_mutex_Surrender+0x90> 40007128: 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--; 4000712c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 40007130: 82 00 7f ff add %g1, -1, %g1 40007134: c2 22 20 1c st %g1, [ %o0 + 0x1c ] 40007138: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 } the_mutex->holder = NULL; 4000713c: 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 ) || 40007140: 80 a0 60 02 cmp %g1, 2 40007144: 02 80 00 05 be 40007158 <_CORE_mutex_Surrender+0xa8> 40007148: c0 24 20 60 clr [ %l0 + 0x60 ] 4000714c: 80 a0 60 03 cmp %g1, 3 40007150: 12 80 00 0d bne 40007184 <_CORE_mutex_Surrender+0xd4> 40007154: 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 && 40007158: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 4000715c: 80 a0 60 00 cmp %g1, 0 40007160: 12 80 00 09 bne 40007184 <_CORE_mutex_Surrender+0xd4> 40007164: 01 00 00 00 nop 40007168: d2 02 20 18 ld [ %o0 + 0x18 ], %o1 4000716c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 40007170: 80 a2 40 01 cmp %o1, %g1 40007174: 02 80 00 04 be 40007184 <_CORE_mutex_Surrender+0xd4> 40007178: 01 00 00 00 nop holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 4000717c: 40 00 03 90 call 40007fbc <_Thread_Change_priority> 40007180: 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 ) ) ) { 40007184: 40 00 05 dc call 400088f4 <_Thread_queue_Dequeue> 40007188: 90 10 00 10 mov %l0, %o0 4000718c: 86 92 20 00 orcc %o0, 0, %g3 40007190: 02 80 00 1f be 4000720c <_CORE_mutex_Surrender+0x15c> 40007194: 82 10 20 01 mov 1, %g1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 40007198: c2 00 e0 08 ld [ %g3 + 8 ], %g1 the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 4000719c: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 400071a0: c2 24 20 60 st %g1, [ %l0 + 0x60 ] } else #endif { the_mutex->holder = the_thread; 400071a4: c6 24 20 5c st %g3, [ %l0 + 0x5c ] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 400071a8: 82 10 20 01 mov 1, %g1 switch ( the_mutex->Attributes.discipline ) { 400071ac: 80 a0 a0 02 cmp %g2, 2 400071b0: 02 80 00 07 be 400071cc <_CORE_mutex_Surrender+0x11c> 400071b4: c2 24 20 54 st %g1, [ %l0 + 0x54 ] 400071b8: 80 a0 a0 03 cmp %g2, 3 400071bc: 12 80 00 18 bne 4000721c <_CORE_mutex_Surrender+0x16c> 400071c0: 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++; 400071c4: 10 80 00 07 b 400071e0 <_CORE_mutex_Surrender+0x130> 400071c8: 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++; 400071cc: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 400071d0: 82 00 60 01 inc %g1 400071d4: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] 400071d8: 81 c7 e0 08 ret 400071dc: 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 < 400071e0: 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++; 400071e4: 82 00 60 01 inc %g1 400071e8: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] if (the_mutex->Attributes.priority_ceiling < 400071ec: d2 04 20 4c ld [ %l0 + 0x4c ], %o1 400071f0: 80 a2 40 02 cmp %o1, %g2 400071f4: 3a 80 00 0a bcc,a 4000721c <_CORE_mutex_Surrender+0x16c> 400071f8: b0 10 20 00 clr %i0 <== NOT EXECUTED the_thread->current_priority){ _Thread_Change_priority( 400071fc: 40 00 03 70 call 40007fbc <_Thread_Change_priority> 40007200: 94 10 20 00 clr %o2 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 40007204: 81 c7 e0 08 ret 40007208: 91 e8 20 00 restore %g0, 0, %o0 4000720c: c2 24 20 50 st %g1, [ %l0 + 0x50 ] 40007210: 81 c7 e0 08 ret 40007214: 91 e8 20 00 restore %g0, 0, %o0 40007218: b0 10 20 00 clr %i0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 4000721c: 81 c7 e0 08 ret 40007220: 81 e8 00 00 restore 40007c60 <_CORE_spinlock_Release>: */ CORE_spinlock_Status _CORE_spinlock_Release( CORE_spinlock_Control *the_spinlock ) { 40007c60: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 40007c64: 7f ff ea 15 call 400024b8 40007c68: 01 00 00 00 nop /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 40007c6c: c2 06 20 04 ld [ %i0 + 4 ], %g1 40007c70: 80 a0 60 00 cmp %g1, 0 40007c74: 12 80 00 06 bne 40007c8c <_CORE_spinlock_Release+0x2c> 40007c78: 03 10 00 50 sethi %hi(0x40014000), %g1 _ISR_Enable( level ); 40007c7c: 7f ff ea 13 call 400024c8 40007c80: b0 10 20 06 mov 6, %i0 40007c84: 81 c7 e0 08 ret 40007c88: 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 ) { 40007c8c: c2 00 63 80 ld [ %g1 + 0x380 ], %g1 40007c90: c4 06 20 0c ld [ %i0 + 0xc ], %g2 40007c94: c2 00 60 08 ld [ %g1 + 8 ], %g1 40007c98: 80 a0 80 01 cmp %g2, %g1 40007c9c: 02 80 00 06 be 40007cb4 <_CORE_spinlock_Release+0x54> 40007ca0: 01 00 00 00 nop _ISR_Enable( level ); 40007ca4: 7f ff ea 09 call 400024c8 <== NOT EXECUTED 40007ca8: b0 10 20 02 mov 2, %i0 ! 2 <== NOT EXECUTED 40007cac: 81 c7 e0 08 ret <== NOT EXECUTED 40007cb0: 81 e8 00 00 restore <== NOT EXECUTED } /* * Let it be unlocked. */ the_spinlock->users -= 1; 40007cb4: c2 06 20 08 ld [ %i0 + 8 ], %g1 40007cb8: 82 00 7f ff add %g1, -1, %g1 40007cbc: c2 26 20 08 st %g1, [ %i0 + 8 ] the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 40007cc0: c0 26 20 04 clr [ %i0 + 4 ] the_spinlock->holder = 0; 40007cc4: c0 26 20 0c clr [ %i0 + 0xc ] _ISR_Enable( level ); 40007cc8: 7f ff ea 00 call 400024c8 40007ccc: b0 10 20 00 clr %i0 return CORE_SPINLOCK_SUCCESSFUL; } 40007cd0: 81 c7 e0 08 ret 40007cd4: 81 e8 00 00 restore 40007cd8 <_CORE_spinlock_Wait>: CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 40007cd8: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; 40007cdc: 03 10 00 51 sethi %hi(0x40014400), %g1 40007ce0: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 ! 40014414 <_Watchdog_Ticks_since_boot> _ISR_Disable( level ); 40007ce4: 7f ff e9 f5 call 400024b8 40007ce8: a2 06 80 01 add %i2, %g1, %l1 40007cec: 86 10 00 08 mov %o0, %g3 if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 40007cf0: c2 06 20 04 ld [ %i0 + 4 ], %g1 40007cf4: 80 a0 60 01 cmp %g1, 1 40007cf8: 12 80 00 0c bne 40007d28 <_CORE_spinlock_Wait+0x50> 40007cfc: 03 10 00 50 sethi %hi(0x40014000), %g1 40007d00: c2 00 63 80 ld [ %g1 + 0x380 ], %g1 ! 40014380 <_Thread_Executing> 40007d04: c4 06 20 0c ld [ %i0 + 0xc ], %g2 40007d08: c2 00 60 08 ld [ %g1 + 8 ], %g1 40007d0c: 80 a0 80 01 cmp %g2, %g1 40007d10: 12 80 00 06 bne 40007d28 <_CORE_spinlock_Wait+0x50> 40007d14: 01 00 00 00 nop (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); 40007d18: 7f ff e9 ec call 400024c8 40007d1c: b0 10 20 01 mov 1, %i0 ! 1 40007d20: 81 c7 e0 08 ret 40007d24: 81 e8 00 00 restore return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 40007d28: c2 06 20 08 ld [ %i0 + 8 ], %g1 } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 40007d2c: 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; 40007d30: 82 00 60 01 inc %g1 40007d34: 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) ) { 40007d38: 03 10 00 51 sethi %hi(0x40014400), %g1 40007d3c: a4 10 60 14 or %g1, 0x14, %l2 ! 40014414 <_Watchdog_Ticks_since_boot> 40007d40: 03 10 00 50 sethi %hi(0x40014000), %g1 40007d44: a0 10 62 c0 or %g1, 0x2c0, %l0 ! 400142c0 <_Thread_Dispatch_disable_level> _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 40007d48: c2 06 20 04 ld [ %i0 + 4 ], %g1 40007d4c: 80 a0 60 00 cmp %g1, 0 40007d50: 12 80 00 0d bne 40007d84 <_CORE_spinlock_Wait+0xac> 40007d54: 80 a6 60 00 cmp %i1, 0 the_spinlock->lock = CORE_SPINLOCK_LOCKED; the_spinlock->holder = _Thread_Executing->Object.id; 40007d58: 03 10 00 50 sethi %hi(0x40014000), %g1 40007d5c: c4 00 63 80 ld [ %g1 + 0x380 ], %g2 ! 40014380 <_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; 40007d60: 82 10 20 01 mov 1, %g1 40007d64: c2 26 20 04 st %g1, [ %i0 + 4 ] the_spinlock->holder = _Thread_Executing->Object.id; 40007d68: c2 00 a0 08 ld [ %g2 + 8 ], %g1 40007d6c: c2 26 20 0c st %g1, [ %i0 + 0xc ] _ISR_Enable( level ); 40007d70: b0 10 20 00 clr %i0 40007d74: 7f ff e9 d5 call 400024c8 40007d78: 90 10 00 03 mov %g3, %o0 40007d7c: 81 c7 e0 08 ret 40007d80: 81 e8 00 00 restore } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 40007d84: 12 80 00 0a bne 40007dac <_CORE_spinlock_Wait+0xd4> 40007d88: 80 a6 a0 00 cmp %i2, 0 the_spinlock->users -= 1; 40007d8c: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 40007d90: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40007d94: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED _ISR_Enable( level ); 40007d98: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED 40007d9c: 7f ff e9 cb call 400024c8 <== NOT EXECUTED 40007da0: 90 10 00 03 mov %g3, %o0 <== NOT EXECUTED 40007da4: 81 c7 e0 08 ret <== NOT EXECUTED 40007da8: 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) ) { 40007dac: 02 80 00 0e be 40007de4 <_CORE_spinlock_Wait+0x10c> 40007db0: 01 00 00 00 nop 40007db4: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED 40007db8: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 40007dbc: 18 80 00 0a bgu 40007de4 <_CORE_spinlock_Wait+0x10c> <== NOT EXECUTED 40007dc0: 01 00 00 00 nop <== NOT EXECUTED the_spinlock->users -= 1; 40007dc4: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 40007dc8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40007dcc: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED _ISR_Enable( level ); 40007dd0: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED 40007dd4: 7f ff e9 bd call 400024c8 <== NOT EXECUTED 40007dd8: 90 10 00 03 mov %g3, %o0 <== NOT EXECUTED 40007ddc: 81 c7 e0 08 ret <== NOT EXECUTED 40007de0: 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 ); 40007de4: 7f ff e9 b9 call 400024c8 40007de8: 90 10 00 03 mov %g3, %o0 /* An ISR could occur here */ _Thread_Enable_dispatch(); 40007dec: 40 00 04 8c call 4000901c <_Thread_Enable_dispatch> 40007df0: 01 00 00 00 nop 40007df4: c2 04 00 00 ld [ %l0 ], %g1 40007df8: 82 00 60 01 inc %g1 40007dfc: 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 ); 40007e00: 7f ff e9 ae call 400024b8 40007e04: 01 00 00 00 nop 40007e08: 86 10 00 08 mov %o0, %g3 40007e0c: 30 bf ff cf b,a 40007d48 <_CORE_spinlock_Wait+0x70> 40023a08 <_Chain_Insert>: void _Chain_Insert( Chain_Node *after_node, Chain_Node *node ) { 40023a08: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED ISR_Level level; _ISR_Disable( level ); 40023a0c: 7f ff 80 be call 40003d04 <== NOT EXECUTED 40023a10: 01 00 00 00 nop <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 40023a14: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 40023a18: f0 26 60 04 st %i0, [ %i1 + 4 ] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 40023a1c: f2 26 00 00 st %i1, [ %i0 ] <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 40023a20: 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; 40023a24: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED _Chain_Insert_unprotected( after_node, node ); _ISR_Enable( level ); 40023a28: 7f ff 80 bb call 40003d14 <== NOT EXECUTED 40023a2c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40023a30: 01 00 00 00 nop 4000c37c <_Debug_Is_enabled>: */ bool _Debug_Is_enabled( rtems_debug_control level ) { 4000c37c: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 4000c380: c2 00 62 24 ld [ %g1 + 0x224 ], %g1 ! 40019e24 <_Debug_Level> <== NOT EXECUTED 4000c384: 90 0a 00 01 and %o0, %g1, %o0 <== NOT EXECUTED 4000c388: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED return (_Debug_Level & level) ? true : false; } 4000c38c: 81 c3 e0 08 retl <== NOT EXECUTED 4000c390: 90 40 20 00 addx %g0, 0, %o0 <== NOT EXECUTED 40005eb8 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 40005eb8: 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 ]; 40005ebc: e0 06 21 5c ld [ %i0 + 0x15c ], %l0 option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 40005ec0: 7f ff ef a6 call 40001d58 40005ec4: e2 06 20 30 ld [ %i0 + 0x30 ], %l1 40005ec8: b2 10 00 08 mov %o0, %i1 pending_events = api->pending_events; 40005ecc: c8 04 00 00 ld [ %l0 ], %g4 event_condition = (rtems_event_set) the_thread->Wait.count; 40005ed0: 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 ) ) { 40005ed4: 86 88 80 04 andcc %g2, %g4, %g3 40005ed8: 12 80 00 03 bne 40005ee4 <_Event_Surrender+0x2c> 40005edc: 03 10 00 67 sethi %hi(0x40019c00), %g1 _ISR_Enable( level ); 40005ee0: 30 80 00 42 b,a 40005fe8 <_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() && 40005ee4: c2 00 61 fc ld [ %g1 + 0x1fc ], %g1 ! 40019dfc <_ISR_Nest_level> 40005ee8: 80 a0 60 00 cmp %g1, 0 40005eec: 22 80 00 1e be,a 40005f64 <_Event_Surrender+0xac> 40005ef0: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40005ef4: 03 10 00 67 sethi %hi(0x40019c00), %g1 40005ef8: c2 00 62 20 ld [ %g1 + 0x220 ], %g1 ! 40019e20 <_Thread_Executing> 40005efc: 80 a6 00 01 cmp %i0, %g1 40005f00: 32 80 00 19 bne,a 40005f64 <_Event_Surrender+0xac> 40005f04: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40005f08: 1b 10 00 69 sethi %hi(0x4001a400), %o5 40005f0c: c2 03 62 80 ld [ %o5 + 0x280 ], %g1 ! 4001a680 <_Event_Sync_state> 40005f10: 80 a0 60 01 cmp %g1, 1 40005f14: 02 80 00 07 be 40005f30 <_Event_Surrender+0x78> 40005f18: 80 a0 c0 02 cmp %g3, %g2 40005f1c: c2 03 62 80 ld [ %o5 + 0x280 ], %g1 40005f20: 80 a0 60 02 cmp %g1, 2 40005f24: 32 80 00 10 bne,a 40005f64 <_Event_Surrender+0xac> 40005f28: 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) ) { 40005f2c: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 40005f30: 02 80 00 04 be 40005f40 <_Event_Surrender+0x88> 40005f34: 80 8c 60 02 btst 2, %l1 40005f38: 02 80 00 0a be 40005f60 <_Event_Surrender+0xa8> <== NOT EXECUTED 40005f3c: 01 00 00 00 nop <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 40005f40: 82 29 00 03 andn %g4, %g3, %g1 40005f44: c2 24 00 00 st %g1, [ %l0 ] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40005f48: 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; 40005f4c: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40005f50: c6 20 40 00 st %g3, [ %g1 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 40005f54: 84 10 20 03 mov 3, %g2 40005f58: 03 10 00 69 sethi %hi(0x4001a400), %g1 40005f5c: c4 20 62 80 st %g2, [ %g1 + 0x280 ] ! 4001a680 <_Event_Sync_state> } _ISR_Enable( level ); 40005f60: 30 80 00 22 b,a 40005fe8 <_Event_Surrender+0x130> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 40005f64: 80 88 61 00 btst 0x100, %g1 40005f68: 02 80 00 20 be 40005fe8 <_Event_Surrender+0x130> 40005f6c: 80 a0 c0 02 cmp %g3, %g2 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 40005f70: 02 80 00 04 be 40005f80 <_Event_Surrender+0xc8> 40005f74: 80 8c 60 02 btst 2, %l1 40005f78: 02 80 00 1c be 40005fe8 <_Event_Surrender+0x130> 40005f7c: 01 00 00 00 nop api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 40005f80: 82 29 00 03 andn %g4, %g3, %g1 40005f84: c2 24 00 00 st %g1, [ %l0 ] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40005f88: 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; 40005f8c: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40005f90: c6 20 40 00 st %g3, [ %g1 ] _ISR_Flash( level ); 40005f94: 7f ff ef 75 call 40001d68 40005f98: 90 10 00 19 mov %i1, %o0 40005f9c: 7f ff ef 6f call 40001d58 40005fa0: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 40005fa4: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 40005fa8: 80 a0 60 02 cmp %g1, 2 40005fac: 02 80 00 06 be 40005fc4 <_Event_Surrender+0x10c> 40005fb0: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 40005fb4: 7f ff ef 6d call 40001d68 40005fb8: 90 10 00 19 mov %i1, %o0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 40005fbc: 10 80 00 08 b 40005fdc <_Event_Surrender+0x124> 40005fc0: 33 04 00 ff sethi %hi(0x1003fc00), %i1 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 40005fc4: c2 26 20 50 st %g1, [ %i0 + 0x50 ] _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 40005fc8: 7f ff ef 68 call 40001d68 40005fcc: 90 10 00 19 mov %i1, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 40005fd0: 40 00 0e 21 call 40009854 <_Watchdog_Remove> 40005fd4: 90 06 20 48 add %i0, 0x48, %o0 40005fd8: 33 04 00 ff sethi %hi(0x1003fc00), %i1 40005fdc: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 40005fe0: 40 00 08 6f call 4000819c <_Thread_Clear_state> 40005fe4: 81 e8 00 00 restore _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 40005fe8: 7f ff ef 60 call 40001d68 40005fec: 91 e8 00 19 restore %g0, %i1, %o0 40005ff0: 01 00 00 00 nop 40005ff4 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 40005ff4: 9d e3 bf 90 save %sp, -112, %sp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 40005ff8: 90 10 00 18 mov %i0, %o0 40005ffc: 40 00 09 70 call 400085bc <_Thread_Get> 40006000: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 40006004: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006008: 80 a0 60 00 cmp %g1, 0 4000600c: 12 80 00 0f bne 40006048 <_Event_Timeout+0x54> 40006010: 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 ); 40006014: 7f ff ef 51 call 40001d58 40006018: 01 00 00 00 nop 4000601c: 86 10 00 08 mov %o0, %g3 if ( !the_thread->Wait.count ) { /* verify thread is waiting */ 40006020: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 40006024: 80 a0 60 00 cmp %g1, 0 40006028: 12 80 00 0a bne 40006050 <_Event_Timeout+0x5c> 4000602c: 03 10 00 67 sethi %hi(0x40019c00), %g1 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 40006030: 05 10 00 67 sethi %hi(0x40019c00), %g2 <== NOT EXECUTED 40006034: c2 00 a1 60 ld [ %g2 + 0x160 ], %g1 ! 40019d60 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40006038: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000603c: c2 20 a1 60 st %g1, [ %g2 + 0x160 ] <== NOT EXECUTED _Thread_Unnest_dispatch(); _ISR_Enable( level ); 40006040: 7f ff ef 4a call 40001d68 <== NOT EXECUTED 40006044: 01 00 00 00 nop <== NOT EXECUTED 40006048: 81 c7 e0 08 ret <== NOT EXECUTED 4000604c: 81 e8 00 00 restore <== NOT EXECUTED return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 40006050: c2 00 62 20 ld [ %g1 + 0x220 ], %g1 40006054: 80 a6 00 01 cmp %i0, %g1 40006058: 12 80 00 09 bne 4000607c <_Event_Timeout+0x88> 4000605c: c0 26 20 24 clr [ %i0 + 0x24 ] Thread_blocking_operation_States sync = _Event_Sync_state; 40006060: 05 10 00 69 sethi %hi(0x4001a400), %g2 40006064: c2 00 a2 80 ld [ %g2 + 0x280 ], %g1 ! 4001a680 <_Event_Sync_state> if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) || 40006068: 80 a0 60 01 cmp %g1, 1 4000606c: 18 80 00 05 bgu 40006080 <_Event_Timeout+0x8c> 40006070: 82 10 20 06 mov 6, %g1 (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 40006074: 82 10 20 02 mov 2, %g1 40006078: c2 20 a2 80 st %g1, [ %g2 + 0x280 ] } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 4000607c: 82 10 20 06 mov 6, %g1 40006080: c2 26 20 34 st %g1, [ %i0 + 0x34 ] _ISR_Enable( level ); 40006084: 7f ff ef 39 call 40001d68 40006088: 90 10 00 03 mov %g3, %o0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4000608c: 90 10 00 18 mov %i0, %o0 40006090: 13 04 00 ff sethi %hi(0x1003fc00), %o1 40006094: 40 00 08 42 call 4000819c <_Thread_Clear_state> 40006098: 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; 4000609c: 05 10 00 67 sethi %hi(0x40019c00), %g2 400060a0: c2 00 a1 60 ld [ %g2 + 0x160 ], %g1 ! 40019d60 <_Thread_Dispatch_disable_level> 400060a4: 82 00 7f ff add %g1, -1, %g1 400060a8: c2 20 a1 60 st %g1, [ %g2 + 0x160 ] 400060ac: 81 c7 e0 08 ret 400060b0: 81 e8 00 00 restore 4000a258 <_Heap_Allocate_aligned>: void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 4000a258: 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; 4000a25c: 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); 4000a260: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 4000a264: 90 10 00 19 mov %i1, %o0 4000a268: 40 00 01 5d call 4000a7dc <_Heap_Calc_block_size> 4000a26c: 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; 4000a270: 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) 4000a274: ba 92 20 00 orcc %o0, 0, %i5 4000a278: 02 80 00 67 be 4000a414 <_Heap_Allocate_aligned+0x1bc> 4000a27c: 90 10 20 00 clr %o0 return NULL; if(alignment == 0) 4000a280: 80 a6 a0 00 cmp %i2, 0 4000a284: 22 80 00 02 be,a 4000a28c <_Heap_Allocate_aligned+0x34> 4000a288: b4 10 20 08 mov 8, %i2 */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 4000a28c: e2 06 20 08 ld [ %i0 + 8 ], %l1 4000a290: 10 80 00 59 b 4000a3f4 <_Heap_Allocate_aligned+0x19c> 4000a294: 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); 4000a298: 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. */ 4000a29c: 80 a4 c0 1d cmp %l3, %i5 4000a2a0: 2a 80 00 54 bcs,a 4000a3f0 <_Heap_Allocate_aligned+0x198> 4000a2a4: e2 04 60 08 ld [ %l1 + 8 ], %l1 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 4000a2a8: 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; 4000a2ac: ae 04 40 13 add %l1, %l3, %l7 aligned_user_addr = block_end - end_to_user_offs; 4000a2b0: a0 25 c0 19 sub %l7, %i1, %l0 4000a2b4: 40 00 3f 59 call 4001a018 <.urem> 4000a2b8: 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)); 4000a2bc: 92 10 00 14 mov %l4, %o1 4000a2c0: a4 24 00 08 sub %l0, %o0, %l2 4000a2c4: 40 00 3f 55 call 4001a018 <.urem> 4000a2c8: 90 10 00 12 mov %l2, %o0 4000a2cc: a0 04 60 08 add %l1, 8, %l0 4000a2d0: 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) { 4000a2d4: 80 a0 80 10 cmp %g2, %l0 4000a2d8: 2a 80 00 46 bcs,a 4000a3f0 <_Heap_Allocate_aligned+0x198> 4000a2dc: 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) { 4000a2e0: ec 06 20 14 ld [ %i0 + 0x14 ], %l6 4000a2e4: 82 20 80 10 sub %g2, %l0, %g1 4000a2e8: 80 a0 40 16 cmp %g1, %l6 4000a2ec: 1a 80 00 15 bcc 4000a340 <_Heap_Allocate_aligned+0xe8> 4000a2f0: 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) { 4000a2f4: 82 24 80 10 sub %l2, %l0, %g1 4000a2f8: 80 a0 40 14 cmp %g1, %l4 4000a2fc: 0a 80 00 10 bcs 4000a33c <_Heap_Allocate_aligned+0xe4> 4000a300: 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; 4000a304: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000a308: 40 00 3f 44 call 4001a018 <.urem> <== NOT EXECUTED 4000a30c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED *value = r ? v - r + a : v; 4000a310: 82 04 00 1a add %l0, %i2, %g1 <== NOT EXECUTED 4000a314: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000a318: 12 80 00 03 bne 4000a324 <_Heap_Allocate_aligned+0xcc> <== NOT EXECUTED 4000a31c: 90 20 40 08 sub %g1, %o0, %o0 <== NOT EXECUTED 4000a320: 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) { 4000a324: 82 22 00 10 sub %o0, %l0, %g1 <== NOT EXECUTED 4000a328: 80 a0 40 14 cmp %g1, %l4 <== NOT EXECUTED 4000a32c: 3a 80 00 31 bcc,a 4000a3f0 <_Heap_Allocate_aligned+0x198> <== NOT EXECUTED 4000a330: e2 04 60 08 ld [ %l1 + 8 ], %l1 <== NOT EXECUTED 4000a334: 84 10 00 10 mov %l0, %g2 <== NOT EXECUTED 4000a338: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED aligned_user_addr = 0; } } } if(aligned_user_addr) { 4000a33c: 80 a4 a0 00 cmp %l2, 0 4000a340: 22 80 00 2c be,a 4000a3f0 <_Heap_Allocate_aligned+0x198> 4000a344: 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; 4000a348: 82 05 e0 08 add %l7, 8, %g1 4000a34c: 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; 4000a350: 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) { 4000a354: 80 a0 80 16 cmp %g2, %l6 4000a358: 2a 80 00 08 bcs,a 4000a378 <_Heap_Allocate_aligned+0x120> 4000a35c: 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; 4000a360: 82 10 a0 01 or %g2, 1, %g1 4000a364: 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); 4000a368: a2 04 40 02 add %l1, %g2, %l1 the_block = _Heap_Block_at(the_block, the_rest); the_block->prev_size = the_rest; 4000a36c: c4 24 40 00 st %g2, [ %l1 ] the_block->size = alloc_size; 4000a370: 10 80 00 09 b 4000a394 <_Heap_Allocate_aligned+0x13c> 4000a374: e0 24 60 04 st %l0, [ %l1 + 4 ] ) { Heap_Block *block = the_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 4000a378: 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; 4000a37c: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 prev->next = next; next->prev = prev; 4000a380: c4 20 e0 0c st %g2, [ %g3 + 0xc ] 4000a384: 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; 4000a388: c6 20 a0 08 st %g3, [ %g2 + 8 ] 4000a38c: c2 26 20 38 st %g1, [ %i0 + 0x38 ] 4000a390: 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 ); 4000a394: 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; 4000a398: c2 00 a0 04 ld [ %g2 + 4 ], %g1 4000a39c: 82 10 60 01 or %g1, 1, %g1 4000a3a0: c2 20 a0 04 st %g1, [ %g2 + 4 ] /* Update statistics */ stats->free_size -= alloc_size; 4000a3a4: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 if(stats->min_free_size > stats->free_size) 4000a3a8: 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; 4000a3ac: 82 20 40 10 sub %g1, %l0, %g1 if(stats->min_free_size > stats->free_size) 4000a3b0: 80 a0 80 01 cmp %g2, %g1 4000a3b4: 08 80 00 03 bleu 4000a3c0 <_Heap_Allocate_aligned+0x168> 4000a3b8: c2 26 20 30 st %g1, [ %i0 + 0x30 ] stats->min_free_size = stats->free_size; 4000a3bc: c2 26 20 34 st %g1, [ %i0 + 0x34 ] stats->used_blocks += 1; 4000a3c0: 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; 4000a3c4: c6 06 20 4c ld [ %i0 + 0x4c ], %g3 stats->allocs += 1; 4000a3c8: 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; 4000a3cc: 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; 4000a3d0: 86 00 e0 01 inc %g3 stats->allocs += 1; 4000a3d4: 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; 4000a3d8: 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; 4000a3dc: 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; 4000a3e0: 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; 4000a3e4: 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; 4000a3e8: 10 80 00 07 b 4000a404 <_Heap_Allocate_aligned+0x1ac> 4000a3ec: 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) 4000a3f0: 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; 4000a3f4: 80 a4 40 18 cmp %l1, %i0 4000a3f8: 32 bf ff a8 bne,a 4000a298 <_Heap_Allocate_aligned+0x40> 4000a3fc: c2 04 60 04 ld [ %l1 + 4 ], %g1 4000a400: 90 10 20 00 clr %o0 } } } } if(stats->max_search < search_count) 4000a404: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 4000a408: 80 a0 40 15 cmp %g1, %l5 4000a40c: 2a 80 00 02 bcs,a 4000a414 <_Heap_Allocate_aligned+0x1bc> 4000a410: ea 26 20 44 st %l5, [ %i0 + 0x44 ] stats->max_search = search_count; return user_ptr; } 4000a414: 81 c7 e0 08 ret 4000a418: 91 e8 00 08 restore %g0, %o0, %o0 4002e338 <_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; 4002e338: 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; 4002e33c: 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; 4002e340: c0 22 60 08 clr [ %o1 + 8 ] the_info->Free.largest = 0; 4002e344: c0 22 60 04 clr [ %o1 + 4 ] the_info->Used.number = 0; 4002e348: c0 22 60 0c clr [ %o1 + 0xc ] the_info->Used.total = 0; 4002e34c: c0 22 60 14 clr [ %o1 + 0x14 ] the_info->Used.largest = 0; 4002e350: 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; 4002e354: 10 80 00 23 b 4002e3e0 <_Heap_Get_information+0xa8> 4002e358: 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); 4002e35c: 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 ); 4002e360: 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) ) { 4002e364: c2 03 60 04 ld [ %o5 + 4 ], %g1 4002e368: 80 88 60 01 btst 1, %g1 4002e36c: 22 80 00 0d be,a 4002e3a0 <_Heap_Get_information+0x68> 4002e370: c2 02 40 00 ld [ %o1 ], %g1 the_info->Used.number++; 4002e374: c2 02 60 0c ld [ %o1 + 0xc ], %g1 the_info->Used.total += the_size; 4002e378: c4 02 60 14 ld [ %o1 + 0x14 ], %g2 if ( the_info->Used.largest < the_size ) 4002e37c: 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++; 4002e380: 82 00 60 01 inc %g1 the_info->Used.total += the_size; 4002e384: 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++; 4002e388: c2 22 60 0c st %g1, [ %o1 + 0xc ] the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) 4002e38c: 80 a0 c0 04 cmp %g3, %g4 4002e390: 1a 80 00 13 bcc 4002e3dc <_Heap_Get_information+0xa4> 4002e394: c4 22 60 14 st %g2, [ %o1 + 0x14 ] the_info->Used.largest = the_size; 4002e398: 10 80 00 11 b 4002e3dc <_Heap_Get_information+0xa4> 4002e39c: c8 22 60 10 st %g4, [ %o1 + 0x10 ] } else { the_info->Free.number++; the_info->Free.total += the_size; 4002e3a0: c4 02 60 08 ld [ %o1 + 8 ], %g2 if ( the_info->Free.largest < the_size ) 4002e3a4: 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++; 4002e3a8: 82 00 60 01 inc %g1 the_info->Free.total += the_size; 4002e3ac: 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++; 4002e3b0: c2 22 40 00 st %g1, [ %o1 ] the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) 4002e3b4: 80 a0 c0 04 cmp %g3, %g4 4002e3b8: 1a 80 00 03 bcc 4002e3c4 <_Heap_Get_information+0x8c> 4002e3bc: c4 22 60 08 st %g2, [ %o1 + 8 ] the_info->Free.largest = the_size; 4002e3c0: c8 22 60 04 st %g4, [ %o1 + 4 ] if ( the_size != next_block->prev_size ) 4002e3c4: c2 03 40 00 ld [ %o5 ], %g1 4002e3c8: 80 a1 00 01 cmp %g4, %g1 4002e3cc: 02 80 00 05 be 4002e3e0 <_Heap_Get_information+0xa8> 4002e3d0: 84 10 00 0d mov %o5, %g2 4002e3d4: 81 c3 e0 08 retl <== NOT EXECUTED 4002e3d8: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4002e3dc: 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 ) { 4002e3e0: 80 a0 80 0c cmp %g2, %o4 4002e3e4: 32 bf ff de bne,a 4002e35c <_Heap_Get_information+0x24> 4002e3e8: 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; 4002e3ec: c2 02 60 14 ld [ %o1 + 0x14 ], %g1 4002e3f0: 90 10 20 00 clr %o0 4002e3f4: 82 00 60 08 add %g1, 8, %g1 return HEAP_GET_INFORMATION_SUCCESSFUL; } 4002e3f8: 81 c3 e0 08 retl 4002e3fc: c2 22 60 14 st %g1, [ %o1 + 0x14 ] 40017554 <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 40017554: 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; 40017558: e8 06 20 14 ld [ %i0 + 0x14 ], %l4 uint32_t const page_size = the_heap->page_size; 4001755c: ec 06 20 10 ld [ %i0 + 0x10 ], %l6 *old_mem_size = 0; 40017560: c0 26 c0 00 clr [ %i3 ] *avail_mem_size = 0; 40017564: 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); 40017568: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 4001756c: 7f ff f6 53 call 40014eb8 <.urem> 40017570: 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 ); 40017574: c8 06 20 20 ld [ %i0 + 0x20 ], %g4 40017578: 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); 4001757c: 82 06 7f f8 add %i1, -8, %g1 40017580: 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)) 40017584: 80 a4 80 04 cmp %l2, %g4 40017588: 84 60 3f ff subx %g0, -1, %g2 4001758c: 80 a0 c0 12 cmp %g3, %l2 40017590: 82 60 3f ff subx %g0, -1, %g1 40017594: 80 88 80 01 btst %g2, %g1 40017598: 02 80 00 75 be 4001776c <_Heap_Resize_block+0x218> 4001759c: a6 10 00 18 mov %i0, %l3 return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 400175a0: 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); 400175a4: 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 ); 400175a8: 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) || 400175ac: 80 a4 40 04 cmp %l1, %g4 400175b0: 84 60 3f ff subx %g0, -1, %g2 400175b4: 80 a0 c0 11 cmp %g3, %l1 400175b8: 82 60 3f ff subx %g0, -1, %g1 400175bc: 80 88 80 01 btst %g2, %g1 400175c0: 02 80 00 6b be 4001776c <_Heap_Resize_block+0x218> 400175c4: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 400175c8: c2 04 60 04 ld [ %l1 + 4 ], %g1 400175cc: 80 88 60 01 btst 1, %g1 400175d0: 02 80 00 67 be 4001776c <_Heap_Resize_block+0x218> 400175d4: 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); 400175d8: 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) || 400175dc: 84 10 20 01 mov 1, %g2 400175e0: 02 80 00 04 be 400175f0 <_Heap_Resize_block+0x9c> 400175e4: 82 04 40 18 add %l1, %i0, %g1 400175e8: c2 00 60 04 ld [ %g1 + 4 ], %g1 400175ec: 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) 400175f0: 82 24 40 19 sub %l1, %i1, %g1 400175f4: 82 00 60 04 add %g1, 4, %g1 + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; 400175f8: 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) || 400175fc: 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) { 40017600: 80 a6 80 01 cmp %i2, %g1 40017604: 08 80 00 1e bleu 4001767c <_Heap_Resize_block+0x128> 40017608: 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 */ 4001760c: 80 a6 60 00 cmp %i1, 0 40017610: 12 80 00 59 bne 40017774 <_Heap_Resize_block+0x220> 40017614: a0 26 80 01 sub %i2, %g1, %l0 uint32_t alignment ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; 40017618: 92 10 00 16 mov %l6, %o1 4001761c: 7f ff f6 27 call 40014eb8 <.urem> 40017620: 90 10 00 10 mov %l0, %o0 *value = r ? v - r + a : v; 40017624: 80 a2 20 00 cmp %o0, 0 40017628: 02 80 00 05 be 4001763c <_Heap_Resize_block+0xe8> 4001762c: 80 a4 00 14 cmp %l0, %l4 40017630: 82 04 00 16 add %l0, %l6, %g1 40017634: a0 20 40 08 sub %g1, %o0, %l0 40017638: 80 a4 00 14 cmp %l0, %l4 4001763c: 1a 80 00 03 bcc 40017648 <_Heap_Resize_block+0xf4> 40017640: 90 10 00 10 mov %l0, %o0 40017644: 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) 40017648: 80 a2 00 18 cmp %o0, %i0 4001764c: 18 80 00 4a bgu 40017774 <_Heap_Resize_block+0x220> 40017650: 94 10 00 08 mov %o0, %o2 return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */ add_block_size = 40017654: 92 10 00 11 mov %l1, %o1 40017658: 7f ff bf c6 call 40007570 <_Heap_Block_allocate> 4001765c: 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; 40017660: 90 02 00 15 add %o0, %l5, %o0 40017664: 90 12 00 1b or %o0, %i3, %o0 40017668: d0 24 a0 04 st %o0, [ %l2 + 4 ] --stats->used_blocks; 4001766c: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 40017670: 82 00 7f ff add %g1, -1, %g1 40017674: 10 80 00 39 b 40017758 <_Heap_Resize_block+0x204> 40017678: 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; 4001767c: a0 20 40 1a sub %g1, %i2, %l0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 40017680: 92 10 00 16 mov %l6, %o1 40017684: 7f ff f6 0d call 40014eb8 <.urem> 40017688: 90 10 00 10 mov %l0, %o0 _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 4001768c: a0 a4 00 08 subcc %l0, %o0, %l0 40017690: 22 80 00 33 be,a 4001775c <_Heap_Resize_block+0x208> 40017694: 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; 40017698: 84 25 40 10 sub %l5, %l0, %g2 if (new_block_size < min_block_size) { 4001769c: 80 a0 80 14 cmp %g2, %l4 400176a0: 1a 80 00 07 bcc 400176bc <_Heap_Resize_block+0x168> 400176a4: 80 a6 60 00 cmp %i1, 0 uint32_t delta = min_block_size - new_block_size; 400176a8: 82 25 00 02 sub %l4, %g2, %g1 _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 400176ac: a0 a4 00 01 subcc %l0, %g1, %l0 400176b0: 02 80 00 2a be 40017758 <_Heap_Resize_block+0x204> 400176b4: 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) { 400176b8: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 400176bc: 12 80 00 15 bne 40017710 <_Heap_Resize_block+0x1bc> 400176c0: 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; 400176c4: 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; 400176c8: 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; 400176cc: c2 24 a0 04 st %g1, [ %l2 + 4 ] new_next_block->size = new_next_block_size | HEAP_PREV_USED; 400176d0: 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 ); 400176d4: 84 04 80 02 add %l2, %g2, %g2 next_next_block->prev_size = new_next_block_size; 400176d8: 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; 400176dc: 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; 400176e0: 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; 400176e4: 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; 400176e8: c2 04 e0 30 ld [ %l3 + 0x30 ], %g1 Heap_Block *prev = block->prev; block = new_block; block->next = next; 400176ec: c8 20 a0 08 st %g4, [ %g2 + 8 ] 400176f0: 82 00 40 10 add %g1, %l0, %g1 block->prev = prev; 400176f4: da 20 a0 0c st %o5, [ %g2 + 0xc ] 400176f8: c2 24 e0 30 st %g1, [ %l3 + 0x30 ] *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 400176fc: 86 00 ff fc add %g3, -4, %g3 next->prev = prev->next = block; 40017700: c4 21 20 0c st %g2, [ %g4 + 0xc ] 40017704: c4 23 60 08 st %g2, [ %o5 + 8 ] 40017708: 10 80 00 14 b 40017758 <_Heap_Resize_block+0x204> 4001770c: c6 27 00 00 st %g3, [ %i4 ] } else if (free_block_size >= min_block_size) { 40017710: 2a 80 00 13 bcs,a 4001775c <_Heap_Resize_block+0x208> <== NOT EXECUTED 40017714: 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; 40017718: 82 10 80 1b or %g2, %i3, %g1 <== NOT EXECUTED 4001771c: 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; 40017720: 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 ); 40017724: 92 04 80 02 add %l2, %g2, %o1 <== NOT EXECUTED 40017728: c2 22 60 04 st %g1, [ %o1 + 4 ] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 4001772c: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 40017730: 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 */ 40017734: 82 00 60 01 inc %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 40017738: 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 */ 4001773c: c2 24 e0 40 st %g1, [ %l3 + 0x40 ] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 40017740: c4 24 e0 50 st %g2, [ %l3 + 0x50 ] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 40017744: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED 40017748: 7f ff d3 de call 4000c6c0 <_Heap_Free> <== NOT EXECUTED 4001774c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 40017750: 82 04 3f fc add %l0, -4, %g1 <== NOT EXECUTED 40017754: c2 27 00 00 st %g1, [ %i4 ] <== NOT EXECUTED } } } ++stats->resizes; 40017758: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1 4001775c: 82 00 60 01 inc %g1 40017760: c2 24 e0 54 st %g1, [ %l3 + 0x54 ] 40017764: 81 c7 e0 08 ret 40017768: 91 e8 20 00 restore %g0, 0, %o0 return HEAP_RESIZE_SUCCESSFUL; 4001776c: 81 c7 e0 08 ret 40017770: 91 e8 20 02 restore %g0, 2, %o0 } 40017774: 81 c7 e0 08 ret 40017778: 91 e8 20 01 restore %g0, 1, %o0 4000fe64 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 4000fe64: 9d e3 bf 98 save %sp, -104, %sp 4000fe68: a6 10 00 18 mov %i0, %l3 /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 4000fe6c: 80 a6 60 00 cmp %i1, 0 Heap_Control *the_heap, int source, bool do_dump ) { Heap_Block *the_block = the_heap->start; 4000fe70: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 4000fe74: 16 80 00 03 bge 4000fe80 <_Heap_Walk+0x1c> 4000fe78: ec 06 20 24 ld [ %i0 + 0x24 ], %l6 source = the_heap->stats.instance; 4000fe7c: f2 06 20 28 ld [ %i0 + 0x28 ], %i1 <== NOT EXECUTED /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 4000fe80: c2 04 20 04 ld [ %l0 + 4 ], %g1 4000fe84: 80 88 60 01 btst 1, %g1 4000fe88: 12 80 00 07 bne 4000fea4 <_Heap_Walk+0x40> 4000fe8c: b0 10 20 00 clr %i0 printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); 4000fe90: 11 10 00 76 sethi %hi(0x4001d800), %o0 <== NOT EXECUTED 4000fe94: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000fe98: 90 12 21 d0 or %o0, 0x1d0, %o0 <== NOT EXECUTED 4000fe9c: 7f ff d9 bb call 40006588 <== NOT EXECUTED 4000fea0: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED error = 1; } if (the_block->prev_size != the_heap->page_size) { 4000fea4: c4 04 00 00 ld [ %l0 ], %g2 4000fea8: c2 04 e0 10 ld [ %l3 + 0x10 ], %g1 4000feac: 80 a0 80 01 cmp %g2, %g1 4000feb0: 22 80 00 5e be,a 40010028 <_Heap_Walk+0x1c4> 4000feb4: 03 10 00 73 sethi %hi(0x4001cc00), %g1 printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); 4000feb8: 11 10 00 76 sethi %hi(0x4001d800), %o0 <== NOT EXECUTED 4000febc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000fec0: 90 12 22 08 or %o0, 0x208, %o0 <== NOT EXECUTED 4000fec4: 7f ff d9 b1 call 40006588 <== NOT EXECUTED 4000fec8: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 4000fecc: 10 80 00 57 b 40010028 <_Heap_Walk+0x1c4> <== NOT EXECUTED 4000fed0: 03 10 00 73 sethi %hi(0x4001cc00), %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 4000fed4: 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)) { 4000fed8: c6 04 e0 24 ld [ %l3 + 0x24 ], %g3 4000fedc: 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 ); 4000fee0: a2 04 00 12 add %l0, %l2, %l1 4000fee4: 80 a4 40 01 cmp %l1, %g1 4000fee8: 84 60 3f ff subx %g0, -1, %g2 4000feec: 80 a0 c0 11 cmp %g3, %l1 4000fef0: 82 60 3f ff subx %g0, -1, %g1 4000fef4: 80 88 80 01 btst %g2, %g1 4000fef8: 32 80 00 09 bne,a 4000ff1c <_Heap_Walk+0xb8> 4000fefc: 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); 4000ff00: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 4000ff04: 11 10 00 76 sethi %hi(0x4001d800), %o0 <== NOT EXECUTED 4000ff08: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000ff0c: 7f ff d9 9f call 40006588 <== NOT EXECUTED 4000ff10: 90 12 22 40 or %o0, 0x240, %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", 4000ff14: 10 80 00 51 b 40010058 <_Heap_Walk+0x1f4> <== NOT EXECUTED 4000ff18: 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)) { 4000ff1c: 80 88 60 01 btst 1, %g1 4000ff20: 12 80 00 27 bne 4000ffbc <_Heap_Walk+0x158> 4000ff24: 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) { 4000ff28: c2 04 40 00 ld [ %l1 ], %g1 4000ff2c: 80 a4 80 01 cmp %l2, %g1 4000ff30: 02 80 00 07 be 4000ff4c <_Heap_Walk+0xe8> 4000ff34: 80 8d 20 01 btst 1, %l4 if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 4000ff38: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 4000ff3c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000ff40: 7f ff d9 92 call 40006588 <== NOT EXECUTED 4000ff44: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED error = 1; } if (!prev_used) { 4000ff48: 80 8d 20 01 btst 1, %l4 <== NOT EXECUTED 4000ff4c: 32 80 00 0c bne,a 4000ff7c <_Heap_Walk+0x118> 4000ff50: c2 04 e0 08 ld [ %l3 + 8 ], %g1 if (do_dump || error) printk("\n"); 4000ff54: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000ff58: 02 80 00 05 be 4000ff6c <_Heap_Walk+0x108> <== NOT EXECUTED 4000ff5c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 4000ff60: 7f ff d9 8a call 40006588 <== NOT EXECUTED 4000ff64: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 4000ff68: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 4000ff6c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000ff70: 7f ff d9 86 call 40006588 <== NOT EXECUTED 4000ff74: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 4000ff78: 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) 4000ff7c: 80 a0 40 10 cmp %g1, %l0 4000ff80: 02 80 00 0e be 4000ffb8 <_Heap_Walk+0x154> 4000ff84: 80 a0 40 13 cmp %g1, %l3 4000ff88: 32 bf ff fd bne,a 4000ff7c <_Heap_Walk+0x118> 4000ff8c: c2 00 60 08 ld [ %g1 + 8 ], %g1 block = block->next; if(block != the_block) { if (do_dump || error) printk("\n"); 4000ff90: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000ff94: 22 80 00 05 be,a 4000ffa8 <_Heap_Walk+0x144> <== NOT EXECUTED 4000ff98: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 4000ff9c: 7f ff d9 7b call 40006588 <== NOT EXECUTED 4000ffa0: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 4000ffa4: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 4000ffa8: 7f ff d9 78 call 40006588 <== NOT EXECUTED 4000ffac: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 4000ffb0: 10 80 00 06 b 4000ffc8 <_Heap_Walk+0x164> <== NOT EXECUTED 4000ffb4: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 4000ffb8: 80 a6 20 00 cmp %i0, 0 4000ffbc: 22 80 00 06 be,a 4000ffd4 <_Heap_Walk+0x170> 4000ffc0: c2 04 e0 14 ld [ %l3 + 0x14 ], %g1 4000ffc4: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 4000ffc8: 7f ff d9 70 call 40006588 <== NOT EXECUTED 4000ffcc: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 4000ffd0: c2 04 e0 14 ld [ %l3 + 0x14 ], %g1 <== NOT EXECUTED 4000ffd4: 80 a4 80 01 cmp %l2, %g1 4000ffd8: 3a 80 00 05 bcc,a 4000ffec <_Heap_Walk+0x188> 4000ffdc: d2 04 e0 10 ld [ %l3 + 0x10 ], %o1 printk("PASS: %d !block size is too small\n", source); 4000ffe0: 11 10 00 76 sethi %hi(0x4001d800), %o0 <== NOT EXECUTED 4000ffe4: 10 80 00 09 b 40010008 <_Heap_Walk+0x1a4> <== NOT EXECUTED 4000ffe8: 90 12 22 f8 or %o0, 0x2f8, %o0 ! 4001daf8 <_POSIX_Threads_Default_attributes+0x160> <== NOT EXECUTED error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { 4000ffec: 40 00 28 0b call 4001a018 <.urem> 4000fff0: 90 10 00 12 mov %l2, %o0 4000fff4: 80 a2 20 00 cmp %o0, 0 4000fff8: 02 80 00 08 be 40010018 <_Heap_Walk+0x1b4> 4000fffc: 80 a6 20 00 cmp %i0, 0 printk("PASS: %d !block size is misaligned\n", source); 40010000: 11 10 00 76 sethi %hi(0x4001d800), %o0 <== NOT EXECUTED 40010004: 90 12 23 20 or %o0, 0x320, %o0 ! 4001db20 <_POSIX_Threads_Default_attributes+0x188> <== NOT EXECUTED 40010008: 7f ff d9 60 call 40006588 <== NOT EXECUTED 4001000c: 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", 40010010: 10 80 00 12 b 40010058 <_Heap_Walk+0x1f4> <== NOT EXECUTED 40010014: 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) 40010018: 12 80 00 10 bne 40010058 <_Heap_Walk+0x1f4> 4001001c: 96 10 00 16 mov %l6, %o3 break; 40010020: 10 80 00 09 b 40010044 <_Heap_Walk+0x1e0> 40010024: a0 10 00 11 mov %l1, %l0 error = 1; } } } if (do_dump || error) printk("\n"); 40010028: aa 10 60 e8 or %g1, 0xe8, %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); 4001002c: 03 10 00 76 sethi %hi(0x4001d800), %g1 40010030: b8 10 62 c8 or %g1, 0x2c8, %i4 ! 4001dac8 <_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); 40010034: 03 10 00 76 sethi %hi(0x4001d800), %g1 40010038: ba 10 62 98 or %g1, 0x298, %i5 ! 4001da98 <_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); 4001003c: 03 10 00 76 sethi %hi(0x4001d800), %g1 40010040: ae 10 62 68 or %g1, 0x268, %l7 ! 4001da68 <_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 ) { 40010044: 80 a4 00 16 cmp %l0, %l6 40010048: 32 bf ff a3 bne,a 4000fed4 <_Heap_Walk+0x70> 4001004c: 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); 40010050: 10 80 00 09 b 40010074 <_Heap_Walk+0x210> 40010054: 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", 40010058: 11 10 00 76 sethi %hi(0x4001d800), %o0 <== NOT EXECUTED 4001005c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40010060: 90 12 23 48 or %o0, 0x348, %o0 <== NOT EXECUTED 40010064: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 40010068: 7f ff d9 48 call 40006588 <== NOT EXECUTED 4001006c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 40010070: 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) { 40010074: d6 04 e0 10 ld [ %l3 + 0x10 ], %o3 40010078: 94 08 7f fe and %g1, -2, %o2 4001007c: 80 a2 80 0b cmp %o2, %o3 40010080: 02 80 00 06 be 40010098 <_Heap_Walk+0x234> 40010084: 92 10 00 19 mov %i1, %o1 printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, 40010088: 11 10 00 76 sethi %hi(0x4001d800), %o0 <== NOT EXECUTED 4001008c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 40010090: 7f ff d9 3e call 40006588 <== NOT EXECUTED 40010094: 90 12 23 88 or %o0, 0x388, %o0 <== NOT EXECUTED if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } 40010098: 81 c7 e0 08 ret 4001009c: 81 e8 00 00 restore 400077a8 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 400077a8: 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; 400077ac: 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 ) 400077b0: e0 16 20 10 lduh [ %i0 + 0x10 ], %l0 400077b4: 03 00 00 3f sethi %hi(0xfc00), %g1 400077b8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400077bc: a2 08 80 01 and %g2, %g1, %l1 400077c0: 80 a4 00 11 cmp %l0, %l1 400077c4: 3a 80 00 06 bcc,a 400077dc <_Objects_Extend_information+0x34> 400077c8: e4 06 20 14 ld [ %i0 + 0x14 ], %l2 400077cc: aa 10 00 11 mov %l1, %l5 400077d0: ae 10 20 00 clr %l7 400077d4: 10 80 00 13 b 40007820 <_Objects_Extend_information+0x78> 400077d8: ac 10 20 00 clr %l6 block_count = 0; else { block_count = information->maximum / information->allocation_size; 400077dc: 90 10 00 10 mov %l0, %o0 400077e0: 92 10 00 12 mov %l2, %o1 400077e4: 40 00 35 09 call 40014c08 <.udiv> 400077e8: aa 10 00 11 mov %l1, %l5 400077ec: ac 10 20 00 clr %l6 400077f0: 10 80 00 09 b 40007814 <_Objects_Extend_information+0x6c> 400077f4: ae 10 00 08 mov %o0, %l7 for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 400077f8: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 400077fc: c2 00 40 02 ld [ %g1 + %g2 ], %g1 40007800: 80 a0 60 00 cmp %g1, 0 40007804: 02 80 00 08 be 40007824 <_Objects_Extend_information+0x7c> 40007808: 80 a5 40 10 cmp %l5, %l0 break; else index_base += information->allocation_size; 4000780c: 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++ ) { 40007810: ac 05 a0 01 inc %l6 40007814: 80 a5 80 17 cmp %l6, %l7 40007818: 0a bf ff f8 bcs 400077f8 <_Objects_Extend_information+0x50> 4000781c: 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 ) { 40007820: 80 a5 40 10 cmp %l5, %l0 40007824: 2a 80 00 5d bcs,a 40007998 <_Objects_Extend_information+0x1f0> 40007828: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 4000782c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 40007830: c4 0e 20 12 ldub [ %i0 + 0x12 ], %g2 * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 40007834: ba 04 00 01 add %l0, %g1, %i5 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 40007838: 80 a0 a0 00 cmp %g2, 0 /* * Up the block count and maximum */ block_count++; 4000783c: a0 05 e0 01 add %l7, 1, %l0 40007840: 82 07 40 11 add %i5, %l1, %g1 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 40007844: 02 80 00 0b be 40007870 <_Objects_Extend_information+0xc8> 40007848: 91 2c 20 01 sll %l0, 1, %o0 object_blocks = (void**) 4000784c: 90 02 00 10 add %o0, %l0, %o0 40007850: 90 00 40 08 add %g1, %o0, %o0 40007854: 40 00 08 5b call 400099c0 <_Workspace_Allocate> 40007858: 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 ) 4000785c: a4 92 20 00 orcc %o0, 0, %l2 40007860: 32 80 00 0a bne,a 40007888 <_Objects_Extend_information+0xe0> 40007864: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40007868: 81 c7 e0 08 ret <== NOT EXECUTED 4000786c: 81 e8 00 00 restore <== NOT EXECUTED return; } else { object_blocks = (void**) 40007870: 90 02 00 10 add %o0, %l0, %o0 40007874: 90 00 40 08 add %g1, %o0, %o0 40007878: 40 00 08 59 call 400099dc <_Workspace_Allocate_or_fatal_error> 4000787c: 91 2a 20 02 sll %o0, 2, %o0 40007880: a4 10 00 08 mov %o0, %l2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 40007884: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 40007888: 85 2c 20 02 sll %l0, 2, %g2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 4000788c: 80 a0 40 11 cmp %g1, %l1 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 40007890: a8 04 80 02 add %l2, %g2, %l4 40007894: a6 05 00 02 add %l4, %g2, %l3 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 40007898: 08 80 00 15 bleu 400078ec <_Objects_Extend_information+0x144> 4000789c: 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, 400078a0: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 400078a4: a1 2d e0 02 sll %l7, 2, %l0 400078a8: 90 10 00 12 mov %l2, %o0 400078ac: 40 00 1a f9 call 4000e490 400078b0: 94 10 00 10 mov %l0, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 400078b4: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 400078b8: 94 10 00 10 mov %l0, %o2 400078bc: 40 00 1a f5 call 4000e490 400078c0: 90 10 00 14 mov %l4, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 400078c4: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 400078c8: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 400078cc: 94 04 40 0a add %l1, %o2, %o2 400078d0: 90 10 00 13 mov %l3, %o0 400078d4: 40 00 1a ef call 4000e490 400078d8: 95 2a a0 02 sll %o2, 2, %o2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 400078dc: 10 80 00 08 b 400078fc <_Objects_Extend_information+0x154> 400078e0: 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++ ) { 400078e4: 84 00 a0 01 inc %g2 local_table[ index ] = NULL; 400078e8: 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++ ) { 400078ec: 80 a0 80 11 cmp %g2, %l1 400078f0: 2a bf ff fd bcs,a 400078e4 <_Objects_Extend_information+0x13c> 400078f4: 83 28 a0 02 sll %g2, 2, %g1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 400078f8: 83 2d e0 02 sll %l7, 2, %g1 inactive_per_block[block_count] = 0; 400078fc: c0 25 00 01 clr [ %l4 + %g1 ] for ( index=index_base ; index < ( information->allocation_size + index_base ); 40007900: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 40007904: c0 24 80 01 clr [ %l2 + %g1 ] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 40007908: 83 2d 60 02 sll %l5, 2, %g1 4000790c: 86 05 40 02 add %l5, %g2, %g3 40007910: 84 04 c0 01 add %l3, %g1, %g2 40007914: 10 80 00 04 b 40007924 <_Objects_Extend_information+0x17c> 40007918: 82 10 00 15 mov %l5, %g1 index++ ) { 4000791c: 82 00 60 01 inc %g1 40007920: 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 ); 40007924: 80 a0 40 03 cmp %g1, %g3 40007928: 2a bf ff fd bcs,a 4000791c <_Objects_Extend_information+0x174> 4000792c: c0 20 80 00 clr [ %g2 ] index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 40007930: 7f ff e9 0a call 40001d58 40007934: 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( 40007938: c2 06 00 00 ld [ %i0 ], %g1 4000793c: c8 16 20 04 lduh [ %i0 + 4 ], %g4 40007940: 87 2f 60 10 sll %i5, 0x10, %g3 40007944: 89 29 20 1b sll %g4, 0x1b, %g4 40007948: 87 30 e0 10 srl %g3, 0x10, %g3 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 4000794c: 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( 40007950: 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; 40007954: e8 26 20 30 st %l4, [ %i0 + 0x30 ] information->local_table = local_table; 40007958: e6 26 20 1c st %l3, [ %i0 + 0x1c ] information->maximum = maximum; information->maximum_id = _Objects_Build_id( 4000795c: 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; 40007960: fa 36 20 10 sth %i5, [ %i0 + 0x10 ] information->maximum_id = _Objects_Build_id( 40007964: 82 10 40 02 or %g1, %g2, %g1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 40007968: 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( 4000796c: 82 10 40 04 or %g1, %g4, %g1 40007970: 82 10 40 03 or %g1, %g3, %g1 40007974: c2 26 20 0c st %g1, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 40007978: 7f ff e8 fc call 40001d68 4000797c: 01 00 00 00 nop if ( old_tables ) 40007980: 80 a4 20 00 cmp %l0, 0 40007984: 22 80 00 05 be,a 40007998 <_Objects_Extend_information+0x1f0> 40007988: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 _Workspace_Free( old_tables ); 4000798c: 40 00 08 06 call 400099a4 <_Workspace_Free> 40007990: 90 10 00 10 mov %l0, %o0 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 40007994: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 40007998: e2 06 20 34 ld [ %i0 + 0x34 ], %l1 4000799c: 80 a0 60 00 cmp %g1, 0 400079a0: 02 80 00 0f be 400079dc <_Objects_Extend_information+0x234> 400079a4: a1 2d a0 02 sll %l6, 2, %l0 information->object_blocks[ block ] = 400079a8: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 400079ac: 40 00 34 5d call 40014b20 <.umul> 400079b0: d2 06 20 14 ld [ %i0 + 0x14 ], %o1 400079b4: 40 00 08 03 call 400099c0 <_Workspace_Allocate> 400079b8: 01 00 00 00 nop _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 400079bc: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 400079c0: d0 24 40 10 st %o0, [ %l1 + %l0 ] _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 400079c4: c2 00 40 10 ld [ %g1 + %l0 ], %g1 400079c8: 80 a0 60 00 cmp %g1, 0 400079cc: 32 80 00 0b bne,a 400079f8 <_Objects_Extend_information+0x250> 400079d0: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 400079d4: 81 c7 e0 08 ret <== NOT EXECUTED 400079d8: 81 e8 00 00 restore <== NOT EXECUTED return; } else { information->object_blocks[ block ] = 400079dc: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 400079e0: 40 00 34 50 call 40014b20 <.umul> 400079e4: d2 06 20 14 ld [ %i0 + 0x14 ], %o1 400079e8: 40 00 07 fd call 400099dc <_Workspace_Allocate_or_fatal_error> 400079ec: 01 00 00 00 nop 400079f0: d0 24 40 10 st %o0, [ %l1 + %l0 ] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 400079f4: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 400079f8: a5 2d a0 02 sll %l6, 2, %l2 400079fc: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 40007a00: d2 00 40 12 ld [ %g1 + %l2 ], %o1 40007a04: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 40007a08: 90 07 bf ec add %fp, -20, %o0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40007a0c: 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 ) { 40007a10: a8 10 00 08 mov %o0, %l4 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40007a14: 40 00 12 8f call 4000c450 <_Chain_Initialize> 40007a18: 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( 40007a1c: 10 80 00 0d b 40007a50 <_Objects_Extend_information+0x2a8> 40007a20: 27 00 00 40 sethi %hi(0x10000), %l3 40007a24: c4 16 20 04 lduh [ %i0 + 4 ], %g2 40007a28: 83 28 60 18 sll %g1, 0x18, %g1 40007a2c: 85 28 a0 1b sll %g2, 0x1b, %g2 40007a30: 82 10 40 13 or %g1, %l3, %g1 40007a34: 82 10 40 02 or %g1, %g2, %g1 40007a38: 82 10 40 10 or %g1, %l0, %g1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40007a3c: 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( 40007a40: c2 22 20 08 st %g1, [ %o0 + 8 ] index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 40007a44: a0 04 20 01 inc %l0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40007a48: 7f ff fd 14 call 40006e98 <_Chain_Append> 40007a4c: 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 ) { 40007a50: 40 00 12 70 call 4000c410 <_Chain_Get> 40007a54: 90 10 00 14 mov %l4, %o0 40007a58: 80 a2 20 00 cmp %o0, 0 40007a5c: 32 bf ff f2 bne,a 40007a24 <_Objects_Extend_information+0x27c> 40007a60: c2 06 00 00 ld [ %i0 ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 40007a64: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40007a68: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive += information->allocation_size; 40007a6c: c6 16 20 2c lduh [ %i0 + 0x2c ], %g3 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 40007a70: c2 20 80 12 st %g1, [ %g2 + %l2 ] information->inactive += information->allocation_size; 40007a74: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40007a78: 82 00 40 03 add %g1, %g3, %g1 40007a7c: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 40007a80: 81 c7 e0 08 ret 40007a84: 81 e8 00 00 restore 40007b34 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 40007b34: 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 ) 40007b38: 82 06 3f ff add %i0, -1, %g1 40007b3c: 80 a0 60 03 cmp %g1, 3 40007b40: 38 80 00 1c bgu,a 40007bb0 <_Objects_Get_information+0x7c> 40007b44: b0 10 20 00 clr %i0 int the_class_api_maximum; if ( !_Objects_Is_api_valid( the_api ) ) return NULL; if ( !the_class ) 40007b48: 10 80 00 1c b 40007bb8 <_Objects_Get_information+0x84> 40007b4c: 80 a6 60 00 cmp %i1, 0 return NULL; the_class_api_maximum = _Objects_API_maximum_class( the_api ); 40007b50: 40 00 13 59 call 4000c8b4 <_Objects_API_maximum_class> 40007b54: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum < 0 || 40007b58: 80 a2 20 00 cmp %o0, 0 40007b5c: 06 80 00 14 bl 40007bac <_Objects_Get_information+0x78> 40007b60: 80 a6 40 08 cmp %i1, %o0 40007b64: 38 80 00 13 bgu,a 40007bb0 <_Objects_Get_information+0x7c> 40007b68: b0 10 20 00 clr %i0 <== NOT EXECUTED the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) 40007b6c: 85 2e 20 02 sll %i0, 2, %g2 40007b70: 03 10 00 67 sethi %hi(0x40019c00), %g1 40007b74: 82 10 60 c0 or %g1, 0xc0, %g1 ! 40019cc0 <_Objects_Information_table> 40007b78: c4 00 40 02 ld [ %g1 + %g2 ], %g2 40007b7c: 80 a0 a0 00 cmp %g2, 0 40007b80: 02 80 00 0c be 40007bb0 <_Objects_Get_information+0x7c> 40007b84: b0 10 20 00 clr %i0 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 40007b88: 83 2e 60 02 sll %i1, 2, %g1 40007b8c: f0 00 80 01 ld [ %g2 + %g1 ], %i0 if ( !info ) 40007b90: 80 a6 20 00 cmp %i0, 0 40007b94: 02 80 00 07 be 40007bb0 <_Objects_Get_information+0x7c> 40007b98: 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 ) 40007b9c: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40007ba0: 80 a0 60 00 cmp %g1, 0 40007ba4: 12 80 00 03 bne 40007bb0 <_Objects_Get_information+0x7c> 40007ba8: 01 00 00 00 nop 40007bac: b0 10 20 00 clr %i0 ! 0 return NULL; #endif return info; } 40007bb0: 81 c7 e0 08 ret 40007bb4: 81 e8 00 00 restore int the_class_api_maximum; if ( !_Objects_Is_api_valid( the_api ) ) return NULL; if ( !the_class ) 40007bb8: 22 bf ff fe be,a 40007bb0 <_Objects_Get_information+0x7c> 40007bbc: b0 10 20 00 clr %i0 40007bc0: 30 bf ff e4 b,a 40007b50 <_Objects_Get_information+0x1c> 40016794 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 40016794: 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) 40016798: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 4001679c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <== NOT EXECUTED 400167a0: 80 8e 40 01 btst %i1, %g1 <== NOT EXECUTED 400167a4: 22 80 00 02 be,a 400167ac <_Objects_Get_next+0x18> <== NOT EXECUTED 400167a8: 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) 400167ac: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 400167b0: a0 10 63 ff or %g1, 0x3ff, %l0 ! ffff <== NOT EXECUTED 400167b4: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED 400167b8: 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); 400167bc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400167c0: 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) 400167c4: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400167c8: 08 80 00 08 bleu 400167e8 <_Objects_Get_next+0x54> <== NOT EXECUTED 400167cc: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED { *location_p = OBJECTS_ERROR; 400167d0: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 400167d4: 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; 400167d8: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 400167dc: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED 400167e0: 10 80 00 09 b 40016804 <_Objects_Get_next+0x70> <== NOT EXECUTED 400167e4: 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); 400167e8: 7f ff d8 27 call 4000c884 <_Objects_Get> <== NOT EXECUTED 400167ec: b2 06 60 01 inc %i1 <== NOT EXECUTED next_id++; } while (*location_p != OBJECTS_LOCAL); 400167f0: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 400167f4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400167f8: 32 bf ff f0 bne,a 400167b8 <_Objects_Get_next+0x24> <== NOT EXECUTED 400167fc: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED *next_id_p = next_id; 40016800: f2 26 c0 00 st %i1, [ %i3 ] <== NOT EXECUTED return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 40016804: 81 c7 e0 08 ret <== NOT EXECUTED 40016808: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40009094 <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 40009094: 9d e3 bf 90 save %sp, -112, %sp 40009098: 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 ) 4000909c: 80 a6 60 00 cmp %i1, 0 400090a0: 02 80 00 22 be 40009128 <_Objects_Id_to_name+0x94> 400090a4: b0 10 20 01 mov 1, %i0 return OBJECTS_INVALID_NAME; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 400090a8: 80 a2 60 00 cmp %o1, 0 400090ac: 12 80 00 06 bne 400090c4 <_Objects_Id_to_name+0x30> 400090b0: 83 32 60 18 srl %o1, 0x18, %g1 400090b4: 03 10 00 79 sethi %hi(0x4001e400), %g1 400090b8: c2 00 60 f0 ld [ %g1 + 0xf0 ], %g1 ! 4001e4f0 <_Thread_Executing> 400090bc: 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); 400090c0: 83 32 60 18 srl %o1, 0x18, %g1 400090c4: 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 ) 400090c8: 82 00 bf ff add %g2, -1, %g1 400090cc: 80 a0 60 03 cmp %g1, 3 400090d0: 38 80 00 16 bgu,a 40009128 <_Objects_Id_to_name+0x94> 400090d4: 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 ] ) 400090d8: 10 80 00 18 b 40009138 <_Objects_Id_to_name+0xa4> 400090dc: 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 ]; 400090e0: 83 28 60 02 sll %g1, 2, %g1 400090e4: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( !information ) 400090e8: 80 a2 20 00 cmp %o0, 0 400090ec: 02 80 00 0f be 40009128 <_Objects_Id_to_name+0x94> 400090f0: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; if ( information->is_string ) 400090f4: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1 400090f8: 80 a0 60 00 cmp %g1, 0 400090fc: 12 80 00 0d bne 40009130 <_Objects_Id_to_name+0x9c> 40009100: 01 00 00 00 nop return OBJECTS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &ignored_location ); 40009104: 7f ff ff c7 call 40009020 <_Objects_Get> 40009108: 94 07 bf f4 add %fp, -12, %o2 if ( !the_object ) 4000910c: 80 a2 20 00 cmp %o0, 0 40009110: 22 80 00 06 be,a 40009128 <_Objects_Id_to_name+0x94> 40009114: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; *name = the_object->name; 40009118: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); 4000911c: b0 10 20 00 clr %i0 40009120: 40 00 02 44 call 40009a30 <_Thread_Enable_dispatch> 40009124: c2 26 40 00 st %g1, [ %i1 ] 40009128: 81 c7 e0 08 ret 4000912c: 81 e8 00 00 restore return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 40009130: 81 c7 e0 08 ret <== NOT EXECUTED 40009134: 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 ] ) 40009138: 03 10 00 78 sethi %hi(0x4001e000), %g1 4000913c: 82 10 63 90 or %g1, 0x390, %g1 ! 4001e390 <_Objects_Information_table> 40009140: c4 00 40 02 ld [ %g1 + %g2 ], %g2 40009144: 80 a0 a0 00 cmp %g2, 0 40009148: 12 bf ff e6 bne 400090e0 <_Objects_Id_to_name+0x4c> 4000914c: 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; 40009150: 81 c7 e0 08 ret <== NOT EXECUTED 40009154: 91 e8 20 03 restore %g0, 3, %o0 <== NOT EXECUTED 40013588 <_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 ) { 40013588: 9d e3 bf 98 save %sp, -104, %sp 4001358c: a6 10 00 18 mov %i0, %l3 uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == TRUE */ if ( !id ) 40013590: 80 a6 a0 00 cmp %i2, 0 40013594: 02 80 00 22 be 4001361c <_Objects_Name_to_id_string+0x94> 40013598: b0 10 20 02 mov 2, %i0 return OBJECTS_INVALID_ADDRESS; if ( !name ) 4001359c: 80 a6 60 00 cmp %i1, 0 400135a0: 22 80 00 1f be,a 4001361c <_Objects_Name_to_id_string+0x94> 400135a4: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { 400135a8: c2 14 e0 10 lduh [ %l3 + 0x10 ], %g1 400135ac: a4 90 60 00 orcc %g1, 0, %l2 400135b0: 12 80 00 17 bne 4001360c <_Objects_Name_to_id_string+0x84> 400135b4: a2 10 20 01 mov 1, %l1 name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 400135b8: 81 c7 e0 08 ret <== NOT EXECUTED 400135bc: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED the_object = information->local_table[ index ]; 400135c0: 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++ ) { 400135c4: a2 04 60 01 inc %l1 the_object = information->local_table[ index ]; 400135c8: e0 00 40 02 ld [ %g1 + %g2 ], %l0 if ( !the_object ) 400135cc: 80 a4 20 00 cmp %l0, 0 400135d0: 02 80 00 0f be 4001360c <_Objects_Name_to_id_string+0x84> 400135d4: 90 10 00 19 mov %i1, %o0 continue; if ( !the_object->name.name_p ) 400135d8: d2 04 20 0c ld [ %l0 + 0xc ], %o1 400135dc: 80 a2 60 00 cmp %o1, 0 400135e0: 02 80 00 0c be 40013610 <_Objects_Name_to_id_string+0x88> 400135e4: 80 a4 40 12 cmp %l1, %l2 continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 400135e8: 40 00 0c 77 call 400167c4 400135ec: d4 14 e0 3a lduh [ %l3 + 0x3a ], %o2 400135f0: 80 a2 20 00 cmp %o0, 0 400135f4: 32 80 00 07 bne,a 40013610 <_Objects_Name_to_id_string+0x88> 400135f8: 80 a4 40 12 cmp %l1, %l2 *id = the_object->id; 400135fc: c2 04 20 08 ld [ %l0 + 8 ], %g1 40013600: c2 26 80 00 st %g1, [ %i2 ] 40013604: 81 c7 e0 08 ret 40013608: 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++ ) { 4001360c: 80 a4 40 12 cmp %l1, %l2 40013610: 08 bf ff ec bleu 400135c0 <_Objects_Name_to_id_string+0x38> 40013614: 85 2c 60 02 sll %l1, 2, %g2 40013618: b0 10 20 01 mov 1, %i0 } } } return OBJECTS_INVALID_NAME; } 4001361c: 81 c7 e0 08 ret 40013620: 81 e8 00 00 restore 40007db8 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 40007db8: 9a 10 00 08 mov %o0, %o5 Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == FALSE */ if ( !id ) 40007dbc: 80 a2 e0 00 cmp %o3, 0 40007dc0: 02 80 00 29 be 40007e64 <_Objects_Name_to_id_u32+0xac> 40007dc4: 90 10 20 02 mov 2, %o0 return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 40007dc8: 80 a2 60 00 cmp %o1, 0 40007dcc: 22 80 00 26 be,a 40007e64 <_Objects_Name_to_id_u32+0xac> 40007dd0: 90 10 20 01 mov 1, %o0 return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 40007dd4: c2 13 60 10 lduh [ %o5 + 0x10 ], %g1 40007dd8: 84 90 60 00 orcc %g1, 0, %g2 40007ddc: 22 80 00 22 be,a 40007e64 <_Objects_Name_to_id_u32+0xac> 40007de0: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 40007de4: 80 a2 a0 00 cmp %o2, 0 40007de8: 02 80 00 19 be 40007e4c <_Objects_Name_to_id_u32+0x94> 40007dec: 83 28 a0 10 sll %g2, 0x10, %g1 40007df0: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 40007df4: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 40007df8: 80 a2 80 01 cmp %o2, %g1 40007dfc: 02 80 00 13 be 40007e48 <_Objects_Name_to_id_u32+0x90> 40007e00: 80 a2 a0 01 cmp %o2, 1 40007e04: 32 80 00 18 bne,a 40007e64 <_Objects_Name_to_id_u32+0xac> 40007e08: 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++ ) { 40007e0c: 10 80 00 10 b 40007e4c <_Objects_Name_to_id_u32+0x94> 40007e10: 83 28 a0 10 sll %g2, 0x10, %g1 the_object = information->local_table[ index ]; 40007e14: c2 03 60 1c ld [ %o5 + 0x1c ], %g1 40007e18: c4 00 40 02 ld [ %g1 + %g2 ], %g2 if ( !the_object ) 40007e1c: 80 a0 a0 00 cmp %g2, 0 40007e20: 02 80 00 0d be 40007e54 <_Objects_Name_to_id_u32+0x9c> 40007e24: 86 00 e0 01 inc %g3 continue; if ( name == the_object->name.name_u32 ) { 40007e28: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 40007e2c: 80 a2 40 01 cmp %o1, %g1 40007e30: 32 80 00 0a bne,a 40007e58 <_Objects_Name_to_id_u32+0xa0> 40007e34: 80 a0 c0 04 cmp %g3, %g4 *id = the_object->id; 40007e38: c2 00 a0 08 ld [ %g2 + 8 ], %g1 40007e3c: 90 10 20 00 clr %o0 40007e40: 81 c3 e0 08 retl 40007e44: 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++ ) { 40007e48: 83 28 a0 10 sll %g2, 0x10, %g1 40007e4c: 86 10 20 01 mov 1, %g3 40007e50: 89 30 60 10 srl %g1, 0x10, %g4 40007e54: 80 a0 c0 04 cmp %g3, %g4 40007e58: 08 bf ff ef bleu 40007e14 <_Objects_Name_to_id_u32+0x5c> 40007e5c: 85 28 e0 02 sll %g3, 2, %g2 40007e60: 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 } 40007e64: 81 c3 e0 08 retl 40007e68: 01 00 00 00 nop 40007e74 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 40007e74: 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; 40007e78: 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; 40007e7c: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 40007e80: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 40007e84: 03 00 00 3f sethi %hi(0xfc00), %g1 40007e88: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40007e8c: 92 10 00 10 mov %l0, %o1 40007e90: a2 08 80 01 and %g2, %g1, %l1 40007e94: 40 00 33 5d call 40014c08 <.udiv> 40007e98: 90 22 00 11 sub %o0, %l1, %o0 40007e9c: 10 80 00 2e b 40007f54 <_Objects_Shrink_information+0xe0> 40007ea0: 84 10 20 00 clr %g2 for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == information->allocation_size ) { 40007ea4: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40007ea8: c2 00 40 12 ld [ %g1 + %l2 ], %g1 40007eac: 80 a0 40 10 cmp %g1, %l0 40007eb0: 12 80 00 28 bne 40007f50 <_Objects_Shrink_information+0xdc> 40007eb4: 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; 40007eb8: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 40007ebc: 03 00 00 3f sethi %hi(0xfc00), %g1 40007ec0: a6 10 63 ff or %g1, 0x3ff, %l3 ! ffff 40007ec4: c2 04 20 08 ld [ %l0 + 8 ], %g1 40007ec8: 84 08 40 13 and %g1, %l3, %g2 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 40007ecc: 80 a0 80 11 cmp %g2, %l1 40007ed0: 2a 80 00 0c bcs,a 40007f00 <_Objects_Shrink_information+0x8c> 40007ed4: e0 04 00 00 ld [ %l0 ], %l0 40007ed8: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40007edc: 82 04 40 01 add %l1, %g1, %g1 40007ee0: 80 a0 80 01 cmp %g2, %g1 40007ee4: 1a 80 00 06 bcc 40007efc <_Objects_Shrink_information+0x88> 40007ee8: 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 ); 40007eec: 40 00 11 3f call 4000c3e8 <_Chain_Extract> 40007ef0: 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 ) ); 40007ef4: 10 80 00 04 b 40007f04 <_Objects_Shrink_information+0x90> 40007ef8: 80 a4 20 00 cmp %l0, 0 the_object = NULL; _Chain_Extract( &extract_me->Node ); } else { the_object = (Objects_Control *) the_object->Node.next; 40007efc: e0 04 00 00 ld [ %l0 ], %l0 } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 40007f00: 80 a4 20 00 cmp %l0, 0 40007f04: 22 80 00 07 be,a 40007f20 <_Objects_Shrink_information+0xac> 40007f08: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 40007f0c: c2 04 00 00 ld [ %l0 ], %g1 40007f10: 80 a0 60 00 cmp %g1, 0 40007f14: 32 bf ff ed bne,a 40007ec8 <_Objects_Shrink_information+0x54> 40007f18: 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 ] ); 40007f1c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 40007f20: 40 00 06 a1 call 400099a4 <_Workspace_Free> 40007f24: d0 00 40 12 ld [ %g1 + %l2 ], %o0 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 40007f28: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive -= information->allocation_size; 40007f2c: 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; 40007f30: 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; 40007f34: c4 06 20 34 ld [ %i0 + 0x34 ], %g2 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 40007f38: 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; 40007f3c: c0 20 80 12 clr [ %g2 + %l2 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 40007f40: 82 20 40 03 sub %g1, %g3, %g1 40007f44: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 40007f48: 81 c7 e0 08 ret 40007f4c: 81 e8 00 00 restore return; } index_base += information->allocation_size; 40007f50: 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++ ) { 40007f54: 80 a0 80 08 cmp %g2, %o0 40007f58: 0a bf ff d3 bcs 40007ea4 <_Objects_Shrink_information+0x30> 40007f5c: a5 28 a0 02 sll %g2, 2, %l2 40007f60: 81 c7 e0 08 ret 40007f64: 81 e8 00 00 restore 40006b84 <_POSIX_API_Initialize>: void _POSIX_API_Initialize( rtems_configuration_table *configuration_table ) { 40006b84: 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; 40006b88: f0 06 20 44 ld [ %i0 + 0x44 ], %i0 if ( !api_configuration ) 40006b8c: 80 a6 20 00 cmp %i0, 0 40006b90: 32 80 00 05 bne,a 40006ba4 <_POSIX_API_Initialize+0x20> 40006b94: d0 06 20 14 ld [ %i0 + 0x14 ], %o0 40006b98: 03 10 00 60 sethi %hi(0x40018000), %g1 <== NOT EXECUTED 40006b9c: b0 10 61 18 or %g1, 0x118, %i0 ! 40018118 <_POSIX_Default_configuration> <== NOT EXECUTED api_configuration = &_POSIX_Default_configuration; _Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects; _POSIX_signals_Manager_Initialization( 40006ba0: 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; 40006ba4: 05 10 00 67 sethi %hi(0x40019c00), %g2 40006ba8: 03 10 00 68 sethi %hi(0x4001a000), %g1 40006bac: 82 10 62 34 or %g1, 0x234, %g1 ! 4001a234 <_POSIX_Objects> _POSIX_signals_Manager_Initialization( 40006bb0: 40 00 13 7e call 4000b9a8 <_POSIX_signals_Manager_Initialization> 40006bb4: c2 20 a0 cc st %g1, [ %g2 + 0xcc ] api_configuration->maximum_queued_signals ); _POSIX_Threads_Manager_initialization( 40006bb8: d2 06 20 2c ld [ %i0 + 0x2c ], %o1 40006bbc: d4 06 20 30 ld [ %i0 + 0x30 ], %o2 40006bc0: 40 00 13 fb call 4000bbac <_POSIX_Threads_Manager_initialization> 40006bc4: 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( 40006bc8: 40 00 13 21 call 4000b84c <_POSIX_Condition_variables_Manager_initialization> 40006bcc: d0 06 20 08 ld [ %i0 + 8 ], %o0 api_configuration->maximum_condition_variables ); _POSIX_Key_Manager_initialization( api_configuration->maximum_keys ); 40006bd0: 40 00 13 2c call 4000b880 <_POSIX_Key_Manager_initialization> 40006bd4: d0 06 20 0c ld [ %i0 + 0xc ], %o0 _POSIX_Mutex_Manager_initialization( 40006bd8: 40 00 13 4d call 4000b90c <_POSIX_Mutex_Manager_initialization> 40006bdc: d0 06 20 04 ld [ %i0 + 4 ], %o0 api_configuration->maximum_mutexes ); _POSIX_Message_queue_Manager_initialization( 40006be0: 40 00 13 35 call 4000b8b4 <_POSIX_Message_queue_Manager_initialization> 40006be4: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 api_configuration->maximum_message_queues ); _POSIX_Semaphore_Manager_initialization( 40006be8: 40 00 14 ac call 4000be98 <_POSIX_Semaphore_Manager_initialization> 40006bec: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 api_configuration->maximum_semaphores ); _POSIX_Timer_Manager_initialization( api_configuration->maximum_timers ); 40006bf0: 40 00 14 9d call 4000be64 <_POSIX_Timer_Manager_initialization> 40006bf4: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 _POSIX_Barrier_Manager_initialization( api_configuration->maximum_barriers ); 40006bf8: 40 00 13 52 call 4000b940 <_POSIX_Barrier_Manager_initialization> 40006bfc: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 _POSIX_RWLock_Manager_initialization( api_configuration->maximum_rwlocks ); 40006c00: 40 00 13 5d call 4000b974 <_POSIX_RWLock_Manager_initialization> 40006c04: d0 06 20 24 ld [ %i0 + 0x24 ], %o0 _POSIX_Spinlock_Manager_initialization(api_configuration->maximum_spinlocks); 40006c08: f0 06 20 28 ld [ %i0 + 0x28 ], %i0 40006c0c: 40 00 13 d1 call 4000bb50 <_POSIX_Spinlock_Manager_initialization> 40006c10: 81 e8 00 00 restore 40006c14: 01 00 00 00 nop 40006d94 <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 40006d94: 9d e3 bf 98 save %sp, -104, %sp Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 40006d98: 80 a6 20 00 cmp %i0, 0 40006d9c: 02 80 00 0c be 40006dcc <_POSIX_Condition_variables_Get+0x38> 40006da0: b4 10 00 19 mov %i1, %i2 *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *id == PTHREAD_COND_INITIALIZER ) { 40006da4: c2 06 00 00 ld [ %i0 ], %g1 40006da8: 80 a0 7f ff cmp %g1, -1 40006dac: 32 80 00 0c bne,a 40006ddc <_POSIX_Condition_variables_Get+0x48> 40006db0: f2 06 00 00 ld [ %i0 ], %i1 /* * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); 40006db4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40006db8: 40 00 00 0d call 40006dec <== NOT EXECUTED 40006dbc: 92 10 20 00 clr %o1 <== NOT EXECUTED if ( status ) { 40006dc0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40006dc4: 22 80 00 06 be,a 40006ddc <_POSIX_Condition_variables_Get+0x48> <== NOT EXECUTED 40006dc8: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED *location = OBJECTS_ERROR; 40006dcc: 82 10 20 01 mov 1, %g1 40006dd0: c2 26 80 00 st %g1, [ %i2 ] * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) _Objects_Get( &_POSIX_Condition_variables_Information, *id, location ); } 40006dd4: 81 c7 e0 08 ret 40006dd8: 91 e8 20 00 restore %g0, 0, %o0 /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 40006ddc: 31 10 00 5e sethi %hi(0x40017800), %i0 40006de0: 40 00 0b c2 call 40009ce8 <_Objects_Get> 40006de4: 91 ee 22 a4 restore %i0, 0x2a4, %o0 40006de8: 01 00 00 00 nop 40006f90 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 40006f90: 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 ) ) { 40006f94: a0 07 bf f4 add %fp, -12, %l0 40006f98: 90 10 00 19 mov %i1, %o0 40006f9c: 40 00 00 7d call 40007190 <_POSIX_Mutex_Get> 40006fa0: 92 10 00 10 mov %l0, %o1 40006fa4: 80 a2 20 00 cmp %o0, 0 40006fa8: 22 80 00 18 be,a 40007008 <_POSIX_Condition_variables_Wait_support+0x78> 40006fac: b0 10 20 16 mov 0x16, %i0 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 40006fb0: 03 10 00 5d sethi %hi(0x40017400), %g1 40006fb4: c4 00 62 10 ld [ %g1 + 0x210 ], %g2 ! 40017610 <_Thread_Dispatch_disable_level> return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 40006fb8: 92 10 00 10 mov %l0, %o1 40006fbc: 84 00 bf ff add %g2, -1, %g2 40006fc0: 90 10 00 18 mov %i0, %o0 40006fc4: c4 20 62 10 st %g2, [ %g1 + 0x210 ] 40006fc8: 7f ff ff 73 call 40006d94 <_POSIX_Condition_variables_Get> 40006fcc: 01 00 00 00 nop switch ( location ) { 40006fd0: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006fd4: 80 a0 60 00 cmp %g1, 0 40006fd8: 12 80 00 33 bne 400070a4 <_POSIX_Condition_variables_Wait_support+0x114> 40006fdc: a2 10 00 08 mov %o0, %l1 case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 40006fe0: c4 02 20 14 ld [ %o0 + 0x14 ], %g2 40006fe4: 80 a0 a0 00 cmp %g2, 0 40006fe8: 02 80 00 0a be 40007010 <_POSIX_Condition_variables_Wait_support+0x80> 40006fec: 01 00 00 00 nop 40006ff0: c2 06 40 00 ld [ %i1 ], %g1 40006ff4: 80 a0 80 01 cmp %g2, %g1 40006ff8: 02 80 00 06 be 40007010 <_POSIX_Condition_variables_Wait_support+0x80> 40006ffc: 01 00 00 00 nop _Thread_Enable_dispatch(); 40007000: 40 00 0d 60 call 4000a580 <_Thread_Enable_dispatch> <== NOT EXECUTED 40007004: b0 10 20 16 mov 0x16, %i0 ! 16 <== NOT EXECUTED 40007008: 81 c7 e0 08 ret 4000700c: 81 e8 00 00 restore return EINVAL; } (void) pthread_mutex_unlock( mutex ); 40007010: 40 00 00 f0 call 400073d0 40007014: 90 10 00 19 mov %i1, %o0 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 40007018: 80 8e e0 ff btst 0xff, %i3 4000701c: 12 80 00 1b bne 40007088 <_POSIX_Condition_variables_Wait_support+0xf8> 40007020: 21 10 00 5d sethi %hi(0x40017400), %l0 the_cond->Mutex = *mutex; 40007024: c2 06 40 00 ld [ %i1 ], %g1 40007028: c2 24 60 14 st %g1, [ %l1 + 0x14 ] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 4000702c: c2 04 22 d0 ld [ %l0 + 0x2d0 ], %g1 _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 40007030: 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; 40007034: 84 04 60 18 add %l1, 0x18, %g2 _Thread_Executing->Wait.id = *cond; 40007038: 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; 4000703c: c4 20 60 44 st %g2, [ %g1 + 0x44 ] _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 40007040: 92 10 00 1a mov %i2, %o1 40007044: 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; 40007048: 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 ); 4000704c: 15 10 00 2b sethi %hi(0x4000ac00), %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; 40007050: 82 10 20 01 mov 1, %g1 40007054: 94 12 a2 cc or %o2, 0x2cc, %o2 40007058: 40 00 0e 8a call 4000aa80 <_Thread_queue_Enqueue_with_handler> 4000705c: c2 24 60 48 st %g1, [ %l1 + 0x48 ] _Thread_Enable_dispatch(); 40007060: 40 00 0d 48 call 4000a580 <_Thread_Enable_dispatch> 40007064: 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; 40007068: c2 04 22 d0 ld [ %l0 + 0x2d0 ], %g1 4000706c: f0 00 60 34 ld [ %g1 + 0x34 ], %i0 if ( status && status != ETIMEDOUT ) 40007070: 80 a6 20 00 cmp %i0, 0 40007074: 02 80 00 07 be 40007090 <_POSIX_Condition_variables_Wait_support+0x100> 40007078: 80 a6 20 74 cmp %i0, 0x74 4000707c: 12 80 00 0b bne 400070a8 <_POSIX_Condition_variables_Wait_support+0x118> 40007080: 01 00 00 00 nop 40007084: 30 80 00 03 b,a 40007090 <_POSIX_Condition_variables_Wait_support+0x100> return status; } else { _Thread_Enable_dispatch(); 40007088: 40 00 0d 3e call 4000a580 <_Thread_Enable_dispatch> 4000708c: b0 10 20 74 mov 0x74, %i0 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 40007090: 40 00 00 af call 4000734c 40007094: 90 10 00 19 mov %i1, %o0 if ( mutex_status ) 40007098: 80 a2 20 00 cmp %o0, 0 4000709c: 02 80 00 03 be 400070a8 <_POSIX_Condition_variables_Wait_support+0x118> 400070a0: 01 00 00 00 nop 400070a4: b0 10 20 16 mov 0x16, %i0 ! 16 case OBJECTS_ERROR: break; } return EINVAL; } 400070a8: 81 c7 e0 08 ret 400070ac: 81 e8 00 00 restore 4000d400 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 4000d400: 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 ); 4000d404: 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 ]; 4000d408: 05 00 00 3f sethi %hi(0xfc00), %g2 4000d40c: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 4000d410: 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); 4000d414: 83 30 60 18 srl %g1, 0x18, %g1 4000d418: 82 08 60 07 and %g1, 7, %g1 4000d41c: 82 00 60 06 add %g1, 6, %g1 4000d420: a9 28 a0 02 sll %g2, 2, %l4 4000d424: a7 28 60 02 sll %g1, 2, %l3 4000d428: a4 10 20 00 clr %l2 for ( ; ; ) { are_all_null = TRUE; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 4000d42c: 03 10 00 68 sethi %hi(0x4001a000), %g1 4000d430: aa 10 61 b4 or %g1, 0x1b4, %l5 ! 4001a1b4 <_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 ]; 4000d434: a0 10 20 01 mov 1, %l0 4000d438: 10 80 00 1b b 4000d4a4 <_POSIX_Keys_Run_destructors+0xa4> 4000d43c: 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 *) 4000d440: c2 05 60 1c ld [ %l5 + 0x1c ], %g1 4000d444: f0 00 40 02 ld [ %g1 + %g2 ], %i0 _POSIX_Keys_Information.local_table[ index ]; if ( the_key && the_key->is_active && the_key->destructor ) { 4000d448: 80 a6 20 00 cmp %i0, 0 4000d44c: 02 80 00 16 be 4000d4a4 <_POSIX_Keys_Run_destructors+0xa4> 4000d450: a0 04 20 01 inc %l0 4000d454: c2 0e 20 10 ldub [ %i0 + 0x10 ], %g1 4000d458: 80 a0 60 00 cmp %g1, 0 4000d45c: 22 80 00 13 be,a 4000d4a8 <_POSIX_Keys_Run_destructors+0xa8> 4000d460: c2 15 60 10 lduh [ %l5 + 0x10 ], %g1 <== NOT EXECUTED 4000d464: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 4000d468: 80 a0 a0 00 cmp %g2, 0 4000d46c: 22 80 00 0f be,a 4000d4a8 <_POSIX_Keys_Run_destructors+0xa8> 4000d470: c2 15 60 10 lduh [ %l5 + 0x10 ], %g1 <== NOT EXECUTED value = the_key->Values[ thread_api ][ thread_index ]; 4000d474: c2 06 00 13 ld [ %i0 + %l3 ], %g1 4000d478: c2 00 40 14 ld [ %g1 + %l4 ], %g1 if ( value ) { 4000d47c: 90 90 60 00 orcc %g1, 0, %o0 4000d480: 22 80 00 0a be,a 4000d4a8 <_POSIX_Keys_Run_destructors+0xa8> 4000d484: c2 15 60 10 lduh [ %l5 + 0x10 ], %g1 <== NOT EXECUTED (*the_key->destructor)( value ); 4000d488: 9f c0 80 00 call %g2 4000d48c: 01 00 00 00 nop if ( the_key->Values[ thread_api ][ thread_index ] ) 4000d490: c2 06 00 13 ld [ %i0 + %l3 ], %g1 4000d494: c2 00 40 14 ld [ %g1 + %l4 ], %g1 4000d498: 80 a0 00 01 cmp %g0, %g1 4000d49c: 82 40 3f ff addx %g0, -1, %g1 4000d4a0: a2 0c 40 01 and %l1, %g1, %l1 for ( ; ; ) { are_all_null = TRUE; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 4000d4a4: c2 15 60 10 lduh [ %l5 + 0x10 ], %g1 4000d4a8: 80 a4 00 01 cmp %l0, %g1 4000d4ac: 08 bf ff e5 bleu 4000d440 <_POSIX_Keys_Run_destructors+0x40> 4000d4b0: 85 2c 20 02 sll %l0, 2, %g2 are_all_null = FALSE; } } } if ( are_all_null == TRUE ) 4000d4b4: 80 8c 60 ff btst 0xff, %l1 4000d4b8: 12 80 00 05 bne 4000d4cc <_POSIX_Keys_Run_destructors+0xcc> 4000d4bc: 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 ) 4000d4c0: 80 a4 a0 04 cmp %l2, 4 4000d4c4: 12 bf ff dd bne 4000d438 <_POSIX_Keys_Run_destructors+0x38> 4000d4c8: a0 10 20 01 mov 1, %l0 4000d4cc: 81 c7 e0 08 ret 4000d4d0: 81 e8 00 00 restore 4001221c <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 4001221c: 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 ); 40012220: 92 10 20 ff mov 0xff, %o1 40012224: 40 00 11 f8 call 40016a04 40012228: 90 10 00 18 mov %i0, %o0 const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 4001222c: 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 ); 40012230: a6 10 00 08 mov %o0, %l3 const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 40012234: 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 ) 40012238: 80 a2 20 ff cmp %o0, 0xff 4001223c: 18 80 00 5d bgu 400123b0 <_POSIX_Message_queue_Create_support+0x194> 40012240: b0 10 20 5b mov 0x5b, %i0 40012244: 05 10 00 92 sethi %hi(0x40024800), %g2 40012248: c2 00 a3 f0 ld [ %g2 + 0x3f0 ], %g1 ! 40024bf0 <_Thread_Dispatch_disable_level> 4001224c: 82 00 60 01 inc %g1 40012250: c2 20 a3 f0 st %g1, [ %g2 + 0x3f0 ] * 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 ) { 40012254: a4 10 20 10 mov 0x10, %l2 40012258: 80 a6 a0 00 cmp %i2, 0 4001225c: 02 80 00 14 be 400122ac <_POSIX_Message_queue_Create_support+0x90> 40012260: a2 10 20 0a mov 0xa, %l1 attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 40012264: c2 06 a0 04 ld [ %i2 + 4 ], %g1 40012268: 80 a0 60 00 cmp %g1, 0 4001226c: 04 80 00 06 ble 40012284 <_POSIX_Message_queue_Create_support+0x68> 40012270: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 40012274: c2 06 a0 08 ld [ %i2 + 8 ], %g1 40012278: 80 a0 60 00 cmp %g1, 0 4001227c: 34 80 00 08 bg,a 4001229c <_POSIX_Message_queue_Create_support+0x80> 40012280: 90 07 bf e8 add %fp, -24, %o0 _Thread_Enable_dispatch(); 40012284: 7f ff f2 98 call 4000ece4 <_Thread_Enable_dispatch> 40012288: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); 4001228c: 40 00 0a 3f call 40014b88 <__errno> 40012290: 01 00 00 00 nop 40012294: 10 80 00 39 b 40012378 <_POSIX_Message_queue_Create_support+0x15c> 40012298: 82 10 20 16 mov 0x16, %g1 ! 16 } attr = *attr_ptr; 4001229c: 40 00 0c 4c call 400153cc 400122a0: 94 10 20 10 mov 0x10, %o2 400122a4: e4 07 bf f0 ld [ %fp + -16 ], %l2 400122a8: 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 *) 400122ac: 21 10 00 93 sethi %hi(0x40024c00), %l0 400122b0: 7f ff ee e1 call 4000de34 <_Objects_Allocate> 400122b4: 90 14 23 80 or %l0, 0x380, %o0 ! 40024f80 <_POSIX_Message_queue_Information> } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 400122b8: b4 92 20 00 orcc %o0, 0, %i2 400122bc: 32 80 00 08 bne,a 400122dc <_POSIX_Message_queue_Create_support+0xc0> 400122c0: 82 10 20 01 mov 1, %g1 _Thread_Enable_dispatch(); 400122c4: 7f ff f2 88 call 4000ece4 <_Thread_Enable_dispatch> <== NOT EXECUTED 400122c8: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENFILE ); 400122cc: 40 00 0a 2f call 40014b88 <__errno> <== NOT EXECUTED 400122d0: 01 00 00 00 nop <== NOT EXECUTED 400122d4: 10 80 00 29 b 40012378 <_POSIX_Message_queue_Create_support+0x15c> <== NOT EXECUTED 400122d8: 82 10 20 17 mov 0x17, %g1 ! 17 <== NOT EXECUTED } the_mq->process_shared = pshared; 400122dc: 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); 400122e0: 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; 400122e4: 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; 400122e8: 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); 400122ec: 7f ff f7 da call 40010254 <_Workspace_Allocate> 400122f0: c2 2e a0 14 stb %g1, [ %i2 + 0x14 ] if (!name) { 400122f4: b2 92 20 00 orcc %o0, 0, %i1 400122f8: 12 80 00 0b bne 40012324 <_POSIX_Message_queue_Create_support+0x108> 400122fc: 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 ); 40012300: 90 14 23 80 or %l0, 0x380, %o0 <== NOT EXECUTED 40012304: 7f ff ef b9 call 4000e1e8 <_Objects_Free> <== NOT EXECUTED 40012308: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); 4001230c: 7f ff f2 76 call 4000ece4 <_Thread_Enable_dispatch> <== NOT EXECUTED 40012310: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 40012314: 40 00 0a 1d call 40014b88 <__errno> <== NOT EXECUTED 40012318: 01 00 00 00 nop <== NOT EXECUTED 4001231c: 10 80 00 17 b 40012378 <_POSIX_Message_queue_Create_support+0x15c> <== NOT EXECUTED 40012320: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED } strcpy( name, name_arg ); 40012324: 40 00 0f 4d call 40016058 40012328: 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( 4001232c: 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; 40012330: c0 26 a0 5c clr [ %i2 + 0x5c ] if ( ! _CORE_message_queue_Initialize( 40012334: 96 10 00 12 mov %l2, %o3 40012338: 90 06 a0 1c add %i2, 0x1c, %o0 4001233c: 40 00 03 2a call 40012fe4 <_CORE_message_queue_Initialize> 40012340: 92 06 a0 5c add %i2, 0x5c, %o1 40012344: 80 8a 20 ff btst 0xff, %o0 40012348: 12 80 00 0f bne 40012384 <_POSIX_Message_queue_Create_support+0x168> 4001234c: 82 14 23 80 or %l0, 0x380, %g1 40012350: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 40012354: 7f ff ef a5 call 4000e1e8 <_Objects_Free> <== NOT EXECUTED 40012358: 90 14 23 80 or %l0, 0x380, %o0 <== NOT EXECUTED attr.mq_maxmsg, attr.mq_msgsize ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); 4001235c: 7f ff f7 b7 call 40010238 <_Workspace_Free> <== NOT EXECUTED 40012360: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED _Thread_Enable_dispatch(); 40012364: 7f ff f2 60 call 4000ece4 <_Thread_Enable_dispatch> <== NOT EXECUTED 40012368: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); 4001236c: 40 00 0a 07 call 40014b88 <__errno> <== NOT EXECUTED 40012370: 01 00 00 00 nop <== NOT EXECUTED 40012374: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 40012378: c2 22 00 00 st %g1, [ %o0 ] 4001237c: 81 c7 e0 08 ret 40012380: 91 e8 3f ff restore %g0, -1, %o0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40012384: c4 06 a0 08 ld [ %i2 + 8 ], %g2 40012388: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 4001238c: 03 00 00 3f sethi %hi(0xfc00), %g1 40012390: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40012394: 84 08 80 01 and %g2, %g1, %g2 40012398: 85 28 a0 02 sll %g2, 2, %g2 4001239c: 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; 400123a0: f2 26 a0 0c st %i1, [ %i2 + 0xc ] &_POSIX_Message_queue_Information, &the_mq->Object, name ); *message_queue = the_mq; 400123a4: f4 26 c0 00 st %i2, [ %i3 ] _Thread_Enable_dispatch(); 400123a8: 7f ff f2 4f call 4000ece4 <_Thread_Enable_dispatch> 400123ac: b0 10 20 00 clr %i0 return 0; } 400123b0: 81 c7 e0 08 ret 400123b4: 81 e8 00 00 restore 4000aaf8 <_POSIX_Message_queue_Delete>: */ void _POSIX_Message_queue_Delete( POSIX_Message_queue_Control *the_mq ) { 4000aaf8: 9d e3 bf 98 save %sp, -104, %sp if ( !the_mq->linked && !the_mq->open_count ) { 4000aafc: c2 0e 20 15 ldub [ %i0 + 0x15 ], %g1 4000ab00: 80 a0 60 00 cmp %g1, 0 4000ab04: 12 80 00 16 bne 4000ab5c <_POSIX_Message_queue_Delete+0x64> 4000ab08: b2 10 00 18 mov %i0, %i1 4000ab0c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 4000ab10: 80 a0 60 00 cmp %g1, 0 4000ab14: 12 80 00 12 bne 4000ab5c <_POSIX_Message_queue_Delete+0x64> 4000ab18: 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 ) 4000ab1c: d0 06 20 0c ld [ %i0 + 0xc ], %o0 4000ab20: 80 a2 20 00 cmp %o0, 0 4000ab24: 02 80 00 04 be 4000ab34 <_POSIX_Message_queue_Delete+0x3c> 4000ab28: 31 10 00 93 sethi %hi(0x40024c00), %i0 _Workspace_Free( (void *)the_object->name.name_p ); 4000ab2c: 40 00 15 c3 call 40010238 <_Workspace_Free> <== NOT EXECUTED 4000ab30: 01 00 00 00 nop <== NOT EXECUTED _Objects_Close( &_POSIX_Message_queue_Information, the_object ); 4000ab34: 92 10 00 19 mov %i1, %o1 4000ab38: 40 00 0c e9 call 4000dedc <_Objects_Close> 4000ab3c: 90 16 23 80 or %i0, 0x380, %o0 _CORE_message_queue_Close( 4000ab40: 90 06 60 1c add %i1, 0x1c, %o0 4000ab44: 92 10 20 00 clr %o1 4000ab48: 94 10 20 05 mov 5, %o2 4000ab4c: 40 00 09 eb call 4000d2f8 <_CORE_message_queue_Close> 4000ab50: b0 16 23 80 or %i0, 0x380, %i0 RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 4000ab54: 40 00 0d a5 call 4000e1e8 <_Objects_Free> 4000ab58: 81 e8 00 00 restore 4000ab5c: 81 c7 e0 08 ret 4000ab60: 81 e8 00 00 restore 40007ee4 <_POSIX_Mutex_Get>: POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 40007ee4: 9d e3 bf 98 save %sp, -104, %sp Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40007ee8: 80 a6 20 00 cmp %i0, 0 40007eec: 02 80 00 0c be 40007f1c <_POSIX_Mutex_Get+0x38> 40007ef0: b4 10 00 19 mov %i1, %i2 40007ef4: c2 06 00 00 ld [ %i0 ], %g1 40007ef8: 80 a0 7f ff cmp %g1, -1 40007efc: 32 80 00 0c bne,a 40007f2c <_POSIX_Mutex_Get+0x48> 40007f00: f2 06 00 00 ld [ %i0 ], %i1 40007f04: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40007f08: 40 00 00 20 call 40007f88 <== NOT EXECUTED 40007f0c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40007f10: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40007f14: 22 80 00 06 be,a 40007f2c <_POSIX_Mutex_Get+0x48> <== NOT EXECUTED 40007f18: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED 40007f1c: 82 10 20 01 mov 1, %g1 40007f20: c2 26 80 00 st %g1, [ %i2 ] return (POSIX_Mutex_Control *) _Objects_Get( &_POSIX_Mutex_Information, *id, location ); } 40007f24: 81 c7 e0 08 ret 40007f28: 91 e8 20 00 restore %g0, 0, %o0 { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); return (POSIX_Mutex_Control *) 40007f2c: 31 10 00 66 sethi %hi(0x40019800), %i0 40007f30: 40 00 0b 9b call 4000ad9c <_Objects_Get> 40007f34: 91 ee 21 f0 restore %i0, 0x1f0, %o0 40007f38: 01 00 00 00 nop 40007e84 <_POSIX_Mutex_Get_interrupt_disable>: POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 40007e84: 9d e3 bf 98 save %sp, -104, %sp 40007e88: a0 10 00 19 mov %i1, %l0 Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40007e8c: 80 a6 20 00 cmp %i0, 0 40007e90: 02 80 00 0c be 40007ec0 <_POSIX_Mutex_Get_interrupt_disable+0x3c> 40007e94: b6 10 00 1a mov %i2, %i3 40007e98: c2 06 00 00 ld [ %i0 ], %g1 40007e9c: 80 a0 7f ff cmp %g1, -1 40007ea0: 32 80 00 0c bne,a 40007ed0 <_POSIX_Mutex_Get_interrupt_disable+0x4c> 40007ea4: f2 06 00 00 ld [ %i0 ], %i1 40007ea8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40007eac: 40 00 00 37 call 40007f88 <== NOT EXECUTED 40007eb0: 92 10 20 00 clr %o1 <== NOT EXECUTED 40007eb4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40007eb8: 22 80 00 06 be,a 40007ed0 <_POSIX_Mutex_Get_interrupt_disable+0x4c> <== NOT EXECUTED 40007ebc: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED 40007ec0: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40007ec4: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED return (POSIX_Mutex_Control *) _Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level ); } 40007ec8: 81 c7 e0 08 ret <== NOT EXECUTED 40007ecc: 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 *) 40007ed0: b4 10 00 10 mov %l0, %i2 40007ed4: 31 10 00 66 sethi %hi(0x40019800), %i0 40007ed8: 40 00 0b 93 call 4000ad24 <_Objects_Get_isr_disable> 40007edc: 91 ee 21 f0 restore %i0, 0x1f0, %o0 40007ee0: 01 00 00 00 nop 4000f598 <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 4000f598: 9d e3 bf 98 save %sp, -104, %sp 4000f59c: 03 10 00 81 sethi %hi(0x40020400), %g1 4000f5a0: c4 00 61 80 ld [ %g1 + 0x180 ], %g2 ! 40020580 <_Thread_Dispatch_disable_level> 4000f5a4: 84 00 a0 01 inc %g2 4000f5a8: c4 20 61 80 st %g2, [ %g1 + 0x180 ] char *name_p = (char *)name; _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { 4000f5ac: 80 a6 60 00 cmp %i1, 0 4000f5b0: 02 80 00 08 be 4000f5d0 <_POSIX_Semaphore_Create_support+0x38> 4000f5b4: 80 a6 20 00 cmp %i0, 0 _Thread_Enable_dispatch(); 4000f5b8: 7f ff f0 b7 call 4000b894 <_Thread_Enable_dispatch> 4000f5bc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSYS ); 4000f5c0: 40 00 08 80 call 400117c0 <__errno> 4000f5c4: 01 00 00 00 nop 4000f5c8: 10 80 00 19 b 4000f62c <_POSIX_Semaphore_Create_support+0x94> 4000f5cc: 82 10 20 58 mov 0x58, %g1 ! 58 } if ( name ) { 4000f5d0: 02 80 00 0d be 4000f604 <_POSIX_Semaphore_Create_support+0x6c> 4000f5d4: 11 10 00 82 sethi %hi(0x40020800), %o0 if( strlen(name) > PATH_MAX ) { 4000f5d8: 40 00 0f 44 call 400132e8 4000f5dc: 90 10 00 18 mov %i0, %o0 4000f5e0: 80 a2 20 ff cmp %o0, 0xff 4000f5e4: 28 80 00 08 bleu,a 4000f604 <_POSIX_Semaphore_Create_support+0x6c> 4000f5e8: 11 10 00 82 sethi %hi(0x40020800), %o0 _Thread_Enable_dispatch(); 4000f5ec: 7f ff f0 aa call 4000b894 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000f5f0: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4000f5f4: 40 00 08 73 call 400117c0 <__errno> <== NOT EXECUTED 4000f5f8: 01 00 00 00 nop <== NOT EXECUTED 4000f5fc: 10 80 00 0c b 4000f62c <_POSIX_Semaphore_Create_support+0x94> <== NOT EXECUTED 4000f600: 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 *) 4000f604: 7f ff ed 24 call 4000aa94 <_Objects_Allocate> 4000f608: 90 12 20 90 or %o0, 0x90, %o0 } } the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 4000f60c: b2 92 20 00 orcc %o0, 0, %i1 4000f610: 12 80 00 0a bne 4000f638 <_POSIX_Semaphore_Create_support+0xa0> 4000f614: 80 a6 20 00 cmp %i0, 0 _Thread_Enable_dispatch(); 4000f618: 7f ff f0 9f call 4000b894 <_Thread_Enable_dispatch> 4000f61c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSPC ); 4000f620: 40 00 08 68 call 400117c0 <__errno> 4000f624: 01 00 00 00 nop 4000f628: 82 10 20 1c mov 0x1c, %g1 ! 1c 4000f62c: c2 22 00 00 st %g1, [ %o0 ] 4000f630: 81 c7 e0 08 ret 4000f634: 91 e8 3f ff restore %g0, -1, %o0 } the_semaphore->process_shared = pshared; if ( name ) { 4000f638: 02 80 00 07 be 4000f654 <_POSIX_Semaphore_Create_support+0xbc> 4000f63c: c0 26 60 10 clr [ %i1 + 0x10 ] the_semaphore->named = TRUE; the_semaphore->open_count = 1; 4000f640: 82 10 20 01 mov 1, %g1 the_semaphore->linked = TRUE; 4000f644: c2 2e 60 15 stb %g1, [ %i1 + 0x15 ] the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; the_semaphore->open_count = 1; 4000f648: c2 26 60 18 st %g1, [ %i1 + 0x18 ] } the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; 4000f64c: 10 80 00 05 b 4000f660 <_POSIX_Semaphore_Create_support+0xc8> 4000f650: c2 2e 60 14 stb %g1, [ %i1 + 0x14 ] the_semaphore->open_count = 1; the_semaphore->linked = TRUE; } else { the_semaphore->named = FALSE; 4000f654: c0 2e 60 14 clrb [ %i1 + 0x14 ] the_semaphore->open_count = 0; 4000f658: c0 26 60 18 clr [ %i1 + 0x18 ] the_semaphore->linked = FALSE; 4000f65c: c0 2e 60 15 clrb [ %i1 + 0x15 ] /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 4000f660: 82 10 3f ff mov -1, %g1 _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 4000f664: 94 10 00 1a mov %i2, %o2 4000f668: 90 06 60 1c add %i1, 0x1c, %o0 4000f66c: 92 06 60 5c add %i1, 0x5c, %o1 /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 4000f670: c2 26 60 5c st %g1, [ %i1 + 0x5c ] _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 4000f674: 7f ff eb e0 call 4000a5f4 <_CORE_semaphore_Initialize> 4000f678: c0 26 60 60 clr [ %i1 + 0x60 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4000f67c: c4 06 60 08 ld [ %i1 + 8 ], %g2 4000f680: 03 10 00 82 sethi %hi(0x40020800), %g1 4000f684: c6 00 60 ac ld [ %g1 + 0xac ], %g3 ! 400208ac <_POSIX_Semaphore_Information+0x1c> 4000f688: 03 00 00 3f sethi %hi(0xfc00), %g1 4000f68c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000f690: 84 08 80 01 and %g2, %g1, %g2 4000f694: 85 28 a0 02 sll %g2, 2, %g2 4000f698: 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; 4000f69c: f0 26 60 0c st %i0, [ %i1 + 0xc ] &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 4000f6a0: f2 26 c0 00 st %i1, [ %i3 ] _Thread_Enable_dispatch(); 4000f6a4: 7f ff f0 7c call 4000b894 <_Thread_Enable_dispatch> 4000f6a8: b0 10 20 00 clr %i0 return 0; } 4000f6ac: 81 c7 e0 08 ret 4000f6b0: 81 e8 00 00 restore 4000bc94 <_POSIX_Threads_Create_extension>: bool _POSIX_Threads_Create_extension( Thread_Control *executing, Thread_Control *created ) { 4000bc94: 9d e3 bf 98 save %sp, -104, %sp POSIX_API_Control *api; POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); 4000bc98: 90 10 20 e4 mov 0xe4, %o0 4000bc9c: 7f ff f7 49 call 400099c0 <_Workspace_Allocate> 4000bca0: b0 10 20 00 clr %i0 if ( !api ) 4000bca4: a2 92 20 00 orcc %o0, 0, %l1 4000bca8: 02 80 00 38 be 4000bd88 <_POSIX_Threads_Create_extension+0xf4> 4000bcac: 94 10 20 38 mov 0x38, %o2 return false; created->API_Extensions[ THREAD_API_POSIX ] = api; 4000bcb0: e2 26 61 60 st %l1, [ %i1 + 0x160 ] /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; 4000bcb4: 21 10 00 61 sethi %hi(0x40018400), %l0 4000bcb8: a0 14 21 30 or %l0, 0x130, %l0 ! 40018530 <_POSIX_Threads_Default_attributes> 4000bcbc: 40 00 09 f5 call 4000e490 4000bcc0: 92 10 00 10 mov %l0, %o1 api->detachstate = _POSIX_Threads_Default_attributes.detachstate; 4000bcc4: 82 10 20 01 mov 1, %g1 api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; api->schedparam = _POSIX_Threads_Default_attributes.schedparam; 4000bcc8: 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; 4000bccc: 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; 4000bcd0: c2 24 60 38 st %g1, [ %l1 + 0x38 ] api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; api->schedparam = _POSIX_Threads_Default_attributes.schedparam; 4000bcd4: 90 04 60 80 add %l1, 0x80, %o0 4000bcd8: 40 00 09 ee call 4000e490 4000bcdc: 94 10 20 18 mov 0x18, %o2 api->schedparam.sched_priority = 4000bce0: c4 06 60 14 ld [ %i1 + 0x14 ], %g2 4000bce4: 82 10 20 ff mov 0xff, %g1 4000bce8: 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; 4000bcec: 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 = 4000bcf0: 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 && 4000bcf4: c6 06 60 08 ld [ %i1 + 8 ], %g3 4000bcf8: 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; 4000bcfc: c0 24 60 d4 clr [ %l1 + 0xd4 ] 4000bd00: c2 24 60 d8 st %g1, [ %l1 + 0xd8 ] api->cancelability_state = PTHREAD_CANCEL_ENABLE; 4000bd04: c0 24 60 cc clr [ %l1 + 0xcc ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000bd08: 82 04 60 d8 add %l1, 0xd8, %g1 api->cancelability_type = PTHREAD_CANCEL_DEFERRED; 4000bd0c: c0 24 60 d0 clr [ %l1 + 0xd0 ] 4000bd10: 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 && 4000bd14: 83 30 e0 18 srl %g3, 0x18, %g1 4000bd18: 82 08 60 07 and %g1, 7, %g1 4000bd1c: 80 a0 60 03 cmp %g1, 3 4000bd20: 12 80 00 0b bne 4000bd4c <_POSIX_Threads_Create_extension+0xb8> 4000bd24: c0 24 60 dc clr [ %l1 + 0xdc ] 4000bd28: 83 30 e0 1b srl %g3, 0x1b, %g1 4000bd2c: 80 a0 60 01 cmp %g1, 1 4000bd30: 32 80 00 08 bne,a 4000bd50 <_POSIX_Threads_Create_extension+0xbc> 4000bd34: 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; 4000bd38: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000bd3c: c2 00 62 20 ld [ %g1 + 0x220 ], %g1 ! 40019e20 <_Thread_Executing> 4000bd40: c2 00 61 60 ld [ %g1 + 0x160 ], %g1 4000bd44: 10 80 00 03 b 4000bd50 <_POSIX_Threads_Create_extension+0xbc> 4000bd48: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 } else { api->signals_blocked = 0xffffffff; 4000bd4c: 82 10 3f ff mov -1, %g1 4000bd50: c2 24 60 c4 st %g1, [ %l1 + 0xc4 ] } _Thread_queue_Initialize( 4000bd54: 90 04 60 3c add %l1, 0x3c, %o0 4000bd58: 92 10 20 00 clr %o1 4000bd5c: 15 00 00 04 sethi %hi(0x1000), %o2 4000bd60: 7f ff f4 02 call 40008d68 <_Thread_queue_Initialize> 4000bd64: 96 10 20 00 clr %o3 THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_JOIN_AT_EXIT, 0 ); _Watchdog_Initialize( 4000bd68: 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; 4000bd6c: f2 24 60 c0 st %i1, [ %l1 + 0xc0 ] void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 4000bd70: c2 24 60 bc st %g1, [ %l1 + 0xbc ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4000bd74: c0 24 60 a4 clr [ %l1 + 0xa4 ] the_watchdog->routine = routine; 4000bd78: 03 10 00 2f sethi %hi(0x4000bc00), %g1 the_watchdog->id = id; the_watchdog->user_data = user_data; 4000bd7c: b0 10 20 01 mov 1, %i0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4000bd80: 82 10 61 e0 or %g1, 0x1e0, %g1 4000bd84: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] created->Object.id, created ); return true; } 4000bd88: 81 c7 e0 08 ret 4000bd8c: 81 e8 00 00 restore 4000bde0 <_POSIX_Threads_Sporadic_budget_TSR>: void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id, void *argument ) { 4000bde0: 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 ]; 4000bde4: f0 06 61 60 ld [ %i1 + 0x160 ], %i0 ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget ); 4000bde8: 40 00 03 fb call 4000cdd4 <_Timespec_To_ticks> 4000bdec: 90 06 20 90 add %i0, 0x90, %o0 if ( !ticks ) 4000bdf0: 80 a2 20 00 cmp %o0, 0 4000bdf4: 22 80 00 02 be,a 4000bdfc <_POSIX_Threads_Sporadic_budget_TSR+0x1c> 4000bdf8: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000bdfc: 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 || 4000be00: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 4000be04: 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; 4000be08: d0 26 60 78 st %o0, [ %i1 + 0x78 ] 4000be0c: 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 || 4000be10: 80 a0 e0 00 cmp %g3, 0 4000be14: 02 80 00 06 be 4000be2c <_POSIX_Threads_Sporadic_budget_TSR+0x4c> 4000be18: d2 26 60 18 st %o1, [ %i1 + 0x18 ] 4000be1c: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 4000be20: 80 a0 40 09 cmp %g1, %o1 4000be24: 08 80 00 05 bleu 4000be38 <_POSIX_Threads_Sporadic_budget_TSR+0x58> 4000be28: 01 00 00 00 nop the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); 4000be2c: 90 10 00 19 mov %i1, %o0 4000be30: 7f ff f0 63 call 40007fbc <_Thread_Change_priority> 4000be34: 94 10 20 01 mov 1, %o2 ticks = _Timespec_To_ticks( &api->schedparam.ss_replenish_period ); 4000be38: 40 00 03 e7 call 4000cdd4 <_Timespec_To_ticks> 4000be3c: 90 06 20 88 add %i0, 0x88, %o0 if ( !ticks ) 4000be40: 80 a2 20 00 cmp %o0, 0 4000be44: 22 80 00 02 be,a 4000be4c <_POSIX_Threads_Sporadic_budget_TSR+0x6c> 4000be48: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000be4c: d0 26 20 a8 st %o0, [ %i0 + 0xa8 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4000be50: b2 06 20 9c add %i0, 0x9c, %i1 4000be54: 31 10 00 67 sethi %hi(0x40019c00), %i0 4000be58: 7f ff f6 25 call 400096ec <_Watchdog_Insert> 4000be5c: 91 ee 22 40 restore %i0, 0x240, %o0 4000be60: 01 00 00 00 nop 4000bd90 <_POSIX_Threads_Sporadic_budget_callout>: ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4000bd90: 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 || 4000bd94: c6 02 20 1c ld [ %o0 + 0x1c ], %g3 RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (255 - priority); 4000bd98: 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 */ 4000bd9c: 82 10 3f ff mov -1, %g1 4000bda0: c2 22 20 78 st %g1, [ %o0 + 0x78 ] 4000bda4: 82 10 20 ff mov 0xff, %g1 4000bda8: 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 || 4000bdac: 80 a0 e0 00 cmp %g3, 0 4000bdb0: 02 80 00 06 be 4000bdc8 <_POSIX_Threads_Sporadic_budget_callout+0x38> 4000bdb4: d2 22 20 18 st %o1, [ %o0 + 0x18 ] 4000bdb8: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 <== NOT EXECUTED 4000bdbc: 80 a0 40 09 cmp %g1, %o1 <== NOT EXECUTED 4000bdc0: 08 80 00 06 bleu 4000bdd8 <_POSIX_Threads_Sporadic_budget_callout+0x48> <== NOT EXECUTED 4000bdc4: 01 00 00 00 nop <== NOT EXECUTED the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); 4000bdc8: 94 10 20 01 mov 1, %o2 ! 1 4000bdcc: 82 13 c0 00 mov %o7, %g1 4000bdd0: 7f ff f0 7b call 40007fbc <_Thread_Change_priority> 4000bdd4: 9e 10 40 00 mov %g1, %o7 4000bdd8: 81 c3 e0 08 retl <== NOT EXECUTED 4000bddc: 01 00 00 00 nop 4000d398 <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 4000d398: 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 ]; 4000d39c: f0 06 21 60 ld [ %i0 + 0x160 ], %i0 handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 4000d3a0: 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; 4000d3a4: a2 06 20 dc add %i0, 0xdc, %l1 4000d3a8: 10 80 00 10 b 4000d3e8 <_POSIX_Threads_cancel_run+0x50> 4000d3ac: c2 26 20 cc st %g1, [ %i0 + 0xcc ] while ( !_Chain_Is_empty( handler_stack ) ) { _ISR_Disable( level ); 4000d3b0: 7f ff d2 6a call 40001d58 <== NOT EXECUTED 4000d3b4: 01 00 00 00 nop <== NOT EXECUTED handler = (POSIX_Cancel_Handler_control *) 4000d3b8: e0 04 60 04 ld [ %l1 + 4 ], %l0 <== NOT EXECUTED ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4000d3bc: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED previous = the_node->previous; 4000d3c0: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED next->previous = previous; previous->next = next; 4000d3c4: 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; 4000d3c8: c2 20 a0 04 st %g1, [ %g2 + 4 ] <== NOT EXECUTED _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 4000d3cc: 7f ff d2 67 call 40001d68 <== NOT EXECUTED 4000d3d0: 01 00 00 00 nop <== NOT EXECUTED (*handler->routine)( handler->arg ); 4000d3d4: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 4000d3d8: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000d3dc: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED _Workspace_Free( handler ); 4000d3e0: 7f ff f1 71 call 400099a4 <_Workspace_Free> <== NOT EXECUTED 4000d3e4: 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 ) ) { 4000d3e8: c2 06 20 d8 ld [ %i0 + 0xd8 ], %g1 4000d3ec: 80 a0 40 11 cmp %g1, %l1 4000d3f0: 12 bf ff f0 bne 4000d3b0 <_POSIX_Threads_cancel_run+0x18> 4000d3f4: 01 00 00 00 nop (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } 4000d3f8: 81 c7 e0 08 ret 4000d3fc: 81 e8 00 00 restore 4000e18c <_POSIX_Timer_Insert_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { 4000e18c: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; (void) _Watchdog_Remove( timer ); 4000e190: 7f ff f5 91 call 4000b7d4 <_Watchdog_Remove> 4000e194: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 4000e198: 7f ff d1 e8 call 40002938 4000e19c: 01 00 00 00 nop 4000e1a0: 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 ) { 4000e1a4: c2 06 20 08 ld [ %i0 + 8 ], %g1 4000e1a8: 80 a0 60 00 cmp %g1, 0 4000e1ac: 22 80 00 06 be,a 4000e1c4 <_POSIX_Timer_Insert_helper+0x38> 4000e1b0: f6 26 20 1c st %i3, [ %i0 + 0x1c ] _ISR_Enable( level ); 4000e1b4: 7f ff d1 e5 call 40002948 <== NOT EXECUTED 4000e1b8: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000e1bc: 81 c7 e0 08 ret <== NOT EXECUTED 4000e1c0: 81 e8 00 00 restore <== NOT EXECUTED void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 4000e1c4: f4 26 20 20 st %i2, [ %i0 + 0x20 ] the_watchdog->user_data = user_data; 4000e1c8: f8 26 20 24 st %i4, [ %i0 + 0x24 ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000e1cc: f2 26 20 0c st %i1, [ %i0 + 0xc ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4000e1d0: c0 26 20 08 clr [ %i0 + 8 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4000e1d4: 92 10 00 18 mov %i0, %o1 4000e1d8: 11 10 00 7a sethi %hi(0x4001e800), %o0 4000e1dc: 7f ff f5 24 call 4000b66c <_Watchdog_Insert> 4000e1e0: 90 12 20 c0 or %o0, 0xc0, %o0 ! 4001e8c0 <_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 ); 4000e1e4: b0 10 20 01 mov 1, %i0 4000e1e8: 7f ff d1 d8 call 40002948 4000e1ec: 90 10 00 10 mov %l0, %o0 return true; } 4000e1f0: 81 c7 e0 08 ret 4000e1f4: 81 e8 00 00 restore 400079c0 <_POSIX_Timer_TSR>: /* * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR(Objects_Id timer, void *data) { 400079c0: 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; 400079c4: c2 06 60 68 ld [ %i1 + 0x68 ], %g1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 400079c8: 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; 400079cc: 82 00 60 01 inc %g1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 400079d0: 80 a0 a0 00 cmp %g2, 0 400079d4: 12 80 00 06 bne 400079ec <_POSIX_Timer_TSR+0x2c> 400079d8: c2 26 60 68 st %g1, [ %i1 + 0x68 ] 400079dc: c2 06 60 58 ld [ %i1 + 0x58 ], %g1 <== NOT EXECUTED 400079e0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400079e4: 02 80 00 0f be 40007a20 <_POSIX_Timer_TSR+0x60> <== NOT EXECUTED 400079e8: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 400079ec: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 400079f0: d4 06 60 08 ld [ %i1 + 8 ], %o2 400079f4: 90 06 60 10 add %i1, 0x10, %o0 400079f8: 17 10 00 1e sethi %hi(0x40007800), %o3 400079fc: 98 10 00 19 mov %i1, %o4 40007a00: 40 00 19 e3 call 4000e18c <_POSIX_Timer_Insert_helper> 40007a04: 96 12 e1 c0 or %o3, 0x1c0, %o3 ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 40007a08: 80 8a 20 ff btst 0xff, %o0 40007a0c: 02 80 00 0a be 40007a34 <_POSIX_Timer_TSR+0x74> 40007a10: 01 00 00 00 nop return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 40007a14: 40 00 05 e9 call 400091b8 <_TOD_Get> 40007a18: 90 06 60 6c add %i1, 0x6c, %o0 40007a1c: 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 ) ) { 40007a20: d0 06 60 38 ld [ %i1 + 0x38 ], %o0 40007a24: d2 06 60 44 ld [ %i1 + 0x44 ], %o1 40007a28: 40 00 18 fe call 4000de20 40007a2c: 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; 40007a30: c0 26 60 68 clr [ %i1 + 0x68 ] 40007a34: 81 c7 e0 08 ret 40007a38: 81 e8 00 00 restore 4000d578 <_POSIX_signals_Clear_signals>: int signo, siginfo_t *info, bool is_global, bool check_blocked ) { 4000d578: 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 ); 4000d57c: 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 ) 4000d580: 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 ); 4000d584: 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 ) 4000d588: b8 10 3f ff mov -1, %i4 4000d58c: 02 80 00 04 be 4000d59c <_POSIX_signals_Clear_signals+0x24> 4000d590: a1 28 40 02 sll %g1, %g2, %l0 signals_blocked = ~api->signals_blocked; 4000d594: c2 06 20 c4 ld [ %i0 + 0xc4 ], %g1 4000d598: 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 ); 4000d59c: 7f ff d1 ef call 40001d58 4000d5a0: 01 00 00 00 nop 4000d5a4: a2 10 00 08 mov %o0, %l1 if ( is_global ) { 4000d5a8: 80 8e e0 ff btst 0xff, %i3 4000d5ac: 22 80 00 35 be,a 4000d680 <_POSIX_signals_Clear_signals+0x108> 4000d5b0: c4 06 20 c8 ld [ %i0 + 0xc8 ], %g2 if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { 4000d5b4: 03 10 00 69 sethi %hi(0x4001a400), %g1 4000d5b8: c2 00 60 fc ld [ %g1 + 0xfc ], %g1 ! 4001a4fc <_POSIX_signals_Pending> 4000d5bc: 82 0c 00 01 and %l0, %g1, %g1 4000d5c0: 80 88 40 1c btst %g1, %i4 4000d5c4: 02 80 00 35 be 4000d698 <_POSIX_signals_Clear_signals+0x120> 4000d5c8: 83 2e 60 02 sll %i1, 2, %g1 if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 4000d5cc: 85 2e 60 04 sll %i1, 4, %g2 4000d5d0: 84 20 80 01 sub %g2, %g1, %g2 4000d5d4: 03 10 00 68 sethi %hi(0x4001a000), %g1 4000d5d8: 82 10 63 30 or %g1, 0x330, %g1 ! 4001a330 <_POSIX_signals_Vectors> 4000d5dc: c2 00 40 02 ld [ %g1 + %g2 ], %g1 4000d5e0: 80 a0 60 02 cmp %g1, 2 4000d5e4: 12 80 00 23 bne 4000d670 <_POSIX_signals_Clear_signals+0xf8> 4000d5e8: 03 10 00 69 sethi %hi(0x4001a400), %g1 psiginfo = (POSIX_signals_Siginfo_node *) 4000d5ec: 88 10 61 00 or %g1, 0x100, %g4 ! 4001a500 <_POSIX_signals_Siginfo> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000d5f0: f8 00 80 04 ld [ %g2 + %g4 ], %i4 4000d5f4: 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; 4000d5f8: 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)) 4000d5fc: 80 a7 00 0d cmp %i4, %o5 4000d600: 32 80 00 04 bne,a 4000d610 <_POSIX_signals_Clear_signals+0x98> 4000d604: c2 07 00 00 ld [ %i4 ], %g1 4000d608: 10 80 00 04 b 4000d618 <_POSIX_signals_Clear_signals+0xa0> <== NOT EXECUTED 4000d60c: 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; 4000d610: c2 20 80 04 st %g1, [ %g2 + %g4 ] new_first->previous = _Chain_Head(the_chain); 4000d614: c6 20 60 04 st %g3, [ %g1 + 4 ] _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); if ( _Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 4000d618: c2 00 80 04 ld [ %g2 + %g4 ], %g1 4000d61c: 80 a0 40 0d cmp %g1, %o5 4000d620: 12 80 00 05 bne 4000d634 <_POSIX_signals_Clear_signals+0xbc> 4000d624: 80 a7 20 00 cmp %i4, 0 _POSIX_signals_Clear_process_signals( mask ); 4000d628: 40 00 01 90 call 4000dc68 <_POSIX_signals_Clear_process_signals> 4000d62c: 90 10 00 10 mov %l0, %o0 if ( psiginfo ) { 4000d630: 80 a7 20 00 cmp %i4, 0 4000d634: 02 80 00 1a be 4000d69c <_POSIX_signals_Clear_signals+0x124> 4000d638: b0 10 20 01 mov 1, %i0 *info = psiginfo->Info; 4000d63c: 90 10 00 1a mov %i2, %o0 4000d640: 92 07 20 08 add %i4, 8, %o1 4000d644: 40 00 03 93 call 4000e490 4000d648: 94 10 20 0c mov 0xc, %o2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000d64c: 03 10 00 69 sethi %hi(0x4001a400), %g1 4000d650: 82 10 60 b4 or %g1, 0xb4, %g1 ! 4001a4b4 <_POSIX_signals_Inactive_siginfo+0x4> 4000d654: c2 27 00 00 st %g1, [ %i4 ] old_last_node = the_chain->last; 4000d658: 82 00 7f fc add %g1, -4, %g1 4000d65c: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_chain->last = the_node; 4000d660: f8 20 60 08 st %i4, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000d664: 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; 4000d668: 10 80 00 04 b 4000d678 <_POSIX_signals_Clear_signals+0x100> 4000d66c: f8 20 80 00 st %i4, [ %g2 ] &psiginfo->Node ); } else do_callout = false; } else _POSIX_signals_Clear_process_signals( mask ); 4000d670: 40 00 01 7e call 4000dc68 <_POSIX_signals_Clear_process_signals> 4000d674: 90 10 00 10 mov %l0, %o0 4000d678: 10 80 00 09 b 4000d69c <_POSIX_signals_Clear_signals+0x124> 4000d67c: b0 10 20 01 mov 1, %i0 do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { 4000d680: 82 0c 00 02 and %l0, %g2, %g1 4000d684: 80 88 40 1c btst %g1, %i4 4000d688: 02 80 00 04 be 4000d698 <_POSIX_signals_Clear_signals+0x120> 4000d68c: 82 28 80 10 andn %g2, %l0, %g1 api->signals_pending &= ~mask; 4000d690: 10 bf ff fa b 4000d678 <_POSIX_signals_Clear_signals+0x100> 4000d694: c2 26 20 c8 st %g1, [ %i0 + 0xc8 ] 4000d698: b0 10 20 00 clr %i0 do_callout = true; } } _ISR_Enable( level ); 4000d69c: 7f ff d1 b3 call 40001d68 4000d6a0: 90 10 00 11 mov %l1, %o0 return do_callout; } 4000d6a4: 81 c7 e0 08 ret 4000d6a8: 81 e8 00 00 restore 40006e70 <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 40006e70: 86 10 00 08 mov %o0, %g3 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 40006e74: 84 10 20 01 mov 1, %g2 #include int _POSIX_signals_Get_highest( sigset_t set ) { 40006e78: 90 10 20 1b mov 0x1b, %o0 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 40006e7c: 82 02 3f ff add %o0, -1, %g1 40006e80: 83 28 80 01 sll %g2, %g1, %g1 40006e84: 80 88 40 03 btst %g1, %g3 40006e88: 12 80 00 12 bne 40006ed0 <_POSIX_signals_Get_highest+0x60> 40006e8c: 01 00 00 00 nop sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 40006e90: 90 02 20 01 inc %o0 40006e94: 80 a2 20 20 cmp %o0, 0x20 40006e98: 12 bf ff fa bne 40006e80 <_POSIX_signals_Get_highest+0x10> 40006e9c: 82 02 3f ff add %o0, -1, %g1 40006ea0: 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 ) ) 40006ea4: 84 10 20 01 mov 1, %g2 40006ea8: 82 02 3f ff add %o0, -1, %g1 40006eac: 83 28 80 01 sll %g2, %g1, %g1 40006eb0: 80 88 40 03 btst %g1, %g3 40006eb4: 12 80 00 07 bne 40006ed0 <_POSIX_signals_Get_highest+0x60> 40006eb8: 01 00 00 00 nop return signo; } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 40006ebc: 90 02 20 01 inc %o0 40006ec0: 80 a2 20 1b cmp %o0, 0x1b 40006ec4: 12 bf ff fa bne 40006eac <_POSIX_signals_Get_highest+0x3c> 40006ec8: 82 02 3f ff add %o0, -1, %g1 40006ecc: 90 10 20 00 clr %o0 <== NOT EXECUTED if ( set & signo_to_mask( signo ) ) return signo; } return 0; } 40006ed0: 81 c3 e0 08 retl 40006ed4: 01 00 00 00 nop 4000ba60 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 4000ba60: 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 ]; 4000ba64: e0 06 21 60 ld [ %i0 + 0x160 ], %l0 if ( !api ) 4000ba68: 80 a4 20 00 cmp %l0, 0 4000ba6c: 02 80 00 33 be 4000bb38 <_POSIX_signals_Post_switch_extension+0xd8> 4000ba70: 03 10 00 69 sethi %hi(0x4001a400), %g1 * processed at all. No point in doing this loop otherwise. */ while (1) { restart: _ISR_Disable( level ); if ( !(~api->signals_blocked & 4000ba74: a2 10 60 fc or %g1, 0xfc, %l1 ! 4001a4fc <_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 ); 4000ba78: 7f ff d8 b8 call 40001d58 4000ba7c: 01 00 00 00 nop 4000ba80: b0 10 00 08 mov %o0, %i0 if ( !(~api->signals_blocked & 4000ba84: c2 04 40 00 ld [ %l1 ], %g1 4000ba88: c4 04 20 c8 ld [ %l0 + 0xc8 ], %g2 4000ba8c: c6 04 20 c4 ld [ %l0 + 0xc4 ], %g3 4000ba90: 82 10 40 02 or %g1, %g2, %g1 4000ba94: 80 a8 40 03 andncc %g1, %g3, %g0 4000ba98: 12 80 00 04 bne 4000baa8 <_POSIX_signals_Post_switch_extension+0x48> 4000ba9c: 01 00 00 00 nop (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 4000baa0: 7f ff d8 b2 call 40001d68 4000baa4: 81 e8 00 00 restore break; } _ISR_Enable( level ); 4000baa8: 7f ff d8 b0 call 40001d68 4000baac: b0 10 20 1b mov 0x1b, %i0 for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 4000bab0: 92 10 00 18 mov %i0, %o1 4000bab4: 94 10 20 00 clr %o2 4000bab8: 40 00 06 87 call 4000d4d4 <_POSIX_signals_Check_signal> 4000babc: 90 10 00 10 mov %l0, %o0 4000bac0: 80 8a 20 ff btst 0xff, %o0 4000bac4: 12 bf ff ed bne 4000ba78 <_POSIX_signals_Post_switch_extension+0x18> 4000bac8: 92 10 00 18 mov %i0, %o1 goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 4000bacc: 90 10 00 10 mov %l0, %o0 4000bad0: 94 10 20 01 mov 1, %o2 4000bad4: 40 00 06 80 call 4000d4d4 <_POSIX_signals_Check_signal> 4000bad8: b0 06 20 01 inc %i0 4000badc: 80 8a 20 ff btst 0xff, %o0 4000bae0: 12 bf ff e6 bne 4000ba78 <_POSIX_signals_Post_switch_extension+0x18> 4000bae4: 80 a6 20 20 cmp %i0, 0x20 _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4000bae8: 12 bf ff f3 bne 4000bab4 <_POSIX_signals_Post_switch_extension+0x54> 4000baec: 92 10 00 18 mov %i0, %o1 4000baf0: 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 ) ) 4000baf4: 92 10 00 18 mov %i0, %o1 4000baf8: 94 10 20 00 clr %o2 4000bafc: 40 00 06 76 call 4000d4d4 <_POSIX_signals_Check_signal> 4000bb00: 90 10 00 10 mov %l0, %o0 4000bb04: 80 8a 20 ff btst 0xff, %o0 4000bb08: 12 bf ff dc bne 4000ba78 <_POSIX_signals_Post_switch_extension+0x18> 4000bb0c: 92 10 00 18 mov %i0, %o1 goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 4000bb10: 90 10 00 10 mov %l0, %o0 4000bb14: 94 10 20 01 mov 1, %o2 4000bb18: 40 00 06 6f call 4000d4d4 <_POSIX_signals_Check_signal> 4000bb1c: b0 06 20 01 inc %i0 4000bb20: 80 8a 20 ff btst 0xff, %o0 4000bb24: 12 bf ff d5 bne 4000ba78 <_POSIX_signals_Post_switch_extension+0x18> 4000bb28: 80 a6 20 1b cmp %i0, 0x1b } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 4000bb2c: 12 bf ff f3 bne 4000baf8 <_POSIX_signals_Post_switch_extension+0x98> 4000bb30: 92 10 00 18 mov %i0, %o1 4000bb34: 30 bf ff d1 b,a 4000ba78 <_POSIX_signals_Post_switch_extension+0x18> <== NOT EXECUTED 4000bb38: 81 c7 e0 08 ret <== NOT EXECUTED 4000bb3c: 81 e8 00 00 restore <== NOT EXECUTED 400060c4 <_POSIX_signals_Ualarm_TSR>: void _POSIX_signals_Ualarm_TSR( Objects_Id id, void *argument ) { 400060c4: 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 ); 400060c8: 7f ff f4 6b call 40003274 400060cc: 33 10 00 58 sethi %hi(0x40016000), %i1 400060d0: 7f ff ff 1a call 40005d38 400060d4: 92 10 20 0e mov 0xe, %o1 RTEMS_INLINE_ROUTINE void _Watchdog_Reset( Watchdog_Control *the_watchdog ) { (void) _Watchdog_Remove( the_watchdog ); 400060d8: 40 00 0f 94 call 40009f28 <_Watchdog_Remove> 400060dc: 90 16 63 dc or %i1, 0x3dc, %o0 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400060e0: 31 10 00 59 sethi %hi(0x40016400), %i0 400060e4: b2 16 63 dc or %i1, 0x3dc, %i1 400060e8: 40 00 0f 36 call 40009dc0 <_Watchdog_Insert> 400060ec: 91 ee 22 20 restore %i0, 0x220, %o0 400060f0: 01 00 00 00 nop <== NOT EXECUTED 4002411c <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 4002411c: 9d e3 bf 98 save %sp, -104, %sp Heap_Get_information_status status; if ( !the_heap ) 40024120: 80 a6 20 00 cmp %i0, 0 40024124: 02 80 00 10 be 40024164 <_Protected_heap_Get_information+0x48> 40024128: 80 a6 60 00 cmp %i1, 0 return false; if ( !the_info ) 4002412c: 02 80 00 0e be 40024164 <_Protected_heap_Get_information+0x48> 40024130: 23 10 01 76 sethi %hi(0x4005d800), %l1 return false; _RTEMS_Lock_allocator(); 40024134: 7f ff 9b 42 call 4000ae3c <_API_Mutex_Lock> 40024138: d0 04 61 f8 ld [ %l1 + 0x1f8 ], %o0 ! 4005d9f8 <_RTEMS_Allocator_Mutex> status = _Heap_Get_information( the_heap, the_info ); 4002413c: 90 10 00 18 mov %i0, %o0 40024140: 40 00 28 7e call 4002e338 <_Heap_Get_information> 40024144: 92 10 00 19 mov %i1, %o1 40024148: a0 10 00 08 mov %o0, %l0 _RTEMS_Unlock_allocator(); 4002414c: 7f ff 9b 52 call 4000ae94 <_API_Mutex_Unlock> 40024150: d0 04 61 f8 ld [ %l1 + 0x1f8 ], %o0 if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 40024154: 80 a0 00 10 cmp %g0, %l0 40024158: 82 60 3f ff subx %g0, -1, %g1 4002415c: 81 c7 e0 08 ret 40024160: 91 e8 00 01 restore %g0, %g1, %o0 return true; return false; } 40024164: 81 c7 e0 08 ret <== NOT EXECUTED 40024168: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40007a14 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 40007a14: 9d e3 bf 90 save %sp, -112, %sp 40007a18: 11 10 00 7b sethi %hi(0x4001ec00), %o0 40007a1c: 92 10 00 18 mov %i0, %o1 40007a20: 90 12 20 14 or %o0, 0x14, %o0 40007a24: 40 00 07 c3 call 40009930 <_Objects_Get> 40007a28: 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 ) { 40007a2c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007a30: 80 a0 60 00 cmp %g1, 0 40007a34: 12 80 00 26 bne 40007acc <_Rate_monotonic_Timeout+0xb8> 40007a38: b0 10 00 08 mov %o0, %i0 case OBJECTS_LOCAL: the_thread = the_period->owner; 40007a3c: d0 02 20 50 ld [ %o0 + 0x50 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 40007a40: 03 00 00 10 sethi %hi(0x4000), %g1 40007a44: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 40007a48: 80 88 80 01 btst %g2, %g1 40007a4c: 22 80 00 0c be,a 40007a7c <_Rate_monotonic_Timeout+0x68> 40007a50: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 40007a54: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40007a58: c2 06 20 08 ld [ %i0 + 8 ], %g1 40007a5c: 80 a0 80 01 cmp %g2, %g1 40007a60: 32 80 00 07 bne,a 40007a7c <_Rate_monotonic_Timeout+0x68> 40007a64: 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 ); 40007a68: 13 04 00 ff sethi %hi(0x1003fc00), %o1 40007a6c: 40 00 09 09 call 40009e90 <_Thread_Clear_state> 40007a70: 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 ); 40007a74: 10 80 00 08 b 40007a94 <_Rate_monotonic_Timeout+0x80> 40007a78: 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 ) { 40007a7c: 80 a0 60 01 cmp %g1, 1 40007a80: 12 80 00 0e bne 40007ab8 <_Rate_monotonic_Timeout+0xa4> 40007a84: 82 10 20 04 mov 4, %g1 the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 40007a88: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 40007a8c: 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; 40007a90: c2 26 20 38 st %g1, [ %i0 + 0x38 ] <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 40007a94: 7f ff fe 4a call 400073bc <_Rate_monotonic_Initiate_statistics> 40007a98: 01 00 00 00 nop Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40007a9c: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007aa0: 92 06 20 10 add %i0, 0x10, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40007aa4: c2 26 20 1c st %g1, [ %i0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007aa8: 11 10 00 7b sethi %hi(0x4001ec00), %o0 40007aac: 40 00 0f 30 call 4000b76c <_Watchdog_Insert> 40007ab0: 90 12 22 70 or %o0, 0x270, %o0 ! 4001ee70 <_Watchdog_Ticks_chain> 40007ab4: 30 80 00 02 b,a 40007abc <_Rate_monotonic_Timeout+0xa8> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 40007ab8: 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; 40007abc: 05 10 00 7b sethi %hi(0x4001ec00), %g2 40007ac0: c2 00 a1 90 ld [ %g2 + 0x190 ], %g1 ! 4001ed90 <_Thread_Dispatch_disable_level> 40007ac4: 82 00 7f ff add %g1, -1, %g1 40007ac8: c2 20 a1 90 st %g1, [ %g2 + 0x190 ] 40007acc: 81 c7 e0 08 ret 40007ad0: 81 e8 00 00 restore 40008328 <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 40008328: 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 ); 4000832c: 11 10 00 67 sethi %hi(0x40019c00), %o0 40008330: 7f ff fc e9 call 400076d4 <_Objects_Allocate> 40008334: 90 12 22 c0 or %o0, 0x2c0, %o0 ! 40019ec0 <_Thread_Internal_information> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008338: 05 10 00 67 sethi %hi(0x40019c00), %g2 4000833c: c2 00 a1 60 ld [ %g2 + 0x160 ], %g1 ! 40019d60 <_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(); 40008340: 07 10 00 67 sethi %hi(0x40019c00), %g3 40008344: 82 00 60 01 inc %g1 40008348: d0 20 e3 0c st %o0, [ %g3 + 0x30c ] 4000834c: c2 20 a1 60 st %g1, [ %g2 + 0x160 ] * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 40008350: 03 10 00 67 sethi %hi(0x40019c00), %g1 40008354: c2 00 61 f8 ld [ %g1 + 0x1f8 ], %g1 ! 40019df8 <_Configuration_Table> 40008358: d2 00 e3 0c ld [ %g3 + 0x30c ], %o1 4000835c: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 40008360: 03 10 00 63 sethi %hi(0x40018c00), %g1 40008364: d6 00 62 c0 ld [ %g1 + 0x2c0 ], %o3 ! 40018ec0 40008368: 03 10 00 60 sethi %hi(0x40018000), %g1 4000836c: 82 10 61 70 or %g1, 0x170, %g1 ! 40018170 40008370: 80 a2 c0 02 cmp %o3, %g2 40008374: 1a 80 00 03 bcc 40008380 <_Thread_Create_idle+0x58> 40008378: c2 27 bf f4 st %g1, [ %fp + -12 ] 4000837c: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 40008380: 03 10 00 63 sethi %hi(0x40018c00), %g1 40008384: da 08 62 c4 ldub [ %g1 + 0x2c4 ], %o5 ! 40018ec4 40008388: 82 10 20 01 mov 1, %g1 4000838c: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 40008390: 82 07 bf f4 add %fp, -12, %g1 40008394: c0 23 a0 60 clr [ %sp + 0x60 ] 40008398: c0 23 a0 64 clr [ %sp + 0x64 ] 4000839c: c0 23 a0 68 clr [ %sp + 0x68 ] 400083a0: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 400083a4: 94 10 20 00 clr %o2 400083a8: 98 10 20 00 clr %o4 400083ac: 11 10 00 67 sethi %hi(0x40019c00), %o0 400083b0: 40 00 00 af call 4000866c <_Thread_Initialize> 400083b4: 90 12 22 c0 or %o0, 0x2c0, %o0 ! 40019ec0 <_Thread_Internal_information> * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; _Thread_Start( 400083b8: 03 10 00 67 sethi %hi(0x40019c00), %g1 400083bc: c2 00 61 f8 ld [ %g1 + 0x1f8 ], %g1 ! 40019df8 <_Configuration_Table> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 400083c0: 07 10 00 67 sethi %hi(0x40019c00), %g3 400083c4: f4 00 60 14 ld [ %g1 + 0x14 ], %i2 400083c8: c2 00 e1 60 ld [ %g3 + 0x160 ], %g1 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 400083cc: 05 10 00 67 sethi %hi(0x40019c00), %g2 400083d0: 82 00 7f ff add %g1, -1, %g1 400083d4: c4 00 a3 0c ld [ %g2 + 0x30c ], %g2 400083d8: c2 20 e1 60 st %g1, [ %g3 + 0x160 ] 400083dc: 03 10 00 67 sethi %hi(0x40019c00), %g1 400083e0: c4 20 62 20 st %g2, [ %g1 + 0x220 ] ! 40019e20 <_Thread_Executing> 400083e4: 03 10 00 67 sethi %hi(0x40019c00), %g1 _Thread_Executing = _Thread_Idle; _Thread_Start( 400083e8: 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 = 400083ec: c4 20 61 ec st %g2, [ %g1 + 0x1ec ] _Thread_Executing = _Thread_Idle; _Thread_Start( 400083f0: b2 10 20 00 clr %i1 400083f4: b6 10 20 00 clr %i3 400083f8: 40 00 03 81 call 400091fc <_Thread_Start> 400083fc: 99 e8 20 00 restore %g0, 0, %o4 40008400: 01 00 00 00 nop 4000da48 <_Thread_Evaluate_mode>: bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing; 4000da48: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000da4c: c4 00 62 20 ld [ %g1 + 0x220 ], %g2 ! 40019e20 <_Thread_Executing> if ( !_States_Is_ready( executing->current_state ) || 4000da50: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4000da54: 80 a0 60 00 cmp %g1, 0 4000da58: 32 80 00 0b bne,a 4000da84 <_Thread_Evaluate_mode+0x3c> 4000da5c: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED 4000da60: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000da64: c2 00 61 ec ld [ %g1 + 0x1ec ], %g1 ! 40019dec <_Thread_Heir> 4000da68: 80 a0 80 01 cmp %g2, %g1 4000da6c: 02 80 00 0b be 4000da98 <_Thread_Evaluate_mode+0x50> 4000da70: 01 00 00 00 nop 4000da74: c2 08 a0 76 ldub [ %g2 + 0x76 ], %g1 4000da78: 80 a0 60 00 cmp %g1, 0 4000da7c: 02 80 00 07 be 4000da98 <_Thread_Evaluate_mode+0x50> 4000da80: 84 10 20 01 mov 1, %g2 ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { _Context_Switch_necessary = TRUE; 4000da84: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000da88: 90 10 20 01 mov 1, %o0 4000da8c: c4 28 62 30 stb %g2, [ %g1 + 0x230 ] 4000da90: 81 c3 e0 08 retl 4000da94: 01 00 00 00 nop return TRUE; } return FALSE; } 4000da98: 81 c3 e0 08 retl 4000da9c: 90 10 20 00 clr %o0 ! 0 400085bc <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 400085bc: 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 ) ) { 400085c0: 80 a2 20 00 cmp %o0, 0 400085c4: 12 80 00 0a bne 400085ec <_Thread_Get+0x30> 400085c8: 94 10 00 09 mov %o1, %o2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400085cc: 03 10 00 67 sethi %hi(0x40019c00), %g1 400085d0: c4 00 61 60 ld [ %g1 + 0x160 ], %g2 ! 40019d60 <_Thread_Dispatch_disable_level> 400085d4: 84 00 a0 01 inc %g2 400085d8: c4 20 61 60 st %g2, [ %g1 + 0x160 ] _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 400085dc: 03 10 00 67 sethi %hi(0x40019c00), %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; 400085e0: c0 22 40 00 clr [ %o1 ] tp = _Thread_Executing; 400085e4: 81 c3 e0 08 retl 400085e8: d0 00 62 20 ld [ %g1 + 0x220 ], %o0 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 400085ec: 83 32 20 18 srl %o0, 0x18, %g1 400085f0: 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 ) 400085f4: 82 00 bf ff add %g2, -1, %g1 400085f8: 80 a0 60 03 cmp %g1, 3 400085fc: 08 80 00 16 bleu 40008654 <_Thread_Get+0x98> 40008600: 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; 40008604: 82 10 20 01 mov 1, %g1 40008608: 10 80 00 09 b 4000862c <_Thread_Get+0x70> 4000860c: c2 22 80 00 st %g1, [ %o2 ] goto done; } api_information = _Objects_Information_table[ the_api ]; 40008610: 03 10 00 67 sethi %hi(0x40019c00), %g1 40008614: 82 10 60 c0 or %g1, 0xc0, %g1 ! 40019cc0 <_Objects_Information_table> 40008618: c2 00 40 02 ld [ %g1 + %g2 ], %g1 if ( !api_information ) { 4000861c: 80 a0 60 00 cmp %g1, 0 40008620: 32 80 00 05 bne,a 40008634 <_Thread_Get+0x78> 40008624: d0 00 60 04 ld [ %g1 + 4 ], %o0 *location = OBJECTS_ERROR; 40008628: c6 22 80 00 st %g3, [ %o2 ] 4000862c: 81 c3 e0 08 retl 40008630: 90 10 20 00 clr %o0 goto done; } information = api_information[ the_class ]; if ( !information ) { 40008634: 80 a2 20 00 cmp %o0, 0 40008638: 12 80 00 04 bne 40008648 <_Thread_Get+0x8c> 4000863c: 92 10 00 04 mov %g4, %o1 *location = OBJECTS_ERROR; 40008640: 81 c3 e0 08 retl <== NOT EXECUTED 40008644: c6 22 80 00 st %g3, [ %o2 ] <== NOT EXECUTED goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40008648: 82 13 c0 00 mov %o7, %g1 4000864c: 7f ff fd 7c call 40007c3c <_Objects_Get> 40008650: 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 :) */ 40008654: 80 a0 e0 01 cmp %g3, 1 40008658: 22 bf ff ee be,a 40008610 <_Thread_Get+0x54> 4000865c: 85 28 a0 02 sll %g2, 2, %g2 *location = OBJECTS_ERROR; 40008660: 10 bf ff ea b 40008608 <_Thread_Get+0x4c> 40008664: 82 10 20 01 mov 1, %g1 4000daa0 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4000daa0: 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; 4000daa4: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000daa8: e2 00 62 20 ld [ %g1 + 0x220 ], %l1 ! 40019e20 <_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(); 4000daac: 3f 10 00 36 sethi %hi(0x4000d800), %i7 4000dab0: be 17 e2 a0 or %i7, 0x2a0, %i7 ! 4000daa0 <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 4000dab4: d0 04 60 b8 ld [ %l1 + 0xb8 ], %o0 _ISR_Set_level(level); 4000dab8: 7f ff d0 ac call 40001d68 4000dabc: 91 2a 20 08 sll %o0, 8, %o0 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 4000dac0: 05 10 00 66 sethi %hi(0x40019800), %g2 doneConstructors = 1; 4000dac4: 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; 4000dac8: e0 08 a2 20 ldub [ %g2 + 0x220 ], %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 ); 4000dacc: 90 10 00 11 mov %l1, %o0 4000dad0: 7f ff ee 84 call 400094e0 <_User_extensions_Thread_begin> 4000dad4: c2 28 a2 20 stb %g1, [ %g2 + 0x220 ] /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4000dad8: 7f ff ea ac call 40008588 <_Thread_Enable_dispatch> 4000dadc: 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) */ 4000dae0: 80 a4 20 00 cmp %l0, 0 4000dae4: 32 80 00 05 bne,a 4000daf8 <_Thread_Handler+0x58> 4000dae8: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 { _init (); 4000daec: 40 00 2c bb call 40018dd8 <_init> 4000daf0: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 4000daf4: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 4000daf8: 80 a0 60 01 cmp %g1, 1 4000dafc: 22 80 00 0d be,a 4000db30 <_Thread_Handler+0x90> 4000db00: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 4000db04: 2a 80 00 09 bcs,a 4000db28 <_Thread_Handler+0x88> 4000db08: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 4000db0c: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000db10: 02 80 00 0d be 4000db44 <_Thread_Handler+0xa4> <== NOT EXECUTED 4000db14: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 4000db18: 12 80 00 14 bne 4000db68 <_Thread_Handler+0xc8> <== NOT EXECUTED 4000db1c: 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 = 4000db20: 10 80 00 0d b 4000db54 <_Thread_Handler+0xb4> <== NOT EXECUTED 4000db24: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 <== NOT EXECUTED __main (); #endif switch ( executing->Start.prototype ) { case THREAD_START_NUMERIC: executing->Wait.return_argument = 4000db28: 10 80 00 03 b 4000db34 <_Thread_Handler+0x94> 4000db2c: 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 = 4000db30: d0 04 60 a4 ld [ %l1 + 0xa4 ], %o0 4000db34: 9f c0 40 00 call %g1 4000db38: 01 00 00 00 nop executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = 4000db3c: 10 80 00 0b b 4000db68 <_Thread_Handler+0xc8> 4000db40: 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 = 4000db44: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 <== NOT EXECUTED 4000db48: d0 04 60 a4 ld [ %l1 + 0xa4 ], %o0 <== NOT EXECUTED 4000db4c: 10 80 00 04 b 4000db5c <_Thread_Handler+0xbc> <== NOT EXECUTED 4000db50: 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 = 4000db54: d0 04 60 a8 ld [ %l1 + 0xa8 ], %o0 <== NOT EXECUTED 4000db58: d2 04 60 a4 ld [ %l1 + 0xa4 ], %o1 <== NOT EXECUTED 4000db5c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000db60: 01 00 00 00 nop <== NOT EXECUTED 4000db64: 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 ); 4000db68: 7f ff ee 6f call 40009524 <_User_extensions_Thread_exitted> 4000db6c: 90 10 00 11 mov %l1, %o0 _Internal_error_Occurred( 4000db70: 90 10 20 00 clr %o0 4000db74: 92 10 20 01 mov 1, %o1 4000db78: 7f ff e6 a8 call 40007618 <_Internal_error_Occurred> 4000db7c: 94 10 20 06 mov 6, %o2 4000db80: 01 00 00 00 nop 4000866c <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 4000866c: 9d e3 bf 98 save %sp, -104, %sp 40008670: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 40008674: 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 ) { 40008678: e4 00 40 00 ld [ %g1 ], %l2 4000867c: e2 07 a0 60 ld [ %fp + 0x60 ], %l1 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 40008680: 12 80 00 0e bne 400086b8 <_Thread_Initialize+0x4c> 40008684: e0 0f a0 5f ldub [ %fp + 0x5f ], %l0 actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 40008688: 90 10 00 19 mov %i1, %o0 4000868c: 40 00 02 a3 call 40009118 <_Thread_Stack_Allocate> 40008690: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 40008694: 80 a2 20 00 cmp %o0, 0 40008698: 02 80 00 1e be 40008710 <_Thread_Initialize+0xa4> 4000869c: 80 a2 00 1b cmp %o0, %i3 400086a0: 0a 80 00 1c bcs 40008710 <_Thread_Initialize+0xa4> 400086a4: 01 00 00 00 nop return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; 400086a8: 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; 400086ac: f4 06 60 cc ld [ %i1 + 0xcc ], %i2 the_thread->Start.core_allocated_stack = TRUE; 400086b0: 10 80 00 04 b 400086c0 <_Thread_Initialize+0x54> 400086b4: c2 2e 60 c0 stb %g1, [ %i1 + 0xc0 ] } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = FALSE; 400086b8: c0 2e 60 c0 clrb [ %i1 + 0xc0 ] <== NOT EXECUTED 400086bc: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 400086c0: 03 10 00 67 sethi %hi(0x40019c00), %g1 400086c4: c2 00 62 00 ld [ %g1 + 0x200 ], %g1 ! 40019e00 <_Thread_Maximum_extensions> Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 400086c8: f4 26 60 c8 st %i2, [ %i1 + 0xc8 ] the_stack->size = size; 400086cc: d0 26 60 c4 st %o0, [ %i1 + 0xc4 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400086d0: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 400086d4: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 400086d8: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 400086dc: c0 26 60 6c clr [ %i1 + 0x6c ] /* * Clear the libc reent hook. */ the_thread->libc_reent = NULL; 400086e0: c0 26 61 58 clr [ %i1 + 0x158 ] /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 400086e4: 80 a0 60 00 cmp %g1, 0 400086e8: 02 80 00 0c be 40008718 <_Thread_Initialize+0xac> 400086ec: b6 10 20 00 clr %i3 extensions_area = _Workspace_Allocate( 400086f0: 90 00 60 01 add %g1, 1, %o0 400086f4: 40 00 04 b3 call 400099c0 <_Workspace_Allocate> 400086f8: 91 2a 20 02 sll %o0, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 400086fc: b6 92 20 00 orcc %o0, 0, %i3 40008700: 12 80 00 07 bne 4000871c <_Thread_Initialize+0xb0> 40008704: 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 ); 40008708: 40 00 02 9c call 40009178 <_Thread_Stack_Free> <== NOT EXECUTED 4000870c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40008710: 81 c7 e0 08 ret 40008714: 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 ) { 40008718: 80 a6 e0 00 cmp %i3, 0 4000871c: 02 80 00 0d be 40008750 <_Thread_Initialize+0xe4> 40008720: f6 26 61 68 st %i3, [ %i1 + 0x168 ] uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 40008724: 03 10 00 67 sethi %hi(0x40019c00), %g1 40008728: c2 00 62 00 ld [ %g1 + 0x200 ], %g1 ! 40019e00 <_Thread_Maximum_extensions> 4000872c: 86 10 20 00 clr %g3 40008730: 10 80 00 05 b 40008744 <_Thread_Initialize+0xd8> 40008734: 88 00 60 01 add %g1, 1, %g4 the_thread->extensions[i] = NULL; 40008738: 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++ ) 4000873c: 86 00 e0 01 inc %g3 the_thread->extensions[i] = NULL; 40008740: c0 20 80 01 clr [ %g2 + %g1 ] * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 40008744: 80 a0 c0 04 cmp %g3, %g4 40008748: 2a bf ff fc bcs,a 40008738 <_Thread_Initialize+0xcc> 4000874c: 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; 40008750: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 40008754: e0 2e 60 ac stb %l0, [ %i1 + 0xac ] the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 40008758: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ] switch ( budget_algorithm ) { 4000875c: 80 a4 60 02 cmp %l1, 2 40008760: 12 80 00 05 bne 40008774 <_Thread_Initialize+0x108> 40008764: 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; 40008768: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 4000876c: c2 00 60 b8 ld [ %g1 + 0xb8 ], %g1 ! 40019cb8 <_Thread_Ticks_per_timeslice> <== NOT EXECUTED 40008770: 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; 40008774: 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 ); 40008778: 92 10 00 1d mov %i5, %o1 break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 4000877c: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ] the_thread->current_state = STATES_DORMANT; 40008780: 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 ); 40008784: 90 10 00 19 mov %i1, %o0 break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 40008788: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_thread->Wait.queue = NULL; 4000878c: c0 26 60 44 clr [ %i1 + 0x44 ] the_thread->resource_count = 0; 40008790: c0 26 60 1c clr [ %i1 + 0x1c ] the_thread->suspend_count = 0; 40008794: c0 26 60 70 clr [ %i1 + 0x70 ] the_thread->real_priority = priority; 40008798: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 4000879c: 40 00 01 be call 40008e94 <_Thread_Set_priority> 400087a0: fa 26 60 bc st %i5, [ %i1 + 0xbc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 400087a4: c4 06 60 08 ld [ %i1 + 8 ], %g2 400087a8: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 400087ac: 03 00 00 3f sethi %hi(0xfc00), %g1 400087b0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400087b4: 84 08 80 01 and %g2, %g1, %g2 400087b8: 85 28 a0 02 sll %g2, 2, %g2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 400087bc: 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; 400087c0: c0 26 60 84 clr [ %i1 + 0x84 ] the_thread->cpu_time_used.tv_nsec = 0; 400087c4: c0 26 60 88 clr [ %i1 + 0x88 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 400087c8: 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 ); 400087cc: 90 10 00 19 mov %i1, %o0 400087d0: 40 00 03 79 call 400095b4 <_User_extensions_Thread_create> 400087d4: b0 10 20 01 mov 1, %i0 if ( !extension_status ) { 400087d8: 80 8a 20 ff btst 0xff, %o0 400087dc: 12 80 00 09 bne 40008800 <_Thread_Initialize+0x194> 400087e0: 80 a6 e0 00 cmp %i3, 0 if ( extensions_area ) 400087e4: 02 80 00 05 be 400087f8 <_Thread_Initialize+0x18c> <== NOT EXECUTED 400087e8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED (void) _Workspace_Free( extensions_area ); 400087ec: 40 00 04 6e call 400099a4 <_Workspace_Free> <== NOT EXECUTED 400087f0: 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 ); 400087f4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 400087f8: 40 00 02 60 call 40009178 <_Thread_Stack_Free> <== NOT EXECUTED 400087fc: b0 10 20 00 clr %i0 <== NOT EXECUTED return FALSE; } return TRUE; } 40008800: 81 c7 e0 08 ret 40008804: 81 e8 00 00 restore 4000da58 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4000da58: 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; 4000da5c: 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; 4000da60: c2 0e 20 ac ldub [ %i0 + 0xac ], %g1 the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 4000da64: 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; 4000da68: 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; 4000da6c: c6 26 20 80 st %g3, [ %i0 + 0x80 ] the_thread->Start.pointer_argument = pointer_argument; 4000da70: f2 26 20 a4 st %i1, [ %i0 + 0xa4 ] the_thread->Start.numeric_argument = numeric_argument; 4000da74: 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; 4000da78: c0 26 20 1c clr [ %i0 + 0x1c ] the_thread->suspend_count = 0; 4000da7c: 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 ) ) { 4000da80: 7f ff ef 99 call 400098e4 <_Thread_queue_Extract_with_proxy> 4000da84: 90 10 00 18 mov %i0, %o0 4000da88: 80 8a 20 ff btst 0xff, %o0 4000da8c: 32 80 00 09 bne,a 4000dab0 <_Thread_Reset+0x58> 4000da90: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4000da94: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000da98: 80 a0 60 02 cmp %g1, 2 4000da9c: 32 80 00 05 bne,a 4000dab0 <_Thread_Reset+0x58> 4000daa0: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 (void) _Watchdog_Remove( &the_thread->Timer ); 4000daa4: 7f ff f2 8e call 4000a4dc <_Watchdog_Remove> <== NOT EXECUTED 4000daa8: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4000daac: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 <== NOT EXECUTED 4000dab0: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 4000dab4: 80 a0 40 19 cmp %g1, %i1 4000dab8: 02 80 00 05 be 4000dacc <_Thread_Reset+0x74> 4000dabc: 01 00 00 00 nop the_thread->real_priority = the_thread->Start.initial_priority; 4000dac0: f2 26 20 18 st %i1, [ %i0 + 0x18 ] _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4000dac4: 7f ff f0 03 call 40009ad0 <_Thread_Set_priority> 4000dac8: 81 e8 00 00 restore 4000dacc: 81 c7 e0 08 ret 4000dad0: 81 e8 00 00 restore 4000cd3c <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4000cd3c: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4000cd40: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000cd44: e0 00 62 20 ld [ %g1 + 0x220 ], %l0 ! 40019e20 <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 4000cd48: 7f ff d4 04 call 40001d58 4000cd4c: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 4000cd50: b0 10 00 08 mov %o0, %i0 if ( _Chain_Has_only_one_node( ready ) ) { 4000cd54: c4 04 40 00 ld [ %l1 ], %g2 4000cd58: c2 04 60 08 ld [ %l1 + 8 ], %g1 4000cd5c: 80 a0 80 01 cmp %g2, %g1 4000cd60: 32 80 00 03 bne,a 4000cd6c <_Thread_Reset_timeslice+0x30> 4000cd64: c6 04 00 00 ld [ %l0 ], %g3 _ISR_Enable( level ); 4000cd68: 30 80 00 18 b,a 4000cdc8 <_Thread_Reset_timeslice+0x8c> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4000cd6c: c4 04 20 04 ld [ %l0 + 4 ], %g2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000cd70: 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; 4000cd74: c6 20 80 00 st %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000cd78: c2 24 00 00 st %g1, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000cd7c: 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; 4000cd80: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 4000cd84: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000cd88: 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; 4000cd8c: e0 20 40 00 st %l0, [ %g1 ] return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4000cd90: 7f ff d3 f6 call 40001d68 4000cd94: 01 00 00 00 nop 4000cd98: 7f ff d3 f0 call 40001d58 4000cd9c: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 4000cda0: 05 10 00 67 sethi %hi(0x40019c00), %g2 4000cda4: c2 00 a1 ec ld [ %g2 + 0x1ec ], %g1 ! 40019dec <_Thread_Heir> 4000cda8: 80 a4 00 01 cmp %l0, %g1 4000cdac: 32 80 00 05 bne,a 4000cdc0 <_Thread_Reset_timeslice+0x84> 4000cdb0: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED _Thread_Heir = (Thread_Control *) ready->first; 4000cdb4: c2 04 40 00 ld [ %l1 ], %g1 4000cdb8: c2 20 a1 ec st %g1, [ %g2 + 0x1ec ] _Context_Switch_necessary = TRUE; 4000cdbc: 84 10 20 01 mov 1, %g2 4000cdc0: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000cdc4: c4 28 62 30 stb %g2, [ %g1 + 0x230 ] ! 40019e30 <_Context_Switch_necessary> _ISR_Enable( level ); 4000cdc8: 7f ff d3 e8 call 40001d68 4000cdcc: 81 e8 00 00 restore 4000cdd0: 01 00 00 00 nop 4000a844 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 4000a844: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4000a848: 7f ff e0 b7 call 40002b24 4000a84c: 01 00 00 00 nop 4000a850: a0 10 00 08 mov %o0, %l0 if ( force == TRUE ) 4000a854: 80 8e 60 ff btst 0xff, %i1 4000a858: 22 80 00 04 be,a 4000a868 <_Thread_Resume+0x24> 4000a85c: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 <== NOT EXECUTED the_thread->suspend_count = 0; 4000a860: 10 80 00 04 b 4000a870 <_Thread_Resume+0x2c> 4000a864: c0 26 20 70 clr [ %i0 + 0x70 ] else the_thread->suspend_count--; 4000a868: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000a86c: c2 26 20 70 st %g1, [ %i0 + 0x70 ] <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 4000a870: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 4000a874: 80 a0 60 00 cmp %g1, 0 4000a878: 22 80 00 03 be,a 4000a884 <_Thread_Resume+0x40> 4000a87c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 _ISR_Enable( level ); 4000a880: 30 80 00 2e b,a 4000a938 <_Thread_Resume+0xf4> <== NOT EXECUTED return; } current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { 4000a884: 80 88 60 02 btst 2, %g1 4000a888: 02 80 00 2c be 4000a938 <_Thread_Resume+0xf4> 4000a88c: 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 ) ) { 4000a890: 80 a0 60 00 cmp %g1, 0 4000a894: 12 80 00 29 bne 4000a938 <_Thread_Resume+0xf4> 4000a898: 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; 4000a89c: c8 06 20 90 ld [ %i0 + 0x90 ], %g4 4000a8a0: c4 16 20 96 lduh [ %i0 + 0x96 ], %g2 4000a8a4: 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); 4000a8a8: c6 06 20 8c ld [ %i0 + 0x8c ], %g3 4000a8ac: 82 10 40 02 or %g1, %g2, %g1 4000a8b0: c2 31 00 00 sth %g1, [ %g4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000a8b4: 82 00 e0 04 add %g3, 4, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 4000a8b8: 1b 10 00 9a sethi %hi(0x40026800), %o5 4000a8bc: c2 26 00 00 st %g1, [ %i0 ] 4000a8c0: c4 16 20 94 lduh [ %i0 + 0x94 ], %g2 old_last_node = the_chain->last; 4000a8c4: c2 00 e0 08 ld [ %g3 + 8 ], %g1 4000a8c8: c8 13 60 44 lduh [ %o5 + 0x44 ], %g4 the_chain->last = the_node; 4000a8cc: f0 20 e0 08 st %i0, [ %g3 + 8 ] 4000a8d0: 84 10 80 04 or %g2, %g4, %g2 old_last_node->next = the_node; the_node->previous = old_last_node; 4000a8d4: c2 26 20 04 st %g1, [ %i0 + 4 ] 4000a8d8: c4 33 60 44 sth %g2, [ %o5 + 0x44 ] 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; 4000a8dc: f0 20 40 00 st %i0, [ %g1 ] _ISR_Flash( level ); 4000a8e0: 7f ff e0 95 call 40002b34 4000a8e4: 90 10 00 10 mov %l0, %o0 4000a8e8: 7f ff e0 8f call 40002b24 4000a8ec: 01 00 00 00 nop if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 4000a8f0: 07 10 00 9a sethi %hi(0x40026800), %g3 4000a8f4: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 ! 4002681c <_Thread_Heir> 4000a8f8: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 4000a8fc: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4000a900: 80 a0 80 01 cmp %g2, %g1 4000a904: 1a 80 00 0d bcc 4000a938 <_Thread_Resume+0xf4> 4000a908: 03 10 00 9a sethi %hi(0x40026800), %g1 _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4000a90c: c2 00 60 50 ld [ %g1 + 0x50 ], %g1 ! 40026850 <_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; 4000a910: f0 20 e0 1c st %i0, [ %g3 + 0x1c ] if ( _Thread_Executing->is_preemptible || 4000a914: c2 08 60 76 ldub [ %g1 + 0x76 ], %g1 4000a918: 80 a0 60 00 cmp %g1, 0 4000a91c: 32 80 00 05 bne,a 4000a930 <_Thread_Resume+0xec> 4000a920: 84 10 20 01 mov 1, %g2 4000a924: 80 a0 a0 00 cmp %g2, 0 4000a928: 12 80 00 04 bne 4000a938 <_Thread_Resume+0xf4> 4000a92c: 84 10 20 01 mov 1, %g2 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 4000a930: 03 10 00 9a sethi %hi(0x40026800), %g1 4000a934: c4 28 60 60 stb %g2, [ %g1 + 0x60 ] ! 40026860 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 4000a938: 7f ff e0 7f call 40002b34 4000a93c: 91 e8 00 10 restore %g0, %l0, %o0 4000a940: 01 00 00 00 nop 40009118 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 40009118: 9d e3 bf 98 save %sp, -104, %sp 4000911c: 03 10 00 63 sethi %hi(0x40018c00), %g1 40009120: c2 00 62 c0 ld [ %g1 + 0x2c0 ], %g1 ! 40018ec0 40009124: 80 a6 40 01 cmp %i1, %g1 40009128: 2a 80 00 02 bcs,a 40009130 <_Thread_Stack_Allocate+0x18> 4000912c: 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 ) { 40009130: 03 10 00 67 sethi %hi(0x40019c00), %g1 40009134: c2 00 61 f8 ld [ %g1 + 0x1f8 ], %g1 ! 40019df8 <_Configuration_Table> 40009138: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 4000913c: 80 a0 60 00 cmp %g1, 0 40009140: 22 80 00 06 be,a 40009158 <_Thread_Stack_Allocate+0x40> 40009144: b2 06 60 10 add %i1, 0x10, %i1 stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); 40009148: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000914c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 40009150: 10 80 00 05 b 40009164 <_Thread_Stack_Allocate+0x4c> <== NOT EXECUTED 40009154: 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 ); 40009158: 40 00 02 1a call 400099c0 <_Workspace_Allocate> 4000915c: 90 10 00 19 mov %i1, %o0 } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 40009160: 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 ) 40009164: 80 a0 00 08 cmp %g0, %o0 40009168: b0 60 20 00 subx %g0, 0, %i0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 4000916c: b0 0e 40 18 and %i1, %i0, %i0 40009170: 81 c7 e0 08 ret 40009174: 81 e8 00 00 restore 40009178 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 40009178: 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 ) 4000917c: c2 0e 20 c0 ldub [ %i0 + 0xc0 ], %g1 40009180: 80 a0 60 00 cmp %g1, 0 40009184: 02 80 00 09 be 400091a8 <_Thread_Stack_Free+0x30> 40009188: 03 10 00 67 sethi %hi(0x40019c00), %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 ) 4000918c: c2 00 61 f8 ld [ %g1 + 0x1f8 ], %g1 ! 40019df8 <_Configuration_Table> 40009190: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 40009194: 80 a0 60 00 cmp %g1, 0 40009198: 02 80 00 06 be 400091b0 <_Thread_Stack_Free+0x38> 4000919c: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 (*_Configuration_Table->stack_free_hook)( 400091a0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400091a4: 01 00 00 00 nop <== NOT EXECUTED 400091a8: 81 c7 e0 08 ret <== NOT EXECUTED 400091ac: 81 e8 00 00 restore <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 400091b0: 40 00 01 fd call 400099a4 <_Workspace_Free> 400091b4: 91 e8 00 08 restore %g0, %o0, %o0 400091b8: 01 00 00 00 nop 40008b1c <_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 ) { 40008b1c: 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; 40008b20: 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); 40008b24: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; 40008b28: 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); 40008b2c: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40008b30: 82 06 60 38 add %i1, 0x38, %g1 40008b34: 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 ) ) 40008b38: 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); 40008b3c: 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; 40008b40: 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 ]; 40008b44: 85 28 60 04 sll %g1, 4, %g2 40008b48: 83 28 60 02 sll %g1, 2, %g1 40008b4c: 84 20 80 01 sub %g2, %g1, %g2 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 40008b50: 12 80 00 31 bne 40008c14 <_Thread_queue_Enqueue_priority+0xf8> 40008b54: 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; 40008b58: 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; 40008b5c: 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 ); 40008b60: 7f ff e4 7e call 40001d58 40008b64: 01 00 00 00 nop 40008b68: a6 10 00 08 mov %o0, %l3 search_thread = (Thread_Control *) header->first; 40008b6c: a2 10 3f ff mov -1, %l1 40008b70: 10 80 00 18 b 40008bd0 <_Thread_queue_Enqueue_priority+0xb4> 40008b74: 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 ) 40008b78: 80 a4 80 11 cmp %l2, %l1 40008b7c: 28 80 00 19 bleu,a 40008be0 <_Thread_queue_Enqueue_priority+0xc4> 40008b80: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.next; 40008b84: e0 04 00 00 ld [ %l0 ], %l0 if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) ) 40008b88: 80 a4 00 14 cmp %l0, %l4 40008b8c: 22 80 00 15 be,a 40008be0 <_Thread_queue_Enqueue_priority+0xc4> 40008b90: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; 40008b94: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 40008b98: 80 a4 80 11 cmp %l2, %l1 40008b9c: 28 80 00 11 bleu,a 40008be0 <_Thread_queue_Enqueue_priority+0xc4> 40008ba0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; #endif _ISR_Flash( level ); 40008ba4: 7f ff e4 71 call 40001d68 40008ba8: 90 10 00 13 mov %l3, %o0 40008bac: 7f ff e4 6b call 40001d58 40008bb0: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 40008bb4: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40008bb8: 80 8d 80 01 btst %l6, %g1 40008bbc: 32 80 00 05 bne,a 40008bd0 <_Thread_queue_Enqueue_priority+0xb4> 40008bc0: e0 04 00 00 ld [ %l0 ], %l0 _ISR_Enable( level ); 40008bc4: 7f ff e4 69 call 40001d68 <== NOT EXECUTED 40008bc8: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40008bcc: 30 bf ff e5 b,a 40008b60 <_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 ) ) { 40008bd0: 80 a4 00 14 cmp %l0, %l4 40008bd4: 32 bf ff e9 bne,a 40008b78 <_Thread_queue_Enqueue_priority+0x5c> 40008bd8: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 40008bdc: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40008be0: 80 a0 60 01 cmp %g1, 1 40008be4: 12 80 00 48 bne 40008d04 <_Thread_queue_Enqueue_priority+0x1e8> 40008be8: 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 ) 40008bec: 80 a4 80 11 cmp %l2, %l1 40008bf0: 02 80 00 3a be 40008cd8 <_Thread_queue_Enqueue_priority+0x1bc> 40008bf4: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 40008bf8: c2 04 20 04 ld [ %l0 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40008bfc: e0 26 40 00 st %l0, [ %i1 ] the_node->previous = previous_node; 40008c00: 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; 40008c04: 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; 40008c08: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 40008c0c: f2 24 20 04 st %i1, [ %l0 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40008c10: 30 80 00 39 b,a 40008cf4 <_Thread_queue_Enqueue_priority+0x1d8> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 40008c14: 03 10 00 63 sethi %hi(0x40018c00), %g1 _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 40008c18: 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; 40008c1c: ae 10 62 c4 or %g1, 0x2c4, %l7 40008c20: c2 0d c0 00 ldub [ %l7 ], %g1 _ISR_Disable( level ); 40008c24: 7f ff e4 4d call 40001d58 40008c28: a2 00 60 01 add %g1, 1, %l1 40008c2c: a8 10 00 08 mov %o0, %l4 search_thread = (Thread_Control *) header->last; 40008c30: 10 80 00 19 b 40008c94 <_Thread_queue_Enqueue_priority+0x178> 40008c34: 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 ) 40008c38: 80 a4 80 11 cmp %l2, %l1 40008c3c: 3a 80 00 1a bcc,a 40008ca4 <_Thread_queue_Enqueue_priority+0x188> 40008c40: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 40008c44: e0 04 20 04 ld [ %l0 + 4 ], %l0 if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 40008c48: 80 a4 00 13 cmp %l0, %l3 40008c4c: 22 80 00 16 be,a 40008ca4 <_Thread_queue_Enqueue_priority+0x188> 40008c50: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; 40008c54: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority >= search_priority ) 40008c58: 80 a4 80 11 cmp %l2, %l1 40008c5c: 3a 80 00 12 bcc,a 40008ca4 <_Thread_queue_Enqueue_priority+0x188> 40008c60: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; #endif _ISR_Flash( level ); 40008c64: 7f ff e4 41 call 40001d68 40008c68: 90 10 00 14 mov %l4, %o0 40008c6c: 7f ff e4 3b call 40001d58 40008c70: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 40008c74: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40008c78: 80 8d 80 01 btst %l6, %g1 40008c7c: 32 80 00 06 bne,a 40008c94 <_Thread_queue_Enqueue_priority+0x178> 40008c80: e0 04 20 04 ld [ %l0 + 4 ], %l0 _ISR_Enable( level ); 40008c84: 7f ff e4 39 call 40001d68 <== NOT EXECUTED 40008c88: 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; 40008c8c: 10 bf ff e6 b 40008c24 <_Thread_queue_Enqueue_priority+0x108> <== NOT EXECUTED 40008c90: 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 ) ) { 40008c94: 80 a4 00 13 cmp %l0, %l3 40008c98: 32 bf ff e8 bne,a 40008c38 <_Thread_queue_Enqueue_priority+0x11c> 40008c9c: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 40008ca0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40008ca4: 80 a0 60 01 cmp %g1, 1 40008ca8: 12 80 00 17 bne 40008d04 <_Thread_queue_Enqueue_priority+0x1e8> 40008cac: 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 ) 40008cb0: 80 a4 80 11 cmp %l2, %l1 40008cb4: 02 80 00 09 be 40008cd8 <_Thread_queue_Enqueue_priority+0x1bc> 40008cb8: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 40008cbc: c2 04 00 00 ld [ %l0 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 40008cc0: 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; 40008cc4: 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; 40008cc8: 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; 40008ccc: 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; 40008cd0: f2 24 00 00 st %i1, [ %l0 ] next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40008cd4: 30 80 00 08 b,a 40008cf4 <_Thread_queue_Enqueue_priority+0x1d8> 40008cd8: 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; 40008cdc: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40008ce0: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 40008ce4: 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; 40008ce8: 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; 40008cec: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 40008cf0: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40008cf4: 7f ff e4 1d call 40001d68 40008cf8: b0 10 20 01 mov 1, %i0 40008cfc: 81 c7 e0 08 ret 40008d00: 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; 40008d04: 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; 40008d08: d0 26 80 00 st %o0, [ %i2 ] <== NOT EXECUTED return the_thread_queue->sync_state; } 40008d0c: 81 c7 e0 08 ret <== NOT EXECUTED 40008d10: 81 e8 00 00 restore <== NOT EXECUTED 4000db84 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4000db84: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 4000db88: 7f ff d0 74 call 40001d58 4000db8c: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4000db90: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000db94: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000db98: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000db9c: 80 88 80 01 btst %g2, %g1 4000dba0: 32 80 00 04 bne,a 4000dbb0 <_Thread_queue_Extract_fifo+0x2c> 4000dba4: c2 06 40 00 ld [ %i1 ], %g1 _ISR_Enable( level ); 4000dba8: 7f ff d0 70 call 40001d68 <== NOT EXECUTED 4000dbac: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4000dbb0: 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 ) ) { 4000dbb4: c6 06 60 50 ld [ %i1 + 0x50 ], %g3 next->previous = previous; previous->next = next; 4000dbb8: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000dbbc: c4 20 60 04 st %g2, [ %g1 + 4 ] 4000dbc0: 80 a0 e0 02 cmp %g3, 2 4000dbc4: 02 80 00 06 be 4000dbdc <_Thread_queue_Extract_fifo+0x58> 4000dbc8: c0 26 60 44 clr [ %i1 + 0x44 ] _ISR_Enable( level ); 4000dbcc: 7f ff d0 67 call 40001d68 4000dbd0: 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 ); 4000dbd4: 10 80 00 0a b 4000dbfc <_Thread_queue_Extract_fifo+0x78> 4000dbd8: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000dbdc: 82 10 20 03 mov 3, %g1 4000dbe0: c2 26 60 50 st %g1, [ %i1 + 0x50 ] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000dbe4: 7f ff d0 61 call 40001d68 4000dbe8: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); 4000dbec: 7f ff ef 1a call 40009854 <_Watchdog_Remove> 4000dbf0: 90 06 60 48 add %i1, 0x48, %o0 4000dbf4: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000dbf8: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000dbfc: 7f ff e9 68 call 4000819c <_Thread_Clear_state> 4000dc00: 81 e8 00 00 restore 4000dc04: 01 00 00 00 nop 4000cab8 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, bool requeuing ) { 4000cab8: 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 ); 4000cabc: 7f ff d4 a7 call 40001d58 4000cac0: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4000cac4: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000cac8: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000cacc: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000cad0: 80 88 80 01 btst %g2, %g1 4000cad4: 32 80 00 03 bne,a 4000cae0 <_Thread_queue_Extract_priority_helper+0x28> 4000cad8: c6 06 60 38 ld [ %i1 + 0x38 ], %g3 _ISR_Enable( level ); 4000cadc: 30 80 00 1c b,a 4000cb4c <_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 ) ) { 4000cae0: 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; 4000cae4: c4 06 40 00 ld [ %i1 ], %g2 previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4000cae8: 80 a0 c0 01 cmp %g3, %g1 4000caec: 02 80 00 13 be 4000cb38 <_Thread_queue_Extract_priority_helper+0x80> 4000caf0: 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; 4000caf4: da 06 60 40 ld [ %i1 + 0x40 ], %o5 new_second_node = new_first_node->next; 4000caf8: c8 00 c0 00 ld [ %g3 ], %g4 previous_node->next = new_first_node; next_node->previous = new_first_node; 4000cafc: 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; 4000cb00: c6 20 40 00 st %g3, [ %g1 ] next_node->previous = new_first_node; new_first_node->next = next_node; 4000cb04: c4 20 c0 00 st %g2, [ %g3 ] new_first_node->previous = previous_node; 4000cb08: c2 20 e0 04 st %g1, [ %g3 + 4 ] if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4000cb0c: c4 06 60 38 ld [ %i1 + 0x38 ], %g2 4000cb10: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 4000cb14: 80 a0 80 01 cmp %g2, %g1 4000cb18: 02 80 00 0a be 4000cb40 <_Thread_queue_Extract_priority_helper+0x88> 4000cb1c: 82 00 e0 38 add %g3, 0x38, %g1 /* > two threads on 2-n */ new_second_node->previous = 4000cb20: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 4000cb24: c8 20 e0 38 st %g4, [ %g3 + 0x38 ] new_first_thread->Wait.Block2n.last = last_node; 4000cb28: da 20 e0 40 st %o5, [ %g3 + 0x40 ] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4000cb2c: 82 00 e0 3c add %g3, 0x3c, %g1 4000cb30: 10 80 00 04 b 4000cb40 <_Thread_queue_Extract_priority_helper+0x88> 4000cb34: c2 23 40 00 st %g1, [ %o5 ] } } else { previous_node->next = next_node; next_node->previous = previous_node; 4000cb38: 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; 4000cb3c: c4 20 40 00 st %g2, [ %g1 ] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4000cb40: 80 8e a0 ff btst 0xff, %i2 4000cb44: 22 80 00 04 be,a 4000cb54 <_Thread_queue_Extract_priority_helper+0x9c> 4000cb48: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 _ISR_Enable( level ); 4000cb4c: 7f ff d4 87 call 40001d68 4000cb50: 91 e8 00 08 restore %g0, %o0, %o0 return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4000cb54: 80 a0 60 02 cmp %g1, 2 4000cb58: 02 80 00 06 be 4000cb70 <_Thread_queue_Extract_priority_helper+0xb8> 4000cb5c: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 4000cb60: 7f ff d4 82 call 40001d68 4000cb64: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000cb68: 10 80 00 08 b 4000cb88 <_Thread_queue_Extract_priority_helper+0xd0> 4000cb6c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000cb70: c2 26 20 50 st %g1, [ %i0 + 0x50 ] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000cb74: 7f ff d4 7d call 40001d68 4000cb78: 33 04 00 ff sethi %hi(0x1003fc00), %i1 (void) _Watchdog_Remove( &the_thread->Timer ); 4000cb7c: 7f ff f3 36 call 40009854 <_Watchdog_Remove> 4000cb80: 90 06 20 48 add %i0, 0x48, %o0 4000cb84: b2 16 63 f8 or %i1, 0x3f8, %i1 4000cb88: 7f ff ed 85 call 4000819c <_Thread_Clear_state> 4000cb8c: 81 e8 00 00 restore 4000cb90: 01 00 00 00 nop 4000cb94 <_Thread_queue_Process_timeout>: void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 4000cb94: 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 && 4000cb98: c6 00 a0 30 ld [ %g2 + 0x30 ], %g3 4000cb9c: 80 a0 e0 00 cmp %g3, 0 4000cba0: 02 80 00 0f be 4000cbdc <_Thread_queue_Process_timeout+0x48> 4000cba4: 92 10 00 08 mov %o0, %o1 4000cba8: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000cbac: c2 00 62 20 ld [ %g1 + 0x220 ], %g1 ! 40019e20 <_Thread_Executing> 4000cbb0: 80 a2 00 01 cmp %o0, %g1 4000cbb4: 32 80 00 0b bne,a 4000cbe0 <_Thread_queue_Process_timeout+0x4c> 4000cbb8: 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 ) { 4000cbbc: 80 a0 e0 03 cmp %g3, 3 4000cbc0: 02 80 00 0d be 4000cbf4 <_Thread_queue_Process_timeout+0x60> 4000cbc4: 01 00 00 00 nop the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4000cbc8: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 4000cbcc: c2 22 20 34 st %g1, [ %o0 + 0x34 ] the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4000cbd0: 82 10 20 02 mov 2, %g1 4000cbd4: 81 c3 e0 08 retl 4000cbd8: c2 20 a0 30 st %g1, [ %g2 + 0x30 ] } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4000cbdc: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4000cbe0: 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; 4000cbe4: c2 22 60 34 st %g1, [ %o1 + 0x34 ] _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4000cbe8: 82 13 c0 00 mov %o7, %g1 4000cbec: 7f ff ff a8 call 4000ca8c <_Thread_queue_Extract> 4000cbf0: 9e 10 40 00 mov %g1, %o7 4000cbf4: 81 c3 e0 08 retl <== NOT EXECUTED 4000cbf8: 01 00 00 00 nop 4000b03c <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 4000b03c: 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; 4000b040: c2 06 40 00 ld [ %i1 ], %g1 right += rhs->tv_nsec; 4000b044: 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; 4000b048: 91 38 60 1f sra %g1, 0x1f, %o0 4000b04c: 92 10 00 01 mov %g1, %o1 4000b050: 83 30 60 1d srl %g1, 0x1d, %g1 4000b054: 87 2a 60 03 sll %o1, 3, %g3 4000b058: 85 2a 20 03 sll %o0, 3, %g2 4000b05c: 84 10 40 02 or %g1, %g2, %g2 4000b060: 83 30 e0 1b srl %g3, 0x1b, %g1 4000b064: 99 28 a0 05 sll %g2, 5, %o4 4000b068: 9b 28 e0 05 sll %g3, 5, %o5 4000b06c: 98 10 40 0c or %g1, %o4, %o4 4000b070: 9a a3 40 03 subcc %o5, %g3, %o5 4000b074: 83 33 60 1a srl %o5, 0x1a, %g1 4000b078: 98 63 00 02 subx %o4, %g2, %o4 4000b07c: 97 2b 60 06 sll %o5, 6, %o3 4000b080: 95 2b 20 06 sll %o4, 6, %o2 4000b084: 96 a2 c0 0d subcc %o3, %o5, %o3 4000b088: 94 10 40 0a or %g1, %o2, %o2 4000b08c: 94 62 80 0c subx %o2, %o4, %o2 4000b090: 96 82 c0 09 addcc %o3, %o1, %o3 4000b094: 94 42 80 08 addx %o2, %o0, %o2 4000b098: 83 32 e0 1e srl %o3, 0x1e, %g1 4000b09c: 85 2a a0 02 sll %o2, 2, %g2 4000b0a0: 84 10 40 02 or %g1, %g2, %g2 4000b0a4: 87 2a e0 02 sll %o3, 2, %g3 4000b0a8: 96 82 c0 03 addcc %o3, %g3, %o3 4000b0ac: 94 42 80 02 addx %o2, %g2, %o2 4000b0b0: 83 32 e0 1e srl %o3, 0x1e, %g1 4000b0b4: 85 2a a0 02 sll %o2, 2, %g2 4000b0b8: 84 10 40 02 or %g1, %g2, %g2 4000b0bc: 87 2a e0 02 sll %o3, 2, %g3 4000b0c0: 96 82 c0 03 addcc %o3, %g3, %o3 4000b0c4: 94 42 80 02 addx %o2, %g2, %o2 4000b0c8: 83 32 e0 1e srl %o3, 0x1e, %g1 4000b0cc: 85 2a a0 02 sll %o2, 2, %g2 4000b0d0: 84 10 40 02 or %g1, %g2, %g2 4000b0d4: 87 2a e0 02 sll %o3, 2, %g3 4000b0d8: 96 82 c0 03 addcc %o3, %g3, %o3 4000b0dc: 94 42 80 02 addx %o2, %g2, %o2 4000b0e0: 85 32 e0 17 srl %o3, 0x17, %g2 4000b0e4: 83 2a a0 09 sll %o2, 9, %g1 4000b0e8: 9b 2a e0 09 sll %o3, 9, %o5 4000b0ec: 98 10 80 01 or %g2, %g1, %o4 right += rhs->tv_nsec; 4000b0f0: 96 83 40 0f addcc %o5, %o7, %o3 4000b0f4: 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; 4000b0f8: e4 06 20 04 ld [ %i0 + 4 ], %l2 right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; 4000b0fc: 94 43 00 02 addx %o4, %g2, %o2 if ( right == 0 ) { 4000b100: 80 92 80 0b orcc %o2, %o3, %g0 4000b104: 12 80 00 06 bne 4000b11c <_Timespec_Divide+0xe0> 4000b108: d0 06 00 00 ld [ %i0 ], %o0 *ival_percentage = 0; 4000b10c: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED *fval_percentage = 0; 4000b110: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED 4000b114: 81 c7 e0 08 ret <== NOT EXECUTED 4000b118: 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; 4000b11c: 92 10 00 08 mov %o0, %o1 4000b120: 83 32 60 1d srl %o1, 0x1d, %g1 4000b124: 9b 2a 60 03 sll %o1, 3, %o5 4000b128: 91 3a 20 1f sra %o0, 0x1f, %o0 4000b12c: 99 2a 20 03 sll %o0, 3, %o4 4000b130: 98 10 40 0c or %g1, %o4, %o4 4000b134: 83 33 60 1b srl %o5, 0x1b, %g1 4000b138: 85 2b 20 05 sll %o4, 5, %g2 4000b13c: 87 2b 60 05 sll %o5, 5, %g3 4000b140: 84 10 40 02 or %g1, %g2, %g2 4000b144: 86 a0 c0 0d subcc %g3, %o5, %g3 4000b148: 83 30 e0 1a srl %g3, 0x1a, %g1 4000b14c: 84 60 80 0c subx %g2, %o4, %g2 4000b150: 9b 28 e0 06 sll %g3, 6, %o5 4000b154: 99 28 a0 06 sll %g2, 6, %o4 4000b158: 9a a3 40 03 subcc %o5, %g3, %o5 4000b15c: 98 10 40 0c or %g1, %o4, %o4 4000b160: 98 63 00 02 subx %o4, %g2, %o4 4000b164: 9a 83 40 09 addcc %o5, %o1, %o5 4000b168: 83 33 60 1e srl %o5, 0x1e, %g1 4000b16c: 98 43 00 08 addx %o4, %o0, %o4 4000b170: 87 2b 60 02 sll %o5, 2, %g3 4000b174: 85 2b 20 02 sll %o4, 2, %g2 4000b178: 9a 83 40 03 addcc %o5, %g3, %o5 4000b17c: 84 10 40 02 or %g1, %g2, %g2 4000b180: 83 33 60 1e srl %o5, 0x1e, %g1 4000b184: 98 43 00 02 addx %o4, %g2, %o4 4000b188: 87 2b 60 02 sll %o5, 2, %g3 4000b18c: 85 2b 20 02 sll %o4, 2, %g2 4000b190: 9a 83 40 03 addcc %o5, %g3, %o5 4000b194: 84 10 40 02 or %g1, %g2, %g2 4000b198: 83 33 60 1e srl %o5, 0x1e, %g1 4000b19c: 98 43 00 02 addx %o4, %g2, %o4 4000b1a0: 87 2b 60 02 sll %o5, 2, %g3 4000b1a4: 85 2b 20 02 sll %o4, 2, %g2 4000b1a8: 9a 83 40 03 addcc %o5, %g3, %o5 4000b1ac: 84 10 40 02 or %g1, %g2, %g2 4000b1b0: 98 43 00 02 addx %o4, %g2, %o4 4000b1b4: 83 2b 20 09 sll %o4, 9, %g1 4000b1b8: 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; 4000b1bc: 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; 4000b1c0: a0 10 80 01 or %g2, %g1, %l0 4000b1c4: 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; 4000b1c8: a2 84 40 13 addcc %l1, %l3, %l1 4000b1cc: 83 34 60 1e srl %l1, 0x1e, %g1 4000b1d0: 87 2c 60 02 sll %l1, 2, %g3 4000b1d4: a5 3c a0 1f sra %l2, 0x1f, %l2 4000b1d8: a0 44 00 12 addx %l0, %l2, %l0 4000b1dc: 85 2c 20 02 sll %l0, 2, %g2 4000b1e0: 84 10 40 02 or %g1, %g2, %g2 4000b1e4: 83 30 e0 1b srl %g3, 0x1b, %g1 4000b1e8: 99 28 a0 05 sll %g2, 5, %o4 4000b1ec: 9b 28 e0 05 sll %g3, 5, %o5 4000b1f0: 98 10 40 0c or %g1, %o4, %o4 4000b1f4: 9a a3 40 03 subcc %o5, %g3, %o5 4000b1f8: 98 63 00 02 subx %o4, %g2, %o4 4000b1fc: 9a 83 40 11 addcc %o5, %l1, %o5 4000b200: 83 33 60 1e srl %o5, 0x1e, %g1 4000b204: 98 43 00 10 addx %o4, %l0, %o4 4000b208: 87 2b 60 02 sll %o5, 2, %g3 4000b20c: 85 2b 20 02 sll %o4, 2, %g2 4000b210: 9a 83 40 03 addcc %o5, %g3, %o5 4000b214: 84 10 40 02 or %g1, %g2, %g2 4000b218: 83 33 60 1e srl %o5, 0x1e, %g1 4000b21c: 87 2b 60 02 sll %o5, 2, %g3 4000b220: 98 43 00 02 addx %o4, %g2, %o4 4000b224: 9a 83 40 03 addcc %o5, %g3, %o5 4000b228: 85 2b 20 02 sll %o4, 2, %g2 4000b22c: 84 10 40 02 or %g1, %g2, %g2 4000b230: 83 33 60 1b srl %o5, 0x1b, %g1 4000b234: 98 43 00 02 addx %o4, %g2, %o4 4000b238: 99 2b 20 05 sll %o4, 5, %o4 4000b23c: 98 10 40 0c or %g1, %o4, %o4 4000b240: 93 2b 60 05 sll %o5, 5, %o1 4000b244: 40 00 35 cb call 40018970 <__udivdi3> 4000b248: 90 10 00 0c mov %o4, %o0 *ival_percentage = answer / 1000; 4000b24c: 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; 4000b250: a0 10 00 08 mov %o0, %l0 4000b254: a2 10 00 09 mov %o1, %l1 *ival_percentage = answer / 1000; 4000b258: 96 10 23 e8 mov 0x3e8, %o3 4000b25c: 40 00 35 c5 call 40018970 <__udivdi3> 4000b260: 90 10 00 10 mov %l0, %o0 *fval_percentage = answer % 1000; 4000b264: 90 10 00 10 mov %l0, %o0 * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; *ival_percentage = answer / 1000; 4000b268: d2 26 80 00 st %o1, [ %i2 ] *fval_percentage = answer % 1000; 4000b26c: 94 10 20 00 clr %o2 4000b270: 92 10 00 11 mov %l1, %o1 4000b274: 40 00 36 9b call 40018ce0 <__umoddi3> 4000b278: 96 10 23 e8 mov 0x3e8, %o3 4000b27c: d2 26 c0 00 st %o1, [ %i3 ] 4000b280: 81 c7 e0 08 ret 4000b284: 81 e8 00 00 restore 4000e22c <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 4000e22c: 9d e3 bf 98 save %sp, -104, %sp _Chain_Extract( &the_extension->Node ); 4000e230: 40 00 13 9d call 400130a4 <_Chain_Extract> 4000e234: 90 10 00 18 mov %i0, %o0 /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 4000e238: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 4000e23c: 80 a0 60 00 cmp %g1, 0 4000e240: 02 80 00 04 be 4000e250 <_User_extensions_Remove_set+0x24> 4000e244: 01 00 00 00 nop _Chain_Extract( &the_extension->Switch.Node ); 4000e248: 40 00 13 97 call 400130a4 <_Chain_Extract> <== NOT EXECUTED 4000e24c: 91 ee 20 08 restore %i0, 8, %o0 <== NOT EXECUTED 4000e250: 81 c7 e0 08 ret 4000e254: 81 e8 00 00 restore 400095b4 <_User_extensions_Thread_create>: */ bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 400095b4: 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 ; 400095b8: 03 10 00 67 sethi %hi(0x40019c00), %g1 400095bc: e0 00 63 98 ld [ %g1 + 0x398 ], %l0 ! 40019f98 <_User_extensions_List> 400095c0: 82 10 63 98 or %g1, 0x398, %g1 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 400095c4: 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)( 400095c8: 03 10 00 67 sethi %hi(0x40019c00), %g1 400095cc: 10 80 00 0d b 40009600 <_User_extensions_Thread_create+0x4c> 400095d0: a2 10 62 20 or %g1, 0x220, %l1 ! 40019e20 <_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 ) { 400095d4: 80 a0 60 00 cmp %g1, 0 400095d8: 02 80 00 09 be 400095fc <_User_extensions_Thread_create+0x48> 400095dc: 92 10 00 18 mov %i0, %o1 status = (*the_extension->Callouts.thread_create)( 400095e0: 9f c0 40 00 call %g1 400095e4: d0 04 40 00 ld [ %l1 ], %o0 _Thread_Executing, the_thread ); if ( !status ) 400095e8: 80 8a 20 ff btst 0xff, %o0 400095ec: 32 80 00 05 bne,a 40009600 <_User_extensions_Thread_create+0x4c> 400095f0: e0 04 00 00 ld [ %l0 ], %l0 400095f4: 81 c7 e0 08 ret <== NOT EXECUTED 400095f8: 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 ) { 400095fc: 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 ) ; 40009600: 80 a4 00 12 cmp %l0, %l2 40009604: 32 bf ff f4 bne,a 400095d4 <_User_extensions_Thread_create+0x20> 40009608: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 return FALSE; } } return TRUE; } 4000960c: 81 c7 e0 08 ret 40009610: 91 e8 20 01 restore %g0, 1, %o0 40016e10 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 40016e10: 9d e3 bf 98 save %sp, -104, %sp Watchdog_Interval units = units_arg; ISR_Level level; Chain_Node *node; if ( !units ) { 40016e14: 80 a6 60 00 cmp %i1, 0 40016e18: 02 80 00 31 be 40016edc <_Watchdog_Adjust_to_chain+0xcc> 40016e1c: 01 00 00 00 nop return; } _ISR_Disable( level ); 40016e20: 7f ff d1 bc call 4000b510 40016e24: 01 00 00 00 nop 40016e28: a4 10 00 08 mov %o0, %l2 if ( !_Chain_Is_empty( header ) ) { 40016e2c: c2 06 00 00 ld [ %i0 ], %g1 40016e30: a2 06 20 04 add %i0, 4, %l1 40016e34: 80 a0 40 11 cmp %g1, %l1 40016e38: 02 80 00 27 be 40016ed4 <_Watchdog_Adjust_to_chain+0xc4> 40016e3c: 01 00 00 00 nop 40016e40: a6 06 a0 04 add %i2, 4, %l3 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 40016e44: c4 06 00 00 ld [ %i0 ], %g2 while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 40016e48: e0 00 a0 10 ld [ %g2 + 0x10 ], %l0 40016e4c: 80 a6 40 10 cmp %i1, %l0 40016e50: 3a 80 00 05 bcc,a 40016e64 <_Watchdog_Adjust_to_chain+0x54> 40016e54: c0 20 a0 10 clr [ %g2 + 0x10 ] _Watchdog_First( header )->delta_interval -= units; 40016e58: 82 24 00 19 sub %l0, %i1, %g1 40016e5c: 10 80 00 1e b 40016ed4 <_Watchdog_Adjust_to_chain+0xc4> 40016e60: 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)); 40016e64: 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)) 40016e68: 80 a0 80 11 cmp %g2, %l1 40016e6c: 32 80 00 04 bne,a 40016e7c <_Watchdog_Adjust_to_chain+0x6c> 40016e70: c2 00 80 00 ld [ %g2 ], %g1 40016e74: 10 80 00 04 b 40016e84 <_Watchdog_Adjust_to_chain+0x74> <== NOT EXECUTED 40016e78: 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; 40016e7c: c2 26 00 00 st %g1, [ %i0 ] new_first->previous = _Chain_Head(the_chain); 40016e80: f0 20 60 04 st %i0, [ %g1 + 4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 40016e84: e6 20 80 00 st %l3, [ %g2 ] old_last_node = the_chain->last; 40016e88: c2 06 a0 08 ld [ %i2 + 8 ], %g1 the_chain->last = the_node; 40016e8c: c4 26 a0 08 st %g2, [ %i2 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 40016e90: 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; 40016e94: c4 20 40 00 st %g2, [ %g1 ] do { node = _Chain_Get_unprotected( header ); _Chain_Append_unprotected( to_fire, node ); _ISR_Flash( level ); 40016e98: 7f ff d1 a2 call 4000b520 40016e9c: 90 10 00 12 mov %l2, %o0 40016ea0: 7f ff d1 9c call 4000b510 40016ea4: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 40016ea8: c2 06 00 00 ld [ %i0 ], %g1 } while ( !_Chain_Is_empty( header ) && _Watchdog_First( header )->delta_interval == 0 ); 40016eac: 80 a0 40 11 cmp %g1, %l1 40016eb0: 02 80 00 09 be 40016ed4 <_Watchdog_Adjust_to_chain+0xc4> 40016eb4: 01 00 00 00 nop 40016eb8: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 40016ebc: 80 a0 60 00 cmp %g1, 0 40016ec0: 22 bf ff ea be,a 40016e68 <_Watchdog_Adjust_to_chain+0x58> 40016ec4: c4 06 00 00 ld [ %i0 ], %g2 return; } _ISR_Disable( level ); if ( !_Chain_Is_empty( header ) ) { while ( units ) { 40016ec8: b2 a6 40 10 subcc %i1, %l0, %i1 40016ecc: 32 bf ff df bne,a 40016e48 <_Watchdog_Adjust_to_chain+0x38> 40016ed0: c4 06 00 00 ld [ %i0 ], %g2 <== NOT EXECUTED break; } } } _ISR_Enable( level ); 40016ed4: 7f ff d1 93 call 4000b520 40016ed8: 91 e8 00 12 restore %g0, %l2, %o0 40016edc: 81 c7 e0 08 ret 40016ee0: 81 e8 00 00 restore 400096ec <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 400096ec: 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; 400096f0: 03 10 00 67 sethi %hi(0x40019c00), %g1 void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 400096f4: 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; 400096f8: e6 00 61 fc ld [ %g1 + 0x1fc ], %l3 _ISR_Disable( level ); 400096fc: 7f ff e1 97 call 40001d58 40009700: 01 00 00 00 nop 40009704: 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 ) { 40009708: c2 06 60 08 ld [ %i1 + 8 ], %g1 4000970c: 80 a0 60 00 cmp %g1, 0 40009710: 02 80 00 03 be 4000971c <_Watchdog_Insert+0x30> 40009714: 07 10 00 67 sethi %hi(0x40019c00), %g3 _ISR_Enable( level ); 40009718: 30 80 00 39 b,a 400097fc <_Watchdog_Insert+0x110> <== NOT EXECUTED return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 4000971c: c2 00 e2 b0 ld [ %g3 + 0x2b0 ], %g1 ! 40019eb0 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 40009720: 84 10 20 01 mov 1, %g2 _Watchdog_Sync_count++; 40009724: 82 00 60 01 inc %g1 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 40009728: c4 26 60 08 st %g2, [ %i1 + 8 ] _Watchdog_Sync_count++; 4000972c: c2 20 e2 b0 st %g1, [ %g3 + 0x2b0 ] if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 40009730: 03 10 00 67 sethi %hi(0x40019c00), %g1 40009734: a8 10 62 1c or %g1, 0x21c, %l4 ! 40019e1c <_Watchdog_Sync_level> 40009738: ac 10 00 14 mov %l4, %l6 the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 4000973c: 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 ; 40009740: e2 05 40 00 ld [ %l5 ], %l1 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 40009744: 80 a4 a0 00 cmp %l2, 0 40009748: 22 80 00 1c be,a 400097b8 <_Watchdog_Insert+0xcc> 4000974c: c4 04 60 04 ld [ %l1 + 4 ], %g2 40009750: c2 04 40 00 ld [ %l1 ], %g1 40009754: 80 a0 60 00 cmp %g1, 0 40009758: 22 80 00 18 be,a 400097b8 <_Watchdog_Insert+0xcc> 4000975c: c4 04 60 04 ld [ %l1 + 4 ], %g2 break; if ( delta_interval < after->delta_interval ) { 40009760: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 40009764: 80 a4 80 10 cmp %l2, %l0 40009768: 1a 80 00 04 bcc 40009778 <_Watchdog_Insert+0x8c> 4000976c: 82 24 00 12 sub %l0, %l2, %g1 after->delta_interval -= delta_interval; 40009770: 10 80 00 11 b 400097b4 <_Watchdog_Insert+0xc8> 40009774: 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 ); 40009778: 7f ff e1 7c call 40001d68 4000977c: 90 10 00 18 mov %i0, %o0 40009780: 7f ff e1 76 call 40001d58 40009784: 01 00 00 00 nop if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 40009788: c2 06 60 08 ld [ %i1 + 8 ], %g1 4000978c: 80 a0 60 01 cmp %g1, 1 40009790: 12 80 00 15 bne 400097e4 <_Watchdog_Insert+0xf8> 40009794: a4 24 80 10 sub %l2, %l0, %l2 goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 40009798: c2 05 00 00 ld [ %l4 ], %g1 4000979c: 80 a0 40 13 cmp %g1, %l3 400097a0: 28 bf ff e9 bleu,a 40009744 <_Watchdog_Insert+0x58> 400097a4: e2 04 40 00 ld [ %l1 ], %l1 _Watchdog_Sync_level = insert_isr_nest_level; 400097a8: e6 25 80 00 st %l3, [ %l6 ] the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 400097ac: 10 bf ff e5 b 40009740 <_Watchdog_Insert+0x54> 400097b0: 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 ); 400097b4: c4 04 60 04 ld [ %l1 + 4 ], %g2 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 400097b8: 03 10 00 67 sethi %hi(0x40019c00), %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 400097bc: c6 00 80 00 ld [ %g2 ], %g3 400097c0: c2 00 62 b4 ld [ %g1 + 0x2b4 ], %g1 after_node->next = the_node; 400097c4: f2 20 80 00 st %i1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 400097c8: c4 26 60 04 st %g2, [ %i1 + 4 ] 400097cc: c2 26 60 14 st %g1, [ %i1 + 0x14 ] } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 400097d0: e4 26 60 10 st %l2, [ %i1 + 0x10 ] RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 400097d4: 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; 400097d8: 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; 400097dc: c6 26 40 00 st %g3, [ %i1 ] 400097e0: 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; 400097e4: 03 10 00 67 sethi %hi(0x40019c00), %g1 _Watchdog_Sync_count--; 400097e8: 05 10 00 67 sethi %hi(0x40019c00), %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; 400097ec: e6 20 62 1c st %l3, [ %g1 + 0x21c ] _Watchdog_Sync_count--; 400097f0: c2 00 a2 b0 ld [ %g2 + 0x2b0 ], %g1 400097f4: 82 00 7f ff add %g1, -1, %g1 400097f8: c2 20 a2 b0 st %g1, [ %g2 + 0x2b0 ] _ISR_Enable( level ); 400097fc: 7f ff e1 5b call 40001d68 40009800: 81 e8 00 00 restore 40009804: 01 00 00 00 nop 40009854 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 40009854: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 40009858: 7f ff e1 40 call 40001d58 4000985c: 01 00 00 00 nop previous_state = the_watchdog->state; 40009860: e0 06 20 08 ld [ %i0 + 8 ], %l0 switch ( previous_state ) { 40009864: 80 a4 20 01 cmp %l0, 1 40009868: 22 80 00 1e be,a 400098e0 <_Watchdog_Remove+0x8c> 4000986c: c0 26 20 08 clr [ %i0 + 8 ] <== NOT EXECUTED 40009870: 0a 80 00 1d bcs 400098e4 <_Watchdog_Remove+0x90> 40009874: 03 10 00 67 sethi %hi(0x40019c00), %g1 40009878: 80 a4 20 03 cmp %l0, 3 4000987c: 18 80 00 1a bgu 400098e4 <_Watchdog_Remove+0x90> 40009880: 01 00 00 00 nop 40009884: c6 06 00 00 ld [ %i0 ], %g3 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 40009888: c0 26 20 08 clr [ %i0 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 4000988c: c2 00 c0 00 ld [ %g3 ], %g1 40009890: 80 a0 60 00 cmp %g1, 0 40009894: 02 80 00 07 be 400098b0 <_Watchdog_Remove+0x5c> 40009898: 03 10 00 67 sethi %hi(0x40019c00), %g1 next_watchdog->delta_interval += the_watchdog->delta_interval; 4000989c: c2 00 e0 10 ld [ %g3 + 0x10 ], %g1 400098a0: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 400098a4: 82 00 40 02 add %g1, %g2, %g1 400098a8: c2 20 e0 10 st %g1, [ %g3 + 0x10 ] if ( _Watchdog_Sync_count ) 400098ac: 03 10 00 67 sethi %hi(0x40019c00), %g1 400098b0: c2 00 62 b0 ld [ %g1 + 0x2b0 ], %g1 ! 40019eb0 <_Watchdog_Sync_count> 400098b4: 80 a0 60 00 cmp %g1, 0 400098b8: 22 80 00 07 be,a 400098d4 <_Watchdog_Remove+0x80> 400098bc: c4 06 00 00 ld [ %i0 ], %g2 _Watchdog_Sync_level = _ISR_Nest_level; 400098c0: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 400098c4: c4 00 61 fc ld [ %g1 + 0x1fc ], %g2 ! 40019dfc <_ISR_Nest_level> <== NOT EXECUTED 400098c8: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 400098cc: c4 20 62 1c st %g2, [ %g1 + 0x21c ] ! 40019e1c <_Watchdog_Sync_level> <== NOT EXECUTED ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 400098d0: c4 06 00 00 ld [ %i0 ], %g2 <== NOT EXECUTED previous = the_node->previous; 400098d4: c2 06 20 04 ld [ %i0 + 4 ], %g1 next->previous = previous; previous->next = next; 400098d8: c4 20 40 00 st %g2, [ %g1 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 400098dc: c2 20 a0 04 st %g1, [ %g2 + 4 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 400098e0: 03 10 00 67 sethi %hi(0x40019c00), %g1 400098e4: c2 00 62 b4 ld [ %g1 + 0x2b4 ], %g1 ! 40019eb4 <_Watchdog_Ticks_since_boot> 400098e8: c2 26 20 18 st %g1, [ %i0 + 0x18 ] _ISR_Enable( level ); 400098ec: 7f ff e1 1f call 40001d68 400098f0: b0 10 00 10 mov %l0, %i0 return( previous_state ); } 400098f4: 81 c7 e0 08 ret 400098f8: 81 e8 00 00 restore 40009a0c <_Workspace_Handler_initialization>: */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 40009a0c: 9d e3 bf 98 save %sp, -104, %sp uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 40009a10: 80 a6 20 00 cmp %i0, 0 40009a14: 02 80 00 04 be 40009a24 <_Workspace_Handler_initialization+0x18> 40009a18: 80 8e 20 07 btst 7, %i0 40009a1c: 02 80 00 06 be 40009a34 <_Workspace_Handler_initialization+0x28> 40009a20: 03 10 00 67 sethi %hi(0x40019c00), %g1 _Internal_error_Occurred( 40009a24: 90 10 20 00 clr %o0 40009a28: 92 10 20 01 mov 1, %o1 40009a2c: 10 80 00 15 b 40009a80 <_Workspace_Handler_initialization+0x74> 40009a30: 94 10 20 02 mov 2, %o2 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) 40009a34: c2 00 61 f8 ld [ %g1 + 0x1f8 ], %g1 40009a38: c2 08 60 28 ldub [ %g1 + 0x28 ], %g1 40009a3c: 80 a0 60 00 cmp %g1, 0 40009a40: 02 80 00 07 be 40009a5c <_Workspace_Handler_initialization+0x50> 40009a44: 92 10 00 18 mov %i0, %o1 memset( starting_address, 0, size ); 40009a48: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40009a4c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40009a50: 40 00 12 c9 call 4000e574 <== NOT EXECUTED 40009a54: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED memory_available = _Heap_Initialize( 40009a58: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40009a5c: 94 10 00 19 mov %i1, %o2 40009a60: 11 10 00 67 sethi %hi(0x40019c00), %o0 40009a64: 96 10 20 08 mov 8, %o3 40009a68: 7f ff f6 62 call 400073f0 <_Heap_Initialize> 40009a6c: 90 12 21 84 or %o0, 0x184, %o0 starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 40009a70: 80 a2 20 00 cmp %o0, 0 40009a74: 12 80 00 05 bne 40009a88 <_Workspace_Handler_initialization+0x7c> 40009a78: 92 10 20 01 mov 1, %o1 _Internal_error_Occurred( 40009a7c: 94 10 20 03 mov 3, %o2 <== NOT EXECUTED 40009a80: 7f ff f6 e6 call 40007618 <_Internal_error_Occurred> 40009a84: 01 00 00 00 nop 40009a88: 81 c7 e0 08 ret 40009a8c: 81 e8 00 00 restore 40002e30 <__assert>: void __assert( const char *file, int line, const char *failedexpr ) { 40002e30: 96 10 00 0a mov %o2, %o3 <== NOT EXECUTED __assert_func (file, line, NULL, failedexpr); 40002e34: 94 10 20 00 clr %o2 <== NOT EXECUTED 40002e38: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40002e3c: 7f ff ff eb call 40002de8 <__assert_func> <== NOT EXECUTED 40002e40: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40002e44: 01 00 00 00 nop 40002de8 <__assert_func>: const char *file, int line, const char *func, const char *failedexpr ) { 40002de8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n", 40002dec: 03 10 00 5f sethi %hi(0x40017c00), %g1 <== NOT EXECUTED const char *file, int line, const char *func, const char *failedexpr ) { 40002df0: 9a 10 00 1a mov %i2, %o5 <== NOT EXECUTED 40002df4: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 40002df8: 96 10 00 19 mov %i1, %o3 <== NOT EXECUTED 40002dfc: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n", 40002e00: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 40002e04: 12 80 00 05 bne 40002e18 <__assert_func+0x30> <== NOT EXECUTED 40002e08: 98 10 63 08 or %g1, 0x308, %o4 <== NOT EXECUTED 40002e0c: 03 10 00 5f sethi %hi(0x40017c00), %g1 <== NOT EXECUTED 40002e10: 9a 10 62 d8 or %g1, 0x2d8, %o5 ! 40017ed8 <__func__.4894+0x1c8> <== NOT EXECUTED 40002e14: 98 10 00 0d mov %o5, %o4 <== NOT EXECUTED 40002e18: 11 10 00 5f sethi %hi(0x40017c00), %o0 <== NOT EXECUTED 40002e1c: 40 00 03 87 call 40003c38 <== NOT EXECUTED 40002e20: 90 12 23 18 or %o0, 0x318, %o0 ! 40017f18 <__func__.4894+0x208> <== NOT EXECUTED file, line, (func) ? ", function: " : "", (func) ? func : "" ); rtems_fatal_error_occurred(0); 40002e24: 40 00 0f 1f call 40006aa0 <== NOT EXECUTED 40002e28: 90 10 20 00 clr %o0 <== NOT EXECUTED 40002e2c: 01 00 00 00 nop 40017140 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) _fini(); 40017140: 9d e3 bf 98 save %sp, -104, %sp 40017144: 40 00 07 2c call 40018df4 <_fini> 40017148: 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(); 4001714c: 7f ff ff e1 call 400170d0 40017150: 01 00 00 00 nop rtems_shutdown_executive(status); 40017154: 40 00 00 4e call 4001728c 40017158: 90 10 00 18 mov %i0, %o0 4001715c: 30 80 00 00 b,a 4001715c <_exit+0x1c> <== NOT EXECUTED 4002d788 <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 4002d788: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4002d78c: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 4002d790: 94 10 00 0b mov %o3, %o2 <== NOT EXECUTED 4002d794: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4002d798: 7f ff ff 79 call 4002d57c <== NOT EXECUTED 4002d79c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4002d7a0: 01 00 00 00 nop 400220b0 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr ) { return getpid(); } 400220b0: 81 c3 e0 08 retl <== NOT EXECUTED 400220b4: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000b108 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 4000b108: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000b10c: 7f ff ff e6 call 4000b0a4 <== NOT EXECUTED 4000b110: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000b114: 01 00 00 00 nop 400212c8 <_link_r>: struct _reent *ptr, const char *existing, const char *new ) { return link( existing, new ); 400212c8: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 400212cc: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 400212d0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400212d4: 7f ff ff 65 call 40021068 <== NOT EXECUTED 400212d8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400212dc: 01 00 00 00 nop 400214d4 <_lstat_r>: struct _reent *ptr, const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 400214d4: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 400214d8: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 400214dc: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400214e0: 7f ff ff c4 call 400213f0 <== NOT EXECUTED 400214e4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400214e8: 01 00 00 00 nop 40017258 <_realloc_r>: struct _reent *ignored, void *ptr, size_t size ) { return realloc( ptr, size ); 40017258: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4001725c: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40017260: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40017264: 40 00 00 17 call 400172c0 <== NOT EXECUTED 40017268: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4001726c: 01 00 00 00 nop 400417a8 <_rename_r>: int _rename_r( struct _reent *ptr, const char *old, const char *new ) { 400417a8: 9d e3 bf 48 save %sp, -184, %sp <== NOT EXECUTED struct stat sb; int s; s = stat( old, &sb); 400417ac: 92 07 bf a8 add %fp, -88, %o1 <== NOT EXECUTED 400417b0: 7f ff 18 d7 call 40007b0c <== NOT EXECUTED 400417b4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( s < 0 ) 400417b8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400417bc: 06 80 00 13 bl 40041808 <_rename_r+0x60> <== NOT EXECUTED 400417c0: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED return s; s = link( old, new ); 400417c4: 7f ff 7e 29 call 40021068 <== NOT EXECUTED 400417c8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( s < 0 ) 400417cc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400417d0: 06 80 00 0e bl 40041808 <_rename_r+0x60> <== NOT EXECUTED 400417d4: c2 17 bf b4 lduh [ %fp + -76 ], %g1 <== NOT EXECUTED return s; return S_ISDIR(sb.st_mode) ? rmdir( old ) : unlink( old ); 400417d8: 05 00 00 3c sethi %hi(0xf000), %g2 <== NOT EXECUTED 400417dc: 82 08 40 02 and %g1, %g2, %g1 <== NOT EXECUTED 400417e0: 05 00 00 10 sethi %hi(0x4000), %g2 <== NOT EXECUTED 400417e4: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400417e8: 12 80 00 06 bne 40041800 <_rename_r+0x58> <== NOT EXECUTED 400417ec: 01 00 00 00 nop <== NOT EXECUTED 400417f0: 7f ff 81 2d call 40021ca4 <== NOT EXECUTED 400417f4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } 400417f8: 81 c7 e0 08 ret <== NOT EXECUTED 400417fc: 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 ); 40041800: 7f ff 82 38 call 400220e0 <== NOT EXECUTED 40041804: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } 40041808: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4004180c: 81 c7 e0 08 ret <== NOT EXECUTED 40041810: 81 e8 00 00 restore <== NOT EXECUTED 40007bf0 <_stat_r>: struct _reent *ptr, const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 40007bf0: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40007bf4: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40007bf8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40007bfc: 7f ff ff c4 call 40007b0c <== NOT EXECUTED 40007c00: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40007c04: 01 00 00 00 nop 40022250 <_unlink_r>: int _unlink_r( struct _reent *ptr, const char *path ) { return unlink( path ); 40022250: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40022254: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40022258: 7f ff ff a2 call 400220e0 <== NOT EXECUTED 4002225c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40022260: 01 00 00 00 nop 40006358 : int alphasort( const void *d1, const void *d2 ) { return(strcmp((*(struct dirent **)d1)->d_name, 40006358: d0 02 00 00 ld [ %o0 ], %o0 <== NOT EXECUTED 4000635c: d2 02 40 00 ld [ %o1 ], %o1 <== NOT EXECUTED 40006360: 90 02 20 0c add %o0, 0xc, %o0 <== NOT EXECUTED 40006364: 92 02 60 0c add %o1, 0xc, %o1 <== NOT EXECUTED 40006368: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000636c: 40 00 33 09 call 40012f90 <== NOT EXECUTED 40006370: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40006374: 01 00 00 00 nop 4001f850 : #include int chdir( const char *pathname ) { 4001f850: 9d e3 bf 88 save %sp, -120, %sp /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 4001f854: 92 10 20 01 mov 1, %o1 4001f858: 90 10 00 18 mov %i0, %o0 4001f85c: a0 07 bf e8 add %fp, -24, %l0 4001f860: 96 10 20 01 mov 1, %o3 4001f864: 94 10 00 10 mov %l0, %o2 4001f868: 7f ff 9a af call 40006324 4001f86c: b0 10 3f ff mov -1, %i0 pathname, RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 4001f870: 80 a2 20 00 cmp %o0, 0 4001f874: 12 80 00 37 bne 4001f950 4001f878: c4 07 bf f0 ld [ %fp + -16 ], %g2 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 4001f87c: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4001f880: 80 a0 60 00 cmp %g1, 0 4001f884: 12 80 00 0c bne 4001f8b4 4001f888: 01 00 00 00 nop rtems_filesystem_freenode( &loc ); 4001f88c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4001f890: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001f894: 02 80 00 04 be 4001f8a4 <== NOT EXECUTED 4001f898: 01 00 00 00 nop <== NOT EXECUTED 4001f89c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4001f8a0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001f8a4: 40 00 41 11 call 4002fce8 <__errno> <== NOT EXECUTED 4001f8a8: 01 00 00 00 nop <== NOT EXECUTED 4001f8ac: 10 80 00 14 b 4001f8fc <== NOT EXECUTED 4001f8b0: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 4001f8b4: 9f c0 40 00 call %g1 4001f8b8: 90 10 00 10 mov %l0, %o0 4001f8bc: 80 a2 20 01 cmp %o0, 1 4001f8c0: 02 80 00 12 be 4001f908 4001f8c4: 03 10 01 24 sethi %hi(0x40049000), %g1 rtems_filesystem_freenode( &loc ); 4001f8c8: c2 07 bf f0 ld [ %fp + -16 ], %g1 4001f8cc: 80 a0 60 00 cmp %g1, 0 4001f8d0: 02 80 00 08 be 4001f8f0 4001f8d4: 01 00 00 00 nop 4001f8d8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4001f8dc: 80 a0 60 00 cmp %g1, 0 4001f8e0: 02 80 00 04 be 4001f8f0 4001f8e4: 01 00 00 00 nop 4001f8e8: 9f c0 40 00 call %g1 4001f8ec: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 4001f8f0: 40 00 40 fe call 4002fce8 <__errno> 4001f8f4: 01 00 00 00 nop 4001f8f8: 82 10 20 14 mov 0x14, %g1 ! 14 4001f8fc: c2 22 00 00 st %g1, [ %o0 ] 4001f900: 81 c7 e0 08 ret 4001f904: 91 e8 3f ff restore %g0, -1, %o0 } rtems_filesystem_freenode( &rtems_filesystem_current ); 4001f908: d0 00 60 94 ld [ %g1 + 0x94 ], %o0 4001f90c: c2 02 20 0c ld [ %o0 + 0xc ], %g1 4001f910: 80 a0 60 00 cmp %g1, 0 4001f914: 22 80 00 09 be,a 4001f938 4001f918: 03 10 01 24 sethi %hi(0x40049000), %g1 <== NOT EXECUTED 4001f91c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4004901c 4001f920: 80 a0 60 00 cmp %g1, 0 4001f924: 22 80 00 05 be,a 4001f938 4001f928: 03 10 01 24 sethi %hi(0x40049000), %g1 <== NOT EXECUTED 4001f92c: 9f c0 40 00 call %g1 4001f930: 90 02 20 04 add %o0, 4, %o0 rtems_filesystem_current = loc; 4001f934: 03 10 01 24 sethi %hi(0x40049000), %g1 4001f938: d0 00 60 94 ld [ %g1 + 0x94 ], %o0 ! 40049094 4001f93c: 92 07 bf e8 add %fp, -24, %o1 4001f940: 90 02 20 04 add %o0, 4, %o0 4001f944: 94 10 20 10 mov 0x10, %o2 4001f948: 40 00 4a d5 call 4003249c 4001f94c: b0 10 20 00 clr %i0 return 0; } 4001f950: 81 c7 e0 08 ret 4001f954: 81 e8 00 00 restore 400060ac : int chmod( const char *path, mode_t mode ) { 400060ac: 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 ); 400060b0: 92 10 20 00 clr %o1 400060b4: 90 10 00 18 mov %i0, %o0 400060b8: a0 07 bf e8 add %fp, -24, %l0 400060bc: 96 10 20 01 mov 1, %o3 400060c0: 94 10 00 10 mov %l0, %o2 400060c4: 40 00 00 98 call 40006324 400060c8: b0 10 3f ff mov -1, %i0 if ( status != 0 ) 400060cc: 80 a2 20 00 cmp %o0, 0 400060d0: 12 80 00 24 bne 40006160 400060d4: c2 07 bf ec ld [ %fp + -20 ], %g1 return -1; if ( !loc.handlers ){ 400060d8: 80 a0 60 00 cmp %g1, 0 400060dc: 32 80 00 10 bne,a 4000611c 400060e0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 rtems_filesystem_freenode( &loc ); 400060e4: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 400060e8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400060ec: 02 80 00 08 be 4000610c <== NOT EXECUTED 400060f0: 01 00 00 00 nop <== NOT EXECUTED 400060f4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400060f8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400060fc: 02 80 00 04 be 4000610c <== NOT EXECUTED 40006100: 01 00 00 00 nop <== NOT EXECUTED 40006104: 9f c0 40 00 call %g1 <== NOT EXECUTED 40006108: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 4000610c: 40 00 a6 f7 call 4002fce8 <__errno> <== NOT EXECUTED 40006110: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40006114: 10 80 00 12 b 4000615c <== NOT EXECUTED 40006118: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED } if ( !loc.handlers->fchmod_h ){ 4000611c: 80 a0 60 00 cmp %g1, 0 40006120: 12 80 00 12 bne 40006168 40006124: 93 2e 60 10 sll %i1, 0x10, %o1 rtems_filesystem_freenode( &loc ); 40006128: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 4000612c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006130: 02 80 00 08 be 40006150 <== NOT EXECUTED 40006134: 01 00 00 00 nop <== NOT EXECUTED 40006138: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4000613c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006140: 02 80 00 04 be 40006150 <== NOT EXECUTED 40006144: 01 00 00 00 nop <== NOT EXECUTED 40006148: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000614c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40006150: 40 00 a6 e6 call 4002fce8 <__errno> <== NOT EXECUTED 40006154: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40006158: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000615c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40006160: 81 c7 e0 08 ret 40006164: 81 e8 00 00 restore } result = (*loc.handlers->fchmod_h)( &loc, mode ); 40006168: 90 10 00 10 mov %l0, %o0 4000616c: 9f c0 40 00 call %g1 40006170: 93 32 60 10 srl %o1, 0x10, %o1 rtems_filesystem_freenode( &loc ); 40006174: c2 07 bf f0 ld [ %fp + -16 ], %g1 40006178: 80 a0 60 00 cmp %g1, 0 4000617c: 02 bf ff f9 be 40006160 40006180: b0 10 00 08 mov %o0, %i0 40006184: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40006188: 80 a0 60 00 cmp %g1, 0 4000618c: 02 80 00 04 be 4000619c 40006190: 01 00 00 00 nop 40006194: 9f c0 40 00 call %g1 40006198: 90 10 00 10 mov %l0, %o0 return result; } 4000619c: 81 c7 e0 08 ret 400061a0: 81 e8 00 00 restore 4001f958 : int chown( const char *path, uid_t owner, gid_t group ) { 4001f958: 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 ) ) 4001f95c: 92 10 20 00 clr %o1 4001f960: 90 10 00 18 mov %i0, %o0 4001f964: a0 07 bf e8 add %fp, -24, %l0 4001f968: 96 10 20 01 mov 1, %o3 4001f96c: 94 10 00 10 mov %l0, %o2 4001f970: 7f ff 9a 6d call 40006324 4001f974: b0 10 3f ff mov -1, %i0 4001f978: 80 a2 20 00 cmp %o0, 0 4001f97c: 12 80 00 10 bne 4001f9bc 4001f980: c2 07 bf f0 ld [ %fp + -16 ], %g1 return -1; if ( !loc.ops->chown_h ) { 4001f984: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 4001f988: 80 a0 a0 00 cmp %g2, 0 4001f98c: 12 80 00 0e bne 4001f9c4 4001f990: 93 2e 60 10 sll %i1, 0x10, %o1 rtems_filesystem_freenode( &loc ); 4001f994: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4001f998: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001f99c: 02 80 00 04 be 4001f9ac <== NOT EXECUTED 4001f9a0: 01 00 00 00 nop <== NOT EXECUTED 4001f9a4: 9f c0 40 00 call %g1 <== NOT EXECUTED 4001f9a8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001f9ac: 40 00 40 cf call 4002fce8 <__errno> <== NOT EXECUTED 4001f9b0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001f9b4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4001f9b8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001f9bc: 81 c7 e0 08 ret 4001f9c0: 81 e8 00 00 restore } result = (*loc.ops->chown_h)( &loc, owner, group ); 4001f9c4: 95 2e a0 10 sll %i2, 0x10, %o2 4001f9c8: 93 32 60 10 srl %o1, 0x10, %o1 4001f9cc: 95 32 a0 10 srl %o2, 0x10, %o2 4001f9d0: 9f c0 80 00 call %g2 4001f9d4: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 4001f9d8: c2 07 bf f0 ld [ %fp + -16 ], %g1 4001f9dc: 80 a0 60 00 cmp %g1, 0 4001f9e0: 02 bf ff f7 be 4001f9bc 4001f9e4: b0 10 00 08 mov %o0, %i0 4001f9e8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4001f9ec: 80 a0 60 00 cmp %g1, 0 4001f9f0: 02 80 00 04 be 4001fa00 4001f9f4: 01 00 00 00 nop 4001f9f8: 9f c0 40 00 call %g1 4001f9fc: 90 10 00 10 mov %l0, %o0 return result; } 4001fa00: 81 c7 e0 08 ret 4001fa04: 81 e8 00 00 restore 4001fa08 : #include int chroot( const char *pathname ) { 4001fa08: 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) { 4001fa0c: 23 10 01 24 sethi %hi(0x40049000), %l1 4001fa10: e0 04 60 94 ld [ %l1 + 0x94 ], %l0 ! 40049094 4001fa14: 03 10 01 77 sethi %hi(0x4005dc00), %g1 4001fa18: 82 10 63 ec or %g1, 0x3ec, %g1 ! 4005dfec 4001fa1c: 80 a4 00 01 cmp %l0, %g1 4001fa20: 12 80 00 0e bne 4001fa58 4001fa24: 01 00 00 00 nop rtems_libio_set_private_env(); /* try to set a new private env*/ 4001fa28: 40 00 07 90 call 40021868 4001fa2c: 01 00 00 00 nop if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 4001fa30: c2 04 60 94 ld [ %l1 + 0x94 ], %g1 4001fa34: 80 a0 40 10 cmp %g1, %l0 4001fa38: 12 80 00 08 bne 4001fa58 4001fa3c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001fa40: 40 00 40 aa call 4002fce8 <__errno> <== NOT EXECUTED 4001fa44: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4001fa48: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4001fa4c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001fa50: 81 c7 e0 08 ret <== NOT EXECUTED 4001fa54: 81 e8 00 00 restore <== NOT EXECUTED } result = chdir(pathname); 4001fa58: 7f ff ff 7e call 4001f850 4001fa5c: 90 10 00 18 mov %i0, %o0 if (result) { 4001fa60: 80 a2 20 00 cmp %o0, 0 4001fa64: 12 80 00 0b bne 4001fa90 4001fa68: 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)) { 4001fa6c: 11 10 01 0e sethi %hi(0x40043800), %o0 4001fa70: 92 10 20 00 clr %o1 4001fa74: 90 12 22 80 or %o0, 0x280, %o0 4001fa78: 94 07 bf e8 add %fp, -24, %o2 4001fa7c: 7f ff 9a 2a call 40006324 4001fa80: 96 10 20 00 clr %o3 4001fa84: 80 a2 20 00 cmp %o0, 0 4001fa88: 02 80 00 0a be 4001fab0 4001fa8c: 03 10 01 24 sethi %hi(0x40049000), %g1 /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 4001fa90: 40 00 40 96 call 4002fce8 <__errno> <== NOT EXECUTED 4001fa94: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001fa98: 40 00 40 94 call 4002fce8 <__errno> <== NOT EXECUTED 4001fa9c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 4001faa0: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 4001faa4: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED 4001faa8: 81 c7 e0 08 ret <== NOT EXECUTED 4001faac: 81 e8 00 00 restore <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); 4001fab0: d0 00 60 94 ld [ %g1 + 0x94 ], %o0 4001fab4: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 4001fab8: 80 a0 60 00 cmp %g1, 0 4001fabc: 22 80 00 09 be,a 4001fae0 4001fac0: 03 10 01 24 sethi %hi(0x40049000), %g1 <== NOT EXECUTED 4001fac4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4004901c 4001fac8: 80 a0 60 00 cmp %g1, 0 4001facc: 22 80 00 05 be,a 4001fae0 4001fad0: 03 10 01 24 sethi %hi(0x40049000), %g1 <== NOT EXECUTED 4001fad4: 9f c0 40 00 call %g1 4001fad8: 90 02 20 14 add %o0, 0x14, %o0 rtems_filesystem_root = loc; 4001fadc: 03 10 01 24 sethi %hi(0x40049000), %g1 4001fae0: d0 00 60 94 ld [ %g1 + 0x94 ], %o0 ! 40049094 4001fae4: 92 07 bf e8 add %fp, -24, %o1 4001fae8: 94 10 20 10 mov 0x10, %o2 4001faec: 90 02 20 14 add %o0, 0x14, %o0 4001faf0: 40 00 4a 6b call 4003249c 4001faf4: b0 10 20 00 clr %i0 return 0; } 4001faf8: 81 c7 e0 08 ret 4001fafc: 81 e8 00 00 restore 4002d38c : * close a directory. */ int closedir( DIR *dirp ) { 4002d38c: 9d e3 bf 98 save %sp, -104, %sp int fd; if ( !dirp ) 4002d390: a0 96 20 00 orcc %i0, 0, %l0 4002d394: 32 80 00 08 bne,a 4002d3b4 4002d398: d0 04 20 0c ld [ %l0 + 0xc ], %o0 rtems_set_errno_and_return_minus_one( EBADF ); 4002d39c: 40 00 0a 53 call 4002fce8 <__errno> <== NOT EXECUTED 4002d3a0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002d3a4: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 4002d3a8: 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)); } 4002d3ac: 81 c7 e0 08 ret <== NOT EXECUTED 4002d3b0: 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; 4002d3b4: 82 10 3f ff mov -1, %g1 int fd; if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); fd = dirp->dd_fd; 4002d3b8: f0 04 00 00 ld [ %l0 ], %i0 dirp->dd_fd = -1; dirp->dd_loc = 0; 4002d3bc: c0 24 20 04 clr [ %l0 + 4 ] (void)free((void *)dirp->dd_buf); 4002d3c0: 7f ff 64 2b call 4000646c 4002d3c4: c2 24 00 00 st %g1, [ %l0 ] (void)free((void *)dirp); 4002d3c8: 7f ff 64 29 call 4000646c 4002d3cc: 90 10 00 10 mov %l0, %o0 return(close(fd)); 4002d3d0: 7f ff 63 75 call 400061a4 4002d3d4: 81 e8 00 00 restore 4002d3d8: 01 00 00 00 nop 4000d01c : */ int device_close( rtems_libio_t *iop ) { 4000d01c: 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; 4000d020: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 args.iop = iop; 4000d024: f0 27 bf ec st %i0, [ %fp + -20 ] args.flags = 0; 4000d028: c0 27 bf f0 clr [ %fp + -16 ] args.mode = 0; 4000d02c: c0 27 bf f4 clr [ %fp + -12 ] status = rtems_io_close( 4000d030: d2 00 60 50 ld [ %g1 + 0x50 ], %o1 4000d034: d0 00 60 4c ld [ %g1 + 0x4c ], %o0 4000d038: 94 07 bf ec add %fp, -20, %o2 4000d03c: 40 00 02 15 call 4000d890 4000d040: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 4000d044: 80 a2 20 00 cmp %o0, 0 4000d048: 02 80 00 05 be 4000d05c 4000d04c: 01 00 00 00 nop return rtems_deviceio_errno(status); 4000d050: 7f ff ff a3 call 4000cedc <== NOT EXECUTED 4000d054: 01 00 00 00 nop <== NOT EXECUTED 4000d058: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } return 0; } 4000d05c: 81 c7 e0 08 ret 4000d060: 81 e8 00 00 restore 4000cf10 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4000cf10: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED args.iop = iop; args.command = command; args.buffer = buffer; the_jnode = iop->file_info; 4000cf14: 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; 4000cf18: f2 27 bf ec st %i1, [ %fp + -20 ] <== NOT EXECUTED args.buffer = buffer; 4000cf1c: 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; 4000cf20: 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( 4000cf24: d2 00 60 50 ld [ %g1 + 0x50 ], %o1 <== NOT EXECUTED 4000cf28: d0 00 60 4c ld [ %g1 + 0x4c ], %o0 <== NOT EXECUTED 4000cf2c: 40 00 02 6f call 4000d8e8 <== NOT EXECUTED 4000cf30: 94 07 bf e8 add %fp, -24, %o2 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000cf34: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000cf38: 22 80 00 06 be,a 4000cf50 <== NOT EXECUTED 4000cf3c: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED return rtems_deviceio_errno(status); 4000cf40: 7f ff ff e7 call 4000cedc <== NOT EXECUTED 4000cf44: 01 00 00 00 nop <== NOT EXECUTED return args.ioctl_return; } 4000cf48: 81 c7 e0 08 ret <== NOT EXECUTED 4000cf4c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000cf50: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4000cf54: 81 c7 e0 08 ret <== NOT EXECUTED 4000cf58: 81 e8 00 00 restore <== NOT EXECUTED 4000d064 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4000d064: 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; 4000d068: 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; 4000d06c: c4 06 20 2c ld [ %i0 + 0x2c ], %g2 args.iop = iop; 4000d070: f0 27 bf ec st %i0, [ %fp + -20 ] args.flags = iop->flags; 4000d074: c2 27 bf f0 st %g1, [ %fp + -16 ] args.mode = mode; 4000d078: f6 27 bf f4 st %i3, [ %fp + -12 ] status = rtems_io_open( 4000d07c: d2 00 a0 50 ld [ %g2 + 0x50 ], %o1 4000d080: d0 00 a0 4c ld [ %g2 + 0x4c ], %o0 4000d084: 94 07 bf ec add %fp, -20, %o2 4000d088: 40 00 02 2e call 4000d940 4000d08c: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000d090: 80 a2 20 00 cmp %o0, 0 4000d094: 02 80 00 05 be 4000d0a8 4000d098: 01 00 00 00 nop return rtems_deviceio_errno(status); 4000d09c: 7f ff ff 90 call 4000cedc <== NOT EXECUTED 4000d0a0: 01 00 00 00 nop <== NOT EXECUTED 4000d0a4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED return 0; } 4000d0a8: 81 c7 e0 08 ret 4000d0ac: 81 e8 00 00 restore 4000cfbc : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4000cfbc: 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; 4000cfc0: 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; 4000cfc4: 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; 4000cfc8: c6 06 20 2c ld [ %i0 + 0x2c ], %g3 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; 4000cfcc: 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; 4000cfd0: c2 27 bf e4 st %g1, [ %fp + -28 ] <== NOT EXECUTED args.buffer = buffer; args.count = count; 4000cfd4: f4 27 bf ec st %i2, [ %fp + -20 ] <== NOT EXECUTED args.flags = iop->flags; 4000cfd8: 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; 4000cfdc: 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; 4000cfe0: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED status = rtems_io_read( 4000cfe4: d2 00 e0 50 ld [ %g3 + 0x50 ], %o1 <== NOT EXECUTED 4000cfe8: d0 00 e0 4c ld [ %g3 + 0x4c ], %o0 <== NOT EXECUTED 4000cfec: 40 00 02 6b call 4000d998 <== NOT EXECUTED 4000cff0: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000cff4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000cff8: 22 80 00 06 be,a 4000d010 <== NOT EXECUTED 4000cffc: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED return rtems_deviceio_errno(status); 4000d000: 7f ff ff b7 call 4000cedc <== NOT EXECUTED 4000d004: 01 00 00 00 nop <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4000d008: 81 c7 e0 08 ret <== NOT EXECUTED 4000d00c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000d010: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4000d014: 81 c7 e0 08 ret <== NOT EXECUTED 4000d018: 81 e8 00 00 restore <== NOT EXECUTED 4000cf5c : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4000cf5c: 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; 4000cf60: 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; 4000cf64: 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; 4000cf68: c6 06 20 2c ld [ %i0 + 0x2c ], %g3 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 4000cf6c: 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; 4000cf70: c2 27 bf e4 st %g1, [ %fp + -28 ] args.buffer = (void *) buffer; args.count = count; 4000cf74: f4 27 bf ec st %i2, [ %fp + -20 ] args.flags = iop->flags; 4000cf78: 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; 4000cf7c: 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; 4000cf80: c0 27 bf f4 clr [ %fp + -12 ] status = rtems_io_write( 4000cf84: d2 00 e0 50 ld [ %g3 + 0x50 ], %o1 4000cf88: d0 00 e0 4c ld [ %g3 + 0x4c ], %o0 4000cf8c: 40 00 02 99 call 4000d9f0 4000cf90: 94 07 bf e0 add %fp, -32, %o2 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000cf94: 80 a2 20 00 cmp %o0, 0 4000cf98: 22 80 00 06 be,a 4000cfb0 4000cf9c: d0 07 bf f4 ld [ %fp + -12 ], %o0 return rtems_deviceio_errno(status); 4000cfa0: 7f ff ff cf call 4000cedc <== NOT EXECUTED 4000cfa4: 01 00 00 00 nop <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4000cfa8: 81 c7 e0 08 ret <== NOT EXECUTED 4000cfac: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000cfb0: b0 10 00 08 mov %o0, %i0 4000cfb4: 81 c7 e0 08 ret 4000cfb8: 81 e8 00 00 restore 40004ac4 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 40004ac4: 9d e3 bf 98 save %sp, -104, %sp rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 40004ac8: c2 06 20 b4 ld [ %i0 + 0xb4 ], %g1 40004acc: 80 a0 60 00 cmp %g1, 0 40004ad0: 02 80 00 1a be 40004b38 40004ad4: 01 00 00 00 nop rtems_interrupt_disable (level); 40004ad8: 7f ff f4 a0 call 40001d58 <== NOT EXECUTED 40004adc: 01 00 00 00 nop <== NOT EXECUTED while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 40004ae0: 10 80 00 0f b 40004b1c <== NOT EXECUTED 40004ae4: a0 10 20 02 mov 2, %l0 ! 2 <== NOT EXECUTED rtems_interrupt_enable (level); 40004ae8: 7f ff f4 a0 call 40001d68 <== NOT EXECUTED 40004aec: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 40004af0: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 40004af4: 92 10 20 00 clr %o1 <== NOT EXECUTED 40004af8: 40 00 06 28 call 40006398 <== NOT EXECUTED 40004afc: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 40004b00: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004b04: 02 80 00 04 be 40004b14 <== NOT EXECUTED 40004b08: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40004b0c: 40 00 07 e5 call 40006aa0 <== NOT EXECUTED 40004b10: 01 00 00 00 nop <== NOT EXECUTED rtems_interrupt_disable (level); 40004b14: 7f ff f4 91 call 40001d58 <== NOT EXECUTED 40004b18: 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) { 40004b1c: c4 06 20 84 ld [ %i0 + 0x84 ], %g2 <== NOT EXECUTED 40004b20: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 40004b24: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004b28: 32 bf ff f0 bne,a 40004ae8 <== NOT EXECUTED 40004b2c: 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); 40004b30: 7f ff f4 8e call 40001d68 <== NOT EXECUTED 40004b34: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40004b38: 81 c7 e0 08 ret 40004b3c: 81 e8 00 00 restore 40003cdc : int dup2( int fildes, int fildes2 ) { 40003cdc: 9d e3 bf 48 save %sp, -184, %sp /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 40003ce0: a0 07 bf a8 add %fp, -88, %l0 40003ce4: 90 10 00 18 mov %i0, %o0 40003ce8: 40 00 01 dd call 4000445c 40003cec: 92 10 00 10 mov %l0, %o1 if ( status == -1 ) 40003cf0: 80 a2 3f ff cmp %o0, -1 40003cf4: 02 80 00 0e be 40003d2c 40003cf8: 90 10 3f ff mov -1, %o0 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 40003cfc: 92 10 00 10 mov %l0, %o1 40003d00: 40 00 01 d7 call 4000445c 40003d04: 90 10 00 19 mov %i1, %o0 if ( status == -1 ) 40003d08: 80 a2 3f ff cmp %o0, -1 40003d0c: 02 80 00 07 be 40003d28 40003d10: 90 10 00 18 mov %i0, %o0 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 40003d14: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED 40003d18: 40 00 00 97 call 40003f74 <== NOT EXECUTED 40003d1c: 92 10 20 00 clr %o1 <== NOT EXECUTED } 40003d20: 81 c7 e0 08 ret <== NOT EXECUTED 40003d24: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 40003d28: 90 10 3f ff mov -1, %o0 } 40003d2c: b0 10 00 08 mov %o0, %i0 40003d30: 81 c7 e0 08 ret 40003d34: 81 e8 00 00 restore 40004530 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 40004530: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 40004534: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 40004538: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 4000453c: 02 80 00 1b be 400045a8 <== NOT EXECUTED 40004540: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40004544: 03 10 00 64 sethi %hi(0x40019000), %g1 <== NOT EXECUTED 40004548: c2 00 63 d0 ld [ %g1 + 0x3d0 ], %g1 ! 400193d0 <__ctype_ptr> <== NOT EXECUTED 4000454c: 84 0e 20 ff and %i0, 0xff, %g2 <== NOT EXECUTED 40004550: c2 08 40 02 ldub [ %g1 + %g2 ], %g1 <== NOT EXECUTED 40004554: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40004558: 22 80 00 15 be,a 400045ac <== NOT EXECUTED 4000455c: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED 40004560: 80 a0 a0 09 cmp %g2, 9 <== NOT EXECUTED 40004564: 02 80 00 11 be 400045a8 <== NOT EXECUTED 40004568: 80 a0 a0 0a cmp %g2, 0xa <== NOT EXECUTED 4000456c: 02 80 00 10 be 400045ac <== NOT EXECUTED 40004570: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 40004574: 82 1e 20 40 xor %i0, 0x40, %g1 <== NOT EXECUTED 40004578: 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] = '^'; 4000457c: 82 10 20 5e mov 0x5e, %g1 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 40004580: 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] = '^'; 40004584: c2 2f bf f0 stb %g1, [ %fp + -16 ] <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 40004588: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 4000458c: 7f ff ff 3b call 40004278 <== NOT EXECUTED 40004590: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED tty->column += 2; 40004594: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 40004598: 82 00 60 02 add %g1, 2, %g1 <== NOT EXECUTED 4000459c: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED 400045a0: 81 c7 e0 08 ret <== NOT EXECUTED 400045a4: 81 e8 00 00 restore <== NOT EXECUTED } else { oproc (c, tty); 400045a8: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED 400045ac: 7f ff ff 7f call 400043a8 <== NOT EXECUTED 400045b0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400045b4: 81 c7 e0 08 ret <== NOT EXECUTED 400045b8: 81 e8 00 00 restore <== NOT EXECUTED 40020570 : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 40020570: 03 10 01 73 sethi %hi(0x4005cc00), %g1 <== NOT EXECUTED 40020574: d0 00 62 1c ld [ %g1 + 0x21c ], %o0 ! 4005ce1c <== NOT EXECUTED 40020578: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002057c: 02 80 00 05 be 40020590 <== NOT EXECUTED 40020580: 01 00 00 00 nop <== NOT EXECUTED fclose(group_fp); 40020584: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40020588: 40 00 3e 30 call 4002fe48 <== NOT EXECUTED 4002058c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40020590: 81 c3 e0 08 retl <== NOT EXECUTED 40020594: 01 00 00 00 nop 40020598 : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 40020598: 03 10 01 73 sethi %hi(0x4005cc00), %g1 <== NOT EXECUTED 4002059c: d0 00 61 34 ld [ %g1 + 0x134 ], %o0 ! 4005cd34 <== NOT EXECUTED 400205a0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400205a4: 02 80 00 05 be 400205b8 <== NOT EXECUTED 400205a8: 01 00 00 00 nop <== NOT EXECUTED fclose(passwd_fp); 400205ac: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400205b0: 40 00 3e 26 call 4002fe48 <== NOT EXECUTED 400205b4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400205b8: 81 c3 e0 08 retl <== NOT EXECUTED 400205bc: 01 00 00 00 nop 400045bc : * 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) { 400045bc: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (tty->ccount == 0) 400045c0: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 <== NOT EXECUTED 400045c4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400045c8: 02 80 00 0a be 400045f0 <== NOT EXECUTED 400045cc: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED return; if (lineFlag) { 400045d0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 400045d4: 02 80 00 78 be 400047b4 <== NOT EXECUTED 400045d8: 03 10 00 64 sethi %hi(0x40019000), %g1 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { 400045dc: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 400045e0: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 400045e4: 32 80 00 05 bne,a 400045f8 <== NOT EXECUTED 400045e8: 80 88 60 10 btst 0x10, %g1 <== NOT EXECUTED tty->ccount = 0; 400045ec: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED 400045f0: 81 c7 e0 08 ret <== NOT EXECUTED 400045f4: 81 e8 00 00 restore <== NOT EXECUTED return; } if (!(tty->termios.c_lflag & ECHOE)) { 400045f8: 12 80 00 6f bne 400047b4 <== NOT EXECUTED 400045fc: 03 10 00 64 sethi %hi(0x40019000), %g1 <== NOT EXECUTED tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 40004600: 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; 40004604: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 40004608: 7f ff ff ca call 40004530 <== NOT EXECUTED 4000460c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 40004610: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED echo ('\n', tty); 40004614: 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) 40004618: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 4000461c: 02 bf ff f5 be 400045f0 <== NOT EXECUTED 40004620: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED 40004624: 30 80 00 0f b,a 40004660 <== NOT EXECUTED } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { 40004628: c4 04 20 3c ld [ %l0 + 0x3c ], %g2 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 4000462c: 86 00 ff ff add %g3, -1, %g3 <== NOT EXECUTED 40004630: c6 24 20 20 st %g3, [ %l0 + 0x20 ] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 40004634: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED 40004638: 02 80 00 5a be 400047a0 <== NOT EXECUTED 4000463c: c2 08 40 03 ldub [ %g1 + %g3 ], %g1 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 40004640: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40004644: 12 80 00 09 bne 40004668 <== NOT EXECUTED 40004648: b0 08 60 ff and %g1, 0xff, %i0 <== NOT EXECUTED 4000464c: 80 88 a0 10 btst 0x10, %g2 <== NOT EXECUTED 40004650: 12 80 00 07 bne 4000466c <== NOT EXECUTED 40004654: 80 a6 20 09 cmp %i0, 9 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); 40004658: f0 0c 20 43 ldub [ %l0 + 0x43 ], %i0 <== NOT EXECUTED 4000465c: b2 10 00 10 mov %l0, %i1 <== NOT EXECUTED 40004660: 7f ff ff b4 call 40004530 <== NOT EXECUTED 40004664: 81 e8 00 00 restore <== NOT EXECUTED } else if (c == '\t') { 40004668: 80 a6 20 09 cmp %i0, 9 <== NOT EXECUTED 4000466c: 32 80 00 29 bne,a 40004710 <== NOT EXECUTED 40004670: 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) 40004674: 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; 40004678: 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)) { 4000467c: c8 04 40 00 ld [ %l1 ], %g4 <== NOT EXECUTED 40004680: 10 80 00 12 b 400046c8 <== NOT EXECUTED 40004684: 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') { 40004688: c2 08 40 02 ldub [ %g1 + %g2 ], %g1 <== NOT EXECUTED 4000468c: 80 a0 60 09 cmp %g1, 9 <== NOT EXECUTED 40004690: 32 80 00 05 bne,a 400046a4 <== NOT EXECUTED 40004694: c2 09 00 01 ldub [ %g4 + %g1 ], %g1 <== NOT EXECUTED col = (col | 7) + 1; 40004698: 82 16 20 07 or %i0, 7, %g1 <== NOT EXECUTED 4000469c: 10 80 00 0a b 400046c4 <== NOT EXECUTED 400046a0: b0 00 60 01 add %g1, 1, %i0 <== NOT EXECUTED } else if (iscntrl (c)) { 400046a4: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 400046a8: 22 80 00 07 be,a 400046c4 <== NOT EXECUTED 400046ac: b0 06 20 01 inc %i0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 400046b0: 80 a3 60 00 cmp %o5, 0 <== NOT EXECUTED 400046b4: 32 80 00 04 bne,a 400046c4 <== NOT EXECUTED 400046b8: b0 06 20 02 add %i0, 2, %i0 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 400046bc: 10 80 00 03 b 400046c8 <== NOT EXECUTED 400046c0: 84 00 a0 01 inc %g2 <== NOT EXECUTED 400046c4: 84 00 a0 01 inc %g2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 400046c8: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED 400046cc: 32 bf ff ef bne,a 40004688 <== NOT EXECUTED 400046d0: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 400046d4: 10 80 00 08 b 400046f4 <== NOT EXECUTED 400046d8: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 400046dc: 7f ff fe e7 call 40004278 <== NOT EXECUTED 400046e0: 01 00 00 00 nop <== NOT EXECUTED tty->column--; 400046e4: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 400046e8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400046ec: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 400046f0: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 400046f4: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 400046f8: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 400046fc: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED 40004700: 14 bf ff f7 bg 400046dc <== NOT EXECUTED 40004704: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 40004708: 10 80 00 27 b 400047a4 <== NOT EXECUTED 4000470c: 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)) { 40004710: c2 08 40 18 ldub [ %g1 + %i0 ], %g1 <== NOT EXECUTED 40004714: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40004718: 22 80 00 10 be,a 40004758 <== NOT EXECUTED 4000471c: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED 40004720: 80 88 a2 00 btst 0x200, %g2 <== NOT EXECUTED 40004724: 22 80 00 0d be,a 40004758 <== NOT EXECUTED 40004728: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 4000472c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40004730: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 40004734: 7f ff fe d1 call 40004278 <== NOT EXECUTED 40004738: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) 4000473c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40004740: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004744: 22 80 00 05 be,a 40004758 <== NOT EXECUTED 40004748: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED tty->column--; 4000474c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40004750: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 40004754: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED 40004758: c2 08 40 18 ldub [ %g1 + %i0 ], %g1 <== NOT EXECUTED 4000475c: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40004760: 02 80 00 07 be 4000477c <== NOT EXECUTED 40004764: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40004768: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 4000476c: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 40004770: 02 80 00 0d be 400047a4 <== NOT EXECUTED 40004774: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 40004778: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4000477c: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 40004780: 7f ff fe be call 40004278 <== NOT EXECUTED 40004784: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) 40004788: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 4000478c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004790: 02 80 00 05 be 400047a4 <== NOT EXECUTED 40004794: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED tty->column--; 40004798: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000479c: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED } } } if (!lineFlag) 400047a0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 400047a4: 32 80 00 0a bne,a 400047cc <== NOT EXECUTED 400047a8: c6 04 20 20 ld [ %l0 + 0x20 ], %g3 <== NOT EXECUTED 400047ac: 81 c7 e0 08 ret <== NOT EXECUTED 400047b0: 81 e8 00 00 restore <== NOT EXECUTED 400047b4: a2 10 63 d0 or %g1, 0x3d0, %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); 400047b8: 03 10 00 5f sethi %hi(0x40017c00), %g1 <== NOT EXECUTED 400047bc: a4 10 63 90 or %g1, 0x390, %l2 ! 40017f90 <__func__.4894+0x280> <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 400047c0: 03 10 00 5f sethi %hi(0x40017c00), %g1 <== NOT EXECUTED 400047c4: a6 10 63 88 or %g1, 0x388, %l3 ! 40017f88 <__func__.4894+0x278> <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 400047c8: c6 04 20 20 ld [ %l0 + 0x20 ], %g3 <== NOT EXECUTED 400047cc: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 400047d0: 32 bf ff 96 bne,a 40004628 <== NOT EXECUTED 400047d4: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED 400047d8: 81 c7 e0 08 ret <== NOT EXECUTED 400047dc: 81 e8 00 00 restore <== NOT EXECUTED 4002d3dc : #include int fchdir( int fd ) { 4002d3dc: 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 ); 4002d3e0: 03 10 01 21 sethi %hi(0x40048400), %g1 <== NOT EXECUTED 4002d3e4: c2 00 62 08 ld [ %g1 + 0x208 ], %g1 ! 40048608 <== NOT EXECUTED 4002d3e8: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 4002d3ec: 1a 80 00 0e bcc 4002d424 <== NOT EXECUTED 4002d3f0: 01 00 00 00 nop <== NOT EXECUTED iop = rtems_libio_iop( fd ); 4002d3f4: 03 10 01 75 sethi %hi(0x4005d400), %g1 <== NOT EXECUTED 4002d3f8: c6 00 63 54 ld [ %g1 + 0x354 ], %g3 ! 4005d754 <== NOT EXECUTED 4002d3fc: 85 2e 20 02 sll %i0, 2, %g2 <== NOT EXECUTED 4002d400: 83 2e 20 04 sll %i0, 4, %g1 <== NOT EXECUTED 4002d404: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 4002d408: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED 4002d40c: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 4002d410: 82 00 c0 01 add %g3, %g1, %g1 <== NOT EXECUTED rtems_libio_check_is_open(iop); 4002d414: c8 00 60 0c ld [ %g1 + 0xc ], %g4 <== NOT EXECUTED 4002d418: 80 89 21 00 btst 0x100, %g4 <== NOT EXECUTED 4002d41c: 12 80 00 06 bne 4002d434 <== NOT EXECUTED 4002d420: 80 89 20 02 btst 2, %g4 <== NOT EXECUTED 4002d424: 40 00 0a 31 call 4002fce8 <__errno> <== NOT EXECUTED 4002d428: 01 00 00 00 nop <== NOT EXECUTED 4002d42c: 10 80 00 1b b 4002d498 <== NOT EXECUTED 4002d430: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 4002d434: 32 80 00 06 bne,a 4002d44c <== NOT EXECUTED 4002d438: c8 00 60 18 ld [ %g1 + 0x18 ], %g4 <== NOT EXECUTED 4002d43c: 40 00 0a 2b call 4002fce8 <__errno> <== NOT EXECUTED 4002d440: 01 00 00 00 nop <== NOT EXECUTED 4002d444: 10 80 00 15 b 4002d498 <== NOT EXECUTED 4002d448: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 4002d44c: 80 a1 20 00 cmp %g4, 0 <== NOT EXECUTED 4002d450: 02 80 00 06 be 4002d468 <== NOT EXECUTED 4002d454: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 4002d458: c4 01 20 10 ld [ %g4 + 0x10 ], %g2 <== NOT EXECUTED 4002d45c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4002d460: 32 80 00 06 bne,a 4002d478 <== NOT EXECUTED 4002d464: b0 00 60 10 add %g1, 0x10, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002d468: 40 00 0a 20 call 4002fce8 <__errno> <== NOT EXECUTED 4002d46c: 01 00 00 00 nop <== NOT EXECUTED 4002d470: 10 80 00 0a b 4002d498 <== NOT EXECUTED 4002d474: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 4002d478: 9f c0 80 00 call %g2 <== NOT EXECUTED 4002d47c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4002d480: 80 a2 20 01 cmp %o0, 1 <== NOT EXECUTED 4002d484: 02 80 00 07 be 4002d4a0 <== NOT EXECUTED 4002d488: 25 10 01 24 sethi %hi(0x40049000), %l2 <== NOT EXECUTED RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 4002d48c: 40 00 0a 17 call 4002fce8 <__errno> <== NOT EXECUTED 4002d490: 01 00 00 00 nop <== NOT EXECUTED 4002d494: 82 10 20 14 mov 0x14, %g1 ! 14 <== NOT EXECUTED 4002d498: 10 80 00 1b b 4002d504 <== NOT EXECUTED 4002d49c: 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; 4002d4a0: e0 04 a0 94 ld [ %l2 + 0x94 ], %l0 <== NOT EXECUTED 4002d4a4: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 4002d4a8: a0 04 20 04 add %l0, 4, %l0 <== NOT EXECUTED 4002d4ac: a2 07 bf d8 add %fp, -40, %l1 <== NOT EXECUTED 4002d4b0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4002d4b4: 40 00 13 fa call 4003249c <== NOT EXECUTED 4002d4b8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 4002d4bc: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4002d4c0: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 4002d4c4: 40 00 13 f6 call 4003249c <== NOT EXECUTED 4002d4c8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 4002d4cc: 92 10 20 00 clr %o1 <== NOT EXECUTED 4002d4d0: 11 10 01 0e sethi %hi(0x40043800), %o0 <== NOT EXECUTED 4002d4d4: 94 07 bf e8 add %fp, -24, %o2 <== NOT EXECUTED 4002d4d8: 90 12 22 80 or %o0, 0x280, %o0 <== NOT EXECUTED 4002d4dc: 7f ff 63 92 call 40006324 <== NOT EXECUTED 4002d4e0: 96 10 20 00 clr %o3 <== NOT EXECUTED 4002d4e4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002d4e8: 02 80 00 09 be 4002d50c <== NOT EXECUTED 4002d4ec: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 4002d4f0: d0 04 a0 94 ld [ %l2 + 0x94 ], %o0 <== NOT EXECUTED 4002d4f4: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 4002d4f8: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED 4002d4fc: 40 00 13 e8 call 4003249c <== NOT EXECUTED 4002d500: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 4002d504: 81 c7 e0 08 ret <== NOT EXECUTED 4002d508: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED return -1; } /* release the old one */ rtems_filesystem_freenode( &saved ); 4002d50c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002d510: 22 80 00 09 be,a 4002d534 <== NOT EXECUTED 4002d514: 03 10 01 24 sethi %hi(0x40049000), %g1 <== NOT EXECUTED 4002d518: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4004901c <== NOT EXECUTED 4002d51c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002d520: 22 80 00 05 be,a 4002d534 <== NOT EXECUTED 4002d524: 03 10 01 24 sethi %hi(0x40049000), %g1 <== NOT EXECUTED 4002d528: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002d52c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_filesystem_current = loc; 4002d530: 03 10 01 24 sethi %hi(0x40049000), %g1 <== NOT EXECUTED 4002d534: d0 00 60 94 ld [ %g1 + 0x94 ], %o0 ! 40049094 <== NOT EXECUTED 4002d538: 92 07 bf e8 add %fp, -24, %o1 <== NOT EXECUTED 4002d53c: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 4002d540: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED 4002d544: 40 00 13 d6 call 4003249c <== NOT EXECUTED 4002d548: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 4002d54c: 81 c7 e0 08 ret <== NOT EXECUTED 4002d550: 81 e8 00 00 restore <== NOT EXECUTED 4001fd3c : int fchmod( int fd, mode_t mode ) { 4001fd3c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 4001fd40: 03 10 01 21 sethi %hi(0x40048400), %g1 <== NOT EXECUTED 4001fd44: c2 00 62 08 ld [ %g1 + 0x208 ], %g1 ! 40048608 <== NOT EXECUTED 4001fd48: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 4001fd4c: 1a 80 00 0e bcc 4001fd84 <== NOT EXECUTED 4001fd50: 01 00 00 00 nop <== NOT EXECUTED iop = rtems_libio_iop( fd ); 4001fd54: 03 10 01 75 sethi %hi(0x4005d400), %g1 <== NOT EXECUTED 4001fd58: c6 00 63 54 ld [ %g1 + 0x354 ], %g3 ! 4005d754 <== NOT EXECUTED 4001fd5c: 85 2e 20 02 sll %i0, 2, %g2 <== NOT EXECUTED 4001fd60: 83 2e 20 04 sll %i0, 4, %g1 <== NOT EXECUTED 4001fd64: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 4001fd68: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED 4001fd6c: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 4001fd70: 84 00 c0 01 add %g3, %g1, %g2 <== NOT EXECUTED rtems_libio_check_is_open(iop); 4001fd74: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 <== NOT EXECUTED 4001fd78: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 4001fd7c: 12 80 00 06 bne 4001fd94 <== NOT EXECUTED 4001fd80: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 4001fd84: 40 00 3f d9 call 4002fce8 <__errno> <== NOT EXECUTED 4001fd88: 01 00 00 00 nop <== NOT EXECUTED 4001fd8c: 10 80 00 0f b 4001fdc8 <== NOT EXECUTED 4001fd90: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4001fd94: 32 80 00 06 bne,a 4001fdac <== NOT EXECUTED 4001fd98: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 <== NOT EXECUTED 4001fd9c: 40 00 3f d3 call 4002fce8 <__errno> <== NOT EXECUTED 4001fda0: 01 00 00 00 nop <== NOT EXECUTED 4001fda4: 10 80 00 09 b 4001fdc8 <== NOT EXECUTED 4001fda8: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 4001fdac: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4001fdb0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001fdb4: 32 80 00 08 bne,a 4001fdd4 <== NOT EXECUTED 4001fdb8: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001fdbc: 40 00 3f cb call 4002fce8 <__errno> <== NOT EXECUTED 4001fdc0: 01 00 00 00 nop <== NOT EXECUTED 4001fdc4: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4001fdc8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001fdcc: 10 80 00 07 b 4001fde8 <== NOT EXECUTED 4001fdd0: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 4001fdd4: 93 2e 60 10 sll %i1, 0x10, %o1 <== NOT EXECUTED 4001fdd8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4001fddc: 90 00 a0 10 add %g2, 0x10, %o0 <== NOT EXECUTED 4001fde0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4001fde4: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED } 4001fde8: 81 c7 e0 08 ret <== NOT EXECUTED 4001fdec: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4001fdf0 : int fchown( int fd, uid_t owner, gid_t group ) { 4001fdf0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 4001fdf4: 03 10 01 21 sethi %hi(0x40048400), %g1 <== NOT EXECUTED 4001fdf8: c2 00 62 08 ld [ %g1 + 0x208 ], %g1 ! 40048608 <== NOT EXECUTED 4001fdfc: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 4001fe00: 1a 80 00 0e bcc 4001fe38 <== NOT EXECUTED 4001fe04: 01 00 00 00 nop <== NOT EXECUTED iop = rtems_libio_iop( fd ); 4001fe08: 03 10 01 75 sethi %hi(0x4005d400), %g1 <== NOT EXECUTED 4001fe0c: c6 00 63 54 ld [ %g1 + 0x354 ], %g3 ! 4005d754 <== NOT EXECUTED 4001fe10: 85 2e 20 02 sll %i0, 2, %g2 <== NOT EXECUTED 4001fe14: 83 2e 20 04 sll %i0, 4, %g1 <== NOT EXECUTED 4001fe18: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 4001fe1c: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED 4001fe20: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 4001fe24: 84 00 c0 01 add %g3, %g1, %g2 <== NOT EXECUTED rtems_libio_check_is_open(iop); 4001fe28: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 <== NOT EXECUTED 4001fe2c: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 4001fe30: 12 80 00 06 bne 4001fe48 <== NOT EXECUTED 4001fe34: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 4001fe38: 40 00 3f ac call 4002fce8 <__errno> <== NOT EXECUTED 4001fe3c: 01 00 00 00 nop <== NOT EXECUTED 4001fe40: 10 80 00 0f b 4001fe7c <== NOT EXECUTED 4001fe44: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4001fe48: 32 80 00 06 bne,a 4001fe60 <== NOT EXECUTED 4001fe4c: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 <== NOT EXECUTED 4001fe50: 40 00 3f a6 call 4002fce8 <__errno> <== NOT EXECUTED 4001fe54: 01 00 00 00 nop <== NOT EXECUTED 4001fe58: 10 80 00 09 b 4001fe7c <== NOT EXECUTED 4001fe5c: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 4001fe60: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 4001fe64: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001fe68: 12 80 00 08 bne 4001fe88 <== NOT EXECUTED 4001fe6c: 93 2e 60 10 sll %i1, 0x10, %o1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001fe70: 40 00 3f 9e call 4002fce8 <__errno> <== NOT EXECUTED 4001fe74: 01 00 00 00 nop <== NOT EXECUTED 4001fe78: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4001fe7c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001fe80: 10 80 00 07 b 4001fe9c <== NOT EXECUTED 4001fe84: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 4001fe88: 95 2e a0 10 sll %i2, 0x10, %o2 <== NOT EXECUTED 4001fe8c: 90 00 a0 10 add %g2, 0x10, %o0 <== NOT EXECUTED 4001fe90: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 4001fe94: 9f c0 40 00 call %g1 <== NOT EXECUTED 4001fe98: 95 32 a0 10 srl %o2, 0x10, %o2 <== NOT EXECUTED } 4001fe9c: 81 c7 e0 08 ret <== NOT EXECUTED 4001fea0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4002d57c : int fcntl( int fd, int cmd, ... ) { 4002d57c: 9d e3 bf 90 save %sp, -112, %sp int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 4002d580: 03 10 01 21 sethi %hi(0x40048400), %g1 4002d584: da 00 62 08 ld [ %g1 + 0x208 ], %o5 ! 40048608 ... ) { int ret; va_list ap; va_start( ap, cmd ); 4002d588: 86 07 a0 4c add %fp, 0x4c, %g3 4002d58c: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 4002d590: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 4002d594: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 4002d598: fa 27 a0 58 st %i5, [ %fp + 0x58 ] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 4002d59c: 80 a6 00 0d cmp %i0, %o5 4002d5a0: 1a 80 00 0e bcc 4002d5d8 4002d5a4: c6 27 bf f4 st %g3, [ %fp + -12 ] iop = rtems_libio_iop( fd ); 4002d5a8: 03 10 01 75 sethi %hi(0x4005d400), %g1 4002d5ac: c8 00 63 54 ld [ %g1 + 0x354 ], %g4 ! 4005d754 4002d5b0: 85 2e 20 02 sll %i0, 2, %g2 4002d5b4: 83 2e 20 04 sll %i0, 4, %g1 4002d5b8: 82 20 40 02 sub %g1, %g2, %g1 4002d5bc: 82 00 40 18 add %g1, %i0, %g1 4002d5c0: 83 28 60 02 sll %g1, 2, %g1 4002d5c4: b8 01 00 01 add %g4, %g1, %i4 rtems_libio_check_is_open(iop); 4002d5c8: d0 07 20 0c ld [ %i4 + 0xc ], %o0 4002d5cc: 80 8a 21 00 btst 0x100, %o0 4002d5d0: 12 80 00 06 bne 4002d5e8 4002d5d4: 80 a6 60 09 cmp %i1, 9 4002d5d8: 40 00 09 c4 call 4002fce8 <__errno> <== NOT EXECUTED 4002d5dc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002d5e0: 10 80 00 55 b 4002d734 <== NOT EXECUTED 4002d5e4: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 4002d5e8: 18 80 00 50 bgu 4002d728 4002d5ec: 83 2e 60 02 sll %i1, 2, %g1 4002d5f0: 05 10 00 b5 sethi %hi(0x4002d400), %g2 4002d5f4: 84 10 a1 54 or %g2, 0x154, %g2 ! 4002d554 4002d5f8: c2 00 80 01 ld [ %g2 + %g1 ], %g1 4002d5fc: 81 c0 40 00 jmp %g1 4002d600: 01 00 00 00 nop case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 4002d604: d0 00 c0 00 ld [ %g3 ], %o0 if ( fd2 ) 4002d608: 80 a2 20 00 cmp %o0, 0 4002d60c: 02 80 00 0b be 4002d638 4002d610: 80 a2 00 0d cmp %o0, %o5 diop = rtems_libio_iop( fd2 ); 4002d614: 1a 80 00 0e bcc 4002d64c <== NOT EXECUTED 4002d618: ba 10 20 00 clr %i5 <== NOT EXECUTED 4002d61c: 85 2a 20 02 sll %o0, 2, %g2 <== NOT EXECUTED 4002d620: 83 2a 20 04 sll %o0, 4, %g1 <== NOT EXECUTED 4002d624: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 4002d628: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED 4002d62c: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 4002d630: 10 80 00 07 b 4002d64c <== NOT EXECUTED 4002d634: ba 01 00 01 add %g4, %g1, %i5 <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 4002d638: 7f ff 64 7f call 40006834 4002d63c: b0 10 3f ff mov -1, %i0 if ( diop == 0 ) { 4002d640: ba 92 20 00 orcc %o0, 0, %i5 4002d644: 02 80 00 4f be 4002d780 4002d648: 01 00 00 00 nop ret = -1; break; } } diop->handlers = iop->handlers; 4002d64c: c2 07 20 30 ld [ %i4 + 0x30 ], %g1 diop->file_info = iop->file_info; 4002d650: c4 07 20 2c ld [ %i4 + 0x2c ], %g2 diop->flags = iop->flags; 4002d654: c6 07 20 0c ld [ %i4 + 0xc ], %g3 ret = -1; break; } } diop->handlers = iop->handlers; 4002d658: c2 27 60 30 st %g1, [ %i5 + 0x30 ] diop->file_info = iop->file_info; 4002d65c: c4 27 60 2c st %g2, [ %i5 + 0x2c ] diop->flags = iop->flags; 4002d660: c6 27 60 0c st %g3, [ %i5 + 0xc ] diop->pathinfo = iop->pathinfo; 4002d664: 90 07 60 10 add %i5, 0x10, %o0 4002d668: 92 07 20 10 add %i4, 0x10, %o1 4002d66c: 40 00 13 8c call 4003249c 4002d670: 94 10 20 10 mov 0x10, %o2 ret = (int) (diop - rtems_libio_iops); 4002d674: 03 10 01 75 sethi %hi(0x4005d400), %g1 4002d678: c6 00 63 54 ld [ %g1 + 0x354 ], %g3 ! 4005d754 4002d67c: 86 27 40 03 sub %i5, %g3, %g3 4002d680: 87 38 e0 02 sra %g3, 2, %g3 4002d684: 83 28 e0 02 sll %g3, 2, %g1 4002d688: 85 28 e0 06 sll %g3, 6, %g2 4002d68c: 84 20 80 01 sub %g2, %g1, %g2 4002d690: 83 28 a0 06 sll %g2, 6, %g1 4002d694: 82 20 40 02 sub %g1, %g2, %g1 4002d698: 85 28 60 0c sll %g1, 0xc, %g2 4002d69c: 82 00 40 02 add %g1, %g2, %g1 4002d6a0: 82 00 40 03 add %g1, %g3, %g1 4002d6a4: 83 28 60 04 sll %g1, 4, %g1 4002d6a8: 82 20 40 03 sub %g1, %g3, %g1 4002d6ac: 83 28 60 02 sll %g1, 2, %g1 4002d6b0: 10 80 00 24 b 4002d740 4002d6b4: b0 20 c0 01 sub %g3, %g1, %i0 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 4002d6b8: 83 32 20 0b srl %o0, 0xb, %g1 4002d6bc: 10 80 00 24 b 4002d74c 4002d6c0: 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 ) ) 4002d6c4: c2 00 c0 00 ld [ %g3 ], %g1 4002d6c8: 80 a0 60 00 cmp %g1, 0 4002d6cc: 22 80 00 03 be,a 4002d6d8 4002d6d0: 82 0a 37 ff and %o0, -2049, %g1 <== NOT EXECUTED 4002d6d4: 82 12 28 00 or %o0, 0x800, %g1 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 4002d6d8: c2 27 20 0c st %g1, [ %i4 + 0xc ] 4002d6dc: 10 80 00 1c b 4002d74c 4002d6e0: b0 10 20 00 clr %i0 break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 4002d6e4: 7f ff 63 e8 call 40006684 4002d6e8: 01 00 00 00 nop 4002d6ec: 10 80 00 15 b 4002d740 4002d6f0: b0 10 00 08 mov %o0, %i0 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 4002d6f4: d0 00 c0 00 ld [ %g3 ], %o0 4002d6f8: 7f ff 64 85 call 4000690c 4002d6fc: 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); 4002d700: c2 07 20 0c ld [ %i4 + 0xc ], %g1 4002d704: 90 0a 22 01 and %o0, 0x201, %o0 4002d708: 82 08 7d fe and %g1, -514, %g1 4002d70c: 90 12 00 01 or %o0, %g1, %o0 4002d710: 10 80 00 0f b 4002d74c 4002d714: d0 27 20 0c st %o0, [ %i4 + 0xc ] errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 4002d718: 40 00 09 74 call 4002fce8 <__errno> 4002d71c: b0 10 3f ff mov -1, %i0 4002d720: 10 80 00 05 b 4002d734 4002d724: 82 10 20 86 mov 0x86, %g1 ret = -1; break; default: errno = EINVAL; 4002d728: 40 00 09 70 call 4002fce8 <__errno> 4002d72c: b0 10 3f ff mov -1, %i0 4002d730: 82 10 20 16 mov 0x16, %g1 4002d734: c2 22 00 00 st %g1, [ %o0 ] 4002d738: 81 c7 e0 08 ret 4002d73c: 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) { 4002d740: 80 a6 20 00 cmp %i0, 0 4002d744: 06 80 00 0f bl 4002d780 4002d748: 01 00 00 00 nop if (iop->handlers->fcntl_h) { 4002d74c: c2 07 20 30 ld [ %i4 + 0x30 ], %g1 4002d750: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 4002d754: 80 a0 60 00 cmp %g1, 0 4002d758: 02 bf ff f8 be 4002d738 4002d75c: 90 10 00 19 mov %i1, %o0 int err = (*iop->handlers->fcntl_h)( cmd, iop ); 4002d760: 9f c0 40 00 call %g1 4002d764: 92 10 00 1c mov %i4, %o1 if (err) { 4002d768: ba 92 20 00 orcc %o0, 0, %i5 4002d76c: 02 80 00 05 be 4002d780 4002d770: 01 00 00 00 nop errno = err; 4002d774: 40 00 09 5d call 4002fce8 <__errno> <== NOT EXECUTED 4002d778: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4002d77c: 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; } 4002d780: 81 c7 e0 08 ret 4002d784: 81 e8 00 00 restore 4002227c : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 4002227c: 03 10 01 75 sethi %hi(0x4005d400), %g1 <== NOT EXECUTED 40022280: c6 00 63 f8 ld [ %g1 + 0x3f8 ], %g3 ! 4005d7f8 <== NOT EXECUTED 40022284: 82 10 63 f8 or %g1, 0x3f8, %g1 <== NOT EXECUTED !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 40022288: 10 80 00 08 b 400222a8 <== NOT EXECUTED 4002228c: 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 ) { 40022290: c2 02 60 0c ld [ %o1 + 0xc ], %g1 <== NOT EXECUTED 40022294: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40022298: 32 80 00 04 bne,a 400222a8 <== NOT EXECUTED 4002229c: c6 00 c0 00 ld [ %g3 ], %g3 <== NOT EXECUTED 400222a0: 81 c3 e0 08 retl <== NOT EXECUTED 400222a4: 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 ); 400222a8: 80 a0 c0 04 cmp %g3, %g4 <== NOT EXECUTED 400222ac: 32 bf ff f9 bne,a 40022290 <== NOT EXECUTED 400222b0: c4 00 e0 14 ld [ %g3 + 0x14 ], %g2 <== NOT EXECUTED return true; } } return false; } 400222b4: 81 c3 e0 08 retl <== NOT EXECUTED 400222b8: 90 10 20 00 clr %o0 <== NOT EXECUTED 40004274 : long fpathconf( int fd, int name ) { 40004274: 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); 40004278: 03 10 00 5c sethi %hi(0x40017000), %g1 4000427c: c2 00 62 c8 ld [ %g1 + 0x2c8 ], %g1 ! 400172c8 40004280: 80 a6 00 01 cmp %i0, %g1 40004284: 1a 80 00 0e bcc 400042bc 40004288: 01 00 00 00 nop iop = rtems_libio_iop(fd); 4000428c: 03 10 00 5f sethi %hi(0x40017c00), %g1 40004290: c6 00 63 dc ld [ %g1 + 0x3dc ], %g3 ! 40017fdc 40004294: 85 2e 20 02 sll %i0, 2, %g2 40004298: 83 2e 20 04 sll %i0, 4, %g1 4000429c: 82 20 40 02 sub %g1, %g2, %g1 400042a0: 82 00 40 18 add %g1, %i0, %g1 400042a4: 83 28 60 02 sll %g1, 2, %g1 400042a8: 82 00 c0 01 add %g3, %g1, %g1 rtems_libio_check_is_open(iop); 400042ac: c8 00 60 0c ld [ %g1 + 0xc ], %g4 400042b0: 80 89 21 00 btst 0x100, %g4 400042b4: 12 80 00 06 bne 400042cc 400042b8: 80 89 20 02 btst 2, %g4 400042bc: 40 00 30 7c call 400104ac <__errno> 400042c0: 01 00 00 00 nop 400042c4: 10 80 00 07 b 400042e0 400042c8: 82 10 20 09 mov 9, %g1 ! 9 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 400042cc: 12 80 00 08 bne 400042ec 400042d0: 80 a6 60 0b cmp %i1, 0xb 400042d4: 40 00 30 76 call 400104ac <__errno> <== NOT EXECUTED 400042d8: 01 00 00 00 nop <== NOT EXECUTED 400042dc: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 400042e0: c2 22 00 00 st %g1, [ %o0 ] 400042e4: 81 c7 e0 08 ret 400042e8: 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 ) { 400042ec: 18 80 00 2c bgu 4000439c 400042f0: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 400042f4: 83 2e 60 02 sll %i1, 2, %g1 400042f8: 05 10 00 10 sethi %hi(0x40004000), %g2 400042fc: 84 10 a2 44 or %g2, 0x244, %g2 ! 40004244 40004300: c2 00 80 01 ld [ %g2 + %g1 ], %g1 40004304: 81 c0 40 00 jmp %g1 40004308: 01 00 00 00 nop case _PC_LINK_MAX: return_value = the_limits->link_max; 4000430c: f0 00 e0 30 ld [ %g3 + 0x30 ], %i0 40004310: 81 c7 e0 08 ret 40004314: 81 e8 00 00 restore break; case _PC_MAX_CANON: return_value = the_limits->max_canon; 40004318: f0 00 e0 34 ld [ %g3 + 0x34 ], %i0 4000431c: 81 c7 e0 08 ret 40004320: 81 e8 00 00 restore break; case _PC_MAX_INPUT: return_value = the_limits->max_input; 40004324: f0 00 e0 38 ld [ %g3 + 0x38 ], %i0 40004328: 81 c7 e0 08 ret 4000432c: 81 e8 00 00 restore break; case _PC_NAME_MAX: return_value = the_limits->name_max; 40004330: f0 00 e0 3c ld [ %g3 + 0x3c ], %i0 40004334: 81 c7 e0 08 ret 40004338: 81 e8 00 00 restore break; case _PC_PATH_MAX: return_value = the_limits->path_max; 4000433c: f0 00 e0 40 ld [ %g3 + 0x40 ], %i0 40004340: 81 c7 e0 08 ret 40004344: 81 e8 00 00 restore break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 40004348: f0 00 e0 44 ld [ %g3 + 0x44 ], %i0 4000434c: 81 c7 e0 08 ret 40004350: 81 e8 00 00 restore break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 40004354: f0 00 e0 4c ld [ %g3 + 0x4c ], %i0 40004358: 81 c7 e0 08 ret 4000435c: 81 e8 00 00 restore break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 40004360: f0 00 e0 50 ld [ %g3 + 0x50 ], %i0 40004364: 81 c7 e0 08 ret 40004368: 81 e8 00 00 restore break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 4000436c: f0 00 e0 5c ld [ %g3 + 0x5c ], %i0 40004370: 81 c7 e0 08 ret 40004374: 81 e8 00 00 restore break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 40004378: f0 00 e0 48 ld [ %g3 + 0x48 ], %i0 4000437c: 81 c7 e0 08 ret 40004380: 81 e8 00 00 restore break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 40004384: f0 00 e0 54 ld [ %g3 + 0x54 ], %i0 40004388: 81 c7 e0 08 ret 4000438c: 81 e8 00 00 restore break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 40004390: f0 00 e0 58 ld [ %g3 + 0x58 ], %i0 40004394: 81 c7 e0 08 ret 40004398: 81 e8 00 00 restore break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 4000439c: 40 00 30 44 call 400104ac <__errno> 400043a0: b0 10 3f ff mov -1, %i0 400043a4: 82 10 20 16 mov 0x16, %g1 400043a8: c2 22 00 00 st %g1, [ %o0 ] break; } return return_value; } 400043ac: 81 c7 e0 08 ret 400043b0: 81 e8 00 00 restore 4000aee8 : void free( void *ptr ) { MSBUMP(free_calls, 1); 4000aee8: 9d e3 bf 98 save %sp, -104, %sp 4000aeec: 05 10 00 66 sethi %hi(0x40019800), %g2 4000aef0: 84 10 a3 f0 or %g2, 0x3f0, %g2 ! 40019bf0 4000aef4: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 4000aef8: b2 10 00 18 mov %i0, %i1 4000aefc: 82 00 60 01 inc %g1 if ( !ptr ) 4000af00: 80 a6 20 00 cmp %i0, 0 4000af04: 02 80 00 21 be 4000af88 4000af08: 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()) && 4000af0c: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000af10: c2 00 63 04 ld [ %g1 + 0x304 ], %g1 ! 40019f04 <_System_state_Current> 4000af14: 80 a0 60 03 cmp %g1, 3 4000af18: 12 80 00 09 bne 4000af3c 4000af1c: 03 10 00 66 sethi %hi(0x40019800), %g1 4000af20: 40 00 01 33 call 4000b3ec 4000af24: 01 00 00 00 nop 4000af28: 80 8a 20 ff btst 0xff, %o0 4000af2c: 12 80 00 04 bne 4000af3c 4000af30: 03 10 00 66 sethi %hi(0x40019800), %g1 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 4000af34: 40 00 01 41 call 4000b438 <== NOT EXECUTED 4000af38: 81 e8 00 00 restore <== NOT EXECUTED #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4000af3c: c2 00 60 84 ld [ %g1 + 0x84 ], %g1 4000af40: 80 a0 60 00 cmp %g1, 0 4000af44: 02 80 00 06 be 4000af5c 4000af48: 37 10 00 66 sethi %hi(0x40019800), %i3 (*rtems_malloc_statistics_helpers->at_free)(ptr); 4000af4c: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED 4000af50: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000af54: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( !_Protected_heap_Free( &RTEMS_Malloc_Heap, ptr ) ) { 4000af58: 37 10 00 66 sethi %hi(0x40019800), %i3 <== NOT EXECUTED 4000af5c: 92 10 00 19 mov %i1, %o1 4000af60: 40 00 06 75 call 4000c934 <_Protected_heap_Free> 4000af64: 90 16 e3 98 or %i3, 0x398, %o0 4000af68: 80 8a 20 ff btst 0xff, %o0 4000af6c: 12 80 00 07 bne 4000af88 4000af70: 82 16 e3 98 or %i3, 0x398, %g1 printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 4000af74: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 <== NOT EXECUTED 4000af78: f4 00 60 18 ld [ %g1 + 0x18 ], %i2 <== NOT EXECUTED 4000af7c: 31 10 00 60 sethi %hi(0x40018000), %i0 <== NOT EXECUTED 4000af80: 7f ff e3 2e call 40003c38 <== NOT EXECUTED 4000af84: 91 ee 22 d8 restore %i0, 0x2d8, %o0 <== NOT EXECUTED 4000af88: 81 c7 e0 08 ret 4000af8c: 81 e8 00 00 restore 40021738 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 40021738: 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 4002173c: 03 10 01 77 sethi %hi(0x4005dc00), %g1 <== NOT EXECUTED 40021740: 82 10 63 ec or %g1, 0x3ec, %g1 ! 4005dfec <== NOT EXECUTED 40021744: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 40021748: 02 80 00 18 be 400217a8 <== NOT EXECUTED 4002174c: 01 00 00 00 nop <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 40021750: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED 40021754: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40021758: 22 80 00 09 be,a 4002177c <== NOT EXECUTED 4002175c: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED 40021760: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40021764: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40021768: 22 80 00 05 be,a 4002177c <== NOT EXECUTED 4002176c: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED 40021770: 9f c0 40 00 call %g1 <== NOT EXECUTED 40021774: 90 06 20 04 add %i0, 4, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 40021778: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED 4002177c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40021780: 02 80 00 08 be 400217a0 <== NOT EXECUTED 40021784: 01 00 00 00 nop <== NOT EXECUTED 40021788: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002178c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40021790: 02 80 00 04 be 400217a0 <== NOT EXECUTED 40021794: 01 00 00 00 nop <== NOT EXECUTED 40021798: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002179c: 90 06 20 14 add %i0, 0x14, %o0 <== NOT EXECUTED free(env); 400217a0: 7f ff 93 33 call 4000646c <== NOT EXECUTED 400217a4: 81 e8 00 00 restore <== NOT EXECUTED 400217a8: 81 c7 e0 08 ret <== NOT EXECUTED 400217ac: 81 e8 00 00 restore <== NOT EXECUTED 40016e88 : int fstat( int fd, struct stat *sbuf ) { 40016e88: 9d e3 bf 98 save %sp, -104, %sp /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 40016e8c: 80 a6 60 00 cmp %i1, 0 40016e90: 32 80 00 06 bne,a 40016ea8 40016e94: 03 10 00 63 sethi %hi(0x40018c00), %g1 rtems_set_errno_and_return_minus_one( EFAULT ); 40016e98: 7f ff db 8c call 4000dcc8 <__errno> 40016e9c: 01 00 00 00 nop 40016ea0: 10 80 00 2a b 40016f48 40016ea4: 82 10 20 0e mov 0xe, %g1 ! e /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 40016ea8: c2 00 62 18 ld [ %g1 + 0x218 ], %g1 40016eac: 80 a6 00 01 cmp %i0, %g1 40016eb0: 1a 80 00 23 bcc 40016f3c 40016eb4: 03 10 00 66 sethi %hi(0x40019800), %g1 40016eb8: c6 00 63 8c ld [ %g1 + 0x38c ], %g3 ! 40019b8c 40016ebc: 85 2e 20 02 sll %i0, 2, %g2 40016ec0: 83 2e 20 04 sll %i0, 4, %g1 40016ec4: 82 20 40 02 sub %g1, %g2, %g1 40016ec8: 82 00 40 18 add %g1, %i0, %g1 40016ecc: 83 28 60 02 sll %g1, 2, %g1 40016ed0: b0 00 c0 01 add %g3, %g1, %i0 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 40016ed4: c2 06 20 0c ld [ %i0 + 0xc ], %g1 40016ed8: 80 88 61 00 btst 0x100, %g1 40016edc: 02 80 00 18 be 40016f3c 40016ee0: 01 00 00 00 nop if ( !iop->handlers ) 40016ee4: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40016ee8: 80 a0 60 00 cmp %g1, 0 40016eec: 02 80 00 14 be 40016f3c 40016ef0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 40016ef4: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 40016ef8: 80 a0 60 00 cmp %g1, 0 40016efc: 12 80 00 06 bne 40016f14 40016f00: 92 10 20 00 clr %o1 rtems_set_errno_and_return_minus_one( ENOTSUP ); 40016f04: 7f ff db 71 call 4000dcc8 <__errno> <== NOT EXECUTED 40016f08: 01 00 00 00 nop <== NOT EXECUTED 40016f0c: 10 80 00 0f b 40016f48 <== NOT EXECUTED 40016f10: 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) ); 40016f14: 94 10 20 50 mov 0x50, %o2 40016f18: 7f ff dd 97 call 4000e574 40016f1c: 90 10 00 19 mov %i1, %o0 return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 40016f20: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40016f24: 90 06 20 10 add %i0, 0x10, %o0 40016f28: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 40016f2c: 9f c0 40 00 call %g1 40016f30: 92 10 00 19 mov %i1, %o1 } 40016f34: 81 c7 e0 08 ret 40016f38: 91 e8 00 08 restore %g0, %o0, %o0 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); 40016f3c: 7f ff db 63 call 4000dcc8 <__errno> 40016f40: 01 00 00 00 nop 40016f44: 82 10 20 09 mov 9, %g1 ! 9 40016f48: c2 22 00 00 st %g1, [ %o0 ] 40016f4c: 10 bf ff fa b 40016f34 40016f50: 90 10 3f ff mov -1, %o0 4001ff88 : #include int fsync( int fd ) { 4001ff88: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_t *iop; rtems_libio_check_fd( fd ); 4001ff8c: 03 10 01 21 sethi %hi(0x40048400), %g1 4001ff90: c2 00 62 08 ld [ %g1 + 0x208 ], %g1 ! 40048608 4001ff94: 80 a6 00 01 cmp %i0, %g1 4001ff98: 1a 80 00 18 bcc 4001fff8 4001ff9c: 01 00 00 00 nop iop = rtems_libio_iop( fd ); 4001ffa0: 03 10 01 75 sethi %hi(0x4005d400), %g1 4001ffa4: c6 00 63 54 ld [ %g1 + 0x354 ], %g3 ! 4005d754 4001ffa8: 85 2e 20 02 sll %i0, 2, %g2 4001ffac: 83 2e 20 04 sll %i0, 4, %g1 4001ffb0: 82 20 40 02 sub %g1, %g2, %g1 4001ffb4: 82 00 40 18 add %g1, %i0, %g1 4001ffb8: 83 28 60 02 sll %g1, 2, %g1 4001ffbc: 90 00 c0 01 add %g3, %g1, %o0 rtems_libio_check_is_open(iop); 4001ffc0: c8 02 20 0c ld [ %o0 + 0xc ], %g4 4001ffc4: 80 89 21 00 btst 0x100, %g4 4001ffc8: 02 80 00 0c be 4001fff8 4001ffcc: 01 00 00 00 nop rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4001ffd0: 80 89 20 04 btst 4, %g4 4001ffd4: 32 80 00 06 bne,a 4001ffec 4001ffd8: c8 02 20 30 ld [ %o0 + 0x30 ], %g4 4001ffdc: 40 00 3f 43 call 4002fce8 <__errno> 4001ffe0: 01 00 00 00 nop 4001ffe4: 10 80 00 0f b 40020020 4001ffe8: 82 10 20 16 mov 0x16, %g1 ! 16 /* * Now process the fsync(). */ if ( !iop->handlers ) 4001ffec: 80 a1 20 00 cmp %g4, 0 4001fff0: 32 80 00 06 bne,a 40020008 4001fff4: c2 01 20 28 ld [ %g4 + 0x28 ], %g1 rtems_set_errno_and_return_minus_one( EBADF ); 4001fff8: 40 00 3f 3c call 4002fce8 <__errno> <== NOT EXECUTED 4001fffc: 01 00 00 00 nop <== NOT EXECUTED 40020000: 10 80 00 08 b 40020020 <== NOT EXECUTED 40020004: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 40020008: 80 a0 60 00 cmp %g1, 0 4002000c: 12 80 00 08 bne 4002002c 40020010: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 40020014: 40 00 3f 35 call 4002fce8 <__errno> 40020018: 01 00 00 00 nop 4002001c: 82 10 20 86 mov 0x86, %g1 ! 86 40020020: c2 22 00 00 st %g1, [ %o0 ] 40020024: 10 80 00 04 b 40020034 40020028: 90 10 3f ff mov -1, %o0 return (*iop->handlers->fsync_h)( iop ); 4002002c: 9f c0 40 00 call %g1 40020030: 01 00 00 00 nop } 40020034: 81 c7 e0 08 ret 40020038: 91 e8 00 08 restore %g0, %o0, %o0 4000af90 : int ftruncate( int fd, off_t length ) { 4000af90: 9d e3 bf 88 save %sp, -120, %sp rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 4000af94: 03 10 00 63 sethi %hi(0x40018c00), %g1 4000af98: c2 00 62 18 ld [ %g1 + 0x218 ], %g1 ! 40018e18 4000af9c: 80 a6 00 01 cmp %i0, %g1 4000afa0: 1a 80 00 0e bcc 4000afd8 4000afa4: 01 00 00 00 nop iop = rtems_libio_iop( fd ); 4000afa8: 03 10 00 66 sethi %hi(0x40019800), %g1 4000afac: c6 00 63 8c ld [ %g1 + 0x38c ], %g3 ! 40019b8c 4000afb0: 85 2e 20 02 sll %i0, 2, %g2 4000afb4: 83 2e 20 04 sll %i0, 4, %g1 4000afb8: 82 20 40 02 sub %g1, %g2, %g1 4000afbc: 82 00 40 18 add %g1, %i0, %g1 4000afc0: 83 28 60 02 sll %g1, 2, %g1 4000afc4: b0 00 c0 01 add %g3, %g1, %i0 rtems_libio_check_is_open(iop); 4000afc8: c2 06 20 0c ld [ %i0 + 0xc ], %g1 4000afcc: 80 88 61 00 btst 0x100, %g1 4000afd0: 12 80 00 06 bne 4000afe8 4000afd4: a0 07 bf e8 add %fp, -24, %l0 4000afd8: 40 00 0b 3c call 4000dcc8 <__errno> <== NOT EXECUTED 4000afdc: 01 00 00 00 nop <== NOT EXECUTED 4000afe0: 10 80 00 22 b 4000b068 <== NOT EXECUTED 4000afe4: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 4000afe8: 92 06 20 10 add %i0, 0x10, %o1 4000afec: 90 10 00 10 mov %l0, %o0 4000aff0: 40 00 0d 28 call 4000e490 4000aff4: 94 10 20 10 mov 0x10, %o2 if ( !loc.ops->node_type_h ) 4000aff8: c2 07 bf f0 ld [ %fp + -16 ], %g1 4000affc: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 4000b000: 80 a0 60 00 cmp %g1, 0 4000b004: 02 80 00 16 be 4000b05c 4000b008: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 4000b00c: 9f c0 40 00 call %g1 4000b010: 90 10 00 10 mov %l0, %o0 4000b014: 80 a2 20 01 cmp %o0, 1 4000b018: 32 80 00 06 bne,a 4000b030 4000b01c: c2 06 20 0c ld [ %i0 + 0xc ], %g1 rtems_set_errno_and_return_minus_one( EISDIR ); 4000b020: 40 00 0b 2a call 4000dcc8 <__errno> 4000b024: 01 00 00 00 nop 4000b028: 10 80 00 10 b 4000b068 4000b02c: 82 10 20 15 mov 0x15, %g1 ! 15 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4000b030: 80 88 60 04 btst 4, %g1 4000b034: 32 80 00 06 bne,a 4000b04c 4000b038: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 4000b03c: 40 00 0b 23 call 4000dcc8 <__errno> <== NOT EXECUTED 4000b040: 01 00 00 00 nop <== NOT EXECUTED 4000b044: 10 80 00 09 b 4000b068 <== NOT EXECUTED 4000b048: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) 4000b04c: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 4000b050: 80 a0 60 00 cmp %g1, 0 4000b054: 32 80 00 08 bne,a 4000b074 4000b058: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000b05c: 40 00 0b 1b call 4000dcc8 <__errno> <== NOT EXECUTED 4000b060: 01 00 00 00 nop <== NOT EXECUTED 4000b064: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4000b068: c2 22 00 00 st %g1, [ %o0 ] 4000b06c: 10 80 00 04 b 4000b07c 4000b070: 90 10 3f ff mov -1, %o0 return (*iop->handlers->ftruncate_h)( iop, length ); 4000b074: 9f c0 40 00 call %g1 4000b078: 92 10 00 19 mov %i1, %o1 } 4000b07c: 81 c7 e0 08 ret 4000b080: 91 e8 00 08 restore %g0, %o0, %o0 40020130 : char * getcwd ( char *pt, size_t size) { 40020130: 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) 40020134: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40020138: 02 80 00 0b be 40020164 <== NOT EXECUTED 4002013c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED if (!size) { errno = EINVAL; return (char *) NULL; } ept = pt + size; 40020140: ac 10 20 00 clr %l6 <== NOT EXECUTED */ if (pt) { ptsize = 0; if (!size) 40020144: 12 80 00 0e bne 4002017c <== NOT EXECUTED 40020148: b2 06 00 19 add %i0, %i1, %i1 <== NOT EXECUTED { errno = EINVAL; 4002014c: 40 00 3e e7 call 4002fce8 <__errno> <== NOT EXECUTED 40020150: b0 10 20 00 clr %i0 <== NOT EXECUTED 40020154: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40020158: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002015c: 81 c7 e0 08 ret <== NOT EXECUTED 40020160: 81 e8 00 00 restore <== NOT EXECUTED } ept = pt + size; } else { if (!(pt = (char *) malloc (ptsize = 1024 - 4))) 40020164: 7f ff 9a 54 call 40006ab4 <== NOT EXECUTED 40020168: 90 10 23 fc mov 0x3fc, %o0 <== NOT EXECUTED 4002016c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40020170: 02 bf ff fb be 4002015c <== NOT EXECUTED 40020174: b2 06 23 fc add %i0, 0x3fc, %i1 <== NOT EXECUTED { return (char *) NULL; } ept = pt + ptsize; 40020178: ac 10 23 fc mov 0x3fc, %l6 <== NOT EXECUTED } bpt = ept - 1; *bpt = '\0'; 4002017c: 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))) 40020180: 90 10 23 fc mov 0x3fc, %o0 <== NOT EXECUTED 40020184: 7f ff 9a 4c call 40006ab4 <== NOT EXECUTED 40020188: aa 06 7f ff add %i1, -1, %l5 <== NOT EXECUTED 4002018c: a4 92 20 00 orcc %o0, 0, %l2 <== NOT EXECUTED 40020190: 02 80 00 d9 be 400204f4 <== NOT EXECUTED 40020194: 82 10 20 2e mov 0x2e, %g1 <== NOT EXECUTED goto err; } eup = up + MAXPATHLEN; bup = up; up[0] = '.'; up[1] = '\0'; 40020198: c0 2c a0 01 clrb [ %l2 + 1 ] <== NOT EXECUTED { goto err; } eup = up + MAXPATHLEN; bup = up; up[0] = '.'; 4002019c: c2 2c 80 00 stb %g1, [ %l2 ] <== NOT EXECUTED up[1] = '\0'; /* Save root values, so know when to stop. */ if (stat ("/", &s)) 400201a0: a0 07 bf a8 add %fp, -88, %l0 <== NOT EXECUTED 400201a4: 11 10 01 0d sethi %hi(0x40043400), %o0 <== NOT EXECUTED 400201a8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 400201ac: 7f ff 9e 58 call 40007b0c <== NOT EXECUTED 400201b0: 90 12 20 d0 or %o0, 0xd0, %o0 <== NOT EXECUTED 400201b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400201b8: 12 80 00 d0 bne 400204f8 <== NOT EXECUTED 400201bc: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED goto err; root_dev = s.st_dev; 400201c0: c2 07 bf a8 ld [ %fp + -88 ], %g1 <== NOT EXECUTED 400201c4: c4 07 bf ac ld [ %fp + -84 ], %g2 <== NOT EXECUTED root_ino = s.st_ino; 400201c8: 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; 400201cc: c2 27 bf 98 st %g1, [ %fp + -104 ] <== NOT EXECUTED 400201d0: c4 27 bf 94 st %g2, [ %fp + -108 ] <== NOT EXECUTED if (!(up = (char *) malloc (upsize = 1024 - 4))) { goto err; } eup = up + MAXPATHLEN; 400201d4: 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. */ 400201d8: 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; 400201dc: c6 27 bf a0 st %g3, [ %fp + -96 ] <== NOT EXECUTED if (!(up = (char *) malloc (upsize = 1024 - 4))) { goto err; } eup = up + MAXPATHLEN; 400201e0: 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. */ 400201e4: c4 27 bf 9c st %g2, [ %fp + -100 ] <== NOT EXECUTED 400201e8: 40 00 3e c0 call 4002fce8 <__errno> <== NOT EXECUTED 400201ec: a8 10 00 12 mov %l2, %l4 <== NOT EXECUTED 400201f0: b4 10 23 fc mov 0x3fc, %i2 <== NOT EXECUTED 400201f4: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED for (first = 1;; first = 0) { /* Stat the current level. */ if (_stat (up, &s)) 400201f8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400201fc: 7f ff 9e 44 call 40007b0c <== NOT EXECUTED 40020200: 92 07 bf a8 add %fp, -88, %o1 <== NOT EXECUTED 40020204: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40020208: 12 80 00 bb bne 400204f4 <== NOT EXECUTED 4002020c: 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) 40020210: 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; 40020214: 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) 40020218: 80 a0 c0 1c cmp %g3, %i4 <== NOT EXECUTED 4002021c: 12 80 00 14 bne 4002026c <== NOT EXECUTED 40020220: fa 07 bf ac ld [ %fp + -84 ], %i5 <== NOT EXECUTED 40020224: c2 07 bf 94 ld [ %fp + -108 ], %g1 <== NOT EXECUTED 40020228: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED 4002022c: 12 80 00 11 bne 40020270 <== NOT EXECUTED 40020230: c6 07 bf a4 ld [ %fp + -92 ], %g3 <== NOT EXECUTED 40020234: c4 07 bf a0 ld [ %fp + -96 ], %g2 <== NOT EXECUTED 40020238: 80 a0 80 1b cmp %g2, %i3 <== NOT EXECUTED 4002023c: 12 80 00 0e bne 40020274 <== NOT EXECUTED 40020240: 82 05 24 04 add %l4, 0x404, %g1 <== NOT EXECUTED { *--bpt = '/'; 40020244: 82 10 20 2f mov 0x2f, %g1 <== NOT EXECUTED 40020248: 92 05 7f ff add %l5, -1, %o1 <== NOT EXECUTED 4002024c: 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); 40020250: 94 26 40 09 sub %i1, %o1, %o2 <== NOT EXECUTED 40020254: 40 00 48 cb call 40032580 <== NOT EXECUTED 40020258: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED free (up); 4002025c: 7f ff 98 84 call 4000646c <== NOT EXECUTED 40020260: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40020264: 81 c7 e0 08 ret <== NOT EXECUTED 40020268: 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) 4002026c: c6 07 bf a4 ld [ %fp + -92 ], %g3 <== NOT EXECUTED 40020270: 82 05 24 04 add %l4, 0x404, %g1 <== NOT EXECUTED 40020274: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 40020278: 18 80 00 0c bgu 400202a8 <== NOT EXECUTED 4002027c: 84 10 20 2e mov 0x2e, %g2 <== NOT EXECUTED { if (!(up = (char *) realloc (up, upsize *= 2))) 40020280: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40020284: b5 2e a0 01 sll %i2, 1, %i2 <== NOT EXECUTED 40020288: 40 00 06 37 call 40021b64 <== NOT EXECUTED 4002028c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 40020290: a4 92 20 00 orcc %o0, 0, %l2 <== NOT EXECUTED 40020294: 02 80 00 98 be 400204f4 <== NOT EXECUTED 40020298: 82 04 80 1a add %l2, %i2, %g1 <== NOT EXECUTED { goto err; } bup = up; eup = up + upsize; 4002029c: a8 10 00 12 mov %l2, %l4 <== NOT EXECUTED 400202a0: c2 27 bf a4 st %g1, [ %fp + -92 ] <== NOT EXECUTED } *bup++ = '.'; 400202a4: 84 10 20 2e mov 0x2e, %g2 <== NOT EXECUTED *bup++ = '.'; *bup = '\0'; 400202a8: c0 2d 20 02 clrb [ %l4 + 2 ] <== NOT EXECUTED goto err; } bup = up; eup = up + upsize; } *bup++ = '.'; 400202ac: c4 2d 00 00 stb %g2, [ %l4 ] <== NOT EXECUTED *bup++ = '.'; 400202b0: 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)) 400202b4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400202b8: 40 00 04 fc call 400216a8 <== NOT EXECUTED 400202bc: a0 05 20 02 add %l4, 2, %l0 <== NOT EXECUTED 400202c0: ae 92 20 00 orcc %o0, 0, %l7 <== NOT EXECUTED 400202c4: 02 80 00 8d be 400204f8 <== NOT EXECUTED 400202c8: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED 400202cc: d0 05 c0 00 ld [ %l7 ], %o0 <== NOT EXECUTED 400202d0: 7f ff fe f5 call 4001fea4 <== NOT EXECUTED 400202d4: 92 07 bf a8 add %fp, -88, %o1 <== NOT EXECUTED 400202d8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400202dc: 12 80 00 90 bne 4002051c <== NOT EXECUTED 400202e0: 86 10 20 2f mov 0x2f, %g3 <== NOT EXECUTED goto err; /* Add trailing slash for next directory. */ *bup++ = '/'; 400202e4: 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) 400202e8: c2 07 bf a8 ld [ %fp + -88 ], %g1 <== NOT EXECUTED 400202ec: 80 a0 40 1c cmp %g1, %i4 <== NOT EXECUTED 400202f0: 12 80 00 06 bne 40020308 <== NOT EXECUTED 400202f4: a8 05 20 03 add %l4, 3, %l4 <== NOT EXECUTED 400202f8: c2 07 bf ac ld [ %fp + -84 ], %g1 <== NOT EXECUTED 400202fc: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED 40020300: 02 80 00 04 be 40020310 <== NOT EXECUTED 40020304: 01 00 00 00 nop <== NOT EXECUTED 40020308: 10 80 00 0c b 40020338 <== NOT EXECUTED 4002030c: a6 10 20 00 clr %l3 ! 0 <== NOT EXECUTED { for (;;) { if (!(dp = _readdir (dir))) 40020310: 40 00 05 9e call 40021988 <== NOT EXECUTED 40020314: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 40020318: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 4002031c: 02 80 00 69 be 400204c0 <== NOT EXECUTED 40020320: a6 10 20 00 clr %l3 <== NOT EXECUTED goto notfound; if (dp->d_ino == ino) 40020324: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED 40020328: 80 a0 40 1b cmp %g1, %i3 <== NOT EXECUTED 4002032c: 12 bf ff f9 bne 40020310 <== NOT EXECUTED 40020330: a0 04 60 0c add %l1, 0xc, %l0 <== NOT EXECUTED 40020334: 30 80 00 33 b,a 40020400 <== NOT EXECUTED } } else for (;;) { if (!(dp = _readdir (dir))) 40020338: 40 00 05 94 call 40021988 <== NOT EXECUTED 4002033c: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 40020340: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 40020344: 02 80 00 5f be 400204c0 <== NOT EXECUTED 40020348: 01 00 00 00 nop <== NOT EXECUTED goto notfound; if (ISDOT (dp)) 4002034c: c2 4c 60 0c ldsb [ %l1 + 0xc ], %g1 <== NOT EXECUTED 40020350: 80 a0 60 2e cmp %g1, 0x2e <== NOT EXECUTED 40020354: 12 80 00 0c bne 40020384 <== NOT EXECUTED 40020358: a0 04 60 0c add %l1, 0xc, %l0 <== NOT EXECUTED 4002035c: c2 4c 60 0d ldsb [ %l1 + 0xd ], %g1 <== NOT EXECUTED 40020360: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40020364: 02 bf ff f5 be 40020338 <== NOT EXECUTED 40020368: 80 a0 60 2e cmp %g1, 0x2e <== NOT EXECUTED 4002036c: 12 80 00 06 bne 40020384 <== NOT EXECUTED 40020370: 01 00 00 00 nop <== NOT EXECUTED 40020374: c2 4c 60 0e ldsb [ %l1 + 0xe ], %g1 <== NOT EXECUTED 40020378: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002037c: 02 bf ff ef be 40020338 <== NOT EXECUTED 40020380: 01 00 00 00 nop <== NOT EXECUTED continue; bcopy (dp->d_name, bup, strlen (dp->d_name) + 1); 40020384: 40 00 54 fb call 40035770 <== NOT EXECUTED 40020388: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4002038c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40020390: 94 02 20 01 add %o0, 1, %o2 <== NOT EXECUTED 40020394: 40 00 48 7b call 40032580 <== NOT EXECUTED 40020398: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED /* Save the first error for later. */ if (stat (up, &s)) 4002039c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400203a0: 7f ff 9d db call 40007b0c <== NOT EXECUTED 400203a4: 92 07 bf a8 add %fp, -88, %o1 <== NOT EXECUTED 400203a8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400203ac: 02 80 00 0c be 400203dc <== NOT EXECUTED 400203b0: c2 07 bf a8 ld [ %fp + -88 ], %g1 <== NOT EXECUTED { if (!save_errno) 400203b4: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 400203b8: 12 80 00 05 bne 400203cc <== NOT EXECUTED 400203bc: 01 00 00 00 nop <== NOT EXECUTED save_errno = errno; 400203c0: 40 00 3e 4a call 4002fce8 <__errno> <== NOT EXECUTED 400203c4: 01 00 00 00 nop <== NOT EXECUTED 400203c8: e6 02 00 00 ld [ %o0 ], %l3 <== NOT EXECUTED errno = 0; 400203cc: 40 00 3e 47 call 4002fce8 <__errno> <== NOT EXECUTED 400203d0: 01 00 00 00 nop <== NOT EXECUTED 400203d4: 10 bf ff d9 b 40020338 <== NOT EXECUTED 400203d8: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED continue; } if (s.st_dev == dev && s.st_ino == ino) 400203dc: 80 a0 40 1c cmp %g1, %i4 <== NOT EXECUTED 400203e0: 12 bf ff d6 bne 40020338 <== NOT EXECUTED 400203e4: c2 07 bf ac ld [ %fp + -84 ], %g1 <== NOT EXECUTED 400203e8: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED 400203ec: 12 bf ff d3 bne 40020338 <== NOT EXECUTED 400203f0: c2 07 bf b0 ld [ %fp + -80 ], %g1 <== NOT EXECUTED 400203f4: 80 a0 40 1b cmp %g1, %i3 <== NOT EXECUTED 400203f8: 12 bf ff d0 bne 40020338 <== NOT EXECUTED 400203fc: 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)) 40020400: 40 00 54 dc call 40035770 <== NOT EXECUTED 40020404: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40020408: c6 07 bf 9c ld [ %fp + -100 ], %g3 <== NOT EXECUTED 4002040c: a2 25 40 18 sub %l5, %i0, %l1 <== NOT EXECUTED 40020410: 84 10 20 02 mov 2, %g2 <== NOT EXECUTED 40020414: 82 20 80 03 sub %g2, %g3, %g1 <== NOT EXECUTED 40020418: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED 4002041c: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 40020420: 18 80 00 17 bgu 4002047c <== NOT EXECUTED 40020424: c2 07 bf 9c ld [ %fp + -100 ], %g1 <== NOT EXECUTED { size_t len, off; if (!ptsize) 40020428: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED 4002042c: 32 80 00 07 bne,a 40020448 <== NOT EXECUTED 40020430: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED { errno = ERANGE; 40020434: 40 00 3e 2d call 4002fce8 <__errno> <== NOT EXECUTED 40020438: 01 00 00 00 nop <== NOT EXECUTED 4002043c: 82 10 20 22 mov 0x22, %g1 ! 22 <== NOT EXECUTED 40020440: 10 80 00 37 b 4002051c <== NOT EXECUTED 40020444: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED goto err; } off = bpt - pt; len = ept - bpt; if (!(pt = (char *) realloc (pt, ptsize *= 2))) 40020448: ad 2d a0 01 sll %l6, 1, %l6 <== NOT EXECUTED 4002044c: 40 00 05 c6 call 40021b64 <== NOT EXECUTED 40020450: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED 40020454: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40020458: 02 80 00 31 be 4002051c <== NOT EXECUTED 4002045c: 82 26 40 15 sub %i1, %l5, %g1 <== NOT EXECUTED { goto err; } bpt = pt + off; ept = pt + ptsize; (void) bcopy (bpt, ept - len, len); 40020460: 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; 40020464: b2 06 00 16 add %i0, %l6, %i1 <== NOT EXECUTED (void) bcopy (bpt, ept - len, len); 40020468: 94 10 00 01 mov %g1, %o2 <== NOT EXECUTED 4002046c: aa 26 40 01 sub %i1, %g1, %l5 <== NOT EXECUTED 40020470: 40 00 48 44 call 40032580 <== NOT EXECUTED 40020474: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED bpt = ept - len; } if (!first) 40020478: c2 07 bf 9c ld [ %fp + -100 ], %g1 <== NOT EXECUTED 4002047c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40020480: 12 80 00 04 bne 40020490 <== NOT EXECUTED 40020484: 84 10 20 2f mov 0x2f, %g2 <== NOT EXECUTED *--bpt = '/'; 40020488: aa 05 7f ff add %l5, -1, %l5 <== NOT EXECUTED 4002048c: c4 2d 40 00 stb %g2, [ %l5 ] <== NOT EXECUTED bpt -= strlen (dp->d_name); 40020490: 40 00 54 b8 call 40035770 <== NOT EXECUTED 40020494: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED bcopy (dp->d_name, bpt, strlen (dp->d_name)); 40020498: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4002049c: 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); 400204a0: 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'; 400204a4: 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)); 400204a8: 40 00 48 36 call 40032580 <== NOT EXECUTED 400204ac: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED (void) _closedir (dir); 400204b0: 40 00 33 b7 call 4002d38c <== NOT EXECUTED 400204b4: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED dir = 0; /* Truncate any file name. */ *bup = '\0'; 400204b8: 10 bf ff 50 b 400201f8 <== NOT EXECUTED 400204bc: 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) 400204c0: 40 00 3e 0a call 4002fce8 <__errno> <== NOT EXECUTED 400204c4: 01 00 00 00 nop <== NOT EXECUTED 400204c8: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 400204cc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400204d0: 12 80 00 13 bne 4002051c <== NOT EXECUTED 400204d4: 01 00 00 00 nop <== NOT EXECUTED errno = save_errno ? save_errno : ENOENT; 400204d8: 40 00 3e 04 call 4002fce8 <__errno> <== NOT EXECUTED 400204dc: 01 00 00 00 nop <== NOT EXECUTED 400204e0: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 400204e4: 22 80 00 02 be,a 400204ec <== NOT EXECUTED 400204e8: a6 10 20 02 mov 2, %l3 <== NOT EXECUTED 400204ec: 10 80 00 0c b 4002051c <== NOT EXECUTED 400204f0: e6 22 00 00 st %l3, [ %o0 ] <== NOT EXECUTED /* FALLTHROUGH */ err: if(dir) (void) _closedir (dir); if (ptsize) 400204f4: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED 400204f8: 02 80 00 05 be 4002050c <== NOT EXECUTED 400204fc: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED free (pt); 40020500: 7f ff 97 db call 4000646c <== NOT EXECUTED 40020504: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED free (up); 40020508: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4002050c: 7f ff 97 d8 call 4000646c <== NOT EXECUTED 40020510: b0 10 20 00 clr %i0 <== NOT EXECUTED return (char *) NULL; } 40020514: 81 c7 e0 08 ret <== NOT EXECUTED 40020518: 81 e8 00 00 restore <== NOT EXECUTED errno = save_errno ? save_errno : ENOENT; /* FALLTHROUGH */ err: if(dir) (void) _closedir (dir); 4002051c: 40 00 33 9c call 4002d38c <== NOT EXECUTED 40020520: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED if (ptsize) 40020524: 10 bf ff f5 b 400204f8 <== NOT EXECUTED 40020528: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED 4002d7a4 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 4002d7a4: 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 ); 4002d7a8: 03 10 01 21 sethi %hi(0x40048400), %g1 4002d7ac: c2 00 62 08 ld [ %g1 + 0x208 ], %g1 ! 40048608 int getdents( int dd_fd, char *dd_buf, int dd_len ) { 4002d7b0: 88 10 00 18 mov %i0, %g4 /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 4002d7b4: 80 a6 00 01 cmp %i0, %g1 4002d7b8: 1a 80 00 0a bcc 4002d7e0 4002d7bc: b0 10 20 00 clr %i0 4002d7c0: 03 10 01 75 sethi %hi(0x4005d400), %g1 4002d7c4: c6 00 63 54 ld [ %g1 + 0x354 ], %g3 ! 4005d754 4002d7c8: 85 29 20 02 sll %g4, 2, %g2 4002d7cc: 83 29 20 04 sll %g4, 4, %g1 4002d7d0: 82 20 40 02 sub %g1, %g2, %g1 4002d7d4: 82 00 40 04 add %g1, %g4, %g1 4002d7d8: 83 28 60 02 sll %g1, 2, %g1 4002d7dc: b0 00 c0 01 add %g3, %g1, %i0 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 4002d7e0: a0 07 bf e8 add %fp, -24, %l0 4002d7e4: 92 06 20 10 add %i0, 0x10, %o1 4002d7e8: 90 10 00 10 mov %l0, %o0 4002d7ec: 40 00 13 2c call 4003249c 4002d7f0: 94 10 20 10 mov 0x10, %o2 if ( !loc.ops->node_type_h ) 4002d7f4: c2 07 bf f0 ld [ %fp + -16 ], %g1 4002d7f8: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 4002d7fc: 80 a0 60 00 cmp %g1, 0 4002d800: 02 80 00 11 be 4002d844 4002d804: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 4002d808: 9f c0 40 00 call %g1 4002d80c: 90 10 00 10 mov %l0, %o0 4002d810: 80 a2 20 01 cmp %o0, 1 4002d814: 22 80 00 08 be,a 4002d834 4002d818: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 rtems_set_errno_and_return_minus_one( ENOTDIR ); 4002d81c: 40 00 09 33 call 4002fce8 <__errno> 4002d820: 01 00 00 00 nop 4002d824: 82 10 20 14 mov 0x14, %g1 ! 14 4002d828: c2 22 00 00 st %g1, [ %o0 ] 4002d82c: 10 80 00 0d b 4002d860 4002d830: 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 ) 4002d834: c2 00 60 08 ld [ %g1 + 8 ], %g1 4002d838: 80 a0 60 00 cmp %g1, 0 4002d83c: 32 80 00 06 bne,a 4002d854 4002d840: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002d844: 40 00 09 29 call 4002fce8 <__errno> <== NOT EXECUTED 4002d848: 01 00 00 00 nop <== NOT EXECUTED 4002d84c: 10 bf ff f7 b 4002d828 <== NOT EXECUTED 4002d850: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 4002d854: 92 10 00 19 mov %i1, %o1 4002d858: 9f c0 40 00 call %g1 4002d85c: 94 10 00 1a mov %i2, %o2 } 4002d860: 81 c7 e0 08 ret 4002d864: 91 e8 00 08 restore %g0, %o0, %o0 4002054c : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 4002054c: 03 10 01 24 sethi %hi(0x40049000), %g1 <== NOT EXECUTED 40020550: c2 00 60 94 ld [ %g1 + 0x94 ], %g1 ! 40049094 <== NOT EXECUTED return _POSIX_types_Gid; } 40020554: 81 c3 e0 08 retl <== NOT EXECUTED 40020558: d0 10 60 2a lduh [ %g1 + 0x2a ], %o0 <== NOT EXECUTED 40020bcc : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 40020bcc: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED FILE *fp; int match; init_etc_passwd_group(); 40020bd0: 7f ff ff b5 call 40020aa4 <== NOT EXECUTED 40020bd4: 01 00 00 00 nop <== NOT EXECUTED if ((fp = fopen("/etc/group", "r")) == NULL) { 40020bd8: 11 10 01 15 sethi %hi(0x40045400), %o0 <== NOT EXECUTED 40020bdc: 13 10 01 20 sethi %hi(0x40048000), %o1 <== NOT EXECUTED 40020be0: 90 12 23 98 or %o0, 0x398, %o0 <== NOT EXECUTED 40020be4: 40 00 3e b3 call 400306b0 <== NOT EXECUTED 40020be8: 92 12 61 c8 or %o1, 0x1c8, %o1 <== NOT EXECUTED 40020bec: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 40020bf0: 12 80 00 08 bne 40020c10 <== NOT EXECUTED 40020bf4: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED errno = EINVAL; 40020bf8: 40 00 3c 3c call 4002fce8 <__errno> <== NOT EXECUTED 40020bfc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40020c00: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40020c04: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40020c08: 81 c7 e0 08 ret <== NOT EXECUTED 40020c0c: 81 e8 00 00 restore <== NOT EXECUTED return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 40020c10: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40020c14: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED 40020c18: 7f ff fe e8 call 400207b8 <== NOT EXECUTED 40020c1c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40020c20: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40020c24: 12 80 00 0a bne 40020c4c <== NOT EXECUTED 40020c28: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED errno = EINVAL; 40020c2c: 40 00 3c 2f call 4002fce8 <__errno> <== NOT EXECUTED 40020c30: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40020c34: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40020c38: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 40020c3c: 40 00 3c 83 call 4002fe48 <== NOT EXECUTED 40020c40: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40020c44: 81 c7 e0 08 ret <== NOT EXECUTED 40020c48: 81 e8 00 00 restore <== NOT EXECUTED return -1; } if (name) { 40020c4c: 22 80 00 07 be,a 40020c68 <== NOT EXECUTED 40020c50: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED match = (strcmp(grp->gr_name, name) == 0); 40020c54: d0 06 80 00 ld [ %i2 ], %o0 <== NOT EXECUTED 40020c58: 40 00 50 a8 call 40034ef8 <== NOT EXECUTED 40020c5c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40020c60: 10 80 00 04 b 40020c70 <== NOT EXECUTED 40020c64: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED } else { match = (grp->gr_gid == gid); 40020c68: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 40020c6c: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 40020c70: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } if (match) { 40020c74: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40020c78: 02 bf ff e6 be 40020c10 <== NOT EXECUTED 40020c7c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED fclose(fp); 40020c80: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40020c84: 40 00 3c 71 call 4002fe48 <== NOT EXECUTED 40020c88: b0 10 20 00 clr %i0 <== NOT EXECUTED *result = grp; 40020c8c: f4 27 40 00 st %i2, [ %i5 ] <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 40020c90: 81 c7 e0 08 ret <== NOT EXECUTED 40020c94: 81 e8 00 00 restore <== NOT EXECUTED 400208f8 : return NULL; return p; } struct group *getgrent() { 400208f8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (group_fp == NULL) 400208fc: 03 10 01 73 sethi %hi(0x4005cc00), %g1 <== NOT EXECUTED 40020900: d0 00 62 1c ld [ %g1 + 0x21c ], %o0 ! 4005ce1c <== NOT EXECUTED 40020904: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40020908: 02 80 00 0b be 40020934 <== NOT EXECUTED 4002090c: 15 10 01 73 sethi %hi(0x4005cc00), %o2 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 40020910: 21 10 01 73 sethi %hi(0x4005cc00), %l0 <== NOT EXECUTED 40020914: 92 14 22 e8 or %l0, 0x2e8, %o1 ! 4005cee8 <== NOT EXECUTED 40020918: 94 12 a2 20 or %o2, 0x220, %o2 <== NOT EXECUTED 4002091c: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 40020920: 7f ff ff a6 call 400207b8 <== NOT EXECUTED 40020924: b0 14 22 e8 or %l0, 0x2e8, %i0 <== NOT EXECUTED 40020928: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002092c: 12 80 00 03 bne 40020938 <== NOT EXECUTED 40020930: 01 00 00 00 nop <== NOT EXECUTED 40020934: b0 10 20 00 clr %i0 ! 0 <== NOT EXECUTED return NULL; return &grent; } 40020938: 81 c7 e0 08 ret <== NOT EXECUTED 4002093c: 81 e8 00 00 restore <== NOT EXECUTED 40020cd0 : } struct group *getgrgid( gid_t gid ) { 40020cd0: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 40020cd4: 13 10 01 73 sethi %hi(0x4005cc00), %o1 <== NOT EXECUTED 40020cd8: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 40020cdc: 92 12 62 e8 or %o1, 0x2e8, %o1 <== NOT EXECUTED 40020ce0: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 40020ce4: 15 10 01 73 sethi %hi(0x4005cc00), %o2 <== NOT EXECUTED 40020ce8: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 40020cec: 94 12 a2 20 or %o2, 0x220, %o2 <== NOT EXECUTED 40020cf0: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 40020cf4: 7f ff ff e9 call 40020c98 <== NOT EXECUTED 40020cf8: b0 10 20 00 clr %i0 <== NOT EXECUTED 40020cfc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40020d00: 22 80 00 02 be,a 40020d08 <== NOT EXECUTED 40020d04: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 40020d08: 81 c7 e0 08 ret <== NOT EXECUTED 40020d0c: 81 e8 00 00 restore <== NOT EXECUTED 40020c98 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 40020c98: 82 10 00 09 mov %o1, %g1 <== NOT EXECUTED 40020c9c: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 40020ca0: 86 10 00 0b mov %o3, %g3 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 40020ca4: 93 2a 20 10 sll %o0, 0x10, %o1 <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 40020ca8: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 40020cac: 94 10 00 01 mov %g1, %o2 <== NOT EXECUTED 40020cb0: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 40020cb4: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 40020cb8: 98 10 00 03 mov %g3, %o4 <== NOT EXECUTED 40020cbc: 90 10 20 00 clr %o0 <== NOT EXECUTED 40020cc0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40020cc4: 7f ff ff c2 call 40020bcc <== NOT EXECUTED 40020cc8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40020ccc: 01 00 00 00 nop 40020d3c : } struct group *getgrnam( const char *name ) { 40020d3c: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 40020d40: 13 10 01 73 sethi %hi(0x4005cc00), %o1 <== NOT EXECUTED 40020d44: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40020d48: 92 12 62 e8 or %o1, 0x2e8, %o1 <== NOT EXECUTED 40020d4c: 15 10 01 73 sethi %hi(0x4005cc00), %o2 <== NOT EXECUTED 40020d50: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 40020d54: 94 12 a2 20 or %o2, 0x220, %o2 <== NOT EXECUTED 40020d58: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 40020d5c: 7f ff ff ed call 40020d10 <== NOT EXECUTED 40020d60: b0 10 20 00 clr %i0 <== NOT EXECUTED 40020d64: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40020d68: 22 80 00 02 be,a 40020d70 <== NOT EXECUTED 40020d6c: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 40020d70: 81 c7 e0 08 ret <== NOT EXECUTED 40020d74: 81 e8 00 00 restore <== NOT EXECUTED 40020d10 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 40020d10: 82 10 00 0a mov %o2, %g1 <== NOT EXECUTED 40020d14: 84 10 00 0b mov %o3, %g2 <== NOT EXECUTED 40020d18: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getgr_r(name, 0, grp, buffer, bufsize, result); 40020d1c: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 40020d20: 96 10 00 01 mov %g1, %o3 <== NOT EXECUTED 40020d24: 98 10 00 02 mov %g2, %o4 <== NOT EXECUTED 40020d28: 92 10 20 00 clr %o1 <== NOT EXECUTED 40020d2c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40020d30: 7f ff ff a7 call 40020bcc <== NOT EXECUTED 40020d34: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40020d38: 01 00 00 00 nop 40020dc4 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 40020dc4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED FILE *fp; int match; init_etc_passwd_group(); 40020dc8: 7f ff ff 37 call 40020aa4 <== NOT EXECUTED 40020dcc: 01 00 00 00 nop <== NOT EXECUTED if ((fp = fopen("/etc/passwd", "r")) == NULL) { 40020dd0: 11 10 01 15 sethi %hi(0x40045400), %o0 <== NOT EXECUTED 40020dd4: 13 10 01 20 sethi %hi(0x40048000), %o1 <== NOT EXECUTED 40020dd8: 90 12 23 20 or %o0, 0x320, %o0 <== NOT EXECUTED 40020ddc: 40 00 3e 35 call 400306b0 <== NOT EXECUTED 40020de0: 92 12 61 c8 or %o1, 0x1c8, %o1 <== NOT EXECUTED 40020de4: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 40020de8: 12 80 00 08 bne 40020e08 <== NOT EXECUTED 40020dec: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED errno = EINVAL; 40020df0: 40 00 3b be call 4002fce8 <__errno> <== NOT EXECUTED 40020df4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40020df8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40020dfc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40020e00: 81 c7 e0 08 ret <== NOT EXECUTED 40020e04: 81 e8 00 00 restore <== NOT EXECUTED return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 40020e08: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40020e0c: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED 40020e10: 7f ff fe cc call 40020940 <== NOT EXECUTED 40020e14: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40020e18: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40020e1c: 12 80 00 0a bne 40020e44 <== NOT EXECUTED 40020e20: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED errno = EINVAL; 40020e24: 40 00 3b b1 call 4002fce8 <__errno> <== NOT EXECUTED 40020e28: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40020e2c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40020e30: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 40020e34: 40 00 3c 05 call 4002fe48 <== NOT EXECUTED 40020e38: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40020e3c: 81 c7 e0 08 ret <== NOT EXECUTED 40020e40: 81 e8 00 00 restore <== NOT EXECUTED return -1; } if (name) { 40020e44: 22 80 00 07 be,a 40020e60 <== NOT EXECUTED 40020e48: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED match = (strcmp(pwd->pw_name, name) == 0); 40020e4c: d0 06 80 00 ld [ %i2 ], %o0 <== NOT EXECUTED 40020e50: 40 00 50 2a call 40034ef8 <== NOT EXECUTED 40020e54: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40020e58: 10 80 00 04 b 40020e68 <== NOT EXECUTED 40020e5c: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED } else { match = (pwd->pw_uid == uid); 40020e60: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 40020e64: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 40020e68: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } if (match) { 40020e6c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40020e70: 02 bf ff e6 be 40020e08 <== NOT EXECUTED 40020e74: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED fclose(fp); 40020e78: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40020e7c: 40 00 3b f3 call 4002fe48 <== NOT EXECUTED 40020e80: b0 10 20 00 clr %i0 <== NOT EXECUTED *result = pwd; 40020e84: f4 27 40 00 st %i2, [ %i5 ] <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 40020e88: 81 c7 e0 08 ret <== NOT EXECUTED 40020e8c: 81 e8 00 00 restore <== NOT EXECUTED 40020a5c : return NULL; return p; } struct passwd *getpwent() { 40020a5c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (passwd_fp == NULL) 40020a60: 03 10 01 73 sethi %hi(0x4005cc00), %g1 <== NOT EXECUTED 40020a64: d0 00 61 34 ld [ %g1 + 0x134 ], %o0 ! 4005cd34 <== NOT EXECUTED 40020a68: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40020a6c: 02 80 00 0b be 40020a98 <== NOT EXECUTED 40020a70: 15 10 01 73 sethi %hi(0x4005cc00), %o2 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 40020a74: 21 10 01 73 sethi %hi(0x4005cc00), %l0 <== NOT EXECUTED 40020a78: 92 14 22 00 or %l0, 0x200, %o1 ! 4005ce00 <== NOT EXECUTED 40020a7c: 94 12 a1 38 or %o2, 0x138, %o2 <== NOT EXECUTED 40020a80: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 40020a84: 7f ff ff af call 40020940 <== NOT EXECUTED 40020a88: b0 14 22 00 or %l0, 0x200, %i0 <== NOT EXECUTED 40020a8c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40020a90: 12 80 00 03 bne 40020a9c <== NOT EXECUTED 40020a94: 01 00 00 00 nop <== NOT EXECUTED 40020a98: b0 10 20 00 clr %i0 ! 0 <== NOT EXECUTED return NULL; return &pwent; } 40020a9c: 81 c7 e0 08 ret <== NOT EXECUTED 40020aa0: 81 e8 00 00 restore <== NOT EXECUTED 40020f34 : } struct passwd *getpwnam( const char *name ) { 40020f34: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 40020f38: 13 10 01 73 sethi %hi(0x4005cc00), %o1 <== NOT EXECUTED 40020f3c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40020f40: 92 12 62 00 or %o1, 0x200, %o1 <== NOT EXECUTED 40020f44: 15 10 01 73 sethi %hi(0x4005cc00), %o2 <== NOT EXECUTED 40020f48: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 40020f4c: 94 12 a1 38 or %o2, 0x138, %o2 <== NOT EXECUTED 40020f50: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 40020f54: 7f ff ff ed call 40020f08 <== NOT EXECUTED 40020f58: b0 10 20 00 clr %i0 <== NOT EXECUTED 40020f5c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40020f60: 22 80 00 02 be,a 40020f68 <== NOT EXECUTED 40020f64: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 40020f68: 81 c7 e0 08 ret <== NOT EXECUTED 40020f6c: 81 e8 00 00 restore <== NOT EXECUTED 40020f08 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 40020f08: 82 10 00 0a mov %o2, %g1 <== NOT EXECUTED 40020f0c: 84 10 00 0b mov %o3, %g2 <== NOT EXECUTED 40020f10: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getpw_r(name, 0, pwd, buffer, bufsize, result); 40020f14: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 40020f18: 96 10 00 01 mov %g1, %o3 <== NOT EXECUTED 40020f1c: 98 10 00 02 mov %g2, %o4 <== NOT EXECUTED 40020f20: 92 10 20 00 clr %o1 <== NOT EXECUTED 40020f24: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40020f28: 7f ff ff a7 call 40020dc4 <== NOT EXECUTED 40020f2c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40020f30: 01 00 00 00 nop 40020ec8 : } struct passwd *getpwuid( uid_t uid ) { 40020ec8: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 40020ecc: 13 10 01 73 sethi %hi(0x4005cc00), %o1 <== NOT EXECUTED 40020ed0: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 40020ed4: 92 12 62 00 or %o1, 0x200, %o1 <== NOT EXECUTED 40020ed8: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 40020edc: 15 10 01 73 sethi %hi(0x4005cc00), %o2 <== NOT EXECUTED 40020ee0: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 40020ee4: 94 12 a1 38 or %o2, 0x138, %o2 <== NOT EXECUTED 40020ee8: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 40020eec: 7f ff ff e9 call 40020e90 <== NOT EXECUTED 40020ef0: b0 10 20 00 clr %i0 <== NOT EXECUTED 40020ef4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40020ef8: 22 80 00 02 be,a 40020f00 <== NOT EXECUTED 40020efc: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 40020f00: 81 c7 e0 08 ret <== NOT EXECUTED 40020f04: 81 e8 00 00 restore <== NOT EXECUTED 40020e90 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 40020e90: 82 10 00 09 mov %o1, %g1 <== NOT EXECUTED 40020e94: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 40020e98: 86 10 00 0b mov %o3, %g3 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 40020e9c: 93 2a 20 10 sll %o0, 0x10, %o1 <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 40020ea0: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 40020ea4: 94 10 00 01 mov %g1, %o2 <== NOT EXECUTED 40020ea8: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 40020eac: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 40020eb0: 98 10 00 03 mov %g3, %o4 <== NOT EXECUTED 40020eb4: 90 10 20 00 clr %o0 <== NOT EXECUTED 40020eb8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40020ebc: 7f ff ff c2 call 40020dc4 <== NOT EXECUTED 40020ec0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40020ec4: 01 00 00 00 nop 4000b0a4 : int gettimeofday( struct timeval *tp, void * __tz ) { 4000b0a4: 9d e3 bf 90 save %sp, -112, %sp /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 4000b0a8: 80 a6 20 00 cmp %i0, 0 4000b0ac: 12 80 00 08 bne 4000b0cc 4000b0b0: 01 00 00 00 nop errno = EFAULT; 4000b0b4: 40 00 0b 05 call 4000dcc8 <__errno> <== NOT EXECUTED 4000b0b8: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4000b0bc: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 4000b0c0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000b0c4: 81 c7 e0 08 ret <== NOT EXECUTED 4000b0c8: 81 e8 00 00 restore <== NOT EXECUTED ) { ISR_Level level; struct timespec now; _ISR_Disable(level); 4000b0cc: 7f ff db 23 call 40001d58 4000b0d0: 01 00 00 00 nop 4000b0d4: a0 10 00 08 mov %o0, %l0 _TOD_Get( &now ); 4000b0d8: 7f ff f0 7c call 400072c8 <_TOD_Get> 4000b0dc: 90 07 bf f0 add %fp, -16, %o0 _ISR_Enable(level); 4000b0e0: 7f ff db 22 call 40001d68 4000b0e4: 90 10 00 10 mov %l0, %o0 time->tv_sec = now.tv_sec; time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 4000b0e8: d0 07 bf f4 ld [ %fp + -12 ], %o0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); time->tv_sec = now.tv_sec; 4000b0ec: c2 07 bf f0 ld [ %fp + -16 ], %g1 time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 4000b0f0: 92 10 23 e8 mov 0x3e8, %o1 4000b0f4: 40 00 26 c5 call 40014c08 <.udiv> 4000b0f8: c2 26 00 00 st %g1, [ %i0 ] 4000b0fc: 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; } 4000b100: 81 c7 e0 08 ret 4000b104: 91 e8 20 00 restore %g0, 0, %o0 400065a0 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 400065a0: 03 10 01 24 sethi %hi(0x40049000), %g1 <== NOT EXECUTED 400065a4: c2 00 60 94 ld [ %g1 + 0x94 ], %g1 ! 40049094 <== NOT EXECUTED return _POSIX_types_Uid; } 400065a8: 81 c3 e0 08 retl <== NOT EXECUTED 400065ac: d0 10 60 28 lduh [ %g1 + 0x28 ], %o0 <== NOT EXECUTED 4002d074 : */ int imfs_dir_rmnod( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4002d074: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4002d078: 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 ) ) 4002d07c: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 4002d080: 82 04 20 50 add %l0, 0x50, %g1 4002d084: 80 a0 80 01 cmp %g2, %g1 4002d088: 22 80 00 06 be,a 4002d0a0 4002d08c: c2 06 20 0c ld [ %i0 + 0xc ], %g1 rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 4002d090: 40 00 0b 16 call 4002fce8 <__errno> 4002d094: 01 00 00 00 nop 4002d098: 10 80 00 0d b 4002d0cc 4002d09c: 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 ) 4002d0a0: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 4002d0a4: 80 a0 40 10 cmp %g1, %l0 4002d0a8: 02 80 00 06 be 4002d0c0 4002d0ac: 01 00 00 00 nop /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 4002d0b0: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 4002d0b4: 80 a0 60 00 cmp %g1, 0 4002d0b8: 22 80 00 08 be,a 4002d0d8 4002d0bc: c2 04 20 08 ld [ %l0 + 8 ], %g1 rtems_set_errno_and_return_minus_one( EBUSY ); 4002d0c0: 40 00 0b 0a call 4002fce8 <__errno> 4002d0c4: 01 00 00 00 nop 4002d0c8: 82 10 20 10 mov 0x10, %g1 ! 10 4002d0cc: c2 22 00 00 st %g1, [ %o0 ] 4002d0d0: 81 c7 e0 08 ret 4002d0d4: 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 ) { 4002d0d8: 80 a0 60 00 cmp %g1, 0 4002d0dc: 22 80 00 06 be,a 4002d0f4 4002d0e0: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 4002d0e4: 7f ff da 3f call 400239e0 <_Chain_Extract> 4002d0e8: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 4002d0ec: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4002d0f0: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 4002d0f4: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4002d0f8: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 4002d0fc: 90 07 bf f0 add %fp, -16, %o0 4002d100: 7f ff 65 05 call 40006514 4002d104: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 4002d108: 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) ) { 4002d10c: 90 10 00 10 mov %l0, %o0 4002d110: 7f ff 65 73 call 400066dc 4002d114: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 4002d118: 80 a2 20 00 cmp %o0, 0 4002d11c: 12 80 00 11 bne 4002d160 4002d120: 01 00 00 00 nop 4002d124: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 4002d128: 80 a0 60 00 cmp %g1, 0 4002d12c: 12 80 00 0d bne 4002d160 4002d130: 03 10 01 24 sethi %hi(0x40049000), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 4002d134: c6 00 60 94 ld [ %g1 + 0x94 ], %g3 ! 40049094 4002d138: c4 06 00 00 ld [ %i0 ], %g2 4002d13c: c2 00 e0 04 ld [ %g3 + 4 ], %g1 4002d140: 80 a0 40 02 cmp %g1, %g2 4002d144: 22 80 00 02 be,a 4002d14c 4002d148: c0 20 e0 04 clr [ %g3 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 4002d14c: 90 10 00 10 mov %l0, %o0 4002d150: 7f ff 64 c7 call 4000646c 4002d154: b0 10 20 00 clr %i0 4002d158: 81 c7 e0 08 ret 4002d15c: 81 e8 00 00 restore } return 0; } 4002d160: 81 c7 e0 08 ret 4002d164: 91 e8 20 00 restore %g0, 0, %o0 40020aa4 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 40020aa4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 40020aa8: 05 10 01 73 sethi %hi(0x4005cc00), %g2 <== NOT EXECUTED 40020aac: c2 48 a1 30 ldsb [ %g2 + 0x130 ], %g1 ! 4005cd30 <== NOT EXECUTED 40020ab0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40020ab4: 12 80 00 31 bne 40020b78 <== NOT EXECUTED 40020ab8: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED return; etc_passwd_initted = 1; mkdir("/etc", 0777); 40020abc: 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; 40020ac0: c2 28 a1 30 stb %g1, [ %g2 + 0x130 ] <== NOT EXECUTED mkdir("/etc", 0777); 40020ac4: 11 10 01 15 sethi %hi(0x40045400), %o0 <== NOT EXECUTED 40020ac8: 7f ff 98 6a call 40006c70 <== NOT EXECUTED 40020acc: 90 12 23 18 or %o0, 0x318, %o0 ! 40045718 <== NOT EXECUTED /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 40020ad0: 31 10 01 15 sethi %hi(0x40045400), %i0 <== NOT EXECUTED 40020ad4: 13 10 01 20 sethi %hi(0x40048000), %o1 <== NOT EXECUTED 40020ad8: 90 16 23 20 or %i0, 0x320, %o0 <== NOT EXECUTED 40020adc: 40 00 3e f5 call 400306b0 <== NOT EXECUTED 40020ae0: 92 12 61 c8 or %o1, 0x1c8, %o1 <== NOT EXECUTED 40020ae4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40020ae8: 12 80 00 0d bne 40020b1c <== NOT EXECUTED 40020aec: 01 00 00 00 nop <== NOT EXECUTED fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 40020af0: 90 16 23 20 or %i0, 0x320, %o0 <== NOT EXECUTED 40020af4: 13 10 01 12 sethi %hi(0x40044800), %o1 <== NOT EXECUTED 40020af8: 40 00 3e ee call 400306b0 <== NOT EXECUTED 40020afc: 92 12 60 90 or %o1, 0x90, %o1 ! 40044890 <== NOT EXECUTED 40020b00: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40020b04: 02 80 00 08 be 40020b24 <== NOT EXECUTED 40020b08: 11 10 01 15 sethi %hi(0x40045400), %o0 <== NOT EXECUTED fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 40020b0c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40020b10: 40 00 3f 42 call 40030818 <== NOT EXECUTED 40020b14: 90 12 23 30 or %o0, 0x330, %o0 <== NOT EXECUTED "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 40020b18: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40020b1c: 40 00 3c cb call 4002fe48 <== NOT EXECUTED 40020b20: 01 00 00 00 nop <== NOT EXECUTED } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 40020b24: 31 10 01 15 sethi %hi(0x40045400), %i0 <== NOT EXECUTED 40020b28: 13 10 01 20 sethi %hi(0x40048000), %o1 <== NOT EXECUTED 40020b2c: 90 16 23 98 or %i0, 0x398, %o0 <== NOT EXECUTED 40020b30: 40 00 3e e0 call 400306b0 <== NOT EXECUTED 40020b34: 92 12 61 c8 or %o1, 0x1c8, %o1 <== NOT EXECUTED 40020b38: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40020b3c: 22 80 00 04 be,a 40020b4c <== NOT EXECUTED 40020b40: 90 16 23 98 or %i0, 0x398, %o0 <== NOT EXECUTED fclose(fp); 40020b44: 10 80 00 0b b 40020b70 <== NOT EXECUTED 40020b48: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } else if ((fp = fopen("/etc/group", "w")) != NULL) { 40020b4c: 13 10 01 12 sethi %hi(0x40044800), %o1 <== NOT EXECUTED 40020b50: 40 00 3e d8 call 400306b0 <== NOT EXECUTED 40020b54: 92 12 60 90 or %o1, 0x90, %o1 ! 40044890 <== NOT EXECUTED 40020b58: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40020b5c: 02 80 00 07 be 40020b78 <== NOT EXECUTED 40020b60: 11 10 01 15 sethi %hi(0x40045400), %o0 <== NOT EXECUTED fprintf( fp, "root:x:0:root\n" 40020b64: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40020b68: 40 00 3f 2c call 40030818 <== NOT EXECUTED 40020b6c: 90 12 23 a8 or %o0, 0x3a8, %o0 <== NOT EXECUTED "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 40020b70: 40 00 3c b6 call 4002fe48 <== NOT EXECUTED 40020b74: 81 e8 00 00 restore <== NOT EXECUTED 40020b78: 81 c7 e0 08 ret <== NOT EXECUTED 40020b7c: 81 e8 00 00 restore <== NOT EXECUTED 40015d98 : int ioctl( int fd, ioctl_command_t command, ... ) { 40015d98: 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 ); 40015d9c: 03 10 00 9b sethi %hi(0x40026c00), %g1 40015da0: c2 00 61 38 ld [ %g1 + 0x138 ], %g1 ! 40026d38 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); 40015da4: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 40015da8: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 40015dac: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 40015db0: 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 ); 40015db4: 80 a6 00 01 cmp %i0, %g1 40015db8: 1a 80 00 14 bcc 40015e08 40015dbc: 92 10 00 19 mov %i1, %o1 iop = rtems_libio_iop( fd ); 40015dc0: 03 10 00 a2 sethi %hi(0x40028800), %g1 40015dc4: c6 00 63 ec ld [ %g1 + 0x3ec ], %g3 ! 40028bec 40015dc8: 85 2e 20 02 sll %i0, 2, %g2 40015dcc: 83 2e 20 04 sll %i0, 4, %g1 40015dd0: 82 20 40 02 sub %g1, %g2, %g1 40015dd4: 82 00 40 18 add %g1, %i0, %g1 40015dd8: 83 28 60 02 sll %g1, 2, %g1 40015ddc: 90 00 c0 01 add %g3, %g1, %o0 rtems_libio_check_is_open(iop); 40015de0: c2 02 20 0c ld [ %o0 + 0xc ], %g1 40015de4: 80 88 61 00 btst 0x100, %g1 40015de8: 02 80 00 08 be 40015e08 40015dec: 01 00 00 00 nop /* * Now process the ioctl(). */ if ( !iop->handlers ) 40015df0: 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 *); 40015df4: 82 07 a0 50 add %fp, 0x50, %g1 40015df8: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * Now process the ioctl(). */ if ( !iop->handlers ) 40015dfc: 80 a0 a0 00 cmp %g2, 0 40015e00: 12 80 00 06 bne 40015e18 40015e04: d4 07 a0 4c ld [ %fp + 0x4c ], %o2 rtems_set_errno_and_return_minus_one( EBADF ); 40015e08: 40 00 02 f9 call 400169ec <__errno> <== NOT EXECUTED 40015e0c: 01 00 00 00 nop <== NOT EXECUTED 40015e10: 10 80 00 09 b 40015e34 <== NOT EXECUTED 40015e14: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED if ( !iop->handlers->ioctl_h ) 40015e18: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40015e1c: 80 a0 60 00 cmp %g1, 0 40015e20: 12 80 00 08 bne 40015e40 40015e24: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 40015e28: 40 00 02 f1 call 400169ec <__errno> <== NOT EXECUTED 40015e2c: 01 00 00 00 nop <== NOT EXECUTED 40015e30: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40015e34: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40015e38: 10 80 00 04 b 40015e48 <== NOT EXECUTED 40015e3c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 40015e40: 9f c0 40 00 call %g1 40015e44: 01 00 00 00 nop return rc; } 40015e48: 81 c7 e0 08 ret 40015e4c: 91 e8 00 08 restore %g0, %o0, %o0 400047e0 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 400047e0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 400047e4: c4 06 60 30 ld [ %i1 + 0x30 ], %g2 <== NOT EXECUTED 400047e8: 80 88 a0 20 btst 0x20, %g2 <== NOT EXECUTED 400047ec: 02 80 00 03 be 400047f8 <== NOT EXECUTED 400047f0: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED c &= 0x7f; 400047f4: a0 0e 20 7f and %i0, 0x7f, %l0 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 400047f8: 80 88 a2 00 btst 0x200, %g2 <== NOT EXECUTED 400047fc: 02 80 00 0b be 40004828 <== NOT EXECUTED 40004800: 82 0c 20 ff and %l0, 0xff, %g1 <== NOT EXECUTED c = tolower (c); 40004804: 03 10 00 64 sethi %hi(0x40019000), %g1 <== NOT EXECUTED 40004808: c2 00 63 d0 ld [ %g1 + 0x3d0 ], %g1 ! 400193d0 <__ctype_ptr> <== NOT EXECUTED 4000480c: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 40004810: c2 08 40 08 ldub [ %g1 + %o0 ], %g1 <== NOT EXECUTED 40004814: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40004818: 32 80 00 02 bne,a 40004820 <== NOT EXECUTED 4000481c: 90 02 20 20 add %o0, 0x20, %o0 <== NOT EXECUTED 40004820: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED if (c == '\r') { 40004824: 82 0c 20 ff and %l0, 0xff, %g1 <== NOT EXECUTED 40004828: 80 a0 60 0d cmp %g1, 0xd <== NOT EXECUTED 4000482c: 12 80 00 09 bne 40004850 <== NOT EXECUTED 40004830: 80 a0 60 0a cmp %g1, 0xa <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) 40004834: 80 88 a0 80 btst 0x80, %g2 <== NOT EXECUTED 40004838: 12 80 00 5d bne 400049ac <== NOT EXECUTED 4000483c: 80 88 a1 00 btst 0x100, %g2 <== NOT EXECUTED return 0; if (tty->termios.c_iflag & ICRNL) 40004840: 32 80 00 0d bne,a 40004874 <== NOT EXECUTED 40004844: 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)) { 40004848: 10 80 00 0c b 40004878 <== NOT EXECUTED 4000484c: 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)) { 40004850: 12 80 00 07 bne 4000486c <== NOT EXECUTED 40004854: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004858: 80 88 a0 40 btst 0x40, %g2 <== NOT EXECUTED 4000485c: 32 80 00 06 bne,a 40004874 <== NOT EXECUTED 40004860: a0 10 20 0d mov 0xd, %l0 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 40004864: 10 80 00 05 b 40004878 <== NOT EXECUTED 40004868: c6 06 60 3c ld [ %i1 + 0x3c ], %g3 <== NOT EXECUTED 4000486c: 02 80 00 3c be 4000495c <== NOT EXECUTED 40004870: 03 10 00 64 sethi %hi(0x40019000), %g1 <== NOT EXECUTED 40004874: c6 06 60 3c ld [ %i1 + 0x3c ], %g3 <== NOT EXECUTED 40004878: 80 88 e0 02 btst 2, %g3 <== NOT EXECUTED 4000487c: 02 80 00 38 be 4000495c <== NOT EXECUTED 40004880: 03 10 00 64 sethi %hi(0x40019000), %g1 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 40004884: c2 0e 60 43 ldub [ %i1 + 0x43 ], %g1 <== NOT EXECUTED 40004888: 84 0c 20 ff and %l0, 0xff, %g2 <== NOT EXECUTED erase (tty, 0); 4000488c: 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]) { 40004890: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004894: 02 80 00 08 be 400048b4 <== NOT EXECUTED 40004898: 92 10 20 00 clr %o1 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 4000489c: c2 0e 60 44 ldub [ %i1 + 0x44 ], %g1 <== NOT EXECUTED 400048a0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400048a4: 32 80 00 07 bne,a 400048c0 <== NOT EXECUTED 400048a8: c2 0e 60 45 ldub [ %i1 + 0x45 ], %g1 <== NOT EXECUTED erase (tty, 1); 400048ac: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 400048b0: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 400048b4: 7f ff ff 42 call 400045bc <== NOT EXECUTED 400048b8: b0 10 20 00 clr %i0 <== NOT EXECUTED 400048bc: 30 80 00 3d b,a 400049b0 <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VEOF]) { 400048c0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400048c4: 02 80 00 3b be 400049b0 <== NOT EXECUTED 400048c8: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return 1; } else if (c == '\n') { 400048cc: 80 a0 a0 0a cmp %g2, 0xa <== NOT EXECUTED 400048d0: 32 80 00 0f bne,a 4000490c <== NOT EXECUTED 400048d4: c2 0e 60 4c ldub [ %i1 + 0x4c ], %g1 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) 400048d8: 80 88 e0 48 btst 0x48, %g3 <== NOT EXECUTED 400048dc: 22 80 00 06 be,a 400048f4 <== NOT EXECUTED 400048e0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 400048e4: 90 10 20 0a mov 0xa, %o0 <== NOT EXECUTED 400048e8: 7f ff ff 12 call 40004530 <== NOT EXECUTED 400048ec: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 400048f0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 400048f4: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED 400048f8: 84 10 20 0a mov 0xa, %g2 <== NOT EXECUTED 400048fc: c4 28 c0 01 stb %g2, [ %g3 + %g1 ] <== NOT EXECUTED 40004900: 82 00 60 01 inc %g1 <== NOT EXECUTED 40004904: 10 80 00 14 b 40004954 <== NOT EXECUTED 40004908: c2 26 60 20 st %g1, [ %i1 + 0x20 ] <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) 4000490c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004910: 02 80 00 07 be 4000492c <== NOT EXECUTED 40004914: 80 88 e0 08 btst 8, %g3 <== NOT EXECUTED 40004918: c2 0e 60 51 ldub [ %i1 + 0x51 ], %g1 <== NOT EXECUTED 4000491c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004920: 12 80 00 0f bne 4000495c <== NOT EXECUTED 40004924: 03 10 00 64 sethi %hi(0x40019000), %g1 <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 40004928: 80 88 e0 08 btst 8, %g3 <== NOT EXECUTED 4000492c: 22 80 00 06 be,a 40004944 <== NOT EXECUTED 40004930: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 40004934: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 40004938: 7f ff fe fe call 40004530 <== NOT EXECUTED 4000493c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 40004940: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 40004944: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED 40004948: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED 4000494c: e0 28 80 01 stb %l0, [ %g2 + %g1 ] <== NOT EXECUTED 40004950: c6 26 60 20 st %g3, [ %i1 + 0x20 ] <== NOT EXECUTED 40004954: 81 c7 e0 08 ret <== NOT EXECUTED 40004958: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 4000495c: c4 06 60 20 ld [ %i1 + 0x20 ], %g2 <== NOT EXECUTED 40004960: c2 00 63 2c ld [ %g1 + 0x32c ], %g1 <== NOT EXECUTED 40004964: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40004968: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4000496c: 16 80 00 11 bge 400049b0 <== NOT EXECUTED 40004970: b0 10 20 00 clr %i0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 40004974: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 40004978: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 4000497c: 22 80 00 06 be,a 40004994 <== NOT EXECUTED 40004980: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 40004984: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 40004988: 7f ff fe ea call 40004530 <== NOT EXECUTED 4000498c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 40004990: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 40004994: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED 40004998: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED 4000499c: e0 28 80 01 stb %l0, [ %g2 + %g1 ] <== NOT EXECUTED 400049a0: c6 26 60 20 st %g3, [ %i1 + 0x20 ] <== NOT EXECUTED 400049a4: 81 c7 e0 08 ret <== NOT EXECUTED 400049a8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 400049ac: b0 10 20 00 clr %i0 <== NOT EXECUTED } return 0; } 400049b0: 81 c7 e0 08 ret <== NOT EXECUTED 400049b4: 81 e8 00 00 restore <== NOT EXECUTED 40022440 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 40022440: 9d e3 bf 88 save %sp, -120, %sp /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 40022444: 7f ff ff 19 call 400220a8 40022448: 01 00 00 00 nop 4002244c: 80 a6 00 08 cmp %i0, %o0 40022450: 02 80 00 06 be 40022468 40022454: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); 40022458: 7f ff d1 65 call 400169ec <__errno> 4002245c: 01 00 00 00 nop 40022460: 10 80 00 07 b 4002247c 40022464: 82 10 20 03 mov 3, %g1 ! 3 /* * Validate the signal passed. */ if ( !sig ) 40022468: 12 80 00 08 bne 40022488 4002246c: 86 06 7f ff add %i1, -1, %g3 rtems_set_errno_and_return_minus_one( EINVAL ); 40022470: 7f ff d1 5f call 400169ec <__errno> 40022474: 01 00 00 00 nop 40022478: 82 10 20 16 mov 0x16, %g1 ! 16 4002247c: c2 22 00 00 st %g1, [ %o0 ] 40022480: 10 80 00 ae b 40022738 40022484: 90 10 3f ff mov -1, %o0 if ( !is_valid_signo(sig) ) 40022488: 80 a0 e0 1f cmp %g3, 0x1f 4002248c: 18 bf ff f9 bgu 40022470 40022490: 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 ) { 40022494: 83 2e 60 02 sll %i1, 2, %g1 40022498: 85 2e 60 04 sll %i1, 4, %g2 4002249c: 84 20 80 01 sub %g2, %g1, %g2 400224a0: 03 10 00 a5 sethi %hi(0x40029400), %g1 400224a4: 82 10 60 0c or %g1, 0xc, %g1 ! 4002940c <_POSIX_signals_Vectors> 400224a8: 82 00 40 02 add %g1, %g2, %g1 400224ac: c2 00 60 08 ld [ %g1 + 8 ], %g1 400224b0: 80 a0 60 01 cmp %g1, 1 400224b4: 02 80 00 a1 be 40022738 400224b8: 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 ) ) 400224bc: 80 a6 60 08 cmp %i1, 8 400224c0: 02 80 00 06 be 400224d8 400224c4: 80 a6 60 04 cmp %i1, 4 400224c8: 02 80 00 04 be 400224d8 400224cc: 80 a6 60 0b cmp %i1, 0xb 400224d0: 12 80 00 08 bne 400224f0 400224d4: 82 10 20 01 mov 1, %g1 return pthread_kill( pthread_self(), sig ); 400224d8: 40 00 01 34 call 400229a8 400224dc: 01 00 00 00 nop 400224e0: 40 00 00 f6 call 400228b8 400224e4: 92 10 00 19 mov %i1, %o1 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } _Thread_Enable_dispatch(); return 0; } 400224e8: 81 c7 e0 08 ret 400224ec: 91 e8 00 08 restore %g0, %o0, %o0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 400224f0: f2 27 bf ec st %i1, [ %fp + -20 ] siginfo->si_code = SI_USER; 400224f4: c2 27 bf f0 st %g1, [ %fp + -16 ] if ( !value ) { 400224f8: 80 a6 a0 00 cmp %i2, 0 400224fc: 12 80 00 04 bne 4002250c 40022500: b1 28 40 03 sll %g1, %g3, %i0 siginfo->si_value.sival_int = 0; 40022504: 10 80 00 04 b 40022514 40022508: c0 27 bf f4 clr [ %fp + -12 ] } else { siginfo->si_value = *value; 4002250c: c2 06 80 00 ld [ %i2 ], %g1 40022510: c2 27 bf f4 st %g1, [ %fp + -12 ] 40022514: 05 10 00 a3 sethi %hi(0x40028c00), %g2 40022518: c2 00 a1 d0 ld [ %g2 + 0x1d0 ], %g1 ! 40028dd0 <_Thread_Dispatch_disable_level> 4002251c: 82 00 60 01 inc %g1 40022520: c2 20 a1 d0 st %g1, [ %g2 + 0x1d0 ] /* * 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; 40022524: 03 10 00 a3 sethi %hi(0x40028c00), %g1 40022528: c6 00 62 90 ld [ %g1 + 0x290 ], %g3 ! 40028e90 <_Thread_Executing> api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 4002252c: c2 00 e1 60 ld [ %g3 + 0x160 ], %g1 40022530: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 40022534: 80 ae 00 01 andncc %i0, %g1, %g0 40022538: 12 80 00 58 bne 40022698 4002253c: 03 10 00 a5 sethi %hi(0x40029400), %g1 goto process_it; 40022540: 88 10 61 98 or %g1, 0x198, %g4 ! 40029598 <_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 ; 40022544: 96 01 20 30 add %g4, 0x30, %o3 index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; 40022548: 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; 4002254c: 10 80 00 0b b 40022578 40022550: 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 ]; 40022554: da 00 a1 60 ld [ %g2 + 0x160 ], %o5 if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 40022558: 80 8e 00 01 btst %i0, %g1 4002255c: 12 80 00 4f bne 40022698 40022560: 86 10 00 02 mov %g2, %g3 40022564: c2 03 60 c4 ld [ %o5 + 0xc4 ], %g1 <== NOT EXECUTED 40022568: 80 ae 00 01 andncc %i0, %g1, %g0 <== NOT EXECUTED 4002256c: 12 80 00 4c bne 4002269c <== NOT EXECUTED 40022570: 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 ) { 40022574: 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 ) ; 40022578: 80 a0 80 0c cmp %g2, %o4 4002257c: 32 bf ff f6 bne,a 40022554 40022580: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 40022584: 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 ; 40022588: 80 a1 00 0b cmp %g4, %o3 4002258c: 12 bf ff ef bne 40022548 40022590: 03 10 00 9b sethi %hi(0x40026c00), %g1 * * + rtems internal threads do not receive signals. */ interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 40022594: c2 08 61 e4 ldub [ %g1 + 0x1e4 ], %g1 ! 40026de4 40022598: 90 10 20 00 clr %o0 4002259c: 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 ) 400225a0: 1f 04 00 00 sethi %hi(0x10000000), %o7 * * + rtems internal threads do not receive signals. */ interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 400225a4: 03 10 00 a3 sethi %hi(0x40028c00), %g1 400225a8: 98 10 61 38 or %g1, 0x138, %o4 ! 40028d38 <_Objects_Information_table+0x8> for ( the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; 400225ac: 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 ] ) 400225b0: c2 03 00 00 ld [ %o4 ], %g1 400225b4: 80 a0 60 00 cmp %g1, 0 400225b8: 22 80 00 32 be,a 40022680 400225bc: 98 03 20 04 add %o4, 4, %o4 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 400225c0: 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 ) 400225c4: 80 a0 60 00 cmp %g1, 0 400225c8: 22 80 00 2e be,a 40022680 400225cc: 98 03 20 04 add %o4, 4, %o4 <== NOT EXECUTED continue; maximum = the_info->maximum; object_table = the_info->local_table; 400225d0: 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; 400225d4: d4 10 60 10 lduh [ %g1 + 0x10 ], %o2 object_table = the_info->local_table; 400225d8: 10 80 00 26 b 40022670 400225dc: 9a 10 20 01 mov 1, %o5 for ( index = 1 ; index <= maximum ; index++ ) { the_thread = (Thread_Control *) object_table[ index ]; 400225e0: c4 02 40 01 ld [ %o1 + %g1 ], %g2 if ( !the_thread ) 400225e4: 80 a0 a0 00 cmp %g2, 0 400225e8: 02 80 00 20 be 40022668 400225ec: 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 ) 400225f0: c8 00 a0 14 ld [ %g2 + 0x14 ], %g4 400225f4: 80 a1 00 0b cmp %g4, %o3 400225f8: 38 80 00 1c bgu,a 40022668 400225fc: 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 ]; 40022600: c2 00 a1 60 ld [ %g2 + 0x160 ], %g1 if ( !api || !_POSIX_signals_Is_interested( api, mask ) ) 40022604: 80 a0 60 00 cmp %g1, 0 40022608: 22 80 00 18 be,a 40022668 4002260c: 88 10 00 0b mov %o3, %g4 <== NOT EXECUTED 40022610: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 40022614: 80 ae 00 01 andncc %i0, %g1, %g0 40022618: 22 80 00 14 be,a 40022668 4002261c: 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 ) { 40022620: 80 a1 00 0b cmp %g4, %o3 40022624: 2a 80 00 11 bcs,a 40022668 40022628: 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 ) ) 4002262c: c6 02 20 10 ld [ %o0 + 0x10 ], %g3 <== NOT EXECUTED 40022630: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40022634: 22 80 00 0d be,a 40022668 <== NOT EXECUTED 40022638: 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 ) ) { 4002263c: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED 40022640: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40022644: 22 80 00 09 be,a 40022668 <== NOT EXECUTED 40022648: 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 ) 4002264c: 80 88 c0 0f btst %g3, %o7 <== NOT EXECUTED 40022650: 32 80 00 06 bne,a 40022668 <== NOT EXECUTED 40022654: 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 ) { 40022658: 80 88 40 0f btst %g1, %o7 <== NOT EXECUTED 4002265c: 32 80 00 03 bne,a 40022668 <== NOT EXECUTED 40022660: 90 10 00 02 mov %g2, %o0 <== NOT EXECUTED 40022664: 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++ ) { 40022668: 9a 03 60 01 inc %o5 4002266c: 96 10 00 04 mov %g4, %o3 40022670: 80 a3 40 0a cmp %o5, %o2 40022674: 08 bf ff db bleu 400225e0 40022678: 83 2b 60 02 sll %o5, 2, %g1 4002267c: 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; 40022680: 80 a3 00 1a cmp %o4, %i2 40022684: 32 bf ff cc bne,a 400225b4 40022688: c2 03 00 00 ld [ %o4 ], %g1 interested_priority = the_thread->current_priority; } } } if ( interested_thread ) { 4002268c: 80 a2 20 00 cmp %o0, 0 40022690: 02 80 00 0b be 400226bc 40022694: 86 10 00 08 mov %o0, %g3 * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 40022698: 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 ) ) { 4002269c: 90 10 00 03 mov %g3, %o0 * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 400226a0: 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 ) ) { 400226a4: 92 10 00 19 mov %i1, %o1 400226a8: 40 00 00 38 call 40022788 <_POSIX_signals_Unblock_thread> 400226ac: 94 07 bf ec add %fp, -20, %o2 400226b0: 80 8a 20 ff btst 0xff, %o0 400226b4: 12 80 00 1e bne 4002272c 400226b8: 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 ); 400226bc: 40 00 00 22 call 40022744 <_POSIX_signals_Set_process_signals> 400226c0: 90 10 00 18 mov %i0, %o0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 400226c4: 83 2e 60 02 sll %i1, 2, %g1 400226c8: 85 2e 60 04 sll %i1, 4, %g2 400226cc: b2 20 80 01 sub %g2, %g1, %i1 400226d0: 03 10 00 a5 sethi %hi(0x40029400), %g1 400226d4: 82 10 60 0c or %g1, 0xc, %g1 ! 4002940c <_POSIX_signals_Vectors> 400226d8: c2 00 40 19 ld [ %g1 + %i1 ], %g1 400226dc: 80 a0 60 02 cmp %g1, 2 400226e0: 12 80 00 13 bne 4002272c 400226e4: 11 10 00 a5 sethi %hi(0x40029400), %o0 psiginfo = (POSIX_signals_Siginfo_node *) 400226e8: 7f ff a4 fa call 4000bad0 <_Chain_Get> 400226ec: 90 12 21 8c or %o0, 0x18c, %o0 ! 4002958c <_POSIX_signals_Inactive_siginfo> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 400226f0: b4 92 20 00 orcc %o0, 0, %i2 400226f4: 12 80 00 06 bne 4002270c 400226f8: 92 07 bf ec add %fp, -20, %o1 rtems_set_errno_and_return_minus_one( EAGAIN ); 400226fc: 7f ff d0 bc call 400169ec <__errno> <== NOT EXECUTED 40022700: 01 00 00 00 nop <== NOT EXECUTED 40022704: 10 bf ff 5e b 4002247c <== NOT EXECUTED 40022708: 82 10 20 0b mov 0xb, %g1 ! b <== NOT EXECUTED } psiginfo->Info = *siginfo; 4002270c: 90 06 a0 08 add %i2, 8, %o0 40022710: 7f ff d6 e9 call 400182b4 40022714: 94 10 20 0c mov 0xc, %o2 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 40022718: 11 10 00 a5 sethi %hi(0x40029400), %o0 4002271c: 92 10 00 1a mov %i2, %o1 40022720: 90 12 21 dc or %o0, 0x1dc, %o0 40022724: 7f ff a4 df call 4000baa0 <_Chain_Append> 40022728: 90 02 00 19 add %o0, %i1, %o0 } _Thread_Enable_dispatch(); 4002272c: 7f ff aa c1 call 4000d230 <_Thread_Enable_dispatch> 40022730: 01 00 00 00 nop 40022734: 90 10 20 00 clr %o0 ! 0 return 0; } 40022738: b0 10 00 08 mov %o0, %i0 4002273c: 81 c7 e0 08 ret 40022740: 81 e8 00 00 restore 400170d0 : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 400170d0: 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())) 400170d4: 03 10 00 67 sethi %hi(0x40019c00), %g1 400170d8: c2 00 63 04 ld [ %g1 + 0x304 ], %g1 ! 40019f04 <_System_state_Current> 400170dc: 80 a0 60 03 cmp %g1, 3 400170e0: 12 80 00 16 bne 40017138 400170e4: 31 10 00 64 sethi %hi(0x40019000), %i0 /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != &libc_global_reent) { 400170e8: c4 06 23 d8 ld [ %i0 + 0x3d8 ], %g2 ! 400193d8 <_impure_ptr> 400170ec: 03 10 00 63 sethi %hi(0x40018c00), %g1 400170f0: a0 10 63 28 or %g1, 0x328, %l0 ! 40018f28 400170f4: 80 a0 80 10 cmp %g2, %l0 400170f8: 22 80 00 06 be,a 40017110 400170fc: 21 10 00 64 sethi %hi(0x40019000), %l0 _wrapup_reent(&libc_global_reent); 40017100: 40 00 01 c9 call 40017824 <_wrapup_reent> 40017104: 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; 40017108: e0 26 23 d8 st %l0, [ %i0 + 0x3d8 ] * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 4001710c: 21 10 00 64 sethi %hi(0x40019000), %l0 40017110: c2 04 23 d8 ld [ %l0 + 0x3d8 ], %g1 ! 400193d8 <_impure_ptr> 40017114: 7f ff db 45 call 4000de28 40017118: d0 00 60 04 ld [ %g1 + 4 ], %o0 fclose (stdout); 4001711c: c2 04 23 d8 ld [ %l0 + 0x3d8 ], %g1 40017120: 7f ff db 42 call 4000de28 40017124: d0 00 60 08 ld [ %g1 + 8 ], %o0 fclose (stderr); 40017128: c2 04 23 d8 ld [ %l0 + 0x3d8 ], %g1 4001712c: f0 00 60 0c ld [ %g1 + 0xc ], %i0 40017130: 7f ff db 3e call 4000de28 40017134: 81 e8 00 00 restore 40017138: 81 c7 e0 08 ret <== NOT EXECUTED 4001713c: 81 e8 00 00 restore <== NOT EXECUTED 40021068 : int link( const char *existing, const char *new ) { 40021068: 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 ); 4002106c: 92 10 20 00 clr %o1 40021070: 90 10 00 18 mov %i0, %o0 40021074: 94 07 bf e4 add %fp, -28, %o2 40021078: 96 10 20 01 mov 1, %o3 4002107c: 7f ff 94 aa call 40006324 40021080: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 40021084: 80 a2 20 00 cmp %o0, 0 40021088: 12 80 00 8e bne 400212c0 4002108c: 01 00 00 00 nop /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 40021090: c2 4e 40 00 ldsb [ %i1 ], %g1 40021094: 80 a0 60 2f cmp %g1, 0x2f 40021098: 02 80 00 06 be 400210b0 4002109c: 80 a0 60 5c cmp %g1, 0x5c 400210a0: 02 80 00 04 be 400210b0 400210a4: 80 a0 60 00 cmp %g1, 0 400210a8: 12 80 00 0a bne 400210d0 400210ac: 03 10 01 24 sethi %hi(0x40049000), %g1 400210b0: 03 10 01 24 sethi %hi(0x40049000), %g1 400210b4: d2 00 60 94 ld [ %g1 + 0x94 ], %o1 ! 40049094 400210b8: 90 07 bf d4 add %fp, -44, %o0 400210bc: 92 02 60 14 add %o1, 0x14, %o1 400210c0: 40 00 44 f7 call 4003249c 400210c4: 94 10 20 10 mov 0x10, %o2 400210c8: 10 80 00 08 b 400210e8 400210cc: 84 10 20 01 mov 1, %g2 400210d0: d2 00 60 94 ld [ %g1 + 0x94 ], %o1 400210d4: 90 07 bf d4 add %fp, -44, %o0 400210d8: 92 02 60 04 add %o1, 4, %o1 400210dc: 40 00 44 f0 call 4003249c 400210e0: 94 10 20 10 mov 0x10, %o2 400210e4: 84 10 20 00 clr %g2 if ( !parent_loc.ops->evalformake_h ) { 400210e8: c2 07 bf dc ld [ %fp + -36 ], %g1 400210ec: c2 00 60 04 ld [ %g1 + 4 ], %g1 400210f0: 80 a0 60 00 cmp %g1, 0 400210f4: 12 80 00 0b bne 40021120 400210f8: 90 06 40 02 add %i1, %g2, %o0 rtems_filesystem_freenode( &existing_loc ); 400210fc: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 40021100: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40021104: 02 80 00 51 be 40021248 <== NOT EXECUTED 40021108: 01 00 00 00 nop <== NOT EXECUTED 4002110c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40021110: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40021114: 12 80 00 4b bne 40021240 <== NOT EXECUTED 40021118: 90 07 bf e4 add %fp, -28, %o0 <== NOT EXECUTED 4002111c: 30 80 00 4b b,a 40021248 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 40021120: b0 07 bf d4 add %fp, -44, %i0 40021124: 94 07 bf f4 add %fp, -12, %o2 40021128: 9f c0 40 00 call %g1 4002112c: 92 10 00 18 mov %i0, %o1 if ( result != 0 ) { 40021130: b2 92 20 00 orcc %o0, 0, %i1 40021134: 02 80 00 11 be 40021178 40021138: c4 07 bf f0 ld [ %fp + -16 ], %g2 rtems_filesystem_freenode( &existing_loc ); 4002113c: c2 07 bf ec ld [ %fp + -20 ], %g1 40021140: 80 a0 60 00 cmp %g1, 0 40021144: 02 80 00 08 be 40021164 40021148: 01 00 00 00 nop 4002114c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40021150: 80 a0 60 00 cmp %g1, 0 40021154: 02 80 00 04 be 40021164 40021158: 01 00 00 00 nop 4002115c: 9f c0 40 00 call %g1 40021160: 90 07 bf e4 add %fp, -28, %o0 rtems_set_errno_and_return_minus_one( result ); 40021164: 40 00 3a e1 call 4002fce8 <__errno> 40021168: b0 10 3f ff mov -1, %i0 4002116c: f2 22 00 00 st %i1, [ %o0 ] 40021170: 81 c7 e0 08 ret 40021174: 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 ) { 40021178: c2 07 bf e0 ld [ %fp + -32 ], %g1 4002117c: 80 a0 40 02 cmp %g1, %g2 40021180: 02 80 00 1a be 400211e8 40021184: c2 07 bf dc ld [ %fp + -36 ], %g1 rtems_filesystem_freenode( &existing_loc ); 40021188: c2 07 bf ec ld [ %fp + -20 ], %g1 4002118c: 80 a0 60 00 cmp %g1, 0 40021190: 22 80 00 09 be,a 400211b4 40021194: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 40021198: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002119c: 80 a0 60 00 cmp %g1, 0 400211a0: 22 80 00 05 be,a 400211b4 400211a4: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 400211a8: 9f c0 40 00 call %g1 400211ac: 90 07 bf e4 add %fp, -28, %o0 rtems_filesystem_freenode( &parent_loc ); 400211b0: c2 07 bf dc ld [ %fp + -36 ], %g1 400211b4: 80 a0 60 00 cmp %g1, 0 400211b8: 02 80 00 08 be 400211d8 400211bc: 01 00 00 00 nop 400211c0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400211c4: 80 a0 60 00 cmp %g1, 0 400211c8: 02 80 00 04 be 400211d8 400211cc: 01 00 00 00 nop 400211d0: 9f c0 40 00 call %g1 400211d4: 90 07 bf d4 add %fp, -44, %o0 rtems_set_errno_and_return_minus_one( EXDEV ); 400211d8: 40 00 3a c4 call 4002fce8 <__errno> 400211dc: b0 10 3f ff mov -1, %i0 400211e0: 10 80 00 1d b 40021254 400211e4: 82 10 20 12 mov 0x12, %g1 } if ( !parent_loc.ops->link_h ) { 400211e8: c2 00 60 08 ld [ %g1 + 8 ], %g1 400211ec: 80 a0 60 00 cmp %g1, 0 400211f0: 12 80 00 1c bne 40021260 400211f4: d4 07 bf f4 ld [ %fp + -12 ], %o2 rtems_filesystem_freenode( &existing_loc ); 400211f8: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 400211fc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40021200: 22 80 00 09 be,a 40021224 <== NOT EXECUTED 40021204: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 40021208: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002120c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40021210: 22 80 00 05 be,a 40021224 <== NOT EXECUTED 40021214: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 40021218: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002121c: 90 07 bf e4 add %fp, -28, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 40021220: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 40021224: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40021228: 02 80 00 08 be 40021248 <== NOT EXECUTED 4002122c: 01 00 00 00 nop <== NOT EXECUTED 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 07 bf d4 add %fp, -44, %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 3a a8 call 4002fce8 <__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 = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 40021260: 92 10 00 18 mov %i0, %o1 40021264: b2 07 bf e4 add %fp, -28, %i1 40021268: 9f c0 40 00 call %g1 4002126c: 90 10 00 19 mov %i1, %o0 rtems_filesystem_freenode( &existing_loc ); 40021270: c2 07 bf ec ld [ %fp + -20 ], %g1 40021274: 80 a0 60 00 cmp %g1, 0 40021278: 02 80 00 08 be 40021298 4002127c: b0 10 00 08 mov %o0, %i0 40021280: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40021284: 80 a0 60 00 cmp %g1, 0 40021288: 22 80 00 05 be,a 4002129c 4002128c: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 40021290: 9f c0 40 00 call %g1 40021294: 90 10 00 19 mov %i1, %o0 rtems_filesystem_freenode( &parent_loc ); 40021298: c2 07 bf dc ld [ %fp + -36 ], %g1 4002129c: 80 a0 60 00 cmp %g1, 0 400212a0: 02 80 00 08 be 400212c0 400212a4: 01 00 00 00 nop 400212a8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400212ac: 80 a0 60 00 cmp %g1, 0 400212b0: 02 80 00 04 be 400212c0 400212b4: 01 00 00 00 nop 400212b8: 9f c0 40 00 call %g1 400212bc: 90 07 bf d4 add %fp, -44, %o0 return result; } 400212c0: 81 c7 e0 08 ret 400212c4: 81 e8 00 00 restore 40016fac : off_t lseek( int fd, off_t offset, int whence ) { 40016fac: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 40016fb0: 03 10 00 63 sethi %hi(0x40018c00), %g1 40016fb4: c2 00 62 18 ld [ %g1 + 0x218 ], %g1 ! 40018e18 off_t lseek( int fd, off_t offset, int whence ) { 40016fb8: 92 10 00 19 mov %i1, %o1 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 40016fbc: 80 a6 00 01 cmp %i0, %g1 40016fc0: 1a 80 00 0e bcc 40016ff8 40016fc4: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 40016fc8: 03 10 00 66 sethi %hi(0x40019800), %g1 40016fcc: c6 00 63 8c ld [ %g1 + 0x38c ], %g3 ! 40019b8c 40016fd0: 85 2e 20 02 sll %i0, 2, %g2 40016fd4: 83 2e 20 04 sll %i0, 4, %g1 40016fd8: 82 20 40 02 sub %g1, %g2, %g1 40016fdc: 82 00 40 18 add %g1, %i0, %g1 40016fe0: 83 28 60 02 sll %g1, 2, %g1 40016fe4: b0 00 c0 01 add %g3, %g1, %i0 rtems_libio_check_is_open(iop); 40016fe8: c2 06 20 0c ld [ %i0 + 0xc ], %g1 40016fec: 80 88 61 00 btst 0x100, %g1 40016ff0: 32 80 00 06 bne,a 40017008 40016ff4: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40016ff8: 7f ff db 34 call 4000dcc8 <__errno> <== NOT EXECUTED 40016ffc: 01 00 00 00 nop <== NOT EXECUTED 40017000: 10 80 00 1c b 40017070 <== NOT EXECUTED 40017004: 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 ) 40017008: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4001700c: 80 a0 60 00 cmp %g1, 0 40017010: 12 80 00 06 bne 40017028 40017014: 80 a6 a0 01 cmp %i2, 1 rtems_set_errno_and_return_minus_one( ENOTSUP ); 40017018: 7f ff db 2c call 4000dcc8 <__errno> <== NOT EXECUTED 4001701c: 01 00 00 00 nop <== NOT EXECUTED 40017020: 10 80 00 14 b 40017070 <== NOT EXECUTED 40017024: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 40017028: 02 80 00 09 be 4001704c 4001702c: f4 06 20 08 ld [ %i0 + 8 ], %i2 40017030: 80 a2 a0 02 cmp %o2, 2 40017034: 02 80 00 08 be 40017054 40017038: 80 a2 a0 00 cmp %o2, 0 4001703c: 12 80 00 0a bne 40017064 40017040: 01 00 00 00 nop case SEEK_SET: iop->offset = offset; 40017044: 10 80 00 0e b 4001707c 40017048: f2 26 20 08 st %i1, [ %i0 + 8 ] break; case SEEK_CUR: iop->offset += offset; 4001704c: 10 80 00 04 b 4001705c 40017050: 82 06 40 1a add %i1, %i2, %g1 break; case SEEK_END: iop->offset = iop->size + offset; 40017054: c2 06 20 04 ld [ %i0 + 4 ], %g1 40017058: 82 06 40 01 add %i1, %g1, %g1 4001705c: 10 80 00 08 b 4001707c 40017060: c2 26 20 08 st %g1, [ %i0 + 8 ] break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 40017064: 7f ff db 19 call 4000dcc8 <__errno> 40017068: 01 00 00 00 nop 4001706c: 82 10 20 16 mov 0x16, %g1 ! 16 40017070: c2 22 00 00 st %g1, [ %o0 ] 40017074: 10 80 00 09 b 40017098 40017078: 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 ); 4001707c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40017080: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 40017084: 9f c0 40 00 call %g1 40017088: 90 10 00 18 mov %i0, %o0 if ( status == (off_t) -1 ) 4001708c: 80 a2 3f ff cmp %o0, -1 40017090: 22 80 00 02 be,a 40017098 40017094: f4 26 20 08 st %i2, [ %i0 + 8 ] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 40017098: 81 c7 e0 08 ret 4001709c: 91 e8 00 08 restore %g0, %o0, %o0 400213f0 : int _STAT_NAME( const char *path, struct stat *buf ) { 400213f0: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 400213f4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 400213f8: 12 80 00 06 bne 40021410 <== NOT EXECUTED 400213fc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); 40021400: 40 00 3a 3a call 4002fce8 <__errno> <== NOT EXECUTED 40021404: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40021408: 10 80 00 1c b 40021478 <== NOT EXECUTED 4002140c: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); 40021410: a0 07 bf e8 add %fp, -24, %l0 <== NOT EXECUTED 40021414: 92 10 20 00 clr %o1 <== NOT EXECUTED 40021418: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 4002141c: 96 10 20 00 clr %o3 <== NOT EXECUTED 40021420: 7f ff 93 c1 call 40006324 <== NOT EXECUTED 40021424: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED if ( status != 0 ) 40021428: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002142c: 12 80 00 14 bne 4002147c <== NOT EXECUTED 40021430: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 40021434: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 40021438: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002143c: 12 80 00 12 bne 40021484 <== NOT EXECUTED 40021440: 92 10 20 00 clr %o1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40021444: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40021448: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002144c: 02 80 00 08 be 4002146c <== NOT EXECUTED 40021450: 01 00 00 00 nop <== NOT EXECUTED 40021454: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40021458: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002145c: 02 80 00 04 be 4002146c <== NOT EXECUTED 40021460: 01 00 00 00 nop <== NOT EXECUTED 40021464: 9f c0 40 00 call %g1 <== NOT EXECUTED 40021468: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002146c: 40 00 3a 1f call 4002fce8 <__errno> <== NOT EXECUTED 40021470: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40021474: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40021478: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002147c: 81 c7 e0 08 ret <== NOT EXECUTED 40021480: 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) ); 40021484: 94 10 20 50 mov 0x50, %o2 <== NOT EXECUTED 40021488: 40 00 44 8d call 400326bc <== NOT EXECUTED 4002148c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 40021490: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 40021494: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40021498: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 4002149c: 9f c0 40 00 call %g1 <== NOT EXECUTED 400214a0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 400214a4: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 400214a8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400214ac: 02 bf ff f4 be 4002147c <== NOT EXECUTED 400214b0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 400214b4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400214b8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400214bc: 02 80 00 04 be 400214cc <== NOT EXECUTED 400214c0: 01 00 00 00 nop <== NOT EXECUTED 400214c4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400214c8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return status; } 400214cc: 81 c7 e0 08 ret <== NOT EXECUTED 400214d0: 81 e8 00 00 restore <== NOT EXECUTED 4000b488 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 4000b488: 9d e3 bf 98 save %sp, -104, %sp 4000b48c: 05 10 00 66 sethi %hi(0x40019800), %g2 4000b490: 84 10 a3 f0 or %g2, 0x3f0, %g2 ! 40019bf0 4000b494: c2 00 a0 04 ld [ %g2 + 4 ], %g1 4000b498: a0 10 00 18 mov %i0, %l0 4000b49c: 82 00 60 01 inc %g1 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 4000b4a0: 7f ff ff ed call 4000b454 4000b4a4: c2 20 a0 04 st %g1, [ %g2 + 4 ] /* * Validate the parameters */ if ( !size ) 4000b4a8: 80 a6 20 00 cmp %i0, 0 4000b4ac: 02 80 00 33 be 4000b578 4000b4b0: 03 10 00 67 sethi %hi(0x40019c00), %g1 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4000b4b4: c2 00 63 04 ld [ %g1 + 0x304 ], %g1 ! 40019f04 <_System_state_Current> 4000b4b8: 80 a0 60 03 cmp %g1, 3 4000b4bc: 12 80 00 07 bne 4000b4d8 4000b4c0: 11 10 00 66 sethi %hi(0x40019800), %o0 4000b4c4: 7f ff ff ca call 4000b3ec 4000b4c8: 01 00 00 00 nop 4000b4cc: 80 8a 20 ff btst 0xff, %o0 4000b4d0: 02 80 00 2a be 4000b578 4000b4d4: 11 10 00 66 sethi %hi(0x40019800), %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 ); 4000b4d8: 92 10 00 10 mov %l0, %o1 4000b4dc: 40 00 05 0a call 4000c904 <_Protected_heap_Allocate> 4000b4e0: 90 12 23 98 or %o0, 0x398, %o0 if ( !return_this ) { 4000b4e4: b0 92 20 00 orcc %o0, 0, %i0 4000b4e8: 12 80 00 14 bne 4000b538 4000b4ec: 03 10 00 66 sethi %hi(0x40019800), %g1 if (rtems_malloc_sbrk_helpers) 4000b4f0: 03 10 00 66 sethi %hi(0x40019800), %g1 <== NOT EXECUTED 4000b4f4: c2 00 60 88 ld [ %g1 + 0x88 ], %g1 ! 40019888 <== NOT EXECUTED 4000b4f8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000b4fc: 02 80 00 08 be 4000b51c <== NOT EXECUTED 4000b500: 01 00 00 00 nop <== NOT EXECUTED return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 4000b504: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 4000b508: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000b50c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( !return_this ) { 4000b510: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000b514: 32 80 00 08 bne,a 4000b534 <== NOT EXECUTED 4000b518: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED errno = ENOMEM; 4000b51c: 40 00 09 eb call 4000dcc8 <__errno> <== NOT EXECUTED 4000b520: 01 00 00 00 nop <== NOT EXECUTED 4000b524: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 4000b528: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000b52c: 81 c7 e0 08 ret <== NOT EXECUTED 4000b530: 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 ) 4000b534: 03 10 00 66 sethi %hi(0x40019800), %g1 <== NOT EXECUTED 4000b538: c2 00 60 8c ld [ %g1 + 0x8c ], %g1 ! 4001988c 4000b53c: 80 a0 60 00 cmp %g1, 0 4000b540: 02 80 00 04 be 4000b550 4000b544: 92 10 00 10 mov %l0, %o1 (*rtems_malloc_dirty_helper)( return_this, size ); 4000b548: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000b54c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4000b550: 03 10 00 66 sethi %hi(0x40019800), %g1 4000b554: c2 00 60 84 ld [ %g1 + 0x84 ], %g1 ! 40019884 4000b558: 80 a0 60 00 cmp %g1, 0 4000b55c: 02 80 00 08 be 4000b57c 4000b560: 01 00 00 00 nop (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 4000b564: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 4000b568: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000b56c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000b570: 81 c7 e0 08 ret <== NOT EXECUTED 4000b574: 81 e8 00 00 restore <== NOT EXECUTED 4000b578: b0 10 20 00 clr %i0 if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 4000b57c: 81 c7 e0 08 ret 4000b580: 81 e8 00 00 restore 4000b438 : } void malloc_deferred_free( void *pointer ) { 4000b438: 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 ); 4000b43c: 11 10 00 68 sethi %hi(0x4001a000), %o0 <== NOT EXECUTED 4000b440: 90 12 23 18 or %o0, 0x318, %o0 ! 4001a318 <== NOT EXECUTED 4000b444: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000b448: 7f ff ee 94 call 40006e98 <_Chain_Append> <== NOT EXECUTED 4000b44c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000b450: 01 00 00 00 nop 4000b454 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 4000b454: 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 ); 4000b458: 03 10 00 68 sethi %hi(0x4001a000), %g1 4000b45c: 10 80 00 04 b 4000b46c 4000b460: a0 10 63 18 or %g1, 0x318, %l0 ! 4001a318 /* * 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); 4000b464: 7f ff fe a1 call 4000aee8 <== NOT EXECUTED 4000b468: 01 00 00 00 nop <== NOT EXECUTED 4000b46c: 40 00 03 e9 call 4000c410 <_Chain_Get> 4000b470: 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) 4000b474: 80 a2 20 00 cmp %o0, 0 4000b478: 12 bf ff fb bne 4000b464 4000b47c: 01 00 00 00 nop free(to_be_freed); } 4000b480: 81 c7 e0 08 ret 4000b484: 81 e8 00 00 restore 40027060 : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 40027060: 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) ) { 40027064: 7f ff 7d 9e call 400066dc 40027068: 90 10 00 18 mov %i0, %o0 4002706c: 80 a2 20 00 cmp %o0, 0 40027070: 12 80 00 13 bne 400270bc 40027074: 01 00 00 00 nop 40027078: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 4002707c: 80 a0 60 00 cmp %g1, 0 40027080: 12 80 00 0f bne 400270bc 40027084: 03 10 01 24 sethi %hi(0x40049000), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 40027088: c4 00 60 94 ld [ %g1 + 0x94 ], %g2 ! 40049094 4002708c: c2 00 a0 04 ld [ %g2 + 4 ], %g1 40027090: 80 a0 40 18 cmp %g1, %i0 40027094: 22 80 00 02 be,a 4002709c 40027098: 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) 4002709c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 400270a0: 80 a0 60 06 cmp %g1, 6 400270a4: 02 80 00 04 be 400270b4 400270a8: 01 00 00 00 nop IMFS_memfile_remove( the_jnode ); 400270ac: 7f ff ff 8c call 40026edc 400270b0: 90 10 00 18 mov %i0, %o0 free( the_jnode ); 400270b4: 7f ff 7c ee call 4000646c 400270b8: 90 10 00 18 mov %i0, %o0 } return 0; } 400270bc: 81 c7 e0 08 ret 400270c0: 91 e8 20 00 restore %g0, 0, %o0 40026e68 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 40026e68: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( block_table ); 40026e6c: 80 a6 20 00 cmp %i0, 0 40026e70: 32 80 00 0a bne,a 40026e98 40026e74: e0 06 00 00 ld [ %i0 ], %l0 40026e78: 11 10 01 16 sethi %hi(0x40045800), %o0 <== NOT EXECUTED 40026e7c: 15 10 01 17 sethi %hi(0x40045c00), %o2 <== NOT EXECUTED 40026e80: 17 10 01 17 sethi %hi(0x40045c00), %o3 <== NOT EXECUTED 40026e84: 90 12 23 c8 or %o0, 0x3c8, %o0 <== NOT EXECUTED 40026e88: 94 12 a1 68 or %o2, 0x168, %o2 <== NOT EXECUTED 40026e8c: 96 12 e0 50 or %o3, 0x50, %o3 <== NOT EXECUTED 40026e90: 7f ff 7c 58 call 40005ff0 <__assert_func> <== NOT EXECUTED 40026e94: 92 10 21 b1 mov 0x1b1, %o1 <== NOT EXECUTED 40026e98: 10 80 00 09 b 40026ebc 40026e9c: a2 10 20 00 clr %l1 */ b = *block_table; for ( i=0 ; i 40026ea8: a2 04 60 01 inc %l1 memfile_free_block( b[i] ); 40026eac: 7f ff ff 23 call 40026b38 40026eb0: 01 00 00 00 nop b[i] = 0; 40026eb4: 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 40026ec4: 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 ); 40026ec8: 7f ff ff 1c call 40026b38 40026ecc: d0 06 00 00 ld [ %i0 ], %o0 *block_table = 0; 40026ed0: c0 26 00 00 clr [ %i0 ] } 40026ed4: 81 c7 e0 08 ret 40026ed8: 81 e8 00 00 restore 4002732c : int memfile_ftruncate( rtems_libio_t *iop, off_t length ) { 4002732c: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 40027330: 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 ) 40027334: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 40027338: 80 a6 40 01 cmp %i1, %g1 4002733c: 04 80 00 06 ble 40027354 40027340: 92 10 00 19 mov %i1, %o1 return IMFS_memfile_extend( the_jnode, length ); 40027344: 7f ff ff a9 call 400271e8 <== NOT EXECUTED 40027348: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } 4002734c: 81 c7 e0 08 ret <== NOT EXECUTED 40027350: 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; 40027354: f2 24 20 4c st %i1, [ %l0 + 0x4c ] iop->size = the_jnode->info.file.size; 40027358: f2 26 20 04 st %i1, [ %i0 + 4 ] IMFS_update_atime( the_jnode ); 4002735c: 90 07 bf f0 add %fp, -16, %o0 40027360: 7f ff 7c 6d call 40006514 40027364: 92 10 20 00 clr %o1 40027368: c2 07 bf f0 ld [ %fp + -16 ], %g1 4002736c: 90 10 20 00 clr %o0 40027370: c2 24 20 3c st %g1, [ %l0 + 0x3c ] return 0; } 40027374: b0 10 00 08 mov %o0, %i0 40027378: 81 c7 e0 08 ret 4002737c: 81 e8 00 00 restore 40027380 : off_t memfile_lseek( rtems_libio_t *iop, off_t offset, int whence ) { 40027380: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 40027384: e0 06 20 2c ld [ %i0 + 0x2c ], %l0 if (the_jnode->type == IMFS_LINEAR_FILE) { 40027388: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4002738c: 80 a0 60 06 cmp %g1, 6 40027390: 12 80 00 09 bne 400273b4 40027394: d2 06 20 08 ld [ %i0 + 8 ], %o1 if (iop->offset > the_jnode->info.linearfile.size) 40027398: d0 04 20 4c ld [ %l0 + 0x4c ], %o0 <== NOT EXECUTED 4002739c: 80 a2 40 08 cmp %o1, %o0 <== NOT EXECUTED 400273a0: 34 80 00 11 bg,a 400273e4 <== NOT EXECUTED 400273a4: d0 26 20 08 st %o0, [ %i0 + 8 ] <== NOT EXECUTED 400273a8: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 400273ac: 81 c7 e0 08 ret <== NOT EXECUTED 400273b0: 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 )) 400273b4: 7f ff ff 8d call 400271e8 400273b8: 90 10 00 10 mov %l0, %o0 400273bc: 80 a2 20 00 cmp %o0, 0 400273c0: 22 80 00 08 be,a 400273e0 400273c4: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 rtems_set_errno_and_return_minus_one( ENOSPC ); 400273c8: 40 00 22 48 call 4002fce8 <__errno> <== NOT EXECUTED 400273cc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400273d0: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 400273d4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400273d8: 81 c7 e0 08 ret <== NOT EXECUTED 400273dc: 81 e8 00 00 restore <== NOT EXECUTED iop->size = the_jnode->info.file.size; 400273e0: c2 26 20 04 st %g1, [ %i0 + 4 ] } return iop->offset; 400273e4: f0 06 20 08 ld [ %i0 + 8 ], %i0 } 400273e8: 81 c7 e0 08 ret 400273ec: 81 e8 00 00 restore 40027688 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 40027688: 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)) 4002768c: c2 06 20 0c ld [ %i0 + 0xc ], %g1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 40027690: 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)) 40027694: 80 88 62 04 btst 0x204, %g1 40027698: 02 80 00 17 be 400276f4 4002769c: e0 06 20 2c ld [ %i0 + 0x2c ], %l0 400276a0: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 400276a4: 80 a0 60 06 cmp %g1, 6 400276a8: 32 80 00 14 bne,a 400276f8 400276ac: c2 04 60 0c ld [ %l1 + 0xc ], %g1 && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; 400276b0: d6 04 20 4c ld [ %l0 + 0x4c ], %o3 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 400276b4: d4 04 20 50 ld [ %l0 + 0x50 ], %o2 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 400276b8: 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; 400276bc: 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; 400276c0: 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; 400276c4: 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; 400276c8: 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) 400276cc: 80 a2 e0 00 cmp %o3, 0 <== NOT EXECUTED 400276d0: 02 80 00 09 be 400276f4 <== NOT EXECUTED 400276d4: c2 24 20 48 st %g1, [ %l0 + 0x48 ] <== NOT EXECUTED 400276d8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400276dc: 92 10 20 00 clr %o1 <== NOT EXECUTED 400276e0: 7f ff ff 44 call 400273f0 <== NOT EXECUTED 400276e4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400276e8: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 400276ec: 02 80 00 0a be 40027714 <== NOT EXECUTED 400276f0: 01 00 00 00 nop <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 400276f4: c2 04 60 0c ld [ %l1 + 0xc ], %g1 400276f8: 80 88 62 00 btst 0x200, %g1 400276fc: 02 80 00 04 be 4002770c 40027700: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 iop->offset = the_jnode->info.file.size; 40027704: c2 24 60 08 st %g1, [ %l1 + 8 ] iop->size = the_jnode->info.file.size; 40027708: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 4002770c: b0 10 20 00 clr %i0 40027710: c2 24 60 04 st %g1, [ %l1 + 4 ] return 0; } 40027714: 81 c7 e0 08 ret 40027718: 81 e8 00 00 restore 400279a0 : ssize_t memfile_read( rtems_libio_t *iop, void *buffer, size_t count ) { 400279a0: 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 ); 400279a4: d2 02 20 08 ld [ %o0 + 8 ], %o1 400279a8: d0 02 20 2c ld [ %o0 + 0x2c ], %o0 ssize_t memfile_read( rtems_libio_t *iop, void *buffer, size_t count ) { 400279ac: 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 ); 400279b0: 94 10 00 01 mov %g1, %o2 400279b4: 82 13 c0 00 mov %o7, %g1 400279b8: 7f ff ff 59 call 4002771c 400279bc: 9e 10 40 00 mov %g1, %o7 400279c0: 01 00 00 00 nop <== NOT EXECUTED 400270c4 : */ int memfile_rmnod( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 400270c4: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 400270c8: 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 ) { 400270cc: c2 06 20 08 ld [ %i0 + 8 ], %g1 400270d0: 80 a0 60 00 cmp %g1, 0 400270d4: 22 80 00 06 be,a 400270ec 400270d8: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 <== NOT EXECUTED 400270dc: 7f ff f2 41 call 400239e0 <_Chain_Extract> 400270e0: 90 10 00 18 mov %i0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 400270e4: c0 26 20 08 clr [ %i0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 400270e8: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 400270ec: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 400270f0: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 400270f4: 90 07 bf f0 add %fp, -16, %o0 400270f8: 7f ff 7d 07 call 40006514 400270fc: c2 36 20 30 sth %g1, [ %i0 + 0x30 ] 40027100: c2 07 bf f0 ld [ %fp + -16 ], %g1 return memfile_check_rmnod( the_jnode ); 40027104: 90 10 00 18 mov %i0, %o0 40027108: 7f ff ff d6 call 40027060 4002710c: c2 26 20 44 st %g1, [ %i0 + 0x44 ] } 40027110: 81 c7 e0 08 ret 40027114: 91 e8 00 08 restore %g0, %o0, %o0 40009fe8 : int miniIMFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { return IMFS_initialize_support( 40009fe8: 13 10 00 60 sethi %hi(0x40018000), %o1 40009fec: 15 10 00 66 sethi %hi(0x40019800), %o2 40009ff0: 92 12 61 88 or %o1, 0x188, %o1 40009ff4: 94 12 a1 e8 or %o2, 0x1e8, %o2 40009ff8: 96 10 00 0a mov %o2, %o3 40009ffc: 82 13 c0 00 mov %o7, %g1 4000a000: 40 00 02 6a call 4000a9a8 4000a004: 9e 10 40 00 mov %g1, %o7 4000a008: 01 00 00 00 nop <== NOT EXECUTED 400031bc : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 400031bc: 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) ) ) 400031c0: 03 00 00 3c sethi %hi(0xf000), %g1 400031c4: b3 2e 60 10 sll %i1, 0x10, %i1 400031c8: b3 36 60 10 srl %i1, 0x10, %i1 400031cc: 84 8e 40 01 andcc %i1, %g1, %g2 400031d0: 32 80 00 06 bne,a 400031e8 400031d4: 03 00 00 04 sethi %hi(0x1000), %g1 rtems_set_errno_and_return_minus_one( EINVAL ); 400031d8: 40 00 2a bc call 4000dcc8 <__errno> <== NOT EXECUTED 400031dc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400031e0: 10 80 00 36 b 400032b8 <== NOT EXECUTED 400031e4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED if ( S_ISFIFO(mode) ) 400031e8: 80 a0 80 01 cmp %g2, %g1 400031ec: 02 80 00 30 be 400032ac 400031f0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 400031f4: c2 4e 00 00 ldsb [ %i0 ], %g1 400031f8: 80 a0 60 2f cmp %g1, 0x2f 400031fc: 02 80 00 06 be 40003214 40003200: 80 a0 60 5c cmp %g1, 0x5c 40003204: 02 80 00 04 be 40003214 40003208: 80 a0 60 00 cmp %g1, 0 4000320c: 12 80 00 0a bne 40003234 40003210: 03 10 00 64 sethi %hi(0x40019000), %g1 40003214: 03 10 00 64 sethi %hi(0x40019000), %g1 40003218: d2 00 63 3c ld [ %g1 + 0x33c ], %o1 ! 4001933c 4000321c: 90 07 bf e4 add %fp, -28, %o0 40003220: 92 02 60 14 add %o1, 0x14, %o1 40003224: 40 00 2c 9b call 4000e490 40003228: 94 10 20 10 mov 0x10, %o2 4000322c: 10 80 00 08 b 4000324c 40003230: 84 10 20 01 mov 1, %g2 40003234: d2 00 63 3c ld [ %g1 + 0x33c ], %o1 40003238: 90 07 bf e4 add %fp, -28, %o0 4000323c: 92 02 60 04 add %o1, 4, %o1 40003240: 40 00 2c 94 call 4000e490 40003244: 94 10 20 10 mov 0x10, %o2 40003248: 84 10 20 00 clr %g2 if ( !temp_loc.ops->evalformake_h ) { 4000324c: c2 07 bf ec ld [ %fp + -20 ], %g1 40003250: c2 00 60 04 ld [ %g1 + 4 ], %g1 40003254: 80 a0 60 00 cmp %g1, 0 40003258: 02 80 00 15 be 400032ac 4000325c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 40003260: 90 06 00 02 add %i0, %g2, %o0 40003264: a0 07 bf e4 add %fp, -28, %l0 40003268: 94 07 bf f4 add %fp, -12, %o2 4000326c: 92 10 00 10 mov %l0, %o1 40003270: 9f c0 40 00 call %g1 40003274: b0 10 3f ff mov -1, %i0 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 40003278: 80 a2 20 00 cmp %o0, 0 4000327c: 12 80 00 10 bne 400032bc 40003280: c2 07 bf ec ld [ %fp + -20 ], %g1 return -1; if ( !temp_loc.ops->mknod_h ) { 40003284: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 40003288: 80 a0 a0 00 cmp %g2, 0 4000328c: 12 80 00 0e bne 400032c4 40003290: d0 07 bf f4 ld [ %fp + -12 ], %o0 rtems_filesystem_freenode( &temp_loc ); 40003294: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40003298: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000329c: 02 80 00 04 be 400032ac <== NOT EXECUTED 400032a0: 01 00 00 00 nop <== NOT EXECUTED 400032a4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400032a8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400032ac: 40 00 2a 87 call 4000dcc8 <__errno> 400032b0: b0 10 3f ff mov -1, %i0 400032b4: 82 10 20 86 mov 0x86, %g1 400032b8: c2 22 00 00 st %g1, [ %o0 ] 400032bc: 81 c7 e0 08 ret 400032c0: 81 e8 00 00 restore } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 400032c4: 92 10 00 19 mov %i1, %o1 400032c8: 94 10 00 1a mov %i2, %o2 400032cc: 96 10 00 1b mov %i3, %o3 400032d0: 9f c0 80 00 call %g2 400032d4: 98 10 00 10 mov %l0, %o4 rtems_filesystem_freenode( &temp_loc ); 400032d8: c2 07 bf ec ld [ %fp + -20 ], %g1 400032dc: 80 a0 60 00 cmp %g1, 0 400032e0: 02 bf ff f7 be 400032bc 400032e4: b0 10 00 08 mov %o0, %i0 400032e8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400032ec: 80 a0 60 00 cmp %g1, 0 400032f0: 02 80 00 04 be 40003300 400032f4: 01 00 00 00 nop 400032f8: 9f c0 40 00 call %g1 400032fc: 90 10 00 10 mov %l0, %o0 return result; } 40003300: 81 c7 e0 08 ret 40003304: 81 e8 00 00 restore 4000b5cc : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 4000b5cc: 9d e3 bf 88 save %sp, -120, %sp /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 4000b5d0: 80 a6 60 00 cmp %i1, 0 4000b5d4: 02 80 00 05 be 4000b5e8 4000b5d8: a4 10 00 18 mov %i0, %l2 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 4000b5dc: 80 a6 a0 01 cmp %i2, 1 4000b5e0: 28 80 00 06 bleu,a 4000b5f8 4000b5e4: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 4000b5e8: 40 00 09 b8 call 4000dcc8 <__errno> 4000b5ec: 01 00 00 00 nop 4000b5f0: 10 80 00 15 b 4000b644 4000b5f4: 82 10 20 16 mov 0x16, %g1 ! 16 return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 4000b5f8: 80 a0 60 00 cmp %g1, 0 4000b5fc: 12 80 00 05 bne 4000b610 4000b600: 80 a6 e0 00 cmp %i3, 0 errno = ENOTSUP; 4000b604: a2 10 20 00 clr %l1 <== NOT EXECUTED 4000b608: 10 80 00 47 b 4000b724 <== NOT EXECUTED 4000b60c: b8 10 20 00 clr %i4 <== NOT EXECUTED /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 4000b610: 02 80 00 05 be 4000b624 4000b614: 90 10 20 64 mov 0x64, %o0 size += strlen( device ) + 1; 4000b618: 40 00 0e ce call 4000f150 <== NOT EXECUTED 4000b61c: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 4000b620: 90 02 20 65 add %o0, 0x65, %o0 <== NOT EXECUTED temp_mt_entry = malloc( size ); 4000b624: 7f ff ff 99 call 4000b488 4000b628: 01 00 00 00 nop if ( !temp_mt_entry ) { 4000b62c: a0 92 20 00 orcc %o0, 0, %l0 4000b630: 12 80 00 07 bne 4000b64c 4000b634: a2 10 00 10 mov %l0, %l1 errno = ENOMEM; 4000b638: 40 00 09 a4 call 4000dcc8 <__errno> <== NOT EXECUTED 4000b63c: 01 00 00 00 nop <== NOT EXECUTED 4000b640: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 4000b644: 10 80 00 74 b 4000b814 4000b648: 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; 4000b64c: f4 24 20 28 st %i2, [ %l0 + 0x28 ] if ( device ) { 4000b650: 80 a6 e0 00 cmp %i3, 0 4000b654: 02 80 00 08 be 4000b674 4000b658: e0 24 20 24 st %l0, [ %l0 + 0x24 ] temp_mt_entry->dev = 4000b65c: 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 ); 4000b660: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 4000b664: 40 00 0e 99 call 4000f0c8 <== NOT EXECUTED 4000b668: 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 ) { 4000b66c: 10 80 00 04 b 4000b67c <== NOT EXECUTED 4000b670: 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; 4000b674: 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 ) { 4000b678: 80 a7 20 00 cmp %i4, 0 4000b67c: 02 80 00 37 be 4000b758 4000b680: 90 10 00 1c mov %i4, %o0 if ( rtems_filesystem_evaluate_path( 4000b684: 92 10 20 07 mov 7, %o1 4000b688: b8 07 bf e8 add %fp, -24, %i4 4000b68c: 96 10 20 01 mov 1, %o3 4000b690: 7f ff de 1b call 40002efc 4000b694: 94 10 00 1c mov %i4, %o2 4000b698: 80 a2 3f ff cmp %o0, -1 4000b69c: 02 80 00 4e be 4000b7d4 4000b6a0: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 4000b6a4: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 4000b6a8: 80 a0 60 00 cmp %g1, 0 4000b6ac: 02 80 00 1e be 4000b724 4000b6b0: 01 00 00 00 nop /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 4000b6b4: 9f c0 40 00 call %g1 4000b6b8: 90 10 00 1c mov %i4, %o0 4000b6bc: 80 a2 20 01 cmp %o0, 1 4000b6c0: 02 80 00 07 be 4000b6dc 4000b6c4: 03 10 00 68 sethi %hi(0x4001a000), %g1 errno = ENOTDIR; 4000b6c8: 40 00 09 80 call 4000dcc8 <__errno> 4000b6cc: 01 00 00 00 nop 4000b6d0: 82 10 20 14 mov 0x14, %g1 ! 14 4000b6d4: 10 80 00 41 b 4000b7d8 4000b6d8: 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 ) 4000b6dc: c8 07 bf e8 ld [ %fp + -24 ], %g4 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 4000b6e0: c4 00 63 24 ld [ %g1 + 0x324 ], %g2 4000b6e4: 82 10 63 24 or %g1, 0x324, %g1 !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 4000b6e8: 10 80 00 06 b 4000b700 4000b6ec: 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 ) 4000b6f0: 80 a0 40 04 cmp %g1, %g4 4000b6f4: 02 80 00 08 be 4000b714 4000b6f8: 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 ) { 4000b6fc: 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 ); 4000b700: 80 a0 80 03 cmp %g2, %g3 4000b704: 32 bf ff fb bne,a 4000b6f0 4000b708: 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; 4000b70c: 10 80 00 45 b 4000b820 4000b710: 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; 4000b714: 40 00 09 6d call 4000dcc8 <__errno> 4000b718: b8 07 bf e8 add %fp, -24, %i4 4000b71c: 10 bf ff ee b 4000b6d4 4000b720: 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; 4000b724: 40 00 09 69 call 4000dcc8 <__errno> <== NOT EXECUTED 4000b728: 01 00 00 00 nop <== NOT EXECUTED 4000b72c: 10 bf ff ea b 4000b6d4 <== NOT EXECUTED 4000b730: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 4000b734: 9f c0 c0 00 call %g3 4000b738: 90 10 00 10 mov %l0, %o0 4000b73c: 80 a2 20 00 cmp %o0, 0 4000b740: 02 80 00 04 be 4000b750 4000b744: 90 07 bf e8 add %fp, -24, %o0 4000b748: 10 80 00 24 b 4000b7d8 <== NOT EXECUTED 4000b74c: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED 4000b750: 10 80 00 0a b 4000b778 4000b754: 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; 4000b758: c0 24 20 18 clr [ %l0 + 0x18 ] temp_mt_entry->mt_fs_root.handlers = NULL; 4000b75c: c0 24 20 1c clr [ %l0 + 0x1c ] temp_mt_entry->mt_fs_root.ops = NULL; 4000b760: c0 24 20 20 clr [ %l0 + 0x20 ] temp_mt_entry->mt_point_node.node_access = NULL; 4000b764: c0 24 20 08 clr [ %l0 + 8 ] temp_mt_entry->mt_point_node.handlers = NULL; 4000b768: c0 24 20 0c clr [ %l0 + 0xc ] temp_mt_entry->mt_point_node.ops = NULL; 4000b76c: c0 24 20 10 clr [ %l0 + 0x10 ] temp_mt_entry->mt_point_node.mt_entry = NULL; 4000b770: c0 24 20 14 clr [ %l0 + 0x14 ] 4000b774: b8 10 20 00 clr %i4 } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 4000b778: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 4000b77c: 9f c0 40 00 call %g1 4000b780: 90 10 00 10 mov %l0, %o0 4000b784: 80 a2 20 00 cmp %o0, 0 4000b788: 02 80 00 09 be 4000b7ac 4000b78c: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 4000b790: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 <== NOT EXECUTED 4000b794: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000b798: 02 80 00 10 be 4000b7d8 <== NOT EXECUTED 4000b79c: 01 00 00 00 nop <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 4000b7a0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000b7a4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000b7a8: 30 80 00 0c b,a 4000b7d8 <== 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 ); 4000b7ac: 11 10 00 68 sethi %hi(0x4001a000), %o0 4000b7b0: 92 10 00 10 mov %l0, %o1 4000b7b4: 7f ff ed b9 call 40006e98 <_Chain_Append> 4000b7b8: 90 12 23 24 or %o0, 0x324, %o0 */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 4000b7bc: 80 a4 a0 00 cmp %l2, 0 4000b7c0: 02 80 00 03 be 4000b7cc 4000b7c4: b0 10 20 00 clr %i0 *mt_entry = temp_mt_entry; 4000b7c8: e0 24 80 00 st %l0, [ %l2 ] 4000b7cc: 81 c7 e0 08 ret 4000b7d0: 81 e8 00 00 restore 4000b7d4: b8 10 20 00 clr %i4 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 4000b7d8: 7f ff fd c4 call 4000aee8 4000b7dc: 90 10 00 11 mov %l1, %o0 if ( loc_to_free ) 4000b7e0: 80 a7 20 00 cmp %i4, 0 4000b7e4: 02 bf ff fa be 4000b7cc 4000b7e8: b0 10 3f ff mov -1, %i0 rtems_filesystem_freenode( loc_to_free ); 4000b7ec: c2 07 20 08 ld [ %i4 + 8 ], %g1 4000b7f0: 80 a0 60 00 cmp %g1, 0 4000b7f4: 02 80 00 09 be 4000b818 4000b7f8: 01 00 00 00 nop 4000b7fc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000b800: 80 a0 60 00 cmp %g1, 0 4000b804: 02 80 00 05 be 4000b818 4000b808: 01 00 00 00 nop 4000b80c: 9f c0 40 00 call %g1 4000b810: 90 10 00 1c mov %i4, %o0 4000b814: b0 10 3f ff mov -1, %i0 return -1; } 4000b818: 81 c7 e0 08 ret 4000b81c: 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; 4000b820: 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; 4000b824: 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; 4000b828: 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 ){ 4000b82c: 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; 4000b830: 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; 4000b834: 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 ){ 4000b838: 80 a0 e0 00 cmp %g3, 0 4000b83c: 12 bf ff be bne 4000b734 4000b840: c2 24 20 10 st %g1, [ %l0 + 0x10 ] errno = ENOTSUP; 4000b844: 10 bf ff b8 b 4000b724 <== NOT EXECUTED 4000b848: b8 07 bf e8 add %fp, -24, %i4 <== NOT EXECUTED 4000b1a8 : char *msg_ptr, size_t msg_len, unsigned int *msg_prio, const struct timespec *abstime ) { 4000b1a8: 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 ) ) { 4000b1ac: 90 10 00 1c mov %i4, %o0 4000b1b0: 40 00 00 4f call 4000b2ec <_POSIX_Absolute_timeout_to_ticks> 4000b1b4: 92 07 bf f4 add %fp, -12, %o1 4000b1b8: 80 a2 20 02 cmp %o0, 2 4000b1bc: 18 80 00 03 bgu 4000b1c8 4000b1c0: 98 10 20 01 mov 1, %o4 4000b1c4: 98 10 20 00 clr %o4 <== NOT EXECUTED default: /* only to silence warnings */ do_wait = TRUE; break; } return _POSIX_Message_queue_Receive_support( 4000b1c8: da 07 bf f4 ld [ %fp + -12 ], %o5 4000b1cc: 90 10 00 18 mov %i0, %o0 4000b1d0: 92 10 00 19 mov %i1, %o1 4000b1d4: 94 10 00 1a mov %i2, %o2 4000b1d8: 96 10 00 1b mov %i3, %o3 4000b1dc: 7f ff ff 37 call 4000aeb8 <_POSIX_Message_queue_Receive_support> 4000b1e0: 98 0b 20 01 and %o4, 1, %o4 msg_len, msg_prio, do_wait, ticks ); } 4000b1e4: 81 c7 e0 08 ret 4000b1e8: 91 e8 00 08 restore %g0, %o0, %o0 4000b1ec : const char *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec *abstime ) { 4000b1ec: 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 ) ) { 4000b1f0: 90 10 00 1c mov %i4, %o0 4000b1f4: 40 00 00 3e call 4000b2ec <_POSIX_Absolute_timeout_to_ticks> 4000b1f8: 92 07 bf f4 add %fp, -12, %o1 4000b1fc: 80 a2 20 02 cmp %o0, 2 4000b200: 18 80 00 03 bgu 4000b20c 4000b204: 98 10 20 01 mov 1, %o4 4000b208: 98 10 20 00 clr %o4 <== NOT EXECUTED default: /* only to silence warnings */ do_wait = TRUE; break; } return _POSIX_Message_queue_Send_support( 4000b20c: da 07 bf f4 ld [ %fp + -12 ], %o5 4000b210: 90 10 00 18 mov %i0, %o0 4000b214: 92 10 00 19 mov %i1, %o1 4000b218: 94 10 00 1a mov %i2, %o2 4000b21c: 96 10 00 1b mov %i3, %o3 4000b220: 7f ff ff 76 call 4000aff8 <_POSIX_Message_queue_Send_support> 4000b224: 98 0b 20 01 and %o4, 1, %o4 msg_len, msg_prio, do_wait, ticks ); } 4000b228: 81 c7 e0 08 ret 4000b22c: 91 e8 00 08 restore %g0, %o0, %o0 4000338c : */ int newlib_free_buffers( FILE *fp ) { 4000338c: 9d e3 bf 98 save %sp, -104, %sp switch ( fileno(fp) ) { 40003390: 40 00 2b 2f call 4000e04c 40003394: 90 10 00 18 mov %i0, %o0 40003398: 80 a2 20 02 cmp %o0, 2 4000339c: 18 80 00 0e bgu 400033d4 400033a0: 01 00 00 00 nop case 0: case 1: case 2: if (fp->_flags & __SMBF) { 400033a4: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 400033a8: 80 88 60 80 btst 0x80, %g1 400033ac: 02 80 00 0c be 400033dc 400033b0: 01 00 00 00 nop free( fp->_bf._base ); 400033b4: 40 00 1e cd call 4000aee8 400033b8: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 fp->_flags &= ~__SMBF; 400033bc: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 fp->_bf._base = fp->_p = (unsigned char *) NULL; 400033c0: c0 26 20 10 clr [ %i0 + 0x10 ] case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 400033c4: 82 08 7f 7f and %g1, -129, %g1 fp->_bf._base = fp->_p = (unsigned char *) NULL; 400033c8: c0 26 00 00 clr [ %i0 ] case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 400033cc: 10 80 00 04 b 400033dc 400033d0: c2 36 20 0c sth %g1, [ %i0 + 0xc ] fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 400033d4: 40 00 2a 95 call 4000de28 <== NOT EXECUTED 400033d8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED } return 0; } 400033dc: 81 c7 e0 08 ret 400033e0: 91 e8 20 00 restore %g0, 0, %o0 40003784 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *pargp ) { 40003784: 9d e3 bf 98 save %sp, -104, %sp rtems_device_driver status; if ( !initialized ) { 40003788: 05 10 00 76 sethi %hi(0x4001d800), %g2 4000378c: c2 48 a2 64 ldsb [ %g2 + 0x264 ], %g1 ! 4001da64 40003790: 80 a0 60 00 cmp %g1, 0 40003794: 12 80 00 0e bne 400037cc 40003798: 82 10 20 01 mov 1, %g1 initialized = 1; status = rtems_io_register_name( 4000379c: 11 10 00 6c sethi %hi(0x4001b000), %o0 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 400037a0: c2 28 a2 64 stb %g1, [ %g2 + 0x264 ] status = rtems_io_register_name( 400037a4: 90 12 22 c0 or %o0, 0x2c0, %o0 400037a8: 92 10 00 18 mov %i0, %o1 400037ac: 40 00 00 4d call 400038e0 400037b0: 94 10 20 00 clr %o2 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 400037b4: 80 a2 20 00 cmp %o0, 0 400037b8: 02 80 00 04 be 400037c8 400037bc: 03 10 00 77 sethi %hi(0x4001dc00), %g1 rtems_fatal_error_occurred(status); 400037c0: 40 00 10 2a call 40007868 <== NOT EXECUTED 400037c4: 01 00 00 00 nop <== NOT EXECUTED NULL_major = major; 400037c8: f0 20 61 38 st %i0, [ %g1 + 0x138 ] } return RTEMS_SUCCESSFUL; } 400037cc: 81 c7 e0 08 ret 400037d0: 91 e8 20 00 restore %g0, 0, %o0 40003760 : void *pargp ) { rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 40003760: 80 a2 a0 00 cmp %o2, 0 40003764: 02 80 00 04 be 40003774 40003768: 01 00 00 00 nop rw_args->bytes_moved = rw_args->count; 4000376c: c2 02 a0 0c ld [ %o2 + 0xc ], %g1 <== NOT EXECUTED 40003770: c2 22 a0 14 st %g1, [ %o2 + 0x14 ] <== NOT EXECUTED return NULL_SUCCESSFUL; } 40003774: 81 c3 e0 08 retl 40003778: 90 10 20 00 clr %o0 400035dc : int open( const char *pathname, int flags, ... ) { 400035dc: 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); 400035e0: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 400035e4: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 400035e8: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 400035ec: fa 27 a0 58 st %i5, [ %fp + 0x58 ] /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 400035f0: 82 06 60 01 add %i1, 1, %g1 if ( ( status & _FREAD ) == _FREAD ) eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 400035f4: 80 88 60 02 btst 2, %g1 * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 400035f8: 82 08 60 01 and %g1, 1, %g1 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 400035fc: 02 80 00 03 be 40003608 40003600: a1 28 60 02 sll %g1, 2, %l0 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 40003604: a0 14 20 02 or %l0, 2, %l0 va_start(ap, flags); mode = va_arg( ap, int ); 40003608: 82 07 a0 50 add %fp, 0x50, %g1 4000360c: f4 07 a0 4c ld [ %fp + 0x4c ], %i2 40003610: 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(); 40003614: 40 00 1f 33 call 4000b2e0 40003618: ba 10 20 17 mov 0x17, %i5 if ( iop == 0 ) { 4000361c: b8 92 20 00 orcc %o0, 0, %i4 40003620: 02 80 00 93 be 4000386c 40003624: 92 10 00 10 mov %l0, %o1 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 40003628: b6 07 bf e4 add %fp, -28, %i3 4000362c: 90 10 00 18 mov %i0, %o0 40003630: 94 10 00 1b mov %i3, %o2 40003634: 7f ff fe 32 call 40002efc 40003638: 96 10 20 01 mov 1, %o3 pathname, eval_flags, &loc, true ); if ( status == -1 ) { 4000363c: 80 a2 3f ff cmp %o0, -1 40003640: 12 80 00 25 bne 400036d4 40003644: 82 0e 6a 00 and %i1, 0xa00, %g1 if ( errno != ENOENT ) { 40003648: 40 00 29 a0 call 4000dcc8 <__errno> 4000364c: 01 00 00 00 nop 40003650: c2 02 00 00 ld [ %o0 ], %g1 40003654: 80 a0 60 02 cmp %g1, 2 40003658: 12 80 00 11 bne 4000369c 4000365c: 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) ) { 40003660: 80 8e 62 00 btst 0x200, %i1 40003664: ba 10 20 02 mov 2, %i5 40003668: 02 80 00 6f be 40003824 4000366c: 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 ); 40003670: 13 3f ff e0 sethi %hi(0xffff8000), %o1 40003674: 90 10 00 18 mov %i0, %o0 40003678: 92 16 80 09 or %i2, %o1, %o1 4000367c: 94 10 20 00 clr %o2 40003680: 93 2a 60 10 sll %o1, 0x10, %o1 40003684: 96 10 20 00 clr %o3 40003688: 7f ff fe cd call 400031bc 4000368c: 93 32 60 10 srl %o1, 0x10, %o1 if ( rc ) { 40003690: 80 a2 20 00 cmp %o0, 0 40003694: 02 80 00 06 be 400036ac 40003698: 94 10 00 1b mov %i3, %o2 rc = errno; 4000369c: 40 00 29 8b call 4000dcc8 <__errno> 400036a0: 01 00 00 00 nop 400036a4: 10 80 00 5c b 40003814 400036a8: 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 ); 400036ac: 90 10 00 18 mov %i0, %o0 400036b0: 92 10 20 00 clr %o1 400036b4: 96 10 20 01 mov 1, %o3 400036b8: 7f ff fe 11 call 40002efc 400036bc: ba 10 20 0d mov 0xd, %i5 if ( status != 0 ) { /* The file did not exist */ 400036c0: 80 a2 20 00 cmp %o0, 0 400036c4: 12 80 00 58 bne 40003824 400036c8: 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; 400036cc: 10 80 00 07 b 400036e8 400036d0: 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)) { 400036d4: a0 10 00 1b mov %i3, %l0 400036d8: 80 a0 6a 00 cmp %g1, 0xa00 400036dc: 02 80 00 52 be 40003824 400036e0: 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; 400036e4: c2 07 bf e8 ld [ %fp + -24 ], %g1 iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 400036e8: 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; 400036ec: c2 27 20 30 st %g1, [ %i4 + 0x30 ] iop->file_info = loc.node_access; 400036f0: c2 07 bf e4 ld [ %fp + -28 ], %g1 iop->flags |= rtems_libio_fcntl_flags( flags ); 400036f4: 90 10 00 19 mov %i1, %o0 400036f8: 40 00 1f 30 call 4000b3b8 400036fc: c2 27 20 2c st %g1, [ %i4 + 0x2c ] 40003700: 90 12 00 10 or %o0, %l0, %o0 iop->pathinfo = loc; 40003704: 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 ); 40003708: d0 27 20 0c st %o0, [ %i4 + 0xc ] iop->pathinfo = loc; 4000370c: a0 07 bf e4 add %fp, -28, %l0 40003710: 90 07 20 10 add %i4, 0x10, %o0 40003714: 40 00 2b 5f call 4000e490 40003718: 92 10 00 10 mov %l0, %o1 if ( !iop->handlers->open_h ) { 4000371c: c2 07 20 30 ld [ %i4 + 0x30 ], %g1 40003720: c2 00 40 00 ld [ %g1 ], %g1 40003724: 80 a0 60 00 cmp %g1, 0 40003728: 02 80 00 67 be 400038c4 4000372c: 92 10 00 18 mov %i0, %o1 rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 40003730: 96 10 00 1a mov %i2, %o3 40003734: 90 10 00 1c mov %i4, %o0 40003738: 9f c0 40 00 call %g1 4000373c: 94 10 00 19 mov %i1, %o2 if ( rc ) 40003740: ba 92 20 00 orcc %o0, 0, %i5 40003744: 12 80 00 39 bne 40003828 40003748: 80 a7 20 00 cmp %i4, 0 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 4000374c: 80 8e 64 00 btst 0x400, %i1 40003750: 02 80 00 4c be 40003880 40003754: 03 10 00 66 sethi %hi(0x40019800), %g1 rc = ftruncate( iop - rtems_libio_iops, 0 ); 40003758: c4 00 63 8c ld [ %g1 + 0x38c ], %g2 ! 40019b8c 4000375c: 92 10 20 00 clr %o1 40003760: 84 27 00 02 sub %i4, %g2, %g2 40003764: 85 38 a0 02 sra %g2, 2, %g2 40003768: 87 28 a0 02 sll %g2, 2, %g3 4000376c: 83 28 a0 06 sll %g2, 6, %g1 40003770: 82 20 40 03 sub %g1, %g3, %g1 40003774: 91 28 60 06 sll %g1, 6, %o0 40003778: 90 22 00 01 sub %o0, %g1, %o0 4000377c: 83 2a 20 0c sll %o0, 0xc, %g1 40003780: 90 02 00 01 add %o0, %g1, %o0 40003784: 90 02 00 02 add %o0, %g2, %o0 40003788: 91 2a 20 04 sll %o0, 4, %o0 4000378c: 90 22 00 02 sub %o0, %g2, %o0 40003790: 91 2a 20 02 sll %o0, 2, %o0 40003794: 40 00 1d ff call 4000af90 40003798: 90 20 80 08 sub %g2, %o0, %o0 if ( rc ) { 4000379c: ba 92 20 00 orcc %o0, 0, %i5 400037a0: 02 80 00 38 be 40003880 400037a4: 03 10 00 66 sethi %hi(0x40019800), %g1 if(errno) rc = errno; 400037a8: 40 00 29 48 call 4000dcc8 <__errno> <== NOT EXECUTED 400037ac: 01 00 00 00 nop <== NOT EXECUTED 400037b0: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 400037b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400037b8: 02 80 00 06 be 400037d0 <== NOT EXECUTED 400037bc: 03 10 00 66 sethi %hi(0x40019800), %g1 <== NOT EXECUTED 400037c0: 40 00 29 42 call 4000dcc8 <__errno> <== NOT EXECUTED 400037c4: 01 00 00 00 nop <== NOT EXECUTED 400037c8: fa 02 00 00 ld [ %o0 ], %i5 <== NOT EXECUTED close( iop - rtems_libio_iops ); 400037cc: 03 10 00 66 sethi %hi(0x40019800), %g1 <== NOT EXECUTED 400037d0: c4 00 63 8c ld [ %g1 + 0x38c ], %g2 ! 40019b8c <== NOT EXECUTED 400037d4: 84 27 00 02 sub %i4, %g2, %g2 <== NOT EXECUTED 400037d8: 85 38 a0 02 sra %g2, 2, %g2 <== NOT EXECUTED 400037dc: 87 28 a0 02 sll %g2, 2, %g3 <== NOT EXECUTED 400037e0: 83 28 a0 06 sll %g2, 6, %g1 <== NOT EXECUTED 400037e4: 82 20 40 03 sub %g1, %g3, %g1 <== NOT EXECUTED 400037e8: 91 28 60 06 sll %g1, 6, %o0 <== NOT EXECUTED 400037ec: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED 400037f0: 83 2a 20 0c sll %o0, 0xc, %g1 <== NOT EXECUTED 400037f4: b8 10 20 00 clr %i4 <== NOT EXECUTED 400037f8: 90 02 00 01 add %o0, %g1, %o0 <== NOT EXECUTED 400037fc: 90 02 00 02 add %o0, %g2, %o0 <== NOT EXECUTED 40003800: 91 2a 20 04 sll %o0, 4, %o0 <== NOT EXECUTED 40003804: 90 22 00 02 sub %o0, %g2, %o0 <== NOT EXECUTED 40003808: 91 2a 20 02 sll %o0, 2, %o0 <== NOT EXECUTED 4000380c: 40 00 1d 84 call 4000ae1c <== NOT EXECUTED 40003810: 90 20 80 08 sub %g2, %o0, %o0 <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 40003814: 80 a7 60 00 cmp %i5, 0 40003818: 02 80 00 1a be 40003880 4000381c: 03 10 00 66 sethi %hi(0x40019800), %g1 40003820: a0 10 20 00 clr %l0 if ( iop ) 40003824: 80 a7 20 00 cmp %i4, 0 40003828: 02 80 00 05 be 4000383c 4000382c: 80 a4 20 00 cmp %l0, 0 rtems_libio_free( iop ); 40003830: 40 00 1e 94 call 4000b280 40003834: 90 10 00 1c mov %i4, %o0 if ( loc_to_free ) 40003838: 80 a4 20 00 cmp %l0, 0 4000383c: 02 80 00 0c be 4000386c 40003840: 01 00 00 00 nop rtems_filesystem_freenode( loc_to_free ); 40003844: c2 04 20 08 ld [ %l0 + 8 ], %g1 40003848: 80 a0 60 00 cmp %g1, 0 4000384c: 02 80 00 08 be 4000386c 40003850: 01 00 00 00 nop 40003854: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40003858: 80 a0 60 00 cmp %g1, 0 4000385c: 02 80 00 04 be 4000386c 40003860: 01 00 00 00 nop 40003864: 9f c0 40 00 call %g1 40003868: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( rc ); 4000386c: 40 00 29 17 call 4000dcc8 <__errno> 40003870: b0 10 3f ff mov -1, %i0 40003874: fa 22 00 00 st %i5, [ %o0 ] 40003878: 81 c7 e0 08 ret 4000387c: 81 e8 00 00 restore } return iop - rtems_libio_iops; 40003880: c6 00 63 8c ld [ %g1 + 0x38c ], %g3 40003884: 86 27 00 03 sub %i4, %g3, %g3 40003888: 87 38 e0 02 sra %g3, 2, %g3 4000388c: 83 28 e0 02 sll %g3, 2, %g1 40003890: 85 28 e0 06 sll %g3, 6, %g2 40003894: 84 20 80 01 sub %g2, %g1, %g2 40003898: 83 28 a0 06 sll %g2, 6, %g1 4000389c: 82 20 40 02 sub %g1, %g2, %g1 400038a0: 85 28 60 0c sll %g1, 0xc, %g2 400038a4: 82 00 40 02 add %g1, %g2, %g1 400038a8: 82 00 40 03 add %g1, %g3, %g1 400038ac: 83 28 60 04 sll %g1, 4, %g1 400038b0: 82 20 40 03 sub %g1, %g3, %g1 400038b4: 83 28 60 02 sll %g1, 2, %g1 400038b8: b0 20 c0 01 sub %g3, %g1, %i0 } 400038bc: 81 c7 e0 08 ret 400038c0: 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; 400038c4: 10 bf ff d8 b 40003824 <== NOT EXECUTED 400038c8: ba 10 20 86 mov 0x86, %i5 <== NOT EXECUTED 40003568 : /* * This is a replaceable stub */ void open_dev_console(void) { 40003568: 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) { 4000356c: 21 10 00 5f sethi %hi(0x40017c00), %l0 40003570: 92 10 20 00 clr %o1 40003574: 90 14 20 68 or %l0, 0x68, %o0 40003578: 40 00 00 19 call 400035dc 4000357c: 94 10 20 00 clr %o2 40003580: 80 a2 3f ff cmp %o0, -1 40003584: 02 80 00 14 be 400035d4 40003588: 90 14 20 68 or %l0, 0x68, %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) 4000358c: 92 10 20 01 mov 1, %o1 40003590: 40 00 00 13 call 400035dc 40003594: 94 10 20 00 clr %o2 40003598: 80 a2 3f ff cmp %o0, -1 4000359c: 32 80 00 05 bne,a 400035b0 400035a0: 90 14 20 68 or %l0, 0x68, %o0 rtems_fatal_error_occurred( error_code | '1' ); 400035a4: 11 14 d5 11 sethi %hi(0x53544400), %o0 <== NOT EXECUTED 400035a8: 10 80 00 09 b 400035cc <== NOT EXECUTED 400035ac: 90 12 20 31 or %o0, 0x31, %o0 ! 53544431 <== NOT EXECUTED if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 400035b0: 92 10 20 01 mov 1, %o1 400035b4: 40 00 00 0a call 400035dc 400035b8: 94 10 20 00 clr %o2 400035bc: 80 a2 3f ff cmp %o0, -1 400035c0: 12 80 00 05 bne 400035d4 400035c4: 11 14 d5 11 sethi %hi(0x53544400), %o0 rtems_fatal_error_occurred( error_code | '2' ); 400035c8: 90 12 20 32 or %o0, 0x32, %o0 ! 53544432 <== NOT EXECUTED 400035cc: 40 00 0d 35 call 40006aa0 <== NOT EXECUTED 400035d0: 01 00 00 00 nop <== NOT EXECUTED 400035d4: 81 c7 e0 08 ret 400035d8: 81 e8 00 00 restore 400216a8 : * open a directory. */ DIR * opendir( const char *name ) { 400216a8: 9d e3 bf 98 save %sp, -104, %sp register DIR *dirp; register int fd; if ((fd = open(name, 0)) == -1) 400216ac: 92 10 20 00 clr %o1 400216b0: 90 10 00 18 mov %i0, %o0 400216b4: 7f ff 97 29 call 40007358 400216b8: b0 10 20 00 clr %i0 400216bc: 80 a2 3f ff cmp %o0, -1 400216c0: 02 80 00 17 be 4002171c 400216c4: a0 10 00 08 mov %o0, %l0 return NULL; if (fcntl(fd, F_SETFD, 1) == -1 || 400216c8: 92 10 20 02 mov 2, %o1 400216cc: 40 00 2f ac call 4002d57c 400216d0: 94 10 20 01 mov 1, %o2 400216d4: 80 a2 3f ff cmp %o0, -1 400216d8: 02 80 00 0f be 40021714 400216dc: 90 10 00 10 mov %l0, %o0 400216e0: 7f ff 94 f5 call 40006ab4 400216e4: 90 10 20 18 mov 0x18, %o0 400216e8: b0 92 20 00 orcc %o0, 0, %i0 400216ec: 02 80 00 0a be 40021714 400216f0: 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); 400216f4: 7f ff 94 f0 call 40006ab4 400216f8: 90 10 22 00 mov 0x200, %o0 dirp->dd_len = 512; 400216fc: 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); 40021700: d0 26 20 0c st %o0, [ %i0 + 0xc ] dirp->dd_len = 512; if (dirp->dd_buf == NULL) { 40021704: 80 a2 20 00 cmp %o0, 0 40021708: 12 80 00 07 bne 40021724 4002170c: c2 26 20 10 st %g1, [ %i0 + 0x10 ] close (fd); 40021710: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40021714: 7f ff 92 a4 call 400061a4 <== NOT EXECUTED 40021718: b0 10 20 00 clr %i0 <== NOT EXECUTED 4002171c: 81 c7 e0 08 ret <== NOT EXECUTED 40021720: 81 e8 00 00 restore <== NOT EXECUTED return NULL; } dirp->dd_fd = fd; 40021724: e0 26 00 00 st %l0, [ %i0 ] dirp->dd_loc = 0; 40021728: c0 26 20 04 clr [ %i0 + 4 ] dirp->dd_seek = 0; 4002172c: c0 26 20 14 clr [ %i0 + 0x14 ] /* * Set up seek point for rewinddir. */ return dirp; } 40021730: 81 c7 e0 08 ret 40021734: 81 e8 00 00 restore 400043a8 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 400043a8: 9d e3 bf 98 save %sp, -104, %sp int i; if (tty->termios.c_oflag & OPOST) { 400043ac: c8 06 60 34 ld [ %i1 + 0x34 ], %g4 400043b0: 80 89 20 01 btst 1, %g4 400043b4: 02 80 00 59 be 40004518 400043b8: f0 2f a0 44 stb %i0, [ %fp + 0x44 ] switch (c) { 400043bc: 82 0e 20 ff and %i0, 0xff, %g1 400043c0: 80 a0 60 09 cmp %g1, 9 400043c4: 22 80 00 2b be,a 40004470 400043c8: c6 06 60 28 ld [ %i1 + 0x28 ], %g3 400043cc: 18 80 00 07 bgu 400043e8 400043d0: 80 a0 60 0a cmp %g1, 0xa 400043d4: 80 a0 60 08 cmp %g1, 8 <== NOT EXECUTED 400043d8: 12 80 00 3c bne 400044c8 <== NOT EXECUTED 400043dc: 80 89 20 02 btst 2, %g4 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 400043e0: 10 80 00 35 b 400044b4 <== NOT EXECUTED 400043e4: 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) { 400043e8: 02 80 00 06 be 40004400 400043ec: 80 a0 60 0d cmp %g1, 0xd 400043f0: 32 80 00 36 bne,a 400044c8 400043f4: 80 89 20 02 btst 2, %g4 tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 400043f8: 10 80 00 10 b 40004438 <== NOT EXECUTED 400043fc: 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) 40004400: 80 89 20 20 btst 0x20, %g4 40004404: 32 80 00 02 bne,a 4000440c 40004408: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED tty->column = 0; if (tty->termios.c_oflag & ONLCR) { 4000440c: c2 06 60 34 ld [ %i1 + 0x34 ], %g1 40004410: 80 88 60 04 btst 4, %g1 40004414: 02 80 00 42 be 4000451c 40004418: 94 10 00 19 mov %i1, %o2 rtems_termios_puts ("\r", 1, tty); 4000441c: 11 10 00 5f sethi %hi(0x40017c00), %o0 40004420: 92 10 20 01 mov 1, %o1 40004424: 90 12 23 70 or %o0, 0x370, %o0 40004428: 7f ff ff 94 call 40004278 4000442c: 94 10 00 19 mov %i1, %o2 c = '\n'; if (tty->termios.c_oflag & ONLRET) tty->column = 0; break; } tty->column = 0; 40004430: 10 80 00 3a b 40004518 40004434: c0 26 60 28 clr [ %i1 + 0x28 ] tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 40004438: 02 80 00 06 be 40004450 <== NOT EXECUTED 4000443c: 80 89 20 08 btst 8, %g4 <== NOT EXECUTED 40004440: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 40004444: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004448: 02 80 00 17 be 400044a4 <== NOT EXECUTED 4000444c: 80 89 20 08 btst 8, %g4 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 40004450: 22 80 00 32 be,a 40004518 <== NOT EXECUTED 40004454: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED c = '\n'; 40004458: 82 10 20 0a mov 0xa, %g1 <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 4000445c: 80 89 20 20 btst 0x20, %g4 <== NOT EXECUTED 40004460: 02 80 00 2e be 40004518 <== NOT EXECUTED 40004464: c2 2f a0 44 stb %g1, [ %fp + 0x44 ] <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; 40004468: 10 80 00 2c b 40004518 <== NOT EXECUTED 4000446c: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { 40004470: 05 00 00 06 sethi %hi(0x1800), %g2 40004474: 82 09 00 02 and %g4, %g2, %g1 40004478: 80 a0 40 02 cmp %g1, %g2 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 4000447c: 84 08 e0 07 and %g3, 7, %g2 40004480: 82 10 20 08 mov 8, %g1 40004484: 92 20 40 02 sub %g1, %g2, %o1 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 40004488: 12 80 00 09 bne 400044ac 4000448c: 84 02 40 03 add %o1, %g3, %g2 tty->column += i; 40004490: c4 26 60 28 st %g2, [ %i1 + 0x28 ] rtems_termios_puts ( " ", i, tty); 40004494: 94 10 00 19 mov %i1, %o2 40004498: 11 10 00 5f sethi %hi(0x40017c00), %o0 4000449c: 7f ff ff 77 call 40004278 400044a0: 90 12 23 78 or %o0, 0x378, %o0 ! 40017f78 <__func__.4894+0x268> 400044a4: 81 c7 e0 08 ret 400044a8: 81 e8 00 00 restore return; } tty->column += i; 400044ac: 10 80 00 1b b 40004518 <== NOT EXECUTED 400044b0: c4 26 60 28 st %g2, [ %i1 + 0x28 ] <== NOT EXECUTED break; case '\b': if (tty->column > 0) 400044b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400044b8: 04 80 00 18 ble 40004518 <== NOT EXECUTED 400044bc: 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++; 400044c0: 10 80 00 16 b 40004518 <== NOT EXECUTED 400044c4: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 400044c8: 02 80 00 0b be 400044f4 400044cc: c4 0f a0 44 ldub [ %fp + 0x44 ], %g2 c = toupper(c); 400044d0: 03 10 00 64 sethi %hi(0x40019000), %g1 <== NOT EXECUTED 400044d4: c2 00 63 d0 ld [ %g1 + 0x3d0 ], %g1 ! 400193d0 <__ctype_ptr> <== NOT EXECUTED 400044d8: b0 0e 20 ff and %i0, 0xff, %i0 <== NOT EXECUTED 400044dc: c2 08 40 18 ldub [ %g1 + %i0 ], %g1 <== NOT EXECUTED 400044e0: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 400044e4: 32 80 00 02 bne,a 400044ec <== NOT EXECUTED 400044e8: b0 06 3f e0 add %i0, -32, %i0 <== NOT EXECUTED 400044ec: f0 2f a0 44 stb %i0, [ %fp + 0x44 ] <== NOT EXECUTED if (!iscntrl(c)) 400044f0: c4 0f a0 44 ldub [ %fp + 0x44 ], %g2 <== NOT EXECUTED 400044f4: 03 10 00 64 sethi %hi(0x40019000), %g1 400044f8: c2 00 63 d0 ld [ %g1 + 0x3d0 ], %g1 ! 400193d0 <__ctype_ptr> 400044fc: c2 08 40 02 ldub [ %g1 + %g2 ], %g1 40004500: 80 88 60 20 btst 0x20, %g1 40004504: 12 80 00 06 bne 4000451c 40004508: 94 10 00 19 mov %i1, %o2 tty->column++; 4000450c: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 40004510: 82 00 60 01 inc %g1 40004514: c2 26 60 28 st %g1, [ %i1 + 0x28 ] break; } } rtems_termios_puts (&c, 1, tty); 40004518: 94 10 00 19 mov %i1, %o2 4000451c: 90 07 a0 44 add %fp, 0x44, %o0 40004520: 7f ff ff 56 call 40004278 40004524: 92 10 20 01 mov 1, %o1 40004528: 81 c7 e0 08 ret 4000452c: 81 e8 00 00 restore 400070c4 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 400070c4: 9d e3 bf 60 save %sp, -160, %sp 400070c8: 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 ) 400070cc: 80 a6 a0 00 cmp %i2, 0 400070d0: 02 80 00 7b be 400072bc 400070d4: b0 10 20 0e mov 0xe, %i0 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 400070d8: 03 10 00 70 sethi %hi(0x4001c000), %g1 400070dc: 80 a6 60 00 cmp %i1, 0 400070e0: 02 80 00 03 be 400070ec 400070e4: a4 10 60 d0 or %g1, 0xd0, %l2 400070e8: a4 10 00 19 mov %i1, %l2 if ( !the_attr->is_initialized ) 400070ec: c2 04 80 00 ld [ %l2 ], %g1 400070f0: 80 a0 60 00 cmp %g1, 0 400070f4: 22 80 00 72 be,a 400072bc 400070f8: 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) ) 400070fc: c2 04 a0 04 ld [ %l2 + 4 ], %g1 40007100: 80 a0 60 00 cmp %g1, 0 40007104: 02 80 00 07 be 40007120 40007108: 03 10 00 74 sethi %hi(0x4001d000), %g1 4000710c: c4 00 60 f0 ld [ %g1 + 0xf0 ], %g2 ! 4001d0f0 40007110: c2 04 a0 08 ld [ %l2 + 8 ], %g1 40007114: 80 a0 40 02 cmp %g1, %g2 40007118: 2a 80 00 69 bcs,a 400072bc 4000711c: 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 ) { 40007120: c2 04 a0 10 ld [ %l2 + 0x10 ], %g1 40007124: 80 a0 60 01 cmp %g1, 1 40007128: 02 80 00 06 be 40007140 4000712c: 80 a0 60 02 cmp %g1, 2 40007130: 12 80 00 63 bne 400072bc 40007134: b0 10 20 16 mov 0x16, %i0 schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 40007138: 10 80 00 0a b 40007160 4000713c: 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 ]; 40007140: 03 10 00 78 sethi %hi(0x4001e000), %g1 40007144: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 ! 4001e030 <_Thread_Executing> schedpolicy = api->schedpolicy; schedparam = api->schedparam; 40007148: 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 ]; 4000714c: c2 00 61 60 ld [ %g1 + 0x160 ], %g1 schedpolicy = api->schedpolicy; schedparam = api->schedparam; 40007150: 94 10 20 18 mov 0x18, %o2 40007154: 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; 40007158: 10 80 00 05 b 4000716c 4000715c: e6 00 60 7c ld [ %g1 + 0x7c ], %l3 schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; schedparam = the_attr->schedparam; 40007160: 90 07 bf e0 add %fp, -32, %o0 40007164: 92 04 a0 18 add %l2, 0x18, %o1 40007168: 94 10 20 18 mov 0x18, %o2 4000716c: 40 00 24 48 call 4001028c 40007170: 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 ) 40007174: c2 04 a0 0c ld [ %l2 + 0xc ], %g1 40007178: 80 a0 60 00 cmp %g1, 0 4000717c: 12 80 00 50 bne 400072bc 40007180: ea 07 bf e0 ld [ %fp + -32 ], %l5 /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 40007184: 82 05 7f ff add %l5, -1, %g1 40007188: 80 a0 60 fd cmp %g1, 0xfd 4000718c: 18 80 00 7e bgu 40007384 40007190: 80 a4 e0 01 cmp %l3, 1 */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 40007194: 02 80 00 10 be 400071d4 40007198: a2 10 20 00 clr %l1 4000719c: 14 80 00 08 bg 400071bc 400071a0: 80 a4 e0 02 cmp %l3, 2 400071a4: 80 a4 e0 00 cmp %l3, 0 400071a8: a2 10 20 01 mov 1, %l1 400071ac: 02 80 00 1a be 40007214 400071b0: a0 10 20 00 clr %l0 */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; 400071b4: 81 c7 e0 08 ret 400071b8: 91 e8 20 16 restore %g0, 0x16, %o0 */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 400071bc: 02 80 00 05 be 400071d0 400071c0: 80 a4 e0 03 cmp %l3, 3 400071c4: 12 80 00 3e bne 400072bc 400071c8: b0 10 20 16 mov 0x16, %i0 400071cc: 30 80 00 04 b,a 400071dc 400071d0: a2 10 20 02 mov 2, %l1 <== NOT EXECUTED 400071d4: 10 80 00 10 b 40007214 400071d8: 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 ) < 400071dc: 40 00 10 d6 call 4000b534 <_Timespec_To_ticks> 400071e0: 90 07 bf e8 add %fp, -24, %o0 400071e4: a0 10 00 08 mov %o0, %l0 400071e8: 40 00 10 d3 call 4000b534 <_Timespec_To_ticks> 400071ec: 90 07 bf f0 add %fp, -16, %o0 400071f0: 80 a4 00 08 cmp %l0, %o0 400071f4: 0a 80 00 64 bcs 40007384 400071f8: 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 ) ) 400071fc: 82 00 7f ff add %g1, -1, %g1 40007200: 80 a0 60 fd cmp %g1, 0xfd 40007204: 18 80 00 60 bgu 40007384 40007208: 03 10 00 1d sethi %hi(0x40007400), %g1 4000720c: a2 10 20 03 mov 3, %l1 40007210: a0 10 62 cc or %g1, 0x2cc, %l0 #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 40007214: 29 10 00 78 sethi %hi(0x4001e000), %l4 40007218: 40 00 06 f1 call 40008ddc <_API_Mutex_Lock> 4000721c: d0 05 20 28 ld [ %l4 + 0x28 ], %o0 ! 4001e028 <_RTEMS_Allocator_Mutex> * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 40007220: 11 10 00 78 sethi %hi(0x4001e000), %o0 40007224: 40 00 09 58 call 40009784 <_Objects_Allocate> 40007228: 90 12 22 00 or %o0, 0x200, %o0 ! 4001e200 <_POSIX_Threads_Information> * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 4000722c: b2 92 20 00 orcc %o0, 0, %i1 40007230: 32 80 00 04 bne,a 40007240 40007234: c4 04 a0 08 ld [ %l2 + 8 ], %g2 _RTEMS_Unlock_allocator(); 40007238: 10 80 00 1f b 400072b4 4000723c: d0 05 20 28 ld [ %l4 + 0x28 ], %o0 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 40007240: 03 10 00 74 sethi %hi(0x4001d000), %g1 40007244: c2 00 60 f0 ld [ %g1 + 0xf0 ], %g1 ! 4001d0f0 40007248: c0 27 bf dc clr [ %fp + -36 ] 4000724c: 97 28 60 01 sll %g1, 1, %o3 40007250: 80 a2 c0 02 cmp %o3, %g2 40007254: 1a 80 00 03 bcc 40007260 40007258: d4 04 a0 04 ld [ %l2 + 4 ], %o2 4000725c: 96 10 00 02 mov %g2, %o3 40007260: 82 07 bf dc add %fp, -36, %g1 40007264: e2 23 a0 60 st %l1, [ %sp + 0x60 ] 40007268: e0 23 a0 64 st %l0, [ %sp + 0x64 ] 4000726c: c0 23 a0 68 clr [ %sp + 0x68 ] 40007270: 9a 10 20 ff mov 0xff, %o5 40007274: a2 10 20 01 mov 1, %l1 40007278: 9a 23 40 15 sub %o5, %l5, %o5 4000727c: e2 23 a0 5c st %l1, [ %sp + 0x5c ] 40007280: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 40007284: 21 10 00 78 sethi %hi(0x4001e000), %l0 40007288: 92 10 00 19 mov %i1, %o1 4000728c: 90 14 22 00 or %l0, 0x200, %o0 40007290: 40 00 0d 0c call 4000a6c0 <_Thread_Initialize> 40007294: 98 10 20 00 clr %o4 budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 40007298: 80 8a 20 ff btst 0xff, %o0 4000729c: 12 80 00 0a bne 400072c4 400072a0: 90 14 22 00 or %l0, 0x200, %o0 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 400072a4: 40 00 0a 25 call 40009b38 <_Objects_Free> 400072a8: 92 10 00 19 mov %i1, %o1 _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 400072ac: 03 10 00 78 sethi %hi(0x4001e000), %g1 400072b0: d0 00 60 28 ld [ %g1 + 0x28 ], %o0 ! 4001e028 <_RTEMS_Allocator_Mutex> 400072b4: 40 00 06 e0 call 40008e34 <_API_Mutex_Unlock> 400072b8: b0 10 20 0b mov 0xb, %i0 400072bc: 81 c7 e0 08 ret 400072c0: 81 e8 00 00 restore /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 400072c4: e0 06 61 60 ld [ %i1 + 0x160 ], %l0 api->Attributes = *the_attr; 400072c8: 92 10 00 12 mov %l2, %o1 400072cc: 94 10 20 38 mov 0x38, %o2 400072d0: 40 00 23 ef call 4001028c 400072d4: 90 10 00 10 mov %l0, %o0 api->detachstate = the_attr->detachstate; 400072d8: c2 04 a0 34 ld [ %l2 + 0x34 ], %g1 api->schedpolicy = schedpolicy; api->schedparam = schedparam; 400072dc: 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; 400072e0: c2 24 20 38 st %g1, [ %l0 + 0x38 ] api->schedpolicy = schedpolicy; api->schedparam = schedparam; 400072e4: 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; 400072e8: e6 24 20 7c st %l3, [ %l0 + 0x7c ] api->schedparam = schedparam; 400072ec: 40 00 23 e8 call 4001028c 400072f0: 90 04 20 80 add %l0, 0x80, %o0 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 400072f4: 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; 400072f8: e2 2e 60 75 stb %l1, [ %i1 + 0x75 ] /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 400072fc: 96 10 00 1b mov %i3, %o3 40007300: 90 10 00 19 mov %i1, %o0 40007304: 92 10 20 01 mov 1, %o1 40007308: 40 00 0f d2 call 4000b250 <_Thread_Start> 4000730c: 98 10 20 00 clr %o4 start_routine, arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { 40007310: 80 a4 e0 03 cmp %l3, 3 40007314: 12 80 00 09 bne 40007338 40007318: a2 10 00 08 mov %o0, %l1 _Watchdog_Insert_ticks( 4000731c: 40 00 10 86 call 4000b534 <_Timespec_To_ticks> 40007320: 90 04 20 88 add %l0, 0x88, %o0 40007324: 92 04 20 9c add %l0, 0x9c, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40007328: d0 24 20 a8 st %o0, [ %l0 + 0xa8 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4000732c: 11 10 00 78 sethi %hi(0x4001e000), %o0 40007330: 40 00 11 7d call 4000b924 <_Watchdog_Insert> 40007334: 90 12 20 50 or %o0, 0x50, %o0 ! 4001e050 <_Watchdog_Ticks_chain> * * NOTE: This can only happen if someone slips in and touches the * thread while we are creating it. */ if ( !status ) { 40007338: 80 8c 60 ff btst 0xff, %l1 4000733c: 12 80 00 0b bne 40007368 40007340: 21 10 00 78 sethi %hi(0x4001e000), %l0 40007344: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40007348: 11 10 00 78 sethi %hi(0x4001e000), %o0 <== NOT EXECUTED 4000734c: 40 00 09 fb call 40009b38 <_Objects_Free> <== NOT EXECUTED 40007350: 90 12 22 00 or %o0, 0x200, %o0 ! 4001e200 <_POSIX_Threads_Information> <== NOT EXECUTED _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 40007354: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 40007358: 40 00 06 b7 call 40008e34 <_API_Mutex_Unlock> <== NOT EXECUTED 4000735c: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED 40007360: 81 c7 e0 08 ret <== NOT EXECUTED 40007364: 81 e8 00 00 restore <== NOT EXECUTED /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 40007368: c2 06 60 08 ld [ %i1 + 8 ], %g1 _RTEMS_Unlock_allocator(); 4000736c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 40007370: c2 25 80 00 st %g1, [ %l6 ] _RTEMS_Unlock_allocator(); 40007374: 40 00 06 b0 call 40008e34 <_API_Mutex_Unlock> 40007378: b0 10 20 00 clr %i0 4000737c: 81 c7 e0 08 ret 40007380: 81 e8 00 00 restore return 0; 40007384: b0 10 20 16 mov 0x16, %i0 } 40007388: 81 c7 e0 08 ret 4000738c: 81 e8 00 00 restore 400060d4 : int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 400060d4: 9d e3 bf 98 save %sp, -104, %sp 400060d8: 03 10 00 59 sethi %hi(0x40016400), %g1 400060dc: c4 00 61 70 ld [ %g1 + 0x170 ], %g2 ! 40016570 <_Thread_Dispatch_disable_level> 400060e0: 84 00 a0 01 inc %g2 400060e4: c4 20 61 70 st %g2, [ %g1 + 0x170 ] * _POSIX_Keys_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ) { return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information ); 400060e8: 11 10 00 5a sethi %hi(0x40016800), %o0 400060ec: 40 00 09 6e call 400086a4 <_Objects_Allocate> 400060f0: 90 12 21 c4 or %o0, 0x1c4, %o0 ! 400169c4 <_POSIX_Keys_Information> _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 400060f4: a0 92 20 00 orcc %o0, 0, %l0 400060f8: 32 80 00 06 bne,a 40006110 400060fc: f2 24 20 14 st %i1, [ %l0 + 0x14 ] _Thread_Enable_dispatch(); 40006100: 40 00 0c e9 call 400094a4 <_Thread_Enable_dispatch> 40006104: b0 10 20 0b mov 0xb, %i0 40006108: 81 c7 e0 08 ret 4000610c: 81 e8 00 00 restore for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 40006110: 03 10 00 59 sethi %hi(0x40016400), %g1 if ( !the_key ) { _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 40006114: a2 10 00 10 mov %l0, %l1 for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 40006118: a6 10 60 d0 or %g1, 0xd0, %l3 if ( !the_key ) { _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 4000611c: b2 10 20 01 mov 1, %i1 for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 40006120: 83 2e 60 02 sll %i1, 2, %g1 40006124: c2 04 c0 01 ld [ %l3 + %g1 ], %g1 40006128: 80 a0 60 00 cmp %g1, 0 4000612c: 22 80 00 24 be,a 400061bc 40006130: c0 24 60 1c clr [ %l1 + 0x1c ] INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 40006134: c2 00 60 04 ld [ %g1 + 4 ], %g1 40006138: c2 10 60 10 lduh [ %g1 + 0x10 ], %g1 4000613c: 82 00 60 01 inc %g1 40006140: a5 28 60 02 sll %g1, 2, %l2 (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); 40006144: 40 00 12 38 call 4000aa24 <_Workspace_Allocate> 40006148: 90 10 00 12 mov %l2, %o0 if ( !table ) { 4000614c: 82 92 20 00 orcc %o0, 0, %g1 40006150: 32 80 00 16 bne,a 400061a8 40006154: c2 24 60 1c st %g1, [ %l1 + 0x1c ] for ( --the_api; 40006158: 82 06 60 05 add %i1, 5, %g1 4000615c: b2 06 7f ff add %i1, -1, %i1 40006160: 83 28 60 02 sll %g1, 2, %g1 40006164: 10 80 00 05 b 40006178 40006168: b0 04 00 01 add %l0, %g1, %i0 the_api >= 1; the_api-- ) 4000616c: b2 06 7f ff add %i1, -1, %i1 <== NOT EXECUTED _Workspace_Free( the_key->Values[ the_api ] ); 40006170: 40 00 12 26 call 4000aa08 <_Workspace_Free> <== NOT EXECUTED 40006174: 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; 40006178: 80 a6 60 00 cmp %i1, 0 4000617c: 32 bf ff fc bne,a 4000616c 40006180: 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 ); 40006184: 92 10 00 10 mov %l0, %o1 40006188: 11 10 00 5a sethi %hi(0x40016800), %o0 4000618c: 90 12 21 c4 or %o0, 0x1c4, %o0 ! 400169c4 <_POSIX_Keys_Information> 40006190: 40 00 0a 32 call 40008a58 <_Objects_Free> 40006194: b0 10 20 0c mov 0xc, %i0 the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 40006198: 40 00 0c c3 call 400094a4 <_Thread_Enable_dispatch> 4000619c: 01 00 00 00 nop 400061a0: 81 c7 e0 08 ret 400061a4: 81 e8 00 00 restore return ENOMEM; } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); 400061a8: 94 10 00 12 mov %l2, %o2 400061ac: 40 00 24 c7 call 4000f4c8 400061b0: 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++ ) { 400061b4: 10 80 00 03 b 400061c0 400061b8: b2 06 60 01 inc %i1 400061bc: 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; 400061c0: 80 a6 60 05 cmp %i1, 5 400061c4: 12 bf ff d7 bne 40006120 400061c8: a2 04 60 04 add %l1, 4, %l1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 400061cc: c6 04 20 08 ld [ %l0 + 8 ], %g3 400061d0: 03 10 00 5a sethi %hi(0x40016800), %g1 400061d4: c4 00 61 e0 ld [ %g1 + 0x1e0 ], %g2 ! 400169e0 <_POSIX_Keys_Information+0x1c> 400061d8: 03 00 00 3f sethi %hi(0xfc00), %g1 400061dc: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400061e0: 82 08 c0 01 and %g3, %g1, %g1 400061e4: 83 28 60 02 sll %g1, 2, %g1 400061e8: 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; 400061ec: c0 24 20 0c clr [ %l0 + 0xc ] } } the_key->is_active = TRUE; 400061f0: 82 10 20 01 mov 1, %g1 _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 400061f4: c6 26 00 00 st %g3, [ %i0 ] } } the_key->is_active = TRUE; 400061f8: 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(); 400061fc: 40 00 0c aa call 400094a4 <_Thread_Enable_dispatch> 40006200: b0 10 20 00 clr %i0 return 0; } 40006204: 81 c7 e0 08 ret 40006208: 81 e8 00 00 restore 4000620c : */ int pthread_key_delete( pthread_key_t key ) { 4000620c: 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 *) 40006210: 23 10 00 5a sethi %hi(0x40016800), %l1 40006214: 92 10 00 18 mov %i0, %o1 40006218: 94 07 bf f4 add %fp, -12, %o2 4000621c: 40 00 0a 7c call 40008c0c <_Objects_Get> 40006220: 90 14 61 c4 or %l1, 0x1c4, %o0 register POSIX_Keys_Control *the_key; Objects_Locations location; uint32_t the_api; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 40006224: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006228: a0 10 00 08 mov %o0, %l0 4000622c: 80 a0 60 00 cmp %g1, 0 40006230: 12 80 00 24 bne 400062c0 40006234: b0 10 20 16 mov 0x16, %i0 case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); 40006238: 90 14 61 c4 or %l1, 0x1c4, %o0 4000623c: 40 00 09 44 call 4000874c <_Objects_Close> 40006240: 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 ] ) 40006244: d0 04 20 1c ld [ %l0 + 0x1c ], %o0 40006248: 80 a2 20 00 cmp %o0, 0 4000624c: 02 80 00 04 be 4000625c 40006250: c0 2c 20 10 clrb [ %l0 + 0x10 ] _Workspace_Free( the_key->Values[ the_api ] ); 40006254: 40 00 11 ed call 4000aa08 <_Workspace_Free> 40006258: 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 ] ) 4000625c: d0 04 20 20 ld [ %l0 + 0x20 ], %o0 40006260: 80 a2 20 00 cmp %o0, 0 40006264: 22 80 00 05 be,a 40006278 40006268: d0 04 20 24 ld [ %l0 + 0x24 ], %o0 <== NOT EXECUTED _Workspace_Free( the_key->Values[ the_api ] ); 4000626c: 40 00 11 e7 call 4000aa08 <_Workspace_Free> 40006270: 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 ] ) 40006274: d0 04 20 24 ld [ %l0 + 0x24 ], %o0 40006278: 80 a2 20 00 cmp %o0, 0 4000627c: 22 80 00 05 be,a 40006290 40006280: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED _Workspace_Free( the_key->Values[ the_api ] ); 40006284: 40 00 11 e1 call 4000aa08 <_Workspace_Free> 40006288: 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 ] ) 4000628c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 40006290: 80 a2 20 00 cmp %o0, 0 40006294: 02 80 00 05 be 400062a8 40006298: 92 10 00 10 mov %l0, %o1 _Workspace_Free( the_key->Values[ the_api ] ); 4000629c: 40 00 11 db call 4000aa08 <_Workspace_Free> <== NOT EXECUTED 400062a0: 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 ); 400062a4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 400062a8: 11 10 00 5a sethi %hi(0x40016800), %o0 400062ac: 90 12 21 c4 or %o0, 0x1c4, %o0 ! 400169c4 <_POSIX_Keys_Information> 400062b0: 40 00 09 ea call 40008a58 <_Objects_Free> 400062b4: 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(); 400062b8: 40 00 0c 7b call 400094a4 <_Thread_Enable_dispatch> 400062bc: 01 00 00 00 nop case OBJECTS_ERROR: break; } return EINVAL; } 400062c0: 81 c7 e0 08 ret 400062c4: 81 e8 00 00 restore 400228b8 : int pthread_kill( pthread_t thread, int sig ) { 400228b8: 9d e3 bf 90 save %sp, -112, %sp POSIX_API_Control *api; Thread_Control *the_thread; Objects_Locations location; if ( !sig ) 400228bc: 80 a6 60 00 cmp %i1, 0 400228c0: 02 80 00 06 be 400228d8 400228c4: 92 10 00 18 mov %i0, %o1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 400228c8: a0 06 7f ff add %i1, -1, %l0 400228cc: 80 a4 20 1f cmp %l0, 0x1f 400228d0: 08 80 00 08 bleu 400228f0 400228d4: 11 10 00 a4 sethi %hi(0x40029000), %o0 rtems_set_errno_and_return_minus_one( EINVAL ); 400228d8: 7f ff d0 45 call 400169ec <__errno> 400228dc: b0 10 3f ff mov -1, %i0 400228e0: 82 10 20 16 mov 0x16, %g1 400228e4: c2 22 00 00 st %g1, [ %o0 ] 400228e8: 81 c7 e0 08 ret 400228ec: 81 e8 00 00 restore RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 400228f0: 94 07 bf f4 add %fp, -12, %o2 400228f4: 7f ff a7 e4 call 4000c884 <_Objects_Get> 400228f8: 90 12 20 a0 or %o0, 0xa0, %o0 the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 400228fc: c2 07 bf f4 ld [ %fp + -12 ], %g1 40022900: 80 a0 60 00 cmp %g1, 0 40022904: 12 80 00 23 bne 40022990 40022908: 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 ) { 4002290c: 83 2e 60 02 sll %i1, 2, %g1 40022910: 85 2e 60 04 sll %i1, 4, %g2 40022914: 84 20 80 01 sub %g2, %g1, %g2 40022918: 03 10 00 a5 sethi %hi(0x40029400), %g1 4002291c: 82 10 60 0c or %g1, 0xc, %g1 ! 4002940c <_POSIX_signals_Vectors> 40022920: 82 00 40 02 add %g1, %g2, %g1 40022924: c2 00 60 08 ld [ %g1 + 8 ], %g1 40022928: 80 a0 60 01 cmp %g1, 1 4002292c: 02 80 00 15 be 40022980 40022930: c6 02 21 60 ld [ %o0 + 0x160 ], %g3 return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 40022934: c4 00 e0 c8 ld [ %g3 + 0xc8 ], %g2 (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 40022938: 92 10 00 19 mov %i1, %o1 return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 4002293c: b2 10 20 01 mov 1, %i1 40022940: 83 2e 40 10 sll %i1, %l0, %g1 40022944: 84 10 80 01 or %g2, %g1, %g2 (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 40022948: 94 10 20 00 clr %o2 4002294c: 7f ff ff 8f call 40022788 <_POSIX_signals_Unblock_thread> 40022950: 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 ) ) 40022954: 03 10 00 a3 sethi %hi(0x40028c00), %g1 40022958: c2 00 62 6c ld [ %g1 + 0x26c ], %g1 ! 40028e6c <_ISR_Nest_level> 4002295c: 80 a0 60 00 cmp %g1, 0 40022960: 02 80 00 08 be 40022980 40022964: f2 2e 20 75 stb %i1, [ %i0 + 0x75 ] 40022968: 03 10 00 a3 sethi %hi(0x40028c00), %g1 4002296c: c2 00 62 90 ld [ %g1 + 0x290 ], %g1 ! 40028e90 <_Thread_Executing> 40022970: 80 a6 00 01 cmp %i0, %g1 40022974: 12 80 00 03 bne 40022980 40022978: 03 10 00 a3 sethi %hi(0x40028c00), %g1 _ISR_Signals_to_thread_executing = TRUE; 4002297c: f2 28 63 28 stb %i1, [ %g1 + 0x328 ] ! 40028f28 <_ISR_Signals_to_thread_executing> <== NOT EXECUTED } _Thread_Enable_dispatch(); 40022980: 7f ff aa 2c call 4000d230 <_Thread_Enable_dispatch> 40022984: b0 10 20 00 clr %i0 40022988: 81 c7 e0 08 ret 4002298c: 81 e8 00 00 restore #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); 40022990: 7f ff d0 17 call 400169ec <__errno> 40022994: b0 10 3f ff mov -1, %i0 40022998: 82 10 20 03 mov 3, %g1 4002299c: c2 22 00 00 st %g1, [ %o0 ] } 400229a0: 81 c7 e0 08 ret 400229a4: 81 e8 00 00 restore 40007f88 : int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 40007f88: 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; 40007f8c: 03 10 00 5e sethi %hi(0x40017800), %g1 40007f90: 80 a6 60 00 cmp %i1, 0 40007f94: 02 80 00 03 be 40007fa0 40007f98: a0 10 61 7c or %g1, 0x17c, %l0 40007f9c: a0 10 00 19 mov %i1, %l0 else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 40007fa0: 80 a6 20 00 cmp %i0, 0 40007fa4: 22 80 00 2f be,a 40008060 40007fa8: b0 10 20 16 mov 0x16, %i0 break; } } #endif if ( !the_attr->is_initialized ) 40007fac: c2 04 00 00 ld [ %l0 ], %g1 40007fb0: 80 a0 60 00 cmp %g1, 0 40007fb4: 22 80 00 2b be,a 40008060 40007fb8: b0 10 20 16 mov 0x16, %i0 /* * XXX: Be careful about attributes when global!!! */ assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE ); 40007fbc: c2 04 20 04 ld [ %l0 + 4 ], %g1 40007fc0: 80 a0 60 00 cmp %g1, 0 40007fc4: 22 80 00 0a be,a 40007fec 40007fc8: c2 04 20 0c ld [ %l0 + 0xc ], %g1 40007fcc: 11 10 00 5e sethi %hi(0x40017800), %o0 <== NOT EXECUTED 40007fd0: 15 10 00 5e sethi %hi(0x40017800), %o2 <== NOT EXECUTED 40007fd4: 17 10 00 5e sethi %hi(0x40017800), %o3 <== NOT EXECUTED 40007fd8: 90 12 21 90 or %o0, 0x190, %o0 <== NOT EXECUTED 40007fdc: 94 12 a2 10 or %o2, 0x210, %o2 <== NOT EXECUTED 40007fe0: 96 12 e1 d8 or %o3, 0x1d8, %o3 <== NOT EXECUTED 40007fe4: 7f ff f3 b2 call 40004eac <__assert_func> <== NOT EXECUTED 40007fe8: 92 10 20 68 mov 0x68, %o1 <== NOT EXECUTED /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 40007fec: 80 a0 60 01 cmp %g1, 1 40007ff0: 02 80 00 08 be 40008010 40007ff4: 80 a0 60 02 cmp %g1, 2 40007ff8: 02 80 00 08 be 40008018 40007ffc: 80 a0 60 00 cmp %g1, 0 40008000: 02 80 00 07 be 4000801c 40008004: 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; 40008008: 81 c7 e0 08 ret 4000800c: 91 e8 20 16 restore %g0, 0x16, %o0 /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 40008010: 10 80 00 03 b 4000801c 40008014: a2 10 20 02 mov 2, %l1 40008018: a2 10 20 03 mov 3, %l1 break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 4000801c: c2 04 20 08 ld [ %l0 + 8 ], %g1 40008020: 82 00 7f ff add %g1, -1, %g1 40008024: 80 a0 60 fd cmp %g1, 0xfd 40008028: 38 80 00 0e bgu,a 40008060 4000802c: b0 10 20 16 mov 0x16, %i0 40008030: 03 10 00 65 sethi %hi(0x40019400), %g1 40008034: c4 00 62 20 ld [ %g1 + 0x220 ], %g2 ! 40019620 <_Thread_Dispatch_disable_level> 40008038: 84 00 a0 01 inc %g2 4000803c: c4 20 62 20 st %g2, [ %g1 + 0x220 ] * _POSIX_Mutex_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ) { return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information ); 40008040: 11 10 00 66 sethi %hi(0x40019800), %o0 40008044: 40 00 09 fc call 4000a834 <_Objects_Allocate> 40008048: 90 12 21 f0 or %o0, 0x1f0, %o0 ! 400199f0 <_POSIX_Mutex_Information> _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 4000804c: b2 92 20 00 orcc %o0, 0, %i1 40008050: 32 80 00 06 bne,a 40008068 40008054: c2 04 20 04 ld [ %l0 + 4 ], %g1 _Thread_Enable_dispatch(); 40008058: 40 00 0d 77 call 4000b634 <_Thread_Enable_dispatch> 4000805c: b0 10 20 0b mov 0xb, %i0 40008060: 81 c7 e0 08 ret 40008064: 81 e8 00 00 restore return EAGAIN; } the_mutex->process_shared = the_attr->process_shared; 40008068: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) 4000806c: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40008070: 80 a0 60 00 cmp %g1, 0 40008074: 02 80 00 04 be 40008084 40008078: 82 10 20 01 mov 1, %g1 the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 4000807c: 10 80 00 03 b 40008088 <== NOT EXECUTED 40008080: c0 26 60 54 clr [ %i1 + 0x54 ] <== NOT EXECUTED else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; 40008084: c2 26 60 54 st %g1, [ %i1 + 0x54 ] the_mutex_attr->only_owner_release = TRUE; the_mutex_attr->priority_ceiling = 40008088: 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; 4000808c: 82 10 20 01 mov 1, %g1 40008090: c2 2e 60 58 stb %g1, [ %i1 + 0x58 ] the_mutex_attr->priority_ceiling = 40008094: 82 10 20 ff mov 0xff, %g1 40008098: 82 20 40 02 sub %g1, %g2, %g1 /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 4000809c: 92 06 60 54 add %i1, 0x54, %o1 400080a0: 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 = 400080a4: c2 26 60 60 st %g1, [ %i1 + 0x60 ] _POSIX_Priority_To_core( the_attr->prio_ceiling ); the_mutex_attr->discipline = the_discipline; 400080a8: e2 26 60 5c st %l1, [ %i1 + 0x5c ] /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 400080ac: 40 00 07 c3 call 40009fb8 <_CORE_mutex_Initialize> 400080b0: 90 06 60 14 add %i1, 0x14, %o0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 400080b4: c6 06 60 08 ld [ %i1 + 8 ], %g3 400080b8: 03 10 00 66 sethi %hi(0x40019800), %g1 400080bc: c4 00 62 0c ld [ %g1 + 0x20c ], %g2 ! 40019a0c <_POSIX_Mutex_Information+0x1c> 400080c0: 03 00 00 3f sethi %hi(0xfc00), %g1 400080c4: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400080c8: 82 08 c0 01 and %g3, %g1, %g1 400080cc: 83 28 60 02 sll %g1, 2, %g1 400080d0: 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; 400080d4: 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; 400080d8: c6 26 00 00 st %g3, [ %i0 ] _Thread_Enable_dispatch(); 400080dc: 40 00 0d 56 call 4000b634 <_Thread_Enable_dispatch> 400080e0: b0 10 20 00 clr %i0 400080e4: 81 c7 e0 08 ret 400080e8: 81 e8 00 00 restore 4000815c : int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 4000815c: 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 ) 40008160: 80 a6 a0 00 cmp %i2, 0 40008164: 02 80 00 1f be 400081e0 40008168: a0 10 00 18 mov %i0, %l0 return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 4000816c: 82 06 7f ff add %i1, -1, %g1 40008170: 80 a0 60 fd cmp %g1, 0xfd 40008174: 38 80 00 19 bgu,a 400081d8 40008178: b0 10 20 16 mov 0x16, %i0 /* * Must acquire the mutex before we can change it's ceiling */ status = pthread_mutex_lock( mutex ); 4000817c: 7f ff ff dc call 400080ec 40008180: 90 10 00 18 mov %i0, %o0 if ( status ) 40008184: b0 92 20 00 orcc %o0, 0, %i0 40008188: 12 80 00 14 bne 400081d8 4000818c: 90 10 00 10 mov %l0, %o0 return status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 40008190: 7f ff ff 55 call 40007ee4 <_POSIX_Mutex_Get> 40008194: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 40008198: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000819c: 80 a0 60 00 cmp %g1, 0 400081a0: 32 80 00 0e bne,a 400081d8 400081a4: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 400081a8: 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( 400081ac: 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( 400081b0: 84 10 20 ff mov 0xff, %g2 the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 400081b4: 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( 400081b8: 84 20 80 01 sub %g2, %g1, %g2 the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 400081bc: 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( 400081c0: c4 26 80 00 st %g2, [ %i2 ] the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; _CORE_mutex_Surrender( 400081c4: 94 10 20 00 clr %o2 400081c8: 40 00 07 f2 call 4000a190 <_CORE_mutex_Surrender> 400081cc: 90 02 20 14 add %o0, 0x14, %o0 &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 400081d0: 40 00 0d 19 call 4000b634 <_Thread_Enable_dispatch> 400081d4: 01 00 00 00 nop 400081d8: 81 c7 e0 08 ret 400081dc: 81 e8 00 00 restore return 0; 400081e0: b0 10 20 16 mov 0x16, %i0 case OBJECTS_ERROR: break; } return EINVAL; } 400081e4: 81 c7 e0 08 ret 400081e8: 81 e8 00 00 restore 40006c0c : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 40006c0c: 9d e3 bf 88 save %sp, -120, %sp const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 40006c10: 80 a6 20 00 cmp %i0, 0 40006c14: 02 80 00 2d be 40006cc8 40006c18: a0 10 00 19 mov %i1, %l0 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 40006c1c: 80 a6 60 00 cmp %i1, 0 40006c20: 32 80 00 06 bne,a 40006c38 40006c24: c2 04 00 00 ld [ %l0 ], %g1 the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 40006c28: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED 40006c2c: 40 00 02 b0 call 400076ec <== NOT EXECUTED 40006c30: 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 ) 40006c34: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED 40006c38: 80 a0 60 00 cmp %g1, 0 40006c3c: 02 80 00 23 be 40006cc8 40006c40: 01 00 00 00 nop return EINVAL; switch ( the_attr->process_shared ) { 40006c44: c2 04 20 04 ld [ %l0 + 4 ], %g1 40006c48: 80 a0 60 00 cmp %g1, 0 40006c4c: 12 80 00 1f bne 40006cc8 40006c50: 05 10 00 71 sethi %hi(0x4001c400), %g2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006c54: c2 00 a3 f0 ld [ %g2 + 0x3f0 ], %g1 ! 4001c7f0 <_Thread_Dispatch_disable_level> 40006c58: 82 00 60 01 inc %g1 40006c5c: c2 20 a3 f0 st %g1, [ %g2 + 0x3f0 ] * 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 *) 40006c60: 33 10 00 72 sethi %hi(0x4001c800), %i1 40006c64: 40 00 0a 95 call 400096b8 <_Objects_Allocate> 40006c68: 90 16 62 40 or %i1, 0x240, %o0 ! 4001ca40 <_POSIX_RWLock_Information> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 40006c6c: a0 92 20 00 orcc %o0, 0, %l0 40006c70: 12 80 00 06 bne 40006c88 40006c74: 90 04 20 10 add %l0, 0x10, %o0 _Thread_Enable_dispatch(); 40006c78: 40 00 0e 10 call 4000a4b8 <_Thread_Enable_dispatch> 40006c7c: b0 10 20 0b mov 0xb, %i0 40006c80: 81 c7 e0 08 ret 40006c84: 81 e8 00 00 restore return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 40006c88: 40 00 08 97 call 40008ee4 <_CORE_RWLock_Initialize> 40006c8c: 92 07 bf f4 add %fp, -12, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40006c90: c4 04 20 08 ld [ %l0 + 8 ], %g2 40006c94: 82 16 62 40 or %i1, 0x240, %g1 40006c98: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 40006c9c: 03 00 00 3f sethi %hi(0xfc00), %g1 40006ca0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40006ca4: 82 08 80 01 and %g2, %g1, %g1 40006ca8: 83 28 60 02 sll %g1, 2, %g1 40006cac: 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; 40006cb0: c0 24 20 0c clr [ %l0 + 0xc ] &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 40006cb4: c4 26 00 00 st %g2, [ %i0 ] _Thread_Enable_dispatch(); 40006cb8: 40 00 0e 00 call 4000a4b8 <_Thread_Enable_dispatch> 40006cbc: b0 10 20 00 clr %i0 40006cc0: 81 c7 e0 08 ret 40006cc4: 81 e8 00 00 restore return 0; } 40006cc8: 81 c7 e0 08 ret 40006ccc: 91 e8 20 16 restore %g0, 0x16, %o0 40006d48 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 40006d48: 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 ) 40006d4c: 80 a6 20 00 cmp %i0, 0 40006d50: 02 80 00 31 be 40006e14 40006d54: 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 ); 40006d58: 92 07 bf f0 add %fp, -16, %o1 40006d5c: 40 00 1c 19 call 4000ddc0 <_POSIX_Absolute_timeout_to_ticks> 40006d60: a0 10 20 00 clr %l0 switch (status) { 40006d64: 80 a2 20 02 cmp %o0, 2 40006d68: 08 80 00 05 bleu 40006d7c 40006d6c: b2 10 00 08 mov %o0, %i1 40006d70: 80 a2 20 03 cmp %o0, 3 40006d74: 22 80 00 02 be,a 40006d7c 40006d78: a0 10 20 01 mov 1, %l0 40006d7c: d2 06 00 00 ld [ %i0 ], %o1 40006d80: 11 10 00 72 sethi %hi(0x4001c800), %o0 40006d84: 94 07 bf f4 add %fp, -12, %o2 40006d88: 40 00 0b a6 call 40009c20 <_Objects_Get> 40006d8c: 90 12 22 40 or %o0, 0x240, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 40006d90: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006d94: 80 a0 60 00 cmp %g1, 0 40006d98: 32 80 00 20 bne,a 40006e18 40006d9c: 90 10 20 16 mov 0x16, %o0 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 40006da0: d2 06 00 00 ld [ %i0 ], %o1 40006da4: d6 07 bf f0 ld [ %fp + -16 ], %o3 40006da8: a0 0c 20 ff and %l0, 0xff, %l0 40006dac: 90 02 20 10 add %o0, 0x10, %o0 40006db0: 94 10 00 10 mov %l0, %o2 40006db4: 40 00 08 57 call 40008f10 <_CORE_RWLock_Obtain_for_reading> 40006db8: 98 10 20 00 clr %o4 do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 40006dbc: 40 00 0d bf call 4000a4b8 <_Thread_Enable_dispatch> 40006dc0: 01 00 00 00 nop if ( !do_wait && 40006dc4: 80 a4 20 00 cmp %l0, 0 40006dc8: 12 80 00 0d bne 40006dfc 40006dcc: 03 10 00 72 sethi %hi(0x4001c800), %g1 40006dd0: c2 00 60 b0 ld [ %g1 + 0xb0 ], %g1 ! 4001c8b0 <_Thread_Executing> <== NOT EXECUTED 40006dd4: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 <== NOT EXECUTED 40006dd8: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40006ddc: 32 80 00 09 bne,a 40006e00 <== NOT EXECUTED 40006de0: 03 10 00 72 sethi %hi(0x4001c800), %g1 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 40006de4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40006de8: 02 80 00 0c be 40006e18 <== NOT EXECUTED 40006dec: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 40006df0: 80 a6 60 02 cmp %i1, 2 <== NOT EXECUTED 40006df4: 08 80 00 09 bleu 40006e18 <== NOT EXECUTED 40006df8: 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( 40006dfc: 03 10 00 72 sethi %hi(0x4001c800), %g1 40006e00: c2 00 60 b0 ld [ %g1 + 0xb0 ], %g1 ! 4001c8b0 <_Thread_Executing> 40006e04: 40 00 00 3f call 40006f00 <_POSIX_RWLock_Translate_core_RWLock_return_code> 40006e08: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 case OBJECTS_ERROR: break; } return EINVAL; } 40006e0c: 81 c7 e0 08 ret 40006e10: 91 e8 00 08 restore %g0, %o0, %o0 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 40006e14: 90 10 20 16 mov 0x16, %o0 case OBJECTS_ERROR: break; } return EINVAL; } 40006e18: b0 10 00 08 mov %o0, %i0 40006e1c: 81 c7 e0 08 ret 40006e20: 81 e8 00 00 restore 40006e24 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 40006e24: 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 ) 40006e28: 80 a6 20 00 cmp %i0, 0 40006e2c: 02 80 00 31 be 40006ef0 40006e30: 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 ); 40006e34: 92 07 bf f0 add %fp, -16, %o1 40006e38: 40 00 1b e2 call 4000ddc0 <_POSIX_Absolute_timeout_to_ticks> 40006e3c: a0 10 20 00 clr %l0 switch (status) { 40006e40: 80 a2 20 02 cmp %o0, 2 40006e44: 08 80 00 05 bleu 40006e58 40006e48: b2 10 00 08 mov %o0, %i1 40006e4c: 80 a2 20 03 cmp %o0, 3 40006e50: 22 80 00 02 be,a 40006e58 40006e54: a0 10 20 01 mov 1, %l0 40006e58: d2 06 00 00 ld [ %i0 ], %o1 40006e5c: 11 10 00 72 sethi %hi(0x4001c800), %o0 40006e60: 94 07 bf f4 add %fp, -12, %o2 40006e64: 40 00 0b 6f call 40009c20 <_Objects_Get> 40006e68: 90 12 22 40 or %o0, 0x240, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 40006e6c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006e70: 80 a0 60 00 cmp %g1, 0 40006e74: 32 80 00 20 bne,a 40006ef4 40006e78: 90 10 20 16 mov 0x16, %o0 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 40006e7c: d2 06 00 00 ld [ %i0 ], %o1 40006e80: d6 07 bf f0 ld [ %fp + -16 ], %o3 40006e84: a0 0c 20 ff and %l0, 0xff, %l0 40006e88: 90 02 20 10 add %o0, 0x10, %o0 40006e8c: 94 10 00 10 mov %l0, %o2 40006e90: 40 00 08 54 call 40008fe0 <_CORE_RWLock_Obtain_for_writing> 40006e94: 98 10 20 00 clr %o4 do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 40006e98: 40 00 0d 88 call 4000a4b8 <_Thread_Enable_dispatch> 40006e9c: 01 00 00 00 nop if ( !do_wait && 40006ea0: 80 a4 20 00 cmp %l0, 0 40006ea4: 12 80 00 0d bne 40006ed8 40006ea8: 03 10 00 72 sethi %hi(0x4001c800), %g1 40006eac: c2 00 60 b0 ld [ %g1 + 0xb0 ], %g1 ! 4001c8b0 <_Thread_Executing> <== NOT EXECUTED 40006eb0: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 <== NOT EXECUTED 40006eb4: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40006eb8: 32 80 00 09 bne,a 40006edc <== NOT EXECUTED 40006ebc: 03 10 00 72 sethi %hi(0x4001c800), %g1 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 40006ec0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40006ec4: 02 80 00 0c be 40006ef4 <== NOT EXECUTED 40006ec8: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 40006ecc: 80 a6 60 02 cmp %i1, 2 <== NOT EXECUTED 40006ed0: 08 80 00 09 bleu 40006ef4 <== NOT EXECUTED 40006ed4: 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( 40006ed8: 03 10 00 72 sethi %hi(0x4001c800), %g1 40006edc: c2 00 60 b0 ld [ %g1 + 0xb0 ], %g1 ! 4001c8b0 <_Thread_Executing> 40006ee0: 40 00 00 08 call 40006f00 <_POSIX_RWLock_Translate_core_RWLock_return_code> 40006ee4: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 case OBJECTS_ERROR: break; } return EINVAL; } 40006ee8: 81 c7 e0 08 ret 40006eec: 91 e8 00 08 restore %g0, %o0, %o0 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 40006ef0: 90 10 20 16 mov 0x16, %o0 case OBJECTS_ERROR: break; } return EINVAL; } 40006ef4: b0 10 00 08 mov %o0, %i0 40006ef8: 81 c7 e0 08 ret 40006efc: 81 e8 00 00 restore 400062bc : int pthread_setcancelstate( int state, int *oldstate ) { 400062bc: 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() ) 400062c0: 03 10 00 59 sethi %hi(0x40016400), %g1 400062c4: c2 00 62 ac ld [ %g1 + 0x2ac ], %g1 ! 400166ac <_ISR_Nest_level> int pthread_setcancelstate( int state, int *oldstate ) { 400062c8: 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() ) 400062cc: 80 a0 60 00 cmp %g1, 0 400062d0: 12 80 00 26 bne 40006368 400062d4: b0 10 20 47 mov 0x47, %i0 return EPROTO; if ( !oldstate ) 400062d8: 80 a6 60 00 cmp %i1, 0 400062dc: 02 80 00 25 be 40006370 400062e0: 80 a1 20 01 cmp %g4, 1 return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 400062e4: 38 80 00 21 bgu,a 40006368 400062e8: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 400062ec: 03 10 00 59 sethi %hi(0x40016400), %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400062f0: 07 10 00 59 sethi %hi(0x40016400), %g3 400062f4: c4 00 62 d0 ld [ %g1 + 0x2d0 ], %g2 400062f8: c2 00 e2 10 ld [ %g3 + 0x210 ], %g1 400062fc: c4 00 a1 60 ld [ %g2 + 0x160 ], %g2 40006300: 82 00 60 01 inc %g1 40006304: c2 20 e2 10 st %g1, [ %g3 + 0x210 ] _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 40006308: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1 thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 4000630c: 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; 40006310: c2 26 40 00 st %g1, [ %i1 ] thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 40006314: 12 80 00 0b bne 40006340 40006318: c8 20 a0 cc st %g4, [ %g2 + 0xcc ] 4000631c: c2 00 a0 d0 ld [ %g2 + 0xd0 ], %g1 40006320: 80 a0 60 01 cmp %g1, 1 40006324: 32 80 00 08 bne,a 40006344 40006328: b2 10 20 00 clr %i1 4000632c: c2 00 a0 d4 ld [ %g2 + 0xd4 ], %g1 <== NOT EXECUTED 40006330: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 40006334: 82 40 20 00 addx %g0, 0, %g1 <== NOT EXECUTED 40006338: 10 80 00 03 b 40006344 <== NOT EXECUTED 4000633c: b2 10 00 01 mov %g1, %i1 <== NOT EXECUTED 40006340: b2 10 20 00 clr %i1 <== NOT EXECUTED thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 40006344: 40 00 0a ef call 40008f00 <_Thread_Enable_dispatch> 40006348: b0 10 20 00 clr %i0 if ( cancel ) 4000634c: 80 8e 60 ff btst 0xff, %i1 40006350: 02 80 00 06 be 40006368 40006354: 03 10 00 59 sethi %hi(0x40016400), %g1 _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 40006358: d0 00 62 d0 ld [ %g1 + 0x2d0 ], %o0 ! 400166d0 <_Thread_Executing> <== NOT EXECUTED 4000635c: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED 40006360: 7f ff fe d4 call 40005eb0 <_POSIX_Thread_Exit> <== NOT EXECUTED 40006364: b0 10 20 00 clr %i0 <== NOT EXECUTED 40006368: 81 c7 e0 08 ret 4000636c: 81 e8 00 00 restore 40006370: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED return 0; } 40006374: 81 c7 e0 08 ret <== NOT EXECUTED 40006378: 81 e8 00 00 restore <== NOT EXECUTED 4000637c : int pthread_setcanceltype( int type, int *oldtype ) { 4000637c: 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() ) 40006380: 03 10 00 59 sethi %hi(0x40016400), %g1 40006384: c2 00 62 ac ld [ %g1 + 0x2ac ], %g1 ! 400166ac <_ISR_Nest_level> int pthread_setcanceltype( int type, int *oldtype ) { 40006388: 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() ) 4000638c: 80 a0 60 00 cmp %g1, 0 40006390: 12 80 00 26 bne 40006428 40006394: b0 10 20 47 mov 0x47, %i0 return EPROTO; if ( !oldtype ) 40006398: 80 a6 60 00 cmp %i1, 0 4000639c: 02 80 00 25 be 40006430 400063a0: 80 a1 20 01 cmp %g4, 1 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 400063a4: 38 80 00 21 bgu,a 40006428 400063a8: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 400063ac: 03 10 00 59 sethi %hi(0x40016400), %g1 400063b0: 07 10 00 59 sethi %hi(0x40016400), %g3 400063b4: c4 00 62 d0 ld [ %g1 + 0x2d0 ], %g2 400063b8: c2 00 e2 10 ld [ %g3 + 0x210 ], %g1 400063bc: c4 00 a1 60 ld [ %g2 + 0x160 ], %g2 400063c0: 82 00 60 01 inc %g1 400063c4: c2 20 e2 10 st %g1, [ %g3 + 0x210 ] _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 400063c8: c2 00 a0 d0 ld [ %g2 + 0xd0 ], %g1 400063cc: c2 26 40 00 st %g1, [ %i1 ] thread_support->cancelability_type = type; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 400063d0: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1 400063d4: 80 a0 60 00 cmp %g1, 0 400063d8: 12 80 00 0a bne 40006400 400063dc: c8 20 a0 d0 st %g4, [ %g2 + 0xd0 ] 400063e0: 80 a1 20 01 cmp %g4, 1 400063e4: 32 80 00 08 bne,a 40006404 400063e8: b2 10 20 00 clr %i1 400063ec: c2 00 a0 d4 ld [ %g2 + 0xd4 ], %g1 400063f0: 80 a0 00 01 cmp %g0, %g1 400063f4: 82 40 20 00 addx %g0, 0, %g1 400063f8: 10 80 00 03 b 40006404 400063fc: b2 10 00 01 mov %g1, %i1 40006400: b2 10 20 00 clr %i1 <== NOT EXECUTED thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 40006404: 40 00 0a bf call 40008f00 <_Thread_Enable_dispatch> 40006408: b0 10 20 00 clr %i0 if ( cancel ) 4000640c: 80 8e 60 ff btst 0xff, %i1 40006410: 02 80 00 06 be 40006428 40006414: 03 10 00 59 sethi %hi(0x40016400), %g1 _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 40006418: d0 00 62 d0 ld [ %g1 + 0x2d0 ], %o0 ! 400166d0 <_Thread_Executing> <== NOT EXECUTED 4000641c: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED 40006420: 7f ff fe a4 call 40005eb0 <_POSIX_Thread_Exit> <== NOT EXECUTED 40006424: b0 10 20 00 clr %i0 <== NOT EXECUTED 40006428: 81 c7 e0 08 ret 4000642c: 81 e8 00 00 restore 40006430: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED return 0; } 40006434: 81 c7 e0 08 ret <== NOT EXECUTED 40006438: 81 e8 00 00 restore <== NOT EXECUTED 40008a78 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 40008a78: 9d e3 bf 90 save %sp, -112, %sp /* * Check all the parameters */ if ( !param ) 40008a7c: 80 a6 a0 00 cmp %i2, 0 40008a80: 22 80 00 5d be,a 40008bf4 40008a84: b0 10 20 16 mov 0x16, %i0 return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 40008a88: c2 06 80 00 ld [ %i2 ], %g1 40008a8c: 82 00 7f ff add %g1, -1, %g1 40008a90: 80 a0 60 fd cmp %g1, 0xfd 40008a94: 18 80 00 5a bgu 40008bfc 40008a98: 80 a6 60 01 cmp %i1, 1 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 40008a9c: 02 80 00 10 be 40008adc 40008aa0: a6 10 20 00 clr %l3 40008aa4: 14 80 00 08 bg 40008ac4 40008aa8: 80 a6 60 02 cmp %i1, 2 40008aac: 80 a6 60 00 cmp %i1, 0 40008ab0: a6 10 20 01 mov 1, %l3 40008ab4: 02 80 00 1b be 40008b20 40008ab8: a4 10 20 00 clr %l2 _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); return 0; 40008abc: 81 c7 e0 08 ret 40008ac0: 91 e8 20 16 restore %g0, 0x16, %o0 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 40008ac4: 02 80 00 05 be 40008ad8 40008ac8: 80 a6 60 03 cmp %i1, 3 40008acc: 32 80 00 4a bne,a 40008bf4 40008ad0: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED 40008ad4: 30 80 00 04 b,a 40008ae4 40008ad8: a6 10 20 02 mov 2, %l3 40008adc: 10 80 00 11 b 40008b20 40008ae0: 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 ) < 40008ae4: 40 00 0e a6 call 4000c57c <_Timespec_To_ticks> 40008ae8: 90 06 a0 08 add %i2, 8, %o0 40008aec: a0 10 00 08 mov %o0, %l0 40008af0: 40 00 0e a3 call 4000c57c <_Timespec_To_ticks> 40008af4: 90 06 a0 10 add %i2, 0x10, %o0 40008af8: 80 a4 00 08 cmp %l0, %o0 40008afc: 2a 80 00 3e bcs,a 40008bf4 40008b00: 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 ) ) 40008b04: c2 06 a0 04 ld [ %i2 + 4 ], %g1 40008b08: 82 00 7f ff add %g1, -1, %g1 40008b0c: 80 a0 60 fd cmp %g1, 0xfd 40008b10: 18 80 00 3b bgu 40008bfc 40008b14: 03 10 00 22 sethi %hi(0x40008800), %g1 40008b18: a6 10 20 03 mov 3, %l3 40008b1c: a4 10 61 94 or %g1, 0x194, %l2 40008b20: 92 10 00 18 mov %i0, %o1 40008b24: 11 10 00 66 sethi %hi(0x40019800), %o0 40008b28: 94 07 bf f4 add %fp, -12, %o2 40008b2c: 40 00 08 9c call 4000ad9c <_Objects_Get> 40008b30: 90 12 20 b0 or %o0, 0xb0, %o0 /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 40008b34: c2 07 bf f4 ld [ %fp + -12 ], %g1 40008b38: a2 10 00 08 mov %o0, %l1 40008b3c: 80 a0 60 00 cmp %g1, 0 40008b40: 12 80 00 2d bne 40008bf4 40008b44: b0 10 20 03 mov 3, %i0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 40008b48: e0 02 21 60 ld [ %o0 + 0x160 ], %l0 if ( api->schedpolicy == SCHED_SPORADIC ) 40008b4c: c2 04 20 7c ld [ %l0 + 0x7c ], %g1 40008b50: 80 a0 60 03 cmp %g1, 3 40008b54: 32 80 00 05 bne,a 40008b68 40008b58: f2 24 20 7c st %i1, [ %l0 + 0x7c ] (void) _Watchdog_Remove( &api->Sporadic_timer ); 40008b5c: 40 00 0f de call 4000cad4 <_Watchdog_Remove> 40008b60: 90 04 20 9c add %l0, 0x9c, %o0 api->schedpolicy = policy; 40008b64: f2 24 20 7c st %i1, [ %l0 + 0x7c ] api->schedparam = *param; 40008b68: 92 10 00 1a mov %i2, %o1 40008b6c: 90 04 20 80 add %l0, 0x80, %o0 40008b70: 40 00 22 6f call 4001152c 40008b74: 94 10 20 18 mov 0x18, %o2 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 40008b78: 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; 40008b7c: e6 24 60 7c st %l3, [ %l1 + 0x7c ] the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 40008b80: 80 a0 60 00 cmp %g1, 0 40008b84: 06 80 00 1a bl 40008bec 40008b88: e4 24 60 80 st %l2, [ %l1 + 0x80 ] 40008b8c: 80 a0 60 02 cmp %g1, 2 40008b90: 24 80 00 07 ble,a 40008bac 40008b94: c4 04 20 80 ld [ %l0 + 0x80 ], %g2 40008b98: 80 a0 60 03 cmp %g1, 3 40008b9c: 12 80 00 14 bne 40008bec 40008ba0: 01 00 00 00 nop TRUE ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 40008ba4: 10 80 00 0c b 40008bd4 40008ba8: 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; 40008bac: 03 10 00 65 sethi %hi(0x40019400), %g1 40008bb0: c2 00 61 78 ld [ %g1 + 0x178 ], %g1 ! 40019578 <_Thread_Ticks_per_timeslice> the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 40008bb4: 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; 40008bb8: c2 24 60 78 st %g1, [ %l1 + 0x78 ] 40008bbc: 92 10 20 ff mov 0xff, %o1 the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 40008bc0: 94 10 20 01 mov 1, %o2 40008bc4: 92 22 40 02 sub %o1, %g2, %o1 40008bc8: 40 00 09 28 call 4000b068 <_Thread_Change_priority> 40008bcc: d2 24 60 18 st %o1, [ %l1 + 0x18 ] 40008bd0: 30 80 00 07 b,a 40008bec ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; _Watchdog_Remove( &api->Sporadic_timer ); 40008bd4: 90 04 20 9c add %l0, 0x9c, %o0 40008bd8: 40 00 0f bf call 4000cad4 <_Watchdog_Remove> 40008bdc: c2 24 20 98 st %g1, [ %l0 + 0x98 ] _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 40008be0: 92 10 00 11 mov %l1, %o1 40008be4: 7f ff ff 80 call 400089e4 <_POSIX_Threads_Sporadic_budget_TSR> 40008be8: 90 10 20 00 clr %o0 break; } _Thread_Enable_dispatch(); 40008bec: 40 00 0a 92 call 4000b634 <_Thread_Enable_dispatch> 40008bf0: b0 10 20 00 clr %i0 40008bf4: 81 c7 e0 08 ret 40008bf8: 81 e8 00 00 restore return 0; 40008bfc: b0 10 20 16 mov 0x16, %i0 case OBJECTS_ERROR: break; } return ESRCH; } 40008c00: 81 c7 e0 08 ret 40008c04: 81 e8 00 00 restore 40017160 : ssize_t read( int fd, void *buffer, size_t count ) { 40017160: 9d e3 bf 98 save %sp, -104, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40017164: 03 10 00 63 sethi %hi(0x40018c00), %g1 40017168: c2 00 62 18 ld [ %g1 + 0x218 ], %g1 ! 40018e18 ssize_t read( int fd, void *buffer, size_t count ) { 4001716c: 92 10 00 19 mov %i1, %o1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40017170: 80 a6 00 01 cmp %i0, %g1 40017174: 1a 80 00 0e bcc 400171ac 40017178: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 4001717c: 03 10 00 66 sethi %hi(0x40019800), %g1 40017180: c6 00 63 8c ld [ %g1 + 0x38c ], %g3 ! 40019b8c 40017184: 85 2e 20 02 sll %i0, 2, %g2 40017188: 83 2e 20 04 sll %i0, 4, %g1 4001718c: 82 20 40 02 sub %g1, %g2, %g1 40017190: 82 00 40 18 add %g1, %i0, %g1 40017194: 83 28 60 02 sll %g1, 2, %g1 40017198: b0 00 c0 01 add %g3, %g1, %i0 rtems_libio_check_is_open( iop ); 4001719c: c2 06 20 0c ld [ %i0 + 0xc ], %g1 400171a0: 80 88 61 00 btst 0x100, %g1 400171a4: 12 80 00 06 bne 400171bc 400171a8: 80 a6 60 00 cmp %i1, 0 400171ac: 7f ff da c7 call 4000dcc8 <__errno> <== NOT EXECUTED 400171b0: 01 00 00 00 nop <== NOT EXECUTED 400171b4: 10 80 00 15 b 40017208 <== NOT EXECUTED 400171b8: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 400171bc: 02 80 00 08 be 400171dc 400171c0: 01 00 00 00 nop rtems_libio_check_count( count ); 400171c4: 80 a6 a0 00 cmp %i2, 0 400171c8: 02 80 00 1b be 40017234 400171cc: 90 10 20 00 clr %o0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 400171d0: 80 88 60 02 btst 2, %g1 400171d4: 32 80 00 06 bne,a 400171ec 400171d8: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 400171dc: 7f ff da bb call 4000dcc8 <__errno> <== NOT EXECUTED 400171e0: 01 00 00 00 nop <== NOT EXECUTED 400171e4: 10 80 00 09 b 40017208 <== NOT EXECUTED 400171e8: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) 400171ec: c2 00 60 08 ld [ %g1 + 8 ], %g1 400171f0: 80 a0 60 00 cmp %g1, 0 400171f4: 12 80 00 08 bne 40017214 400171f8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 400171fc: 7f ff da b3 call 4000dcc8 <__errno> <== NOT EXECUTED 40017200: 01 00 00 00 nop <== NOT EXECUTED 40017204: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40017208: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001720c: 10 80 00 0a b 40017234 <== NOT EXECUTED 40017210: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rc = (*iop->handlers->read_h)( iop, buffer, count ); 40017214: 9f c0 40 00 call %g1 40017218: 90 10 00 18 mov %i0, %o0 if ( rc > 0 ) 4001721c: 80 a2 20 00 cmp %o0, 0 40017220: 04 80 00 05 ble 40017234 40017224: 01 00 00 00 nop iop->offset += rc; 40017228: c2 06 20 08 ld [ %i0 + 8 ], %g1 4001722c: 82 00 40 08 add %g1, %o0, %g1 40017230: c2 26 20 08 st %g1, [ %i0 + 8 ] return rc; } 40017234: 81 c7 e0 08 ret 40017238: 91 e8 00 08 restore %g0, %o0, %o0 40021988 : /* * get next entry in a directory. */ struct dirent * readdir( DIR *dirp ) { 40021988: 9d e3 bf 98 save %sp, -104, %sp register struct dirent *dp; if ( !dirp ) 4002198c: 80 a6 20 00 cmp %i0, 0 40021990: 02 80 00 2a be 40021a38 40021994: 88 10 20 00 clr %g4 return NULL; for (;;) { if (dirp->dd_loc == 0) { 40021998: c2 06 20 04 ld [ %i0 + 4 ], %g1 4002199c: 80 a0 60 00 cmp %g1, 0 400219a0: 32 80 00 0a bne,a 400219c8 400219a4: c6 06 20 04 ld [ %i0 + 4 ], %g3 dirp->dd_size = getdents (dirp->dd_fd, 400219a8: d0 06 00 00 ld [ %i0 ], %o0 400219ac: d2 06 20 0c ld [ %i0 + 0xc ], %o1 400219b0: 40 00 2f 7d call 4002d7a4 400219b4: d4 06 20 10 ld [ %i0 + 0x10 ], %o2 dirp->dd_buf, dirp->dd_len); if (dirp->dd_size <= 0) 400219b8: 80 a2 20 00 cmp %o0, 0 400219bc: 04 80 00 1e ble 40021a34 400219c0: d0 26 20 08 st %o0, [ %i0 + 8 ] return NULL; } if (dirp->dd_loc >= dirp->dd_size) { 400219c4: c6 06 20 04 ld [ %i0 + 4 ], %g3 400219c8: c2 06 20 08 ld [ %i0 + 8 ], %g1 400219cc: 80 a0 c0 01 cmp %g3, %g1 400219d0: 26 80 00 04 bl,a 400219e0 400219d4: d8 06 20 0c ld [ %i0 + 0xc ], %o4 dirp->dd_loc = 0; 400219d8: 10 bf ff f0 b 40021998 400219dc: c0 26 20 04 clr [ %i0 + 4 ] continue; } dp = (struct dirent *)(dirp->dd_buf + dirp->dd_loc); 400219e0: 88 03 00 03 add %o4, %g3, %g4 if ((intptr_t)dp & 03) /* bogus pointer check */ 400219e4: 80 89 20 03 btst 3, %g4 400219e8: 32 80 00 14 bne,a 40021a38 400219ec: 88 10 20 00 clr %g4 <== NOT EXECUTED return NULL; if (dp->d_reclen <= 0 || 400219f0: c4 11 20 08 lduh [ %g4 + 8 ], %g2 400219f4: 80 a0 a0 00 cmp %g2, 0 400219f8: 02 80 00 0f be 40021a34 400219fc: 9a 00 80 03 add %g2, %g3, %o5 40021a00: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40021a04: 82 00 60 01 inc %g1 40021a08: 82 20 40 03 sub %g1, %g3, %g1 40021a0c: 80 a0 80 01 cmp %g2, %g1 40021a10: 34 80 00 0a bg,a 40021a38 40021a14: 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; 40021a18: da 26 20 04 st %o5, [ %i0 + 4 ] if (dp->d_ino == 0) 40021a1c: c2 03 00 03 ld [ %o4 + %g3 ], %g1 40021a20: 80 a0 60 00 cmp %g1, 0 40021a24: 22 bf ff de be,a 4002199c 40021a28: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED continue; return (dp); } } 40021a2c: 81 c7 e0 08 ret 40021a30: 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) 40021a34: 88 10 20 00 clr %g4 continue; return (dp); } } 40021a38: b0 10 00 04 mov %g4, %i0 40021a3c: 81 c7 e0 08 ret 40021a40: 81 e8 00 00 restore 40021a44 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 40021a44: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t loc; int result; if (!buf) 40021a48: 80 a6 60 00 cmp %i1, 0 40021a4c: 12 80 00 06 bne 40021a64 40021a50: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( EFAULT ); 40021a54: 40 00 38 a5 call 4002fce8 <__errno> <== NOT EXECUTED 40021a58: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40021a5c: 10 80 00 30 b 40021b1c <== NOT EXECUTED 40021a60: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false ); 40021a64: a0 07 bf e8 add %fp, -24, %l0 40021a68: 92 10 20 00 clr %o1 40021a6c: 94 10 00 10 mov %l0, %o2 40021a70: 96 10 20 00 clr %o3 40021a74: 7f ff 92 2c call 40006324 40021a78: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 40021a7c: 80 a2 20 00 cmp %o0, 0 40021a80: 12 80 00 28 bne 40021b20 40021a84: c4 07 bf f0 ld [ %fp + -16 ], %g2 return -1; if ( !loc.ops->node_type_h ){ 40021a88: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40021a8c: 80 a0 60 00 cmp %g1, 0 40021a90: 12 80 00 04 bne 40021aa0 40021a94: 01 00 00 00 nop rtems_filesystem_freenode( &loc ); 40021a98: 10 80 00 19 b 40021afc <== NOT EXECUTED 40021a9c: 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 ){ 40021aa0: 9f c0 40 00 call %g1 40021aa4: 90 10 00 10 mov %l0, %o0 40021aa8: 80 a2 20 04 cmp %o0, 4 40021aac: 02 80 00 0f be 40021ae8 40021ab0: c2 07 bf f0 ld [ %fp + -16 ], %g1 rtems_filesystem_freenode( &loc ); 40021ab4: 80 a0 60 00 cmp %g1, 0 40021ab8: 02 80 00 08 be 40021ad8 40021abc: 01 00 00 00 nop 40021ac0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40021ac4: 80 a0 60 00 cmp %g1, 0 40021ac8: 02 80 00 04 be 40021ad8 40021acc: 01 00 00 00 nop 40021ad0: 9f c0 40 00 call %g1 40021ad4: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); 40021ad8: 40 00 38 84 call 4002fce8 <__errno> 40021adc: b0 10 3f ff mov -1, %i0 40021ae0: 10 80 00 0f b 40021b1c 40021ae4: 82 10 20 16 mov 0x16, %g1 } if ( !loc.ops->readlink_h ){ 40021ae8: c4 00 60 3c ld [ %g1 + 0x3c ], %g2 40021aec: 80 a0 a0 00 cmp %g2, 0 40021af0: 12 80 00 0e bne 40021b28 40021af4: 92 10 00 19 mov %i1, %o1 rtems_filesystem_freenode( &loc ); 40021af8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40021afc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40021b00: 02 80 00 04 be 40021b10 <== NOT EXECUTED 40021b04: 01 00 00 00 nop <== NOT EXECUTED 40021b08: 9f c0 40 00 call %g1 <== NOT EXECUTED 40021b0c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40021b10: 40 00 38 76 call 4002fce8 <__errno> <== NOT EXECUTED 40021b14: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40021b18: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40021b1c: c2 22 00 00 st %g1, [ %o0 ] 40021b20: 81 c7 e0 08 ret 40021b24: 81 e8 00 00 restore } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 40021b28: 94 10 00 1a mov %i2, %o2 40021b2c: 9f c0 80 00 call %g2 40021b30: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40021b34: c2 07 bf f0 ld [ %fp + -16 ], %g1 40021b38: 80 a0 60 00 cmp %g1, 0 40021b3c: 02 bf ff f9 be 40021b20 40021b40: b0 10 00 08 mov %o0, %i0 40021b44: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40021b48: 80 a0 60 00 cmp %g1, 0 40021b4c: 02 80 00 04 be 40021b5c 40021b50: 01 00 00 00 nop 40021b54: 9f c0 40 00 call %g1 40021b58: 90 10 00 10 mov %l0, %o0 return result; } 40021b5c: 81 c7 e0 08 ret 40021b60: 81 e8 00 00 restore 400172c0 : { size_t old_size; char *new_area; size_t resize; MSBUMP(realloc_calls, 1); 400172c0: 9d e3 bf 90 save %sp, -112, %sp 400172c4: 07 10 00 66 sethi %hi(0x40019800), %g3 400172c8: 86 10 e3 f0 or %g3, 0x3f0, %g3 ! 40019bf0 400172cc: 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())) { 400172d0: 05 10 00 67 sethi %hi(0x40019c00), %g2 400172d4: c4 00 a3 04 ld [ %g2 + 0x304 ], %g2 ! 40019f04 <_System_state_Current> { size_t old_size; char *new_area; size_t resize; MSBUMP(realloc_calls, 1); 400172d8: 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())) { 400172dc: 80 a0 a0 03 cmp %g2, 3 400172e0: 12 80 00 0c bne 40017310 400172e4: c2 20 e0 10 st %g1, [ %g3 + 0x10 ] if (_Thread_Dispatch_disable_level > 0) 400172e8: 03 10 00 67 sethi %hi(0x40019c00), %g1 400172ec: c2 00 61 60 ld [ %g1 + 0x160 ], %g1 ! 40019d60 <_Thread_Dispatch_disable_level> 400172f0: 80 a0 60 00 cmp %g1, 0 400172f4: 32 80 00 13 bne,a 40017340 400172f8: b0 10 20 00 clr %i0 <== NOT EXECUTED return (void *) 0; if (_ISR_Nest_level > 0) 400172fc: 03 10 00 67 sethi %hi(0x40019c00), %g1 40017300: c2 00 61 fc ld [ %g1 + 0x1fc ], %g1 ! 40019dfc <_ISR_Nest_level> 40017304: 80 a0 60 00 cmp %g1, 0 40017308: 32 80 00 0e bne,a 40017340 4001730c: b0 10 20 00 clr %i0 <== NOT EXECUTED } /* * Continue with realloc(). */ if ( !ptr ) 40017310: 80 a6 20 00 cmp %i0, 0 40017314: 12 80 00 06 bne 4001732c 40017318: 80 a6 60 00 cmp %i1, 0 return malloc( size ); 4001731c: 7f ff d0 5b call 4000b488 <== NOT EXECUTED 40017320: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40017324: 81 c7 e0 08 ret <== NOT EXECUTED 40017328: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED if ( !size ) { 4001732c: 12 80 00 07 bne 40017348 40017330: 21 10 00 66 sethi %hi(0x40019800), %l0 free( ptr ); 40017334: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40017338: 7f ff ce ec call 4000aee8 <== NOT EXECUTED 4001733c: b0 10 20 00 clr %i0 <== NOT EXECUTED 40017340: 81 c7 e0 08 ret <== NOT EXECUTED 40017344: 81 e8 00 00 restore <== NOT EXECUTED return (void *) 0; } if ( !_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, ptr, &old_size) ) { 40017348: 92 10 00 18 mov %i0, %o1 4001734c: 90 14 23 98 or %l0, 0x398, %o0 40017350: 40 00 00 63 call 400174dc <_Protected_heap_Get_block_size> 40017354: 94 07 bf f4 add %fp, -12, %o2 40017358: 80 8a 20 ff btst 0xff, %o0 4001735c: 12 80 00 08 bne 4001737c 40017360: 90 14 23 98 or %l0, 0x398, %o0 errno = EINVAL; 40017364: 7f ff da 59 call 4000dcc8 <__errno> 40017368: b0 10 20 00 clr %i0 4001736c: 82 10 20 16 mov 0x16, %g1 40017370: c2 22 00 00 st %g1, [ %o0 ] 40017374: 81 c7 e0 08 ret 40017378: 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 ) ) { 4001737c: 92 10 00 18 mov %i0, %o1 40017380: 40 00 00 64 call 40017510 <_Protected_heap_Resize_block> 40017384: 94 10 00 19 mov %i1, %o2 40017388: 80 8a 20 ff btst 0xff, %o0 4001738c: 12 80 00 1b bne 400173f8 40017390: 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 ); 40017394: 7f ff d0 3d call 4000b488 40017398: 90 10 00 19 mov %i1, %o0 MSBUMP(malloc_calls, -1); /* subtract off the malloc */ 4001739c: 05 10 00 66 sethi %hi(0x40019800), %g2 400173a0: 84 10 a3 f0 or %g2, 0x3f0, %g2 ! 40019bf0 400173a4: 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 ); 400173a8: a0 10 00 08 mov %o0, %l0 MSBUMP(malloc_calls, -1); /* subtract off the malloc */ 400173ac: 82 00 7f ff add %g1, -1, %g1 if ( !new_area ) { 400173b0: 80 a2 20 00 cmp %o0, 0 400173b4: 02 80 00 10 be 400173f4 400173b8: c2 20 a0 04 st %g1, [ %g2 + 4 ] return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 400173bc: c2 07 bf f4 ld [ %fp + -12 ], %g1 400173c0: 80 a6 40 01 cmp %i1, %g1 400173c4: 08 80 00 03 bleu 400173d0 400173c8: 90 10 00 19 mov %i1, %o0 400173cc: 90 10 00 01 mov %g1, %o0 400173d0: 94 10 00 08 mov %o0, %o2 400173d4: 92 10 00 18 mov %i0, %o1 400173d8: 7f ff dc 2e call 4000e490 400173dc: 90 10 00 10 mov %l0, %o0 free( ptr ); 400173e0: 90 10 00 18 mov %i0, %o0 400173e4: 7f ff ce c1 call 4000aee8 400173e8: b0 10 00 10 mov %l0, %i0 400173ec: 81 c7 e0 08 ret 400173f0: 81 e8 00 00 restore return new_area; 400173f4: b0 10 20 00 clr %i0 <== NOT EXECUTED } 400173f8: 81 c7 e0 08 ret 400173fc: 81 e8 00 00 restore 40021ca4 : #include int rmdir( const char *pathname ) { 40021ca4: 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 ); 40021ca8: 92 10 20 00 clr %o1 40021cac: 90 10 00 18 mov %i0, %o0 40021cb0: a0 07 bf e8 add %fp, -24, %l0 40021cb4: 96 10 20 00 clr %o3 40021cb8: 7f ff 91 9b call 40006324 40021cbc: 94 10 00 10 mov %l0, %o2 if ( result != 0 ) 40021cc0: 80 a2 20 00 cmp %o0, 0 40021cc4: 32 80 00 11 bne,a 40021d08 40021cc8: b0 10 3f ff mov -1, %i0 return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); 40021ccc: 90 10 20 02 mov 2, %o0 40021cd0: 7f ff 91 68 call 40006270 40021cd4: 92 10 00 10 mov %l0, %o1 if (result != 0) { 40021cd8: 80 a2 20 00 cmp %o0, 0 40021cdc: 02 80 00 0d be 40021d10 40021ce0: c2 07 bf f0 ld [ %fp + -16 ], %g1 rtems_filesystem_freenode( &loc ); 40021ce4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40021ce8: 02 80 00 08 be 40021d08 <== NOT EXECUTED 40021cec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40021cf0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40021cf4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40021cf8: 02 80 00 04 be 40021d08 <== NOT EXECUTED 40021cfc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40021d00: 9f c0 40 00 call %g1 <== NOT EXECUTED 40021d04: 01 00 00 00 nop <== NOT EXECUTED 40021d08: 81 c7 e0 08 ret 40021d0c: 81 e8 00 00 restore /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 40021d10: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 40021d14: 80 a0 a0 00 cmp %g2, 0 40021d18: 22 80 00 1e be,a 40021d90 40021d1c: 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 ){ 40021d20: 9f c0 80 00 call %g2 40021d24: 90 10 00 10 mov %l0, %o0 40021d28: 80 a2 20 01 cmp %o0, 1 40021d2c: 02 80 00 10 be 40021d6c 40021d30: c2 07 bf ec ld [ %fp + -20 ], %g1 rtems_filesystem_freenode( &loc ); 40021d34: c2 07 bf f0 ld [ %fp + -16 ], %g1 40021d38: 80 a0 60 00 cmp %g1, 0 40021d3c: 02 80 00 08 be 40021d5c 40021d40: 01 00 00 00 nop 40021d44: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40021d48: 80 a0 60 00 cmp %g1, 0 40021d4c: 02 80 00 04 be 40021d5c 40021d50: 01 00 00 00 nop 40021d54: 9f c0 40 00 call %g1 40021d58: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 40021d5c: 40 00 37 e3 call 4002fce8 <__errno> 40021d60: b0 10 3f ff mov -1, %i0 40021d64: 10 80 00 13 b 40021db0 40021d68: 82 10 20 14 mov 0x14, %g1 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 40021d6c: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 40021d70: 80 a0 60 00 cmp %g1, 0 40021d74: 12 80 00 12 bne 40021dbc 40021d78: 01 00 00 00 nop rtems_filesystem_freenode( &loc ); 40021d7c: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40021d80: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40021d84: 02 80 00 08 be 40021da4 <== NOT EXECUTED 40021d88: 01 00 00 00 nop <== NOT EXECUTED 40021d8c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40021d90: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40021d94: 02 80 00 04 be 40021da4 <== NOT EXECUTED 40021d98: 01 00 00 00 nop <== NOT EXECUTED 40021d9c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40021da0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40021da4: 40 00 37 d1 call 4002fce8 <__errno> <== NOT EXECUTED 40021da8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40021dac: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40021db0: c2 22 00 00 st %g1, [ %o0 ] 40021db4: 81 c7 e0 08 ret 40021db8: 81 e8 00 00 restore } result = (*loc.handlers->rmnod_h)( &loc ); 40021dbc: 9f c0 40 00 call %g1 40021dc0: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40021dc4: c2 07 bf f0 ld [ %fp + -16 ], %g1 40021dc8: 80 a0 60 00 cmp %g1, 0 40021dcc: 02 bf ff cf be 40021d08 40021dd0: b0 10 00 08 mov %o0, %i0 40021dd4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40021dd8: 80 a0 60 00 cmp %g1, 0 40021ddc: 02 80 00 06 be 40021df4 40021de0: 01 00 00 00 nop 40021de4: 9f c0 40 00 call %g1 40021de8: 90 10 00 10 mov %l0, %o0 40021dec: 81 c7 e0 08 ret 40021df0: 81 e8 00 00 restore return result; } 40021df4: 81 c7 e0 08 ret <== NOT EXECUTED 40021df8: 81 e8 00 00 restore <== NOT EXECUTED 40015d04 : const char * rtems_assoc_name_bad( uint32_t bad_value ) { 40015d04: 11 10 00 9f sethi %hi(0x40027c00), %o0 <== NOT EXECUTED sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 40015d08: 81 c3 e0 08 retl <== NOT EXECUTED 40015d0c: 90 12 21 00 or %o0, 0x100, %o0 ! 40027d00 <== NOT EXECUTED 40011668 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 40011668: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 4001166c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40011670: 40 00 00 0b call 4001169c <== NOT EXECUTED 40011674: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED if (nap) 40011678: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001167c: 02 80 00 05 be 40011690 <== NOT EXECUTED 40011680: 01 00 00 00 nop <== NOT EXECUTED return nap->name; return rtems_assoc_name_bad(local_value); } 40011684: f0 02 00 00 ld [ %o0 ], %i0 <== NOT EXECUTED 40011688: 81 c7 e0 08 ret <== NOT EXECUTED 4001168c: 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); 40011690: 40 00 11 9d call 40015d04 <== NOT EXECUTED 40011694: 91 e8 00 19 restore %g0, %i1, %o0 <== NOT EXECUTED 40011698: 01 00 00 00 nop 4000d370 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4000d370: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 4000d374: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000d378: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000d37c: 40 00 02 23 call 4000dc08 <== NOT EXECUTED 4000d380: b0 10 20 00 clr %i0 <== NOT EXECUTED if (nap) 4000d384: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d388: 32 80 00 02 bne,a 4000d390 <== NOT EXECUTED 4000d38c: f0 02 20 08 ld [ %o0 + 8 ], %i0 <== NOT EXECUTED return nap->remote_value; return 0; } 4000d390: 81 c7 e0 08 ret <== NOT EXECUTED 4000d394: 81 e8 00 00 restore <== NOT EXECUTED 40003a78 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 40003a78: 9d e3 bf 60 save %sp, -160, %sp struct timespec uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 40003a7c: 80 a6 60 00 cmp %i1, 0 40003a80: 02 80 00 66 be 40003c18 40003a84: 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 ); 40003a88: 40 00 14 0c call 40008ab8 <_TOD_Get_uptime> 40003a8c: 90 10 00 10 mov %l0, %o0 _Timespec_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 40003a90: 92 10 00 10 mov %l0, %o1 40003a94: 11 10 00 9b sethi %hi(0x40026c00), %o0 40003a98: a0 07 bf e0 add %fp, -32, %l0 40003a9c: 90 12 21 48 or %o0, 0x148, %o0 40003aa0: 40 00 1d fa call 4000b288 <_Timespec_Subtract> 40003aa4: 94 10 00 10 mov %l0, %o2 } } } #endif (*print)( context, "CPU Usage by thread\n" 40003aa8: 90 10 00 18 mov %i0, %o0 40003aac: 13 10 00 6f sethi %hi(0x4001bc00), %o1 40003ab0: 9f c6 40 00 call %i1 40003ab4: 92 12 61 10 or %o1, 0x110, %o1 ! 4001bd10 <__func__.4894+0x1f8> 40003ab8: 03 10 00 99 sethi %hi(0x40026400), %g1 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40003abc: ac 07 bf c0 add %fp, -64, %l6 } } } #endif (*print)( context, "CPU Usage by thread\n" 40003ac0: a4 10 62 f4 or %g1, 0x2f4, %l2 _Timespec_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timespec_Add_to( &ran, &used ); }; _Timespec_Divide( &ran, &total, &ival, &fval ); 40003ac4: 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( 40003ac8: 03 10 00 9a sethi %hi(0x40026800), %g1 &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timespec_Add_to( &ran, &used ); }; _Timespec_Divide( &ran, &total, &ival, &fval ); 40003acc: 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( 40003ad0: b4 10 60 58 or %g1, 0x58, %i2 &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timespec_Add_to( &ran, &used ); }; _Timespec_Divide( &ran, &total, &ival, &fval ); 40003ad4: b8 07 bf f0 add %fp, -16, %i4 " ID NAME TICKS PERCENT\n" #endif ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 40003ad8: ba 04 a0 10 add %l2, 0x10, %i5 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 40003adc: c2 04 80 00 ld [ %l2 ], %g1 40003ae0: 80 a0 60 00 cmp %g1, 0 40003ae4: 22 80 00 41 be,a 40003be8 40003ae8: a4 04 a0 04 add %l2, 4, %l2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 40003aec: e6 00 60 04 ld [ %g1 + 4 ], %l3 if ( information ) { 40003af0: 80 a4 e0 00 cmp %l3, 0 40003af4: 22 80 00 3d be,a 40003be8 40003af8: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED 40003afc: 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( 40003b00: ae 07 bf e8 add %fp, -24, %l7 40003b04: 10 80 00 32 b 40003bcc 40003b08: 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 ]; 40003b0c: c2 04 e0 1c ld [ %l3 + 0x1c ], %g1 40003b10: e0 00 40 02 ld [ %g1 + %g2 ], %l0 if ( !the_thread ) 40003b14: 80 a4 20 00 cmp %l0, 0 40003b18: 02 80 00 2d be 40003bcc 40003b1c: a2 04 60 01 inc %l1 continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40003b20: 40 00 0e b6 call 400075f8 40003b24: d0 04 20 08 ld [ %l0 + 8 ], %o0 (*print)( 40003b28: d4 04 20 08 ld [ %l0 + 8 ], %o2 40003b2c: 90 10 00 18 mov %i0, %o0 40003b30: 13 10 00 6f sethi %hi(0x4001bc00), %o1 40003b34: 96 10 00 16 mov %l6, %o3 40003b38: 9f c6 40 00 call %i1 40003b3c: 92 12 61 58 or %o1, 0x158, %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; 40003b40: c2 04 20 84 ld [ %l0 + 0x84 ], %g1 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40003b44: 07 10 00 9a sethi %hi(0x40026800), %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; 40003b48: c2 27 bf d8 st %g1, [ %fp + -40 ] if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40003b4c: 86 10 e0 50 or %g3, 0x50, %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; 40003b50: c2 04 20 88 ld [ %l0 + 0x88 ], %g1 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40003b54: 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; 40003b58: c2 27 bf dc st %g1, [ %fp + -36 ] if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40003b5c: c4 00 a0 08 ld [ %g2 + 8 ], %g2 40003b60: c2 04 20 08 ld [ %l0 + 8 ], %g1 40003b64: 80 a0 80 01 cmp %g2, %g1 40003b68: 12 80 00 0a bne 40003b90 40003b6c: 94 10 00 1b mov %i3, %o2 struct timespec used; _Timespec_Subtract( 40003b70: 90 10 00 1a mov %i2, %o0 40003b74: 92 10 00 17 mov %l7, %o1 40003b78: 40 00 1d c4 call 4000b288 <_Timespec_Subtract> 40003b7c: 94 10 00 14 mov %l4, %o2 &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timespec_Add_to( &ran, &used ); 40003b80: 90 10 00 15 mov %l5, %o0 40003b84: 40 00 1d 16 call 4000afdc <_Timespec_Add_to> 40003b88: 92 10 00 14 mov %l4, %o1 }; _Timespec_Divide( &ran, &total, &ival, &fval ); 40003b8c: 94 10 00 1b mov %i3, %o2 40003b90: 96 10 00 1c mov %i4, %o3 40003b94: 90 10 00 15 mov %l5, %o0 40003b98: 40 00 1d 29 call 4000b03c <_Timespec_Divide> 40003b9c: 92 07 bf e0 add %fp, -32, %o1 /* * Print the information */ (*print)( context, 40003ba0: d0 07 bf dc ld [ %fp + -36 ], %o0 40003ba4: 40 00 52 1b call 40018410 <.udiv> 40003ba8: 92 10 23 e8 mov 0x3e8, %o1 40003bac: d4 07 bf d8 ld [ %fp + -40 ], %o2 40003bb0: d8 07 bf f4 ld [ %fp + -12 ], %o4 40003bb4: da 07 bf f0 ld [ %fp + -16 ], %o5 40003bb8: 96 10 00 08 mov %o0, %o3 40003bbc: 13 10 00 6f sethi %hi(0x4001bc00), %o1 40003bc0: 90 10 00 18 mov %i0, %o0 40003bc4: 9f c6 40 00 call %i1 40003bc8: 92 12 61 70 or %o1, 0x170, %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++ ) { 40003bcc: 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 ); 40003bd0: 94 10 00 16 mov %l6, %o2 40003bd4: 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++ ) { 40003bd8: 80 a4 40 01 cmp %l1, %g1 40003bdc: 08 bf ff cc bleu 40003b0c 40003be0: 85 2c 60 02 sll %l1, 2, %g2 40003be4: a4 04 a0 04 add %l2, 4, %l2 " ID NAME TICKS PERCENT\n" #endif ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 40003be8: 80 a4 80 1d cmp %l2, %i5 40003bec: 32 bf ff bd bne,a 40003ae0 40003bf0: c2 04 80 00 ld [ %l2 ], %g1 } } } #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS (*print)( context, "Time since last CPU Usage reset %" PRId32 40003bf4: d0 07 bf e4 ld [ %fp + -28 ], %o0 40003bf8: 40 00 52 06 call 40018410 <.udiv> 40003bfc: 92 10 23 e8 mov 0x3e8, %o1 40003c00: d4 07 bf e0 ld [ %fp + -32 ], %o2 40003c04: 96 10 00 08 mov %o0, %o3 40003c08: 13 10 00 6f sethi %hi(0x4001bc00), %o1 40003c0c: 90 10 00 18 mov %i0, %o0 40003c10: 9f c6 40 00 call %i1 40003c14: 92 12 61 88 or %o1, 0x188, %o1 40003c18: 81 c7 e0 08 ret 40003c1c: 81 e8 00 00 restore 4000cedc : { 0, 0, 0 }, }; static int rtems_deviceio_errno(rtems_status_code code) { 4000cedc: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t) code))) 4000cee0: 11 10 00 61 sethi %hi(0x40018400), %o0 <== NOT EXECUTED 4000cee4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000cee8: 40 00 01 22 call 4000d370 <== NOT EXECUTED 4000ceec: 90 12 21 f4 or %o0, 0x1f4, %o0 <== NOT EXECUTED 4000cef0: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4000cef4: 02 80 00 05 be 4000cf08 <== NOT EXECUTED 4000cef8: 01 00 00 00 nop <== NOT EXECUTED { errno = rc; 4000cefc: 40 00 03 73 call 4000dcc8 <__errno> <== NOT EXECUTED 4000cf00: 01 00 00 00 nop <== NOT EXECUTED 4000cf04: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED return -1; } return -1; } 4000cf08: 81 c7 e0 08 ret <== NOT EXECUTED 4000cf0c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 400073ac : int rtems_error( int error_flag, const char *printf_format, ... ) { 400073ac: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); 400073b0: 94 07 a0 4c add %fp, 0x4c, %o2 <== NOT EXECUTED 400073b4: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 400073b8: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 400073bc: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 400073c0: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); 400073c4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400073c8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400073cc: 7f ff ff 7c call 400071bc <== NOT EXECUTED 400073d0: d4 27 bf f4 st %o2, [ %fp + -12 ] <== NOT EXECUTED va_end(arglist); return chars_written; } 400073d4: 81 c7 e0 08 ret <== NOT EXECUTED 400073d8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40002e48 : int rtems_filesystem_evaluate_parent( int flags, rtems_filesystem_location_info_t *pathloc ) { 40002e48: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t parent; int result; if ( !pathloc ) 40002e4c: 80 a6 60 00 cmp %i1, 0 40002e50: 32 80 00 06 bne,a 40002e68 40002e54: c2 06 60 08 ld [ %i1 + 8 ], %g1 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 40002e58: 40 00 2b 9c call 4000dcc8 <__errno> <== NOT EXECUTED 40002e5c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002e60: 10 80 00 09 b 40002e84 <== NOT EXECUTED 40002e64: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED if ( !pathloc->ops->evalpath_h ) 40002e68: c2 00 40 00 ld [ %g1 ], %g1 40002e6c: 80 a0 60 00 cmp %g1, 0 40002e70: 12 80 00 08 bne 40002e90 40002e74: a0 07 bf e8 add %fp, -24, %l0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 40002e78: 40 00 2b 94 call 4000dcc8 <__errno> <== NOT EXECUTED 40002e7c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002e80: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40002e84: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40002e88: 81 c7 e0 08 ret <== NOT EXECUTED 40002e8c: 81 e8 00 00 restore <== NOT EXECUTED parent = *pathloc; 40002e90: 92 10 00 19 mov %i1, %o1 40002e94: 94 10 20 10 mov 0x10, %o2 40002e98: 40 00 2d 7e call 4000e490 40002e9c: 90 10 00 10 mov %l0, %o0 result = (*pathloc->ops->evalpath_h)( "..", flags, &parent ); 40002ea0: c2 06 60 08 ld [ %i1 + 8 ], %g1 40002ea4: 92 10 00 18 mov %i0, %o1 40002ea8: c2 00 40 00 ld [ %g1 ], %g1 40002eac: 11 10 00 5f sethi %hi(0x40017c00), %o0 40002eb0: 94 10 00 10 mov %l0, %o2 40002eb4: 9f c0 40 00 call %g1 40002eb8: 90 12 23 48 or %o0, 0x348, %o0 if (result != 0){ 40002ebc: b0 92 20 00 orcc %o0, 0, %i0 40002ec0: 02 80 00 04 be 40002ed0 40002ec4: c2 07 bf f0 ld [ %fp + -16 ], %g1 40002ec8: 81 c7 e0 08 ret <== NOT EXECUTED 40002ecc: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED return -1; } rtems_filesystem_freenode( &parent ); 40002ed0: 80 a0 60 00 cmp %g1, 0 40002ed4: 02 80 00 08 be 40002ef4 40002ed8: 01 00 00 00 nop 40002edc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40002ee0: 80 a0 60 00 cmp %g1, 0 40002ee4: 02 80 00 04 be 40002ef4 40002ee8: 01 00 00 00 nop 40002eec: 9f c0 40 00 call %g1 40002ef0: 90 10 00 10 mov %l0, %o0 return result; } 40002ef4: 81 c7 e0 08 ret 40002ef8: 81 e8 00 00 restore 40002efc : const char *pathname, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 40002efc: 9d e3 bf 98 save %sp, -104, %sp /* * Verify Input parameters. */ if ( !pathname ) 40002f00: 80 a6 20 00 cmp %i0, 0 40002f04: 12 80 00 06 bne 40002f1c 40002f08: 80 a6 a0 00 cmp %i2, 0 rtems_set_errno_and_return_minus_one( EFAULT ); 40002f0c: 40 00 2b 6f call 4000dcc8 <__errno> 40002f10: b0 10 3f ff mov -1, %i0 40002f14: 10 80 00 44 b 40003024 40002f18: 82 10 20 0e mov 0xe, %g1 if ( !pathloc ) 40002f1c: 32 80 00 06 bne,a 40002f34 40002f20: c2 4e 00 00 ldsb [ %i0 ], %g1 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 40002f24: 40 00 2b 69 call 4000dcc8 <__errno> <== NOT EXECUTED 40002f28: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002f2c: 10 80 00 3e b 40003024 <== NOT EXECUTED 40002f30: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 40002f34: 80 a0 60 2f cmp %g1, 0x2f 40002f38: 02 80 00 06 be 40002f50 40002f3c: 80 a0 60 5c cmp %g1, 0x5c 40002f40: 02 80 00 04 be 40002f50 40002f44: 80 a0 60 00 cmp %g1, 0 40002f48: 12 80 00 0a bne 40002f70 40002f4c: 03 10 00 64 sethi %hi(0x40019000), %g1 40002f50: 03 10 00 64 sethi %hi(0x40019000), %g1 40002f54: d2 00 63 3c ld [ %g1 + 0x33c ], %o1 ! 4001933c 40002f58: 90 10 00 1a mov %i2, %o0 40002f5c: 92 02 60 14 add %o1, 0x14, %o1 40002f60: 40 00 2d 4c call 4000e490 40002f64: 94 10 20 10 mov 0x10, %o2 40002f68: 10 80 00 08 b 40002f88 40002f6c: 84 10 20 01 mov 1, %g2 40002f70: d2 00 63 3c ld [ %g1 + 0x33c ], %o1 40002f74: 90 10 00 1a mov %i2, %o0 40002f78: 92 02 60 04 add %o1, 4, %o1 40002f7c: 40 00 2d 45 call 4000e490 40002f80: 94 10 20 10 mov 0x10, %o2 40002f84: 84 10 20 00 clr %g2 if ( !pathloc->ops->evalpath_h ) 40002f88: c2 06 a0 08 ld [ %i2 + 8 ], %g1 40002f8c: c2 00 40 00 ld [ %g1 ], %g1 40002f90: 80 a0 60 00 cmp %g1, 0 40002f94: 02 80 00 21 be 40003018 40002f98: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( &pathname[i], flags, pathloc ); 40002f9c: 90 06 00 02 add %i0, %g2, %o0 40002fa0: 92 10 00 19 mov %i1, %o1 40002fa4: 9f c0 40 00 call %g1 40002fa8: 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 ) { 40002fac: b0 92 20 00 orcc %o0, 0, %i0 40002fb0: 12 80 00 1e bne 40003028 40002fb4: 80 a6 e0 00 cmp %i3, 0 40002fb8: 02 80 00 21 be 4000303c 40002fbc: 01 00 00 00 nop if ( !pathloc->ops->node_type_h ){ 40002fc0: c2 06 a0 08 ld [ %i2 + 8 ], %g1 40002fc4: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 40002fc8: 80 a0 a0 00 cmp %g2, 0 40002fcc: 22 80 00 0e be,a 40003004 40002fd0: 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 ); 40002fd4: 9f c0 80 00 call %g2 40002fd8: 90 10 00 1a mov %i2, %o0 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 40002fdc: 90 02 3f fd add %o0, -3, %o0 40002fe0: 80 a2 20 01 cmp %o0, 1 40002fe4: 18 80 00 16 bgu 4000303c 40002fe8: 01 00 00 00 nop ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 40002fec: c2 06 a0 08 ld [ %i2 + 8 ], %g1 40002ff0: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 40002ff4: 80 a0 a0 00 cmp %g2, 0 40002ff8: 12 80 00 0e bne 40003030 40002ffc: 90 10 00 1a mov %i2, %o0 rtems_filesystem_freenode( pathloc ); 40003000: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40003004: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003008: 02 80 00 04 be 40003018 <== NOT EXECUTED 4000300c: 01 00 00 00 nop <== NOT EXECUTED 40003010: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003014: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40003018: 40 00 2b 2c call 4000dcc8 <__errno> <== NOT EXECUTED 4000301c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40003020: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40003024: c2 22 00 00 st %g1, [ %o0 ] 40003028: 81 c7 e0 08 ret 4000302c: 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 ); 40003030: 9f c0 80 00 call %g2 40003034: 92 10 00 19 mov %i1, %o1 40003038: b0 10 00 08 mov %o0, %i0 } } return result; } 4000303c: 81 c7 e0 08 ret 40003040: 81 e8 00 00 restore 4000acb8 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 4000acb8: 9d e3 bf 80 save %sp, -128, %sp /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 4000acbc: 25 10 00 64 sethi %hi(0x40019000), %l2 4000acc0: c4 04 a3 3c ld [ %l2 + 0x33c ], %g2 ! 4001933c 4000acc4: 82 10 20 12 mov 0x12, %g1 init_fs_mount_table(); 4000acc8: 40 00 02 39 call 4000b5ac 4000accc: c2 30 a0 24 sth %g1, [ %g2 + 0x24 ] /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 4000acd0: 03 10 00 5e sethi %hi(0x40017800), %g1 4000acd4: c2 00 63 1c ld [ %g1 + 0x31c ], %g1 ! 40017b1c rtems_fatal_error_occurred( 0xABCD0001 ); 4000acd8: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 4000acdc: 80 a0 60 00 cmp %g1, 0 4000ace0: 02 80 00 0f be 4000ad1c 4000ace4: 90 12 20 01 or %o0, 1, %o0 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 4000ace8: 03 10 00 63 sethi %hi(0x40018c00), %g1 4000acec: c2 00 62 20 ld [ %g1 + 0x220 ], %g1 ! 40018e20 status = mount( 4000acf0: 90 07 bf f4 add %fp, -12, %o0 4000acf4: d8 00 60 0c ld [ %g1 + 0xc ], %o4 4000acf8: d2 00 40 00 ld [ %g1 ], %o1 4000acfc: d4 00 60 04 ld [ %g1 + 4 ], %o2 4000ad00: 40 00 02 33 call 4000b5cc 4000ad04: d6 00 60 08 ld [ %g1 + 8 ], %o3 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 4000ad08: 80 a2 3f ff cmp %o0, -1 4000ad0c: 32 80 00 06 bne,a 4000ad24 4000ad10: d0 04 a3 3c ld [ %l2 + 0x33c ], %o0 rtems_fatal_error_occurred( 0xABCD0002 ); 4000ad14: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 4000ad18: 90 12 20 02 or %o0, 2, %o0 ! abcd0002 <== NOT EXECUTED 4000ad1c: 7f ff ef 61 call 40006aa0 <== NOT EXECUTED 4000ad20: 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; 4000ad24: 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; 4000ad28: 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; 4000ad2c: 92 02 60 18 add %o1, 0x18, %o1 4000ad30: 94 10 20 10 mov 0x10, %o2 4000ad34: 40 00 0d d7 call 4000e490 4000ad38: 90 02 20 14 add %o0, 0x14, %o0 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000ad3c: a0 07 bf e4 add %fp, -28, %l0 4000ad40: 96 10 20 00 clr %o3 4000ad44: 23 10 00 60 sethi %hi(0x40018000), %l1 4000ad48: 92 10 20 00 clr %o1 4000ad4c: 94 10 00 10 mov %l0, %o2 4000ad50: 7f ff e0 6b call 40002efc 4000ad54: 90 14 62 c8 or %l1, 0x2c8, %o0 rtems_filesystem_root = loc; 4000ad58: d0 04 a3 3c ld [ %l2 + 0x33c ], %o0 4000ad5c: 92 10 00 10 mov %l0, %o1 4000ad60: 94 10 20 10 mov 0x10, %o2 4000ad64: 40 00 0d cb call 4000e490 4000ad68: 90 02 20 14 add %o0, 0x14, %o0 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000ad6c: 96 10 20 00 clr %o3 4000ad70: 92 10 20 00 clr %o1 4000ad74: 94 10 00 10 mov %l0, %o2 4000ad78: 7f ff e0 61 call 40002efc 4000ad7c: 90 14 62 c8 or %l1, 0x2c8, %o0 rtems_filesystem_current = loc; 4000ad80: d0 04 a3 3c ld [ %l2 + 0x33c ], %o0 4000ad84: 92 10 00 10 mov %l0, %o1 4000ad88: 94 10 20 10 mov 0x10, %o2 4000ad8c: 40 00 0d c1 call 4000e490 4000ad90: 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); 4000ad94: 92 10 21 ff mov 0x1ff, %o1 4000ad98: 11 10 00 60 sethi %hi(0x40018000), %o0 4000ad9c: 40 00 01 fa call 4000b584 4000ada0: 90 12 22 d0 or %o0, 0x2d0, %o0 ! 400182d0 if ( status != 0 ) 4000ada4: 80 a2 20 00 cmp %o0, 0 4000ada8: 02 80 00 04 be 4000adb8 4000adac: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 rtems_fatal_error_occurred( 0xABCD0003 ); 4000adb0: 10 bf ff db b 4000ad1c <== NOT EXECUTED 4000adb4: 90 12 20 03 or %o0, 3, %o0 ! abcd0003 <== NOT EXECUTED 4000adb8: 81 c7 e0 08 ret 4000adbc: 81 e8 00 00 restore 40022264 : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 40022264: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40022268: c4 02 40 00 ld [ %o1 ], %g2 <== NOT EXECUTED 4002226c: 82 18 40 02 xor %g1, %g2, %g1 <== NOT EXECUTED 40022270: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 40022274: 81 c3 e0 08 retl <== NOT EXECUTED 40022278: 90 60 3f ff subx %g0, -1, %o0 <== NOT EXECUTED 40002cac : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 40002cac: 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 ); 40002cb0: 92 10 20 00 clr %o1 <== NOT EXECUTED 40002cb4: a4 07 bf e8 add %fp, -24, %l2 <== NOT EXECUTED 40002cb8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40002cbc: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED 40002cc0: 40 00 00 8f call 40002efc <== NOT EXECUTED 40002cc4: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 40002cc8: 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 ); 40002ccc: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 40002cd0: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED 40002cd4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002cd8: 12 80 00 0e bne 40002d10 <== NOT EXECUTED 40002cdc: e2 07 bf e8 ld [ %fp + -24 ], %l1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40002ce0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40002ce4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002ce8: 02 80 00 04 be 40002cf8 <== NOT EXECUTED 40002cec: 01 00 00 00 nop <== NOT EXECUTED 40002cf0: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002cf4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40002cf8: 40 00 2b f4 call 4000dcc8 <__errno> <== NOT EXECUTED 40002cfc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002d00: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40002d04: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40002d08: 81 c7 e0 08 ret <== NOT EXECUTED 40002d0c: 81 e8 00 00 restore <== NOT EXECUTED } node_type = (*loc.ops->node_type_h)( &loc ); 40002d10: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002d14: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 40002d18: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40002d1c: 12 80 00 05 bne 40002d30 <== NOT EXECUTED 40002d20: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40002d24: 80 a2 20 02 cmp %o0, 2 <== NOT EXECUTED 40002d28: 22 80 00 0d be,a 40002d5c <== NOT EXECUTED 40002d2c: f0 26 40 00 st %i0, [ %i1 ] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40002d30: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002d34: 02 80 00 1c be 40002da4 <== NOT EXECUTED 40002d38: 01 00 00 00 nop <== NOT EXECUTED 40002d3c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40002d40: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002d44: 02 80 00 18 be 40002da4 <== NOT EXECUTED 40002d48: 01 00 00 00 nop <== NOT EXECUTED 40002d4c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002d50: 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 ); 40002d54: 81 c7 e0 08 ret <== NOT EXECUTED 40002d58: 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 ); 40002d5c: 40 00 30 fd call 4000f150 <== NOT EXECUTED 40002d60: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40002d64: d0 26 60 04 st %o0, [ %i1 + 4 ] <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 40002d68: c2 04 60 4c ld [ %l1 + 0x4c ], %g1 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 40002d6c: 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; 40002d70: c2 26 60 08 st %g1, [ %i1 + 8 ] <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 40002d74: c2 04 60 50 ld [ %l1 + 0x50 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40002d78: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40002d7c: 02 80 00 0c be 40002dac <== NOT EXECUTED 40002d80: c2 26 60 0c st %g1, [ %i1 + 0xc ] <== NOT EXECUTED 40002d84: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40002d88: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002d8c: 02 80 00 08 be 40002dac <== NOT EXECUTED 40002d90: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40002d94: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002d98: b0 10 20 00 clr %i0 <== NOT EXECUTED 40002d9c: 81 c7 e0 08 ret <== NOT EXECUTED 40002da0: 81 e8 00 00 restore <== NOT EXECUTED 40002da4: 81 c7 e0 08 ret <== NOT EXECUTED 40002da8: 91 e8 20 0d restore %g0, 0xd, %o0 <== NOT EXECUTED 40002dac: b0 10 20 00 clr %i0 <== NOT EXECUTED #endif return RTEMS_SUCCESSFUL; } 40002db0: 81 c7 e0 08 ret <== NOT EXECUTED 40002db4: 81 e8 00 00 restore <== NOT EXECUTED 40007b00 : 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 ) { 40007b00: 9d e3 bf 98 save %sp, -104, %sp 40007b04: 92 10 00 19 mov %i1, %o1 /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 40007b08: 80 a6 60 00 cmp %i1, 0 40007b0c: 02 80 00 3f be 40007c08 40007b10: a0 10 00 18 mov %i0, %l0 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) 40007b14: 80 a6 a0 00 cmp %i2, 0 40007b18: 02 80 00 3c be 40007c08 40007b1c: 01 00 00 00 nop return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 40007b20: c2 06 40 00 ld [ %i1 ], %g1 40007b24: 80 a0 60 00 cmp %g1, 0 40007b28: 32 80 00 07 bne,a 40007b44 40007b2c: c0 26 80 00 clr [ %i2 ] 40007b30: c2 06 60 04 ld [ %i1 + 4 ], %g1 40007b34: 80 a0 60 00 cmp %g1, 0 40007b38: 02 80 00 34 be 40007c08 40007b3c: 01 00 00 00 nop return RTEMS_INVALID_ADDRESS; *registered_major = 0; 40007b40: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 40007b44: 03 10 00 78 sethi %hi(0x4001e000), %g1 40007b48: c8 00 61 70 ld [ %g1 + 0x170 ], %g4 ! 4001e170 <_IO_Number_of_drivers> 40007b4c: 80 a4 00 04 cmp %l0, %g4 40007b50: 1a 80 00 31 bcc 40007c14 40007b54: b0 10 20 0a mov 0xa, %i0 /* * Test for initialise/open being present to indicate the driver slot is * in use. */ if ( major == 0 ) { 40007b58: 80 a4 20 00 cmp %l0, 0 40007b5c: 12 80 00 18 bne 40007bbc 40007b60: 03 10 00 78 sethi %hi(0x4001e000), %g1 bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 40007b64: c6 00 61 74 ld [ %g1 + 0x174 ], %g3 ! 4001e174 <_IO_Driver_address_table> 40007b68: 85 29 20 03 sll %g4, 3, %g2 40007b6c: 83 29 20 05 sll %g4, 5, %g1 40007b70: a0 01 3f ff add %g4, -1, %l0 40007b74: 82 20 40 02 sub %g1, %g2, %g1 40007b78: 82 00 7f e8 add %g1, -24, %g1 40007b7c: 10 80 00 0b b 40007ba8 40007b80: 86 00 c0 01 add %g3, %g1, %g3 if ( !_IO_Driver_address_table[major].initialization_entry && 40007b84: 80 a0 60 00 cmp %g1, 0 40007b88: 32 80 00 07 bne,a 40007ba4 40007b8c: a0 04 3f ff add %l0, -1, %l0 40007b90: c2 00 e0 04 ld [ %g3 + 4 ], %g1 40007b94: 80 a0 60 00 cmp %g1, 0 40007b98: 02 80 00 09 be 40007bbc 40007b9c: 03 10 00 78 sethi %hi(0x4001e000), %g1 * in use. */ if ( major == 0 ) { bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 40007ba0: a0 04 3f ff add %l0, -1, %l0 <== NOT EXECUTED 40007ba4: 86 00 ff e8 add %g3, -24, %g3 40007ba8: 80 a4 20 00 cmp %l0, 0 40007bac: 32 bf ff f6 bne,a 40007b84 40007bb0: c2 00 c0 00 ld [ %g3 ], %g1 40007bb4: 81 c7 e0 08 ret 40007bb8: 91 e8 20 05 restore %g0, 5, %o0 if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 40007bbc: c6 00 61 74 ld [ %g1 + 0x174 ], %g3 40007bc0: 85 2c 20 03 sll %l0, 3, %g2 40007bc4: 83 2c 20 05 sll %l0, 5, %g1 40007bc8: 82 20 40 02 sub %g1, %g2, %g1 40007bcc: c4 00 c0 01 ld [ %g3 + %g1 ], %g2 40007bd0: 80 a0 a0 00 cmp %g2, 0 40007bd4: 12 80 00 0f bne 40007c10 40007bd8: 90 00 c0 01 add %g3, %g1, %o0 40007bdc: c2 02 20 04 ld [ %o0 + 4 ], %g1 40007be0: 80 a0 60 00 cmp %g1, 0 40007be4: 32 80 00 0c bne,a 40007c14 40007be8: 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; 40007bec: 40 00 1e 12 call 4000f434 40007bf0: 94 10 20 18 mov 0x18, %o2 *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 40007bf4: 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; 40007bf8: e0 26 80 00 st %l0, [ %i2 ] return rtems_io_initialize( major, 0, NULL ); 40007bfc: b2 10 20 00 clr %i1 40007c00: 7f ff ff 4f call 4000793c 40007c04: 95 e8 20 00 restore %g0, 0, %o2 40007c08: 81 c7 e0 08 ret 40007c0c: 91 e8 20 09 restore %g0, 9, %o0 40007c10: b0 10 20 0c mov 0xc, %i0 } 40007c14: 81 c7 e0 08 ret 40007c18: 81 e8 00 00 restore 40008f44 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 40008f44: 9d e3 bf 98 save %sp, -104, %sp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 40008f48: 80 a6 20 00 cmp %i0, 0 40008f4c: 02 80 00 1d be 40008fc0 40008f50: 03 10 00 99 sethi %hi(0x40026400), %g1 return; 40008f54: a4 10 62 f4 or %g1, 0x2f4, %l2 ! 400266f4 <_Objects_Information_table+0x4> for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 40008f58: a6 04 a0 10 add %l2, 0x10, %l3 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 40008f5c: c2 04 80 00 ld [ %l2 ], %g1 40008f60: 80 a0 60 00 cmp %g1, 0 40008f64: 22 80 00 14 be,a 40008fb4 40008f68: a4 04 a0 04 add %l2, 4, %l2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 40008f6c: e2 00 60 04 ld [ %g1 + 4 ], %l1 if ( information ) { 40008f70: 80 a4 60 00 cmp %l1, 0 40008f74: 12 80 00 0b bne 40008fa0 40008f78: a0 10 20 01 mov 1, %l0 for ( i=1 ; i <= information->maximum ; i++ ) { 40008f7c: 10 80 00 0e b 40008fb4 <== NOT EXECUTED 40008f80: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED the_thread = (Thread_Control *)information->local_table[ i ]; 40008f84: c2 04 60 1c ld [ %l1 + 0x1c ], %g1 40008f88: d0 00 40 08 ld [ %g1 + %o0 ], %o0 if ( !the_thread ) 40008f8c: 80 a2 20 00 cmp %o0, 0 40008f90: 02 80 00 04 be 40008fa0 40008f94: a0 04 20 01 inc %l0 continue; (*routine)(the_thread); 40008f98: 9f c6 00 00 call %i0 40008f9c: 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++ ) { 40008fa0: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 40008fa4: 80 a4 00 01 cmp %l0, %g1 40008fa8: 08 bf ff f7 bleu 40008f84 40008fac: 91 2c 20 02 sll %l0, 2, %o0 40008fb0: a4 04 a0 04 add %l2, 4, %l2 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 40008fb4: 80 a4 80 13 cmp %l2, %l3 40008fb8: 32 bf ff ea bne,a 40008f60 40008fbc: c2 04 80 00 ld [ %l2 ], %g1 40008fc0: 81 c7 e0 08 ret 40008fc4: 81 e8 00 00 restore 4000b2e0 : * 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 ) { 4000b2e0: 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 ); 4000b2e4: 03 10 00 66 sethi %hi(0x40019800), %g1 4000b2e8: d0 00 63 94 ld [ %g1 + 0x394 ], %o0 ! 40019b94 4000b2ec: 92 10 20 00 clr %o1 4000b2f0: 7f ff ec 2a call 40006398 4000b2f4: 94 10 20 00 clr %o2 if (rtems_libio_iop_freelist) { 4000b2f8: 23 10 00 66 sethi %hi(0x40019800), %l1 4000b2fc: c4 04 63 90 ld [ %l1 + 0x390 ], %g2 ! 40019b90 4000b300: 80 a0 a0 00 cmp %g2, 0 4000b304: 02 80 00 28 be 4000b3a4 4000b308: b0 10 20 00 clr %i0 rc = rtems_semaphore_create( 4000b30c: 03 10 00 66 sethi %hi(0x40019800), %g1 4000b310: c6 00 63 8c ld [ %g1 + 0x38c ], %g3 ! 40019b8c 4000b314: 92 10 20 01 mov 1, %o1 4000b318: 86 20 80 03 sub %g2, %g3, %g3 4000b31c: 87 38 e0 02 sra %g3, 2, %g3 4000b320: 83 28 e0 02 sll %g3, 2, %g1 4000b324: 85 28 e0 06 sll %g3, 6, %g2 4000b328: 84 20 80 01 sub %g2, %g1, %g2 4000b32c: 83 28 a0 06 sll %g2, 6, %g1 4000b330: 82 20 40 02 sub %g1, %g2, %g1 4000b334: 85 28 60 0c sll %g1, 0xc, %g2 4000b338: 82 00 40 02 add %g1, %g2, %g1 4000b33c: 82 00 40 03 add %g1, %g3, %g1 4000b340: 83 28 60 04 sll %g1, 4, %g1 4000b344: 82 20 40 03 sub %g1, %g3, %g1 4000b348: 83 28 60 02 sll %g1, 2, %g1 4000b34c: 86 20 c0 01 sub %g3, %g1, %g3 4000b350: 94 10 20 54 mov 0x54, %o2 4000b354: 96 10 20 00 clr %o3 4000b358: 11 13 10 92 sethi %hi(0x4c424800), %o0 4000b35c: 98 07 bf f4 add %fp, -12, %o4 4000b360: 90 12 21 00 or %o0, 0x100, %o0 4000b364: 7f ff eb 67 call 40006100 4000b368: 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) 4000b36c: 80 a2 20 00 cmp %o0, 0 4000b370: 32 80 00 0d bne,a 4000b3a4 4000b374: b0 10 20 00 clr %i0 <== NOT EXECUTED goto failed; iop = rtems_libio_iop_freelist; 4000b378: f0 04 63 90 ld [ %l1 + 0x390 ], %i0 next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); 4000b37c: 92 10 20 00 clr %o1 &sema ); if (rc != RTEMS_SUCCESSFUL) goto failed; iop = rtems_libio_iop_freelist; next = iop->data1; 4000b380: e0 06 20 28 ld [ %i0 + 0x28 ], %l0 (void) memset( iop, 0, sizeof(rtems_libio_t) ); 4000b384: 90 10 00 18 mov %i0, %o0 4000b388: 40 00 0c 7b call 4000e574 4000b38c: 94 10 20 34 mov 0x34, %o2 iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; 4000b390: c2 07 bf f4 ld [ %fp + -12 ], %g1 rtems_libio_iop_freelist = next; 4000b394: e0 24 63 90 st %l0, [ %l1 + 0x390 ] 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; 4000b398: 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; 4000b39c: 82 10 21 00 mov 0x100, %g1 4000b3a0: c2 26 20 0c st %g1, [ %i0 + 0xc ] failed: iop = 0; done: rtems_semaphore_release( rtems_libio_semaphore ); 4000b3a4: 03 10 00 66 sethi %hi(0x40019800), %g1 4000b3a8: 7f ff ec 43 call 400064b4 4000b3ac: d0 00 63 94 ld [ %g1 + 0x394 ], %o0 ! 40019b94 return iop; } 4000b3b0: 81 c7 e0 08 ret 4000b3b4: 81 e8 00 00 restore 40003044 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 40003044: 9d e3 bf 98 save %sp, -104, %sp rtems_status_code rc; int i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 40003048: 21 10 00 63 sethi %hi(0x40018c00), %l0 4000304c: d0 04 22 18 ld [ %l0 + 0x218 ], %o0 ! 40018e18 40003050: 80 a2 20 00 cmp %o0, 0 40003054: 22 80 00 1d be,a 400030c8 40003058: 11 13 10 92 sethi %hi(0x4c424800), %o0 { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 4000305c: 40 00 1f 59 call 4000adc0 40003060: 92 10 20 34 mov 0x34, %o1 40003064: 03 10 00 66 sethi %hi(0x40019800), %g1 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 40003068: 80 a2 20 00 cmp %o0, 0 4000306c: 12 80 00 04 bne 4000307c 40003070: d0 20 63 8c st %o0, [ %g1 + 0x38c ] rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 40003074: 10 80 00 1f b 400030f0 <== NOT EXECUTED 40003078: 90 10 20 1a mov 0x1a, %o0 <== NOT EXECUTED iop = rtems_libio_iop_freelist = rtems_libio_iops; 4000307c: 03 10 00 66 sethi %hi(0x40019800), %g1 for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++) 40003080: c4 04 22 18 ld [ %l0 + 0x218 ], %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; 40003084: d0 20 63 90 st %o0, [ %g1 + 0x390 ] for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++) 40003088: 86 10 20 00 clr %g3 4000308c: 10 80 00 03 b 40003098 40003090: 82 10 00 08 mov %o0, %g1 iop->data1 = iop + 1; 40003094: c2 20 7f f4 st %g1, [ %g1 + -12 ] 40003098: 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++) 4000309c: 80 a0 c0 02 cmp %g3, %g2 400030a0: 12 bf ff fd bne 40003094 400030a4: 82 00 60 34 add %g1, 0x34, %g1 iop->data1 = iop + 1; iop->data1 = NULL; 400030a8: 85 28 e0 02 sll %g3, 2, %g2 400030ac: 83 28 e0 04 sll %g3, 4, %g1 400030b0: 82 20 40 02 sub %g1, %g2, %g1 400030b4: 82 00 40 03 add %g1, %g3, %g1 400030b8: 83 28 60 02 sll %g1, 2, %g1 400030bc: 82 02 00 01 add %o0, %g1, %g1 400030c0: c0 20 7f f4 clr [ %g1 + -12 ] /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 400030c4: 11 13 10 92 sethi %hi(0x4c424800), %o0 400030c8: 92 10 20 01 mov 1, %o1 400030cc: 90 12 21 4f or %o0, 0x14f, %o0 400030d0: 94 10 20 54 mov 0x54, %o2 400030d4: 96 10 20 00 clr %o3 400030d8: 19 10 00 66 sethi %hi(0x40019800), %o4 400030dc: 40 00 0c 09 call 40006100 400030e0: 98 13 23 94 or %o4, 0x394, %o4 ! 40019b94 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 400030e4: 80 a2 20 00 cmp %o0, 0 400030e8: 02 80 00 04 be 400030f8 400030ec: 01 00 00 00 nop rtems_fatal_error_occurred( rc ); 400030f0: 40 00 0e 6c call 40006aa0 <== NOT EXECUTED 400030f4: 01 00 00 00 nop <== NOT EXECUTED /* * Initialize the base file system infrastructure. */ rtems_filesystem_initialize(); 400030f8: 40 00 1e f0 call 4000acb8 400030fc: 81 e8 00 00 restore 40003100: 01 00 00 00 nop 40021868 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 40021868: 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); 4002186c: 90 10 20 00 clr %o0 40021870: 92 10 20 00 clr %o1 40021874: 40 00 06 9e call 400232ec 40021878: 94 07 bf f4 add %fp, -12, %o2 if (sc != RTEMS_SUCCESSFUL) return sc; 4002187c: b0 92 20 00 orcc %o0, 0, %i0 40021880: 12 80 00 19 bne 400218e4 40021884: 23 10 01 24 sethi %hi(0x40049000), %l1 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 40021888: c4 04 60 94 ld [ %l1 + 0x94 ], %g2 ! 40049094 4002188c: 03 10 01 77 sethi %hi(0x4005dc00), %g1 40021890: 82 10 63 ec or %g1, 0x3ec, %g1 ! 4005dfec 40021894: 80 a0 80 01 cmp %g2, %g1 40021898: 12 80 00 16 bne 400218f0 4002189c: a4 14 60 94 or %l1, 0x94, %l2 rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 400218a0: 7f ff 94 85 call 40006ab4 400218a4: 90 10 20 40 mov 0x40, %o0 if (!tmp) 400218a8: a0 92 20 00 orcc %o0, 0, %l0 400218ac: 12 80 00 04 bne 400218bc 400218b0: 92 10 00 12 mov %l2, %o1 400218b4: 81 c7 e0 08 ret <== NOT EXECUTED 400218b8: 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); 400218bc: 90 10 20 00 clr %o0 400218c0: 15 10 00 85 sethi %hi(0x40021400), %o2 400218c4: 40 00 07 8b call 400236f0 400218c8: 94 12 a3 38 or %o2, 0x338, %o2 ! 40021738 if (sc != RTEMS_SUCCESSFUL) { 400218cc: 82 92 20 00 orcc %o0, 0, %g1 400218d0: 22 80 00 07 be,a 400218ec 400218d4: e0 24 60 94 st %l0, [ %l1 + 0x94 ] /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 400218d8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400218dc: 7f ff 92 e4 call 4000646c <== NOT EXECUTED 400218e0: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED 400218e4: 81 c7 e0 08 ret <== NOT EXECUTED 400218e8: 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*/ 400218ec: 23 10 01 24 sethi %hi(0x40049000), %l1 400218f0: d0 04 60 94 ld [ %l1 + 0x94 ], %o0 ! 40049094 400218f4: 94 10 20 40 mov 0x40, %o2 400218f8: 13 10 01 77 sethi %hi(0x4005dc00), %o1 400218fc: 40 00 42 e8 call 4003249c 40021900: 92 12 63 ec or %o1, 0x3ec, %o1 ! 4005dfec rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 40021904: 03 10 01 75 sethi %hi(0x4005d400), %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*/ 40021908: d0 04 60 94 ld [ %l1 + 0x94 ], %o0 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 4002190c: d2 00 63 f8 ld [ %g1 + 0x3f8 ], %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*/ 40021910: c2 07 bf f4 ld [ %fp + -12 ], %g1 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 40021914: 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*/ 40021918: c2 22 00 00 st %g1, [ %o0 ] /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 4002191c: 94 10 20 10 mov 0x10, %o2 40021920: 40 00 42 df call 4003249c 40021924: 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); 40021928: a0 07 bf e4 add %fp, -28, %l0 4002192c: 96 10 20 00 clr %o3 40021930: 25 10 01 0d sethi %hi(0x40043400), %l2 40021934: 92 10 20 00 clr %o1 40021938: 94 10 00 10 mov %l0, %o2 4002193c: 7f ff 92 7a call 40006324 40021940: 90 14 a0 d0 or %l2, 0xd0, %o0 rtems_filesystem_root = loc; 40021944: d0 04 60 94 ld [ %l1 + 0x94 ], %o0 40021948: 92 10 00 10 mov %l0, %o1 4002194c: 94 10 20 10 mov 0x10, %o2 40021950: 40 00 42 d3 call 4003249c 40021954: 90 02 20 14 add %o0, 0x14, %o0 rtems_filesystem_evaluate_path("/", 0, &loc, 0); 40021958: 92 10 20 00 clr %o1 4002195c: 94 10 00 10 mov %l0, %o2 40021960: 90 14 a0 d0 or %l2, 0xd0, %o0 40021964: 7f ff 92 70 call 40006324 40021968: 96 10 20 00 clr %o3 rtems_filesystem_current = loc; 4002196c: d0 04 60 94 ld [ %l1 + 0x94 ], %o0 40021970: 92 10 00 10 mov %l0, %o1 40021974: 90 02 20 04 add %o0, 4, %o0 40021978: 40 00 42 c9 call 4003249c 4002197c: 94 10 20 10 mov 0x10, %o2 return RTEMS_SUCCESSFUL; } 40021980: 81 c7 e0 08 ret 40021984: 81 e8 00 00 restore 400217b0 : * 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) { 400217b0: 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); 400217b4: 90 10 20 00 clr %o0 <== NOT EXECUTED 400217b8: 92 10 20 00 clr %o1 <== NOT EXECUTED 400217bc: 40 00 06 cc call 400232ec <== NOT EXECUTED 400217c0: 94 07 bf f0 add %fp, -16, %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 400217c4: 86 92 20 00 orcc %o0, 0, %g3 <== NOT EXECUTED 400217c8: 12 80 00 26 bne 40021860 <== NOT EXECUTED 400217cc: 03 10 01 24 sethi %hi(0x40049000), %g1 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 400217d0: e0 00 60 94 ld [ %g1 + 0x94 ], %l0 ! 40049094 <== NOT EXECUTED 400217d4: 92 10 60 94 or %g1, 0x94, %o1 <== NOT EXECUTED 400217d8: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED 400217dc: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 400217e0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400217e4: 32 80 00 0a bne,a 4002180c <== NOT EXECUTED 400217e8: 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); 400217ec: 40 00 07 ed call 400237a0 <== NOT EXECUTED 400217f0: 01 00 00 00 nop <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 400217f4: 86 92 20 00 orcc %o0, 0, %g3 <== NOT EXECUTED 400217f8: 12 80 00 1a bne 40021860 <== NOT EXECUTED 400217fc: 01 00 00 00 nop <== NOT EXECUTED free_user_env(tmp); 40021800: 7f ff ff ce call 40021738 <== NOT EXECUTED 40021804: 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, 40021808: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4002180c: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 40021810: 31 10 01 24 sethi %hi(0x40049000), %i0 <== NOT EXECUTED 40021814: a0 16 20 94 or %i0, 0x94, %l0 ! 40049094 <== NOT EXECUTED 40021818: 40 00 08 07 call 40023834 <== NOT EXECUTED 4002181c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 40021820: 86 92 20 00 orcc %o0, 0, %g3 <== NOT EXECUTED 40021824: 12 80 00 0c bne 40021854 <== NOT EXECUTED 40021828: 03 10 01 77 sethi %hi(0x4005dc00), %g1 <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 4002182c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40021830: 15 10 00 85 sethi %hi(0x40021400), %o2 <== NOT EXECUTED 40021834: 40 00 07 af call 400236f0 <== NOT EXECUTED 40021838: 94 12 a3 38 or %o2, 0x338, %o2 ! 40021738 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 4002183c: 86 92 20 00 orcc %o0, 0, %g3 <== NOT EXECUTED 40021840: 12 80 00 05 bne 40021854 <== NOT EXECUTED 40021844: 03 10 01 77 sethi %hi(0x4005dc00), %g1 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 40021848: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4002184c: 10 80 00 05 b 40021860 <== NOT EXECUTED 40021850: c2 26 20 94 st %g1, [ %i0 + 0x94 ] <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 40021854: 05 10 01 24 sethi %hi(0x40049000), %g2 <== NOT EXECUTED 40021858: 82 10 63 ec or %g1, 0x3ec, %g1 <== NOT EXECUTED 4002185c: c2 20 a0 94 st %g1, [ %g2 + 0x94 ] <== NOT EXECUTED return sc; } 40021860: 81 c7 e0 08 ret <== NOT EXECUTED 40021864: 91 e8 00 03 restore %g0, %g3, %o0 <== NOT EXECUTED 40006bb0 : * size and thus we skip updating the statistics. */ void rtems_malloc_statistics_at_free( void *pointer ) { 40006bb0: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED size_t size; if (_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, pointer, &size) ) { 40006bb4: 11 10 01 75 sethi %hi(0x4005d400), %o0 <== NOT EXECUTED 40006bb8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40006bbc: 90 12 23 70 or %o0, 0x370, %o0 <== NOT EXECUTED 40006bc0: 40 00 15 57 call 4000c11c <_Protected_heap_Get_block_size> <== NOT EXECUTED 40006bc4: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 40006bc8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED 40006bcc: 02 80 00 08 be 40006bec <== NOT EXECUTED 40006bd0: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED MSBUMP(lifetime_freed, size); 40006bd4: 03 10 01 75 sethi %hi(0x4005d400), %g1 <== NOT EXECUTED 40006bd8: 82 10 63 c8 or %g1, 0x3c8, %g1 ! 4005d7c8 <== NOT EXECUTED 40006bdc: d8 18 60 28 ldd [ %g1 + 0x28 ], %o4 <== NOT EXECUTED 40006be0: 86 83 40 02 addcc %o5, %g2, %g3 <== NOT EXECUTED 40006be4: 84 43 20 00 addx %o4, 0, %g2 <== NOT EXECUTED 40006be8: c4 38 60 28 std %g2, [ %g1 + 0x28 ] <== NOT EXECUTED 40006bec: 81 c7 e0 08 ret <== NOT EXECUTED 40006bf0: 81 e8 00 00 restore <== NOT EXECUTED 40006bf4 : } void rtems_malloc_statistics_at_malloc( void *pointer ) { 40006bf4: 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 ) 40006bf8: 92 96 20 00 orcc %i0, 0, %o1 <== NOT EXECUTED 40006bfc: 02 80 00 13 be 40006c48 <== NOT EXECUTED 40006c00: 11 10 01 75 sethi %hi(0x4005d400), %o0 <== NOT EXECUTED void rtems_malloc_statistics_at_malloc( void *pointer ) { size_t actual_size = 0; 40006c04: 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); 40006c08: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 40006c0c: 40 00 15 44 call 4000c11c <_Protected_heap_Get_block_size> <== NOT EXECUTED 40006c10: 90 12 23 70 or %o0, 0x370, %o0 <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 40006c14: 03 10 01 75 sethi %hi(0x4005d400), %g1 <== NOT EXECUTED 40006c18: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED 40006c1c: 96 10 63 c8 or %g1, 0x3c8, %o3 <== NOT EXECUTED 40006c20: d8 1a e0 20 ldd [ %o3 + 0x20 ], %o4 <== NOT EXECUTED current_depth = s->lifetime_allocated - s->lifetime_freed; 40006c24: c2 02 e0 2c ld [ %o3 + 0x2c ], %g1 <== NOT EXECUTED if (current_depth > s->max_depth) 40006c28: 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); 40006c2c: 86 83 40 02 addcc %o5, %g2, %g3 <== NOT EXECUTED 40006c30: 84 43 20 00 addx %o4, 0, %g2 <== NOT EXECUTED 40006c34: c4 3a e0 20 std %g2, [ %o3 + 0x20 ] <== NOT EXECUTED current_depth = s->lifetime_allocated - s->lifetime_freed; 40006c38: 86 20 c0 01 sub %g3, %g1, %g3 <== NOT EXECUTED if (current_depth > s->max_depth) 40006c3c: 80 a0 c0 04 cmp %g3, %g4 <== NOT EXECUTED 40006c40: 38 80 00 02 bgu,a 40006c48 <== NOT EXECUTED 40006c44: c6 22 e0 18 st %g3, [ %o3 + 0x18 ] <== NOT EXECUTED 40006c48: 81 c7 e0 08 ret <== NOT EXECUTED 40006c4c: 81 e8 00 00 restore <== NOT EXECUTED 40006c50 : void rtems_malloc_statistics_initialize( void ) { /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 40006c50: 11 10 01 75 sethi %hi(0x4005d400), %o0 <== NOT EXECUTED 40006c54: 92 10 20 00 clr %o1 <== NOT EXECUTED 40006c58: 90 12 23 c8 or %o0, 0x3c8, %o0 <== NOT EXECUTED 40006c5c: 94 10 20 30 mov 0x30, %o2 <== NOT EXECUTED 40006c60: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40006c64: 40 00 ae 96 call 400326bc <== NOT EXECUTED 40006c68: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40006c6c: 01 00 00 00 nop 40006728 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 40006728: 9d e3 bf 98 save %sp, -104, %sp void *return_this; /* * Parameter error checks */ if ( !pointer ) 4000672c: a0 96 20 00 orcc %i0, 0, %l0 40006730: 02 80 00 1f be 400067ac 40006734: 03 10 00 80 sethi %hi(0x40020000), %g1 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 40006738: c2 00 61 54 ld [ %g1 + 0x154 ], %g1 ! 40020154 <_System_state_Current> 4000673c: 80 a0 60 03 cmp %g1, 3 40006740: 12 80 00 07 bne 4000675c 40006744: c0 24 00 00 clr [ %l0 ] 40006748: 7f ff fb cf call 40005684 4000674c: 01 00 00 00 nop 40006750: 80 8a 20 ff btst 0xff, %o0 40006754: 02 80 00 17 be 400067b0 40006758: b0 10 20 16 mov 0x16, %i0 /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 4000675c: 7f ff fb e4 call 400056ec 40006760: b0 10 20 0c mov 0xc, %i0 /* * Perform the aligned allocation requested */ return_this = _Protected_heap_Allocate_aligned( 40006764: 92 10 00 1a mov %i2, %o1 40006768: 94 10 00 19 mov %i1, %o2 4000676c: 11 10 00 7f sethi %hi(0x4001fc00), %o0 40006770: 40 00 13 37 call 4000b44c <_Protected_heap_Allocate_aligned> 40006774: 90 12 21 e0 or %o0, 0x1e0, %o0 ! 4001fde0 &RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 40006778: b4 92 20 00 orcc %o0, 0, %i2 4000677c: 02 80 00 0d be 400067b0 40006780: 03 10 00 7d sethi %hi(0x4001f400), %g1 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 40006784: c2 00 62 34 ld [ %g1 + 0x234 ], %g1 ! 4001f634 40006788: 80 a0 60 00 cmp %g1, 0 4000678c: 22 80 00 06 be,a 400067a4 40006790: f4 24 00 00 st %i2, [ %l0 ] (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 40006794: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 40006798: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000679c: 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; 400067a0: f4 24 00 00 st %i2, [ %l0 ] <== NOT EXECUTED 400067a4: 81 c7 e0 08 ret 400067a8: 91 e8 20 00 restore %g0, 0, %o0 return 0; 400067ac: b0 10 20 16 mov 0x16, %i0 } 400067b0: 81 c7 e0 08 ret 400067b4: 81 e8 00 00 restore 40007378 : void rtems_panic( const char *printf_format, ... ) { 40007378: 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); 4000737c: 11 08 00 00 sethi %hi(0x20000000), %o0 <== NOT EXECUTED ... ) { va_list arglist; va_start(arglist, printf_format); 40007380: 94 07 a0 48 add %fp, 0x48, %o2 <== NOT EXECUTED 40007384: f2 27 a0 48 st %i1, [ %fp + 0x48 ] <== NOT EXECUTED 40007388: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 4000738c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 40007390: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 40007394: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 40007398: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000739c: 7f ff ff 88 call 400071bc <== NOT EXECUTED 400073a0: d4 27 bf f4 st %o2, [ %fp + -12 ] <== NOT EXECUTED va_end(arglist); } 400073a4: 81 c7 e0 08 ret <== NOT EXECUTED 400073a8: 81 e8 00 00 restore <== NOT EXECUTED 4000f980 : void *internal_start, void *external_start, uint32_t length, Objects_Id *id ) { 4000f980: 9d e3 bf 98 save %sp, -104, %sp register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name) ) 4000f984: a2 96 20 00 orcc %i0, 0, %l1 4000f988: 02 80 00 14 be 4000f9d8 4000f98c: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 4000f990: 80 a7 20 00 cmp %i4, 0 4000f994: 02 80 00 24 be 4000fa24 4000f998: 82 16 80 19 or %i2, %i1, %g1 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 4000f99c: 80 88 60 07 btst 7, %g1 4000f9a0: 12 80 00 0e bne 4000f9d8 4000f9a4: b0 10 20 09 mov 9, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000f9a8: 05 10 00 cf sethi %hi(0x40033c00), %g2 4000f9ac: c2 00 a2 10 ld [ %g2 + 0x210 ], %g1 ! 40033e10 <_Thread_Dispatch_disable_level> 4000f9b0: 82 00 60 01 inc %g1 4000f9b4: c2 20 a2 10 st %g1, [ %g2 + 0x210 ] * of free port control blocks. */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) 4000f9b8: 21 10 00 ce sethi %hi(0x40033800), %l0 4000f9bc: 40 00 13 e0 call 4001493c <_Objects_Allocate> 4000f9c0: 90 14 23 8c or %l0, 0x38c, %o0 ! 40033b8c <_Dual_ported_memory_Information> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 4000f9c4: 80 a2 20 00 cmp %o0, 0 4000f9c8: 32 80 00 06 bne,a 4000f9e0 4000f9cc: c4 02 20 08 ld [ %o0 + 8 ], %g2 _Thread_Enable_dispatch(); 4000f9d0: 40 00 17 9a call 40015838 <_Thread_Enable_dispatch> 4000f9d4: b0 10 20 05 mov 5, %i0 4000f9d8: 81 c7 e0 08 ret 4000f9dc: 81 e8 00 00 restore #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4000f9e0: 82 14 23 8c or %l0, 0x38c, %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4000f9e4: e2 22 20 0c st %l1, [ %o0 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4000f9e8: 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; 4000f9ec: 82 06 ff ff add %i3, -1, %g1 4000f9f0: c2 22 20 18 st %g1, [ %o0 + 0x18 ] &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 4000f9f4: c4 27 00 00 st %g2, [ %i4 ] 4000f9f8: 03 00 00 3f sethi %hi(0xfc00), %g1 4000f9fc: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000fa00: 84 08 80 01 and %g2, %g1, %g2 4000fa04: 85 28 a0 02 sll %g2, 2, %g2 if ( !the_port ) { _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 4000fa08: f2 22 20 10 st %i1, [ %o0 + 0x10 ] the_port->external_base = external_start; 4000fa0c: f4 22 20 14 st %i2, [ %o0 + 0x14 ] 4000fa10: d0 20 c0 02 st %o0, [ %g3 + %g2 ] &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; _Thread_Enable_dispatch(); 4000fa14: 40 00 17 89 call 40015838 <_Thread_Enable_dispatch> 4000fa18: b0 10 20 00 clr %i0 4000fa1c: 81 c7 e0 08 ret 4000fa20: 81 e8 00 00 restore return RTEMS_SUCCESSFUL; 4000fa24: b0 10 20 09 mov 9, %i0 <== NOT EXECUTED } 4000fa28: 81 c7 e0 08 ret <== NOT EXECUTED 4000fa2c: 81 e8 00 00 restore <== NOT EXECUTED 40007590 : rtems_status_code rtems_rate_monotonic_period( Objects_Id id, rtems_interval length ) { 40007590: 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 *) 40007594: 11 10 00 7b sethi %hi(0x4001ec00), %o0 40007598: 92 10 00 18 mov %i0, %o1 4000759c: 90 12 20 14 or %o0, 0x14, %o0 400075a0: 40 00 08 e4 call 40009930 <_Objects_Get> 400075a4: 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 ) { 400075a8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400075ac: 80 a0 60 00 cmp %g1, 0 400075b0: 12 80 00 64 bne 40007740 400075b4: a2 10 00 08 mov %o0, %l1 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 400075b8: 27 10 00 7b sethi %hi(0x4001ec00), %l3 400075bc: c4 02 20 50 ld [ %o0 + 0x50 ], %g2 400075c0: c2 04 e2 50 ld [ %l3 + 0x250 ], %g1 400075c4: 80 a0 80 01 cmp %g2, %g1 400075c8: 02 80 00 06 be 400075e0 400075cc: 80 a6 60 00 cmp %i1, 0 _Thread_Enable_dispatch(); 400075d0: 40 00 0b 2b call 4000a27c <_Thread_Enable_dispatch> 400075d4: b0 10 20 17 mov 0x17, %i0 400075d8: 81 c7 e0 08 ret 400075dc: 81 e8 00 00 restore return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 400075e0: 12 80 00 0c bne 40007610 400075e4: 01 00 00 00 nop switch ( the_period->state ) { 400075e8: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 400075ec: 80 a0 60 00 cmp %g1, 0 400075f0: 02 80 00 50 be 40007730 400075f4: b0 10 20 0b mov 0xb, %i0 400075f8: 82 00 7f fd add %g1, -3, %g1 400075fc: 80 a0 60 01 cmp %g1, 1 40007600: 18 80 00 4c bgu 40007730 40007604: 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(); 40007608: 10 80 00 4a b 40007730 4000760c: b0 10 20 06 mov 6, %i0 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 40007610: 7f ff ed 8c call 40002c40 40007614: 01 00 00 00 nop 40007618: a0 10 00 08 mov %o0, %l0 switch ( the_period->state ) { 4000761c: e4 04 60 38 ld [ %l1 + 0x38 ], %l2 40007620: 80 a4 a0 02 cmp %l2, 2 40007624: 02 80 00 1a be 4000768c 40007628: 80 a4 a0 04 cmp %l2, 4 4000762c: 02 80 00 34 be 400076fc 40007630: 80 a4 a0 00 cmp %l2, 0 40007634: 12 80 00 43 bne 40007740 40007638: 01 00 00 00 nop case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 4000763c: 7f ff ed 85 call 40002c50 40007640: 01 00 00 00 nop /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 40007644: 7f ff ff 5e call 400073bc <_Rate_monotonic_Initiate_statistics> 40007648: 90 10 00 11 mov %l1, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 4000764c: 82 10 20 02 mov 2, %g1 40007650: c2 24 60 38 st %g1, [ %l1 + 0x38 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40007654: 03 10 00 1e sethi %hi(0x40007800), %g1 40007658: 82 10 62 14 or %g1, 0x214, %g1 ! 40007a14 <_Rate_monotonic_Timeout> the_watchdog->id = id; 4000765c: f0 24 60 30 st %i0, [ %l1 + 0x30 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007660: 92 04 60 10 add %l1, 0x10, %o1 40007664: 11 10 00 7b sethi %hi(0x4001ec00), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40007668: f2 24 60 1c st %i1, [ %l1 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4000766c: 90 12 22 70 or %o0, 0x270, %o0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40007670: c0 24 60 18 clr [ %l1 + 0x18 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 40007674: c0 24 60 34 clr [ %l1 + 0x34 ] _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 40007678: f2 24 60 4c st %i1, [ %l1 + 0x4c ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4000767c: c2 24 60 2c st %g1, [ %l1 + 0x2c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007680: 40 00 10 3b call 4000b76c <_Watchdog_Insert> 40007684: b0 10 20 00 clr %i0 40007688: 30 80 00 2a b,a 40007730 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 4000768c: 7f ff ff 68 call 4000742c <_Rate_monotonic_Update_statistics> 40007690: 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; 40007694: 82 10 20 01 mov 1, %g1 the_period->next_length = length; 40007698: 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; 4000769c: c2 24 60 38 st %g1, [ %l1 + 0x38 ] the_period->next_length = length; _ISR_Enable( level ); 400076a0: 7f ff ed 6c call 40002c50 400076a4: 90 10 00 10 mov %l0, %o0 _Thread_Executing->Wait.id = the_period->Object.id; 400076a8: c2 04 e2 50 ld [ %l3 + 0x250 ], %g1 400076ac: c4 04 60 08 ld [ %l1 + 8 ], %g2 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 400076b0: 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; 400076b4: c4 20 60 20 st %g2, [ %g1 + 0x20 ] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 400076b8: 40 00 0d 64 call 4000ac48 <_Thread_Set_state> 400076bc: 13 00 00 10 sethi %hi(0x4000), %o1 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 400076c0: 7f ff ed 60 call 40002c40 400076c4: 01 00 00 00 nop local_state = the_period->state; 400076c8: e0 04 60 38 ld [ %l1 + 0x38 ], %l0 the_period->state = RATE_MONOTONIC_ACTIVE; 400076cc: e4 24 60 38 st %l2, [ %l1 + 0x38 ] _ISR_Enable( level ); 400076d0: 7f ff ed 60 call 40002c50 400076d4: 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 ) 400076d8: 80 a4 20 03 cmp %l0, 3 400076dc: 12 80 00 04 bne 400076ec 400076e0: d0 04 e2 50 ld [ %l3 + 0x250 ], %o0 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 400076e4: 40 00 09 eb call 40009e90 <_Thread_Clear_state> <== NOT EXECUTED 400076e8: 13 00 00 10 sethi %hi(0x4000), %o1 <== NOT EXECUTED _Thread_Enable_dispatch(); 400076ec: 40 00 0a e4 call 4000a27c <_Thread_Enable_dispatch> 400076f0: b0 10 20 00 clr %i0 400076f4: 81 c7 e0 08 ret 400076f8: 81 e8 00 00 restore case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 400076fc: 7f ff ff 4c call 4000742c <_Rate_monotonic_Update_statistics> 40007700: 90 10 00 11 mov %l1, %o0 _ISR_Enable( level ); 40007704: 7f ff ed 53 call 40002c50 40007708: 90 10 00 10 mov %l0, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 4000770c: 82 10 20 02 mov 2, %g1 40007710: 11 10 00 7b sethi %hi(0x4001ec00), %o0 40007714: 92 04 60 10 add %l1, 0x10, %o1 40007718: 90 12 22 70 or %o0, 0x270, %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000771c: f2 24 60 1c st %i1, [ %l1 + 0x1c ] the_period->next_length = length; 40007720: f2 24 60 4c st %i1, [ %l1 + 0x4c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007724: 40 00 10 12 call 4000b76c <_Watchdog_Insert> 40007728: c2 24 60 38 st %g1, [ %l1 + 0x38 ] _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 4000772c: b0 10 20 06 mov 6, %i0 40007730: 40 00 0a d3 call 4000a27c <_Thread_Enable_dispatch> 40007734: 01 00 00 00 nop 40007738: 81 c7 e0 08 ret 4000773c: 81 e8 00 00 restore case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 40007740: 81 c7 e0 08 ret 40007744: 91 e8 20 04 restore %g0, 4, %o0 40010f28 : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 40010f28: 9d e3 bf 90 save %sp, -112, %sp 40010f2c: 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 ) 40010f30: 80 a6 60 00 cmp %i1, 0 40010f34: 02 80 00 2c be 40010fe4 40010f38: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 40010f3c: 03 10 00 cf sethi %hi(0x40033c00), %g1 40010f40: 40 00 09 1b call 400133ac <_API_Mutex_Lock> 40010f44: d0 00 62 c8 ld [ %g1 + 0x2c8 ], %o0 ! 40033ec8 <_RTEMS_Allocator_Mutex> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 40010f48: 92 10 00 10 mov %l0, %o1 40010f4c: 11 10 00 cf sethi %hi(0x40033c00), %o0 40010f50: 94 07 bf f0 add %fp, -16, %o2 40010f54: 40 00 0f d4 call 40014ea4 <_Objects_Get_no_protection> 40010f58: 90 12 20 4c or %o0, 0x4c, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 40010f5c: c2 07 bf f0 ld [ %fp + -16 ], %g1 40010f60: 80 a0 60 00 cmp %g1, 0 40010f64: 02 80 00 05 be 40010f78 40010f68: a0 10 00 08 mov %o0, %l0 40010f6c: 80 a0 60 01 cmp %g1, 1 40010f70: 10 80 00 0f b 40010fac 40010f74: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 40010f78: 92 10 00 19 mov %i1, %o1 40010f7c: 94 10 00 1a mov %i2, %o2 40010f80: 90 02 20 68 add %o0, 0x68, %o0 40010f84: 96 07 bf f4 add %fp, -12, %o3 40010f88: 40 00 0c 0a call 40013fb0 <_Heap_Extend> 40010f8c: b0 10 20 09 mov 9, %i0 starting_address, length, &amount_extended ); switch ( heap_status ) { 40010f90: 80 a2 20 01 cmp %o0, 1 40010f94: 02 80 00 12 be 40010fdc 40010f98: 03 10 00 cf sethi %hi(0x40033c00), %g1 40010f9c: 0a 80 00 08 bcs 40010fbc 40010fa0: c6 07 bf f4 ld [ %fp + -12 ], %g3 40010fa4: 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; 40010fa8: b0 10 20 18 mov 0x18, %i0 starting_address, length, &amount_extended ); switch ( heap_status ) { 40010fac: 32 80 00 0b bne,a 40010fd8 40010fb0: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 40010fb4: 10 80 00 0a b 40010fdc 40010fb8: 03 10 00 cf sethi %hi(0x40033c00), %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 40010fbc: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 the_region->maximum_segment_size += amount_extended; 40010fc0: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 40010fc4: 84 00 80 03 add %g2, %g3, %g2 the_region->maximum_segment_size += amount_extended; 40010fc8: 82 00 40 03 add %g1, %g3, %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 40010fcc: c4 24 20 54 st %g2, [ %l0 + 0x54 ] the_region->maximum_segment_size += amount_extended; 40010fd0: c2 24 20 5c st %g1, [ %l0 + 0x5c ] 40010fd4: b0 10 20 00 clr %i0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 40010fd8: 03 10 00 cf sethi %hi(0x40033c00), %g1 40010fdc: 40 00 09 0a call 40013404 <_API_Mutex_Unlock> 40010fe0: d0 00 62 c8 ld [ %g1 + 0x2c8 ], %o0 ! 40033ec8 <_RTEMS_Allocator_Mutex> return return_status; } 40010fe4: 81 c7 e0 08 ret 40010fe8: 81 e8 00 00 restore 400112f0 : Objects_Id id, void *segment, size_t size, size_t *old_size ) { 400112f0: 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 ) 400112f4: 80 a6 e0 00 cmp %i3, 0 400112f8: 02 80 00 32 be 400113c0 400112fc: 21 10 00 cf sethi %hi(0x40033c00), %l0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 40011300: 40 00 08 2b call 400133ac <_API_Mutex_Lock> 40011304: d0 04 22 c8 ld [ %l0 + 0x2c8 ], %o0 ! 40033ec8 <_RTEMS_Allocator_Mutex> 40011308: 92 10 00 18 mov %i0, %o1 4001130c: 11 10 00 cf sethi %hi(0x40033c00), %o0 40011310: 94 07 bf f0 add %fp, -16, %o2 40011314: 40 00 0e e4 call 40014ea4 <_Objects_Get_no_protection> 40011318: 90 12 20 4c or %o0, 0x4c, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 4001131c: c2 07 bf f0 ld [ %fp + -16 ], %g1 40011320: 80 a0 60 00 cmp %g1, 0 40011324: 02 80 00 0b be 40011350 40011328: b0 10 00 08 mov %o0, %i0 4001132c: 82 18 60 01 xor %g1, 1, %g1 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 40011330: d0 04 22 c8 ld [ %l0 + 0x2c8 ], %o0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 40011334: 80 a0 00 01 cmp %g0, %g1 40011338: 82 40 3f ff addx %g0, -1, %g1 4001133c: b0 08 7f eb and %g1, -21, %i0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 40011340: 40 00 08 31 call 40013404 <_API_Mutex_Unlock> 40011344: b0 06 20 19 add %i0, 0x19, %i0 40011348: 81 c7 e0 08 ret 4001134c: 81 e8 00 00 restore case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 40011350: 94 10 00 1a mov %i2, %o2 40011354: 92 10 00 19 mov %i1, %o1 40011358: 90 02 20 68 add %o0, 0x68, %o0 4001135c: 96 07 bf ec add %fp, -20, %o3 40011360: 40 00 0c 94 call 400145b0 <_Heap_Resize_block> 40011364: 98 07 bf f4 add %fp, -12, %o4 segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 40011368: c2 07 bf ec ld [ %fp + -20 ], %g1 _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 4001136c: b4 92 20 00 orcc %o0, 0, %i2 40011370: 12 80 00 0b bne 4001139c 40011374: c2 26 c0 00 st %g1, [ %i3 ] 40011378: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4001137c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40011380: 02 80 00 08 be 400113a0 <== NOT EXECUTED 40011384: 03 10 00 cf sethi %hi(0x40033c00), %g1 <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ 40011388: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001138c: 40 00 21 59 call 400198f0 <_Region_Process_queue> <== NOT EXECUTED 40011390: b0 10 20 00 clr %i0 <== NOT EXECUTED 40011394: 81 c7 e0 08 ret <== NOT EXECUTED 40011398: 81 e8 00 00 restore <== NOT EXECUTED else _RTEMS_Unlock_allocator(); 4001139c: 03 10 00 cf sethi %hi(0x40033c00), %g1 400113a0: d0 00 62 c8 ld [ %g1 + 0x2c8 ], %o0 ! 40033ec8 <_RTEMS_Allocator_Mutex> 400113a4: 40 00 08 18 call 40013404 <_API_Mutex_Unlock> 400113a8: b0 10 20 00 clr %i0 return 400113ac: 80 a6 a0 00 cmp %i2, 0 400113b0: 02 bf ff e6 be 40011348 400113b4: 80 a6 a0 01 cmp %i2, 1 400113b8: 02 bf ff e4 be 40011348 400113bc: b0 10 20 0d mov 0xd, %i0 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 400113c0: b0 10 20 09 mov 9, %i0 } 400113c4: 81 c7 e0 08 ret 400113c8: 81 e8 00 00 restore 40006100 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 40006100: 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 ) ) 40006104: a4 96 20 00 orcc %i0, 0, %l2 40006108: 02 80 00 23 be 40006194 4000610c: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 40006110: 80 a7 20 00 cmp %i4, 0 40006114: 02 80 00 20 be 40006194 40006118: b0 10 20 09 mov 9, %i0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 4000611c: 84 8e a0 c0 andcc %i2, 0xc0, %g2 40006120: 02 80 00 0d be 40006154 40006124: 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); 40006128: 82 0e a0 30 and %i2, 0x30, %g1 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 4000612c: 80 a0 60 10 cmp %g1, 0x10 40006130: 02 80 00 04 be 40006140 40006134: 80 a0 60 20 cmp %g1, 0x20 40006138: 32 80 00 17 bne,a 40006194 4000613c: b0 10 20 0b mov 0xb, %i0 40006140: 80 8e a0 04 btst 4, %i2 40006144: 02 80 00 64 be 400062d4 40006148: 80 a0 a0 c0 cmp %g2, 0xc0 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 4000614c: 02 80 00 62 be 400062d4 40006150: 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 ) ) 40006154: 02 80 00 04 be 40006164 40006158: 80 a6 60 01 cmp %i1, 1 4000615c: 18 80 00 0e bgu 40006194 40006160: b0 10 20 0a mov 0xa, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006164: 03 10 00 67 sethi %hi(0x40019c00), %g1 40006168: c4 00 61 60 ld [ %g1 + 0x160 ], %g2 ! 40019d60 <_Thread_Dispatch_disable_level> 4000616c: 84 00 a0 01 inc %g2 40006170: c4 20 61 60 st %g2, [ %g1 + 0x160 ] * 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 ); 40006174: 11 10 00 67 sethi %hi(0x40019c00), %o0 40006178: 40 00 05 57 call 400076d4 <_Objects_Allocate> 4000617c: 90 12 20 2c or %o0, 0x2c, %o0 ! 40019c2c <_Semaphore_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 40006180: a0 92 20 00 orcc %o0, 0, %l0 40006184: 12 80 00 06 bne 4000619c 40006188: 80 a4 60 00 cmp %l1, 0 _Thread_Enable_dispatch(); 4000618c: 40 00 08 ff call 40008588 <_Thread_Enable_dispatch> 40006190: b0 10 20 05 mov 5, %i0 40006194: 81 c7 e0 08 ret 40006198: 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 ) ) { 4000619c: 02 80 00 33 be 40006268 400061a0: f4 24 20 10 st %i2, [ %l0 + 0x10 ] CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 400061a4: 80 8e a0 40 btst 0x40, %i2 400061a8: 12 80 00 06 bne 400061c0 400061ac: 82 10 20 02 mov 2, %g1 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 400061b0: 80 8e a0 80 btst 0x80, %i2 400061b4: 02 80 00 05 be 400061c8 400061b8: 80 8e a0 04 btst 4, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 400061bc: 82 10 20 03 mov 3, %g1 400061c0: 10 80 00 05 b 400061d4 400061c4: c2 27 bf e8 st %g1, [ %fp + -24 ] else if ( _Attributes_Is_priority( attribute_set ) ) 400061c8: 12 bf ff fe bne 400061c0 400061cc: 82 10 20 01 mov 1, %g1 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; 400061d0: c0 27 bf e8 clr [ %fp + -24 ] if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 400061d4: 80 a4 60 10 cmp %l1, 0x10 400061d8: 12 80 00 0f bne 40006214 400061dc: 82 10 20 02 mov 2, %g1 the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 400061e0: c2 07 bf e8 ld [ %fp + -24 ], %g1 400061e4: 80 a0 60 01 cmp %g1, 1 400061e8: 08 80 00 07 bleu 40006204 400061ec: c0 27 bf e0 clr [ %fp + -32 ] 400061f0: 80 a0 60 03 cmp %g1, 3 400061f4: 38 80 00 0b bgu,a 40006220 400061f8: 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; 400061fc: 10 80 00 04 b 4000620c 40006200: 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; 40006204: 10 80 00 06 b 4000621c 40006208: 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; 4000620c: 10 80 00 04 b 4000621c 40006210: 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; 40006214: 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; 40006218: 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( 4000621c: 82 1e 60 01 xor %i1, 1, %g1 40006220: 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; 40006224: f6 27 bf ec st %i3, [ %fp + -20 ] mutex_status = _CORE_mutex_Initialize( 40006228: 94 60 3f ff subx %g0, -1, %o2 4000622c: 90 04 20 14 add %l0, 0x14, %o0 40006230: 40 00 03 2a call 40006ed8 <_CORE_mutex_Initialize> 40006234: 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 ) { 40006238: 80 a2 20 06 cmp %o0, 6 4000623c: 32 80 00 19 bne,a 400062a0 40006240: 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 ); 40006244: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40006248: 11 10 00 67 sethi %hi(0x40019c00), %o0 <== NOT EXECUTED 4000624c: 90 12 20 2c or %o0, 0x2c, %o0 ! 40019c2c <_Semaphore_Information> <== NOT EXECUTED 40006250: 40 00 06 0e call 40007a88 <_Objects_Free> <== NOT EXECUTED 40006254: b0 10 20 13 mov 0x13, %i0 <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 40006258: 40 00 08 cc call 40008588 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000625c: 01 00 00 00 nop <== NOT EXECUTED 40006260: 81 c7 e0 08 ret <== NOT EXECUTED 40006264: 81 e8 00 00 restore <== NOT EXECUTED return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) 40006268: 80 8e a0 04 btst 4, %i2 4000626c: 22 80 00 04 be,a 4000627c 40006270: c0 27 bf f4 clr [ %fp + -12 ] the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 40006274: 82 10 20 01 mov 1, %g1 40006278: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 4000627c: 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; 40006280: c0 27 bf e0 clr [ %fp + -32 ] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; 40006284: c0 27 bf ec clr [ %fp + -20 ] _CORE_semaphore_Initialize( 40006288: 94 10 00 19 mov %i1, %o2 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 4000628c: 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( 40006290: 90 04 20 14 add %l0, 0x14, %o0 40006294: 40 00 03 e8 call 40007234 <_CORE_semaphore_Initialize> 40006298: 92 07 bf f0 add %fp, -16, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4000629c: c4 04 20 08 ld [ %l0 + 8 ], %g2 400062a0: 03 10 00 67 sethi %hi(0x40019c00), %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 400062a4: e4 24 20 0c st %l2, [ %l0 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 400062a8: c6 00 60 48 ld [ %g1 + 0x48 ], %g3 &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 400062ac: c4 27 00 00 st %g2, [ %i4 ] 400062b0: 03 00 00 3f sethi %hi(0xfc00), %g1 400062b4: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400062b8: 84 08 80 01 and %g2, %g1, %g2 400062bc: 85 28 a0 02 sll %g2, 2, %g2 the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 400062c0: b0 10 20 00 clr %i0 400062c4: 40 00 08 b1 call 40008588 <_Thread_Enable_dispatch> 400062c8: e0 20 c0 02 st %l0, [ %g3 + %g2 ] 400062cc: 81 c7 e0 08 ret 400062d0: 81 e8 00 00 restore return RTEMS_SUCCESSFUL; 400062d4: b0 10 20 0b mov 0xb, %i0 } 400062d8: 81 c7 e0 08 ret 400062dc: 81 e8 00 00 restore 4002324c : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 4002324c: 9d e3 bf 90 save %sp, -112, %sp 40023250: 11 10 01 76 sethi %hi(0x4005d800), %o0 40023254: 92 10 00 18 mov %i0, %o1 40023258: 90 12 20 10 or %o0, 0x10, %o0 4002325c: 7f ff a2 fa call 4000be44 <_Objects_Get> 40023260: 94 07 bf f4 add %fp, -12, %o2 register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 40023264: c2 07 bf f4 ld [ %fp + -12 ], %g1 40023268: 80 a0 60 00 cmp %g1, 0 4002326c: 12 80 00 0f bne 400232a8 40023270: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 40023274: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40023278: 80 88 60 30 btst 0x30, %g1 4002327c: 02 80 00 06 be 40023294 40023280: 90 02 20 14 add %o0, 0x14, %o0 _CORE_mutex_Flush( 40023284: 92 10 20 00 clr %o1 40023288: 7f ff 9f 2b call 4000af34 <_CORE_mutex_Flush> 4002328c: 94 10 20 01 mov 1, %o2 40023290: 30 80 00 04 b,a 400232a0 &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 40023294: 92 10 20 00 clr %o1 <== NOT EXECUTED 40023298: 7f ff 9f fe call 4000b290 <_CORE_semaphore_Flush> <== NOT EXECUTED 4002329c: 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(); 400232a0: 7f ff a5 40 call 4000c7a0 <_Thread_Enable_dispatch> 400232a4: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 400232a8: 81 c7 e0 08 ret 400232ac: 81 e8 00 00 restore 4001728c : */ void rtems_shutdown_executive( uint32_t result ) { 4001728c: 9d e3 bf 10 save %sp, -240, %sp if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 40017290: 05 10 00 67 sethi %hi(0x40019c00), %g2 40017294: c2 00 a3 04 ld [ %g2 + 0x304 ], %g1 ! 40019f04 <_System_state_Current> 40017298: 80 a0 60 04 cmp %g1, 4 4001729c: 02 80 00 07 be 400172b8 400172a0: 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 ); 400172a4: 13 10 00 67 sethi %hi(0x40019c00), %o1 400172a8: c2 20 a3 04 st %g1, [ %g2 + 0x304 ] 400172ac: 92 12 60 d8 or %o1, 0xd8, %o1 400172b0: 7f ff c9 f8 call 40009a90 <_CPU_Context_switch> 400172b4: 90 07 bf 70 add %fp, -144, %o0 400172b8: 81 c7 e0 08 ret <== NOT EXECUTED 400172bc: 81 e8 00 00 restore <== NOT EXECUTED 40004ef4 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 40004ef4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 40004ef8: 03 10 01 76 sethi %hi(0x4005d800), %g1 <== NOT EXECUTED 40004efc: c2 00 62 00 ld [ %g1 + 0x200 ], %g1 ! 4005da00 <_Thread_Executing> <== NOT EXECUTED ) { void *sp = __builtin_frame_address(0); #if defined(__GNUC__) if ( sp < the_stack->area ) { 40004f00: d0 00 60 c8 ld [ %g1 + 0xc8 ], %o0 <== NOT EXECUTED 40004f04: 80 a7 80 08 cmp %fp, %o0 <== NOT EXECUTED 40004f08: 0a 80 00 07 bcs 40004f24 <== NOT EXECUTED 40004f0c: b0 10 20 00 clr %i0 <== NOT EXECUTED 40004f10: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 <== NOT EXECUTED 40004f14: 82 02 00 01 add %o0, %g1, %g1 <== NOT EXECUTED 40004f18: 80 a0 40 1e cmp %g1, %fp <== NOT EXECUTED 40004f1c: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED 40004f20: 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 ) { 40004f24: 03 10 01 29 sethi %hi(0x4004a400), %g1 <== NOT EXECUTED 40004f28: c2 00 61 b8 ld [ %g1 + 0x1b8 ], %g1 ! 4004a5b8 <== NOT EXECUTED 40004f2c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004f30: 02 80 00 0a be 40004f58 <== NOT EXECUTED 40004f34: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED pattern_ok = (!memcmp( 40004f38: 90 02 20 08 add %o0, 8, %o0 <== NOT EXECUTED 40004f3c: 13 10 01 75 sethi %hi(0x4005d400), %o1 <== NOT EXECUTED 40004f40: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 40004f44: 40 00 b5 28 call 400323e4 <== NOT EXECUTED 40004f48: 92 12 63 3c or %o1, 0x33c, %o1 <== NOT EXECUTED 40004f4c: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 40004f50: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED 40004f54: 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 ) 40004f58: 80 8e 20 ff btst 0xff, %i0 <== NOT EXECUTED 40004f5c: 02 80 00 04 be 40004f6c <== NOT EXECUTED 40004f60: 80 8a 60 ff btst 0xff, %o1 <== NOT EXECUTED 40004f64: 12 80 00 07 bne 40004f80 <== NOT EXECUTED 40004f68: 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 ); 40004f6c: 03 10 01 76 sethi %hi(0x4005d800), %g1 <== NOT EXECUTED 40004f70: d0 00 62 00 ld [ %g1 + 0x200 ], %o0 ! 4005da00 <_Thread_Executing> <== NOT EXECUTED 40004f74: 92 0a 60 01 and %o1, 1, %o1 <== NOT EXECUTED 40004f78: 7f ff ff c6 call 40004e90 <== NOT EXECUTED 40004f7c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return true; } 40004f80: 81 c7 e0 08 ret <== NOT EXECUTED 40004f84: 81 e8 00 00 restore <== NOT EXECUTED 40004e74 : void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 40004e74: 13 10 00 1e sethi %hi(0x40007800), %o1 <== NOT EXECUTED 40004e78: 90 10 20 00 clr %o0 <== NOT EXECUTED 40004e7c: 92 12 61 e4 or %o1, 0x1e4, %o1 <== NOT EXECUTED 40004e80: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40004e84: 7f ff ff e6 call 40004e1c <== NOT EXECUTED 40004e88: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40004e8c: 01 00 00 00 nop 40004e1c : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 40004e1c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED print_context = context; 40004e20: 23 10 01 29 sethi %hi(0x4004a400), %l1 <== NOT EXECUTED print_handler = print; 40004e24: 21 10 01 29 sethi %hi(0x4004a400), %l0 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 40004e28: f0 24 61 bc st %i0, [ %l1 + 0x1bc ] <== NOT EXECUTED print_handler = print; 40004e2c: f2 24 21 c0 st %i1, [ %l0 + 0x1c0 ] <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 40004e30: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40004e34: 13 10 01 0b sethi %hi(0x40042c00), %o1 <== NOT EXECUTED 40004e38: 9f c6 40 00 call %i1 <== NOT EXECUTED 40004e3c: 92 12 61 f0 or %o1, 0x1f0, %o1 ! 40042df0 <__func__.4894+0x250> <== NOT EXECUTED (*print)( context, 40004e40: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40004e44: 13 10 01 0b sethi %hi(0x40042c00), %o1 <== NOT EXECUTED 40004e48: 9f c6 40 00 call %i1 <== NOT EXECUTED 40004e4c: 92 12 62 08 or %o1, 0x208, %o1 ! 40042e08 <__func__.4894+0x268> <== NOT EXECUTED " ID NAME LOW HIGH CURRENT AVAILABLE USED\n" ); /* iterate over all threads and dump the usage */ rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage ); 40004e50: 11 10 00 13 sethi %hi(0x40004c00), %o0 <== NOT EXECUTED 40004e54: 40 00 1a 3b call 4000b740 <== NOT EXECUTED 40004e58: 90 12 20 c8 or %o0, 0xc8, %o0 ! 40004cc8 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 40004e5c: 7f ff ff 9b call 40004cc8 <== NOT EXECUTED 40004e60: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED print_context = NULL; 40004e64: c0 24 61 bc clr [ %l1 + 0x1bc ] <== NOT EXECUTED print_handler = NULL; 40004e68: c0 24 21 c0 clr [ %l0 + 0x1c0 ] <== NOT EXECUTED } 40004e6c: 81 c7 e0 08 ret <== NOT EXECUTED 40004e70: 81 e8 00 00 restore <== NOT EXECUTED 40004f88 : */ void rtems_stack_checker_switch_extension( Thread_Control *running, Thread_Control *heir ) { 40004f88: 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; 40004f8c: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 ) { void *sp = __builtin_frame_address(0); #if defined(__GNUC__) if ( sp < the_stack->area ) { 40004f90: 80 a7 80 08 cmp %fp, %o0 40004f94: 0a 80 00 07 bcs 40004fb0 40004f98: b2 10 20 00 clr %i1 40004f9c: c2 06 20 c4 ld [ %i0 + 0xc4 ], %g1 40004fa0: 82 02 00 01 add %o0, %g1, %g1 40004fa4: 80 a0 40 1e cmp %g1, %fp 40004fa8: 82 60 3f ff subx %g0, -1, %g1 40004fac: 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, 40004fb0: 90 02 20 08 add %o0, 8, %o0 40004fb4: 13 10 01 75 sethi %hi(0x4005d400), %o1 40004fb8: 94 10 20 10 mov 0x10, %o2 40004fbc: 40 00 b5 0a call 400323e4 40004fc0: 92 12 63 3c or %o1, 0x33c, %o1 40004fc4: 80 a0 00 08 cmp %g0, %o0 40004fc8: 82 60 3f ff subx %g0, -1, %g1 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 40004fcc: 80 8e 60 ff btst 0xff, %i1 40004fd0: 02 80 00 04 be 40004fe0 40004fd4: 80 a0 60 00 cmp %g1, 0 40004fd8: 12 80 00 05 bne 40004fec 40004fdc: 01 00 00 00 nop Stack_check_report_blown_task( running, pattern_ok ); 40004fe0: b2 08 60 01 and %g1, 1, %i1 <== NOT EXECUTED 40004fe4: 7f ff ff ab call 40004e90 <== NOT EXECUTED 40004fe8: 81 e8 00 00 restore <== NOT EXECUTED 40004fec: 81 c7 e0 08 ret 40004ff0: 81 e8 00 00 restore 400071a0 : const char * rtems_status_text( rtems_status_code status ) { 400071a0: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED return rtems_assoc_name_by_local(rtems_status_assoc, status); 400071a4: 11 10 00 90 sethi %hi(0x40024000), %o0 <== NOT EXECUTED 400071a8: 90 12 21 70 or %o0, 0x170, %o0 ! 40024170 <== NOT EXECUTED 400071ac: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400071b0: 40 00 29 2e call 40011668 <== NOT EXECUTED 400071b4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400071b8: 01 00 00 00 nop 40003cb4 : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 40003cb4: 03 10 00 64 sethi %hi(0x40019000), %g1 <== NOT EXECUTED 40003cb8: d0 20 63 2c st %o0, [ %g1 + 0x32c ] ! 4001932c <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 40003cbc: 03 10 00 64 sethi %hi(0x40019000), %g1 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; return RTEMS_SUCCESSFUL; } 40003cc0: 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; 40003cc4: d2 20 63 30 st %o1, [ %g1 + 0x330 ] <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 40003cc8: 03 10 00 64 sethi %hi(0x40019000), %g1 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 40003ccc: 81 c3 e0 08 retl <== NOT EXECUTED 40003cd0: d4 20 63 34 st %o2, [ %g1 + 0x334 ] ! 40019334 <== NOT EXECUTED 40005348 : } } rtems_status_code rtems_termios_close (void *arg) { 40005348: 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); 4000534c: 03 10 00 67 sethi %hi(0x40019c00), %g1 40005350: d0 00 60 20 ld [ %g1 + 0x20 ], %o0 ! 40019c20 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40005354: c2 06 00 00 ld [ %i0 ], %g1 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40005358: 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; 4000535c: e0 00 60 28 ld [ %g1 + 0x28 ], %l0 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40005360: 40 00 04 0e call 40006398 40005364: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) 40005368: 80 a2 20 00 cmp %o0, 0 4000536c: 12 80 00 26 bne 40005404 40005370: 01 00 00 00 nop rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 40005374: c2 04 20 08 ld [ %l0 + 8 ], %g1 40005378: 82 00 7f ff add %g1, -1, %g1 4000537c: 80 a0 60 00 cmp %g1, 0 40005380: 12 80 00 58 bne 400054e0 40005384: c2 24 20 08 st %g1, [ %l0 + 8 ] if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 40005388: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 4000538c: 03 10 00 66 sethi %hi(0x40019800), %g1 40005390: 85 28 a0 05 sll %g2, 5, %g2 40005394: 82 10 60 dc or %g1, 0xdc, %g1 40005398: 82 00 40 02 add %g1, %g2, %g1 4000539c: c2 00 60 04 ld [ %g1 + 4 ], %g1 400053a0: 80 a0 60 00 cmp %g1, 0 400053a4: 02 80 00 06 be 400053bc 400053a8: 01 00 00 00 nop /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 400053ac: 9f c0 40 00 call %g1 <== NOT EXECUTED 400053b0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED * default: just flush output buffer */ drainOutput (tty); } if (tty->device.outputUsesInterrupts 400053b4: 10 80 00 05 b 400053c8 <== NOT EXECUTED 400053b8: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 <== NOT EXECUTED } else { /* * default: just flush output buffer */ drainOutput (tty); 400053bc: 7f ff fd c2 call 40004ac4 400053c0: 90 10 00 10 mov %l0, %o0 } if (tty->device.outputUsesInterrupts 400053c4: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 400053c8: 80 a0 60 02 cmp %g1, 2 400053cc: 32 80 00 10 bne,a 4000540c 400053d0: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 400053d4: d0 04 20 c4 ld [ %l0 + 0xc4 ], %o0 <== NOT EXECUTED 400053d8: 40 00 02 a2 call 40005e60 <== NOT EXECUTED 400053dc: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 400053e0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400053e4: 12 80 00 08 bne 40005404 <== NOT EXECUTED 400053e8: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 400053ec: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0 <== NOT EXECUTED 400053f0: 40 00 02 9c call 40005e60 <== NOT EXECUTED 400053f4: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 400053f8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400053fc: 22 80 00 04 be,a 4000540c <== NOT EXECUTED 40005400: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40005404: 40 00 05 a7 call 40006aa0 <== NOT EXECUTED 40005408: 01 00 00 00 nop <== NOT EXECUTED } if (tty->device.lastClose) 4000540c: 80 a0 60 00 cmp %g1, 0 40005410: 22 80 00 07 be,a 4000542c 40005414: c2 04 00 00 ld [ %l0 ], %g1 (*tty->device.lastClose)(tty->major, tty->minor, arg); 40005418: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED 4000541c: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 <== NOT EXECUTED 40005420: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005424: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED if (tty->forw == NULL) { 40005428: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED 4000542c: 80 a0 60 00 cmp %g1, 0 40005430: 12 80 00 08 bne 40005450 40005434: c4 04 20 04 ld [ %l0 + 4 ], %g2 rtems_termios_ttyTail = tty->back; 40005438: 03 10 00 67 sethi %hi(0x40019c00), %g1 if ( rtems_termios_ttyTail != NULL ) { 4000543c: 80 a0 a0 00 cmp %g2, 0 40005440: 02 80 00 05 be 40005454 40005444: c4 20 60 24 st %g2, [ %g1 + 0x24 ] rtems_termios_ttyTail->forw = NULL; 40005448: 10 80 00 03 b 40005454 <== NOT EXECUTED 4000544c: c0 20 80 00 clr [ %g2 ] <== NOT EXECUTED } } else { tty->forw->back = tty->back; 40005450: c4 20 60 04 st %g2, [ %g1 + 4 ] <== NOT EXECUTED } if (tty->back == NULL) { 40005454: c2 04 20 04 ld [ %l0 + 4 ], %g1 40005458: 80 a0 60 00 cmp %g1, 0 4000545c: 12 80 00 08 bne 4000547c 40005460: c4 04 00 00 ld [ %l0 ], %g2 rtems_termios_ttyHead = tty->forw; 40005464: 03 10 00 67 sethi %hi(0x40019c00), %g1 if ( rtems_termios_ttyHead != NULL ) { 40005468: 80 a0 a0 00 cmp %g2, 0 4000546c: 02 80 00 05 be 40005480 40005470: c4 20 60 28 st %g2, [ %g1 + 0x28 ] rtems_termios_ttyHead->back = NULL; 40005474: 10 80 00 03 b 40005480 <== NOT EXECUTED 40005478: c0 20 a0 04 clr [ %g2 + 4 ] <== NOT EXECUTED } } else { tty->back->forw = tty->forw; 4000547c: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 40005480: 40 00 03 98 call 400062e0 40005484: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 rtems_semaphore_delete (tty->osem); 40005488: 40 00 03 96 call 400062e0 4000548c: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 40005490: 40 00 03 94 call 400062e0 40005494: d0 04 20 8c ld [ %l0 + 0x8c ], %o0 if ((tty->device.pollRead == NULL) || 40005498: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 4000549c: 80 a0 60 00 cmp %g1, 0 400054a0: 02 80 00 06 be 400054b8 400054a4: 01 00 00 00 nop 400054a8: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 400054ac: 80 a0 60 02 cmp %g1, 2 400054b0: 12 80 00 04 bne 400054c0 400054b4: 01 00 00 00 nop (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); 400054b8: 40 00 03 8a call 400062e0 <== NOT EXECUTED 400054bc: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED free (tty->rawInBuf.theBuf); 400054c0: 40 00 16 8a call 4000aee8 400054c4: d0 04 20 58 ld [ %l0 + 0x58 ], %o0 free (tty->rawOutBuf.theBuf); 400054c8: 40 00 16 88 call 4000aee8 400054cc: d0 04 20 7c ld [ %l0 + 0x7c ], %o0 free (tty->cbuf); 400054d0: 40 00 16 86 call 4000aee8 400054d4: d0 04 20 1c ld [ %l0 + 0x1c ], %o0 free (tty); 400054d8: 40 00 16 84 call 4000aee8 400054dc: 90 10 00 10 mov %l0, %o0 } rtems_semaphore_release (rtems_termios_ttyMutex); 400054e0: 03 10 00 67 sethi %hi(0x40019c00), %g1 400054e4: d0 00 60 20 ld [ %g1 + 0x20 ], %o0 ! 40019c20 400054e8: 40 00 03 f3 call 400064b4 400054ec: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 400054f0: 81 c7 e0 08 ret 400054f4: 81 e8 00 00 restore 40003ee0 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 40003ee0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 40003ee4: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40003ee8: c4 06 20 b4 ld [ %i0 + 0xb4 ], %g2 <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 40003eec: 82 00 40 19 add %g1, %i1, %g1 <== NOT EXECUTED 40003ef0: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40003ef4: 80 a0 a0 02 cmp %g2, 2 <== NOT EXECUTED 40003ef8: 12 80 00 0a bne 40003f20 <== NOT EXECUTED 40003efc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 40003f00: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 <== NOT EXECUTED 40003f04: 40 00 07 d7 call 40005e60 <== NOT EXECUTED 40003f08: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 40003f0c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003f10: 02 80 00 11 be 40003f54 <== NOT EXECUTED 40003f14: b0 10 20 00 clr %i0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40003f18: 40 00 0a e2 call 40006aa0 <== NOT EXECUTED 40003f1c: 01 00 00 00 nop <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 40003f20: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 40003f24: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 40003f28: 12 80 00 09 bne 40003f4c <== NOT EXECUTED 40003f2c: 03 10 00 66 sethi %hi(0x40019800), %g1 <== NOT EXECUTED /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 40003f30: c2 00 61 90 ld [ %g1 + 0x190 ], %g1 ! 40019990 <== NOT EXECUTED 40003f34: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003f38: 02 80 00 07 be 40003f54 <== NOT EXECUTED 40003f3c: b0 10 20 00 clr %i0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 40003f40: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003f44: 01 00 00 00 nop <== NOT EXECUTED 40003f48: 30 80 00 03 b,a 40003f54 <== NOT EXECUTED } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 40003f4c: 7f ff ff 68 call 40003cec <== NOT EXECUTED 40003f50: 81 e8 00 00 restore <== NOT EXECUTED } } 40003f54: 81 c7 e0 08 ret <== NOT EXECUTED 40003f58: 81 e8 00 00 restore <== NOT EXECUTED 40003f5c : * 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) { 40003f5c: 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) { 40003f60: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 40003f64: 05 10 00 66 sethi %hi(0x40019800), %g2 <== NOT EXECUTED 40003f68: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40003f6c: 84 10 a0 dc or %g2, 0xdc, %g2 <== NOT EXECUTED 40003f70: 82 00 60 10 add %g1, 0x10, %g1 <== NOT EXECUTED 40003f74: c2 00 80 01 ld [ %g2 + %g1 ], %g1 <== NOT EXECUTED 40003f78: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003f7c: 12 80 00 10 bne 40003fbc <== NOT EXECUTED 40003f80: 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, 40003f84: 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); 40003f88: aa 06 20 30 add %i0, 0x30, %l5 <== NOT EXECUTED 40003f8c: a2 10 20 00 clr %l1 <== NOT EXECUTED 40003f90: 10 80 00 ac b 40004240 <== NOT EXECUTED 40003f94: 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++; 40003f98: d0 0e 40 00 ldub [ %i1 ], %o0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_rint(c,tty); 40003f9c: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40003fa0: 82 00 60 10 add %g1, 0x10, %g1 <== NOT EXECUTED 40003fa4: c2 04 00 01 ld [ %l0 + %g1 ], %g1 <== NOT EXECUTED 40003fa8: 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++; 40003fac: b2 06 60 01 inc %i1 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_rint(c,tty); 40003fb0: 91 3a 20 18 sra %o0, 0x18, %o0 <== NOT EXECUTED 40003fb4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003fb8: 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--) { 40003fbc: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED 40003fc0: 80 a6 bf ff cmp %i2, -1 <== NOT EXECUTED 40003fc4: 32 bf ff f5 bne,a 40003f98 <== NOT EXECUTED 40003fc8: 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 )) { 40003fcc: c2 06 20 e4 ld [ %i0 + 0xe4 ], %g1 <== NOT EXECUTED 40003fd0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003fd4: 12 80 00 a6 bne 4000426c <== NOT EXECUTED 40003fd8: a2 10 20 00 clr %l1 <== NOT EXECUTED 40003fdc: c2 06 20 dc ld [ %i0 + 0xdc ], %g1 <== NOT EXECUTED 40003fe0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003fe4: 22 80 00 a3 be,a 40004270 <== NOT EXECUTED 40003fe8: b0 10 00 11 mov %l1, %i0 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 40003fec: d2 06 20 e0 ld [ %i0 + 0xe0 ], %o1 <== NOT EXECUTED 40003ff0: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003ff4: 90 06 20 30 add %i0, 0x30, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 40003ff8: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40003ffc: a2 10 20 00 clr %l1 <== NOT EXECUTED 40004000: 10 80 00 9b b 4000426c <== NOT EXECUTED 40004004: 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) { 40004008: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 4000400c: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 40004010: 02 80 00 1a be 40004078 <== NOT EXECUTED 40004014: 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]) { 40004018: c4 0e 20 4a ldub [ %i0 + 0x4a ], %g2 <== NOT EXECUTED 4000401c: 83 2d 20 18 sll %l4, 0x18, %g1 <== NOT EXECUTED 40004020: 87 38 60 18 sra %g1, 0x18, %g3 <== NOT EXECUTED 40004024: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 40004028: 12 80 00 0c bne 40004058 <== NOT EXECUTED 4000402c: c2 0e 20 49 ldub [ %i0 + 0x49 ], %g1 <== NOT EXECUTED if (c == tty->termios.c_cc[VSTART]) { 40004030: 82 08 60 ff and %g1, 0xff, %g1 <== NOT EXECUTED 40004034: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 40004038: 12 80 00 05 bne 4000404c <== NOT EXECUTED 4000403c: 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; 40004040: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40004044: 10 80 00 0b b 40004070 <== NOT EXECUTED 40004048: 82 18 60 10 xor %g1, 0x10, %g1 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 4000404c: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40004050: 10 80 00 08 b 40004070 <== NOT EXECUTED 40004054: 82 10 60 10 or %g1, 0x10, %g1 <== NOT EXECUTED } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 40004058: 82 08 60 ff and %g1, 0xff, %g1 <== NOT EXECUTED 4000405c: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 40004060: 12 80 00 07 bne 4000407c <== NOT EXECUTED 40004064: 80 8c a0 ff btst 0xff, %l2 <== NOT EXECUTED /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 40004068: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 4000406c: 82 08 7f ef and %g1, -17, %g1 <== NOT EXECUTED 40004070: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED 40004074: 30 80 00 04 b,a 40004084 <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { 40004078: 80 8c a0 ff btst 0xff, %l2 <== NOT EXECUTED 4000407c: 02 80 00 1d be 400040f0 <== NOT EXECUTED 40004080: 01 00 00 00 nop <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 40004084: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40004088: 82 08 60 30 and %g1, 0x30, %g1 <== NOT EXECUTED 4000408c: 80 a0 60 20 cmp %g1, 0x20 <== NOT EXECUTED 40004090: 12 80 00 6b bne 4000423c <== NOT EXECUTED 40004094: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 40004098: 7f ff f7 30 call 40001d58 <== NOT EXECUTED 4000409c: 01 00 00 00 nop <== NOT EXECUTED 400040a0: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 400040a4: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 400040a8: 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; 400040ac: 82 08 7f df and %g1, -33, %g1 <== NOT EXECUTED 400040b0: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 400040b4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400040b8: 02 80 00 09 be 400040dc <== NOT EXECUTED 400040bc: 01 00 00 00 nop <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 400040c0: d2 06 20 84 ld [ %i0 + 0x84 ], %o1 <== NOT EXECUTED 400040c4: c2 06 20 7c ld [ %i0 + 0x7c ], %g1 <== NOT EXECUTED 400040c8: c4 06 20 a4 ld [ %i0 + 0xa4 ], %g2 <== NOT EXECUTED 400040cc: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 400040d0: 92 00 40 09 add %g1, %o1, %o1 <== NOT EXECUTED 400040d4: 9f c0 80 00 call %g2 <== NOT EXECUTED 400040d8: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 400040dc: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED 400040e0: 7f ff f7 22 call 40001d68 <== NOT EXECUTED 400040e4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 400040e8: 10 80 00 56 b 40004240 <== NOT EXECUTED 400040ec: b2 06 60 01 inc %i1 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 400040f0: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 <== NOT EXECUTED 400040f4: d2 06 20 64 ld [ %i0 + 0x64 ], %o1 <== NOT EXECUTED 400040f8: 40 00 43 70 call 40014eb8 <.urem> <== NOT EXECUTED 400040fc: 90 02 20 01 inc %o0 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 40004100: 7f ff f7 16 call 40001d58 <== NOT EXECUTED 40004104: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 40004108: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 4000410c: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED 40004110: d0 06 20 64 ld [ %i0 + 0x64 ], %o0 <== NOT EXECUTED 40004114: d2 06 20 64 ld [ %i0 + 0x64 ], %o1 <== NOT EXECUTED 40004118: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED 4000411c: 40 00 43 67 call 40014eb8 <.urem> <== NOT EXECUTED 40004120: 90 02 00 10 add %o0, %l0, %o0 <== NOT EXECUTED 40004124: c2 06 20 c0 ld [ %i0 + 0xc0 ], %g1 <== NOT EXECUTED 40004128: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 4000412c: 08 80 00 2d bleu 400041e0 <== NOT EXECUTED 40004130: 01 00 00 00 nop <== NOT EXECUTED 40004134: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40004138: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000413c: 12 80 00 29 bne 400041e0 <== NOT EXECUTED 40004140: 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; 40004144: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40004148: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED 4000414c: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 40004150: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40004154: 82 08 64 02 and %g1, 0x402, %g1 <== NOT EXECUTED 40004158: 80 a0 64 00 cmp %g1, 0x400 <== NOT EXECUTED 4000415c: 12 80 00 13 bne 400041a8 <== NOT EXECUTED 40004160: 01 00 00 00 nop <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 40004164: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40004168: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 4000416c: 12 80 00 06 bne 40004184 <== NOT EXECUTED 40004170: 01 00 00 00 nop <== NOT EXECUTED 40004174: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED 40004178: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000417c: 12 80 00 19 bne 400041e0 <== NOT EXECUTED 40004180: 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; 40004184: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 40004188: c4 06 20 a4 ld [ %i0 + 0xa4 ], %g2 <== NOT EXECUTED 4000418c: 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; 40004190: 82 10 60 02 or %g1, 2, %g1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 40004194: 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; 40004198: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED (*tty->device.write)(tty->minor, 4000419c: 9f c0 80 00 call %g2 <== NOT EXECUTED 400041a0: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 400041a4: 30 80 00 0f b,a 400041e0 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 400041a8: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400041ac: 82 08 61 04 and %g1, 0x104, %g1 <== NOT EXECUTED 400041b0: 80 a0 61 00 cmp %g1, 0x100 <== NOT EXECUTED 400041b4: 12 80 00 0b bne 400041e0 <== NOT EXECUTED 400041b8: 01 00 00 00 nop <== NOT EXECUTED == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 400041bc: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 400041c0: 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; 400041c4: 82 10 60 04 or %g1, 4, %g1 <== NOT EXECUTED 400041c8: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 400041cc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400041d0: 02 80 00 04 be 400041e0 <== NOT EXECUTED 400041d4: 01 00 00 00 nop <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 400041d8: 9f c0 80 00 call %g2 <== NOT EXECUTED 400041dc: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED } } } /* reenable interrupts */ rtems_interrupt_enable(level); 400041e0: 7f ff f6 e2 call 40001d68 <== NOT EXECUTED 400041e4: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 400041e8: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED 400041ec: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 400041f0: 32 80 00 04 bne,a 40004200 <== NOT EXECUTED 400041f4: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 <== NOT EXECUTED dropped++; 400041f8: 10 80 00 11 b 4000423c <== NOT EXECUTED 400041fc: a2 04 60 01 inc %l1 <== NOT EXECUTED } else { tty->rawInBuf.theBuf[newTail] = c; 40004200: 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 )) { 40004204: 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; 40004208: 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 )) { 4000420c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004210: 32 80 00 0c bne,a 40004240 <== NOT EXECUTED 40004214: b2 06 60 01 inc %i1 <== NOT EXECUTED 40004218: c2 06 20 dc ld [ %i0 + 0xdc ], %g1 <== NOT EXECUTED 4000421c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004220: 22 80 00 08 be,a 40004240 <== NOT EXECUTED 40004224: b2 06 60 01 inc %i1 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 40004228: d2 06 20 e0 ld [ %i0 + 0xe0 ], %o1 <== NOT EXECUTED 4000422c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004230: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 40004234: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40004238: c2 26 20 e4 st %g1, [ %i0 + 0xe4 ] <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 4000423c: b2 06 60 01 inc %i1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 40004240: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED 40004244: 80 a6 bf ff cmp %i2, -1 <== NOT EXECUTED 40004248: 12 bf ff 70 bne 40004008 <== NOT EXECUTED 4000424c: 01 00 00 00 nop <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 40004250: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 40004254: d0 06 20 68 ld [ %i0 + 0x68 ], %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 40004258: 82 00 40 11 add %g1, %l1, %g1 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 4000425c: 40 00 08 96 call 400064b4 <== NOT EXECUTED 40004260: c2 26 20 78 st %g1, [ %i0 + 0x78 ] <== NOT EXECUTED return dropped; } 40004264: 81 c7 e0 08 ret <== NOT EXECUTED 40004268: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED 4000426c: b0 10 00 11 mov %l1, %i0 <== NOT EXECUTED 40004270: 81 c7 e0 08 ret <== NOT EXECUTED 40004274: 81 e8 00 00 restore <== NOT EXECUTED 40003c68 : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 40003c68: 9d e3 bf 98 save %sp, -104, %sp rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 40003c6c: 03 10 00 67 sethi %hi(0x40019c00), %g1 40003c70: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 ! 40019c20 40003c74: 80 a0 a0 00 cmp %g2, 0 40003c78: 12 80 00 0d bne 40003cac 40003c7c: 98 10 60 20 or %g1, 0x20, %o4 sc = rtems_semaphore_create ( 40003c80: 11 15 14 9b sethi %hi(0x54526c00), %o0 40003c84: 92 10 20 01 mov 1, %o1 40003c88: 90 12 21 69 or %o0, 0x169, %o0 40003c8c: 94 10 20 54 mov 0x54, %o2 40003c90: 40 00 09 1c call 40006100 40003c94: 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) 40003c98: 80 a2 20 00 cmp %o0, 0 40003c9c: 02 80 00 04 be 40003cac 40003ca0: 01 00 00 00 nop rtems_fatal_error_occurred (sc); 40003ca4: 40 00 0b 7f call 40006aa0 <== NOT EXECUTED 40003ca8: 01 00 00 00 nop <== NOT EXECUTED 40003cac: 81 c7 e0 08 ret 40003cb0: 81 e8 00 00 restore 40004f3c : } } rtems_status_code rtems_termios_ioctl (void *arg) { 40004f3c: 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; 40004f40: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 40004f44: 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; 40004f48: e2 00 60 28 ld [ %g1 + 0x28 ], %l1 <== NOT EXECUTED struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 40004f4c: 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); 40004f50: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 <== NOT EXECUTED } } rtems_status_code rtems_termios_ioctl (void *arg) { 40004f54: 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); 40004f58: 92 10 20 00 clr %o1 <== NOT EXECUTED 40004f5c: 40 00 05 0f call 40006398 <== NOT EXECUTED 40004f60: 94 10 20 00 clr %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) { 40004f64: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40004f68: 22 80 00 05 be,a 40004f7c <== NOT EXECUTED 40004f6c: c4 04 a0 04 ld [ %l2 + 4 ], %g2 <== NOT EXECUTED args->ioctl_return = sc; 40004f70: f0 24 a0 0c st %i0, [ %l2 + 0xc ] <== NOT EXECUTED 40004f74: 81 c7 e0 08 ret <== NOT EXECUTED 40004f78: 81 e8 00 00 restore <== NOT EXECUTED return sc; } switch (args->command) { 40004f7c: 80 a0 a0 04 cmp %g2, 4 <== NOT EXECUTED 40004f80: 22 80 00 bf be,a 4000527c <== NOT EXECUTED 40004f84: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED 40004f88: 18 80 00 0b bgu 40004fb4 <== NOT EXECUTED 40004f8c: 03 10 01 19 sethi %hi(0x40046400), %g1 <== NOT EXECUTED 40004f90: 80 a0 a0 02 cmp %g2, 2 <== NOT EXECUTED 40004f94: 22 80 00 2c be,a 40005044 <== NOT EXECUTED 40004f98: d2 04 a0 08 ld [ %l2 + 8 ], %o1 <== NOT EXECUTED 40004f9c: 18 80 00 b1 bgu 40005260 <== NOT EXECUTED 40004fa0: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 40004fa4: 32 80 00 17 bne,a 40005000 <== NOT EXECUTED 40004fa8: 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; 40004fac: 10 80 00 22 b 40005034 <== NOT EXECUTED 40004fb0: 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) { 40004fb4: 82 10 62 7f or %g1, 0x27f, %g1 <== NOT EXECUTED 40004fb8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004fbc: 02 80 00 d1 be 40005300 <== NOT EXECUTED 40004fc0: 01 00 00 00 nop <== NOT EXECUTED 40004fc4: 38 80 00 07 bgu,a 40004fe0 <== NOT EXECUTED 40004fc8: 03 10 01 1d sethi %hi(0x40047400), %g1 <== NOT EXECUTED 40004fcc: 80 a0 a0 05 cmp %g2, 5 <== NOT EXECUTED 40004fd0: 32 80 00 0c bne,a 40005000 <== NOT EXECUTED 40004fd4: 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; 40004fd8: 10 80 00 a5 b 4000526c <== NOT EXECUTED 40004fdc: 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) { 40004fe0: 82 10 60 1a or %g1, 0x1a, %g1 <== NOT EXECUTED 40004fe4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004fe8: 02 80 00 c2 be 400052f0 <== NOT EXECUTED 40004fec: 03 20 01 1d sethi %hi(0x80047400), %g1 <== NOT EXECUTED 40004ff0: 82 10 60 1b or %g1, 0x1b, %g1 ! 8004741b <== NOT EXECUTED 40004ff4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004ff8: 02 80 00 a5 be 4000528c <== NOT EXECUTED 40004ffc: c4 04 60 cc ld [ %l1 + 0xcc ], %g2 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 40005000: 03 10 00 66 sethi %hi(0x40019800), %g1 <== NOT EXECUTED 40005004: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 40005008: 82 10 60 dc or %g1, 0xdc, %g1 <== NOT EXECUTED 4000500c: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 40005010: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 40005014: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005018: 02 80 00 c7 be 40005334 <== NOT EXECUTED 4000501c: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 40005020: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40005024: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005028: 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); 4000502c: 10 80 00 c2 b 40005334 <== NOT EXECUTED 40005030: 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; 40005034: 92 04 60 30 add %l1, 0x30, %o1 <== NOT EXECUTED 40005038: 40 00 25 16 call 4000e490 <== NOT EXECUTED 4000503c: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED 40005040: 30 80 00 bd b,a 40005334 <== NOT EXECUTED break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 40005044: 90 04 60 30 add %l1, 0x30, %o0 <== NOT EXECUTED 40005048: 40 00 25 12 call 4000e490 <== NOT EXECUTED 4000504c: 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) && 40005050: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40005054: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 40005058: 02 80 00 20 be 400050d8 <== NOT EXECUTED 4000505c: 01 00 00 00 nop <== NOT EXECUTED 40005060: c2 04 60 30 ld [ %l1 + 0x30 ], %g1 <== NOT EXECUTED 40005064: 80 88 64 00 btst 0x400, %g1 <== NOT EXECUTED 40005068: 12 80 00 1c bne 400050d8 <== NOT EXECUTED 4000506c: 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); 40005070: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40005074: 82 08 7d ef and %g1, -529, %g1 <== NOT EXECUTED 40005078: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 4000507c: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40005080: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40005084: 02 80 00 15 be 400050d8 <== NOT EXECUTED 40005088: 01 00 00 00 nop <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 4000508c: 7f ff f3 33 call 40001d58 <== NOT EXECUTED 40005090: 01 00 00 00 nop <== NOT EXECUTED 40005094: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 40005098: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 4000509c: 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; 400050a0: 82 08 7f df and %g1, -33, %g1 <== NOT EXECUTED 400050a4: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 400050a8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400050ac: 02 80 00 09 be 400050d0 <== NOT EXECUTED 400050b0: 01 00 00 00 nop <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 400050b4: d2 04 60 84 ld [ %l1 + 0x84 ], %o1 <== NOT EXECUTED 400050b8: c2 04 60 7c ld [ %l1 + 0x7c ], %g1 <== NOT EXECUTED 400050bc: c4 04 60 a4 ld [ %l1 + 0xa4 ], %g2 <== NOT EXECUTED 400050c0: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED 400050c4: 92 00 40 09 add %g1, %o1, %o1 <== NOT EXECUTED 400050c8: 9f c0 80 00 call %g2 <== NOT EXECUTED 400050cc: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 400050d0: 7f ff f3 26 call 40001d68 <== NOT EXECUTED 400050d4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 400050d8: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 400050dc: 80 88 64 00 btst 0x400, %g1 <== NOT EXECUTED 400050e0: 02 80 00 0c be 40005110 <== NOT EXECUTED 400050e4: 03 00 00 04 sethi %hi(0x1000), %g1 <== NOT EXECUTED 400050e8: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED 400050ec: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED 400050f0: 12 80 00 08 bne 40005110 <== NOT EXECUTED 400050f4: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 400050f8: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 400050fc: 82 08 7b ff and %g1, -1025, %g1 <== NOT EXECUTED 40005100: 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); 40005104: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40005108: 82 08 7f fd and %g1, -3, %g1 <== NOT EXECUTED 4000510c: 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) && 40005110: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40005114: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 40005118: 02 80 00 16 be 40005170 <== NOT EXECUTED 4000511c: c2 04 60 38 ld [ %l1 + 0x38 ], %g1 <== NOT EXECUTED 40005120: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005124: 06 80 00 14 bl 40005174 <== NOT EXECUTED 40005128: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 4000512c: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40005130: 82 08 7e ff and %g1, -257, %g1 <== NOT EXECUTED 40005134: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 40005138: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 4000513c: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 40005140: 02 80 00 08 be 40005160 <== NOT EXECUTED 40005144: 01 00 00 00 nop <== NOT EXECUTED 40005148: c2 04 60 b0 ld [ %l1 + 0xb0 ], %g1 <== NOT EXECUTED 4000514c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005150: 02 80 00 04 be 40005160 <== NOT EXECUTED 40005154: 01 00 00 00 nop <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 40005158: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000515c: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 40005160: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40005164: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED 40005168: 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) { 4000516c: c2 04 60 38 ld [ %l1 + 0x38 ], %g1 <== NOT EXECUTED 40005170: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005174: 36 80 00 06 bge,a 4000518c <== NOT EXECUTED 40005178: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED tty->flow_ctrl |= FL_MDRTS; 4000517c: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40005180: 82 10 61 00 or %g1, 0x100, %g1 <== NOT EXECUTED 40005184: 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) { 40005188: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED 4000518c: 03 00 00 04 sethi %hi(0x1000), %g1 <== NOT EXECUTED 40005190: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED 40005194: 22 80 00 06 be,a 400051ac <== NOT EXECUTED 40005198: c2 04 60 30 ld [ %l1 + 0x30 ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXOF; 4000519c: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 400051a0: 82 10 64 00 or %g1, 0x400, %g1 <== NOT EXECUTED 400051a4: 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) { 400051a8: c2 04 60 30 ld [ %l1 + 0x30 ], %g1 <== NOT EXECUTED 400051ac: 80 88 64 00 btst 0x400, %g1 <== NOT EXECUTED 400051b0: 22 80 00 06 be,a 400051c8 <== NOT EXECUTED 400051b4: c2 04 60 3c ld [ %l1 + 0x3c ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXON; 400051b8: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 400051bc: 82 10 62 00 or %g1, 0x200, %g1 <== NOT EXECUTED 400051c0: 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) { 400051c4: c2 04 60 3c ld [ %l1 + 0x3c ], %g1 <== NOT EXECUTED 400051c8: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 400051cc: 32 80 00 19 bne,a 40005230 <== NOT EXECUTED 400051d0: 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); 400051d4: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED 400051d8: 40 00 02 22 call 40005a60 <== NOT EXECUTED 400051dc: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10; 400051e0: d2 07 bf f4 ld [ %fp + -12 ], %o1 <== NOT EXECUTED 400051e4: e0 0c 60 46 ldub [ %l1 + 0x46 ], %l0 <== NOT EXECUTED 400051e8: 40 00 3e 4e call 40014b20 <.umul> <== NOT EXECUTED 400051ec: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400051f0: 40 00 3e 86 call 40014c08 <.udiv> <== NOT EXECUTED 400051f4: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 400051f8: d0 24 60 54 st %o0, [ %l1 + 0x54 ] <== NOT EXECUTED if (tty->termios.c_cc[VTIME]) { 400051fc: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40005200: 02 80 00 08 be 40005220 <== NOT EXECUTED 40005204: c2 0c 60 47 ldub [ %l1 + 0x47 ], %g1 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 40005208: c0 24 60 6c clr [ %l1 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) 4000520c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005210: 12 80 00 09 bne 40005234 <== NOT EXECUTED 40005214: d0 24 60 70 st %o0, [ %l1 + 0x70 ] <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 40005218: 10 80 00 0a b 40005240 <== NOT EXECUTED 4000521c: d0 24 60 74 st %o0, [ %l1 + 0x74 ] <== NOT EXECUTED } else { if (tty->termios.c_cc[VMIN]) { 40005220: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005224: 02 80 00 06 be 4000523c <== NOT EXECUTED 40005228: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 4000522c: c0 24 60 6c clr [ %l1 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 40005230: c0 24 60 70 clr [ %l1 + 0x70 ] <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 40005234: 10 80 00 03 b 40005240 <== NOT EXECUTED 40005238: c0 24 60 74 clr [ %l1 + 0x74 ] <== NOT EXECUTED } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 4000523c: c2 24 60 6c st %g1, [ %l1 + 0x6c ] <== NOT EXECUTED } } } if (tty->device.setAttributes) 40005240: c2 04 60 a8 ld [ %l1 + 0xa8 ], %g1 <== NOT EXECUTED 40005244: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005248: 02 80 00 3b be 40005334 <== NOT EXECUTED 4000524c: 01 00 00 00 nop <== NOT EXECUTED (*tty->device.setAttributes)(tty->minor, &tty->termios); 40005250: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED 40005254: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005258: 92 04 60 30 add %l1, 0x30, %o1 <== NOT EXECUTED 4000525c: 30 80 00 36 b,a 40005334 <== NOT EXECUTED break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 40005260: 7f ff fe 19 call 40004ac4 <== NOT EXECUTED 40005264: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40005268: 30 80 00 33 b,a 40005334 <== NOT EXECUTED break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 4000526c: c2 24 60 d4 st %g1, [ %l1 + 0xd4 ] <== NOT EXECUTED 40005270: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED 40005274: 10 80 00 30 b 40005334 <== NOT EXECUTED 40005278: c2 24 60 d8 st %g1, [ %l1 + 0xd8 ] <== NOT EXECUTED break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 4000527c: c2 24 60 dc st %g1, [ %l1 + 0xdc ] <== NOT EXECUTED 40005280: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED 40005284: 10 80 00 2c b 40005334 <== NOT EXECUTED 40005288: 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) { 4000528c: 03 10 00 66 sethi %hi(0x40019800), %g1 <== NOT EXECUTED 40005290: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 40005294: 82 10 60 dc or %g1, 0xdc, %g1 <== NOT EXECUTED 40005298: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 4000529c: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 400052a0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400052a4: 22 80 00 06 be,a 400052bc <== NOT EXECUTED 400052a8: c2 04 a0 08 ld [ %l2 + 8 ], %g1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 400052ac: 9f c0 40 00 call %g1 <== NOT EXECUTED 400052b0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400052b4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 400052b8: c2 04 a0 08 ld [ %l2 + 8 ], %g1 <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ 400052bc: 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); 400052c0: 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) { 400052c4: 03 10 00 66 sethi %hi(0x40019800), %g1 <== NOT EXECUTED 400052c8: 85 28 e0 05 sll %g3, 5, %g2 <== NOT EXECUTED 400052cc: 82 10 60 dc or %g1, 0xdc, %g1 <== NOT EXECUTED 400052d0: c2 00 40 02 ld [ %g1 + %g2 ], %g1 <== NOT EXECUTED 400052d4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400052d8: 02 80 00 17 be 40005334 <== NOT EXECUTED 400052dc: c6 24 60 cc st %g3, [ %l1 + 0xcc ] <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 400052e0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400052e4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400052e8: 10 80 00 13 b 40005334 <== NOT EXECUTED 400052ec: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 400052f0: c4 04 a0 08 ld [ %l2 + 8 ], %g2 <== NOT EXECUTED 400052f4: c2 04 60 cc ld [ %l1 + 0xcc ], %g1 <== NOT EXECUTED 400052f8: 10 80 00 0f b 40005334 <== NOT EXECUTED 400052fc: c2 20 80 00 st %g1, [ %g2 ] <== NOT EXECUTED break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 40005300: c4 04 60 60 ld [ %l1 + 0x60 ], %g2 <== NOT EXECUTED 40005304: c2 04 60 5c ld [ %l1 + 0x5c ], %g1 <== NOT EXECUTED if ( rawnc < 0 ) 40005308: 88 a0 80 01 subcc %g2, %g1, %g4 <== NOT EXECUTED 4000530c: 3c 80 00 05 bpos,a 40005320 <== NOT EXECUTED 40005310: c2 04 60 20 ld [ %l1 + 0x20 ], %g1 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 40005314: c2 04 60 64 ld [ %l1 + 0x64 ], %g1 <== NOT EXECUTED 40005318: 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; 4000531c: c2 04 60 20 ld [ %l1 + 0x20 ], %g1 <== NOT EXECUTED 40005320: c4 04 60 24 ld [ %l1 + 0x24 ], %g2 <== NOT EXECUTED 40005324: c6 04 a0 08 ld [ %l2 + 8 ], %g3 <== NOT EXECUTED 40005328: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 4000532c: 82 00 40 04 add %g1, %g4, %g1 <== NOT EXECUTED 40005330: c2 20 c0 00 st %g1, [ %g3 ] <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 40005334: 40 00 04 60 call 400064b4 <== NOT EXECUTED 40005338: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 <== NOT EXECUTED args->ioctl_return = sc; 4000533c: f0 24 a0 0c st %i0, [ %l2 + 0xc ] <== NOT EXECUTED return sc; } 40005340: 81 c7 e0 08 ret <== NOT EXECUTED 40005344: 81 e8 00 00 restore <== NOT EXECUTED 400054f8 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 400054f8: 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, 400054fc: 03 10 00 67 sethi %hi(0x40019c00), %g1 40005500: d0 00 60 20 ld [ %g1 + 0x20 ], %o0 ! 40019c20 40005504: 92 10 20 00 clr %o1 40005508: 40 00 03 a4 call 40006398 4000550c: 94 10 20 00 clr %o2 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 40005510: a6 92 20 00 orcc %o0, 0, %l3 40005514: 12 80 01 0a bne 4000593c 40005518: 03 10 00 67 sethi %hi(0x40019c00), %g1 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 4000551c: 10 80 00 0a b 40005544 40005520: e2 00 60 28 ld [ %g1 + 0x28 ], %l1 ! 40019c28 if ((tty->major == major) && (tty->minor == minor)) 40005524: 80 a0 40 18 cmp %g1, %i0 40005528: 32 80 00 07 bne,a 40005544 4000552c: e2 04 40 00 ld [ %l1 ], %l1 <== NOT EXECUTED 40005530: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 40005534: 80 a0 40 19 cmp %g1, %i1 40005538: 22 80 00 da be,a 400058a0 4000553c: 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) { 40005540: e2 04 40 00 ld [ %l1 ], %l1 <== NOT EXECUTED 40005544: 80 a4 60 00 cmp %l1, 0 40005548: 32 bf ff f7 bne,a 40005524 4000554c: c2 04 60 0c ld [ %l1 + 0xc ], %g1 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 40005550: 10 80 00 fd b 40005944 40005554: 90 10 20 01 mov 1, %o0 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 40005558: 03 10 00 64 sethi %hi(0x40019000), %g1 4000555c: c2 00 63 30 ld [ %g1 + 0x330 ], %g1 ! 40019330 40005560: c2 24 60 64 st %g1, [ %l1 + 0x64 ] tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 40005564: d0 04 60 64 ld [ %l1 + 0x64 ], %o0 40005568: 40 00 17 c8 call 4000b488 4000556c: 01 00 00 00 nop if (tty->rawInBuf.theBuf == NULL) { 40005570: 80 a2 20 00 cmp %o0, 0 40005574: 12 80 00 08 bne 40005594 40005578: d0 24 60 58 st %o0, [ %l1 + 0x58 ] free(tty); 4000557c: 40 00 16 5b call 4000aee8 <== NOT EXECUTED 40005580: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 40005584: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 40005588: a6 10 20 1a mov 0x1a, %l3 <== NOT EXECUTED 4000558c: 10 80 00 ea b 40005934 <== NOT EXECUTED 40005590: d0 00 60 20 ld [ %g1 + 0x20 ], %o0 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 40005594: 03 10 00 64 sethi %hi(0x40019000), %g1 40005598: c2 00 63 34 ld [ %g1 + 0x334 ], %g1 ! 40019334 4000559c: c2 24 60 88 st %g1, [ %l1 + 0x88 ] tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 400055a0: d0 04 60 88 ld [ %l1 + 0x88 ], %o0 400055a4: 40 00 17 b9 call 4000b488 400055a8: 01 00 00 00 nop if (tty->rawOutBuf.theBuf == NULL) { 400055ac: 80 a2 20 00 cmp %o0, 0 400055b0: 12 80 00 05 bne 400055c4 400055b4: d0 24 60 7c st %o0, [ %l1 + 0x7c ] free((void *)(tty->rawInBuf.theBuf)); 400055b8: d0 04 60 58 ld [ %l1 + 0x58 ], %o0 <== NOT EXECUTED free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 400055bc: 10 80 00 0c b 400055ec <== NOT EXECUTED 400055c0: a6 10 20 1a mov 0x1a, %l3 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 400055c4: 03 10 00 64 sethi %hi(0x40019000), %g1 400055c8: 40 00 17 b0 call 4000b488 400055cc: d0 00 63 2c ld [ %g1 + 0x32c ], %o0 ! 4001932c if (tty->cbuf == NULL) { 400055d0: 80 a2 20 00 cmp %o0, 0 400055d4: 12 80 00 0c bne 40005604 400055d8: d0 24 60 1c st %o0, [ %l1 + 0x1c ] free((void *)(tty->rawOutBuf.theBuf)); 400055dc: d0 04 60 7c ld [ %l1 + 0x7c ], %o0 <== NOT EXECUTED 400055e0: 40 00 16 42 call 4000aee8 <== NOT EXECUTED 400055e4: a6 10 20 1a mov 0x1a, %l3 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 400055e8: d0 04 60 58 ld [ %l1 + 0x58 ], %o0 <== NOT EXECUTED 400055ec: 40 00 16 3f call 4000aee8 <== NOT EXECUTED 400055f0: 01 00 00 00 nop <== NOT EXECUTED free(tty); 400055f4: 40 00 16 3d call 4000aee8 <== NOT EXECUTED 400055f8: 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); 400055fc: 10 80 00 cd b 40005930 <== NOT EXECUTED 40005600: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 40005604: 03 10 00 67 sethi %hi(0x40019c00), %g1 40005608: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 ! 40019c28 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 4000560c: c0 24 60 d4 clr [ %l1 + 0xd4 ] tty->tty_snd.sw_arg = NULL; 40005610: c0 24 60 d8 clr [ %l1 + 0xd8 ] tty->tty_rcv.sw_pfn = NULL; 40005614: c0 24 60 dc clr [ %l1 + 0xdc ] tty->tty_rcv.sw_arg = NULL; 40005618: c0 24 60 e0 clr [ %l1 + 0xe0 ] tty->tty_rcvwakeup = 0; 4000561c: c0 24 60 e4 clr [ %l1 + 0xe4 ] /* * link tty */ tty->forw = rtems_termios_ttyHead; 40005620: c2 24 40 00 st %g1, [ %l1 ] tty->back = NULL; if (rtems_termios_ttyHead != NULL) 40005624: 80 a0 60 00 cmp %g1, 0 40005628: 02 80 00 03 be 40005634 4000562c: c0 24 60 04 clr [ %l1 + 4 ] rtems_termios_ttyHead->back = tty; 40005630: e2 20 60 04 st %l1, [ %g1 + 4 ] <== NOT EXECUTED rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 40005634: 07 10 00 67 sethi %hi(0x40019c00), %g3 40005638: c4 00 e0 24 ld [ %g3 + 0x24 ], %g2 ! 40019c24 */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 4000563c: 03 10 00 67 sethi %hi(0x40019c00), %g1 if (rtems_termios_ttyTail == NULL) 40005640: 80 a0 a0 00 cmp %g2, 0 40005644: 12 80 00 03 bne 40005650 40005648: e0 20 60 28 st %l0, [ %g1 + 0x28 ] rtems_termios_ttyTail = tty; 4000564c: e0 20 e0 24 st %l0, [ %g3 + 0x24 ] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 40005650: 25 10 00 64 sethi %hi(0x40019000), %l2 40005654: c2 4c a3 38 ldsb [ %l2 + 0x338 ], %g1 ! 40019338 40005658: 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; 4000565c: f2 24 20 10 st %i1, [ %l0 + 0x10 ] tty->major = major; 40005660: f0 24 20 0c st %i0, [ %l0 + 0xc ] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 40005664: 90 12 21 00 or %o0, 0x100, %o0 40005668: 92 10 20 01 mov 1, %o1 4000566c: 90 10 40 08 or %g1, %o0, %o0 40005670: 94 10 20 54 mov 0x54, %o2 40005674: 96 10 20 00 clr %o3 40005678: 40 00 02 a2 call 40006100 4000567c: 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) 40005680: 80 a2 20 00 cmp %o0, 0 40005684: 12 80 00 a8 bne 40005924 40005688: 01 00 00 00 nop rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 4000568c: c2 4c a3 38 ldsb [ %l2 + 0x338 ], %g1 40005690: 11 15 14 9b sethi %hi(0x54526c00), %o0 40005694: 92 10 20 01 mov 1, %o1 40005698: 90 12 23 00 or %o0, 0x300, %o0 4000569c: 94 10 20 54 mov 0x54, %o2 400056a0: 90 10 40 08 or %g1, %o0, %o0 400056a4: 96 10 20 00 clr %o3 400056a8: 40 00 02 96 call 40006100 400056ac: 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) 400056b0: 80 a2 20 00 cmp %o0, 0 400056b4: 12 80 00 9c bne 40005924 400056b8: 01 00 00 00 nop rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 400056bc: c2 4c a3 38 ldsb [ %l2 + 0x338 ], %g1 400056c0: 11 15 14 9e sethi %hi(0x54527800), %o0 400056c4: 92 10 20 00 clr %o1 400056c8: 90 10 40 08 or %g1, %o0, %o0 400056cc: 94 10 20 20 mov 0x20, %o2 400056d0: 96 10 20 00 clr %o3 400056d4: 40 00 02 8b call 40006100 400056d8: 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) 400056dc: 80 a2 20 00 cmp %o0, 0 400056e0: 12 80 00 91 bne 40005924 400056e4: 01 00 00 00 nop rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 400056e8: c0 24 20 94 clr [ %l0 + 0x94 ] /* * Set callbacks */ tty->device = *callbacks; 400056ec: 92 10 00 1b mov %i3, %o1 400056f0: 90 04 20 98 add %l0, 0x98, %o0 400056f4: 40 00 23 67 call 4000e490 400056f8: 94 10 20 20 mov 0x20, %o2 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 400056fc: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 40005700: 80 a0 60 02 cmp %g1, 2 40005704: 32 80 00 1b bne,a 40005770 40005708: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 sc = rtems_task_create ( 4000570c: c2 4c a3 38 ldsb [ %l2 + 0x338 ], %g1 <== NOT EXECUTED 40005710: 11 15 1e 15 sethi %hi(0x54785400), %o0 <== NOT EXECUTED 40005714: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 40005718: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED 4000571c: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED 40005720: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED 40005724: 98 10 20 00 clr %o4 <== NOT EXECUTED 40005728: 40 00 03 8f call 40006564 <== NOT EXECUTED 4000572c: 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) 40005730: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005734: 12 80 00 7c bne 40005924 <== NOT EXECUTED 40005738: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 4000573c: c2 4c a3 38 ldsb [ %l2 + 0x338 ], %g1 <== NOT EXECUTED 40005740: 11 14 9e 15 sethi %hi(0x52785400), %o0 <== NOT EXECUTED 40005744: 92 10 20 09 mov 9, %o1 <== NOT EXECUTED 40005748: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED 4000574c: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED 40005750: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED 40005754: 98 10 20 00 clr %o4 <== NOT EXECUTED 40005758: 40 00 03 83 call 40006564 <== NOT EXECUTED 4000575c: 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) 40005760: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005764: 12 80 00 70 bne 40005924 <== NOT EXECUTED 40005768: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 4000576c: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 40005770: 80 a0 60 00 cmp %g1, 0 40005774: 02 80 00 07 be 40005790 40005778: 03 10 00 64 sethi %hi(0x40019000), %g1 4000577c: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 40005780: 80 a0 60 02 cmp %g1, 2 40005784: 12 80 00 0f bne 400057c0 40005788: 82 10 20 03 mov 3, %g1 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 4000578c: 03 10 00 64 sethi %hi(0x40019000), %g1 <== NOT EXECUTED 40005790: c2 48 63 38 ldsb [ %g1 + 0x338 ], %g1 ! 40019338 <== NOT EXECUTED 40005794: 11 15 14 9c sethi %hi(0x54527000), %o0 <== NOT EXECUTED 40005798: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000579c: 90 12 22 00 or %o0, 0x200, %o0 <== NOT EXECUTED 400057a0: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED 400057a4: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED 400057a8: 96 10 20 00 clr %o3 <== NOT EXECUTED 400057ac: 40 00 02 55 call 40006100 <== NOT EXECUTED 400057b0: 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) 400057b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400057b8: 12 80 00 5b bne 40005924 <== NOT EXECUTED 400057bc: 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'; 400057c0: c2 2c 20 41 stb %g1, [ %l0 + 0x41 ] tty->termios.c_cc[VQUIT] = '\034'; 400057c4: 82 10 20 1c mov 0x1c, %g1 400057c8: c2 2c 20 42 stb %g1, [ %l0 + 0x42 ] tty->termios.c_cc[VERASE] = '\177'; 400057cc: 82 10 20 7f mov 0x7f, %g1 400057d0: c2 2c 20 43 stb %g1, [ %l0 + 0x43 ] tty->termios.c_cc[VKILL] = '\025'; 400057d4: 82 10 20 15 mov 0x15, %g1 400057d8: c2 2c 20 44 stb %g1, [ %l0 + 0x44 ] tty->termios.c_cc[VEOF] = '\004'; 400057dc: 82 10 20 04 mov 4, %g1 400057e0: 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'; 400057e4: 82 10 20 11 mov 0x11, %g1 400057e8: c2 2c 20 49 stb %g1, [ %l0 + 0x49 ] tty->termios.c_cc[VSTOP] = '\023'; 400057ec: 82 10 20 13 mov 0x13, %g1 400057f0: c2 2c 20 4a stb %g1, [ %l0 + 0x4a ] tty->termios.c_cc[VSUSP] = '\032'; 400057f4: 82 10 20 1a mov 0x1a, %g1 400057f8: c2 2c 20 4b stb %g1, [ %l0 + 0x4b ] tty->termios.c_cc[VREPRINT] = '\022'; 400057fc: 82 10 20 12 mov 0x12, %g1 40005800: c2 2c 20 4d stb %g1, [ %l0 + 0x4d ] tty->termios.c_cc[VDISCARD] = '\017'; 40005804: 82 10 20 0f mov 0xf, %g1 40005808: c2 2c 20 4e stb %g1, [ %l0 + 0x4e ] tty->termios.c_cc[VWERASE] = '\027'; 4000580c: 82 10 20 17 mov 0x17, %g1 40005810: c2 2c 20 4f stb %g1, [ %l0 + 0x4f ] tty->termios.c_cc[VLNEXT] = '\026'; 40005814: 82 10 20 16 mov 0x16, %g1 40005818: c2 2c 20 50 stb %g1, [ %l0 + 0x50 ] } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 4000581c: 03 00 00 09 sethi %hi(0x2400), %g1 40005820: 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'; 40005824: c0 2c 20 4c clrb [ %l0 + 0x4c ] tty->termios.c_cc[VEOL2] = '\000'; 40005828: 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') 4000582c: 1b 10 00 64 sethi %hi(0x40019000), %o5 40005830: c4 0b 63 38 ldub [ %o5 + 0x338 ], %g2 ! 40019338 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 40005834: c2 24 20 30 st %g1, [ %l0 + 0x30 ] tty->termios.c_oflag = OPOST | ONLCR | XTABS; 40005838: 03 00 00 06 sethi %hi(0x1800), %g1 4000583c: 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; 40005840: 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; 40005844: 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; 40005848: 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; 4000584c: 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; 40005850: 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; 40005854: c2 24 20 38 st %g1, [ %l0 + 0x38 ] tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 40005858: 03 00 00 20 sethi %hi(0x8000), %g1 4000585c: 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; 40005860: 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; 40005864: 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; 40005868: c6 24 20 bc st %g3, [ %l0 + 0xbc ] tty->highwater = tty->rawInBuf.Size * 3/4; 4000586c: 83 29 20 01 sll %g4, 1, %g1 40005870: 82 00 40 04 add %g1, %g4, %g1 40005874: 83 30 60 02 srl %g1, 2, %g1 40005878: c2 24 20 c0 st %g1, [ %l0 + 0xc0 ] /* * Bump name characer */ if (c++ == 'z') 4000587c: 82 00 a0 01 add %g2, 1, %g1 40005880: 85 28 a0 18 sll %g2, 0x18, %g2 40005884: 85 38 a0 18 sra %g2, 0x18, %g2 40005888: 80 a0 a0 7a cmp %g2, 0x7a 4000588c: 12 80 00 04 bne 4000589c 40005890: c2 2b 63 38 stb %g1, [ %o5 + 0x338 ] c = 'a'; 40005894: 82 10 20 61 mov 0x61, %g1 <== NOT EXECUTED 40005898: c2 2b 63 38 stb %g1, [ %o5 + 0x338 ] <== NOT EXECUTED } args->iop->data1 = tty; if (!tty->refcount++) { 4000589c: c2 04 60 08 ld [ %l1 + 8 ], %g1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 400058a0: c4 06 80 00 ld [ %i2 ], %g2 if (!tty->refcount++) { 400058a4: 86 00 60 01 add %g1, 1, %g3 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 400058a8: e2 20 a0 28 st %l1, [ %g2 + 0x28 ] if (!tty->refcount++) { 400058ac: 80 a0 60 00 cmp %g1, 0 400058b0: 12 80 00 1f bne 4000592c 400058b4: c6 24 60 08 st %g3, [ %l1 + 8 ] if (tty->device.firstOpen) 400058b8: c2 04 60 98 ld [ %l1 + 0x98 ], %g1 400058bc: 80 a0 60 00 cmp %g1, 0 400058c0: 02 80 00 05 be 400058d4 400058c4: 90 10 00 18 mov %i0, %o0 (*tty->device.firstOpen)(major, minor, arg); 400058c8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400058cc: 9f c0 40 00 call %g1 <== NOT EXECUTED 400058d0: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 400058d4: c2 04 60 b4 ld [ %l1 + 0xb4 ], %g1 400058d8: 80 a0 60 02 cmp %g1, 2 400058dc: 12 80 00 15 bne 40005930 400058e0: 03 10 00 67 sethi %hi(0x40019c00), %g1 sc = rtems_task_start(tty->rxTaskId, 400058e4: d0 04 60 c4 ld [ %l1 + 0xc4 ], %o0 <== NOT EXECUTED 400058e8: 13 10 00 16 sethi %hi(0x40005800), %o1 <== NOT EXECUTED 400058ec: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 400058f0: 40 00 03 c9 call 40006814 <== NOT EXECUTED 400058f4: 92 12 61 dc or %o1, 0x1dc, %o1 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 400058f8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400058fc: 12 80 00 0a bne 40005924 <== NOT EXECUTED 40005900: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 40005904: d0 04 60 c8 ld [ %l1 + 0xc8 ], %o0 <== NOT EXECUTED 40005908: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 4000590c: 13 10 00 16 sethi %hi(0x40005800), %o1 <== NOT EXECUTED 40005910: 40 00 03 c1 call 40006814 <== NOT EXECUTED 40005914: 92 12 61 60 or %o1, 0x160, %o1 ! 40005960 <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 40005918: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000591c: 02 80 00 05 be 40005930 <== NOT EXECUTED 40005920: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40005924: 40 00 04 5f call 40006aa0 <== NOT EXECUTED 40005928: 01 00 00 00 nop <== NOT EXECUTED } } rtems_semaphore_release (rtems_termios_ttyMutex); 4000592c: 03 10 00 67 sethi %hi(0x40019c00), %g1 40005930: d0 00 60 20 ld [ %g1 + 0x20 ], %o0 ! 40019c20 40005934: 40 00 02 e0 call 400064b4 40005938: 01 00 00 00 nop return RTEMS_SUCCESSFUL; } 4000593c: 81 c7 e0 08 ret 40005940: 91 e8 00 13 restore %g0, %l3, %o0 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 40005944: 40 00 15 1f call 4000adc0 40005948: 92 10 20 e8 mov 0xe8, %o1 if (tty == NULL) { 4000594c: a2 92 20 00 orcc %o0, 0, %l1 40005950: 12 bf ff 02 bne 40005558 40005954: 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); 40005958: 10 bf ff 0c b 40005588 <== NOT EXECUTED 4000595c: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 40004278 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 40004278: 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) { 4000427c: 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) { 40004280: 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) { 40004284: 80 a0 60 00 cmp %g1, 0 40004288: 12 80 00 08 bne 400042a8 4000428c: a2 10 00 18 mov %i0, %l1 (*tty->device.write)(tty->minor, (void *)buf, len); 40004290: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 40004294: c2 06 a0 a4 ld [ %i2 + 0xa4 ], %g1 40004298: 9f c0 40 00 call %g1 4000429c: 94 10 00 19 mov %i1, %o2 400042a0: 81 c7 e0 08 ret 400042a4: 81 e8 00 00 restore return; } newHead = tty->rawOutBuf.Head; 400042a8: 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; 400042ac: 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; 400042b0: 10 80 00 39 b 40004394 <== NOT EXECUTED 400042b4: 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; 400042b8: d2 06 a0 88 ld [ %i2 + 0x88 ], %o1 <== NOT EXECUTED 400042bc: 40 00 42 ff call 40014eb8 <.urem> <== NOT EXECUTED 400042c0: 90 04 20 01 add %l0, 1, %o0 <== NOT EXECUTED rtems_interrupt_disable (level); 400042c4: 7f ff f6 a5 call 40001d58 <== NOT EXECUTED 400042c8: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 400042cc: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 400042d0: 30 80 00 0f b,a 4000430c <== NOT EXECUTED while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); 400042d4: 7f ff f6 a5 call 40001d68 <== NOT EXECUTED 400042d8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 400042dc: d0 06 a0 8c ld [ %i2 + 0x8c ], %o0 <== NOT EXECUTED 400042e0: 92 10 20 00 clr %o1 <== NOT EXECUTED 400042e4: 40 00 08 2d call 40006398 <== NOT EXECUTED 400042e8: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 400042ec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400042f0: 02 80 00 04 be 40004300 <== NOT EXECUTED 400042f4: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 400042f8: 40 00 09 ea call 40006aa0 <== NOT EXECUTED 400042fc: 01 00 00 00 nop <== NOT EXECUTED rtems_interrupt_disable (level); 40004300: 7f ff f6 96 call 40001d58 <== NOT EXECUTED 40004304: 01 00 00 00 nop <== NOT EXECUTED 40004308: 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) { 4000430c: c2 06 a0 84 ld [ %i2 + 0x84 ], %g1 <== NOT EXECUTED 40004310: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 40004314: 22 bf ff f0 be,a 400042d4 <== NOT EXECUTED 40004318: 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++; 4000431c: c6 06 a0 80 ld [ %i2 + 0x80 ], %g3 <== NOT EXECUTED 40004320: c4 0c 40 00 ldub [ %l1 ], %g2 <== NOT EXECUTED 40004324: c2 06 a0 7c ld [ %i2 + 0x7c ], %g1 <== NOT EXECUTED 40004328: c4 28 40 03 stb %g2, [ %g1 + %g3 ] <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 4000432c: 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; 40004330: e0 26 a0 80 st %l0, [ %i2 + 0x80 ] <== NOT EXECUTED if (tty->rawOutBufState == rob_idle) { 40004334: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004338: 32 80 00 14 bne,a 40004388 <== NOT EXECUTED 4000433c: a2 04 60 01 inc %l1 <== NOT EXECUTED /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 40004340: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED 40004344: 80 88 60 10 btst 0x10, %g1 <== NOT EXECUTED 40004348: 12 80 00 0b bne 40004374 <== NOT EXECUTED 4000434c: 01 00 00 00 nop <== NOT EXECUTED (*tty->device.write)(tty->minor, 40004350: d2 06 a0 84 ld [ %i2 + 0x84 ], %o1 <== NOT EXECUTED 40004354: c2 06 a0 7c ld [ %i2 + 0x7c ], %g1 <== NOT EXECUTED 40004358: c4 06 a0 a4 ld [ %i2 + 0xa4 ], %g2 <== NOT EXECUTED 4000435c: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 <== NOT EXECUTED 40004360: 92 00 40 09 add %g1, %o1, %o1 <== NOT EXECUTED 40004364: 9f c0 80 00 call %g2 <== NOT EXECUTED 40004368: 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; 4000436c: 10 80 00 06 b 40004384 <== NOT EXECUTED 40004370: 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; 40004374: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED 40004378: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED 4000437c: c2 26 a0 b8 st %g1, [ %i2 + 0xb8 ] <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 40004380: 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++; 40004384: 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); 40004388: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000438c: 7f ff f6 77 call 40001d68 <== NOT EXECUTED 40004390: 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) { 40004394: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40004398: 12 bf ff c8 bne 400042b8 <== NOT EXECUTED 4000439c: 01 00 00 00 nop <== NOT EXECUTED 400043a0: 81 c7 e0 08 ret <== NOT EXECUTED 400043a4: 81 e8 00 00 restore <== NOT EXECUTED 40004b40 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 40004b40: 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; 40004b44: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED uint32_t count = args->count; 40004b48: 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; 40004b4c: e0 00 60 28 ld [ %g1 + 0x28 ], %l0 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; 40004b50: 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); 40004b54: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 40004b58: 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); 40004b5c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40004b60: 40 00 06 0e call 40006398 <== NOT EXECUTED 40004b64: 94 10 20 00 clr %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 40004b68: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40004b6c: 12 80 00 10 bne 40004bac <== NOT EXECUTED 40004b70: 03 10 00 66 sethi %hi(0x40019800), %g1 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 40004b74: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED 40004b78: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 40004b7c: 82 10 60 dc or %g1, 0xdc, %g1 <== NOT EXECUTED 40004b80: 84 00 a0 08 add %g2, 8, %g2 <== NOT EXECUTED 40004b84: c2 00 40 02 ld [ %g1 + %g2 ], %g1 <== NOT EXECUTED 40004b88: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004b8c: 02 80 00 0a be 40004bb4 <== NOT EXECUTED 40004b90: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 40004b94: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004b98: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40004b9c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 40004ba0: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED 40004ba4: 40 00 06 44 call 400064b4 <== NOT EXECUTED 40004ba8: c0 24 20 e4 clr [ %l0 + 0xe4 ] <== NOT EXECUTED 40004bac: 81 c7 e0 08 ret <== NOT EXECUTED 40004bb0: 81 e8 00 00 restore <== NOT EXECUTED return sc; } if (tty->cindex == tty->ccount) { 40004bb4: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED 40004bb8: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40004bbc: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004bc0: 12 80 00 d0 bne 40004f00 <== NOT EXECUTED 40004bc4: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; 40004bc8: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED if (tty->device.pollRead != NULL 40004bcc: 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; 40004bd0: 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; 40004bd4: c0 24 20 20 clr [ %l0 + 0x20 ] <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 40004bd8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40004bdc: 02 80 00 5b be 40004d48 <== NOT EXECUTED 40004be0: c0 24 20 24 clr [ %l0 + 0x24 ] <== NOT EXECUTED 40004be4: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 <== NOT EXECUTED 40004be8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004bec: 12 80 00 58 bne 40004d4c <== NOT EXECUTED 40004bf0: 03 10 00 64 sethi %hi(0x40019000), %g1 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 40004bf4: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 40004bf8: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 40004bfc: 22 80 00 13 be,a 40004c48 <== NOT EXECUTED 40004c00: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 40004c04: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 40004c08: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004c0c: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 40004c10: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004c14: 16 80 00 06 bge 40004c2c <== NOT EXECUTED 40004c18: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED rtems_task_wake_after (1); 40004c1c: 40 00 07 19 call 40006880 <== NOT EXECUTED 40004c20: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED { int n; if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); 40004c24: 10 bf ff f9 b 40004c08 <== NOT EXECUTED 40004c28: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED if (n < 0) { rtems_task_wake_after (1); } else { if (siproc (n, tty)) 40004c2c: 7f ff ff 63 call 400049b8 <== NOT EXECUTED 40004c30: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40004c34: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004c38: 22 bf ff f4 be,a 40004c08 <== NOT EXECUTED 40004c3c: 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)) { 40004c40: 10 80 00 b0 b 40004f00 <== NOT EXECUTED 40004c44: 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]) 40004c48: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004c4c: 12 80 00 0a bne 40004c74 <== NOT EXECUTED 40004c50: a4 07 bf f4 add %fp, -12, %l2 <== NOT EXECUTED 40004c54: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED 40004c58: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004c5c: 02 80 00 07 be 40004c78 <== NOT EXECUTED 40004c60: a2 07 bf f0 add %fp, -16, %l1 <== NOT EXECUTED rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); 40004c64: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED 40004c68: 40 00 03 7e call 40005a60 <== NOT EXECUTED 40004c6c: 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); 40004c70: 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); 40004c74: 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); 40004c78: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 40004c7c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004c80: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 40004c84: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004c88: 36 80 00 1e bge,a 40004d00 <== NOT EXECUTED 40004c8c: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 40004c90: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED 40004c94: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004c98: 02 80 00 0a be 40004cc0 <== NOT EXECUTED 40004c9c: c4 0c 20 46 ldub [ %l0 + 0x46 ], %g2 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 40004ca0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40004ca4: 02 80 00 13 be 40004cf0 <== NOT EXECUTED 40004ca8: 01 00 00 00 nop <== NOT EXECUTED 40004cac: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40004cb0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004cb4: 02 80 00 0f be 40004cf0 <== NOT EXECUTED 40004cb8: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED 40004cbc: 30 80 00 04 b,a 40004ccc <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 40004cc0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40004cc4: 02 80 00 8e be 40004efc <== NOT EXECUTED 40004cc8: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED break; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); 40004ccc: 40 00 03 65 call 40005a60 <== NOT EXECUTED 40004cd0: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 40004cd4: c6 04 20 54 ld [ %l0 + 0x54 ], %g3 <== NOT EXECUTED 40004cd8: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED 40004cdc: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40004ce0: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 40004ce4: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40004ce8: 18 80 00 86 bgu 40004f00 <== NOT EXECUTED 40004cec: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED break; } } rtems_task_wake_after (1); 40004cf0: 40 00 06 e4 call 40006880 <== NOT EXECUTED 40004cf4: 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); 40004cf8: 10 bf ff e1 b 40004c7c <== NOT EXECUTED 40004cfc: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED } } rtems_task_wake_after (1); } else { siproc (n, tty); 40004d00: 7f ff ff 2e call 400049b8 <== NOT EXECUTED 40004d04: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 40004d08: c4 0c 20 47 ldub [ %l0 + 0x47 ], %g2 <== NOT EXECUTED 40004d0c: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40004d10: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40004d14: 16 80 00 7a bge 40004efc <== NOT EXECUTED 40004d18: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 40004d1c: 22 bf ff d8 be,a 40004c7c <== NOT EXECUTED 40004d20: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 40004d24: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED 40004d28: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004d2c: 22 bf ff d4 be,a 40004c7c <== NOT EXECUTED 40004d30: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); 40004d34: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 40004d38: 40 00 03 4a call 40005a60 <== NOT EXECUTED 40004d3c: 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); 40004d40: 10 bf ff cf b 40004c7c <== NOT EXECUTED 40004d44: 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) && 40004d48: 03 10 00 64 sethi %hi(0x40019000), %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; 40004d4c: 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) && 40004d50: ba 10 63 2c or %g1, 0x32c, %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, 40004d54: ae 04 20 49 add %l0, 0x49, %l7 <== NOT EXECUTED 40004d58: 10 80 00 60 b 40004ed8 <== NOT EXECUTED 40004d5c: 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; 40004d60: d0 04 20 5c ld [ %l0 + 0x5c ], %o0 <== NOT EXECUTED 40004d64: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 40004d68: 40 00 40 54 call 40014eb8 <.urem> <== NOT EXECUTED 40004d6c: 90 02 20 01 inc %o0 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 40004d70: 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; 40004d74: 84 10 00 08 mov %o0, %g2 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 40004d78: e2 08 40 08 ldub [ %g1 + %o0 ], %l1 <== NOT EXECUTED tty->rawInBuf.Head = newHead; 40004d7c: d0 24 20 5c st %o0, [ %l0 + 0x5c ] <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 40004d80: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 40004d84: d0 04 20 64 ld [ %l0 + 0x64 ], %o0 <== NOT EXECUTED 40004d88: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 40004d8c: 90 02 00 01 add %o0, %g1, %o0 <== NOT EXECUTED 40004d90: 40 00 40 4a call 40014eb8 <.urem> <== NOT EXECUTED 40004d94: 90 22 00 02 sub %o0, %g2, %o0 <== NOT EXECUTED 40004d98: c2 04 20 bc ld [ %l0 + 0xbc ], %g1 <== NOT EXECUTED 40004d9c: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 40004da0: 3a 80 00 27 bcc,a 40004e3c <== NOT EXECUTED 40004da4: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 40004da8: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004dac: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED 40004db0: 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)) 40004db4: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004db8: 82 08 62 02 and %g1, 0x202, %g1 <== NOT EXECUTED 40004dbc: 80 a0 62 02 cmp %g1, 0x202 <== NOT EXECUTED 40004dc0: 12 80 00 11 bne 40004e04 <== NOT EXECUTED 40004dc4: 01 00 00 00 nop <== NOT EXECUTED 40004dc8: c2 04 20 94 ld [ %l0 + 0x94 ], %g1 <== NOT EXECUTED 40004dcc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004dd0: 22 80 00 07 be,a 40004dec <== NOT EXECUTED 40004dd4: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 40004dd8: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004ddc: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40004de0: 02 80 00 09 be 40004e04 <== NOT EXECUTED 40004de4: 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, 40004de8: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 40004dec: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 40004df0: 92 10 00 17 mov %l7, %o1 <== NOT EXECUTED 40004df4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004df8: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 40004dfc: 10 80 00 10 b 40004e3c <== NOT EXECUTED 40004e00: 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) { 40004e04: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004e08: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 40004e0c: 22 80 00 0c be,a 40004e3c <== NOT EXECUTED 40004e10: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 40004e14: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 40004e18: 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; 40004e1c: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED 40004e20: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 40004e24: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40004e28: 22 80 00 05 be,a 40004e3c <== NOT EXECUTED 40004e2c: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 40004e30: 9f c0 80 00 call %g2 <== NOT EXECUTED 40004e34: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 40004e38: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 40004e3c: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 40004e40: 02 80 00 09 be 40004e64 <== NOT EXECUTED 40004e44: 90 0c 60 ff and %l1, 0xff, %o0 <== NOT EXECUTED if (siproc (c, tty)) 40004e48: 7f ff fe dc call 400049b8 <== NOT EXECUTED 40004e4c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40004e50: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004e54: 32 80 00 0c bne,a 40004e84 <== NOT EXECUTED 40004e58: 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; 40004e5c: 10 80 00 0b b 40004e88 <== NOT EXECUTED 40004e60: 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); 40004e64: 7f ff fe d5 call 400049b8 <== NOT EXECUTED 40004e68: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 40004e6c: c4 0c 20 47 ldub [ %l0 + 0x47 ], %g2 <== NOT EXECUTED 40004e70: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40004e74: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40004e78: 26 80 00 04 bl,a 40004e88 <== NOT EXECUTED 40004e7c: d4 04 20 70 ld [ %l0 + 0x70 ], %o2 <== NOT EXECUTED 40004e80: a8 10 20 00 clr %l4 <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 40004e84: 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) && 40004e88: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 <== NOT EXECUTED 40004e8c: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 40004e90: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004e94: 02 80 00 08 be 40004eb4 <== NOT EXECUTED 40004e98: a2 10 00 14 mov %l4, %l1 <== NOT EXECUTED 40004e9c: c2 07 40 00 ld [ %i5 ], %g1 <== NOT EXECUTED 40004ea0: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 40004ea4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40004ea8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004eac: 06 bf ff ad bl 40004d60 <== NOT EXECUTED 40004eb0: 01 00 00 00 nop <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 40004eb4: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED 40004eb8: 02 80 00 11 be 40004efc <== NOT EXECUTED 40004ebc: a4 10 00 0a mov %o2, %l2 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 40004ec0: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED 40004ec4: 40 00 05 35 call 40006398 <== NOT EXECUTED 40004ec8: d2 04 20 6c ld [ %l0 + 0x6c ], %o1 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 40004ecc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004ed0: 12 80 00 0c bne 40004f00 <== NOT EXECUTED 40004ed4: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; rtems_status_code sc; int wait = (int)1; while ( wait ) { 40004ed8: a8 10 00 11 mov %l1, %l4 <== NOT EXECUTED 40004edc: 10 bf ff eb b 40004e88 <== NOT EXECUTED 40004ee0: 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++]; 40004ee4: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED count--; 40004ee8: 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++]; 40004eec: c2 08 40 02 ldub [ %g1 + %g2 ], %g1 <== NOT EXECUTED 40004ef0: c2 2d 40 00 stb %g1, [ %l5 ] <== NOT EXECUTED 40004ef4: c6 24 20 24 st %g3, [ %l0 + 0x24 ] <== NOT EXECUTED 40004ef8: 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)) { 40004efc: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 40004f00: 22 80 00 08 be,a 40004f20 <== NOT EXECUTED 40004f04: c2 05 a0 0c ld [ %l6 + 0xc ], %g1 <== NOT EXECUTED 40004f08: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED 40004f0c: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40004f10: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004f14: 06 bf ff f4 bl 40004ee4 <== NOT EXECUTED 40004f18: 86 00 a0 01 add %g2, 1, %g3 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 40004f1c: c2 05 a0 0c ld [ %l6 + 0xc ], %g1 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 40004f20: 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; 40004f24: 82 20 40 13 sub %g1, %l3, %g1 <== NOT EXECUTED 40004f28: c2 25 a0 14 st %g1, [ %l6 + 0x14 ] <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 40004f2c: 40 00 05 62 call 400064b4 <== NOT EXECUTED 40004f30: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED return sc; } 40004f34: 81 c7 e0 08 ret <== NOT EXECUTED 40004f38: 81 e8 00 00 restore <== NOT EXECUTED 40003cec : * 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) { 40003cec: 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)) 40003cf0: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40003cf4: 82 08 64 03 and %g1, 0x403, %g1 <== NOT EXECUTED 40003cf8: 80 a0 64 01 cmp %g1, 0x401 <== NOT EXECUTED 40003cfc: 12 80 00 10 bne 40003d3c <== NOT EXECUTED 40003d00: a2 10 00 18 mov %i0, %l1 <== NOT EXECUTED == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 40003d04: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED 40003d08: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 40003d0c: 92 06 20 4a add %i0, 0x4a, %o1 <== NOT EXECUTED 40003d10: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003d14: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 40003d18: 7f ff f8 10 call 40001d58 <== NOT EXECUTED 40003d1c: 01 00 00 00 nop <== NOT EXECUTED tty->t_dqlen--; 40003d20: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 40003d24: 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--; 40003d28: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 40003d2c: 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--; 40003d30: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 40003d34: c4 26 20 b8 st %g2, [ %i0 + 0xb8 ] <== NOT EXECUTED rtems_interrupt_enable(level); 40003d38: 30 80 00 12 b,a 40003d80 <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 40003d3c: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40003d40: 82 08 60 03 and %g1, 3, %g1 <== NOT EXECUTED 40003d44: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40003d48: 12 80 00 12 bne 40003d90 <== NOT EXECUTED 40003d4c: 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, 40003d50: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED 40003d54: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 40003d58: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003d5c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 40003d60: 7f ff f7 fe call 40001d58 <== NOT EXECUTED 40003d64: 01 00 00 00 nop <== NOT EXECUTED tty->t_dqlen--; 40003d68: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 40003d6c: 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--; 40003d70: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 40003d74: 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--; 40003d78: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 40003d7c: c4 26 20 b8 st %g2, [ %i0 + 0xb8 ] <== NOT EXECUTED rtems_interrupt_enable(level); 40003d80: 7f ff f7 fa call 40001d68 <== NOT EXECUTED 40003d84: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 40003d88: 81 c7 e0 08 ret <== NOT EXECUTED 40003d8c: 81 e8 00 00 restore <== NOT EXECUTED nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 40003d90: c4 06 20 80 ld [ %i0 + 0x80 ], %g2 <== NOT EXECUTED 40003d94: c2 06 20 84 ld [ %i0 + 0x84 ], %g1 <== NOT EXECUTED 40003d98: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40003d9c: 12 80 00 0a bne 40003dc4 <== NOT EXECUTED 40003da0: 01 00 00 00 nop <== NOT EXECUTED /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 40003da4: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED 40003da8: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40003dac: 12 bf ff f7 bne 40003d88 <== NOT EXECUTED 40003db0: b0 10 20 00 clr %i0 <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 40003db4: 40 00 09 c0 call 400064b4 <== NOT EXECUTED 40003db8: d0 04 60 8c ld [ %l1 + 0x8c ], %o0 <== NOT EXECUTED 40003dbc: 81 c7 e0 08 ret <== NOT EXECUTED 40003dc0: 81 e8 00 00 restore <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); 40003dc4: 7f ff f7 e5 call 40001d58 <== NOT EXECUTED 40003dc8: 01 00 00 00 nop <== NOT EXECUTED len = tty->t_dqlen; 40003dcc: e0 06 20 90 ld [ %i0 + 0x90 ], %l0 <== NOT EXECUTED tty->t_dqlen = 0; 40003dd0: c0 26 20 90 clr [ %i0 + 0x90 ] <== NOT EXECUTED rtems_interrupt_enable(level); 40003dd4: 7f ff f7 e5 call 40001d68 <== NOT EXECUTED 40003dd8: 01 00 00 00 nop <== NOT EXECUTED newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 40003ddc: d0 06 20 84 ld [ %i0 + 0x84 ], %o0 <== NOT EXECUTED 40003de0: d2 06 20 88 ld [ %i0 + 0x88 ], %o1 <== NOT EXECUTED 40003de4: 40 00 44 35 call 40014eb8 <.urem> <== NOT EXECUTED 40003de8: 90 04 00 08 add %l0, %o0, %o0 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 40003dec: 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; 40003df0: d0 24 60 84 st %o0, [ %l1 + 0x84 ] <== NOT EXECUTED if (tty->rawOutBufState == rob_wait) { 40003df4: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40003df8: 12 80 00 04 bne 40003e08 <== NOT EXECUTED 40003dfc: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 40003e00: 40 00 09 ad call 400064b4 <== NOT EXECUTED 40003e04: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { 40003e08: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 <== NOT EXECUTED 40003e0c: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 40003e10: 12 80 00 0c bne 40003e40 <== NOT EXECUTED 40003e14: 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) { 40003e18: c2 04 60 d4 ld [ %l1 + 0xd4 ], %g1 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 40003e1c: 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) { 40003e20: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003e24: 02 80 00 2c be 40003ed4 <== NOT EXECUTED 40003e28: b0 10 20 00 clr %i0 <== NOT EXECUTED (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 40003e2c: d2 04 60 d8 ld [ %l1 + 0xd8 ], %o1 <== NOT EXECUTED 40003e30: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003e34: 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); 40003e38: 10 80 00 27 b 40003ed4 <== NOT EXECUTED 40003e3c: 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)) 40003e40: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40003e44: 82 08 62 10 and %g1, 0x210, %g1 <== NOT EXECUTED 40003e48: 80 a0 62 10 cmp %g1, 0x210 <== NOT EXECUTED 40003e4c: 12 80 00 0d bne 40003e80 <== NOT EXECUTED 40003e50: 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); 40003e54: 7f ff f7 c1 call 40001d58 <== NOT EXECUTED 40003e58: 01 00 00 00 nop <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 40003e5c: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 40003e60: 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; 40003e64: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 40003e68: 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; 40003e6c: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ rtems_interrupt_enable(level); 40003e70: 7f ff f7 be call 40001d68 <== NOT EXECUTED 40003e74: 01 00 00 00 nop <== NOT EXECUTED 40003e78: 10 80 00 17 b 40003ed4 <== NOT EXECUTED 40003e7c: b0 10 20 00 clr %i0 ! 0 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 40003e80: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 <== NOT EXECUTED 40003e84: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 40003e88: 08 80 00 05 bleu 40003e9c <== NOT EXECUTED 40003e8c: 01 00 00 00 nop <== NOT EXECUTED nToSend = tty->rawOutBuf.Size - newTail; 40003e90: c2 04 60 88 ld [ %l1 + 0x88 ], %g1 <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; 40003e94: 10 80 00 04 b 40003ea4 <== NOT EXECUTED 40003e98: b0 20 40 10 sub %g1, %l0, %i0 <== NOT EXECUTED 40003e9c: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 <== NOT EXECUTED 40003ea0: 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)) { 40003ea4: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40003ea8: 80 88 66 00 btst 0x600, %g1 <== NOT EXECUTED 40003eac: 32 80 00 02 bne,a 40003eb4 <== NOT EXECUTED 40003eb0: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 40003eb4: d2 04 60 7c ld [ %l1 + 0x7c ], %o1 <== NOT EXECUTED 40003eb8: c4 04 60 a4 ld [ %l1 + 0xa4 ], %g2 <== NOT EXECUTED 40003ebc: 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*/ 40003ec0: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 40003ec4: 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*/ 40003ec8: c2 24 60 94 st %g1, [ %l1 + 0x94 ] <== NOT EXECUTED (*tty->device.write)(tty->minor, 40003ecc: 9f c0 80 00 call %g2 <== NOT EXECUTED 40003ed0: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 40003ed4: e0 24 60 84 st %l0, [ %l1 + 0x84 ] <== NOT EXECUTED } return nToSend; } 40003ed8: 81 c7 e0 08 ret <== NOT EXECUTED 40003edc: 81 e8 00 00 restore <== NOT EXECUTED 400059dc : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 400059dc: 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 | 400059e0: 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 ( 400059e4: 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 | 400059e8: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED 400059ec: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 400059f0: 94 10 20 00 clr %o2 <== NOT EXECUTED 400059f4: 40 00 00 b9 call 40005cd8 <== NOT EXECUTED 400059f8: 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) { 400059fc: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40005a00: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40005a04: 22 80 00 07 be,a 40005a20 <== NOT EXECUTED 40005a08: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1 <== NOT EXECUTED tty->rxTaskId = 0; 40005a0c: c0 26 20 c4 clr [ %i0 + 0xc4 ] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 40005a10: 40 00 03 22 call 40006698 <== NOT EXECUTED 40005a14: 90 10 20 00 clr %o0 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 40005a18: 10 bf ff f5 b 400059ec <== NOT EXECUTED 40005a1c: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 40005a20: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005a24: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED if (c != EOF) { 40005a28: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 40005a2c: 02 bf ff ef be 400059e8 <== NOT EXECUTED 40005a30: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; 40005a34: d0 2f bf f7 stb %o0, [ %fp + -9 ] <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 40005a38: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40005a3c: 7f ff f9 48 call 40003f5c <== NOT EXECUTED 40005a40: 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 | 40005a44: 10 bf ff ea b 400059ec <== NOT EXECUTED 40005a48: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED 40003cd4 : 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); 40003cd4: d0 02 20 c4 ld [ %o0 + 0xc4 ], %o0 <== NOT EXECUTED 40003cd8: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40003cdc: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40003ce0: 40 00 08 60 call 40005e60 <== NOT EXECUTED 40003ce4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40003ce8: 01 00 00 00 nop 40005960 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 40005960: 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) { 40005964: 03 10 00 66 sethi %hi(0x40019800), %g1 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 40005968: 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) { 4000596c: a2 10 60 dc or %g1, 0xdc, %l1 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 40005970: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40005974: 94 10 20 00 clr %o2 <== NOT EXECUTED 40005978: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 4000597c: 40 00 00 d7 call 40005cd8 <== NOT EXECUTED 40005980: 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) { 40005984: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40005988: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000598c: 02 80 00 07 be 400059a8 <== NOT EXECUTED 40005990: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED tty->txTaskId = 0; 40005994: c0 26 20 c8 clr [ %i0 + 0xc8 ] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 40005998: 40 00 03 40 call 40006698 <== NOT EXECUTED 4000599c: 90 10 20 00 clr %o0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 400059a0: 10 bf ff f5 b 40005974 <== NOT EXECUTED 400059a4: 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) { 400059a8: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 400059ac: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 400059b0: 82 04 40 01 add %l1, %g1, %g1 <== NOT EXECUTED 400059b4: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED 400059b8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400059bc: 02 80 00 04 be 400059cc <== NOT EXECUTED 400059c0: 01 00 00 00 nop <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 400059c4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400059c8: 01 00 00 00 nop <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 400059cc: 7f ff f8 c8 call 40003cec <== NOT EXECUTED 400059d0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 400059d4: 10 bf ff e8 b 40005974 <== NOT EXECUTED 400059d8: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40004a08 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 40004a08: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40004a0c: c2 06 00 00 ld [ %i0 ], %g1 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40004a10: 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; 40004a14: e4 00 60 28 ld [ %g1 + 0x28 ], %l2 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40004a18: 94 10 20 00 clr %o2 40004a1c: 40 00 06 5f call 40006398 40004a20: d0 04 a0 18 ld [ %l2 + 0x18 ], %o0 if (sc != RTEMS_SUCCESSFUL) 40004a24: a6 92 20 00 orcc %o0, 0, %l3 40004a28: 12 80 00 25 bne 40004abc 40004a2c: 03 10 00 66 sethi %hi(0x40019800), %g1 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 40004a30: c4 04 a0 cc ld [ %l2 + 0xcc ], %g2 40004a34: 85 28 a0 05 sll %g2, 5, %g2 40004a38: 82 10 60 dc or %g1, 0xdc, %g1 40004a3c: 82 00 40 02 add %g1, %g2, %g1 40004a40: c2 00 60 0c ld [ %g1 + 0xc ], %g1 40004a44: 80 a0 60 00 cmp %g1, 0 40004a48: 02 80 00 06 be 40004a60 40004a4c: 92 10 00 18 mov %i0, %o1 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 40004a50: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004a54: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40004a58: 10 80 00 17 b 40004ab4 <== NOT EXECUTED 40004a5c: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 40004a60: c2 04 a0 34 ld [ %l2 + 0x34 ], %g1 40004a64: d2 06 20 0c ld [ %i0 + 0xc ], %o1 40004a68: 80 88 60 01 btst 1, %g1 40004a6c: 02 80 00 0e be 40004aa4 40004a70: d0 06 20 08 ld [ %i0 + 8 ], %o0 uint32_t count = args->count; 40004a74: a2 10 00 09 mov %o1, %l1 char *buffer = args->buffer; 40004a78: 10 80 00 06 b 40004a90 40004a7c: a0 10 00 08 mov %o0, %l0 while (count--) oproc (*buffer++, tty); 40004a80: a2 04 7f ff add %l1, -1, %l1 40004a84: a0 04 20 01 inc %l0 40004a88: 7f ff fe 48 call 400043a8 40004a8c: 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--) 40004a90: 80 a4 60 00 cmp %l1, 0 40004a94: 32 bf ff fb bne,a 40004a80 40004a98: 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; 40004a9c: 10 80 00 05 b 40004ab0 40004aa0: 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); 40004aa4: 7f ff fd f5 call 40004278 <== NOT EXECUTED 40004aa8: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED args->bytes_moved = args->count; 40004aac: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED 40004ab0: c2 26 20 14 st %g1, [ %i0 + 0x14 ] } rtems_semaphore_release (tty->osem); 40004ab4: 40 00 06 80 call 400064b4 40004ab8: d0 04 a0 18 ld [ %l2 + 0x18 ], %o0 return sc; } 40004abc: 81 c7 e0 08 ret 40004ac0: 91 e8 00 13 restore %g0, %l3, %o0 4000753c : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 4000753c: 9d e3 bf 90 save %sp, -112, %sp 40007540: a4 10 00 18 mov %i0, %l2 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 40007544: 80 a6 60 00 cmp %i1, 0 40007548: 02 80 00 1c be 400075b8 4000754c: b0 10 20 0a mov 0xa, %i0 return RTEMS_INVALID_NUMBER; if ( !routine ) 40007550: 80 a6 a0 00 cmp %i2, 0 40007554: 02 80 00 19 be 400075b8 40007558: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 4000755c: 11 10 00 5d sethi %hi(0x40017400), %o0 40007560: 92 10 00 12 mov %l2, %o1 40007564: 90 12 22 84 or %o0, 0x284, %o0 40007568: 40 00 05 23 call 400089f4 <_Objects_Get> 4000756c: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40007570: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007574: a0 10 00 08 mov %o0, %l0 40007578: 80 a0 60 00 cmp %g1, 0 4000757c: 12 80 00 0f bne 400075b8 40007580: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 40007584: a2 02 20 10 add %o0, 0x10, %l1 40007588: 40 00 0c 1b call 4000a5f4 <_Watchdog_Remove> 4000758c: 90 10 00 11 mov %l1, %o0 _ISR_Disable( level ); 40007590: 7f ff eb b1 call 40002454 40007594: 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 ) { 40007598: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4000759c: 80 a0 60 00 cmp %g1, 0 400075a0: 22 80 00 08 be,a 400075c0 400075a4: f4 24 20 2c st %i2, [ %l0 + 0x2c ] _ISR_Enable( level ); 400075a8: 7f ff eb af call 40002464 <== NOT EXECUTED 400075ac: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 400075b0: 40 00 07 37 call 4000928c <_Thread_Enable_dispatch> <== NOT EXECUTED 400075b4: 01 00 00 00 nop <== NOT EXECUTED 400075b8: 81 c7 e0 08 ret 400075bc: 81 e8 00 00 restore void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 400075c0: e4 24 20 30 st %l2, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 400075c4: 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; 400075c8: c0 24 20 38 clr [ %l0 + 0x38 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400075cc: c0 24 20 18 clr [ %l0 + 0x18 ] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 400075d0: 7f ff eb a5 call 40002464 400075d4: b0 10 20 00 clr %i0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400075d8: 92 10 00 11 mov %l1, %o1 400075dc: 11 10 00 5c sethi %hi(0x40017000), %o0 400075e0: 90 12 21 90 or %o0, 0x190, %o0 ! 40017190 <_Watchdog_Ticks_chain> 400075e4: 40 00 0b aa call 4000a48c <_Watchdog_Insert> 400075e8: f2 24 20 1c st %i1, [ %l0 + 0x1c ] _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 400075ec: 40 00 07 28 call 4000928c <_Thread_Enable_dispatch> 400075f0: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 400075f4: 81 c7 e0 08 ret 400075f8: 81 e8 00 00 restore 400127c8 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 400127c8: 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 ) && 400127cc: 80 a6 20 00 cmp %i0, 0 400127d0: 02 80 00 06 be 400127e8 400127d4: 82 10 20 00 clr %g1 400127d8: 03 10 00 ba sethi %hi(0x4002e800), %g1 400127dc: c2 08 63 e4 ldub [ %g1 + 0x3e4 ], %g1 ! 4002ebe4 400127e0: 80 a0 40 18 cmp %g1, %i0 400127e4: 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 ) ) { 400127e8: 80 a0 60 00 cmp %g1, 0 400127ec: 12 80 00 06 bne 40012804 400127f0: a2 10 00 18 mov %i0, %l1 if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 400127f4: 80 a6 3f ff cmp %i0, -1 400127f8: 12 80 00 56 bne 40012950 400127fc: 90 10 20 13 mov 0x13, %o0 40012800: a2 10 20 00 clr %l1 40012804: 05 10 00 cf sethi %hi(0x40033c00), %g2 40012808: c2 00 a2 10 ld [ %g2 + 0x210 ], %g1 ! 40033e10 <_Thread_Dispatch_disable_level> 4001280c: 82 00 60 01 inc %g1 40012810: c2 20 a2 10 st %g1, [ %g2 + 0x210 ] /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 40012814: 31 10 00 bd sethi %hi(0x4002f400), %i0 initialized = true; 40012818: 82 10 20 01 mov 1, %g1 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 4001281c: e0 0e 23 3c ldub [ %i0 + 0x33c ], %l0 initialized = true; _Thread_Enable_dispatch(); 40012820: 40 00 0c 06 call 40015838 <_Thread_Enable_dispatch> 40012824: c2 2e 23 3c stb %g1, [ %i0 + 0x33c ] if ( tmpInitialized ) 40012828: 80 a4 20 00 cmp %l0, 0 4001282c: 12 80 00 49 bne 40012950 40012830: 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); 40012834: 05 10 00 cf sethi %hi(0x40033c00), %g2 40012838: 82 10 a1 2c or %g2, 0x12c, %g1 ! 40033d2c <_Timer_To_be_inserted> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4001283c: 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; 40012840: 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); 40012844: 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( 40012848: 92 10 00 11 mov %l1, %o1 4001284c: 94 10 00 19 mov %i1, %o2 40012850: 19 00 00 20 sethi %hi(0x8000), %o4 40012854: c2 20 a1 2c st %g1, [ %g2 + 0x12c ] 40012858: 98 16 80 0c or %i2, %o4, %o4 4001285c: 11 15 12 53 sethi %hi(0x54494c00), %o0 40012860: 96 10 21 00 mov 0x100, %o3 40012864: 90 12 21 45 or %o0, 0x145, %o0 40012868: 7f ff fc 77 call 40011a44 4001286c: 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) { 40012870: 80 a2 20 00 cmp %o0, 0 40012874: 02 80 00 04 be 40012884 40012878: 03 10 00 cf sethi %hi(0x40033c00), %g1 initialized = false; 4001287c: 10 80 00 35 b 40012950 40012880: c0 2e 23 3c clrb [ %i0 + 0x33c ] * 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( 40012884: 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 ) 40012888: 86 10 60 cc or %g1, 0xcc, %g3 4001288c: c4 10 e0 10 lduh [ %g3 + 0x10 ], %g2 40012890: 03 00 00 3f sethi %hi(0xfc00), %g1 40012894: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40012898: 82 0a c0 01 and %o3, %g1, %g1 4001289c: 80 a0 40 02 cmp %g1, %g2 400128a0: 18 80 00 05 bgu 400128b4 400128a4: 98 10 20 00 clr %o4 return NULL; return information->local_table[ index ]; 400128a8: c4 00 e0 1c ld [ %g3 + 0x1c ], %g2 400128ac: 83 28 60 02 sll %g1, 2, %g1 400128b0: d8 00 80 01 ld [ %g2 + %g1 ], %o4 400128b4: 1b 10 00 cf sethi %hi(0x40033c00), %o5 400128b8: 82 13 61 20 or %o5, 0x120, %g1 ! 40033d20 <_Timer_Seconds_chain> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 400128bc: 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; 400128c0: 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); 400128c4: 82 00 60 04 add %g1, 4, %g1 400128c8: c2 23 61 20 st %g1, [ %o5 + 0x120 ] 400128cc: 03 10 00 d1 sethi %hi(0x40034400), %g1 400128d0: 09 10 00 cf sethi %hi(0x40033c00), %g4 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 400128d4: c0 23 20 6c clr [ %o4 + 0x6c ] 400128d8: 84 11 21 0c or %g4, 0x10c, %g2 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400128dc: c0 23 20 50 clr [ %o4 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; 400128e0: d6 23 20 68 st %o3, [ %o4 + 0x68 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 400128e4: 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; 400128e8: c0 20 a0 04 clr [ %g2 + 4 ] 400128ec: d8 20 63 c0 st %o4, [ %g1 + 0x3c0 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 400128f0: 84 00 a0 04 add %g2, 4, %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 400128f4: 07 10 00 55 sethi %hi(0x40015400), %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400128f8: 03 10 00 cf sethi %hi(0x40033c00), %g1 the_watchdog->routine = routine; 400128fc: 86 10 e2 b4 or %g3, 0x2b4, %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40012900: 82 10 61 38 or %g1, 0x138, %g1 the_watchdog->routine = routine; 40012904: c6 23 20 64 st %g3, [ %o4 + 0x64 ] 40012908: c4 21 21 0c st %g2, [ %g4 + 0x10c ] 4001290c: c6 20 60 1c st %g3, [ %g1 + 0x1c ] the_watchdog->id = id; the_watchdog->user_data = user_data; 40012910: c0 20 60 24 clr [ %g1 + 0x24 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40012914: c0 20 60 08 clr [ %g1 + 8 ] the_watchdog->routine = routine; the_watchdog->id = id; 40012918: 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; 4001291c: 05 10 00 d1 sethi %hi(0x40034400), %g2 40012920: 03 10 00 4a sethi %hi(0x40012800), %g1 40012924: 82 10 61 58 or %g1, 0x158, %g1 ! 40012958 <_Timer_Server_schedule_operation_method> /* * Start the timer server */ status = rtems_task_start( 40012928: 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; 4001292c: c2 20 a3 bc st %g1, [ %g2 + 0x3bc ] /* * Start the timer server */ status = rtems_task_start( 40012930: 13 10 00 4a sethi %hi(0x40012800), %o1 40012934: 94 10 20 00 clr %o2 40012938: 7f ff fd 99 call 40011f9c 4001293c: 92 12 62 08 or %o1, 0x208, %o1 id, /* the id from create */ (rtems_task_entry) _Timer_Server_body, /* the timer server entry point */ 0 /* there is no argument */ ); if (status) { 40012940: 80 a2 20 00 cmp %o0, 0 40012944: 02 80 00 03 be 40012950 40012948: 03 10 00 bd sethi %hi(0x4002f400), %g1 * but there is actually no way (in normal circumstances) that the * start can fail. The id and starting address are known to be * be good. If this service fails, something is weirdly wrong on the * target such as a stray write in an ISR or incorrect memory layout. */ initialized = false; 4001294c: c0 28 63 3c clrb [ %g1 + 0x33c ] ! 4002f73c <== NOT EXECUTED } return status; } 40012950: 81 c7 e0 08 ret 40012954: 91 e8 00 08 restore %g0, %o0, %o0 4001253c : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 4001253c: 9d e3 bf 90 save %sp, -112, %sp 40012540: 11 10 00 d1 sethi %hi(0x40034400), %o0 40012544: 92 10 00 18 mov %i0, %o1 40012548: 90 12 23 7c or %o0, 0x37c, %o0 4001254c: 40 00 0a 68 call 40014eec <_Objects_Get> 40012550: 94 07 bf f4 add %fp, -12, %o2 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40012554: c2 07 bf f4 ld [ %fp + -12 ], %g1 40012558: a0 10 00 08 mov %o0, %l0 4001255c: 80 a0 60 00 cmp %g1, 0 40012560: 12 80 00 19 bne 400125c4 40012564: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 40012568: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 4001256c: 80 a0 60 01 cmp %g1, 1 40012570: 22 80 00 0f be,a 400125ac 40012574: 31 10 00 d1 sethi %hi(0x40034400), %i0 40012578: 2a 80 00 06 bcs,a 40012590 4001257c: a0 02 20 10 add %o0, 0x10, %l0 40012580: 80 a0 60 04 cmp %g1, 4 40012584: 18 80 00 1c bgu 400125f4 40012588: 01 00 00 00 nop 4001258c: 30 80 00 16 b,a 400125e4 case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 40012590: 40 00 12 af call 4001704c <_Watchdog_Remove> 40012594: 90 10 00 10 mov %l0, %o0 _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 40012598: 92 10 00 10 mov %l0, %o1 4001259c: 11 10 00 cf sethi %hi(0x40033c00), %o0 400125a0: 40 00 12 51 call 40016ee4 <_Watchdog_Insert> 400125a4: 90 12 22 f0 or %o0, 0x2f0, %o0 ! 40033ef0 <_Watchdog_Ticks_chain> 400125a8: 30 80 00 13 b,a 400125f4 break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { 400125ac: c2 06 23 bc ld [ %i0 + 0x3bc ], %g1 400125b0: 80 a0 60 00 cmp %g1, 0 400125b4: 12 80 00 06 bne 400125cc 400125b8: 01 00 00 00 nop _Thread_Enable_dispatch(); 400125bc: 40 00 0c 9f call 40015838 <_Thread_Enable_dispatch> <== NOT EXECUTED 400125c0: b0 10 20 0e mov 0xe, %i0 ! e <== NOT EXECUTED 400125c4: 81 c7 e0 08 ret 400125c8: 81 e8 00 00 restore return RTEMS_INCORRECT_STATE; } _Watchdog_Remove( &the_timer->Ticker ); 400125cc: 40 00 12 a0 call 4001704c <_Watchdog_Remove> 400125d0: 90 02 20 10 add %o0, 0x10, %o0 (*_Timer_Server_schedule_operation)( the_timer ); 400125d4: c2 06 23 bc ld [ %i0 + 0x3bc ], %g1 400125d8: 9f c0 40 00 call %g1 400125dc: 90 10 00 10 mov %l0, %o0 400125e0: 30 80 00 05 b,a 400125f4 break; case TIMER_TIME_OF_DAY: case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); 400125e4: 40 00 0c 95 call 40015838 <_Thread_Enable_dispatch> 400125e8: b0 10 20 0b mov 0xb, %i0 400125ec: 81 c7 e0 08 ret 400125f0: 81 e8 00 00 restore return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 400125f4: 40 00 0c 91 call 40015838 <_Thread_Enable_dispatch> 400125f8: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 400125fc: 81 c7 e0 08 ret 40012600: 81 e8 00 00 restore 40012604 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 40012604: 9d e3 bf 90 save %sp, -112, %sp Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 40012608: 03 10 00 d1 sethi %hi(0x40034400), %g1 4001260c: c2 00 63 c0 ld [ %g1 + 0x3c0 ], %g1 ! 400347c0 <_Timer_Server> Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 40012610: a2 10 00 18 mov %i0, %l1 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 40012614: 80 a0 60 00 cmp %g1, 0 40012618: 02 80 00 1e be 40012690 4001261c: b0 10 20 0e mov 0xe, %i0 return RTEMS_INCORRECT_STATE; if ( !routine ) 40012620: 80 a6 a0 00 cmp %i2, 0 40012624: 02 80 00 1b be 40012690 40012628: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 4001262c: 80 a6 60 00 cmp %i1, 0 40012630: 02 80 00 18 be 40012690 40012634: b0 10 20 0a mov 0xa, %i0 40012638: 11 10 00 d1 sethi %hi(0x40034400), %o0 4001263c: 92 10 00 11 mov %l1, %o1 40012640: 90 12 23 7c or %o0, 0x37c, %o0 40012644: 40 00 0a 2a call 40014eec <_Objects_Get> 40012648: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 4001264c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40012650: a0 10 00 08 mov %o0, %l0 40012654: 80 a0 60 00 cmp %g1, 0 40012658: 12 80 00 0e bne 40012690 4001265c: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 40012660: 40 00 12 7b call 4001704c <_Watchdog_Remove> 40012664: 90 02 20 10 add %o0, 0x10, %o0 _ISR_Disable( level ); 40012668: 7f ff e3 aa call 4000b510 4001266c: 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 ) { 40012670: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 40012674: 80 a0 60 00 cmp %g1, 0 40012678: 02 80 00 08 be 40012698 4001267c: 82 10 20 01 mov 1, %g1 _ISR_Enable( level ); 40012680: 7f ff e3 a8 call 4000b520 <== NOT EXECUTED 40012684: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 40012688: 40 00 0c 6c call 40015838 <_Thread_Enable_dispatch> <== NOT EXECUTED 4001268c: 01 00 00 00 nop <== NOT EXECUTED 40012690: 81 c7 e0 08 ret 40012694: 81 e8 00 00 restore Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40012698: f4 24 20 2c st %i2, [ %l0 + 0x2c ] the_watchdog->id = id; 4001269c: e2 24 20 30 st %l1, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 400126a0: 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; 400126a4: f2 24 20 1c st %i1, [ %l0 + 0x1c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400126a8: 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; 400126ac: 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 ); 400126b0: 7f ff e3 9c call 4000b520 400126b4: 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 ); 400126b8: 03 10 00 d1 sethi %hi(0x40034400), %g1 400126bc: c2 00 63 bc ld [ %g1 + 0x3bc ], %g1 ! 400347bc <_Timer_Server_schedule_operation> 400126c0: 9f c0 40 00 call %g1 400126c4: 90 10 00 10 mov %l0, %o0 _Thread_Enable_dispatch(); 400126c8: 40 00 0c 5c call 40015838 <_Thread_Enable_dispatch> 400126cc: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 400126d0: 81 c7 e0 08 ret 400126d4: 81 e8 00 00 restore 400071bc : static int rtems_verror( uint32_t error_flag, const char *printf_format, va_list arglist ) { 400071bc: 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) 400071c0: 03 08 00 00 sethi %hi(0x20000000), %g1 <== NOT EXECUTED 400071c4: a8 8e 00 01 andcc %i0, %g1, %l4 <== NOT EXECUTED 400071c8: 02 80 00 11 be 4000720c <== NOT EXECUTED 400071cc: a6 10 00 18 mov %i0, %l3 <== NOT EXECUTED { if (rtems_panic_in_progress++) 400071d0: 03 10 00 a2 sethi %hi(0x40028800), %g1 <== NOT EXECUTED 400071d4: c6 00 63 e8 ld [ %g1 + 0x3e8 ], %g3 ! 40028be8 <== NOT EXECUTED 400071d8: 84 00 e0 01 add %g3, 1, %g2 <== NOT EXECUTED 400071dc: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 400071e0: 02 80 00 07 be 400071fc <== NOT EXECUTED 400071e4: c4 20 63 e8 st %g2, [ %g1 + 0x3e8 ] <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400071e8: 05 10 00 a3 sethi %hi(0x40028c00), %g2 <== NOT EXECUTED 400071ec: c2 00 a1 d0 ld [ %g2 + 0x1d0 ], %g1 ! 40028dd0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 400071f0: 82 00 60 01 inc %g1 <== NOT EXECUTED 400071f4: c2 20 a1 d0 st %g1, [ %g2 + 0x1d0 ] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 400071f8: 03 10 00 a2 sethi %hi(0x40028800), %g1 <== NOT EXECUTED 400071fc: c2 00 63 e8 ld [ %g1 + 0x3e8 ], %g1 ! 40028be8 <== NOT EXECUTED 40007200: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40007204: 34 80 00 5b bg,a 40007370 <== NOT EXECUTED 40007208: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 4000720c: 03 10 00 9f sethi %hi(0x40027c00), %g1 <== NOT EXECUTED 40007210: c2 00 61 30 ld [ %g1 + 0x130 ], %g1 ! 40027d30 <_impure_ptr> <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 40007214: 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 */ 40007218: 40 00 3e c6 call 40016d30 <== NOT EXECUTED 4000721c: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 40007220: 03 1c 00 00 sethi %hi(0x70000000), %g1 <== NOT EXECUTED 40007224: a0 2c c0 01 andn %l3, %g1, %l0 <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 40007228: 03 10 00 00 sethi %hi(0x40000000), %g1 <== NOT EXECUTED 4000722c: 80 8c c0 01 btst %l3, %g1 <== NOT EXECUTED 40007230: 02 80 00 05 be 40007244 <== NOT EXECUTED 40007234: 23 10 00 9f sethi %hi(0x40027c00), %l1 <== NOT EXECUTED local_errno = errno; 40007238: 40 00 3d ed call 400169ec <__errno> <== NOT EXECUTED 4000723c: 01 00 00 00 nop <== NOT EXECUTED 40007240: 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); 40007244: c2 04 61 30 ld [ %l1 + 0x130 ], %g1 <== NOT EXECUTED 40007248: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000724c: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40007250: 40 00 57 9e call 4001d0c8 <== NOT EXECUTED 40007254: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (status) 40007258: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 4000725c: 02 80 00 0e be 40007294 <== NOT EXECUTED 40007260: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 40007264: c2 04 61 30 ld [ %l1 + 0x130 ], %g1 <== NOT EXECUTED const char * rtems_status_text( rtems_status_code status ) { return rtems_assoc_name_by_local(rtems_status_assoc, status); 40007268: 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)); 4000726c: 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); 40007270: 11 10 00 90 sethi %hi(0x40024000), %o0 <== NOT EXECUTED 40007274: 40 00 28 fd call 40011668 <== NOT EXECUTED 40007278: 90 12 21 70 or %o0, 0x170, %o0 ! 40024170 <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 4000727c: 13 10 00 8f sethi %hi(0x40023c00), %o1 <== NOT EXECUTED const char * rtems_status_text( rtems_status_code status ) { return rtems_assoc_name_by_local(rtems_status_assoc, status); 40007280: 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)); 40007284: 92 12 61 f0 or %o1, 0x1f0, %o1 <== NOT EXECUTED 40007288: 40 00 40 15 call 400172dc <== NOT EXECUTED 4000728c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40007290: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED if (local_errno) 40007294: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40007298: 02 80 00 1c be 40007308 <== NOT EXECUTED 4000729c: 23 10 00 9f sethi %hi(0x40027c00), %l1 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 400072a0: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 400072a4: 04 80 00 11 ble 400072e8 <== NOT EXECUTED 400072a8: 03 10 00 9f sethi %hi(0x40027c00), %g1 <== NOT EXECUTED 400072ac: 40 00 4c 08 call 4001a2cc <== NOT EXECUTED 400072b0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400072b4: c2 4a 00 00 ldsb [ %o0 ], %g1 <== NOT EXECUTED 400072b8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400072bc: 02 80 00 0b be 400072e8 <== NOT EXECUTED 400072c0: 03 10 00 9f sethi %hi(0x40027c00), %g1 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 400072c4: c2 00 61 30 ld [ %g1 + 0x130 ], %g1 ! 40027d30 <_impure_ptr> <== NOT EXECUTED 400072c8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400072cc: 40 00 4c 00 call 4001a2cc <== NOT EXECUTED 400072d0: e0 00 60 0c ld [ %g1 + 0xc ], %l0 <== NOT EXECUTED 400072d4: 13 10 00 8f sethi %hi(0x40023c00), %o1 <== NOT EXECUTED 400072d8: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 400072dc: 92 12 62 00 or %o1, 0x200, %o1 <== NOT EXECUTED 400072e0: 10 80 00 07 b 400072fc <== NOT EXECUTED 400072e4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 400072e8: c2 00 61 30 ld [ %g1 + 0x130 ], %g1 <== NOT EXECUTED 400072ec: 13 10 00 8f sethi %hi(0x40023c00), %o1 <== NOT EXECUTED 400072f0: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 400072f4: 92 12 62 10 or %o1, 0x210, %o1 <== NOT EXECUTED 400072f8: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED 400072fc: 40 00 3f f8 call 400172dc <== NOT EXECUTED 40007300: 23 10 00 9f sethi %hi(0x40027c00), %l1 <== NOT EXECUTED 40007304: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 40007308: c2 04 61 30 ld [ %l1 + 0x130 ], %g1 <== NOT EXECUTED 4000730c: 13 10 00 91 sethi %hi(0x40024400), %o1 <== NOT EXECUTED 40007310: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40007314: 40 00 3f f2 call 400172dc <== NOT EXECUTED 40007318: 92 12 62 a8 or %o1, 0x2a8, %o1 <== NOT EXECUTED (void) fflush(stderr); 4000731c: c2 04 61 30 ld [ %l1 + 0x130 ], %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"); 40007320: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED (void) fflush(stderr); 40007324: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40007328: 40 00 3e 82 call 40016d30 <== NOT EXECUTED 4000732c: b0 04 00 18 add %l0, %i0, %i0 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 40007330: 03 0c 00 00 sethi %hi(0x30000000), %g1 <== NOT EXECUTED 40007334: 80 8c c0 01 btst %l3, %g1 <== NOT EXECUTED 40007338: 02 80 00 0e be 40007370 <== NOT EXECUTED 4000733c: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 40007340: 02 80 00 07 be 4000735c <== NOT EXECUTED 40007344: 90 10 20 00 clr %o0 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 40007348: 13 10 00 8f sethi %hi(0x40023c00), %o1 <== NOT EXECUTED 4000734c: 40 00 00 18 call 400073ac <== NOT EXECUTED 40007350: 92 12 62 28 or %o1, 0x228, %o1 ! 40023e28 <== NOT EXECUTED _exit(local_errno); 40007354: 40 00 01 fe call 40007b4c <_exit> <== NOT EXECUTED 40007358: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); 4000735c: 13 10 00 8f sethi %hi(0x40023c00), %o1 <== NOT EXECUTED 40007360: 40 00 00 13 call 400073ac <== NOT EXECUTED 40007364: 92 12 62 40 or %o1, 0x240, %o1 ! 40023e40 <== NOT EXECUTED abort(); 40007368: 40 00 3d 93 call 400169b4 <== NOT EXECUTED 4000736c: 01 00 00 00 nop <== NOT EXECUTED } } return chars_written; } 40007370: 81 c7 e0 08 ret <== NOT EXECUTED 40007374: 81 e8 00 00 restore <== NOT EXECUTED 400071d8 : */ bool rtems_workspace_allocate( uintptr_t bytes, void **pointer ) { 400071d8: 9d e3 bf 98 save %sp, -104, %sp void *ptr; /* * check the arguments */ if ( !pointer ) 400071dc: 80 a6 60 00 cmp %i1, 0 400071e0: 02 80 00 0d be 40007214 400071e4: 92 10 00 18 mov %i0, %o1 return false; if ( !bytes ) 400071e8: 80 a6 20 00 cmp %i0, 0 400071ec: 02 80 00 0a be 40007214 400071f0: 11 10 00 79 sethi %hi(0x4001e400), %o0 return false; /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); 400071f4: 40 00 05 b0 call 400088b4 <_Protected_heap_Allocate> 400071f8: 90 12 23 c4 or %o0, 0x3c4, %o0 ! 4001e7c4 <_Workspace_Area> if (!ptr) 400071fc: 80 a2 20 00 cmp %o0, 0 40007200: 02 80 00 05 be 40007214 40007204: 01 00 00 00 nop return false; *pointer = ptr; 40007208: d0 26 40 00 st %o0, [ %i1 ] 4000720c: 81 c7 e0 08 ret 40007210: 91 e8 20 01 restore %g0, 1, %o0 return true; } 40007214: 81 c7 e0 08 ret <== NOT EXECUTED 40007218: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 400071bc : * _Workspace_Allocate */ bool rtems_workspace_free( void *pointer ) { 400071bc: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED return _Protected_heap_Free( &_Workspace_Area, pointer ); 400071c0: 11 10 00 79 sethi %hi(0x4001e400), %o0 <== NOT EXECUTED 400071c4: 90 12 23 c4 or %o0, 0x3c4, %o0 ! 4001e7c4 <_Workspace_Area> <== NOT EXECUTED 400071c8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400071cc: 40 00 05 c6 call 400088e4 <_Protected_heap_Free> <== NOT EXECUTED 400071d0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400071d4: 01 00 00 00 nop 4000721c : bool rtems_workspace_get_information( Heap_Information_block *the_info ) { if ( !the_info ) 4000721c: 80 a2 20 00 cmp %o0, 0 40007220: 12 80 00 04 bne 40007230 40007224: 92 10 00 08 mov %o0, %o1 return false; return _Protected_heap_Get_information( &_Workspace_Area, the_info ); } 40007228: 81 c3 e0 08 retl <== NOT EXECUTED 4000722c: 01 00 00 00 nop <== NOT EXECUTED ) { if ( !the_info ) return false; return _Protected_heap_Get_information( &_Workspace_Area, the_info ); 40007230: 11 10 00 79 sethi %hi(0x4001e400), %o0 40007234: 90 12 23 c4 or %o0, 0x3c4, %o0 ! 4001e7c4 <_Workspace_Area> 40007238: 82 13 c0 00 mov %o7, %g1 4000723c: 40 00 05 b6 call 40008914 <_Protected_heap_Get_information> 40007240: 9e 10 40 00 mov %g1, %o7 40007244: 01 00 00 00 nop 400205c0 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 400205c0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED 400205c4: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 <== NOT EXECUTED 400205c8: 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); 400205cc: 03 10 01 27 sethi %hi(0x40049c00), %g1 <== NOT EXECUTED /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 400205d0: a2 10 20 00 clr %l1 <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 400205d4: aa 10 63 e0 or %g1, 0x3e0, %l5 <== NOT EXECUTED /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 400205d8: a4 10 20 00 clr %l2 <== NOT EXECUTED limit++; continue; } sign = 1; } if (!isdigit(c)) 400205dc: 03 10 01 27 sethi %hi(0x40049c00), %g1 <== NOT EXECUTED 400205e0: a8 10 63 d0 or %g1, 0x3d0, %l4 ! 40049fd0 <__ctype_ptr> <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 400205e4: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 400205e8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400205ec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400205f0: 16 80 00 07 bge 4002060c <== NOT EXECUTED 400205f4: c2 26 20 04 st %g1, [ %i0 + 4 ] <== NOT EXECUTED 400205f8: d0 05 40 00 ld [ %l5 ], %o0 <== NOT EXECUTED 400205fc: 40 00 50 15 call 40034650 <__srget_r> <== NOT EXECUTED 40020600: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40020604: 10 80 00 06 b 4002061c <== NOT EXECUTED 40020608: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 4002060c: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED 40020610: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 40020614: e0 08 40 00 ldub [ %g1 ], %l0 <== NOT EXECUTED 40020618: c4 26 00 00 st %g2, [ %i0 ] <== NOT EXECUTED if (c == ':') 4002061c: 80 a4 20 3a cmp %l0, 0x3a <== NOT EXECUTED 40020620: 02 80 00 21 be 400206a4 <== NOT EXECUTED 40020624: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED break; if (sign == 0) { 40020628: 32 80 00 09 bne,a 4002064c <== NOT EXECUTED 4002062c: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED if (c == '-') { 40020630: 80 a4 20 2d cmp %l0, 0x2d <== NOT EXECUTED 40020634: 12 80 00 05 bne 40020648 <== NOT EXECUTED 40020638: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED sign = -1; limit++; 4002063c: a6 04 e0 01 inc %l3 <== NOT EXECUTED 40020640: 10 bf ff e9 b 400205e4 <== NOT EXECUTED 40020644: a4 10 3f ff mov -1, %l2 <== NOT EXECUTED continue; } sign = 1; } if (!isdigit(c)) 40020648: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED 4002064c: c2 08 40 10 ldub [ %g1 + %l0 ], %g1 <== NOT EXECUTED 40020650: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 40020654: 02 80 00 1c be 400206c4 <== NOT EXECUTED 40020658: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED return 0; d = c - '0'; if ((i > (limit / 10)) 4002065c: 40 00 7f 13 call 400402a8 <.udiv> <== NOT EXECUTED 40020660: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 40020664: 80 a4 40 08 cmp %l1, %o0 <== NOT EXECUTED 40020668: 18 80 00 17 bgu 400206c4 <== NOT EXECUTED 4002066c: 01 00 00 00 nop <== NOT EXECUTED 40020670: 12 80 00 08 bne 40020690 <== NOT EXECUTED 40020674: a0 04 3f d0 add %l0, -48, %l0 <== NOT EXECUTED 40020678: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 4002067c: 40 00 7f b7 call 40040558 <.urem> <== NOT EXECUTED 40020680: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 40020684: 80 a4 00 08 cmp %l0, %o0 <== NOT EXECUTED 40020688: 18 80 00 0f bgu 400206c4 <== NOT EXECUTED 4002068c: 01 00 00 00 nop <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 40020690: 85 2c 60 03 sll %l1, 3, %g2 <== NOT EXECUTED 40020694: 83 2c 60 01 sll %l1, 1, %g1 <== NOT EXECUTED 40020698: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 4002069c: 10 bf ff d2 b 400205e4 <== NOT EXECUTED 400206a0: a2 04 00 01 add %l0, %g1, %l1 <== NOT EXECUTED } if (sign == 0) 400206a4: 02 80 00 08 be 400206c4 <== NOT EXECUTED 400206a8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED return 0; *val = i * sign; 400206ac: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 400206b0: 7f ff 8a aa call 40003158 <.umul> <== NOT EXECUTED 400206b4: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 400206b8: d0 26 40 00 st %o0, [ %i1 ] <== NOT EXECUTED 400206bc: 81 c7 e0 08 ret <== NOT EXECUTED 400206c0: 81 e8 00 00 restore <== NOT EXECUTED return 1; } 400206c4: 81 c7 e0 08 ret <== NOT EXECUTED 400206c8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 400206cc : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 400206cc: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int c; *name = *bufp; 400206d0: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 400206d4: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED for (;;) { c = getc(fp); 400206d8: 03 10 01 27 sethi %hi(0x40049c00), %g1 <== NOT EXECUTED 400206dc: b2 10 63 e0 or %g1, 0x3e0, %i1 ! 40049fe0 <_impure_ptr> <== NOT EXECUTED 400206e0: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 400206e4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400206e8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400206ec: 16 80 00 07 bge 40020708 <== NOT EXECUTED 400206f0: c2 26 20 04 st %g1, [ %i0 + 4 ] <== NOT EXECUTED 400206f4: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED 400206f8: 40 00 4f d6 call 40034650 <__srget_r> <== NOT EXECUTED 400206fc: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED if (c == ':') { 40020700: 10 80 00 07 b 4002071c <== NOT EXECUTED 40020704: 80 a2 20 3a cmp %o0, 0x3a <== NOT EXECUTED { int c; *name = *bufp; for (;;) { c = getc(fp); 40020708: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED 4002070c: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 40020710: d0 08 40 00 ldub [ %g1 ], %o0 <== NOT EXECUTED 40020714: c4 26 00 00 st %g2, [ %i0 ] <== NOT EXECUTED if (c == ':') { 40020718: 80 a2 20 3a cmp %o0, 0x3a <== NOT EXECUTED 4002071c: 12 80 00 07 bne 40020738 <== NOT EXECUTED 40020720: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED if (nlFlag) 40020724: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 40020728: 22 80 00 1a be,a 40020790 <== NOT EXECUTED 4002072c: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 40020730: 81 c7 e0 08 ret <== NOT EXECUTED 40020734: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (c == ':') { if (nlFlag) return 0; break; } if (c == '\n') { 40020738: 12 80 00 07 bne 40020754 <== NOT EXECUTED 4002073c: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED if (!nlFlag) 40020740: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 40020744: 32 80 00 13 bne,a 40020790 <== NOT EXECUTED 40020748: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 4002074c: 81 c7 e0 08 ret <== NOT EXECUTED 40020750: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (c == '\n') { if (!nlFlag) return 0; break; } if (c == EOF) 40020754: 22 80 00 17 be,a 400207b0 <== NOT EXECUTED 40020758: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; if (*nleft < 2) 4002075c: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED 40020760: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40020764: 28 80 00 13 bleu,a 400207b0 <== NOT EXECUTED 40020768: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; **bufp = c; 4002076c: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 40020770: d0 28 40 00 stb %o0, [ %g1 ] <== NOT EXECUTED ++(*bufp); 40020774: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED --(*nleft); 40020778: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 4002077c: 82 00 60 01 inc %g1 <== NOT EXECUTED --(*nleft); 40020780: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 40020784: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED --(*nleft); 40020788: 10 bf ff d6 b 400206e0 <== NOT EXECUTED 4002078c: c4 26 c0 00 st %g2, [ %i3 ] <== NOT EXECUTED } **bufp = '\0'; 40020790: c0 28 40 00 clrb [ %g1 ] <== NOT EXECUTED ++(*bufp); 40020794: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED --(*nleft); 40020798: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 4002079c: 82 00 60 01 inc %g1 <== NOT EXECUTED --(*nleft); 400207a0: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 400207a4: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED --(*nleft); 400207a8: c4 26 c0 00 st %g2, [ %i3 ] <== NOT EXECUTED 400207ac: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return 1; } 400207b0: 81 c7 e0 08 ret <== NOT EXECUTED 400207b4: 81 e8 00 00 restore <== NOT EXECUTED 40006378 : scandir( const char *dirname, struct dirent ***namelist, int (*select)(struct dirent *), int (*dcomp)(const struct dirent **, const struct dirent **)) { 40006378: 9d e3 bf 48 save %sp, -184, %sp struct stat stb; long arraysz; DIR *dirp = NULL; int i; if ((dirp = opendir(dirname)) == NULL) 4000637c: 7f ff fd 9f call 400059f8 40006380: 90 10 00 18 mov %i0, %o0 40006384: a8 92 20 00 orcc %o0, 0, %l4 40006388: 02 80 00 6a be 40006530 4000638c: a0 07 bf a8 add %fp, -88, %l0 return(-1); if (fstat(dirp->dd_fd, &stb) < 0) 40006390: d0 05 00 00 ld [ %l4 ], %o0 40006394: 40 00 1d 78 call 4000d974 40006398: 92 10 00 10 mov %l0, %o1 4000639c: 80 a2 20 00 cmp %o0, 0 400063a0: 06 80 00 53 bl 400064ec 400063a4: 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); 400063a8: 40 00 3b 8f call 400151e4 <.div> 400063ac: 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) 400063b0: 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); 400063b4: a6 10 00 08 mov %o0, %l3 names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *)); if (names == NULL) 400063b8: 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 *)); 400063bc: 91 2a 20 02 sll %o0, 2, %o0 400063c0: 7f ff fb 95 call 40005214 400063c4: ac 10 20 01 mov 1, %l6 if (names == NULL) 400063c8: 80 a2 20 00 cmp %o0, 0 400063cc: 12 80 00 34 bne 4000649c 400063d0: a2 10 00 08 mov %o0, %l1 400063d4: 10 80 00 48 b 400064f4 400063d8: b0 10 00 08 mov %o0, %i0 goto cleanup_and_bail; while ((d = readdir(dirp)) != NULL) { if (select != NULL && !(*select)(d)) 400063dc: 22 80 00 08 be,a 400063fc 400063e0: d0 14 20 0a lduh [ %l0 + 0xa ], %o0 <== NOT EXECUTED 400063e4: 9f c6 80 00 call %i2 400063e8: 01 00 00 00 nop 400063ec: 80 a2 20 00 cmp %o0, 0 400063f0: 02 80 00 2b be 4000649c 400063f4: 01 00 00 00 nop continue; /* just selected names */ /* * Make a minimum size copy of the data */ p = (struct dirent *)malloc(DIRSIZ(d)); 400063f8: d0 14 20 0a lduh [ %l0 + 0xa ], %o0 400063fc: 90 02 20 04 add %o0, 4, %o0 40006400: 90 0a 3f fc and %o0, -4, %o0 40006404: 7f ff fb 84 call 40005214 40006408: 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); 4000640c: 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)); 40006410: a4 10 00 08 mov %o0, %l2 if (p == NULL) 40006414: 80 a4 a0 00 cmp %l2, 0 40006418: 02 80 00 37 be 400064f4 4000641c: 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; 40006420: 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; 40006424: c2 04 00 00 ld [ %l0 ], %g1 p->d_reclen = d->d_reclen; 40006428: 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); 4000642c: 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; 40006430: c2 24 80 00 st %g1, [ %l2 ] p->d_reclen = d->d_reclen; 40006434: c4 34 a0 08 sth %g2, [ %l2 + 8 ] p->d_namlen = d->d_namlen; 40006438: c6 34 a0 0a sth %g3, [ %l2 + 0xa ] strncpy(p->d_name, d->d_name, p->d_namlen + 1); 4000643c: 95 32 a0 10 srl %o2, 0x10, %o2 40006440: 40 00 33 5b call 400131ac 40006444: 94 02 a0 01 inc %o2 /* * Check to make sure the array has space left and * realloc the maximum size. */ if (++nitems >= arraysz) { 40006448: b0 06 20 01 inc %i0 4000644c: 80 a6 00 13 cmp %i0, %l3 40006450: 0a 80 00 11 bcs 40006494 40006454: 82 26 00 16 sub %i0, %l6, %g1 if (fstat(dirp->dd_fd, &stb) < 0) 40006458: d0 05 00 00 ld [ %l4 ], %o0 <== NOT EXECUTED 4000645c: 40 00 1d 46 call 4000d974 <== NOT EXECUTED 40006460: 92 10 00 15 mov %l5, %o1 <== NOT EXECUTED 40006464: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40006468: 06 80 00 23 bl 400064f4 <== NOT EXECUTED 4000646c: 92 10 20 0c mov 0xc, %o1 <== NOT EXECUTED goto cleanup_and_bail; /* just might have grown */ arraysz = stb.st_size / 12; 40006470: 40 00 3b 5d call 400151e4 <.div> <== NOT EXECUTED 40006474: d0 07 bf c8 ld [ %fp + -56 ], %o0 <== NOT EXECUTED 40006478: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED names = (struct dirent **)realloc((char *)names, 4000647c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40006480: 40 00 1d ec call 4000dc30 <== NOT EXECUTED 40006484: 93 2c e0 02 sll %l3, 2, %o1 <== NOT EXECUTED arraysz * sizeof(struct dirent *)); if (names == NULL) 40006488: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 4000648c: 02 80 00 1a be 400064f4 <== NOT EXECUTED 40006490: 82 26 00 16 sub %i0, %l6, %g1 <== NOT EXECUTED goto cleanup_and_bail; } names[nitems-1] = p; 40006494: 83 28 60 02 sll %g1, 2, %g1 40006498: 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) { 4000649c: 7f ff ff 1e call 40006114 400064a0: 90 10 00 14 mov %l4, %o0 400064a4: a0 92 20 00 orcc %o0, 0, %l0 400064a8: 12 bf ff cd bne 400063dc 400064ac: 80 a6 a0 00 cmp %i2, 0 if (names == NULL) goto cleanup_and_bail; } names[nitems-1] = p; } closedir(dirp); 400064b0: 7f ff f8 3a call 40004598 400064b4: 90 10 00 14 mov %l4, %o0 if (nitems && dcomp != NULL){ 400064b8: 80 a6 20 00 cmp %i0, 0 400064bc: 22 80 00 0a be,a 400064e4 400064c0: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 400064c4: 80 a6 e0 00 cmp %i3, 0 400064c8: 02 80 00 06 be 400064e0 400064cc: 96 10 00 1b mov %i3, %o3 qsort(names, nitems, sizeof(struct dirent *), 400064d0: 90 10 00 11 mov %l1, %o0 400064d4: 92 10 00 18 mov %i0, %o1 400064d8: 40 00 30 2d call 4001258c 400064dc: 94 10 20 04 mov 4, %o2 (int (*)(const void *, const void *)) dcomp); } *namelist = names; 400064e0: e2 26 40 00 st %l1, [ %i1 ] return(nitems); 400064e4: 10 80 00 14 b 40006534 400064e8: 92 10 00 18 mov %i0, %o1 400064ec: a2 10 20 00 clr %l1 <== NOT EXECUTED 400064f0: b0 10 20 00 clr %i0 <== NOT EXECUTED cleanup_and_bail: if ( dirp ) closedir( dirp ); 400064f4: 7f ff f8 29 call 40004598 400064f8: 90 10 00 14 mov %l4, %o0 if ( names ) { 400064fc: 80 a4 60 00 cmp %l1, 0 40006500: 02 80 00 0c be 40006530 40006504: b6 10 20 00 clr %i3 for (i=0; i < nitems; i++ ) free( names[i] ); 40006508: 10 80 00 05 b 4000651c <== NOT EXECUTED 4000650c: 83 2e e0 02 sll %i3, 2, %g1 <== NOT EXECUTED 40006510: 7f ff f9 7c call 40004b00 <== NOT EXECUTED 40006514: b6 06 e0 01 inc %i3 <== NOT EXECUTED 40006518: 83 2e e0 02 sll %i3, 2, %g1 <== NOT EXECUTED if ( dirp ) closedir( dirp ); if ( names ) { for (i=0; i < nitems; i++ ) 4000651c: 80 a6 c0 18 cmp %i3, %i0 <== NOT EXECUTED 40006520: 2a bf ff fc bcs,a 40006510 <== NOT EXECUTED 40006524: d0 04 40 01 ld [ %l1 + %g1 ], %o0 <== NOT EXECUTED free( names[i] ); free( names ); 40006528: 7f ff f9 76 call 40004b00 <== NOT EXECUTED 4000652c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40006530: 92 10 3f ff mov -1, %o1 } return(-1); } 40006534: 81 c7 e0 08 ret 40006538: 91 e8 00 09 restore %g0, %o1, %o0 400207b8 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 400207b8: 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) 400207bc: 98 10 20 00 clr %o4 <== NOT EXECUTED FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 400207c0: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 400207c4: 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) 400207c8: b4 07 a0 50 add %fp, 0x50, %i2 <== NOT EXECUTED 400207cc: b6 07 a0 4c add %fp, 0x4c, %i3 <== NOT EXECUTED 400207d0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400207d4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400207d8: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 400207dc: 7f ff ff bc call 400206cc <== NOT EXECUTED 400207e0: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 400207e4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400207e8: 02 80 00 42 be 400208f0 <== NOT EXECUTED 400207ec: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400207f0: 92 06 60 04 add %i1, 4, %o1 <== NOT EXECUTED 400207f4: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 400207f8: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 400207fc: 7f ff ff b4 call 400206cc <== NOT EXECUTED 40020800: 98 10 20 00 clr %o4 <== NOT EXECUTED 40020804: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40020808: 02 80 00 3a be 400208f0 <== NOT EXECUTED 4002080c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40020810: 7f ff ff 6c call 400205c0 <== NOT EXECUTED 40020814: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED 40020818: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002081c: 02 80 00 35 be 400208f0 <== NOT EXECUTED 40020820: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40020824: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40020828: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 4002082c: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED 40020830: 7f ff ff a7 call 400206cc <== NOT EXECUTED 40020834: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED 40020838: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002083c: 02 80 00 2d be 400208f0 <== NOT EXECUTED 40020840: 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; 40020844: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40020848: 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; 4002084c: c2 36 60 08 sth %g1, [ %i1 + 8 ] <== NOT EXECUTED /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40020850: 10 80 00 05 b 40020864 <== NOT EXECUTED 40020854: 86 10 20 01 mov 1, %g3 <== NOT EXECUTED if(*cp == ',') memcount++; 40020858: 82 18 60 2c xor %g1, 0x2c, %g1 <== NOT EXECUTED 4002085c: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 40020860: 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++) { 40020864: c2 48 80 00 ldsb [ %g2 ], %g1 <== NOT EXECUTED 40020868: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002086c: 12 bf ff fb bne 40020858 <== NOT EXECUTED 40020870: 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)) 40020874: c4 07 a0 50 ld [ %fp + 0x50 ], %g2 <== NOT EXECUTED 40020878: 83 28 e0 02 sll %g3, 2, %g1 <== NOT EXECUTED 4002087c: 82 00 60 13 add %g1, 0x13, %g1 <== NOT EXECUTED 40020880: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40020884: 0a 80 00 1b bcs 400208f0 <== NOT EXECUTED 40020888: 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; 4002088c: 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); 40020890: 82 00 60 0f add %g1, 0xf, %g1 <== NOT EXECUTED 40020894: 82 08 7f f0 and %g1, -16, %g1 <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 40020898: 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); 4002089c: c2 26 60 0c st %g1, [ %i1 + 0xc ] <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 400208a0: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 400208a4: 10 80 00 0a b 400208cc <== NOT EXECUTED 400208a8: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { 400208ac: 32 80 00 08 bne,a 400208cc <== NOT EXECUTED 400208b0: 86 00 e0 01 inc %g3 <== NOT EXECUTED *cp = '\0'; 400208b4: c0 28 ff ff clrb [ %g3 + -1 ] <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 400208b8: c4 06 60 0c ld [ %i1 + 0xc ], %g2 <== NOT EXECUTED 400208bc: 83 29 20 02 sll %g4, 2, %g1 <== NOT EXECUTED 400208c0: 88 01 20 01 inc %g4 <== NOT EXECUTED 400208c4: c6 20 80 01 st %g3, [ %g2 + %g1 ] <== NOT EXECUTED 400208c8: 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++) { 400208cc: c2 48 ff ff ldsb [ %g3 + -1 ], %g1 <== NOT EXECUTED 400208d0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400208d4: 32 bf ff f6 bne,a 400208ac <== NOT EXECUTED 400208d8: 80 a0 60 2c cmp %g1, 0x2c <== NOT EXECUTED if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 400208dc: c4 06 60 0c ld [ %i1 + 0xc ], %g2 <== NOT EXECUTED 400208e0: 83 29 20 02 sll %g4, 2, %g1 <== NOT EXECUTED 400208e4: c0 20 80 01 clr [ %g2 + %g1 ] <== NOT EXECUTED 400208e8: 81 c7 e0 08 ret <== NOT EXECUTED 400208ec: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED return 1; } 400208f0: 81 c7 e0 08 ret <== NOT EXECUTED 400208f4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40020940 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 40020940: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40020944: 98 10 20 00 clr %o4 <== NOT EXECUTED FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 40020948: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 4002094c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40020950: b4 07 a0 50 add %fp, 0x50, %i2 <== NOT EXECUTED 40020954: b6 07 a0 4c add %fp, 0x4c, %i3 <== NOT EXECUTED 40020958: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4002095c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40020960: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40020964: 7f ff ff 5a call 400206cc <== NOT EXECUTED 40020968: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 4002096c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40020970: 02 80 00 39 be 40020a54 <== NOT EXECUTED 40020974: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40020978: 92 06 60 04 add %i1, 4, %o1 <== NOT EXECUTED 4002097c: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40020980: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40020984: 7f ff ff 52 call 400206cc <== NOT EXECUTED 40020988: 98 10 20 00 clr %o4 <== NOT EXECUTED 4002098c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40020990: 02 80 00 31 be 40020a54 <== NOT EXECUTED 40020994: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40020998: 7f ff ff 0a call 400205c0 <== NOT EXECUTED 4002099c: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED 400209a0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400209a4: 02 80 00 2c be 40020a54 <== NOT EXECUTED 400209a8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400209ac: 7f ff ff 05 call 400205c0 <== NOT EXECUTED 400209b0: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED 400209b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400209b8: 02 80 00 27 be 40020a54 <== NOT EXECUTED 400209bc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400209c0: 92 06 60 0c add %i1, 0xc, %o1 <== NOT EXECUTED 400209c4: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 400209c8: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 400209cc: 7f ff ff 40 call 400206cc <== NOT EXECUTED 400209d0: 98 10 20 00 clr %o4 <== NOT EXECUTED 400209d4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400209d8: 02 80 00 1f be 40020a54 <== NOT EXECUTED 400209dc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400209e0: 92 06 60 10 add %i1, 0x10, %o1 <== NOT EXECUTED 400209e4: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 400209e8: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 400209ec: 7f ff ff 38 call 400206cc <== NOT EXECUTED 400209f0: 98 10 20 00 clr %o4 <== NOT EXECUTED 400209f4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400209f8: 02 80 00 17 be 40020a54 <== NOT EXECUTED 400209fc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40020a00: 92 06 60 14 add %i1, 0x14, %o1 <== NOT EXECUTED 40020a04: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40020a08: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40020a0c: 7f ff ff 30 call 400206cc <== NOT EXECUTED 40020a10: 98 10 20 00 clr %o4 <== NOT EXECUTED 40020a14: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40020a18: 02 80 00 0f be 40020a54 <== NOT EXECUTED 40020a1c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40020a20: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40020a24: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40020a28: 92 06 60 18 add %i1, 0x18, %o1 <== NOT EXECUTED 40020a2c: 7f ff ff 28 call 400206cc <== NOT EXECUTED 40020a30: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED 40020a34: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40020a38: 02 80 00 07 be 40020a54 <== NOT EXECUTED 40020a3c: 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; 40020a40: c2 36 60 08 sth %g1, [ %i1 + 8 ] <== NOT EXECUTED pwd->pw_gid = pwgid; 40020a44: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40020a48: c2 36 60 0a sth %g1, [ %i1 + 0xa ] <== NOT EXECUTED 40020a4c: 81 c7 e0 08 ret <== NOT EXECUTED 40020a50: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED return 1; } 40020a54: 81 c7 e0 08 ret <== NOT EXECUTED 40020a58: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40008b50 : */ int sem_destroy( sem_t *sem ) { 40008b50: 9d e3 bf 90 save %sp, -112, %sp 40008b54: d2 06 00 00 ld [ %i0 ], %o1 40008b58: 11 10 00 82 sethi %hi(0x40020800), %o0 40008b5c: 94 07 bf f4 add %fp, -12, %o2 40008b60: 40 00 09 27 call 4000affc <_Objects_Get> 40008b64: 90 12 20 90 or %o0, 0x90, %o0 register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 40008b68: c2 07 bf f4 ld [ %fp + -12 ], %g1 40008b6c: 80 a0 60 00 cmp %g1, 0 40008b70: 12 80 00 14 bne 40008bc0 40008b74: 01 00 00 00 nop case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { 40008b78: c2 0a 20 14 ldub [ %o0 + 0x14 ], %g1 40008b7c: 80 a0 60 00 cmp %g1, 0 40008b80: 02 80 00 0a be 40008ba8 40008b84: 01 00 00 00 nop _Thread_Enable_dispatch(); 40008b88: 40 00 0b 43 call 4000b894 <_Thread_Enable_dispatch> <== NOT EXECUTED 40008b8c: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 40008b90: 40 00 23 0c call 400117c0 <__errno> <== NOT EXECUTED 40008b94: 01 00 00 00 nop <== NOT EXECUTED 40008b98: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 40008b9c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40008ba0: 81 c7 e0 08 ret <== NOT EXECUTED 40008ba4: 81 e8 00 00 restore <== NOT EXECUTED } _POSIX_Semaphore_Delete( the_semaphore ); 40008ba8: 40 00 1a c3 call 4000f6b4 <_POSIX_Semaphore_Delete> 40008bac: b0 10 20 00 clr %i0 _Thread_Enable_dispatch(); 40008bb0: 40 00 0b 39 call 4000b894 <_Thread_Enable_dispatch> 40008bb4: 01 00 00 00 nop 40008bb8: 81 c7 e0 08 ret 40008bbc: 81 e8 00 00 restore #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 40008bc0: 40 00 23 00 call 400117c0 <__errno> 40008bc4: b0 10 3f ff mov -1, %i0 40008bc8: 82 10 20 16 mov 0x16, %g1 40008bcc: c2 22 00 00 st %g1, [ %o0 ] } 40008bd0: 81 c7 e0 08 ret 40008bd4: 81 e8 00 00 restore 40008c30 : int sem_init( sem_t *sem, int pshared, unsigned int value ) { 40008c30: 9d e3 bf 90 save %sp, -112, %sp 40008c34: 92 10 00 19 mov %i1, %o1 int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 40008c38: 80 a6 20 00 cmp %i0, 0 40008c3c: 12 80 00 08 bne 40008c5c 40008c40: 94 10 00 1a mov %i2, %o2 rtems_set_errno_and_return_minus_one( EINVAL ); 40008c44: 40 00 22 df call 400117c0 <__errno> <== NOT EXECUTED 40008c48: 01 00 00 00 nop <== NOT EXECUTED 40008c4c: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 40008c50: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40008c54: 10 80 00 0a b 40008c7c <== NOT EXECUTED 40008c58: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED status = _POSIX_Semaphore_Create_support( 40008c5c: 90 10 20 00 clr %o0 40008c60: 40 00 1a 4e call 4000f598 <_POSIX_Semaphore_Create_support> 40008c64: 96 07 bf f4 add %fp, -12, %o3 pshared, value, &the_semaphore ); if ( status != -1 ) 40008c68: 80 a2 3f ff cmp %o0, -1 40008c6c: 02 80 00 04 be 40008c7c 40008c70: c2 07 bf f4 ld [ %fp + -12 ], %g1 *sem = the_semaphore->Object.id; 40008c74: c2 00 60 08 ld [ %g1 + 8 ], %g1 40008c78: c2 26 00 00 st %g1, [ %i0 ] return status; } 40008c7c: 81 c7 e0 08 ret 40008c80: 91 e8 00 08 restore %g0, %o0, %o0 40008dfc : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 40008dfc: 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 ); 40008e00: 92 07 bf f4 add %fp, -12, %o1 40008e04: 40 00 17 9f call 4000ec80 <_POSIX_Absolute_timeout_to_ticks> 40008e08: 90 10 00 19 mov %i1, %o0 switch ( status ) { 40008e0c: 80 a2 20 02 cmp %o0, 2 40008e10: 18 80 00 03 bgu 40008e1c 40008e14: 92 10 20 01 mov 1, %o1 40008e18: 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 ); 40008e1c: d4 07 bf f4 ld [ %fp + -12 ], %o2 40008e20: 90 10 00 18 mov %i0, %o0 40008e24: 40 00 1a 57 call 4000f780 <_POSIX_Semaphore_Wait_support> 40008e28: 92 0a 60 01 and %o1, 1, %o1 break; } } return lock_status; } 40008e2c: 81 c7 e0 08 ret 40008e30: 91 e8 00 08 restore %g0, %o0, %o0 40008ef4 : int sem_wait( sem_t *sem ) { return _POSIX_Semaphore_Wait_support( sem, TRUE, THREAD_QUEUE_WAIT_FOREVER ); 40008ef4: 92 10 20 01 mov 1, %o1 40008ef8: 94 10 20 00 clr %o2 40008efc: 82 13 c0 00 mov %o7, %g1 40008f00: 40 00 1a 20 call 4000f780 <_POSIX_Semaphore_Wait_support> 40008f04: 9e 10 40 00 mov %g1, %o7 40008f08: 01 00 00 00 nop <== NOT EXECUTED 4002055c : int setgid( gid_t gid ) { _POSIX_types_Gid = gid; 4002055c: 03 10 01 24 sethi %hi(0x40049000), %g1 <== NOT EXECUTED 40020560: c2 00 60 94 ld [ %g1 + 0x94 ], %g1 ! 40049094 <== NOT EXECUTED 40020564: d0 30 60 2a sth %o0, [ %g1 + 0x2a ] <== NOT EXECUTED return 0; } 40020568: 81 c3 e0 08 retl <== NOT EXECUTED 4002056c: 90 10 20 00 clr %o0 <== NOT EXECUTED 40020b80 : return NULL; return &grent; } void setgrent(void) { 40020b80: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED init_etc_passwd_group(); 40020b84: 7f ff ff c8 call 40020aa4 <== NOT EXECUTED 40020b88: 01 00 00 00 nop <== NOT EXECUTED if (group_fp != NULL) 40020b8c: 03 10 01 73 sethi %hi(0x4005cc00), %g1 <== NOT EXECUTED 40020b90: d0 00 62 1c ld [ %g1 + 0x21c ], %o0 ! 4005ce1c <== NOT EXECUTED 40020b94: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40020b98: 22 80 00 05 be,a 40020bac <== NOT EXECUTED 40020b9c: 11 10 01 15 sethi %hi(0x40045400), %o0 <== NOT EXECUTED fclose(group_fp); 40020ba0: 40 00 3c aa call 4002fe48 <== NOT EXECUTED 40020ba4: 01 00 00 00 nop <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 40020ba8: 11 10 01 15 sethi %hi(0x40045400), %o0 <== NOT EXECUTED 40020bac: 13 10 01 20 sethi %hi(0x40048000), %o1 <== NOT EXECUTED 40020bb0: 90 12 23 98 or %o0, 0x398, %o0 <== NOT EXECUTED 40020bb4: 40 00 3e bf call 400306b0 <== NOT EXECUTED 40020bb8: 92 12 61 c8 or %o1, 0x1c8, %o1 <== NOT EXECUTED 40020bbc: 03 10 01 73 sethi %hi(0x4005cc00), %g1 <== NOT EXECUTED 40020bc0: d0 20 62 1c st %o0, [ %g1 + 0x21c ] ! 4005ce1c <== NOT EXECUTED } 40020bc4: 81 c7 e0 08 ret <== NOT EXECUTED 40020bc8: 81 e8 00 00 restore <== NOT EXECUTED 40020d78 : return NULL; return &pwent; } void setpwent(void) { 40020d78: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED init_etc_passwd_group(); 40020d7c: 7f ff ff 4a call 40020aa4 <== NOT EXECUTED 40020d80: 01 00 00 00 nop <== NOT EXECUTED if (passwd_fp != NULL) 40020d84: 03 10 01 73 sethi %hi(0x4005cc00), %g1 <== NOT EXECUTED 40020d88: d0 00 61 34 ld [ %g1 + 0x134 ], %o0 ! 4005cd34 <== NOT EXECUTED 40020d8c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40020d90: 22 80 00 05 be,a 40020da4 <== NOT EXECUTED 40020d94: 11 10 01 15 sethi %hi(0x40045400), %o0 <== NOT EXECUTED fclose(passwd_fp); 40020d98: 40 00 3c 2c call 4002fe48 <== NOT EXECUTED 40020d9c: 01 00 00 00 nop <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 40020da0: 11 10 01 15 sethi %hi(0x40045400), %o0 <== NOT EXECUTED 40020da4: 13 10 01 20 sethi %hi(0x40048000), %o1 <== NOT EXECUTED 40020da8: 90 12 23 20 or %o0, 0x320, %o0 <== NOT EXECUTED 40020dac: 40 00 3e 41 call 400306b0 <== NOT EXECUTED 40020db0: 92 12 61 c8 or %o1, 0x1c8, %o1 <== NOT EXECUTED 40020db4: 03 10 01 73 sethi %hi(0x4005cc00), %g1 <== NOT EXECUTED 40020db8: d0 20 61 34 st %o0, [ %g1 + 0x134 ] ! 4005cd34 <== NOT EXECUTED } 40020dbc: 81 c7 e0 08 ret <== NOT EXECUTED 40020dc0: 81 e8 00 00 restore <== NOT EXECUTED 400065b0 : int setuid( uid_t uid ) { _POSIX_types_Uid = uid; 400065b0: 03 10 01 24 sethi %hi(0x40049000), %g1 <== NOT EXECUTED 400065b4: c2 00 60 94 ld [ %g1 + 0x94 ], %g1 ! 40049094 <== NOT EXECUTED 400065b8: d0 30 60 28 sth %o0, [ %g1 + 0x28 ] <== NOT EXECUTED return 0; } 400065bc: 81 c3 e0 08 retl <== NOT EXECUTED 400065c0: 90 10 20 00 clr %o0 <== NOT EXECUTED 40008f1c : int sigwait( const sigset_t *set, int *sig ) { 40008f1c: 9d e3 bf 98 save %sp, -104, %sp int status; status = sigtimedwait( set, NULL, NULL ); 40008f20: 92 10 20 00 clr %o1 40008f24: 90 10 00 18 mov %i0, %o0 40008f28: 7f ff ff 8d call 40008d5c 40008f2c: 94 10 20 00 clr %o2 if ( status != -1 ) { 40008f30: 80 a2 3f ff cmp %o0, -1 40008f34: 02 80 00 07 be 40008f50 40008f38: 80 a6 60 00 cmp %i1, 0 if ( sig ) 40008f3c: 02 80 00 03 be 40008f48 40008f40: b0 10 20 00 clr %i0 *sig = status; 40008f44: d0 26 40 00 st %o0, [ %i1 ] 40008f48: 81 c7 e0 08 ret 40008f4c: 81 e8 00 00 restore return 0; } return errno; 40008f50: 40 00 21 66 call 400114e8 <__errno> <== NOT EXECUTED 40008f54: 01 00 00 00 nop <== NOT EXECUTED 40008f58: f0 02 00 00 ld [ %o0 ], %i0 <== NOT EXECUTED } 40008f5c: 81 c7 e0 08 ret <== NOT EXECUTED 40008f60: 81 e8 00 00 restore <== NOT EXECUTED 400049b8 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 400049b8: 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)) { 400049bc: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 400049c0: 80 88 6e 78 btst 0xe78, %g1 <== NOT EXECUTED 400049c4: 02 80 00 0e be 400049fc <== NOT EXECUTED 400049c8: b0 0e 20 ff and %i0, 0xff, %i0 <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 400049cc: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== NOT EXECUTED 400049d0: 94 10 20 00 clr %o2 <== NOT EXECUTED 400049d4: 40 00 06 71 call 40006398 <== NOT EXECUTED 400049d8: 92 10 20 00 clr %o1 <== NOT EXECUTED i = iproc (c, tty); 400049dc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400049e0: 7f ff ff 80 call 400047e0 <== NOT EXECUTED 400049e4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400049e8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 400049ec: 40 00 06 b2 call 400064b4 <== NOT EXECUTED 400049f0: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 400049f4: 81 c7 e0 08 ret <== NOT EXECUTED 400049f8: 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); 400049fc: 7f ff ff 79 call 400047e0 <== NOT EXECUTED 40004a00: 81 e8 00 00 restore <== NOT EXECUTED 40004a04: 01 00 00 00 nop 40007b0c : int _STAT_NAME( const char *path, struct stat *buf ) { 40007b0c: 9d e3 bf 88 save %sp, -120, %sp /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 40007b10: 80 a6 60 00 cmp %i1, 0 40007b14: 12 80 00 06 bne 40007b2c 40007b18: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( EFAULT ); 40007b1c: 40 00 a0 73 call 4002fce8 <__errno> 40007b20: b0 10 3f ff mov -1, %i0 40007b24: 10 80 00 1c b 40007b94 40007b28: 82 10 20 0e mov 0xe, %g1 status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); 40007b2c: a0 07 bf e8 add %fp, -24, %l0 40007b30: 92 10 20 00 clr %o1 40007b34: 94 10 00 10 mov %l0, %o2 40007b38: 96 10 20 01 mov 1, %o3 40007b3c: 7f ff f9 fa call 40006324 40007b40: b0 10 3f ff mov -1, %i0 if ( status != 0 ) 40007b44: 80 a2 20 00 cmp %o0, 0 40007b48: 12 80 00 14 bne 40007b98 40007b4c: c2 07 bf ec ld [ %fp + -20 ], %g1 return -1; if ( !loc.handlers->fstat_h ){ 40007b50: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 40007b54: 80 a0 60 00 cmp %g1, 0 40007b58: 12 80 00 12 bne 40007ba0 40007b5c: 92 10 20 00 clr %o1 rtems_filesystem_freenode( &loc ); 40007b60: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40007b64: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40007b68: 02 80 00 08 be 40007b88 <== NOT EXECUTED 40007b6c: 01 00 00 00 nop <== NOT EXECUTED 40007b70: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40007b74: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40007b78: 02 80 00 04 be 40007b88 <== NOT EXECUTED 40007b7c: 01 00 00 00 nop <== NOT EXECUTED 40007b80: 9f c0 40 00 call %g1 <== NOT EXECUTED 40007b84: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40007b88: 40 00 a0 58 call 4002fce8 <__errno> <== NOT EXECUTED 40007b8c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40007b90: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40007b94: c2 22 00 00 st %g1, [ %o0 ] 40007b98: 81 c7 e0 08 ret 40007b9c: 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) ); 40007ba0: 94 10 20 50 mov 0x50, %o2 40007ba4: 40 00 aa c6 call 400326bc 40007ba8: 90 10 00 19 mov %i1, %o0 status = (*loc.handlers->fstat_h)( &loc, buf ); 40007bac: c2 07 bf ec ld [ %fp + -20 ], %g1 40007bb0: 92 10 00 19 mov %i1, %o1 40007bb4: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 40007bb8: 9f c0 40 00 call %g1 40007bbc: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40007bc0: c2 07 bf f0 ld [ %fp + -16 ], %g1 40007bc4: 80 a0 60 00 cmp %g1, 0 40007bc8: 02 bf ff f4 be 40007b98 40007bcc: b0 10 00 08 mov %o0, %i0 40007bd0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40007bd4: 80 a0 60 00 cmp %g1, 0 40007bd8: 02 80 00 04 be 40007be8 40007bdc: 01 00 00 00 nop 40007be0: 9f c0 40 00 call %g1 40007be4: 90 10 00 10 mov %l0, %o0 return status; } 40007be8: 81 c7 e0 08 ret 40007bec: 81 e8 00 00 restore 40021dfc : int symlink( const char *actualpath, const char *sympath ) { 40021dfc: 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 ); 40021e00: c2 4e 40 00 ldsb [ %i1 ], %g1 40021e04: 80 a0 60 2f cmp %g1, 0x2f 40021e08: 02 80 00 07 be 40021e24 40021e0c: a0 10 00 18 mov %i0, %l0 40021e10: 80 a0 60 5c cmp %g1, 0x5c 40021e14: 02 80 00 04 be 40021e24 40021e18: 80 a0 60 00 cmp %g1, 0 40021e1c: 32 80 00 0a bne,a 40021e44 40021e20: 03 10 01 24 sethi %hi(0x40049000), %g1 40021e24: 03 10 01 24 sethi %hi(0x40049000), %g1 40021e28: d2 00 60 94 ld [ %g1 + 0x94 ], %o1 ! 40049094 40021e2c: 90 07 bf e4 add %fp, -28, %o0 40021e30: 92 02 60 14 add %o1, 0x14, %o1 40021e34: 40 00 41 9a call 4003249c 40021e38: 94 10 20 10 mov 0x10, %o2 40021e3c: 10 80 00 08 b 40021e5c 40021e40: 82 10 20 01 mov 1, %g1 40021e44: d2 00 60 94 ld [ %g1 + 0x94 ], %o1 40021e48: 90 07 bf e4 add %fp, -28, %o0 40021e4c: 92 02 60 04 add %o1, 4, %o1 40021e50: 40 00 41 93 call 4003249c 40021e54: 94 10 20 10 mov 0x10, %o2 40021e58: 82 10 20 00 clr %g1 result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 40021e5c: 90 06 40 01 add %i1, %g1, %o0 40021e60: c2 07 bf ec ld [ %fp + -20 ], %g1 40021e64: b2 07 bf e4 add %fp, -28, %i1 40021e68: c2 00 60 04 ld [ %g1 + 4 ], %g1 40021e6c: 94 07 bf f4 add %fp, -12, %o2 40021e70: 92 10 00 19 mov %i1, %o1 40021e74: 9f c0 40 00 call %g1 40021e78: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 40021e7c: 80 a2 20 00 cmp %o0, 0 40021e80: 12 80 00 10 bne 40021ec0 40021e84: c2 07 bf ec ld [ %fp + -20 ], %g1 return -1; if ( !loc.ops->symlink_h ) { 40021e88: c4 00 60 38 ld [ %g1 + 0x38 ], %g2 40021e8c: 80 a0 a0 00 cmp %g2, 0 40021e90: 12 80 00 0e bne 40021ec8 40021e94: d4 07 bf f4 ld [ %fp + -12 ], %o2 rtems_filesystem_freenode( &loc ); 40021e98: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40021e9c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40021ea0: 02 80 00 04 be 40021eb0 <== NOT EXECUTED 40021ea4: 01 00 00 00 nop <== NOT EXECUTED 40021ea8: 9f c0 40 00 call %g1 <== NOT EXECUTED 40021eac: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40021eb0: 40 00 37 8e call 4002fce8 <__errno> <== NOT EXECUTED 40021eb4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40021eb8: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40021ebc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40021ec0: 81 c7 e0 08 ret 40021ec4: 81 e8 00 00 restore } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 40021ec8: 92 10 00 10 mov %l0, %o1 40021ecc: 9f c0 80 00 call %g2 40021ed0: 90 10 00 19 mov %i1, %o0 rtems_filesystem_freenode( &loc ); 40021ed4: c2 07 bf ec ld [ %fp + -20 ], %g1 40021ed8: 80 a0 60 00 cmp %g1, 0 40021edc: 02 bf ff f9 be 40021ec0 40021ee0: b0 10 00 08 mov %o0, %i0 40021ee4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40021ee8: 80 a0 60 00 cmp %g1, 0 40021eec: 02 80 00 04 be 40021efc 40021ef0: 01 00 00 00 nop 40021ef4: 9f c0 40 00 call %g1 40021ef8: 90 10 00 19 mov %i1, %o0 return result; } 40021efc: 81 c7 e0 08 ret 40021f00: 81 e8 00 00 restore 40005ccc : */ long sysconf( int name ) { 40005ccc: 9d e3 bf 98 save %sp, -104, %sp switch (name) { 40005cd0: 80 a6 20 08 cmp %i0, 8 40005cd4: 02 80 00 1f be 40005d50 40005cd8: 11 00 00 04 sethi %hi(0x1000), %o0 40005cdc: 80 a6 20 08 cmp %i0, 8 40005ce0: 14 80 00 09 bg 40005d04 40005ce4: 80 a6 20 33 cmp %i0, 0x33 40005ce8: 80 a6 20 02 cmp %i0, 2 40005cec: 02 80 00 0d be 40005d20 40005cf0: 80 a6 20 04 cmp %i0, 4 40005cf4: 12 80 00 12 bne 40005d3c 40005cf8: 03 10 00 54 sethi %hi(0x40015000), %g1 40005cfc: 10 80 00 15 b 40005d50 40005d00: d0 00 60 a8 ld [ %g1 + 0xa8 ], %o0 ! 400150a8 40005d04: 02 80 00 13 be 40005d50 40005d08: 90 10 24 00 mov 0x400, %o0 40005d0c: 80 a6 22 03 cmp %i0, 0x203 40005d10: 12 80 00 0b bne 40005d3c 40005d14: 90 10 20 00 clr %o0 default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 40005d18: 81 c7 e0 08 ret <== NOT EXECUTED 40005d1c: 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); 40005d20: 03 10 00 58 sethi %hi(0x40016000), %g1 40005d24: d2 00 61 50 ld [ %g1 + 0x150 ], %o1 ! 40016150 <_TOD_Microseconds_per_tick> 40005d28: 11 00 03 d0 sethi %hi(0xf4000), %o0 40005d2c: 40 00 2f e3 call 40011cb8 <.udiv> 40005d30: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 40005d34: 81 c7 e0 08 ret 40005d38: 91 e8 00 08 restore %g0, %o0, %o0 default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 40005d3c: 40 00 21 19 call 4000e1a0 <__errno> 40005d40: 01 00 00 00 nop 40005d44: 82 10 20 16 mov 0x16, %g1 ! 16 40005d48: c2 22 00 00 st %g1, [ %o0 ] 40005d4c: 90 10 3f ff mov -1, %o0 } 40005d50: b0 10 00 08 mov %o0, %i0 40005d54: 81 c7 e0 08 ret 40005d58: 81 e8 00 00 restore 40012190 : int tcgetattr( int fd, struct termios *tp ) { 40012190: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED return ioctl( fd, RTEMS_IO_GET_ATTRIBUTES, tp ); 40012194: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40012198: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4001219c: 40 00 0e ff call 40015d98 <== NOT EXECUTED 400121a0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400121a4: 01 00 00 00 nop 400121a8 : int tcsetattr( int fd, int opt, struct termios *tp ) { 400121a8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED switch (opt) { 400121ac: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 400121b0: 02 80 00 10 be 400121f0 <== NOT EXECUTED 400121b4: 80 a6 60 01 cmp %i1, 1 <== NOT EXECUTED 400121b8: 02 80 00 08 be 400121d8 <== NOT EXECUTED 400121bc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 400121c0: 40 00 12 0b call 400169ec <__errno> <== NOT EXECUTED 400121c4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400121c8: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400121cc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400121d0: 81 c7 e0 08 ret <== NOT EXECUTED 400121d4: 81 e8 00 00 restore <== NOT EXECUTED case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 400121d8: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 400121dc: 40 00 0e ef call 40015d98 <== NOT EXECUTED 400121e0: 94 10 20 00 clr %o2 <== NOT EXECUTED 400121e4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400121e8: 26 80 00 04 bl,a 400121f8 <== NOT EXECUTED 400121ec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 400121f0: 40 00 0e ea call 40015d98 <== NOT EXECUTED 400121f4: 93 e8 20 02 restore %g0, 2, %o1 <== NOT EXECUTED } } 400121f8: 81 c7 e0 08 ret <== NOT EXECUTED 400121fc: 81 e8 00 00 restore <== NOT EXECUTED 40006668 : #include long telldir( DIR *dirp ) { 40006668: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_t *iop; if ( !dirp ) 4000666c: 80 a6 20 00 cmp %i0, 0 40006670: 32 80 00 08 bne,a 40006690 40006674: f0 06 00 00 ld [ %i0 ], %i0 rtems_set_errno_and_return_minus_one( EBADF ); 40006678: 40 00 2b 58 call 400113d8 <__errno> <== NOT EXECUTED 4000667c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40006680: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 40006684: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40006688: 81 c7 e0 08 ret 4000668c: 81 e8 00 00 restore /* * Get the file control block structure associated with the * file descriptor */ iop = rtems_libio_iop( dirp->dd_fd ); 40006690: 03 10 00 61 sethi %hi(0x40018400), %g1 40006694: c2 00 61 38 ld [ %g1 + 0x138 ], %g1 ! 40018538 40006698: 80 a6 00 01 cmp %i0, %g1 4000669c: 1a 80 00 0d bcc 400066d0 400066a0: 11 10 00 5d sethi %hi(0x40017400), %o0 400066a4: 03 10 00 64 sethi %hi(0x40019000), %g1 400066a8: c6 00 63 2c ld [ %g1 + 0x32c ], %g3 ! 4001932c 400066ac: 85 2e 20 02 sll %i0, 2, %g2 400066b0: 83 2e 20 04 sll %i0, 4, %g1 400066b4: 82 20 40 02 sub %g1, %g2, %g1 400066b8: 82 00 40 18 add %g1, %i0, %g1 400066bc: 83 28 60 02 sll %g1, 2, %g1 if (iop == NULL) 400066c0: 86 80 c0 01 addcc %g3, %g1, %g3 400066c4: 32 bf ff f1 bne,a 40006688 400066c8: f0 00 e0 08 ld [ %g3 + 8 ], %i0 assert(0); 400066cc: 11 10 00 5d sethi %hi(0x40017400), %o0 <== NOT EXECUTED 400066d0: 15 10 00 5d sethi %hi(0x40017400), %o2 <== NOT EXECUTED 400066d4: 17 10 00 5c sethi %hi(0x40017000), %o3 <== NOT EXECUTED 400066d8: 90 12 23 38 or %o0, 0x338, %o0 <== NOT EXECUTED 400066dc: 94 12 a3 88 or %o2, 0x388, %o2 <== NOT EXECUTED 400066e0: 96 12 e3 b8 or %o3, 0x3b8, %o3 <== NOT EXECUTED 400066e4: 7f ff f7 3c call 400043d4 <__assert_func> <== NOT EXECUTED 400066e8: 92 10 20 2c mov 0x2c, %o1 <== NOT EXECUTED 400066ec: 01 00 00 00 nop 400077f4 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 400077f4: 9d e3 bf 80 save %sp, -128, %sp Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 400077f8: 80 a6 a0 00 cmp %i2, 0 400077fc: 02 80 00 22 be 40007884 40007800: 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 ) || 40007804: c4 06 a0 0c ld [ %i2 + 0xc ], %g2 40007808: 03 0e e6 b2 sethi %hi(0x3b9ac800), %g1 4000780c: 82 10 61 ff or %g1, 0x1ff, %g1 ! 3b9ac9ff 40007810: 80 a0 80 01 cmp %g2, %g1 40007814: 18 80 00 1c bgu 40007884 40007818: 01 00 00 00 nop 4000781c: c4 06 a0 04 ld [ %i2 + 4 ], %g2 40007820: 80 a0 80 01 cmp %g2, %g1 40007824: 18 80 00 18 bgu 40007884 40007828: 80 a0 a0 00 cmp %g2, 0 4000782c: 06 80 00 16 bl 40007884 40007830: 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 ) { 40007834: 80 a6 60 04 cmp %i1, 4 40007838: 02 80 00 04 be 40007848 4000783c: 80 a6 60 00 cmp %i1, 0 40007840: 12 80 00 11 bne 40007884 40007844: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 40007848: 90 07 bf e4 add %fp, -28, %o0 4000784c: 92 10 00 1a mov %i2, %o1 40007850: 40 00 23 c0 call 40010750 40007854: 94 10 20 10 mov 0x10, %o2 /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 40007858: 80 a6 60 04 cmp %i1, 4 4000785c: 12 80 00 14 bne 400078ac 40007860: 92 10 00 18 mov %i0, %o1 /* Check for seconds in the past */ if ( _Timespec_Greater_than( &_TOD_Now, &normalize.it_value ) ) 40007864: b2 07 bf ec add %fp, -20, %i1 40007868: 21 10 00 7a sethi %hi(0x4001e800), %l0 4000786c: 92 10 00 19 mov %i1, %o1 40007870: 40 00 0e 85 call 4000b284 <_Timespec_Greater_than> 40007874: 90 14 20 70 or %l0, 0x70, %o0 40007878: 80 8a 20 ff btst 0xff, %o0 4000787c: 02 80 00 08 be 4000789c 40007880: 92 10 00 19 mov %i1, %o1 rtems_set_errno_and_return_minus_one( EINVAL ); 40007884: 40 00 21 9b call 4000fef0 <__errno> 40007888: b0 10 3f ff mov -1, %i0 4000788c: 82 10 20 16 mov 0x16, %g1 40007890: c2 22 00 00 st %g1, [ %o0 ] 40007894: 81 c7 e0 08 ret 40007898: 81 e8 00 00 restore _Timespec_Subtract( &_TOD_Now, &normalize.it_value, &normalize.it_value ); 4000789c: 90 14 20 70 or %l0, 0x70, %o0 400078a0: 40 00 0e 8a call 4000b2c8 <_Timespec_Subtract> 400078a4: 94 10 00 19 mov %i1, %o2 400078a8: 92 10 00 18 mov %i0, %o1 400078ac: 11 10 00 7a sethi %hi(0x4001e800), %o0 400078b0: 94 07 bf f4 add %fp, -12, %o2 400078b4: 40 00 08 9e call 40009b2c <_Objects_Get> 400078b8: 90 12 23 30 or %o0, 0x330, %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 ) { 400078bc: c2 07 bf f4 ld [ %fp + -12 ], %g1 400078c0: 80 a0 60 00 cmp %g1, 0 400078c4: 12 80 00 39 bne 400079a8 400078c8: 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 ) { 400078cc: c2 07 bf ec ld [ %fp + -20 ], %g1 400078d0: 80 a0 60 00 cmp %g1, 0 400078d4: 12 80 00 14 bne 40007924 400078d8: c2 07 bf f0 ld [ %fp + -16 ], %g1 400078dc: 80 a0 60 00 cmp %g1, 0 400078e0: 12 80 00 11 bne 40007924 400078e4: 01 00 00 00 nop /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 400078e8: 40 00 0f bb call 4000b7d4 <_Watchdog_Remove> 400078ec: 90 02 20 10 add %o0, 0x10, %o0 /* The old data of the timer are returned */ if ( ovalue ) 400078f0: 80 a6 e0 00 cmp %i3, 0 400078f4: 02 80 00 05 be 40007908 400078f8: 90 10 00 1b mov %i3, %o0 *ovalue = ptimer->timer_data; 400078fc: 92 06 60 54 add %i1, 0x54, %o1 <== NOT EXECUTED 40007900: 40 00 23 94 call 40010750 <== NOT EXECUTED 40007904: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED /* The new data are set */ ptimer->timer_data = normalize; 40007908: 92 07 bf e4 add %fp, -28, %o1 4000790c: 94 10 20 10 mov 0x10, %o2 40007910: 40 00 23 90 call 40010750 40007914: 90 06 60 54 add %i1, 0x54, %o0 /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 40007918: 82 10 20 04 mov 4, %g1 4000791c: 10 80 00 1f b 40007998 40007920: 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 ); 40007924: 40 00 0e 7d call 4000b318 <_Timespec_To_ticks> 40007928: 90 10 00 1a mov %i2, %o0 4000792c: d0 26 60 64 st %o0, [ %i1 + 0x64 ] initial_period = _Timespec_To_ticks( &normalize.it_value ); 40007930: 40 00 0e 7a call 4000b318 <_Timespec_To_ticks> 40007934: 90 07 bf ec add %fp, -20, %o0 activated = _POSIX_Timer_Insert_helper( 40007938: 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 ); 4000793c: 92 10 00 08 mov %o0, %o1 activated = _POSIX_Timer_Insert_helper( 40007940: 17 10 00 1e sethi %hi(0x40007800), %o3 40007944: 90 06 60 10 add %i1, 0x10, %o0 40007948: 96 12 e1 c0 or %o3, 0x1c0, %o3 4000794c: 40 00 1a 10 call 4000e18c <_POSIX_Timer_Insert_helper> 40007950: 98 10 00 19 mov %i1, %o4 initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 40007954: 80 8a 20 ff btst 0xff, %o0 40007958: 02 80 00 10 be 40007998 4000795c: 01 00 00 00 nop /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 40007960: 80 a6 e0 00 cmp %i3, 0 40007964: 02 80 00 05 be 40007978 40007968: 90 10 00 1b mov %i3, %o0 *ovalue = ptimer->timer_data; 4000796c: 92 06 60 54 add %i1, 0x54, %o1 40007970: 40 00 23 78 call 40010750 40007974: 94 10 20 10 mov 0x10, %o2 ptimer->timer_data = normalize; 40007978: 92 07 bf e4 add %fp, -28, %o1 4000797c: 94 10 20 10 mov 0x10, %o2 40007980: 40 00 23 74 call 40010750 40007984: 90 06 60 54 add %i1, 0x54, %o0 /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 40007988: 82 10 20 03 mov 3, %g1 _TOD_Get( &ptimer->time ); 4000798c: 90 06 60 6c add %i1, 0x6c, %o0 40007990: 40 00 06 0a call 400091b8 <_TOD_Get> 40007994: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] _Thread_Enable_dispatch(); 40007998: 40 00 0a 8b call 4000a3c4 <_Thread_Enable_dispatch> 4000799c: b0 10 20 00 clr %i0 400079a0: 81 c7 e0 08 ret 400079a4: 81 e8 00 00 restore #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 400079a8: 40 00 21 52 call 4000fef0 <__errno> <== NOT EXECUTED 400079ac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400079b0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400079b4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } 400079b8: 81 c7 e0 08 ret <== NOT EXECUTED 400079bc: 81 e8 00 00 restore <== NOT EXECUTED 40022098 : */ char *ttyname( int fd ) { 40022098: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if ( !ttyname_r( fd, ttyname_buf, sizeof(ttyname_buf) ) ) 4002209c: 21 10 01 24 sethi %hi(0x40049000), %l0 <== NOT EXECUTED 400220a0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400220a4: 94 10 24 06 mov 0x406, %o2 <== NOT EXECUTED 400220a8: 92 14 20 98 or %l0, 0x98, %o1 <== NOT EXECUTED 400220ac: 7f ff ff b8 call 40021f8c <== NOT EXECUTED 400220b0: b0 14 20 98 or %l0, 0x98, %i0 <== NOT EXECUTED 400220b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400220b8: 32 80 00 02 bne,a 400220c0 <== NOT EXECUTED 400220bc: b0 10 20 00 clr %i0 <== NOT EXECUTED return ttyname_buf; return NULL; } 400220c0: 81 c7 e0 08 ret <== NOT EXECUTED 400220c4: 81 e8 00 00 restore <== NOT EXECUTED 40021f8c : int ttyname_r( int fd, char *name, size_t namesize ) { 40021f8c: 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) 40021f90: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40021f94: 7f ff ff e2 call 40021f1c <== NOT EXECUTED 40021f98: 92 07 bf d4 add %fp, -44, %o1 <== NOT EXECUTED 40021f9c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40021fa0: 06 80 00 16 bl 40021ff8 <== NOT EXECUTED 40021fa4: 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)) 40021fa8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40021fac: 7f ff f7 be call 4001fea4 <== NOT EXECUTED 40021fb0: 92 07 bf 80 add %fp, -128, %o1 <== NOT EXECUTED 40021fb4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40021fb8: 12 80 00 10 bne 40021ff8 <== NOT EXECUTED 40021fbc: c2 17 bf 8c lduh [ %fp + -116 ], %g1 <== NOT EXECUTED 40021fc0: 05 00 00 3c sethi %hi(0xf000), %g2 <== NOT EXECUTED 40021fc4: 82 08 40 02 and %g1, %g2, %g1 <== NOT EXECUTED 40021fc8: 05 00 00 08 sethi %hi(0x2000), %g2 <== NOT EXECUTED 40021fcc: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40021fd0: 12 80 00 0a bne 40021ff8 <== NOT EXECUTED 40021fd4: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); if ((dp = opendir (_PATH_DEV)) == NULL) 40021fd8: 11 10 01 16 sethi %hi(0x40045800), %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); 40021fdc: 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) 40021fe0: 90 12 20 88 or %o0, 0x88, %o0 <== NOT EXECUTED 40021fe4: 7f ff fd b1 call 400216a8 <== NOT EXECUTED 40021fe8: a2 07 bf 30 add %fp, -208, %l1 <== NOT EXECUTED 40021fec: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40021ff0: 12 80 00 20 bne 40022070 <== NOT EXECUTED 40021ff4: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); 40021ff8: 40 00 37 3c call 4002fce8 <__errno> <== NOT EXECUTED 40021ffc: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40022000: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 40022004: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40022008: 81 c7 e0 08 ret <== NOT EXECUTED 4002200c: 81 e8 00 00 restore <== NOT EXECUTED for (rval = NULL; (dirp = readdir (dp)) != NULL ;) { if (dirp->d_ino != sb.st_ino) 40022010: c2 07 bf 88 ld [ %fp + -120 ], %g1 <== NOT EXECUTED 40022014: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40022018: 12 80 00 16 bne 40022070 <== NOT EXECUTED 4002201c: 92 02 20 0c add %o0, 0xc, %o1 <== NOT EXECUTED continue; strcpy (name + sizeof (_PATH_DEV) - 1, dirp->d_name); 40022020: 40 00 4b e6 call 40034fb8 <== NOT EXECUTED 40022024: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if (stat (name, &dsb) || sb.st_dev != dsb.st_dev || 40022028: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4002202c: 7f ff 96 b8 call 40007b0c <== NOT EXECUTED 40022030: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40022034: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40022038: 12 80 00 0e bne 40022070 <== NOT EXECUTED 4002203c: c4 07 bf 30 ld [ %fp + -208 ], %g2 <== NOT EXECUTED 40022040: c2 07 bf 80 ld [ %fp + -128 ], %g1 <== NOT EXECUTED 40022044: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40022048: 12 80 00 0a bne 40022070 <== NOT EXECUTED 4002204c: c4 07 bf 34 ld [ %fp + -204 ], %g2 <== NOT EXECUTED 40022050: c2 07 bf 84 ld [ %fp + -124 ], %g1 <== NOT EXECUTED 40022054: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40022058: 12 80 00 06 bne 40022070 <== NOT EXECUTED 4002205c: c4 07 bf 38 ld [ %fp + -200 ], %g2 <== NOT EXECUTED 40022060: c2 07 bf 88 ld [ %fp + -120 ], %g1 <== NOT EXECUTED 40022064: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40022068: 02 80 00 08 be 40022088 <== NOT EXECUTED 4002206c: 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 ;) 40022070: 7f ff fe 46 call 40021988 <== NOT EXECUTED 40022074: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40022078: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002207c: 32 bf ff e5 bne,a 40022010 <== NOT EXECUTED 40022080: c4 02 00 00 ld [ %o0 ], %g2 <== NOT EXECUTED sb.st_ino != dsb.st_ino) continue; rval = name; break; } (void) closedir (dp); 40022084: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40022088: 40 00 2c c1 call 4002d38c <== NOT EXECUTED 4002208c: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 40022090: 81 c7 e0 08 ret <== NOT EXECUTED 40022094: 81 e8 00 00 restore <== NOT EXECUTED 400220e0 : #include int unlink( const char *path ) { 400220e0: 9d e3 bf 88 save %sp, -120, %sp /* * Get the node to be unlinked. */ result = rtems_filesystem_evaluate_path( path, 0, &loc, false ); 400220e4: 92 10 20 00 clr %o1 400220e8: 90 10 00 18 mov %i0, %o0 400220ec: a0 07 bf e8 add %fp, -24, %l0 400220f0: 96 10 20 00 clr %o3 400220f4: 7f ff 90 8c call 40006324 400220f8: 94 10 00 10 mov %l0, %o2 if ( result != 0 ) 400220fc: 80 a2 20 00 cmp %o0, 0 40022100: 32 80 00 17 bne,a 4002215c 40022104: b0 10 3f ff mov -1, %i0 return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); 40022108: 90 10 20 02 mov 2, %o0 4002210c: 7f ff 90 59 call 40006270 40022110: 92 10 00 10 mov %l0, %o1 if (result != 0 && errno != ENOTSUP) { 40022114: 80 a2 20 00 cmp %o0, 0 40022118: 02 80 00 13 be 40022164 4002211c: c2 07 bf f0 ld [ %fp + -16 ], %g1 40022120: 40 00 36 f2 call 4002fce8 <__errno> <== NOT EXECUTED 40022124: 01 00 00 00 nop <== NOT EXECUTED 40022128: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 4002212c: 80 a0 60 86 cmp %g1, 0x86 <== NOT EXECUTED 40022130: 02 80 00 0d be 40022164 <== NOT EXECUTED 40022134: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40022138: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002213c: 02 80 00 08 be 4002215c <== NOT EXECUTED 40022140: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40022144: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40022148: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002214c: 02 80 00 04 be 4002215c <== NOT EXECUTED 40022150: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40022154: 9f c0 40 00 call %g1 <== NOT EXECUTED 40022158: 01 00 00 00 nop <== NOT EXECUTED 4002215c: 81 c7 e0 08 ret 40022160: 81 e8 00 00 restore return -1; } if ( !loc.ops->node_type_h ) { 40022164: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 40022168: 80 a0 a0 00 cmp %g2, 0 4002216c: 12 80 00 07 bne 40022188 40022170: a0 07 bf e8 add %fp, -24, %l0 rtems_filesystem_freenode( &loc ); 40022174: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40022178: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002217c: 12 80 00 1d bne 400221f0 <== NOT EXECUTED 40022180: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED 40022184: 30 80 00 1d b,a 400221f8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { 40022188: 9f c0 80 00 call %g2 4002218c: 90 10 00 10 mov %l0, %o0 40022190: 80 a2 20 01 cmp %o0, 1 40022194: 12 80 00 0f bne 400221d0 40022198: c2 07 bf f0 ld [ %fp + -16 ], %g1 rtems_filesystem_freenode( &loc ); 4002219c: 80 a0 60 00 cmp %g1, 0 400221a0: 02 80 00 08 be 400221c0 400221a4: 01 00 00 00 nop 400221a8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400221ac: 80 a0 60 00 cmp %g1, 0 400221b0: 02 80 00 04 be 400221c0 400221b4: 01 00 00 00 nop 400221b8: 9f c0 40 00 call %g1 400221bc: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EISDIR ); 400221c0: 40 00 36 ca call 4002fce8 <__errno> 400221c4: b0 10 3f ff mov -1, %i0 400221c8: 10 80 00 0f b 40022204 400221cc: 82 10 20 15 mov 0x15, %g1 } if ( !loc.ops->unlink_h ) { 400221d0: c4 00 60 0c ld [ %g1 + 0xc ], %g2 400221d4: 80 a0 a0 00 cmp %g2, 0 400221d8: 12 80 00 0e bne 40022210 400221dc: 01 00 00 00 nop rtems_filesystem_freenode( &loc ); 400221e0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400221e4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400221e8: 02 80 00 04 be 400221f8 <== NOT EXECUTED 400221ec: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400221f0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400221f4: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400221f8: 40 00 36 bc call 4002fce8 <__errno> <== NOT EXECUTED 400221fc: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40022200: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40022204: c2 22 00 00 st %g1, [ %o0 ] 40022208: 81 c7 e0 08 ret 4002220c: 81 e8 00 00 restore } result = (*loc.ops->unlink_h)( &loc ); 40022210: 9f c0 80 00 call %g2 40022214: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40022218: c2 07 bf f0 ld [ %fp + -16 ], %g1 4002221c: 80 a0 60 00 cmp %g1, 0 40022220: 02 bf ff cf be 4002215c 40022224: b0 10 00 08 mov %o0, %i0 40022228: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002222c: 80 a0 60 00 cmp %g1, 0 40022230: 02 80 00 06 be 40022248 40022234: 01 00 00 00 nop 40022238: 9f c0 40 00 call %g1 4002223c: 90 10 00 10 mov %l0, %o0 40022240: 81 c7 e0 08 ret 40022244: 81 e8 00 00 restore return result; } 40022248: 81 c7 e0 08 ret <== NOT EXECUTED 4002224c: 81 e8 00 00 restore <== NOT EXECUTED 400222bc : */ int unmount( const char *path ) { 400222bc: 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 ) ) 400222c0: 92 10 20 00 clr %o1 400222c4: 90 10 00 18 mov %i0, %o0 400222c8: a0 07 bf e8 add %fp, -24, %l0 400222cc: 96 10 20 01 mov 1, %o3 400222d0: 7f ff 90 15 call 40006324 400222d4: 94 10 00 10 mov %l0, %o2 400222d8: 80 a2 20 00 cmp %o0, 0 400222dc: 12 80 00 6a bne 40022484 400222e0: c2 07 bf e8 ld [ %fp + -24 ], %g1 return -1; mt_entry = loc.mt_entry; 400222e4: 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) ){ 400222e8: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 400222ec: 80 a0 80 01 cmp %g2, %g1 400222f0: 02 80 00 0f be 4002232c 400222f4: c6 07 bf f0 ld [ %fp + -16 ], %g3 rtems_filesystem_freenode( &loc ); 400222f8: 80 a0 e0 00 cmp %g3, 0 400222fc: 02 80 00 08 be 4002231c 40022300: 01 00 00 00 nop 40022304: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 40022308: 80 a0 60 00 cmp %g1, 0 4002230c: 02 80 00 04 be 4002231c 40022310: 01 00 00 00 nop 40022314: 9f c0 40 00 call %g1 40022318: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EACCES ); 4002231c: 40 00 36 73 call 4002fce8 <__errno> 40022320: 01 00 00 00 nop 40022324: 10 80 00 21 b 400223a8 40022328: 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 ); 4002232c: 80 a0 e0 00 cmp %g3, 0 40022330: 22 80 00 09 be,a 40022354 40022334: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 40022338: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 4002233c: 80 a0 60 00 cmp %g1, 0 40022340: 22 80 00 05 be,a 40022354 40022344: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 40022348: 9f c0 40 00 call %g1 4002234c: 90 10 00 10 mov %l0, %o0 /* * Verify Unmount is supported by both filesystems. */ if ( !fs_mount_loc->ops->unmount_h ) 40022350: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40022354: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 40022358: 80 a0 60 00 cmp %g1, 0 4002235c: 02 80 00 07 be 40022378 40022360: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) 40022364: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 40022368: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 4002236c: 80 a0 60 00 cmp %g1, 0 40022370: 32 80 00 06 bne,a 40022388 40022374: 03 10 01 24 sethi %hi(0x40049000), %g1 rtems_set_errno_and_return_minus_one( ENOTSUP ); 40022378: 40 00 36 5c call 4002fce8 <__errno> <== NOT EXECUTED 4002237c: 01 00 00 00 nop <== NOT EXECUTED 40022380: 10 80 00 0a b 400223a8 <== NOT EXECUTED 40022384: 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 ) 40022388: c2 00 60 94 ld [ %g1 + 0x94 ], %g1 4002238c: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 40022390: 80 a0 40 18 cmp %g1, %i0 40022394: 12 80 00 08 bne 400223b4 40022398: 03 10 01 75 sethi %hi(0x4005d400), %g1 rtems_set_errno_and_return_minus_one( EBUSY ); 4002239c: 40 00 36 53 call 4002fce8 <__errno> 400223a0: 01 00 00 00 nop 400223a4: 82 10 20 10 mov 0x10, %g1 ! 10 400223a8: c2 22 00 00 st %g1, [ %o0 ] 400223ac: 81 c7 e0 08 ret 400223b0: 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; 400223b4: c6 00 63 f8 ld [ %g1 + 0x3f8 ], %g3 400223b8: 82 10 63 f8 or %g1, 0x3f8, %g1 !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 400223bc: 10 80 00 07 b 400223d8 400223c0: 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 ) { 400223c4: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 400223c8: 80 a0 80 01 cmp %g2, %g1 400223cc: 02 bf ff f4 be 4002239c 400223d0: 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 ) { 400223d4: 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 ); 400223d8: 80 a0 c0 04 cmp %g3, %g4 400223dc: 32 bf ff fa bne,a 400223c4 400223e0: c4 00 e0 14 ld [ %g3 + 0x14 ], %g2 400223e4: 30 80 00 2a b,a 4002248c * 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 ) 400223e8: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 400223ec: 9f c0 40 00 call %g1 400223f0: 90 10 00 18 mov %i0, %o0 400223f4: 80 a2 20 00 cmp %o0, 0 400223f8: 12 80 00 23 bne 40022484 400223fc: 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){ 40022400: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 40022404: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 40022408: 9f c0 40 00 call %g1 4002240c: 90 10 00 18 mov %i0, %o0 40022410: 80 a2 20 00 cmp %o0, 0 40022414: 02 80 00 0b be 40022440 40022418: 01 00 00 00 nop if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 4002241c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 40022420: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 <== NOT EXECUTED 40022424: 9f c0 40 00 call %g1 <== NOT EXECUTED 40022428: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4002242c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40022430: 02 80 00 15 be 40022484 <== NOT EXECUTED 40022434: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 40022438: 7f ff a1 a5 call 4000aacc <== NOT EXECUTED 4002243c: 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 ); 40022440: 40 00 05 68 call 400239e0 <_Chain_Extract> 40022444: 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 ); 40022448: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 4002244c: 80 a0 60 00 cmp %g1, 0 40022450: 02 80 00 09 be 40022474 40022454: 90 10 00 18 mov %i0, %o0 40022458: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002245c: 80 a0 60 00 cmp %g1, 0 40022460: 02 80 00 05 be 40022474 40022464: 01 00 00 00 nop 40022468: 9f c0 40 00 call %g1 4002246c: 90 06 20 08 add %i0, 8, %o0 free( mt_entry ); 40022470: 90 10 00 18 mov %i0, %o0 40022474: 7f ff 8f fe call 4000646c 40022478: b0 10 20 00 clr %i0 4002247c: 81 c7 e0 08 ret 40022480: 81 e8 00 00 restore return 0; } 40022484: 81 c7 e0 08 ret 40022488: 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 ) 4002248c: 7f ff 90 b3 call 40006758 40022490: 90 10 00 18 mov %i0, %o0 40022494: 80 a2 20 01 cmp %o0, 1 40022498: 32 bf ff d4 bne,a 400223e8 4002249c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 400224a0: 30 bf ff bf b,a 4002239c 400224a4 : int utime( const char *path, const struct utimbuf *times ) { 400224a4: 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 ) ) 400224a8: 92 10 20 00 clr %o1 400224ac: 90 10 00 18 mov %i0, %o0 400224b0: a0 07 bf e8 add %fp, -24, %l0 400224b4: 96 10 20 01 mov 1, %o3 400224b8: 94 10 00 10 mov %l0, %o2 400224bc: 7f ff 8f 9a call 40006324 400224c0: b0 10 3f ff mov -1, %i0 400224c4: 80 a2 20 00 cmp %o0, 0 400224c8: 12 80 00 10 bne 40022508 400224cc: c2 07 bf f0 ld [ %fp + -16 ], %g1 return -1; if ( !temp_loc.ops->utime_h ){ 400224d0: c4 00 60 30 ld [ %g1 + 0x30 ], %g2 400224d4: 80 a0 a0 00 cmp %g2, 0 400224d8: 32 80 00 0e bne,a 40022510 400224dc: d4 06 60 04 ld [ %i1 + 4 ], %o2 rtems_filesystem_freenode( &temp_loc ); 400224e0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400224e4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400224e8: 02 80 00 04 be 400224f8 <== NOT EXECUTED 400224ec: 01 00 00 00 nop <== NOT EXECUTED 400224f0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400224f4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400224f8: 40 00 35 fc call 4002fce8 <__errno> <== NOT EXECUTED 400224fc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40022500: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40022504: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40022508: 81 c7 e0 08 ret 4002250c: 81 e8 00 00 restore } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 40022510: d2 06 40 00 ld [ %i1 ], %o1 40022514: 9f c0 80 00 call %g2 40022518: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &temp_loc ); 4002251c: c2 07 bf f0 ld [ %fp + -16 ], %g1 40022520: 80 a0 60 00 cmp %g1, 0 40022524: 02 bf ff f9 be 40022508 40022528: b0 10 00 08 mov %o0, %i0 4002252c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40022530: 80 a0 60 00 cmp %g1, 0 40022534: 02 80 00 04 be 40022544 40022538: 01 00 00 00 nop 4002253c: 9f c0 40 00 call %g1 40022540: 90 10 00 10 mov %l0, %o0 return result; } 40022544: 81 c7 e0 08 ret 40022548: 81 e8 00 00 restore 400038e8 : */ void vprintk( const char *fmt, va_list ap ) { 400038e8: 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); 400038ec: 03 10 00 63 sethi %hi(0x40018c00), %g1 if (maxwidth) maxwidth--; } count = 0; while ((n = num / base) > 0) { toPrint[count++] = (num - (n*base)); 400038f0: 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); 400038f4: ac 10 63 1c or %g1, 0x31c, %l6 count = 0; while ((n = num / base) > 0) { toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; 400038f8: 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)])]); 400038fc: 03 10 00 5f sethi %hi(0x40017c00), %g1 40003900: 10 80 00 c8 b 40003c20 40003904: b6 10 63 58 or %g1, 0x358, %i3 ! 40017f58 <__func__.4894+0x248> base = 0; sign = 0; width = 0; minus = 0; lead = ' '; if (*fmt == '%') { 40003908: 32 80 00 c4 bne,a 40003c18 4000390c: c2 05 80 00 ld [ %l6 ], %g1 fmt++; 40003910: b0 06 20 01 inc %i0 if (*fmt == '0' ) { 40003914: c2 4e 00 00 ldsb [ %i0 ], %g1 40003918: 80 a0 60 30 cmp %g1, 0x30 4000391c: 12 80 00 05 bne 40003930 40003920: ae 10 20 20 mov 0x20, %l7 lead = '0'; fmt++; 40003924: b0 06 20 01 inc %i0 40003928: ae 10 20 30 mov 0x30, %l7 } if (*fmt == '-' ) { 4000392c: c2 4e 00 00 ldsb [ %i0 ], %g1 40003930: 80 a0 60 2d cmp %g1, 0x2d 40003934: 12 80 00 04 bne 40003944 40003938: a6 10 20 00 clr %l3 minus = 1; fmt++; 4000393c: b0 06 20 01 inc %i0 40003940: a6 10 20 01 mov 1, %l3 40003944: 10 80 00 08 b 40003964 40003948: a8 10 20 00 clr %l4 } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; width += (*fmt - '0'); 4000394c: 85 38 60 18 sra %g1, 0x18, %g2 fmt++; 40003950: b0 06 20 01 inc %i0 if (*fmt == '-' ) { minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; 40003954: 83 2d 20 01 sll %l4, 1, %g1 width += (*fmt - '0'); 40003958: 84 00 bf d0 add %g2, -48, %g2 if (*fmt == '-' ) { minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; 4000395c: 82 00 40 03 add %g1, %g3, %g1 width += (*fmt - '0'); 40003960: a8 00 80 01 add %g2, %g1, %l4 } if (*fmt == '-' ) { minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 40003964: d0 0e 00 00 ldub [ %i0 ], %o0 width *= 10; 40003968: 87 2d 20 03 sll %l4, 3, %g3 } if (*fmt == '-' ) { minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 4000396c: 82 02 3f d0 add %o0, -48, %g1 40003970: 82 08 60 ff and %g1, 0xff, %g1 40003974: 80 a0 60 09 cmp %g1, 9 40003978: 08 bf ff f5 bleu 4000394c 4000397c: 83 2a 20 18 sll %o0, 0x18, %g1 width *= 10; width += (*fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 40003980: 83 38 60 18 sra %g1, 0x18, %g1 40003984: 80 a0 60 6c cmp %g1, 0x6c 40003988: 12 80 00 05 bne 4000399c 4000398c: 83 2a 20 18 sll %o0, 0x18, %g1 lflag = 1; c = *++fmt; 40003990: b0 06 20 01 inc %i0 40003994: d0 0e 00 00 ldub [ %i0 ], %o0 } switch (c) { 40003998: 83 2a 20 18 sll %o0, 0x18, %g1 4000399c: 83 38 60 18 sra %g1, 0x18, %g1 400039a0: 80 a0 60 64 cmp %g1, 0x64 400039a4: 02 80 00 2c be 40003a54 400039a8: aa 10 20 0a mov 0xa, %l5 400039ac: 14 80 00 16 bg 40003a04 400039b0: 80 a0 60 70 cmp %g1, 0x70 400039b4: 80 a0 60 4f cmp %g1, 0x4f 400039b8: 02 80 00 60 be 40003b38 400039bc: aa 10 20 08 mov 8, %l5 400039c0: 14 80 00 09 bg 400039e4 400039c4: 80 a0 60 58 cmp %g1, 0x58 400039c8: 80 a0 60 44 cmp %g1, 0x44 400039cc: 02 80 00 21 be 40003a50 400039d0: 80 a0 60 49 cmp %g1, 0x49 400039d4: 32 80 00 55 bne,a 40003b28 400039d8: 91 2a 20 18 sll %o0, 0x18, %o0 400039dc: 10 80 00 1e b 40003a54 <== NOT EXECUTED 400039e0: aa 10 20 0a mov 0xa, %l5 <== NOT EXECUTED 400039e4: 02 80 00 54 be 40003b34 <== NOT EXECUTED 400039e8: 80 a0 60 63 cmp %g1, 0x63 <== NOT EXECUTED 400039ec: 02 80 00 4b be 40003b18 <== NOT EXECUTED 400039f0: 80 a0 60 55 cmp %g1, 0x55 <== NOT EXECUTED 400039f4: 32 80 00 4d bne,a 40003b28 <== NOT EXECUTED 400039f8: 91 2a 20 18 sll %o0, 0x18, %o0 <== NOT EXECUTED 400039fc: 10 80 00 4f b 40003b38 <== NOT EXECUTED 40003a00: aa 10 20 0a mov 0xa, %l5 <== NOT EXECUTED 40003a04: 02 80 00 4c be 40003b34 40003a08: 80 a0 60 70 cmp %g1, 0x70 40003a0c: 14 80 00 09 bg 40003a30 40003a10: 80 a0 60 75 cmp %g1, 0x75 40003a14: 80 a0 60 69 cmp %g1, 0x69 <== NOT EXECUTED 40003a18: 02 80 00 0e be 40003a50 <== NOT EXECUTED 40003a1c: 80 a0 60 6f cmp %g1, 0x6f <== NOT EXECUTED 40003a20: 32 80 00 42 bne,a 40003b28 <== NOT EXECUTED 40003a24: 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); 40003a28: 10 80 00 44 b 40003b38 <== NOT EXECUTED 40003a2c: aa 10 20 08 mov 8, %l5 <== NOT EXECUTED if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) { 40003a30: 02 80 00 0b be 40003a5c 40003a34: 80 a0 60 78 cmp %g1, 0x78 40003a38: 02 80 00 3f be 40003b34 40003a3c: 80 a0 60 73 cmp %g1, 0x73 40003a40: 32 80 00 3a bne,a 40003b28 40003a44: 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 *); 40003a48: 10 80 00 07 b 40003a64 40003a4c: e4 06 40 00 ld [ %i1 ], %l2 if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) { 40003a50: aa 10 20 0a mov 0xa, %l5 <== NOT EXECUTED 40003a54: 10 80 00 3a b 40003b3c 40003a58: 82 10 20 01 mov 1, %g1 40003a5c: 10 80 00 37 b 40003b38 40003a60: 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 *); 40003a64: a2 10 20 00 clr %l1 40003a68: b2 06 60 04 add %i1, 4, %i1 /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 40003a6c: c2 4c 80 11 ldsb [ %l2 + %l1 ], %g1 40003a70: 80 a0 60 00 cmp %g1, 0 40003a74: 32 bf ff fe bne,a 40003a6c 40003a78: a2 04 60 01 inc %l1 ; /* leading spaces */ if ( !minus ) 40003a7c: 80 a4 e0 00 cmp %l3, 0 40003a80: 02 80 00 07 be 40003a9c 40003a84: a0 10 00 11 mov %l1, %l0 for ( i=len ; i 40003a8c: 80 a5 20 00 cmp %l4, 0 for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i 40003aa4: c2 05 80 00 ld [ %l6 ], %g1 <== NOT EXECUTED BSP_output_char(' '); /* no width option */ if (width == 0) { 40003aa8: 80 a5 20 00 cmp %l4, 0 40003aac: 22 80 00 02 be,a 40003ab4 40003ab0: a8 10 00 11 mov %l1, %l4 width = len; } /* output the string */ for ( i=0 ; i 40003abc: 80 a4 e0 00 cmp %l3, 0 40003ac0: 10 80 00 06 b 40003ad8 40003ac4: d0 4c 80 00 ldsb [ %l2 ], %o0 BSP_output_char(*str); 40003ac8: c2 05 80 00 ld [ %l6 ], %g1 40003acc: 9f c0 40 00 call %g1 40003ad0: 01 00 00 00 nop if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i 40003ae0: a4 04 a0 01 inc %l2 BSP_output_char(*str); /* trailing spaces */ if ( minus ) 40003ae4: 80 a4 e0 00 cmp %l3, 0 40003ae8: 12 80 00 07 bne 40003b04 40003aec: a0 10 00 11 mov %l1, %l0 ) { char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 40003af0: 10 80 00 4c b 40003c20 40003af4: b0 06 20 01 inc %i0 for ( i=0 ; i 40003b0c: c2 05 80 00 ld [ %l6 ], %g1 ) { char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 40003b10: 10 80 00 44 b 40003c20 40003b14: b0 06 20 01 inc %i0 for ( i=len ; i <== NOT EXECUTED 40003b24: b2 06 60 04 add %i1, 4, %i1 <== NOT EXECUTED break; default: BSP_output_char(c); 40003b28: c2 05 80 00 ld [ %l6 ], %g1 40003b2c: 10 80 00 3b b 40003c18 40003b30: 91 3a 20 18 sra %o0, 0x18, %o0 40003b34: aa 10 20 10 mov 0x10, %l5 40003b38: 82 10 20 00 clr %g1 40003b3c: 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), 40003b40: e2 06 40 00 ld [ %i1 ], %l1 { long unsigned int n; int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { 40003b44: 80 a0 60 01 cmp %g1, 1 40003b48: 12 80 00 0d bne 40003b7c 40003b4c: b2 10 00 02 mov %g2, %i1 40003b50: 80 a4 60 00 cmp %l1, 0 40003b54: 36 80 00 12 bge,a 40003b9c 40003b58: a4 10 20 00 clr %l2 BSP_output_char('-'); 40003b5c: c2 05 80 00 ld [ %l6 ], %g1 <== NOT EXECUTED 40003b60: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003b64: 90 10 20 2d mov 0x2d, %o0 <== NOT EXECUTED num = -num; if (maxwidth) maxwidth--; 40003b68: 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; 40003b6c: a2 20 00 11 neg %l1 <== NOT EXECUTED if (maxwidth) maxwidth--; 40003b70: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 40003b74: 82 40 20 00 addx %g0, 0, %g1 <== NOT EXECUTED 40003b78: a8 25 00 01 sub %l4, %g1, %l4 <== NOT EXECUTED 40003b7c: 10 80 00 08 b 40003b9c 40003b80: a4 10 20 00 clr %l2 } count = 0; while ((n = num / base) > 0) { toPrint[count++] = (num - (n*base)); 40003b84: 40 00 43 e7 call 40014b20 <.umul> 40003b88: 92 10 00 15 mov %l5, %o1 40003b8c: 90 24 40 08 sub %l1, %o0, %o0 40003b90: a2 10 00 10 mov %l0, %l1 40003b94: d0 2f 00 12 stb %o0, [ %i4 + %l2 ] 40003b98: a4 10 00 13 mov %l3, %l2 num = -num; if (maxwidth) maxwidth--; } count = 0; while ((n = num / base) > 0) { 40003b9c: 90 10 00 11 mov %l1, %o0 40003ba0: 92 10 00 15 mov %l5, %o1 40003ba4: 40 00 44 19 call 40014c08 <.udiv> 40003ba8: a6 04 a0 01 add %l2, 1, %l3 40003bac: a0 92 20 00 orcc %o0, 0, %l0 40003bb0: 32 bf ff f5 bne,a 40003b84 40003bb4: 90 10 00 10 mov %l0, %o0 toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; 40003bb8: 82 07 40 12 add %i5, %l2, %g1 for (n=maxwidth ; n > count; n-- ) 40003bbc: a0 10 00 14 mov %l4, %l0 count = 0; while ((n = num / base) > 0) { toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; 40003bc0: e2 28 7f e8 stb %l1, [ %g1 + -24 ] for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); 40003bc4: 10 80 00 05 b 40003bd8 40003bc8: a2 10 00 17 mov %l7, %l1 toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) 40003bcc: a0 04 3f ff add %l0, -1, %l0 BSP_output_char(lead); 40003bd0: 9f c0 40 00 call %g1 40003bd4: 90 10 00 11 mov %l1, %o0 toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) 40003bd8: 80 a4 00 13 cmp %l0, %l3 40003bdc: 38 bf ff fc bgu,a 40003bcc 40003be0: c2 05 80 00 ld [ %l6 ], %g1 40003be4: 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)])]); 40003be8: 10 80 00 07 b 40003c04 40003bec: a2 07 40 13 add %i5, %l3, %l1 40003bf0: c2 48 7f e7 ldsb [ %g1 + -25 ], %g1 40003bf4: c4 05 80 00 ld [ %l6 ], %g2 40003bf8: d0 4e c0 01 ldsb [ %i3 + %g1 ], %o0 40003bfc: 9f c0 80 00 call %g2 40003c00: 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++) { 40003c04: 80 a4 00 13 cmp %l0, %l3 40003c08: 0a bf ff fa bcs 40003bf0 40003c0c: 82 24 40 10 sub %l1, %l0, %g1 ) { char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 40003c10: 10 80 00 04 b 40003c20 40003c14: 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); 40003c18: 9f c0 40 00 call %g1 40003c1c: b0 06 20 01 inc %i0 ) { char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 40003c20: d0 4e 00 00 ldsb [ %i0 ], %o0 40003c24: 80 a2 20 00 cmp %o0, 0 40003c28: 12 bf ff 38 bne 40003908 40003c2c: 80 a2 20 25 cmp %o0, 0x25 base, sign, width, lead); } else { BSP_output_char(*fmt); } } } 40003c30: 81 c7 e0 08 ret 40003c34: 81 e8 00 00 restore 40017400 : ssize_t write( int fd, const void *buffer, size_t count ) { 40017400: 9d e3 bf 98 save %sp, -104, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40017404: 03 10 00 63 sethi %hi(0x40018c00), %g1 40017408: c2 00 62 18 ld [ %g1 + 0x218 ], %g1 ! 40018e18 ssize_t write( int fd, const void *buffer, size_t count ) { 4001740c: 92 10 00 19 mov %i1, %o1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40017410: 80 a6 00 01 cmp %i0, %g1 40017414: 1a 80 00 0e bcc 4001744c 40017418: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 4001741c: 03 10 00 66 sethi %hi(0x40019800), %g1 40017420: c6 00 63 8c ld [ %g1 + 0x38c ], %g3 ! 40019b8c 40017424: 85 2e 20 02 sll %i0, 2, %g2 40017428: 83 2e 20 04 sll %i0, 4, %g1 4001742c: 82 20 40 02 sub %g1, %g2, %g1 40017430: 82 00 40 18 add %g1, %i0, %g1 40017434: 83 28 60 02 sll %g1, 2, %g1 40017438: b0 00 c0 01 add %g3, %g1, %i0 rtems_libio_check_is_open( iop ); 4001743c: c2 06 20 0c ld [ %i0 + 0xc ], %g1 40017440: 80 88 61 00 btst 0x100, %g1 40017444: 12 80 00 06 bne 4001745c 40017448: 80 a6 60 00 cmp %i1, 0 4001744c: 7f ff da 1f call 4000dcc8 <__errno> <== NOT EXECUTED 40017450: 01 00 00 00 nop <== NOT EXECUTED 40017454: 10 80 00 15 b 400174a8 <== NOT EXECUTED 40017458: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 4001745c: 02 80 00 08 be 4001747c 40017460: 01 00 00 00 nop rtems_libio_check_count( count ); 40017464: 80 a6 a0 00 cmp %i2, 0 40017468: 02 80 00 1b be 400174d4 4001746c: 90 10 20 00 clr %o0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 40017470: 80 88 60 04 btst 4, %g1 40017474: 32 80 00 06 bne,a 4001748c 40017478: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 4001747c: 7f ff da 13 call 4000dcc8 <__errno> <== NOT EXECUTED 40017480: 01 00 00 00 nop <== NOT EXECUTED 40017484: 10 80 00 09 b 400174a8 <== NOT EXECUTED 40017488: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 4001748c: c2 00 60 0c ld [ %g1 + 0xc ], %g1 40017490: 80 a0 60 00 cmp %g1, 0 40017494: 12 80 00 08 bne 400174b4 40017498: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001749c: 7f ff da 0b call 4000dcc8 <__errno> <== NOT EXECUTED 400174a0: 01 00 00 00 nop <== NOT EXECUTED 400174a4: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 400174a8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400174ac: 10 80 00 0a b 400174d4 <== NOT EXECUTED 400174b0: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rc = (*iop->handlers->write_h)( iop, buffer, count ); 400174b4: 9f c0 40 00 call %g1 400174b8: 90 10 00 18 mov %i0, %o0 if ( rc > 0 ) 400174bc: 80 a2 20 00 cmp %o0, 0 400174c0: 04 80 00 05 ble 400174d4 400174c4: 01 00 00 00 nop iop->offset += rc; 400174c8: c2 06 20 08 ld [ %i0 + 8 ], %g1 400174cc: 82 00 40 08 add %g1, %o0, %g1 400174d0: c2 26 20 08 st %g1, [ %i0 + 8 ] return rc; } 400174d4: 81 c7 e0 08 ret 400174d8: 91 e8 00 08 restore %g0, %o0, %o0