0201cb58 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 201cb58: 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(); 201cb5c: 40 00 06 fa call 201e744 201cb60: e0 06 00 00 ld [ %i0 ], %l0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 201cb64: c2 14 20 38 lduh [ %l0 + 0x38 ], %g1 201cb68: 91 2a 20 10 sll %o0, 0x10, %o0 201cb6c: 91 32 20 10 srl %o0, 0x10, %o0 201cb70: 80 a2 00 01 cmp %o0, %g1 201cb74: 02 80 00 0a be 201cb9c 201cb78: 80 a2 20 00 cmp %o0, 0 201cb7c: 22 80 00 09 be,a 201cba0 <== NOT EXECUTED 201cb80: f2 34 20 38 sth %i1, [ %l0 + 0x38 ] <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 201cb84: 40 00 44 f3 call 202df50 <__errno> <== NOT EXECUTED 201cb88: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201cb8c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 201cb90: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 201cb94: 81 c7 e0 08 ret <== NOT EXECUTED 201cb98: 81 e8 00 00 restore <== NOT EXECUTED #endif jnode->st_uid = owner; 201cb9c: f2 34 20 38 sth %i1, [ %l0 + 0x38 ] jnode->st_gid = group; 201cba0: f4 34 20 3a sth %i2, [ %l0 + 0x3a ] IMFS_update_ctime( jnode ); 201cba4: 90 07 bf f0 add %fp, -16, %o0 201cba8: 7f ff 9e 6c call 2004558 201cbac: 92 10 20 00 clr %o1 201cbb0: c2 07 bf f0 ld [ %fp + -16 ], %g1 201cbb4: c2 24 20 44 st %g1, [ %l0 + 0x44 ] return 0; } 201cbb8: 81 c7 e0 08 ret 201cbbc: 91 e8 20 00 restore %g0, 0, %o0 0200c390 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 200c390: 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 ) 200c394: a2 96 20 00 orcc %i0, 0, %l1 200c398: 02 80 00 03 be 200c3a4 200c39c: a0 10 20 00 clr %l0 parent = parent_loc->node_access; 200c3a0: e0 04 40 00 ld [ %l1 ], %l0 /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 200c3a4: 90 10 20 01 mov 1, %o0 200c3a8: 7f ff f7 2f call 200a064 200c3ac: 92 10 20 5c mov 0x5c, %o1 if ( !node ) 200c3b0: b0 92 20 00 orcc %o0, 0, %i0 200c3b4: 02 80 00 4a be 200c4dc 200c3b8: 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 ); 200c3bc: 92 10 00 1a mov %i2, %o1 200c3c0: 94 10 20 20 mov 0x20, %o2 /* * Fill in the basic information */ node->st_nlink = 1; node->type = type; 200c3c4: f2 26 20 48 st %i1, [ %i0 + 0x48 ] /* * Fill in the basic information */ node->st_nlink = 1; 200c3c8: c2 36 20 30 sth %g1, [ %i0 + 0x30 ] node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 200c3cc: 40 00 08 42 call 200e4d4 200c3d0: 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; 200c3d4: 03 00 80 5b sethi %hi(0x2016c00), %g1 200c3d8: c2 00 61 34 ld [ %g1 + 0x134 ], %g1 ! 2016d34 /* * Set the type specific information */ switch (type) { 200c3dc: 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; 200c3e0: c2 10 60 24 lduh [ %g1 + 0x24 ], %g1 200c3e4: 82 2e c0 01 andn %i3, %g1, %g1 #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); 200c3e8: 7f ff f7 d4 call 200a338 200c3ec: c2 36 20 2e sth %g1, [ %i0 + 0x2e ] node->st_gid = getegid(); 200c3f0: 7f ff f7 ce call 200a328 200c3f4: d0 36 20 38 sth %o0, [ %i0 + 0x38 ] /* * Now set all the times. */ gettimeofday( &tv, 0 ); 200c3f8: 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(); 200c3fc: d0 36 20 3a sth %o0, [ %i0 + 0x3a ] /* * Now set all the times. */ gettimeofday( &tv, 0 ); 200c400: 7f ff f7 d2 call 200a348 200c404: 90 07 bf f0 add %fp, -16, %o0 node->stat_atime = (time_t) tv.tv_sec; 200c408: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* * Set the type specific information */ switch (type) { 200c40c: 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; 200c410: c2 26 20 44 st %g1, [ %i0 + 0x44 ] * Now set all the times. */ gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; 200c414: c2 26 20 3c st %g1, [ %i0 + 0x3c ] /* * Set the type specific information */ switch (type) { 200c418: 18 80 00 1d bgu 200c48c 200c41c: c2 26 20 40 st %g1, [ %i0 + 0x40 ] 200c420: 83 2e 60 02 sll %i1, 2, %g1 200c424: 05 00 80 30 sethi %hi(0x200c000), %g2 200c428: 84 10 a3 78 or %g2, 0x378, %g2 ! 200c378 200c42c: c2 00 80 01 ld [ %g2 + %g1 ], %g1 200c430: 81 c0 40 00 jmp %g1 200c434: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 200c438: 82 06 20 50 add %i0, 0x50, %g1 the_chain->permanent_null = NULL; 200c43c: 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); 200c440: c2 26 20 4c st %g1, [ %i0 + 0x4c ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 200c444: 82 06 20 4c add %i0, 0x4c, %g1 200c448: 10 80 00 19 b 200c4ac 200c44c: 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; 200c450: c2 07 00 00 ld [ %i4 ], %g1 200c454: 10 80 00 16 b 200c4ac 200c458: 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; 200c45c: 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; 200c460: c4 07 00 00 ld [ %i4 ], %g2 node->info.device.minor = info->device.minor; 200c464: 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; 200c468: 10 80 00 11 b 200c4ac 200c46c: 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; 200c470: c0 26 20 4c clr [ %i0 + 0x4c ] <== NOT EXECUTED node->info.linearfile.direct = 0; 200c474: c0 26 20 50 clr [ %i0 + 0x50 ] <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; 200c478: c0 26 20 4c clr [ %i0 + 0x4c ] node->info.file.indirect = 0; 200c47c: c0 26 20 50 clr [ %i0 + 0x50 ] node->info.file.doubly_indirect = 0; 200c480: c0 26 20 54 clr [ %i0 + 0x54 ] node->info.file.triply_indirect = 0; 200c484: 10 80 00 0a b 200c4ac 200c488: c0 26 20 58 clr [ %i0 + 0x58 ] break; default: assert(0); 200c48c: 11 00 80 58 sethi %hi(0x2016000), %o0 <== NOT EXECUTED 200c490: 15 00 80 58 sethi %hi(0x2016000), %o2 <== NOT EXECUTED 200c494: 17 00 80 58 sethi %hi(0x2016000), %o3 <== NOT EXECUTED 200c498: 90 12 20 c0 or %o0, 0xc0, %o0 <== NOT EXECUTED 200c49c: 94 12 a1 18 or %o2, 0x118, %o2 <== NOT EXECUTED 200c4a0: 96 12 e1 10 or %o3, 0x110, %o3 <== NOT EXECUTED 200c4a4: 7f ff d6 7e call 2001e9c <__assert_func> <== NOT EXECUTED 200c4a8: 92 10 20 74 mov 0x74, %o1 <== NOT EXECUTED /* * If this node has a parent, then put it in that directory list. */ if ( parent ) { 200c4ac: 80 a4 20 00 cmp %l0, 0 200c4b0: 02 80 00 0b be 200c4dc 200c4b4: 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 ); 200c4b8: 7f ff e6 a5 call 2005f4c <_Chain_Append> 200c4bc: 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; 200c4c0: 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; 200c4c4: e0 26 20 08 st %l0, [ %i0 + 8 ] fs_info = parent_loc->mt_entry->fs_info; 200c4c8: c4 00 60 2c ld [ %g1 + 0x2c ], %g2 node->st_ino = ++fs_info->ino_count; 200c4cc: c2 00 80 00 ld [ %g2 ], %g1 200c4d0: 82 00 60 01 inc %g1 200c4d4: c2 20 80 00 st %g1, [ %g2 ] 200c4d8: c2 26 20 34 st %g1, [ %i0 + 0x34 ] } return node; } 200c4dc: 81 c7 e0 08 ret 200c4e0: 81 e8 00 00 restore 02003a94 : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 2003a94: 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 ); 2003a98: 80 a6 20 00 cmp %i0, 0 2003a9c: 12 80 00 0a bne 2003ac4 2003aa0: 80 a6 60 00 cmp %i1, 0 2003aa4: 11 00 80 72 sethi %hi(0x201c800), %o0 <== NOT EXECUTED 2003aa8: 15 00 80 72 sethi %hi(0x201c800), %o2 <== NOT EXECUTED 2003aac: 17 00 80 72 sethi %hi(0x201c800), %o3 <== NOT EXECUTED 2003ab0: 90 12 21 28 or %o0, 0x128, %o0 <== NOT EXECUTED 2003ab4: 94 12 a2 e8 or %o2, 0x2e8, %o2 <== NOT EXECUTED 2003ab8: 96 12 e1 f0 or %o3, 0x1f0, %o3 <== NOT EXECUTED 2003abc: 10 80 00 0b b 2003ae8 <== NOT EXECUTED 2003ac0: 92 10 20 7f mov 0x7f, %o1 <== NOT EXECUTED assert( level >= 0 ); 2003ac4: 36 80 00 0b bge,a 2003af0 2003ac8: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 2003acc: 11 00 80 72 sethi %hi(0x201c800), %o0 <== NOT EXECUTED 2003ad0: 15 00 80 72 sethi %hi(0x201c800), %o2 <== NOT EXECUTED 2003ad4: 17 00 80 72 sethi %hi(0x201c800), %o3 <== NOT EXECUTED 2003ad8: 90 12 21 28 or %o0, 0x128, %o0 <== NOT EXECUTED 2003adc: 94 12 a2 e8 or %o2, 0x2e8, %o2 <== NOT EXECUTED 2003ae0: 96 12 e2 00 or %o3, 0x200, %o3 <== NOT EXECUTED 2003ae4: 92 10 20 81 mov 0x81, %o1 <== NOT EXECUTED 2003ae8: 40 00 01 c3 call 20041f4 <__assert_func> <== NOT EXECUTED 2003aec: 01 00 00 00 nop <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); 2003af0: 80 a0 60 01 cmp %g1, 1 2003af4: 22 80 00 0a be,a 2003b1c 2003af8: 03 00 80 7a sethi %hi(0x201e800), %g1 2003afc: 11 00 80 72 sethi %hi(0x201c800), %o0 <== NOT EXECUTED 2003b00: 15 00 80 72 sethi %hi(0x201c800), %o2 <== NOT EXECUTED 2003b04: 17 00 80 72 sethi %hi(0x201c800), %o3 <== NOT EXECUTED 2003b08: 90 12 21 28 or %o0, 0x128, %o0 <== NOT EXECUTED 2003b0c: 94 12 a2 e8 or %o2, 0x2e8, %o2 <== NOT EXECUTED 2003b10: 96 12 e2 10 or %o3, 0x210, %o3 <== NOT EXECUTED 2003b14: 10 bf ff f5 b 2003ae8 <== NOT EXECUTED 2003b18: 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; 2003b1c: 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, "...." ); 2003b20: a8 10 63 78 or %g1, 0x378, %l4 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 2003b24: 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, "...." ); 2003b28: 03 00 80 72 sethi %hi(0x201c800), %g1 IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 2003b2c: 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, "...." ); 2003b30: 10 80 00 14 b 2003b80 2003b34: a6 10 62 38 or %g1, 0x238, %l3 2003b38: c2 05 00 00 ld [ %l4 ], %g1 2003b3c: 90 10 00 13 mov %l3, %o0 2003b40: d2 00 60 08 ld [ %g1 + 8 ], %o1 2003b44: 40 00 37 a9 call 20119e8 2003b48: 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++ ) 2003b4c: 80 a4 00 19 cmp %l0, %i1 2003b50: 24 bf ff fb ble,a 2003b3c 2003b54: c2 05 00 00 ld [ %l4 ], %g1 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 2003b58: 7f ff ff 78 call 2003938 2003b5c: 90 10 00 18 mov %i0, %o0 if ( the_jnode->type == IMFS_DIRECTORY ) 2003b60: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 2003b64: 80 a0 60 01 cmp %g1, 1 2003b68: 32 80 00 06 bne,a 2003b80 2003b6c: f0 06 00 00 ld [ %i0 ], %i0 IMFS_dump_directory( the_jnode, level + 1 ); 2003b70: 90 10 00 18 mov %i0, %o0 2003b74: 7f ff ff c8 call 2003a94 2003b78: 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 ) { 2003b7c: 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 ); 2003b80: 80 a6 00 12 cmp %i0, %l2 2003b84: 12 bf ff ed bne 2003b38 2003b88: 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 ); } } 2003b8c: 81 c7 e0 08 ret 2003b90: 81 e8 00 00 restore 020094b4 : int IMFS_eval_path( const char *pathname, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 20094b4: 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 ) 20094b8: 03 00 80 5b sethi %hi(0x2016c00), %g1 int IMFS_eval_path( const char *pathname, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 20094bc: 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 ) 20094c0: ae 10 61 34 or %g1, 0x134, %l7 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 20094c4: e0 06 80 00 ld [ %i2 ], %l0 20094c8: a6 10 20 00 clr %l3 20094cc: 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 ); 20094d0: aa 07 bf c0 add %fp, -64, %l5 20094d4: 10 80 00 6a b 200967c 20094d8: ac 07 bf f4 add %fp, -12, %l6 20094dc: 90 05 00 13 add %l4, %l3, %o0 20094e0: 92 10 00 15 mov %l5, %o1 20094e4: 40 00 01 a0 call 2009b64 20094e8: 94 10 00 16 mov %l6, %o2 i += len; if ( !pathloc->node_access ) 20094ec: 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 ); 20094f0: a2 10 00 08 mov %o0, %l1 i += len; if ( !pathloc->node_access ) 20094f4: 80 a0 60 00 cmp %g1, 0 20094f8: 02 80 00 59 be 200965c 20094fc: 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 ) 2009500: 80 a2 20 00 cmp %o0, 0 2009504: 22 80 00 12 be,a 200954c 2009508: a6 04 c0 12 add %l3, %l2, %l3 if ( node->type == IMFS_DIRECTORY ) 200950c: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 2009510: 80 a0 60 01 cmp %g1, 1 2009514: 32 80 00 0e bne,a 200954c 2009518: a6 04 c0 12 add %l3, %l2, %l3 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 200951c: 90 10 00 1a mov %i2, %o0 2009520: 7f ff ff 83 call 200932c 2009524: 92 10 20 01 mov 1, %o1 2009528: 80 a2 20 00 cmp %o0, 0 200952c: 32 80 00 08 bne,a 200954c 2009530: a6 04 c0 12 add %l3, %l2, %l3 rtems_set_errno_and_return_minus_one( EACCES ); 2009534: 40 00 0e a6 call 200cfcc <__errno> 2009538: b0 10 3f ff mov -1, %i0 200953c: 82 10 20 0d mov 0xd, %g1 2009540: c2 22 00 00 st %g1, [ %o0 ] 2009544: 81 c7 e0 08 ret 2009548: 81 e8 00 00 restore node = pathloc->node_access; switch( type ) { 200954c: 80 a4 60 03 cmp %l1, 3 2009550: 02 80 00 1b be 20095bc 2009554: e0 06 80 00 ld [ %i2 ], %l0 2009558: 80 a4 60 04 cmp %l1, 4 200955c: 02 80 00 44 be 200966c 2009560: 80 a4 60 02 cmp %l1, 2 2009564: 12 80 00 47 bne 2009680 2009568: 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 ) 200956c: c2 05 c0 00 ld [ %l7 ], %g1 2009570: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 2009574: 80 a4 00 01 cmp %l0, %g1 2009578: 02 bf ff da be 20094e0 200957c: 90 05 00 13 add %l4, %l3, %o0 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 2009580: d2 06 a0 0c ld [ %i2 + 0xc ], %o1 2009584: c2 02 60 18 ld [ %o1 + 0x18 ], %g1 2009588: 80 a4 00 01 cmp %l0, %g1 200958c: 32 80 00 04 bne,a 200959c 2009590: 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; 2009594: 10 80 00 48 b 20096b4 2009598: 92 02 60 08 add %o1, 8, %o1 *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),flags,pathloc); } } else { if ( !node->Parent ) 200959c: 80 a4 20 00 cmp %l0, 0 20095a0: 32 bf ff cf bne,a 20094dc 20095a4: e0 26 80 00 st %l0, [ %i2 ] rtems_set_errno_and_return_minus_one( ENOENT ); 20095a8: 40 00 0e 89 call 200cfcc <__errno> 20095ac: b0 10 3f ff mov -1, %i0 20095b0: e2 22 00 00 st %l1, [ %o0 ] 20095b4: 81 c7 e0 08 ret 20095b8: 81 e8 00 00 restore case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 20095bc: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 20095c0: 80 a0 60 03 cmp %g1, 3 20095c4: 12 80 00 0a bne 20095ec 20095c8: 80 a0 60 04 cmp %g1, 4 IMFS_evaluate_hard_link( pathloc, 0 ); 20095cc: 90 10 00 1a mov %i2, %o0 20095d0: 7f ff ff 6f call 200938c 20095d4: 92 10 20 00 clr %o1 node = pathloc->node_access; 20095d8: e0 06 80 00 ld [ %i2 ], %l0 if ( !node ) 20095dc: 80 a4 20 00 cmp %l0, 0 20095e0: 32 80 00 0e bne,a 2009618 20095e4: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 20095e8: 30 80 00 0f b,a 2009624 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 20095ec: 32 80 00 0b bne,a 2009618 20095f0: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 result = IMFS_evaluate_sym_link( pathloc, 0 ); 20095f4: 90 10 00 1a mov %i2, %o0 20095f8: 7f ff ff 7d call 20093ec 20095fc: 92 10 20 00 clr %o1 2009600: b0 10 00 08 mov %o0, %i0 node = pathloc->node_access; if ( result == -1 ) 2009604: 80 a2 3f ff cmp %o0, -1 2009608: 02 bf ff cf be 2009544 200960c: 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; 2009610: a0 10 00 08 mov %o0, %l0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 2009614: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 2009618: 80 a0 60 01 cmp %g1, 1 200961c: 22 80 00 06 be,a 2009634 2009620: d2 04 20 58 ld [ %l0 + 0x58 ], %o1 rtems_set_errno_and_return_minus_one( ENOTDIR ); 2009624: 40 00 0e 6a call 200cfcc <__errno> 2009628: b0 10 3f ff mov -1, %i0 200962c: 10 bf ff c5 b 2009540 2009630: 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 ) { 2009634: 80 a2 60 00 cmp %o1, 0 2009638: 02 80 00 04 be 2009648 200963c: 90 10 00 10 mov %l0, %o0 newloc = node->info.directory.mt_fs->mt_fs_root; 2009640: 10 80 00 1d b 20096b4 2009644: 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 ); 2009648: 40 00 01 1c call 2009ab8 200964c: 92 10 00 15 mov %l5, %o1 if ( !node ) 2009650: a0 92 20 00 orcc %o0, 0, %l0 2009654: 32 bf ff a2 bne,a 20094dc 2009658: e0 26 80 00 st %l0, [ %i2 ] rtems_set_errno_and_return_minus_one( ENOENT ); 200965c: 40 00 0e 5c call 200cfcc <__errno> 2009660: b0 10 3f ff mov -1, %i0 2009664: 10 bf ff b7 b 2009540 2009668: 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 ); 200966c: 40 00 0e 58 call 200cfcc <__errno> 2009670: b0 10 3f ff mov -1, %i0 2009674: 10 bf ff b3 b 2009540 2009678: 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) ) { 200967c: 80 a4 60 00 cmp %l1, 0 2009680: 22 80 00 06 be,a 2009698 2009684: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 2009688: 80 a4 60 04 cmp %l1, 4 200968c: 12 bf ff 95 bne 20094e0 2009690: 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 ) { 2009694: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 <== NOT EXECUTED 2009698: 80 a0 60 01 cmp %g1, 1 200969c: 12 80 00 18 bne 20096fc 20096a0: 01 00 00 00 nop if ( node->info.directory.mt_fs != NULL ) { 20096a4: d0 04 20 58 ld [ %l0 + 0x58 ], %o0 20096a8: 80 a2 20 00 cmp %o0, 0 20096ac: 02 80 00 14 be 20096fc 20096b0: 92 02 20 18 add %o0, 0x18, %o1 newloc = node->info.directory.mt_fs->mt_fs_root; 20096b4: a0 07 bf e4 add %fp, -28, %l0 20096b8: 94 10 20 10 mov 0x10, %o2 20096bc: 40 00 10 36 call 200d794 20096c0: 90 10 00 10 mov %l0, %o0 *pathloc = newloc; 20096c4: 92 10 00 10 mov %l0, %o1 20096c8: 94 10 20 10 mov 0x10, %o2 20096cc: 40 00 10 32 call 200d794 20096d0: 90 10 00 1a mov %i2, %o0 return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 20096d4: c2 06 a0 08 ld [ %i2 + 8 ], %g1 20096d8: d0 07 bf f4 ld [ %fp + -12 ], %o0 20096dc: c2 00 40 00 ld [ %g1 ], %g1 20096e0: 90 24 c0 08 sub %l3, %o0, %o0 20096e4: 92 10 00 19 mov %i1, %o1 20096e8: 90 05 00 08 add %l4, %o0, %o0 20096ec: 9f c0 40 00 call %g1 20096f0: 94 10 00 1a mov %i2, %o2 20096f4: 81 c7 e0 08 ret 20096f8: 91 e8 00 08 restore %g0, %o0, %o0 } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 20096fc: 7f ff fe f3 call 20092c8 2009700: 90 10 00 1a mov %i2, %o0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 2009704: 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 ); 2009708: b0 10 00 08 mov %o0, %i0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 200970c: 7f ff ff 08 call 200932c 2009710: 90 10 00 1a mov %i2, %o0 2009714: 80 a2 20 00 cmp %o0, 0 2009718: 12 80 00 06 bne 2009730 200971c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 2009720: 40 00 0e 2b call 200cfcc <__errno> 2009724: b0 10 3f ff mov -1, %i0 ! ffffffff 2009728: 82 10 20 0d mov 0xd, %g1 200972c: c2 22 00 00 st %g1, [ %o0 ] return result; } 2009730: 81 c7 e0 08 ret 2009734: 81 e8 00 00 restore 020097f0 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 20097f0: 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; 20097f4: 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 ) 20097f8: 03 00 80 5b sethi %hi(0x2016c00), %g1 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 20097fc: 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 ) 2009800: ae 10 61 34 or %g1, 0x134, %l7 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 2009804: 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 ); 2009808: aa 07 bf c0 add %fp, -64, %l5 200980c: ac 07 bf f4 add %fp, -12, %l6 2009810: 90 05 00 12 add %l4, %l2, %o0 2009814: 92 10 00 15 mov %l5, %o1 2009818: 40 00 00 d3 call 2009b64 200981c: 94 10 00 16 mov %l6, %o2 i += len; if ( !pathloc->node_access ) 2009820: 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 ); 2009824: a2 10 00 08 mov %o0, %l1 i += len; if ( !pathloc->node_access ) 2009828: 80 a0 60 00 cmp %g1, 0 200982c: 02 80 00 82 be 2009a34 2009830: e6 07 bf f4 ld [ %fp + -12 ], %l3 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 2009834: 80 a2 20 00 cmp %o0, 0 2009838: 22 80 00 10 be,a 2009878 200983c: a4 04 80 13 add %l2, %l3, %l2 if ( node->type == IMFS_DIRECTORY ) 2009840: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 2009844: 80 a0 60 01 cmp %g1, 1 2009848: 32 80 00 0c bne,a 2009878 200984c: a4 04 80 13 add %l2, %l3, %l2 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 2009850: 90 10 00 19 mov %i1, %o0 2009854: 7f ff fe b6 call 200932c 2009858: 92 10 20 01 mov 1, %o1 200985c: 80 a2 20 00 cmp %o0, 0 2009860: 32 80 00 06 bne,a 2009878 2009864: a4 04 80 13 add %l2, %l3, %l2 rtems_set_errno_and_return_minus_one( EACCES ); 2009868: 40 00 0d d9 call 200cfcc <__errno> 200986c: b0 10 3f ff mov -1, %i0 2009870: 10 80 00 83 b 2009a7c 2009874: 82 10 20 0d mov 0xd, %g1 node = pathloc->node_access; switch( type ) { 2009878: 80 a4 60 02 cmp %l1, 2 200987c: 02 80 00 0f be 20098b8 2009880: e0 06 40 00 ld [ %i1 ], %l0 2009884: 80 a4 60 02 cmp %l1, 2 2009888: 18 80 00 07 bgu 20098a4 200988c: 80 a4 60 03 cmp %l1, 3 2009890: 80 a4 60 00 cmp %l1, 0 2009894: 02 80 00 56 be 20099ec 2009898: 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 ); 200989c: 10 bf ff de b 2009814 20098a0: 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 ) { 20098a4: 02 80 00 19 be 2009908 20098a8: 80 a4 60 04 cmp %l1, 4 20098ac: 32 bf ff da bne,a 2009814 20098b0: 90 05 00 12 add %l4, %l2, %o0 <== NOT EXECUTED 20098b4: 30 80 00 52 b,a 20099fc case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 20098b8: c2 05 c0 00 ld [ %l7 ], %g1 20098bc: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 20098c0: 80 a4 00 01 cmp %l0, %g1 20098c4: 02 bf ff d4 be 2009814 20098c8: 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){ 20098cc: d2 06 60 0c ld [ %i1 + 0xc ], %o1 20098d0: c2 02 60 18 ld [ %o1 + 0x18 ], %g1 20098d4: 80 a4 00 01 cmp %l0, %g1 20098d8: 32 80 00 04 bne,a 20098e8 20098dc: 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; 20098e0: 10 80 00 2a b 2009988 20098e4: 92 02 60 08 add %o1, 8, %o1 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 20098e8: 80 a4 20 00 cmp %l0, 0 20098ec: 32 bf ff c9 bne,a 2009810 20098f0: e0 26 40 00 st %l0, [ %i1 ] rtems_set_errno_and_return_minus_one( ENOENT ); 20098f4: 40 00 0d b6 call 200cfcc <__errno> 20098f8: b0 10 3f ff mov -1, %i0 20098fc: e2 22 00 00 st %l1, [ %o0 ] 2009900: 81 c7 e0 08 ret 2009904: 81 e8 00 00 restore pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 2009908: d0 04 20 48 ld [ %l0 + 0x48 ], %o0 200990c: 80 a2 20 03 cmp %o0, 3 2009910: 12 80 00 0a bne 2009938 2009914: 80 a2 20 04 cmp %o0, 4 result = IMFS_evaluate_link( pathloc, 0 ); 2009918: 90 10 00 19 mov %i1, %o0 200991c: 7f ff ff 87 call 2009738 2009920: 92 10 20 00 clr %o1 if ( result == -1 ) 2009924: 80 a2 3f ff cmp %o0, -1 2009928: 12 80 00 0c bne 2009958 200992c: b0 10 00 08 mov %o0, %i0 2009930: 81 c7 e0 08 ret <== NOT EXECUTED 2009934: 81 e8 00 00 restore <== NOT EXECUTED return -1; } else if ( node->type == IMFS_SYM_LINK ) { 2009938: 32 80 00 09 bne,a 200995c 200993c: d0 06 40 00 ld [ %i1 ], %o0 result = IMFS_evaluate_link( pathloc, 0 ); 2009940: 90 10 00 19 mov %i1, %o0 2009944: 7f ff ff 7d call 2009738 2009948: 92 10 20 00 clr %o1 if ( result == -1 ) 200994c: 80 a2 3f ff cmp %o0, -1 2009950: 02 bf ff ec be 2009900 2009954: b0 10 00 08 mov %o0, %i0 return -1; } node = pathloc->node_access; 2009958: d0 06 40 00 ld [ %i1 ], %o0 if ( !node ) 200995c: 80 a2 20 00 cmp %o0, 0 2009960: 02 80 00 44 be 2009a70 2009964: 01 00 00 00 nop /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 2009968: c2 02 20 48 ld [ %o0 + 0x48 ], %g1 200996c: 80 a0 60 01 cmp %g1, 1 2009970: 12 80 00 40 bne 2009a70 2009974: 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 ) { 2009978: d2 02 20 58 ld [ %o0 + 0x58 ], %o1 200997c: 80 a2 60 00 cmp %o1, 0 2009980: 02 80 00 14 be 20099d0 2009984: 92 02 60 18 add %o1, 0x18, %o1 newloc = node->info.directory.mt_fs->mt_fs_root; 2009988: a0 07 bf e4 add %fp, -28, %l0 200998c: 94 10 20 10 mov 0x10, %o2 2009990: 40 00 0f 81 call 200d794 2009994: 90 10 00 10 mov %l0, %o0 *pathloc = newloc; 2009998: 92 10 00 10 mov %l0, %o1 200999c: 94 10 20 10 mov 0x10, %o2 20099a0: 40 00 0f 7d call 200d794 20099a4: 90 10 00 19 mov %i1, %o0 return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 20099a8: c2 06 60 08 ld [ %i1 + 8 ], %g1 20099ac: d0 07 bf f4 ld [ %fp + -12 ], %o0 20099b0: c2 00 60 04 ld [ %g1 + 4 ], %g1 20099b4: 90 24 80 08 sub %l2, %o0, %o0 20099b8: 92 10 00 19 mov %i1, %o1 20099bc: 90 05 00 08 add %l4, %o0, %o0 20099c0: 9f c0 40 00 call %g1 20099c4: 94 10 00 1a mov %i2, %o2 20099c8: 81 c7 e0 08 ret 20099cc: 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 ); 20099d0: 40 00 00 3a call 2009ab8 20099d4: 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 ) 20099d8: a0 92 20 00 orcc %o0, 0, %l0 20099dc: 02 80 00 0c be 2009a0c 20099e0: c2 07 bf f4 ld [ %fp + -12 ], %g1 done = true; else pathloc->node_access = node; 20099e4: 10 bf ff 8b b 2009810 20099e8: e0 26 40 00 st %l0, [ %i1 ] break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 20099ec: 40 00 0d 78 call 200cfcc <__errno> 20099f0: b0 10 3f ff mov -1, %i0 20099f4: 10 80 00 22 b 2009a7c 20099f8: 82 10 20 11 mov 0x11, %g1 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 20099fc: 40 00 0d 74 call 200cfcc <__errno> 2009a00: b0 10 3f ff mov -1, %i0 2009a04: 10 80 00 1e b 2009a7c 2009a08: 82 10 20 5b mov 0x5b, %g1 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 2009a0c: 84 05 00 12 add %l4, %l2, %g2 2009a10: 82 24 80 01 sub %l2, %g1, %g1 2009a14: 82 05 00 01 add %l4, %g1, %g1 2009a18: 10 80 00 0b b 2009a44 2009a1c: 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 ] ) ) 2009a20: 80 a0 60 2f cmp %g1, 0x2f 2009a24: 02 80 00 08 be 2009a44 2009a28: 80 a0 60 5c cmp %g1, 0x5c 2009a2c: 22 80 00 07 be,a 2009a48 2009a30: c2 48 80 00 ldsb [ %g2 ], %g1 rtems_set_errno_and_return_minus_one( ENOENT ); 2009a34: 40 00 0d 66 call 200cfcc <__errno> 2009a38: b0 10 3f ff mov -1, %i0 2009a3c: 10 80 00 10 b 2009a7c 2009a40: 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++) { 2009a44: c2 48 80 00 ldsb [ %g2 ], %g1 2009a48: 80 a0 60 00 cmp %g1, 0 2009a4c: 12 bf ff f5 bne 2009a20 2009a50: 84 00 a0 01 inc %g2 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 2009a54: 7f ff fe 1d call 20092c8 2009a58: 90 10 00 19 mov %i1, %o0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 2009a5c: c2 06 40 00 ld [ %i1 ], %g1 2009a60: c2 00 60 48 ld [ %g1 + 0x48 ], %g1 2009a64: 80 a0 60 01 cmp %g1, 1 2009a68: 02 80 00 08 be 2009a88 2009a6c: b0 10 00 08 mov %o0, %i0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 2009a70: 40 00 0d 57 call 200cfcc <__errno> 2009a74: b0 10 3f ff mov -1, %i0 2009a78: 82 10 20 14 mov 0x14, %g1 2009a7c: c2 22 00 00 st %g1, [ %o0 ] 2009a80: 81 c7 e0 08 ret 2009a84: 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 ) ) 2009a88: 90 10 00 19 mov %i1, %o0 2009a8c: 7f ff fe 28 call 200932c 2009a90: 92 10 20 03 mov 3, %o1 2009a94: 80 a2 20 00 cmp %o0, 0 2009a98: 12 80 00 06 bne 2009ab0 2009a9c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 2009aa0: 40 00 0d 4b call 200cfcc <__errno> 2009aa4: b0 10 3f ff mov -1, %i0 ! ffffffff 2009aa8: 82 10 20 0d mov 0xd, %g1 2009aac: c2 22 00 00 st %g1, [ %o0 ] return result; } 2009ab0: 81 c7 e0 08 ret 2009ab4: 81 e8 00 00 restore 0200938c : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 200938c: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *jnode = node->node_access; 2009390: c4 06 00 00 ld [ %i0 ], %g2 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 2009394: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1 2009398: 80 a0 60 03 cmp %g1, 3 200939c: 22 80 00 04 be,a 20093ac 20093a0: c2 00 a0 4c ld [ %g2 + 0x4c ], %g1 rtems_fatal_error_occurred (0xABCD0000); 20093a4: 7f ff f1 ec call 2005b54 <== NOT EXECUTED 20093a8: 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 ); 20093ac: 90 10 00 18 mov %i0, %o0 20093b0: 7f ff ff c6 call 20092c8 20093b4: c2 26 00 00 st %g1, [ %i0 ] /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 20093b8: 90 10 00 18 mov %i0, %o0 20093bc: 92 10 00 19 mov %i1, %o1 20093c0: 7f ff ff db call 200932c 20093c4: b0 10 20 00 clr %i0 20093c8: 80 a2 20 00 cmp %o0, 0 20093cc: 12 80 00 06 bne 20093e4 20093d0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 20093d4: 40 00 0e fe call 200cfcc <__errno> <== NOT EXECUTED 20093d8: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 20093dc: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 20093e0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return result; } 20093e4: 81 c7 e0 08 ret 20093e8: 81 e8 00 00 restore 0200932c : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 200932c: 9d e3 bf 98 save %sp, -104, %sp } jnode = node->node_access; #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 2009330: 40 00 04 02 call 200a338 2009334: e2 06 00 00 ld [ %i0 ], %l1 st_gid = getegid(); 2009338: 40 00 03 fc call 200a328 200933c: 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 ) 2009340: c2 14 60 38 lduh [ %l1 + 0x38 ], %g1 2009344: a1 2c 20 10 sll %l0, 0x10, %l0 2009348: a1 34 20 10 srl %l0, 0x10, %l0 200934c: 80 a4 00 01 cmp %l0, %g1 2009350: 02 80 00 09 be 2009374 2009354: b1 2e 60 06 sll %i1, 6, %i0 flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 2009358: c4 14 60 3a lduh [ %l1 + 0x3a ], %g2 200935c: 83 2a 20 10 sll %o0, 0x10, %g1 2009360: 83 30 60 10 srl %g1, 0x10, %g1 2009364: 80 a0 40 02 cmp %g1, %g2 2009368: 02 80 00 03 be 2009374 200936c: b1 2e 60 03 sll %i1, 3, %i0 2009370: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED flags_to_test <<= 3; 2009374: c2 14 60 2e lduh [ %l1 + 0x2e ], %g1 2009378: 82 2e 00 01 andn %i0, %g1, %g1 */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } 200937c: 80 a0 00 01 cmp %g0, %g1 2009380: b0 60 3f ff subx %g0, -1, %i0 2009384: 81 c7 e0 08 ret 2009388: 81 e8 00 00 restore 020093ec : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 20093ec: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *jnode = node->node_access; 20093f0: e0 06 00 00 ld [ %i0 ], %l0 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 20093f4: a2 10 00 18 mov %i0, %l1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 20093f8: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 20093fc: 80 a0 60 04 cmp %g1, 4 2009400: 12 80 00 07 bne 200941c 2009404: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 2009408: c2 04 20 08 ld [ %l0 + 8 ], %g1 200940c: 80 a0 60 00 cmp %g1, 0 2009410: 32 80 00 05 bne,a 2009424 2009414: c2 26 00 00 st %g1, [ %i0 ] rtems_fatal_error_occurred( 0xBAD00000 ); 2009418: 11 2e b4 00 sethi %hi(0xbad00000), %o0 <== NOT EXECUTED 200941c: 7f ff f1 ce call 2005b54 <== NOT EXECUTED 2009420: 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( 2009424: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 2009428: c2 48 40 00 ldsb [ %g1 ], %g1 200942c: 80 a0 60 2f cmp %g1, 0x2f 2009430: 02 80 00 06 be 2009448 2009434: 80 a0 60 5c cmp %g1, 0x5c 2009438: 02 80 00 04 be 2009448 200943c: 80 a0 60 00 cmp %g1, 0 2009440: 12 80 00 09 bne 2009464 2009444: 82 10 20 00 clr %g1 2009448: 03 00 80 5b sethi %hi(0x2016c00), %g1 200944c: d2 00 61 34 ld [ %g1 + 0x134 ], %o1 ! 2016d34 2009450: 90 10 00 11 mov %l1, %o0 2009454: 92 02 60 14 add %o1, 0x14, %o1 2009458: 40 00 10 cf call 200d794 200945c: 94 10 20 10 mov 0x10, %o2 2009460: 82 10 20 01 mov 1, %g1 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 2009464: d0 04 20 4c ld [ %l0 + 0x4c ], %o0 2009468: 94 10 00 11 mov %l1, %o2 200946c: 90 02 00 01 add %o0, %g1, %o0 2009470: 40 00 00 11 call 20094b4 2009474: 92 10 00 19 mov %i1, %o1 2009478: b0 10 00 08 mov %o0, %i0 &jnode->info.sym_link.name[i], flags, node ); IMFS_Set_handlers( node ); 200947c: 7f ff ff 93 call 20092c8 2009480: 90 10 00 11 mov %l1, %o0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 2009484: 90 10 00 11 mov %l1, %o0 2009488: 7f ff ff a9 call 200932c 200948c: 92 10 00 19 mov %i1, %o1 2009490: 80 a2 20 00 cmp %o0, 0 2009494: 12 80 00 06 bne 20094ac 2009498: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 200949c: 40 00 0e cc call 200cfcc <__errno> <== NOT EXECUTED 20094a0: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 20094a4: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 20094a8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return result; } 20094ac: 81 c7 e0 08 ret 20094b0: 81 e8 00 00 restore 0200c4e4 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 200c4e4: 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(); 200c4e8: 7f ff f7 94 call 200a338 200c4ec: e0 06 00 00 ld [ %i0 ], %l0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 200c4f0: c2 14 20 38 lduh [ %l0 + 0x38 ], %g1 200c4f4: 91 2a 20 10 sll %o0, 0x10, %o0 200c4f8: 91 32 20 10 srl %o0, 0x10, %o0 200c4fc: 80 a2 00 01 cmp %o0, %g1 200c500: 02 80 00 04 be 200c510 200c504: 80 a2 20 00 cmp %o0, 0 200c508: 12 80 00 08 bne 200c528 <== NOT EXECUTED 200c50c: 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 ) ) ) 200c510: 83 2e 60 10 sll %i1, 0x10, %g1 200c514: 83 30 60 10 srl %g1, 0x10, %g1 200c518: 82 08 7e 00 and %g1, -512, %g1 200c51c: 80 a0 60 00 cmp %g1, 0 200c520: 22 80 00 08 be,a 200c540 200c524: c2 14 20 2e lduh [ %l0 + 0x2e ], %g1 rtems_set_errno_and_return_minus_one( EPERM ); 200c528: 40 00 02 a9 call 200cfcc <__errno> 200c52c: b0 10 3f ff mov -1, %i0 200c530: 82 10 20 01 mov 1, %g1 200c534: c2 22 00 00 st %g1, [ %o0 ] 200c538: 81 c7 e0 08 ret 200c53c: 81 e8 00 00 restore jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO); jnode->st_mode |= mode; IMFS_update_ctime( jnode ); 200c540: 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; 200c544: 82 08 7e 00 and %g1, -512, %g1 200c548: 82 16 40 01 or %i1, %g1, %g1 IMFS_update_ctime( jnode ); 200c54c: 92 10 20 00 clr %o1 200c550: 7f ff f7 7e call 200a348 200c554: c2 34 20 2e sth %g1, [ %l0 + 0x2e ] 200c558: c2 07 bf f0 ld [ %fp + -16 ], %g1 200c55c: c2 24 20 44 st %g1, [ %l0 + 0x44 ] return 0; } 200c560: 81 c7 e0 08 ret 200c564: 91 e8 20 00 restore %g0, 0, %o0 02009ab8 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 2009ab8: 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 ); 2009abc: 80 a6 20 00 cmp %i0, 0 2009ac0: 12 80 00 0a bne 2009ae8 2009ac4: 80 a6 60 00 cmp %i1, 0 2009ac8: 11 00 80 56 sethi %hi(0x2015800), %o0 <== NOT EXECUTED 2009acc: 15 00 80 57 sethi %hi(0x2015c00), %o2 <== NOT EXECUTED 2009ad0: 17 00 80 57 sethi %hi(0x2015c00), %o3 <== NOT EXECUTED 2009ad4: 90 12 23 e0 or %o0, 0x3e0, %o0 <== NOT EXECUTED 2009ad8: 94 12 a0 50 or %o2, 0x50, %o2 <== NOT EXECUTED 2009adc: 96 12 e0 30 or %o3, 0x30, %o3 <== NOT EXECUTED 2009ae0: 7f ff e0 ef call 2001e9c <__assert_func> <== NOT EXECUTED 2009ae4: 92 10 20 2a mov 0x2a, %o1 <== NOT EXECUTED if ( !name ) 2009ae8: 02 80 00 1c be 2009b58 2009aec: 90 10 00 19 mov %i1, %o0 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 2009af0: 13 00 80 57 sethi %hi(0x2015c00), %o1 2009af4: 40 00 12 06 call 200e30c 2009af8: 92 12 60 40 or %o1, 0x40, %o1 ! 2015c40 2009afc: 80 a2 20 00 cmp %o0, 0 2009b00: 02 80 00 09 be 2009b24 2009b04: 90 10 00 19 mov %i1, %o0 return directory; if ( !strcmp( name, dotdotname ) ) 2009b08: 13 00 80 57 sethi %hi(0x2015c00), %o1 2009b0c: 40 00 12 00 call 200e30c 2009b10: 92 12 60 48 or %o1, 0x48, %o1 ! 2015c48 2009b14: 80 a2 20 00 cmp %o0, 0 2009b18: 12 80 00 05 bne 2009b2c 2009b1c: a0 06 20 50 add %i0, 0x50, %l0 return directory->Parent; 2009b20: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 2009b24: 81 c7 e0 08 ret <== NOT EXECUTED 2009b28: 81 e8 00 00 restore <== NOT EXECUTED the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 2009b2c: 10 80 00 08 b 2009b4c 2009b30: 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 ) ) 2009b34: 40 00 11 f6 call 200e30c 2009b38: 92 06 20 0c add %i0, 0xc, %o1 2009b3c: 80 a2 20 00 cmp %o0, 0 2009b40: 02 80 00 07 be 2009b5c 2009b44: 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 ) { 2009b48: 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 ); 2009b4c: 80 a6 00 10 cmp %i0, %l0 2009b50: 12 bf ff f9 bne 2009b34 2009b54: 90 10 00 19 mov %i1, %o0 2009b58: b0 10 20 00 clr %i0 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 2009b5c: 81 c7 e0 08 ret 2009b60: 81 e8 00 00 restore 0201d53c : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 201d53c: 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; 201d540: 94 10 20 10 mov 0x10, %o2 201d544: 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; 201d548: 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 ); 201d54c: 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; 201d550: 40 00 4c 6d call 2030704 201d554: 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; 201d558: c0 26 20 18 clr [ %i0 + 0x18 ] do { next = jnode->Parent; loc.node_access = (void *)jnode; 201d55c: e0 27 bf e8 st %l0, [ %fp + -24 ] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 201d560: f0 04 20 08 ld [ %l0 + 8 ], %i0 loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 201d564: 7f ff fd f8 call 201cd44 201d568: 90 10 00 11 mov %l1, %o0 if ( jnode->type != IMFS_DIRECTORY ) { 201d56c: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 201d570: 80 a0 60 01 cmp %g1, 1 201d574: 12 80 00 06 bne 201d58c 201d578: 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 ) ) { 201d57c: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 201d580: 80 a0 40 02 cmp %g1, %g2 201d584: 12 80 00 08 bne 201d5a4 201d588: 80 a4 20 00 cmp %l0, 0 result = IMFS_unlink( &loc ); 201d58c: 7f ff 9a 0e call 2003dc4 201d590: 90 10 00 11 mov %l1, %o0 if (result != 0) 201d594: 80 a2 20 00 cmp %o0, 0 201d598: 12 80 00 13 bne 201d5e4 201d59c: a0 10 00 18 mov %i0, %l0 return -1; jnode = next; } if ( jnode != NULL ) { 201d5a0: 80 a4 20 00 cmp %l0, 0 201d5a4: 22 80 00 11 be,a 201d5e8 201d5a8: b0 10 20 00 clr %i0 if ( jnode->type == IMFS_DIRECTORY ) { 201d5ac: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 201d5b0: 80 a0 60 01 cmp %g1, 1 201d5b4: 32 bf ff eb bne,a 201d560 201d5b8: e0 27 bf e8 st %l0, [ %fp + -24 ] <== NOT EXECUTED if ( jnode_has_children( jnode ) ) 201d5bc: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 201d5c0: 82 04 20 50 add %l0, 0x50, %g1 201d5c4: 80 a0 80 01 cmp %g2, %g1 201d5c8: 22 bf ff e6 be,a 201d560 201d5cc: e0 27 bf e8 st %l0, [ %fp + -24 ] jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 201d5d0: a0 90 a0 00 orcc %g2, 0, %l0 201d5d4: 32 bf ff e3 bne,a 201d560 201d5d8: e0 27 bf e8 st %l0, [ %fp + -24 ] 201d5dc: 81 c7 e0 08 ret <== NOT EXECUTED 201d5e0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 201d5e4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return 0; } 201d5e8: 81 c7 e0 08 ret 201d5ec: 81 e8 00 00 restore 02009c4c : 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 ) { 2009c4c: 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, 2009c50: 03 00 80 5a sethi %hi(0x2016800), %g1 2009c54: 84 10 20 10 mov 0x10, %g2 2009c58: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 2009c5c: 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); 2009c60: 80 a0 80 03 cmp %g2, %g3 2009c64: 02 80 00 06 be 2009c7c 2009c68: 82 00 60 01 inc %g1 2009c6c: 80 a0 60 06 cmp %g1, 6 2009c70: 12 bf ff fc bne 2009c60 2009c74: 85 28 a0 01 sll %g2, 1, %g2 2009c78: 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) 2009c7c: 03 00 80 5c sethi %hi(0x2017000), %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( 2009c80: 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) 2009c84: c4 20 63 c4 st %g2, [ %g1 + 0x3c4 ] * 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( 2009c88: 92 10 20 01 mov 1, %o1 2009c8c: 90 10 20 00 clr %o0 2009c90: 15 00 80 56 sethi %hi(0x2015800), %o2 2009c94: 17 00 00 10 sethi %hi(0x4000), %o3 2009c98: 94 12 a0 d0 or %o2, 0xd0, %o2 2009c9c: 40 00 09 bd call 200c390 2009ca0: 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; 2009ca4: 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( 2009ca8: 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; 2009cac: f2 26 20 20 st %i1, [ %i0 + 0x20 ] "", ( S_IFDIR | 0755 ), NULL ); temp_mt_entry->mt_fs_root.handlers = directory_handlers; 2009cb0: 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; 2009cb4: 13 00 80 58 sethi %hi(0x2016000), %o1 2009cb8: 90 06 20 30 add %i0, 0x30, %o0 2009cbc: 40 00 0e b6 call 200d794 2009cc0: 92 12 60 90 or %o1, 0x90, %o1 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 2009cc4: 90 10 20 01 mov 1, %o0 2009cc8: 40 00 00 e7 call 200a064 2009ccc: 92 10 20 0c mov 0xc, %o1 if ( !fs_info ){ 2009cd0: 80 a2 20 00 cmp %o0, 0 2009cd4: 12 80 00 0a bne 2009cfc 2009cd8: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 free(temp_mt_entry->mt_fs_root.node_access); 2009cdc: 40 00 01 2c call 200a18c <== NOT EXECUTED 2009ce0: 90 10 00 02 mov %g2, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 2009ce4: 40 00 0c ba call 200cfcc <__errno> <== NOT EXECUTED 2009ce8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2009cec: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 2009cf0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2009cf4: 81 c7 e0 08 ret <== NOT EXECUTED 2009cf8: 81 e8 00 00 restore <== NOT EXECUTED /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 2009cfc: 82 10 20 01 mov 1, %g1 2009d00: 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; 2009d04: 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; 2009d08: f6 22 20 08 st %i3, [ %o0 + 8 ] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 2009d0c: 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; 2009d10: 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; } 2009d14: 81 c7 e0 08 ret 2009d18: 91 e8 20 00 restore %g0, 0, %o0 02003b28 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 2003b28: 9d e3 bf 58 save %sp, -168, %sp /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 2003b2c: c2 06 00 00 ld [ %i0 ], %g1 2003b30: c2 27 bf dc st %g1, [ %fp + -36 ] if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 2003b34: c2 10 60 30 lduh [ %g1 + 0x30 ], %g1 2003b38: 80 a0 60 07 cmp %g1, 7 2003b3c: 08 80 00 06 bleu 2003b54 2003b40: 90 10 00 1a mov %i2, %o0 rtems_set_errno_and_return_minus_one( EMLINK ); 2003b44: 40 00 a9 03 call 202df50 <__errno> 2003b48: 01 00 00 00 nop 2003b4c: 10 80 00 13 b 2003b98 2003b50: 82 10 20 1f mov 0x1f, %g1 ! 1f /* * Remove any separators at the end of the string. */ IMFS_get_token( token, new_name, &i ); 2003b54: a0 07 bf b8 add %fp, -72, %l0 2003b58: 94 07 bf f4 add %fp, -12, %o2 2003b5c: 7f ff ff 7b call 2003948 2003b60: 92 10 00 10 mov %l0, %o1 /* * Create a new link node. */ new_node = IMFS_create_node( 2003b64: 90 10 00 19 mov %i1, %o0 2003b68: 94 10 00 10 mov %l0, %o2 2003b6c: 92 10 20 03 mov 3, %o1 2003b70: 17 00 00 28 sethi %hi(0xa000), %o3 2003b74: 98 07 bf dc add %fp, -36, %o4 2003b78: 40 00 64 18 call 201cbd8 2003b7c: 96 12 e1 ff or %o3, 0x1ff, %o3 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 2003b80: 80 a2 20 00 cmp %o0, 0 2003b84: 12 80 00 08 bne 2003ba4 2003b88: c4 07 bf dc ld [ %fp + -36 ], %g2 rtems_set_errno_and_return_minus_one( ENOMEM ); 2003b8c: 40 00 a8 f1 call 202df50 <__errno> <== NOT EXECUTED 2003b90: 01 00 00 00 nop <== NOT EXECUTED 2003b94: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 2003b98: c2 22 00 00 st %g1, [ %o0 ] 2003b9c: 81 c7 e0 08 ret 2003ba0: 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 ); 2003ba4: 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++; 2003ba8: c2 10 a0 30 lduh [ %g2 + 0x30 ], %g1 IMFS_update_ctime( info.hard_link.link_node ); 2003bac: 92 10 20 00 clr %o1 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 2003bb0: 82 00 60 01 inc %g1 IMFS_update_ctime( info.hard_link.link_node ); 2003bb4: 40 00 02 69 call 2004558 2003bb8: c2 30 a0 30 sth %g1, [ %g2 + 0x30 ] 2003bbc: c4 07 bf ec ld [ %fp + -20 ], %g2 2003bc0: c2 07 bf dc ld [ %fp + -36 ], %g1 2003bc4: c4 20 60 44 st %g2, [ %g1 + 0x44 ] return 0; } 2003bc8: 81 c7 e0 08 ret 2003bcc: 91 e8 20 00 restore %g0, 0, %o0 02025370 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 2025370: 9d e3 bf 98 save %sp, -104, %sp 2025374: 90 10 00 18 mov %i0, %o0 block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 2025378: 80 a6 20 00 cmp %i0, 0 202537c: 12 80 00 0a bne 20253a4 2025380: 92 10 00 19 mov %i1, %o1 2025384: 11 00 81 0c sethi %hi(0x2043000), %o0 <== NOT EXECUTED 2025388: 15 00 81 0d sethi %hi(0x2043400), %o2 <== NOT EXECUTED 202538c: 17 00 81 0c sethi %hi(0x2043000), %o3 <== NOT EXECUTED 2025390: 90 12 23 50 or %o0, 0x350, %o0 <== NOT EXECUTED 2025394: 94 12 a1 10 or %o2, 0x110, %o2 <== NOT EXECUTED 2025398: 96 12 e3 a0 or %o3, 0x3a0, %o3 <== NOT EXECUTED 202539c: 10 80 00 0c b 20253cc <== NOT EXECUTED 20253a0: 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 ); 20253a4: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 20253a8: 80 a0 60 05 cmp %g1, 5 20253ac: 02 80 00 0a be 20253d4 20253b0: 15 00 81 0d sethi %hi(0x2043400), %o2 20253b4: 11 00 81 0c sethi %hi(0x2043000), %o0 <== NOT EXECUTED 20253b8: 17 00 81 0c sethi %hi(0x2043000), %o3 <== NOT EXECUTED 20253bc: 90 12 23 50 or %o0, 0x350, %o0 <== NOT EXECUTED 20253c0: 94 12 a1 10 or %o2, 0x110, %o2 <== NOT EXECUTED 20253c4: 96 12 e3 b0 or %o3, 0x3b0, %o3 <== NOT EXECUTED 20253c8: 92 10 21 6d mov 0x16d, %o1 <== NOT EXECUTED 20253cc: 7f ff 7b 1a call 2004034 <__assert_func> <== NOT EXECUTED 20253d0: 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 ); 20253d4: 7f ff fe 7a call 2024dbc 20253d8: 94 10 20 01 mov 1, %o2 ! 1 if ( *block_entry_ptr ) 20253dc: 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 ); 20253e0: b2 10 00 08 mov %o0, %i1 if ( *block_entry_ptr ) 20253e4: 80 a0 60 00 cmp %g1, 0 20253e8: 12 80 00 09 bne 202540c 20253ec: b0 10 20 00 clr %i0 #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 20253f0: 7f ff fe 66 call 2024d88 20253f4: b0 10 20 01 mov 1, %i0 if ( !memory ) 20253f8: 80 a2 20 00 cmp %o0, 0 20253fc: 02 80 00 04 be 202540c 2025400: 01 00 00 00 nop return 1; *block_entry_ptr = memory; 2025404: d0 26 40 00 st %o0, [ %i1 ] 2025408: b0 10 20 00 clr %i0 return 0; } 202540c: 81 c7 e0 08 ret 2025410: 81 e8 00 00 restore 02025414 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 2025414: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 2025418: a4 96 20 00 orcc %i0, 0, %l2 202541c: 32 80 00 0a bne,a 2025444 2025420: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 2025424: 11 00 81 0c sethi %hi(0x2043000), %o0 <== NOT EXECUTED 2025428: 15 00 81 0d sethi %hi(0x2043400), %o2 <== NOT EXECUTED 202542c: 17 00 81 0c sethi %hi(0x2043000), %o3 <== NOT EXECUTED 2025430: 90 12 23 50 or %o0, 0x350, %o0 <== NOT EXECUTED 2025434: 94 12 a1 28 or %o2, 0x128, %o2 <== NOT EXECUTED 2025438: 96 12 e3 a0 or %o3, 0x3a0, %o3 <== NOT EXECUTED 202543c: 10 80 00 0c b 202546c <== NOT EXECUTED 2025440: 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 ); 2025444: 80 a0 60 05 cmp %g1, 5 2025448: 02 80 00 0b be 2025474 202544c: 03 00 81 1f sethi %hi(0x2047c00), %g1 2025450: 11 00 81 0c sethi %hi(0x2043000), %o0 <== NOT EXECUTED 2025454: 15 00 81 0d sethi %hi(0x2043400), %o2 <== NOT EXECUTED 2025458: 17 00 81 0c sethi %hi(0x2043000), %o3 <== NOT EXECUTED 202545c: 90 12 23 50 or %o0, 0x350, %o0 <== NOT EXECUTED 2025460: 94 12 a1 28 or %o2, 0x128, %o2 <== NOT EXECUTED 2025464: 96 12 e3 b0 or %o3, 0x3b0, %o3 <== NOT EXECUTED 2025468: 92 10 21 35 mov 0x135, %o1 <== NOT EXECUTED 202546c: 7f ff 7a f2 call 2004034 <__assert_func> <== NOT EXECUTED 2025470: 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 ) 2025474: e2 00 62 34 ld [ %g1 + 0x234 ], %l1 2025478: a1 34 60 02 srl %l1, 2, %l0 202547c: 92 10 00 10 mov %l0, %o1 2025480: 40 00 63 09 call 203e0a4 <.umul> 2025484: 90 04 20 01 add %l0, 1, %o0 2025488: 92 10 00 10 mov %l0, %o1 202548c: 40 00 63 06 call 203e0a4 <.umul> 2025490: 90 02 20 01 inc %o0 2025494: 92 10 00 11 mov %l1, %o1 2025498: 40 00 63 03 call 203e0a4 <.umul> 202549c: 90 02 3f ff add %o0, -1, %o0 20254a0: 80 a6 40 08 cmp %i1, %o0 20254a4: 2a 80 00 06 bcs,a 20254bc 20254a8: e0 04 a0 4c ld [ %l2 + 0x4c ], %l0 rtems_set_errno_and_return_minus_one( EINVAL ); 20254ac: 40 00 22 a9 call 202df50 <__errno> <== NOT EXECUTED 20254b0: 01 00 00 00 nop <== NOT EXECUTED 20254b4: 10 80 00 1f b 2025530 <== NOT EXECUTED 20254b8: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) 20254bc: 80 a6 40 10 cmp %i1, %l0 20254c0: 04 80 00 24 ble 2025550 20254c4: b0 10 20 00 clr %i0 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 20254c8: 92 10 00 11 mov %l1, %o1 20254cc: 40 00 63 32 call 203e194 <.div> 20254d0: 90 10 00 19 mov %i1, %o0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 20254d4: 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; 20254d8: b0 10 00 08 mov %o0, %i0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 20254dc: 40 00 63 2e call 203e194 <.div> 20254e0: 90 10 00 10 mov %l0, %o0 20254e4: a2 10 00 08 mov %o0, %l1 20254e8: 10 80 00 15 b 202553c 20254ec: 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 ) ) { 20254f0: 7f ff ff a0 call 2025370 20254f4: 92 10 00 10 mov %l0, %o1 20254f8: 80 a2 20 00 cmp %o0, 0 20254fc: 22 80 00 10 be,a 202553c 2025500: a0 04 20 01 inc %l0 for ( ; block>=old_blocks ; block-- ) { 2025504: 10 80 00 06 b 202551c <== NOT EXECUTED 2025508: 80 a4 00 11 cmp %l0, %l1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 202550c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 2025510: 7f ff fe d5 call 2025064 <== NOT EXECUTED 2025514: 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-- ) { 2025518: 80 a4 00 11 cmp %l0, %l1 <== NOT EXECUTED 202551c: 1a bf ff fc bcc 202550c <== NOT EXECUTED 2025520: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 2025524: 40 00 22 8b call 202df50 <__errno> <== NOT EXECUTED 2025528: 01 00 00 00 nop <== NOT EXECUTED 202552c: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 2025530: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2025534: 81 c7 e0 08 ret <== NOT EXECUTED 2025538: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 202553c: 80 a4 00 18 cmp %l0, %i0 2025540: 08 bf ff ec bleu 20254f0 2025544: 90 10 00 12 mov %l2, %o0 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 2025548: f2 24 a0 4c st %i1, [ %l2 + 0x4c ] 202554c: b0 10 20 00 clr %i0 return 0; } 2025550: 81 c7 e0 08 ret 2025554: 81 e8 00 00 restore 02024dbc : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 2024dbc: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 2024dc0: 80 a6 20 00 cmp %i0, 0 2024dc4: 32 80 00 0a bne,a 2024dec 2024dc8: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 2024dcc: 11 00 81 0c sethi %hi(0x2043000), %o0 <== NOT EXECUTED 2024dd0: 15 00 81 0d sethi %hi(0x2043400), %o2 <== NOT EXECUTED 2024dd4: 17 00 81 0c sethi %hi(0x2043000), %o3 <== NOT EXECUTED 2024dd8: 90 12 23 50 or %o0, 0x350, %o0 <== NOT EXECUTED 2024ddc: 94 12 a0 88 or %o2, 0x88, %o2 <== NOT EXECUTED 2024de0: 96 12 e3 a0 or %o3, 0x3a0, %o3 <== NOT EXECUTED 2024de4: 10 80 00 0c b 2024e14 <== NOT EXECUTED 2024de8: 92 10 23 86 mov 0x386, %o1 <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 2024dec: 80 a0 60 05 cmp %g1, 5 2024df0: 02 80 00 0b be 2024e1c 2024df4: 03 00 81 1f sethi %hi(0x2047c00), %g1 2024df8: 11 00 81 0c sethi %hi(0x2043000), %o0 <== NOT EXECUTED 2024dfc: 15 00 81 0d sethi %hi(0x2043400), %o2 <== NOT EXECUTED 2024e00: 17 00 81 0c sethi %hi(0x2043000), %o3 <== NOT EXECUTED 2024e04: 90 12 23 50 or %o0, 0x350, %o0 <== NOT EXECUTED 2024e08: 94 12 a0 88 or %o2, 0x88, %o2 <== NOT EXECUTED 2024e0c: 96 12 e3 b0 or %o3, 0x3b0, %o3 <== NOT EXECUTED 2024e10: 92 10 23 8a mov 0x38a, %o1 <== NOT EXECUTED 2024e14: 7f ff 7c 88 call 2004034 <__assert_func> <== NOT EXECUTED 2024e18: 01 00 00 00 nop <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 2024e1c: c2 00 62 34 ld [ %g1 + 0x234 ], %g1 2024e20: a3 30 60 02 srl %g1, 2, %l1 2024e24: 82 04 7f ff add %l1, -1, %g1 2024e28: 80 a6 40 01 cmp %i1, %g1 2024e2c: 18 80 00 13 bgu 2024e78 2024e30: 90 04 60 01 add %l1, 1, %o0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { 2024e34: 80 a6 a0 00 cmp %i2, 0 2024e38: 02 80 00 0d be 2024e6c 2024e3c: c4 06 20 50 ld [ %i0 + 0x50 ], %g2 if ( !p ) { 2024e40: 80 a0 a0 00 cmp %g2, 0 2024e44: 12 80 00 08 bne 2024e64 2024e48: 01 00 00 00 nop p = memfile_alloc_block(); 2024e4c: 7f ff ff cf call 2024d88 2024e50: 01 00 00 00 nop if ( !p ) 2024e54: 80 a2 20 00 cmp %o0, 0 2024e58: 22 80 00 81 be,a 202505c 2024e5c: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->indirect = p; 2024e60: d0 26 20 50 st %o0, [ %i0 + 0x50 ] } return &info->indirect[ my_block ]; 2024e64: 10 80 00 2a b 2024f0c 2024e68: c4 06 20 50 ld [ %i0 + 0x50 ], %g2 } if ( !p ) 2024e6c: 80 a0 a0 00 cmp %g2, 0 return 0; return &info->indirect[ my_block ]; 2024e70: 10 80 00 30 b 2024f30 2024e74: 83 2e 60 02 sll %i1, 2, %g1 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 2024e78: 40 00 64 8b call 203e0a4 <.umul> <== NOT EXECUTED 2024e7c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 2024e80: 82 02 3f ff add %o0, -1, %g1 <== NOT EXECUTED 2024e84: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 2024e88: 18 80 00 2e bgu 2024f40 <== NOT EXECUTED 2024e8c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 2024e90: a0 26 40 11 sub %i1, %l1, %l0 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 2024e94: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 2024e98: 40 00 65 69 call 203e43c <.urem> <== NOT EXECUTED 2024e9c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 2024ea0: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 2024ea4: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 2024ea8: 40 00 64 b9 call 203e18c <.udiv> <== NOT EXECUTED 2024eac: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 2024eb0: 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; 2024eb4: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 2024eb8: 02 80 00 17 be 2024f14 <== NOT EXECUTED 2024ebc: d0 06 20 54 ld [ %i0 + 0x54 ], %o0 <== NOT EXECUTED if ( !p ) { 2024ec0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2024ec4: 12 80 00 08 bne 2024ee4 <== NOT EXECUTED 2024ec8: 83 2c 20 02 sll %l0, 2, %g1 <== NOT EXECUTED p = memfile_alloc_block(); 2024ecc: 7f ff ff af call 2024d88 <== NOT EXECUTED 2024ed0: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 2024ed4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2024ed8: 02 80 00 60 be 2025058 <== NOT EXECUTED 2024edc: 83 2c 20 02 sll %l0, 2, %g1 <== NOT EXECUTED return 0; info->doubly_indirect = p; 2024ee0: d0 26 20 54 st %o0, [ %i0 + 0x54 ] <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; 2024ee4: c4 02 00 01 ld [ %o0 + %g1 ], %g2 <== NOT EXECUTED if ( !p1 ) { 2024ee8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 2024eec: 12 80 00 08 bne 2024f0c <== NOT EXECUTED 2024ef0: a0 02 00 01 add %o0, %g1, %l0 <== NOT EXECUTED p1 = memfile_alloc_block(); 2024ef4: 7f ff ff a5 call 2024d88 <== NOT EXECUTED 2024ef8: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 2024efc: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 2024f00: 22 80 00 57 be,a 202505c <== NOT EXECUTED 2024f04: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 2024f08: c4 24 00 00 st %g2, [ %l0 ] <== NOT EXECUTED } return (block_p *)&p1[ singly ]; 2024f0c: 10 80 00 51 b 2025050 2024f10: 83 2e 60 02 sll %i1, 2, %g1 } if ( !p ) 2024f14: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2024f18: 02 80 00 51 be 202505c <== NOT EXECUTED 2024f1c: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 2024f20: 83 2c 20 02 sll %l0, 2, %g1 <== NOT EXECUTED 2024f24: 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 ]; 2024f28: 85 2e 60 02 sll %i1, 2, %g2 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 2024f2c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2024f30: 12 80 00 4b bne 202505c 2024f34: b0 00 40 02 add %g1, %g2, %i0 p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 2024f38: 81 c7 e0 08 ret <== NOT EXECUTED 2024f3c: 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 ) { 2024f40: 90 02 20 01 inc %o0 <== NOT EXECUTED 2024f44: 40 00 64 58 call 203e0a4 <.umul> <== NOT EXECUTED 2024f48: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 2024f4c: 90 02 3f ff add %o0, -1, %o0 <== NOT EXECUTED 2024f50: 80 a6 40 08 cmp %i1, %o0 <== NOT EXECUTED 2024f54: 18 80 00 41 bgu 2025058 <== NOT EXECUTED 2024f58: a0 26 40 10 sub %i1, %l0, %l0 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 2024f5c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 2024f60: 40 00 65 37 call 203e43c <.urem> <== NOT EXECUTED 2024f64: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 2024f68: 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; 2024f6c: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 2024f70: 40 00 64 87 call 203e18c <.udiv> <== NOT EXECUTED 2024f74: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 2024f78: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 2024f7c: 40 00 64 84 call 203e18c <.udiv> <== NOT EXECUTED 2024f80: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 2024f84: 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; 2024f88: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 2024f8c: 40 00 65 2c call 203e43c <.urem> <== NOT EXECUTED 2024f90: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 2024f94: 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; 2024f98: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 2024f9c: 02 80 00 23 be 2025028 <== NOT EXECUTED 2024fa0: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 <== NOT EXECUTED if ( !p ) { 2024fa4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2024fa8: 12 80 00 08 bne 2024fc8 <== NOT EXECUTED 2024fac: 83 2e 60 02 sll %i1, 2, %g1 <== NOT EXECUTED p = memfile_alloc_block(); 2024fb0: 7f ff ff 76 call 2024d88 <== NOT EXECUTED 2024fb4: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 2024fb8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2024fbc: 02 80 00 27 be 2025058 <== NOT EXECUTED 2024fc0: 83 2e 60 02 sll %i1, 2, %g1 <== NOT EXECUTED return 0; info->triply_indirect = p; 2024fc4: d0 26 20 58 st %o0, [ %i0 + 0x58 ] <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 2024fc8: c6 02 00 01 ld [ %o0 + %g1 ], %g3 <== NOT EXECUTED if ( !p1 ) { 2024fcc: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 2024fd0: 12 80 00 08 bne 2024ff0 <== NOT EXECUTED 2024fd4: a0 02 00 01 add %o0, %g1, %l0 <== NOT EXECUTED p1 = memfile_alloc_block(); 2024fd8: 7f ff ff 6c call 2024d88 <== NOT EXECUTED 2024fdc: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 2024fe0: 86 92 20 00 orcc %o0, 0, %g3 <== NOT EXECUTED 2024fe4: 02 80 00 1e be 202505c <== NOT EXECUTED 2024fe8: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 2024fec: c6 24 00 00 st %g3, [ %l0 ] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 2024ff0: 83 2c 60 02 sll %l1, 2, %g1 <== NOT EXECUTED 2024ff4: d0 00 c0 01 ld [ %g3 + %g1 ], %o0 <== NOT EXECUTED if ( !p2 ) { 2024ff8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2024ffc: 12 80 00 08 bne 202501c <== NOT EXECUTED 2025000: a0 00 c0 01 add %g3, %g1, %l0 <== NOT EXECUTED p2 = memfile_alloc_block(); 2025004: 7f ff ff 61 call 2024d88 <== NOT EXECUTED 2025008: 01 00 00 00 nop <== NOT EXECUTED if ( !p2 ) 202500c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2025010: 22 80 00 13 be,a 202505c <== NOT EXECUTED 2025014: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 2025018: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED } return (block_p *)&p2[ singly ]; 202501c: 83 2c a0 02 sll %l2, 2, %g1 <== NOT EXECUTED 2025020: 81 c7 e0 08 ret <== NOT EXECUTED 2025024: 91 ea 00 01 restore %o0, %g1, %o0 <== NOT EXECUTED } if ( !p ) 2025028: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 202502c: 02 80 00 0c be 202505c <== NOT EXECUTED 2025030: 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 ]; 2025034: 83 2e 60 02 sll %i1, 2, %g1 <== NOT EXECUTED 2025038: d0 02 00 01 ld [ %o0 + %g1 ], %o0 <== NOT EXECUTED if ( !p1 ) 202503c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2025040: 02 80 00 07 be 202505c <== NOT EXECUTED 2025044: 83 2c 60 02 sll %l1, 2, %g1 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 2025048: c4 02 00 01 ld [ %o0 + %g1 ], %g2 <== NOT EXECUTED 202504c: 83 2c a0 02 sll %l2, 2, %g1 <== NOT EXECUTED 2025050: 81 c7 e0 08 ret 2025054: 91 e8 80 01 restore %g2, %g1, %o0 2025058: b0 10 20 00 clr %i0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 202505c: 81 c7 e0 08 ret 2025060: 81 e8 00 00 restore 02025948 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 2025948: 9d e3 bf 90 save %sp, -112, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 202594c: a6 96 20 00 orcc %i0, 0, %l3 2025950: 32 80 00 0a bne,a 2025978 2025954: c4 04 e0 48 ld [ %l3 + 0x48 ], %g2 2025958: 11 00 81 0c sethi %hi(0x2043000), %o0 <== NOT EXECUTED 202595c: 15 00 81 0d sethi %hi(0x2043400), %o2 <== NOT EXECUTED 2025960: 17 00 81 0c sethi %hi(0x2043000), %o3 <== NOT EXECUTED 2025964: 90 12 23 50 or %o0, 0x350, %o0 <== NOT EXECUTED 2025968: 94 12 a0 c0 or %o2, 0xc0, %o2 <== NOT EXECUTED 202596c: 96 12 e3 a0 or %o3, 0x3a0, %o3 <== NOT EXECUTED 2025970: 10 80 00 0d b 20259a4 <== NOT EXECUTED 2025974: 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 || 2025978: 82 00 bf fb add %g2, -5, %g1 202597c: 80 a0 60 01 cmp %g1, 1 2025980: 08 80 00 0b bleu 20259ac 2025984: 80 a6 a0 00 cmp %i2, 0 2025988: 11 00 81 0c sethi %hi(0x2043000), %o0 <== NOT EXECUTED 202598c: 15 00 81 0d sethi %hi(0x2043400), %o2 <== NOT EXECUTED 2025990: 17 00 81 0d sethi %hi(0x2043400), %o3 <== NOT EXECUTED 2025994: 90 12 23 50 or %o0, 0x350, %o0 <== NOT EXECUTED 2025998: 94 12 a0 c0 or %o2, 0xc0, %o2 <== NOT EXECUTED 202599c: 96 12 e0 30 or %o3, 0x30, %o3 <== NOT EXECUTED 20259a0: 92 10 22 4f mov 0x24f, %o1 <== NOT EXECUTED 20259a4: 7f ff 79 a4 call 2004034 <__assert_func> <== NOT EXECUTED 20259a8: 01 00 00 00 nop <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 20259ac: 32 80 00 0a bne,a 20259d4 20259b0: 80 a6 e0 00 cmp %i3, 0 20259b4: 11 00 81 0c sethi %hi(0x2043000), %o0 <== NOT EXECUTED 20259b8: 15 00 81 0d sethi %hi(0x2043400), %o2 <== NOT EXECUTED 20259bc: 17 00 81 0d sethi %hi(0x2043400), %o3 <== NOT EXECUTED 20259c0: 90 12 23 50 or %o0, 0x350, %o0 <== NOT EXECUTED 20259c4: 94 12 a0 c0 or %o2, 0xc0, %o2 <== NOT EXECUTED 20259c8: 96 12 e0 80 or %o3, 0x80, %o3 <== NOT EXECUTED 20259cc: 10 bf ff f6 b 20259a4 <== NOT EXECUTED 20259d0: 92 10 22 58 mov 0x258, %o1 <== NOT EXECUTED /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 20259d4: 12 80 00 08 bne 20259f4 20259d8: 80 a0 a0 06 cmp %g2, 6 rtems_set_errno_and_return_minus_one( EINVAL ); 20259dc: 40 00 21 5d call 202df50 <__errno> <== NOT EXECUTED 20259e0: 01 00 00 00 nop <== NOT EXECUTED 20259e4: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 20259e8: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 20259ec: 10 80 00 76 b 2025bc4 <== NOT EXECUTED 20259f0: 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) { 20259f4: 32 80 00 0c bne,a 2025a24 20259f8: 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)) 20259fc: c2 04 e0 4c ld [ %l3 + 0x4c ], %g1 <== NOT EXECUTED 2025a00: b0 20 40 19 sub %g1, %i1, %i0 <== NOT EXECUTED 2025a04: 80 a6 00 1b cmp %i0, %i3 <== NOT EXECUTED 2025a08: 38 80 00 02 bgu,a 2025a10 <== NOT EXECUTED 2025a0c: b0 10 00 1b mov %i3, %i0 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 2025a10: d2 04 e0 50 ld [ %l3 + 0x50 ], %o1 <== NOT EXECUTED 2025a14: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED 2025a18: 92 02 40 19 add %o1, %i1, %o1 <== NOT EXECUTED 2025a1c: 10 80 00 62 b 2025ba4 <== NOT EXECUTED 2025a20: 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 ) 2025a24: 82 06 c0 19 add %i3, %i1, %g1 2025a28: 80 a0 40 02 cmp %g1, %g2 2025a2c: 18 80 00 03 bgu 2025a38 2025a30: a0 20 80 19 sub %g2, %i1, %l0 2025a34: 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; 2025a38: 03 00 81 1f sethi %hi(0x2047c00), %g1 2025a3c: f6 00 62 34 ld [ %g1 + 0x234 ], %i3 ! 2047e34 2025a40: 90 10 00 19 mov %i1, %o0 2025a44: 40 00 62 80 call 203e444 <.rem> 2025a48: 92 10 00 1b mov %i3, %o1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 2025a4c: 92 10 00 1b mov %i3, %o1 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 2025a50: a2 10 00 08 mov %o0, %l1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 2025a54: 40 00 61 d0 call 203e194 <.div> 2025a58: 90 10 00 19 mov %i1, %o0 if ( start_offset ) { 2025a5c: 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; 2025a60: b2 10 00 08 mov %o0, %i1 if ( start_offset ) { 2025a64: a4 10 00 1a mov %i2, %l2 2025a68: 02 80 00 1d be 2025adc 2025a6c: 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 ); 2025a70: 90 10 00 13 mov %l3, %o0 2025a74: 92 10 00 19 mov %i1, %o1 2025a78: 7f ff fc d1 call 2024dbc 2025a7c: 94 10 20 00 clr %o2 assert( block_ptr ); 2025a80: 80 a2 20 00 cmp %o0, 0 2025a84: 32 80 00 0a bne,a 2025aac 2025a88: 92 26 c0 11 sub %i3, %l1, %o1 2025a8c: 11 00 81 0c sethi %hi(0x2043000), %o0 <== NOT EXECUTED 2025a90: 15 00 81 0d sethi %hi(0x2043400), %o2 <== NOT EXECUTED 2025a94: 17 00 81 0c sethi %hi(0x2043000), %o3 <== NOT EXECUTED 2025a98: 90 12 23 50 or %o0, 0x350, %o0 <== NOT EXECUTED 2025a9c: 94 12 a0 c0 or %o2, 0xc0, %o2 <== NOT EXECUTED 2025aa0: 96 12 e3 f0 or %o3, 0x3f0, %o3 <== NOT EXECUTED 2025aa4: 10 bf ff c0 b 20259a4 <== NOT EXECUTED 2025aa8: 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; 2025aac: 80 a4 00 09 cmp %l0, %o1 2025ab0: 08 80 00 03 bleu 2025abc 2025ab4: 94 10 00 10 mov %l0, %o2 2025ab8: 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 ); 2025abc: d2 02 00 00 ld [ %o0 ], %o1 dest += to_copy; 2025ac0: 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 ); 2025ac4: 92 02 40 11 add %o1, %l1, %o1 dest += to_copy; block++; 2025ac8: b2 06 60 01 inc %i1 my_length -= to_copy; 2025acc: a0 24 00 0a sub %l0, %o2, %l0 2025ad0: 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 ); 2025ad4: 40 00 2b 0c call 2030704 2025ad8: 90 10 00 1a mov %i2, %o0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 2025adc: 03 00 81 1f sethi %hi(0x2047c00), %g1 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 2025ae0: a2 10 62 34 or %g1, 0x234, %l1 ! 2047e34 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 2025ae4: 10 80 00 17 b 2025b40 2025ae8: f6 00 62 34 ld [ %g1 + 0x234 ], %i3 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 2025aec: 92 10 00 19 mov %i1, %o1 2025af0: 7f ff fc b3 call 2024dbc 2025af4: 94 10 20 00 clr %o2 assert( block_ptr ); 2025af8: 80 a2 20 00 cmp %o0, 0 2025afc: 32 80 00 0a bne,a 2025b24 2025b00: d2 02 00 00 ld [ %o0 ], %o1 2025b04: 11 00 81 0c sethi %hi(0x2043000), %o0 <== NOT EXECUTED 2025b08: 15 00 81 0d sethi %hi(0x2043400), %o2 <== NOT EXECUTED 2025b0c: 17 00 81 0c sethi %hi(0x2043000), %o3 <== NOT EXECUTED 2025b10: 90 12 23 50 or %o0, 0x350, %o0 <== NOT EXECUTED 2025b14: 94 12 a0 c0 or %o2, 0xc0, %o2 <== NOT EXECUTED 2025b18: 96 12 e3 f0 or %o3, 0x3f0, %o3 <== NOT EXECUTED 2025b1c: 10 bf ff a2 b 20259a4 <== NOT EXECUTED 2025b20: 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++; 2025b24: 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 ); 2025b28: 90 10 00 12 mov %l2, %o0 dest += to_copy; block++; my_length -= to_copy; 2025b2c: a0 24 00 1b sub %l0, %i3, %l0 copied += to_copy; 2025b30: 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; 2025b34: 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 ); 2025b38: 40 00 2a f3 call 2030704 2025b3c: 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 ) { 2025b40: c2 04 40 00 ld [ %l1 ], %g1 2025b44: 80 a4 00 01 cmp %l0, %g1 2025b48: 1a bf ff e9 bcc 2025aec 2025b4c: 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 ) { 2025b50: 80 a4 20 00 cmp %l0, 0 2025b54: 02 80 00 17 be 2025bb0 2025b58: 90 07 bf f0 add %fp, -16, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 2025b5c: 92 10 00 19 mov %i1, %o1 2025b60: 90 10 00 13 mov %l3, %o0 2025b64: 7f ff fc 96 call 2024dbc 2025b68: 94 10 20 00 clr %o2 assert( block_ptr ); 2025b6c: 80 a2 20 00 cmp %o0, 0 2025b70: 32 80 00 0a bne,a 2025b98 2025b74: d2 02 00 00 ld [ %o0 ], %o1 2025b78: 11 00 81 0c sethi %hi(0x2043000), %o0 <== NOT EXECUTED 2025b7c: 15 00 81 0d sethi %hi(0x2043400), %o2 <== NOT EXECUTED 2025b80: 17 00 81 0c sethi %hi(0x2043000), %o3 <== NOT EXECUTED 2025b84: 90 12 23 50 or %o0, 0x350, %o0 <== NOT EXECUTED 2025b88: 94 12 a0 c0 or %o2, 0xc0, %o2 <== NOT EXECUTED 2025b8c: 96 12 e3 f0 or %o3, 0x3f0, %o3 <== NOT EXECUTED 2025b90: 10 bf ff 85 b 20259a4 <== NOT EXECUTED 2025b94: 92 10 22 b7 mov 0x2b7, %o1 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; 2025b98: 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 ); 2025b9c: 90 10 00 12 mov %l2, %o0 2025ba0: 94 10 00 10 mov %l0, %o2 2025ba4: 40 00 2a d8 call 2030704 2025ba8: 01 00 00 00 nop copied += my_length; } IMFS_update_atime( the_jnode ); 2025bac: 90 07 bf f0 add %fp, -16, %o0 2025bb0: 7f ff 7a 6a call 2004558 2025bb4: 92 10 20 00 clr %o1 2025bb8: c2 07 bf f0 ld [ %fp + -16 ], %g1 return copied; 2025bbc: 94 10 00 18 mov %i0, %o2 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); 2025bc0: c2 24 e0 3c st %g1, [ %l3 + 0x3c ] return copied; } 2025bc4: 81 c7 e0 08 ret 2025bc8: 91 e8 00 0a restore %g0, %o2, %o0 02025108 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 2025108: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 202510c: 80 a6 20 00 cmp %i0, 0 2025110: 32 80 00 0a bne,a 2025138 2025114: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 2025118: 11 00 81 0c sethi %hi(0x2043000), %o0 <== NOT EXECUTED 202511c: 15 00 81 0d sethi %hi(0x2043400), %o2 <== NOT EXECUTED 2025120: 17 00 81 0c sethi %hi(0x2043000), %o3 <== NOT EXECUTED 2025124: 90 12 23 50 or %o0, 0x350, %o0 <== NOT EXECUTED 2025128: 94 12 a0 d8 or %o2, 0xd8, %o2 <== NOT EXECUTED 202512c: 96 12 e3 a0 or %o3, 0x3a0, %o3 <== NOT EXECUTED 2025130: 10 80 00 0c b 2025160 <== NOT EXECUTED 2025134: 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 ); 2025138: 80 a0 60 05 cmp %g1, 5 202513c: 02 80 00 0b be 2025168 2025140: 03 00 81 1f sethi %hi(0x2047c00), %g1 2025144: 11 00 81 0c sethi %hi(0x2043000), %o0 <== NOT EXECUTED 2025148: 15 00 81 0d sethi %hi(0x2043400), %o2 <== NOT EXECUTED 202514c: 17 00 81 0c sethi %hi(0x2043000), %o3 <== NOT EXECUTED 2025150: 90 12 23 50 or %o0, 0x350, %o0 <== NOT EXECUTED 2025154: 94 12 a0 d8 or %o2, 0xd8, %o2 <== NOT EXECUTED 2025158: 96 12 e3 b0 or %o3, 0x3b0, %o3 <== NOT EXECUTED 202515c: 92 10 21 f0 mov 0x1f0, %o1 <== NOT EXECUTED 2025160: 7f ff 7b b5 call 2004034 <__assert_func> <== NOT EXECUTED 2025164: 01 00 00 00 nop <== NOT EXECUTED * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 2025168: 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; 202516c: c2 00 62 34 ld [ %g1 + 0x234 ], %g1 * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 2025170: 80 a0 a0 00 cmp %g2, 0 2025174: 02 80 00 05 be 2025188 2025178: a7 30 60 02 srl %g1, 2, %l3 memfile_free_blocks_in_table( &info->indirect, to_free ); 202517c: 90 06 20 50 add %i0, 0x50, %o0 2025180: 7f ff ff c5 call 2025094 2025184: 92 10 00 13 mov %l3, %o1 } if ( info->doubly_indirect ) { 2025188: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 202518c: 80 a0 60 00 cmp %g1, 0 2025190: 02 80 00 15 be 20251e4 2025194: 03 00 81 1f sethi %hi(0x2047c00), %g1 2025198: a0 10 20 00 clr %l0 <== NOT EXECUTED for ( i=0 ; i <== NOT EXECUTED 20251a0: a2 10 62 34 or %g1, 0x234, %l1 <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 20251a4: 85 2c 20 02 sll %l0, 2, %g2 <== NOT EXECUTED 20251a8: c2 02 00 02 ld [ %o0 + %g2 ], %g1 <== NOT EXECUTED 20251ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20251b0: 02 80 00 04 be 20251c0 <== NOT EXECUTED 20251b4: 90 02 00 02 add %o0, %g2, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( 20251b8: 7f ff ff b7 call 2025094 <== NOT EXECUTED 20251bc: 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 20251d4: 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 ); 20251d8: 90 06 20 54 add %i0, 0x54, %o0 <== NOT EXECUTED 20251dc: 7f ff ff ae call 2025094 <== NOT EXECUTED 20251e0: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED } if ( info->triply_indirect ) { 20251e4: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 20251e8: 80 a0 60 00 cmp %g1, 0 20251ec: 02 80 00 26 be 2025284 20251f0: 03 00 81 1f sethi %hi(0x2047c00), %g1 20251f4: a4 10 20 00 clr %l2 <== NOT EXECUTED for ( i=0 ; i <== NOT EXECUTED 20251fc: aa 10 62 34 or %g1, 0x234, %l5 <== NOT EXECUTED } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 2025200: a9 2c a0 02 sll %l2, 2, %l4 <== NOT EXECUTED for ( i=0 ; itriply_indirect[i]; 2025204: d0 00 40 14 ld [ %g1 + %l4 ], %o0 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 2025208: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 202520c: 22 80 00 1c be,a 202527c <== NOT EXECUTED 2025210: 90 06 20 58 add %i0, 0x58, %o0 <== NOT EXECUTED break; 2025214: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 2025218: 10 80 00 09 b 202523c <== NOT EXECUTED 202521c: a2 10 20 00 clr %l1 <== NOT EXECUTED for ( j=0 ; j <== NOT EXECUTED 2025228: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 202522c: 7f ff ff 9a call 2025094 <== NOT EXECUTED 2025230: 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 202524c: 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( 2025250: 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 2025260: 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 2025274: 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( 2025278: 90 06 20 58 add %i0, 0x58, %o0 <== NOT EXECUTED 202527c: 7f ff ff 86 call 2025094 <== NOT EXECUTED 2025280: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 2025284: 81 c7 e0 08 ret 2025288: 91 e8 20 00 restore %g0, 0, %o0 02025064 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 2025064: 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 ); 2025068: 94 10 20 00 clr %o2 <== NOT EXECUTED 202506c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2025070: 7f ff ff 53 call 2024dbc <== NOT EXECUTED 2025074: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED ptr = *block_entry_ptr; 2025078: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED *block_entry_ptr = 0; memfile_free_block( ptr ); return 1; } 202507c: 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; 2025080: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED memfile_free_block( ptr ); 2025084: 7f ff ff 38 call 2024d64 <== NOT EXECUTED 2025088: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED return 1; } 202508c: 81 c7 e0 08 ret <== NOT EXECUTED 2025090: 81 e8 00 00 restore <== NOT EXECUTED 0202561c : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 202561c: 9d e3 bf 90 save %sp, -112, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 2025620: a4 96 20 00 orcc %i0, 0, %l2 2025624: 32 80 00 0a bne,a 202564c 2025628: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 202562c: 11 00 81 0c sethi %hi(0x2043000), %o0 <== NOT EXECUTED 2025630: 15 00 81 0d sethi %hi(0x2043400), %o2 <== NOT EXECUTED 2025634: 17 00 81 0c sethi %hi(0x2043000), %o3 <== NOT EXECUTED 2025638: 90 12 23 50 or %o0, 0x350, %o0 <== NOT EXECUTED 202563c: 94 12 a0 a8 or %o2, 0xa8, %o2 <== NOT EXECUTED 2025640: 96 12 e3 a0 or %o3, 0x3a0, %o3 <== NOT EXECUTED 2025644: 10 80 00 82 b 202584c <== NOT EXECUTED 2025648: 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 ); 202564c: 80 a0 60 05 cmp %g1, 5 2025650: 02 80 00 0a be 2025678 2025654: 80 a6 a0 00 cmp %i2, 0 2025658: 11 00 81 0c sethi %hi(0x2043000), %o0 <== NOT EXECUTED 202565c: 15 00 81 0d sethi %hi(0x2043400), %o2 <== NOT EXECUTED 2025660: 17 00 81 0c sethi %hi(0x2043000), %o3 <== NOT EXECUTED 2025664: 90 12 23 50 or %o0, 0x350, %o0 <== NOT EXECUTED 2025668: 94 12 a0 a8 or %o2, 0xa8, %o2 <== NOT EXECUTED 202566c: 96 12 e3 b0 or %o3, 0x3b0, %o3 <== NOT EXECUTED 2025670: 10 80 00 77 b 202584c <== NOT EXECUTED 2025674: 92 10 22 e5 mov 0x2e5, %o1 <== NOT EXECUTED /* * Error check arguments */ assert( source ); 2025678: 12 80 00 0a bne 20256a0 202567c: 80 a6 e0 00 cmp %i3, 0 2025680: 11 00 81 0c sethi %hi(0x2043000), %o0 <== NOT EXECUTED 2025684: 15 00 81 0d sethi %hi(0x2043400), %o2 <== NOT EXECUTED 2025688: 17 00 81 0c sethi %hi(0x2043000), %o3 <== NOT EXECUTED 202568c: 90 12 23 50 or %o0, 0x350, %o0 <== NOT EXECUTED 2025690: 94 12 a0 a8 or %o2, 0xa8, %o2 <== NOT EXECUTED 2025694: 96 12 e3 e8 or %o3, 0x3e8, %o3 <== NOT EXECUTED 2025698: 10 80 00 6d b 202584c <== NOT EXECUTED 202569c: 92 10 22 ed mov 0x2ed, %o1 <== NOT EXECUTED /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 20256a0: 32 80 00 06 bne,a 20256b8 20256a4: c2 04 a0 4c ld [ %l2 + 0x4c ], %g1 rtems_set_errno_and_return_minus_one( EINVAL ); 20256a8: 40 00 22 2a call 202df50 <__errno> <== NOT EXECUTED 20256ac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20256b0: 10 80 00 0e b 20256e8 <== NOT EXECUTED 20256b4: 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; 20256b8: 92 06 c0 19 add %i3, %i1, %o1 if ( last_byte > the_jnode->info.file.size ) { 20256bc: 80 a2 40 01 cmp %o1, %g1 20256c0: 08 80 00 0d bleu 20256f4 20256c4: 03 00 81 1f sethi %hi(0x2047c00), %g1 status = IMFS_memfile_extend( the_jnode, last_byte ); 20256c8: 7f ff ff 53 call 2025414 20256cc: 90 10 00 12 mov %l2, %o0 if ( status ) 20256d0: 80 a2 20 00 cmp %o0, 0 20256d4: 02 80 00 08 be 20256f4 20256d8: 03 00 81 1f sethi %hi(0x2047c00), %g1 rtems_set_errno_and_return_minus_one( ENOSPC ); 20256dc: 40 00 22 1d call 202df50 <__errno> <== NOT EXECUTED 20256e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20256e4: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 20256e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20256ec: 81 c7 e0 08 ret <== NOT EXECUTED 20256f0: 81 e8 00 00 restore <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 20256f4: e0 00 62 34 ld [ %g1 + 0x234 ], %l0 20256f8: 90 10 00 19 mov %i1, %o0 20256fc: 40 00 63 52 call 203e444 <.rem> 2025700: 92 10 00 10 mov %l0, %o1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 2025704: 92 10 00 10 mov %l0, %o1 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 2025708: a2 10 00 08 mov %o0, %l1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 202570c: 40 00 62 a2 call 203e194 <.div> 2025710: 90 10 00 19 mov %i1, %o0 if ( start_offset ) { 2025714: 80 a4 60 00 cmp %l1, 0 2025718: 12 80 00 05 bne 202572c 202571c: b2 10 00 08 mov %o0, %i1 2025720: a0 10 00 1a mov %i2, %l0 2025724: 10 80 00 1c b 2025794 2025728: 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 ); 202572c: 90 10 00 12 mov %l2, %o0 2025730: 92 10 00 19 mov %i1, %o1 2025734: 7f ff fd a2 call 2024dbc 2025738: 94 10 20 00 clr %o2 assert( block_ptr ); 202573c: 80 a2 20 00 cmp %o0, 0 2025740: 32 80 00 0a bne,a 2025768 2025744: 94 24 00 11 sub %l0, %l1, %o2 2025748: 11 00 81 0c sethi %hi(0x2043000), %o0 <== NOT EXECUTED 202574c: 15 00 81 0d sethi %hi(0x2043400), %o2 <== NOT EXECUTED 2025750: 17 00 81 0c sethi %hi(0x2043000), %o3 <== NOT EXECUTED 2025754: 90 12 23 50 or %o0, 0x350, %o0 <== NOT EXECUTED 2025758: 94 12 a0 a8 or %o2, 0xa8, %o2 <== NOT EXECUTED 202575c: 96 12 e3 f0 or %o3, 0x3f0, %o3 <== NOT EXECUTED 2025760: 10 80 00 3b b 202584c <== NOT EXECUTED 2025764: 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; 2025768: 80 a2 80 1b cmp %o2, %i3 202576c: 38 80 00 02 bgu,a 2025774 2025770: 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 ); 2025774: d0 02 00 00 ld [ %o0 ], %o0 src += to_copy; 2025778: 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 ); 202577c: 90 02 00 11 add %o0, %l1, %o0 src += to_copy; block++; 2025780: b2 06 60 01 inc %i1 my_length -= to_copy; 2025784: b6 26 c0 0a sub %i3, %o2, %i3 copied += to_copy; 2025788: 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 ); 202578c: 40 00 2b de call 2030704 2025790: 92 10 00 1a mov %i2, %o1 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 2025794: 03 00 81 1f sethi %hi(0x2047c00), %g1 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 2025798: a2 10 62 34 or %g1, 0x234, %l1 ! 2047e34 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 202579c: 10 80 00 17 b 20257f8 20257a0: f4 00 62 34 ld [ %g1 + 0x234 ], %i2 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 20257a4: 92 10 00 19 mov %i1, %o1 20257a8: 7f ff fd 85 call 2024dbc 20257ac: 94 10 20 00 clr %o2 assert( block_ptr ); 20257b0: 80 a2 20 00 cmp %o0, 0 20257b4: 32 80 00 0a bne,a 20257dc 20257b8: d0 02 00 00 ld [ %o0 ], %o0 20257bc: 11 00 81 0c sethi %hi(0x2043000), %o0 <== NOT EXECUTED 20257c0: 15 00 81 0d sethi %hi(0x2043400), %o2 <== NOT EXECUTED 20257c4: 17 00 81 0c sethi %hi(0x2043000), %o3 <== NOT EXECUTED 20257c8: 90 12 23 50 or %o0, 0x350, %o0 <== NOT EXECUTED 20257cc: 94 12 a0 a8 or %o2, 0xa8, %o2 <== NOT EXECUTED 20257d0: 96 12 e3 f0 or %o3, 0x3f0, %o3 <== NOT EXECUTED 20257d4: 10 80 00 1e b 202584c <== NOT EXECUTED 20257d8: 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 ); 20257dc: 92 10 00 10 mov %l0, %o1 src += to_copy; block++; 20257e0: b2 06 60 01 inc %i1 my_length -= to_copy; 20257e4: b6 26 c0 1a sub %i3, %i2, %i3 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 20257e8: 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; 20257ec: 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 ); 20257f0: 40 00 2b c5 call 2030704 20257f4: 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 ) { 20257f8: c2 04 40 00 ld [ %l1 ], %g1 20257fc: 80 a6 c0 01 cmp %i3, %g1 2025800: 1a bf ff e9 bcc 20257a4 2025804: 90 10 00 12 mov %l2, %o0 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 2025808: 80 a6 e0 00 cmp %i3, 0 202580c: 02 80 00 17 be 2025868 2025810: 90 07 bf f0 add %fp, -16, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 2025814: 92 10 00 19 mov %i1, %o1 2025818: 90 10 00 12 mov %l2, %o0 202581c: 7f ff fd 68 call 2024dbc 2025820: 94 10 20 00 clr %o2 assert( block_ptr ); 2025824: 80 a2 20 00 cmp %o0, 0 2025828: 32 80 00 0b bne,a 2025854 202582c: d0 02 00 00 ld [ %o0 ], %o0 2025830: 11 00 81 0c sethi %hi(0x2043000), %o0 <== NOT EXECUTED 2025834: 15 00 81 0d sethi %hi(0x2043400), %o2 <== NOT EXECUTED 2025838: 17 00 81 0c sethi %hi(0x2043000), %o3 <== NOT EXECUTED 202583c: 90 12 23 50 or %o0, 0x350, %o0 <== NOT EXECUTED 2025840: 94 12 a0 a8 or %o2, 0xa8, %o2 <== NOT EXECUTED 2025844: 96 12 e3 f0 or %o3, 0x3f0, %o3 <== NOT EXECUTED 2025848: 92 10 23 44 mov 0x344, %o1 <== NOT EXECUTED 202584c: 7f ff 79 fa call 2004034 <__assert_func> <== NOT EXECUTED 2025850: 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; 2025854: 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 ); 2025858: 92 10 00 10 mov %l0, %o1 202585c: 40 00 2b aa call 2030704 2025860: 94 10 00 1b mov %i3, %o2 my_length = 0; copied += to_copy; } IMFS_atime_mtime_update( the_jnode ); 2025864: 90 07 bf f0 add %fp, -16, %o0 2025868: 7f ff 7b 3c call 2004558 202586c: 92 10 20 00 clr %o1 2025870: c2 07 bf f0 ld [ %fp + -16 ], %g1 2025874: c2 24 a0 3c st %g1, [ %l2 + 0x3c ] 2025878: c2 24 a0 40 st %g1, [ %l2 + 0x40 ] return copied; } 202587c: 81 c7 e0 08 ret 2025880: 81 e8 00 00 restore 02009d1c : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 2009d1c: 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 ); 2009d20: 90 10 00 18 mov %i0, %o0 2009d24: 92 07 bf c0 add %fp, -64, %o1 2009d28: 7f ff ff 8f call 2009b64 2009d2c: 94 07 bf f4 add %fp, -12, %o2 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 2009d30: 03 00 00 3c sethi %hi(0xf000), %g1 2009d34: b3 2e 60 10 sll %i1, 0x10, %i1 2009d38: 97 36 60 10 srl %i1, 0x10, %o3 2009d3c: 84 0a c0 01 and %o3, %g1, %g2 2009d40: 03 00 00 10 sethi %hi(0x4000), %g1 2009d44: 80 a0 80 01 cmp %g2, %g1 2009d48: 02 80 00 17 be 2009da4 2009d4c: 90 10 00 1c mov %i4, %o0 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 2009d50: 03 00 00 20 sethi %hi(0x8000), %g1 2009d54: 80 a0 80 01 cmp %g2, %g1 2009d58: 02 80 00 14 be 2009da8 2009d5c: 92 10 20 05 mov 5, %o1 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 2009d60: 03 00 00 18 sethi %hi(0x6000), %g1 2009d64: 80 a0 80 01 cmp %g2, %g1 2009d68: 02 80 00 05 be 2009d7c 2009d6c: 03 00 00 08 sethi %hi(0x2000), %g1 2009d70: 80 a0 80 01 cmp %g2, %g1 2009d74: 12 80 00 06 bne 2009d8c 2009d78: 01 00 00 00 nop type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 2009d7c: f4 27 bf e4 st %i2, [ %fp + -28 ] 2009d80: f6 27 bf e8 st %i3, [ %fp + -24 ] 2009d84: 10 80 00 09 b 2009da8 2009d88: 92 10 20 02 mov 2, %o1 } else { rtems_set_errno_and_return_minus_one( EINVAL ); 2009d8c: 40 00 0c 90 call 200cfcc <__errno> <== NOT EXECUTED 2009d90: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2009d94: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2009d98: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2009d9c: 81 c7 e0 08 ret <== NOT EXECUTED 2009da0: 81 e8 00 00 restore <== NOT EXECUTED 2009da4: 92 10 20 01 mov 1, %o1 /* * Allocate and fill in an IMFS jnode */ new_node = IMFS_create_node( 2009da8: 94 07 bf c0 add %fp, -64, %o2 2009dac: 98 07 bf e4 add %fp, -28, %o4 2009db0: 40 00 09 78 call 200c390 2009db4: b0 10 20 00 clr %i0 new_name, mode, &info ); if ( !new_node ) 2009db8: 80 a2 20 00 cmp %o0, 0 2009dbc: 12 80 00 06 bne 2009dd4 2009dc0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOMEM ); 2009dc4: 40 00 0c 82 call 200cfcc <__errno> <== NOT EXECUTED 2009dc8: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 2009dcc: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 2009dd0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; } 2009dd4: 81 c7 e0 08 ret 2009dd8: 81 e8 00 00 restore 02003c90 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 2003c90: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 2003c94: c4 06 20 08 ld [ %i0 + 8 ], %g2 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 2003c98: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1 2003c9c: 80 a0 60 01 cmp %g1, 1 2003ca0: 22 80 00 08 be,a 2003cc0 2003ca4: f0 20 a0 58 st %i0, [ %g2 + 0x58 ] rtems_set_errno_and_return_minus_one( ENOTDIR ); 2003ca8: 40 00 a8 aa call 202df50 <__errno> <== NOT EXECUTED 2003cac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2003cb0: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 2003cb4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2003cb8: 81 c7 e0 08 ret <== NOT EXECUTED 2003cbc: 81 e8 00 00 restore <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } 2003cc0: 81 c7 e0 08 ret 2003cc4: 91 e8 20 00 restore %g0, 0, %o0 02003938 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 2003938: 9d e3 bf 98 save %sp, -104, %sp assert( the_jnode ); 200393c: 80 a6 20 00 cmp %i0, 0 2003940: 12 80 00 0a bne 2003968 2003944: 21 00 80 7a sethi %hi(0x201e800), %l0 2003948: 11 00 80 72 sethi %hi(0x201c800), %o0 <== NOT EXECUTED 200394c: 15 00 80 72 sethi %hi(0x201c800), %o2 <== NOT EXECUTED 2003950: 17 00 80 72 sethi %hi(0x201c800), %o3 <== NOT EXECUTED 2003954: 90 12 21 28 or %o0, 0x128, %o0 <== NOT EXECUTED 2003958: 94 12 a3 00 or %o2, 0x300, %o2 <== NOT EXECUTED 200395c: 96 12 e1 78 or %o3, 0x178, %o3 <== NOT EXECUTED 2003960: 10 80 00 3b b 2003a4c <== NOT EXECUTED 2003964: 92 10 20 38 mov 0x38, %o1 <== NOT EXECUTED fprintf(stdout, "%s", the_jnode->name ); 2003968: c2 04 23 78 ld [ %l0 + 0x378 ], %g1 200396c: 90 06 20 0c add %i0, 0xc, %o0 2003970: 40 00 38 1e call 20119e8 2003974: d2 00 60 08 ld [ %g1 + 8 ], %o1 switch( the_jnode->type ) { 2003978: d4 06 20 48 ld [ %i0 + 0x48 ], %o2 200397c: 82 02 bf ff add %o2, -1, %g1 2003980: 80 a0 60 05 cmp %g1, 5 2003984: 38 80 00 3b bgu,a 2003a70 2003988: c2 04 23 78 ld [ %l0 + 0x378 ], %g1 <== NOT EXECUTED 200398c: 83 28 60 02 sll %g1, 2, %g1 2003990: 05 00 80 0e sethi %hi(0x2003800), %g2 2003994: 84 10 a0 e4 or %g2, 0xe4, %g2 ! 20038e4 2003998: c2 00 80 01 ld [ %g2 + %g1 ], %g1 200399c: 81 c0 40 00 jmp %g1 20039a0: 01 00 00 00 nop case IMFS_DIRECTORY: fprintf(stdout, "/" ); 20039a4: c2 04 23 78 ld [ %l0 + 0x378 ], %g1 20039a8: 90 10 20 2f mov 0x2f, %o0 20039ac: 40 00 37 d7 call 2011908 20039b0: d2 00 60 08 ld [ %g1 + 8 ], %o1 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 20039b4: 10 80 00 35 b 2003a88 20039b8: 31 00 80 72 sethi %hi(0x201c800), %i0 case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 20039bc: c2 04 23 78 ld [ %l0 + 0x378 ], %g1 20039c0: 13 00 80 72 sethi %hi(0x201c800), %o1 20039c4: d6 06 20 50 ld [ %i0 + 0x50 ], %o3 20039c8: d0 00 60 08 ld [ %g1 + 8 ], %o0 20039cc: d4 06 20 4c ld [ %i0 + 0x4c ], %o2 20039d0: 10 80 00 08 b 20039f0 20039d4: 92 12 61 88 or %o1, 0x188, %o1 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 20039d8: c2 04 23 78 ld [ %l0 + 0x378 ], %g1 <== NOT EXECUTED 20039dc: d6 06 20 50 ld [ %i0 + 0x50 ], %o3 <== NOT EXECUTED 20039e0: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 20039e4: d4 06 20 4c ld [ %i0 + 0x4c ], %o2 <== NOT EXECUTED 20039e8: 13 00 80 72 sethi %hi(0x201c800), %o1 <== NOT EXECUTED 20039ec: 92 12 61 a0 or %o1, 0x1a0, %o1 ! 201c9a0 <== NOT EXECUTED 20039f0: 40 00 37 ac call 20118a0 20039f4: 31 00 80 72 sethi %hi(0x201c800), %i0 20039f8: 30 80 00 24 b,a 2003a88 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 20039fc: c2 04 23 78 ld [ %l0 + 0x378 ], %g1 2003a00: d4 06 20 4c ld [ %i0 + 0x4c ], %o2 2003a04: d0 00 60 08 ld [ %g1 + 8 ], %o0 2003a08: 13 00 80 72 sethi %hi(0x201c800), %o1 2003a0c: 40 00 37 a5 call 20118a0 2003a10: 92 12 61 b0 or %o1, 0x1b0, %o1 ! 201c9b0 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 2003a14: 10 80 00 1d b 2003a88 2003a18: 31 00 80 72 sethi %hi(0x201c800), %i0 (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 2003a1c: c2 04 23 78 ld [ %l0 + 0x378 ], %g1 <== NOT EXECUTED 2003a20: 11 00 80 72 sethi %hi(0x201c800), %o0 <== NOT EXECUTED 2003a24: d2 00 60 08 ld [ %g1 + 8 ], %o1 <== NOT EXECUTED 2003a28: 40 00 37 f0 call 20119e8 <== NOT EXECUTED 2003a2c: 90 12 21 c0 or %o0, 0x1c0, %o0 <== NOT EXECUTED assert(0); 2003a30: 92 10 20 5d mov 0x5d, %o1 <== NOT EXECUTED 2003a34: 11 00 80 72 sethi %hi(0x201c800), %o0 <== NOT EXECUTED 2003a38: 15 00 80 72 sethi %hi(0x201c800), %o2 <== NOT EXECUTED 2003a3c: 17 00 80 72 sethi %hi(0x201c800), %o3 <== NOT EXECUTED 2003a40: 90 12 21 28 or %o0, 0x128, %o0 <== NOT EXECUTED 2003a44: 94 12 a3 00 or %o2, 0x300, %o2 <== NOT EXECUTED 2003a48: 96 12 e1 d8 or %o3, 0x1d8, %o3 <== NOT EXECUTED 2003a4c: 40 00 01 ea call 20041f4 <__assert_func> <== NOT EXECUTED 2003a50: 01 00 00 00 nop <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 2003a54: c2 04 23 78 ld [ %l0 + 0x378 ], %g1 <== NOT EXECUTED 2003a58: 11 00 80 72 sethi %hi(0x201c800), %o0 <== NOT EXECUTED 2003a5c: d2 00 60 08 ld [ %g1 + 8 ], %o1 <== NOT EXECUTED 2003a60: 40 00 37 e2 call 20119e8 <== NOT EXECUTED 2003a64: 90 12 21 c0 or %o0, 0x1c0, %o0 <== NOT EXECUTED assert(0); 2003a68: 10 bf ff f3 b 2003a34 <== NOT EXECUTED 2003a6c: 92 10 20 62 mov 0x62, %o1 <== NOT EXECUTED break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 2003a70: 13 00 80 72 sethi %hi(0x201c800), %o1 <== NOT EXECUTED 2003a74: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 2003a78: 40 00 37 8a call 20118a0 <== NOT EXECUTED 2003a7c: 92 12 61 e0 or %o1, 0x1e0, %o1 <== NOT EXECUTED assert(0); 2003a80: 10 bf ff ed b 2003a34 <== NOT EXECUTED 2003a84: 92 10 20 67 mov 0x67, %o1 <== NOT EXECUTED break; } puts(""); 2003a88: 40 00 3e 77 call 2013464 2003a8c: 91 ee 20 d8 restore %i0, 0xd8, %o0 2003a90: 01 00 00 00 nop 02003cd4 : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 2003cd4: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *node; int i; node = loc->node_access; 2003cd8: c6 06 00 00 ld [ %i0 ], %g3 if ( node->type != IMFS_SYM_LINK ) 2003cdc: c2 00 e0 48 ld [ %g3 + 0x48 ], %g1 2003ce0: 80 a0 60 04 cmp %g1, 4 2003ce4: 02 80 00 0a be 2003d0c 2003ce8: b0 10 20 00 clr %i0 rtems_set_errno_and_return_minus_one( EINVAL ); 2003cec: 40 00 a8 99 call 202df50 <__errno> <== NOT EXECUTED 2003cf0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2003cf4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2003cf8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2003cfc: 81 c7 e0 08 ret <== NOT EXECUTED 2003d00: 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]; 2003d04: 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++ ) 2003d08: b0 06 20 01 inc %i0 2003d0c: 80 a6 00 1a cmp %i0, %i2 2003d10: 1a 80 00 07 bcc 2003d2c 2003d14: 01 00 00 00 nop 2003d18: c2 00 e0 4c ld [ %g3 + 0x4c ], %g1 2003d1c: c4 48 40 18 ldsb [ %g1 + %i0 ], %g2 2003d20: 80 a0 a0 00 cmp %g2, 0 2003d24: 12 bf ff f8 bne 2003d04 2003d28: c2 08 40 18 ldub [ %g1 + %i0 ], %g1 buf[i] = node->info.sym_link.name[i]; return i; } 2003d2c: 81 c7 e0 08 ret 2003d30: 81 e8 00 00 restore 02009de8 : */ int IMFS_rmnod( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 2009de8: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 2009dec: 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 ) { 2009df0: c2 04 20 08 ld [ %l0 + 8 ], %g1 2009df4: 80 a0 60 00 cmp %g1, 0 2009df8: 22 80 00 06 be,a 2009e10 2009dfc: 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 ); 2009e00: 40 00 06 23 call 200b68c <_Chain_Extract> 2009e04: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 2009e08: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 2009e0c: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 2009e10: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 2009e14: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 2009e18: 90 07 bf f0 add %fp, -16, %o0 2009e1c: 40 00 01 4b call 200a348 2009e20: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 2009e24: 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) ) { 2009e28: 90 10 00 10 mov %l0, %o0 2009e2c: 40 00 01 80 call 200a42c 2009e30: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 2009e34: 80 a2 20 00 cmp %o0, 0 2009e38: 12 80 00 18 bne 2009e98 2009e3c: 01 00 00 00 nop 2009e40: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 2009e44: 80 a0 60 00 cmp %g1, 0 2009e48: 12 80 00 14 bne 2009e98 2009e4c: 03 00 80 5b sethi %hi(0x2016c00), %g1 /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 2009e50: c6 00 61 34 ld [ %g1 + 0x134 ], %g3 ! 2016d34 2009e54: c4 06 00 00 ld [ %i0 ], %g2 2009e58: c2 00 e0 04 ld [ %g3 + 4 ], %g1 2009e5c: 80 a0 40 02 cmp %g1, %g2 2009e60: 22 80 00 02 be,a 2009e68 2009e64: c0 20 e0 04 clr [ %g3 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 2009e68: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 2009e6c: 80 a0 60 04 cmp %g1, 4 2009e70: 12 80 00 08 bne 2009e90 2009e74: 01 00 00 00 nop if ( the_jnode->info.sym_link.name ) 2009e78: d0 04 20 4c ld [ %l0 + 0x4c ], %o0 2009e7c: 80 a2 20 00 cmp %o0, 0 2009e80: 02 80 00 04 be 2009e90 2009e84: 01 00 00 00 nop free( (void*) the_jnode->info.sym_link.name ); 2009e88: 40 00 00 c1 call 200a18c 2009e8c: 01 00 00 00 nop } free( the_jnode ); 2009e90: 40 00 00 bf call 200a18c 2009e94: 90 10 00 10 mov %l0, %o0 } return 0; } 2009e98: 81 c7 e0 08 ret 2009e9c: 91 e8 20 00 restore %g0, 0, %o0 02009ea0 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 2009ea0: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 2009ea4: f0 06 00 00 ld [ %i0 ], %i0 switch ( the_jnode->type ) { 2009ea8: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 2009eac: 80 a0 60 04 cmp %g1, 4 2009eb0: 22 80 00 19 be,a 2009f14 2009eb4: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED 2009eb8: 14 80 00 07 bg 2009ed4 2009ebc: 80 a0 60 06 cmp %g1, 6 2009ec0: 80 a0 60 02 cmp %g1, 2 2009ec4: 12 80 00 0e bne 2009efc 2009ec8: 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 ); 2009ecc: 10 80 00 06 b 2009ee4 2009ed0: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 2009ed4: 14 80 00 0a bg 2009efc 2009ed8: 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; 2009edc: 10 80 00 06 b 2009ef4 2009ee0: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 2009ee4: 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 ); 2009ee8: c2 26 60 04 st %g1, [ %i1 + 4 ] 2009eec: 10 80 00 0a b 2009f14 2009ef0: c4 26 40 00 st %g2, [ %i1 ] break; case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 2009ef4: 10 80 00 08 b 2009f14 2009ef8: 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 ); 2009efc: 40 00 0c 34 call 200cfcc <__errno> <== NOT EXECUTED 2009f00: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2009f04: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 2009f08: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2009f0c: 81 c7 e0 08 ret <== NOT EXECUTED 2009f10: 81 e8 00 00 restore <== NOT EXECUTED break; } buf->st_mode = the_jnode->st_mode; 2009f14: c2 16 20 2e lduh [ %i0 + 0x2e ], %g1 buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 2009f18: 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; 2009f1c: c2 36 60 0c sth %g1, [ %i1 + 0xc ] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 2009f20: 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; 2009f24: 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; 2009f28: 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; 2009f2c: 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; 2009f30: 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; 2009f34: 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; 2009f38: 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; 2009f3c: 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; 2009f40: 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; 2009f44: 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; 2009f48: 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; 2009f4c: 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; 2009f50: c2 26 60 34 st %g1, [ %i1 + 0x34 ] return 0; } 2009f54: 81 c7 e0 08 ret 2009f58: 91 e8 20 00 restore %g0, 0, %o0 02003d34 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 2003d34: 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 ); 2003d38: 94 07 bf f4 add %fp, -12, %o2 2003d3c: a0 07 bf c0 add %fp, -64, %l0 2003d40: 90 10 00 1a mov %i2, %o0 2003d44: 7f ff ff 01 call 2003948 2003d48: 92 10 00 10 mov %l0, %o1 /* * Duplicate link name */ info.sym_link.name = strdup( link_name); 2003d4c: 40 00 bd 57 call 20332a8 2003d50: 90 10 00 19 mov %i1, %o0 2003d54: d0 27 bf e4 st %o0, [ %fp + -28 ] if (info.sym_link.name == NULL) { 2003d58: 80 a2 20 00 cmp %o0, 0 2003d5c: 12 80 00 08 bne 2003d7c 2003d60: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( ENOMEM); 2003d64: 40 00 a8 7b call 202df50 <__errno> <== NOT EXECUTED 2003d68: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2003d6c: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 2003d70: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2003d74: 81 c7 e0 08 ret 2003d78: 81 e8 00 00 restore /* * Create a new link node. */ new_node = IMFS_create_node( 2003d7c: 94 10 00 10 mov %l0, %o2 2003d80: 92 10 20 04 mov 4, %o1 2003d84: 17 00 00 28 sethi %hi(0xa000), %o3 2003d88: 98 07 bf e4 add %fp, -28, %o4 2003d8c: 96 12 e1 ff or %o3, 0x1ff, %o3 2003d90: 40 00 63 92 call 201cbd8 2003d94: b0 10 20 00 clr %i0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 2003d98: 80 a2 20 00 cmp %o0, 0 2003d9c: 12 bf ff f6 bne 2003d74 2003da0: d0 07 bf e4 ld [ %fp + -28 ], %o0 free( info.sym_link.name); 2003da4: 40 00 01 c3 call 20044b0 <== NOT EXECUTED 2003da8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM); 2003dac: 40 00 a8 69 call 202df50 <__errno> <== NOT EXECUTED 2003db0: 01 00 00 00 nop <== NOT EXECUTED 2003db4: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 2003db8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return 0; } 2003dbc: 81 c7 e0 08 ret <== NOT EXECUTED 2003dc0: 81 e8 00 00 restore <== NOT EXECUTED 02003dc4 : #include int IMFS_unlink( rtems_filesystem_location_info_t *loc /* IN */ ) { 2003dc4: 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; 2003dc8: 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 ) { 2003dcc: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 2003dd0: 80 a0 60 03 cmp %g1, 3 2003dd4: 32 80 00 29 bne,a 2003e78 2003dd8: c2 06 20 04 ld [ %i0 + 4 ], %g1 if ( !node->info.hard_link.link_node ) 2003ddc: e2 04 20 4c ld [ %l0 + 0x4c ], %l1 2003de0: 80 a4 60 00 cmp %l1, 0 2003de4: 12 80 00 08 bne 2003e04 2003de8: a4 07 bf e0 add %fp, -32, %l2 rtems_set_errno_and_return_minus_one( EINVAL ); 2003dec: 40 00 a8 59 call 202df50 <__errno> <== NOT EXECUTED 2003df0: 01 00 00 00 nop <== NOT EXECUTED 2003df4: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 2003df8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2003dfc: 10 80 00 22 b 2003e84 <== NOT EXECUTED 2003e00: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED the_link = *loc; 2003e04: 92 10 00 18 mov %i0, %o1 2003e08: 94 10 20 10 mov 0x10, %o2 2003e0c: 40 00 b2 3e call 2030704 2003e10: 90 10 00 12 mov %l2, %o0 the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 2003e14: 90 10 00 12 mov %l2, %o0 2003e18: 40 00 63 cb call 201cd44 2003e1c: 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) 2003e20: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 2003e24: c2 10 a0 30 lduh [ %g2 + 0x30 ], %g1 2003e28: 80 a0 60 01 cmp %g1, 1 2003e2c: 12 80 00 0b bne 2003e58 2003e30: 82 00 7f ff add %g1, -1, %g1 { result = (*the_link.handlers->rmnod_h)( &the_link ); 2003e34: c2 07 bf e4 ld [ %fp + -28 ], %g1 2003e38: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 2003e3c: 9f c0 40 00 call %g1 2003e40: 90 10 00 12 mov %l2, %o0 if ( result != 0 ) 2003e44: 80 a2 20 00 cmp %o0, 0 2003e48: 02 80 00 0b be 2003e74 2003e4c: 90 10 3f ff mov -1, %o0 */ result = (*loc->handlers->rmnod_h)( loc ); return result; } 2003e50: 81 c7 e0 08 ret 2003e54: 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 ); 2003e58: 90 07 bf f0 add %fp, -16, %o0 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 2003e5c: c2 30 a0 30 sth %g1, [ %g2 + 0x30 ] IMFS_update_ctime( node->info.hard_link.link_node ); 2003e60: 40 00 01 be call 2004558 2003e64: 92 10 20 00 clr %o1 2003e68: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 2003e6c: c2 07 bf f0 ld [ %fp + -16 ], %g1 2003e70: c2 20 a0 44 st %g1, [ %g2 + 0x44 ] /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( loc ); 2003e74: c2 06 20 04 ld [ %i0 + 4 ], %g1 2003e78: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 2003e7c: 9f c0 40 00 call %g1 2003e80: 90 10 00 18 mov %i0, %o0 return result; } 2003e84: b0 10 00 08 mov %o0, %i0 2003e88: 81 c7 e0 08 ret 2003e8c: 81 e8 00 00 restore 02003e90 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 2003e90: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 2003e94: c4 06 20 08 ld [ %i0 + 8 ], %g2 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 2003e98: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1 2003e9c: 80 a0 60 01 cmp %g1, 1 2003ea0: 22 80 00 06 be,a 2003eb8 2003ea4: c2 00 a0 58 ld [ %g2 + 0x58 ], %g1 rtems_set_errno_and_return_minus_one( ENOTDIR ); 2003ea8: 40 00 a8 2a call 202df50 <__errno> <== NOT EXECUTED 2003eac: 01 00 00 00 nop <== NOT EXECUTED 2003eb0: 10 80 00 08 b 2003ed0 <== NOT EXECUTED 2003eb4: 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 ) 2003eb8: 80 a0 60 00 cmp %g1, 0 2003ebc: 32 80 00 08 bne,a 2003edc 2003ec0: c0 20 a0 58 clr [ %g2 + 0x58 ] rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 2003ec4: 40 00 a8 23 call 202df50 <__errno> <== NOT EXECUTED 2003ec8: 01 00 00 00 nop <== NOT EXECUTED 2003ecc: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 2003ed0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2003ed4: 81 c7 e0 08 ret <== NOT EXECUTED 2003ed8: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 2003edc: 81 c7 e0 08 ret 2003ee0: 91 e8 20 00 restore %g0, 0, %o0 020021b8 : void RTEMS_Malloc_Initialize( void *start, size_t length, size_t sbrk_amount ) { 20021b8: 9d e3 bf 98 save %sp, -104, %sp #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers ) 20021bc: 03 00 80 5c sethi %hi(0x2017000), %g1 20021c0: c2 00 62 74 ld [ %g1 + 0x274 ], %g1 ! 2017274 20021c4: 80 a0 60 00 cmp %g1, 0 20021c8: 02 80 00 05 be 20021dc 20021cc: 01 00 00 00 nop (*rtems_malloc_statistics_helpers->initialize)(); 20021d0: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 20021d4: 9f c0 40 00 call %g1 <== NOT EXECUTED 20021d8: 01 00 00 00 nop <== NOT EXECUTED /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 20021dc: 40 00 21 39 call 200a6c0 20021e0: a0 10 00 18 mov %i0, %l0 starting_address = start; /* * Initialize the optional sbrk support for extending the heap */ if (rtems_malloc_sbrk_helpers) { 20021e4: 03 00 80 5c sethi %hi(0x2017000), %g1 20021e8: c2 00 62 78 ld [ %g1 + 0x278 ], %g1 ! 2017278 20021ec: 80 a0 60 00 cmp %g1, 0 20021f0: 02 80 00 06 be 2002208 20021f4: 90 10 00 18 mov %i0, %o0 starting_address = (*rtems_malloc_sbrk_helpers->initialize)( 20021f8: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 20021fc: 9f c0 40 00 call %g1 <== NOT EXECUTED 2002200: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 2002204: 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() ) 2002208: 03 00 80 5d sethi %hi(0x2017400), %g1 200220c: c2 00 63 8c ld [ %g1 + 0x38c ], %g1 ! 201778c <_Configuration_Table> 2002210: c2 08 60 28 ldub [ %g1 + 0x28 ], %g1 2002214: 80 a0 60 00 cmp %g1, 0 2002218: 02 80 00 07 be 2002234 200221c: 92 10 00 10 mov %l0, %o1 memset( starting_address, 0, length ); 2002220: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2002224: 92 10 20 00 clr %o1 <== NOT EXECUTED 2002228: 40 00 2d 94 call 200d878 <== NOT EXECUTED 200222c: 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 ); 2002230: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 2002234: 11 00 80 5d sethi %hi(0x2017400), %o0 2002238: 94 10 00 19 mov %i1, %o2 200223c: 90 12 21 20 or %o0, 0x120, %o0 2002240: 40 00 10 99 call 20064a4 <_Heap_Initialize> 2002244: 96 10 20 08 mov 8, %o3 &RTEMS_Malloc_Heap, starting_address, length, CPU_HEAP_ALIGNMENT ); if ( !status ) 2002248: 80 a2 20 00 cmp %o0, 0 200224c: 12 80 00 04 bne 200225c 2002250: 05 00 80 5d sethi %hi(0x2017400), %g2 rtems_fatal_error_occurred( status ); 2002254: 40 00 0e 40 call 2005b54 <== NOT EXECUTED 2002258: 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); 200225c: c2 00 a1 78 ld [ %g2 + 0x178 ], %g1 2002260: 82 06 40 01 add %i1, %g1, %g1 2002264: c2 20 a1 78 st %g1, [ %g2 + 0x178 ] } 2002268: 81 c7 e0 08 ret 200226c: 81 e8 00 00 restore 02002d0c : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 2002d0c: 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 ) 2002d10: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 2002d14: 02 80 00 4a be 2002e3c <== NOT EXECUTED 2002d18: 03 00 81 1f sethi %hi(0x2047c00), %g1 <== NOT EXECUTED return; if ( !print_handler ) 2002d1c: e8 00 62 30 ld [ %g1 + 0x230 ], %l4 ! 2047e30 <== NOT EXECUTED 2002d20: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED 2002d24: 02 80 00 46 be 2002e3c <== NOT EXECUTED 2002d28: 80 a6 3f ff cmp %i0, -1 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 2002d2c: 32 80 00 0b bne,a 2002d58 <== NOT EXECUTED 2002d30: ec 06 21 50 ld [ %i0 + 0x150 ], %l6 <== NOT EXECUTED if (Stack_check_Interrupt_stack.area) { 2002d34: 03 00 81 6b sethi %hi(0x205ac00), %g1 <== NOT EXECUTED 2002d38: 96 10 63 64 or %g1, 0x364, %o3 ! 205af64 <== NOT EXECUTED 2002d3c: c2 02 e0 04 ld [ %o3 + 4 ], %g1 <== NOT EXECUTED 2002d40: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2002d44: 02 80 00 3e be 2002e3c <== NOT EXECUTED 2002d48: a4 10 00 0b mov %o3, %l2 <== NOT EXECUTED stack = &Stack_check_Interrupt_stack; the_thread = 0; current = 0; } else return; 2002d4c: b0 10 20 00 clr %i0 <== NOT EXECUTED 2002d50: 10 80 00 03 b 2002d5c <== NOT EXECUTED 2002d54: ac 10 20 00 clr %l6 <== NOT EXECUTED } else { stack = &the_thread->Start.Initial_stack; 2002d58: 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); 2002d5c: e0 04 a0 04 ld [ %l2 + 4 ], %l0 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 2002d60: 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); 2002d64: a0 04 20 10 add %l0, 0x10, %l0 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 2002d68: a6 00 7f f0 add %g1, -16, %l3 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 2002d6c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2002d70: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED 2002d74: 7f ff ff d6 call 2002ccc <== NOT EXECUTED 2002d78: a0 04 00 13 add %l0, %l3, %l0 <== NOT EXECUTED if ( high_water_mark ) 2002d7c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2002d80: 12 80 00 03 bne 2002d8c <== NOT EXECUTED 2002d84: aa 24 00 08 sub %l0, %o0, %l5 <== NOT EXECUTED 2002d88: aa 10 20 00 clr %l5 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { 2002d8c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 2002d90: 02 80 00 10 be 2002dd0 <== NOT EXECUTED 2002d94: 03 00 81 1f sethi %hi(0x2047c00), %g1 <== NOT EXECUTED (*print_handler)( 2002d98: e0 06 20 08 ld [ %i0 + 8 ], %l0 <== NOT EXECUTED 2002d9c: e2 00 62 2c ld [ %g1 + 0x22c ], %l1 <== NOT EXECUTED 2002da0: 94 07 bf f0 add %fp, -16, %o2 <== NOT EXECUTED 2002da4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2002da8: 40 00 15 06 call 20081c0 <== NOT EXECUTED 2002dac: 92 10 20 05 mov 5, %o1 <== NOT EXECUTED 2002db0: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 2002db4: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED 2002db8: 13 00 81 01 sethi %hi(0x2040400), %o1 <== NOT EXECUTED 2002dbc: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2002dc0: 9f c5 00 00 call %l4 <== NOT EXECUTED 2002dc4: 92 12 61 20 or %o1, 0x120, %o1 <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 2002dc8: 10 80 00 08 b 2002de8 <== NOT EXECUTED 2002dcc: 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 ); 2002dd0: d0 00 62 2c ld [ %g1 + 0x22c ], %o0 <== NOT EXECUTED 2002dd4: 13 00 81 01 sethi %hi(0x2040400), %o1 <== NOT EXECUTED 2002dd8: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 2002ddc: 9f c5 00 00 call %l4 <== NOT EXECUTED 2002de0: 92 12 61 30 or %o1, 0x130, %o1 <== NOT EXECUTED } (*print_handler)( 2002de4: d6 04 80 00 ld [ %l2 ], %o3 <== NOT EXECUTED 2002de8: d4 04 a0 04 ld [ %l2 + 4 ], %o2 <== NOT EXECUTED 2002dec: 21 00 81 1f sethi %hi(0x2047c00), %l0 <== NOT EXECUTED 2002df0: 23 00 81 1f sethi %hi(0x2047c00), %l1 <== NOT EXECUTED 2002df4: c2 04 22 30 ld [ %l0 + 0x230 ], %g1 <== NOT EXECUTED 2002df8: d0 04 62 2c ld [ %l1 + 0x22c ], %o0 <== NOT EXECUTED 2002dfc: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED 2002e00: 98 10 00 16 mov %l6, %o4 <== NOT EXECUTED 2002e04: 96 02 80 0b add %o2, %o3, %o3 <== NOT EXECUTED 2002e08: 9a 10 00 13 mov %l3, %o5 <== NOT EXECUTED 2002e0c: 13 00 81 01 sethi %hi(0x2040400), %o1 <== NOT EXECUTED 2002e10: 9f c0 40 00 call %g1 <== NOT EXECUTED 2002e14: 92 12 61 40 or %o1, 0x140, %o1 ! 2040540 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 2002e18: 03 00 81 1f sethi %hi(0x2047c00), %g1 <== NOT EXECUTED 2002e1c: c2 00 62 28 ld [ %g1 + 0x228 ], %g1 ! 2047e28 <== NOT EXECUTED 2002e20: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2002e24: 12 80 00 08 bne 2002e44 <== NOT EXECUTED 2002e28: c2 04 22 30 ld [ %l0 + 0x230 ], %g1 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 2002e2c: d0 04 62 2c ld [ %l1 + 0x22c ], %o0 <== NOT EXECUTED 2002e30: 13 00 81 01 sethi %hi(0x2040400), %o1 <== NOT EXECUTED 2002e34: 9f c0 40 00 call %g1 <== NOT EXECUTED 2002e38: 92 12 61 60 or %o1, 0x160, %o1 ! 2040560 <== NOT EXECUTED 2002e3c: 81 c7 e0 08 ret <== NOT EXECUTED 2002e40: 81 e8 00 00 restore <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 2002e44: d0 04 62 2c ld [ %l1 + 0x22c ], %o0 <== NOT EXECUTED 2002e48: 13 00 81 01 sethi %hi(0x2040400), %o1 <== NOT EXECUTED 2002e4c: 94 10 00 15 mov %l5, %o2 <== NOT EXECUTED 2002e50: 9f c0 40 00 call %g1 <== NOT EXECUTED 2002e54: 92 12 61 70 or %o1, 0x170, %o1 <== NOT EXECUTED 2002e58: 81 c7 e0 08 ret <== NOT EXECUTED 2002e5c: 81 e8 00 00 restore <== NOT EXECUTED 02002ccc : /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 2002ccc: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 2002cd0: 92 0a 7f fc and %o1, -4, %o1 <== NOT EXECUTED if (*base != U32_PATTERN) 2002cd4: 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++) 2002cd8: 84 02 00 09 add %o0, %o1, %g2 <== NOT EXECUTED if (*base != U32_PATTERN) 2002cdc: 10 80 00 06 b 2002cf4 <== NOT EXECUTED 2002ce0: 86 10 61 a5 or %g1, 0x1a5, %g3 <== NOT EXECUTED 2002ce4: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 2002ce8: 12 80 00 07 bne 2002d04 <== NOT EXECUTED 2002cec: 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++) 2002cf0: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED 2002cf4: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED 2002cf8: 2a bf ff fb bcs,a 2002ce4 <== NOT EXECUTED 2002cfc: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 2002d00: 90 10 20 00 clr %o0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 2002d04: 81 c3 e0 08 retl <== NOT EXECUTED 2002d08: 01 00 00 00 nop 02002ed4 : */ void Stack_check_report_blown_task( Thread_Control *running, bool pattern_ok ) { 2002ed4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; printk( 2002ed8: d4 1e 20 08 ldd [ %i0 + 8 ], %o2 <== NOT EXECUTED 2002edc: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 2002ee0: 11 00 81 01 sethi %hi(0x2040400), %o0 <== NOT EXECUTED 2002ee4: 40 00 0a c5 call 20059f8 <== NOT EXECUTED 2002ee8: 90 12 21 e0 or %o0, 0x1e0, %o0 ! 20405e0 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif printk( 2002eec: d4 06 20 c4 ld [ %i0 + 0xc4 ], %o2 <== NOT EXECUTED 2002ef0: d2 06 20 c8 ld [ %i0 + 0xc8 ], %o1 <== NOT EXECUTED 2002ef4: 96 10 00 0a mov %o2, %o3 <== NOT EXECUTED 2002ef8: 11 00 81 01 sethi %hi(0x2040400), %o0 <== NOT EXECUTED 2002efc: 94 02 bf ff add %o2, -1, %o2 <== NOT EXECUTED 2002f00: 90 12 22 20 or %o0, 0x220, %o0 <== NOT EXECUTED 2002f04: 40 00 0a bd call 20059f8 <== NOT EXECUTED 2002f08: 94 02 40 0a add %o1, %o2, %o2 <== NOT EXECUTED stack->area, stack->area + stack->size - 1, stack->size ); if ( !pattern_ok ) { 2002f0c: 80 8e 60 ff btst 0xff, %i1 <== NOT EXECUTED 2002f10: 12 80 00 07 bne 2002f2c <== NOT EXECUTED 2002f14: 11 00 81 01 sethi %hi(0x2040400), %o0 <== NOT EXECUTED printk( 2002f18: d2 06 20 c8 ld [ %i0 + 0xc8 ], %o1 <== NOT EXECUTED 2002f1c: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED 2002f20: 90 12 22 50 or %o0, 0x250, %o0 <== NOT EXECUTED 2002f24: 40 00 0a b5 call 20059f8 <== NOT EXECUTED 2002f28: 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 ); 2002f2c: 40 00 16 f9 call 2008b10 <== NOT EXECUTED 2002f30: 90 10 20 81 mov 0x81, %o0 <== NOT EXECUTED 2002f34: 01 00 00 00 nop 02005da8 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 2005da8: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 2005dac: 03 00 80 5e sethi %hi(0x2017800), %g1 2005db0: e0 00 61 34 ld [ %g1 + 0x134 ], %l0 ! 2017934 <_API_extensions_List> 2005db4: 82 10 61 34 or %g1, 0x134, %g1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 2005db8: 10 80 00 08 b 2005dd8 <_API_extensions_Run_postdriver+0x30> 2005dbc: 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 ) 2005dc0: 80 a0 60 00 cmp %g1, 0 2005dc4: 22 80 00 05 be,a 2005dd8 <_API_extensions_Run_postdriver+0x30> 2005dc8: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postdriver_hook)(); 2005dcc: 9f c0 40 00 call %g1 2005dd0: 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 ) { 2005dd4: 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 ) ; 2005dd8: 80 a4 00 11 cmp %l0, %l1 2005ddc: 32 bf ff f9 bne,a 2005dc0 <_API_extensions_Run_postdriver+0x18> 2005de0: c2 04 20 0c ld [ %l0 + 0xc ], %g1 the_extension = (API_extensions_Control *) the_node; if ( the_extension->postdriver_hook ) (*the_extension->postdriver_hook)(); } } 2005de4: 81 c7 e0 08 ret 2005de8: 81 e8 00 00 restore 02005dec <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 2005dec: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 2005df0: 03 00 80 5e sethi %hi(0x2017800), %g1 2005df4: e0 00 61 34 ld [ %g1 + 0x134 ], %l0 ! 2017934 <_API_extensions_List> 2005df8: 82 10 61 34 or %g1, 0x134, %g1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 2005dfc: 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 ); 2005e00: 03 00 80 5d sethi %hi(0x2017400), %g1 2005e04: 10 80 00 08 b 2005e24 <_API_extensions_Run_postswitch+0x38> 2005e08: a2 10 63 b4 or %g1, 0x3b4, %l1 ! 20177b4 <_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 ) 2005e0c: 80 a0 60 00 cmp %g1, 0 2005e10: 22 80 00 05 be,a 2005e24 <_API_extensions_Run_postswitch+0x38> 2005e14: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postswitch_hook)( _Thread_Executing ); 2005e18: 9f c0 40 00 call %g1 2005e1c: 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 ) { 2005e20: 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 ) ; 2005e24: 80 a4 00 12 cmp %l0, %l2 2005e28: 32 bf ff f9 bne,a 2005e0c <_API_extensions_Run_postswitch+0x20> 2005e2c: 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 ); } } 2005e30: 81 c7 e0 08 ret 2005e34: 81 e8 00 00 restore 02005d64 <_API_extensions_Run_predriver>: * * _API_extensions_Run_predriver */ void _API_extensions_Run_predriver( void ) { 2005d64: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 2005d68: 03 00 80 5e sethi %hi(0x2017800), %g1 2005d6c: e0 00 61 34 ld [ %g1 + 0x134 ], %l0 ! 2017934 <_API_extensions_List> 2005d70: 82 10 61 34 or %g1, 0x134, %g1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 2005d74: 10 80 00 08 b 2005d94 <_API_extensions_Run_predriver+0x30> 2005d78: 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 ) 2005d7c: 80 a0 60 00 cmp %g1, 0 2005d80: 22 80 00 05 be,a 2005d94 <_API_extensions_Run_predriver+0x30> 2005d84: e0 04 00 00 ld [ %l0 ], %l0 (*the_extension->predriver_hook)(); 2005d88: 9f c0 40 00 call %g1 <== NOT EXECUTED 2005d8c: 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 ) { 2005d90: 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 ) ; 2005d94: 80 a4 00 11 cmp %l0, %l1 2005d98: 32 bf ff f9 bne,a 2005d7c <_API_extensions_Run_predriver+0x18> 2005d9c: c2 04 20 08 ld [ %l0 + 8 ], %g1 the_extension = (API_extensions_Control *) the_node; if ( the_extension->predriver_hook ) (*the_extension->predriver_hook)(); } } 2005da0: 81 c7 e0 08 ret 2005da4: 81 e8 00 00 restore 0200811c <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 200811c: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing = _Thread_Executing; 2008120: 03 00 80 68 sethi %hi(0x201a000), %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 ); 2008124: 7f ff eb 32 call 2002dec 2008128: e0 00 62 44 ld [ %g1 + 0x244 ], %l0 ! 201a244 <_Thread_Executing> 200812c: 84 10 00 08 mov %o0, %g2 if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 2008130: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 2008134: 80 a0 60 00 cmp %g1, 0 2008138: 12 80 00 08 bne 2008158 <_CORE_RWLock_Release+0x3c> 200813c: 80 a0 60 01 cmp %g1, 1 _ISR_Enable( level ); 2008140: 7f ff eb 2f call 2002dfc <== NOT EXECUTED 2008144: b0 10 20 00 clr %i0 <== NOT EXECUTED executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 2008148: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 200814c: c2 24 20 34 st %g1, [ %l0 + 0x34 ] <== NOT EXECUTED 2008150: 81 c7 e0 08 ret <== NOT EXECUTED 2008154: 81 e8 00 00 restore <== NOT EXECUTED return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 2008158: 32 80 00 0b bne,a 2008184 <_CORE_RWLock_Release+0x68> 200815c: c0 24 20 34 clr [ %l0 + 0x34 ] the_rwlock->number_of_readers -= 1; 2008160: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 2008164: 82 00 7f ff add %g1, -1, %g1 if ( the_rwlock->number_of_readers != 0 ) { 2008168: 80 a0 60 00 cmp %g1, 0 200816c: 02 80 00 05 be 2008180 <_CORE_RWLock_Release+0x64> 2008170: c2 26 20 48 st %g1, [ %i0 + 0x48 ] /* must be unlocked again */ _ISR_Enable( level ); 2008174: 7f ff eb 22 call 2002dfc 2008178: b0 10 20 00 clr %i0 200817c: 30 80 00 25 b,a 2008210 <_CORE_RWLock_Release+0xf4> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 2008180: 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; 2008184: c0 26 20 44 clr [ %i0 + 0x44 ] _ISR_Enable( level ); 2008188: 7f ff eb 1d call 2002dfc 200818c: 90 10 00 02 mov %g2, %o0 next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 2008190: 40 00 06 04 call 20099a0 <_Thread_queue_Dequeue> 2008194: 90 10 00 18 mov %i0, %o0 if ( next ) { 2008198: 80 a2 20 00 cmp %o0, 0 200819c: 22 80 00 1d be,a 2008210 <_CORE_RWLock_Release+0xf4> 20081a0: b0 10 20 00 clr %i0 if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 20081a4: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 20081a8: 80 a0 60 01 cmp %g1, 1 20081ac: 32 80 00 05 bne,a 20081c0 <_CORE_RWLock_Release+0xa4> 20081b0: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 20081b4: 82 10 20 02 mov 2, %g1 20081b8: 10 80 00 15 b 200820c <_CORE_RWLock_Release+0xf0> 20081bc: 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; 20081c0: 84 10 20 01 mov 1, %g2 } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 20081c4: 82 00 60 01 inc %g1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 20081c8: c4 26 20 44 st %g2, [ %i0 + 0x44 ] } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 20081cc: 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 ); 20081d0: 40 00 07 4b call 2009efc <_Thread_queue_First> 20081d4: 90 10 00 18 mov %i0, %o0 if ( !next || 20081d8: 80 a2 20 00 cmp %o0, 0 20081dc: 22 80 00 0d be,a 2008210 <_CORE_RWLock_Release+0xf4> 20081e0: b0 10 20 00 clr %i0 20081e4: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 20081e8: 80 a0 60 01 cmp %g1, 1 20081ec: 02 80 00 08 be 200820c <_CORE_RWLock_Release+0xf0> 20081f0: 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; 20081f4: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 20081f8: 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; 20081fc: 82 00 60 01 inc %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 2008200: 40 00 06 f0 call 2009dc0 <_Thread_queue_Extract> 2008204: c2 26 20 48 st %g1, [ %i0 + 0x48 ] 2008208: 30 bf ff f2 b,a 20081d0 <_CORE_RWLock_Release+0xb4> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 200820c: b0 10 20 00 clr %i0 2008210: 81 c7 e0 08 ret 2008214: 81 e8 00 00 restore 02012590 <_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 ) { 2012590: 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 ) { 2012594: 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 ) { 2012598: 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 ) { 201259c: 80 a6 80 01 cmp %i2, %g1 20125a0: 18 80 00 17 bgu 20125fc <_CORE_message_queue_Broadcast+0x6c> 20125a4: 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 ) { 20125a8: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 20125ac: 80 a0 60 00 cmp %g1, 0 20125b0: 02 80 00 0a be 20125d8 <_CORE_message_queue_Broadcast+0x48> 20125b4: a2 10 20 00 clr %l1 *count = 0; 20125b8: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED 20125bc: 81 c7 e0 08 ret <== NOT EXECUTED 20125c0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 20125c4: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 20125c8: 40 00 22 20 call 201ae48 20125cc: a2 04 60 01 inc %l1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 20125d0: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 20125d4: 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))) { 20125d8: 40 00 09 d2 call 2014d20 <_Thread_queue_Dequeue> 20125dc: 90 10 00 12 mov %l2, %o0 20125e0: 92 10 00 19 mov %i1, %o1 20125e4: a0 10 00 08 mov %o0, %l0 20125e8: 80 a2 20 00 cmp %o0, 0 20125ec: 12 bf ff f6 bne 20125c4 <_CORE_message_queue_Broadcast+0x34> 20125f0: 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; 20125f4: e2 27 40 00 st %l1, [ %i5 ] 20125f8: b0 10 20 00 clr %i0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 20125fc: 81 c7 e0 08 ret 2012600: 81 e8 00 00 restore 02012550 <_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 ) { 2012550: 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 ) { 2012554: 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 ) { 2012558: 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 ) { 201255c: 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 ) { 2012560: 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 ) { 2012564: 18 80 00 3f bgu 2012660 <_CORE_message_queue_Submit+0x110> 2012568: 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 ) { 201256c: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 2012570: 80 a0 60 00 cmp %g1, 0 2012574: 32 80 00 0f bne,a 20125b0 <_CORE_message_queue_Submit+0x60> 2012578: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 201257c: 7f ff e8 7d call 200c770 <_Thread_queue_Dequeue> 2012580: 90 10 00 11 mov %l1, %o0 if ( the_thread ) { 2012584: a0 92 20 00 orcc %o0, 0, %l0 2012588: 02 80 00 09 be 20125ac <_CORE_message_queue_Submit+0x5c> 201258c: 92 10 00 19 mov %i1, %o1 2012590: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 2012594: 40 00 14 09 call 20175b8 2012598: 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; 201259c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 the_thread->Wait.count = submit_type; 20125a0: 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; 20125a4: 10 80 00 15 b 20125f8 <_CORE_message_queue_Submit+0xa8> 20125a8: 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 < 20125ac: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 20125b0: c2 04 60 44 ld [ %l1 + 0x44 ], %g1 20125b4: 80 a0 80 01 cmp %g2, %g1 20125b8: 1a 80 00 12 bcc 2012600 <_CORE_message_queue_Submit+0xb0> 20125bc: 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 *) 20125c0: 7f ff e1 71 call 200ab84 <_Chain_Get> 20125c4: 90 04 60 68 add %l1, 0x68, %o0 /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 20125c8: a0 92 20 00 orcc %o0, 0, %l0 20125cc: 02 80 00 27 be 2012668 <_CORE_message_queue_Submit+0x118> 20125d0: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 20125d4: 94 10 00 1a mov %i2, %o2 20125d8: 40 00 13 f8 call 20175b8 20125dc: 90 04 20 10 add %l0, 0x10, %o0 size ); the_message->Contents.size = size; the_message->priority = submit_type; _CORE_message_queue_Insert_message( 20125e0: 90 10 00 11 mov %l1, %o0 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 20125e4: f4 24 20 0c st %i2, [ %l0 + 0xc ] the_message->priority = submit_type; 20125e8: fa 24 20 08 st %i5, [ %l0 + 8 ] _CORE_message_queue_Insert_message( 20125ec: 92 10 00 10 mov %l0, %o1 20125f0: 40 00 0c 1c call 2015660 <_CORE_message_queue_Insert_message> 20125f4: 94 10 00 1d mov %i5, %o2 20125f8: 81 c7 e0 08 ret 20125fc: 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 ) { 2012600: 02 80 00 18 be 2012660 <_CORE_message_queue_Submit+0x110> 2012604: 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() ) { 2012608: 03 00 80 9a sethi %hi(0x2026800), %g1 201260c: c2 00 60 e0 ld [ %g1 + 0xe0 ], %g1 ! 20268e0 <_ISR_Nest_level> 2012610: 80 a0 60 00 cmp %g1, 0 2012614: 32 80 00 13 bne,a 2012660 <_CORE_message_queue_Submit+0x110> 2012618: 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; 201261c: 03 00 80 9a sethi %hi(0x2026800), %g1 _ISR_Disable( level ); 2012620: 7f ff bf bb call 200250c 2012624: e0 00 61 04 ld [ %g1 + 0x104 ], %l0 ! 2026904 <_Thread_Executing> 2012628: 82 10 20 01 mov 1, %g1 201262c: 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; 2012630: 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; 2012634: f6 24 20 20 st %i3, [ %l0 + 0x20 ] executing->Wait.return_argument_second.immutable_object = buffer; 2012638: f2 24 20 2c st %i1, [ %l0 + 0x2c ] executing->Wait.option = (uint32_t) size; 201263c: 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; 2012640: 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 ); 2012644: 7f ff bf b6 call 200251c 2012648: b0 10 20 07 mov 7, %i0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 201264c: d2 07 a0 60 ld [ %fp + 0x60 ], %o1 2012650: 90 10 00 11 mov %l1, %o0 2012654: 15 00 80 33 sethi %hi(0x200cc00), %o2 2012658: 7f ff e8 ab call 200c904 <_Thread_queue_Enqueue_with_handler> 201265c: 94 12 a0 d0 or %o2, 0xd0, %o2 ! 200ccd0 <_Thread_queue_Timeout> 2012660: 81 c7 e0 08 ret 2012664: 81 e8 00 00 restore } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 2012668: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED } 201266c: 81 c7 e0 08 ret <== NOT EXECUTED 2012670: 81 e8 00 00 restore <== NOT EXECUTED 0200b72c <_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 ) { 200b72c: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 200b730: 03 00 80 5d sethi %hi(0x2017400), %g1 200b734: c4 00 63 b4 ld [ %g1 + 0x3b4 ], %g2 ! 20177b4 <_Thread_Executing> CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 200b738: d0 06 40 00 ld [ %i1 ], %o0 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 200b73c: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 200b740: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200b744: 80 a0 60 00 cmp %g1, 0 200b748: 22 80 00 32 be,a 200b810 <_CORE_mutex_Seize_interrupt_trylock+0xe4> 200b74c: c6 06 20 5c ld [ %i0 + 0x5c ], %g3 the_mutex->lock = CORE_MUTEX_LOCKED; 200b750: c0 26 20 50 clr [ %i0 + 0x50 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 200b754: 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; 200b758: 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; 200b75c: 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; 200b760: c4 26 20 5c st %g2, [ %i0 + 0x5c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 200b764: 82 10 20 01 mov 1, %g1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 200b768: 80 a0 e0 02 cmp %g3, 2 200b76c: 02 80 00 05 be 200b780 <_CORE_mutex_Seize_interrupt_trylock+0x54> 200b770: c2 26 20 54 st %g1, [ %i0 + 0x54 ] 200b774: 80 a0 e0 03 cmp %g3, 3 200b778: 32 80 00 06 bne,a 200b790 <_CORE_mutex_Seize_interrupt_trylock+0x64> 200b77c: 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++; 200b780: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 200b784: 82 00 60 01 inc %g1 200b788: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 200b78c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 200b790: 80 a0 60 03 cmp %g1, 3 200b794: 22 80 00 03 be,a 200b7a0 <_CORE_mutex_Seize_interrupt_trylock+0x74> 200b798: c6 06 20 4c ld [ %i0 + 0x4c ], %g3 _ISR_Enable( level ); 200b79c: 30 80 00 2c b,a 200b84c <_CORE_mutex_Seize_interrupt_trylock+0x120> { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 200b7a0: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 if ( current == ceiling ) { 200b7a4: 80 a0 40 03 cmp %g1, %g3 200b7a8: 12 80 00 03 bne 200b7b4 <_CORE_mutex_Seize_interrupt_trylock+0x88> 200b7ac: 01 00 00 00 nop _ISR_Enable( level ); 200b7b0: 30 80 00 27 b,a 200b84c <_CORE_mutex_Seize_interrupt_trylock+0x120> <== NOT EXECUTED return 0; } if ( current > ceiling ) { 200b7b4: 08 80 00 0f bleu 200b7f0 <_CORE_mutex_Seize_interrupt_trylock+0xc4> 200b7b8: 82 10 20 06 mov 6, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 200b7bc: 05 00 80 5d sethi %hi(0x2017400), %g2 200b7c0: c2 00 a2 f0 ld [ %g2 + 0x2f0 ], %g1 ! 20176f0 <_Thread_Dispatch_disable_level> 200b7c4: 82 00 60 01 inc %g1 200b7c8: c2 20 a2 f0 st %g1, [ %g2 + 0x2f0 ] _Thread_Disable_dispatch(); _ISR_Enable( level ); 200b7cc: 7f ff d9 61 call 2001d50 200b7d0: 01 00 00 00 nop _Thread_Change_priority( 200b7d4: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 200b7d8: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 200b7dc: 7f ff ee 25 call 2007070 <_Thread_Change_priority> 200b7e0: 94 10 20 00 clr %o2 the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 200b7e4: 7f ff ef b1 call 20076a8 <_Thread_Enable_dispatch> 200b7e8: b0 10 20 00 clr %i0 200b7ec: 30 80 00 1a b,a 200b854 <_CORE_mutex_Seize_interrupt_trylock+0x128> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 200b7f0: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] the_mutex->lock = CORE_MUTEX_UNLOCKED; 200b7f4: 82 10 20 01 mov 1, %g1 the_mutex->nest_count = 0; /* undo locking above */ 200b7f8: 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; 200b7fc: c2 26 20 50 st %g1, [ %i0 + 0x50 ] the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 200b800: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 200b804: 82 00 7f ff add %g1, -1, %g1 200b808: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] _ISR_Enable( level ); 200b80c: 30 80 00 10 b,a 200b84c <_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 ) ) { 200b810: 80 a0 c0 02 cmp %g3, %g2 200b814: 12 80 00 12 bne 200b85c <_CORE_mutex_Seize_interrupt_trylock+0x130> 200b818: 01 00 00 00 nop switch ( the_mutex->Attributes.lock_nesting_behavior ) { 200b81c: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 200b820: 80 a0 60 00 cmp %g1, 0 200b824: 22 80 00 07 be,a 200b840 <_CORE_mutex_Seize_interrupt_trylock+0x114> 200b828: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 200b82c: 80 a0 60 01 cmp %g1, 1 200b830: 12 80 00 0b bne 200b85c <_CORE_mutex_Seize_interrupt_trylock+0x130> 200b834: 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; 200b838: 10 80 00 05 b 200b84c <_CORE_mutex_Seize_interrupt_trylock+0x120> 200b83c: 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++; 200b840: 82 00 60 01 inc %g1 200b844: c2 26 20 54 st %g1, [ %i0 + 0x54 ] _ISR_Enable( level ); 200b848: 30 80 00 01 b,a 200b84c <_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 ); 200b84c: 7f ff d9 41 call 2001d50 200b850: b0 10 20 00 clr %i0 200b854: 81 c7 e0 08 ret 200b858: 81 e8 00 00 restore return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 200b85c: 81 c7 e0 08 ret 200b860: 91 e8 20 01 restore %g0, 1, %o0 02006164 <_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 ) { 2006164: 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 ) { 2006168: 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 ) { 200616c: 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 ) { 2006170: 80 a0 60 00 cmp %g1, 0 2006174: 02 80 00 07 be 2006190 <_CORE_mutex_Surrender+0x2c> 2006178: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !_Thread_Is_executing( holder ) ) 200617c: 03 00 80 5d sethi %hi(0x2017400), %g1 2006180: c2 00 63 b4 ld [ %g1 + 0x3b4 ], %g1 ! 20177b4 <_Thread_Executing> 2006184: 80 a2 00 01 cmp %o0, %g1 2006188: 12 80 00 52 bne 20062d0 <_CORE_mutex_Surrender+0x16c> 200618c: 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 ) 2006190: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 2006194: 80 a0 60 00 cmp %g1, 0 2006198: 02 80 00 4d be 20062cc <_CORE_mutex_Surrender+0x168> 200619c: 82 00 7f ff add %g1, -1, %g1 return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; if ( the_mutex->nest_count != 0 ) { 20061a0: 80 a0 60 00 cmp %g1, 0 20061a4: 02 80 00 09 be 20061c8 <_CORE_mutex_Surrender+0x64> 20061a8: c2 24 20 54 st %g1, [ %l0 + 0x54 ] switch ( the_mutex->Attributes.lock_nesting_behavior ) { 20061ac: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 20061b0: 80 a0 60 00 cmp %g1, 0 20061b4: 02 80 00 47 be 20062d0 <_CORE_mutex_Surrender+0x16c> 20061b8: b0 10 20 00 clr %i0 20061bc: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 20061c0: 02 80 00 44 be 20062d0 <_CORE_mutex_Surrender+0x16c> <== NOT EXECUTED 20061c4: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED 20061c8: 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 ) || 20061cc: 80 a0 60 02 cmp %g1, 2 20061d0: 02 80 00 04 be 20061e0 <_CORE_mutex_Surrender+0x7c> 20061d4: 80 a0 60 03 cmp %g1, 3 20061d8: 32 80 00 07 bne,a 20061f4 <_CORE_mutex_Surrender+0x90> 20061dc: 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--; 20061e0: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 20061e4: 82 00 7f ff add %g1, -1, %g1 20061e8: c2 22 20 1c st %g1, [ %o0 + 0x1c ] 20061ec: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 } the_mutex->holder = NULL; 20061f0: 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 ) || 20061f4: 80 a0 60 02 cmp %g1, 2 20061f8: 02 80 00 05 be 200620c <_CORE_mutex_Surrender+0xa8> 20061fc: c0 24 20 60 clr [ %l0 + 0x60 ] 2006200: 80 a0 60 03 cmp %g1, 3 2006204: 12 80 00 0d bne 2006238 <_CORE_mutex_Surrender+0xd4> 2006208: 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 && 200620c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 2006210: 80 a0 60 00 cmp %g1, 0 2006214: 12 80 00 09 bne 2006238 <_CORE_mutex_Surrender+0xd4> 2006218: 01 00 00 00 nop 200621c: d2 02 20 18 ld [ %o0 + 0x18 ], %o1 2006220: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 2006224: 80 a2 40 01 cmp %o1, %g1 2006228: 02 80 00 04 be 2006238 <_CORE_mutex_Surrender+0xd4> 200622c: 01 00 00 00 nop holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 2006230: 40 00 03 90 call 2007070 <_Thread_Change_priority> 2006234: 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 ) ) ) { 2006238: 40 00 06 0e call 2007a70 <_Thread_queue_Dequeue> 200623c: 90 10 00 10 mov %l0, %o0 2006240: 86 92 20 00 orcc %o0, 0, %g3 2006244: 02 80 00 1f be 20062c0 <_CORE_mutex_Surrender+0x15c> 2006248: 82 10 20 01 mov 1, %g1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 200624c: c2 00 e0 08 ld [ %g3 + 8 ], %g1 the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 2006250: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 2006254: c2 24 20 60 st %g1, [ %l0 + 0x60 ] } else #endif { the_mutex->holder = the_thread; 2006258: c6 24 20 5c st %g3, [ %l0 + 0x5c ] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 200625c: 82 10 20 01 mov 1, %g1 switch ( the_mutex->Attributes.discipline ) { 2006260: 80 a0 a0 02 cmp %g2, 2 2006264: 02 80 00 07 be 2006280 <_CORE_mutex_Surrender+0x11c> 2006268: c2 24 20 54 st %g1, [ %l0 + 0x54 ] 200626c: 80 a0 a0 03 cmp %g2, 3 2006270: 12 80 00 18 bne 20062d0 <_CORE_mutex_Surrender+0x16c> 2006274: 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++; 2006278: 10 80 00 07 b 2006294 <_CORE_mutex_Surrender+0x130> 200627c: 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++; 2006280: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 2006284: 82 00 60 01 inc %g1 2006288: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] 200628c: 81 c7 e0 08 ret 2006290: 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 < 2006294: 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++; 2006298: 82 00 60 01 inc %g1 200629c: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] if (the_mutex->Attributes.priority_ceiling < 20062a0: d2 04 20 4c ld [ %l0 + 0x4c ], %o1 20062a4: 80 a2 40 02 cmp %o1, %g2 20062a8: 3a 80 00 0a bcc,a 20062d0 <_CORE_mutex_Surrender+0x16c> 20062ac: b0 10 20 00 clr %i0 <== NOT EXECUTED the_thread->current_priority){ _Thread_Change_priority( 20062b0: 40 00 03 70 call 2007070 <_Thread_Change_priority> 20062b4: 94 10 20 00 clr %o2 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 20062b8: 81 c7 e0 08 ret 20062bc: 91 e8 20 00 restore %g0, 0, %o0 20062c0: c2 24 20 50 st %g1, [ %l0 + 0x50 ] 20062c4: 81 c7 e0 08 ret 20062c8: 91 e8 20 00 restore %g0, 0, %o0 20062cc: b0 10 20 00 clr %i0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 20062d0: 81 c7 e0 08 ret 20062d4: 81 e8 00 00 restore 02006d14 <_CORE_spinlock_Release>: */ CORE_spinlock_Status _CORE_spinlock_Release( CORE_spinlock_Control *the_spinlock ) { 2006d14: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 2006d18: 7f ff ed e2 call 20024a0 2006d1c: 01 00 00 00 nop /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 2006d20: c2 06 20 04 ld [ %i0 + 4 ], %g1 2006d24: 80 a0 60 00 cmp %g1, 0 2006d28: 12 80 00 06 bne 2006d40 <_CORE_spinlock_Release+0x2c> 2006d2c: 03 00 80 4d sethi %hi(0x2013400), %g1 _ISR_Enable( level ); 2006d30: 7f ff ed e0 call 20024b0 2006d34: b0 10 20 06 mov 6, %i0 2006d38: 81 c7 e0 08 ret 2006d3c: 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 ) { 2006d40: c2 00 62 64 ld [ %g1 + 0x264 ], %g1 2006d44: c4 06 20 0c ld [ %i0 + 0xc ], %g2 2006d48: c2 00 60 08 ld [ %g1 + 8 ], %g1 2006d4c: 80 a0 80 01 cmp %g2, %g1 2006d50: 02 80 00 06 be 2006d68 <_CORE_spinlock_Release+0x54> 2006d54: 01 00 00 00 nop _ISR_Enable( level ); 2006d58: 7f ff ed d6 call 20024b0 <== NOT EXECUTED 2006d5c: b0 10 20 02 mov 2, %i0 ! 2 <== NOT EXECUTED 2006d60: 81 c7 e0 08 ret <== NOT EXECUTED 2006d64: 81 e8 00 00 restore <== NOT EXECUTED } /* * Let it be unlocked. */ the_spinlock->users -= 1; 2006d68: c2 06 20 08 ld [ %i0 + 8 ], %g1 2006d6c: 82 00 7f ff add %g1, -1, %g1 2006d70: c2 26 20 08 st %g1, [ %i0 + 8 ] the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 2006d74: c0 26 20 04 clr [ %i0 + 4 ] the_spinlock->holder = 0; 2006d78: c0 26 20 0c clr [ %i0 + 0xc ] _ISR_Enable( level ); 2006d7c: 7f ff ed cd call 20024b0 2006d80: b0 10 20 00 clr %i0 return CORE_SPINLOCK_SUCCESSFUL; } 2006d84: 81 c7 e0 08 ret 2006d88: 81 e8 00 00 restore 02006d8c <_CORE_spinlock_Wait>: CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 2006d8c: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; 2006d90: 03 00 80 4d sethi %hi(0x2013400), %g1 2006d94: c2 00 62 f4 ld [ %g1 + 0x2f4 ], %g1 ! 20136f4 <_Watchdog_Ticks_since_boot> _ISR_Disable( level ); 2006d98: 7f ff ed c2 call 20024a0 2006d9c: a2 06 80 01 add %i2, %g1, %l1 2006da0: 86 10 00 08 mov %o0, %g3 if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 2006da4: c2 06 20 04 ld [ %i0 + 4 ], %g1 2006da8: 80 a0 60 01 cmp %g1, 1 2006dac: 12 80 00 0c bne 2006ddc <_CORE_spinlock_Wait+0x50> 2006db0: 03 00 80 4d sethi %hi(0x2013400), %g1 2006db4: c2 00 62 64 ld [ %g1 + 0x264 ], %g1 ! 2013664 <_Thread_Executing> 2006db8: c4 06 20 0c ld [ %i0 + 0xc ], %g2 2006dbc: c2 00 60 08 ld [ %g1 + 8 ], %g1 2006dc0: 80 a0 80 01 cmp %g2, %g1 2006dc4: 12 80 00 06 bne 2006ddc <_CORE_spinlock_Wait+0x50> 2006dc8: 01 00 00 00 nop (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); 2006dcc: 7f ff ed b9 call 20024b0 2006dd0: b0 10 20 01 mov 1, %i0 ! 1 2006dd4: 81 c7 e0 08 ret 2006dd8: 81 e8 00 00 restore return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 2006ddc: c2 06 20 08 ld [ %i0 + 8 ], %g1 } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 2006de0: 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; 2006de4: 82 00 60 01 inc %g1 2006de8: 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) ) { 2006dec: 03 00 80 4d sethi %hi(0x2013400), %g1 2006df0: a4 10 62 f4 or %g1, 0x2f4, %l2 ! 20136f4 <_Watchdog_Ticks_since_boot> 2006df4: 03 00 80 4d sethi %hi(0x2013400), %g1 2006df8: a0 10 61 a0 or %g1, 0x1a0, %l0 ! 20135a0 <_Thread_Dispatch_disable_level> _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 2006dfc: c2 06 20 04 ld [ %i0 + 4 ], %g1 2006e00: 80 a0 60 00 cmp %g1, 0 2006e04: 12 80 00 0d bne 2006e38 <_CORE_spinlock_Wait+0xac> 2006e08: 80 a6 60 00 cmp %i1, 0 the_spinlock->lock = CORE_SPINLOCK_LOCKED; the_spinlock->holder = _Thread_Executing->Object.id; 2006e0c: 03 00 80 4d sethi %hi(0x2013400), %g1 2006e10: c4 00 62 64 ld [ %g1 + 0x264 ], %g2 ! 2013664 <_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; 2006e14: 82 10 20 01 mov 1, %g1 2006e18: c2 26 20 04 st %g1, [ %i0 + 4 ] the_spinlock->holder = _Thread_Executing->Object.id; 2006e1c: c2 00 a0 08 ld [ %g2 + 8 ], %g1 2006e20: c2 26 20 0c st %g1, [ %i0 + 0xc ] _ISR_Enable( level ); 2006e24: b0 10 20 00 clr %i0 2006e28: 7f ff ed a2 call 20024b0 2006e2c: 90 10 00 03 mov %g3, %o0 2006e30: 81 c7 e0 08 ret 2006e34: 81 e8 00 00 restore } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 2006e38: 12 80 00 0a bne 2006e60 <_CORE_spinlock_Wait+0xd4> 2006e3c: 80 a6 a0 00 cmp %i2, 0 the_spinlock->users -= 1; 2006e40: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 2006e44: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2006e48: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED _ISR_Enable( level ); 2006e4c: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED 2006e50: 7f ff ed 98 call 20024b0 <== NOT EXECUTED 2006e54: 90 10 00 03 mov %g3, %o0 <== NOT EXECUTED 2006e58: 81 c7 e0 08 ret <== NOT EXECUTED 2006e5c: 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) ) { 2006e60: 02 80 00 0e be 2006e98 <_CORE_spinlock_Wait+0x10c> 2006e64: 01 00 00 00 nop 2006e68: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED 2006e6c: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 2006e70: 18 80 00 0a bgu 2006e98 <_CORE_spinlock_Wait+0x10c> <== NOT EXECUTED 2006e74: 01 00 00 00 nop <== NOT EXECUTED the_spinlock->users -= 1; 2006e78: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 2006e7c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2006e80: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED _ISR_Enable( level ); 2006e84: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED 2006e88: 7f ff ed 8a call 20024b0 <== NOT EXECUTED 2006e8c: 90 10 00 03 mov %g3, %o0 <== NOT EXECUTED 2006e90: 81 c7 e0 08 ret <== NOT EXECUTED 2006e94: 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 ); 2006e98: 7f ff ed 86 call 20024b0 2006e9c: 90 10 00 03 mov %g3, %o0 /* An ISR could occur here */ _Thread_Enable_dispatch(); 2006ea0: 40 00 04 a7 call 200813c <_Thread_Enable_dispatch> 2006ea4: 01 00 00 00 nop 2006ea8: c2 04 00 00 ld [ %l0 ], %g1 2006eac: 82 00 60 01 inc %g1 2006eb0: 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 ); 2006eb4: 7f ff ed 7b call 20024a0 2006eb8: 01 00 00 00 nop 2006ebc: 86 10 00 08 mov %o0, %g3 2006ec0: 30 bf ff cf b,a 2006dfc <_CORE_spinlock_Wait+0x70> 02021c10 <_Chain_Insert>: void _Chain_Insert( Chain_Node *after_node, Chain_Node *node ) { 2021c10: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED ISR_Level level; _ISR_Disable( level ); 2021c14: 7f ff 84 1a call 2002c7c <== NOT EXECUTED 2021c18: 01 00 00 00 nop <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 2021c1c: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 2021c20: f0 26 60 04 st %i0, [ %i1 + 4 ] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 2021c24: f2 26 00 00 st %i1, [ %i0 ] <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 2021c28: 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; 2021c2c: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED _Chain_Insert_unprotected( after_node, node ); _ISR_Enable( level ); 2021c30: 7f ff 84 17 call 2002c8c <== NOT EXECUTED 2021c34: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 2021c38: 01 00 00 00 nop 0200b620 <_Debug_Is_enabled>: */ bool _Debug_Is_enabled( rtems_debug_control level ) { 200b620: 03 00 80 5d sethi %hi(0x2017400), %g1 <== NOT EXECUTED 200b624: c2 00 63 b8 ld [ %g1 + 0x3b8 ], %g1 ! 20177b8 <_Debug_Level> <== NOT EXECUTED 200b628: 90 0a 00 01 and %o0, %g1, %o0 <== NOT EXECUTED 200b62c: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED return (_Debug_Level & level) ? true : false; } 200b630: 81 c3 e0 08 retl <== NOT EXECUTED 200b634: 90 40 20 00 addx %g0, 0, %o0 <== NOT EXECUTED 02004f6c <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 2004f6c: 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 ]; 2004f70: e0 06 21 68 ld [ %i0 + 0x168 ], %l0 option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 2004f74: 7f ff f3 73 call 2001d40 2004f78: e2 06 20 30 ld [ %i0 + 0x30 ], %l1 2004f7c: b2 10 00 08 mov %o0, %i1 pending_events = api->pending_events; 2004f80: c8 04 00 00 ld [ %l0 ], %g4 event_condition = (rtems_event_set) the_thread->Wait.count; 2004f84: 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 ) ) { 2004f88: 86 88 80 04 andcc %g2, %g4, %g3 2004f8c: 12 80 00 03 bne 2004f98 <_Event_Surrender+0x2c> 2004f90: 03 00 80 5d sethi %hi(0x2017400), %g1 _ISR_Enable( level ); 2004f94: 30 80 00 42 b,a 200509c <_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() && 2004f98: c2 00 63 90 ld [ %g1 + 0x390 ], %g1 ! 2017790 <_ISR_Nest_level> 2004f9c: 80 a0 60 00 cmp %g1, 0 2004fa0: 22 80 00 1e be,a 2005018 <_Event_Surrender+0xac> 2004fa4: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 2004fa8: 03 00 80 5d sethi %hi(0x2017400), %g1 2004fac: c2 00 63 b4 ld [ %g1 + 0x3b4 ], %g1 ! 20177b4 <_Thread_Executing> 2004fb0: 80 a6 00 01 cmp %i0, %g1 2004fb4: 32 80 00 19 bne,a 2005018 <_Event_Surrender+0xac> 2004fb8: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 2004fbc: 1b 00 80 60 sethi %hi(0x2018000), %o5 2004fc0: c2 03 60 10 ld [ %o5 + 0x10 ], %g1 ! 2018010 <_Event_Sync_state> 2004fc4: 80 a0 60 01 cmp %g1, 1 2004fc8: 02 80 00 07 be 2004fe4 <_Event_Surrender+0x78> 2004fcc: 80 a0 c0 02 cmp %g3, %g2 2004fd0: c2 03 60 10 ld [ %o5 + 0x10 ], %g1 2004fd4: 80 a0 60 02 cmp %g1, 2 2004fd8: 32 80 00 10 bne,a 2005018 <_Event_Surrender+0xac> 2004fdc: 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) ) { 2004fe0: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 2004fe4: 02 80 00 04 be 2004ff4 <_Event_Surrender+0x88> 2004fe8: 80 8c 60 02 btst 2, %l1 2004fec: 02 80 00 0a be 2005014 <_Event_Surrender+0xa8> <== NOT EXECUTED 2004ff0: 01 00 00 00 nop <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 2004ff4: 82 29 00 03 andn %g4, %g3, %g1 2004ff8: c2 24 00 00 st %g1, [ %l0 ] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2004ffc: 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; 2005000: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2005004: c6 20 40 00 st %g3, [ %g1 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 2005008: 84 10 20 03 mov 3, %g2 200500c: 03 00 80 60 sethi %hi(0x2018000), %g1 2005010: c4 20 60 10 st %g2, [ %g1 + 0x10 ] ! 2018010 <_Event_Sync_state> } _ISR_Enable( level ); 2005014: 30 80 00 22 b,a 200509c <_Event_Surrender+0x130> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 2005018: 80 88 61 00 btst 0x100, %g1 200501c: 02 80 00 20 be 200509c <_Event_Surrender+0x130> 2005020: 80 a0 c0 02 cmp %g3, %g2 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 2005024: 02 80 00 04 be 2005034 <_Event_Surrender+0xc8> 2005028: 80 8c 60 02 btst 2, %l1 200502c: 02 80 00 1c be 200509c <_Event_Surrender+0x130> 2005030: 01 00 00 00 nop api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 2005034: 82 29 00 03 andn %g4, %g3, %g1 2005038: c2 24 00 00 st %g1, [ %l0 ] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 200503c: 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; 2005040: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2005044: c6 20 40 00 st %g3, [ %g1 ] _ISR_Flash( level ); 2005048: 7f ff f3 42 call 2001d50 200504c: 90 10 00 19 mov %i1, %o0 2005050: 7f ff f3 3c call 2001d40 2005054: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 2005058: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200505c: 80 a0 60 02 cmp %g1, 2 2005060: 02 80 00 06 be 2005078 <_Event_Surrender+0x10c> 2005064: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 2005068: 7f ff f3 3a call 2001d50 200506c: 90 10 00 19 mov %i1, %o0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 2005070: 10 80 00 08 b 2005090 <_Event_Surrender+0x124> 2005074: 33 04 00 ff sethi %hi(0x1003fc00), %i1 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 2005078: c2 26 20 50 st %g1, [ %i0 + 0x50 ] _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 200507c: 7f ff f3 35 call 2001d50 2005080: 90 10 00 19 mov %i1, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 2005084: 40 00 0e 59 call 20089e8 <_Watchdog_Remove> 2005088: 90 06 20 48 add %i0, 0x48, %o0 200508c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 2005090: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 2005094: 40 00 08 6f call 2007250 <_Thread_Clear_state> 2005098: 81 e8 00 00 restore _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 200509c: 7f ff f3 2d call 2001d50 20050a0: 91 e8 00 19 restore %g0, %i1, %o0 20050a4: 01 00 00 00 nop 020050a8 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 20050a8: 9d e3 bf 90 save %sp, -112, %sp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 20050ac: 90 10 00 18 mov %i0, %o0 20050b0: 40 00 09 8b call 20076dc <_Thread_Get> 20050b4: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 20050b8: c2 07 bf f4 ld [ %fp + -12 ], %g1 20050bc: 80 a0 60 00 cmp %g1, 0 20050c0: 12 80 00 0f bne 20050fc <_Event_Timeout+0x54> 20050c4: 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 ); 20050c8: 7f ff f3 1e call 2001d40 20050cc: 01 00 00 00 nop 20050d0: 86 10 00 08 mov %o0, %g3 if ( !the_thread->Wait.count ) { /* verify thread is waiting */ 20050d4: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 20050d8: 80 a0 60 00 cmp %g1, 0 20050dc: 12 80 00 0a bne 2005104 <_Event_Timeout+0x5c> 20050e0: 03 00 80 5d sethi %hi(0x2017400), %g1 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 20050e4: 05 00 80 5d sethi %hi(0x2017400), %g2 <== NOT EXECUTED 20050e8: c2 00 a2 f0 ld [ %g2 + 0x2f0 ], %g1 ! 20176f0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 20050ec: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 20050f0: c2 20 a2 f0 st %g1, [ %g2 + 0x2f0 ] <== NOT EXECUTED _Thread_Unnest_dispatch(); _ISR_Enable( level ); 20050f4: 7f ff f3 17 call 2001d50 <== NOT EXECUTED 20050f8: 01 00 00 00 nop <== NOT EXECUTED 20050fc: 81 c7 e0 08 ret <== NOT EXECUTED 2005100: 81 e8 00 00 restore <== NOT EXECUTED return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 2005104: c2 00 63 b4 ld [ %g1 + 0x3b4 ], %g1 2005108: 80 a6 00 01 cmp %i0, %g1 200510c: 12 80 00 09 bne 2005130 <_Event_Timeout+0x88> 2005110: c0 26 20 24 clr [ %i0 + 0x24 ] Thread_blocking_operation_States sync = _Event_Sync_state; 2005114: 05 00 80 60 sethi %hi(0x2018000), %g2 2005118: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 ! 2018010 <_Event_Sync_state> if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) || 200511c: 80 a0 60 01 cmp %g1, 1 2005120: 18 80 00 05 bgu 2005134 <_Event_Timeout+0x8c> 2005124: 82 10 20 06 mov 6, %g1 (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 2005128: 82 10 20 02 mov 2, %g1 200512c: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 2005130: 82 10 20 06 mov 6, %g1 2005134: c2 26 20 34 st %g1, [ %i0 + 0x34 ] _ISR_Enable( level ); 2005138: 7f ff f3 06 call 2001d50 200513c: 90 10 00 03 mov %g3, %o0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 2005140: 90 10 00 18 mov %i0, %o0 2005144: 13 04 00 ff sethi %hi(0x1003fc00), %o1 2005148: 40 00 08 42 call 2007250 <_Thread_Clear_state> 200514c: 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; 2005150: 05 00 80 5d sethi %hi(0x2017400), %g2 2005154: c2 00 a2 f0 ld [ %g2 + 0x2f0 ], %g1 ! 20176f0 <_Thread_Dispatch_disable_level> 2005158: 82 00 7f ff add %g1, -1, %g1 200515c: c2 20 a2 f0 st %g1, [ %g2 + 0x2f0 ] 2005160: 81 c7 e0 08 ret 2005164: 81 e8 00 00 restore 02008660 <_Heap_Allocate_aligned>: void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 2008660: 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; 2008664: 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); 2008668: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 200866c: 90 10 00 19 mov %i1, %o0 2008670: 40 00 01 5d call 2008be4 <_Heap_Calc_block_size> 2008674: 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; 2008678: 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) 200867c: ba 92 20 00 orcc %o0, 0, %i5 2008680: 02 80 00 67 be 200881c <_Heap_Allocate_aligned+0x1bc> 2008684: 90 10 20 00 clr %o0 return NULL; if(alignment == 0) 2008688: 80 a6 a0 00 cmp %i2, 0 200868c: 22 80 00 02 be,a 2008694 <_Heap_Allocate_aligned+0x34> 2008690: b4 10 20 08 mov 8, %i2 */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 2008694: e2 06 20 08 ld [ %i0 + 8 ], %l1 2008698: 10 80 00 59 b 20087fc <_Heap_Allocate_aligned+0x19c> 200869c: 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); 20086a0: 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. */ 20086a4: 80 a4 c0 1d cmp %l3, %i5 20086a8: 2a 80 00 54 bcs,a 20087f8 <_Heap_Allocate_aligned+0x198> 20086ac: e2 04 60 08 ld [ %l1 + 8 ], %l1 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 20086b0: 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; 20086b4: ae 04 40 13 add %l1, %l3, %l7 aligned_user_addr = block_end - end_to_user_offs; 20086b8: a0 25 c0 19 sub %l7, %i1, %l0 20086bc: 40 00 3e e8 call 201825c <.urem> 20086c0: 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)); 20086c4: 92 10 00 14 mov %l4, %o1 20086c8: a4 24 00 08 sub %l0, %o0, %l2 20086cc: 40 00 3e e4 call 201825c <.urem> 20086d0: 90 10 00 12 mov %l2, %o0 20086d4: a0 04 60 08 add %l1, 8, %l0 20086d8: 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) { 20086dc: 80 a0 80 10 cmp %g2, %l0 20086e0: 2a 80 00 46 bcs,a 20087f8 <_Heap_Allocate_aligned+0x198> 20086e4: 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) { 20086e8: ec 06 20 14 ld [ %i0 + 0x14 ], %l6 20086ec: 82 20 80 10 sub %g2, %l0, %g1 20086f0: 80 a0 40 16 cmp %g1, %l6 20086f4: 1a 80 00 15 bcc 2008748 <_Heap_Allocate_aligned+0xe8> 20086f8: 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) { 20086fc: 82 24 80 10 sub %l2, %l0, %g1 2008700: 80 a0 40 14 cmp %g1, %l4 2008704: 0a 80 00 10 bcs 2008744 <_Heap_Allocate_aligned+0xe4> 2008708: 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; 200870c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2008710: 40 00 3e d3 call 201825c <.urem> <== NOT EXECUTED 2008714: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED *value = r ? v - r + a : v; 2008718: 82 04 00 1a add %l0, %i2, %g1 <== NOT EXECUTED 200871c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2008720: 12 80 00 03 bne 200872c <_Heap_Allocate_aligned+0xcc> <== NOT EXECUTED 2008724: 90 20 40 08 sub %g1, %o0, %o0 <== NOT EXECUTED 2008728: 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) { 200872c: 82 22 00 10 sub %o0, %l0, %g1 <== NOT EXECUTED 2008730: 80 a0 40 14 cmp %g1, %l4 <== NOT EXECUTED 2008734: 3a 80 00 31 bcc,a 20087f8 <_Heap_Allocate_aligned+0x198> <== NOT EXECUTED 2008738: e2 04 60 08 ld [ %l1 + 8 ], %l1 <== NOT EXECUTED 200873c: 84 10 00 10 mov %l0, %g2 <== NOT EXECUTED 2008740: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED aligned_user_addr = 0; } } } if(aligned_user_addr) { 2008744: 80 a4 a0 00 cmp %l2, 0 2008748: 22 80 00 2c be,a 20087f8 <_Heap_Allocate_aligned+0x198> 200874c: 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; 2008750: 82 05 e0 08 add %l7, 8, %g1 2008754: 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; 2008758: 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) { 200875c: 80 a0 80 16 cmp %g2, %l6 2008760: 2a 80 00 08 bcs,a 2008780 <_Heap_Allocate_aligned+0x120> 2008764: 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; 2008768: 82 10 a0 01 or %g2, 1, %g1 200876c: 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); 2008770: a2 04 40 02 add %l1, %g2, %l1 the_block = _Heap_Block_at(the_block, the_rest); the_block->prev_size = the_rest; 2008774: c4 24 40 00 st %g2, [ %l1 ] the_block->size = alloc_size; 2008778: 10 80 00 09 b 200879c <_Heap_Allocate_aligned+0x13c> 200877c: e0 24 60 04 st %l0, [ %l1 + 4 ] ) { Heap_Block *block = the_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 2008780: 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; 2008784: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 prev->next = next; next->prev = prev; 2008788: c4 20 e0 0c st %g2, [ %g3 + 0xc ] 200878c: 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; 2008790: c6 20 a0 08 st %g3, [ %g2 + 8 ] 2008794: c2 26 20 38 st %g1, [ %i0 + 0x38 ] 2008798: 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 ); 200879c: 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; 20087a0: c2 00 a0 04 ld [ %g2 + 4 ], %g1 20087a4: 82 10 60 01 or %g1, 1, %g1 20087a8: c2 20 a0 04 st %g1, [ %g2 + 4 ] /* Update statistics */ stats->free_size -= alloc_size; 20087ac: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 if(stats->min_free_size > stats->free_size) 20087b0: 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; 20087b4: 82 20 40 10 sub %g1, %l0, %g1 if(stats->min_free_size > stats->free_size) 20087b8: 80 a0 80 01 cmp %g2, %g1 20087bc: 08 80 00 03 bleu 20087c8 <_Heap_Allocate_aligned+0x168> 20087c0: c2 26 20 30 st %g1, [ %i0 + 0x30 ] stats->min_free_size = stats->free_size; 20087c4: c2 26 20 34 st %g1, [ %i0 + 0x34 ] stats->used_blocks += 1; 20087c8: 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; 20087cc: c6 06 20 4c ld [ %i0 + 0x4c ], %g3 stats->allocs += 1; 20087d0: 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; 20087d4: 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; 20087d8: 86 00 e0 01 inc %g3 stats->allocs += 1; 20087dc: 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; 20087e0: 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; 20087e4: 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; 20087e8: 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; 20087ec: 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; 20087f0: 10 80 00 07 b 200880c <_Heap_Allocate_aligned+0x1ac> 20087f4: 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) 20087f8: 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; 20087fc: 80 a4 40 18 cmp %l1, %i0 2008800: 32 bf ff a8 bne,a 20086a0 <_Heap_Allocate_aligned+0x40> 2008804: c2 04 60 04 ld [ %l1 + 4 ], %g1 2008808: 90 10 20 00 clr %o0 } } } } if(stats->max_search < search_count) 200880c: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 2008810: 80 a0 40 15 cmp %g1, %l5 2008814: 2a 80 00 02 bcs,a 200881c <_Heap_Allocate_aligned+0x1bc> 2008818: ea 26 20 44 st %l5, [ %i0 + 0x44 ] stats->max_search = search_count; return user_ptr; } 200881c: 81 c7 e0 08 ret 2008820: 91 e8 00 08 restore %g0, %o0, %o0 0202c564 <_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; 202c564: 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; 202c568: 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; 202c56c: c0 22 60 08 clr [ %o1 + 8 ] the_info->Free.largest = 0; 202c570: c0 22 60 04 clr [ %o1 + 4 ] the_info->Used.number = 0; 202c574: c0 22 60 0c clr [ %o1 + 0xc ] the_info->Used.total = 0; 202c578: c0 22 60 14 clr [ %o1 + 0x14 ] the_info->Used.largest = 0; 202c57c: 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; 202c580: 10 80 00 23 b 202c60c <_Heap_Get_information+0xa8> 202c584: 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); 202c588: 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 ); 202c58c: 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) ) { 202c590: c2 03 60 04 ld [ %o5 + 4 ], %g1 202c594: 80 88 60 01 btst 1, %g1 202c598: 22 80 00 0d be,a 202c5cc <_Heap_Get_information+0x68> 202c59c: c2 02 40 00 ld [ %o1 ], %g1 the_info->Used.number++; 202c5a0: c2 02 60 0c ld [ %o1 + 0xc ], %g1 the_info->Used.total += the_size; 202c5a4: c4 02 60 14 ld [ %o1 + 0x14 ], %g2 if ( the_info->Used.largest < the_size ) 202c5a8: 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++; 202c5ac: 82 00 60 01 inc %g1 the_info->Used.total += the_size; 202c5b0: 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++; 202c5b4: c2 22 60 0c st %g1, [ %o1 + 0xc ] the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) 202c5b8: 80 a0 c0 04 cmp %g3, %g4 202c5bc: 1a 80 00 13 bcc 202c608 <_Heap_Get_information+0xa4> 202c5c0: c4 22 60 14 st %g2, [ %o1 + 0x14 ] the_info->Used.largest = the_size; 202c5c4: 10 80 00 11 b 202c608 <_Heap_Get_information+0xa4> 202c5c8: c8 22 60 10 st %g4, [ %o1 + 0x10 ] } else { the_info->Free.number++; the_info->Free.total += the_size; 202c5cc: c4 02 60 08 ld [ %o1 + 8 ], %g2 if ( the_info->Free.largest < the_size ) 202c5d0: 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++; 202c5d4: 82 00 60 01 inc %g1 the_info->Free.total += the_size; 202c5d8: 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++; 202c5dc: c2 22 40 00 st %g1, [ %o1 ] the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) 202c5e0: 80 a0 c0 04 cmp %g3, %g4 202c5e4: 1a 80 00 03 bcc 202c5f0 <_Heap_Get_information+0x8c> 202c5e8: c4 22 60 08 st %g2, [ %o1 + 8 ] the_info->Free.largest = the_size; 202c5ec: c8 22 60 04 st %g4, [ %o1 + 4 ] if ( the_size != next_block->prev_size ) 202c5f0: c2 03 40 00 ld [ %o5 ], %g1 202c5f4: 80 a1 00 01 cmp %g4, %g1 202c5f8: 02 80 00 05 be 202c60c <_Heap_Get_information+0xa8> 202c5fc: 84 10 00 0d mov %o5, %g2 202c600: 81 c3 e0 08 retl <== NOT EXECUTED 202c604: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 202c608: 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 ) { 202c60c: 80 a0 80 0c cmp %g2, %o4 202c610: 32 bf ff de bne,a 202c588 <_Heap_Get_information+0x24> 202c614: 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; 202c618: c2 02 60 14 ld [ %o1 + 0x14 ], %g1 202c61c: 90 10 20 00 clr %o0 202c620: 82 00 60 08 add %g1, 8, %g1 return HEAP_GET_INFORMATION_SUCCESSFUL; } 202c624: 81 c3 e0 08 retl 202c628: c2 22 60 14 st %g1, [ %o1 + 0x14 ] 02014edc <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 2014edc: 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; 2014ee0: e8 06 20 14 ld [ %i0 + 0x14 ], %l4 uint32_t const page_size = the_heap->page_size; 2014ee4: ec 06 20 10 ld [ %i0 + 0x10 ], %l6 *old_mem_size = 0; 2014ee8: c0 26 c0 00 clr [ %i3 ] *avail_mem_size = 0; 2014eec: 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); 2014ef0: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 2014ef4: 7f ff fb ad call 2013da8 <.urem> 2014ef8: 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 ); 2014efc: c8 06 20 20 ld [ %i0 + 0x20 ], %g4 2014f00: 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); 2014f04: 82 06 7f f8 add %i1, -8, %g1 2014f08: 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)) 2014f0c: 80 a4 80 04 cmp %l2, %g4 2014f10: 84 60 3f ff subx %g0, -1, %g2 2014f14: 80 a0 c0 12 cmp %g3, %l2 2014f18: 82 60 3f ff subx %g0, -1, %g1 2014f1c: 80 88 80 01 btst %g2, %g1 2014f20: 02 80 00 75 be 20150f4 <_Heap_Resize_block+0x218> 2014f24: a6 10 00 18 mov %i0, %l3 return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 2014f28: 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); 2014f2c: 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 ); 2014f30: 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) || 2014f34: 80 a4 40 04 cmp %l1, %g4 2014f38: 84 60 3f ff subx %g0, -1, %g2 2014f3c: 80 a0 c0 11 cmp %g3, %l1 2014f40: 82 60 3f ff subx %g0, -1, %g1 2014f44: 80 88 80 01 btst %g2, %g1 2014f48: 02 80 00 6b be 20150f4 <_Heap_Resize_block+0x218> 2014f4c: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 2014f50: c2 04 60 04 ld [ %l1 + 4 ], %g1 2014f54: 80 88 60 01 btst 1, %g1 2014f58: 02 80 00 67 be 20150f4 <_Heap_Resize_block+0x218> 2014f5c: 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); 2014f60: 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) || 2014f64: 84 10 20 01 mov 1, %g2 2014f68: 02 80 00 04 be 2014f78 <_Heap_Resize_block+0x9c> 2014f6c: 82 04 40 18 add %l1, %i0, %g1 2014f70: c2 00 60 04 ld [ %g1 + 4 ], %g1 2014f74: 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) 2014f78: 82 24 40 19 sub %l1, %i1, %g1 2014f7c: 82 00 60 04 add %g1, 4, %g1 + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; 2014f80: 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) || 2014f84: 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) { 2014f88: 80 a6 80 01 cmp %i2, %g1 2014f8c: 08 80 00 1e bleu 2015004 <_Heap_Resize_block+0x128> 2014f90: 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 */ 2014f94: 80 a6 60 00 cmp %i1, 0 2014f98: 12 80 00 59 bne 20150fc <_Heap_Resize_block+0x220> 2014f9c: a0 26 80 01 sub %i2, %g1, %l0 uint32_t alignment ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; 2014fa0: 92 10 00 16 mov %l6, %o1 2014fa4: 7f ff fb 81 call 2013da8 <.urem> 2014fa8: 90 10 00 10 mov %l0, %o0 *value = r ? v - r + a : v; 2014fac: 80 a2 20 00 cmp %o0, 0 2014fb0: 02 80 00 05 be 2014fc4 <_Heap_Resize_block+0xe8> 2014fb4: 80 a4 00 14 cmp %l0, %l4 2014fb8: 82 04 00 16 add %l0, %l6, %g1 2014fbc: a0 20 40 08 sub %g1, %o0, %l0 2014fc0: 80 a4 00 14 cmp %l0, %l4 2014fc4: 1a 80 00 03 bcc 2014fd0 <_Heap_Resize_block+0xf4> 2014fc8: 90 10 00 10 mov %l0, %o0 2014fcc: 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) 2014fd0: 80 a2 00 18 cmp %o0, %i0 2014fd4: 18 80 00 4a bgu 20150fc <_Heap_Resize_block+0x220> 2014fd8: 94 10 00 08 mov %o0, %o2 return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */ add_block_size = 2014fdc: 92 10 00 11 mov %l1, %o1 2014fe0: 7f ff c5 91 call 2006624 <_Heap_Block_allocate> 2014fe4: 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; 2014fe8: 90 02 00 15 add %o0, %l5, %o0 2014fec: 90 12 00 1b or %o0, %i3, %o0 2014ff0: d0 24 a0 04 st %o0, [ %l2 + 4 ] --stats->used_blocks; 2014ff4: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 2014ff8: 82 00 7f ff add %g1, -1, %g1 2014ffc: 10 80 00 39 b 20150e0 <_Heap_Resize_block+0x204> 2015000: 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; 2015004: a0 20 40 1a sub %g1, %i2, %l0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 2015008: 92 10 00 16 mov %l6, %o1 201500c: 7f ff fb 67 call 2013da8 <.urem> 2015010: 90 10 00 10 mov %l0, %o0 _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 2015014: a0 a4 00 08 subcc %l0, %o0, %l0 2015018: 22 80 00 33 be,a 20150e4 <_Heap_Resize_block+0x208> 201501c: 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; 2015020: 84 25 40 10 sub %l5, %l0, %g2 if (new_block_size < min_block_size) { 2015024: 80 a0 80 14 cmp %g2, %l4 2015028: 1a 80 00 07 bcc 2015044 <_Heap_Resize_block+0x168> 201502c: 80 a6 60 00 cmp %i1, 0 uint32_t delta = min_block_size - new_block_size; 2015030: 82 25 00 02 sub %l4, %g2, %g1 _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 2015034: a0 a4 00 01 subcc %l0, %g1, %l0 2015038: 02 80 00 2a be 20150e0 <_Heap_Resize_block+0x204> 201503c: 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) { 2015040: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 2015044: 12 80 00 15 bne 2015098 <_Heap_Resize_block+0x1bc> 2015048: 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; 201504c: 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; 2015050: 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; 2015054: c2 24 a0 04 st %g1, [ %l2 + 4 ] new_next_block->size = new_next_block_size | HEAP_PREV_USED; 2015058: 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 ); 201505c: 84 04 80 02 add %l2, %g2, %g2 next_next_block->prev_size = new_next_block_size; 2015060: 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; 2015064: 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; 2015068: 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; 201506c: 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; 2015070: c2 04 e0 30 ld [ %l3 + 0x30 ], %g1 Heap_Block *prev = block->prev; block = new_block; block->next = next; 2015074: c8 20 a0 08 st %g4, [ %g2 + 8 ] 2015078: 82 00 40 10 add %g1, %l0, %g1 block->prev = prev; 201507c: da 20 a0 0c st %o5, [ %g2 + 0xc ] 2015080: c2 24 e0 30 st %g1, [ %l3 + 0x30 ] *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 2015084: 86 00 ff fc add %g3, -4, %g3 next->prev = prev->next = block; 2015088: c4 21 20 0c st %g2, [ %g4 + 0xc ] 201508c: c4 23 60 08 st %g2, [ %o5 + 8 ] 2015090: 10 80 00 14 b 20150e0 <_Heap_Resize_block+0x204> 2015094: c6 27 00 00 st %g3, [ %i4 ] } else if (free_block_size >= min_block_size) { 2015098: 2a 80 00 13 bcs,a 20150e4 <_Heap_Resize_block+0x208> <== NOT EXECUTED 201509c: 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; 20150a0: 82 10 80 1b or %g2, %i3, %g1 <== NOT EXECUTED 20150a4: 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; 20150a8: 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 ); 20150ac: 92 04 80 02 add %l2, %g2, %o1 <== NOT EXECUTED 20150b0: c2 22 60 04 st %g1, [ %o1 + 4 ] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 20150b4: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 20150b8: 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 */ 20150bc: 82 00 60 01 inc %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 20150c0: 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 */ 20150c4: c2 24 e0 40 st %g1, [ %l3 + 0x40 ] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 20150c8: c4 24 e0 50 st %g2, [ %l3 + 0x50 ] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 20150cc: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED 20150d0: 7f ff da 25 call 200b964 <_Heap_Free> <== NOT EXECUTED 20150d4: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 20150d8: 82 04 3f fc add %l0, -4, %g1 <== NOT EXECUTED 20150dc: c2 27 00 00 st %g1, [ %i4 ] <== NOT EXECUTED } } } ++stats->resizes; 20150e0: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1 20150e4: 82 00 60 01 inc %g1 20150e8: c2 24 e0 54 st %g1, [ %l3 + 0x54 ] 20150ec: 81 c7 e0 08 ret 20150f0: 91 e8 20 00 restore %g0, 0, %o0 return HEAP_RESIZE_SUCCESSFUL; 20150f4: 81 c7 e0 08 ret 20150f8: 91 e8 20 02 restore %g0, 2, %o0 } 20150fc: 81 c7 e0 08 ret 2015100: 91 e8 20 01 restore %g0, 1, %o0 0200e45c <_Heap_Walk>: bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 200e45c: 9d e3 bf 98 save %sp, -104, %sp 200e460: a6 10 00 18 mov %i0, %l3 /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 200e464: 80 a6 60 00 cmp %i1, 0 Heap_Control *the_heap, int source, bool do_dump ) { Heap_Block *the_block = the_heap->start; 200e468: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 200e46c: 16 80 00 03 bge 200e478 <_Heap_Walk+0x1c> 200e470: ec 06 20 24 ld [ %i0 + 0x24 ], %l6 source = the_heap->stats.instance; 200e474: f2 06 20 28 ld [ %i0 + 0x28 ], %i1 <== NOT EXECUTED /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 200e478: c2 04 20 04 ld [ %l0 + 4 ], %g1 200e47c: 80 88 60 01 btst 1, %g1 200e480: 12 80 00 07 bne 200e49c <_Heap_Walk+0x40> 200e484: b0 10 20 00 clr %i0 printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); 200e488: 11 00 80 6c sethi %hi(0x201b000), %o0 <== NOT EXECUTED 200e48c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200e490: 90 12 20 90 or %o0, 0x90, %o0 <== NOT EXECUTED 200e494: 7f ff d9 3f call 2004990 <== NOT EXECUTED 200e498: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED error = 1; } if (the_block->prev_size != the_heap->page_size) { 200e49c: c4 04 00 00 ld [ %l0 ], %g2 200e4a0: c2 04 e0 10 ld [ %l3 + 0x10 ], %g1 200e4a4: 80 a0 80 01 cmp %g2, %g1 200e4a8: 22 80 00 5e be,a 200e620 <_Heap_Walk+0x1c4> 200e4ac: 03 00 80 68 sethi %hi(0x201a000), %g1 printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); 200e4b0: 11 00 80 6c sethi %hi(0x201b000), %o0 <== NOT EXECUTED 200e4b4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200e4b8: 90 12 20 c8 or %o0, 0xc8, %o0 <== NOT EXECUTED 200e4bc: 7f ff d9 35 call 2004990 <== NOT EXECUTED 200e4c0: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 200e4c4: 10 80 00 57 b 200e620 <_Heap_Walk+0x1c4> <== NOT EXECUTED 200e4c8: 03 00 80 68 sethi %hi(0x201a000), %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 200e4cc: 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)) { 200e4d0: c6 04 e0 24 ld [ %l3 + 0x24 ], %g3 200e4d4: 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 ); 200e4d8: a2 04 00 12 add %l0, %l2, %l1 200e4dc: 80 a4 40 01 cmp %l1, %g1 200e4e0: 84 60 3f ff subx %g0, -1, %g2 200e4e4: 80 a0 c0 11 cmp %g3, %l1 200e4e8: 82 60 3f ff subx %g0, -1, %g1 200e4ec: 80 88 80 01 btst %g2, %g1 200e4f0: 32 80 00 09 bne,a 200e514 <_Heap_Walk+0xb8> 200e4f4: 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); 200e4f8: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 200e4fc: 11 00 80 6c sethi %hi(0x201b000), %o0 <== NOT EXECUTED 200e500: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200e504: 7f ff d9 23 call 2004990 <== NOT EXECUTED 200e508: 90 12 21 00 or %o0, 0x100, %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", 200e50c: 10 80 00 51 b 200e650 <_Heap_Walk+0x1f4> <== NOT EXECUTED 200e510: 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)) { 200e514: 80 88 60 01 btst 1, %g1 200e518: 12 80 00 27 bne 200e5b4 <_Heap_Walk+0x158> 200e51c: 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) { 200e520: c2 04 40 00 ld [ %l1 ], %g1 200e524: 80 a4 80 01 cmp %l2, %g1 200e528: 02 80 00 07 be 200e544 <_Heap_Walk+0xe8> 200e52c: 80 8d 20 01 btst 1, %l4 if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 200e530: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 200e534: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200e538: 7f ff d9 16 call 2004990 <== NOT EXECUTED 200e53c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED error = 1; } if (!prev_used) { 200e540: 80 8d 20 01 btst 1, %l4 <== NOT EXECUTED 200e544: 32 80 00 0c bne,a 200e574 <_Heap_Walk+0x118> 200e548: c2 04 e0 08 ld [ %l3 + 8 ], %g1 if (do_dump || error) printk("\n"); 200e54c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 200e550: 02 80 00 05 be 200e564 <_Heap_Walk+0x108> <== NOT EXECUTED 200e554: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 200e558: 7f ff d9 0e call 2004990 <== NOT EXECUTED 200e55c: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 200e560: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 200e564: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200e568: 7f ff d9 0a call 2004990 <== NOT EXECUTED 200e56c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 200e570: 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) 200e574: 80 a0 40 10 cmp %g1, %l0 200e578: 02 80 00 0e be 200e5b0 <_Heap_Walk+0x154> 200e57c: 80 a0 40 13 cmp %g1, %l3 200e580: 32 bf ff fd bne,a 200e574 <_Heap_Walk+0x118> 200e584: c2 00 60 08 ld [ %g1 + 8 ], %g1 block = block->next; if(block != the_block) { if (do_dump || error) printk("\n"); 200e588: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 200e58c: 22 80 00 05 be,a 200e5a0 <_Heap_Walk+0x144> <== NOT EXECUTED 200e590: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 200e594: 7f ff d8 ff call 2004990 <== NOT EXECUTED 200e598: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 200e59c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 200e5a0: 7f ff d8 fc call 2004990 <== NOT EXECUTED 200e5a4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 200e5a8: 10 80 00 06 b 200e5c0 <_Heap_Walk+0x164> <== NOT EXECUTED 200e5ac: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 200e5b0: 80 a6 20 00 cmp %i0, 0 200e5b4: 22 80 00 06 be,a 200e5cc <_Heap_Walk+0x170> 200e5b8: c2 04 e0 14 ld [ %l3 + 0x14 ], %g1 200e5bc: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 200e5c0: 7f ff d8 f4 call 2004990 <== NOT EXECUTED 200e5c4: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 200e5c8: c2 04 e0 14 ld [ %l3 + 0x14 ], %g1 <== NOT EXECUTED 200e5cc: 80 a4 80 01 cmp %l2, %g1 200e5d0: 3a 80 00 05 bcc,a 200e5e4 <_Heap_Walk+0x188> 200e5d4: d2 04 e0 10 ld [ %l3 + 0x10 ], %o1 printk("PASS: %d !block size is too small\n", source); 200e5d8: 11 00 80 6c sethi %hi(0x201b000), %o0 <== NOT EXECUTED 200e5dc: 10 80 00 09 b 200e600 <_Heap_Walk+0x1a4> <== NOT EXECUTED 200e5e0: 90 12 21 b8 or %o0, 0x1b8, %o0 ! 201b1b8 <_POSIX_Threads_Default_attributes+0x160> <== NOT EXECUTED error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { 200e5e4: 40 00 27 1e call 201825c <.urem> 200e5e8: 90 10 00 12 mov %l2, %o0 200e5ec: 80 a2 20 00 cmp %o0, 0 200e5f0: 02 80 00 08 be 200e610 <_Heap_Walk+0x1b4> 200e5f4: 80 a6 20 00 cmp %i0, 0 printk("PASS: %d !block size is misaligned\n", source); 200e5f8: 11 00 80 6c sethi %hi(0x201b000), %o0 <== NOT EXECUTED 200e5fc: 90 12 21 e0 or %o0, 0x1e0, %o0 ! 201b1e0 <_POSIX_Threads_Default_attributes+0x188> <== NOT EXECUTED 200e600: 7f ff d8 e4 call 2004990 <== NOT EXECUTED 200e604: 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", 200e608: 10 80 00 12 b 200e650 <_Heap_Walk+0x1f4> <== NOT EXECUTED 200e60c: 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) 200e610: 12 80 00 10 bne 200e650 <_Heap_Walk+0x1f4> 200e614: 96 10 00 16 mov %l6, %o3 break; 200e618: 10 80 00 09 b 200e63c <_Heap_Walk+0x1e0> 200e61c: a0 10 00 11 mov %l1, %l0 error = 1; } } } if (do_dump || error) printk("\n"); 200e620: aa 10 62 f8 or %g1, 0x2f8, %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); 200e624: 03 00 80 6c sethi %hi(0x201b000), %g1 200e628: b8 10 61 88 or %g1, 0x188, %i4 ! 201b188 <_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); 200e62c: 03 00 80 6c sethi %hi(0x201b000), %g1 200e630: ba 10 61 58 or %g1, 0x158, %i5 ! 201b158 <_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); 200e634: 03 00 80 6c sethi %hi(0x201b000), %g1 200e638: ae 10 61 28 or %g1, 0x128, %l7 ! 201b128 <_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 ) { 200e63c: 80 a4 00 16 cmp %l0, %l6 200e640: 32 bf ff a3 bne,a 200e4cc <_Heap_Walk+0x70> 200e644: 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); 200e648: 10 80 00 09 b 200e66c <_Heap_Walk+0x210> 200e64c: 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", 200e650: 11 00 80 6c sethi %hi(0x201b000), %o0 <== NOT EXECUTED 200e654: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200e658: 90 12 22 08 or %o0, 0x208, %o0 <== NOT EXECUTED 200e65c: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 200e660: 7f ff d8 cc call 2004990 <== NOT EXECUTED 200e664: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 200e668: 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) { 200e66c: d6 04 e0 10 ld [ %l3 + 0x10 ], %o3 200e670: 94 08 7f fe and %g1, -2, %o2 200e674: 80 a2 80 0b cmp %o2, %o3 200e678: 02 80 00 06 be 200e690 <_Heap_Walk+0x234> 200e67c: 92 10 00 19 mov %i1, %o1 printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, 200e680: 11 00 80 6c sethi %hi(0x201b000), %o0 <== NOT EXECUTED 200e684: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 200e688: 7f ff d8 c2 call 2004990 <== NOT EXECUTED 200e68c: 90 12 22 48 or %o0, 0x248, %o0 <== NOT EXECUTED if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } 200e690: 81 c7 e0 08 ret 200e694: 81 e8 00 00 restore 0200685c <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 200685c: 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; 2006860: 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 ) 2006864: e0 16 20 10 lduh [ %i0 + 0x10 ], %l0 2006868: 03 00 00 3f sethi %hi(0xfc00), %g1 200686c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2006870: a2 08 80 01 and %g2, %g1, %l1 2006874: 80 a4 00 11 cmp %l0, %l1 2006878: 3a 80 00 06 bcc,a 2006890 <_Objects_Extend_information+0x34> 200687c: e4 06 20 14 ld [ %i0 + 0x14 ], %l2 2006880: aa 10 00 11 mov %l1, %l5 2006884: ae 10 20 00 clr %l7 2006888: 10 80 00 13 b 20068d4 <_Objects_Extend_information+0x78> 200688c: ac 10 20 00 clr %l6 block_count = 0; else { block_count = information->maximum / information->allocation_size; 2006890: 90 10 00 10 mov %l0, %o0 2006894: 92 10 00 12 mov %l2, %o1 2006898: 40 00 34 98 call 2013af8 <.udiv> 200689c: aa 10 00 11 mov %l1, %l5 20068a0: ac 10 20 00 clr %l6 20068a4: 10 80 00 09 b 20068c8 <_Objects_Extend_information+0x6c> 20068a8: ae 10 00 08 mov %o0, %l7 for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 20068ac: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 20068b0: c2 00 40 02 ld [ %g1 + %g2 ], %g1 20068b4: 80 a0 60 00 cmp %g1, 0 20068b8: 02 80 00 08 be 20068d8 <_Objects_Extend_information+0x7c> 20068bc: 80 a5 40 10 cmp %l5, %l0 break; else index_base += information->allocation_size; 20068c0: 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++ ) { 20068c4: ac 05 a0 01 inc %l6 20068c8: 80 a5 80 17 cmp %l6, %l7 20068cc: 0a bf ff f8 bcs 20068ac <_Objects_Extend_information+0x50> 20068d0: 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 ) { 20068d4: 80 a5 40 10 cmp %l5, %l0 20068d8: 2a 80 00 5d bcs,a 2006a4c <_Objects_Extend_information+0x1f0> 20068dc: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 20068e0: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 20068e4: c4 0e 20 12 ldub [ %i0 + 0x12 ], %g2 * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 20068e8: ba 04 00 01 add %l0, %g1, %i5 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 20068ec: 80 a0 a0 00 cmp %g2, 0 /* * Up the block count and maximum */ block_count++; 20068f0: a0 05 e0 01 add %l7, 1, %l0 20068f4: 82 07 40 11 add %i5, %l1, %g1 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 20068f8: 02 80 00 0b be 2006924 <_Objects_Extend_information+0xc8> 20068fc: 91 2c 20 01 sll %l0, 1, %o0 object_blocks = (void**) 2006900: 90 02 00 10 add %o0, %l0, %o0 2006904: 90 00 40 08 add %g1, %o0, %o0 2006908: 40 00 08 93 call 2008b54 <_Workspace_Allocate> 200690c: 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 ) 2006910: a4 92 20 00 orcc %o0, 0, %l2 2006914: 32 80 00 0a bne,a 200693c <_Objects_Extend_information+0xe0> 2006918: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 200691c: 81 c7 e0 08 ret <== NOT EXECUTED 2006920: 81 e8 00 00 restore <== NOT EXECUTED return; } else { object_blocks = (void**) 2006924: 90 02 00 10 add %o0, %l0, %o0 2006928: 90 00 40 08 add %g1, %o0, %o0 200692c: 40 00 08 91 call 2008b70 <_Workspace_Allocate_or_fatal_error> 2006930: 91 2a 20 02 sll %o0, 2, %o0 2006934: a4 10 00 08 mov %o0, %l2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 2006938: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 200693c: 85 2c 20 02 sll %l0, 2, %g2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 2006940: 80 a0 40 11 cmp %g1, %l1 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 2006944: a8 04 80 02 add %l2, %g2, %l4 2006948: a6 05 00 02 add %l4, %g2, %l3 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 200694c: 08 80 00 15 bleu 20069a0 <_Objects_Extend_information+0x144> 2006950: 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, 2006954: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 2006958: a1 2d e0 02 sll %l7, 2, %l0 200695c: 90 10 00 12 mov %l2, %o0 2006960: 40 00 1b 8d call 200d794 2006964: 94 10 00 10 mov %l0, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 2006968: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 200696c: 94 10 00 10 mov %l0, %o2 2006970: 40 00 1b 89 call 200d794 2006974: 90 10 00 14 mov %l4, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 2006978: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 200697c: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 2006980: 94 04 40 0a add %l1, %o2, %o2 2006984: 90 10 00 13 mov %l3, %o0 2006988: 40 00 1b 83 call 200d794 200698c: 95 2a a0 02 sll %o2, 2, %o2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 2006990: 10 80 00 08 b 20069b0 <_Objects_Extend_information+0x154> 2006994: 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++ ) { 2006998: 84 00 a0 01 inc %g2 local_table[ index ] = NULL; 200699c: 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++ ) { 20069a0: 80 a0 80 11 cmp %g2, %l1 20069a4: 2a bf ff fd bcs,a 2006998 <_Objects_Extend_information+0x13c> 20069a8: 83 28 a0 02 sll %g2, 2, %g1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 20069ac: 83 2d e0 02 sll %l7, 2, %g1 inactive_per_block[block_count] = 0; 20069b0: c0 25 00 01 clr [ %l4 + %g1 ] for ( index=index_base ; index < ( information->allocation_size + index_base ); 20069b4: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 20069b8: c0 24 80 01 clr [ %l2 + %g1 ] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 20069bc: 83 2d 60 02 sll %l5, 2, %g1 20069c0: 86 05 40 02 add %l5, %g2, %g3 20069c4: 84 04 c0 01 add %l3, %g1, %g2 20069c8: 10 80 00 04 b 20069d8 <_Objects_Extend_information+0x17c> 20069cc: 82 10 00 15 mov %l5, %g1 index++ ) { 20069d0: 82 00 60 01 inc %g1 20069d4: 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 ); 20069d8: 80 a0 40 03 cmp %g1, %g3 20069dc: 2a bf ff fd bcs,a 20069d0 <_Objects_Extend_information+0x174> 20069e0: c0 20 80 00 clr [ %g2 ] index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 20069e4: 7f ff ec d7 call 2001d40 20069e8: 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( 20069ec: c2 06 00 00 ld [ %i0 ], %g1 20069f0: c8 16 20 04 lduh [ %i0 + 4 ], %g4 20069f4: 87 2f 60 10 sll %i5, 0x10, %g3 20069f8: 89 29 20 1b sll %g4, 0x1b, %g4 20069fc: 87 30 e0 10 srl %g3, 0x10, %g3 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 2006a00: 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( 2006a04: 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; 2006a08: e8 26 20 30 st %l4, [ %i0 + 0x30 ] information->local_table = local_table; 2006a0c: e6 26 20 1c st %l3, [ %i0 + 0x1c ] information->maximum = maximum; information->maximum_id = _Objects_Build_id( 2006a10: 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; 2006a14: fa 36 20 10 sth %i5, [ %i0 + 0x10 ] information->maximum_id = _Objects_Build_id( 2006a18: 82 10 40 02 or %g1, %g2, %g1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 2006a1c: 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( 2006a20: 82 10 40 04 or %g1, %g4, %g1 2006a24: 82 10 40 03 or %g1, %g3, %g1 2006a28: c2 26 20 0c st %g1, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 2006a2c: 7f ff ec c9 call 2001d50 2006a30: 01 00 00 00 nop if ( old_tables ) 2006a34: 80 a4 20 00 cmp %l0, 0 2006a38: 22 80 00 05 be,a 2006a4c <_Objects_Extend_information+0x1f0> 2006a3c: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 _Workspace_Free( old_tables ); 2006a40: 40 00 08 3e call 2008b38 <_Workspace_Free> 2006a44: 90 10 00 10 mov %l0, %o0 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 2006a48: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 2006a4c: e2 06 20 34 ld [ %i0 + 0x34 ], %l1 2006a50: 80 a0 60 00 cmp %g1, 0 2006a54: 02 80 00 0f be 2006a90 <_Objects_Extend_information+0x234> 2006a58: a1 2d a0 02 sll %l6, 2, %l0 information->object_blocks[ block ] = 2006a5c: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 2006a60: 40 00 33 ec call 2013a10 <.umul> 2006a64: d2 06 20 14 ld [ %i0 + 0x14 ], %o1 2006a68: 40 00 08 3b call 2008b54 <_Workspace_Allocate> 2006a6c: 01 00 00 00 nop _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 2006a70: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 2006a74: d0 24 40 10 st %o0, [ %l1 + %l0 ] _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 2006a78: c2 00 40 10 ld [ %g1 + %l0 ], %g1 2006a7c: 80 a0 60 00 cmp %g1, 0 2006a80: 32 80 00 0b bne,a 2006aac <_Objects_Extend_information+0x250> 2006a84: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 2006a88: 81 c7 e0 08 ret <== NOT EXECUTED 2006a8c: 81 e8 00 00 restore <== NOT EXECUTED return; } else { information->object_blocks[ block ] = 2006a90: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 2006a94: 40 00 33 df call 2013a10 <.umul> 2006a98: d2 06 20 14 ld [ %i0 + 0x14 ], %o1 2006a9c: 40 00 08 35 call 2008b70 <_Workspace_Allocate_or_fatal_error> 2006aa0: 01 00 00 00 nop 2006aa4: d0 24 40 10 st %o0, [ %l1 + %l0 ] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 2006aa8: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 2006aac: a5 2d a0 02 sll %l6, 2, %l2 2006ab0: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 2006ab4: d2 00 40 12 ld [ %g1 + %l2 ], %o1 2006ab8: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 2006abc: 90 07 bf ec add %fp, -20, %o0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2006ac0: 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 ) { 2006ac4: a8 10 00 08 mov %o0, %l4 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 2006ac8: 40 00 13 0b call 200b6f4 <_Chain_Initialize> 2006acc: 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( 2006ad0: 10 80 00 0d b 2006b04 <_Objects_Extend_information+0x2a8> 2006ad4: 27 00 00 40 sethi %hi(0x10000), %l3 2006ad8: c4 16 20 04 lduh [ %i0 + 4 ], %g2 2006adc: 83 28 60 18 sll %g1, 0x18, %g1 2006ae0: 85 28 a0 1b sll %g2, 0x1b, %g2 2006ae4: 82 10 40 13 or %g1, %l3, %g1 2006ae8: 82 10 40 02 or %g1, %g2, %g1 2006aec: 82 10 40 10 or %g1, %l0, %g1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2006af0: 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( 2006af4: c2 22 20 08 st %g1, [ %o0 + 8 ] index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 2006af8: a0 04 20 01 inc %l0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2006afc: 7f ff fd 14 call 2005f4c <_Chain_Append> 2006b00: 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 ) { 2006b04: 40 00 12 ec call 200b6b4 <_Chain_Get> 2006b08: 90 10 00 14 mov %l4, %o0 2006b0c: 80 a2 20 00 cmp %o0, 0 2006b10: 32 bf ff f2 bne,a 2006ad8 <_Objects_Extend_information+0x27c> 2006b14: c2 06 00 00 ld [ %i0 ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 2006b18: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2006b1c: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive += information->allocation_size; 2006b20: c6 16 20 2c lduh [ %i0 + 0x2c ], %g3 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 2006b24: c2 20 80 12 st %g1, [ %g2 + %l2 ] information->inactive += information->allocation_size; 2006b28: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2006b2c: 82 00 40 03 add %g1, %g3, %g1 2006b30: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 2006b34: 81 c7 e0 08 ret 2006b38: 81 e8 00 00 restore 02006be8 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 2006be8: 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 ) 2006bec: 82 06 3f ff add %i0, -1, %g1 2006bf0: 80 a0 60 03 cmp %g1, 3 2006bf4: 38 80 00 1c bgu,a 2006c64 <_Objects_Get_information+0x7c> 2006bf8: b0 10 20 00 clr %i0 int the_class_api_maximum; if ( !_Objects_Is_api_valid( the_api ) ) return NULL; if ( !the_class ) 2006bfc: 10 80 00 1c b 2006c6c <_Objects_Get_information+0x84> 2006c00: 80 a6 60 00 cmp %i1, 0 return NULL; the_class_api_maximum = _Objects_API_maximum_class( the_api ); 2006c04: 40 00 13 d5 call 200bb58 <_Objects_API_maximum_class> 2006c08: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum < 0 || 2006c0c: 80 a2 20 00 cmp %o0, 0 2006c10: 06 80 00 14 bl 2006c60 <_Objects_Get_information+0x78> 2006c14: 80 a6 40 08 cmp %i1, %o0 2006c18: 38 80 00 13 bgu,a 2006c64 <_Objects_Get_information+0x7c> 2006c1c: b0 10 20 00 clr %i0 <== NOT EXECUTED the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) 2006c20: 85 2e 20 02 sll %i0, 2, %g2 2006c24: 03 00 80 5d sethi %hi(0x2017400), %g1 2006c28: 82 10 62 50 or %g1, 0x250, %g1 ! 2017650 <_Objects_Information_table> 2006c2c: c4 00 40 02 ld [ %g1 + %g2 ], %g2 2006c30: 80 a0 a0 00 cmp %g2, 0 2006c34: 02 80 00 0c be 2006c64 <_Objects_Get_information+0x7c> 2006c38: b0 10 20 00 clr %i0 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 2006c3c: 83 2e 60 02 sll %i1, 2, %g1 2006c40: f0 00 80 01 ld [ %g2 + %g1 ], %i0 if ( !info ) 2006c44: 80 a6 20 00 cmp %i0, 0 2006c48: 02 80 00 07 be 2006c64 <_Objects_Get_information+0x7c> 2006c4c: 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 ) 2006c50: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 2006c54: 80 a0 60 00 cmp %g1, 0 2006c58: 12 80 00 03 bne 2006c64 <_Objects_Get_information+0x7c> 2006c5c: 01 00 00 00 nop 2006c60: b0 10 20 00 clr %i0 ! 0 return NULL; #endif return info; } 2006c64: 81 c7 e0 08 ret 2006c68: 81 e8 00 00 restore int the_class_api_maximum; if ( !_Objects_Is_api_valid( the_api ) ) return NULL; if ( !the_class ) 2006c6c: 22 bf ff fe be,a 2006c64 <_Objects_Get_information+0x7c> 2006c70: b0 10 20 00 clr %i0 2006c74: 30 bf ff e4 b,a 2006c04 <_Objects_Get_information+0x1c> 02015a5c <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 2015a5c: 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) 2015a60: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 2015a64: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <== NOT EXECUTED 2015a68: 80 8e 40 01 btst %i1, %g1 <== NOT EXECUTED 2015a6c: 22 80 00 02 be,a 2015a74 <_Objects_Get_next+0x18> <== NOT EXECUTED 2015a70: 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) 2015a74: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 2015a78: a0 10 63 ff or %g1, 0x3ff, %l0 ! ffff <== NOT EXECUTED 2015a7c: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED 2015a80: 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); 2015a84: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2015a88: 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) 2015a8c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 2015a90: 08 80 00 08 bleu 2015ab0 <_Objects_Get_next+0x54> <== NOT EXECUTED 2015a94: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED { *location_p = OBJECTS_ERROR; 2015a98: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 2015a9c: 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; 2015aa0: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 2015aa4: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED 2015aa8: 10 80 00 09 b 2015acc <_Objects_Get_next+0x70> <== NOT EXECUTED 2015aac: 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); 2015ab0: 7f ff d7 a2 call 200b938 <_Objects_Get> <== NOT EXECUTED 2015ab4: b2 06 60 01 inc %i1 <== NOT EXECUTED next_id++; } while (*location_p != OBJECTS_LOCAL); 2015ab8: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 2015abc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2015ac0: 32 bf ff f0 bne,a 2015a80 <_Objects_Get_next+0x24> <== NOT EXECUTED 2015ac4: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED *next_id_p = next_id; 2015ac8: f2 26 c0 00 st %i1, [ %i3 ] <== NOT EXECUTED return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 2015acc: 81 c7 e0 08 ret <== NOT EXECUTED 2015ad0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 02008148 <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 2008148: 9d e3 bf 90 save %sp, -112, %sp 200814c: 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 ) 2008150: 80 a6 60 00 cmp %i1, 0 2008154: 02 80 00 22 be 20081dc <_Objects_Id_to_name+0x94> 2008158: b0 10 20 01 mov 1, %i0 return OBJECTS_INVALID_NAME; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 200815c: 80 a2 60 00 cmp %o1, 0 2008160: 12 80 00 06 bne 2008178 <_Objects_Id_to_name+0x30> 2008164: 83 32 60 18 srl %o1, 0x18, %g1 2008168: 03 00 80 6f sethi %hi(0x201bc00), %g1 200816c: c2 00 62 94 ld [ %g1 + 0x294 ], %g1 ! 201be94 <_Thread_Executing> 2008170: 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); 2008174: 83 32 60 18 srl %o1, 0x18, %g1 2008178: 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 ) 200817c: 82 00 bf ff add %g2, -1, %g1 2008180: 80 a0 60 03 cmp %g1, 3 2008184: 38 80 00 16 bgu,a 20081dc <_Objects_Id_to_name+0x94> 2008188: 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 ] ) 200818c: 10 80 00 18 b 20081ec <_Objects_Id_to_name+0xa4> 2008190: 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 ]; 2008194: 83 28 60 02 sll %g1, 2, %g1 2008198: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( !information ) 200819c: 80 a2 20 00 cmp %o0, 0 20081a0: 02 80 00 0f be 20081dc <_Objects_Id_to_name+0x94> 20081a4: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; if ( information->is_string ) 20081a8: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1 20081ac: 80 a0 60 00 cmp %g1, 0 20081b0: 12 80 00 0d bne 20081e4 <_Objects_Id_to_name+0x9c> 20081b4: 01 00 00 00 nop return OBJECTS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &ignored_location ); 20081b8: 7f ff ff c7 call 20080d4 <_Objects_Get> 20081bc: 94 07 bf f4 add %fp, -12, %o2 if ( !the_object ) 20081c0: 80 a2 20 00 cmp %o0, 0 20081c4: 22 80 00 06 be,a 20081dc <_Objects_Id_to_name+0x94> 20081c8: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; *name = the_object->name; 20081cc: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); 20081d0: b0 10 20 00 clr %i0 20081d4: 40 00 02 5f call 2008b50 <_Thread_Enable_dispatch> 20081d8: c2 26 40 00 st %g1, [ %i1 ] 20081dc: 81 c7 e0 08 ret 20081e0: 81 e8 00 00 restore return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 20081e4: 81 c7 e0 08 ret <== NOT EXECUTED 20081e8: 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 ] ) 20081ec: 03 00 80 6f sethi %hi(0x201bc00), %g1 20081f0: 82 10 61 30 or %g1, 0x130, %g1 ! 201bd30 <_Objects_Information_table> 20081f4: c4 00 40 02 ld [ %g1 + %g2 ], %g2 20081f8: 80 a0 a0 00 cmp %g2, 0 20081fc: 12 bf ff e6 bne 2008194 <_Objects_Id_to_name+0x4c> 2008200: 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; 2008204: 81 c7 e0 08 ret <== NOT EXECUTED 2008208: 91 e8 20 03 restore %g0, 3, %o0 <== NOT EXECUTED 0201282c <_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 ) { 201282c: 9d e3 bf 98 save %sp, -104, %sp 2012830: a6 10 00 18 mov %i0, %l3 uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == TRUE */ if ( !id ) 2012834: 80 a6 a0 00 cmp %i2, 0 2012838: 02 80 00 22 be 20128c0 <_Objects_Name_to_id_string+0x94> 201283c: b0 10 20 02 mov 2, %i0 return OBJECTS_INVALID_ADDRESS; if ( !name ) 2012840: 80 a6 60 00 cmp %i1, 0 2012844: 22 80 00 1f be,a 20128c0 <_Objects_Name_to_id_string+0x94> 2012848: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { 201284c: c2 14 e0 10 lduh [ %l3 + 0x10 ], %g1 2012850: a4 90 60 00 orcc %g1, 0, %l2 2012854: 12 80 00 17 bne 20128b0 <_Objects_Name_to_id_string+0x84> 2012858: a2 10 20 01 mov 1, %l1 name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 201285c: 81 c7 e0 08 ret <== NOT EXECUTED 2012860: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED the_object = information->local_table[ index ]; 2012864: 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++ ) { 2012868: a2 04 60 01 inc %l1 the_object = information->local_table[ index ]; 201286c: e0 00 40 02 ld [ %g1 + %g2 ], %l0 if ( !the_object ) 2012870: 80 a4 20 00 cmp %l0, 0 2012874: 02 80 00 0f be 20128b0 <_Objects_Name_to_id_string+0x84> 2012878: 90 10 00 19 mov %i1, %o0 continue; if ( !the_object->name.name_p ) 201287c: d2 04 20 0c ld [ %l0 + 0xc ], %o1 2012880: 80 a2 60 00 cmp %o1, 0 2012884: 02 80 00 0c be 20128b4 <_Objects_Name_to_id_string+0x88> 2012888: 80 a4 40 12 cmp %l1, %l2 continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 201288c: 40 00 0c 8f call 2015ac8 2012890: d4 14 e0 3a lduh [ %l3 + 0x3a ], %o2 2012894: 80 a2 20 00 cmp %o0, 0 2012898: 32 80 00 07 bne,a 20128b4 <_Objects_Name_to_id_string+0x88> 201289c: 80 a4 40 12 cmp %l1, %l2 *id = the_object->id; 20128a0: c2 04 20 08 ld [ %l0 + 8 ], %g1 20128a4: c2 26 80 00 st %g1, [ %i2 ] 20128a8: 81 c7 e0 08 ret 20128ac: 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++ ) { 20128b0: 80 a4 40 12 cmp %l1, %l2 20128b4: 08 bf ff ec bleu 2012864 <_Objects_Name_to_id_string+0x38> 20128b8: 85 2c 60 02 sll %l1, 2, %g2 20128bc: b0 10 20 01 mov 1, %i0 } } } return OBJECTS_INVALID_NAME; } 20128c0: 81 c7 e0 08 ret 20128c4: 81 e8 00 00 restore 02006e6c <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 2006e6c: 9a 10 00 08 mov %o0, %o5 Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == FALSE */ if ( !id ) 2006e70: 80 a2 e0 00 cmp %o3, 0 2006e74: 02 80 00 29 be 2006f18 <_Objects_Name_to_id_u32+0xac> 2006e78: 90 10 20 02 mov 2, %o0 return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 2006e7c: 80 a2 60 00 cmp %o1, 0 2006e80: 22 80 00 26 be,a 2006f18 <_Objects_Name_to_id_u32+0xac> 2006e84: 90 10 20 01 mov 1, %o0 return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 2006e88: c2 13 60 10 lduh [ %o5 + 0x10 ], %g1 2006e8c: 84 90 60 00 orcc %g1, 0, %g2 2006e90: 22 80 00 22 be,a 2006f18 <_Objects_Name_to_id_u32+0xac> 2006e94: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 2006e98: 80 a2 a0 00 cmp %o2, 0 2006e9c: 02 80 00 19 be 2006f00 <_Objects_Name_to_id_u32+0x94> 2006ea0: 83 28 a0 10 sll %g2, 0x10, %g1 2006ea4: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 2006ea8: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 2006eac: 80 a2 80 01 cmp %o2, %g1 2006eb0: 02 80 00 13 be 2006efc <_Objects_Name_to_id_u32+0x90> 2006eb4: 80 a2 a0 01 cmp %o2, 1 2006eb8: 32 80 00 18 bne,a 2006f18 <_Objects_Name_to_id_u32+0xac> 2006ebc: 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++ ) { 2006ec0: 10 80 00 10 b 2006f00 <_Objects_Name_to_id_u32+0x94> 2006ec4: 83 28 a0 10 sll %g2, 0x10, %g1 the_object = information->local_table[ index ]; 2006ec8: c2 03 60 1c ld [ %o5 + 0x1c ], %g1 2006ecc: c4 00 40 02 ld [ %g1 + %g2 ], %g2 if ( !the_object ) 2006ed0: 80 a0 a0 00 cmp %g2, 0 2006ed4: 02 80 00 0d be 2006f08 <_Objects_Name_to_id_u32+0x9c> 2006ed8: 86 00 e0 01 inc %g3 continue; if ( name == the_object->name.name_u32 ) { 2006edc: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 2006ee0: 80 a2 40 01 cmp %o1, %g1 2006ee4: 32 80 00 0a bne,a 2006f0c <_Objects_Name_to_id_u32+0xa0> 2006ee8: 80 a0 c0 04 cmp %g3, %g4 *id = the_object->id; 2006eec: c2 00 a0 08 ld [ %g2 + 8 ], %g1 2006ef0: 90 10 20 00 clr %o0 2006ef4: 81 c3 e0 08 retl 2006ef8: 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++ ) { 2006efc: 83 28 a0 10 sll %g2, 0x10, %g1 2006f00: 86 10 20 01 mov 1, %g3 2006f04: 89 30 60 10 srl %g1, 0x10, %g4 2006f08: 80 a0 c0 04 cmp %g3, %g4 2006f0c: 08 bf ff ef bleu 2006ec8 <_Objects_Name_to_id_u32+0x5c> 2006f10: 85 28 e0 02 sll %g3, 2, %g2 2006f14: 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 } 2006f18: 81 c3 e0 08 retl 2006f1c: 01 00 00 00 nop 02006f28 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 2006f28: 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; 2006f2c: 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; 2006f30: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 2006f34: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 2006f38: 03 00 00 3f sethi %hi(0xfc00), %g1 2006f3c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2006f40: 92 10 00 10 mov %l0, %o1 2006f44: a2 08 80 01 and %g2, %g1, %l1 2006f48: 40 00 32 ec call 2013af8 <.udiv> 2006f4c: 90 22 00 11 sub %o0, %l1, %o0 2006f50: 10 80 00 2e b 2007008 <_Objects_Shrink_information+0xe0> 2006f54: 84 10 20 00 clr %g2 for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == information->allocation_size ) { 2006f58: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 2006f5c: c2 00 40 12 ld [ %g1 + %l2 ], %g1 2006f60: 80 a0 40 10 cmp %g1, %l0 2006f64: 12 80 00 28 bne 2007004 <_Objects_Shrink_information+0xdc> 2006f68: 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; 2006f6c: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 2006f70: 03 00 00 3f sethi %hi(0xfc00), %g1 2006f74: a6 10 63 ff or %g1, 0x3ff, %l3 ! ffff 2006f78: c2 04 20 08 ld [ %l0 + 8 ], %g1 2006f7c: 84 08 40 13 and %g1, %l3, %g2 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 2006f80: 80 a0 80 11 cmp %g2, %l1 2006f84: 2a 80 00 0c bcs,a 2006fb4 <_Objects_Shrink_information+0x8c> 2006f88: e0 04 00 00 ld [ %l0 ], %l0 2006f8c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2006f90: 82 04 40 01 add %l1, %g1, %g1 2006f94: 80 a0 80 01 cmp %g2, %g1 2006f98: 1a 80 00 06 bcc 2006fb0 <_Objects_Shrink_information+0x88> 2006f9c: 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 ); 2006fa0: 40 00 11 bb call 200b68c <_Chain_Extract> 2006fa4: 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 ) ); 2006fa8: 10 80 00 04 b 2006fb8 <_Objects_Shrink_information+0x90> 2006fac: 80 a4 20 00 cmp %l0, 0 the_object = NULL; _Chain_Extract( &extract_me->Node ); } else { the_object = (Objects_Control *) the_object->Node.next; 2006fb0: e0 04 00 00 ld [ %l0 ], %l0 } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 2006fb4: 80 a4 20 00 cmp %l0, 0 2006fb8: 22 80 00 07 be,a 2006fd4 <_Objects_Shrink_information+0xac> 2006fbc: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 2006fc0: c2 04 00 00 ld [ %l0 ], %g1 2006fc4: 80 a0 60 00 cmp %g1, 0 2006fc8: 32 bf ff ed bne,a 2006f7c <_Objects_Shrink_information+0x54> 2006fcc: 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 ] ); 2006fd0: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 2006fd4: 40 00 06 d9 call 2008b38 <_Workspace_Free> 2006fd8: d0 00 40 12 ld [ %g1 + %l2 ], %o0 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 2006fdc: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive -= information->allocation_size; 2006fe0: 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; 2006fe4: 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; 2006fe8: c4 06 20 34 ld [ %i0 + 0x34 ], %g2 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 2006fec: 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; 2006ff0: c0 20 80 12 clr [ %g2 + %l2 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 2006ff4: 82 20 40 03 sub %g1, %g3, %g1 2006ff8: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 2006ffc: 81 c7 e0 08 ret 2007000: 81 e8 00 00 restore return; } index_base += information->allocation_size; 2007004: 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++ ) { 2007008: 80 a0 80 08 cmp %g2, %o0 200700c: 0a bf ff d3 bcs 2006f58 <_Objects_Shrink_information+0x30> 2007010: a5 28 a0 02 sll %g2, 2, %l2 2007014: 81 c7 e0 08 ret 2007018: 81 e8 00 00 restore 02005c38 <_POSIX_API_Initialize>: void _POSIX_API_Initialize( rtems_configuration_table *configuration_table ) { 2005c38: 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; 2005c3c: f0 06 20 44 ld [ %i0 + 0x44 ], %i0 if ( !api_configuration ) 2005c40: 80 a6 20 00 cmp %i0, 0 2005c44: 32 80 00 05 bne,a 2005c58 <_POSIX_API_Initialize+0x20> 2005c48: d0 06 20 14 ld [ %i0 + 0x14 ], %o0 2005c4c: 03 00 80 56 sethi %hi(0x2015800), %g1 <== NOT EXECUTED 2005c50: b0 10 63 30 or %g1, 0x330, %i0 ! 2015b30 <_POSIX_Default_configuration> <== NOT EXECUTED api_configuration = &_POSIX_Default_configuration; _Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects; _POSIX_signals_Manager_Initialization( 2005c54: 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; 2005c58: 05 00 80 5d sethi %hi(0x2017400), %g2 2005c5c: 03 00 80 5e sethi %hi(0x2017800), %g1 2005c60: 82 10 63 c4 or %g1, 0x3c4, %g1 ! 2017bc4 <_POSIX_Objects> _POSIX_signals_Manager_Initialization( 2005c64: 40 00 13 fa call 200ac4c <_POSIX_signals_Manager_Initialization> 2005c68: c2 20 a2 5c st %g1, [ %g2 + 0x25c ] api_configuration->maximum_queued_signals ); _POSIX_Threads_Manager_initialization( 2005c6c: d2 06 20 2c ld [ %i0 + 0x2c ], %o1 2005c70: d4 06 20 30 ld [ %i0 + 0x30 ], %o2 2005c74: 40 00 14 77 call 200ae50 <_POSIX_Threads_Manager_initialization> 2005c78: 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( 2005c7c: 40 00 13 9d call 200aaf0 <_POSIX_Condition_variables_Manager_initialization> 2005c80: d0 06 20 08 ld [ %i0 + 8 ], %o0 api_configuration->maximum_condition_variables ); _POSIX_Key_Manager_initialization( api_configuration->maximum_keys ); 2005c84: 40 00 13 a8 call 200ab24 <_POSIX_Key_Manager_initialization> 2005c88: d0 06 20 0c ld [ %i0 + 0xc ], %o0 _POSIX_Mutex_Manager_initialization( 2005c8c: 40 00 13 c9 call 200abb0 <_POSIX_Mutex_Manager_initialization> 2005c90: d0 06 20 04 ld [ %i0 + 4 ], %o0 api_configuration->maximum_mutexes ); _POSIX_Message_queue_Manager_initialization( 2005c94: 40 00 13 b1 call 200ab58 <_POSIX_Message_queue_Manager_initialization> 2005c98: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 api_configuration->maximum_message_queues ); _POSIX_Semaphore_Manager_initialization( 2005c9c: 40 00 15 28 call 200b13c <_POSIX_Semaphore_Manager_initialization> 2005ca0: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 api_configuration->maximum_semaphores ); _POSIX_Timer_Manager_initialization( api_configuration->maximum_timers ); 2005ca4: 40 00 15 19 call 200b108 <_POSIX_Timer_Manager_initialization> 2005ca8: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 _POSIX_Barrier_Manager_initialization( api_configuration->maximum_barriers ); 2005cac: 40 00 13 ce call 200abe4 <_POSIX_Barrier_Manager_initialization> 2005cb0: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 _POSIX_RWLock_Manager_initialization( api_configuration->maximum_rwlocks ); 2005cb4: 40 00 13 d9 call 200ac18 <_POSIX_RWLock_Manager_initialization> 2005cb8: d0 06 20 24 ld [ %i0 + 0x24 ], %o0 _POSIX_Spinlock_Manager_initialization(api_configuration->maximum_spinlocks); 2005cbc: f0 06 20 28 ld [ %i0 + 0x28 ], %i0 2005cc0: 40 00 14 4d call 200adf4 <_POSIX_Spinlock_Manager_initialization> 2005cc4: 81 e8 00 00 restore 2005cc8: 01 00 00 00 nop 02005e48 <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 2005e48: 9d e3 bf 98 save %sp, -104, %sp Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 2005e4c: 80 a6 20 00 cmp %i0, 0 2005e50: 02 80 00 0c be 2005e80 <_POSIX_Condition_variables_Get+0x38> 2005e54: b4 10 00 19 mov %i1, %i2 *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *id == PTHREAD_COND_INITIALIZER ) { 2005e58: c2 06 00 00 ld [ %i0 ], %g1 2005e5c: 80 a0 7f ff cmp %g1, -1 2005e60: 32 80 00 0c bne,a 2005e90 <_POSIX_Condition_variables_Get+0x48> 2005e64: f2 06 00 00 ld [ %i0 ], %i1 /* * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); 2005e68: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2005e6c: 40 00 00 0d call 2005ea0 <== NOT EXECUTED 2005e70: 92 10 20 00 clr %o1 <== NOT EXECUTED if ( status ) { 2005e74: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2005e78: 22 80 00 06 be,a 2005e90 <_POSIX_Condition_variables_Get+0x48> <== NOT EXECUTED 2005e7c: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED *location = OBJECTS_ERROR; 2005e80: 82 10 20 01 mov 1, %g1 2005e84: c2 26 80 00 st %g1, [ %i2 ] * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) _Objects_Get( &_POSIX_Condition_variables_Information, *id, location ); } 2005e88: 81 c7 e0 08 ret 2005e8c: 91 e8 20 00 restore %g0, 0, %o0 /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 2005e90: 31 00 80 5b sethi %hi(0x2016c00), %i0 2005e94: 40 00 0b c2 call 2008d9c <_Objects_Get> 2005e98: 91 ee 21 84 restore %i0, 0x184, %o0 2005e9c: 01 00 00 00 nop 02006044 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 2006044: 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 ) ) { 2006048: a0 07 bf f4 add %fp, -12, %l0 200604c: 90 10 00 19 mov %i1, %o0 2006050: 40 00 00 7d call 2006244 <_POSIX_Mutex_Get> 2006054: 92 10 00 10 mov %l0, %o1 2006058: 80 a2 20 00 cmp %o0, 0 200605c: 22 80 00 18 be,a 20060bc <_POSIX_Condition_variables_Wait_support+0x78> 2006060: b0 10 20 16 mov 0x16, %i0 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 2006064: 03 00 80 5a sethi %hi(0x2016800), %g1 2006068: c4 00 60 f0 ld [ %g1 + 0xf0 ], %g2 ! 20168f0 <_Thread_Dispatch_disable_level> return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 200606c: 92 10 00 10 mov %l0, %o1 2006070: 84 00 bf ff add %g2, -1, %g2 2006074: 90 10 00 18 mov %i0, %o0 2006078: c4 20 60 f0 st %g2, [ %g1 + 0xf0 ] 200607c: 7f ff ff 73 call 2005e48 <_POSIX_Condition_variables_Get> 2006080: 01 00 00 00 nop switch ( location ) { 2006084: c2 07 bf f4 ld [ %fp + -12 ], %g1 2006088: 80 a0 60 00 cmp %g1, 0 200608c: 12 80 00 33 bne 2006158 <_POSIX_Condition_variables_Wait_support+0x114> 2006090: a2 10 00 08 mov %o0, %l1 case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 2006094: c4 02 20 14 ld [ %o0 + 0x14 ], %g2 2006098: 80 a0 a0 00 cmp %g2, 0 200609c: 02 80 00 0a be 20060c4 <_POSIX_Condition_variables_Wait_support+0x80> 20060a0: 01 00 00 00 nop 20060a4: c2 06 40 00 ld [ %i1 ], %g1 20060a8: 80 a0 80 01 cmp %g2, %g1 20060ac: 02 80 00 06 be 20060c4 <_POSIX_Condition_variables_Wait_support+0x80> 20060b0: 01 00 00 00 nop _Thread_Enable_dispatch(); 20060b4: 40 00 0d 7b call 20096a0 <_Thread_Enable_dispatch> <== NOT EXECUTED 20060b8: b0 10 20 16 mov 0x16, %i0 ! 16 <== NOT EXECUTED 20060bc: 81 c7 e0 08 ret 20060c0: 81 e8 00 00 restore return EINVAL; } (void) pthread_mutex_unlock( mutex ); 20060c4: 40 00 00 f0 call 2006484 20060c8: 90 10 00 19 mov %i1, %o0 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 20060cc: 80 8e e0 ff btst 0xff, %i3 20060d0: 12 80 00 1b bne 200613c <_POSIX_Condition_variables_Wait_support+0xf8> 20060d4: 21 00 80 5a sethi %hi(0x2016800), %l0 the_cond->Mutex = *mutex; 20060d8: c2 06 40 00 ld [ %i1 ], %g1 20060dc: c2 24 60 14 st %g1, [ %l1 + 0x14 ] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 20060e0: c2 04 21 b4 ld [ %l0 + 0x1b4 ], %g1 _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 20060e4: 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; 20060e8: 84 04 60 18 add %l1, 0x18, %g2 _Thread_Executing->Wait.id = *cond; 20060ec: 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; 20060f0: c4 20 60 44 st %g2, [ %g1 + 0x44 ] _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 20060f4: 92 10 00 1a mov %i2, %o1 20060f8: 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; 20060fc: 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 ); 2006100: 15 00 80 28 sethi %hi(0x200a000), %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; 2006104: 82 10 20 01 mov 1, %g1 2006108: 94 12 a0 48 or %o2, 0x48, %o2 200610c: 40 00 0e bc call 2009bfc <_Thread_queue_Enqueue_with_handler> 2006110: c2 24 60 48 st %g1, [ %l1 + 0x48 ] _Thread_Enable_dispatch(); 2006114: 40 00 0d 63 call 20096a0 <_Thread_Enable_dispatch> 2006118: 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; 200611c: c2 04 21 b4 ld [ %l0 + 0x1b4 ], %g1 2006120: f0 00 60 34 ld [ %g1 + 0x34 ], %i0 if ( status && status != ETIMEDOUT ) 2006124: 80 a6 20 00 cmp %i0, 0 2006128: 02 80 00 07 be 2006144 <_POSIX_Condition_variables_Wait_support+0x100> 200612c: 80 a6 20 74 cmp %i0, 0x74 2006130: 12 80 00 0b bne 200615c <_POSIX_Condition_variables_Wait_support+0x118> 2006134: 01 00 00 00 nop 2006138: 30 80 00 03 b,a 2006144 <_POSIX_Condition_variables_Wait_support+0x100> return status; } else { _Thread_Enable_dispatch(); 200613c: 40 00 0d 59 call 20096a0 <_Thread_Enable_dispatch> 2006140: b0 10 20 74 mov 0x74, %i0 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 2006144: 40 00 00 af call 2006400 2006148: 90 10 00 19 mov %i1, %o0 if ( mutex_status ) 200614c: 80 a2 20 00 cmp %o0, 0 2006150: 02 80 00 03 be 200615c <_POSIX_Condition_variables_Wait_support+0x118> 2006154: 01 00 00 00 nop 2006158: b0 10 20 16 mov 0x16, %i0 ! 16 case OBJECTS_ERROR: break; } return EINVAL; } 200615c: 81 c7 e0 08 ret 2006160: 81 e8 00 00 restore 0200c6c8 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 200c6c8: 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 ); 200c6cc: 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 ]; 200c6d0: 05 00 00 3f sethi %hi(0xfc00), %g2 200c6d4: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 200c6d8: 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); 200c6dc: 83 30 60 18 srl %g1, 0x18, %g1 200c6e0: 82 08 60 07 and %g1, 7, %g1 200c6e4: 82 00 60 06 add %g1, 6, %g1 200c6e8: a9 28 a0 02 sll %g2, 2, %l4 200c6ec: a7 28 60 02 sll %g1, 2, %l3 200c6f0: a4 10 20 00 clr %l2 for ( ; ; ) { are_all_null = TRUE; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 200c6f4: 03 00 80 5e sethi %hi(0x2017800), %g1 200c6f8: aa 10 63 44 or %g1, 0x344, %l5 ! 2017b44 <_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 ]; 200c6fc: a0 10 20 01 mov 1, %l0 200c700: 10 80 00 1b b 200c76c <_POSIX_Keys_Run_destructors+0xa4> 200c704: 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 *) 200c708: c2 05 60 1c ld [ %l5 + 0x1c ], %g1 200c70c: f0 00 40 02 ld [ %g1 + %g2 ], %i0 _POSIX_Keys_Information.local_table[ index ]; if ( the_key && the_key->is_active && the_key->destructor ) { 200c710: 80 a6 20 00 cmp %i0, 0 200c714: 02 80 00 16 be 200c76c <_POSIX_Keys_Run_destructors+0xa4> 200c718: a0 04 20 01 inc %l0 200c71c: c2 0e 20 10 ldub [ %i0 + 0x10 ], %g1 200c720: 80 a0 60 00 cmp %g1, 0 200c724: 22 80 00 13 be,a 200c770 <_POSIX_Keys_Run_destructors+0xa8> 200c728: c2 15 60 10 lduh [ %l5 + 0x10 ], %g1 <== NOT EXECUTED 200c72c: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 200c730: 80 a0 a0 00 cmp %g2, 0 200c734: 22 80 00 0f be,a 200c770 <_POSIX_Keys_Run_destructors+0xa8> 200c738: c2 15 60 10 lduh [ %l5 + 0x10 ], %g1 <== NOT EXECUTED value = the_key->Values[ thread_api ][ thread_index ]; 200c73c: c2 06 00 13 ld [ %i0 + %l3 ], %g1 200c740: c2 00 40 14 ld [ %g1 + %l4 ], %g1 if ( value ) { 200c744: 90 90 60 00 orcc %g1, 0, %o0 200c748: 22 80 00 0a be,a 200c770 <_POSIX_Keys_Run_destructors+0xa8> 200c74c: c2 15 60 10 lduh [ %l5 + 0x10 ], %g1 <== NOT EXECUTED (*the_key->destructor)( value ); 200c750: 9f c0 80 00 call %g2 200c754: 01 00 00 00 nop if ( the_key->Values[ thread_api ][ thread_index ] ) 200c758: c2 06 00 13 ld [ %i0 + %l3 ], %g1 200c75c: c2 00 40 14 ld [ %g1 + %l4 ], %g1 200c760: 80 a0 00 01 cmp %g0, %g1 200c764: 82 40 3f ff addx %g0, -1, %g1 200c768: a2 0c 40 01 and %l1, %g1, %l1 for ( ; ; ) { are_all_null = TRUE; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 200c76c: c2 15 60 10 lduh [ %l5 + 0x10 ], %g1 200c770: 80 a4 00 01 cmp %l0, %g1 200c774: 08 bf ff e5 bleu 200c708 <_POSIX_Keys_Run_destructors+0x40> 200c778: 85 2c 20 02 sll %l0, 2, %g2 are_all_null = FALSE; } } } if ( are_all_null == TRUE ) 200c77c: 80 8c 60 ff btst 0xff, %l1 200c780: 12 80 00 05 bne 200c794 <_POSIX_Keys_Run_destructors+0xcc> 200c784: 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 ) 200c788: 80 a4 a0 04 cmp %l2, 4 200c78c: 12 bf ff dd bne 200c700 <_POSIX_Keys_Run_destructors+0x38> 200c790: a0 10 20 01 mov 1, %l0 200c794: 81 c7 e0 08 ret 200c798: 81 e8 00 00 restore 020114c0 <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 20114c0: 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 ); 20114c4: 92 10 20 ff mov 0xff, %o1 20114c8: 40 00 12 10 call 2015d08 20114cc: 90 10 00 18 mov %i0, %o0 const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 20114d0: 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 ); 20114d4: a6 10 00 08 mov %o0, %l3 const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 20114d8: 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 ) 20114dc: 80 a2 20 ff cmp %o0, 0xff 20114e0: 18 80 00 5d bgu 2011654 <_POSIX_Message_queue_Create_support+0x194> 20114e4: b0 10 20 5b mov 0x5b, %i0 20114e8: 05 00 80 89 sethi %hi(0x2022400), %g2 20114ec: c2 00 a1 80 ld [ %g2 + 0x180 ], %g1 ! 2022580 <_Thread_Dispatch_disable_level> 20114f0: 82 00 60 01 inc %g1 20114f4: c2 20 a1 80 st %g1, [ %g2 + 0x180 ] * 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 ) { 20114f8: a4 10 20 10 mov 0x10, %l2 20114fc: 80 a6 a0 00 cmp %i2, 0 2011500: 02 80 00 14 be 2011550 <_POSIX_Message_queue_Create_support+0x90> 2011504: a2 10 20 0a mov 0xa, %l1 attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 2011508: c2 06 a0 04 ld [ %i2 + 4 ], %g1 201150c: 80 a0 60 00 cmp %g1, 0 2011510: 04 80 00 06 ble 2011528 <_POSIX_Message_queue_Create_support+0x68> 2011514: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 2011518: c2 06 a0 08 ld [ %i2 + 8 ], %g1 201151c: 80 a0 60 00 cmp %g1, 0 2011520: 34 80 00 08 bg,a 2011540 <_POSIX_Message_queue_Create_support+0x80> 2011524: 90 07 bf e8 add %fp, -24, %o0 _Thread_Enable_dispatch(); 2011528: 7f ff f2 37 call 200de04 <_Thread_Enable_dispatch> 201152c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); 2011530: 40 00 0a 57 call 2013e8c <__errno> 2011534: 01 00 00 00 nop 2011538: 10 80 00 39 b 201161c <_POSIX_Message_queue_Create_support+0x15c> 201153c: 82 10 20 16 mov 0x16, %g1 ! 16 } attr = *attr_ptr; 2011540: 40 00 0c 64 call 20146d0 2011544: 94 10 20 10 mov 0x10, %o2 2011548: e4 07 bf f0 ld [ %fp + -16 ], %l2 201154c: 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 *) 2011550: 21 00 80 8a sethi %hi(0x2022800), %l0 2011554: 7f ff ee 65 call 200cee8 <_Objects_Allocate> 2011558: 90 14 21 10 or %l0, 0x110, %o0 ! 2022910 <_POSIX_Message_queue_Information> } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 201155c: b4 92 20 00 orcc %o0, 0, %i2 2011560: 32 80 00 08 bne,a 2011580 <_POSIX_Message_queue_Create_support+0xc0> 2011564: 82 10 20 01 mov 1, %g1 _Thread_Enable_dispatch(); 2011568: 7f ff f2 27 call 200de04 <_Thread_Enable_dispatch> <== NOT EXECUTED 201156c: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENFILE ); 2011570: 40 00 0a 47 call 2013e8c <__errno> <== NOT EXECUTED 2011574: 01 00 00 00 nop <== NOT EXECUTED 2011578: 10 80 00 29 b 201161c <_POSIX_Message_queue_Create_support+0x15c> <== NOT EXECUTED 201157c: 82 10 20 17 mov 0x17, %g1 ! 17 <== NOT EXECUTED } the_mq->process_shared = pshared; 2011580: 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); 2011584: 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; 2011588: 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; 201158c: 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); 2011590: 7f ff f7 96 call 200f3e8 <_Workspace_Allocate> 2011594: c2 2e a0 14 stb %g1, [ %i2 + 0x14 ] if (!name) { 2011598: b2 92 20 00 orcc %o0, 0, %i1 201159c: 12 80 00 0b bne 20115c8 <_POSIX_Message_queue_Create_support+0x108> 20115a0: 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 ); 20115a4: 90 14 21 10 or %l0, 0x110, %o0 <== NOT EXECUTED 20115a8: 7f ff ef 3d call 200d29c <_Objects_Free> <== NOT EXECUTED 20115ac: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); 20115b0: 7f ff f2 15 call 200de04 <_Thread_Enable_dispatch> <== NOT EXECUTED 20115b4: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 20115b8: 40 00 0a 35 call 2013e8c <__errno> <== NOT EXECUTED 20115bc: 01 00 00 00 nop <== NOT EXECUTED 20115c0: 10 80 00 17 b 201161c <_POSIX_Message_queue_Create_support+0x15c> <== NOT EXECUTED 20115c4: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED } strcpy( name, name_arg ); 20115c8: 40 00 0f 65 call 201535c 20115cc: 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( 20115d0: 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; 20115d4: c0 26 a0 5c clr [ %i2 + 0x5c ] if ( ! _CORE_message_queue_Initialize( 20115d8: 96 10 00 12 mov %l2, %o3 20115dc: 90 06 a0 1c add %i2, 0x1c, %o0 20115e0: 40 00 03 2a call 2012288 <_CORE_message_queue_Initialize> 20115e4: 92 06 a0 5c add %i2, 0x5c, %o1 20115e8: 80 8a 20 ff btst 0xff, %o0 20115ec: 12 80 00 0f bne 2011628 <_POSIX_Message_queue_Create_support+0x168> 20115f0: 82 14 21 10 or %l0, 0x110, %g1 20115f4: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 20115f8: 7f ff ef 29 call 200d29c <_Objects_Free> <== NOT EXECUTED 20115fc: 90 14 21 10 or %l0, 0x110, %o0 <== NOT EXECUTED attr.mq_maxmsg, attr.mq_msgsize ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); 2011600: 7f ff f7 73 call 200f3cc <_Workspace_Free> <== NOT EXECUTED 2011604: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED _Thread_Enable_dispatch(); 2011608: 7f ff f1 ff call 200de04 <_Thread_Enable_dispatch> <== NOT EXECUTED 201160c: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); 2011610: 40 00 0a 1f call 2013e8c <__errno> <== NOT EXECUTED 2011614: 01 00 00 00 nop <== NOT EXECUTED 2011618: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 201161c: c2 22 00 00 st %g1, [ %o0 ] 2011620: 81 c7 e0 08 ret 2011624: 91 e8 3f ff restore %g0, -1, %o0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2011628: c4 06 a0 08 ld [ %i2 + 8 ], %g2 201162c: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 2011630: 03 00 00 3f sethi %hi(0xfc00), %g1 2011634: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2011638: 84 08 80 01 and %g2, %g1, %g2 201163c: 85 28 a0 02 sll %g2, 2, %g2 2011640: 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; 2011644: f2 26 a0 0c st %i1, [ %i2 + 0xc ] &_POSIX_Message_queue_Information, &the_mq->Object, name ); *message_queue = the_mq; 2011648: f4 26 c0 00 st %i2, [ %i3 ] _Thread_Enable_dispatch(); 201164c: 7f ff f1 ee call 200de04 <_Thread_Enable_dispatch> 2011650: b0 10 20 00 clr %i0 return 0; } 2011654: 81 c7 e0 08 ret 2011658: 81 e8 00 00 restore 02009bac <_POSIX_Message_queue_Delete>: */ void _POSIX_Message_queue_Delete( POSIX_Message_queue_Control *the_mq ) { 2009bac: 9d e3 bf 98 save %sp, -104, %sp if ( !the_mq->linked && !the_mq->open_count ) { 2009bb0: c2 0e 20 15 ldub [ %i0 + 0x15 ], %g1 2009bb4: 80 a0 60 00 cmp %g1, 0 2009bb8: 12 80 00 16 bne 2009c10 <_POSIX_Message_queue_Delete+0x64> 2009bbc: b2 10 00 18 mov %i0, %i1 2009bc0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 2009bc4: 80 a0 60 00 cmp %g1, 0 2009bc8: 12 80 00 12 bne 2009c10 <_POSIX_Message_queue_Delete+0x64> 2009bcc: 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 ) 2009bd0: d0 06 20 0c ld [ %i0 + 0xc ], %o0 2009bd4: 80 a2 20 00 cmp %o0, 0 2009bd8: 02 80 00 04 be 2009be8 <_POSIX_Message_queue_Delete+0x3c> 2009bdc: 31 00 80 8a sethi %hi(0x2022800), %i0 _Workspace_Free( (void *)the_object->name.name_p ); 2009be0: 40 00 15 fb call 200f3cc <_Workspace_Free> <== NOT EXECUTED 2009be4: 01 00 00 00 nop <== NOT EXECUTED _Objects_Close( &_POSIX_Message_queue_Information, the_object ); 2009be8: 92 10 00 19 mov %i1, %o1 2009bec: 40 00 0c e9 call 200cf90 <_Objects_Close> 2009bf0: 90 16 21 10 or %i0, 0x110, %o0 _CORE_message_queue_Close( 2009bf4: 90 06 60 1c add %i1, 0x1c, %o0 2009bf8: 92 10 20 00 clr %o1 2009bfc: 94 10 20 05 mov 5, %o2 2009c00: 40 00 09 eb call 200c3ac <_CORE_message_queue_Close> 2009c04: b0 16 21 10 or %i0, 0x110, %i0 RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 2009c08: 40 00 0d a5 call 200d29c <_Objects_Free> 2009c0c: 81 e8 00 00 restore 2009c10: 81 c7 e0 08 ret 2009c14: 81 e8 00 00 restore 02006f98 <_POSIX_Mutex_Get>: POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 2006f98: 9d e3 bf 98 save %sp, -104, %sp Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 2006f9c: 80 a6 20 00 cmp %i0, 0 2006fa0: 02 80 00 0c be 2006fd0 <_POSIX_Mutex_Get+0x38> 2006fa4: b4 10 00 19 mov %i1, %i2 2006fa8: c2 06 00 00 ld [ %i0 ], %g1 2006fac: 80 a0 7f ff cmp %g1, -1 2006fb0: 32 80 00 0c bne,a 2006fe0 <_POSIX_Mutex_Get+0x48> 2006fb4: f2 06 00 00 ld [ %i0 ], %i1 2006fb8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2006fbc: 40 00 00 20 call 200703c <== NOT EXECUTED 2006fc0: 92 10 20 00 clr %o1 <== NOT EXECUTED 2006fc4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2006fc8: 22 80 00 06 be,a 2006fe0 <_POSIX_Mutex_Get+0x48> <== NOT EXECUTED 2006fcc: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED 2006fd0: 82 10 20 01 mov 1, %g1 2006fd4: c2 26 80 00 st %g1, [ %i2 ] return (POSIX_Mutex_Control *) _Objects_Get( &_POSIX_Mutex_Information, *id, location ); } 2006fd8: 81 c7 e0 08 ret 2006fdc: 91 e8 20 00 restore %g0, 0, %o0 { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); return (POSIX_Mutex_Control *) 2006fe0: 31 00 80 63 sethi %hi(0x2018c00), %i0 2006fe4: 40 00 0b 9b call 2009e50 <_Objects_Get> 2006fe8: 91 ee 20 d0 restore %i0, 0xd0, %o0 2006fec: 01 00 00 00 nop 02006f38 <_POSIX_Mutex_Get_interrupt_disable>: POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 2006f38: 9d e3 bf 98 save %sp, -104, %sp 2006f3c: a0 10 00 19 mov %i1, %l0 Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 2006f40: 80 a6 20 00 cmp %i0, 0 2006f44: 02 80 00 0c be 2006f74 <_POSIX_Mutex_Get_interrupt_disable+0x3c> 2006f48: b6 10 00 1a mov %i2, %i3 2006f4c: c2 06 00 00 ld [ %i0 ], %g1 2006f50: 80 a0 7f ff cmp %g1, -1 2006f54: 32 80 00 0c bne,a 2006f84 <_POSIX_Mutex_Get_interrupt_disable+0x4c> 2006f58: f2 06 00 00 ld [ %i0 ], %i1 2006f5c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2006f60: 40 00 00 37 call 200703c <== NOT EXECUTED 2006f64: 92 10 20 00 clr %o1 <== NOT EXECUTED 2006f68: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2006f6c: 22 80 00 06 be,a 2006f84 <_POSIX_Mutex_Get_interrupt_disable+0x4c> <== NOT EXECUTED 2006f70: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED 2006f74: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 2006f78: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED return (POSIX_Mutex_Control *) _Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level ); } 2006f7c: 81 c7 e0 08 ret <== NOT EXECUTED 2006f80: 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 *) 2006f84: b4 10 00 10 mov %l0, %i2 2006f88: 31 00 80 63 sethi %hi(0x2018c00), %i0 2006f8c: 40 00 0b 93 call 2009dd8 <_Objects_Get_isr_disable> 2006f90: 91 ee 20 d0 restore %i0, 0xd0, %o0 2006f94: 01 00 00 00 nop 0200e83c <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 200e83c: 9d e3 bf 98 save %sp, -104, %sp 200e840: 03 00 80 77 sethi %hi(0x201dc00), %g1 200e844: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 201df00 <_Thread_Dispatch_disable_level> 200e848: 84 00 a0 01 inc %g2 200e84c: c4 20 63 00 st %g2, [ %g1 + 0x300 ] char *name_p = (char *)name; _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { 200e850: 80 a6 60 00 cmp %i1, 0 200e854: 02 80 00 08 be 200e874 <_POSIX_Semaphore_Create_support+0x38> 200e858: 80 a6 20 00 cmp %i0, 0 _Thread_Enable_dispatch(); 200e85c: 7f ff f0 56 call 200a9b4 <_Thread_Enable_dispatch> 200e860: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSYS ); 200e864: 40 00 08 98 call 2010ac4 <__errno> 200e868: 01 00 00 00 nop 200e86c: 10 80 00 19 b 200e8d0 <_POSIX_Semaphore_Create_support+0x94> 200e870: 82 10 20 58 mov 0x58, %g1 ! 58 } if ( name ) { 200e874: 02 80 00 0d be 200e8a8 <_POSIX_Semaphore_Create_support+0x6c> 200e878: 11 00 80 78 sethi %hi(0x201e000), %o0 if( strlen(name) > PATH_MAX ) { 200e87c: 40 00 0f 5c call 20125ec 200e880: 90 10 00 18 mov %i0, %o0 200e884: 80 a2 20 ff cmp %o0, 0xff 200e888: 28 80 00 08 bleu,a 200e8a8 <_POSIX_Semaphore_Create_support+0x6c> 200e88c: 11 00 80 78 sethi %hi(0x201e000), %o0 _Thread_Enable_dispatch(); 200e890: 7f ff f0 49 call 200a9b4 <_Thread_Enable_dispatch> <== NOT EXECUTED 200e894: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 200e898: 40 00 08 8b call 2010ac4 <__errno> <== NOT EXECUTED 200e89c: 01 00 00 00 nop <== NOT EXECUTED 200e8a0: 10 80 00 0c b 200e8d0 <_POSIX_Semaphore_Create_support+0x94> <== NOT EXECUTED 200e8a4: 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 *) 200e8a8: 7f ff ec a8 call 2009b48 <_Objects_Allocate> 200e8ac: 90 12 22 10 or %o0, 0x210, %o0 } } the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 200e8b0: b2 92 20 00 orcc %o0, 0, %i1 200e8b4: 12 80 00 0a bne 200e8dc <_POSIX_Semaphore_Create_support+0xa0> 200e8b8: 80 a6 20 00 cmp %i0, 0 _Thread_Enable_dispatch(); 200e8bc: 7f ff f0 3e call 200a9b4 <_Thread_Enable_dispatch> 200e8c0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSPC ); 200e8c4: 40 00 08 80 call 2010ac4 <__errno> 200e8c8: 01 00 00 00 nop 200e8cc: 82 10 20 1c mov 0x1c, %g1 ! 1c 200e8d0: c2 22 00 00 st %g1, [ %o0 ] 200e8d4: 81 c7 e0 08 ret 200e8d8: 91 e8 3f ff restore %g0, -1, %o0 } the_semaphore->process_shared = pshared; if ( name ) { 200e8dc: 02 80 00 07 be 200e8f8 <_POSIX_Semaphore_Create_support+0xbc> 200e8e0: c0 26 60 10 clr [ %i1 + 0x10 ] the_semaphore->named = TRUE; the_semaphore->open_count = 1; 200e8e4: 82 10 20 01 mov 1, %g1 the_semaphore->linked = TRUE; 200e8e8: c2 2e 60 15 stb %g1, [ %i1 + 0x15 ] the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; the_semaphore->open_count = 1; 200e8ec: c2 26 60 18 st %g1, [ %i1 + 0x18 ] } the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; 200e8f0: 10 80 00 05 b 200e904 <_POSIX_Semaphore_Create_support+0xc8> 200e8f4: c2 2e 60 14 stb %g1, [ %i1 + 0x14 ] the_semaphore->open_count = 1; the_semaphore->linked = TRUE; } else { the_semaphore->named = FALSE; 200e8f8: c0 2e 60 14 clrb [ %i1 + 0x14 ] the_semaphore->open_count = 0; 200e8fc: c0 26 60 18 clr [ %i1 + 0x18 ] the_semaphore->linked = FALSE; 200e900: c0 2e 60 15 clrb [ %i1 + 0x15 ] /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 200e904: 82 10 3f ff mov -1, %g1 _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 200e908: 94 10 00 1a mov %i2, %o2 200e90c: 90 06 60 1c add %i1, 0x1c, %o0 200e910: 92 06 60 5c add %i1, 0x5c, %o1 /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 200e914: c2 26 60 5c st %g1, [ %i1 + 0x5c ] _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 200e918: 7f ff eb 64 call 20096a8 <_CORE_semaphore_Initialize> 200e91c: c0 26 60 60 clr [ %i1 + 0x60 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200e920: c4 06 60 08 ld [ %i1 + 8 ], %g2 200e924: 03 00 80 78 sethi %hi(0x201e000), %g1 200e928: c6 00 62 2c ld [ %g1 + 0x22c ], %g3 ! 201e22c <_POSIX_Semaphore_Information+0x1c> 200e92c: 03 00 00 3f sethi %hi(0xfc00), %g1 200e930: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 200e934: 84 08 80 01 and %g2, %g1, %g2 200e938: 85 28 a0 02 sll %g2, 2, %g2 200e93c: 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; 200e940: f0 26 60 0c st %i0, [ %i1 + 0xc ] &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 200e944: f2 26 c0 00 st %i1, [ %i3 ] _Thread_Enable_dispatch(); 200e948: 7f ff f0 1b call 200a9b4 <_Thread_Enable_dispatch> 200e94c: b0 10 20 00 clr %i0 return 0; } 200e950: 81 c7 e0 08 ret 200e954: 81 e8 00 00 restore 0200af38 <_POSIX_Threads_Create_extension>: bool _POSIX_Threads_Create_extension( Thread_Control *executing, Thread_Control *created ) { 200af38: 9d e3 bf 98 save %sp, -104, %sp POSIX_API_Control *api; POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); 200af3c: 90 10 20 e4 mov 0xe4, %o0 200af40: 7f ff f7 05 call 2008b54 <_Workspace_Allocate> 200af44: b0 10 20 00 clr %i0 if ( !api ) 200af48: a2 92 20 00 orcc %o0, 0, %l1 200af4c: 02 80 00 38 be 200b02c <_POSIX_Threads_Create_extension+0xf4> 200af50: 94 10 20 38 mov 0x38, %o2 return false; created->API_Extensions[ THREAD_API_POSIX ] = api; 200af54: e2 26 61 6c st %l1, [ %i1 + 0x16c ] /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; 200af58: 21 00 80 57 sethi %hi(0x2015c00), %l0 200af5c: a0 14 23 48 or %l0, 0x348, %l0 ! 2015f48 <_POSIX_Threads_Default_attributes> 200af60: 40 00 0a 0d call 200d794 200af64: 92 10 00 10 mov %l0, %o1 api->detachstate = _POSIX_Threads_Default_attributes.detachstate; 200af68: 82 10 20 01 mov 1, %g1 api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; api->schedparam = _POSIX_Threads_Default_attributes.schedparam; 200af6c: 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; 200af70: 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; 200af74: c2 24 60 38 st %g1, [ %l1 + 0x38 ] api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; api->schedparam = _POSIX_Threads_Default_attributes.schedparam; 200af78: 90 04 60 80 add %l1, 0x80, %o0 200af7c: 40 00 0a 06 call 200d794 200af80: 94 10 20 18 mov 0x18, %o2 api->schedparam.sched_priority = 200af84: c4 06 60 14 ld [ %i1 + 0x14 ], %g2 200af88: 82 10 20 ff mov 0xff, %g1 200af8c: 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; 200af90: 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 = 200af94: 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 && 200af98: c6 06 60 08 ld [ %i1 + 8 ], %g3 200af9c: 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; 200afa0: c0 24 60 d4 clr [ %l1 + 0xd4 ] 200afa4: c2 24 60 d8 st %g1, [ %l1 + 0xd8 ] api->cancelability_state = PTHREAD_CANCEL_ENABLE; 200afa8: c0 24 60 cc clr [ %l1 + 0xcc ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 200afac: 82 04 60 d8 add %l1, 0xd8, %g1 api->cancelability_type = PTHREAD_CANCEL_DEFERRED; 200afb0: c0 24 60 d0 clr [ %l1 + 0xd0 ] 200afb4: 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 && 200afb8: 83 30 e0 18 srl %g3, 0x18, %g1 200afbc: 82 08 60 07 and %g1, 7, %g1 200afc0: 80 a0 60 03 cmp %g1, 3 200afc4: 12 80 00 0b bne 200aff0 <_POSIX_Threads_Create_extension+0xb8> 200afc8: c0 24 60 dc clr [ %l1 + 0xdc ] 200afcc: 83 30 e0 1b srl %g3, 0x1b, %g1 200afd0: 80 a0 60 01 cmp %g1, 1 200afd4: 32 80 00 08 bne,a 200aff4 <_POSIX_Threads_Create_extension+0xbc> 200afd8: 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; 200afdc: 03 00 80 5d sethi %hi(0x2017400), %g1 200afe0: c2 00 63 b4 ld [ %g1 + 0x3b4 ], %g1 ! 20177b4 <_Thread_Executing> 200afe4: c2 00 61 6c ld [ %g1 + 0x16c ], %g1 200afe8: 10 80 00 03 b 200aff4 <_POSIX_Threads_Create_extension+0xbc> 200afec: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 } else { api->signals_blocked = 0xffffffff; 200aff0: 82 10 3f ff mov -1, %g1 200aff4: c2 24 60 c4 st %g1, [ %l1 + 0xc4 ] } _Thread_queue_Initialize( 200aff8: 90 04 60 3c add %l1, 0x3c, %o0 200affc: 92 10 20 00 clr %o1 200b000: 15 00 00 04 sethi %hi(0x1000), %o2 200b004: 7f ff f3 b8 call 2007ee4 <_Thread_queue_Initialize> 200b008: 96 10 20 00 clr %o3 THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_JOIN_AT_EXIT, 0 ); _Watchdog_Initialize( 200b00c: 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; 200b010: f2 24 60 c0 st %i1, [ %l1 + 0xc0 ] void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 200b014: c2 24 60 bc st %g1, [ %l1 + 0xbc ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 200b018: c0 24 60 a4 clr [ %l1 + 0xa4 ] the_watchdog->routine = routine; 200b01c: 03 00 80 2c sethi %hi(0x200b000), %g1 the_watchdog->id = id; the_watchdog->user_data = user_data; 200b020: b0 10 20 01 mov 1, %i0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 200b024: 82 10 60 84 or %g1, 0x84, %g1 200b028: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] created->Object.id, created ); return true; } 200b02c: 81 c7 e0 08 ret 200b030: 81 e8 00 00 restore 0200b084 <_POSIX_Threads_Sporadic_budget_TSR>: void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id, void *argument ) { 200b084: 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 ]; 200b088: f0 06 61 6c ld [ %i1 + 0x16c ], %i0 ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget ); 200b08c: 40 00 04 04 call 200c09c <_Timespec_To_ticks> 200b090: 90 06 20 90 add %i0, 0x90, %o0 if ( !ticks ) 200b094: 80 a2 20 00 cmp %o0, 0 200b098: 22 80 00 02 be,a 200b0a0 <_POSIX_Threads_Sporadic_budget_TSR+0x1c> 200b09c: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 200b0a0: 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 || 200b0a4: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 200b0a8: 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; 200b0ac: d0 26 60 78 st %o0, [ %i1 + 0x78 ] 200b0b0: 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 || 200b0b4: 80 a0 e0 00 cmp %g3, 0 200b0b8: 02 80 00 06 be 200b0d0 <_POSIX_Threads_Sporadic_budget_TSR+0x4c> 200b0bc: d2 26 60 18 st %o1, [ %i1 + 0x18 ] 200b0c0: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 200b0c4: 80 a0 40 09 cmp %g1, %o1 200b0c8: 08 80 00 05 bleu 200b0dc <_POSIX_Threads_Sporadic_budget_TSR+0x58> 200b0cc: 01 00 00 00 nop the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); 200b0d0: 90 10 00 19 mov %i1, %o0 200b0d4: 7f ff ef e7 call 2007070 <_Thread_Change_priority> 200b0d8: 94 10 20 01 mov 1, %o2 ticks = _Timespec_To_ticks( &api->schedparam.ss_replenish_period ); 200b0dc: 40 00 03 f0 call 200c09c <_Timespec_To_ticks> 200b0e0: 90 06 20 88 add %i0, 0x88, %o0 if ( !ticks ) 200b0e4: 80 a2 20 00 cmp %o0, 0 200b0e8: 22 80 00 02 be,a 200b0f0 <_POSIX_Threads_Sporadic_budget_TSR+0x6c> 200b0ec: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 200b0f0: d0 26 20 a8 st %o0, [ %i0 + 0xa8 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200b0f4: b2 06 20 9c add %i0, 0x9c, %i1 200b0f8: 31 00 80 5d sethi %hi(0x2017400), %i0 200b0fc: 7f ff f5 e1 call 2008880 <_Watchdog_Insert> 200b100: 91 ee 23 d4 restore %i0, 0x3d4, %o0 200b104: 01 00 00 00 nop 0200b034 <_POSIX_Threads_Sporadic_budget_callout>: ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200b034: c2 02 21 6c ld [ %o0 + 0x16c ], %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 || 200b038: c6 02 20 1c ld [ %o0 + 0x1c ], %g3 RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (255 - priority); 200b03c: 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 */ 200b040: 82 10 3f ff mov -1, %g1 200b044: c2 22 20 78 st %g1, [ %o0 + 0x78 ] 200b048: 82 10 20 ff mov 0xff, %g1 200b04c: 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 || 200b050: 80 a0 e0 00 cmp %g3, 0 200b054: 02 80 00 06 be 200b06c <_POSIX_Threads_Sporadic_budget_callout+0x38> 200b058: d2 22 20 18 st %o1, [ %o0 + 0x18 ] 200b05c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 <== NOT EXECUTED 200b060: 80 a0 40 09 cmp %g1, %o1 <== NOT EXECUTED 200b064: 08 80 00 06 bleu 200b07c <_POSIX_Threads_Sporadic_budget_callout+0x48> <== NOT EXECUTED 200b068: 01 00 00 00 nop <== NOT EXECUTED the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); 200b06c: 94 10 20 01 mov 1, %o2 ! 1 200b070: 82 13 c0 00 mov %o7, %g1 200b074: 7f ff ef ff call 2007070 <_Thread_Change_priority> 200b078: 9e 10 40 00 mov %g1, %o7 200b07c: 81 c3 e0 08 retl <== NOT EXECUTED 200b080: 01 00 00 00 nop 0200c660 <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 200c660: 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 ]; 200c664: f0 06 21 6c ld [ %i0 + 0x16c ], %i0 handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 200c668: 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; 200c66c: a2 06 20 dc add %i0, 0xdc, %l1 200c670: 10 80 00 10 b 200c6b0 <_POSIX_Threads_cancel_run+0x50> 200c674: c2 26 20 cc st %g1, [ %i0 + 0xcc ] while ( !_Chain_Is_empty( handler_stack ) ) { _ISR_Disable( level ); 200c678: 7f ff d5 b2 call 2001d40 <== NOT EXECUTED 200c67c: 01 00 00 00 nop <== NOT EXECUTED handler = (POSIX_Cancel_Handler_control *) 200c680: e0 04 60 04 ld [ %l1 + 4 ], %l0 <== NOT EXECUTED ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 200c684: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED previous = the_node->previous; 200c688: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED next->previous = previous; previous->next = next; 200c68c: 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; 200c690: c2 20 a0 04 st %g1, [ %g2 + 4 ] <== NOT EXECUTED _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 200c694: 7f ff d5 af call 2001d50 <== NOT EXECUTED 200c698: 01 00 00 00 nop <== NOT EXECUTED (*handler->routine)( handler->arg ); 200c69c: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 200c6a0: 9f c0 40 00 call %g1 <== NOT EXECUTED 200c6a4: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED _Workspace_Free( handler ); 200c6a8: 7f ff f1 24 call 2008b38 <_Workspace_Free> <== NOT EXECUTED 200c6ac: 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 ) ) { 200c6b0: c2 06 20 d8 ld [ %i0 + 0xd8 ], %g1 200c6b4: 80 a0 40 11 cmp %g1, %l1 200c6b8: 12 bf ff f0 bne 200c678 <_POSIX_Threads_cancel_run+0x18> 200c6bc: 01 00 00 00 nop (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } 200c6c0: 81 c7 e0 08 ret 200c6c4: 81 e8 00 00 restore 0200d430 <_POSIX_Timer_Insert_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { 200d430: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; (void) _Watchdog_Remove( timer ); 200d434: 7f ff f5 4d call 200a968 <_Watchdog_Remove> 200d438: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 200d43c: 7f ff d5 39 call 2002920 200d440: 01 00 00 00 nop 200d444: 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 ) { 200d448: c2 06 20 08 ld [ %i0 + 8 ], %g1 200d44c: 80 a0 60 00 cmp %g1, 0 200d450: 22 80 00 06 be,a 200d468 <_POSIX_Timer_Insert_helper+0x38> 200d454: f6 26 20 1c st %i3, [ %i0 + 0x1c ] _ISR_Enable( level ); 200d458: 7f ff d5 36 call 2002930 <== NOT EXECUTED 200d45c: b0 10 20 00 clr %i0 <== NOT EXECUTED 200d460: 81 c7 e0 08 ret <== NOT EXECUTED 200d464: 81 e8 00 00 restore <== NOT EXECUTED void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 200d468: f4 26 20 20 st %i2, [ %i0 + 0x20 ] the_watchdog->user_data = user_data; 200d46c: f8 26 20 24 st %i4, [ %i0 + 0x24 ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 200d470: f2 26 20 0c st %i1, [ %i0 + 0xc ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 200d474: c0 26 20 08 clr [ %i0 + 8 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200d478: 92 10 00 18 mov %i0, %o1 200d47c: 11 00 80 70 sethi %hi(0x201c000), %o0 200d480: 7f ff f4 e0 call 200a800 <_Watchdog_Insert> 200d484: 90 12 22 54 or %o0, 0x254, %o0 ! 201c254 <_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 ); 200d488: b0 10 20 01 mov 1, %i0 200d48c: 7f ff d5 29 call 2002930 200d490: 90 10 00 10 mov %l0, %o0 return true; } 200d494: 81 c7 e0 08 ret 200d498: 81 e8 00 00 restore 02006a74 <_POSIX_Timer_TSR>: /* * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR(Objects_Id timer, void *data) { 2006a74: 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; 2006a78: c2 06 60 68 ld [ %i1 + 0x68 ], %g1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 2006a7c: 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; 2006a80: 82 00 60 01 inc %g1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 2006a84: 80 a0 a0 00 cmp %g2, 0 2006a88: 12 80 00 06 bne 2006aa0 <_POSIX_Timer_TSR+0x2c> 2006a8c: c2 26 60 68 st %g1, [ %i1 + 0x68 ] 2006a90: c2 06 60 58 ld [ %i1 + 0x58 ], %g1 <== NOT EXECUTED 2006a94: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2006a98: 02 80 00 0f be 2006ad4 <_POSIX_Timer_TSR+0x60> <== NOT EXECUTED 2006a9c: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 2006aa0: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 2006aa4: d4 06 60 08 ld [ %i1 + 8 ], %o2 2006aa8: 90 06 60 10 add %i1, 0x10, %o0 2006aac: 17 00 80 1a sethi %hi(0x2006800), %o3 2006ab0: 98 10 00 19 mov %i1, %o4 2006ab4: 40 00 1a 5f call 200d430 <_POSIX_Timer_Insert_helper> 2006ab8: 96 12 e2 74 or %o3, 0x274, %o3 ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 2006abc: 80 8a 20 ff btst 0xff, %o0 2006ac0: 02 80 00 0a be 2006ae8 <_POSIX_Timer_TSR+0x74> 2006ac4: 01 00 00 00 nop return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 2006ac8: 40 00 05 e9 call 200826c <_TOD_Get> 2006acc: 90 06 60 6c add %i1, 0x6c, %o0 2006ad0: 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 ) ) { 2006ad4: d0 06 60 38 ld [ %i1 + 0x38 ], %o0 2006ad8: d2 06 60 44 ld [ %i1 + 0x44 ], %o1 2006adc: 40 00 19 7a call 200d0c4 2006ae0: 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; 2006ae4: c0 26 60 68 clr [ %i1 + 0x68 ] 2006ae8: 81 c7 e0 08 ret 2006aec: 81 e8 00 00 restore 0200c840 <_POSIX_signals_Clear_signals>: int signo, siginfo_t *info, bool is_global, bool check_blocked ) { 200c840: 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 ); 200c844: 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 ) 200c848: 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 ); 200c84c: 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 ) 200c850: b8 10 3f ff mov -1, %i4 200c854: 02 80 00 04 be 200c864 <_POSIX_signals_Clear_signals+0x24> 200c858: a1 28 40 02 sll %g1, %g2, %l0 signals_blocked = ~api->signals_blocked; 200c85c: c2 06 20 c4 ld [ %i0 + 0xc4 ], %g1 200c860: 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 ); 200c864: 7f ff d5 37 call 2001d40 200c868: 01 00 00 00 nop 200c86c: a2 10 00 08 mov %o0, %l1 if ( is_global ) { 200c870: 80 8e e0 ff btst 0xff, %i3 200c874: 22 80 00 35 be,a 200c948 <_POSIX_signals_Clear_signals+0x108> 200c878: c4 06 20 c8 ld [ %i0 + 0xc8 ], %g2 if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { 200c87c: 03 00 80 5f sethi %hi(0x2017c00), %g1 200c880: c2 00 62 8c ld [ %g1 + 0x28c ], %g1 ! 2017e8c <_POSIX_signals_Pending> 200c884: 82 0c 00 01 and %l0, %g1, %g1 200c888: 80 88 40 1c btst %g1, %i4 200c88c: 02 80 00 35 be 200c960 <_POSIX_signals_Clear_signals+0x120> 200c890: 83 2e 60 02 sll %i1, 2, %g1 if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 200c894: 85 2e 60 04 sll %i1, 4, %g2 200c898: 84 20 80 01 sub %g2, %g1, %g2 200c89c: 03 00 80 5f sethi %hi(0x2017c00), %g1 200c8a0: 82 10 60 c0 or %g1, 0xc0, %g1 ! 2017cc0 <_POSIX_signals_Vectors> 200c8a4: c2 00 40 02 ld [ %g1 + %g2 ], %g1 200c8a8: 80 a0 60 02 cmp %g1, 2 200c8ac: 12 80 00 23 bne 200c938 <_POSIX_signals_Clear_signals+0xf8> 200c8b0: 03 00 80 5f sethi %hi(0x2017c00), %g1 psiginfo = (POSIX_signals_Siginfo_node *) 200c8b4: 88 10 62 90 or %g1, 0x290, %g4 ! 2017e90 <_POSIX_signals_Siginfo> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 200c8b8: f8 00 80 04 ld [ %g2 + %g4 ], %i4 200c8bc: 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; 200c8c0: 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)) 200c8c4: 80 a7 00 0d cmp %i4, %o5 200c8c8: 32 80 00 04 bne,a 200c8d8 <_POSIX_signals_Clear_signals+0x98> 200c8cc: c2 07 00 00 ld [ %i4 ], %g1 200c8d0: 10 80 00 04 b 200c8e0 <_POSIX_signals_Clear_signals+0xa0> <== NOT EXECUTED 200c8d4: 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; 200c8d8: c2 20 80 04 st %g1, [ %g2 + %g4 ] new_first->previous = _Chain_Head(the_chain); 200c8dc: c6 20 60 04 st %g3, [ %g1 + 4 ] _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); if ( _Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 200c8e0: c2 00 80 04 ld [ %g2 + %g4 ], %g1 200c8e4: 80 a0 40 0d cmp %g1, %o5 200c8e8: 12 80 00 05 bne 200c8fc <_POSIX_signals_Clear_signals+0xbc> 200c8ec: 80 a7 20 00 cmp %i4, 0 _POSIX_signals_Clear_process_signals( mask ); 200c8f0: 40 00 01 9f call 200cf6c <_POSIX_signals_Clear_process_signals> 200c8f4: 90 10 00 10 mov %l0, %o0 if ( psiginfo ) { 200c8f8: 80 a7 20 00 cmp %i4, 0 200c8fc: 02 80 00 1a be 200c964 <_POSIX_signals_Clear_signals+0x124> 200c900: b0 10 20 01 mov 1, %i0 *info = psiginfo->Info; 200c904: 90 10 00 1a mov %i2, %o0 200c908: 92 07 20 08 add %i4, 8, %o1 200c90c: 40 00 03 a2 call 200d794 200c910: 94 10 20 0c mov 0xc, %o2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 200c914: 03 00 80 5f sethi %hi(0x2017c00), %g1 200c918: 82 10 62 44 or %g1, 0x244, %g1 ! 2017e44 <_POSIX_signals_Inactive_siginfo+0x4> 200c91c: c2 27 00 00 st %g1, [ %i4 ] old_last_node = the_chain->last; 200c920: 82 00 7f fc add %g1, -4, %g1 200c924: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_chain->last = the_node; 200c928: f8 20 60 08 st %i4, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 200c92c: 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; 200c930: 10 80 00 04 b 200c940 <_POSIX_signals_Clear_signals+0x100> 200c934: f8 20 80 00 st %i4, [ %g2 ] &psiginfo->Node ); } else do_callout = false; } else _POSIX_signals_Clear_process_signals( mask ); 200c938: 40 00 01 8d call 200cf6c <_POSIX_signals_Clear_process_signals> 200c93c: 90 10 00 10 mov %l0, %o0 200c940: 10 80 00 09 b 200c964 <_POSIX_signals_Clear_signals+0x124> 200c944: b0 10 20 01 mov 1, %i0 do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { 200c948: 82 0c 00 02 and %l0, %g2, %g1 200c94c: 80 88 40 1c btst %g1, %i4 200c950: 02 80 00 04 be 200c960 <_POSIX_signals_Clear_signals+0x120> 200c954: 82 28 80 10 andn %g2, %l0, %g1 api->signals_pending &= ~mask; 200c958: 10 bf ff fa b 200c940 <_POSIX_signals_Clear_signals+0x100> 200c95c: c2 26 20 c8 st %g1, [ %i0 + 0xc8 ] 200c960: b0 10 20 00 clr %i0 do_callout = true; } } _ISR_Enable( level ); 200c964: 7f ff d4 fb call 2001d50 200c968: 90 10 00 11 mov %l1, %o0 return do_callout; } 200c96c: 81 c7 e0 08 ret 200c970: 81 e8 00 00 restore 02005f24 <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 2005f24: 86 10 00 08 mov %o0, %g3 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 2005f28: 84 10 20 01 mov 1, %g2 #include int _POSIX_signals_Get_highest( sigset_t set ) { 2005f2c: 90 10 20 1b mov 0x1b, %o0 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 2005f30: 82 02 3f ff add %o0, -1, %g1 2005f34: 83 28 80 01 sll %g2, %g1, %g1 2005f38: 80 88 40 03 btst %g1, %g3 2005f3c: 12 80 00 12 bne 2005f84 <_POSIX_signals_Get_highest+0x60> 2005f40: 01 00 00 00 nop sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 2005f44: 90 02 20 01 inc %o0 2005f48: 80 a2 20 20 cmp %o0, 0x20 2005f4c: 12 bf ff fa bne 2005f34 <_POSIX_signals_Get_highest+0x10> 2005f50: 82 02 3f ff add %o0, -1, %g1 2005f54: 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 ) ) 2005f58: 84 10 20 01 mov 1, %g2 2005f5c: 82 02 3f ff add %o0, -1, %g1 2005f60: 83 28 80 01 sll %g2, %g1, %g1 2005f64: 80 88 40 03 btst %g1, %g3 2005f68: 12 80 00 07 bne 2005f84 <_POSIX_signals_Get_highest+0x60> 2005f6c: 01 00 00 00 nop return signo; } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 2005f70: 90 02 20 01 inc %o0 2005f74: 80 a2 20 1b cmp %o0, 0x1b 2005f78: 12 bf ff fa bne 2005f60 <_POSIX_signals_Get_highest+0x3c> 2005f7c: 82 02 3f ff add %o0, -1, %g1 2005f80: 90 10 20 00 clr %o0 <== NOT EXECUTED if ( set & signo_to_mask( signo ) ) return signo; } return 0; } 2005f84: 81 c3 e0 08 retl 2005f88: 01 00 00 00 nop 0200ad04 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 200ad04: 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 ]; 200ad08: e0 06 21 6c ld [ %i0 + 0x16c ], %l0 if ( !api ) 200ad0c: 80 a4 20 00 cmp %l0, 0 200ad10: 02 80 00 33 be 200addc <_POSIX_signals_Post_switch_extension+0xd8> 200ad14: 03 00 80 5f sethi %hi(0x2017c00), %g1 * processed at all. No point in doing this loop otherwise. */ while (1) { restart: _ISR_Disable( level ); if ( !(~api->signals_blocked & 200ad18: a2 10 62 8c or %g1, 0x28c, %l1 ! 2017e8c <_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 ); 200ad1c: 7f ff dc 09 call 2001d40 200ad20: 01 00 00 00 nop 200ad24: b0 10 00 08 mov %o0, %i0 if ( !(~api->signals_blocked & 200ad28: c2 04 40 00 ld [ %l1 ], %g1 200ad2c: c4 04 20 c8 ld [ %l0 + 0xc8 ], %g2 200ad30: c6 04 20 c4 ld [ %l0 + 0xc4 ], %g3 200ad34: 82 10 40 02 or %g1, %g2, %g1 200ad38: 80 a8 40 03 andncc %g1, %g3, %g0 200ad3c: 12 80 00 04 bne 200ad4c <_POSIX_signals_Post_switch_extension+0x48> 200ad40: 01 00 00 00 nop (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 200ad44: 7f ff dc 03 call 2001d50 200ad48: 81 e8 00 00 restore break; } _ISR_Enable( level ); 200ad4c: 7f ff dc 01 call 2001d50 200ad50: b0 10 20 1b mov 0x1b, %i0 for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 200ad54: 92 10 00 18 mov %i0, %o1 200ad58: 94 10 20 00 clr %o2 200ad5c: 40 00 06 90 call 200c79c <_POSIX_signals_Check_signal> 200ad60: 90 10 00 10 mov %l0, %o0 200ad64: 80 8a 20 ff btst 0xff, %o0 200ad68: 12 bf ff ed bne 200ad1c <_POSIX_signals_Post_switch_extension+0x18> 200ad6c: 92 10 00 18 mov %i0, %o1 goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 200ad70: 90 10 00 10 mov %l0, %o0 200ad74: 94 10 20 01 mov 1, %o2 200ad78: 40 00 06 89 call 200c79c <_POSIX_signals_Check_signal> 200ad7c: b0 06 20 01 inc %i0 200ad80: 80 8a 20 ff btst 0xff, %o0 200ad84: 12 bf ff e6 bne 200ad1c <_POSIX_signals_Post_switch_extension+0x18> 200ad88: 80 a6 20 20 cmp %i0, 0x20 _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 200ad8c: 12 bf ff f3 bne 200ad58 <_POSIX_signals_Post_switch_extension+0x54> 200ad90: 92 10 00 18 mov %i0, %o1 200ad94: 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 ) ) 200ad98: 92 10 00 18 mov %i0, %o1 200ad9c: 94 10 20 00 clr %o2 200ada0: 40 00 06 7f call 200c79c <_POSIX_signals_Check_signal> 200ada4: 90 10 00 10 mov %l0, %o0 200ada8: 80 8a 20 ff btst 0xff, %o0 200adac: 12 bf ff dc bne 200ad1c <_POSIX_signals_Post_switch_extension+0x18> 200adb0: 92 10 00 18 mov %i0, %o1 goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 200adb4: 90 10 00 10 mov %l0, %o0 200adb8: 94 10 20 01 mov 1, %o2 200adbc: 40 00 06 78 call 200c79c <_POSIX_signals_Check_signal> 200adc0: b0 06 20 01 inc %i0 200adc4: 80 8a 20 ff btst 0xff, %o0 200adc8: 12 bf ff d5 bne 200ad1c <_POSIX_signals_Post_switch_extension+0x18> 200adcc: 80 a6 20 1b cmp %i0, 0x1b } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 200add0: 12 bf ff f3 bne 200ad9c <_POSIX_signals_Post_switch_extension+0x98> 200add4: 92 10 00 18 mov %i0, %o1 200add8: 30 bf ff d1 b,a 200ad1c <_POSIX_signals_Post_switch_extension+0x18> <== NOT EXECUTED 200addc: 81 c7 e0 08 ret <== NOT EXECUTED 200ade0: 81 e8 00 00 restore <== NOT EXECUTED 02005178 <_POSIX_signals_Ualarm_TSR>: void _POSIX_signals_Ualarm_TSR( Objects_Id id, void *argument ) { 2005178: 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 ); 200517c: 7f ff f4 6b call 2002328 2005180: 33 00 80 55 sethi %hi(0x2015400), %i1 2005184: 7f ff ff 1a call 2004dec 2005188: 92 10 20 0e mov 0xe, %o1 RTEMS_INLINE_ROUTINE void _Watchdog_Reset( Watchdog_Control *the_watchdog ) { (void) _Watchdog_Remove( the_watchdog ); 200518c: 40 00 0f cc call 20090bc <_Watchdog_Remove> 2005190: 90 16 62 c4 or %i1, 0x2c4, %o0 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2005194: 31 00 80 56 sethi %hi(0x2015800), %i0 2005198: b2 16 62 c4 or %i1, 0x2c4, %i1 200519c: 40 00 0f 6e call 2008f54 <_Watchdog_Insert> 20051a0: 91 ee 21 04 restore %i0, 0x104, %o0 20051a4: 01 00 00 00 nop <== NOT EXECUTED 02022324 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 2022324: 9d e3 bf 98 save %sp, -104, %sp Heap_Get_information_status status; if ( !the_heap ) 2022328: 80 a6 20 00 cmp %i0, 0 202232c: 02 80 00 10 be 202236c <_Protected_heap_Get_information+0x48> 2022330: 80 a6 60 00 cmp %i1, 0 return false; if ( !the_info ) 2022334: 02 80 00 0e be 202236c <_Protected_heap_Get_information+0x48> 2022338: 23 00 81 6c sethi %hi(0x205b000), %l1 return false; _RTEMS_Lock_allocator(); 202233c: 7f ff 9a d1 call 2008e80 <_API_Mutex_Lock> 2022340: d0 04 62 1c ld [ %l1 + 0x21c ], %o0 ! 205b21c <_RTEMS_Allocator_Mutex> status = _Heap_Get_information( the_heap, the_info ); 2022344: 90 10 00 18 mov %i0, %o0 2022348: 40 00 28 87 call 202c564 <_Heap_Get_information> 202234c: 92 10 00 19 mov %i1, %o1 2022350: a0 10 00 08 mov %o0, %l0 _RTEMS_Unlock_allocator(); 2022354: 7f ff 9a e1 call 2008ed8 <_API_Mutex_Unlock> 2022358: d0 04 62 1c ld [ %l1 + 0x21c ], %o0 if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 202235c: 80 a0 00 10 cmp %g0, %l0 2022360: 82 60 3f ff subx %g0, -1, %g1 2022364: 81 c7 e0 08 ret 2022368: 91 e8 00 01 restore %g0, %g1, %o0 return true; return false; } 202236c: 81 c7 e0 08 ret <== NOT EXECUTED 2022370: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 02006ac8 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 2006ac8: 9d e3 bf 90 save %sp, -112, %sp 2006acc: 11 00 80 71 sethi %hi(0x201c400), %o0 2006ad0: 92 10 00 18 mov %i0, %o1 2006ad4: 90 12 21 ac or %o0, 0x1ac, %o0 2006ad8: 40 00 07 c3 call 20089e4 <_Objects_Get> 2006adc: 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 ) { 2006ae0: c2 07 bf f4 ld [ %fp + -12 ], %g1 2006ae4: 80 a0 60 00 cmp %g1, 0 2006ae8: 12 80 00 26 bne 2006b80 <_Rate_monotonic_Timeout+0xb8> 2006aec: b0 10 00 08 mov %o0, %i0 case OBJECTS_LOCAL: the_thread = the_period->owner; 2006af0: d0 02 20 50 ld [ %o0 + 0x50 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 2006af4: 03 00 00 10 sethi %hi(0x4000), %g1 2006af8: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 2006afc: 80 88 80 01 btst %g2, %g1 2006b00: 22 80 00 0c be,a 2006b30 <_Rate_monotonic_Timeout+0x68> 2006b04: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 2006b08: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 2006b0c: c2 06 20 08 ld [ %i0 + 8 ], %g1 2006b10: 80 a0 80 01 cmp %g2, %g1 2006b14: 32 80 00 07 bne,a 2006b30 <_Rate_monotonic_Timeout+0x68> 2006b18: 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 ); 2006b1c: 13 04 00 ff sethi %hi(0x1003fc00), %o1 2006b20: 40 00 09 09 call 2008f44 <_Thread_Clear_state> 2006b24: 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 ); 2006b28: 10 80 00 08 b 2006b48 <_Rate_monotonic_Timeout+0x80> 2006b2c: 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 ) { 2006b30: 80 a0 60 01 cmp %g1, 1 2006b34: 12 80 00 0e bne 2006b6c <_Rate_monotonic_Timeout+0xa4> 2006b38: 82 10 20 04 mov 4, %g1 the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 2006b3c: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 2006b40: 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; 2006b44: c2 26 20 38 st %g1, [ %i0 + 0x38 ] <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 2006b48: 7f ff fe 4a call 2006470 <_Rate_monotonic_Initiate_statistics> 2006b4c: 01 00 00 00 nop Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2006b50: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006b54: 92 06 20 10 add %i0, 0x10, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2006b58: c2 26 20 1c st %g1, [ %i0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006b5c: 11 00 80 72 sethi %hi(0x201c800), %o0 2006b60: 40 00 0f 68 call 200a900 <_Watchdog_Insert> 2006b64: 90 12 20 04 or %o0, 4, %o0 ! 201c804 <_Watchdog_Ticks_chain> 2006b68: 30 80 00 02 b,a 2006b70 <_Rate_monotonic_Timeout+0xa8> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 2006b6c: 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; 2006b70: 05 00 80 71 sethi %hi(0x201c400), %g2 2006b74: c2 00 a3 20 ld [ %g2 + 0x320 ], %g1 ! 201c720 <_Thread_Dispatch_disable_level> 2006b78: 82 00 7f ff add %g1, -1, %g1 2006b7c: c2 20 a3 20 st %g1, [ %g2 + 0x320 ] 2006b80: 81 c7 e0 08 ret 2006b84: 81 e8 00 00 restore 02007408 <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 2007408: 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 ); 200740c: 11 00 80 5e sethi %hi(0x2017800), %o0 2007410: 7f ff fc de call 2006788 <_Objects_Allocate> 2007414: 90 12 20 50 or %o0, 0x50, %o0 ! 2017850 <_Thread_Internal_information> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2007418: 05 00 80 5d sethi %hi(0x2017400), %g2 200741c: c2 00 a2 f0 ld [ %g2 + 0x2f0 ], %g1 ! 20176f0 <_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(); 2007420: 07 00 80 5e sethi %hi(0x2017800), %g3 2007424: 82 00 60 01 inc %g1 2007428: d0 20 e0 9c st %o0, [ %g3 + 0x9c ] 200742c: c2 20 a2 f0 st %g1, [ %g2 + 0x2f0 ] * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 2007430: 03 00 80 5d sethi %hi(0x2017400), %g1 2007434: c2 00 63 8c ld [ %g1 + 0x38c ], %g1 ! 201778c <_Configuration_Table> 2007438: d2 00 e0 9c ld [ %g3 + 0x9c ], %o1 200743c: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 2007440: 03 00 80 5a sethi %hi(0x2016800), %g1 2007444: d6 00 60 c0 ld [ %g1 + 0xc0 ], %o3 ! 20168c0 2007448: 03 00 80 56 sethi %hi(0x2015800), %g1 200744c: 82 10 63 88 or %g1, 0x388, %g1 ! 2015b88 2007450: 80 a2 c0 02 cmp %o3, %g2 2007454: 1a 80 00 03 bcc 2007460 <_Thread_Create_idle+0x58> 2007458: c2 27 bf f4 st %g1, [ %fp + -12 ] 200745c: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 2007460: 03 00 80 5a sethi %hi(0x2016800), %g1 2007464: da 08 60 c4 ldub [ %g1 + 0xc4 ], %o5 ! 20168c4 2007468: 82 10 20 01 mov 1, %g1 200746c: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 2007470: 82 07 bf f4 add %fp, -12, %g1 2007474: c0 23 a0 60 clr [ %sp + 0x60 ] 2007478: c0 23 a0 64 clr [ %sp + 0x64 ] 200747c: c0 23 a0 68 clr [ %sp + 0x68 ] 2007480: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 2007484: 94 10 20 00 clr %o2 2007488: 98 10 20 00 clr %o4 200748c: 11 00 80 5e sethi %hi(0x2017800), %o0 2007490: 40 00 00 bf call 200778c <_Thread_Initialize> 2007494: 90 12 20 50 or %o0, 0x50, %o0 ! 2017850 <_Thread_Internal_information> * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; _Thread_Start( 2007498: 03 00 80 5d sethi %hi(0x2017400), %g1 200749c: c2 00 63 8c ld [ %g1 + 0x38c ], %g1 ! 201778c <_Configuration_Table> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 20074a0: 07 00 80 5d sethi %hi(0x2017400), %g3 20074a4: f4 00 60 14 ld [ %g1 + 0x14 ], %i2 20074a8: c2 00 e2 f0 ld [ %g3 + 0x2f0 ], %g1 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 20074ac: 05 00 80 5e sethi %hi(0x2017800), %g2 20074b0: 82 00 7f ff add %g1, -1, %g1 20074b4: c4 00 a0 9c ld [ %g2 + 0x9c ], %g2 20074b8: c2 20 e2 f0 st %g1, [ %g3 + 0x2f0 ] 20074bc: 03 00 80 5d sethi %hi(0x2017400), %g1 20074c0: c4 20 63 b4 st %g2, [ %g1 + 0x3b4 ] ! 20177b4 <_Thread_Executing> 20074c4: 03 00 80 5d sethi %hi(0x2017400), %g1 _Thread_Executing = _Thread_Idle; _Thread_Start( 20074c8: 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 = 20074cc: c4 20 63 80 st %g2, [ %g1 + 0x380 ] _Thread_Executing = _Thread_Idle; _Thread_Start( 20074d0: b2 10 20 00 clr %i1 20074d4: b6 10 20 00 clr %i3 20074d8: 40 00 03 ae call 2008390 <_Thread_Start> 20074dc: 99 e8 20 00 restore %g0, 0, %o4 20074e0: 01 00 00 00 nop 0200cd10 <_Thread_Evaluate_mode>: bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing; 200cd10: 03 00 80 5d sethi %hi(0x2017400), %g1 200cd14: c4 00 63 b4 ld [ %g1 + 0x3b4 ], %g2 ! 20177b4 <_Thread_Executing> if ( !_States_Is_ready( executing->current_state ) || 200cd18: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 200cd1c: 80 a0 60 00 cmp %g1, 0 200cd20: 32 80 00 0b bne,a 200cd4c <_Thread_Evaluate_mode+0x3c> 200cd24: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED 200cd28: 03 00 80 5d sethi %hi(0x2017400), %g1 200cd2c: c2 00 63 80 ld [ %g1 + 0x380 ], %g1 ! 2017780 <_Thread_Heir> 200cd30: 80 a0 80 01 cmp %g2, %g1 200cd34: 02 80 00 0b be 200cd60 <_Thread_Evaluate_mode+0x50> 200cd38: 01 00 00 00 nop 200cd3c: c2 08 a0 76 ldub [ %g2 + 0x76 ], %g1 200cd40: 80 a0 60 00 cmp %g1, 0 200cd44: 02 80 00 07 be 200cd60 <_Thread_Evaluate_mode+0x50> 200cd48: 84 10 20 01 mov 1, %g2 ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { _Context_Switch_necessary = TRUE; 200cd4c: 03 00 80 5d sethi %hi(0x2017400), %g1 200cd50: 90 10 20 01 mov 1, %o0 200cd54: c4 28 63 c4 stb %g2, [ %g1 + 0x3c4 ] 200cd58: 81 c3 e0 08 retl 200cd5c: 01 00 00 00 nop return TRUE; } return FALSE; } 200cd60: 81 c3 e0 08 retl 200cd64: 90 10 20 00 clr %o0 ! 0 020076dc <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 20076dc: 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 ) ) { 20076e0: 80 a2 20 00 cmp %o0, 0 20076e4: 12 80 00 0a bne 200770c <_Thread_Get+0x30> 20076e8: 94 10 00 09 mov %o1, %o2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 20076ec: 03 00 80 5d sethi %hi(0x2017400), %g1 20076f0: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 20176f0 <_Thread_Dispatch_disable_level> 20076f4: 84 00 a0 01 inc %g2 20076f8: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 20076fc: 03 00 80 5d sethi %hi(0x2017400), %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; 2007700: c0 22 40 00 clr [ %o1 ] tp = _Thread_Executing; 2007704: 81 c3 e0 08 retl 2007708: d0 00 63 b4 ld [ %g1 + 0x3b4 ], %o0 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 200770c: 83 32 20 18 srl %o0, 0x18, %g1 2007710: 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 ) 2007714: 82 00 bf ff add %g2, -1, %g1 2007718: 80 a0 60 03 cmp %g1, 3 200771c: 08 80 00 16 bleu 2007774 <_Thread_Get+0x98> 2007720: 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; 2007724: 82 10 20 01 mov 1, %g1 2007728: 10 80 00 09 b 200774c <_Thread_Get+0x70> 200772c: c2 22 80 00 st %g1, [ %o2 ] goto done; } api_information = _Objects_Information_table[ the_api ]; 2007730: 03 00 80 5d sethi %hi(0x2017400), %g1 2007734: 82 10 62 50 or %g1, 0x250, %g1 ! 2017650 <_Objects_Information_table> 2007738: c2 00 40 02 ld [ %g1 + %g2 ], %g1 if ( !api_information ) { 200773c: 80 a0 60 00 cmp %g1, 0 2007740: 32 80 00 05 bne,a 2007754 <_Thread_Get+0x78> 2007744: d0 00 60 04 ld [ %g1 + 4 ], %o0 *location = OBJECTS_ERROR; 2007748: c6 22 80 00 st %g3, [ %o2 ] 200774c: 81 c3 e0 08 retl 2007750: 90 10 20 00 clr %o0 goto done; } information = api_information[ the_class ]; if ( !information ) { 2007754: 80 a2 20 00 cmp %o0, 0 2007758: 12 80 00 04 bne 2007768 <_Thread_Get+0x8c> 200775c: 92 10 00 04 mov %g4, %o1 *location = OBJECTS_ERROR; 2007760: 81 c3 e0 08 retl <== NOT EXECUTED 2007764: c6 22 80 00 st %g3, [ %o2 ] <== NOT EXECUTED goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 2007768: 82 13 c0 00 mov %o7, %g1 200776c: 7f ff fd 61 call 2006cf0 <_Objects_Get> 2007770: 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 :) */ 2007774: 80 a0 e0 01 cmp %g3, 1 2007778: 22 bf ff ee be,a 2007730 <_Thread_Get+0x54> 200777c: 85 28 a0 02 sll %g2, 2, %g2 *location = OBJECTS_ERROR; 2007780: 10 bf ff ea b 2007728 <_Thread_Get+0x4c> 2007784: 82 10 20 01 mov 1, %g1 0200cd68 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 200cd68: 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; 200cd6c: 03 00 80 5d sethi %hi(0x2017400), %g1 200cd70: e0 00 63 b4 ld [ %g1 + 0x3b4 ], %l0 ! 20177b4 <_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(); 200cd74: 3f 00 80 33 sethi %hi(0x200cc00), %i7 200cd78: be 17 e1 68 or %i7, 0x168, %i7 ! 200cd68 <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 200cd7c: d0 04 20 b8 ld [ %l0 + 0xb8 ], %o0 _ISR_Set_level(level); 200cd80: 7f ff d3 f4 call 2001d50 200cd84: 91 2a 20 08 sll %o0, 8, %o0 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; doneConstructors = 1; 200cd88: 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; 200cd8c: 05 00 80 5d sethi %hi(0x2017400), %g2 200cd90: e2 08 a0 00 ldub [ %g2 ], %l1 doneConstructors = 1; 200cd94: c2 28 a0 00 stb %g1, [ %g2 ] #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && !_Thread_Is_allocated_fp( executing ) ) { 200cd98: c2 04 21 60 ld [ %l0 + 0x160 ], %g1 200cd9c: 80 a0 60 00 cmp %g1, 0 200cda0: 02 80 00 0c be 200cdd0 <_Thread_Handler+0x68> 200cda4: 03 00 80 5d sethi %hi(0x2017400), %g1 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 200cda8: d0 00 63 78 ld [ %g1 + 0x378 ], %o0 ! 2017778 <_Thread_Allocated_fp> 200cdac: 80 a4 00 08 cmp %l0, %o0 200cdb0: 02 80 00 08 be 200cdd0 <_Thread_Handler+0x68> 200cdb4: 80 a2 20 00 cmp %o0, 0 if ( _Thread_Allocated_fp != NULL ) 200cdb8: 22 80 00 06 be,a 200cdd0 <_Thread_Handler+0x68> 200cdbc: e0 20 63 78 st %l0, [ %g1 + 0x378 ] _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 200cdc0: 7f ff ef 99 call 2008c24 <_CPU_Context_save_fp> 200cdc4: 90 02 21 60 add %o0, 0x160, %o0 _Thread_Allocated_fp = executing; 200cdc8: 03 00 80 5d sethi %hi(0x2017400), %g1 200cdcc: e0 20 63 78 st %l0, [ %g1 + 0x378 ] ! 2017778 <_Thread_Allocated_fp> * 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 ); 200cdd0: 7f ff ee 29 call 2008674 <_User_extensions_Thread_begin> 200cdd4: 90 10 00 10 mov %l0, %o0 /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 200cdd8: 7f ff ea 34 call 20076a8 <_Thread_Enable_dispatch> 200cddc: 01 00 00 00 nop /* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ 200cde0: 83 2c 60 18 sll %l1, 0x18, %g1 200cde4: 80 a0 60 00 cmp %g1, 0 200cde8: 32 80 00 05 bne,a 200cdfc <_Thread_Handler+0x94> 200cdec: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 { _init (); 200cdf0: 40 00 26 7a call 20167d8 <_init> 200cdf4: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 200cdf8: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 200cdfc: 80 a0 60 01 cmp %g1, 1 200ce00: 22 80 00 0d be,a 200ce34 <_Thread_Handler+0xcc> 200ce04: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 200ce08: 2a 80 00 09 bcs,a 200ce2c <_Thread_Handler+0xc4> 200ce0c: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 200ce10: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 200ce14: 02 80 00 0d be 200ce48 <_Thread_Handler+0xe0> <== NOT EXECUTED 200ce18: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 200ce1c: 12 80 00 14 bne 200ce6c <_Thread_Handler+0x104> <== NOT EXECUTED 200ce20: 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 = 200ce24: 10 80 00 0d b 200ce58 <_Thread_Handler+0xf0> <== NOT EXECUTED 200ce28: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED __main (); #endif switch ( executing->Start.prototype ) { case THREAD_START_NUMERIC: executing->Wait.return_argument = 200ce2c: 10 80 00 03 b 200ce38 <_Thread_Handler+0xd0> 200ce30: d0 04 20 a8 ld [ %l0 + 0xa8 ], %o0 (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); break; case THREAD_START_POINTER: executing->Wait.return_argument = 200ce34: d0 04 20 a4 ld [ %l0 + 0xa4 ], %o0 200ce38: 9f c0 40 00 call %g1 200ce3c: 01 00 00 00 nop executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = 200ce40: 10 80 00 0b b 200ce6c <_Thread_Handler+0x104> 200ce44: d0 24 20 28 st %o0, [ %l0 + 0x28 ] (*(Thread_Entry_pointer) executing->Start.entry_point)( executing->Start.pointer_argument ); break; case THREAD_START_BOTH_POINTER_FIRST: executing->Wait.return_argument = 200ce48: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED 200ce4c: d0 04 20 a4 ld [ %l0 + 0xa4 ], %o0 <== NOT EXECUTED 200ce50: 10 80 00 04 b 200ce60 <_Thread_Handler+0xf8> <== NOT EXECUTED 200ce54: d2 04 20 a8 ld [ %l0 + 0xa8 ], %o1 <== NOT EXECUTED executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = 200ce58: d0 04 20 a8 ld [ %l0 + 0xa8 ], %o0 <== NOT EXECUTED 200ce5c: d2 04 20 a4 ld [ %l0 + 0xa4 ], %o1 <== NOT EXECUTED 200ce60: 9f c0 40 00 call %g1 <== NOT EXECUTED 200ce64: 01 00 00 00 nop <== NOT EXECUTED 200ce68: d0 24 20 28 st %o0, [ %l0 + 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 ); 200ce6c: 7f ff ee 13 call 20086b8 <_User_extensions_Thread_exitted> 200ce70: 90 10 00 10 mov %l0, %o0 _Internal_error_Occurred( 200ce74: 90 10 20 00 clr %o0 200ce78: 92 10 20 01 mov 1, %o1 200ce7c: 7f ff e6 14 call 20066cc <_Internal_error_Occurred> 200ce80: 94 10 20 06 mov 6, %o2 200ce84: 01 00 00 00 nop 0200778c <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 200778c: 9d e3 bf 98 save %sp, -104, %sp 2007790: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 2007794: 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 ) { 2007798: e2 00 40 00 ld [ %g1 ], %l1 200779c: e4 07 a0 60 ld [ %fp + 0x60 ], %l2 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 20077a0: 12 80 00 0e bne 20077d8 <_Thread_Initialize+0x4c> 20077a4: e0 0f a0 5f ldub [ %fp + 0x5f ], %l0 actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 20077a8: 90 10 00 19 mov %i1, %o0 20077ac: 40 00 02 ba call 2008294 <_Thread_Stack_Allocate> 20077b0: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 20077b4: 80 a2 20 00 cmp %o0, 0 20077b8: 02 80 00 2d be 200786c <_Thread_Initialize+0xe0> 20077bc: 80 a2 00 1b cmp %o0, %i3 20077c0: 0a 80 00 2b bcs 200786c <_Thread_Initialize+0xe0> 20077c4: 01 00 00 00 nop return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; 20077c8: 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; 20077cc: f4 06 60 d0 ld [ %i1 + 0xd0 ], %i2 the_thread->Start.core_allocated_stack = TRUE; 20077d0: 10 80 00 04 b 20077e0 <_Thread_Initialize+0x54> 20077d4: c2 2e 60 c0 stb %g1, [ %i1 + 0xc0 ] } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = FALSE; 20077d8: c0 2e 60 c0 clrb [ %i1 + 0xc0 ] <== NOT EXECUTED 20077dc: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 20077e0: f4 26 60 c8 st %i2, [ %i1 + 0xc8 ] the_stack->size = size; 20077e4: d0 26 60 c4 st %o0, [ %i1 + 0xc4 ] /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 20077e8: 80 8f 20 ff btst 0xff, %i4 20077ec: 02 80 00 07 be 2007808 <_Thread_Initialize+0x7c> 20077f0: b8 10 20 00 clr %i4 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 20077f4: 40 00 04 d8 call 2008b54 <_Workspace_Allocate> 20077f8: 90 10 20 88 mov 0x88, %o0 if ( !fp_area ) { 20077fc: b8 92 20 00 orcc %o0, 0, %i4 2007800: 02 80 00 19 be 2007864 <_Thread_Initialize+0xd8> 2007804: 01 00 00 00 nop /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2007808: 03 00 80 5d sethi %hi(0x2017400), %g1 200780c: d0 00 63 94 ld [ %g1 + 0x394 ], %o0 ! 2017794 <_Thread_Maximum_extensions> fp_area = _Context_Fp_start( fp_area, 0 ); } else fp_area = NULL; the_thread->fp_context = fp_area; 2007810: f8 26 61 60 st %i4, [ %i1 + 0x160 ] the_thread->Start.fp_context = fp_area; 2007814: f8 26 60 cc st %i4, [ %i1 + 0xcc ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2007818: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 200781c: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 2007820: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 2007824: c0 26 60 6c clr [ %i1 + 0x6c ] /* * Clear the libc reent hook. */ the_thread->libc_reent = NULL; 2007828: c0 26 61 64 clr [ %i1 + 0x164 ] /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 200782c: 80 a2 20 00 cmp %o0, 0 2007830: 02 80 00 11 be 2007874 <_Thread_Initialize+0xe8> 2007834: b6 10 20 00 clr %i3 extensions_area = _Workspace_Allocate( 2007838: 90 02 20 01 inc %o0 200783c: 40 00 04 c6 call 2008b54 <_Workspace_Allocate> 2007840: 91 2a 20 02 sll %o0, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 2007844: b6 92 20 00 orcc %o0, 0, %i3 2007848: 12 80 00 0c bne 2007878 <_Thread_Initialize+0xec> 200784c: 80 a6 e0 00 cmp %i3, 0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 2007850: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 2007854: 02 80 00 04 be 2007864 <_Thread_Initialize+0xd8> <== NOT EXECUTED 2007858: 01 00 00 00 nop <== NOT EXECUTED (void) _Workspace_Free( fp_area ); 200785c: 40 00 04 b7 call 2008b38 <_Workspace_Free> <== NOT EXECUTED 2007860: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED #endif _Thread_Stack_Free( the_thread ); 2007864: 40 00 02 a4 call 20082f4 <_Thread_Stack_Free> <== NOT EXECUTED 2007868: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 200786c: 81 c7 e0 08 ret 2007870: 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 ) { 2007874: 80 a6 e0 00 cmp %i3, 0 2007878: 02 80 00 0e be 20078b0 <_Thread_Initialize+0x124> 200787c: f6 26 61 74 st %i3, [ %i1 + 0x174 ] uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 2007880: 03 00 80 5d sethi %hi(0x2017400), %g1 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 2007884: 84 10 20 00 clr %g2 uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 2007888: 10 80 00 05 b 200789c <_Thread_Initialize+0x110> 200788c: 88 10 63 94 or %g1, 0x394, %g4 the_thread->extensions[i] = NULL; 2007890: c2 06 61 74 ld [ %i1 + 0x174 ], %g1 * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 2007894: 84 00 a0 01 inc %g2 the_thread->extensions[i] = NULL; 2007898: c0 20 40 03 clr [ %g1 + %g3 ] * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 200789c: c2 01 00 00 ld [ %g4 ], %g1 20078a0: 82 00 60 01 inc %g1 20078a4: 80 a0 80 01 cmp %g2, %g1 20078a8: 0a bf ff fa bcs 2007890 <_Thread_Initialize+0x104> 20078ac: 87 28 a0 02 sll %g2, 2, %g3 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 20078b0: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 20078b4: e0 2e 60 ac stb %l0, [ %i1 + 0xac ] the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 20078b8: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ] switch ( budget_algorithm ) { 20078bc: 80 a4 a0 02 cmp %l2, 2 20078c0: 12 80 00 05 bne 20078d4 <_Thread_Initialize+0x148> 20078c4: e4 26 60 b0 st %l2, [ %i1 + 0xb0 ] case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 20078c8: 03 00 80 5d sethi %hi(0x2017400), %g1 <== NOT EXECUTED 20078cc: c2 00 62 48 ld [ %g1 + 0x248 ], %g1 ! 2017648 <_Thread_Ticks_per_timeslice> <== NOT EXECUTED 20078d0: 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; 20078d4: 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 ); 20078d8: 92 10 00 1d mov %i5, %o1 break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 20078dc: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ] the_thread->current_state = STATES_DORMANT; 20078e0: 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 ); 20078e4: 90 10 00 19 mov %i1, %o0 break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 20078e8: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_thread->Wait.queue = NULL; 20078ec: c0 26 60 44 clr [ %i1 + 0x44 ] the_thread->resource_count = 0; 20078f0: c0 26 60 1c clr [ %i1 + 0x1c ] the_thread->suspend_count = 0; 20078f4: c0 26 60 70 clr [ %i1 + 0x70 ] the_thread->real_priority = priority; 20078f8: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 20078fc: 40 00 01 c5 call 2008010 <_Thread_Set_priority> 2007900: fa 26 60 bc st %i5, [ %i1 + 0xbc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2007904: c4 06 60 08 ld [ %i1 + 8 ], %g2 2007908: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 200790c: 03 00 00 3f sethi %hi(0xfc00), %g1 2007910: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2007914: 84 08 80 01 and %g2, %g1, %g2 2007918: 85 28 a0 02 sll %g2, 2, %g2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 200791c: e2 26 60 0c st %l1, [ %i1 + 0xc ] /* * Initialize the CPU usage statistics */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS the_thread->cpu_time_used.tv_sec = 0; 2007920: c0 26 60 84 clr [ %i1 + 0x84 ] the_thread->cpu_time_used.tv_nsec = 0; 2007924: c0 26 60 88 clr [ %i1 + 0x88 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2007928: 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 ); 200792c: 90 10 00 19 mov %i1, %o0 2007930: 40 00 03 86 call 2008748 <_User_extensions_Thread_create> 2007934: b0 10 20 01 mov 1, %i0 if ( !extension_status ) { 2007938: 80 8a 20 ff btst 0xff, %o0 200793c: 12 80 00 0e bne 2007974 <_Thread_Initialize+0x1e8> 2007940: 80 a6 e0 00 cmp %i3, 0 if ( extensions_area ) 2007944: 02 80 00 05 be 2007958 <_Thread_Initialize+0x1cc> <== NOT EXECUTED 2007948: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED (void) _Workspace_Free( extensions_area ); 200794c: 40 00 04 7b call 2008b38 <_Workspace_Free> <== NOT EXECUTED 2007950: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 2007954: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 2007958: 02 80 00 05 be 200796c <_Thread_Initialize+0x1e0> <== NOT EXECUTED 200795c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED (void) _Workspace_Free( fp_area ); 2007960: 40 00 04 76 call 2008b38 <_Workspace_Free> <== NOT EXECUTED 2007964: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED #endif _Thread_Stack_Free( the_thread ); 2007968: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 200796c: 40 00 02 62 call 20082f4 <_Thread_Stack_Free> <== NOT EXECUTED 2007970: b0 10 20 00 clr %i0 <== NOT EXECUTED return FALSE; } return TRUE; } 2007974: 81 c7 e0 08 ret 2007978: 81 e8 00 00 restore 0200cd44 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 200cd44: 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; 200cd48: 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; 200cd4c: c2 0e 20 ac ldub [ %i0 + 0xac ], %g1 the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 200cd50: 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; 200cd54: 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; 200cd58: c6 26 20 80 st %g3, [ %i0 + 0x80 ] the_thread->Start.pointer_argument = pointer_argument; 200cd5c: f2 26 20 a4 st %i1, [ %i0 + 0xa4 ] the_thread->Start.numeric_argument = numeric_argument; 200cd60: 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; 200cd64: c0 26 20 1c clr [ %i0 + 0x1c ] the_thread->suspend_count = 0; 200cd68: 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 ) ) { 200cd6c: 7f ff ef 3d call 2008a60 <_Thread_queue_Extract_with_proxy> 200cd70: 90 10 00 18 mov %i0, %o0 200cd74: 80 8a 20 ff btst 0xff, %o0 200cd78: 32 80 00 09 bne,a 200cd9c <_Thread_Reset+0x58> 200cd7c: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 if ( _Watchdog_Is_active( &the_thread->Timer ) ) 200cd80: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200cd84: 80 a0 60 02 cmp %g1, 2 200cd88: 32 80 00 05 bne,a 200cd9c <_Thread_Reset+0x58> 200cd8c: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 (void) _Watchdog_Remove( &the_thread->Timer ); 200cd90: 7f ff f2 41 call 2009694 <_Watchdog_Remove> <== NOT EXECUTED 200cd94: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 200cd98: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 <== NOT EXECUTED 200cd9c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200cda0: 80 a0 40 19 cmp %g1, %i1 200cda4: 02 80 00 05 be 200cdb8 <_Thread_Reset+0x74> 200cda8: 01 00 00 00 nop the_thread->real_priority = the_thread->Start.initial_priority; 200cdac: f2 26 20 18 st %i1, [ %i0 + 0x18 ] _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 200cdb0: 7f ff ef b0 call 2008c70 <_Thread_Set_priority> 200cdb4: 81 e8 00 00 restore 200cdb8: 81 c7 e0 08 ret 200cdbc: 81 e8 00 00 restore 0200c004 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 200c004: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 200c008: 03 00 80 5d sethi %hi(0x2017400), %g1 200c00c: e0 00 63 b4 ld [ %g1 + 0x3b4 ], %l0 ! 20177b4 <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 200c010: 7f ff d7 4c call 2001d40 200c014: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 200c018: b0 10 00 08 mov %o0, %i0 if ( _Chain_Has_only_one_node( ready ) ) { 200c01c: c4 04 40 00 ld [ %l1 ], %g2 200c020: c2 04 60 08 ld [ %l1 + 8 ], %g1 200c024: 80 a0 80 01 cmp %g2, %g1 200c028: 32 80 00 03 bne,a 200c034 <_Thread_Reset_timeslice+0x30> 200c02c: c6 04 00 00 ld [ %l0 ], %g3 _ISR_Enable( level ); 200c030: 30 80 00 18 b,a 200c090 <_Thread_Reset_timeslice+0x8c> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 200c034: c4 04 20 04 ld [ %l0 + 4 ], %g2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 200c038: 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; 200c03c: c6 20 80 00 st %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 200c040: c2 24 00 00 st %g1, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 200c044: 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; 200c048: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 200c04c: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 200c050: 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; 200c054: e0 20 40 00 st %l0, [ %g1 ] return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 200c058: 7f ff d7 3e call 2001d50 200c05c: 01 00 00 00 nop 200c060: 7f ff d7 38 call 2001d40 200c064: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 200c068: 05 00 80 5d sethi %hi(0x2017400), %g2 200c06c: c2 00 a3 80 ld [ %g2 + 0x380 ], %g1 ! 2017780 <_Thread_Heir> 200c070: 80 a4 00 01 cmp %l0, %g1 200c074: 32 80 00 05 bne,a 200c088 <_Thread_Reset_timeslice+0x84> 200c078: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED _Thread_Heir = (Thread_Control *) ready->first; 200c07c: c2 04 40 00 ld [ %l1 ], %g1 200c080: c2 20 a3 80 st %g1, [ %g2 + 0x380 ] _Context_Switch_necessary = TRUE; 200c084: 84 10 20 01 mov 1, %g2 200c088: 03 00 80 5d sethi %hi(0x2017400), %g1 200c08c: c4 28 63 c4 stb %g2, [ %g1 + 0x3c4 ] ! 20177c4 <_Context_Switch_necessary> _ISR_Enable( level ); 200c090: 7f ff d7 30 call 2001d50 200c094: 81 e8 00 00 restore 200c098: 01 00 00 00 nop 020099c0 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 20099c0: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 20099c4: 7f ff e4 52 call 2002b0c 20099c8: 01 00 00 00 nop 20099cc: a0 10 00 08 mov %o0, %l0 if ( force == TRUE ) 20099d0: 80 8e 60 ff btst 0xff, %i1 20099d4: 22 80 00 04 be,a 20099e4 <_Thread_Resume+0x24> 20099d8: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 <== NOT EXECUTED the_thread->suspend_count = 0; 20099dc: 10 80 00 04 b 20099ec <_Thread_Resume+0x2c> 20099e0: c0 26 20 70 clr [ %i0 + 0x70 ] else the_thread->suspend_count--; 20099e4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 20099e8: c2 26 20 70 st %g1, [ %i0 + 0x70 ] <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 20099ec: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 20099f0: 80 a0 60 00 cmp %g1, 0 20099f4: 22 80 00 03 be,a 2009a00 <_Thread_Resume+0x40> 20099f8: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 _ISR_Enable( level ); 20099fc: 30 80 00 2e b,a 2009ab4 <_Thread_Resume+0xf4> <== NOT EXECUTED return; } current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { 2009a00: 80 88 60 02 btst 2, %g1 2009a04: 02 80 00 2c be 2009ab4 <_Thread_Resume+0xf4> 2009a08: 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 ) ) { 2009a0c: 80 a0 60 00 cmp %g1, 0 2009a10: 12 80 00 29 bne 2009ab4 <_Thread_Resume+0xf4> 2009a14: 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; 2009a18: c8 06 20 90 ld [ %i0 + 0x90 ], %g4 2009a1c: c4 16 20 96 lduh [ %i0 + 0x96 ], %g2 2009a20: 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); 2009a24: c6 06 20 8c ld [ %i0 + 0x8c ], %g3 2009a28: 82 10 40 02 or %g1, %g2, %g1 2009a2c: c2 31 00 00 sth %g1, [ %g4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2009a30: 82 00 e0 04 add %g3, 4, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 2009a34: 1b 00 80 90 sethi %hi(0x2024000), %o5 2009a38: c2 26 00 00 st %g1, [ %i0 ] 2009a3c: c4 16 20 94 lduh [ %i0 + 0x94 ], %g2 old_last_node = the_chain->last; 2009a40: c2 00 e0 08 ld [ %g3 + 8 ], %g1 2009a44: c8 13 61 e8 lduh [ %o5 + 0x1e8 ], %g4 the_chain->last = the_node; 2009a48: f0 20 e0 08 st %i0, [ %g3 + 8 ] 2009a4c: 84 10 80 04 or %g2, %g4, %g2 old_last_node->next = the_node; the_node->previous = old_last_node; 2009a50: c2 26 20 04 st %g1, [ %i0 + 4 ] 2009a54: c4 33 61 e8 sth %g2, [ %o5 + 0x1e8 ] 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; 2009a58: f0 20 40 00 st %i0, [ %g1 ] _ISR_Flash( level ); 2009a5c: 7f ff e4 30 call 2002b1c 2009a60: 90 10 00 10 mov %l0, %o0 2009a64: 7f ff e4 2a call 2002b0c 2009a68: 01 00 00 00 nop if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 2009a6c: 07 00 80 90 sethi %hi(0x2024000), %g3 2009a70: c2 00 e1 c0 ld [ %g3 + 0x1c0 ], %g1 ! 20241c0 <_Thread_Heir> 2009a74: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 2009a78: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 2009a7c: 80 a0 80 01 cmp %g2, %g1 2009a80: 1a 80 00 0d bcc 2009ab4 <_Thread_Resume+0xf4> 2009a84: 03 00 80 90 sethi %hi(0x2024000), %g1 _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 2009a88: c2 00 61 f4 ld [ %g1 + 0x1f4 ], %g1 ! 20241f4 <_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; 2009a8c: f0 20 e1 c0 st %i0, [ %g3 + 0x1c0 ] if ( _Thread_Executing->is_preemptible || 2009a90: c2 08 60 76 ldub [ %g1 + 0x76 ], %g1 2009a94: 80 a0 60 00 cmp %g1, 0 2009a98: 32 80 00 05 bne,a 2009aac <_Thread_Resume+0xec> 2009a9c: 84 10 20 01 mov 1, %g2 2009aa0: 80 a0 a0 00 cmp %g2, 0 2009aa4: 12 80 00 04 bne 2009ab4 <_Thread_Resume+0xf4> 2009aa8: 84 10 20 01 mov 1, %g2 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 2009aac: 03 00 80 90 sethi %hi(0x2024000), %g1 2009ab0: c4 28 62 04 stb %g2, [ %g1 + 0x204 ] ! 2024204 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 2009ab4: 7f ff e4 1a call 2002b1c 2009ab8: 91 e8 00 10 restore %g0, %l0, %o0 2009abc: 01 00 00 00 nop 02008294 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 2008294: 9d e3 bf 98 save %sp, -104, %sp 2008298: 03 00 80 5a sethi %hi(0x2016800), %g1 200829c: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1 ! 20168c0 20082a0: 80 a6 40 01 cmp %i1, %g1 20082a4: 2a 80 00 02 bcs,a 20082ac <_Thread_Stack_Allocate+0x18> 20082a8: 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 ) { 20082ac: 03 00 80 5d sethi %hi(0x2017400), %g1 20082b0: c2 00 63 8c ld [ %g1 + 0x38c ], %g1 ! 201778c <_Configuration_Table> 20082b4: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 20082b8: 80 a0 60 00 cmp %g1, 0 20082bc: 22 80 00 06 be,a 20082d4 <_Thread_Stack_Allocate+0x40> 20082c0: b2 06 60 10 add %i1, 0x10, %i1 stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); 20082c4: 9f c0 40 00 call %g1 <== NOT EXECUTED 20082c8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 20082cc: 10 80 00 05 b 20082e0 <_Thread_Stack_Allocate+0x4c> <== NOT EXECUTED 20082d0: d0 26 20 d0 st %o0, [ %i0 + 0xd0 ] <== 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 ); 20082d4: 40 00 02 20 call 2008b54 <_Workspace_Allocate> 20082d8: 90 10 00 19 mov %i1, %o0 } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 20082dc: d0 26 20 d0 st %o0, [ %i0 + 0xd0 ] the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 20082e0: 80 a0 00 08 cmp %g0, %o0 20082e4: b0 60 20 00 subx %g0, 0, %i0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 20082e8: b0 0e 40 18 and %i1, %i0, %i0 20082ec: 81 c7 e0 08 ret 20082f0: 81 e8 00 00 restore 020082f4 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 20082f4: 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 ) 20082f8: c2 0e 20 c0 ldub [ %i0 + 0xc0 ], %g1 20082fc: 80 a0 60 00 cmp %g1, 0 2008300: 02 80 00 09 be 2008324 <_Thread_Stack_Free+0x30> 2008304: 03 00 80 5d sethi %hi(0x2017400), %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 ) 2008308: c2 00 63 8c ld [ %g1 + 0x38c ], %g1 ! 201778c <_Configuration_Table> 200830c: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 2008310: 80 a0 60 00 cmp %g1, 0 2008314: 02 80 00 06 be 200832c <_Thread_Stack_Free+0x38> 2008318: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 (*_Configuration_Table->stack_free_hook)( 200831c: 9f c0 40 00 call %g1 <== NOT EXECUTED 2008320: 01 00 00 00 nop <== NOT EXECUTED 2008324: 81 c7 e0 08 ret <== NOT EXECUTED 2008328: 81 e8 00 00 restore <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 200832c: 40 00 02 03 call 2008b38 <_Workspace_Free> 2008330: 91 e8 00 08 restore %g0, %o0, %o0 2008334: 01 00 00 00 nop 02007c98 <_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 ) { 2007c98: 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; 2007c9c: 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); 2007ca0: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; 2007ca4: 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); 2007ca8: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2007cac: 82 06 60 38 add %i1, 0x38, %g1 2007cb0: 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 ) ) 2007cb4: 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); 2007cb8: 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; 2007cbc: 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 ]; 2007cc0: 85 28 60 04 sll %g1, 4, %g2 2007cc4: 83 28 60 02 sll %g1, 2, %g1 2007cc8: 84 20 80 01 sub %g2, %g1, %g2 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 2007ccc: 12 80 00 31 bne 2007d90 <_Thread_queue_Enqueue_priority+0xf8> 2007cd0: 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; 2007cd4: 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; 2007cd8: 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 ); 2007cdc: 7f ff e8 19 call 2001d40 2007ce0: 01 00 00 00 nop 2007ce4: a6 10 00 08 mov %o0, %l3 search_thread = (Thread_Control *) header->first; 2007ce8: a2 10 3f ff mov -1, %l1 2007cec: 10 80 00 18 b 2007d4c <_Thread_queue_Enqueue_priority+0xb4> 2007cf0: 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 ) 2007cf4: 80 a4 80 11 cmp %l2, %l1 2007cf8: 28 80 00 19 bleu,a 2007d5c <_Thread_queue_Enqueue_priority+0xc4> 2007cfc: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.next; 2007d00: e0 04 00 00 ld [ %l0 ], %l0 if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) ) 2007d04: 80 a4 00 14 cmp %l0, %l4 2007d08: 22 80 00 15 be,a 2007d5c <_Thread_queue_Enqueue_priority+0xc4> 2007d0c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; 2007d10: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 2007d14: 80 a4 80 11 cmp %l2, %l1 2007d18: 28 80 00 11 bleu,a 2007d5c <_Thread_queue_Enqueue_priority+0xc4> 2007d1c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; #endif _ISR_Flash( level ); 2007d20: 7f ff e8 0c call 2001d50 2007d24: 90 10 00 13 mov %l3, %o0 2007d28: 7f ff e8 06 call 2001d40 2007d2c: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 2007d30: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 2007d34: 80 8d 80 01 btst %l6, %g1 2007d38: 32 80 00 05 bne,a 2007d4c <_Thread_queue_Enqueue_priority+0xb4> 2007d3c: e0 04 00 00 ld [ %l0 ], %l0 _ISR_Enable( level ); 2007d40: 7f ff e8 04 call 2001d50 <== NOT EXECUTED 2007d44: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 2007d48: 30 bf ff e5 b,a 2007cdc <_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 ) ) { 2007d4c: 80 a4 00 14 cmp %l0, %l4 2007d50: 32 bf ff e9 bne,a 2007cf4 <_Thread_queue_Enqueue_priority+0x5c> 2007d54: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 2007d58: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 2007d5c: 80 a0 60 01 cmp %g1, 1 2007d60: 12 80 00 48 bne 2007e80 <_Thread_queue_Enqueue_priority+0x1e8> 2007d64: 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 ) 2007d68: 80 a4 80 11 cmp %l2, %l1 2007d6c: 02 80 00 3a be 2007e54 <_Thread_queue_Enqueue_priority+0x1bc> 2007d70: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 2007d74: c2 04 20 04 ld [ %l0 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 2007d78: e0 26 40 00 st %l0, [ %i1 ] the_node->previous = previous_node; 2007d7c: 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; 2007d80: 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; 2007d84: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 2007d88: f2 24 20 04 st %i1, [ %l0 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 2007d8c: 30 80 00 39 b,a 2007e70 <_Thread_queue_Enqueue_priority+0x1d8> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 2007d90: 03 00 80 5a sethi %hi(0x2016800), %g1 _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 2007d94: 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; 2007d98: ae 10 60 c4 or %g1, 0xc4, %l7 2007d9c: c2 0d c0 00 ldub [ %l7 ], %g1 _ISR_Disable( level ); 2007da0: 7f ff e7 e8 call 2001d40 2007da4: a2 00 60 01 add %g1, 1, %l1 2007da8: a8 10 00 08 mov %o0, %l4 search_thread = (Thread_Control *) header->last; 2007dac: 10 80 00 19 b 2007e10 <_Thread_queue_Enqueue_priority+0x178> 2007db0: 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 ) 2007db4: 80 a4 80 11 cmp %l2, %l1 2007db8: 3a 80 00 1a bcc,a 2007e20 <_Thread_queue_Enqueue_priority+0x188> 2007dbc: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 2007dc0: e0 04 20 04 ld [ %l0 + 4 ], %l0 if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 2007dc4: 80 a4 00 13 cmp %l0, %l3 2007dc8: 22 80 00 16 be,a 2007e20 <_Thread_queue_Enqueue_priority+0x188> 2007dcc: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; 2007dd0: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority >= search_priority ) 2007dd4: 80 a4 80 11 cmp %l2, %l1 2007dd8: 3a 80 00 12 bcc,a 2007e20 <_Thread_queue_Enqueue_priority+0x188> 2007ddc: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; #endif _ISR_Flash( level ); 2007de0: 7f ff e7 dc call 2001d50 2007de4: 90 10 00 14 mov %l4, %o0 2007de8: 7f ff e7 d6 call 2001d40 2007dec: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 2007df0: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 2007df4: 80 8d 80 01 btst %l6, %g1 2007df8: 32 80 00 06 bne,a 2007e10 <_Thread_queue_Enqueue_priority+0x178> 2007dfc: e0 04 20 04 ld [ %l0 + 4 ], %l0 _ISR_Enable( level ); 2007e00: 7f ff e7 d4 call 2001d50 <== NOT EXECUTED 2007e04: 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; 2007e08: 10 bf ff e6 b 2007da0 <_Thread_queue_Enqueue_priority+0x108> <== NOT EXECUTED 2007e0c: 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 ) ) { 2007e10: 80 a4 00 13 cmp %l0, %l3 2007e14: 32 bf ff e8 bne,a 2007db4 <_Thread_queue_Enqueue_priority+0x11c> 2007e18: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 2007e1c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 2007e20: 80 a0 60 01 cmp %g1, 1 2007e24: 12 80 00 17 bne 2007e80 <_Thread_queue_Enqueue_priority+0x1e8> 2007e28: 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 ) 2007e2c: 80 a4 80 11 cmp %l2, %l1 2007e30: 02 80 00 09 be 2007e54 <_Thread_queue_Enqueue_priority+0x1bc> 2007e34: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 2007e38: c2 04 00 00 ld [ %l0 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 2007e3c: 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; 2007e40: 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; 2007e44: 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; 2007e48: 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; 2007e4c: f2 24 00 00 st %i1, [ %l0 ] next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 2007e50: 30 80 00 08 b,a 2007e70 <_Thread_queue_Enqueue_priority+0x1d8> 2007e54: 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; 2007e58: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 2007e5c: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 2007e60: 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; 2007e64: 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; 2007e68: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 2007e6c: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 2007e70: 7f ff e7 b8 call 2001d50 2007e74: b0 10 20 01 mov 1, %i0 2007e78: 81 c7 e0 08 ret 2007e7c: 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; 2007e80: 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; 2007e84: d0 26 80 00 st %o0, [ %i2 ] <== NOT EXECUTED return the_thread_queue->sync_state; } 2007e88: 81 c7 e0 08 ret <== NOT EXECUTED 2007e8c: 81 e8 00 00 restore <== NOT EXECUTED 0200ce88 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 200ce88: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 200ce8c: 7f ff d3 ad call 2001d40 200ce90: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 200ce94: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 200ce98: 03 00 00 ef sethi %hi(0x3bc00), %g1 200ce9c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 200cea0: 80 88 80 01 btst %g2, %g1 200cea4: 32 80 00 04 bne,a 200ceb4 <_Thread_queue_Extract_fifo+0x2c> 200cea8: c2 06 40 00 ld [ %i1 ], %g1 _ISR_Enable( level ); 200ceac: 7f ff d3 a9 call 2001d50 <== NOT EXECUTED 200ceb0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 200ceb4: 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 ) ) { 200ceb8: c6 06 60 50 ld [ %i1 + 0x50 ], %g3 next->previous = previous; previous->next = next; 200cebc: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 200cec0: c4 20 60 04 st %g2, [ %g1 + 4 ] 200cec4: 80 a0 e0 02 cmp %g3, 2 200cec8: 02 80 00 06 be 200cee0 <_Thread_queue_Extract_fifo+0x58> 200cecc: c0 26 60 44 clr [ %i1 + 0x44 ] _ISR_Enable( level ); 200ced0: 7f ff d3 a0 call 2001d50 200ced4: 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 ); 200ced8: 10 80 00 0a b 200cf00 <_Thread_queue_Extract_fifo+0x78> 200cedc: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 200cee0: 82 10 20 03 mov 3, %g1 200cee4: c2 26 60 50 st %g1, [ %i1 + 0x50 ] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 200cee8: 7f ff d3 9a call 2001d50 200ceec: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); 200cef0: 7f ff ee be call 20089e8 <_Watchdog_Remove> 200cef4: 90 06 60 48 add %i1, 0x48, %o0 200cef8: 33 04 00 ff sethi %hi(0x1003fc00), %i1 200cefc: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 200cf00: 7f ff e8 d4 call 2007250 <_Thread_Clear_state> 200cf04: 81 e8 00 00 restore 200cf08: 01 00 00 00 nop 0200bd80 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, bool requeuing ) { 200bd80: 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 ); 200bd84: 7f ff d7 ef call 2001d40 200bd88: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 200bd8c: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 200bd90: 03 00 00 ef sethi %hi(0x3bc00), %g1 200bd94: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 200bd98: 80 88 80 01 btst %g2, %g1 200bd9c: 32 80 00 03 bne,a 200bda8 <_Thread_queue_Extract_priority_helper+0x28> 200bda0: c6 06 60 38 ld [ %i1 + 0x38 ], %g3 _ISR_Enable( level ); 200bda4: 30 80 00 1c b,a 200be14 <_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 ) ) { 200bda8: 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; 200bdac: c4 06 40 00 ld [ %i1 ], %g2 previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 200bdb0: 80 a0 c0 01 cmp %g3, %g1 200bdb4: 02 80 00 13 be 200be00 <_Thread_queue_Extract_priority_helper+0x80> 200bdb8: 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; 200bdbc: da 06 60 40 ld [ %i1 + 0x40 ], %o5 new_second_node = new_first_node->next; 200bdc0: c8 00 c0 00 ld [ %g3 ], %g4 previous_node->next = new_first_node; next_node->previous = new_first_node; 200bdc4: 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; 200bdc8: c6 20 40 00 st %g3, [ %g1 ] next_node->previous = new_first_node; new_first_node->next = next_node; 200bdcc: c4 20 c0 00 st %g2, [ %g3 ] new_first_node->previous = previous_node; 200bdd0: c2 20 e0 04 st %g1, [ %g3 + 4 ] if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 200bdd4: c4 06 60 38 ld [ %i1 + 0x38 ], %g2 200bdd8: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 200bddc: 80 a0 80 01 cmp %g2, %g1 200bde0: 02 80 00 0a be 200be08 <_Thread_queue_Extract_priority_helper+0x88> 200bde4: 82 00 e0 38 add %g3, 0x38, %g1 /* > two threads on 2-n */ new_second_node->previous = 200bde8: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 200bdec: c8 20 e0 38 st %g4, [ %g3 + 0x38 ] new_first_thread->Wait.Block2n.last = last_node; 200bdf0: da 20 e0 40 st %o5, [ %g3 + 0x40 ] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 200bdf4: 82 00 e0 3c add %g3, 0x3c, %g1 200bdf8: 10 80 00 04 b 200be08 <_Thread_queue_Extract_priority_helper+0x88> 200bdfc: c2 23 40 00 st %g1, [ %o5 ] } } else { previous_node->next = next_node; next_node->previous = previous_node; 200be00: 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; 200be04: c4 20 40 00 st %g2, [ %g1 ] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 200be08: 80 8e a0 ff btst 0xff, %i2 200be0c: 22 80 00 04 be,a 200be1c <_Thread_queue_Extract_priority_helper+0x9c> 200be10: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 _ISR_Enable( level ); 200be14: 7f ff d7 cf call 2001d50 200be18: 91 e8 00 08 restore %g0, %o0, %o0 return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 200be1c: 80 a0 60 02 cmp %g1, 2 200be20: 02 80 00 06 be 200be38 <_Thread_queue_Extract_priority_helper+0xb8> 200be24: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 200be28: 7f ff d7 ca call 2001d50 200be2c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 200be30: 10 80 00 08 b 200be50 <_Thread_queue_Extract_priority_helper+0xd0> 200be34: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 200be38: c2 26 20 50 st %g1, [ %i0 + 0x50 ] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 200be3c: 7f ff d7 c5 call 2001d50 200be40: 33 04 00 ff sethi %hi(0x1003fc00), %i1 (void) _Watchdog_Remove( &the_thread->Timer ); 200be44: 7f ff f2 e9 call 20089e8 <_Watchdog_Remove> 200be48: 90 06 20 48 add %i0, 0x48, %o0 200be4c: b2 16 63 f8 or %i1, 0x3f8, %i1 200be50: 7f ff ed 00 call 2007250 <_Thread_Clear_state> 200be54: 81 e8 00 00 restore 200be58: 01 00 00 00 nop 0200be5c <_Thread_queue_Process_timeout>: void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 200be5c: 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 && 200be60: c6 00 a0 30 ld [ %g2 + 0x30 ], %g3 200be64: 80 a0 e0 00 cmp %g3, 0 200be68: 02 80 00 0f be 200bea4 <_Thread_queue_Process_timeout+0x48> 200be6c: 92 10 00 08 mov %o0, %o1 200be70: 03 00 80 5d sethi %hi(0x2017400), %g1 200be74: c2 00 63 b4 ld [ %g1 + 0x3b4 ], %g1 ! 20177b4 <_Thread_Executing> 200be78: 80 a2 00 01 cmp %o0, %g1 200be7c: 32 80 00 0b bne,a 200bea8 <_Thread_queue_Process_timeout+0x4c> 200be80: 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 ) { 200be84: 80 a0 e0 03 cmp %g3, 3 200be88: 02 80 00 0d be 200bebc <_Thread_queue_Process_timeout+0x60> 200be8c: 01 00 00 00 nop the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 200be90: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 200be94: c2 22 20 34 st %g1, [ %o0 + 0x34 ] the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 200be98: 82 10 20 02 mov 2, %g1 200be9c: 81 c3 e0 08 retl 200bea0: c2 20 a0 30 st %g1, [ %g2 + 0x30 ] } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 200bea4: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 200bea8: 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; 200beac: c2 22 60 34 st %g1, [ %o1 + 0x34 ] _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 200beb0: 82 13 c0 00 mov %o7, %g1 200beb4: 7f ff ff a8 call 200bd54 <_Thread_queue_Extract> 200beb8: 9e 10 40 00 mov %g1, %o7 200bebc: 81 c3 e0 08 retl <== NOT EXECUTED 200bec0: 01 00 00 00 nop 0200a1d0 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 200a1d0: 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; 200a1d4: c2 06 40 00 ld [ %i1 ], %g1 right += rhs->tv_nsec; 200a1d8: 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; 200a1dc: 91 38 60 1f sra %g1, 0x1f, %o0 200a1e0: 92 10 00 01 mov %g1, %o1 200a1e4: 83 30 60 1d srl %g1, 0x1d, %g1 200a1e8: 87 2a 60 03 sll %o1, 3, %g3 200a1ec: 85 2a 20 03 sll %o0, 3, %g2 200a1f0: 84 10 40 02 or %g1, %g2, %g2 200a1f4: 83 30 e0 1b srl %g3, 0x1b, %g1 200a1f8: 99 28 a0 05 sll %g2, 5, %o4 200a1fc: 9b 28 e0 05 sll %g3, 5, %o5 200a200: 98 10 40 0c or %g1, %o4, %o4 200a204: 9a a3 40 03 subcc %o5, %g3, %o5 200a208: 83 33 60 1a srl %o5, 0x1a, %g1 200a20c: 98 63 00 02 subx %o4, %g2, %o4 200a210: 97 2b 60 06 sll %o5, 6, %o3 200a214: 95 2b 20 06 sll %o4, 6, %o2 200a218: 96 a2 c0 0d subcc %o3, %o5, %o3 200a21c: 94 10 40 0a or %g1, %o2, %o2 200a220: 94 62 80 0c subx %o2, %o4, %o2 200a224: 96 82 c0 09 addcc %o3, %o1, %o3 200a228: 94 42 80 08 addx %o2, %o0, %o2 200a22c: 83 32 e0 1e srl %o3, 0x1e, %g1 200a230: 85 2a a0 02 sll %o2, 2, %g2 200a234: 84 10 40 02 or %g1, %g2, %g2 200a238: 87 2a e0 02 sll %o3, 2, %g3 200a23c: 96 82 c0 03 addcc %o3, %g3, %o3 200a240: 94 42 80 02 addx %o2, %g2, %o2 200a244: 83 32 e0 1e srl %o3, 0x1e, %g1 200a248: 85 2a a0 02 sll %o2, 2, %g2 200a24c: 84 10 40 02 or %g1, %g2, %g2 200a250: 87 2a e0 02 sll %o3, 2, %g3 200a254: 96 82 c0 03 addcc %o3, %g3, %o3 200a258: 94 42 80 02 addx %o2, %g2, %o2 200a25c: 83 32 e0 1e srl %o3, 0x1e, %g1 200a260: 85 2a a0 02 sll %o2, 2, %g2 200a264: 84 10 40 02 or %g1, %g2, %g2 200a268: 87 2a e0 02 sll %o3, 2, %g3 200a26c: 96 82 c0 03 addcc %o3, %g3, %o3 200a270: 94 42 80 02 addx %o2, %g2, %o2 200a274: 85 32 e0 17 srl %o3, 0x17, %g2 200a278: 83 2a a0 09 sll %o2, 9, %g1 200a27c: 9b 2a e0 09 sll %o3, 9, %o5 200a280: 98 10 80 01 or %g2, %g1, %o4 right += rhs->tv_nsec; 200a284: 96 83 40 0f addcc %o5, %o7, %o3 200a288: 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; 200a28c: e4 06 20 04 ld [ %i0 + 4 ], %l2 right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; 200a290: 94 43 00 02 addx %o4, %g2, %o2 if ( right == 0 ) { 200a294: 80 92 80 0b orcc %o2, %o3, %g0 200a298: 12 80 00 06 bne 200a2b0 <_Timespec_Divide+0xe0> 200a29c: d0 06 00 00 ld [ %i0 ], %o0 *ival_percentage = 0; 200a2a0: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED *fval_percentage = 0; 200a2a4: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED 200a2a8: 81 c7 e0 08 ret <== NOT EXECUTED 200a2ac: 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; 200a2b0: 92 10 00 08 mov %o0, %o1 200a2b4: 83 32 60 1d srl %o1, 0x1d, %g1 200a2b8: 9b 2a 60 03 sll %o1, 3, %o5 200a2bc: 91 3a 20 1f sra %o0, 0x1f, %o0 200a2c0: 99 2a 20 03 sll %o0, 3, %o4 200a2c4: 98 10 40 0c or %g1, %o4, %o4 200a2c8: 83 33 60 1b srl %o5, 0x1b, %g1 200a2cc: 85 2b 20 05 sll %o4, 5, %g2 200a2d0: 87 2b 60 05 sll %o5, 5, %g3 200a2d4: 84 10 40 02 or %g1, %g2, %g2 200a2d8: 86 a0 c0 0d subcc %g3, %o5, %g3 200a2dc: 83 30 e0 1a srl %g3, 0x1a, %g1 200a2e0: 84 60 80 0c subx %g2, %o4, %g2 200a2e4: 9b 28 e0 06 sll %g3, 6, %o5 200a2e8: 99 28 a0 06 sll %g2, 6, %o4 200a2ec: 9a a3 40 03 subcc %o5, %g3, %o5 200a2f0: 98 10 40 0c or %g1, %o4, %o4 200a2f4: 98 63 00 02 subx %o4, %g2, %o4 200a2f8: 9a 83 40 09 addcc %o5, %o1, %o5 200a2fc: 83 33 60 1e srl %o5, 0x1e, %g1 200a300: 98 43 00 08 addx %o4, %o0, %o4 200a304: 87 2b 60 02 sll %o5, 2, %g3 200a308: 85 2b 20 02 sll %o4, 2, %g2 200a30c: 9a 83 40 03 addcc %o5, %g3, %o5 200a310: 84 10 40 02 or %g1, %g2, %g2 200a314: 83 33 60 1e srl %o5, 0x1e, %g1 200a318: 98 43 00 02 addx %o4, %g2, %o4 200a31c: 87 2b 60 02 sll %o5, 2, %g3 200a320: 85 2b 20 02 sll %o4, 2, %g2 200a324: 9a 83 40 03 addcc %o5, %g3, %o5 200a328: 84 10 40 02 or %g1, %g2, %g2 200a32c: 83 33 60 1e srl %o5, 0x1e, %g1 200a330: 98 43 00 02 addx %o4, %g2, %o4 200a334: 87 2b 60 02 sll %o5, 2, %g3 200a338: 85 2b 20 02 sll %o4, 2, %g2 200a33c: 9a 83 40 03 addcc %o5, %g3, %o5 200a340: 84 10 40 02 or %g1, %g2, %g2 200a344: 98 43 00 02 addx %o4, %g2, %o4 200a348: 83 2b 20 09 sll %o4, 9, %g1 200a34c: 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; 200a350: 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; 200a354: a0 10 80 01 or %g2, %g1, %l0 200a358: 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; 200a35c: a2 84 40 13 addcc %l1, %l3, %l1 200a360: 83 34 60 1e srl %l1, 0x1e, %g1 200a364: 87 2c 60 02 sll %l1, 2, %g3 200a368: a5 3c a0 1f sra %l2, 0x1f, %l2 200a36c: a0 44 00 12 addx %l0, %l2, %l0 200a370: 85 2c 20 02 sll %l0, 2, %g2 200a374: 84 10 40 02 or %g1, %g2, %g2 200a378: 83 30 e0 1b srl %g3, 0x1b, %g1 200a37c: 99 28 a0 05 sll %g2, 5, %o4 200a380: 9b 28 e0 05 sll %g3, 5, %o5 200a384: 98 10 40 0c or %g1, %o4, %o4 200a388: 9a a3 40 03 subcc %o5, %g3, %o5 200a38c: 98 63 00 02 subx %o4, %g2, %o4 200a390: 9a 83 40 11 addcc %o5, %l1, %o5 200a394: 83 33 60 1e srl %o5, 0x1e, %g1 200a398: 98 43 00 10 addx %o4, %l0, %o4 200a39c: 87 2b 60 02 sll %o5, 2, %g3 200a3a0: 85 2b 20 02 sll %o4, 2, %g2 200a3a4: 9a 83 40 03 addcc %o5, %g3, %o5 200a3a8: 84 10 40 02 or %g1, %g2, %g2 200a3ac: 83 33 60 1e srl %o5, 0x1e, %g1 200a3b0: 87 2b 60 02 sll %o5, 2, %g3 200a3b4: 98 43 00 02 addx %o4, %g2, %o4 200a3b8: 9a 83 40 03 addcc %o5, %g3, %o5 200a3bc: 85 2b 20 02 sll %o4, 2, %g2 200a3c0: 84 10 40 02 or %g1, %g2, %g2 200a3c4: 83 33 60 1b srl %o5, 0x1b, %g1 200a3c8: 98 43 00 02 addx %o4, %g2, %o4 200a3cc: 99 2b 20 05 sll %o4, 5, %o4 200a3d0: 98 10 40 0c or %g1, %o4, %o4 200a3d4: 93 2b 60 05 sll %o5, 5, %o1 200a3d8: 40 00 35 22 call 2017860 <__udivdi3> 200a3dc: 90 10 00 0c mov %o4, %o0 *ival_percentage = answer / 1000; 200a3e0: 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; 200a3e4: a0 10 00 08 mov %o0, %l0 200a3e8: a2 10 00 09 mov %o1, %l1 *ival_percentage = answer / 1000; 200a3ec: 96 10 23 e8 mov 0x3e8, %o3 200a3f0: 40 00 35 1c call 2017860 <__udivdi3> 200a3f4: 90 10 00 10 mov %l0, %o0 *fval_percentage = answer % 1000; 200a3f8: 90 10 00 10 mov %l0, %o0 * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; *ival_percentage = answer / 1000; 200a3fc: d2 26 80 00 st %o1, [ %i2 ] *fval_percentage = answer % 1000; 200a400: 94 10 20 00 clr %o2 200a404: 92 10 00 11 mov %l1, %o1 200a408: 40 00 35 f2 call 2017bd0 <__umoddi3> 200a40c: 96 10 23 e8 mov 0x3e8, %o3 200a410: d2 26 c0 00 st %o1, [ %i3 ] 200a414: 81 c7 e0 08 ret 200a418: 81 e8 00 00 restore 0200d3c0 <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 200d3c0: 9d e3 bf 98 save %sp, -104, %sp _Chain_Extract( &the_extension->Node ); 200d3c4: 40 00 13 e1 call 2012348 <_Chain_Extract> 200d3c8: 90 10 00 18 mov %i0, %o0 /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 200d3cc: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200d3d0: 80 a0 60 00 cmp %g1, 0 200d3d4: 02 80 00 04 be 200d3e4 <_User_extensions_Remove_set+0x24> 200d3d8: 01 00 00 00 nop _Chain_Extract( &the_extension->Switch.Node ); 200d3dc: 40 00 13 db call 2012348 <_Chain_Extract> <== NOT EXECUTED 200d3e0: 91 ee 20 08 restore %i0, 8, %o0 <== NOT EXECUTED 200d3e4: 81 c7 e0 08 ret 200d3e8: 81 e8 00 00 restore 02008748 <_User_extensions_Thread_create>: */ bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 2008748: 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 ; 200874c: 03 00 80 5e sethi %hi(0x2017800), %g1 2008750: e0 00 61 28 ld [ %g1 + 0x128 ], %l0 ! 2017928 <_User_extensions_List> 2008754: 82 10 61 28 or %g1, 0x128, %g1 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 2008758: 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)( 200875c: 03 00 80 5d sethi %hi(0x2017400), %g1 2008760: 10 80 00 0d b 2008794 <_User_extensions_Thread_create+0x4c> 2008764: a2 10 63 b4 or %g1, 0x3b4, %l1 ! 20177b4 <_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 ) { 2008768: 80 a0 60 00 cmp %g1, 0 200876c: 02 80 00 09 be 2008790 <_User_extensions_Thread_create+0x48> 2008770: 92 10 00 18 mov %i0, %o1 status = (*the_extension->Callouts.thread_create)( 2008774: 9f c0 40 00 call %g1 2008778: d0 04 40 00 ld [ %l1 ], %o0 _Thread_Executing, the_thread ); if ( !status ) 200877c: 80 8a 20 ff btst 0xff, %o0 2008780: 32 80 00 05 bne,a 2008794 <_User_extensions_Thread_create+0x4c> 2008784: e0 04 00 00 ld [ %l0 ], %l0 2008788: 81 c7 e0 08 ret <== NOT EXECUTED 200878c: 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 ) { 2008790: 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 ) ; 2008794: 80 a4 00 12 cmp %l0, %l2 2008798: 32 bf ff f4 bne,a 2008768 <_User_extensions_Thread_create+0x20> 200879c: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 return FALSE; } } return TRUE; } 20087a0: 81 c7 e0 08 ret 20087a4: 91 e8 20 01 restore %g0, 1, %o0 02015fc8 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 2015fc8: 9d e3 bf 98 save %sp, -104, %sp Watchdog_Interval units = units_arg; ISR_Level level; Chain_Node *node; if ( !units ) { 2015fcc: 80 a6 60 00 cmp %i1, 0 2015fd0: 02 80 00 31 be 2016094 <_Watchdog_Adjust_to_chain+0xcc> 2015fd4: 01 00 00 00 nop return; } _ISR_Disable( level ); 2015fd8: 7f ff d5 48 call 200b4f8 2015fdc: 01 00 00 00 nop 2015fe0: a4 10 00 08 mov %o0, %l2 if ( !_Chain_Is_empty( header ) ) { 2015fe4: c2 06 00 00 ld [ %i0 ], %g1 2015fe8: a2 06 20 04 add %i0, 4, %l1 2015fec: 80 a0 40 11 cmp %g1, %l1 2015ff0: 02 80 00 27 be 201608c <_Watchdog_Adjust_to_chain+0xc4> 2015ff4: 01 00 00 00 nop 2015ff8: a6 06 a0 04 add %i2, 4, %l3 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 2015ffc: c4 06 00 00 ld [ %i0 ], %g2 while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 2016000: e0 00 a0 10 ld [ %g2 + 0x10 ], %l0 2016004: 80 a6 40 10 cmp %i1, %l0 2016008: 3a 80 00 05 bcc,a 201601c <_Watchdog_Adjust_to_chain+0x54> 201600c: c0 20 a0 10 clr [ %g2 + 0x10 ] _Watchdog_First( header )->delta_interval -= units; 2016010: 82 24 00 19 sub %l0, %i1, %g1 2016014: 10 80 00 1e b 201608c <_Watchdog_Adjust_to_chain+0xc4> 2016018: 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)); 201601c: 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)) 2016020: 80 a0 80 11 cmp %g2, %l1 2016024: 32 80 00 04 bne,a 2016034 <_Watchdog_Adjust_to_chain+0x6c> 2016028: c2 00 80 00 ld [ %g2 ], %g1 201602c: 10 80 00 04 b 201603c <_Watchdog_Adjust_to_chain+0x74> <== NOT EXECUTED 2016030: 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; 2016034: c2 26 00 00 st %g1, [ %i0 ] new_first->previous = _Chain_Head(the_chain); 2016038: f0 20 60 04 st %i0, [ %g1 + 4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 201603c: e6 20 80 00 st %l3, [ %g2 ] old_last_node = the_chain->last; 2016040: c2 06 a0 08 ld [ %i2 + 8 ], %g1 the_chain->last = the_node; 2016044: c4 26 a0 08 st %g2, [ %i2 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 2016048: 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; 201604c: c4 20 40 00 st %g2, [ %g1 ] do { node = _Chain_Get_unprotected( header ); _Chain_Append_unprotected( to_fire, node ); _ISR_Flash( level ); 2016050: 7f ff d5 2e call 200b508 2016054: 90 10 00 12 mov %l2, %o0 2016058: 7f ff d5 28 call 200b4f8 201605c: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 2016060: c2 06 00 00 ld [ %i0 ], %g1 } while ( !_Chain_Is_empty( header ) && _Watchdog_First( header )->delta_interval == 0 ); 2016064: 80 a0 40 11 cmp %g1, %l1 2016068: 02 80 00 09 be 201608c <_Watchdog_Adjust_to_chain+0xc4> 201606c: 01 00 00 00 nop 2016070: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 2016074: 80 a0 60 00 cmp %g1, 0 2016078: 22 bf ff ea be,a 2016020 <_Watchdog_Adjust_to_chain+0x58> 201607c: c4 06 00 00 ld [ %i0 ], %g2 return; } _ISR_Disable( level ); if ( !_Chain_Is_empty( header ) ) { while ( units ) { 2016080: b2 a6 40 10 subcc %i1, %l0, %i1 2016084: 32 bf ff df bne,a 2016000 <_Watchdog_Adjust_to_chain+0x38> 2016088: c4 06 00 00 ld [ %i0 ], %g2 <== NOT EXECUTED break; } } } _ISR_Enable( level ); 201608c: 7f ff d5 1f call 200b508 2016090: 91 e8 00 12 restore %g0, %l2, %o0 2016094: 81 c7 e0 08 ret 2016098: 81 e8 00 00 restore 02008880 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 2008880: 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; 2008884: 03 00 80 5d sethi %hi(0x2017400), %g1 void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 2008888: 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; 200888c: e6 00 63 90 ld [ %g1 + 0x390 ], %l3 _ISR_Disable( level ); 2008890: 7f ff e5 2c call 2001d40 2008894: 01 00 00 00 nop 2008898: 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 ) { 200889c: c2 06 60 08 ld [ %i1 + 8 ], %g1 20088a0: 80 a0 60 00 cmp %g1, 0 20088a4: 02 80 00 03 be 20088b0 <_Watchdog_Insert+0x30> 20088a8: 07 00 80 5e sethi %hi(0x2017800), %g3 _ISR_Enable( level ); 20088ac: 30 80 00 39 b,a 2008990 <_Watchdog_Insert+0x110> <== NOT EXECUTED return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 20088b0: c2 00 e0 40 ld [ %g3 + 0x40 ], %g1 ! 2017840 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 20088b4: 84 10 20 01 mov 1, %g2 _Watchdog_Sync_count++; 20088b8: 82 00 60 01 inc %g1 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 20088bc: c4 26 60 08 st %g2, [ %i1 + 8 ] _Watchdog_Sync_count++; 20088c0: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 20088c4: 03 00 80 5d sethi %hi(0x2017400), %g1 20088c8: a8 10 63 b0 or %g1, 0x3b0, %l4 ! 20177b0 <_Watchdog_Sync_level> 20088cc: ac 10 00 14 mov %l4, %l6 the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 20088d0: 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 ; 20088d4: e2 05 40 00 ld [ %l5 ], %l1 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 20088d8: 80 a4 a0 00 cmp %l2, 0 20088dc: 22 80 00 1c be,a 200894c <_Watchdog_Insert+0xcc> 20088e0: c4 04 60 04 ld [ %l1 + 4 ], %g2 20088e4: c2 04 40 00 ld [ %l1 ], %g1 20088e8: 80 a0 60 00 cmp %g1, 0 20088ec: 22 80 00 18 be,a 200894c <_Watchdog_Insert+0xcc> 20088f0: c4 04 60 04 ld [ %l1 + 4 ], %g2 break; if ( delta_interval < after->delta_interval ) { 20088f4: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 20088f8: 80 a4 80 10 cmp %l2, %l0 20088fc: 1a 80 00 04 bcc 200890c <_Watchdog_Insert+0x8c> 2008900: 82 24 00 12 sub %l0, %l2, %g1 after->delta_interval -= delta_interval; 2008904: 10 80 00 11 b 2008948 <_Watchdog_Insert+0xc8> 2008908: 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 ); 200890c: 7f ff e5 11 call 2001d50 2008910: 90 10 00 18 mov %i0, %o0 2008914: 7f ff e5 0b call 2001d40 2008918: 01 00 00 00 nop if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 200891c: c2 06 60 08 ld [ %i1 + 8 ], %g1 2008920: 80 a0 60 01 cmp %g1, 1 2008924: 12 80 00 15 bne 2008978 <_Watchdog_Insert+0xf8> 2008928: a4 24 80 10 sub %l2, %l0, %l2 goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 200892c: c2 05 00 00 ld [ %l4 ], %g1 2008930: 80 a0 40 13 cmp %g1, %l3 2008934: 28 bf ff e9 bleu,a 20088d8 <_Watchdog_Insert+0x58> 2008938: e2 04 40 00 ld [ %l1 ], %l1 _Watchdog_Sync_level = insert_isr_nest_level; 200893c: e6 25 80 00 st %l3, [ %l6 ] the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 2008940: 10 bf ff e5 b 20088d4 <_Watchdog_Insert+0x54> 2008944: 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 ); 2008948: c4 04 60 04 ld [ %l1 + 4 ], %g2 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 200894c: 03 00 80 5e sethi %hi(0x2017800), %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 2008950: c6 00 80 00 ld [ %g2 ], %g3 2008954: c2 00 60 44 ld [ %g1 + 0x44 ], %g1 after_node->next = the_node; 2008958: f2 20 80 00 st %i1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 200895c: c4 26 60 04 st %g2, [ %i1 + 4 ] 2008960: c2 26 60 14 st %g1, [ %i1 + 0x14 ] } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 2008964: e4 26 60 10 st %l2, [ %i1 + 0x10 ] RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 2008968: 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; 200896c: 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; 2008970: c6 26 40 00 st %g3, [ %i1 ] 2008974: 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; 2008978: 03 00 80 5d sethi %hi(0x2017400), %g1 _Watchdog_Sync_count--; 200897c: 05 00 80 5e sethi %hi(0x2017800), %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; 2008980: e6 20 63 b0 st %l3, [ %g1 + 0x3b0 ] _Watchdog_Sync_count--; 2008984: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1 2008988: 82 00 7f ff add %g1, -1, %g1 200898c: c2 20 a0 40 st %g1, [ %g2 + 0x40 ] _ISR_Enable( level ); 2008990: 7f ff e4 f0 call 2001d50 2008994: 81 e8 00 00 restore 2008998: 01 00 00 00 nop 020089e8 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 20089e8: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 20089ec: 7f ff e4 d5 call 2001d40 20089f0: 01 00 00 00 nop previous_state = the_watchdog->state; 20089f4: e0 06 20 08 ld [ %i0 + 8 ], %l0 switch ( previous_state ) { 20089f8: 80 a4 20 01 cmp %l0, 1 20089fc: 22 80 00 1e be,a 2008a74 <_Watchdog_Remove+0x8c> 2008a00: c0 26 20 08 clr [ %i0 + 8 ] <== NOT EXECUTED 2008a04: 0a 80 00 1d bcs 2008a78 <_Watchdog_Remove+0x90> 2008a08: 03 00 80 5e sethi %hi(0x2017800), %g1 2008a0c: 80 a4 20 03 cmp %l0, 3 2008a10: 18 80 00 1a bgu 2008a78 <_Watchdog_Remove+0x90> 2008a14: 01 00 00 00 nop 2008a18: c6 06 00 00 ld [ %i0 ], %g3 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 2008a1c: c0 26 20 08 clr [ %i0 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 2008a20: c2 00 c0 00 ld [ %g3 ], %g1 2008a24: 80 a0 60 00 cmp %g1, 0 2008a28: 02 80 00 07 be 2008a44 <_Watchdog_Remove+0x5c> 2008a2c: 03 00 80 5e sethi %hi(0x2017800), %g1 next_watchdog->delta_interval += the_watchdog->delta_interval; 2008a30: c2 00 e0 10 ld [ %g3 + 0x10 ], %g1 2008a34: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 2008a38: 82 00 40 02 add %g1, %g2, %g1 2008a3c: c2 20 e0 10 st %g1, [ %g3 + 0x10 ] if ( _Watchdog_Sync_count ) 2008a40: 03 00 80 5e sethi %hi(0x2017800), %g1 2008a44: c2 00 60 40 ld [ %g1 + 0x40 ], %g1 ! 2017840 <_Watchdog_Sync_count> 2008a48: 80 a0 60 00 cmp %g1, 0 2008a4c: 22 80 00 07 be,a 2008a68 <_Watchdog_Remove+0x80> 2008a50: c4 06 00 00 ld [ %i0 ], %g2 _Watchdog_Sync_level = _ISR_Nest_level; 2008a54: 03 00 80 5d sethi %hi(0x2017400), %g1 <== NOT EXECUTED 2008a58: c4 00 63 90 ld [ %g1 + 0x390 ], %g2 ! 2017790 <_ISR_Nest_level> <== NOT EXECUTED 2008a5c: 03 00 80 5d sethi %hi(0x2017400), %g1 <== NOT EXECUTED 2008a60: c4 20 63 b0 st %g2, [ %g1 + 0x3b0 ] ! 20177b0 <_Watchdog_Sync_level> <== NOT EXECUTED ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 2008a64: c4 06 00 00 ld [ %i0 ], %g2 <== NOT EXECUTED previous = the_node->previous; 2008a68: c2 06 20 04 ld [ %i0 + 4 ], %g1 next->previous = previous; previous->next = next; 2008a6c: c4 20 40 00 st %g2, [ %g1 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 2008a70: c2 20 a0 04 st %g1, [ %g2 + 4 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 2008a74: 03 00 80 5e sethi %hi(0x2017800), %g1 2008a78: c2 00 60 44 ld [ %g1 + 0x44 ], %g1 ! 2017844 <_Watchdog_Ticks_since_boot> 2008a7c: c2 26 20 18 st %g1, [ %i0 + 0x18 ] _ISR_Enable( level ); 2008a80: 7f ff e4 b4 call 2001d50 2008a84: b0 10 00 10 mov %l0, %i0 return( previous_state ); } 2008a88: 81 c7 e0 08 ret 2008a8c: 81 e8 00 00 restore 02008ba0 <_Workspace_Handler_initialization>: */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 2008ba0: 9d e3 bf 98 save %sp, -104, %sp uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 2008ba4: 80 a6 20 00 cmp %i0, 0 2008ba8: 02 80 00 04 be 2008bb8 <_Workspace_Handler_initialization+0x18> 2008bac: 80 8e 20 07 btst 7, %i0 2008bb0: 02 80 00 06 be 2008bc8 <_Workspace_Handler_initialization+0x28> 2008bb4: 03 00 80 5d sethi %hi(0x2017400), %g1 _Internal_error_Occurred( 2008bb8: 90 10 20 00 clr %o0 2008bbc: 92 10 20 01 mov 1, %o1 2008bc0: 10 80 00 15 b 2008c14 <_Workspace_Handler_initialization+0x74> 2008bc4: 94 10 20 02 mov 2, %o2 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) 2008bc8: c2 00 63 8c ld [ %g1 + 0x38c ], %g1 2008bcc: c2 08 60 28 ldub [ %g1 + 0x28 ], %g1 2008bd0: 80 a0 60 00 cmp %g1, 0 2008bd4: 02 80 00 07 be 2008bf0 <_Workspace_Handler_initialization+0x50> 2008bd8: 92 10 00 18 mov %i0, %o1 memset( starting_address, 0, size ); 2008bdc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2008be0: 92 10 20 00 clr %o1 <== NOT EXECUTED 2008be4: 40 00 13 25 call 200d878 <== NOT EXECUTED 2008be8: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED memory_available = _Heap_Initialize( 2008bec: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 2008bf0: 94 10 00 19 mov %i1, %o2 2008bf4: 11 00 80 5d sethi %hi(0x2017400), %o0 2008bf8: 96 10 20 08 mov 8, %o3 2008bfc: 7f ff f6 2a call 20064a4 <_Heap_Initialize> 2008c00: 90 12 23 14 or %o0, 0x314, %o0 starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 2008c04: 80 a2 20 00 cmp %o0, 0 2008c08: 12 80 00 05 bne 2008c1c <_Workspace_Handler_initialization+0x7c> 2008c0c: 92 10 20 01 mov 1, %o1 _Internal_error_Occurred( 2008c10: 94 10 20 03 mov 3, %o2 <== NOT EXECUTED 2008c14: 7f ff f6 ae call 20066cc <_Internal_error_Occurred> 2008c18: 01 00 00 00 nop 2008c1c: 81 c7 e0 08 ret 2008c20: 81 e8 00 00 restore 02001ee4 <__assert>: void __assert( const char *file, int line, const char *failedexpr ) { 2001ee4: 96 10 00 0a mov %o2, %o3 <== NOT EXECUTED __assert_func (file, line, NULL, failedexpr); 2001ee8: 94 10 20 00 clr %o2 <== NOT EXECUTED 2001eec: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2001ef0: 7f ff ff eb call 2001e9c <__assert_func> <== NOT EXECUTED 2001ef4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 2001ef8: 01 00 00 00 nop 02001e9c <__assert_func>: const char *file, int line, const char *func, const char *failedexpr ) { 2001e9c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n", 2001ea0: 03 00 80 56 sethi %hi(0x2015800), %g1 <== NOT EXECUTED const char *file, int line, const char *func, const char *failedexpr ) { 2001ea4: 9a 10 00 1a mov %i2, %o5 <== NOT EXECUTED 2001ea8: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 2001eac: 96 10 00 19 mov %i1, %o3 <== NOT EXECUTED 2001eb0: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n", 2001eb4: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 2001eb8: 12 80 00 05 bne 2001ecc <__assert_func+0x30> <== NOT EXECUTED 2001ebc: 98 10 61 20 or %g1, 0x120, %o4 <== NOT EXECUTED 2001ec0: 03 00 80 56 sethi %hi(0x2015800), %g1 <== NOT EXECUTED 2001ec4: 9a 10 60 d0 or %g1, 0xd0, %o5 ! 20158d0 <== NOT EXECUTED 2001ec8: 98 10 00 0d mov %o5, %o4 <== NOT EXECUTED 2001ecc: 11 00 80 56 sethi %hi(0x2015800), %o0 <== NOT EXECUTED 2001ed0: 40 00 03 87 call 2002cec <== NOT EXECUTED 2001ed4: 90 12 21 30 or %o0, 0x130, %o0 ! 2015930 <== NOT EXECUTED file, line, (func) ? ", function: " : "", (func) ? func : "" ); rtems_fatal_error_occurred(0); 2001ed8: 40 00 0f 1f call 2005b54 <== NOT EXECUTED 2001edc: 90 10 20 00 clr %o0 <== NOT EXECUTED 2001ee0: 01 00 00 00 nop 02014ac8 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) _fini(); 2014ac8: 9d e3 bf 98 save %sp, -104, %sp 2014acc: 40 00 07 4a call 20167f4 <_fini> 2014ad0: 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(); 2014ad4: 7f ff ff e1 call 2014a58 2014ad8: 01 00 00 00 nop rtems_shutdown_executive(status); 2014adc: 40 00 00 4e call 2014c14 2014ae0: 90 10 00 18 mov %i0, %o0 2014ae4: 30 80 00 00 b,a 2014ae4 <_exit+0x1c> <== NOT EXECUTED 0202b9b4 <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 202b9b4: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 202b9b8: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 202b9bc: 94 10 00 0b mov %o3, %o2 <== NOT EXECUTED 202b9c0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 202b9c4: 7f ff ff 79 call 202b7a8 <== NOT EXECUTED 202b9c8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 202b9cc: 01 00 00 00 nop 0201fb04 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr ) { return getpid(); } 201fb04: 81 c3 e0 08 retl <== NOT EXECUTED 201fb08: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 0200a3ac <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 200a3ac: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 200a3b0: 7f ff ff e6 call 200a348 <== NOT EXECUTED 200a3b4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 200a3b8: 01 00 00 00 nop 0201f4d0 <_link_r>: struct _reent *ptr, const char *existing, const char *new ) { return link( existing, new ); 201f4d0: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 201f4d4: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 201f4d8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 201f4dc: 7f ff ff 65 call 201f270 <== NOT EXECUTED 201f4e0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 201f4e4: 01 00 00 00 nop 0201f6dc <_lstat_r>: struct _reent *ptr, const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 201f6dc: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 201f6e0: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 201f6e4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 201f6e8: 7f ff ff c4 call 201f5f8 <== NOT EXECUTED 201f6ec: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 201f6f0: 01 00 00 00 nop 02014be0 <_realloc_r>: struct _reent *ignored, void *ptr, size_t size ) { return realloc( ptr, size ); 2014be0: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 2014be4: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 2014be8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2014bec: 40 00 00 17 call 2014c48 <== NOT EXECUTED 2014bf0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 2014bf4: 01 00 00 00 nop 0203efac <_rename_r>: int _rename_r( struct _reent *ptr, const char *old, const char *new ) { 203efac: 9d e3 bf 48 save %sp, -184, %sp <== NOT EXECUTED struct stat sb; int s; s = stat( old, &sb); 203efb0: 92 07 bf a8 add %fp, -88, %o1 <== NOT EXECUTED 203efb4: 7f ff 1a e7 call 2005b50 <== NOT EXECUTED 203efb8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( s < 0 ) 203efbc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 203efc0: 06 80 00 13 bl 203f00c <_rename_r+0x60> <== NOT EXECUTED 203efc4: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED return s; s = link( old, new ); 203efc8: 7f ff 80 aa call 201f270 <== NOT EXECUTED 203efcc: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( s < 0 ) 203efd0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 203efd4: 06 80 00 0e bl 203f00c <_rename_r+0x60> <== NOT EXECUTED 203efd8: c2 17 bf b4 lduh [ %fp + -76 ], %g1 <== NOT EXECUTED return s; return S_ISDIR(sb.st_mode) ? rmdir( old ) : unlink( old ); 203efdc: 05 00 00 3c sethi %hi(0xf000), %g2 <== NOT EXECUTED 203efe0: 82 08 40 02 and %g1, %g2, %g1 <== NOT EXECUTED 203efe4: 05 00 00 10 sethi %hi(0x4000), %g2 <== NOT EXECUTED 203efe8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 203efec: 12 80 00 06 bne 203f004 <_rename_r+0x58> <== NOT EXECUTED 203eff0: 01 00 00 00 nop <== NOT EXECUTED 203eff4: 7f ff 83 ae call 201feac <== NOT EXECUTED 203eff8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } 203effc: 81 c7 e0 08 ret <== NOT EXECUTED 203f000: 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 ); 203f004: 7f ff 84 b9 call 20202e8 <== NOT EXECUTED 203f008: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } 203f00c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 203f010: 81 c7 e0 08 ret <== NOT EXECUTED 203f014: 81 e8 00 00 restore <== NOT EXECUTED 02005c34 <_stat_r>: struct _reent *ptr, const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 2005c34: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 2005c38: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 2005c3c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2005c40: 7f ff ff c4 call 2005b50 <== NOT EXECUTED 2005c44: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 2005c48: 01 00 00 00 nop 02020458 <_unlink_r>: int _unlink_r( struct _reent *ptr, const char *path ) { return unlink( path ); 2020458: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 202045c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2020460: 7f ff ff a2 call 20202e8 <== NOT EXECUTED 2020464: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 2020468: 01 00 00 00 nop 02005280 : int alphasort( const void *d1, const void *d2 ) { return(strcmp((*(struct dirent **)d1)->d_name, 2005280: d0 02 00 00 ld [ %o0 ], %o0 <== NOT EXECUTED 2005284: d2 02 40 00 ld [ %o1 ], %o1 <== NOT EXECUTED 2005288: 90 02 20 0c add %o0, 0xc, %o0 <== NOT EXECUTED 200528c: 92 02 60 0c add %o1, 0xc, %o1 <== NOT EXECUTED 2005290: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2005294: 40 00 32 dc call 2011e04 <== NOT EXECUTED 2005298: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 200529c: 01 00 00 00 nop 0201da58 : #include int chdir( const char *pathname ) { 201da58: 9d e3 bf 88 save %sp, -120, %sp /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 201da5c: 92 10 20 01 mov 1, %o1 201da60: 90 10 00 18 mov %i0, %o0 201da64: a0 07 bf e8 add %fp, -24, %l0 201da68: 96 10 20 01 mov 1, %o3 201da6c: 94 10 00 10 mov %l0, %o2 201da70: 7f ff 9a 3e call 2004368 201da74: b0 10 3f ff mov -1, %i0 pathname, RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 201da78: 80 a2 20 00 cmp %o0, 0 201da7c: 12 80 00 37 bne 201db58 201da80: c4 07 bf f0 ld [ %fp + -16 ], %g2 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 201da84: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 201da88: 80 a0 60 00 cmp %g1, 0 201da8c: 12 80 00 0c bne 201dabc 201da90: 01 00 00 00 nop rtems_filesystem_freenode( &loc ); 201da94: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 201da98: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201da9c: 02 80 00 04 be 201daac <== NOT EXECUTED 201daa0: 01 00 00 00 nop <== NOT EXECUTED 201daa4: 9f c0 40 00 call %g1 <== NOT EXECUTED 201daa8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 201daac: 40 00 41 29 call 202df50 <__errno> <== NOT EXECUTED 201dab0: 01 00 00 00 nop <== NOT EXECUTED 201dab4: 10 80 00 14 b 201db04 <== NOT EXECUTED 201dab8: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 201dabc: 9f c0 40 00 call %g1 201dac0: 90 10 00 10 mov %l0, %o0 201dac4: 80 a2 20 01 cmp %o0, 1 201dac8: 02 80 00 12 be 201db10 201dacc: 03 00 81 1a sethi %hi(0x2046800), %g1 rtems_filesystem_freenode( &loc ); 201dad0: c2 07 bf f0 ld [ %fp + -16 ], %g1 201dad4: 80 a0 60 00 cmp %g1, 0 201dad8: 02 80 00 08 be 201daf8 201dadc: 01 00 00 00 nop 201dae0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 201dae4: 80 a0 60 00 cmp %g1, 0 201dae8: 02 80 00 04 be 201daf8 201daec: 01 00 00 00 nop 201daf0: 9f c0 40 00 call %g1 201daf4: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 201daf8: 40 00 41 16 call 202df50 <__errno> 201dafc: 01 00 00 00 nop 201db00: 82 10 20 14 mov 0x14, %g1 ! 14 201db04: c2 22 00 00 st %g1, [ %o0 ] 201db08: 81 c7 e0 08 ret 201db0c: 91 e8 3f ff restore %g0, -1, %o0 } rtems_filesystem_freenode( &rtems_filesystem_current ); 201db10: d0 00 61 0c ld [ %g1 + 0x10c ], %o0 201db14: c2 02 20 0c ld [ %o0 + 0xc ], %g1 201db18: 80 a0 60 00 cmp %g1, 0 201db1c: 22 80 00 09 be,a 201db40 201db20: 03 00 81 1a sethi %hi(0x2046800), %g1 <== NOT EXECUTED 201db24: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 204681c 201db28: 80 a0 60 00 cmp %g1, 0 201db2c: 22 80 00 05 be,a 201db40 201db30: 03 00 81 1a sethi %hi(0x2046800), %g1 <== NOT EXECUTED 201db34: 9f c0 40 00 call %g1 201db38: 90 02 20 04 add %o0, 4, %o0 rtems_filesystem_current = loc; 201db3c: 03 00 81 1a sethi %hi(0x2046800), %g1 201db40: d0 00 61 0c ld [ %g1 + 0x10c ], %o0 ! 204690c 201db44: 92 07 bf e8 add %fp, -24, %o1 201db48: 90 02 20 04 add %o0, 4, %o0 201db4c: 94 10 20 10 mov 0x10, %o2 201db50: 40 00 4a ed call 2030704 201db54: b0 10 20 00 clr %i0 return 0; } 201db58: 81 c7 e0 08 ret 201db5c: 81 e8 00 00 restore 020040f0 : int chmod( const char *path, mode_t mode ) { 20040f0: 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 ); 20040f4: 92 10 20 00 clr %o1 20040f8: 90 10 00 18 mov %i0, %o0 20040fc: a0 07 bf e8 add %fp, -24, %l0 2004100: 96 10 20 01 mov 1, %o3 2004104: 94 10 00 10 mov %l0, %o2 2004108: 40 00 00 98 call 2004368 200410c: b0 10 3f ff mov -1, %i0 if ( status != 0 ) 2004110: 80 a2 20 00 cmp %o0, 0 2004114: 12 80 00 24 bne 20041a4 2004118: c2 07 bf ec ld [ %fp + -20 ], %g1 return -1; if ( !loc.handlers ){ 200411c: 80 a0 60 00 cmp %g1, 0 2004120: 32 80 00 10 bne,a 2004160 2004124: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 rtems_filesystem_freenode( &loc ); 2004128: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 200412c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004130: 02 80 00 08 be 2004150 <== NOT EXECUTED 2004134: 01 00 00 00 nop <== NOT EXECUTED 2004138: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 200413c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004140: 02 80 00 04 be 2004150 <== NOT EXECUTED 2004144: 01 00 00 00 nop <== NOT EXECUTED 2004148: 9f c0 40 00 call %g1 <== NOT EXECUTED 200414c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 2004150: 40 00 a7 80 call 202df50 <__errno> <== NOT EXECUTED 2004154: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2004158: 10 80 00 12 b 20041a0 <== NOT EXECUTED 200415c: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED } if ( !loc.handlers->fchmod_h ){ 2004160: 80 a0 60 00 cmp %g1, 0 2004164: 12 80 00 12 bne 20041ac 2004168: 93 2e 60 10 sll %i1, 0x10, %o1 rtems_filesystem_freenode( &loc ); 200416c: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 2004170: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004174: 02 80 00 08 be 2004194 <== NOT EXECUTED 2004178: 01 00 00 00 nop <== NOT EXECUTED 200417c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 2004180: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004184: 02 80 00 04 be 2004194 <== NOT EXECUTED 2004188: 01 00 00 00 nop <== NOT EXECUTED 200418c: 9f c0 40 00 call %g1 <== NOT EXECUTED 2004190: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 2004194: 40 00 a7 6f call 202df50 <__errno> <== NOT EXECUTED 2004198: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200419c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 20041a0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20041a4: 81 c7 e0 08 ret 20041a8: 81 e8 00 00 restore } result = (*loc.handlers->fchmod_h)( &loc, mode ); 20041ac: 90 10 00 10 mov %l0, %o0 20041b0: 9f c0 40 00 call %g1 20041b4: 93 32 60 10 srl %o1, 0x10, %o1 rtems_filesystem_freenode( &loc ); 20041b8: c2 07 bf f0 ld [ %fp + -16 ], %g1 20041bc: 80 a0 60 00 cmp %g1, 0 20041c0: 02 bf ff f9 be 20041a4 20041c4: b0 10 00 08 mov %o0, %i0 20041c8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 20041cc: 80 a0 60 00 cmp %g1, 0 20041d0: 02 80 00 04 be 20041e0 20041d4: 01 00 00 00 nop 20041d8: 9f c0 40 00 call %g1 20041dc: 90 10 00 10 mov %l0, %o0 return result; } 20041e0: 81 c7 e0 08 ret 20041e4: 81 e8 00 00 restore 0201db60 : int chown( const char *path, uid_t owner, gid_t group ) { 201db60: 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 ) ) 201db64: 92 10 20 00 clr %o1 201db68: 90 10 00 18 mov %i0, %o0 201db6c: a0 07 bf e8 add %fp, -24, %l0 201db70: 96 10 20 01 mov 1, %o3 201db74: 94 10 00 10 mov %l0, %o2 201db78: 7f ff 99 fc call 2004368 201db7c: b0 10 3f ff mov -1, %i0 201db80: 80 a2 20 00 cmp %o0, 0 201db84: 12 80 00 10 bne 201dbc4 201db88: c2 07 bf f0 ld [ %fp + -16 ], %g1 return -1; if ( !loc.ops->chown_h ) { 201db8c: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 201db90: 80 a0 a0 00 cmp %g2, 0 201db94: 12 80 00 0e bne 201dbcc 201db98: 93 2e 60 10 sll %i1, 0x10, %o1 rtems_filesystem_freenode( &loc ); 201db9c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 201dba0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201dba4: 02 80 00 04 be 201dbb4 <== NOT EXECUTED 201dba8: 01 00 00 00 nop <== NOT EXECUTED 201dbac: 9f c0 40 00 call %g1 <== NOT EXECUTED 201dbb0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 201dbb4: 40 00 40 e7 call 202df50 <__errno> <== NOT EXECUTED 201dbb8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201dbbc: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 201dbc0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 201dbc4: 81 c7 e0 08 ret 201dbc8: 81 e8 00 00 restore } result = (*loc.ops->chown_h)( &loc, owner, group ); 201dbcc: 95 2e a0 10 sll %i2, 0x10, %o2 201dbd0: 93 32 60 10 srl %o1, 0x10, %o1 201dbd4: 95 32 a0 10 srl %o2, 0x10, %o2 201dbd8: 9f c0 80 00 call %g2 201dbdc: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 201dbe0: c2 07 bf f0 ld [ %fp + -16 ], %g1 201dbe4: 80 a0 60 00 cmp %g1, 0 201dbe8: 02 bf ff f7 be 201dbc4 201dbec: b0 10 00 08 mov %o0, %i0 201dbf0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 201dbf4: 80 a0 60 00 cmp %g1, 0 201dbf8: 02 80 00 04 be 201dc08 201dbfc: 01 00 00 00 nop 201dc00: 9f c0 40 00 call %g1 201dc04: 90 10 00 10 mov %l0, %o0 return result; } 201dc08: 81 c7 e0 08 ret 201dc0c: 81 e8 00 00 restore 0201dc10 : #include int chroot( const char *pathname ) { 201dc10: 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) { 201dc14: 23 00 81 1a sethi %hi(0x2046800), %l1 201dc18: e0 04 61 0c ld [ %l1 + 0x10c ], %l0 ! 204690c 201dc1c: 03 00 81 6e sethi %hi(0x205b800), %g1 201dc20: 82 10 60 0c or %g1, 0xc, %g1 ! 205b80c 201dc24: 80 a4 00 01 cmp %l0, %g1 201dc28: 12 80 00 0e bne 201dc60 201dc2c: 01 00 00 00 nop rtems_libio_set_private_env(); /* try to set a new private env*/ 201dc30: 40 00 07 90 call 201fa70 201dc34: 01 00 00 00 nop if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 201dc38: c2 04 61 0c ld [ %l1 + 0x10c ], %g1 201dc3c: 80 a0 40 10 cmp %g1, %l0 201dc40: 12 80 00 08 bne 201dc60 201dc44: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 201dc48: 40 00 40 c2 call 202df50 <__errno> <== NOT EXECUTED 201dc4c: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 201dc50: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 201dc54: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 201dc58: 81 c7 e0 08 ret <== NOT EXECUTED 201dc5c: 81 e8 00 00 restore <== NOT EXECUTED } result = chdir(pathname); 201dc60: 7f ff ff 7e call 201da58 201dc64: 90 10 00 18 mov %i0, %o0 if (result) { 201dc68: 80 a2 20 00 cmp %o0, 0 201dc6c: 12 80 00 0b bne 201dc98 201dc70: 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)) { 201dc74: 11 00 81 04 sethi %hi(0x2041000), %o0 201dc78: 92 10 20 00 clr %o1 201dc7c: 90 12 22 08 or %o0, 0x208, %o0 201dc80: 94 07 bf e8 add %fp, -24, %o2 201dc84: 7f ff 99 b9 call 2004368 201dc88: 96 10 20 00 clr %o3 201dc8c: 80 a2 20 00 cmp %o0, 0 201dc90: 02 80 00 0a be 201dcb8 201dc94: 03 00 81 1a sethi %hi(0x2046800), %g1 /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 201dc98: 40 00 40 ae call 202df50 <__errno> <== NOT EXECUTED 201dc9c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201dca0: 40 00 40 ac call 202df50 <__errno> <== NOT EXECUTED 201dca4: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 201dca8: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 201dcac: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED 201dcb0: 81 c7 e0 08 ret <== NOT EXECUTED 201dcb4: 81 e8 00 00 restore <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); 201dcb8: d0 00 61 0c ld [ %g1 + 0x10c ], %o0 201dcbc: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 201dcc0: 80 a0 60 00 cmp %g1, 0 201dcc4: 22 80 00 09 be,a 201dce8 201dcc8: 03 00 81 1a sethi %hi(0x2046800), %g1 <== NOT EXECUTED 201dccc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 204681c 201dcd0: 80 a0 60 00 cmp %g1, 0 201dcd4: 22 80 00 05 be,a 201dce8 201dcd8: 03 00 81 1a sethi %hi(0x2046800), %g1 <== NOT EXECUTED 201dcdc: 9f c0 40 00 call %g1 201dce0: 90 02 20 14 add %o0, 0x14, %o0 rtems_filesystem_root = loc; 201dce4: 03 00 81 1a sethi %hi(0x2046800), %g1 201dce8: d0 00 61 0c ld [ %g1 + 0x10c ], %o0 ! 204690c 201dcec: 92 07 bf e8 add %fp, -24, %o1 201dcf0: 94 10 20 10 mov 0x10, %o2 201dcf4: 90 02 20 14 add %o0, 0x14, %o0 201dcf8: 40 00 4a 83 call 2030704 201dcfc: b0 10 20 00 clr %i0 return 0; } 201dd00: 81 c7 e0 08 ret 201dd04: 81 e8 00 00 restore 0202b5b8 : * close a directory. */ int closedir( DIR *dirp ) { 202b5b8: 9d e3 bf 98 save %sp, -104, %sp int fd; if ( !dirp ) 202b5bc: a0 96 20 00 orcc %i0, 0, %l0 202b5c0: 32 80 00 08 bne,a 202b5e0 202b5c4: d0 04 20 0c ld [ %l0 + 0xc ], %o0 rtems_set_errno_and_return_minus_one( EBADF ); 202b5c8: 40 00 0a 62 call 202df50 <__errno> <== NOT EXECUTED 202b5cc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202b5d0: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 202b5d4: 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)); } 202b5d8: 81 c7 e0 08 ret <== NOT EXECUTED 202b5dc: 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; 202b5e0: 82 10 3f ff mov -1, %g1 int fd; if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); fd = dirp->dd_fd; 202b5e4: f0 04 00 00 ld [ %l0 ], %i0 dirp->dd_fd = -1; dirp->dd_loc = 0; 202b5e8: c0 24 20 04 clr [ %l0 + 4 ] (void)free((void *)dirp->dd_buf); 202b5ec: 7f ff 63 b1 call 20044b0 202b5f0: c2 24 00 00 st %g1, [ %l0 ] (void)free((void *)dirp); 202b5f4: 7f ff 63 af call 20044b0 202b5f8: 90 10 00 10 mov %l0, %o0 return(close(fd)); 202b5fc: 7f ff 62 fb call 20041e8 202b600: 81 e8 00 00 restore 202b604: 01 00 00 00 nop 0200c2e4 : */ int device_close( rtems_libio_t *iop ) { 200c2e4: 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; 200c2e8: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 args.iop = iop; 200c2ec: f0 27 bf ec st %i0, [ %fp + -20 ] args.flags = 0; 200c2f0: c0 27 bf f0 clr [ %fp + -16 ] args.mode = 0; 200c2f4: c0 27 bf f4 clr [ %fp + -12 ] status = rtems_io_close( 200c2f8: d2 00 60 50 ld [ %g1 + 0x50 ], %o1 200c2fc: d0 00 60 4c ld [ %g1 + 0x4c ], %o0 200c300: 94 07 bf ec add %fp, -20, %o2 200c304: 40 00 02 15 call 200cb58 200c308: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 200c30c: 80 a2 20 00 cmp %o0, 0 200c310: 02 80 00 05 be 200c324 200c314: 01 00 00 00 nop return rtems_deviceio_errno(status); 200c318: 7f ff ff a3 call 200c1a4 <== NOT EXECUTED 200c31c: 01 00 00 00 nop <== NOT EXECUTED 200c320: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } return 0; } 200c324: 81 c7 e0 08 ret 200c328: 81 e8 00 00 restore 0200c1d8 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 200c1d8: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED args.iop = iop; args.command = command; args.buffer = buffer; the_jnode = iop->file_info; 200c1dc: 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; 200c1e0: f2 27 bf ec st %i1, [ %fp + -20 ] <== NOT EXECUTED args.buffer = buffer; 200c1e4: 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; 200c1e8: 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( 200c1ec: d2 00 60 50 ld [ %g1 + 0x50 ], %o1 <== NOT EXECUTED 200c1f0: d0 00 60 4c ld [ %g1 + 0x4c ], %o0 <== NOT EXECUTED 200c1f4: 40 00 02 6f call 200cbb0 <== NOT EXECUTED 200c1f8: 94 07 bf e8 add %fp, -24, %o2 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 200c1fc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200c200: 22 80 00 06 be,a 200c218 <== NOT EXECUTED 200c204: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED return rtems_deviceio_errno(status); 200c208: 7f ff ff e7 call 200c1a4 <== NOT EXECUTED 200c20c: 01 00 00 00 nop <== NOT EXECUTED return args.ioctl_return; } 200c210: 81 c7 e0 08 ret <== NOT EXECUTED 200c214: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 200c218: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 200c21c: 81 c7 e0 08 ret <== NOT EXECUTED 200c220: 81 e8 00 00 restore <== NOT EXECUTED 0200c32c : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 200c32c: 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; 200c330: 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; 200c334: c4 06 20 2c ld [ %i0 + 0x2c ], %g2 args.iop = iop; 200c338: f0 27 bf ec st %i0, [ %fp + -20 ] args.flags = iop->flags; 200c33c: c2 27 bf f0 st %g1, [ %fp + -16 ] args.mode = mode; 200c340: f6 27 bf f4 st %i3, [ %fp + -12 ] status = rtems_io_open( 200c344: d2 00 a0 50 ld [ %g2 + 0x50 ], %o1 200c348: d0 00 a0 4c ld [ %g2 + 0x4c ], %o0 200c34c: 94 07 bf ec add %fp, -20, %o2 200c350: 40 00 02 2e call 200cc08 200c354: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 200c358: 80 a2 20 00 cmp %o0, 0 200c35c: 02 80 00 05 be 200c370 200c360: 01 00 00 00 nop return rtems_deviceio_errno(status); 200c364: 7f ff ff 90 call 200c1a4 <== NOT EXECUTED 200c368: 01 00 00 00 nop <== NOT EXECUTED 200c36c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED return 0; } 200c370: 81 c7 e0 08 ret 200c374: 81 e8 00 00 restore 0200c284 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 200c284: 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; 200c288: 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; 200c28c: 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; 200c290: c6 06 20 2c ld [ %i0 + 0x2c ], %g3 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; 200c294: 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; 200c298: c2 27 bf e4 st %g1, [ %fp + -28 ] <== NOT EXECUTED args.buffer = buffer; args.count = count; 200c29c: f4 27 bf ec st %i2, [ %fp + -20 ] <== NOT EXECUTED args.flags = iop->flags; 200c2a0: 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; 200c2a4: 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; 200c2a8: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED status = rtems_io_read( 200c2ac: d2 00 e0 50 ld [ %g3 + 0x50 ], %o1 <== NOT EXECUTED 200c2b0: d0 00 e0 4c ld [ %g3 + 0x4c ], %o0 <== NOT EXECUTED 200c2b4: 40 00 02 6b call 200cc60 <== NOT EXECUTED 200c2b8: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 200c2bc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200c2c0: 22 80 00 06 be,a 200c2d8 <== NOT EXECUTED 200c2c4: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED return rtems_deviceio_errno(status); 200c2c8: 7f ff ff b7 call 200c1a4 <== NOT EXECUTED 200c2cc: 01 00 00 00 nop <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 200c2d0: 81 c7 e0 08 ret <== NOT EXECUTED 200c2d4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 200c2d8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 200c2dc: 81 c7 e0 08 ret <== NOT EXECUTED 200c2e0: 81 e8 00 00 restore <== NOT EXECUTED 0200c224 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 200c224: 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; 200c228: 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; 200c22c: 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; 200c230: c6 06 20 2c ld [ %i0 + 0x2c ], %g3 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 200c234: 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; 200c238: c2 27 bf e4 st %g1, [ %fp + -28 ] args.buffer = (void *) buffer; args.count = count; 200c23c: f4 27 bf ec st %i2, [ %fp + -20 ] args.flags = iop->flags; 200c240: 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; 200c244: 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; 200c248: c0 27 bf f4 clr [ %fp + -12 ] status = rtems_io_write( 200c24c: d2 00 e0 50 ld [ %g3 + 0x50 ], %o1 200c250: d0 00 e0 4c ld [ %g3 + 0x4c ], %o0 200c254: 40 00 02 99 call 200ccb8 200c258: 94 07 bf e0 add %fp, -32, %o2 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 200c25c: 80 a2 20 00 cmp %o0, 0 200c260: 22 80 00 06 be,a 200c278 200c264: d0 07 bf f4 ld [ %fp + -12 ], %o0 return rtems_deviceio_errno(status); 200c268: 7f ff ff cf call 200c1a4 <== NOT EXECUTED 200c26c: 01 00 00 00 nop <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 200c270: 81 c7 e0 08 ret <== NOT EXECUTED 200c274: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 200c278: b0 10 00 08 mov %o0, %i0 200c27c: 81 c7 e0 08 ret 200c280: 81 e8 00 00 restore 02003b78 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 2003b78: 9d e3 bf 98 save %sp, -104, %sp rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 2003b7c: c2 06 20 b4 ld [ %i0 + 0xb4 ], %g1 2003b80: 80 a0 60 00 cmp %g1, 0 2003b84: 02 80 00 1a be 2003bec 2003b88: 01 00 00 00 nop rtems_interrupt_disable (level); 2003b8c: 7f ff f8 6d call 2001d40 <== NOT EXECUTED 2003b90: 01 00 00 00 nop <== NOT EXECUTED while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 2003b94: 10 80 00 0f b 2003bd0 <== NOT EXECUTED 2003b98: a0 10 20 02 mov 2, %l0 ! 2 <== NOT EXECUTED rtems_interrupt_enable (level); 2003b9c: 7f ff f8 6d call 2001d50 <== NOT EXECUTED 2003ba0: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 2003ba4: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 2003ba8: 92 10 20 00 clr %o1 <== NOT EXECUTED 2003bac: 40 00 06 28 call 200544c <== NOT EXECUTED 2003bb0: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2003bb4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2003bb8: 02 80 00 04 be 2003bc8 <== NOT EXECUTED 2003bbc: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 2003bc0: 40 00 07 e5 call 2005b54 <== NOT EXECUTED 2003bc4: 01 00 00 00 nop <== NOT EXECUTED rtems_interrupt_disable (level); 2003bc8: 7f ff f8 5e call 2001d40 <== NOT EXECUTED 2003bcc: 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) { 2003bd0: c4 06 20 84 ld [ %i0 + 0x84 ], %g2 <== NOT EXECUTED 2003bd4: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 2003bd8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2003bdc: 32 bf ff f0 bne,a 2003b9c <== NOT EXECUTED 2003be0: 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); 2003be4: 7f ff f8 5b call 2001d50 <== NOT EXECUTED 2003be8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 2003bec: 81 c7 e0 08 ret 2003bf0: 81 e8 00 00 restore 02002d90 : int dup2( int fildes, int fildes2 ) { 2002d90: 9d e3 bf 48 save %sp, -184, %sp /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 2002d94: a0 07 bf a8 add %fp, -88, %l0 2002d98: 90 10 00 18 mov %i0, %o0 2002d9c: 40 00 01 dd call 2003510 2002da0: 92 10 00 10 mov %l0, %o1 if ( status == -1 ) 2002da4: 80 a2 3f ff cmp %o0, -1 2002da8: 02 80 00 0e be 2002de0 2002dac: 90 10 3f ff mov -1, %o0 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 2002db0: 92 10 00 10 mov %l0, %o1 2002db4: 40 00 01 d7 call 2003510 2002db8: 90 10 00 19 mov %i1, %o0 if ( status == -1 ) 2002dbc: 80 a2 3f ff cmp %o0, -1 2002dc0: 02 80 00 07 be 2002ddc 2002dc4: 90 10 00 18 mov %i0, %o0 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 2002dc8: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED 2002dcc: 40 00 00 97 call 2003028 <== NOT EXECUTED 2002dd0: 92 10 20 00 clr %o1 <== NOT EXECUTED } 2002dd4: 81 c7 e0 08 ret <== NOT EXECUTED 2002dd8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 2002ddc: 90 10 3f ff mov -1, %o0 } 2002de0: b0 10 00 08 mov %o0, %i0 2002de4: 81 c7 e0 08 ret 2002de8: 81 e8 00 00 restore 020035e4 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 20035e4: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 20035e8: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 20035ec: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 20035f0: 02 80 00 1b be 200365c <== NOT EXECUTED 20035f4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 20035f8: 03 00 80 5b sethi %hi(0x2016c00), %g1 <== NOT EXECUTED 20035fc: c2 00 61 c8 ld [ %g1 + 0x1c8 ], %g1 ! 2016dc8 <__ctype_ptr> <== NOT EXECUTED 2003600: 84 0e 20 ff and %i0, 0xff, %g2 <== NOT EXECUTED 2003604: c2 08 40 02 ldub [ %g1 + %g2 ], %g1 <== NOT EXECUTED 2003608: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 200360c: 22 80 00 15 be,a 2003660 <== NOT EXECUTED 2003610: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED 2003614: 80 a0 a0 09 cmp %g2, 9 <== NOT EXECUTED 2003618: 02 80 00 11 be 200365c <== NOT EXECUTED 200361c: 80 a0 a0 0a cmp %g2, 0xa <== NOT EXECUTED 2003620: 02 80 00 10 be 2003660 <== NOT EXECUTED 2003624: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 2003628: 82 1e 20 40 xor %i0, 0x40, %g1 <== NOT EXECUTED 200362c: 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] = '^'; 2003630: 82 10 20 5e mov 0x5e, %g1 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 2003634: 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] = '^'; 2003638: c2 2f bf f0 stb %g1, [ %fp + -16 ] <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 200363c: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 2003640: 7f ff ff 3b call 200332c <== NOT EXECUTED 2003644: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED tty->column += 2; 2003648: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 200364c: 82 00 60 02 add %g1, 2, %g1 <== NOT EXECUTED 2003650: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED 2003654: 81 c7 e0 08 ret <== NOT EXECUTED 2003658: 81 e8 00 00 restore <== NOT EXECUTED } else { oproc (c, tty); 200365c: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED 2003660: 7f ff ff 7f call 200345c <== NOT EXECUTED 2003664: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2003668: 81 c7 e0 08 ret <== NOT EXECUTED 200366c: 81 e8 00 00 restore <== NOT EXECUTED 0201e778 : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 201e778: 03 00 81 69 sethi %hi(0x205a400), %g1 <== NOT EXECUTED 201e77c: d0 00 62 8c ld [ %g1 + 0x28c ], %o0 ! 205a68c <== NOT EXECUTED 201e780: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201e784: 02 80 00 05 be 201e798 <== NOT EXECUTED 201e788: 01 00 00 00 nop <== NOT EXECUTED fclose(group_fp); 201e78c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 201e790: 40 00 3e 48 call 202e0b0 <== NOT EXECUTED 201e794: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 201e798: 81 c3 e0 08 retl <== NOT EXECUTED 201e79c: 01 00 00 00 nop 0201e7a0 : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 201e7a0: 03 00 81 69 sethi %hi(0x205a400), %g1 <== NOT EXECUTED 201e7a4: d0 00 61 a4 ld [ %g1 + 0x1a4 ], %o0 ! 205a5a4 <== NOT EXECUTED 201e7a8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201e7ac: 02 80 00 05 be 201e7c0 <== NOT EXECUTED 201e7b0: 01 00 00 00 nop <== NOT EXECUTED fclose(passwd_fp); 201e7b4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 201e7b8: 40 00 3e 3e call 202e0b0 <== NOT EXECUTED 201e7bc: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 201e7c0: 81 c3 e0 08 retl <== NOT EXECUTED 201e7c4: 01 00 00 00 nop 02003670 : * 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) { 2003670: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (tty->ccount == 0) 2003674: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 <== NOT EXECUTED 2003678: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200367c: 02 80 00 0a be 20036a4 <== NOT EXECUTED 2003680: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED return; if (lineFlag) { 2003684: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 2003688: 02 80 00 78 be 2003868 <== NOT EXECUTED 200368c: 03 00 80 5b sethi %hi(0x2016c00), %g1 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { 2003690: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 2003694: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 2003698: 32 80 00 05 bne,a 20036ac <== NOT EXECUTED 200369c: 80 88 60 10 btst 0x10, %g1 <== NOT EXECUTED tty->ccount = 0; 20036a0: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED 20036a4: 81 c7 e0 08 ret <== NOT EXECUTED 20036a8: 81 e8 00 00 restore <== NOT EXECUTED return; } if (!(tty->termios.c_lflag & ECHOE)) { 20036ac: 12 80 00 6f bne 2003868 <== NOT EXECUTED 20036b0: 03 00 80 5b sethi %hi(0x2016c00), %g1 <== NOT EXECUTED tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 20036b4: 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; 20036b8: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 20036bc: 7f ff ff ca call 20035e4 <== NOT EXECUTED 20036c0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 20036c4: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED echo ('\n', tty); 20036c8: 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) 20036cc: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 20036d0: 02 bf ff f5 be 20036a4 <== NOT EXECUTED 20036d4: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED 20036d8: 30 80 00 0f b,a 2003714 <== NOT EXECUTED } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { 20036dc: c4 04 20 3c ld [ %l0 + 0x3c ], %g2 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 20036e0: 86 00 ff ff add %g3, -1, %g3 <== NOT EXECUTED 20036e4: c6 24 20 20 st %g3, [ %l0 + 0x20 ] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 20036e8: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED 20036ec: 02 80 00 5a be 2003854 <== NOT EXECUTED 20036f0: c2 08 40 03 ldub [ %g1 + %g3 ], %g1 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 20036f4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 20036f8: 12 80 00 09 bne 200371c <== NOT EXECUTED 20036fc: b0 08 60 ff and %g1, 0xff, %i0 <== NOT EXECUTED 2003700: 80 88 a0 10 btst 0x10, %g2 <== NOT EXECUTED 2003704: 12 80 00 07 bne 2003720 <== NOT EXECUTED 2003708: 80 a6 20 09 cmp %i0, 9 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); 200370c: f0 0c 20 43 ldub [ %l0 + 0x43 ], %i0 <== NOT EXECUTED 2003710: b2 10 00 10 mov %l0, %i1 <== NOT EXECUTED 2003714: 7f ff ff b4 call 20035e4 <== NOT EXECUTED 2003718: 81 e8 00 00 restore <== NOT EXECUTED } else if (c == '\t') { 200371c: 80 a6 20 09 cmp %i0, 9 <== NOT EXECUTED 2003720: 32 80 00 29 bne,a 20037c4 <== NOT EXECUTED 2003724: 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) 2003728: 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; 200372c: 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)) { 2003730: c8 04 40 00 ld [ %l1 ], %g4 <== NOT EXECUTED 2003734: 10 80 00 12 b 200377c <== NOT EXECUTED 2003738: 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') { 200373c: c2 08 40 02 ldub [ %g1 + %g2 ], %g1 <== NOT EXECUTED 2003740: 80 a0 60 09 cmp %g1, 9 <== NOT EXECUTED 2003744: 32 80 00 05 bne,a 2003758 <== NOT EXECUTED 2003748: c2 09 00 01 ldub [ %g4 + %g1 ], %g1 <== NOT EXECUTED col = (col | 7) + 1; 200374c: 82 16 20 07 or %i0, 7, %g1 <== NOT EXECUTED 2003750: 10 80 00 0a b 2003778 <== NOT EXECUTED 2003754: b0 00 60 01 add %g1, 1, %i0 <== NOT EXECUTED } else if (iscntrl (c)) { 2003758: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 200375c: 22 80 00 07 be,a 2003778 <== NOT EXECUTED 2003760: b0 06 20 01 inc %i0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 2003764: 80 a3 60 00 cmp %o5, 0 <== NOT EXECUTED 2003768: 32 80 00 04 bne,a 2003778 <== NOT EXECUTED 200376c: b0 06 20 02 add %i0, 2, %i0 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 2003770: 10 80 00 03 b 200377c <== NOT EXECUTED 2003774: 84 00 a0 01 inc %g2 <== NOT EXECUTED 2003778: 84 00 a0 01 inc %g2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 200377c: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED 2003780: 32 bf ff ef bne,a 200373c <== NOT EXECUTED 2003784: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 2003788: 10 80 00 08 b 20037a8 <== NOT EXECUTED 200378c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 2003790: 7f ff fe e7 call 200332c <== NOT EXECUTED 2003794: 01 00 00 00 nop <== NOT EXECUTED tty->column--; 2003798: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 200379c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 20037a0: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 20037a4: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 20037a8: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 20037ac: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 20037b0: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED 20037b4: 14 bf ff f7 bg 2003790 <== NOT EXECUTED 20037b8: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 20037bc: 10 80 00 27 b 2003858 <== NOT EXECUTED 20037c0: 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)) { 20037c4: c2 08 40 18 ldub [ %g1 + %i0 ], %g1 <== NOT EXECUTED 20037c8: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 20037cc: 22 80 00 10 be,a 200380c <== NOT EXECUTED 20037d0: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED 20037d4: 80 88 a2 00 btst 0x200, %g2 <== NOT EXECUTED 20037d8: 22 80 00 0d be,a 200380c <== NOT EXECUTED 20037dc: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 20037e0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 20037e4: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 20037e8: 7f ff fe d1 call 200332c <== NOT EXECUTED 20037ec: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) 20037f0: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 20037f4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20037f8: 22 80 00 05 be,a 200380c <== NOT EXECUTED 20037fc: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED tty->column--; 2003800: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2003804: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 2003808: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED 200380c: c2 08 40 18 ldub [ %g1 + %i0 ], %g1 <== NOT EXECUTED 2003810: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 2003814: 02 80 00 07 be 2003830 <== NOT EXECUTED 2003818: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 200381c: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 2003820: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 2003824: 02 80 00 0d be 2003858 <== NOT EXECUTED 2003828: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 200382c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 2003830: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 2003834: 7f ff fe be call 200332c <== NOT EXECUTED 2003838: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) 200383c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 2003840: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2003844: 02 80 00 05 be 2003858 <== NOT EXECUTED 2003848: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED tty->column--; 200384c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2003850: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED } } } if (!lineFlag) 2003854: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 2003858: 32 80 00 0a bne,a 2003880 <== NOT EXECUTED 200385c: c6 04 20 20 ld [ %l0 + 0x20 ], %g3 <== NOT EXECUTED 2003860: 81 c7 e0 08 ret <== NOT EXECUTED 2003864: 81 e8 00 00 restore <== NOT EXECUTED 2003868: a2 10 61 c8 or %g1, 0x1c8, %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); 200386c: 03 00 80 56 sethi %hi(0x2015800), %g1 <== NOT EXECUTED 2003870: a4 10 61 a8 or %g1, 0x1a8, %l2 ! 20159a8 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 2003874: 03 00 80 56 sethi %hi(0x2015800), %g1 <== NOT EXECUTED 2003878: a6 10 61 a0 or %g1, 0x1a0, %l3 ! 20159a0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 200387c: c6 04 20 20 ld [ %l0 + 0x20 ], %g3 <== NOT EXECUTED 2003880: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 2003884: 32 bf ff 96 bne,a 20036dc <== NOT EXECUTED 2003888: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED 200388c: 81 c7 e0 08 ret <== NOT EXECUTED 2003890: 81 e8 00 00 restore <== NOT EXECUTED 0202b608 : #include int fchdir( int fd ) { 202b608: 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 ); 202b60c: 03 00 81 17 sethi %hi(0x2045c00), %g1 <== NOT EXECUTED 202b610: c2 00 62 88 ld [ %g1 + 0x288 ], %g1 ! 2045e88 <== NOT EXECUTED 202b614: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 202b618: 1a 80 00 0e bcc 202b650 <== NOT EXECUTED 202b61c: 01 00 00 00 nop <== NOT EXECUTED iop = rtems_libio_iop( fd ); 202b620: 03 00 81 6b sethi %hi(0x205ac00), %g1 <== NOT EXECUTED 202b624: c6 00 63 6c ld [ %g1 + 0x36c ], %g3 ! 205af6c <== NOT EXECUTED 202b628: 85 2e 20 02 sll %i0, 2, %g2 <== NOT EXECUTED 202b62c: 83 2e 20 04 sll %i0, 4, %g1 <== NOT EXECUTED 202b630: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 202b634: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED 202b638: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 202b63c: 82 00 c0 01 add %g3, %g1, %g1 <== NOT EXECUTED rtems_libio_check_is_open(iop); 202b640: c8 00 60 0c ld [ %g1 + 0xc ], %g4 <== NOT EXECUTED 202b644: 80 89 21 00 btst 0x100, %g4 <== NOT EXECUTED 202b648: 12 80 00 06 bne 202b660 <== NOT EXECUTED 202b64c: 80 89 20 02 btst 2, %g4 <== NOT EXECUTED 202b650: 40 00 0a 40 call 202df50 <__errno> <== NOT EXECUTED 202b654: 01 00 00 00 nop <== NOT EXECUTED 202b658: 10 80 00 1b b 202b6c4 <== NOT EXECUTED 202b65c: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 202b660: 32 80 00 06 bne,a 202b678 <== NOT EXECUTED 202b664: c8 00 60 18 ld [ %g1 + 0x18 ], %g4 <== NOT EXECUTED 202b668: 40 00 0a 3a call 202df50 <__errno> <== NOT EXECUTED 202b66c: 01 00 00 00 nop <== NOT EXECUTED 202b670: 10 80 00 15 b 202b6c4 <== NOT EXECUTED 202b674: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 202b678: 80 a1 20 00 cmp %g4, 0 <== NOT EXECUTED 202b67c: 02 80 00 06 be 202b694 <== NOT EXECUTED 202b680: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 202b684: c4 01 20 10 ld [ %g4 + 0x10 ], %g2 <== NOT EXECUTED 202b688: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 202b68c: 32 80 00 06 bne,a 202b6a4 <== NOT EXECUTED 202b690: b0 00 60 10 add %g1, 0x10, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 202b694: 40 00 0a 2f call 202df50 <__errno> <== NOT EXECUTED 202b698: 01 00 00 00 nop <== NOT EXECUTED 202b69c: 10 80 00 0a b 202b6c4 <== NOT EXECUTED 202b6a0: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 202b6a4: 9f c0 80 00 call %g2 <== NOT EXECUTED 202b6a8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 202b6ac: 80 a2 20 01 cmp %o0, 1 <== NOT EXECUTED 202b6b0: 02 80 00 07 be 202b6cc <== NOT EXECUTED 202b6b4: 25 00 81 1a sethi %hi(0x2046800), %l2 <== NOT EXECUTED RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 202b6b8: 40 00 0a 26 call 202df50 <__errno> <== NOT EXECUTED 202b6bc: 01 00 00 00 nop <== NOT EXECUTED 202b6c0: 82 10 20 14 mov 0x14, %g1 ! 14 <== NOT EXECUTED 202b6c4: 10 80 00 1b b 202b730 <== NOT EXECUTED 202b6c8: 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; 202b6cc: e0 04 a1 0c ld [ %l2 + 0x10c ], %l0 <== NOT EXECUTED 202b6d0: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 202b6d4: a0 04 20 04 add %l0, 4, %l0 <== NOT EXECUTED 202b6d8: a2 07 bf d8 add %fp, -40, %l1 <== NOT EXECUTED 202b6dc: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 202b6e0: 40 00 14 09 call 2030704 <== NOT EXECUTED 202b6e4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 202b6e8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 202b6ec: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 202b6f0: 40 00 14 05 call 2030704 <== NOT EXECUTED 202b6f4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 202b6f8: 92 10 20 00 clr %o1 <== NOT EXECUTED 202b6fc: 11 00 81 04 sethi %hi(0x2041000), %o0 <== NOT EXECUTED 202b700: 94 07 bf e8 add %fp, -24, %o2 <== NOT EXECUTED 202b704: 90 12 22 08 or %o0, 0x208, %o0 <== NOT EXECUTED 202b708: 7f ff 63 18 call 2004368 <== NOT EXECUTED 202b70c: 96 10 20 00 clr %o3 <== NOT EXECUTED 202b710: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 202b714: 02 80 00 09 be 202b738 <== NOT EXECUTED 202b718: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 202b71c: d0 04 a1 0c ld [ %l2 + 0x10c ], %o0 <== NOT EXECUTED 202b720: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 202b724: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED 202b728: 40 00 13 f7 call 2030704 <== NOT EXECUTED 202b72c: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 202b730: 81 c7 e0 08 ret <== NOT EXECUTED 202b734: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED return -1; } /* release the old one */ rtems_filesystem_freenode( &saved ); 202b738: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202b73c: 22 80 00 09 be,a 202b760 <== NOT EXECUTED 202b740: 03 00 81 1a sethi %hi(0x2046800), %g1 <== NOT EXECUTED 202b744: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 204681c <== NOT EXECUTED 202b748: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202b74c: 22 80 00 05 be,a 202b760 <== NOT EXECUTED 202b750: 03 00 81 1a sethi %hi(0x2046800), %g1 <== NOT EXECUTED 202b754: 9f c0 40 00 call %g1 <== NOT EXECUTED 202b758: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_filesystem_current = loc; 202b75c: 03 00 81 1a sethi %hi(0x2046800), %g1 <== NOT EXECUTED 202b760: d0 00 61 0c ld [ %g1 + 0x10c ], %o0 ! 204690c <== NOT EXECUTED 202b764: 92 07 bf e8 add %fp, -24, %o1 <== NOT EXECUTED 202b768: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 202b76c: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED 202b770: 40 00 13 e5 call 2030704 <== NOT EXECUTED 202b774: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 202b778: 81 c7 e0 08 ret <== NOT EXECUTED 202b77c: 81 e8 00 00 restore <== NOT EXECUTED 0201df44 : int fchmod( int fd, mode_t mode ) { 201df44: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 201df48: 03 00 81 17 sethi %hi(0x2045c00), %g1 <== NOT EXECUTED 201df4c: c2 00 62 88 ld [ %g1 + 0x288 ], %g1 ! 2045e88 <== NOT EXECUTED 201df50: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 201df54: 1a 80 00 0e bcc 201df8c <== NOT EXECUTED 201df58: 01 00 00 00 nop <== NOT EXECUTED iop = rtems_libio_iop( fd ); 201df5c: 03 00 81 6b sethi %hi(0x205ac00), %g1 <== NOT EXECUTED 201df60: c6 00 63 6c ld [ %g1 + 0x36c ], %g3 ! 205af6c <== NOT EXECUTED 201df64: 85 2e 20 02 sll %i0, 2, %g2 <== NOT EXECUTED 201df68: 83 2e 20 04 sll %i0, 4, %g1 <== NOT EXECUTED 201df6c: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 201df70: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED 201df74: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 201df78: 84 00 c0 01 add %g3, %g1, %g2 <== NOT EXECUTED rtems_libio_check_is_open(iop); 201df7c: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 <== NOT EXECUTED 201df80: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 201df84: 12 80 00 06 bne 201df9c <== NOT EXECUTED 201df88: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 201df8c: 40 00 3f f1 call 202df50 <__errno> <== NOT EXECUTED 201df90: 01 00 00 00 nop <== NOT EXECUTED 201df94: 10 80 00 0f b 201dfd0 <== NOT EXECUTED 201df98: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 201df9c: 32 80 00 06 bne,a 201dfb4 <== NOT EXECUTED 201dfa0: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 <== NOT EXECUTED 201dfa4: 40 00 3f eb call 202df50 <__errno> <== NOT EXECUTED 201dfa8: 01 00 00 00 nop <== NOT EXECUTED 201dfac: 10 80 00 09 b 201dfd0 <== NOT EXECUTED 201dfb0: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 201dfb4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 201dfb8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201dfbc: 32 80 00 08 bne,a 201dfdc <== NOT EXECUTED 201dfc0: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 201dfc4: 40 00 3f e3 call 202df50 <__errno> <== NOT EXECUTED 201dfc8: 01 00 00 00 nop <== NOT EXECUTED 201dfcc: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 201dfd0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 201dfd4: 10 80 00 07 b 201dff0 <== NOT EXECUTED 201dfd8: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 201dfdc: 93 2e 60 10 sll %i1, 0x10, %o1 <== NOT EXECUTED 201dfe0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 201dfe4: 90 00 a0 10 add %g2, 0x10, %o0 <== NOT EXECUTED 201dfe8: 9f c0 40 00 call %g1 <== NOT EXECUTED 201dfec: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED } 201dff0: 81 c7 e0 08 ret <== NOT EXECUTED 201dff4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 0201dff8 : int fchown( int fd, uid_t owner, gid_t group ) { 201dff8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 201dffc: 03 00 81 17 sethi %hi(0x2045c00), %g1 <== NOT EXECUTED 201e000: c2 00 62 88 ld [ %g1 + 0x288 ], %g1 ! 2045e88 <== NOT EXECUTED 201e004: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 201e008: 1a 80 00 0e bcc 201e040 <== NOT EXECUTED 201e00c: 01 00 00 00 nop <== NOT EXECUTED iop = rtems_libio_iop( fd ); 201e010: 03 00 81 6b sethi %hi(0x205ac00), %g1 <== NOT EXECUTED 201e014: c6 00 63 6c ld [ %g1 + 0x36c ], %g3 ! 205af6c <== NOT EXECUTED 201e018: 85 2e 20 02 sll %i0, 2, %g2 <== NOT EXECUTED 201e01c: 83 2e 20 04 sll %i0, 4, %g1 <== NOT EXECUTED 201e020: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 201e024: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED 201e028: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 201e02c: 84 00 c0 01 add %g3, %g1, %g2 <== NOT EXECUTED rtems_libio_check_is_open(iop); 201e030: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 <== NOT EXECUTED 201e034: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 201e038: 12 80 00 06 bne 201e050 <== NOT EXECUTED 201e03c: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 201e040: 40 00 3f c4 call 202df50 <__errno> <== NOT EXECUTED 201e044: 01 00 00 00 nop <== NOT EXECUTED 201e048: 10 80 00 0f b 201e084 <== NOT EXECUTED 201e04c: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 201e050: 32 80 00 06 bne,a 201e068 <== NOT EXECUTED 201e054: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 <== NOT EXECUTED 201e058: 40 00 3f be call 202df50 <__errno> <== NOT EXECUTED 201e05c: 01 00 00 00 nop <== NOT EXECUTED 201e060: 10 80 00 09 b 201e084 <== NOT EXECUTED 201e064: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 201e068: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 201e06c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201e070: 12 80 00 08 bne 201e090 <== NOT EXECUTED 201e074: 93 2e 60 10 sll %i1, 0x10, %o1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 201e078: 40 00 3f b6 call 202df50 <__errno> <== NOT EXECUTED 201e07c: 01 00 00 00 nop <== NOT EXECUTED 201e080: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 201e084: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 201e088: 10 80 00 07 b 201e0a4 <== NOT EXECUTED 201e08c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 201e090: 95 2e a0 10 sll %i2, 0x10, %o2 <== NOT EXECUTED 201e094: 90 00 a0 10 add %g2, 0x10, %o0 <== NOT EXECUTED 201e098: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 201e09c: 9f c0 40 00 call %g1 <== NOT EXECUTED 201e0a0: 95 32 a0 10 srl %o2, 0x10, %o2 <== NOT EXECUTED } 201e0a4: 81 c7 e0 08 ret <== NOT EXECUTED 201e0a8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 0202b7a8 : int fcntl( int fd, int cmd, ... ) { 202b7a8: 9d e3 bf 90 save %sp, -112, %sp int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 202b7ac: 03 00 81 17 sethi %hi(0x2045c00), %g1 202b7b0: da 00 62 88 ld [ %g1 + 0x288 ], %o5 ! 2045e88 ... ) { int ret; va_list ap; va_start( ap, cmd ); 202b7b4: 86 07 a0 4c add %fp, 0x4c, %g3 202b7b8: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 202b7bc: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 202b7c0: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 202b7c4: fa 27 a0 58 st %i5, [ %fp + 0x58 ] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 202b7c8: 80 a6 00 0d cmp %i0, %o5 202b7cc: 1a 80 00 0e bcc 202b804 202b7d0: c6 27 bf f4 st %g3, [ %fp + -12 ] iop = rtems_libio_iop( fd ); 202b7d4: 03 00 81 6b sethi %hi(0x205ac00), %g1 202b7d8: c8 00 63 6c ld [ %g1 + 0x36c ], %g4 ! 205af6c 202b7dc: 85 2e 20 02 sll %i0, 2, %g2 202b7e0: 83 2e 20 04 sll %i0, 4, %g1 202b7e4: 82 20 40 02 sub %g1, %g2, %g1 202b7e8: 82 00 40 18 add %g1, %i0, %g1 202b7ec: 83 28 60 02 sll %g1, 2, %g1 202b7f0: b8 01 00 01 add %g4, %g1, %i4 rtems_libio_check_is_open(iop); 202b7f4: d0 07 20 0c ld [ %i4 + 0xc ], %o0 202b7f8: 80 8a 21 00 btst 0x100, %o0 202b7fc: 12 80 00 06 bne 202b814 202b800: 80 a6 60 09 cmp %i1, 9 202b804: 40 00 09 d3 call 202df50 <__errno> <== NOT EXECUTED 202b808: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202b80c: 10 80 00 55 b 202b960 <== NOT EXECUTED 202b810: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 202b814: 18 80 00 50 bgu 202b954 202b818: 83 2e 60 02 sll %i1, 2, %g1 202b81c: 05 00 80 ad sethi %hi(0x202b400), %g2 202b820: 84 10 a3 80 or %g2, 0x380, %g2 ! 202b780 202b824: c2 00 80 01 ld [ %g2 + %g1 ], %g1 202b828: 81 c0 40 00 jmp %g1 202b82c: 01 00 00 00 nop case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 202b830: d0 00 c0 00 ld [ %g3 ], %o0 if ( fd2 ) 202b834: 80 a2 20 00 cmp %o0, 0 202b838: 02 80 00 0b be 202b864 202b83c: 80 a2 00 0d cmp %o0, %o5 diop = rtems_libio_iop( fd2 ); 202b840: 1a 80 00 0e bcc 202b878 <== NOT EXECUTED 202b844: ba 10 20 00 clr %i5 <== NOT EXECUTED 202b848: 85 2a 20 02 sll %o0, 2, %g2 <== NOT EXECUTED 202b84c: 83 2a 20 04 sll %o0, 4, %g1 <== NOT EXECUTED 202b850: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 202b854: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED 202b858: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 202b85c: 10 80 00 07 b 202b878 <== NOT EXECUTED 202b860: ba 01 00 01 add %g4, %g1, %i5 <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 202b864: 7f ff 64 05 call 2004878 202b868: b0 10 3f ff mov -1, %i0 if ( diop == 0 ) { 202b86c: ba 92 20 00 orcc %o0, 0, %i5 202b870: 02 80 00 4f be 202b9ac 202b874: 01 00 00 00 nop ret = -1; break; } } diop->handlers = iop->handlers; 202b878: c2 07 20 30 ld [ %i4 + 0x30 ], %g1 diop->file_info = iop->file_info; 202b87c: c4 07 20 2c ld [ %i4 + 0x2c ], %g2 diop->flags = iop->flags; 202b880: c6 07 20 0c ld [ %i4 + 0xc ], %g3 ret = -1; break; } } diop->handlers = iop->handlers; 202b884: c2 27 60 30 st %g1, [ %i5 + 0x30 ] diop->file_info = iop->file_info; 202b888: c4 27 60 2c st %g2, [ %i5 + 0x2c ] diop->flags = iop->flags; 202b88c: c6 27 60 0c st %g3, [ %i5 + 0xc ] diop->pathinfo = iop->pathinfo; 202b890: 90 07 60 10 add %i5, 0x10, %o0 202b894: 92 07 20 10 add %i4, 0x10, %o1 202b898: 40 00 13 9b call 2030704 202b89c: 94 10 20 10 mov 0x10, %o2 ret = (int) (diop - rtems_libio_iops); 202b8a0: 03 00 81 6b sethi %hi(0x205ac00), %g1 202b8a4: c6 00 63 6c ld [ %g1 + 0x36c ], %g3 ! 205af6c 202b8a8: 86 27 40 03 sub %i5, %g3, %g3 202b8ac: 87 38 e0 02 sra %g3, 2, %g3 202b8b0: 83 28 e0 02 sll %g3, 2, %g1 202b8b4: 85 28 e0 06 sll %g3, 6, %g2 202b8b8: 84 20 80 01 sub %g2, %g1, %g2 202b8bc: 83 28 a0 06 sll %g2, 6, %g1 202b8c0: 82 20 40 02 sub %g1, %g2, %g1 202b8c4: 85 28 60 0c sll %g1, 0xc, %g2 202b8c8: 82 00 40 02 add %g1, %g2, %g1 202b8cc: 82 00 40 03 add %g1, %g3, %g1 202b8d0: 83 28 60 04 sll %g1, 4, %g1 202b8d4: 82 20 40 03 sub %g1, %g3, %g1 202b8d8: 83 28 60 02 sll %g1, 2, %g1 202b8dc: 10 80 00 24 b 202b96c 202b8e0: b0 20 c0 01 sub %g3, %g1, %i0 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 202b8e4: 83 32 20 0b srl %o0, 0xb, %g1 202b8e8: 10 80 00 24 b 202b978 202b8ec: 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 ) ) 202b8f0: c2 00 c0 00 ld [ %g3 ], %g1 202b8f4: 80 a0 60 00 cmp %g1, 0 202b8f8: 22 80 00 03 be,a 202b904 202b8fc: 82 0a 37 ff and %o0, -2049, %g1 <== NOT EXECUTED 202b900: 82 12 28 00 or %o0, 0x800, %g1 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 202b904: c2 27 20 0c st %g1, [ %i4 + 0xc ] 202b908: 10 80 00 1c b 202b978 202b90c: b0 10 20 00 clr %i0 break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 202b910: 7f ff 63 6e call 20046c8 202b914: 01 00 00 00 nop 202b918: 10 80 00 15 b 202b96c 202b91c: b0 10 00 08 mov %o0, %i0 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 202b920: d0 00 c0 00 ld [ %g3 ], %o0 202b924: 7f ff 64 0b call 2004950 202b928: 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); 202b92c: c2 07 20 0c ld [ %i4 + 0xc ], %g1 202b930: 90 0a 22 01 and %o0, 0x201, %o0 202b934: 82 08 7d fe and %g1, -514, %g1 202b938: 90 12 00 01 or %o0, %g1, %o0 202b93c: 10 80 00 0f b 202b978 202b940: d0 27 20 0c st %o0, [ %i4 + 0xc ] errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 202b944: 40 00 09 83 call 202df50 <__errno> 202b948: b0 10 3f ff mov -1, %i0 202b94c: 10 80 00 05 b 202b960 202b950: 82 10 20 86 mov 0x86, %g1 ret = -1; break; default: errno = EINVAL; 202b954: 40 00 09 7f call 202df50 <__errno> 202b958: b0 10 3f ff mov -1, %i0 202b95c: 82 10 20 16 mov 0x16, %g1 202b960: c2 22 00 00 st %g1, [ %o0 ] 202b964: 81 c7 e0 08 ret 202b968: 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) { 202b96c: 80 a6 20 00 cmp %i0, 0 202b970: 06 80 00 0f bl 202b9ac 202b974: 01 00 00 00 nop if (iop->handlers->fcntl_h) { 202b978: c2 07 20 30 ld [ %i4 + 0x30 ], %g1 202b97c: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 202b980: 80 a0 60 00 cmp %g1, 0 202b984: 02 bf ff f8 be 202b964 202b988: 90 10 00 19 mov %i1, %o0 int err = (*iop->handlers->fcntl_h)( cmd, iop ); 202b98c: 9f c0 40 00 call %g1 202b990: 92 10 00 1c mov %i4, %o1 if (err) { 202b994: ba 92 20 00 orcc %o0, 0, %i5 202b998: 02 80 00 05 be 202b9ac 202b99c: 01 00 00 00 nop errno = err; 202b9a0: 40 00 09 6c call 202df50 <__errno> <== NOT EXECUTED 202b9a4: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 202b9a8: 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; } 202b9ac: 81 c7 e0 08 ret 202b9b0: 81 e8 00 00 restore 02020484 : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 2020484: 03 00 81 6c sethi %hi(0x205b000), %g1 <== NOT EXECUTED 2020488: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 ! 205b010 <== NOT EXECUTED 202048c: 82 10 60 10 or %g1, 0x10, %g1 <== NOT EXECUTED !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 2020490: 10 80 00 08 b 20204b0 <== NOT EXECUTED 2020494: 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 ) { 2020498: c2 02 60 0c ld [ %o1 + 0xc ], %g1 <== NOT EXECUTED 202049c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 20204a0: 32 80 00 04 bne,a 20204b0 <== NOT EXECUTED 20204a4: c6 00 c0 00 ld [ %g3 ], %g3 <== NOT EXECUTED 20204a8: 81 c3 e0 08 retl <== NOT EXECUTED 20204ac: 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 ); 20204b0: 80 a0 c0 04 cmp %g3, %g4 <== NOT EXECUTED 20204b4: 32 bf ff f9 bne,a 2020498 <== NOT EXECUTED 20204b8: c4 00 e0 14 ld [ %g3 + 0x14 ], %g2 <== NOT EXECUTED return true; } } return false; } 20204bc: 81 c3 e0 08 retl <== NOT EXECUTED 20204c0: 90 10 20 00 clr %o0 <== NOT EXECUTED 02003328 : long fpathconf( int fd, int name ) { 2003328: 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); 200332c: 03 00 80 59 sethi %hi(0x2016400), %g1 2003330: c2 00 62 08 ld [ %g1 + 0x208 ], %g1 ! 2016608 2003334: 80 a6 00 01 cmp %i0, %g1 2003338: 1a 80 00 0e bcc 2003370 200333c: 01 00 00 00 nop iop = rtems_libio_iop(fd); 2003340: 03 00 80 5c sethi %hi(0x2017000), %g1 2003344: c6 00 62 b4 ld [ %g1 + 0x2b4 ], %g3 ! 20172b4 2003348: 85 2e 20 02 sll %i0, 2, %g2 200334c: 83 2e 20 04 sll %i0, 4, %g1 2003350: 82 20 40 02 sub %g1, %g2, %g1 2003354: 82 00 40 18 add %g1, %i0, %g1 2003358: 83 28 60 02 sll %g1, 2, %g1 200335c: 82 00 c0 01 add %g3, %g1, %g1 rtems_libio_check_is_open(iop); 2003360: c8 00 60 0c ld [ %g1 + 0xc ], %g4 2003364: 80 89 21 00 btst 0x100, %g4 2003368: 12 80 00 06 bne 2003380 200336c: 80 89 20 02 btst 2, %g4 2003370: 40 00 31 10 call 200f7b0 <__errno> 2003374: 01 00 00 00 nop 2003378: 10 80 00 07 b 2003394 200337c: 82 10 20 09 mov 9, %g1 ! 9 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 2003380: 12 80 00 08 bne 20033a0 2003384: 80 a6 60 0b cmp %i1, 0xb 2003388: 40 00 31 0a call 200f7b0 <__errno> <== NOT EXECUTED 200338c: 01 00 00 00 nop <== NOT EXECUTED 2003390: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 2003394: c2 22 00 00 st %g1, [ %o0 ] 2003398: 81 c7 e0 08 ret 200339c: 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 ) { 20033a0: 18 80 00 2c bgu 2003450 20033a4: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 20033a8: 83 2e 60 02 sll %i1, 2, %g1 20033ac: 05 00 80 0c sethi %hi(0x2003000), %g2 20033b0: 84 10 a2 f8 or %g2, 0x2f8, %g2 ! 20032f8 20033b4: c2 00 80 01 ld [ %g2 + %g1 ], %g1 20033b8: 81 c0 40 00 jmp %g1 20033bc: 01 00 00 00 nop case _PC_LINK_MAX: return_value = the_limits->link_max; 20033c0: f0 00 e0 30 ld [ %g3 + 0x30 ], %i0 20033c4: 81 c7 e0 08 ret 20033c8: 81 e8 00 00 restore break; case _PC_MAX_CANON: return_value = the_limits->max_canon; 20033cc: f0 00 e0 34 ld [ %g3 + 0x34 ], %i0 20033d0: 81 c7 e0 08 ret 20033d4: 81 e8 00 00 restore break; case _PC_MAX_INPUT: return_value = the_limits->max_input; 20033d8: f0 00 e0 38 ld [ %g3 + 0x38 ], %i0 20033dc: 81 c7 e0 08 ret 20033e0: 81 e8 00 00 restore break; case _PC_NAME_MAX: return_value = the_limits->name_max; 20033e4: f0 00 e0 3c ld [ %g3 + 0x3c ], %i0 20033e8: 81 c7 e0 08 ret 20033ec: 81 e8 00 00 restore break; case _PC_PATH_MAX: return_value = the_limits->path_max; 20033f0: f0 00 e0 40 ld [ %g3 + 0x40 ], %i0 20033f4: 81 c7 e0 08 ret 20033f8: 81 e8 00 00 restore break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 20033fc: f0 00 e0 44 ld [ %g3 + 0x44 ], %i0 2003400: 81 c7 e0 08 ret 2003404: 81 e8 00 00 restore break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 2003408: f0 00 e0 4c ld [ %g3 + 0x4c ], %i0 200340c: 81 c7 e0 08 ret 2003410: 81 e8 00 00 restore break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 2003414: f0 00 e0 50 ld [ %g3 + 0x50 ], %i0 2003418: 81 c7 e0 08 ret 200341c: 81 e8 00 00 restore break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 2003420: f0 00 e0 5c ld [ %g3 + 0x5c ], %i0 2003424: 81 c7 e0 08 ret 2003428: 81 e8 00 00 restore break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 200342c: f0 00 e0 48 ld [ %g3 + 0x48 ], %i0 2003430: 81 c7 e0 08 ret 2003434: 81 e8 00 00 restore break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 2003438: f0 00 e0 54 ld [ %g3 + 0x54 ], %i0 200343c: 81 c7 e0 08 ret 2003440: 81 e8 00 00 restore break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 2003444: f0 00 e0 58 ld [ %g3 + 0x58 ], %i0 2003448: 81 c7 e0 08 ret 200344c: 81 e8 00 00 restore break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 2003450: 40 00 30 d8 call 200f7b0 <__errno> 2003454: b0 10 3f ff mov -1, %i0 2003458: 82 10 20 16 mov 0x16, %g1 200345c: c2 22 00 00 st %g1, [ %o0 ] break; } return return_value; } 2003460: 81 c7 e0 08 ret 2003464: 81 e8 00 00 restore 0200a18c : void free( void *ptr ) { MSBUMP(free_calls, 1); 200a18c: 9d e3 bf 98 save %sp, -104, %sp 200a190: 05 00 80 5d sethi %hi(0x2017400), %g2 200a194: 84 10 a1 78 or %g2, 0x178, %g2 ! 2017578 200a198: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 200a19c: b2 10 00 18 mov %i0, %i1 200a1a0: 82 00 60 01 inc %g1 if ( !ptr ) 200a1a4: 80 a6 20 00 cmp %i0, 0 200a1a8: 02 80 00 21 be 200a22c 200a1ac: 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()) && 200a1b0: 03 00 80 5e sethi %hi(0x2017800), %g1 200a1b4: c2 00 60 94 ld [ %g1 + 0x94 ], %g1 ! 2017894 <_System_state_Current> 200a1b8: 80 a0 60 03 cmp %g1, 3 200a1bc: 12 80 00 09 bne 200a1e0 200a1c0: 03 00 80 5c sethi %hi(0x2017000), %g1 200a1c4: 40 00 01 33 call 200a690 200a1c8: 01 00 00 00 nop 200a1cc: 80 8a 20 ff btst 0xff, %o0 200a1d0: 12 80 00 04 bne 200a1e0 200a1d4: 03 00 80 5c sethi %hi(0x2017000), %g1 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 200a1d8: 40 00 01 41 call 200a6dc <== NOT EXECUTED 200a1dc: 81 e8 00 00 restore <== NOT EXECUTED #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 200a1e0: c2 00 62 74 ld [ %g1 + 0x274 ], %g1 200a1e4: 80 a0 60 00 cmp %g1, 0 200a1e8: 02 80 00 06 be 200a200 200a1ec: 37 00 80 5d sethi %hi(0x2017400), %i3 (*rtems_malloc_statistics_helpers->at_free)(ptr); 200a1f0: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED 200a1f4: 9f c0 40 00 call %g1 <== NOT EXECUTED 200a1f8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( !_Protected_heap_Free( &RTEMS_Malloc_Heap, ptr ) ) { 200a1fc: 37 00 80 5d sethi %hi(0x2017400), %i3 <== NOT EXECUTED 200a200: 92 10 00 19 mov %i1, %o1 200a204: 40 00 06 75 call 200bbd8 <_Protected_heap_Free> 200a208: 90 16 e1 20 or %i3, 0x120, %o0 200a20c: 80 8a 20 ff btst 0xff, %o0 200a210: 12 80 00 07 bne 200a22c 200a214: 82 16 e1 20 or %i3, 0x120, %g1 printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 200a218: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 <== NOT EXECUTED 200a21c: f4 00 60 18 ld [ %g1 + 0x18 ], %i2 <== NOT EXECUTED 200a220: 31 00 80 57 sethi %hi(0x2015c00), %i0 <== NOT EXECUTED 200a224: 7f ff e2 b2 call 2002cec <== NOT EXECUTED 200a228: 91 ee 20 f0 restore %i0, 0xf0, %o0 <== NOT EXECUTED 200a22c: 81 c7 e0 08 ret 200a230: 81 e8 00 00 restore 0201f940 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 201f940: 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 201f944: 03 00 81 6e sethi %hi(0x205b800), %g1 <== NOT EXECUTED 201f948: 82 10 60 0c or %g1, 0xc, %g1 ! 205b80c <== NOT EXECUTED 201f94c: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 201f950: 02 80 00 18 be 201f9b0 <== NOT EXECUTED 201f954: 01 00 00 00 nop <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 201f958: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED 201f95c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201f960: 22 80 00 09 be,a 201f984 <== NOT EXECUTED 201f964: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED 201f968: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 201f96c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201f970: 22 80 00 05 be,a 201f984 <== NOT EXECUTED 201f974: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED 201f978: 9f c0 40 00 call %g1 <== NOT EXECUTED 201f97c: 90 06 20 04 add %i0, 4, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 201f980: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED 201f984: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201f988: 02 80 00 08 be 201f9a8 <== NOT EXECUTED 201f98c: 01 00 00 00 nop <== NOT EXECUTED 201f990: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 201f994: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201f998: 02 80 00 04 be 201f9a8 <== NOT EXECUTED 201f99c: 01 00 00 00 nop <== NOT EXECUTED 201f9a0: 9f c0 40 00 call %g1 <== NOT EXECUTED 201f9a4: 90 06 20 14 add %i0, 0x14, %o0 <== NOT EXECUTED free(env); 201f9a8: 7f ff 92 c2 call 20044b0 <== NOT EXECUTED 201f9ac: 81 e8 00 00 restore <== NOT EXECUTED 201f9b0: 81 c7 e0 08 ret <== NOT EXECUTED 201f9b4: 81 e8 00 00 restore <== NOT EXECUTED 02014810 : int fstat( int fd, struct stat *sbuf ) { 2014810: 9d e3 bf 98 save %sp, -104, %sp /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 2014814: 80 a6 60 00 cmp %i1, 0 2014818: 32 80 00 06 bne,a 2014830 201481c: 03 00 80 5a sethi %hi(0x2016800), %g1 rtems_set_errno_and_return_minus_one( EFAULT ); 2014820: 7f ff e1 eb call 200cfcc <__errno> 2014824: 01 00 00 00 nop 2014828: 10 80 00 2a b 20148d0 201482c: 82 10 20 0e mov 0xe, %g1 ! e /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 2014830: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 2014834: 80 a6 00 01 cmp %i0, %g1 2014838: 1a 80 00 23 bcc 20148c4 201483c: 03 00 80 5d sethi %hi(0x2017400), %g1 2014840: c6 00 61 14 ld [ %g1 + 0x114 ], %g3 ! 2017514 2014844: 85 2e 20 02 sll %i0, 2, %g2 2014848: 83 2e 20 04 sll %i0, 4, %g1 201484c: 82 20 40 02 sub %g1, %g2, %g1 2014850: 82 00 40 18 add %g1, %i0, %g1 2014854: 83 28 60 02 sll %g1, 2, %g1 2014858: b0 00 c0 01 add %g3, %g1, %i0 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 201485c: c2 06 20 0c ld [ %i0 + 0xc ], %g1 2014860: 80 88 61 00 btst 0x100, %g1 2014864: 02 80 00 18 be 20148c4 2014868: 01 00 00 00 nop if ( !iop->handlers ) 201486c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 2014870: 80 a0 60 00 cmp %g1, 0 2014874: 02 80 00 14 be 20148c4 2014878: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 201487c: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 2014880: 80 a0 60 00 cmp %g1, 0 2014884: 12 80 00 06 bne 201489c 2014888: 92 10 20 00 clr %o1 rtems_set_errno_and_return_minus_one( ENOTSUP ); 201488c: 7f ff e1 d0 call 200cfcc <__errno> <== NOT EXECUTED 2014890: 01 00 00 00 nop <== NOT EXECUTED 2014894: 10 80 00 0f b 20148d0 <== NOT EXECUTED 2014898: 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) ); 201489c: 94 10 20 50 mov 0x50, %o2 20148a0: 7f ff e3 f6 call 200d878 20148a4: 90 10 00 19 mov %i1, %o0 return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 20148a8: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 20148ac: 90 06 20 10 add %i0, 0x10, %o0 20148b0: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 20148b4: 9f c0 40 00 call %g1 20148b8: 92 10 00 19 mov %i1, %o1 } 20148bc: 81 c7 e0 08 ret 20148c0: 91 e8 00 08 restore %g0, %o0, %o0 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); 20148c4: 7f ff e1 c2 call 200cfcc <__errno> 20148c8: 01 00 00 00 nop 20148cc: 82 10 20 09 mov 9, %g1 ! 9 20148d0: c2 22 00 00 st %g1, [ %o0 ] 20148d4: 10 bf ff fa b 20148bc 20148d8: 90 10 3f ff mov -1, %o0 0201e190 : #include int fsync( int fd ) { 201e190: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_t *iop; rtems_libio_check_fd( fd ); 201e194: 03 00 81 17 sethi %hi(0x2045c00), %g1 201e198: c2 00 62 88 ld [ %g1 + 0x288 ], %g1 ! 2045e88 201e19c: 80 a6 00 01 cmp %i0, %g1 201e1a0: 1a 80 00 18 bcc 201e200 201e1a4: 01 00 00 00 nop iop = rtems_libio_iop( fd ); 201e1a8: 03 00 81 6b sethi %hi(0x205ac00), %g1 201e1ac: c6 00 63 6c ld [ %g1 + 0x36c ], %g3 ! 205af6c 201e1b0: 85 2e 20 02 sll %i0, 2, %g2 201e1b4: 83 2e 20 04 sll %i0, 4, %g1 201e1b8: 82 20 40 02 sub %g1, %g2, %g1 201e1bc: 82 00 40 18 add %g1, %i0, %g1 201e1c0: 83 28 60 02 sll %g1, 2, %g1 201e1c4: 90 00 c0 01 add %g3, %g1, %o0 rtems_libio_check_is_open(iop); 201e1c8: c8 02 20 0c ld [ %o0 + 0xc ], %g4 201e1cc: 80 89 21 00 btst 0x100, %g4 201e1d0: 02 80 00 0c be 201e200 201e1d4: 01 00 00 00 nop rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 201e1d8: 80 89 20 04 btst 4, %g4 201e1dc: 32 80 00 06 bne,a 201e1f4 201e1e0: c8 02 20 30 ld [ %o0 + 0x30 ], %g4 201e1e4: 40 00 3f 5b call 202df50 <__errno> 201e1e8: 01 00 00 00 nop 201e1ec: 10 80 00 0f b 201e228 201e1f0: 82 10 20 16 mov 0x16, %g1 ! 16 /* * Now process the fsync(). */ if ( !iop->handlers ) 201e1f4: 80 a1 20 00 cmp %g4, 0 201e1f8: 32 80 00 06 bne,a 201e210 201e1fc: c2 01 20 28 ld [ %g4 + 0x28 ], %g1 rtems_set_errno_and_return_minus_one( EBADF ); 201e200: 40 00 3f 54 call 202df50 <__errno> <== NOT EXECUTED 201e204: 01 00 00 00 nop <== NOT EXECUTED 201e208: 10 80 00 08 b 201e228 <== NOT EXECUTED 201e20c: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 201e210: 80 a0 60 00 cmp %g1, 0 201e214: 12 80 00 08 bne 201e234 201e218: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 201e21c: 40 00 3f 4d call 202df50 <__errno> 201e220: 01 00 00 00 nop 201e224: 82 10 20 86 mov 0x86, %g1 ! 86 201e228: c2 22 00 00 st %g1, [ %o0 ] 201e22c: 10 80 00 04 b 201e23c 201e230: 90 10 3f ff mov -1, %o0 return (*iop->handlers->fsync_h)( iop ); 201e234: 9f c0 40 00 call %g1 201e238: 01 00 00 00 nop } 201e23c: 81 c7 e0 08 ret 201e240: 91 e8 00 08 restore %g0, %o0, %o0 0200a234 : int ftruncate( int fd, off_t length ) { 200a234: 9d e3 bf 88 save %sp, -120, %sp rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 200a238: 03 00 80 5a sethi %hi(0x2016800), %g1 200a23c: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 ! 2016818 200a240: 80 a6 00 01 cmp %i0, %g1 200a244: 1a 80 00 0e bcc 200a27c 200a248: 01 00 00 00 nop iop = rtems_libio_iop( fd ); 200a24c: 03 00 80 5d sethi %hi(0x2017400), %g1 200a250: c6 00 61 14 ld [ %g1 + 0x114 ], %g3 ! 2017514 200a254: 85 2e 20 02 sll %i0, 2, %g2 200a258: 83 2e 20 04 sll %i0, 4, %g1 200a25c: 82 20 40 02 sub %g1, %g2, %g1 200a260: 82 00 40 18 add %g1, %i0, %g1 200a264: 83 28 60 02 sll %g1, 2, %g1 200a268: b0 00 c0 01 add %g3, %g1, %i0 rtems_libio_check_is_open(iop); 200a26c: c2 06 20 0c ld [ %i0 + 0xc ], %g1 200a270: 80 88 61 00 btst 0x100, %g1 200a274: 12 80 00 06 bne 200a28c 200a278: a0 07 bf e8 add %fp, -24, %l0 200a27c: 40 00 0b 54 call 200cfcc <__errno> <== NOT EXECUTED 200a280: 01 00 00 00 nop <== NOT EXECUTED 200a284: 10 80 00 22 b 200a30c <== NOT EXECUTED 200a288: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 200a28c: 92 06 20 10 add %i0, 0x10, %o1 200a290: 90 10 00 10 mov %l0, %o0 200a294: 40 00 0d 40 call 200d794 200a298: 94 10 20 10 mov 0x10, %o2 if ( !loc.ops->node_type_h ) 200a29c: c2 07 bf f0 ld [ %fp + -16 ], %g1 200a2a0: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 200a2a4: 80 a0 60 00 cmp %g1, 0 200a2a8: 02 80 00 16 be 200a300 200a2ac: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 200a2b0: 9f c0 40 00 call %g1 200a2b4: 90 10 00 10 mov %l0, %o0 200a2b8: 80 a2 20 01 cmp %o0, 1 200a2bc: 32 80 00 06 bne,a 200a2d4 200a2c0: c2 06 20 0c ld [ %i0 + 0xc ], %g1 rtems_set_errno_and_return_minus_one( EISDIR ); 200a2c4: 40 00 0b 42 call 200cfcc <__errno> 200a2c8: 01 00 00 00 nop 200a2cc: 10 80 00 10 b 200a30c 200a2d0: 82 10 20 15 mov 0x15, %g1 ! 15 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 200a2d4: 80 88 60 04 btst 4, %g1 200a2d8: 32 80 00 06 bne,a 200a2f0 200a2dc: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 200a2e0: 40 00 0b 3b call 200cfcc <__errno> <== NOT EXECUTED 200a2e4: 01 00 00 00 nop <== NOT EXECUTED 200a2e8: 10 80 00 09 b 200a30c <== NOT EXECUTED 200a2ec: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) 200a2f0: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 200a2f4: 80 a0 60 00 cmp %g1, 0 200a2f8: 32 80 00 08 bne,a 200a318 200a2fc: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 200a300: 40 00 0b 33 call 200cfcc <__errno> <== NOT EXECUTED 200a304: 01 00 00 00 nop <== NOT EXECUTED 200a308: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 200a30c: c2 22 00 00 st %g1, [ %o0 ] 200a310: 10 80 00 04 b 200a320 200a314: 90 10 3f ff mov -1, %o0 return (*iop->handlers->ftruncate_h)( iop, length ); 200a318: 9f c0 40 00 call %g1 200a31c: 92 10 00 19 mov %i1, %o1 } 200a320: 81 c7 e0 08 ret 200a324: 91 e8 00 08 restore %g0, %o0, %o0 0201e338 : char * getcwd ( char *pt, size_t size) { 201e338: 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) 201e33c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 201e340: 02 80 00 0b be 201e36c <== NOT EXECUTED 201e344: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED if (!size) { errno = EINVAL; return (char *) NULL; } ept = pt + size; 201e348: ac 10 20 00 clr %l6 <== NOT EXECUTED */ if (pt) { ptsize = 0; if (!size) 201e34c: 12 80 00 0e bne 201e384 <== NOT EXECUTED 201e350: b2 06 00 19 add %i0, %i1, %i1 <== NOT EXECUTED { errno = EINVAL; 201e354: 40 00 3e ff call 202df50 <__errno> <== NOT EXECUTED 201e358: b0 10 20 00 clr %i0 <== NOT EXECUTED 201e35c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 201e360: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 201e364: 81 c7 e0 08 ret <== NOT EXECUTED 201e368: 81 e8 00 00 restore <== NOT EXECUTED } ept = pt + size; } else { if (!(pt = (char *) malloc (ptsize = 1024 - 4))) 201e36c: 7f ff 99 e3 call 2004af8 <== NOT EXECUTED 201e370: 90 10 23 fc mov 0x3fc, %o0 <== NOT EXECUTED 201e374: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 201e378: 02 bf ff fb be 201e364 <== NOT EXECUTED 201e37c: b2 06 23 fc add %i0, 0x3fc, %i1 <== NOT EXECUTED { return (char *) NULL; } ept = pt + ptsize; 201e380: ac 10 23 fc mov 0x3fc, %l6 <== NOT EXECUTED } bpt = ept - 1; *bpt = '\0'; 201e384: 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))) 201e388: 90 10 23 fc mov 0x3fc, %o0 <== NOT EXECUTED 201e38c: 7f ff 99 db call 2004af8 <== NOT EXECUTED 201e390: aa 06 7f ff add %i1, -1, %l5 <== NOT EXECUTED 201e394: a4 92 20 00 orcc %o0, 0, %l2 <== NOT EXECUTED 201e398: 02 80 00 d9 be 201e6fc <== NOT EXECUTED 201e39c: 82 10 20 2e mov 0x2e, %g1 <== NOT EXECUTED goto err; } eup = up + MAXPATHLEN; bup = up; up[0] = '.'; up[1] = '\0'; 201e3a0: c0 2c a0 01 clrb [ %l2 + 1 ] <== NOT EXECUTED { goto err; } eup = up + MAXPATHLEN; bup = up; up[0] = '.'; 201e3a4: c2 2c 80 00 stb %g1, [ %l2 ] <== NOT EXECUTED up[1] = '\0'; /* Save root values, so know when to stop. */ if (stat ("/", &s)) 201e3a8: a0 07 bf a8 add %fp, -88, %l0 <== NOT EXECUTED 201e3ac: 11 00 81 03 sethi %hi(0x2040c00), %o0 <== NOT EXECUTED 201e3b0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 201e3b4: 7f ff 9d e7 call 2005b50 <== NOT EXECUTED 201e3b8: 90 12 20 58 or %o0, 0x58, %o0 <== NOT EXECUTED 201e3bc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201e3c0: 12 80 00 d0 bne 201e700 <== NOT EXECUTED 201e3c4: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED goto err; root_dev = s.st_dev; 201e3c8: c2 07 bf a8 ld [ %fp + -88 ], %g1 <== NOT EXECUTED 201e3cc: c4 07 bf ac ld [ %fp + -84 ], %g2 <== NOT EXECUTED root_ino = s.st_ino; 201e3d0: 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; 201e3d4: c2 27 bf 98 st %g1, [ %fp + -104 ] <== NOT EXECUTED 201e3d8: c4 27 bf 94 st %g2, [ %fp + -108 ] <== NOT EXECUTED if (!(up = (char *) malloc (upsize = 1024 - 4))) { goto err; } eup = up + MAXPATHLEN; 201e3dc: 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. */ 201e3e0: 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; 201e3e4: c6 27 bf a0 st %g3, [ %fp + -96 ] <== NOT EXECUTED if (!(up = (char *) malloc (upsize = 1024 - 4))) { goto err; } eup = up + MAXPATHLEN; 201e3e8: 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. */ 201e3ec: c4 27 bf 9c st %g2, [ %fp + -100 ] <== NOT EXECUTED 201e3f0: 40 00 3e d8 call 202df50 <__errno> <== NOT EXECUTED 201e3f4: a8 10 00 12 mov %l2, %l4 <== NOT EXECUTED 201e3f8: b4 10 23 fc mov 0x3fc, %i2 <== NOT EXECUTED 201e3fc: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED for (first = 1;; first = 0) { /* Stat the current level. */ if (_stat (up, &s)) 201e400: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 201e404: 7f ff 9d d3 call 2005b50 <== NOT EXECUTED 201e408: 92 07 bf a8 add %fp, -88, %o1 <== NOT EXECUTED 201e40c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201e410: 12 80 00 bb bne 201e6fc <== NOT EXECUTED 201e414: 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) 201e418: 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; 201e41c: 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) 201e420: 80 a0 c0 1c cmp %g3, %i4 <== NOT EXECUTED 201e424: 12 80 00 14 bne 201e474 <== NOT EXECUTED 201e428: fa 07 bf ac ld [ %fp + -84 ], %i5 <== NOT EXECUTED 201e42c: c2 07 bf 94 ld [ %fp + -108 ], %g1 <== NOT EXECUTED 201e430: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED 201e434: 12 80 00 11 bne 201e478 <== NOT EXECUTED 201e438: c6 07 bf a4 ld [ %fp + -92 ], %g3 <== NOT EXECUTED 201e43c: c4 07 bf a0 ld [ %fp + -96 ], %g2 <== NOT EXECUTED 201e440: 80 a0 80 1b cmp %g2, %i3 <== NOT EXECUTED 201e444: 12 80 00 0e bne 201e47c <== NOT EXECUTED 201e448: 82 05 24 04 add %l4, 0x404, %g1 <== NOT EXECUTED { *--bpt = '/'; 201e44c: 82 10 20 2f mov 0x2f, %g1 <== NOT EXECUTED 201e450: 92 05 7f ff add %l5, -1, %o1 <== NOT EXECUTED 201e454: 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); 201e458: 94 26 40 09 sub %i1, %o1, %o2 <== NOT EXECUTED 201e45c: 40 00 48 e3 call 20307e8 <== NOT EXECUTED 201e460: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED free (up); 201e464: 7f ff 98 13 call 20044b0 <== NOT EXECUTED 201e468: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 201e46c: 81 c7 e0 08 ret <== NOT EXECUTED 201e470: 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) 201e474: c6 07 bf a4 ld [ %fp + -92 ], %g3 <== NOT EXECUTED 201e478: 82 05 24 04 add %l4, 0x404, %g1 <== NOT EXECUTED 201e47c: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 201e480: 18 80 00 0c bgu 201e4b0 <== NOT EXECUTED 201e484: 84 10 20 2e mov 0x2e, %g2 <== NOT EXECUTED { if (!(up = (char *) realloc (up, upsize *= 2))) 201e488: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 201e48c: b5 2e a0 01 sll %i2, 1, %i2 <== NOT EXECUTED 201e490: 40 00 06 37 call 201fd6c <== NOT EXECUTED 201e494: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 201e498: a4 92 20 00 orcc %o0, 0, %l2 <== NOT EXECUTED 201e49c: 02 80 00 98 be 201e6fc <== NOT EXECUTED 201e4a0: 82 04 80 1a add %l2, %i2, %g1 <== NOT EXECUTED { goto err; } bup = up; eup = up + upsize; 201e4a4: a8 10 00 12 mov %l2, %l4 <== NOT EXECUTED 201e4a8: c2 27 bf a4 st %g1, [ %fp + -92 ] <== NOT EXECUTED } *bup++ = '.'; 201e4ac: 84 10 20 2e mov 0x2e, %g2 <== NOT EXECUTED *bup++ = '.'; *bup = '\0'; 201e4b0: c0 2d 20 02 clrb [ %l4 + 2 ] <== NOT EXECUTED goto err; } bup = up; eup = up + upsize; } *bup++ = '.'; 201e4b4: c4 2d 00 00 stb %g2, [ %l4 ] <== NOT EXECUTED *bup++ = '.'; 201e4b8: 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)) 201e4bc: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 201e4c0: 40 00 04 fc call 201f8b0 <== NOT EXECUTED 201e4c4: a0 05 20 02 add %l4, 2, %l0 <== NOT EXECUTED 201e4c8: ae 92 20 00 orcc %o0, 0, %l7 <== NOT EXECUTED 201e4cc: 02 80 00 8d be 201e700 <== NOT EXECUTED 201e4d0: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED 201e4d4: d0 05 c0 00 ld [ %l7 ], %o0 <== NOT EXECUTED 201e4d8: 7f ff fe f5 call 201e0ac <== NOT EXECUTED 201e4dc: 92 07 bf a8 add %fp, -88, %o1 <== NOT EXECUTED 201e4e0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201e4e4: 12 80 00 90 bne 201e724 <== NOT EXECUTED 201e4e8: 86 10 20 2f mov 0x2f, %g3 <== NOT EXECUTED goto err; /* Add trailing slash for next directory. */ *bup++ = '/'; 201e4ec: 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) 201e4f0: c2 07 bf a8 ld [ %fp + -88 ], %g1 <== NOT EXECUTED 201e4f4: 80 a0 40 1c cmp %g1, %i4 <== NOT EXECUTED 201e4f8: 12 80 00 06 bne 201e510 <== NOT EXECUTED 201e4fc: a8 05 20 03 add %l4, 3, %l4 <== NOT EXECUTED 201e500: c2 07 bf ac ld [ %fp + -84 ], %g1 <== NOT EXECUTED 201e504: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED 201e508: 02 80 00 04 be 201e518 <== NOT EXECUTED 201e50c: 01 00 00 00 nop <== NOT EXECUTED 201e510: 10 80 00 0c b 201e540 <== NOT EXECUTED 201e514: a6 10 20 00 clr %l3 ! 0 <== NOT EXECUTED { for (;;) { if (!(dp = _readdir (dir))) 201e518: 40 00 05 9e call 201fb90 <== NOT EXECUTED 201e51c: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 201e520: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 201e524: 02 80 00 69 be 201e6c8 <== NOT EXECUTED 201e528: a6 10 20 00 clr %l3 <== NOT EXECUTED goto notfound; if (dp->d_ino == ino) 201e52c: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED 201e530: 80 a0 40 1b cmp %g1, %i3 <== NOT EXECUTED 201e534: 12 bf ff f9 bne 201e518 <== NOT EXECUTED 201e538: a0 04 60 0c add %l1, 0xc, %l0 <== NOT EXECUTED 201e53c: 30 80 00 33 b,a 201e608 <== NOT EXECUTED } } else for (;;) { if (!(dp = _readdir (dir))) 201e540: 40 00 05 94 call 201fb90 <== NOT EXECUTED 201e544: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 201e548: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 201e54c: 02 80 00 5f be 201e6c8 <== NOT EXECUTED 201e550: 01 00 00 00 nop <== NOT EXECUTED goto notfound; if (ISDOT (dp)) 201e554: c2 4c 60 0c ldsb [ %l1 + 0xc ], %g1 <== NOT EXECUTED 201e558: 80 a0 60 2e cmp %g1, 0x2e <== NOT EXECUTED 201e55c: 12 80 00 0c bne 201e58c <== NOT EXECUTED 201e560: a0 04 60 0c add %l1, 0xc, %l0 <== NOT EXECUTED 201e564: c2 4c 60 0d ldsb [ %l1 + 0xd ], %g1 <== NOT EXECUTED 201e568: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201e56c: 02 bf ff f5 be 201e540 <== NOT EXECUTED 201e570: 80 a0 60 2e cmp %g1, 0x2e <== NOT EXECUTED 201e574: 12 80 00 06 bne 201e58c <== NOT EXECUTED 201e578: 01 00 00 00 nop <== NOT EXECUTED 201e57c: c2 4c 60 0e ldsb [ %l1 + 0xe ], %g1 <== NOT EXECUTED 201e580: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201e584: 02 bf ff ef be 201e540 <== NOT EXECUTED 201e588: 01 00 00 00 nop <== NOT EXECUTED continue; bcopy (dp->d_name, bup, strlen (dp->d_name) + 1); 201e58c: 40 00 55 13 call 20339d8 <== NOT EXECUTED 201e590: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 201e594: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 201e598: 94 02 20 01 add %o0, 1, %o2 <== NOT EXECUTED 201e59c: 40 00 48 93 call 20307e8 <== NOT EXECUTED 201e5a0: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED /* Save the first error for later. */ if (stat (up, &s)) 201e5a4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 201e5a8: 7f ff 9d 6a call 2005b50 <== NOT EXECUTED 201e5ac: 92 07 bf a8 add %fp, -88, %o1 <== NOT EXECUTED 201e5b0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201e5b4: 02 80 00 0c be 201e5e4 <== NOT EXECUTED 201e5b8: c2 07 bf a8 ld [ %fp + -88 ], %g1 <== NOT EXECUTED { if (!save_errno) 201e5bc: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 201e5c0: 12 80 00 05 bne 201e5d4 <== NOT EXECUTED 201e5c4: 01 00 00 00 nop <== NOT EXECUTED save_errno = errno; 201e5c8: 40 00 3e 62 call 202df50 <__errno> <== NOT EXECUTED 201e5cc: 01 00 00 00 nop <== NOT EXECUTED 201e5d0: e6 02 00 00 ld [ %o0 ], %l3 <== NOT EXECUTED errno = 0; 201e5d4: 40 00 3e 5f call 202df50 <__errno> <== NOT EXECUTED 201e5d8: 01 00 00 00 nop <== NOT EXECUTED 201e5dc: 10 bf ff d9 b 201e540 <== NOT EXECUTED 201e5e0: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED continue; } if (s.st_dev == dev && s.st_ino == ino) 201e5e4: 80 a0 40 1c cmp %g1, %i4 <== NOT EXECUTED 201e5e8: 12 bf ff d6 bne 201e540 <== NOT EXECUTED 201e5ec: c2 07 bf ac ld [ %fp + -84 ], %g1 <== NOT EXECUTED 201e5f0: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED 201e5f4: 12 bf ff d3 bne 201e540 <== NOT EXECUTED 201e5f8: c2 07 bf b0 ld [ %fp + -80 ], %g1 <== NOT EXECUTED 201e5fc: 80 a0 40 1b cmp %g1, %i3 <== NOT EXECUTED 201e600: 12 bf ff d0 bne 201e540 <== NOT EXECUTED 201e604: 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)) 201e608: 40 00 54 f4 call 20339d8 <== NOT EXECUTED 201e60c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 201e610: c6 07 bf 9c ld [ %fp + -100 ], %g3 <== NOT EXECUTED 201e614: a2 25 40 18 sub %l5, %i0, %l1 <== NOT EXECUTED 201e618: 84 10 20 02 mov 2, %g2 <== NOT EXECUTED 201e61c: 82 20 80 03 sub %g2, %g3, %g1 <== NOT EXECUTED 201e620: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED 201e624: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 201e628: 18 80 00 17 bgu 201e684 <== NOT EXECUTED 201e62c: c2 07 bf 9c ld [ %fp + -100 ], %g1 <== NOT EXECUTED { size_t len, off; if (!ptsize) 201e630: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED 201e634: 32 80 00 07 bne,a 201e650 <== NOT EXECUTED 201e638: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED { errno = ERANGE; 201e63c: 40 00 3e 45 call 202df50 <__errno> <== NOT EXECUTED 201e640: 01 00 00 00 nop <== NOT EXECUTED 201e644: 82 10 20 22 mov 0x22, %g1 ! 22 <== NOT EXECUTED 201e648: 10 80 00 37 b 201e724 <== NOT EXECUTED 201e64c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED goto err; } off = bpt - pt; len = ept - bpt; if (!(pt = (char *) realloc (pt, ptsize *= 2))) 201e650: ad 2d a0 01 sll %l6, 1, %l6 <== NOT EXECUTED 201e654: 40 00 05 c6 call 201fd6c <== NOT EXECUTED 201e658: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED 201e65c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 201e660: 02 80 00 31 be 201e724 <== NOT EXECUTED 201e664: 82 26 40 15 sub %i1, %l5, %g1 <== NOT EXECUTED { goto err; } bpt = pt + off; ept = pt + ptsize; (void) bcopy (bpt, ept - len, len); 201e668: 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; 201e66c: b2 06 00 16 add %i0, %l6, %i1 <== NOT EXECUTED (void) bcopy (bpt, ept - len, len); 201e670: 94 10 00 01 mov %g1, %o2 <== NOT EXECUTED 201e674: aa 26 40 01 sub %i1, %g1, %l5 <== NOT EXECUTED 201e678: 40 00 48 5c call 20307e8 <== NOT EXECUTED 201e67c: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED bpt = ept - len; } if (!first) 201e680: c2 07 bf 9c ld [ %fp + -100 ], %g1 <== NOT EXECUTED 201e684: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201e688: 12 80 00 04 bne 201e698 <== NOT EXECUTED 201e68c: 84 10 20 2f mov 0x2f, %g2 <== NOT EXECUTED *--bpt = '/'; 201e690: aa 05 7f ff add %l5, -1, %l5 <== NOT EXECUTED 201e694: c4 2d 40 00 stb %g2, [ %l5 ] <== NOT EXECUTED bpt -= strlen (dp->d_name); 201e698: 40 00 54 d0 call 20339d8 <== NOT EXECUTED 201e69c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED bcopy (dp->d_name, bpt, strlen (dp->d_name)); 201e6a0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 201e6a4: 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); 201e6a8: 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'; 201e6ac: 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)); 201e6b0: 40 00 48 4e call 20307e8 <== NOT EXECUTED 201e6b4: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED (void) _closedir (dir); 201e6b8: 40 00 33 c0 call 202b5b8 <== NOT EXECUTED 201e6bc: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED dir = 0; /* Truncate any file name. */ *bup = '\0'; 201e6c0: 10 bf ff 50 b 201e400 <== NOT EXECUTED 201e6c4: 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) 201e6c8: 40 00 3e 22 call 202df50 <__errno> <== NOT EXECUTED 201e6cc: 01 00 00 00 nop <== NOT EXECUTED 201e6d0: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 201e6d4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201e6d8: 12 80 00 13 bne 201e724 <== NOT EXECUTED 201e6dc: 01 00 00 00 nop <== NOT EXECUTED errno = save_errno ? save_errno : ENOENT; 201e6e0: 40 00 3e 1c call 202df50 <__errno> <== NOT EXECUTED 201e6e4: 01 00 00 00 nop <== NOT EXECUTED 201e6e8: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 201e6ec: 22 80 00 02 be,a 201e6f4 <== NOT EXECUTED 201e6f0: a6 10 20 02 mov 2, %l3 <== NOT EXECUTED 201e6f4: 10 80 00 0c b 201e724 <== NOT EXECUTED 201e6f8: e6 22 00 00 st %l3, [ %o0 ] <== NOT EXECUTED /* FALLTHROUGH */ err: if(dir) (void) _closedir (dir); if (ptsize) 201e6fc: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED 201e700: 02 80 00 05 be 201e714 <== NOT EXECUTED 201e704: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED free (pt); 201e708: 7f ff 97 6a call 20044b0 <== NOT EXECUTED 201e70c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED free (up); 201e710: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 201e714: 7f ff 97 67 call 20044b0 <== NOT EXECUTED 201e718: b0 10 20 00 clr %i0 <== NOT EXECUTED return (char *) NULL; } 201e71c: 81 c7 e0 08 ret <== NOT EXECUTED 201e720: 81 e8 00 00 restore <== NOT EXECUTED errno = save_errno ? save_errno : ENOENT; /* FALLTHROUGH */ err: if(dir) (void) _closedir (dir); 201e724: 40 00 33 a5 call 202b5b8 <== NOT EXECUTED 201e728: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED if (ptsize) 201e72c: 10 bf ff f5 b 201e700 <== NOT EXECUTED 201e730: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED 0202b9d0 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 202b9d0: 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 ); 202b9d4: 03 00 81 17 sethi %hi(0x2045c00), %g1 202b9d8: c2 00 62 88 ld [ %g1 + 0x288 ], %g1 ! 2045e88 int getdents( int dd_fd, char *dd_buf, int dd_len ) { 202b9dc: 88 10 00 18 mov %i0, %g4 /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 202b9e0: 80 a6 00 01 cmp %i0, %g1 202b9e4: 1a 80 00 0a bcc 202ba0c 202b9e8: b0 10 20 00 clr %i0 202b9ec: 03 00 81 6b sethi %hi(0x205ac00), %g1 202b9f0: c6 00 63 6c ld [ %g1 + 0x36c ], %g3 ! 205af6c 202b9f4: 85 29 20 02 sll %g4, 2, %g2 202b9f8: 83 29 20 04 sll %g4, 4, %g1 202b9fc: 82 20 40 02 sub %g1, %g2, %g1 202ba00: 82 00 40 04 add %g1, %g4, %g1 202ba04: 83 28 60 02 sll %g1, 2, %g1 202ba08: b0 00 c0 01 add %g3, %g1, %i0 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 202ba0c: a0 07 bf e8 add %fp, -24, %l0 202ba10: 92 06 20 10 add %i0, 0x10, %o1 202ba14: 90 10 00 10 mov %l0, %o0 202ba18: 40 00 13 3b call 2030704 202ba1c: 94 10 20 10 mov 0x10, %o2 if ( !loc.ops->node_type_h ) 202ba20: c2 07 bf f0 ld [ %fp + -16 ], %g1 202ba24: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 202ba28: 80 a0 60 00 cmp %g1, 0 202ba2c: 02 80 00 11 be 202ba70 202ba30: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 202ba34: 9f c0 40 00 call %g1 202ba38: 90 10 00 10 mov %l0, %o0 202ba3c: 80 a2 20 01 cmp %o0, 1 202ba40: 22 80 00 08 be,a 202ba60 202ba44: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 rtems_set_errno_and_return_minus_one( ENOTDIR ); 202ba48: 40 00 09 42 call 202df50 <__errno> 202ba4c: 01 00 00 00 nop 202ba50: 82 10 20 14 mov 0x14, %g1 ! 14 202ba54: c2 22 00 00 st %g1, [ %o0 ] 202ba58: 10 80 00 0d b 202ba8c 202ba5c: 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 ) 202ba60: c2 00 60 08 ld [ %g1 + 8 ], %g1 202ba64: 80 a0 60 00 cmp %g1, 0 202ba68: 32 80 00 06 bne,a 202ba80 202ba6c: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 202ba70: 40 00 09 38 call 202df50 <__errno> <== NOT EXECUTED 202ba74: 01 00 00 00 nop <== NOT EXECUTED 202ba78: 10 bf ff f7 b 202ba54 <== NOT EXECUTED 202ba7c: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 202ba80: 92 10 00 19 mov %i1, %o1 202ba84: 9f c0 40 00 call %g1 202ba88: 94 10 00 1a mov %i2, %o2 } 202ba8c: 81 c7 e0 08 ret 202ba90: 91 e8 00 08 restore %g0, %o0, %o0 0201e754 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 201e754: 03 00 81 1a sethi %hi(0x2046800), %g1 <== NOT EXECUTED 201e758: c2 00 61 0c ld [ %g1 + 0x10c ], %g1 ! 204690c <== NOT EXECUTED return _POSIX_types_Gid; } 201e75c: 81 c3 e0 08 retl <== NOT EXECUTED 201e760: d0 10 60 2a lduh [ %g1 + 0x2a ], %o0 <== NOT EXECUTED 0201edd4 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 201edd4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED FILE *fp; int match; init_etc_passwd_group(); 201edd8: 7f ff ff b5 call 201ecac <== NOT EXECUTED 201eddc: 01 00 00 00 nop <== NOT EXECUTED if ((fp = fopen("/etc/group", "r")) == NULL) { 201ede0: 11 00 81 0b sethi %hi(0x2042c00), %o0 <== NOT EXECUTED 201ede4: 13 00 81 16 sethi %hi(0x2045800), %o1 <== NOT EXECUTED 201ede8: 90 12 23 20 or %o0, 0x320, %o0 <== NOT EXECUTED 201edec: 40 00 3e cb call 202e918 <== NOT EXECUTED 201edf0: 92 12 61 50 or %o1, 0x150, %o1 <== NOT EXECUTED 201edf4: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 201edf8: 12 80 00 08 bne 201ee18 <== NOT EXECUTED 201edfc: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED errno = EINVAL; 201ee00: 40 00 3c 54 call 202df50 <__errno> <== NOT EXECUTED 201ee04: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201ee08: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 201ee0c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 201ee10: 81 c7 e0 08 ret <== NOT EXECUTED 201ee14: 81 e8 00 00 restore <== NOT EXECUTED return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 201ee18: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 201ee1c: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED 201ee20: 7f ff fe e8 call 201e9c0 <== NOT EXECUTED 201ee24: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 201ee28: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201ee2c: 12 80 00 0a bne 201ee54 <== NOT EXECUTED 201ee30: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED errno = EINVAL; 201ee34: 40 00 3c 47 call 202df50 <__errno> <== NOT EXECUTED 201ee38: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201ee3c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 201ee40: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 201ee44: 40 00 3c 9b call 202e0b0 <== NOT EXECUTED 201ee48: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 201ee4c: 81 c7 e0 08 ret <== NOT EXECUTED 201ee50: 81 e8 00 00 restore <== NOT EXECUTED return -1; } if (name) { 201ee54: 22 80 00 07 be,a 201ee70 <== NOT EXECUTED 201ee58: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED match = (strcmp(grp->gr_name, name) == 0); 201ee5c: d0 06 80 00 ld [ %i2 ], %o0 <== NOT EXECUTED 201ee60: 40 00 50 c0 call 2033160 <== NOT EXECUTED 201ee64: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 201ee68: 10 80 00 04 b 201ee78 <== NOT EXECUTED 201ee6c: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED } else { match = (grp->gr_gid == gid); 201ee70: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 201ee74: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 201ee78: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } if (match) { 201ee7c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201ee80: 02 bf ff e6 be 201ee18 <== NOT EXECUTED 201ee84: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED fclose(fp); 201ee88: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 201ee8c: 40 00 3c 89 call 202e0b0 <== NOT EXECUTED 201ee90: b0 10 20 00 clr %i0 <== NOT EXECUTED *result = grp; 201ee94: f4 27 40 00 st %i2, [ %i5 ] <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 201ee98: 81 c7 e0 08 ret <== NOT EXECUTED 201ee9c: 81 e8 00 00 restore <== NOT EXECUTED 0201eb00 : return NULL; return p; } struct group *getgrent() { 201eb00: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (group_fp == NULL) 201eb04: 03 00 81 69 sethi %hi(0x205a400), %g1 <== NOT EXECUTED 201eb08: d0 00 62 8c ld [ %g1 + 0x28c ], %o0 ! 205a68c <== NOT EXECUTED 201eb0c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201eb10: 02 80 00 0b be 201eb3c <== NOT EXECUTED 201eb14: 15 00 81 69 sethi %hi(0x205a400), %o2 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 201eb18: 21 00 81 69 sethi %hi(0x205a400), %l0 <== NOT EXECUTED 201eb1c: 92 14 23 58 or %l0, 0x358, %o1 ! 205a758 <== NOT EXECUTED 201eb20: 94 12 a2 90 or %o2, 0x290, %o2 <== NOT EXECUTED 201eb24: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 201eb28: 7f ff ff a6 call 201e9c0 <== NOT EXECUTED 201eb2c: b0 14 23 58 or %l0, 0x358, %i0 <== NOT EXECUTED 201eb30: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201eb34: 12 80 00 03 bne 201eb40 <== NOT EXECUTED 201eb38: 01 00 00 00 nop <== NOT EXECUTED 201eb3c: b0 10 20 00 clr %i0 ! 0 <== NOT EXECUTED return NULL; return &grent; } 201eb40: 81 c7 e0 08 ret <== NOT EXECUTED 201eb44: 81 e8 00 00 restore <== NOT EXECUTED 0201eed8 : } struct group *getgrgid( gid_t gid ) { 201eed8: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 201eedc: 13 00 81 69 sethi %hi(0x205a400), %o1 <== NOT EXECUTED 201eee0: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 201eee4: 92 12 63 58 or %o1, 0x358, %o1 <== NOT EXECUTED 201eee8: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 201eeec: 15 00 81 69 sethi %hi(0x205a400), %o2 <== NOT EXECUTED 201eef0: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 201eef4: 94 12 a2 90 or %o2, 0x290, %o2 <== NOT EXECUTED 201eef8: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 201eefc: 7f ff ff e9 call 201eea0 <== NOT EXECUTED 201ef00: b0 10 20 00 clr %i0 <== NOT EXECUTED 201ef04: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201ef08: 22 80 00 02 be,a 201ef10 <== NOT EXECUTED 201ef0c: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 201ef10: 81 c7 e0 08 ret <== NOT EXECUTED 201ef14: 81 e8 00 00 restore <== NOT EXECUTED 0201eea0 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 201eea0: 82 10 00 09 mov %o1, %g1 <== NOT EXECUTED 201eea4: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 201eea8: 86 10 00 0b mov %o3, %g3 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 201eeac: 93 2a 20 10 sll %o0, 0x10, %o1 <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 201eeb0: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 201eeb4: 94 10 00 01 mov %g1, %o2 <== NOT EXECUTED 201eeb8: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 201eebc: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 201eec0: 98 10 00 03 mov %g3, %o4 <== NOT EXECUTED 201eec4: 90 10 20 00 clr %o0 <== NOT EXECUTED 201eec8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 201eecc: 7f ff ff c2 call 201edd4 <== NOT EXECUTED 201eed0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 201eed4: 01 00 00 00 nop 0201ef44 : } struct group *getgrnam( const char *name ) { 201ef44: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 201ef48: 13 00 81 69 sethi %hi(0x205a400), %o1 <== NOT EXECUTED 201ef4c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 201ef50: 92 12 63 58 or %o1, 0x358, %o1 <== NOT EXECUTED 201ef54: 15 00 81 69 sethi %hi(0x205a400), %o2 <== NOT EXECUTED 201ef58: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 201ef5c: 94 12 a2 90 or %o2, 0x290, %o2 <== NOT EXECUTED 201ef60: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 201ef64: 7f ff ff ed call 201ef18 <== NOT EXECUTED 201ef68: b0 10 20 00 clr %i0 <== NOT EXECUTED 201ef6c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201ef70: 22 80 00 02 be,a 201ef78 <== NOT EXECUTED 201ef74: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 201ef78: 81 c7 e0 08 ret <== NOT EXECUTED 201ef7c: 81 e8 00 00 restore <== NOT EXECUTED 0201ef18 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 201ef18: 82 10 00 0a mov %o2, %g1 <== NOT EXECUTED 201ef1c: 84 10 00 0b mov %o3, %g2 <== NOT EXECUTED 201ef20: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getgr_r(name, 0, grp, buffer, bufsize, result); 201ef24: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 201ef28: 96 10 00 01 mov %g1, %o3 <== NOT EXECUTED 201ef2c: 98 10 00 02 mov %g2, %o4 <== NOT EXECUTED 201ef30: 92 10 20 00 clr %o1 <== NOT EXECUTED 201ef34: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 201ef38: 7f ff ff a7 call 201edd4 <== NOT EXECUTED 201ef3c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 201ef40: 01 00 00 00 nop 0201efcc : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 201efcc: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED FILE *fp; int match; init_etc_passwd_group(); 201efd0: 7f ff ff 37 call 201ecac <== NOT EXECUTED 201efd4: 01 00 00 00 nop <== NOT EXECUTED if ((fp = fopen("/etc/passwd", "r")) == NULL) { 201efd8: 11 00 81 0b sethi %hi(0x2042c00), %o0 <== NOT EXECUTED 201efdc: 13 00 81 16 sethi %hi(0x2045800), %o1 <== NOT EXECUTED 201efe0: 90 12 22 a8 or %o0, 0x2a8, %o0 <== NOT EXECUTED 201efe4: 40 00 3e 4d call 202e918 <== NOT EXECUTED 201efe8: 92 12 61 50 or %o1, 0x150, %o1 <== NOT EXECUTED 201efec: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 201eff0: 12 80 00 08 bne 201f010 <== NOT EXECUTED 201eff4: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED errno = EINVAL; 201eff8: 40 00 3b d6 call 202df50 <__errno> <== NOT EXECUTED 201effc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201f000: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 201f004: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 201f008: 81 c7 e0 08 ret <== NOT EXECUTED 201f00c: 81 e8 00 00 restore <== NOT EXECUTED return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 201f010: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 201f014: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED 201f018: 7f ff fe cc call 201eb48 <== NOT EXECUTED 201f01c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 201f020: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201f024: 12 80 00 0a bne 201f04c <== NOT EXECUTED 201f028: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED errno = EINVAL; 201f02c: 40 00 3b c9 call 202df50 <__errno> <== NOT EXECUTED 201f030: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201f034: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 201f038: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 201f03c: 40 00 3c 1d call 202e0b0 <== NOT EXECUTED 201f040: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 201f044: 81 c7 e0 08 ret <== NOT EXECUTED 201f048: 81 e8 00 00 restore <== NOT EXECUTED return -1; } if (name) { 201f04c: 22 80 00 07 be,a 201f068 <== NOT EXECUTED 201f050: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED match = (strcmp(pwd->pw_name, name) == 0); 201f054: d0 06 80 00 ld [ %i2 ], %o0 <== NOT EXECUTED 201f058: 40 00 50 42 call 2033160 <== NOT EXECUTED 201f05c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 201f060: 10 80 00 04 b 201f070 <== NOT EXECUTED 201f064: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED } else { match = (pwd->pw_uid == uid); 201f068: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 201f06c: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 201f070: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } if (match) { 201f074: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201f078: 02 bf ff e6 be 201f010 <== NOT EXECUTED 201f07c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED fclose(fp); 201f080: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 201f084: 40 00 3c 0b call 202e0b0 <== NOT EXECUTED 201f088: b0 10 20 00 clr %i0 <== NOT EXECUTED *result = pwd; 201f08c: f4 27 40 00 st %i2, [ %i5 ] <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 201f090: 81 c7 e0 08 ret <== NOT EXECUTED 201f094: 81 e8 00 00 restore <== NOT EXECUTED 0201ec64 : return NULL; return p; } struct passwd *getpwent() { 201ec64: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (passwd_fp == NULL) 201ec68: 03 00 81 69 sethi %hi(0x205a400), %g1 <== NOT EXECUTED 201ec6c: d0 00 61 a4 ld [ %g1 + 0x1a4 ], %o0 ! 205a5a4 <== NOT EXECUTED 201ec70: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201ec74: 02 80 00 0b be 201eca0 <== NOT EXECUTED 201ec78: 15 00 81 69 sethi %hi(0x205a400), %o2 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 201ec7c: 21 00 81 69 sethi %hi(0x205a400), %l0 <== NOT EXECUTED 201ec80: 92 14 22 70 or %l0, 0x270, %o1 ! 205a670 <== NOT EXECUTED 201ec84: 94 12 a1 a8 or %o2, 0x1a8, %o2 <== NOT EXECUTED 201ec88: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 201ec8c: 7f ff ff af call 201eb48 <== NOT EXECUTED 201ec90: b0 14 22 70 or %l0, 0x270, %i0 <== NOT EXECUTED 201ec94: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201ec98: 12 80 00 03 bne 201eca4 <== NOT EXECUTED 201ec9c: 01 00 00 00 nop <== NOT EXECUTED 201eca0: b0 10 20 00 clr %i0 ! 0 <== NOT EXECUTED return NULL; return &pwent; } 201eca4: 81 c7 e0 08 ret <== NOT EXECUTED 201eca8: 81 e8 00 00 restore <== NOT EXECUTED 0201f13c : } struct passwd *getpwnam( const char *name ) { 201f13c: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 201f140: 13 00 81 69 sethi %hi(0x205a400), %o1 <== NOT EXECUTED 201f144: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 201f148: 92 12 62 70 or %o1, 0x270, %o1 <== NOT EXECUTED 201f14c: 15 00 81 69 sethi %hi(0x205a400), %o2 <== NOT EXECUTED 201f150: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 201f154: 94 12 a1 a8 or %o2, 0x1a8, %o2 <== NOT EXECUTED 201f158: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 201f15c: 7f ff ff ed call 201f110 <== NOT EXECUTED 201f160: b0 10 20 00 clr %i0 <== NOT EXECUTED 201f164: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201f168: 22 80 00 02 be,a 201f170 <== NOT EXECUTED 201f16c: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 201f170: 81 c7 e0 08 ret <== NOT EXECUTED 201f174: 81 e8 00 00 restore <== NOT EXECUTED 0201f110 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 201f110: 82 10 00 0a mov %o2, %g1 <== NOT EXECUTED 201f114: 84 10 00 0b mov %o3, %g2 <== NOT EXECUTED 201f118: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getpw_r(name, 0, pwd, buffer, bufsize, result); 201f11c: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 201f120: 96 10 00 01 mov %g1, %o3 <== NOT EXECUTED 201f124: 98 10 00 02 mov %g2, %o4 <== NOT EXECUTED 201f128: 92 10 20 00 clr %o1 <== NOT EXECUTED 201f12c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 201f130: 7f ff ff a7 call 201efcc <== NOT EXECUTED 201f134: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 201f138: 01 00 00 00 nop 0201f0d0 : } struct passwd *getpwuid( uid_t uid ) { 201f0d0: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 201f0d4: 13 00 81 69 sethi %hi(0x205a400), %o1 <== NOT EXECUTED 201f0d8: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 201f0dc: 92 12 62 70 or %o1, 0x270, %o1 <== NOT EXECUTED 201f0e0: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 201f0e4: 15 00 81 69 sethi %hi(0x205a400), %o2 <== NOT EXECUTED 201f0e8: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 201f0ec: 94 12 a1 a8 or %o2, 0x1a8, %o2 <== NOT EXECUTED 201f0f0: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 201f0f4: 7f ff ff e9 call 201f098 <== NOT EXECUTED 201f0f8: b0 10 20 00 clr %i0 <== NOT EXECUTED 201f0fc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201f100: 22 80 00 02 be,a 201f108 <== NOT EXECUTED 201f104: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 201f108: 81 c7 e0 08 ret <== NOT EXECUTED 201f10c: 81 e8 00 00 restore <== NOT EXECUTED 0201f098 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 201f098: 82 10 00 09 mov %o1, %g1 <== NOT EXECUTED 201f09c: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 201f0a0: 86 10 00 0b mov %o3, %g3 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 201f0a4: 93 2a 20 10 sll %o0, 0x10, %o1 <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 201f0a8: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 201f0ac: 94 10 00 01 mov %g1, %o2 <== NOT EXECUTED 201f0b0: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 201f0b4: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 201f0b8: 98 10 00 03 mov %g3, %o4 <== NOT EXECUTED 201f0bc: 90 10 20 00 clr %o0 <== NOT EXECUTED 201f0c0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 201f0c4: 7f ff ff c2 call 201efcc <== NOT EXECUTED 201f0c8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 201f0cc: 01 00 00 00 nop 0200a348 : int gettimeofday( struct timeval *tp, void * __tz ) { 200a348: 9d e3 bf 90 save %sp, -112, %sp /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 200a34c: 80 a6 20 00 cmp %i0, 0 200a350: 12 80 00 08 bne 200a370 200a354: 01 00 00 00 nop errno = EFAULT; 200a358: 40 00 0b 1d call 200cfcc <__errno> <== NOT EXECUTED 200a35c: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 200a360: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 200a364: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200a368: 81 c7 e0 08 ret <== NOT EXECUTED 200a36c: 81 e8 00 00 restore <== NOT EXECUTED ) { ISR_Level level; struct timespec now; _ISR_Disable(level); 200a370: 7f ff de 74 call 2001d40 200a374: 01 00 00 00 nop 200a378: a0 10 00 08 mov %o0, %l0 _TOD_Get( &now ); 200a37c: 7f ff f0 00 call 200637c <_TOD_Get> 200a380: 90 07 bf f0 add %fp, -16, %o0 _ISR_Enable(level); 200a384: 7f ff de 73 call 2001d50 200a388: 90 10 00 10 mov %l0, %o0 time->tv_sec = now.tv_sec; time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 200a38c: d0 07 bf f4 ld [ %fp + -12 ], %o0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); time->tv_sec = now.tv_sec; 200a390: c2 07 bf f0 ld [ %fp + -16 ], %g1 time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 200a394: 92 10 23 e8 mov 0x3e8, %o1 200a398: 40 00 25 d8 call 2013af8 <.udiv> 200a39c: c2 26 00 00 st %g1, [ %i0 ] 200a3a0: 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; } 200a3a4: 81 c7 e0 08 ret 200a3a8: 91 e8 20 00 restore %g0, 0, %o0 020045e4 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 20045e4: 03 00 81 1a sethi %hi(0x2046800), %g1 <== NOT EXECUTED 20045e8: c2 00 61 0c ld [ %g1 + 0x10c ], %g1 ! 204690c <== NOT EXECUTED return _POSIX_types_Uid; } 20045ec: 81 c3 e0 08 retl <== NOT EXECUTED 20045f0: d0 10 60 28 lduh [ %g1 + 0x28 ], %o0 <== NOT EXECUTED 0202b2a0 : */ int imfs_dir_rmnod( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 202b2a0: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 202b2a4: 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 ) ) 202b2a8: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 202b2ac: 82 04 20 50 add %l0, 0x50, %g1 202b2b0: 80 a0 80 01 cmp %g2, %g1 202b2b4: 22 80 00 06 be,a 202b2cc 202b2b8: c2 06 20 0c ld [ %i0 + 0xc ], %g1 rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 202b2bc: 40 00 0b 25 call 202df50 <__errno> 202b2c0: 01 00 00 00 nop 202b2c4: 10 80 00 0d b 202b2f8 202b2c8: 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 ) 202b2cc: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 202b2d0: 80 a0 40 10 cmp %g1, %l0 202b2d4: 02 80 00 06 be 202b2ec 202b2d8: 01 00 00 00 nop /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 202b2dc: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 202b2e0: 80 a0 60 00 cmp %g1, 0 202b2e4: 22 80 00 08 be,a 202b304 202b2e8: c2 04 20 08 ld [ %l0 + 8 ], %g1 rtems_set_errno_and_return_minus_one( EBUSY ); 202b2ec: 40 00 0b 19 call 202df50 <__errno> 202b2f0: 01 00 00 00 nop 202b2f4: 82 10 20 10 mov 0x10, %g1 ! 10 202b2f8: c2 22 00 00 st %g1, [ %o0 ] 202b2fc: 81 c7 e0 08 ret 202b300: 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 ) { 202b304: 80 a0 60 00 cmp %g1, 0 202b308: 22 80 00 06 be,a 202b320 202b30c: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 202b310: 7f ff da 36 call 2021be8 <_Chain_Extract> 202b314: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 202b318: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 202b31c: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 202b320: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 202b324: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 202b328: 90 07 bf f0 add %fp, -16, %o0 202b32c: 7f ff 64 8b call 2004558 202b330: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 202b334: 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) ) { 202b338: 90 10 00 10 mov %l0, %o0 202b33c: 7f ff 64 f9 call 2004720 202b340: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 202b344: 80 a2 20 00 cmp %o0, 0 202b348: 12 80 00 11 bne 202b38c 202b34c: 01 00 00 00 nop 202b350: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 202b354: 80 a0 60 00 cmp %g1, 0 202b358: 12 80 00 0d bne 202b38c 202b35c: 03 00 81 1a sethi %hi(0x2046800), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 202b360: c6 00 61 0c ld [ %g1 + 0x10c ], %g3 ! 204690c 202b364: c4 06 00 00 ld [ %i0 ], %g2 202b368: c2 00 e0 04 ld [ %g3 + 4 ], %g1 202b36c: 80 a0 40 02 cmp %g1, %g2 202b370: 22 80 00 02 be,a 202b378 202b374: c0 20 e0 04 clr [ %g3 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 202b378: 90 10 00 10 mov %l0, %o0 202b37c: 7f ff 64 4d call 20044b0 202b380: b0 10 20 00 clr %i0 202b384: 81 c7 e0 08 ret 202b388: 81 e8 00 00 restore } return 0; } 202b38c: 81 c7 e0 08 ret 202b390: 91 e8 20 00 restore %g0, 0, %o0 0201ecac : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 201ecac: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 201ecb0: 05 00 81 69 sethi %hi(0x205a400), %g2 <== NOT EXECUTED 201ecb4: c2 48 a1 a0 ldsb [ %g2 + 0x1a0 ], %g1 ! 205a5a0 <== NOT EXECUTED 201ecb8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201ecbc: 12 80 00 31 bne 201ed80 <== NOT EXECUTED 201ecc0: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED return; etc_passwd_initted = 1; mkdir("/etc", 0777); 201ecc4: 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; 201ecc8: c2 28 a1 a0 stb %g1, [ %g2 + 0x1a0 ] <== NOT EXECUTED mkdir("/etc", 0777); 201eccc: 11 00 81 0b sethi %hi(0x2042c00), %o0 <== NOT EXECUTED 201ecd0: 7f ff 97 f9 call 2004cb4 <== NOT EXECUTED 201ecd4: 90 12 22 a0 or %o0, 0x2a0, %o0 ! 2042ea0 <== NOT EXECUTED /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 201ecd8: 31 00 81 0b sethi %hi(0x2042c00), %i0 <== NOT EXECUTED 201ecdc: 13 00 81 16 sethi %hi(0x2045800), %o1 <== NOT EXECUTED 201ece0: 90 16 22 a8 or %i0, 0x2a8, %o0 <== NOT EXECUTED 201ece4: 40 00 3f 0d call 202e918 <== NOT EXECUTED 201ece8: 92 12 61 50 or %o1, 0x150, %o1 <== NOT EXECUTED 201ecec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201ecf0: 12 80 00 0d bne 201ed24 <== NOT EXECUTED 201ecf4: 01 00 00 00 nop <== NOT EXECUTED fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 201ecf8: 90 16 22 a8 or %i0, 0x2a8, %o0 <== NOT EXECUTED 201ecfc: 13 00 81 08 sethi %hi(0x2042000), %o1 <== NOT EXECUTED 201ed00: 40 00 3f 06 call 202e918 <== NOT EXECUTED 201ed04: 92 12 60 10 or %o1, 0x10, %o1 ! 2042010 <== NOT EXECUTED 201ed08: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 201ed0c: 02 80 00 08 be 201ed2c <== NOT EXECUTED 201ed10: 11 00 81 0b sethi %hi(0x2042c00), %o0 <== NOT EXECUTED fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 201ed14: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 201ed18: 40 00 3f 5a call 202ea80 <== NOT EXECUTED 201ed1c: 90 12 22 b8 or %o0, 0x2b8, %o0 <== NOT EXECUTED "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 201ed20: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 201ed24: 40 00 3c e3 call 202e0b0 <== NOT EXECUTED 201ed28: 01 00 00 00 nop <== NOT EXECUTED } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 201ed2c: 31 00 81 0b sethi %hi(0x2042c00), %i0 <== NOT EXECUTED 201ed30: 13 00 81 16 sethi %hi(0x2045800), %o1 <== NOT EXECUTED 201ed34: 90 16 23 20 or %i0, 0x320, %o0 <== NOT EXECUTED 201ed38: 40 00 3e f8 call 202e918 <== NOT EXECUTED 201ed3c: 92 12 61 50 or %o1, 0x150, %o1 <== NOT EXECUTED 201ed40: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201ed44: 22 80 00 04 be,a 201ed54 <== NOT EXECUTED 201ed48: 90 16 23 20 or %i0, 0x320, %o0 <== NOT EXECUTED fclose(fp); 201ed4c: 10 80 00 0b b 201ed78 <== NOT EXECUTED 201ed50: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } else if ((fp = fopen("/etc/group", "w")) != NULL) { 201ed54: 13 00 81 08 sethi %hi(0x2042000), %o1 <== NOT EXECUTED 201ed58: 40 00 3e f0 call 202e918 <== NOT EXECUTED 201ed5c: 92 12 60 10 or %o1, 0x10, %o1 ! 2042010 <== NOT EXECUTED 201ed60: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 201ed64: 02 80 00 07 be 201ed80 <== NOT EXECUTED 201ed68: 11 00 81 0b sethi %hi(0x2042c00), %o0 <== NOT EXECUTED fprintf( fp, "root:x:0:root\n" 201ed6c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 201ed70: 40 00 3f 44 call 202ea80 <== NOT EXECUTED 201ed74: 90 12 23 30 or %o0, 0x330, %o0 <== NOT EXECUTED "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 201ed78: 40 00 3c ce call 202e0b0 <== NOT EXECUTED 201ed7c: 81 e8 00 00 restore <== NOT EXECUTED 201ed80: 81 c7 e0 08 ret <== NOT EXECUTED 201ed84: 81 e8 00 00 restore <== NOT EXECUTED 02015060 : int ioctl( int fd, ioctl_command_t command, ... ) { 2015060: 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 ); 2015064: 03 00 80 92 sethi %hi(0x2024800), %g1 2015068: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 ! 2024818 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); 201506c: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 2015070: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 2015074: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 2015078: 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 ); 201507c: 80 a6 00 01 cmp %i0, %g1 2015080: 1a 80 00 14 bcc 20150d0 2015084: 92 10 00 19 mov %i1, %o1 iop = rtems_libio_iop( fd ); 2015088: 03 00 80 99 sethi %hi(0x2026400), %g1 201508c: c6 00 62 54 ld [ %g1 + 0x254 ], %g3 ! 2026654 2015090: 85 2e 20 02 sll %i0, 2, %g2 2015094: 83 2e 20 04 sll %i0, 4, %g1 2015098: 82 20 40 02 sub %g1, %g2, %g1 201509c: 82 00 40 18 add %g1, %i0, %g1 20150a0: 83 28 60 02 sll %g1, 2, %g1 20150a4: 90 00 c0 01 add %g3, %g1, %o0 rtems_libio_check_is_open(iop); 20150a8: c2 02 20 0c ld [ %o0 + 0xc ], %g1 20150ac: 80 88 61 00 btst 0x100, %g1 20150b0: 02 80 00 08 be 20150d0 20150b4: 01 00 00 00 nop /* * Now process the ioctl(). */ if ( !iop->handlers ) 20150b8: 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 *); 20150bc: 82 07 a0 50 add %fp, 0x50, %g1 20150c0: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * Now process the ioctl(). */ if ( !iop->handlers ) 20150c4: 80 a0 a0 00 cmp %g2, 0 20150c8: 12 80 00 06 bne 20150e0 20150cc: d4 07 a0 4c ld [ %fp + 0x4c ], %o2 rtems_set_errno_and_return_minus_one( EBADF ); 20150d0: 40 00 03 08 call 2015cf0 <__errno> <== NOT EXECUTED 20150d4: 01 00 00 00 nop <== NOT EXECUTED 20150d8: 10 80 00 09 b 20150fc <== NOT EXECUTED 20150dc: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED if ( !iop->handlers->ioctl_h ) 20150e0: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 20150e4: 80 a0 60 00 cmp %g1, 0 20150e8: 12 80 00 08 bne 2015108 20150ec: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 20150f0: 40 00 03 00 call 2015cf0 <__errno> <== NOT EXECUTED 20150f4: 01 00 00 00 nop <== NOT EXECUTED 20150f8: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 20150fc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2015100: 10 80 00 04 b 2015110 <== NOT EXECUTED 2015104: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 2015108: 9f c0 40 00 call %g1 201510c: 01 00 00 00 nop return rc; } 2015110: 81 c7 e0 08 ret 2015114: 91 e8 00 08 restore %g0, %o0, %o0 02003894 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 2003894: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 2003898: c4 06 60 30 ld [ %i1 + 0x30 ], %g2 <== NOT EXECUTED 200389c: 80 88 a0 20 btst 0x20, %g2 <== NOT EXECUTED 20038a0: 02 80 00 03 be 20038ac <== NOT EXECUTED 20038a4: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED c &= 0x7f; 20038a8: a0 0e 20 7f and %i0, 0x7f, %l0 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 20038ac: 80 88 a2 00 btst 0x200, %g2 <== NOT EXECUTED 20038b0: 02 80 00 0b be 20038dc <== NOT EXECUTED 20038b4: 82 0c 20 ff and %l0, 0xff, %g1 <== NOT EXECUTED c = tolower (c); 20038b8: 03 00 80 5b sethi %hi(0x2016c00), %g1 <== NOT EXECUTED 20038bc: c2 00 61 c8 ld [ %g1 + 0x1c8 ], %g1 ! 2016dc8 <__ctype_ptr> <== NOT EXECUTED 20038c0: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 20038c4: c2 08 40 08 ldub [ %g1 + %o0 ], %g1 <== NOT EXECUTED 20038c8: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 20038cc: 32 80 00 02 bne,a 20038d4 <== NOT EXECUTED 20038d0: 90 02 20 20 add %o0, 0x20, %o0 <== NOT EXECUTED 20038d4: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED if (c == '\r') { 20038d8: 82 0c 20 ff and %l0, 0xff, %g1 <== NOT EXECUTED 20038dc: 80 a0 60 0d cmp %g1, 0xd <== NOT EXECUTED 20038e0: 12 80 00 09 bne 2003904 <== NOT EXECUTED 20038e4: 80 a0 60 0a cmp %g1, 0xa <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) 20038e8: 80 88 a0 80 btst 0x80, %g2 <== NOT EXECUTED 20038ec: 12 80 00 5d bne 2003a60 <== NOT EXECUTED 20038f0: 80 88 a1 00 btst 0x100, %g2 <== NOT EXECUTED return 0; if (tty->termios.c_iflag & ICRNL) 20038f4: 32 80 00 0d bne,a 2003928 <== NOT EXECUTED 20038f8: 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)) { 20038fc: 10 80 00 0c b 200392c <== NOT EXECUTED 2003900: 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)) { 2003904: 12 80 00 07 bne 2003920 <== NOT EXECUTED 2003908: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200390c: 80 88 a0 40 btst 0x40, %g2 <== NOT EXECUTED 2003910: 32 80 00 06 bne,a 2003928 <== NOT EXECUTED 2003914: a0 10 20 0d mov 0xd, %l0 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 2003918: 10 80 00 05 b 200392c <== NOT EXECUTED 200391c: c6 06 60 3c ld [ %i1 + 0x3c ], %g3 <== NOT EXECUTED 2003920: 02 80 00 3c be 2003a10 <== NOT EXECUTED 2003924: 03 00 80 5b sethi %hi(0x2016c00), %g1 <== NOT EXECUTED 2003928: c6 06 60 3c ld [ %i1 + 0x3c ], %g3 <== NOT EXECUTED 200392c: 80 88 e0 02 btst 2, %g3 <== NOT EXECUTED 2003930: 02 80 00 38 be 2003a10 <== NOT EXECUTED 2003934: 03 00 80 5b sethi %hi(0x2016c00), %g1 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 2003938: c2 0e 60 43 ldub [ %i1 + 0x43 ], %g1 <== NOT EXECUTED 200393c: 84 0c 20 ff and %l0, 0xff, %g2 <== NOT EXECUTED erase (tty, 0); 2003940: 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]) { 2003944: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2003948: 02 80 00 08 be 2003968 <== NOT EXECUTED 200394c: 92 10 20 00 clr %o1 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 2003950: c2 0e 60 44 ldub [ %i1 + 0x44 ], %g1 <== NOT EXECUTED 2003954: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2003958: 32 80 00 07 bne,a 2003974 <== NOT EXECUTED 200395c: c2 0e 60 45 ldub [ %i1 + 0x45 ], %g1 <== NOT EXECUTED erase (tty, 1); 2003960: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2003964: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 2003968: 7f ff ff 42 call 2003670 <== NOT EXECUTED 200396c: b0 10 20 00 clr %i0 <== NOT EXECUTED 2003970: 30 80 00 3d b,a 2003a64 <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VEOF]) { 2003974: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2003978: 02 80 00 3b be 2003a64 <== NOT EXECUTED 200397c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return 1; } else if (c == '\n') { 2003980: 80 a0 a0 0a cmp %g2, 0xa <== NOT EXECUTED 2003984: 32 80 00 0f bne,a 20039c0 <== NOT EXECUTED 2003988: c2 0e 60 4c ldub [ %i1 + 0x4c ], %g1 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) 200398c: 80 88 e0 48 btst 0x48, %g3 <== NOT EXECUTED 2003990: 22 80 00 06 be,a 20039a8 <== NOT EXECUTED 2003994: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 2003998: 90 10 20 0a mov 0xa, %o0 <== NOT EXECUTED 200399c: 7f ff ff 12 call 20035e4 <== NOT EXECUTED 20039a0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 20039a4: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 20039a8: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED 20039ac: 84 10 20 0a mov 0xa, %g2 <== NOT EXECUTED 20039b0: c4 28 c0 01 stb %g2, [ %g3 + %g1 ] <== NOT EXECUTED 20039b4: 82 00 60 01 inc %g1 <== NOT EXECUTED 20039b8: 10 80 00 14 b 2003a08 <== NOT EXECUTED 20039bc: c2 26 60 20 st %g1, [ %i1 + 0x20 ] <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) 20039c0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 20039c4: 02 80 00 07 be 20039e0 <== NOT EXECUTED 20039c8: 80 88 e0 08 btst 8, %g3 <== NOT EXECUTED 20039cc: c2 0e 60 51 ldub [ %i1 + 0x51 ], %g1 <== NOT EXECUTED 20039d0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 20039d4: 12 80 00 0f bne 2003a10 <== NOT EXECUTED 20039d8: 03 00 80 5b sethi %hi(0x2016c00), %g1 <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 20039dc: 80 88 e0 08 btst 8, %g3 <== NOT EXECUTED 20039e0: 22 80 00 06 be,a 20039f8 <== NOT EXECUTED 20039e4: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 20039e8: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 20039ec: 7f ff fe fe call 20035e4 <== NOT EXECUTED 20039f0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 20039f4: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 20039f8: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED 20039fc: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED 2003a00: e0 28 80 01 stb %l0, [ %g2 + %g1 ] <== NOT EXECUTED 2003a04: c6 26 60 20 st %g3, [ %i1 + 0x20 ] <== NOT EXECUTED 2003a08: 81 c7 e0 08 ret <== NOT EXECUTED 2003a0c: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 2003a10: c4 06 60 20 ld [ %i1 + 0x20 ], %g2 <== NOT EXECUTED 2003a14: c2 00 61 24 ld [ %g1 + 0x124 ], %g1 <== NOT EXECUTED 2003a18: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2003a1c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2003a20: 16 80 00 11 bge 2003a64 <== NOT EXECUTED 2003a24: b0 10 20 00 clr %i0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 2003a28: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 2003a2c: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 2003a30: 22 80 00 06 be,a 2003a48 <== NOT EXECUTED 2003a34: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 2003a38: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 2003a3c: 7f ff fe ea call 20035e4 <== NOT EXECUTED 2003a40: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2003a44: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 2003a48: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED 2003a4c: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED 2003a50: e0 28 80 01 stb %l0, [ %g2 + %g1 ] <== NOT EXECUTED 2003a54: c6 26 60 20 st %g3, [ %i1 + 0x20 ] <== NOT EXECUTED 2003a58: 81 c7 e0 08 ret <== NOT EXECUTED 2003a5c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 2003a60: b0 10 20 00 clr %i0 <== NOT EXECUTED } return 0; } 2003a64: 81 c7 e0 08 ret <== NOT EXECUTED 2003a68: 81 e8 00 00 restore <== NOT EXECUTED 0201fe94 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 201fe94: 9d e3 bf 88 save %sp, -120, %sp /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 201fe98: 7f ff ff 19 call 201fafc 201fe9c: 01 00 00 00 nop 201fea0: 80 a6 00 08 cmp %i0, %o0 201fea4: 02 80 00 06 be 201febc 201fea8: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); 201feac: 7f ff d7 91 call 2015cf0 <__errno> 201feb0: 01 00 00 00 nop 201feb4: 10 80 00 07 b 201fed0 201feb8: 82 10 20 03 mov 3, %g1 ! 3 /* * Validate the signal passed. */ if ( !sig ) 201febc: 12 80 00 08 bne 201fedc 201fec0: 86 06 7f ff add %i1, -1, %g3 rtems_set_errno_and_return_minus_one( EINVAL ); 201fec4: 7f ff d7 8b call 2015cf0 <__errno> 201fec8: 01 00 00 00 nop 201fecc: 82 10 20 16 mov 0x16, %g1 ! 16 201fed0: c2 22 00 00 st %g1, [ %o0 ] 201fed4: 10 80 00 ae b 202018c 201fed8: 90 10 3f ff mov -1, %o0 if ( !is_valid_signo(sig) ) 201fedc: 80 a0 e0 1f cmp %g3, 0x1f 201fee0: 18 bf ff f9 bgu 201fec4 201fee4: 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 ) { 201fee8: 83 2e 60 02 sll %i1, 2, %g1 201feec: 85 2e 60 04 sll %i1, 4, %g2 201fef0: 84 20 80 01 sub %g2, %g1, %g2 201fef4: 03 00 80 9b sethi %hi(0x2026c00), %g1 201fef8: 82 10 62 7c or %g1, 0x27c, %g1 ! 2026e7c <_POSIX_signals_Vectors> 201fefc: 82 00 40 02 add %g1, %g2, %g1 201ff00: c2 00 60 08 ld [ %g1 + 8 ], %g1 201ff04: 80 a0 60 01 cmp %g1, 1 201ff08: 02 80 00 a1 be 202018c 201ff0c: 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 ) ) 201ff10: 80 a6 60 08 cmp %i1, 8 201ff14: 02 80 00 06 be 201ff2c 201ff18: 80 a6 60 04 cmp %i1, 4 201ff1c: 02 80 00 04 be 201ff2c 201ff20: 80 a6 60 0b cmp %i1, 0xb 201ff24: 12 80 00 08 bne 201ff44 201ff28: 82 10 20 01 mov 1, %g1 return pthread_kill( pthread_self(), sig ); 201ff2c: 40 00 01 34 call 20203fc 201ff30: 01 00 00 00 nop 201ff34: 40 00 00 f6 call 202030c 201ff38: 92 10 00 19 mov %i1, %o1 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } _Thread_Enable_dispatch(); return 0; } 201ff3c: 81 c7 e0 08 ret 201ff40: 91 e8 00 08 restore %g0, %o0, %o0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 201ff44: f2 27 bf ec st %i1, [ %fp + -20 ] siginfo->si_code = SI_USER; 201ff48: c2 27 bf f0 st %g1, [ %fp + -16 ] if ( !value ) { 201ff4c: 80 a6 a0 00 cmp %i2, 0 201ff50: 12 80 00 04 bne 201ff60 201ff54: b1 28 40 03 sll %g1, %g3, %i0 siginfo->si_value.sival_int = 0; 201ff58: 10 80 00 04 b 201ff68 201ff5c: c0 27 bf f4 clr [ %fp + -12 ] } else { siginfo->si_value = *value; 201ff60: c2 06 80 00 ld [ %i2 ], %g1 201ff64: c2 27 bf f4 st %g1, [ %fp + -12 ] 201ff68: 05 00 80 9a sethi %hi(0x2026800), %g2 201ff6c: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1 ! 2026840 <_Thread_Dispatch_disable_level> 201ff70: 82 00 60 01 inc %g1 201ff74: c2 20 a0 40 st %g1, [ %g2 + 0x40 ] /* * 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; 201ff78: 03 00 80 9a sethi %hi(0x2026800), %g1 201ff7c: c6 00 61 04 ld [ %g1 + 0x104 ], %g3 ! 2026904 <_Thread_Executing> api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 201ff80: c2 00 e1 6c ld [ %g3 + 0x16c ], %g1 201ff84: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 201ff88: 80 ae 00 01 andncc %i0, %g1, %g0 201ff8c: 12 80 00 58 bne 20200ec 201ff90: 03 00 80 9c sethi %hi(0x2027000), %g1 goto process_it; 201ff94: 88 10 60 08 or %g1, 8, %g4 ! 2027008 <_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 ; 201ff98: 96 01 20 30 add %g4, 0x30, %o3 index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; 201ff9c: 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; 201ffa0: 10 80 00 0b b 201ffcc 201ffa4: 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 ]; 201ffa8: da 00 a1 6c ld [ %g2 + 0x16c ], %o5 if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 201ffac: 80 8e 00 01 btst %i0, %g1 201ffb0: 12 80 00 4f bne 20200ec 201ffb4: 86 10 00 02 mov %g2, %g3 201ffb8: c2 03 60 c4 ld [ %o5 + 0xc4 ], %g1 <== NOT EXECUTED 201ffbc: 80 ae 00 01 andncc %i0, %g1, %g0 <== NOT EXECUTED 201ffc0: 12 80 00 4c bne 20200f0 <== NOT EXECUTED 201ffc4: 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 ) { 201ffc8: 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 ) ; 201ffcc: 80 a0 80 0c cmp %g2, %o4 201ffd0: 32 bf ff f6 bne,a 201ffa8 201ffd4: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 201ffd8: 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 ; 201ffdc: 80 a1 00 0b cmp %g4, %o3 201ffe0: 12 bf ff ef bne 201ff9c 201ffe4: 03 00 80 92 sethi %hi(0x2024800), %g1 * * + rtems internal threads do not receive signals. */ interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 201ffe8: c2 08 60 c4 ldub [ %g1 + 0xc4 ], %g1 ! 20248c4 201ffec: 90 10 20 00 clr %o0 201fff0: 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 ) 201fff4: 1f 04 00 00 sethi %hi(0x10000000), %o7 * * + rtems internal threads do not receive signals. */ interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 201fff8: 03 00 80 99 sethi %hi(0x2026400), %g1 201fffc: 98 10 63 a8 or %g1, 0x3a8, %o4 ! 20267a8 <_Objects_Information_table+0x8> for ( the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; 2020000: 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 ] ) 2020004: c2 03 00 00 ld [ %o4 ], %g1 2020008: 80 a0 60 00 cmp %g1, 0 202000c: 22 80 00 32 be,a 20200d4 2020010: 98 03 20 04 add %o4, 4, %o4 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 2020014: 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 ) 2020018: 80 a0 60 00 cmp %g1, 0 202001c: 22 80 00 2e be,a 20200d4 2020020: 98 03 20 04 add %o4, 4, %o4 <== NOT EXECUTED continue; maximum = the_info->maximum; object_table = the_info->local_table; 2020024: 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; 2020028: d4 10 60 10 lduh [ %g1 + 0x10 ], %o2 object_table = the_info->local_table; 202002c: 10 80 00 26 b 20200c4 2020030: 9a 10 20 01 mov 1, %o5 for ( index = 1 ; index <= maximum ; index++ ) { the_thread = (Thread_Control *) object_table[ index ]; 2020034: c4 02 40 01 ld [ %o1 + %g1 ], %g2 if ( !the_thread ) 2020038: 80 a0 a0 00 cmp %g2, 0 202003c: 02 80 00 20 be 20200bc 2020040: 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 ) 2020044: c8 00 a0 14 ld [ %g2 + 0x14 ], %g4 2020048: 80 a1 00 0b cmp %g4, %o3 202004c: 38 80 00 1c bgu,a 20200bc 2020050: 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 ]; 2020054: c2 00 a1 6c ld [ %g2 + 0x16c ], %g1 if ( !api || !_POSIX_signals_Is_interested( api, mask ) ) 2020058: 80 a0 60 00 cmp %g1, 0 202005c: 22 80 00 18 be,a 20200bc 2020060: 88 10 00 0b mov %o3, %g4 <== NOT EXECUTED 2020064: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 2020068: 80 ae 00 01 andncc %i0, %g1, %g0 202006c: 22 80 00 14 be,a 20200bc 2020070: 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 ) { 2020074: 80 a1 00 0b cmp %g4, %o3 2020078: 2a 80 00 11 bcs,a 20200bc 202007c: 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 ) ) 2020080: c6 02 20 10 ld [ %o0 + 0x10 ], %g3 <== NOT EXECUTED 2020084: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 2020088: 22 80 00 0d be,a 20200bc <== NOT EXECUTED 202008c: 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 ) ) { 2020090: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED 2020094: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2020098: 22 80 00 09 be,a 20200bc <== NOT EXECUTED 202009c: 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 ) 20200a0: 80 88 c0 0f btst %g3, %o7 <== NOT EXECUTED 20200a4: 32 80 00 06 bne,a 20200bc <== NOT EXECUTED 20200a8: 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 ) { 20200ac: 80 88 40 0f btst %g1, %o7 <== NOT EXECUTED 20200b0: 32 80 00 03 bne,a 20200bc <== NOT EXECUTED 20200b4: 90 10 00 02 mov %g2, %o0 <== NOT EXECUTED 20200b8: 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++ ) { 20200bc: 9a 03 60 01 inc %o5 20200c0: 96 10 00 04 mov %g4, %o3 20200c4: 80 a3 40 0a cmp %o5, %o2 20200c8: 08 bf ff db bleu 2020034 20200cc: 83 2b 60 02 sll %o5, 2, %g1 20200d0: 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; 20200d4: 80 a3 00 1a cmp %o4, %i2 20200d8: 32 bf ff cc bne,a 2020008 20200dc: c2 03 00 00 ld [ %o4 ], %g1 interested_priority = the_thread->current_priority; } } } if ( interested_thread ) { 20200e0: 80 a2 20 00 cmp %o0, 0 20200e4: 02 80 00 0b be 2020110 20200e8: 86 10 00 08 mov %o0, %g3 * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 20200ec: 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 ) ) { 20200f0: 90 10 00 03 mov %g3, %o0 * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 20200f4: 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 ) ) { 20200f8: 92 10 00 19 mov %i1, %o1 20200fc: 40 00 00 38 call 20201dc <_POSIX_signals_Unblock_thread> 2020100: 94 07 bf ec add %fp, -20, %o2 2020104: 80 8a 20 ff btst 0xff, %o0 2020108: 12 80 00 1e bne 2020180 202010c: 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 ); 2020110: 40 00 00 22 call 2020198 <_POSIX_signals_Set_process_signals> 2020114: 90 10 00 18 mov %i0, %o0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 2020118: 83 2e 60 02 sll %i1, 2, %g1 202011c: 85 2e 60 04 sll %i1, 4, %g2 2020120: b2 20 80 01 sub %g2, %g1, %i1 2020124: 03 00 80 9b sethi %hi(0x2026c00), %g1 2020128: 82 10 62 7c or %g1, 0x27c, %g1 ! 2026e7c <_POSIX_signals_Vectors> 202012c: c2 00 40 19 ld [ %g1 + %i1 ], %g1 2020130: 80 a0 60 02 cmp %g1, 2 2020134: 12 80 00 13 bne 2020180 2020138: 11 00 80 9b sethi %hi(0x2026c00), %o0 psiginfo = (POSIX_signals_Siginfo_node *) 202013c: 7f ff aa 92 call 200ab84 <_Chain_Get> 2020140: 90 12 23 fc or %o0, 0x3fc, %o0 ! 2026ffc <_POSIX_signals_Inactive_siginfo> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 2020144: b4 92 20 00 orcc %o0, 0, %i2 2020148: 12 80 00 06 bne 2020160 202014c: 92 07 bf ec add %fp, -20, %o1 rtems_set_errno_and_return_minus_one( EAGAIN ); 2020150: 7f ff d6 e8 call 2015cf0 <__errno> <== NOT EXECUTED 2020154: 01 00 00 00 nop <== NOT EXECUTED 2020158: 10 bf ff 5e b 201fed0 <== NOT EXECUTED 202015c: 82 10 20 0b mov 0xb, %g1 ! b <== NOT EXECUTED } psiginfo->Info = *siginfo; 2020160: 90 06 a0 08 add %i2, 8, %o0 2020164: 7f ff dd 15 call 20175b8 2020168: 94 10 20 0c mov 0xc, %o2 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 202016c: 11 00 80 9c sethi %hi(0x2027000), %o0 2020170: 92 10 00 1a mov %i2, %o1 2020174: 90 12 20 4c or %o0, 0x4c, %o0 2020178: 7f ff aa 77 call 200ab54 <_Chain_Append> 202017c: 90 02 00 19 add %o0, %i1, %o0 } _Thread_Enable_dispatch(); 2020180: 7f ff b0 74 call 200c350 <_Thread_Enable_dispatch> 2020184: 01 00 00 00 nop 2020188: 90 10 20 00 clr %o0 ! 0 return 0; } 202018c: b0 10 00 08 mov %o0, %i0 2020190: 81 c7 e0 08 ret 2020194: 81 e8 00 00 restore 02014a58 : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 2014a58: 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())) 2014a5c: 03 00 80 5e sethi %hi(0x2017800), %g1 2014a60: c2 00 60 94 ld [ %g1 + 0x94 ], %g1 ! 2017894 <_System_state_Current> 2014a64: 80 a0 60 03 cmp %g1, 3 2014a68: 12 80 00 16 bne 2014ac0 2014a6c: 31 00 80 5b sethi %hi(0x2016c00), %i0 /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != &libc_global_reent) { 2014a70: c4 06 21 d0 ld [ %i0 + 0x1d0 ], %g2 ! 2016dd0 <_impure_ptr> 2014a74: 03 00 80 5a sethi %hi(0x2016800), %g1 2014a78: a0 10 61 20 or %g1, 0x120, %l0 ! 2016920 2014a7c: 80 a0 80 10 cmp %g2, %l0 2014a80: 22 80 00 06 be,a 2014a98 2014a84: 21 00 80 5b sethi %hi(0x2016c00), %l0 _wrapup_reent(&libc_global_reent); 2014a88: 40 00 01 c9 call 20151ac <_wrapup_reent> 2014a8c: 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; 2014a90: e0 26 21 d0 st %l0, [ %i0 + 0x1d0 ] * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 2014a94: 21 00 80 5b sethi %hi(0x2016c00), %l0 2014a98: c2 04 21 d0 ld [ %l0 + 0x1d0 ], %g1 ! 2016dd0 <_impure_ptr> 2014a9c: 7f ff e1 a4 call 200d12c 2014aa0: d0 00 60 04 ld [ %g1 + 4 ], %o0 fclose (stdout); 2014aa4: c2 04 21 d0 ld [ %l0 + 0x1d0 ], %g1 2014aa8: 7f ff e1 a1 call 200d12c 2014aac: d0 00 60 08 ld [ %g1 + 8 ], %o0 fclose (stderr); 2014ab0: c2 04 21 d0 ld [ %l0 + 0x1d0 ], %g1 2014ab4: f0 00 60 0c ld [ %g1 + 0xc ], %i0 2014ab8: 7f ff e1 9d call 200d12c 2014abc: 81 e8 00 00 restore 2014ac0: 81 c7 e0 08 ret <== NOT EXECUTED 2014ac4: 81 e8 00 00 restore <== NOT EXECUTED 0201f270 : int link( const char *existing, const char *new ) { 201f270: 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 ); 201f274: 92 10 20 00 clr %o1 201f278: 90 10 00 18 mov %i0, %o0 201f27c: 94 07 bf e4 add %fp, -28, %o2 201f280: 96 10 20 01 mov 1, %o3 201f284: 7f ff 94 39 call 2004368 201f288: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 201f28c: 80 a2 20 00 cmp %o0, 0 201f290: 12 80 00 8e bne 201f4c8 201f294: 01 00 00 00 nop /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 201f298: c2 4e 40 00 ldsb [ %i1 ], %g1 201f29c: 80 a0 60 2f cmp %g1, 0x2f 201f2a0: 02 80 00 06 be 201f2b8 201f2a4: 80 a0 60 5c cmp %g1, 0x5c 201f2a8: 02 80 00 04 be 201f2b8 201f2ac: 80 a0 60 00 cmp %g1, 0 201f2b0: 12 80 00 0a bne 201f2d8 201f2b4: 03 00 81 1a sethi %hi(0x2046800), %g1 201f2b8: 03 00 81 1a sethi %hi(0x2046800), %g1 201f2bc: d2 00 61 0c ld [ %g1 + 0x10c ], %o1 ! 204690c 201f2c0: 90 07 bf d4 add %fp, -44, %o0 201f2c4: 92 02 60 14 add %o1, 0x14, %o1 201f2c8: 40 00 45 0f call 2030704 201f2cc: 94 10 20 10 mov 0x10, %o2 201f2d0: 10 80 00 08 b 201f2f0 201f2d4: 84 10 20 01 mov 1, %g2 201f2d8: d2 00 61 0c ld [ %g1 + 0x10c ], %o1 201f2dc: 90 07 bf d4 add %fp, -44, %o0 201f2e0: 92 02 60 04 add %o1, 4, %o1 201f2e4: 40 00 45 08 call 2030704 201f2e8: 94 10 20 10 mov 0x10, %o2 201f2ec: 84 10 20 00 clr %g2 if ( !parent_loc.ops->evalformake_h ) { 201f2f0: c2 07 bf dc ld [ %fp + -36 ], %g1 201f2f4: c2 00 60 04 ld [ %g1 + 4 ], %g1 201f2f8: 80 a0 60 00 cmp %g1, 0 201f2fc: 12 80 00 0b bne 201f328 201f300: 90 06 40 02 add %i1, %g2, %o0 rtems_filesystem_freenode( &existing_loc ); 201f304: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 201f308: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201f30c: 02 80 00 51 be 201f450 <== NOT EXECUTED 201f310: 01 00 00 00 nop <== NOT EXECUTED 201f314: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 201f318: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201f31c: 12 80 00 4b bne 201f448 <== NOT EXECUTED 201f320: 90 07 bf e4 add %fp, -28, %o0 <== NOT EXECUTED 201f324: 30 80 00 4b b,a 201f450 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 201f328: b0 07 bf d4 add %fp, -44, %i0 201f32c: 94 07 bf f4 add %fp, -12, %o2 201f330: 9f c0 40 00 call %g1 201f334: 92 10 00 18 mov %i0, %o1 if ( result != 0 ) { 201f338: b2 92 20 00 orcc %o0, 0, %i1 201f33c: 02 80 00 11 be 201f380 201f340: c4 07 bf f0 ld [ %fp + -16 ], %g2 rtems_filesystem_freenode( &existing_loc ); 201f344: c2 07 bf ec ld [ %fp + -20 ], %g1 201f348: 80 a0 60 00 cmp %g1, 0 201f34c: 02 80 00 08 be 201f36c 201f350: 01 00 00 00 nop 201f354: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 201f358: 80 a0 60 00 cmp %g1, 0 201f35c: 02 80 00 04 be 201f36c 201f360: 01 00 00 00 nop 201f364: 9f c0 40 00 call %g1 201f368: 90 07 bf e4 add %fp, -28, %o0 rtems_set_errno_and_return_minus_one( result ); 201f36c: 40 00 3a f9 call 202df50 <__errno> 201f370: b0 10 3f ff mov -1, %i0 201f374: f2 22 00 00 st %i1, [ %o0 ] 201f378: 81 c7 e0 08 ret 201f37c: 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 ) { 201f380: c2 07 bf e0 ld [ %fp + -32 ], %g1 201f384: 80 a0 40 02 cmp %g1, %g2 201f388: 02 80 00 1a be 201f3f0 201f38c: c2 07 bf dc ld [ %fp + -36 ], %g1 rtems_filesystem_freenode( &existing_loc ); 201f390: c2 07 bf ec ld [ %fp + -20 ], %g1 201f394: 80 a0 60 00 cmp %g1, 0 201f398: 22 80 00 09 be,a 201f3bc 201f39c: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 201f3a0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 201f3a4: 80 a0 60 00 cmp %g1, 0 201f3a8: 22 80 00 05 be,a 201f3bc 201f3ac: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 201f3b0: 9f c0 40 00 call %g1 201f3b4: 90 07 bf e4 add %fp, -28, %o0 rtems_filesystem_freenode( &parent_loc ); 201f3b8: c2 07 bf dc ld [ %fp + -36 ], %g1 201f3bc: 80 a0 60 00 cmp %g1, 0 201f3c0: 02 80 00 08 be 201f3e0 201f3c4: 01 00 00 00 nop 201f3c8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 201f3cc: 80 a0 60 00 cmp %g1, 0 201f3d0: 02 80 00 04 be 201f3e0 201f3d4: 01 00 00 00 nop 201f3d8: 9f c0 40 00 call %g1 201f3dc: 90 07 bf d4 add %fp, -44, %o0 rtems_set_errno_and_return_minus_one( EXDEV ); 201f3e0: 40 00 3a dc call 202df50 <__errno> 201f3e4: b0 10 3f ff mov -1, %i0 201f3e8: 10 80 00 1d b 201f45c 201f3ec: 82 10 20 12 mov 0x12, %g1 } if ( !parent_loc.ops->link_h ) { 201f3f0: c2 00 60 08 ld [ %g1 + 8 ], %g1 201f3f4: 80 a0 60 00 cmp %g1, 0 201f3f8: 12 80 00 1c bne 201f468 201f3fc: d4 07 bf f4 ld [ %fp + -12 ], %o2 rtems_filesystem_freenode( &existing_loc ); 201f400: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 201f404: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201f408: 22 80 00 09 be,a 201f42c <== NOT EXECUTED 201f40c: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 201f410: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 201f414: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201f418: 22 80 00 05 be,a 201f42c <== NOT EXECUTED 201f41c: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 201f420: 9f c0 40 00 call %g1 <== NOT EXECUTED 201f424: 90 07 bf e4 add %fp, -28, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 201f428: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 201f42c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201f430: 02 80 00 08 be 201f450 <== NOT EXECUTED 201f434: 01 00 00 00 nop <== NOT EXECUTED 201f438: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 201f43c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201f440: 02 80 00 04 be 201f450 <== NOT EXECUTED 201f444: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED 201f448: 9f c0 40 00 call %g1 <== NOT EXECUTED 201f44c: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 201f450: 40 00 3a c0 call 202df50 <__errno> <== NOT EXECUTED 201f454: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 201f458: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 201f45c: c2 22 00 00 st %g1, [ %o0 ] 201f460: 81 c7 e0 08 ret 201f464: 81 e8 00 00 restore } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 201f468: 92 10 00 18 mov %i0, %o1 201f46c: b2 07 bf e4 add %fp, -28, %i1 201f470: 9f c0 40 00 call %g1 201f474: 90 10 00 19 mov %i1, %o0 rtems_filesystem_freenode( &existing_loc ); 201f478: c2 07 bf ec ld [ %fp + -20 ], %g1 201f47c: 80 a0 60 00 cmp %g1, 0 201f480: 02 80 00 08 be 201f4a0 201f484: b0 10 00 08 mov %o0, %i0 201f488: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 201f48c: 80 a0 60 00 cmp %g1, 0 201f490: 22 80 00 05 be,a 201f4a4 201f494: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 201f498: 9f c0 40 00 call %g1 201f49c: 90 10 00 19 mov %i1, %o0 rtems_filesystem_freenode( &parent_loc ); 201f4a0: c2 07 bf dc ld [ %fp + -36 ], %g1 201f4a4: 80 a0 60 00 cmp %g1, 0 201f4a8: 02 80 00 08 be 201f4c8 201f4ac: 01 00 00 00 nop 201f4b0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 201f4b4: 80 a0 60 00 cmp %g1, 0 201f4b8: 02 80 00 04 be 201f4c8 201f4bc: 01 00 00 00 nop 201f4c0: 9f c0 40 00 call %g1 201f4c4: 90 07 bf d4 add %fp, -44, %o0 return result; } 201f4c8: 81 c7 e0 08 ret 201f4cc: 81 e8 00 00 restore 02014934 : off_t lseek( int fd, off_t offset, int whence ) { 2014934: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 2014938: 03 00 80 5a sethi %hi(0x2016800), %g1 201493c: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 ! 2016818 off_t lseek( int fd, off_t offset, int whence ) { 2014940: 92 10 00 19 mov %i1, %o1 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 2014944: 80 a6 00 01 cmp %i0, %g1 2014948: 1a 80 00 0e bcc 2014980 201494c: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 2014950: 03 00 80 5d sethi %hi(0x2017400), %g1 2014954: c6 00 61 14 ld [ %g1 + 0x114 ], %g3 ! 2017514 2014958: 85 2e 20 02 sll %i0, 2, %g2 201495c: 83 2e 20 04 sll %i0, 4, %g1 2014960: 82 20 40 02 sub %g1, %g2, %g1 2014964: 82 00 40 18 add %g1, %i0, %g1 2014968: 83 28 60 02 sll %g1, 2, %g1 201496c: b0 00 c0 01 add %g3, %g1, %i0 rtems_libio_check_is_open(iop); 2014970: c2 06 20 0c ld [ %i0 + 0xc ], %g1 2014974: 80 88 61 00 btst 0x100, %g1 2014978: 32 80 00 06 bne,a 2014990 201497c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 2014980: 7f ff e1 93 call 200cfcc <__errno> <== NOT EXECUTED 2014984: 01 00 00 00 nop <== NOT EXECUTED 2014988: 10 80 00 1c b 20149f8 <== NOT EXECUTED 201498c: 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 ) 2014990: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 2014994: 80 a0 60 00 cmp %g1, 0 2014998: 12 80 00 06 bne 20149b0 201499c: 80 a6 a0 01 cmp %i2, 1 rtems_set_errno_and_return_minus_one( ENOTSUP ); 20149a0: 7f ff e1 8b call 200cfcc <__errno> <== NOT EXECUTED 20149a4: 01 00 00 00 nop <== NOT EXECUTED 20149a8: 10 80 00 14 b 20149f8 <== NOT EXECUTED 20149ac: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 20149b0: 02 80 00 09 be 20149d4 20149b4: f4 06 20 08 ld [ %i0 + 8 ], %i2 20149b8: 80 a2 a0 02 cmp %o2, 2 20149bc: 02 80 00 08 be 20149dc 20149c0: 80 a2 a0 00 cmp %o2, 0 20149c4: 12 80 00 0a bne 20149ec 20149c8: 01 00 00 00 nop case SEEK_SET: iop->offset = offset; 20149cc: 10 80 00 0e b 2014a04 20149d0: f2 26 20 08 st %i1, [ %i0 + 8 ] break; case SEEK_CUR: iop->offset += offset; 20149d4: 10 80 00 04 b 20149e4 20149d8: 82 06 40 1a add %i1, %i2, %g1 break; case SEEK_END: iop->offset = iop->size + offset; 20149dc: c2 06 20 04 ld [ %i0 + 4 ], %g1 20149e0: 82 06 40 01 add %i1, %g1, %g1 20149e4: 10 80 00 08 b 2014a04 20149e8: c2 26 20 08 st %g1, [ %i0 + 8 ] break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 20149ec: 7f ff e1 78 call 200cfcc <__errno> 20149f0: 01 00 00 00 nop 20149f4: 82 10 20 16 mov 0x16, %g1 ! 16 20149f8: c2 22 00 00 st %g1, [ %o0 ] 20149fc: 10 80 00 09 b 2014a20 2014a00: 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 ); 2014a04: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 2014a08: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 2014a0c: 9f c0 40 00 call %g1 2014a10: 90 10 00 18 mov %i0, %o0 if ( status == (off_t) -1 ) 2014a14: 80 a2 3f ff cmp %o0, -1 2014a18: 22 80 00 02 be,a 2014a20 2014a1c: f4 26 20 08 st %i2, [ %i0 + 8 ] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 2014a20: 81 c7 e0 08 ret 2014a24: 91 e8 00 08 restore %g0, %o0, %o0 0201f5f8 : int _STAT_NAME( const char *path, struct stat *buf ) { 201f5f8: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 201f5fc: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 201f600: 12 80 00 06 bne 201f618 <== NOT EXECUTED 201f604: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); 201f608: 40 00 3a 52 call 202df50 <__errno> <== NOT EXECUTED 201f60c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201f610: 10 80 00 1c b 201f680 <== NOT EXECUTED 201f614: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); 201f618: a0 07 bf e8 add %fp, -24, %l0 <== NOT EXECUTED 201f61c: 92 10 20 00 clr %o1 <== NOT EXECUTED 201f620: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 201f624: 96 10 20 00 clr %o3 <== NOT EXECUTED 201f628: 7f ff 93 50 call 2004368 <== NOT EXECUTED 201f62c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED if ( status != 0 ) 201f630: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201f634: 12 80 00 14 bne 201f684 <== NOT EXECUTED 201f638: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 201f63c: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 201f640: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201f644: 12 80 00 12 bne 201f68c <== NOT EXECUTED 201f648: 92 10 20 00 clr %o1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 201f64c: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 201f650: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201f654: 02 80 00 08 be 201f674 <== NOT EXECUTED 201f658: 01 00 00 00 nop <== NOT EXECUTED 201f65c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 201f660: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201f664: 02 80 00 04 be 201f674 <== NOT EXECUTED 201f668: 01 00 00 00 nop <== NOT EXECUTED 201f66c: 9f c0 40 00 call %g1 <== NOT EXECUTED 201f670: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 201f674: 40 00 3a 37 call 202df50 <__errno> <== NOT EXECUTED 201f678: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201f67c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 201f680: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 201f684: 81 c7 e0 08 ret <== NOT EXECUTED 201f688: 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) ); 201f68c: 94 10 20 50 mov 0x50, %o2 <== NOT EXECUTED 201f690: 40 00 44 a5 call 2030924 <== NOT EXECUTED 201f694: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 201f698: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 201f69c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 201f6a0: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 201f6a4: 9f c0 40 00 call %g1 <== NOT EXECUTED 201f6a8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 201f6ac: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 201f6b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201f6b4: 02 bf ff f4 be 201f684 <== NOT EXECUTED 201f6b8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 201f6bc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 201f6c0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201f6c4: 02 80 00 04 be 201f6d4 <== NOT EXECUTED 201f6c8: 01 00 00 00 nop <== NOT EXECUTED 201f6cc: 9f c0 40 00 call %g1 <== NOT EXECUTED 201f6d0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return status; } 201f6d4: 81 c7 e0 08 ret <== NOT EXECUTED 201f6d8: 81 e8 00 00 restore <== NOT EXECUTED 0200a72c : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 200a72c: 9d e3 bf 98 save %sp, -104, %sp 200a730: 05 00 80 5d sethi %hi(0x2017400), %g2 200a734: 84 10 a1 78 or %g2, 0x178, %g2 ! 2017578 200a738: c2 00 a0 04 ld [ %g2 + 4 ], %g1 200a73c: a0 10 00 18 mov %i0, %l0 200a740: 82 00 60 01 inc %g1 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 200a744: 7f ff ff ed call 200a6f8 200a748: c2 20 a0 04 st %g1, [ %g2 + 4 ] /* * Validate the parameters */ if ( !size ) 200a74c: 80 a6 20 00 cmp %i0, 0 200a750: 02 80 00 33 be 200a81c 200a754: 03 00 80 5e sethi %hi(0x2017800), %g1 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 200a758: c2 00 60 94 ld [ %g1 + 0x94 ], %g1 ! 2017894 <_System_state_Current> 200a75c: 80 a0 60 03 cmp %g1, 3 200a760: 12 80 00 07 bne 200a77c 200a764: 11 00 80 5d sethi %hi(0x2017400), %o0 200a768: 7f ff ff ca call 200a690 200a76c: 01 00 00 00 nop 200a770: 80 8a 20 ff btst 0xff, %o0 200a774: 02 80 00 2a be 200a81c 200a778: 11 00 80 5d sethi %hi(0x2017400), %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 ); 200a77c: 92 10 00 10 mov %l0, %o1 200a780: 40 00 05 0a call 200bba8 <_Protected_heap_Allocate> 200a784: 90 12 21 20 or %o0, 0x120, %o0 if ( !return_this ) { 200a788: b0 92 20 00 orcc %o0, 0, %i0 200a78c: 12 80 00 14 bne 200a7dc 200a790: 03 00 80 5c sethi %hi(0x2017000), %g1 if (rtems_malloc_sbrk_helpers) 200a794: 03 00 80 5c sethi %hi(0x2017000), %g1 <== NOT EXECUTED 200a798: c2 00 62 78 ld [ %g1 + 0x278 ], %g1 ! 2017278 <== NOT EXECUTED 200a79c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200a7a0: 02 80 00 08 be 200a7c0 <== NOT EXECUTED 200a7a4: 01 00 00 00 nop <== NOT EXECUTED return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 200a7a8: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 200a7ac: 9f c0 40 00 call %g1 <== NOT EXECUTED 200a7b0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( !return_this ) { 200a7b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200a7b8: 32 80 00 08 bne,a 200a7d8 <== NOT EXECUTED 200a7bc: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED errno = ENOMEM; 200a7c0: 40 00 0a 03 call 200cfcc <__errno> <== NOT EXECUTED 200a7c4: 01 00 00 00 nop <== NOT EXECUTED 200a7c8: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 200a7cc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200a7d0: 81 c7 e0 08 ret <== NOT EXECUTED 200a7d4: 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 ) 200a7d8: 03 00 80 5c sethi %hi(0x2017000), %g1 <== NOT EXECUTED 200a7dc: c2 00 62 7c ld [ %g1 + 0x27c ], %g1 ! 201727c 200a7e0: 80 a0 60 00 cmp %g1, 0 200a7e4: 02 80 00 04 be 200a7f4 200a7e8: 92 10 00 10 mov %l0, %o1 (*rtems_malloc_dirty_helper)( return_this, size ); 200a7ec: 9f c0 40 00 call %g1 <== NOT EXECUTED 200a7f0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 200a7f4: 03 00 80 5c sethi %hi(0x2017000), %g1 200a7f8: c2 00 62 74 ld [ %g1 + 0x274 ], %g1 ! 2017274 200a7fc: 80 a0 60 00 cmp %g1, 0 200a800: 02 80 00 08 be 200a820 200a804: 01 00 00 00 nop (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 200a808: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 200a80c: 9f c0 40 00 call %g1 <== NOT EXECUTED 200a810: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 200a814: 81 c7 e0 08 ret <== NOT EXECUTED 200a818: 81 e8 00 00 restore <== NOT EXECUTED 200a81c: b0 10 20 00 clr %i0 if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 200a820: 81 c7 e0 08 ret 200a824: 81 e8 00 00 restore 0200a6dc : } void malloc_deferred_free( void *pointer ) { 200a6dc: 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 ); 200a6e0: 11 00 80 5f sethi %hi(0x2017c00), %o0 <== NOT EXECUTED 200a6e4: 90 12 20 a8 or %o0, 0xa8, %o0 ! 2017ca8 <== NOT EXECUTED 200a6e8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 200a6ec: 7f ff ee 18 call 2005f4c <_Chain_Append> <== NOT EXECUTED 200a6f0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 200a6f4: 01 00 00 00 nop 0200a6f8 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 200a6f8: 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 ); 200a6fc: 03 00 80 5f sethi %hi(0x2017c00), %g1 200a700: 10 80 00 04 b 200a710 200a704: a0 10 60 a8 or %g1, 0xa8, %l0 ! 2017ca8 /* * 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); 200a708: 7f ff fe a1 call 200a18c <== NOT EXECUTED 200a70c: 01 00 00 00 nop <== NOT EXECUTED 200a710: 40 00 03 e9 call 200b6b4 <_Chain_Get> 200a714: 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) 200a718: 80 a2 20 00 cmp %o0, 0 200a71c: 12 bf ff fb bne 200a708 200a720: 01 00 00 00 nop free(to_be_freed); } 200a724: 81 c7 e0 08 ret 200a728: 81 e8 00 00 restore 0202528c : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 202528c: 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) ) { 2025290: 7f ff 7d 24 call 2004720 2025294: 90 10 00 18 mov %i0, %o0 2025298: 80 a2 20 00 cmp %o0, 0 202529c: 12 80 00 13 bne 20252e8 20252a0: 01 00 00 00 nop 20252a4: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 20252a8: 80 a0 60 00 cmp %g1, 0 20252ac: 12 80 00 0f bne 20252e8 20252b0: 03 00 81 1a sethi %hi(0x2046800), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 20252b4: c4 00 61 0c ld [ %g1 + 0x10c ], %g2 ! 204690c 20252b8: c2 00 a0 04 ld [ %g2 + 4 ], %g1 20252bc: 80 a0 40 18 cmp %g1, %i0 20252c0: 22 80 00 02 be,a 20252c8 20252c4: 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) 20252c8: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 20252cc: 80 a0 60 06 cmp %g1, 6 20252d0: 02 80 00 04 be 20252e0 20252d4: 01 00 00 00 nop IMFS_memfile_remove( the_jnode ); 20252d8: 7f ff ff 8c call 2025108 20252dc: 90 10 00 18 mov %i0, %o0 free( the_jnode ); 20252e0: 7f ff 7c 74 call 20044b0 20252e4: 90 10 00 18 mov %i0, %o0 } return 0; } 20252e8: 81 c7 e0 08 ret 20252ec: 91 e8 20 00 restore %g0, 0, %o0 02025094 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 2025094: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( block_table ); 2025098: 80 a6 20 00 cmp %i0, 0 202509c: 32 80 00 0a bne,a 20250c4 20250a0: e0 06 00 00 ld [ %i0 ], %l0 20250a4: 11 00 81 0c sethi %hi(0x2043000), %o0 <== NOT EXECUTED 20250a8: 15 00 81 0d sethi %hi(0x2043400), %o2 <== NOT EXECUTED 20250ac: 17 00 81 0c sethi %hi(0x2043000), %o3 <== NOT EXECUTED 20250b0: 90 12 23 50 or %o0, 0x350, %o0 <== NOT EXECUTED 20250b4: 94 12 a0 f0 or %o2, 0xf0, %o2 <== NOT EXECUTED 20250b8: 96 12 e3 d8 or %o3, 0x3d8, %o3 <== NOT EXECUTED 20250bc: 7f ff 7b de call 2004034 <__assert_func> <== NOT EXECUTED 20250c0: 92 10 21 b1 mov 0x1b1, %o1 <== NOT EXECUTED 20250c4: 10 80 00 09 b 20250e8 20250c8: a2 10 20 00 clr %l1 */ b = *block_table; for ( i=0 ; i 20250d4: a2 04 60 01 inc %l1 memfile_free_block( b[i] ); 20250d8: 7f ff ff 23 call 2024d64 20250dc: 01 00 00 00 nop b[i] = 0; 20250e0: 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 20250f0: 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 ); 20250f4: 7f ff ff 1c call 2024d64 20250f8: d0 06 00 00 ld [ %i0 ], %o0 *block_table = 0; 20250fc: c0 26 00 00 clr [ %i0 ] } 2025100: 81 c7 e0 08 ret 2025104: 81 e8 00 00 restore 02025558 : int memfile_ftruncate( rtems_libio_t *iop, off_t length ) { 2025558: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 202555c: 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 ) 2025560: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 2025564: 80 a6 40 01 cmp %i1, %g1 2025568: 04 80 00 06 ble 2025580 202556c: 92 10 00 19 mov %i1, %o1 return IMFS_memfile_extend( the_jnode, length ); 2025570: 7f ff ff a9 call 2025414 <== NOT EXECUTED 2025574: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } 2025578: 81 c7 e0 08 ret <== NOT EXECUTED 202557c: 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; 2025580: f2 24 20 4c st %i1, [ %l0 + 0x4c ] iop->size = the_jnode->info.file.size; 2025584: f2 26 20 04 st %i1, [ %i0 + 4 ] IMFS_update_atime( the_jnode ); 2025588: 90 07 bf f0 add %fp, -16, %o0 202558c: 7f ff 7b f3 call 2004558 2025590: 92 10 20 00 clr %o1 2025594: c2 07 bf f0 ld [ %fp + -16 ], %g1 2025598: 90 10 20 00 clr %o0 202559c: c2 24 20 3c st %g1, [ %l0 + 0x3c ] return 0; } 20255a0: b0 10 00 08 mov %o0, %i0 20255a4: 81 c7 e0 08 ret 20255a8: 81 e8 00 00 restore 020255ac : off_t memfile_lseek( rtems_libio_t *iop, off_t offset, int whence ) { 20255ac: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 20255b0: e0 06 20 2c ld [ %i0 + 0x2c ], %l0 if (the_jnode->type == IMFS_LINEAR_FILE) { 20255b4: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 20255b8: 80 a0 60 06 cmp %g1, 6 20255bc: 12 80 00 09 bne 20255e0 20255c0: d2 06 20 08 ld [ %i0 + 8 ], %o1 if (iop->offset > the_jnode->info.linearfile.size) 20255c4: d0 04 20 4c ld [ %l0 + 0x4c ], %o0 <== NOT EXECUTED 20255c8: 80 a2 40 08 cmp %o1, %o0 <== NOT EXECUTED 20255cc: 34 80 00 11 bg,a 2025610 <== NOT EXECUTED 20255d0: d0 26 20 08 st %o0, [ %i0 + 8 ] <== NOT EXECUTED 20255d4: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 20255d8: 81 c7 e0 08 ret <== NOT EXECUTED 20255dc: 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 )) 20255e0: 7f ff ff 8d call 2025414 20255e4: 90 10 00 10 mov %l0, %o0 20255e8: 80 a2 20 00 cmp %o0, 0 20255ec: 22 80 00 08 be,a 202560c 20255f0: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 rtems_set_errno_and_return_minus_one( ENOSPC ); 20255f4: 40 00 22 57 call 202df50 <__errno> <== NOT EXECUTED 20255f8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20255fc: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 2025600: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2025604: 81 c7 e0 08 ret <== NOT EXECUTED 2025608: 81 e8 00 00 restore <== NOT EXECUTED iop->size = the_jnode->info.file.size; 202560c: c2 26 20 04 st %g1, [ %i0 + 4 ] } return iop->offset; 2025610: f0 06 20 08 ld [ %i0 + 8 ], %i0 } 2025614: 81 c7 e0 08 ret 2025618: 81 e8 00 00 restore 020258b4 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 20258b4: 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)) 20258b8: c2 06 20 0c ld [ %i0 + 0xc ], %g1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 20258bc: 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)) 20258c0: 80 88 62 04 btst 0x204, %g1 20258c4: 02 80 00 17 be 2025920 20258c8: e0 06 20 2c ld [ %i0 + 0x2c ], %l0 20258cc: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 20258d0: 80 a0 60 06 cmp %g1, 6 20258d4: 32 80 00 14 bne,a 2025924 20258d8: c2 04 60 0c ld [ %l1 + 0xc ], %g1 && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; 20258dc: d6 04 20 4c ld [ %l0 + 0x4c ], %o3 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 20258e0: d4 04 20 50 ld [ %l0 + 0x50 ], %o2 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 20258e4: 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; 20258e8: 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; 20258ec: 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; 20258f0: 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; 20258f4: 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) 20258f8: 80 a2 e0 00 cmp %o3, 0 <== NOT EXECUTED 20258fc: 02 80 00 09 be 2025920 <== NOT EXECUTED 2025900: c2 24 20 48 st %g1, [ %l0 + 0x48 ] <== NOT EXECUTED 2025904: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2025908: 92 10 20 00 clr %o1 <== NOT EXECUTED 202590c: 7f ff ff 44 call 202561c <== NOT EXECUTED 2025910: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2025914: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 2025918: 02 80 00 0a be 2025940 <== NOT EXECUTED 202591c: 01 00 00 00 nop <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 2025920: c2 04 60 0c ld [ %l1 + 0xc ], %g1 2025924: 80 88 62 00 btst 0x200, %g1 2025928: 02 80 00 04 be 2025938 202592c: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 iop->offset = the_jnode->info.file.size; 2025930: c2 24 60 08 st %g1, [ %l1 + 8 ] iop->size = the_jnode->info.file.size; 2025934: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 2025938: b0 10 20 00 clr %i0 202593c: c2 24 60 04 st %g1, [ %l1 + 4 ] return 0; } 2025940: 81 c7 e0 08 ret 2025944: 81 e8 00 00 restore 02025bcc : ssize_t memfile_read( rtems_libio_t *iop, void *buffer, size_t count ) { 2025bcc: 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 ); 2025bd0: d2 02 20 08 ld [ %o0 + 8 ], %o1 2025bd4: d0 02 20 2c ld [ %o0 + 0x2c ], %o0 ssize_t memfile_read( rtems_libio_t *iop, void *buffer, size_t count ) { 2025bd8: 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 ); 2025bdc: 94 10 00 01 mov %g1, %o2 2025be0: 82 13 c0 00 mov %o7, %g1 2025be4: 7f ff ff 59 call 2025948 2025be8: 9e 10 40 00 mov %g1, %o7 2025bec: 01 00 00 00 nop <== NOT EXECUTED 020252f0 : */ int memfile_rmnod( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 20252f0: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 20252f4: 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 ) { 20252f8: c2 06 20 08 ld [ %i0 + 8 ], %g1 20252fc: 80 a0 60 00 cmp %g1, 0 2025300: 22 80 00 06 be,a 2025318 2025304: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 <== NOT EXECUTED 2025308: 7f ff f2 38 call 2021be8 <_Chain_Extract> 202530c: 90 10 00 18 mov %i0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 2025310: c0 26 20 08 clr [ %i0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 2025314: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 2025318: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 202531c: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 2025320: 90 07 bf f0 add %fp, -16, %o0 2025324: 7f ff 7c 8d call 2004558 2025328: c2 36 20 30 sth %g1, [ %i0 + 0x30 ] 202532c: c2 07 bf f0 ld [ %fp + -16 ], %g1 return memfile_check_rmnod( the_jnode ); 2025330: 90 10 00 18 mov %i0, %o0 2025334: 7f ff ff d6 call 202528c 2025338: c2 26 20 44 st %g1, [ %i0 + 0x44 ] } 202533c: 81 c7 e0 08 ret 2025340: 91 e8 00 08 restore %g0, %o0, %o0 0200928c : int miniIMFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { return IMFS_initialize_support( 200928c: 13 00 80 56 sethi %hi(0x2015800), %o1 2009290: 15 00 80 5c sethi %hi(0x2017000), %o2 2009294: 92 12 63 a0 or %o1, 0x3a0, %o1 2009298: 94 12 a3 c8 or %o2, 0x3c8, %o2 200929c: 96 10 00 0a mov %o2, %o3 20092a0: 82 13 c0 00 mov %o7, %g1 20092a4: 40 00 02 6a call 2009c4c 20092a8: 9e 10 40 00 mov %g1, %o7 20092ac: 01 00 00 00 nop <== NOT EXECUTED 02002270 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 2002270: 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) ) ) 2002274: 03 00 00 3c sethi %hi(0xf000), %g1 2002278: b3 2e 60 10 sll %i1, 0x10, %i1 200227c: b3 36 60 10 srl %i1, 0x10, %i1 2002280: 84 8e 40 01 andcc %i1, %g1, %g2 2002284: 32 80 00 06 bne,a 200229c 2002288: 03 00 00 04 sethi %hi(0x1000), %g1 rtems_set_errno_and_return_minus_one( EINVAL ); 200228c: 40 00 2b 50 call 200cfcc <__errno> <== NOT EXECUTED 2002290: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2002294: 10 80 00 36 b 200236c <== NOT EXECUTED 2002298: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED if ( S_ISFIFO(mode) ) 200229c: 80 a0 80 01 cmp %g2, %g1 20022a0: 02 80 00 30 be 2002360 20022a4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 20022a8: c2 4e 00 00 ldsb [ %i0 ], %g1 20022ac: 80 a0 60 2f cmp %g1, 0x2f 20022b0: 02 80 00 06 be 20022c8 20022b4: 80 a0 60 5c cmp %g1, 0x5c 20022b8: 02 80 00 04 be 20022c8 20022bc: 80 a0 60 00 cmp %g1, 0 20022c0: 12 80 00 0a bne 20022e8 20022c4: 03 00 80 5b sethi %hi(0x2016c00), %g1 20022c8: 03 00 80 5b sethi %hi(0x2016c00), %g1 20022cc: d2 00 61 34 ld [ %g1 + 0x134 ], %o1 ! 2016d34 20022d0: 90 07 bf e4 add %fp, -28, %o0 20022d4: 92 02 60 14 add %o1, 0x14, %o1 20022d8: 40 00 2d 2f call 200d794 20022dc: 94 10 20 10 mov 0x10, %o2 20022e0: 10 80 00 08 b 2002300 20022e4: 84 10 20 01 mov 1, %g2 20022e8: d2 00 61 34 ld [ %g1 + 0x134 ], %o1 20022ec: 90 07 bf e4 add %fp, -28, %o0 20022f0: 92 02 60 04 add %o1, 4, %o1 20022f4: 40 00 2d 28 call 200d794 20022f8: 94 10 20 10 mov 0x10, %o2 20022fc: 84 10 20 00 clr %g2 if ( !temp_loc.ops->evalformake_h ) { 2002300: c2 07 bf ec ld [ %fp + -20 ], %g1 2002304: c2 00 60 04 ld [ %g1 + 4 ], %g1 2002308: 80 a0 60 00 cmp %g1, 0 200230c: 02 80 00 15 be 2002360 2002310: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 2002314: 90 06 00 02 add %i0, %g2, %o0 2002318: a0 07 bf e4 add %fp, -28, %l0 200231c: 94 07 bf f4 add %fp, -12, %o2 2002320: 92 10 00 10 mov %l0, %o1 2002324: 9f c0 40 00 call %g1 2002328: b0 10 3f ff mov -1, %i0 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 200232c: 80 a2 20 00 cmp %o0, 0 2002330: 12 80 00 10 bne 2002370 2002334: c2 07 bf ec ld [ %fp + -20 ], %g1 return -1; if ( !temp_loc.ops->mknod_h ) { 2002338: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 200233c: 80 a0 a0 00 cmp %g2, 0 2002340: 12 80 00 0e bne 2002378 2002344: d0 07 bf f4 ld [ %fp + -12 ], %o0 rtems_filesystem_freenode( &temp_loc ); 2002348: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 200234c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2002350: 02 80 00 04 be 2002360 <== NOT EXECUTED 2002354: 01 00 00 00 nop <== NOT EXECUTED 2002358: 9f c0 40 00 call %g1 <== NOT EXECUTED 200235c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 2002360: 40 00 2b 1b call 200cfcc <__errno> 2002364: b0 10 3f ff mov -1, %i0 2002368: 82 10 20 86 mov 0x86, %g1 200236c: c2 22 00 00 st %g1, [ %o0 ] 2002370: 81 c7 e0 08 ret 2002374: 81 e8 00 00 restore } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 2002378: 92 10 00 19 mov %i1, %o1 200237c: 94 10 00 1a mov %i2, %o2 2002380: 96 10 00 1b mov %i3, %o3 2002384: 9f c0 80 00 call %g2 2002388: 98 10 00 10 mov %l0, %o4 rtems_filesystem_freenode( &temp_loc ); 200238c: c2 07 bf ec ld [ %fp + -20 ], %g1 2002390: 80 a0 60 00 cmp %g1, 0 2002394: 02 bf ff f7 be 2002370 2002398: b0 10 00 08 mov %o0, %i0 200239c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 20023a0: 80 a0 60 00 cmp %g1, 0 20023a4: 02 80 00 04 be 20023b4 20023a8: 01 00 00 00 nop 20023ac: 9f c0 40 00 call %g1 20023b0: 90 10 00 10 mov %l0, %o0 return result; } 20023b4: 81 c7 e0 08 ret 20023b8: 81 e8 00 00 restore 0200a870 : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 200a870: 9d e3 bf 88 save %sp, -120, %sp /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 200a874: 80 a6 60 00 cmp %i1, 0 200a878: 02 80 00 05 be 200a88c 200a87c: a4 10 00 18 mov %i0, %l2 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 200a880: 80 a6 a0 01 cmp %i2, 1 200a884: 28 80 00 06 bleu,a 200a89c 200a888: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 200a88c: 40 00 09 d0 call 200cfcc <__errno> 200a890: 01 00 00 00 nop 200a894: 10 80 00 15 b 200a8e8 200a898: 82 10 20 16 mov 0x16, %g1 ! 16 return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 200a89c: 80 a0 60 00 cmp %g1, 0 200a8a0: 12 80 00 05 bne 200a8b4 200a8a4: 80 a6 e0 00 cmp %i3, 0 errno = ENOTSUP; 200a8a8: a2 10 20 00 clr %l1 <== NOT EXECUTED 200a8ac: 10 80 00 47 b 200a9c8 <== NOT EXECUTED 200a8b0: b8 10 20 00 clr %i4 <== NOT EXECUTED /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 200a8b4: 02 80 00 05 be 200a8c8 200a8b8: 90 10 20 64 mov 0x64, %o0 size += strlen( device ) + 1; 200a8bc: 40 00 0e e6 call 200e454 <== NOT EXECUTED 200a8c0: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 200a8c4: 90 02 20 65 add %o0, 0x65, %o0 <== NOT EXECUTED temp_mt_entry = malloc( size ); 200a8c8: 7f ff ff 99 call 200a72c 200a8cc: 01 00 00 00 nop if ( !temp_mt_entry ) { 200a8d0: a0 92 20 00 orcc %o0, 0, %l0 200a8d4: 12 80 00 07 bne 200a8f0 200a8d8: a2 10 00 10 mov %l0, %l1 errno = ENOMEM; 200a8dc: 40 00 09 bc call 200cfcc <__errno> <== NOT EXECUTED 200a8e0: 01 00 00 00 nop <== NOT EXECUTED 200a8e4: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 200a8e8: 10 80 00 74 b 200aab8 200a8ec: 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; 200a8f0: f4 24 20 28 st %i2, [ %l0 + 0x28 ] if ( device ) { 200a8f4: 80 a6 e0 00 cmp %i3, 0 200a8f8: 02 80 00 08 be 200a918 200a8fc: e0 24 20 24 st %l0, [ %l0 + 0x24 ] temp_mt_entry->dev = 200a900: 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 ); 200a904: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 200a908: 40 00 0e b1 call 200e3cc <== NOT EXECUTED 200a90c: 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 ) { 200a910: 10 80 00 04 b 200a920 <== NOT EXECUTED 200a914: 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; 200a918: 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 ) { 200a91c: 80 a7 20 00 cmp %i4, 0 200a920: 02 80 00 37 be 200a9fc 200a924: 90 10 00 1c mov %i4, %o0 if ( rtems_filesystem_evaluate_path( 200a928: 92 10 20 07 mov 7, %o1 200a92c: b8 07 bf e8 add %fp, -24, %i4 200a930: 96 10 20 01 mov 1, %o3 200a934: 7f ff dd 9f call 2001fb0 200a938: 94 10 00 1c mov %i4, %o2 200a93c: 80 a2 3f ff cmp %o0, -1 200a940: 02 80 00 4e be 200aa78 200a944: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 200a948: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 200a94c: 80 a0 60 00 cmp %g1, 0 200a950: 02 80 00 1e be 200a9c8 200a954: 01 00 00 00 nop /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 200a958: 9f c0 40 00 call %g1 200a95c: 90 10 00 1c mov %i4, %o0 200a960: 80 a2 20 01 cmp %o0, 1 200a964: 02 80 00 07 be 200a980 200a968: 03 00 80 5f sethi %hi(0x2017c00), %g1 errno = ENOTDIR; 200a96c: 40 00 09 98 call 200cfcc <__errno> 200a970: 01 00 00 00 nop 200a974: 82 10 20 14 mov 0x14, %g1 ! 14 200a978: 10 80 00 41 b 200aa7c 200a97c: 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 ) 200a980: c8 07 bf e8 ld [ %fp + -24 ], %g4 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 200a984: c4 00 60 b4 ld [ %g1 + 0xb4 ], %g2 200a988: 82 10 60 b4 or %g1, 0xb4, %g1 !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 200a98c: 10 80 00 06 b 200a9a4 200a990: 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 ) 200a994: 80 a0 40 04 cmp %g1, %g4 200a998: 02 80 00 08 be 200a9b8 200a99c: 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 ) { 200a9a0: 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 ); 200a9a4: 80 a0 80 03 cmp %g2, %g3 200a9a8: 32 bf ff fb bne,a 200a994 200a9ac: 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; 200a9b0: 10 80 00 45 b 200aac4 200a9b4: 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; 200a9b8: 40 00 09 85 call 200cfcc <__errno> 200a9bc: b8 07 bf e8 add %fp, -24, %i4 200a9c0: 10 bf ff ee b 200a978 200a9c4: 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; 200a9c8: 40 00 09 81 call 200cfcc <__errno> <== NOT EXECUTED 200a9cc: 01 00 00 00 nop <== NOT EXECUTED 200a9d0: 10 bf ff ea b 200a978 <== NOT EXECUTED 200a9d4: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 200a9d8: 9f c0 c0 00 call %g3 200a9dc: 90 10 00 10 mov %l0, %o0 200a9e0: 80 a2 20 00 cmp %o0, 0 200a9e4: 02 80 00 04 be 200a9f4 200a9e8: 90 07 bf e8 add %fp, -24, %o0 200a9ec: 10 80 00 24 b 200aa7c <== NOT EXECUTED 200a9f0: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED 200a9f4: 10 80 00 0a b 200aa1c 200a9f8: 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; 200a9fc: c0 24 20 18 clr [ %l0 + 0x18 ] temp_mt_entry->mt_fs_root.handlers = NULL; 200aa00: c0 24 20 1c clr [ %l0 + 0x1c ] temp_mt_entry->mt_fs_root.ops = NULL; 200aa04: c0 24 20 20 clr [ %l0 + 0x20 ] temp_mt_entry->mt_point_node.node_access = NULL; 200aa08: c0 24 20 08 clr [ %l0 + 8 ] temp_mt_entry->mt_point_node.handlers = NULL; 200aa0c: c0 24 20 0c clr [ %l0 + 0xc ] temp_mt_entry->mt_point_node.ops = NULL; 200aa10: c0 24 20 10 clr [ %l0 + 0x10 ] temp_mt_entry->mt_point_node.mt_entry = NULL; 200aa14: c0 24 20 14 clr [ %l0 + 0x14 ] 200aa18: b8 10 20 00 clr %i4 } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 200aa1c: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 200aa20: 9f c0 40 00 call %g1 200aa24: 90 10 00 10 mov %l0, %o0 200aa28: 80 a2 20 00 cmp %o0, 0 200aa2c: 02 80 00 09 be 200aa50 200aa30: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 200aa34: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 <== NOT EXECUTED 200aa38: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200aa3c: 02 80 00 10 be 200aa7c <== NOT EXECUTED 200aa40: 01 00 00 00 nop <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 200aa44: 9f c0 40 00 call %g1 <== NOT EXECUTED 200aa48: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 200aa4c: 30 80 00 0c b,a 200aa7c <== 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 ); 200aa50: 11 00 80 5f sethi %hi(0x2017c00), %o0 200aa54: 92 10 00 10 mov %l0, %o1 200aa58: 7f ff ed 3d call 2005f4c <_Chain_Append> 200aa5c: 90 12 20 b4 or %o0, 0xb4, %o0 */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 200aa60: 80 a4 a0 00 cmp %l2, 0 200aa64: 02 80 00 03 be 200aa70 200aa68: b0 10 20 00 clr %i0 *mt_entry = temp_mt_entry; 200aa6c: e0 24 80 00 st %l0, [ %l2 ] 200aa70: 81 c7 e0 08 ret 200aa74: 81 e8 00 00 restore 200aa78: b8 10 20 00 clr %i4 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 200aa7c: 7f ff fd c4 call 200a18c 200aa80: 90 10 00 11 mov %l1, %o0 if ( loc_to_free ) 200aa84: 80 a7 20 00 cmp %i4, 0 200aa88: 02 bf ff fa be 200aa70 200aa8c: b0 10 3f ff mov -1, %i0 rtems_filesystem_freenode( loc_to_free ); 200aa90: c2 07 20 08 ld [ %i4 + 8 ], %g1 200aa94: 80 a0 60 00 cmp %g1, 0 200aa98: 02 80 00 09 be 200aabc 200aa9c: 01 00 00 00 nop 200aaa0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 200aaa4: 80 a0 60 00 cmp %g1, 0 200aaa8: 02 80 00 05 be 200aabc 200aaac: 01 00 00 00 nop 200aab0: 9f c0 40 00 call %g1 200aab4: 90 10 00 1c mov %i4, %o0 200aab8: b0 10 3f ff mov -1, %i0 return -1; } 200aabc: 81 c7 e0 08 ret 200aac0: 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; 200aac4: 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; 200aac8: 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; 200aacc: 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 ){ 200aad0: 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; 200aad4: 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; 200aad8: 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 ){ 200aadc: 80 a0 e0 00 cmp %g3, 0 200aae0: 12 bf ff be bne 200a9d8 200aae4: c2 24 20 10 st %g1, [ %l0 + 0x10 ] errno = ENOTSUP; 200aae8: 10 bf ff b8 b 200a9c8 <== NOT EXECUTED 200aaec: b8 07 bf e8 add %fp, -24, %i4 <== NOT EXECUTED 0200a25c : char *msg_ptr, size_t msg_len, unsigned int *msg_prio, const struct timespec *abstime ) { 200a25c: 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 ) ) { 200a260: 90 10 00 1c mov %i4, %o0 200a264: 40 00 00 4f call 200a3a0 <_POSIX_Absolute_timeout_to_ticks> 200a268: 92 07 bf f4 add %fp, -12, %o1 200a26c: 80 a2 20 02 cmp %o0, 2 200a270: 18 80 00 03 bgu 200a27c 200a274: 98 10 20 01 mov 1, %o4 200a278: 98 10 20 00 clr %o4 <== NOT EXECUTED default: /* only to silence warnings */ do_wait = TRUE; break; } return _POSIX_Message_queue_Receive_support( 200a27c: da 07 bf f4 ld [ %fp + -12 ], %o5 200a280: 90 10 00 18 mov %i0, %o0 200a284: 92 10 00 19 mov %i1, %o1 200a288: 94 10 00 1a mov %i2, %o2 200a28c: 96 10 00 1b mov %i3, %o3 200a290: 7f ff ff 37 call 2009f6c <_POSIX_Message_queue_Receive_support> 200a294: 98 0b 20 01 and %o4, 1, %o4 msg_len, msg_prio, do_wait, ticks ); } 200a298: 81 c7 e0 08 ret 200a29c: 91 e8 00 08 restore %g0, %o0, %o0 0200a2a0 : const char *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec *abstime ) { 200a2a0: 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 ) ) { 200a2a4: 90 10 00 1c mov %i4, %o0 200a2a8: 40 00 00 3e call 200a3a0 <_POSIX_Absolute_timeout_to_ticks> 200a2ac: 92 07 bf f4 add %fp, -12, %o1 200a2b0: 80 a2 20 02 cmp %o0, 2 200a2b4: 18 80 00 03 bgu 200a2c0 200a2b8: 98 10 20 01 mov 1, %o4 200a2bc: 98 10 20 00 clr %o4 <== NOT EXECUTED default: /* only to silence warnings */ do_wait = TRUE; break; } return _POSIX_Message_queue_Send_support( 200a2c0: da 07 bf f4 ld [ %fp + -12 ], %o5 200a2c4: 90 10 00 18 mov %i0, %o0 200a2c8: 92 10 00 19 mov %i1, %o1 200a2cc: 94 10 00 1a mov %i2, %o2 200a2d0: 96 10 00 1b mov %i3, %o3 200a2d4: 7f ff ff 76 call 200a0ac <_POSIX_Message_queue_Send_support> 200a2d8: 98 0b 20 01 and %o4, 1, %o4 msg_len, msg_prio, do_wait, ticks ); } 200a2dc: 81 c7 e0 08 ret 200a2e0: 91 e8 00 08 restore %g0, %o0, %o0 02002440 : */ int newlib_free_buffers( FILE *fp ) { 2002440: 9d e3 bf 98 save %sp, -104, %sp switch ( fileno(fp) ) { 2002444: 40 00 2b c3 call 200d350 2002448: 90 10 00 18 mov %i0, %o0 200244c: 80 a2 20 02 cmp %o0, 2 2002450: 18 80 00 0e bgu 2002488 2002454: 01 00 00 00 nop case 0: case 1: case 2: if (fp->_flags & __SMBF) { 2002458: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 200245c: 80 88 60 80 btst 0x80, %g1 2002460: 02 80 00 0c be 2002490 2002464: 01 00 00 00 nop free( fp->_bf._base ); 2002468: 40 00 1f 49 call 200a18c 200246c: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 fp->_flags &= ~__SMBF; 2002470: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 fp->_bf._base = fp->_p = (unsigned char *) NULL; 2002474: c0 26 20 10 clr [ %i0 + 0x10 ] case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 2002478: 82 08 7f 7f and %g1, -129, %g1 fp->_bf._base = fp->_p = (unsigned char *) NULL; 200247c: c0 26 00 00 clr [ %i0 ] case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 2002480: 10 80 00 04 b 2002490 2002484: c2 36 20 0c sth %g1, [ %i0 + 0xc ] fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 2002488: 40 00 2b 29 call 200d12c <== NOT EXECUTED 200248c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED } return 0; } 2002490: 81 c7 e0 08 ret 2002494: 91 e8 20 00 restore %g0, 0, %o0 02002838 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *pargp ) { 2002838: 9d e3 bf 98 save %sp, -104, %sp rtems_device_driver status; if ( !initialized ) { 200283c: 05 00 80 6d sethi %hi(0x201b400), %g2 2002840: c2 48 a0 44 ldsb [ %g2 + 0x44 ], %g1 ! 201b444 2002844: 80 a0 60 00 cmp %g1, 0 2002848: 12 80 00 0e bne 2002880 200284c: 82 10 20 01 mov 1, %g1 initialized = 1; status = rtems_io_register_name( 2002850: 11 00 80 63 sethi %hi(0x2018c00), %o0 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 2002854: c2 28 a0 44 stb %g1, [ %g2 + 0x44 ] status = rtems_io_register_name( 2002858: 90 12 20 d8 or %o0, 0xd8, %o0 200285c: 92 10 00 18 mov %i0, %o1 2002860: 40 00 00 4d call 2002994 2002864: 94 10 20 00 clr %o2 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 2002868: 80 a2 20 00 cmp %o0, 0 200286c: 02 80 00 04 be 200287c 2002870: 03 00 80 6d sethi %hi(0x201b400), %g1 rtems_fatal_error_occurred(status); 2002874: 40 00 10 2a call 200691c <== NOT EXECUTED 2002878: 01 00 00 00 nop <== NOT EXECUTED NULL_major = major; 200287c: f0 20 62 c0 st %i0, [ %g1 + 0x2c0 ] } return RTEMS_SUCCESSFUL; } 2002880: 81 c7 e0 08 ret 2002884: 91 e8 20 00 restore %g0, 0, %o0 02002814 : void *pargp ) { rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 2002814: 80 a2 a0 00 cmp %o2, 0 2002818: 02 80 00 04 be 2002828 200281c: 01 00 00 00 nop rw_args->bytes_moved = rw_args->count; 2002820: c2 02 a0 0c ld [ %o2 + 0xc ], %g1 <== NOT EXECUTED 2002824: c2 22 a0 14 st %g1, [ %o2 + 0x14 ] <== NOT EXECUTED return NULL_SUCCESSFUL; } 2002828: 81 c3 e0 08 retl 200282c: 90 10 20 00 clr %o0 02002690 : int open( const char *pathname, int flags, ... ) { 2002690: 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); 2002694: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 2002698: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 200269c: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 20026a0: fa 27 a0 58 st %i5, [ %fp + 0x58 ] /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 20026a4: 82 06 60 01 add %i1, 1, %g1 if ( ( status & _FREAD ) == _FREAD ) eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 20026a8: 80 88 60 02 btst 2, %g1 * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 20026ac: 82 08 60 01 and %g1, 1, %g1 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 20026b0: 02 80 00 03 be 20026bc 20026b4: a1 28 60 02 sll %g1, 2, %l0 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 20026b8: a0 14 20 02 or %l0, 2, %l0 va_start(ap, flags); mode = va_arg( ap, int ); 20026bc: 82 07 a0 50 add %fp, 0x50, %g1 20026c0: f4 07 a0 4c ld [ %fp + 0x4c ], %i2 20026c4: 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(); 20026c8: 40 00 1f af call 200a584 20026cc: ba 10 20 17 mov 0x17, %i5 if ( iop == 0 ) { 20026d0: b8 92 20 00 orcc %o0, 0, %i4 20026d4: 02 80 00 93 be 2002920 20026d8: 92 10 00 10 mov %l0, %o1 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 20026dc: b6 07 bf e4 add %fp, -28, %i3 20026e0: 90 10 00 18 mov %i0, %o0 20026e4: 94 10 00 1b mov %i3, %o2 20026e8: 7f ff fe 32 call 2001fb0 20026ec: 96 10 20 01 mov 1, %o3 pathname, eval_flags, &loc, true ); if ( status == -1 ) { 20026f0: 80 a2 3f ff cmp %o0, -1 20026f4: 12 80 00 25 bne 2002788 20026f8: 82 0e 6a 00 and %i1, 0xa00, %g1 if ( errno != ENOENT ) { 20026fc: 40 00 2a 34 call 200cfcc <__errno> 2002700: 01 00 00 00 nop 2002704: c2 02 00 00 ld [ %o0 ], %g1 2002708: 80 a0 60 02 cmp %g1, 2 200270c: 12 80 00 11 bne 2002750 2002710: 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) ) { 2002714: 80 8e 62 00 btst 0x200, %i1 2002718: ba 10 20 02 mov 2, %i5 200271c: 02 80 00 6f be 20028d8 2002720: 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 ); 2002724: 13 3f ff e0 sethi %hi(0xffff8000), %o1 2002728: 90 10 00 18 mov %i0, %o0 200272c: 92 16 80 09 or %i2, %o1, %o1 2002730: 94 10 20 00 clr %o2 2002734: 93 2a 60 10 sll %o1, 0x10, %o1 2002738: 96 10 20 00 clr %o3 200273c: 7f ff fe cd call 2002270 2002740: 93 32 60 10 srl %o1, 0x10, %o1 if ( rc ) { 2002744: 80 a2 20 00 cmp %o0, 0 2002748: 02 80 00 06 be 2002760 200274c: 94 10 00 1b mov %i3, %o2 rc = errno; 2002750: 40 00 2a 1f call 200cfcc <__errno> 2002754: 01 00 00 00 nop 2002758: 10 80 00 5c b 20028c8 200275c: 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 ); 2002760: 90 10 00 18 mov %i0, %o0 2002764: 92 10 20 00 clr %o1 2002768: 96 10 20 01 mov 1, %o3 200276c: 7f ff fe 11 call 2001fb0 2002770: ba 10 20 0d mov 0xd, %i5 if ( status != 0 ) { /* The file did not exist */ 2002774: 80 a2 20 00 cmp %o0, 0 2002778: 12 80 00 58 bne 20028d8 200277c: 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; 2002780: 10 80 00 07 b 200279c 2002784: 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)) { 2002788: a0 10 00 1b mov %i3, %l0 200278c: 80 a0 6a 00 cmp %g1, 0xa00 2002790: 02 80 00 52 be 20028d8 2002794: 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; 2002798: c2 07 bf e8 ld [ %fp + -24 ], %g1 iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 200279c: 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; 20027a0: c2 27 20 30 st %g1, [ %i4 + 0x30 ] iop->file_info = loc.node_access; 20027a4: c2 07 bf e4 ld [ %fp + -28 ], %g1 iop->flags |= rtems_libio_fcntl_flags( flags ); 20027a8: 90 10 00 19 mov %i1, %o0 20027ac: 40 00 1f ac call 200a65c 20027b0: c2 27 20 2c st %g1, [ %i4 + 0x2c ] 20027b4: 90 12 00 10 or %o0, %l0, %o0 iop->pathinfo = loc; 20027b8: 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 ); 20027bc: d0 27 20 0c st %o0, [ %i4 + 0xc ] iop->pathinfo = loc; 20027c0: a0 07 bf e4 add %fp, -28, %l0 20027c4: 90 07 20 10 add %i4, 0x10, %o0 20027c8: 40 00 2b f3 call 200d794 20027cc: 92 10 00 10 mov %l0, %o1 if ( !iop->handlers->open_h ) { 20027d0: c2 07 20 30 ld [ %i4 + 0x30 ], %g1 20027d4: c2 00 40 00 ld [ %g1 ], %g1 20027d8: 80 a0 60 00 cmp %g1, 0 20027dc: 02 80 00 67 be 2002978 20027e0: 92 10 00 18 mov %i0, %o1 rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 20027e4: 96 10 00 1a mov %i2, %o3 20027e8: 90 10 00 1c mov %i4, %o0 20027ec: 9f c0 40 00 call %g1 20027f0: 94 10 00 19 mov %i1, %o2 if ( rc ) 20027f4: ba 92 20 00 orcc %o0, 0, %i5 20027f8: 12 80 00 39 bne 20028dc 20027fc: 80 a7 20 00 cmp %i4, 0 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 2002800: 80 8e 64 00 btst 0x400, %i1 2002804: 02 80 00 4c be 2002934 2002808: 03 00 80 5d sethi %hi(0x2017400), %g1 rc = ftruncate( iop - rtems_libio_iops, 0 ); 200280c: c4 00 61 14 ld [ %g1 + 0x114 ], %g2 ! 2017514 2002810: 92 10 20 00 clr %o1 2002814: 84 27 00 02 sub %i4, %g2, %g2 2002818: 85 38 a0 02 sra %g2, 2, %g2 200281c: 87 28 a0 02 sll %g2, 2, %g3 2002820: 83 28 a0 06 sll %g2, 6, %g1 2002824: 82 20 40 03 sub %g1, %g3, %g1 2002828: 91 28 60 06 sll %g1, 6, %o0 200282c: 90 22 00 01 sub %o0, %g1, %o0 2002830: 83 2a 20 0c sll %o0, 0xc, %g1 2002834: 90 02 00 01 add %o0, %g1, %o0 2002838: 90 02 00 02 add %o0, %g2, %o0 200283c: 91 2a 20 04 sll %o0, 4, %o0 2002840: 90 22 00 02 sub %o0, %g2, %o0 2002844: 91 2a 20 02 sll %o0, 2, %o0 2002848: 40 00 1e 7b call 200a234 200284c: 90 20 80 08 sub %g2, %o0, %o0 if ( rc ) { 2002850: ba 92 20 00 orcc %o0, 0, %i5 2002854: 02 80 00 38 be 2002934 2002858: 03 00 80 5d sethi %hi(0x2017400), %g1 if(errno) rc = errno; 200285c: 40 00 29 dc call 200cfcc <__errno> <== NOT EXECUTED 2002860: 01 00 00 00 nop <== NOT EXECUTED 2002864: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 2002868: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200286c: 02 80 00 06 be 2002884 <== NOT EXECUTED 2002870: 03 00 80 5d sethi %hi(0x2017400), %g1 <== NOT EXECUTED 2002874: 40 00 29 d6 call 200cfcc <__errno> <== NOT EXECUTED 2002878: 01 00 00 00 nop <== NOT EXECUTED 200287c: fa 02 00 00 ld [ %o0 ], %i5 <== NOT EXECUTED close( iop - rtems_libio_iops ); 2002880: 03 00 80 5d sethi %hi(0x2017400), %g1 <== NOT EXECUTED 2002884: c4 00 61 14 ld [ %g1 + 0x114 ], %g2 ! 2017514 <== NOT EXECUTED 2002888: 84 27 00 02 sub %i4, %g2, %g2 <== NOT EXECUTED 200288c: 85 38 a0 02 sra %g2, 2, %g2 <== NOT EXECUTED 2002890: 87 28 a0 02 sll %g2, 2, %g3 <== NOT EXECUTED 2002894: 83 28 a0 06 sll %g2, 6, %g1 <== NOT EXECUTED 2002898: 82 20 40 03 sub %g1, %g3, %g1 <== NOT EXECUTED 200289c: 91 28 60 06 sll %g1, 6, %o0 <== NOT EXECUTED 20028a0: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED 20028a4: 83 2a 20 0c sll %o0, 0xc, %g1 <== NOT EXECUTED 20028a8: b8 10 20 00 clr %i4 <== NOT EXECUTED 20028ac: 90 02 00 01 add %o0, %g1, %o0 <== NOT EXECUTED 20028b0: 90 02 00 02 add %o0, %g2, %o0 <== NOT EXECUTED 20028b4: 91 2a 20 04 sll %o0, 4, %o0 <== NOT EXECUTED 20028b8: 90 22 00 02 sub %o0, %g2, %o0 <== NOT EXECUTED 20028bc: 91 2a 20 02 sll %o0, 2, %o0 <== NOT EXECUTED 20028c0: 40 00 1e 00 call 200a0c0 <== NOT EXECUTED 20028c4: 90 20 80 08 sub %g2, %o0, %o0 <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 20028c8: 80 a7 60 00 cmp %i5, 0 20028cc: 02 80 00 1a be 2002934 20028d0: 03 00 80 5d sethi %hi(0x2017400), %g1 20028d4: a0 10 20 00 clr %l0 if ( iop ) 20028d8: 80 a7 20 00 cmp %i4, 0 20028dc: 02 80 00 05 be 20028f0 20028e0: 80 a4 20 00 cmp %l0, 0 rtems_libio_free( iop ); 20028e4: 40 00 1f 10 call 200a524 20028e8: 90 10 00 1c mov %i4, %o0 if ( loc_to_free ) 20028ec: 80 a4 20 00 cmp %l0, 0 20028f0: 02 80 00 0c be 2002920 20028f4: 01 00 00 00 nop rtems_filesystem_freenode( loc_to_free ); 20028f8: c2 04 20 08 ld [ %l0 + 8 ], %g1 20028fc: 80 a0 60 00 cmp %g1, 0 2002900: 02 80 00 08 be 2002920 2002904: 01 00 00 00 nop 2002908: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 200290c: 80 a0 60 00 cmp %g1, 0 2002910: 02 80 00 04 be 2002920 2002914: 01 00 00 00 nop 2002918: 9f c0 40 00 call %g1 200291c: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( rc ); 2002920: 40 00 29 ab call 200cfcc <__errno> 2002924: b0 10 3f ff mov -1, %i0 2002928: fa 22 00 00 st %i5, [ %o0 ] 200292c: 81 c7 e0 08 ret 2002930: 81 e8 00 00 restore } return iop - rtems_libio_iops; 2002934: c6 00 61 14 ld [ %g1 + 0x114 ], %g3 2002938: 86 27 00 03 sub %i4, %g3, %g3 200293c: 87 38 e0 02 sra %g3, 2, %g3 2002940: 83 28 e0 02 sll %g3, 2, %g1 2002944: 85 28 e0 06 sll %g3, 6, %g2 2002948: 84 20 80 01 sub %g2, %g1, %g2 200294c: 83 28 a0 06 sll %g2, 6, %g1 2002950: 82 20 40 02 sub %g1, %g2, %g1 2002954: 85 28 60 0c sll %g1, 0xc, %g2 2002958: 82 00 40 02 add %g1, %g2, %g1 200295c: 82 00 40 03 add %g1, %g3, %g1 2002960: 83 28 60 04 sll %g1, 4, %g1 2002964: 82 20 40 03 sub %g1, %g3, %g1 2002968: 83 28 60 02 sll %g1, 2, %g1 200296c: b0 20 c0 01 sub %g3, %g1, %i0 } 2002970: 81 c7 e0 08 ret 2002974: 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; 2002978: 10 bf ff d8 b 20028d8 <== NOT EXECUTED 200297c: ba 10 20 86 mov 0x86, %i5 <== NOT EXECUTED 0200261c : /* * This is a replaceable stub */ void open_dev_console(void) { 200261c: 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) { 2002620: 21 00 80 55 sethi %hi(0x2015400), %l0 2002624: 92 10 20 00 clr %o1 2002628: 90 14 21 e0 or %l0, 0x1e0, %o0 200262c: 40 00 00 19 call 2002690 2002630: 94 10 20 00 clr %o2 2002634: 80 a2 3f ff cmp %o0, -1 2002638: 02 80 00 14 be 2002688 200263c: 90 14 21 e0 or %l0, 0x1e0, %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) 2002640: 92 10 20 01 mov 1, %o1 2002644: 40 00 00 13 call 2002690 2002648: 94 10 20 00 clr %o2 200264c: 80 a2 3f ff cmp %o0, -1 2002650: 32 80 00 05 bne,a 2002664 2002654: 90 14 21 e0 or %l0, 0x1e0, %o0 rtems_fatal_error_occurred( error_code | '1' ); 2002658: 11 14 d5 11 sethi %hi(0x53544400), %o0 <== NOT EXECUTED 200265c: 10 80 00 09 b 2002680 <== NOT EXECUTED 2002660: 90 12 20 31 or %o0, 0x31, %o0 ! 53544431 <== NOT EXECUTED if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 2002664: 92 10 20 01 mov 1, %o1 2002668: 40 00 00 0a call 2002690 200266c: 94 10 20 00 clr %o2 2002670: 80 a2 3f ff cmp %o0, -1 2002674: 12 80 00 05 bne 2002688 2002678: 11 14 d5 11 sethi %hi(0x53544400), %o0 rtems_fatal_error_occurred( error_code | '2' ); 200267c: 90 12 20 32 or %o0, 0x32, %o0 ! 53544432 <== NOT EXECUTED 2002680: 40 00 0d 35 call 2005b54 <== NOT EXECUTED 2002684: 01 00 00 00 nop <== NOT EXECUTED 2002688: 81 c7 e0 08 ret 200268c: 81 e8 00 00 restore 0201f8b0 : * open a directory. */ DIR * opendir( const char *name ) { 201f8b0: 9d e3 bf 98 save %sp, -104, %sp register DIR *dirp; register int fd; if ((fd = open(name, 0)) == -1) 201f8b4: 92 10 20 00 clr %o1 201f8b8: 90 10 00 18 mov %i0, %o0 201f8bc: 7f ff 96 b8 call 200539c 201f8c0: b0 10 20 00 clr %i0 201f8c4: 80 a2 3f ff cmp %o0, -1 201f8c8: 02 80 00 17 be 201f924 201f8cc: a0 10 00 08 mov %o0, %l0 return NULL; if (fcntl(fd, F_SETFD, 1) == -1 || 201f8d0: 92 10 20 02 mov 2, %o1 201f8d4: 40 00 2f b5 call 202b7a8 201f8d8: 94 10 20 01 mov 1, %o2 201f8dc: 80 a2 3f ff cmp %o0, -1 201f8e0: 02 80 00 0f be 201f91c 201f8e4: 90 10 00 10 mov %l0, %o0 201f8e8: 7f ff 94 84 call 2004af8 201f8ec: 90 10 20 18 mov 0x18, %o0 201f8f0: b0 92 20 00 orcc %o0, 0, %i0 201f8f4: 02 80 00 0a be 201f91c 201f8f8: 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); 201f8fc: 7f ff 94 7f call 2004af8 201f900: 90 10 22 00 mov 0x200, %o0 dirp->dd_len = 512; 201f904: 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); 201f908: d0 26 20 0c st %o0, [ %i0 + 0xc ] dirp->dd_len = 512; if (dirp->dd_buf == NULL) { 201f90c: 80 a2 20 00 cmp %o0, 0 201f910: 12 80 00 07 bne 201f92c 201f914: c2 26 20 10 st %g1, [ %i0 + 0x10 ] close (fd); 201f918: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 201f91c: 7f ff 92 33 call 20041e8 <== NOT EXECUTED 201f920: b0 10 20 00 clr %i0 <== NOT EXECUTED 201f924: 81 c7 e0 08 ret <== NOT EXECUTED 201f928: 81 e8 00 00 restore <== NOT EXECUTED return NULL; } dirp->dd_fd = fd; 201f92c: e0 26 00 00 st %l0, [ %i0 ] dirp->dd_loc = 0; 201f930: c0 26 20 04 clr [ %i0 + 4 ] dirp->dd_seek = 0; 201f934: c0 26 20 14 clr [ %i0 + 0x14 ] /* * Set up seek point for rewinddir. */ return dirp; } 201f938: 81 c7 e0 08 ret 201f93c: 81 e8 00 00 restore 0200345c : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 200345c: 9d e3 bf 98 save %sp, -104, %sp int i; if (tty->termios.c_oflag & OPOST) { 2003460: c8 06 60 34 ld [ %i1 + 0x34 ], %g4 2003464: 80 89 20 01 btst 1, %g4 2003468: 02 80 00 59 be 20035cc 200346c: f0 2f a0 44 stb %i0, [ %fp + 0x44 ] switch (c) { 2003470: 82 0e 20 ff and %i0, 0xff, %g1 2003474: 80 a0 60 09 cmp %g1, 9 2003478: 22 80 00 2b be,a 2003524 200347c: c6 06 60 28 ld [ %i1 + 0x28 ], %g3 2003480: 18 80 00 07 bgu 200349c 2003484: 80 a0 60 0a cmp %g1, 0xa 2003488: 80 a0 60 08 cmp %g1, 8 <== NOT EXECUTED 200348c: 12 80 00 3c bne 200357c <== NOT EXECUTED 2003490: 80 89 20 02 btst 2, %g4 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 2003494: 10 80 00 35 b 2003568 <== NOT EXECUTED 2003498: 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) { 200349c: 02 80 00 06 be 20034b4 20034a0: 80 a0 60 0d cmp %g1, 0xd 20034a4: 32 80 00 36 bne,a 200357c 20034a8: 80 89 20 02 btst 2, %g4 tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 20034ac: 10 80 00 10 b 20034ec <== NOT EXECUTED 20034b0: 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) 20034b4: 80 89 20 20 btst 0x20, %g4 20034b8: 32 80 00 02 bne,a 20034c0 20034bc: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED tty->column = 0; if (tty->termios.c_oflag & ONLCR) { 20034c0: c2 06 60 34 ld [ %i1 + 0x34 ], %g1 20034c4: 80 88 60 04 btst 4, %g1 20034c8: 02 80 00 42 be 20035d0 20034cc: 94 10 00 19 mov %i1, %o2 rtems_termios_puts ("\r", 1, tty); 20034d0: 11 00 80 56 sethi %hi(0x2015800), %o0 20034d4: 92 10 20 01 mov 1, %o1 20034d8: 90 12 21 88 or %o0, 0x188, %o0 20034dc: 7f ff ff 94 call 200332c 20034e0: 94 10 00 19 mov %i1, %o2 c = '\n'; if (tty->termios.c_oflag & ONLRET) tty->column = 0; break; } tty->column = 0; 20034e4: 10 80 00 3a b 20035cc 20034e8: c0 26 60 28 clr [ %i1 + 0x28 ] tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 20034ec: 02 80 00 06 be 2003504 <== NOT EXECUTED 20034f0: 80 89 20 08 btst 8, %g4 <== NOT EXECUTED 20034f4: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 20034f8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20034fc: 02 80 00 17 be 2003558 <== NOT EXECUTED 2003500: 80 89 20 08 btst 8, %g4 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 2003504: 22 80 00 32 be,a 20035cc <== NOT EXECUTED 2003508: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED c = '\n'; 200350c: 82 10 20 0a mov 0xa, %g1 <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 2003510: 80 89 20 20 btst 0x20, %g4 <== NOT EXECUTED 2003514: 02 80 00 2e be 20035cc <== NOT EXECUTED 2003518: c2 2f a0 44 stb %g1, [ %fp + 0x44 ] <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; 200351c: 10 80 00 2c b 20035cc <== NOT EXECUTED 2003520: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { 2003524: 05 00 00 06 sethi %hi(0x1800), %g2 2003528: 82 09 00 02 and %g4, %g2, %g1 200352c: 80 a0 40 02 cmp %g1, %g2 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 2003530: 84 08 e0 07 and %g3, 7, %g2 2003534: 82 10 20 08 mov 8, %g1 2003538: 92 20 40 02 sub %g1, %g2, %o1 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 200353c: 12 80 00 09 bne 2003560 2003540: 84 02 40 03 add %o1, %g3, %g2 tty->column += i; 2003544: c4 26 60 28 st %g2, [ %i1 + 0x28 ] rtems_termios_puts ( " ", i, tty); 2003548: 94 10 00 19 mov %i1, %o2 200354c: 11 00 80 56 sethi %hi(0x2015800), %o0 2003550: 7f ff ff 77 call 200332c 2003554: 90 12 21 90 or %o0, 0x190, %o0 ! 2015990 2003558: 81 c7 e0 08 ret 200355c: 81 e8 00 00 restore return; } tty->column += i; 2003560: 10 80 00 1b b 20035cc <== NOT EXECUTED 2003564: c4 26 60 28 st %g2, [ %i1 + 0x28 ] <== NOT EXECUTED break; case '\b': if (tty->column > 0) 2003568: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200356c: 04 80 00 18 ble 20035cc <== NOT EXECUTED 2003570: 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++; 2003574: 10 80 00 16 b 20035cc <== NOT EXECUTED 2003578: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 200357c: 02 80 00 0b be 20035a8 2003580: c4 0f a0 44 ldub [ %fp + 0x44 ], %g2 c = toupper(c); 2003584: 03 00 80 5b sethi %hi(0x2016c00), %g1 <== NOT EXECUTED 2003588: c2 00 61 c8 ld [ %g1 + 0x1c8 ], %g1 ! 2016dc8 <__ctype_ptr> <== NOT EXECUTED 200358c: b0 0e 20 ff and %i0, 0xff, %i0 <== NOT EXECUTED 2003590: c2 08 40 18 ldub [ %g1 + %i0 ], %g1 <== NOT EXECUTED 2003594: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 2003598: 32 80 00 02 bne,a 20035a0 <== NOT EXECUTED 200359c: b0 06 3f e0 add %i0, -32, %i0 <== NOT EXECUTED 20035a0: f0 2f a0 44 stb %i0, [ %fp + 0x44 ] <== NOT EXECUTED if (!iscntrl(c)) 20035a4: c4 0f a0 44 ldub [ %fp + 0x44 ], %g2 <== NOT EXECUTED 20035a8: 03 00 80 5b sethi %hi(0x2016c00), %g1 20035ac: c2 00 61 c8 ld [ %g1 + 0x1c8 ], %g1 ! 2016dc8 <__ctype_ptr> 20035b0: c2 08 40 02 ldub [ %g1 + %g2 ], %g1 20035b4: 80 88 60 20 btst 0x20, %g1 20035b8: 12 80 00 06 bne 20035d0 20035bc: 94 10 00 19 mov %i1, %o2 tty->column++; 20035c0: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 20035c4: 82 00 60 01 inc %g1 20035c8: c2 26 60 28 st %g1, [ %i1 + 0x28 ] break; } } rtems_termios_puts (&c, 1, tty); 20035cc: 94 10 00 19 mov %i1, %o2 20035d0: 90 07 a0 44 add %fp, 0x44, %o0 20035d4: 7f ff ff 56 call 200332c 20035d8: 92 10 20 01 mov 1, %o1 20035dc: 81 c7 e0 08 ret 20035e0: 81 e8 00 00 restore 02006178 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 2006178: 9d e3 bf 60 save %sp, -160, %sp 200617c: 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 ) 2006180: 80 a6 a0 00 cmp %i2, 0 2006184: 02 80 00 7b be 2006370 2006188: b0 10 20 0e mov 0xe, %i0 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 200618c: 03 00 80 66 sethi %hi(0x2019800), %g1 2006190: 80 a6 60 00 cmp %i1, 0 2006194: 02 80 00 03 be 20061a0 2006198: a4 10 62 e0 or %g1, 0x2e0, %l2 200619c: a4 10 00 19 mov %i1, %l2 if ( !the_attr->is_initialized ) 20061a0: c2 04 80 00 ld [ %l2 ], %g1 20061a4: 80 a0 60 00 cmp %g1, 0 20061a8: 22 80 00 72 be,a 2006370 20061ac: 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) ) 20061b0: c2 04 a0 04 ld [ %l2 + 4 ], %g1 20061b4: 80 a0 60 00 cmp %g1, 0 20061b8: 02 80 00 07 be 20061d4 20061bc: 03 00 80 6a sethi %hi(0x201a800), %g1 20061c0: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 201aaf0 20061c4: c2 04 a0 08 ld [ %l2 + 8 ], %g1 20061c8: 80 a0 40 02 cmp %g1, %g2 20061cc: 2a 80 00 69 bcs,a 2006370 20061d0: 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 ) { 20061d4: c2 04 a0 10 ld [ %l2 + 0x10 ], %g1 20061d8: 80 a0 60 01 cmp %g1, 1 20061dc: 02 80 00 06 be 20061f4 20061e0: 80 a0 60 02 cmp %g1, 2 20061e4: 12 80 00 63 bne 2006370 20061e8: b0 10 20 16 mov 0x16, %i0 schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 20061ec: 10 80 00 0a b 2006214 20061f0: 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 ]; 20061f4: 03 00 80 6e sethi %hi(0x201b800), %g1 20061f8: c2 00 61 b4 ld [ %g1 + 0x1b4 ], %g1 ! 201b9b4 <_Thread_Executing> schedpolicy = api->schedpolicy; schedparam = api->schedparam; 20061fc: 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 ]; 2006200: c2 00 61 6c ld [ %g1 + 0x16c ], %g1 schedpolicy = api->schedpolicy; schedparam = api->schedparam; 2006204: 94 10 20 18 mov 0x18, %o2 2006208: 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; 200620c: 10 80 00 05 b 2006220 2006210: e6 00 60 7c ld [ %g1 + 0x7c ], %l3 schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; schedparam = the_attr->schedparam; 2006214: 90 07 bf e0 add %fp, -32, %o0 2006218: 92 04 a0 18 add %l2, 0x18, %o1 200621c: 94 10 20 18 mov 0x18, %o2 2006220: 40 00 24 dc call 200f590 2006224: 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 ) 2006228: c2 04 a0 0c ld [ %l2 + 0xc ], %g1 200622c: 80 a0 60 00 cmp %g1, 0 2006230: 12 80 00 50 bne 2006370 2006234: ea 07 bf e0 ld [ %fp + -32 ], %l5 /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 2006238: 82 05 7f ff add %l5, -1, %g1 200623c: 80 a0 60 fd cmp %g1, 0xfd 2006240: 18 80 00 7e bgu 2006438 2006244: 80 a4 e0 01 cmp %l3, 1 */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 2006248: 02 80 00 10 be 2006288 200624c: a2 10 20 00 clr %l1 2006250: 14 80 00 08 bg 2006270 2006254: 80 a4 e0 02 cmp %l3, 2 2006258: 80 a4 e0 00 cmp %l3, 0 200625c: a2 10 20 01 mov 1, %l1 2006260: 02 80 00 1a be 20062c8 2006264: a0 10 20 00 clr %l0 */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; 2006268: 81 c7 e0 08 ret 200626c: 91 e8 20 16 restore %g0, 0x16, %o0 */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 2006270: 02 80 00 05 be 2006284 2006274: 80 a4 e0 03 cmp %l3, 3 2006278: 12 80 00 3e bne 2006370 200627c: b0 10 20 16 mov 0x16, %i0 2006280: 30 80 00 04 b,a 2006290 2006284: a2 10 20 02 mov 2, %l1 <== NOT EXECUTED 2006288: 10 80 00 10 b 20062c8 200628c: 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 ) < 2006290: 40 00 11 0e call 200a6c8 <_Timespec_To_ticks> 2006294: 90 07 bf e8 add %fp, -24, %o0 2006298: a0 10 00 08 mov %o0, %l0 200629c: 40 00 11 0b call 200a6c8 <_Timespec_To_ticks> 20062a0: 90 07 bf f0 add %fp, -16, %o0 20062a4: 80 a4 00 08 cmp %l0, %o0 20062a8: 0a 80 00 64 bcs 2006438 20062ac: 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 ) ) 20062b0: 82 00 7f ff add %g1, -1, %g1 20062b4: 80 a0 60 fd cmp %g1, 0xfd 20062b8: 18 80 00 60 bgu 2006438 20062bc: 03 00 80 19 sethi %hi(0x2006400), %g1 20062c0: a2 10 20 03 mov 3, %l1 20062c4: a0 10 63 80 or %g1, 0x380, %l0 #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 20062c8: 29 00 80 6e sethi %hi(0x201b800), %l4 20062cc: 40 00 06 f1 call 2007e90 <_API_Mutex_Lock> 20062d0: d0 05 21 ac ld [ %l4 + 0x1ac ], %o0 ! 201b9ac <_RTEMS_Allocator_Mutex> * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 20062d4: 11 00 80 6e sethi %hi(0x201b800), %o0 20062d8: 40 00 09 58 call 2008838 <_Objects_Allocate> 20062dc: 90 12 23 80 or %o0, 0x380, %o0 ! 201bb80 <_POSIX_Threads_Information> * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 20062e0: b2 92 20 00 orcc %o0, 0, %i1 20062e4: 32 80 00 04 bne,a 20062f4 20062e8: c4 04 a0 08 ld [ %l2 + 8 ], %g2 _RTEMS_Unlock_allocator(); 20062ec: 10 80 00 1f b 2006368 20062f0: d0 05 21 ac ld [ %l4 + 0x1ac ], %o0 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 20062f4: 03 00 80 6a sethi %hi(0x201a800), %g1 20062f8: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1 ! 201aaf0 20062fc: c0 27 bf dc clr [ %fp + -36 ] 2006300: 97 28 60 01 sll %g1, 1, %o3 2006304: 80 a2 c0 02 cmp %o3, %g2 2006308: 1a 80 00 03 bcc 2006314 200630c: d4 04 a0 04 ld [ %l2 + 4 ], %o2 2006310: 96 10 00 02 mov %g2, %o3 2006314: 82 07 bf dc add %fp, -36, %g1 2006318: e2 23 a0 60 st %l1, [ %sp + 0x60 ] 200631c: e0 23 a0 64 st %l0, [ %sp + 0x64 ] 2006320: c0 23 a0 68 clr [ %sp + 0x68 ] 2006324: 9a 10 20 ff mov 0xff, %o5 2006328: a2 10 20 01 mov 1, %l1 200632c: 9a 23 40 15 sub %o5, %l5, %o5 2006330: e2 23 a0 5c st %l1, [ %sp + 0x5c ] 2006334: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 2006338: 21 00 80 6e sethi %hi(0x201b800), %l0 200633c: 92 10 00 19 mov %i1, %o1 2006340: 90 14 23 80 or %l0, 0x380, %o0 2006344: 40 00 0d 27 call 20097e0 <_Thread_Initialize> 2006348: 98 10 20 01 mov 1, %o4 budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 200634c: 80 8a 20 ff btst 0xff, %o0 2006350: 12 80 00 0a bne 2006378 2006354: 90 14 23 80 or %l0, 0x380, %o0 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 2006358: 40 00 0a 25 call 2008bec <_Objects_Free> 200635c: 92 10 00 19 mov %i1, %o1 _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 2006360: 03 00 80 6e sethi %hi(0x201b800), %g1 2006364: d0 00 61 ac ld [ %g1 + 0x1ac ], %o0 ! 201b9ac <_RTEMS_Allocator_Mutex> 2006368: 40 00 06 e0 call 2007ee8 <_API_Mutex_Unlock> 200636c: b0 10 20 0b mov 0xb, %i0 2006370: 81 c7 e0 08 ret 2006374: 81 e8 00 00 restore /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 2006378: e0 06 61 6c ld [ %i1 + 0x16c ], %l0 api->Attributes = *the_attr; 200637c: 92 10 00 12 mov %l2, %o1 2006380: 94 10 20 38 mov 0x38, %o2 2006384: 40 00 24 83 call 200f590 2006388: 90 10 00 10 mov %l0, %o0 api->detachstate = the_attr->detachstate; 200638c: c2 04 a0 34 ld [ %l2 + 0x34 ], %g1 api->schedpolicy = schedpolicy; api->schedparam = schedparam; 2006390: 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; 2006394: c2 24 20 38 st %g1, [ %l0 + 0x38 ] api->schedpolicy = schedpolicy; api->schedparam = schedparam; 2006398: 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; 200639c: e6 24 20 7c st %l3, [ %l0 + 0x7c ] api->schedparam = schedparam; 20063a0: 40 00 24 7c call 200f590 20063a4: 90 04 20 80 add %l0, 0x80, %o0 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 20063a8: 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; 20063ac: e2 2e 60 75 stb %l1, [ %i1 + 0x75 ] /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 20063b0: 96 10 00 1b mov %i3, %o3 20063b4: 90 10 00 19 mov %i1, %o0 20063b8: 92 10 20 01 mov 1, %o1 20063bc: 40 00 10 0a call 200a3e4 <_Thread_Start> 20063c0: 98 10 20 00 clr %o4 start_routine, arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { 20063c4: 80 a4 e0 03 cmp %l3, 3 20063c8: 12 80 00 09 bne 20063ec 20063cc: a2 10 00 08 mov %o0, %l1 _Watchdog_Insert_ticks( 20063d0: 40 00 10 be call 200a6c8 <_Timespec_To_ticks> 20063d4: 90 04 20 88 add %l0, 0x88, %o0 20063d8: 92 04 20 9c add %l0, 0x9c, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 20063dc: d0 24 20 a8 st %o0, [ %l0 + 0xa8 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 20063e0: 11 00 80 6e sethi %hi(0x201b800), %o0 20063e4: 40 00 11 b5 call 200aab8 <_Watchdog_Insert> 20063e8: 90 12 21 d4 or %o0, 0x1d4, %o0 ! 201b9d4 <_Watchdog_Ticks_chain> * * NOTE: This can only happen if someone slips in and touches the * thread while we are creating it. */ if ( !status ) { 20063ec: 80 8c 60 ff btst 0xff, %l1 20063f0: 12 80 00 0b bne 200641c 20063f4: 21 00 80 6e sethi %hi(0x201b800), %l0 20063f8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 20063fc: 11 00 80 6e sethi %hi(0x201b800), %o0 <== NOT EXECUTED 2006400: 40 00 09 fb call 2008bec <_Objects_Free> <== NOT EXECUTED 2006404: 90 12 23 80 or %o0, 0x380, %o0 ! 201bb80 <_POSIX_Threads_Information> <== NOT EXECUTED _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 2006408: d0 04 21 ac ld [ %l0 + 0x1ac ], %o0 <== NOT EXECUTED 200640c: 40 00 06 b7 call 2007ee8 <_API_Mutex_Unlock> <== NOT EXECUTED 2006410: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED 2006414: 81 c7 e0 08 ret <== NOT EXECUTED 2006418: 81 e8 00 00 restore <== NOT EXECUTED /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 200641c: c2 06 60 08 ld [ %i1 + 8 ], %g1 _RTEMS_Unlock_allocator(); 2006420: d0 04 21 ac ld [ %l0 + 0x1ac ], %o0 /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 2006424: c2 25 80 00 st %g1, [ %l6 ] _RTEMS_Unlock_allocator(); 2006428: 40 00 06 b0 call 2007ee8 <_API_Mutex_Unlock> 200642c: b0 10 20 00 clr %i0 2006430: 81 c7 e0 08 ret 2006434: 81 e8 00 00 restore return 0; 2006438: b0 10 20 16 mov 0x16, %i0 } 200643c: 81 c7 e0 08 ret 2006440: 81 e8 00 00 restore 02005188 : int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 2005188: 9d e3 bf 98 save %sp, -104, %sp 200518c: 03 00 80 56 sethi %hi(0x2015800), %g1 2005190: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 ! 2015850 <_Thread_Dispatch_disable_level> 2005194: 84 00 a0 01 inc %g2 2005198: c4 20 60 50 st %g2, [ %g1 + 0x50 ] * _POSIX_Keys_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ) { return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information ); 200519c: 11 00 80 57 sethi %hi(0x2015c00), %o0 20051a0: 40 00 09 6e call 2007758 <_Objects_Allocate> 20051a4: 90 12 20 a4 or %o0, 0xa4, %o0 ! 2015ca4 <_POSIX_Keys_Information> _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 20051a8: a0 92 20 00 orcc %o0, 0, %l0 20051ac: 32 80 00 06 bne,a 20051c4 20051b0: f2 24 20 14 st %i1, [ %l0 + 0x14 ] _Thread_Enable_dispatch(); 20051b4: 40 00 0d 04 call 20085c4 <_Thread_Enable_dispatch> 20051b8: b0 10 20 0b mov 0xb, %i0 20051bc: 81 c7 e0 08 ret 20051c0: 81 e8 00 00 restore for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 20051c4: 03 00 80 55 sethi %hi(0x2015400), %g1 if ( !the_key ) { _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 20051c8: a2 10 00 10 mov %l0, %l1 for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 20051cc: a6 10 63 b0 or %g1, 0x3b0, %l3 if ( !the_key ) { _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 20051d0: b2 10 20 01 mov 1, %i1 for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 20051d4: 83 2e 60 02 sll %i1, 2, %g1 20051d8: c2 04 c0 01 ld [ %l3 + %g1 ], %g1 20051dc: 80 a0 60 00 cmp %g1, 0 20051e0: 22 80 00 24 be,a 2005270 20051e4: c0 24 60 1c clr [ %l1 + 0x1c ] INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 20051e8: c2 00 60 04 ld [ %g1 + 4 ], %g1 20051ec: c2 10 60 10 lduh [ %g1 + 0x10 ], %g1 20051f0: 82 00 60 01 inc %g1 20051f4: a5 28 60 02 sll %g1, 2, %l2 (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); 20051f8: 40 00 12 70 call 2009bb8 <_Workspace_Allocate> 20051fc: 90 10 00 12 mov %l2, %o0 if ( !table ) { 2005200: 82 92 20 00 orcc %o0, 0, %g1 2005204: 32 80 00 16 bne,a 200525c 2005208: c2 24 60 1c st %g1, [ %l1 + 0x1c ] for ( --the_api; 200520c: 82 06 60 05 add %i1, 5, %g1 2005210: b2 06 7f ff add %i1, -1, %i1 2005214: 83 28 60 02 sll %g1, 2, %g1 2005218: 10 80 00 05 b 200522c 200521c: b0 04 00 01 add %l0, %g1, %i0 the_api >= 1; the_api-- ) 2005220: b2 06 7f ff add %i1, -1, %i1 <== NOT EXECUTED _Workspace_Free( the_key->Values[ the_api ] ); 2005224: 40 00 12 5e call 2009b9c <_Workspace_Free> <== NOT EXECUTED 2005228: 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; 200522c: 80 a6 60 00 cmp %i1, 0 2005230: 32 bf ff fc bne,a 2005220 2005234: 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 ); 2005238: 92 10 00 10 mov %l0, %o1 200523c: 11 00 80 57 sethi %hi(0x2015c00), %o0 2005240: 90 12 20 a4 or %o0, 0xa4, %o0 ! 2015ca4 <_POSIX_Keys_Information> 2005244: 40 00 0a 32 call 2007b0c <_Objects_Free> 2005248: b0 10 20 0c mov 0xc, %i0 the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 200524c: 40 00 0c de call 20085c4 <_Thread_Enable_dispatch> 2005250: 01 00 00 00 nop 2005254: 81 c7 e0 08 ret 2005258: 81 e8 00 00 restore return ENOMEM; } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); 200525c: 94 10 00 12 mov %l2, %o2 2005260: 40 00 25 5b call 200e7cc 2005264: 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++ ) { 2005268: 10 80 00 03 b 2005274 200526c: b2 06 60 01 inc %i1 2005270: 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; 2005274: 80 a6 60 05 cmp %i1, 5 2005278: 12 bf ff d7 bne 20051d4 200527c: a2 04 60 04 add %l1, 4, %l1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2005280: c6 04 20 08 ld [ %l0 + 8 ], %g3 2005284: 03 00 80 57 sethi %hi(0x2015c00), %g1 2005288: c4 00 60 c0 ld [ %g1 + 0xc0 ], %g2 ! 2015cc0 <_POSIX_Keys_Information+0x1c> 200528c: 03 00 00 3f sethi %hi(0xfc00), %g1 2005290: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2005294: 82 08 c0 01 and %g3, %g1, %g1 2005298: 83 28 60 02 sll %g1, 2, %g1 200529c: 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; 20052a0: c0 24 20 0c clr [ %l0 + 0xc ] } } the_key->is_active = TRUE; 20052a4: 82 10 20 01 mov 1, %g1 _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 20052a8: c6 26 00 00 st %g3, [ %i0 ] } } the_key->is_active = TRUE; 20052ac: 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(); 20052b0: 40 00 0c c5 call 20085c4 <_Thread_Enable_dispatch> 20052b4: b0 10 20 00 clr %i0 return 0; } 20052b8: 81 c7 e0 08 ret 20052bc: 81 e8 00 00 restore 020052c0 : */ int pthread_key_delete( pthread_key_t key ) { 20052c0: 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 *) 20052c4: 23 00 80 57 sethi %hi(0x2015c00), %l1 20052c8: 92 10 00 18 mov %i0, %o1 20052cc: 94 07 bf f4 add %fp, -12, %o2 20052d0: 40 00 0a 7c call 2007cc0 <_Objects_Get> 20052d4: 90 14 60 a4 or %l1, 0xa4, %o0 register POSIX_Keys_Control *the_key; Objects_Locations location; uint32_t the_api; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 20052d8: c2 07 bf f4 ld [ %fp + -12 ], %g1 20052dc: a0 10 00 08 mov %o0, %l0 20052e0: 80 a0 60 00 cmp %g1, 0 20052e4: 12 80 00 24 bne 2005374 20052e8: b0 10 20 16 mov 0x16, %i0 case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); 20052ec: 90 14 60 a4 or %l1, 0xa4, %o0 20052f0: 40 00 09 44 call 2007800 <_Objects_Close> 20052f4: 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 ] ) 20052f8: d0 04 20 1c ld [ %l0 + 0x1c ], %o0 20052fc: 80 a2 20 00 cmp %o0, 0 2005300: 02 80 00 04 be 2005310 2005304: c0 2c 20 10 clrb [ %l0 + 0x10 ] _Workspace_Free( the_key->Values[ the_api ] ); 2005308: 40 00 12 25 call 2009b9c <_Workspace_Free> 200530c: 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 ] ) 2005310: d0 04 20 20 ld [ %l0 + 0x20 ], %o0 2005314: 80 a2 20 00 cmp %o0, 0 2005318: 22 80 00 05 be,a 200532c 200531c: d0 04 20 24 ld [ %l0 + 0x24 ], %o0 <== NOT EXECUTED _Workspace_Free( the_key->Values[ the_api ] ); 2005320: 40 00 12 1f call 2009b9c <_Workspace_Free> 2005324: 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 ] ) 2005328: d0 04 20 24 ld [ %l0 + 0x24 ], %o0 200532c: 80 a2 20 00 cmp %o0, 0 2005330: 22 80 00 05 be,a 2005344 2005334: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED _Workspace_Free( the_key->Values[ the_api ] ); 2005338: 40 00 12 19 call 2009b9c <_Workspace_Free> 200533c: 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 ] ) 2005340: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 2005344: 80 a2 20 00 cmp %o0, 0 2005348: 02 80 00 05 be 200535c 200534c: 92 10 00 10 mov %l0, %o1 _Workspace_Free( the_key->Values[ the_api ] ); 2005350: 40 00 12 13 call 2009b9c <_Workspace_Free> <== NOT EXECUTED 2005354: 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 ); 2005358: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 200535c: 11 00 80 57 sethi %hi(0x2015c00), %o0 2005360: 90 12 20 a4 or %o0, 0xa4, %o0 ! 2015ca4 <_POSIX_Keys_Information> 2005364: 40 00 09 ea call 2007b0c <_Objects_Free> 2005368: 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(); 200536c: 40 00 0c 96 call 20085c4 <_Thread_Enable_dispatch> 2005370: 01 00 00 00 nop case OBJECTS_ERROR: break; } return EINVAL; } 2005374: 81 c7 e0 08 ret 2005378: 81 e8 00 00 restore 0202030c : int pthread_kill( pthread_t thread, int sig ) { 202030c: 9d e3 bf 90 save %sp, -112, %sp POSIX_API_Control *api; Thread_Control *the_thread; Objects_Locations location; if ( !sig ) 2020310: 80 a6 60 00 cmp %i1, 0 2020314: 02 80 00 06 be 202032c 2020318: 92 10 00 18 mov %i0, %o1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 202031c: a0 06 7f ff add %i1, -1, %l0 2020320: 80 a4 20 1f cmp %l0, 0x1f 2020324: 08 80 00 08 bleu 2020344 2020328: 11 00 80 9a sethi %hi(0x2026800), %o0 rtems_set_errno_and_return_minus_one( EINVAL ); 202032c: 7f ff d6 71 call 2015cf0 <__errno> 2020330: b0 10 3f ff mov -1, %i0 2020334: 82 10 20 16 mov 0x16, %g1 2020338: c2 22 00 00 st %g1, [ %o0 ] 202033c: 81 c7 e0 08 ret 2020340: 81 e8 00 00 restore RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 2020344: 94 07 bf f4 add %fp, -12, %o2 2020348: 7f ff ad 7c call 200b938 <_Objects_Get> 202034c: 90 12 23 10 or %o0, 0x310, %o0 the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 2020350: c2 07 bf f4 ld [ %fp + -12 ], %g1 2020354: 80 a0 60 00 cmp %g1, 0 2020358: 12 80 00 23 bne 20203e4 202035c: 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 ) { 2020360: 83 2e 60 02 sll %i1, 2, %g1 2020364: 85 2e 60 04 sll %i1, 4, %g2 2020368: 84 20 80 01 sub %g2, %g1, %g2 202036c: 03 00 80 9b sethi %hi(0x2026c00), %g1 2020370: 82 10 62 7c or %g1, 0x27c, %g1 ! 2026e7c <_POSIX_signals_Vectors> 2020374: 82 00 40 02 add %g1, %g2, %g1 2020378: c2 00 60 08 ld [ %g1 + 8 ], %g1 202037c: 80 a0 60 01 cmp %g1, 1 2020380: 02 80 00 15 be 20203d4 2020384: c6 02 21 6c ld [ %o0 + 0x16c ], %g3 return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 2020388: c4 00 e0 c8 ld [ %g3 + 0xc8 ], %g2 (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 202038c: 92 10 00 19 mov %i1, %o1 return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 2020390: b2 10 20 01 mov 1, %i1 2020394: 83 2e 40 10 sll %i1, %l0, %g1 2020398: 84 10 80 01 or %g2, %g1, %g2 (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 202039c: 94 10 20 00 clr %o2 20203a0: 7f ff ff 8f call 20201dc <_POSIX_signals_Unblock_thread> 20203a4: 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 ) ) 20203a8: 03 00 80 9a sethi %hi(0x2026800), %g1 20203ac: c2 00 60 e0 ld [ %g1 + 0xe0 ], %g1 ! 20268e0 <_ISR_Nest_level> 20203b0: 80 a0 60 00 cmp %g1, 0 20203b4: 02 80 00 08 be 20203d4 20203b8: f2 2e 20 75 stb %i1, [ %i0 + 0x75 ] 20203bc: 03 00 80 9a sethi %hi(0x2026800), %g1 20203c0: c2 00 61 04 ld [ %g1 + 0x104 ], %g1 ! 2026904 <_Thread_Executing> 20203c4: 80 a6 00 01 cmp %i0, %g1 20203c8: 12 80 00 03 bne 20203d4 20203cc: 03 00 80 9a sethi %hi(0x2026800), %g1 _ISR_Signals_to_thread_executing = TRUE; 20203d0: f2 28 61 98 stb %i1, [ %g1 + 0x198 ] ! 2026998 <_ISR_Signals_to_thread_executing> <== NOT EXECUTED } _Thread_Enable_dispatch(); 20203d4: 7f ff af df call 200c350 <_Thread_Enable_dispatch> 20203d8: b0 10 20 00 clr %i0 20203dc: 81 c7 e0 08 ret 20203e0: 81 e8 00 00 restore #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); 20203e4: 7f ff d6 43 call 2015cf0 <__errno> 20203e8: b0 10 3f ff mov -1, %i0 20203ec: 82 10 20 03 mov 3, %g1 20203f0: c2 22 00 00 st %g1, [ %o0 ] } 20203f4: 81 c7 e0 08 ret 20203f8: 81 e8 00 00 restore 0200703c : int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 200703c: 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; 2007040: 03 00 80 5b sethi %hi(0x2016c00), %g1 2007044: 80 a6 60 00 cmp %i1, 0 2007048: 02 80 00 03 be 2007054 200704c: a0 10 60 cc or %g1, 0xcc, %l0 2007050: a0 10 00 19 mov %i1, %l0 else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 2007054: 80 a6 20 00 cmp %i0, 0 2007058: 22 80 00 2f be,a 2007114 200705c: b0 10 20 16 mov 0x16, %i0 break; } } #endif if ( !the_attr->is_initialized ) 2007060: c2 04 00 00 ld [ %l0 ], %g1 2007064: 80 a0 60 00 cmp %g1, 0 2007068: 22 80 00 2b be,a 2007114 200706c: b0 10 20 16 mov 0x16, %i0 /* * XXX: Be careful about attributes when global!!! */ assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE ); 2007070: c2 04 20 04 ld [ %l0 + 4 ], %g1 2007074: 80 a0 60 00 cmp %g1, 0 2007078: 22 80 00 0a be,a 20070a0 200707c: c2 04 20 0c ld [ %l0 + 0xc ], %g1 2007080: 11 00 80 5b sethi %hi(0x2016c00), %o0 <== NOT EXECUTED 2007084: 15 00 80 5b sethi %hi(0x2016c00), %o2 <== NOT EXECUTED 2007088: 17 00 80 5b sethi %hi(0x2016c00), %o3 <== NOT EXECUTED 200708c: 90 12 20 e0 or %o0, 0xe0, %o0 <== NOT EXECUTED 2007090: 94 12 a1 60 or %o2, 0x160, %o2 <== NOT EXECUTED 2007094: 96 12 e1 28 or %o3, 0x128, %o3 <== NOT EXECUTED 2007098: 7f ff f3 b2 call 2003f60 <__assert_func> <== NOT EXECUTED 200709c: 92 10 20 68 mov 0x68, %o1 <== NOT EXECUTED /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 20070a0: 80 a0 60 01 cmp %g1, 1 20070a4: 02 80 00 08 be 20070c4 20070a8: 80 a0 60 02 cmp %g1, 2 20070ac: 02 80 00 08 be 20070cc 20070b0: 80 a0 60 00 cmp %g1, 0 20070b4: 02 80 00 07 be 20070d0 20070b8: 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; 20070bc: 81 c7 e0 08 ret 20070c0: 91 e8 20 16 restore %g0, 0x16, %o0 /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 20070c4: 10 80 00 03 b 20070d0 20070c8: a2 10 20 02 mov 2, %l1 20070cc: a2 10 20 03 mov 3, %l1 break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 20070d0: c2 04 20 08 ld [ %l0 + 8 ], %g1 20070d4: 82 00 7f ff add %g1, -1, %g1 20070d8: 80 a0 60 fd cmp %g1, 0xfd 20070dc: 38 80 00 0e bgu,a 2007114 20070e0: b0 10 20 16 mov 0x16, %i0 20070e4: 03 00 80 62 sethi %hi(0x2018800), %g1 20070e8: c4 00 61 00 ld [ %g1 + 0x100 ], %g2 ! 2018900 <_Thread_Dispatch_disable_level> 20070ec: 84 00 a0 01 inc %g2 20070f0: c4 20 61 00 st %g2, [ %g1 + 0x100 ] * _POSIX_Mutex_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ) { return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information ); 20070f4: 11 00 80 63 sethi %hi(0x2018c00), %o0 20070f8: 40 00 09 fc call 20098e8 <_Objects_Allocate> 20070fc: 90 12 20 d0 or %o0, 0xd0, %o0 ! 2018cd0 <_POSIX_Mutex_Information> _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 2007100: b2 92 20 00 orcc %o0, 0, %i1 2007104: 32 80 00 06 bne,a 200711c 2007108: c2 04 20 04 ld [ %l0 + 4 ], %g1 _Thread_Enable_dispatch(); 200710c: 40 00 0d 92 call 200a754 <_Thread_Enable_dispatch> 2007110: b0 10 20 0b mov 0xb, %i0 2007114: 81 c7 e0 08 ret 2007118: 81 e8 00 00 restore return EAGAIN; } the_mutex->process_shared = the_attr->process_shared; 200711c: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) 2007120: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 2007124: 80 a0 60 00 cmp %g1, 0 2007128: 02 80 00 04 be 2007138 200712c: 82 10 20 01 mov 1, %g1 the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 2007130: 10 80 00 03 b 200713c <== NOT EXECUTED 2007134: c0 26 60 54 clr [ %i1 + 0x54 ] <== NOT EXECUTED else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; 2007138: c2 26 60 54 st %g1, [ %i1 + 0x54 ] the_mutex_attr->only_owner_release = TRUE; the_mutex_attr->priority_ceiling = 200713c: 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; 2007140: 82 10 20 01 mov 1, %g1 2007144: c2 2e 60 58 stb %g1, [ %i1 + 0x58 ] the_mutex_attr->priority_ceiling = 2007148: 82 10 20 ff mov 0xff, %g1 200714c: 82 20 40 02 sub %g1, %g2, %g1 /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 2007150: 92 06 60 54 add %i1, 0x54, %o1 2007154: 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 = 2007158: c2 26 60 60 st %g1, [ %i1 + 0x60 ] _POSIX_Priority_To_core( the_attr->prio_ceiling ); the_mutex_attr->discipline = the_discipline; 200715c: e2 26 60 5c st %l1, [ %i1 + 0x5c ] /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 2007160: 40 00 07 c3 call 200906c <_CORE_mutex_Initialize> 2007164: 90 06 60 14 add %i1, 0x14, %o0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2007168: c6 06 60 08 ld [ %i1 + 8 ], %g3 200716c: 03 00 80 63 sethi %hi(0x2018c00), %g1 2007170: c4 00 60 ec ld [ %g1 + 0xec ], %g2 ! 2018cec <_POSIX_Mutex_Information+0x1c> 2007174: 03 00 00 3f sethi %hi(0xfc00), %g1 2007178: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 200717c: 82 08 c0 01 and %g3, %g1, %g1 2007180: 83 28 60 02 sll %g1, 2, %g1 2007184: 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; 2007188: 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; 200718c: c6 26 00 00 st %g3, [ %i0 ] _Thread_Enable_dispatch(); 2007190: 40 00 0d 71 call 200a754 <_Thread_Enable_dispatch> 2007194: b0 10 20 00 clr %i0 2007198: 81 c7 e0 08 ret 200719c: 81 e8 00 00 restore 02007210 : int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 2007210: 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 ) 2007214: 80 a6 a0 00 cmp %i2, 0 2007218: 02 80 00 1f be 2007294 200721c: a0 10 00 18 mov %i0, %l0 return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 2007220: 82 06 7f ff add %i1, -1, %g1 2007224: 80 a0 60 fd cmp %g1, 0xfd 2007228: 38 80 00 19 bgu,a 200728c 200722c: b0 10 20 16 mov 0x16, %i0 /* * Must acquire the mutex before we can change it's ceiling */ status = pthread_mutex_lock( mutex ); 2007230: 7f ff ff dc call 20071a0 2007234: 90 10 00 18 mov %i0, %o0 if ( status ) 2007238: b0 92 20 00 orcc %o0, 0, %i0 200723c: 12 80 00 14 bne 200728c 2007240: 90 10 00 10 mov %l0, %o0 return status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 2007244: 7f ff ff 55 call 2006f98 <_POSIX_Mutex_Get> 2007248: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 200724c: c2 07 bf f4 ld [ %fp + -12 ], %g1 2007250: 80 a0 60 00 cmp %g1, 0 2007254: 32 80 00 0e bne,a 200728c 2007258: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 200725c: 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( 2007260: 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( 2007264: 84 10 20 ff mov 0xff, %g2 the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 2007268: 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( 200726c: 84 20 80 01 sub %g2, %g1, %g2 the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 2007270: 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( 2007274: c4 26 80 00 st %g2, [ %i2 ] the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; _CORE_mutex_Surrender( 2007278: 94 10 20 00 clr %o2 200727c: 40 00 07 f2 call 2009244 <_CORE_mutex_Surrender> 2007280: 90 02 20 14 add %o0, 0x14, %o0 &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 2007284: 40 00 0d 34 call 200a754 <_Thread_Enable_dispatch> 2007288: 01 00 00 00 nop 200728c: 81 c7 e0 08 ret 2007290: 81 e8 00 00 restore return 0; 2007294: b0 10 20 16 mov 0x16, %i0 case OBJECTS_ERROR: break; } return EINVAL; } 2007298: 81 c7 e0 08 ret 200729c: 81 e8 00 00 restore 02005cc0 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 2005cc0: 9d e3 bf 88 save %sp, -120, %sp const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 2005cc4: 80 a6 20 00 cmp %i0, 0 2005cc8: 02 80 00 2d be 2005d7c 2005ccc: a0 10 00 19 mov %i1, %l0 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 2005cd0: 80 a6 60 00 cmp %i1, 0 2005cd4: 32 80 00 06 bne,a 2005cec 2005cd8: c2 04 00 00 ld [ %l0 ], %g1 the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 2005cdc: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED 2005ce0: 40 00 02 b0 call 20067a0 <== NOT EXECUTED 2005ce4: 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 ) 2005ce8: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED 2005cec: 80 a0 60 00 cmp %g1, 0 2005cf0: 02 80 00 23 be 2005d7c 2005cf4: 01 00 00 00 nop return EINVAL; switch ( the_attr->process_shared ) { 2005cf8: c2 04 20 04 ld [ %l0 + 4 ], %g1 2005cfc: 80 a0 60 00 cmp %g1, 0 2005d00: 12 80 00 1f bne 2005d7c 2005d04: 05 00 80 68 sethi %hi(0x201a000), %g2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2005d08: c2 00 a1 80 ld [ %g2 + 0x180 ], %g1 ! 201a180 <_Thread_Dispatch_disable_level> 2005d0c: 82 00 60 01 inc %g1 2005d10: c2 20 a1 80 st %g1, [ %g2 + 0x180 ] * 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 *) 2005d14: 33 00 80 68 sethi %hi(0x201a000), %i1 2005d18: 40 00 0a 95 call 200876c <_Objects_Allocate> 2005d1c: 90 16 63 d0 or %i1, 0x3d0, %o0 ! 201a3d0 <_POSIX_RWLock_Information> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 2005d20: a0 92 20 00 orcc %o0, 0, %l0 2005d24: 12 80 00 06 bne 2005d3c 2005d28: 90 04 20 10 add %l0, 0x10, %o0 _Thread_Enable_dispatch(); 2005d2c: 40 00 0e 2b call 20095d8 <_Thread_Enable_dispatch> 2005d30: b0 10 20 0b mov 0xb, %i0 2005d34: 81 c7 e0 08 ret 2005d38: 81 e8 00 00 restore return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 2005d3c: 40 00 08 97 call 2007f98 <_CORE_RWLock_Initialize> 2005d40: 92 07 bf f4 add %fp, -12, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2005d44: c4 04 20 08 ld [ %l0 + 8 ], %g2 2005d48: 82 16 63 d0 or %i1, 0x3d0, %g1 2005d4c: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 2005d50: 03 00 00 3f sethi %hi(0xfc00), %g1 2005d54: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2005d58: 82 08 80 01 and %g2, %g1, %g1 2005d5c: 83 28 60 02 sll %g1, 2, %g1 2005d60: 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; 2005d64: c0 24 20 0c clr [ %l0 + 0xc ] &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 2005d68: c4 26 00 00 st %g2, [ %i0 ] _Thread_Enable_dispatch(); 2005d6c: 40 00 0e 1b call 20095d8 <_Thread_Enable_dispatch> 2005d70: b0 10 20 00 clr %i0 2005d74: 81 c7 e0 08 ret 2005d78: 81 e8 00 00 restore return 0; } 2005d7c: 81 c7 e0 08 ret 2005d80: 91 e8 20 16 restore %g0, 0x16, %o0 02005dfc : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 2005dfc: 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 ) 2005e00: 80 a6 20 00 cmp %i0, 0 2005e04: 02 80 00 31 be 2005ec8 2005e08: 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 ); 2005e0c: 92 07 bf f0 add %fp, -16, %o1 2005e10: 40 00 1c 95 call 200d064 <_POSIX_Absolute_timeout_to_ticks> 2005e14: a0 10 20 00 clr %l0 switch (status) { 2005e18: 80 a2 20 02 cmp %o0, 2 2005e1c: 08 80 00 05 bleu 2005e30 2005e20: b2 10 00 08 mov %o0, %i1 2005e24: 80 a2 20 03 cmp %o0, 3 2005e28: 22 80 00 02 be,a 2005e30 2005e2c: a0 10 20 01 mov 1, %l0 2005e30: d2 06 00 00 ld [ %i0 ], %o1 2005e34: 11 00 80 68 sethi %hi(0x201a000), %o0 2005e38: 94 07 bf f4 add %fp, -12, %o2 2005e3c: 40 00 0b a6 call 2008cd4 <_Objects_Get> 2005e40: 90 12 23 d0 or %o0, 0x3d0, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 2005e44: c2 07 bf f4 ld [ %fp + -12 ], %g1 2005e48: 80 a0 60 00 cmp %g1, 0 2005e4c: 32 80 00 20 bne,a 2005ecc 2005e50: 90 10 20 16 mov 0x16, %o0 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 2005e54: d2 06 00 00 ld [ %i0 ], %o1 2005e58: d6 07 bf f0 ld [ %fp + -16 ], %o3 2005e5c: a0 0c 20 ff and %l0, 0xff, %l0 2005e60: 90 02 20 10 add %o0, 0x10, %o0 2005e64: 94 10 00 10 mov %l0, %o2 2005e68: 40 00 08 57 call 2007fc4 <_CORE_RWLock_Obtain_for_reading> 2005e6c: 98 10 20 00 clr %o4 do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 2005e70: 40 00 0d da call 20095d8 <_Thread_Enable_dispatch> 2005e74: 01 00 00 00 nop if ( !do_wait && 2005e78: 80 a4 20 00 cmp %l0, 0 2005e7c: 12 80 00 0d bne 2005eb0 2005e80: 03 00 80 68 sethi %hi(0x201a000), %g1 2005e84: c2 00 62 44 ld [ %g1 + 0x244 ], %g1 ! 201a244 <_Thread_Executing> <== NOT EXECUTED 2005e88: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 <== NOT EXECUTED 2005e8c: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 2005e90: 32 80 00 09 bne,a 2005eb4 <== NOT EXECUTED 2005e94: 03 00 80 68 sethi %hi(0x201a000), %g1 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 2005e98: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 2005e9c: 02 80 00 0c be 2005ecc <== NOT EXECUTED 2005ea0: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 2005ea4: 80 a6 60 02 cmp %i1, 2 <== NOT EXECUTED 2005ea8: 08 80 00 09 bleu 2005ecc <== NOT EXECUTED 2005eac: 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( 2005eb0: 03 00 80 68 sethi %hi(0x201a000), %g1 2005eb4: c2 00 62 44 ld [ %g1 + 0x244 ], %g1 ! 201a244 <_Thread_Executing> 2005eb8: 40 00 00 3f call 2005fb4 <_POSIX_RWLock_Translate_core_RWLock_return_code> 2005ebc: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 case OBJECTS_ERROR: break; } return EINVAL; } 2005ec0: 81 c7 e0 08 ret 2005ec4: 91 e8 00 08 restore %g0, %o0, %o0 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 2005ec8: 90 10 20 16 mov 0x16, %o0 case OBJECTS_ERROR: break; } return EINVAL; } 2005ecc: b0 10 00 08 mov %o0, %i0 2005ed0: 81 c7 e0 08 ret 2005ed4: 81 e8 00 00 restore 02005ed8 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 2005ed8: 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 ) 2005edc: 80 a6 20 00 cmp %i0, 0 2005ee0: 02 80 00 31 be 2005fa4 2005ee4: 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 ); 2005ee8: 92 07 bf f0 add %fp, -16, %o1 2005eec: 40 00 1c 5e call 200d064 <_POSIX_Absolute_timeout_to_ticks> 2005ef0: a0 10 20 00 clr %l0 switch (status) { 2005ef4: 80 a2 20 02 cmp %o0, 2 2005ef8: 08 80 00 05 bleu 2005f0c 2005efc: b2 10 00 08 mov %o0, %i1 2005f00: 80 a2 20 03 cmp %o0, 3 2005f04: 22 80 00 02 be,a 2005f0c 2005f08: a0 10 20 01 mov 1, %l0 2005f0c: d2 06 00 00 ld [ %i0 ], %o1 2005f10: 11 00 80 68 sethi %hi(0x201a000), %o0 2005f14: 94 07 bf f4 add %fp, -12, %o2 2005f18: 40 00 0b 6f call 2008cd4 <_Objects_Get> 2005f1c: 90 12 23 d0 or %o0, 0x3d0, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 2005f20: c2 07 bf f4 ld [ %fp + -12 ], %g1 2005f24: 80 a0 60 00 cmp %g1, 0 2005f28: 32 80 00 20 bne,a 2005fa8 2005f2c: 90 10 20 16 mov 0x16, %o0 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 2005f30: d2 06 00 00 ld [ %i0 ], %o1 2005f34: d6 07 bf f0 ld [ %fp + -16 ], %o3 2005f38: a0 0c 20 ff and %l0, 0xff, %l0 2005f3c: 90 02 20 10 add %o0, 0x10, %o0 2005f40: 94 10 00 10 mov %l0, %o2 2005f44: 40 00 08 54 call 2008094 <_CORE_RWLock_Obtain_for_writing> 2005f48: 98 10 20 00 clr %o4 do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 2005f4c: 40 00 0d a3 call 20095d8 <_Thread_Enable_dispatch> 2005f50: 01 00 00 00 nop if ( !do_wait && 2005f54: 80 a4 20 00 cmp %l0, 0 2005f58: 12 80 00 0d bne 2005f8c 2005f5c: 03 00 80 68 sethi %hi(0x201a000), %g1 2005f60: c2 00 62 44 ld [ %g1 + 0x244 ], %g1 ! 201a244 <_Thread_Executing> <== NOT EXECUTED 2005f64: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 <== NOT EXECUTED 2005f68: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 2005f6c: 32 80 00 09 bne,a 2005f90 <== NOT EXECUTED 2005f70: 03 00 80 68 sethi %hi(0x201a000), %g1 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 2005f74: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 2005f78: 02 80 00 0c be 2005fa8 <== NOT EXECUTED 2005f7c: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 2005f80: 80 a6 60 02 cmp %i1, 2 <== NOT EXECUTED 2005f84: 08 80 00 09 bleu 2005fa8 <== NOT EXECUTED 2005f88: 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( 2005f8c: 03 00 80 68 sethi %hi(0x201a000), %g1 2005f90: c2 00 62 44 ld [ %g1 + 0x244 ], %g1 ! 201a244 <_Thread_Executing> 2005f94: 40 00 00 08 call 2005fb4 <_POSIX_RWLock_Translate_core_RWLock_return_code> 2005f98: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 case OBJECTS_ERROR: break; } return EINVAL; } 2005f9c: 81 c7 e0 08 ret 2005fa0: 91 e8 00 08 restore %g0, %o0, %o0 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 2005fa4: 90 10 20 16 mov 0x16, %o0 case OBJECTS_ERROR: break; } return EINVAL; } 2005fa8: b0 10 00 08 mov %o0, %i0 2005fac: 81 c7 e0 08 ret 2005fb0: 81 e8 00 00 restore 02005370 : int pthread_setcancelstate( int state, int *oldstate ) { 2005370: 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() ) 2005374: 03 00 80 56 sethi %hi(0x2015800), %g1 2005378: c2 00 61 a0 ld [ %g1 + 0x1a0 ], %g1 ! 20159a0 <_ISR_Nest_level> int pthread_setcancelstate( int state, int *oldstate ) { 200537c: 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() ) 2005380: 80 a0 60 00 cmp %g1, 0 2005384: 12 80 00 26 bne 200541c 2005388: b0 10 20 47 mov 0x47, %i0 return EPROTO; if ( !oldstate ) 200538c: 80 a6 60 00 cmp %i1, 0 2005390: 02 80 00 25 be 2005424 2005394: 80 a1 20 01 cmp %g4, 1 return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 2005398: 38 80 00 21 bgu,a 200541c 200539c: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 20053a0: 03 00 80 56 sethi %hi(0x2015800), %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 20053a4: 07 00 80 56 sethi %hi(0x2015800), %g3 20053a8: c4 00 61 c4 ld [ %g1 + 0x1c4 ], %g2 20053ac: c2 00 e1 00 ld [ %g3 + 0x100 ], %g1 20053b0: c4 00 a1 6c ld [ %g2 + 0x16c ], %g2 20053b4: 82 00 60 01 inc %g1 20053b8: c2 20 e1 00 st %g1, [ %g3 + 0x100 ] _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 20053bc: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1 thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 20053c0: 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; 20053c4: c2 26 40 00 st %g1, [ %i1 ] thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 20053c8: 12 80 00 0b bne 20053f4 20053cc: c8 20 a0 cc st %g4, [ %g2 + 0xcc ] 20053d0: c2 00 a0 d0 ld [ %g2 + 0xd0 ], %g1 20053d4: 80 a0 60 01 cmp %g1, 1 20053d8: 32 80 00 08 bne,a 20053f8 20053dc: b2 10 20 00 clr %i1 20053e0: c2 00 a0 d4 ld [ %g2 + 0xd4 ], %g1 <== NOT EXECUTED 20053e4: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 20053e8: 82 40 20 00 addx %g0, 0, %g1 <== NOT EXECUTED 20053ec: 10 80 00 03 b 20053f8 <== NOT EXECUTED 20053f0: b2 10 00 01 mov %g1, %i1 <== NOT EXECUTED 20053f4: b2 10 20 00 clr %i1 <== NOT EXECUTED thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 20053f8: 40 00 0b 0a call 2008020 <_Thread_Enable_dispatch> 20053fc: b0 10 20 00 clr %i0 if ( cancel ) 2005400: 80 8e 60 ff btst 0xff, %i1 2005404: 02 80 00 06 be 200541c 2005408: 03 00 80 56 sethi %hi(0x2015800), %g1 _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 200540c: d0 00 61 c4 ld [ %g1 + 0x1c4 ], %o0 ! 20159c4 <_Thread_Executing> <== NOT EXECUTED 2005410: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED 2005414: 7f ff fe d4 call 2004f64 <_POSIX_Thread_Exit> <== NOT EXECUTED 2005418: b0 10 20 00 clr %i0 <== NOT EXECUTED 200541c: 81 c7 e0 08 ret 2005420: 81 e8 00 00 restore 2005424: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED return 0; } 2005428: 81 c7 e0 08 ret <== NOT EXECUTED 200542c: 81 e8 00 00 restore <== NOT EXECUTED 02005430 : int pthread_setcanceltype( int type, int *oldtype ) { 2005430: 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() ) 2005434: 03 00 80 56 sethi %hi(0x2015800), %g1 2005438: c2 00 61 a0 ld [ %g1 + 0x1a0 ], %g1 ! 20159a0 <_ISR_Nest_level> int pthread_setcanceltype( int type, int *oldtype ) { 200543c: 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() ) 2005440: 80 a0 60 00 cmp %g1, 0 2005444: 12 80 00 26 bne 20054dc 2005448: b0 10 20 47 mov 0x47, %i0 return EPROTO; if ( !oldtype ) 200544c: 80 a6 60 00 cmp %i1, 0 2005450: 02 80 00 25 be 20054e4 2005454: 80 a1 20 01 cmp %g4, 1 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 2005458: 38 80 00 21 bgu,a 20054dc 200545c: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 2005460: 03 00 80 56 sethi %hi(0x2015800), %g1 2005464: 07 00 80 56 sethi %hi(0x2015800), %g3 2005468: c4 00 61 c4 ld [ %g1 + 0x1c4 ], %g2 200546c: c2 00 e1 00 ld [ %g3 + 0x100 ], %g1 2005470: c4 00 a1 6c ld [ %g2 + 0x16c ], %g2 2005474: 82 00 60 01 inc %g1 2005478: c2 20 e1 00 st %g1, [ %g3 + 0x100 ] _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 200547c: c2 00 a0 d0 ld [ %g2 + 0xd0 ], %g1 2005480: c2 26 40 00 st %g1, [ %i1 ] thread_support->cancelability_type = type; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 2005484: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1 2005488: 80 a0 60 00 cmp %g1, 0 200548c: 12 80 00 0a bne 20054b4 2005490: c8 20 a0 d0 st %g4, [ %g2 + 0xd0 ] 2005494: 80 a1 20 01 cmp %g4, 1 2005498: 32 80 00 08 bne,a 20054b8 200549c: b2 10 20 00 clr %i1 20054a0: c2 00 a0 d4 ld [ %g2 + 0xd4 ], %g1 20054a4: 80 a0 00 01 cmp %g0, %g1 20054a8: 82 40 20 00 addx %g0, 0, %g1 20054ac: 10 80 00 03 b 20054b8 20054b0: b2 10 00 01 mov %g1, %i1 20054b4: b2 10 20 00 clr %i1 <== NOT EXECUTED thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 20054b8: 40 00 0a da call 2008020 <_Thread_Enable_dispatch> 20054bc: b0 10 20 00 clr %i0 if ( cancel ) 20054c0: 80 8e 60 ff btst 0xff, %i1 20054c4: 02 80 00 06 be 20054dc 20054c8: 03 00 80 56 sethi %hi(0x2015800), %g1 _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 20054cc: d0 00 61 c4 ld [ %g1 + 0x1c4 ], %o0 ! 20159c4 <_Thread_Executing> <== NOT EXECUTED 20054d0: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED 20054d4: 7f ff fe a4 call 2004f64 <_POSIX_Thread_Exit> <== NOT EXECUTED 20054d8: b0 10 20 00 clr %i0 <== NOT EXECUTED 20054dc: 81 c7 e0 08 ret 20054e0: 81 e8 00 00 restore 20054e4: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED return 0; } 20054e8: 81 c7 e0 08 ret <== NOT EXECUTED 20054ec: 81 e8 00 00 restore <== NOT EXECUTED 02007b2c : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 2007b2c: 9d e3 bf 90 save %sp, -112, %sp /* * Check all the parameters */ if ( !param ) 2007b30: 80 a6 a0 00 cmp %i2, 0 2007b34: 22 80 00 5d be,a 2007ca8 2007b38: b0 10 20 16 mov 0x16, %i0 return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 2007b3c: c2 06 80 00 ld [ %i2 ], %g1 2007b40: 82 00 7f ff add %g1, -1, %g1 2007b44: 80 a0 60 fd cmp %g1, 0xfd 2007b48: 18 80 00 5a bgu 2007cb0 2007b4c: 80 a6 60 01 cmp %i1, 1 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 2007b50: 02 80 00 10 be 2007b90 2007b54: a6 10 20 00 clr %l3 2007b58: 14 80 00 08 bg 2007b78 2007b5c: 80 a6 60 02 cmp %i1, 2 2007b60: 80 a6 60 00 cmp %i1, 0 2007b64: a6 10 20 01 mov 1, %l3 2007b68: 02 80 00 1b be 2007bd4 2007b6c: a4 10 20 00 clr %l2 _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); return 0; 2007b70: 81 c7 e0 08 ret 2007b74: 91 e8 20 16 restore %g0, 0x16, %o0 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 2007b78: 02 80 00 05 be 2007b8c 2007b7c: 80 a6 60 03 cmp %i1, 3 2007b80: 32 80 00 4a bne,a 2007ca8 2007b84: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED 2007b88: 30 80 00 04 b,a 2007b98 2007b8c: a6 10 20 02 mov 2, %l3 2007b90: 10 80 00 11 b 2007bd4 2007b94: 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 ) < 2007b98: 40 00 0e de call 200b710 <_Timespec_To_ticks> 2007b9c: 90 06 a0 08 add %i2, 8, %o0 2007ba0: a0 10 00 08 mov %o0, %l0 2007ba4: 40 00 0e db call 200b710 <_Timespec_To_ticks> 2007ba8: 90 06 a0 10 add %i2, 0x10, %o0 2007bac: 80 a4 00 08 cmp %l0, %o0 2007bb0: 2a 80 00 3e bcs,a 2007ca8 2007bb4: 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 ) ) 2007bb8: c2 06 a0 04 ld [ %i2 + 4 ], %g1 2007bbc: 82 00 7f ff add %g1, -1, %g1 2007bc0: 80 a0 60 fd cmp %g1, 0xfd 2007bc4: 18 80 00 3b bgu 2007cb0 2007bc8: 03 00 80 1e sethi %hi(0x2007800), %g1 2007bcc: a6 10 20 03 mov 3, %l3 2007bd0: a4 10 62 48 or %g1, 0x248, %l2 2007bd4: 92 10 00 18 mov %i0, %o1 2007bd8: 11 00 80 62 sethi %hi(0x2018800), %o0 2007bdc: 94 07 bf f4 add %fp, -12, %o2 2007be0: 40 00 08 9c call 2009e50 <_Objects_Get> 2007be4: 90 12 23 90 or %o0, 0x390, %o0 /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 2007be8: c2 07 bf f4 ld [ %fp + -12 ], %g1 2007bec: a2 10 00 08 mov %o0, %l1 2007bf0: 80 a0 60 00 cmp %g1, 0 2007bf4: 12 80 00 2d bne 2007ca8 2007bf8: b0 10 20 03 mov 3, %i0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 2007bfc: e0 02 21 6c ld [ %o0 + 0x16c ], %l0 if ( api->schedpolicy == SCHED_SPORADIC ) 2007c00: c2 04 20 7c ld [ %l0 + 0x7c ], %g1 2007c04: 80 a0 60 03 cmp %g1, 3 2007c08: 32 80 00 05 bne,a 2007c1c 2007c0c: f2 24 20 7c st %i1, [ %l0 + 0x7c ] (void) _Watchdog_Remove( &api->Sporadic_timer ); 2007c10: 40 00 10 16 call 200bc68 <_Watchdog_Remove> 2007c14: 90 04 20 9c add %l0, 0x9c, %o0 api->schedpolicy = policy; 2007c18: f2 24 20 7c st %i1, [ %l0 + 0x7c ] api->schedparam = *param; 2007c1c: 92 10 00 1a mov %i2, %o1 2007c20: 90 04 20 80 add %l0, 0x80, %o0 2007c24: 40 00 23 03 call 2010830 2007c28: 94 10 20 18 mov 0x18, %o2 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 2007c2c: 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; 2007c30: e6 24 60 7c st %l3, [ %l1 + 0x7c ] the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 2007c34: 80 a0 60 00 cmp %g1, 0 2007c38: 06 80 00 1a bl 2007ca0 2007c3c: e4 24 60 80 st %l2, [ %l1 + 0x80 ] 2007c40: 80 a0 60 02 cmp %g1, 2 2007c44: 24 80 00 07 ble,a 2007c60 2007c48: c4 04 20 80 ld [ %l0 + 0x80 ], %g2 2007c4c: 80 a0 60 03 cmp %g1, 3 2007c50: 12 80 00 14 bne 2007ca0 2007c54: 01 00 00 00 nop TRUE ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 2007c58: 10 80 00 0c b 2007c88 2007c5c: 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; 2007c60: 03 00 80 62 sethi %hi(0x2018800), %g1 2007c64: c2 00 60 58 ld [ %g1 + 0x58 ], %g1 ! 2018858 <_Thread_Ticks_per_timeslice> the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 2007c68: 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; 2007c6c: c2 24 60 78 st %g1, [ %l1 + 0x78 ] 2007c70: 92 10 20 ff mov 0xff, %o1 the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 2007c74: 94 10 20 01 mov 1, %o2 2007c78: 92 22 40 02 sub %o1, %g2, %o1 2007c7c: 40 00 09 28 call 200a11c <_Thread_Change_priority> 2007c80: d2 24 60 18 st %o1, [ %l1 + 0x18 ] 2007c84: 30 80 00 07 b,a 2007ca0 ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; _Watchdog_Remove( &api->Sporadic_timer ); 2007c88: 90 04 20 9c add %l0, 0x9c, %o0 2007c8c: 40 00 0f f7 call 200bc68 <_Watchdog_Remove> 2007c90: c2 24 20 98 st %g1, [ %l0 + 0x98 ] _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 2007c94: 92 10 00 11 mov %l1, %o1 2007c98: 7f ff ff 80 call 2007a98 <_POSIX_Threads_Sporadic_budget_TSR> 2007c9c: 90 10 20 00 clr %o0 break; } _Thread_Enable_dispatch(); 2007ca0: 40 00 0a ad call 200a754 <_Thread_Enable_dispatch> 2007ca4: b0 10 20 00 clr %i0 2007ca8: 81 c7 e0 08 ret 2007cac: 81 e8 00 00 restore return 0; 2007cb0: b0 10 20 16 mov 0x16, %i0 case OBJECTS_ERROR: break; } return ESRCH; } 2007cb4: 81 c7 e0 08 ret 2007cb8: 81 e8 00 00 restore 02014ae8 : ssize_t read( int fd, void *buffer, size_t count ) { 2014ae8: 9d e3 bf 98 save %sp, -104, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 2014aec: 03 00 80 5a sethi %hi(0x2016800), %g1 2014af0: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 ! 2016818 ssize_t read( int fd, void *buffer, size_t count ) { 2014af4: 92 10 00 19 mov %i1, %o1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 2014af8: 80 a6 00 01 cmp %i0, %g1 2014afc: 1a 80 00 0e bcc 2014b34 2014b00: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 2014b04: 03 00 80 5d sethi %hi(0x2017400), %g1 2014b08: c6 00 61 14 ld [ %g1 + 0x114 ], %g3 ! 2017514 2014b0c: 85 2e 20 02 sll %i0, 2, %g2 2014b10: 83 2e 20 04 sll %i0, 4, %g1 2014b14: 82 20 40 02 sub %g1, %g2, %g1 2014b18: 82 00 40 18 add %g1, %i0, %g1 2014b1c: 83 28 60 02 sll %g1, 2, %g1 2014b20: b0 00 c0 01 add %g3, %g1, %i0 rtems_libio_check_is_open( iop ); 2014b24: c2 06 20 0c ld [ %i0 + 0xc ], %g1 2014b28: 80 88 61 00 btst 0x100, %g1 2014b2c: 12 80 00 06 bne 2014b44 2014b30: 80 a6 60 00 cmp %i1, 0 2014b34: 7f ff e1 26 call 200cfcc <__errno> <== NOT EXECUTED 2014b38: 01 00 00 00 nop <== NOT EXECUTED 2014b3c: 10 80 00 15 b 2014b90 <== NOT EXECUTED 2014b40: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 2014b44: 02 80 00 08 be 2014b64 2014b48: 01 00 00 00 nop rtems_libio_check_count( count ); 2014b4c: 80 a6 a0 00 cmp %i2, 0 2014b50: 02 80 00 1b be 2014bbc 2014b54: 90 10 20 00 clr %o0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 2014b58: 80 88 60 02 btst 2, %g1 2014b5c: 32 80 00 06 bne,a 2014b74 2014b60: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 2014b64: 7f ff e1 1a call 200cfcc <__errno> <== NOT EXECUTED 2014b68: 01 00 00 00 nop <== NOT EXECUTED 2014b6c: 10 80 00 09 b 2014b90 <== NOT EXECUTED 2014b70: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) 2014b74: c2 00 60 08 ld [ %g1 + 8 ], %g1 2014b78: 80 a0 60 00 cmp %g1, 0 2014b7c: 12 80 00 08 bne 2014b9c 2014b80: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 2014b84: 7f ff e1 12 call 200cfcc <__errno> <== NOT EXECUTED 2014b88: 01 00 00 00 nop <== NOT EXECUTED 2014b8c: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 2014b90: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2014b94: 10 80 00 0a b 2014bbc <== NOT EXECUTED 2014b98: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rc = (*iop->handlers->read_h)( iop, buffer, count ); 2014b9c: 9f c0 40 00 call %g1 2014ba0: 90 10 00 18 mov %i0, %o0 if ( rc > 0 ) 2014ba4: 80 a2 20 00 cmp %o0, 0 2014ba8: 04 80 00 05 ble 2014bbc 2014bac: 01 00 00 00 nop iop->offset += rc; 2014bb0: c2 06 20 08 ld [ %i0 + 8 ], %g1 2014bb4: 82 00 40 08 add %g1, %o0, %g1 2014bb8: c2 26 20 08 st %g1, [ %i0 + 8 ] return rc; } 2014bbc: 81 c7 e0 08 ret 2014bc0: 91 e8 00 08 restore %g0, %o0, %o0 0201fb90 : /* * get next entry in a directory. */ struct dirent * readdir( DIR *dirp ) { 201fb90: 9d e3 bf 98 save %sp, -104, %sp register struct dirent *dp; if ( !dirp ) 201fb94: 80 a6 20 00 cmp %i0, 0 201fb98: 02 80 00 2a be 201fc40 201fb9c: 88 10 20 00 clr %g4 return NULL; for (;;) { if (dirp->dd_loc == 0) { 201fba0: c2 06 20 04 ld [ %i0 + 4 ], %g1 201fba4: 80 a0 60 00 cmp %g1, 0 201fba8: 32 80 00 0a bne,a 201fbd0 201fbac: c6 06 20 04 ld [ %i0 + 4 ], %g3 dirp->dd_size = getdents (dirp->dd_fd, 201fbb0: d0 06 00 00 ld [ %i0 ], %o0 201fbb4: d2 06 20 0c ld [ %i0 + 0xc ], %o1 201fbb8: 40 00 2f 86 call 202b9d0 201fbbc: d4 06 20 10 ld [ %i0 + 0x10 ], %o2 dirp->dd_buf, dirp->dd_len); if (dirp->dd_size <= 0) 201fbc0: 80 a2 20 00 cmp %o0, 0 201fbc4: 04 80 00 1e ble 201fc3c 201fbc8: d0 26 20 08 st %o0, [ %i0 + 8 ] return NULL; } if (dirp->dd_loc >= dirp->dd_size) { 201fbcc: c6 06 20 04 ld [ %i0 + 4 ], %g3 201fbd0: c2 06 20 08 ld [ %i0 + 8 ], %g1 201fbd4: 80 a0 c0 01 cmp %g3, %g1 201fbd8: 26 80 00 04 bl,a 201fbe8 201fbdc: d8 06 20 0c ld [ %i0 + 0xc ], %o4 dirp->dd_loc = 0; 201fbe0: 10 bf ff f0 b 201fba0 201fbe4: c0 26 20 04 clr [ %i0 + 4 ] continue; } dp = (struct dirent *)(dirp->dd_buf + dirp->dd_loc); 201fbe8: 88 03 00 03 add %o4, %g3, %g4 if ((intptr_t)dp & 03) /* bogus pointer check */ 201fbec: 80 89 20 03 btst 3, %g4 201fbf0: 32 80 00 14 bne,a 201fc40 201fbf4: 88 10 20 00 clr %g4 <== NOT EXECUTED return NULL; if (dp->d_reclen <= 0 || 201fbf8: c4 11 20 08 lduh [ %g4 + 8 ], %g2 201fbfc: 80 a0 a0 00 cmp %g2, 0 201fc00: 02 80 00 0f be 201fc3c 201fc04: 9a 00 80 03 add %g2, %g3, %o5 201fc08: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 201fc0c: 82 00 60 01 inc %g1 201fc10: 82 20 40 03 sub %g1, %g3, %g1 201fc14: 80 a0 80 01 cmp %g2, %g1 201fc18: 34 80 00 0a bg,a 201fc40 201fc1c: 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; 201fc20: da 26 20 04 st %o5, [ %i0 + 4 ] if (dp->d_ino == 0) 201fc24: c2 03 00 03 ld [ %o4 + %g3 ], %g1 201fc28: 80 a0 60 00 cmp %g1, 0 201fc2c: 22 bf ff de be,a 201fba4 201fc30: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED continue; return (dp); } } 201fc34: 81 c7 e0 08 ret 201fc38: 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) 201fc3c: 88 10 20 00 clr %g4 continue; return (dp); } } 201fc40: b0 10 00 04 mov %g4, %i0 201fc44: 81 c7 e0 08 ret 201fc48: 81 e8 00 00 restore 0201fc4c : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 201fc4c: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t loc; int result; if (!buf) 201fc50: 80 a6 60 00 cmp %i1, 0 201fc54: 12 80 00 06 bne 201fc6c 201fc58: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( EFAULT ); 201fc5c: 40 00 38 bd call 202df50 <__errno> <== NOT EXECUTED 201fc60: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201fc64: 10 80 00 30 b 201fd24 <== NOT EXECUTED 201fc68: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false ); 201fc6c: a0 07 bf e8 add %fp, -24, %l0 201fc70: 92 10 20 00 clr %o1 201fc74: 94 10 00 10 mov %l0, %o2 201fc78: 96 10 20 00 clr %o3 201fc7c: 7f ff 91 bb call 2004368 201fc80: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 201fc84: 80 a2 20 00 cmp %o0, 0 201fc88: 12 80 00 28 bne 201fd28 201fc8c: c4 07 bf f0 ld [ %fp + -16 ], %g2 return -1; if ( !loc.ops->node_type_h ){ 201fc90: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 201fc94: 80 a0 60 00 cmp %g1, 0 201fc98: 12 80 00 04 bne 201fca8 201fc9c: 01 00 00 00 nop rtems_filesystem_freenode( &loc ); 201fca0: 10 80 00 19 b 201fd04 <== NOT EXECUTED 201fca4: 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 ){ 201fca8: 9f c0 40 00 call %g1 201fcac: 90 10 00 10 mov %l0, %o0 201fcb0: 80 a2 20 04 cmp %o0, 4 201fcb4: 02 80 00 0f be 201fcf0 201fcb8: c2 07 bf f0 ld [ %fp + -16 ], %g1 rtems_filesystem_freenode( &loc ); 201fcbc: 80 a0 60 00 cmp %g1, 0 201fcc0: 02 80 00 08 be 201fce0 201fcc4: 01 00 00 00 nop 201fcc8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 201fccc: 80 a0 60 00 cmp %g1, 0 201fcd0: 02 80 00 04 be 201fce0 201fcd4: 01 00 00 00 nop 201fcd8: 9f c0 40 00 call %g1 201fcdc: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); 201fce0: 40 00 38 9c call 202df50 <__errno> 201fce4: b0 10 3f ff mov -1, %i0 201fce8: 10 80 00 0f b 201fd24 201fcec: 82 10 20 16 mov 0x16, %g1 } if ( !loc.ops->readlink_h ){ 201fcf0: c4 00 60 3c ld [ %g1 + 0x3c ], %g2 201fcf4: 80 a0 a0 00 cmp %g2, 0 201fcf8: 12 80 00 0e bne 201fd30 201fcfc: 92 10 00 19 mov %i1, %o1 rtems_filesystem_freenode( &loc ); 201fd00: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 201fd04: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201fd08: 02 80 00 04 be 201fd18 <== NOT EXECUTED 201fd0c: 01 00 00 00 nop <== NOT EXECUTED 201fd10: 9f c0 40 00 call %g1 <== NOT EXECUTED 201fd14: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 201fd18: 40 00 38 8e call 202df50 <__errno> <== NOT EXECUTED 201fd1c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201fd20: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 201fd24: c2 22 00 00 st %g1, [ %o0 ] 201fd28: 81 c7 e0 08 ret 201fd2c: 81 e8 00 00 restore } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 201fd30: 94 10 00 1a mov %i2, %o2 201fd34: 9f c0 80 00 call %g2 201fd38: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 201fd3c: c2 07 bf f0 ld [ %fp + -16 ], %g1 201fd40: 80 a0 60 00 cmp %g1, 0 201fd44: 02 bf ff f9 be 201fd28 201fd48: b0 10 00 08 mov %o0, %i0 201fd4c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 201fd50: 80 a0 60 00 cmp %g1, 0 201fd54: 02 80 00 04 be 201fd64 201fd58: 01 00 00 00 nop 201fd5c: 9f c0 40 00 call %g1 201fd60: 90 10 00 10 mov %l0, %o0 return result; } 201fd64: 81 c7 e0 08 ret 201fd68: 81 e8 00 00 restore 02014c48 : { size_t old_size; char *new_area; size_t resize; MSBUMP(realloc_calls, 1); 2014c48: 9d e3 bf 90 save %sp, -112, %sp 2014c4c: 07 00 80 5d sethi %hi(0x2017400), %g3 2014c50: 86 10 e1 78 or %g3, 0x178, %g3 ! 2017578 2014c54: 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())) { 2014c58: 05 00 80 5e sethi %hi(0x2017800), %g2 2014c5c: c4 00 a0 94 ld [ %g2 + 0x94 ], %g2 ! 2017894 <_System_state_Current> { size_t old_size; char *new_area; size_t resize; MSBUMP(realloc_calls, 1); 2014c60: 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())) { 2014c64: 80 a0 a0 03 cmp %g2, 3 2014c68: 12 80 00 0c bne 2014c98 2014c6c: c2 20 e0 10 st %g1, [ %g3 + 0x10 ] if (_Thread_Dispatch_disable_level > 0) 2014c70: 03 00 80 5d sethi %hi(0x2017400), %g1 2014c74: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1 ! 20176f0 <_Thread_Dispatch_disable_level> 2014c78: 80 a0 60 00 cmp %g1, 0 2014c7c: 32 80 00 13 bne,a 2014cc8 2014c80: b0 10 20 00 clr %i0 <== NOT EXECUTED return (void *) 0; if (_ISR_Nest_level > 0) 2014c84: 03 00 80 5d sethi %hi(0x2017400), %g1 2014c88: c2 00 63 90 ld [ %g1 + 0x390 ], %g1 ! 2017790 <_ISR_Nest_level> 2014c8c: 80 a0 60 00 cmp %g1, 0 2014c90: 32 80 00 0e bne,a 2014cc8 2014c94: b0 10 20 00 clr %i0 <== NOT EXECUTED } /* * Continue with realloc(). */ if ( !ptr ) 2014c98: 80 a6 20 00 cmp %i0, 0 2014c9c: 12 80 00 06 bne 2014cb4 2014ca0: 80 a6 60 00 cmp %i1, 0 return malloc( size ); 2014ca4: 7f ff d6 a2 call 200a72c <== NOT EXECUTED 2014ca8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2014cac: 81 c7 e0 08 ret <== NOT EXECUTED 2014cb0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED if ( !size ) { 2014cb4: 12 80 00 07 bne 2014cd0 2014cb8: 21 00 80 5d sethi %hi(0x2017400), %l0 free( ptr ); 2014cbc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2014cc0: 7f ff d5 33 call 200a18c <== NOT EXECUTED 2014cc4: b0 10 20 00 clr %i0 <== NOT EXECUTED 2014cc8: 81 c7 e0 08 ret <== NOT EXECUTED 2014ccc: 81 e8 00 00 restore <== NOT EXECUTED return (void *) 0; } if ( !_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, ptr, &old_size) ) { 2014cd0: 92 10 00 18 mov %i0, %o1 2014cd4: 90 14 21 20 or %l0, 0x120, %o0 2014cd8: 40 00 00 63 call 2014e64 <_Protected_heap_Get_block_size> 2014cdc: 94 07 bf f4 add %fp, -12, %o2 2014ce0: 80 8a 20 ff btst 0xff, %o0 2014ce4: 12 80 00 08 bne 2014d04 2014ce8: 90 14 21 20 or %l0, 0x120, %o0 errno = EINVAL; 2014cec: 7f ff e0 b8 call 200cfcc <__errno> 2014cf0: b0 10 20 00 clr %i0 2014cf4: 82 10 20 16 mov 0x16, %g1 2014cf8: c2 22 00 00 st %g1, [ %o0 ] 2014cfc: 81 c7 e0 08 ret 2014d00: 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 ) ) { 2014d04: 92 10 00 18 mov %i0, %o1 2014d08: 40 00 00 64 call 2014e98 <_Protected_heap_Resize_block> 2014d0c: 94 10 00 19 mov %i1, %o2 2014d10: 80 8a 20 ff btst 0xff, %o0 2014d14: 12 80 00 1b bne 2014d80 2014d18: 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 ); 2014d1c: 7f ff d6 84 call 200a72c 2014d20: 90 10 00 19 mov %i1, %o0 MSBUMP(malloc_calls, -1); /* subtract off the malloc */ 2014d24: 05 00 80 5d sethi %hi(0x2017400), %g2 2014d28: 84 10 a1 78 or %g2, 0x178, %g2 ! 2017578 2014d2c: 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 ); 2014d30: a0 10 00 08 mov %o0, %l0 MSBUMP(malloc_calls, -1); /* subtract off the malloc */ 2014d34: 82 00 7f ff add %g1, -1, %g1 if ( !new_area ) { 2014d38: 80 a2 20 00 cmp %o0, 0 2014d3c: 02 80 00 10 be 2014d7c 2014d40: c2 20 a0 04 st %g1, [ %g2 + 4 ] return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 2014d44: c2 07 bf f4 ld [ %fp + -12 ], %g1 2014d48: 80 a6 40 01 cmp %i1, %g1 2014d4c: 08 80 00 03 bleu 2014d58 2014d50: 90 10 00 19 mov %i1, %o0 2014d54: 90 10 00 01 mov %g1, %o0 2014d58: 94 10 00 08 mov %o0, %o2 2014d5c: 92 10 00 18 mov %i0, %o1 2014d60: 7f ff e2 8d call 200d794 2014d64: 90 10 00 10 mov %l0, %o0 free( ptr ); 2014d68: 90 10 00 18 mov %i0, %o0 2014d6c: 7f ff d5 08 call 200a18c 2014d70: b0 10 00 10 mov %l0, %i0 2014d74: 81 c7 e0 08 ret 2014d78: 81 e8 00 00 restore return new_area; 2014d7c: b0 10 20 00 clr %i0 <== NOT EXECUTED } 2014d80: 81 c7 e0 08 ret 2014d84: 81 e8 00 00 restore 0201feac : #include int rmdir( const char *pathname ) { 201feac: 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 ); 201feb0: 92 10 20 00 clr %o1 201feb4: 90 10 00 18 mov %i0, %o0 201feb8: a0 07 bf e8 add %fp, -24, %l0 201febc: 96 10 20 00 clr %o3 201fec0: 7f ff 91 2a call 2004368 201fec4: 94 10 00 10 mov %l0, %o2 if ( result != 0 ) 201fec8: 80 a2 20 00 cmp %o0, 0 201fecc: 32 80 00 11 bne,a 201ff10 201fed0: b0 10 3f ff mov -1, %i0 return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); 201fed4: 90 10 20 02 mov 2, %o0 201fed8: 7f ff 90 f7 call 20042b4 201fedc: 92 10 00 10 mov %l0, %o1 if (result != 0) { 201fee0: 80 a2 20 00 cmp %o0, 0 201fee4: 02 80 00 0d be 201ff18 201fee8: c2 07 bf f0 ld [ %fp + -16 ], %g1 rtems_filesystem_freenode( &loc ); 201feec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201fef0: 02 80 00 08 be 201ff10 <== NOT EXECUTED 201fef4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201fef8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 201fefc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201ff00: 02 80 00 04 be 201ff10 <== NOT EXECUTED 201ff04: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 201ff08: 9f c0 40 00 call %g1 <== NOT EXECUTED 201ff0c: 01 00 00 00 nop <== NOT EXECUTED 201ff10: 81 c7 e0 08 ret 201ff14: 81 e8 00 00 restore /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 201ff18: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 201ff1c: 80 a0 a0 00 cmp %g2, 0 201ff20: 22 80 00 1e be,a 201ff98 201ff24: 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 ){ 201ff28: 9f c0 80 00 call %g2 201ff2c: 90 10 00 10 mov %l0, %o0 201ff30: 80 a2 20 01 cmp %o0, 1 201ff34: 02 80 00 10 be 201ff74 201ff38: c2 07 bf ec ld [ %fp + -20 ], %g1 rtems_filesystem_freenode( &loc ); 201ff3c: c2 07 bf f0 ld [ %fp + -16 ], %g1 201ff40: 80 a0 60 00 cmp %g1, 0 201ff44: 02 80 00 08 be 201ff64 201ff48: 01 00 00 00 nop 201ff4c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 201ff50: 80 a0 60 00 cmp %g1, 0 201ff54: 02 80 00 04 be 201ff64 201ff58: 01 00 00 00 nop 201ff5c: 9f c0 40 00 call %g1 201ff60: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 201ff64: 40 00 37 fb call 202df50 <__errno> 201ff68: b0 10 3f ff mov -1, %i0 201ff6c: 10 80 00 13 b 201ffb8 201ff70: 82 10 20 14 mov 0x14, %g1 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 201ff74: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 201ff78: 80 a0 60 00 cmp %g1, 0 201ff7c: 12 80 00 12 bne 201ffc4 201ff80: 01 00 00 00 nop rtems_filesystem_freenode( &loc ); 201ff84: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 201ff88: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201ff8c: 02 80 00 08 be 201ffac <== NOT EXECUTED 201ff90: 01 00 00 00 nop <== NOT EXECUTED 201ff94: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 201ff98: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201ff9c: 02 80 00 04 be 201ffac <== NOT EXECUTED 201ffa0: 01 00 00 00 nop <== NOT EXECUTED 201ffa4: 9f c0 40 00 call %g1 <== NOT EXECUTED 201ffa8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 201ffac: 40 00 37 e9 call 202df50 <__errno> <== NOT EXECUTED 201ffb0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201ffb4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 201ffb8: c2 22 00 00 st %g1, [ %o0 ] 201ffbc: 81 c7 e0 08 ret 201ffc0: 81 e8 00 00 restore } result = (*loc.handlers->rmnod_h)( &loc ); 201ffc4: 9f c0 40 00 call %g1 201ffc8: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 201ffcc: c2 07 bf f0 ld [ %fp + -16 ], %g1 201ffd0: 80 a0 60 00 cmp %g1, 0 201ffd4: 02 bf ff cf be 201ff10 201ffd8: b0 10 00 08 mov %o0, %i0 201ffdc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 201ffe0: 80 a0 60 00 cmp %g1, 0 201ffe4: 02 80 00 06 be 201fffc 201ffe8: 01 00 00 00 nop 201ffec: 9f c0 40 00 call %g1 201fff0: 90 10 00 10 mov %l0, %o0 201fff4: 81 c7 e0 08 ret 201fff8: 81 e8 00 00 restore return result; } 201fffc: 81 c7 e0 08 ret <== NOT EXECUTED 2020000: 81 e8 00 00 restore <== NOT EXECUTED 02014fcc : const char * rtems_assoc_name_bad( uint32_t bad_value ) { 2014fcc: 11 00 80 95 sethi %hi(0x2025400), %o0 <== NOT EXECUTED sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 2014fd0: 81 c3 e0 08 retl <== NOT EXECUTED 2014fd4: 90 12 23 d8 or %o0, 0x3d8, %o0 ! 20257d8 <== NOT EXECUTED 0201090c : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 201090c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 2010910: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2010914: 40 00 00 0b call 2010940 <== NOT EXECUTED 2010918: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED if (nap) 201091c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2010920: 02 80 00 05 be 2010934 <== NOT EXECUTED 2010924: 01 00 00 00 nop <== NOT EXECUTED return nap->name; return rtems_assoc_name_bad(local_value); } 2010928: f0 02 00 00 ld [ %o0 ], %i0 <== NOT EXECUTED 201092c: 81 c7 e0 08 ret <== NOT EXECUTED 2010930: 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); 2010934: 40 00 11 a6 call 2014fcc <== NOT EXECUTED 2010938: 91 e8 00 19 restore %g0, %i1, %o0 <== NOT EXECUTED 201093c: 01 00 00 00 nop 0200c638 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 200c638: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 200c63c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 200c640: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200c644: 40 00 02 32 call 200cf0c <== NOT EXECUTED 200c648: b0 10 20 00 clr %i0 <== NOT EXECUTED if (nap) 200c64c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200c650: 32 80 00 02 bne,a 200c658 <== NOT EXECUTED 200c654: f0 02 20 08 ld [ %o0 + 8 ], %i0 <== NOT EXECUTED return nap->remote_value; return 0; } 200c658: 81 c7 e0 08 ret <== NOT EXECUTED 200c65c: 81 e8 00 00 restore <== NOT EXECUTED 02002b2c : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 2002b2c: 9d e3 bf 60 save %sp, -160, %sp struct timespec uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 2002b30: 80 a6 60 00 cmp %i1, 0 2002b34: 02 80 00 66 be 2002ccc 2002b38: 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 ); 2002b3c: 40 00 14 0c call 2007b6c <_TOD_Get_uptime> 2002b40: 90 10 00 10 mov %l0, %o0 _Timespec_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 2002b44: 92 10 00 10 mov %l0, %o1 2002b48: 11 00 80 91 sethi %hi(0x2024400), %o0 2002b4c: a0 07 bf e0 add %fp, -32, %l0 2002b50: 90 12 22 e8 or %o0, 0x2e8, %o0 2002b54: 40 00 1e 32 call 200a41c <_Timespec_Subtract> 2002b58: 94 10 00 10 mov %l0, %o2 } } } #endif (*print)( context, "CPU Usage by thread\n" 2002b5c: 90 10 00 18 mov %i0, %o0 2002b60: 13 00 80 65 sethi %hi(0x2019400), %o1 2002b64: 9f c6 40 00 call %i1 2002b68: 92 12 63 28 or %o1, 0x328, %o1 ! 2019728 2002b6c: 03 00 80 90 sethi %hi(0x2024000), %g1 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 2002b70: ac 07 bf c0 add %fp, -64, %l6 } } } #endif (*print)( context, "CPU Usage by thread\n" 2002b74: a4 10 60 94 or %g1, 0x94, %l2 _Timespec_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timespec_Add_to( &ran, &used ); }; _Timespec_Divide( &ran, &total, &ival, &fval ); 2002b78: 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( 2002b7c: 03 00 80 90 sethi %hi(0x2024000), %g1 &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timespec_Add_to( &ran, &used ); }; _Timespec_Divide( &ran, &total, &ival, &fval ); 2002b80: 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( 2002b84: b4 10 61 fc or %g1, 0x1fc, %i2 &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timespec_Add_to( &ran, &used ); }; _Timespec_Divide( &ran, &total, &ival, &fval ); 2002b88: b8 07 bf f0 add %fp, -16, %i4 " ID NAME TICKS PERCENT\n" #endif ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 2002b8c: ba 04 a0 10 add %l2, 0x10, %i5 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 2002b90: c2 04 80 00 ld [ %l2 ], %g1 2002b94: 80 a0 60 00 cmp %g1, 0 2002b98: 22 80 00 41 be,a 2002c9c 2002b9c: a4 04 a0 04 add %l2, 4, %l2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 2002ba0: e6 00 60 04 ld [ %g1 + 4 ], %l3 if ( information ) { 2002ba4: 80 a4 e0 00 cmp %l3, 0 2002ba8: 22 80 00 3d be,a 2002c9c 2002bac: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED 2002bb0: 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( 2002bb4: ae 07 bf e8 add %fp, -24, %l7 2002bb8: 10 80 00 32 b 2002c80 2002bbc: 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 ]; 2002bc0: c2 04 e0 1c ld [ %l3 + 0x1c ], %g1 2002bc4: e0 00 40 02 ld [ %g1 + %g2 ], %l0 if ( !the_thread ) 2002bc8: 80 a4 20 00 cmp %l0, 0 2002bcc: 02 80 00 2d be 2002c80 2002bd0: a2 04 60 01 inc %l1 continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 2002bd4: 40 00 0e b6 call 20066ac 2002bd8: d0 04 20 08 ld [ %l0 + 8 ], %o0 (*print)( 2002bdc: d4 04 20 08 ld [ %l0 + 8 ], %o2 2002be0: 90 10 00 18 mov %i0, %o0 2002be4: 13 00 80 65 sethi %hi(0x2019400), %o1 2002be8: 96 10 00 16 mov %l6, %o3 2002bec: 9f c6 40 00 call %i1 2002bf0: 92 12 63 70 or %o1, 0x370, %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; 2002bf4: c2 04 20 84 ld [ %l0 + 0x84 ], %g1 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 2002bf8: 07 00 80 90 sethi %hi(0x2024000), %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; 2002bfc: c2 27 bf d8 st %g1, [ %fp + -40 ] if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 2002c00: 86 10 e1 f4 or %g3, 0x1f4, %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; 2002c04: c2 04 20 88 ld [ %l0 + 0x88 ], %g1 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 2002c08: 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; 2002c0c: c2 27 bf dc st %g1, [ %fp + -36 ] if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 2002c10: c4 00 a0 08 ld [ %g2 + 8 ], %g2 2002c14: c2 04 20 08 ld [ %l0 + 8 ], %g1 2002c18: 80 a0 80 01 cmp %g2, %g1 2002c1c: 12 80 00 0a bne 2002c44 2002c20: 94 10 00 1b mov %i3, %o2 struct timespec used; _Timespec_Subtract( 2002c24: 90 10 00 1a mov %i2, %o0 2002c28: 92 10 00 17 mov %l7, %o1 2002c2c: 40 00 1d fc call 200a41c <_Timespec_Subtract> 2002c30: 94 10 00 14 mov %l4, %o2 &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timespec_Add_to( &ran, &used ); 2002c34: 90 10 00 15 mov %l5, %o0 2002c38: 40 00 1d 4e call 200a170 <_Timespec_Add_to> 2002c3c: 92 10 00 14 mov %l4, %o1 }; _Timespec_Divide( &ran, &total, &ival, &fval ); 2002c40: 94 10 00 1b mov %i3, %o2 2002c44: 96 10 00 1c mov %i4, %o3 2002c48: 90 10 00 15 mov %l5, %o0 2002c4c: 40 00 1d 61 call 200a1d0 <_Timespec_Divide> 2002c50: 92 07 bf e0 add %fp, -32, %o1 /* * Print the information */ (*print)( context, 2002c54: d0 07 bf dc ld [ %fp + -36 ], %o0 2002c58: 40 00 51 aa call 2017300 <.udiv> 2002c5c: 92 10 23 e8 mov 0x3e8, %o1 2002c60: d4 07 bf d8 ld [ %fp + -40 ], %o2 2002c64: d8 07 bf f4 ld [ %fp + -12 ], %o4 2002c68: da 07 bf f0 ld [ %fp + -16 ], %o5 2002c6c: 96 10 00 08 mov %o0, %o3 2002c70: 13 00 80 65 sethi %hi(0x2019400), %o1 2002c74: 90 10 00 18 mov %i0, %o0 2002c78: 9f c6 40 00 call %i1 2002c7c: 92 12 63 88 or %o1, 0x388, %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++ ) { 2002c80: 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 ); 2002c84: 94 10 00 16 mov %l6, %o2 2002c88: 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++ ) { 2002c8c: 80 a4 40 01 cmp %l1, %g1 2002c90: 08 bf ff cc bleu 2002bc0 2002c94: 85 2c 60 02 sll %l1, 2, %g2 2002c98: a4 04 a0 04 add %l2, 4, %l2 " ID NAME TICKS PERCENT\n" #endif ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 2002c9c: 80 a4 80 1d cmp %l2, %i5 2002ca0: 32 bf ff bd bne,a 2002b94 2002ca4: c2 04 80 00 ld [ %l2 ], %g1 } } } #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS (*print)( context, "Time since last CPU Usage reset %" PRId32 2002ca8: d0 07 bf e4 ld [ %fp + -28 ], %o0 2002cac: 40 00 51 95 call 2017300 <.udiv> 2002cb0: 92 10 23 e8 mov 0x3e8, %o1 2002cb4: d4 07 bf e0 ld [ %fp + -32 ], %o2 2002cb8: 96 10 00 08 mov %o0, %o3 2002cbc: 13 00 80 65 sethi %hi(0x2019400), %o1 2002cc0: 90 10 00 18 mov %i0, %o0 2002cc4: 9f c6 40 00 call %i1 2002cc8: 92 12 63 a0 or %o1, 0x3a0, %o1 2002ccc: 81 c7 e0 08 ret 2002cd0: 81 e8 00 00 restore 0200c1a4 : { 0, 0, 0 }, }; static int rtems_deviceio_errno(rtems_status_code code) { 200c1a4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t) code))) 200c1a8: 11 00 80 58 sethi %hi(0x2016000), %o0 <== NOT EXECUTED 200c1ac: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 200c1b0: 40 00 01 22 call 200c638 <== NOT EXECUTED 200c1b4: 90 12 20 0c or %o0, 0xc, %o0 <== NOT EXECUTED 200c1b8: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 200c1bc: 02 80 00 05 be 200c1d0 <== NOT EXECUTED 200c1c0: 01 00 00 00 nop <== NOT EXECUTED { errno = rc; 200c1c4: 40 00 03 82 call 200cfcc <__errno> <== NOT EXECUTED 200c1c8: 01 00 00 00 nop <== NOT EXECUTED 200c1cc: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED return -1; } return -1; } 200c1d0: 81 c7 e0 08 ret <== NOT EXECUTED 200c1d4: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 02006460 : int rtems_error( int error_flag, const char *printf_format, ... ) { 2006460: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); 2006464: 94 07 a0 4c add %fp, 0x4c, %o2 <== NOT EXECUTED 2006468: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 200646c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 2006470: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 2006474: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); 2006478: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 200647c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2006480: 7f ff ff 7c call 2006270 <== NOT EXECUTED 2006484: d4 27 bf f4 st %o2, [ %fp + -12 ] <== NOT EXECUTED va_end(arglist); return chars_written; } 2006488: 81 c7 e0 08 ret <== NOT EXECUTED 200648c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 02001efc : int rtems_filesystem_evaluate_parent( int flags, rtems_filesystem_location_info_t *pathloc ) { 2001efc: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t parent; int result; if ( !pathloc ) 2001f00: 80 a6 60 00 cmp %i1, 0 2001f04: 32 80 00 06 bne,a 2001f1c 2001f08: c2 06 60 08 ld [ %i1 + 8 ], %g1 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 2001f0c: 40 00 2c 30 call 200cfcc <__errno> <== NOT EXECUTED 2001f10: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2001f14: 10 80 00 09 b 2001f38 <== NOT EXECUTED 2001f18: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED if ( !pathloc->ops->evalpath_h ) 2001f1c: c2 00 40 00 ld [ %g1 ], %g1 2001f20: 80 a0 60 00 cmp %g1, 0 2001f24: 12 80 00 08 bne 2001f44 2001f28: a0 07 bf e8 add %fp, -24, %l0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 2001f2c: 40 00 2c 28 call 200cfcc <__errno> <== NOT EXECUTED 2001f30: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2001f34: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 2001f38: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2001f3c: 81 c7 e0 08 ret <== NOT EXECUTED 2001f40: 81 e8 00 00 restore <== NOT EXECUTED parent = *pathloc; 2001f44: 92 10 00 19 mov %i1, %o1 2001f48: 94 10 20 10 mov 0x10, %o2 2001f4c: 40 00 2e 12 call 200d794 2001f50: 90 10 00 10 mov %l0, %o0 result = (*pathloc->ops->evalpath_h)( "..", flags, &parent ); 2001f54: c2 06 60 08 ld [ %i1 + 8 ], %g1 2001f58: 92 10 00 18 mov %i0, %o1 2001f5c: c2 00 40 00 ld [ %g1 ], %g1 2001f60: 11 00 80 56 sethi %hi(0x2015800), %o0 2001f64: 94 10 00 10 mov %l0, %o2 2001f68: 9f c0 40 00 call %g1 2001f6c: 90 12 21 60 or %o0, 0x160, %o0 if (result != 0){ 2001f70: b0 92 20 00 orcc %o0, 0, %i0 2001f74: 02 80 00 04 be 2001f84 2001f78: c2 07 bf f0 ld [ %fp + -16 ], %g1 2001f7c: 81 c7 e0 08 ret <== NOT EXECUTED 2001f80: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED return -1; } rtems_filesystem_freenode( &parent ); 2001f84: 80 a0 60 00 cmp %g1, 0 2001f88: 02 80 00 08 be 2001fa8 2001f8c: 01 00 00 00 nop 2001f90: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2001f94: 80 a0 60 00 cmp %g1, 0 2001f98: 02 80 00 04 be 2001fa8 2001f9c: 01 00 00 00 nop 2001fa0: 9f c0 40 00 call %g1 2001fa4: 90 10 00 10 mov %l0, %o0 return result; } 2001fa8: 81 c7 e0 08 ret 2001fac: 81 e8 00 00 restore 02001fb0 : const char *pathname, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 2001fb0: 9d e3 bf 98 save %sp, -104, %sp /* * Verify Input parameters. */ if ( !pathname ) 2001fb4: 80 a6 20 00 cmp %i0, 0 2001fb8: 12 80 00 06 bne 2001fd0 2001fbc: 80 a6 a0 00 cmp %i2, 0 rtems_set_errno_and_return_minus_one( EFAULT ); 2001fc0: 40 00 2c 03 call 200cfcc <__errno> 2001fc4: b0 10 3f ff mov -1, %i0 2001fc8: 10 80 00 44 b 20020d8 2001fcc: 82 10 20 0e mov 0xe, %g1 if ( !pathloc ) 2001fd0: 32 80 00 06 bne,a 2001fe8 2001fd4: c2 4e 00 00 ldsb [ %i0 ], %g1 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 2001fd8: 40 00 2b fd call 200cfcc <__errno> <== NOT EXECUTED 2001fdc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2001fe0: 10 80 00 3e b 20020d8 <== NOT EXECUTED 2001fe4: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 2001fe8: 80 a0 60 2f cmp %g1, 0x2f 2001fec: 02 80 00 06 be 2002004 2001ff0: 80 a0 60 5c cmp %g1, 0x5c 2001ff4: 02 80 00 04 be 2002004 2001ff8: 80 a0 60 00 cmp %g1, 0 2001ffc: 12 80 00 0a bne 2002024 2002000: 03 00 80 5b sethi %hi(0x2016c00), %g1 2002004: 03 00 80 5b sethi %hi(0x2016c00), %g1 2002008: d2 00 61 34 ld [ %g1 + 0x134 ], %o1 ! 2016d34 200200c: 90 10 00 1a mov %i2, %o0 2002010: 92 02 60 14 add %o1, 0x14, %o1 2002014: 40 00 2d e0 call 200d794 2002018: 94 10 20 10 mov 0x10, %o2 200201c: 10 80 00 08 b 200203c 2002020: 84 10 20 01 mov 1, %g2 2002024: d2 00 61 34 ld [ %g1 + 0x134 ], %o1 2002028: 90 10 00 1a mov %i2, %o0 200202c: 92 02 60 04 add %o1, 4, %o1 2002030: 40 00 2d d9 call 200d794 2002034: 94 10 20 10 mov 0x10, %o2 2002038: 84 10 20 00 clr %g2 if ( !pathloc->ops->evalpath_h ) 200203c: c2 06 a0 08 ld [ %i2 + 8 ], %g1 2002040: c2 00 40 00 ld [ %g1 ], %g1 2002044: 80 a0 60 00 cmp %g1, 0 2002048: 02 80 00 21 be 20020cc 200204c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( &pathname[i], flags, pathloc ); 2002050: 90 06 00 02 add %i0, %g2, %o0 2002054: 92 10 00 19 mov %i1, %o1 2002058: 9f c0 40 00 call %g1 200205c: 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 ) { 2002060: b0 92 20 00 orcc %o0, 0, %i0 2002064: 12 80 00 1e bne 20020dc 2002068: 80 a6 e0 00 cmp %i3, 0 200206c: 02 80 00 21 be 20020f0 2002070: 01 00 00 00 nop if ( !pathloc->ops->node_type_h ){ 2002074: c2 06 a0 08 ld [ %i2 + 8 ], %g1 2002078: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200207c: 80 a0 a0 00 cmp %g2, 0 2002080: 22 80 00 0e be,a 20020b8 2002084: 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 ); 2002088: 9f c0 80 00 call %g2 200208c: 90 10 00 1a mov %i2, %o0 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 2002090: 90 02 3f fd add %o0, -3, %o0 2002094: 80 a2 20 01 cmp %o0, 1 2002098: 18 80 00 16 bgu 20020f0 200209c: 01 00 00 00 nop ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 20020a0: c2 06 a0 08 ld [ %i2 + 8 ], %g1 20020a4: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 20020a8: 80 a0 a0 00 cmp %g2, 0 20020ac: 12 80 00 0e bne 20020e4 20020b0: 90 10 00 1a mov %i2, %o0 rtems_filesystem_freenode( pathloc ); 20020b4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 20020b8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20020bc: 02 80 00 04 be 20020cc <== NOT EXECUTED 20020c0: 01 00 00 00 nop <== NOT EXECUTED 20020c4: 9f c0 40 00 call %g1 <== NOT EXECUTED 20020c8: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 20020cc: 40 00 2b c0 call 200cfcc <__errno> <== NOT EXECUTED 20020d0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20020d4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 20020d8: c2 22 00 00 st %g1, [ %o0 ] 20020dc: 81 c7 e0 08 ret 20020e0: 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 ); 20020e4: 9f c0 80 00 call %g2 20020e8: 92 10 00 19 mov %i1, %o1 20020ec: b0 10 00 08 mov %o0, %i0 } } return result; } 20020f0: 81 c7 e0 08 ret 20020f4: 81 e8 00 00 restore 02009f5c : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 2009f5c: 9d e3 bf 80 save %sp, -128, %sp /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 2009f60: 25 00 80 5b sethi %hi(0x2016c00), %l2 2009f64: c4 04 a1 34 ld [ %l2 + 0x134 ], %g2 ! 2016d34 2009f68: 82 10 20 12 mov 0x12, %g1 init_fs_mount_table(); 2009f6c: 40 00 02 39 call 200a850 2009f70: c2 30 a0 24 sth %g1, [ %g2 + 0x24 ] /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 2009f74: 03 00 80 55 sethi %hi(0x2015400), %g1 2009f78: c2 00 60 9c ld [ %g1 + 0x9c ], %g1 ! 201549c rtems_fatal_error_occurred( 0xABCD0001 ); 2009f7c: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 2009f80: 80 a0 60 00 cmp %g1, 0 2009f84: 02 80 00 0f be 2009fc0 2009f88: 90 12 20 01 or %o0, 1, %o0 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 2009f8c: 03 00 80 5a sethi %hi(0x2016800), %g1 2009f90: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 ! 2016820 status = mount( 2009f94: 90 07 bf f4 add %fp, -12, %o0 2009f98: d8 00 60 0c ld [ %g1 + 0xc ], %o4 2009f9c: d2 00 40 00 ld [ %g1 ], %o1 2009fa0: d4 00 60 04 ld [ %g1 + 4 ], %o2 2009fa4: 40 00 02 33 call 200a870 2009fa8: d6 00 60 08 ld [ %g1 + 8 ], %o3 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 2009fac: 80 a2 3f ff cmp %o0, -1 2009fb0: 32 80 00 06 bne,a 2009fc8 2009fb4: d0 04 a1 34 ld [ %l2 + 0x134 ], %o0 rtems_fatal_error_occurred( 0xABCD0002 ); 2009fb8: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 2009fbc: 90 12 20 02 or %o0, 2, %o0 ! abcd0002 <== NOT EXECUTED 2009fc0: 7f ff ee e5 call 2005b54 <== NOT EXECUTED 2009fc4: 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; 2009fc8: 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; 2009fcc: 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; 2009fd0: 92 02 60 18 add %o1, 0x18, %o1 2009fd4: 94 10 20 10 mov 0x10, %o2 2009fd8: 40 00 0d ef call 200d794 2009fdc: 90 02 20 14 add %o0, 0x14, %o0 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 2009fe0: a0 07 bf e4 add %fp, -28, %l0 2009fe4: 96 10 20 00 clr %o3 2009fe8: 23 00 80 57 sethi %hi(0x2015c00), %l1 2009fec: 92 10 20 00 clr %o1 2009ff0: 94 10 00 10 mov %l0, %o2 2009ff4: 7f ff df ef call 2001fb0 2009ff8: 90 14 60 e0 or %l1, 0xe0, %o0 rtems_filesystem_root = loc; 2009ffc: d0 04 a1 34 ld [ %l2 + 0x134 ], %o0 200a000: 92 10 00 10 mov %l0, %o1 200a004: 94 10 20 10 mov 0x10, %o2 200a008: 40 00 0d e3 call 200d794 200a00c: 90 02 20 14 add %o0, 0x14, %o0 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 200a010: 96 10 20 00 clr %o3 200a014: 92 10 20 00 clr %o1 200a018: 94 10 00 10 mov %l0, %o2 200a01c: 7f ff df e5 call 2001fb0 200a020: 90 14 60 e0 or %l1, 0xe0, %o0 rtems_filesystem_current = loc; 200a024: d0 04 a1 34 ld [ %l2 + 0x134 ], %o0 200a028: 92 10 00 10 mov %l0, %o1 200a02c: 94 10 20 10 mov 0x10, %o2 200a030: 40 00 0d d9 call 200d794 200a034: 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); 200a038: 92 10 21 ff mov 0x1ff, %o1 200a03c: 11 00 80 57 sethi %hi(0x2015c00), %o0 200a040: 40 00 01 fa call 200a828 200a044: 90 12 20 e8 or %o0, 0xe8, %o0 ! 2015ce8 if ( status != 0 ) 200a048: 80 a2 20 00 cmp %o0, 0 200a04c: 02 80 00 04 be 200a05c 200a050: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 rtems_fatal_error_occurred( 0xABCD0003 ); 200a054: 10 bf ff db b 2009fc0 <== NOT EXECUTED 200a058: 90 12 20 03 or %o0, 3, %o0 ! abcd0003 <== NOT EXECUTED 200a05c: 81 c7 e0 08 ret 200a060: 81 e8 00 00 restore 0202046c : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 202046c: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 2020470: c4 02 40 00 ld [ %o1 ], %g2 <== NOT EXECUTED 2020474: 82 18 40 02 xor %g1, %g2, %g1 <== NOT EXECUTED 2020478: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 202047c: 81 c3 e0 08 retl <== NOT EXECUTED 2020480: 90 60 3f ff subx %g0, -1, %o0 <== NOT EXECUTED 02001d60 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 2001d60: 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 ); 2001d64: 92 10 20 00 clr %o1 <== NOT EXECUTED 2001d68: a4 07 bf e8 add %fp, -24, %l2 <== NOT EXECUTED 2001d6c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2001d70: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED 2001d74: 40 00 00 8f call 2001fb0 <== NOT EXECUTED 2001d78: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 2001d7c: 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 ); 2001d80: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 2001d84: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED 2001d88: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2001d8c: 12 80 00 0e bne 2001dc4 <== NOT EXECUTED 2001d90: e2 07 bf e8 ld [ %fp + -24 ], %l1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 2001d94: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 2001d98: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2001d9c: 02 80 00 04 be 2001dac <== NOT EXECUTED 2001da0: 01 00 00 00 nop <== NOT EXECUTED 2001da4: 9f c0 40 00 call %g1 <== NOT EXECUTED 2001da8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 2001dac: 40 00 2c 88 call 200cfcc <__errno> <== NOT EXECUTED 2001db0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2001db4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 2001db8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2001dbc: 81 c7 e0 08 ret <== NOT EXECUTED 2001dc0: 81 e8 00 00 restore <== NOT EXECUTED } node_type = (*loc.ops->node_type_h)( &loc ); 2001dc4: 9f c0 40 00 call %g1 <== NOT EXECUTED 2001dc8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 2001dcc: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 2001dd0: 12 80 00 05 bne 2001de4 <== NOT EXECUTED 2001dd4: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 2001dd8: 80 a2 20 02 cmp %o0, 2 <== NOT EXECUTED 2001ddc: 22 80 00 0d be,a 2001e10 <== NOT EXECUTED 2001de0: f0 26 40 00 st %i0, [ %i1 ] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 2001de4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2001de8: 02 80 00 1c be 2001e58 <== NOT EXECUTED 2001dec: 01 00 00 00 nop <== NOT EXECUTED 2001df0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 2001df4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2001df8: 02 80 00 18 be 2001e58 <== NOT EXECUTED 2001dfc: 01 00 00 00 nop <== NOT EXECUTED 2001e00: 9f c0 40 00 call %g1 <== NOT EXECUTED 2001e04: 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 ); 2001e08: 81 c7 e0 08 ret <== NOT EXECUTED 2001e0c: 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 ); 2001e10: 40 00 31 91 call 200e454 <== NOT EXECUTED 2001e14: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2001e18: d0 26 60 04 st %o0, [ %i1 + 4 ] <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 2001e1c: c2 04 60 4c ld [ %l1 + 0x4c ], %g1 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 2001e20: 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; 2001e24: c2 26 60 08 st %g1, [ %i1 + 8 ] <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 2001e28: c2 04 60 50 ld [ %l1 + 0x50 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 2001e2c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 2001e30: 02 80 00 0c be 2001e60 <== NOT EXECUTED 2001e34: c2 26 60 0c st %g1, [ %i1 + 0xc ] <== NOT EXECUTED 2001e38: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 2001e3c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2001e40: 02 80 00 08 be 2001e60 <== NOT EXECUTED 2001e44: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 2001e48: 9f c0 40 00 call %g1 <== NOT EXECUTED 2001e4c: b0 10 20 00 clr %i0 <== NOT EXECUTED 2001e50: 81 c7 e0 08 ret <== NOT EXECUTED 2001e54: 81 e8 00 00 restore <== NOT EXECUTED 2001e58: 81 c7 e0 08 ret <== NOT EXECUTED 2001e5c: 91 e8 20 0d restore %g0, 0xd, %o0 <== NOT EXECUTED 2001e60: b0 10 20 00 clr %i0 <== NOT EXECUTED #endif return RTEMS_SUCCESSFUL; } 2001e64: 81 c7 e0 08 ret <== NOT EXECUTED 2001e68: 81 e8 00 00 restore <== NOT EXECUTED 02006bb4 : 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 ) { 2006bb4: 9d e3 bf 98 save %sp, -104, %sp 2006bb8: 92 10 00 19 mov %i1, %o1 /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 2006bbc: 80 a6 60 00 cmp %i1, 0 2006bc0: 02 80 00 3f be 2006cbc 2006bc4: a0 10 00 18 mov %i0, %l0 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) 2006bc8: 80 a6 a0 00 cmp %i2, 0 2006bcc: 02 80 00 3c be 2006cbc 2006bd0: 01 00 00 00 nop return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 2006bd4: c2 06 40 00 ld [ %i1 ], %g1 2006bd8: 80 a0 60 00 cmp %g1, 0 2006bdc: 32 80 00 07 bne,a 2006bf8 2006be0: c0 26 80 00 clr [ %i2 ] 2006be4: c2 06 60 04 ld [ %i1 + 4 ], %g1 2006be8: 80 a0 60 00 cmp %g1, 0 2006bec: 02 80 00 34 be 2006cbc 2006bf0: 01 00 00 00 nop return RTEMS_INVALID_ADDRESS; *registered_major = 0; 2006bf4: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 2006bf8: 03 00 80 6e sethi %hi(0x201b800), %g1 2006bfc: c8 00 62 f0 ld [ %g1 + 0x2f0 ], %g4 ! 201baf0 <_IO_Number_of_drivers> 2006c00: 80 a4 00 04 cmp %l0, %g4 2006c04: 1a 80 00 31 bcc 2006cc8 2006c08: b0 10 20 0a mov 0xa, %i0 /* * Test for initialise/open being present to indicate the driver slot is * in use. */ if ( major == 0 ) { 2006c0c: 80 a4 20 00 cmp %l0, 0 2006c10: 12 80 00 18 bne 2006c70 2006c14: 03 00 80 6e sethi %hi(0x201b800), %g1 bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 2006c18: c6 00 62 f4 ld [ %g1 + 0x2f4 ], %g3 ! 201baf4 <_IO_Driver_address_table> 2006c1c: 85 29 20 03 sll %g4, 3, %g2 2006c20: 83 29 20 05 sll %g4, 5, %g1 2006c24: a0 01 3f ff add %g4, -1, %l0 2006c28: 82 20 40 02 sub %g1, %g2, %g1 2006c2c: 82 00 7f e8 add %g1, -24, %g1 2006c30: 10 80 00 0b b 2006c5c 2006c34: 86 00 c0 01 add %g3, %g1, %g3 if ( !_IO_Driver_address_table[major].initialization_entry && 2006c38: 80 a0 60 00 cmp %g1, 0 2006c3c: 32 80 00 07 bne,a 2006c58 2006c40: a0 04 3f ff add %l0, -1, %l0 2006c44: c2 00 e0 04 ld [ %g3 + 4 ], %g1 2006c48: 80 a0 60 00 cmp %g1, 0 2006c4c: 02 80 00 09 be 2006c70 2006c50: 03 00 80 6e sethi %hi(0x201b800), %g1 * in use. */ if ( major == 0 ) { bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 2006c54: a0 04 3f ff add %l0, -1, %l0 <== NOT EXECUTED 2006c58: 86 00 ff e8 add %g3, -24, %g3 2006c5c: 80 a4 20 00 cmp %l0, 0 2006c60: 32 bf ff f6 bne,a 2006c38 2006c64: c2 00 c0 00 ld [ %g3 ], %g1 2006c68: 81 c7 e0 08 ret 2006c6c: 91 e8 20 05 restore %g0, 5, %o0 if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 2006c70: c6 00 62 f4 ld [ %g1 + 0x2f4 ], %g3 2006c74: 85 2c 20 03 sll %l0, 3, %g2 2006c78: 83 2c 20 05 sll %l0, 5, %g1 2006c7c: 82 20 40 02 sub %g1, %g2, %g1 2006c80: c4 00 c0 01 ld [ %g3 + %g1 ], %g2 2006c84: 80 a0 a0 00 cmp %g2, 0 2006c88: 12 80 00 0f bne 2006cc4 2006c8c: 90 00 c0 01 add %g3, %g1, %o0 2006c90: c2 02 20 04 ld [ %o0 + 4 ], %g1 2006c94: 80 a0 60 00 cmp %g1, 0 2006c98: 32 80 00 0c bne,a 2006cc8 2006c9c: 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; 2006ca0: 40 00 1e a6 call 200e738 2006ca4: 94 10 20 18 mov 0x18, %o2 *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 2006ca8: 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; 2006cac: e0 26 80 00 st %l0, [ %i2 ] return rtems_io_initialize( major, 0, NULL ); 2006cb0: b2 10 20 00 clr %i1 2006cb4: 7f ff ff 4f call 20069f0 2006cb8: 95 e8 20 00 restore %g0, 0, %o2 2006cbc: 81 c7 e0 08 ret 2006cc0: 91 e8 20 09 restore %g0, 9, %o0 2006cc4: b0 10 20 0c mov 0xc, %i0 } 2006cc8: 81 c7 e0 08 ret 2006ccc: 81 e8 00 00 restore 02007ff8 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 2007ff8: 9d e3 bf 98 save %sp, -104, %sp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 2007ffc: 80 a6 20 00 cmp %i0, 0 2008000: 02 80 00 1d be 2008074 2008004: 03 00 80 90 sethi %hi(0x2024000), %g1 return; 2008008: a4 10 60 94 or %g1, 0x94, %l2 ! 2024094 <_Objects_Information_table+0x4> for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 200800c: a6 04 a0 10 add %l2, 0x10, %l3 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 2008010: c2 04 80 00 ld [ %l2 ], %g1 2008014: 80 a0 60 00 cmp %g1, 0 2008018: 22 80 00 14 be,a 2008068 200801c: a4 04 a0 04 add %l2, 4, %l2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 2008020: e2 00 60 04 ld [ %g1 + 4 ], %l1 if ( information ) { 2008024: 80 a4 60 00 cmp %l1, 0 2008028: 12 80 00 0b bne 2008054 200802c: a0 10 20 01 mov 1, %l0 for ( i=1 ; i <= information->maximum ; i++ ) { 2008030: 10 80 00 0e b 2008068 <== NOT EXECUTED 2008034: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED the_thread = (Thread_Control *)information->local_table[ i ]; 2008038: c2 04 60 1c ld [ %l1 + 0x1c ], %g1 200803c: d0 00 40 08 ld [ %g1 + %o0 ], %o0 if ( !the_thread ) 2008040: 80 a2 20 00 cmp %o0, 0 2008044: 02 80 00 04 be 2008054 2008048: a0 04 20 01 inc %l0 continue; (*routine)(the_thread); 200804c: 9f c6 00 00 call %i0 2008050: 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++ ) { 2008054: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 2008058: 80 a4 00 01 cmp %l0, %g1 200805c: 08 bf ff f7 bleu 2008038 2008060: 91 2c 20 02 sll %l0, 2, %o0 2008064: a4 04 a0 04 add %l2, 4, %l2 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 2008068: 80 a4 80 13 cmp %l2, %l3 200806c: 32 bf ff ea bne,a 2008014 2008070: c2 04 80 00 ld [ %l2 ], %g1 2008074: 81 c7 e0 08 ret 2008078: 81 e8 00 00 restore 0200a584 : * 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 ) { 200a584: 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 ); 200a588: 03 00 80 5d sethi %hi(0x2017400), %g1 200a58c: d0 00 61 1c ld [ %g1 + 0x11c ], %o0 ! 201751c 200a590: 92 10 20 00 clr %o1 200a594: 7f ff eb ae call 200544c 200a598: 94 10 20 00 clr %o2 if (rtems_libio_iop_freelist) { 200a59c: 23 00 80 5d sethi %hi(0x2017400), %l1 200a5a0: c4 04 61 18 ld [ %l1 + 0x118 ], %g2 ! 2017518 200a5a4: 80 a0 a0 00 cmp %g2, 0 200a5a8: 02 80 00 28 be 200a648 200a5ac: b0 10 20 00 clr %i0 rc = rtems_semaphore_create( 200a5b0: 03 00 80 5d sethi %hi(0x2017400), %g1 200a5b4: c6 00 61 14 ld [ %g1 + 0x114 ], %g3 ! 2017514 200a5b8: 92 10 20 01 mov 1, %o1 200a5bc: 86 20 80 03 sub %g2, %g3, %g3 200a5c0: 87 38 e0 02 sra %g3, 2, %g3 200a5c4: 83 28 e0 02 sll %g3, 2, %g1 200a5c8: 85 28 e0 06 sll %g3, 6, %g2 200a5cc: 84 20 80 01 sub %g2, %g1, %g2 200a5d0: 83 28 a0 06 sll %g2, 6, %g1 200a5d4: 82 20 40 02 sub %g1, %g2, %g1 200a5d8: 85 28 60 0c sll %g1, 0xc, %g2 200a5dc: 82 00 40 02 add %g1, %g2, %g1 200a5e0: 82 00 40 03 add %g1, %g3, %g1 200a5e4: 83 28 60 04 sll %g1, 4, %g1 200a5e8: 82 20 40 03 sub %g1, %g3, %g1 200a5ec: 83 28 60 02 sll %g1, 2, %g1 200a5f0: 86 20 c0 01 sub %g3, %g1, %g3 200a5f4: 94 10 20 54 mov 0x54, %o2 200a5f8: 96 10 20 00 clr %o3 200a5fc: 11 13 10 92 sethi %hi(0x4c424800), %o0 200a600: 98 07 bf f4 add %fp, -12, %o4 200a604: 90 12 21 00 or %o0, 0x100, %o0 200a608: 7f ff ea eb call 20051b4 200a60c: 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) 200a610: 80 a2 20 00 cmp %o0, 0 200a614: 32 80 00 0d bne,a 200a648 200a618: b0 10 20 00 clr %i0 <== NOT EXECUTED goto failed; iop = rtems_libio_iop_freelist; 200a61c: f0 04 61 18 ld [ %l1 + 0x118 ], %i0 next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); 200a620: 92 10 20 00 clr %o1 &sema ); if (rc != RTEMS_SUCCESSFUL) goto failed; iop = rtems_libio_iop_freelist; next = iop->data1; 200a624: e0 06 20 28 ld [ %i0 + 0x28 ], %l0 (void) memset( iop, 0, sizeof(rtems_libio_t) ); 200a628: 90 10 00 18 mov %i0, %o0 200a62c: 40 00 0c 93 call 200d878 200a630: 94 10 20 34 mov 0x34, %o2 iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; 200a634: c2 07 bf f4 ld [ %fp + -12 ], %g1 rtems_libio_iop_freelist = next; 200a638: e0 24 61 18 st %l0, [ %l1 + 0x118 ] 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; 200a63c: 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; 200a640: 82 10 21 00 mov 0x100, %g1 200a644: c2 26 20 0c st %g1, [ %i0 + 0xc ] failed: iop = 0; done: rtems_semaphore_release( rtems_libio_semaphore ); 200a648: 03 00 80 5d sethi %hi(0x2017400), %g1 200a64c: 7f ff eb c7 call 2005568 200a650: d0 00 61 1c ld [ %g1 + 0x11c ], %o0 ! 201751c return iop; } 200a654: 81 c7 e0 08 ret 200a658: 81 e8 00 00 restore 020020f8 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 20020f8: 9d e3 bf 98 save %sp, -104, %sp rtems_status_code rc; int i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 20020fc: 21 00 80 5a sethi %hi(0x2016800), %l0 2002100: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 ! 2016818 2002104: 80 a2 20 00 cmp %o0, 0 2002108: 22 80 00 1d be,a 200217c 200210c: 11 13 10 92 sethi %hi(0x4c424800), %o0 { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 2002110: 40 00 1f d5 call 200a064 2002114: 92 10 20 34 mov 0x34, %o1 2002118: 03 00 80 5d sethi %hi(0x2017400), %g1 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 200211c: 80 a2 20 00 cmp %o0, 0 2002120: 12 80 00 04 bne 2002130 2002124: d0 20 61 14 st %o0, [ %g1 + 0x114 ] rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 2002128: 10 80 00 1f b 20021a4 <== NOT EXECUTED 200212c: 90 10 20 1a mov 0x1a, %o0 <== NOT EXECUTED iop = rtems_libio_iop_freelist = rtems_libio_iops; 2002130: 03 00 80 5d sethi %hi(0x2017400), %g1 for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++) 2002134: c4 04 20 18 ld [ %l0 + 0x18 ], %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; 2002138: d0 20 61 18 st %o0, [ %g1 + 0x118 ] for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++) 200213c: 86 10 20 00 clr %g3 2002140: 10 80 00 03 b 200214c 2002144: 82 10 00 08 mov %o0, %g1 iop->data1 = iop + 1; 2002148: c2 20 7f f4 st %g1, [ %g1 + -12 ] 200214c: 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++) 2002150: 80 a0 c0 02 cmp %g3, %g2 2002154: 12 bf ff fd bne 2002148 2002158: 82 00 60 34 add %g1, 0x34, %g1 iop->data1 = iop + 1; iop->data1 = NULL; 200215c: 85 28 e0 02 sll %g3, 2, %g2 2002160: 83 28 e0 04 sll %g3, 4, %g1 2002164: 82 20 40 02 sub %g1, %g2, %g1 2002168: 82 00 40 03 add %g1, %g3, %g1 200216c: 83 28 60 02 sll %g1, 2, %g1 2002170: 82 02 00 01 add %o0, %g1, %g1 2002174: c0 20 7f f4 clr [ %g1 + -12 ] /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 2002178: 11 13 10 92 sethi %hi(0x4c424800), %o0 200217c: 92 10 20 01 mov 1, %o1 2002180: 90 12 21 4f or %o0, 0x14f, %o0 2002184: 94 10 20 54 mov 0x54, %o2 2002188: 96 10 20 00 clr %o3 200218c: 19 00 80 5d sethi %hi(0x2017400), %o4 2002190: 40 00 0c 09 call 20051b4 2002194: 98 13 21 1c or %o4, 0x11c, %o4 ! 201751c 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 2002198: 80 a2 20 00 cmp %o0, 0 200219c: 02 80 00 04 be 20021ac 20021a0: 01 00 00 00 nop rtems_fatal_error_occurred( rc ); 20021a4: 40 00 0e 6c call 2005b54 <== NOT EXECUTED 20021a8: 01 00 00 00 nop <== NOT EXECUTED /* * Initialize the base file system infrastructure. */ rtems_filesystem_initialize(); 20021ac: 40 00 1f 6c call 2009f5c 20021b0: 81 e8 00 00 restore 20021b4: 01 00 00 00 nop 0201fa70 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 201fa70: 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); 201fa74: 90 10 20 00 clr %o0 201fa78: 92 10 20 00 clr %o1 201fa7c: 40 00 06 9e call 20214f4 201fa80: 94 07 bf f4 add %fp, -12, %o2 if (sc != RTEMS_SUCCESSFUL) return sc; 201fa84: b0 92 20 00 orcc %o0, 0, %i0 201fa88: 12 80 00 19 bne 201faec 201fa8c: 23 00 81 1a sethi %hi(0x2046800), %l1 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 201fa90: c4 04 61 0c ld [ %l1 + 0x10c ], %g2 ! 204690c 201fa94: 03 00 81 6e sethi %hi(0x205b800), %g1 201fa98: 82 10 60 0c or %g1, 0xc, %g1 ! 205b80c 201fa9c: 80 a0 80 01 cmp %g2, %g1 201faa0: 12 80 00 16 bne 201faf8 201faa4: a4 14 61 0c or %l1, 0x10c, %l2 rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 201faa8: 7f ff 94 14 call 2004af8 201faac: 90 10 20 40 mov 0x40, %o0 if (!tmp) 201fab0: a0 92 20 00 orcc %o0, 0, %l0 201fab4: 12 80 00 04 bne 201fac4 201fab8: 92 10 00 12 mov %l2, %o1 201fabc: 81 c7 e0 08 ret <== NOT EXECUTED 201fac0: 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); 201fac4: 90 10 20 00 clr %o0 201fac8: 15 00 80 7e sethi %hi(0x201f800), %o2 201facc: 40 00 07 8b call 20218f8 201fad0: 94 12 a1 40 or %o2, 0x140, %o2 ! 201f940 if (sc != RTEMS_SUCCESSFUL) { 201fad4: 82 92 20 00 orcc %o0, 0, %g1 201fad8: 22 80 00 07 be,a 201faf4 201fadc: e0 24 61 0c st %l0, [ %l1 + 0x10c ] /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 201fae0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 201fae4: 7f ff 92 73 call 20044b0 <== NOT EXECUTED 201fae8: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED 201faec: 81 c7 e0 08 ret <== NOT EXECUTED 201faf0: 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*/ 201faf4: 23 00 81 1a sethi %hi(0x2046800), %l1 201faf8: d0 04 61 0c ld [ %l1 + 0x10c ], %o0 ! 204690c 201fafc: 94 10 20 40 mov 0x40, %o2 201fb00: 13 00 81 6e sethi %hi(0x205b800), %o1 201fb04: 40 00 43 00 call 2030704 201fb08: 92 12 60 0c or %o1, 0xc, %o1 ! 205b80c rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 201fb0c: 03 00 81 6c sethi %hi(0x205b000), %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*/ 201fb10: d0 04 61 0c ld [ %l1 + 0x10c ], %o0 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 201fb14: d2 00 60 10 ld [ %g1 + 0x10 ], %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*/ 201fb18: c2 07 bf f4 ld [ %fp + -12 ], %g1 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 201fb1c: 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*/ 201fb20: c2 22 00 00 st %g1, [ %o0 ] /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 201fb24: 94 10 20 10 mov 0x10, %o2 201fb28: 40 00 42 f7 call 2030704 201fb2c: 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); 201fb30: a0 07 bf e4 add %fp, -28, %l0 201fb34: 96 10 20 00 clr %o3 201fb38: 25 00 81 03 sethi %hi(0x2040c00), %l2 201fb3c: 92 10 20 00 clr %o1 201fb40: 94 10 00 10 mov %l0, %o2 201fb44: 7f ff 92 09 call 2004368 201fb48: 90 14 a0 58 or %l2, 0x58, %o0 rtems_filesystem_root = loc; 201fb4c: d0 04 61 0c ld [ %l1 + 0x10c ], %o0 201fb50: 92 10 00 10 mov %l0, %o1 201fb54: 94 10 20 10 mov 0x10, %o2 201fb58: 40 00 42 eb call 2030704 201fb5c: 90 02 20 14 add %o0, 0x14, %o0 rtems_filesystem_evaluate_path("/", 0, &loc, 0); 201fb60: 92 10 20 00 clr %o1 201fb64: 94 10 00 10 mov %l0, %o2 201fb68: 90 14 a0 58 or %l2, 0x58, %o0 201fb6c: 7f ff 91 ff call 2004368 201fb70: 96 10 20 00 clr %o3 rtems_filesystem_current = loc; 201fb74: d0 04 61 0c ld [ %l1 + 0x10c ], %o0 201fb78: 92 10 00 10 mov %l0, %o1 201fb7c: 90 02 20 04 add %o0, 4, %o0 201fb80: 40 00 42 e1 call 2030704 201fb84: 94 10 20 10 mov 0x10, %o2 return RTEMS_SUCCESSFUL; } 201fb88: 81 c7 e0 08 ret 201fb8c: 81 e8 00 00 restore 0201f9b8 : * 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) { 201f9b8: 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); 201f9bc: 90 10 20 00 clr %o0 <== NOT EXECUTED 201f9c0: 92 10 20 00 clr %o1 <== NOT EXECUTED 201f9c4: 40 00 06 cc call 20214f4 <== NOT EXECUTED 201f9c8: 94 07 bf f0 add %fp, -16, %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 201f9cc: 86 92 20 00 orcc %o0, 0, %g3 <== NOT EXECUTED 201f9d0: 12 80 00 26 bne 201fa68 <== NOT EXECUTED 201f9d4: 03 00 81 1a sethi %hi(0x2046800), %g1 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 201f9d8: e0 00 61 0c ld [ %g1 + 0x10c ], %l0 ! 204690c <== NOT EXECUTED 201f9dc: 92 10 61 0c or %g1, 0x10c, %o1 <== NOT EXECUTED 201f9e0: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED 201f9e4: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 201f9e8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 201f9ec: 32 80 00 0a bne,a 201fa14 <== NOT EXECUTED 201f9f0: 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); 201f9f4: 40 00 07 ed call 20219a8 <== NOT EXECUTED 201f9f8: 01 00 00 00 nop <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 201f9fc: 86 92 20 00 orcc %o0, 0, %g3 <== NOT EXECUTED 201fa00: 12 80 00 1a bne 201fa68 <== NOT EXECUTED 201fa04: 01 00 00 00 nop <== NOT EXECUTED free_user_env(tmp); 201fa08: 7f ff ff ce call 201f940 <== NOT EXECUTED 201fa0c: 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, 201fa10: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 201fa14: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 201fa18: 31 00 81 1a sethi %hi(0x2046800), %i0 <== NOT EXECUTED 201fa1c: a0 16 21 0c or %i0, 0x10c, %l0 ! 204690c <== NOT EXECUTED 201fa20: 40 00 08 07 call 2021a3c <== NOT EXECUTED 201fa24: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 201fa28: 86 92 20 00 orcc %o0, 0, %g3 <== NOT EXECUTED 201fa2c: 12 80 00 0c bne 201fa5c <== NOT EXECUTED 201fa30: 03 00 81 6e sethi %hi(0x205b800), %g1 <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 201fa34: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 201fa38: 15 00 80 7e sethi %hi(0x201f800), %o2 <== NOT EXECUTED 201fa3c: 40 00 07 af call 20218f8 <== NOT EXECUTED 201fa40: 94 12 a1 40 or %o2, 0x140, %o2 ! 201f940 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 201fa44: 86 92 20 00 orcc %o0, 0, %g3 <== NOT EXECUTED 201fa48: 12 80 00 05 bne 201fa5c <== NOT EXECUTED 201fa4c: 03 00 81 6e sethi %hi(0x205b800), %g1 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 201fa50: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 201fa54: 10 80 00 05 b 201fa68 <== NOT EXECUTED 201fa58: c2 26 21 0c st %g1, [ %i0 + 0x10c ] <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 201fa5c: 05 00 81 1a sethi %hi(0x2046800), %g2 <== NOT EXECUTED 201fa60: 82 10 60 0c or %g1, 0xc, %g1 <== NOT EXECUTED 201fa64: c2 20 a1 0c st %g1, [ %g2 + 0x10c ] <== NOT EXECUTED return sc; } 201fa68: 81 c7 e0 08 ret <== NOT EXECUTED 201fa6c: 91 e8 00 03 restore %g0, %g3, %o0 <== NOT EXECUTED 02004bf4 : * size and thus we skip updating the statistics. */ void rtems_malloc_statistics_at_free( void *pointer ) { 2004bf4: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED size_t size; if (_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, pointer, &size) ) { 2004bf8: 11 00 81 6b sethi %hi(0x205ac00), %o0 <== NOT EXECUTED 2004bfc: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 2004c00: 90 12 23 88 or %o0, 0x388, %o0 <== NOT EXECUTED 2004c04: 40 00 15 57 call 200a160 <_Protected_heap_Get_block_size> <== NOT EXECUTED 2004c08: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 2004c0c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED 2004c10: 02 80 00 08 be 2004c30 <== NOT EXECUTED 2004c14: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED MSBUMP(lifetime_freed, size); 2004c18: 03 00 81 6b sethi %hi(0x205ac00), %g1 <== NOT EXECUTED 2004c1c: 82 10 63 e0 or %g1, 0x3e0, %g1 ! 205afe0 <== NOT EXECUTED 2004c20: d8 18 60 28 ldd [ %g1 + 0x28 ], %o4 <== NOT EXECUTED 2004c24: 86 83 40 02 addcc %o5, %g2, %g3 <== NOT EXECUTED 2004c28: 84 43 20 00 addx %o4, 0, %g2 <== NOT EXECUTED 2004c2c: c4 38 60 28 std %g2, [ %g1 + 0x28 ] <== NOT EXECUTED 2004c30: 81 c7 e0 08 ret <== NOT EXECUTED 2004c34: 81 e8 00 00 restore <== NOT EXECUTED 02004c38 : } void rtems_malloc_statistics_at_malloc( void *pointer ) { 2004c38: 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 ) 2004c3c: 92 96 20 00 orcc %i0, 0, %o1 <== NOT EXECUTED 2004c40: 02 80 00 13 be 2004c8c <== NOT EXECUTED 2004c44: 11 00 81 6b sethi %hi(0x205ac00), %o0 <== NOT EXECUTED void rtems_malloc_statistics_at_malloc( void *pointer ) { size_t actual_size = 0; 2004c48: 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); 2004c4c: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 2004c50: 40 00 15 44 call 200a160 <_Protected_heap_Get_block_size> <== NOT EXECUTED 2004c54: 90 12 23 88 or %o0, 0x388, %o0 <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 2004c58: 03 00 81 6b sethi %hi(0x205ac00), %g1 <== NOT EXECUTED 2004c5c: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED 2004c60: 96 10 63 e0 or %g1, 0x3e0, %o3 <== NOT EXECUTED 2004c64: d8 1a e0 20 ldd [ %o3 + 0x20 ], %o4 <== NOT EXECUTED current_depth = s->lifetime_allocated - s->lifetime_freed; 2004c68: c2 02 e0 2c ld [ %o3 + 0x2c ], %g1 <== NOT EXECUTED if (current_depth > s->max_depth) 2004c6c: 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); 2004c70: 86 83 40 02 addcc %o5, %g2, %g3 <== NOT EXECUTED 2004c74: 84 43 20 00 addx %o4, 0, %g2 <== NOT EXECUTED 2004c78: c4 3a e0 20 std %g2, [ %o3 + 0x20 ] <== NOT EXECUTED current_depth = s->lifetime_allocated - s->lifetime_freed; 2004c7c: 86 20 c0 01 sub %g3, %g1, %g3 <== NOT EXECUTED if (current_depth > s->max_depth) 2004c80: 80 a0 c0 04 cmp %g3, %g4 <== NOT EXECUTED 2004c84: 38 80 00 02 bgu,a 2004c8c <== NOT EXECUTED 2004c88: c6 22 e0 18 st %g3, [ %o3 + 0x18 ] <== NOT EXECUTED 2004c8c: 81 c7 e0 08 ret <== NOT EXECUTED 2004c90: 81 e8 00 00 restore <== NOT EXECUTED 02004c94 : void rtems_malloc_statistics_initialize( void ) { /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 2004c94: 11 00 81 6b sethi %hi(0x205ac00), %o0 <== NOT EXECUTED 2004c98: 92 10 20 00 clr %o1 <== NOT EXECUTED 2004c9c: 90 12 23 e0 or %o0, 0x3e0, %o0 <== NOT EXECUTED 2004ca0: 94 10 20 30 mov 0x30, %o2 <== NOT EXECUTED 2004ca4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2004ca8: 40 00 af 1f call 2030924 <== NOT EXECUTED 2004cac: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 2004cb0: 01 00 00 00 nop 02004b30 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 2004b30: 9d e3 bf 98 save %sp, -104, %sp void *return_this; /* * Parameter error checks */ if ( !pointer ) 2004b34: a0 96 20 00 orcc %i0, 0, %l0 2004b38: 02 80 00 1f be 2004bb4 2004b3c: 03 00 80 76 sethi %hi(0x201d800), %g1 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 2004b40: c2 00 60 a4 ld [ %g1 + 0xa4 ], %g1 ! 201d8a4 <_System_state_Current> 2004b44: 80 a0 60 03 cmp %g1, 3 2004b48: 12 80 00 07 bne 2004b64 2004b4c: c0 24 00 00 clr [ %l0 ] 2004b50: 7f ff fb cf call 2003a8c 2004b54: 01 00 00 00 nop 2004b58: 80 8a 20 ff btst 0xff, %o0 2004b5c: 02 80 00 17 be 2004bb8 2004b60: b0 10 20 16 mov 0x16, %i0 /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 2004b64: 7f ff fb e4 call 2003af4 2004b68: b0 10 20 0c mov 0xc, %i0 /* * Perform the aligned allocation requested */ return_this = _Protected_heap_Allocate_aligned( 2004b6c: 92 10 00 1a mov %i2, %o1 2004b70: 94 10 00 19 mov %i1, %o2 2004b74: 11 00 80 75 sethi %hi(0x201d400), %o0 2004b78: 40 00 13 37 call 2009854 <_Protected_heap_Allocate_aligned> 2004b7c: 90 12 21 38 or %o0, 0x138, %o0 ! 201d538 &RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 2004b80: b4 92 20 00 orcc %o0, 0, %i2 2004b84: 02 80 00 0d be 2004bb8 2004b88: 03 00 80 73 sethi %hi(0x201cc00), %g1 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 2004b8c: c2 00 61 f4 ld [ %g1 + 0x1f4 ], %g1 ! 201cdf4 2004b90: 80 a0 60 00 cmp %g1, 0 2004b94: 22 80 00 06 be,a 2004bac 2004b98: f4 24 00 00 st %i2, [ %l0 ] (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 2004b9c: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 2004ba0: 9f c0 40 00 call %g1 <== NOT EXECUTED 2004ba4: 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; 2004ba8: f4 24 00 00 st %i2, [ %l0 ] <== NOT EXECUTED 2004bac: 81 c7 e0 08 ret 2004bb0: 91 e8 20 00 restore %g0, 0, %o0 return 0; 2004bb4: b0 10 20 16 mov 0x16, %i0 } 2004bb8: 81 c7 e0 08 ret 2004bbc: 81 e8 00 00 restore 0200642c : void rtems_panic( const char *printf_format, ... ) { 200642c: 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); 2006430: 11 08 00 00 sethi %hi(0x20000000), %o0 <== NOT EXECUTED ... ) { va_list arglist; va_start(arglist, printf_format); 2006434: 94 07 a0 48 add %fp, 0x48, %o2 <== NOT EXECUTED 2006438: f2 27 a0 48 st %i1, [ %fp + 0x48 ] <== NOT EXECUTED 200643c: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 2006440: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 2006444: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 2006448: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 200644c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 2006450: 7f ff ff 88 call 2006270 <== NOT EXECUTED 2006454: d4 27 bf f4 st %o2, [ %fp + -12 ] <== NOT EXECUTED va_end(arglist); } 2006458: 81 c7 e0 08 ret <== NOT EXECUTED 200645c: 81 e8 00 00 restore <== NOT EXECUTED 0200ea34 : void *internal_start, void *external_start, uint32_t length, Objects_Id *id ) { 200ea34: 9d e3 bf 98 save %sp, -104, %sp register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name) ) 200ea38: a2 96 20 00 orcc %i0, 0, %l1 200ea3c: 02 80 00 14 be 200ea8c 200ea40: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 200ea44: 80 a7 20 00 cmp %i4, 0 200ea48: 02 80 00 24 be 200ead8 200ea4c: 82 16 80 19 or %i2, %i1, %g1 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 200ea50: 80 88 60 07 btst 7, %g1 200ea54: 12 80 00 0e bne 200ea8c 200ea58: b0 10 20 09 mov 9, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 200ea5c: 05 00 80 c5 sethi %hi(0x2031400), %g2 200ea60: c2 00 a3 e0 ld [ %g2 + 0x3e0 ], %g1 ! 20317e0 <_Thread_Dispatch_disable_level> 200ea64: 82 00 60 01 inc %g1 200ea68: c2 20 a3 e0 st %g1, [ %g2 + 0x3e0 ] * of free port control blocks. */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) 200ea6c: 21 00 80 c5 sethi %hi(0x2031400), %l0 200ea70: 40 00 13 e0 call 20139f0 <_Objects_Allocate> 200ea74: 90 14 21 54 or %l0, 0x154, %o0 ! 2031554 <_Dual_ported_memory_Information> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 200ea78: 80 a2 20 00 cmp %o0, 0 200ea7c: 32 80 00 06 bne,a 200ea94 200ea80: c4 02 20 08 ld [ %o0 + 8 ], %g2 _Thread_Enable_dispatch(); 200ea84: 40 00 17 b5 call 2014958 <_Thread_Enable_dispatch> 200ea88: b0 10 20 05 mov 5, %i0 200ea8c: 81 c7 e0 08 ret 200ea90: 81 e8 00 00 restore #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200ea94: 82 14 21 54 or %l0, 0x154, %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 200ea98: e2 22 20 0c st %l1, [ %o0 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200ea9c: 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; 200eaa0: 82 06 ff ff add %i3, -1, %g1 200eaa4: c2 22 20 18 st %g1, [ %o0 + 0x18 ] &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 200eaa8: c4 27 00 00 st %g2, [ %i4 ] 200eaac: 03 00 00 3f sethi %hi(0xfc00), %g1 200eab0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 200eab4: 84 08 80 01 and %g2, %g1, %g2 200eab8: 85 28 a0 02 sll %g2, 2, %g2 if ( !the_port ) { _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 200eabc: f2 22 20 10 st %i1, [ %o0 + 0x10 ] the_port->external_base = external_start; 200eac0: f4 22 20 14 st %i2, [ %o0 + 0x14 ] 200eac4: d0 20 c0 02 st %o0, [ %g3 + %g2 ] &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; _Thread_Enable_dispatch(); 200eac8: 40 00 17 a4 call 2014958 <_Thread_Enable_dispatch> 200eacc: b0 10 20 00 clr %i0 200ead0: 81 c7 e0 08 ret 200ead4: 81 e8 00 00 restore return RTEMS_SUCCESSFUL; 200ead8: b0 10 20 09 mov 9, %i0 <== NOT EXECUTED } 200eadc: 81 c7 e0 08 ret <== NOT EXECUTED 200eae0: 81 e8 00 00 restore <== NOT EXECUTED 02006644 : rtems_status_code rtems_rate_monotonic_period( Objects_Id id, rtems_interval length ) { 2006644: 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 *) 2006648: 11 00 80 71 sethi %hi(0x201c400), %o0 200664c: 92 10 00 18 mov %i0, %o1 2006650: 90 12 21 ac or %o0, 0x1ac, %o0 2006654: 40 00 08 e4 call 20089e4 <_Objects_Get> 2006658: 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 ) { 200665c: c2 07 bf f4 ld [ %fp + -12 ], %g1 2006660: 80 a0 60 00 cmp %g1, 0 2006664: 12 80 00 64 bne 20067f4 2006668: a2 10 00 08 mov %o0, %l1 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 200666c: 27 00 80 71 sethi %hi(0x201c400), %l3 2006670: c4 02 20 50 ld [ %o0 + 0x50 ], %g2 2006674: c2 04 e3 e4 ld [ %l3 + 0x3e4 ], %g1 2006678: 80 a0 80 01 cmp %g2, %g1 200667c: 02 80 00 06 be 2006694 2006680: 80 a6 60 00 cmp %i1, 0 _Thread_Enable_dispatch(); 2006684: 40 00 0b 46 call 200939c <_Thread_Enable_dispatch> 2006688: b0 10 20 17 mov 0x17, %i0 200668c: 81 c7 e0 08 ret 2006690: 81 e8 00 00 restore return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 2006694: 12 80 00 0c bne 20066c4 2006698: 01 00 00 00 nop switch ( the_period->state ) { 200669c: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 20066a0: 80 a0 60 00 cmp %g1, 0 20066a4: 02 80 00 50 be 20067e4 20066a8: b0 10 20 0b mov 0xb, %i0 20066ac: 82 00 7f fd add %g1, -3, %g1 20066b0: 80 a0 60 01 cmp %g1, 1 20066b4: 18 80 00 4c bgu 20067e4 20066b8: 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(); 20066bc: 10 80 00 4a b 20067e4 20066c0: b0 10 20 06 mov 6, %i0 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 20066c4: 7f ff f1 59 call 2002c28 20066c8: 01 00 00 00 nop 20066cc: a0 10 00 08 mov %o0, %l0 switch ( the_period->state ) { 20066d0: e4 04 60 38 ld [ %l1 + 0x38 ], %l2 20066d4: 80 a4 a0 02 cmp %l2, 2 20066d8: 02 80 00 1a be 2006740 20066dc: 80 a4 a0 04 cmp %l2, 4 20066e0: 02 80 00 34 be 20067b0 20066e4: 80 a4 a0 00 cmp %l2, 0 20066e8: 12 80 00 43 bne 20067f4 20066ec: 01 00 00 00 nop case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 20066f0: 7f ff f1 52 call 2002c38 20066f4: 01 00 00 00 nop /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 20066f8: 7f ff ff 5e call 2006470 <_Rate_monotonic_Initiate_statistics> 20066fc: 90 10 00 11 mov %l1, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 2006700: 82 10 20 02 mov 2, %g1 2006704: c2 24 60 38 st %g1, [ %l1 + 0x38 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2006708: 03 00 80 1a sethi %hi(0x2006800), %g1 200670c: 82 10 62 c8 or %g1, 0x2c8, %g1 ! 2006ac8 <_Rate_monotonic_Timeout> the_watchdog->id = id; 2006710: f0 24 60 30 st %i0, [ %l1 + 0x30 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006714: 92 04 60 10 add %l1, 0x10, %o1 2006718: 11 00 80 72 sethi %hi(0x201c800), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 200671c: f2 24 60 1c st %i1, [ %l1 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006720: 90 12 20 04 or %o0, 4, %o0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2006724: c0 24 60 18 clr [ %l1 + 0x18 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 2006728: c0 24 60 34 clr [ %l1 + 0x34 ] _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 200672c: f2 24 60 4c st %i1, [ %l1 + 0x4c ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2006730: c2 24 60 2c st %g1, [ %l1 + 0x2c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006734: 40 00 10 73 call 200a900 <_Watchdog_Insert> 2006738: b0 10 20 00 clr %i0 200673c: 30 80 00 2a b,a 20067e4 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 2006740: 7f ff ff 68 call 20064e0 <_Rate_monotonic_Update_statistics> 2006744: 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; 2006748: 82 10 20 01 mov 1, %g1 the_period->next_length = length; 200674c: 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; 2006750: c2 24 60 38 st %g1, [ %l1 + 0x38 ] the_period->next_length = length; _ISR_Enable( level ); 2006754: 7f ff f1 39 call 2002c38 2006758: 90 10 00 10 mov %l0, %o0 _Thread_Executing->Wait.id = the_period->Object.id; 200675c: c2 04 e3 e4 ld [ %l3 + 0x3e4 ], %g1 2006760: c4 04 60 08 ld [ %l1 + 8 ], %g2 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 2006764: 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; 2006768: c4 20 60 20 st %g2, [ %g1 + 0x20 ] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 200676c: 40 00 0d 96 call 2009dc4 <_Thread_Set_state> 2006770: 13 00 00 10 sethi %hi(0x4000), %o1 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 2006774: 7f ff f1 2d call 2002c28 2006778: 01 00 00 00 nop local_state = the_period->state; 200677c: e0 04 60 38 ld [ %l1 + 0x38 ], %l0 the_period->state = RATE_MONOTONIC_ACTIVE; 2006780: e4 24 60 38 st %l2, [ %l1 + 0x38 ] _ISR_Enable( level ); 2006784: 7f ff f1 2d call 2002c38 2006788: 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 ) 200678c: 80 a4 20 03 cmp %l0, 3 2006790: 12 80 00 04 bne 20067a0 2006794: d0 04 e3 e4 ld [ %l3 + 0x3e4 ], %o0 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 2006798: 40 00 09 eb call 2008f44 <_Thread_Clear_state> <== NOT EXECUTED 200679c: 13 00 00 10 sethi %hi(0x4000), %o1 <== NOT EXECUTED _Thread_Enable_dispatch(); 20067a0: 40 00 0a ff call 200939c <_Thread_Enable_dispatch> 20067a4: b0 10 20 00 clr %i0 20067a8: 81 c7 e0 08 ret 20067ac: 81 e8 00 00 restore case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 20067b0: 7f ff ff 4c call 20064e0 <_Rate_monotonic_Update_statistics> 20067b4: 90 10 00 11 mov %l1, %o0 _ISR_Enable( level ); 20067b8: 7f ff f1 20 call 2002c38 20067bc: 90 10 00 10 mov %l0, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 20067c0: 82 10 20 02 mov 2, %g1 20067c4: 11 00 80 72 sethi %hi(0x201c800), %o0 20067c8: 92 04 60 10 add %l1, 0x10, %o1 20067cc: 90 12 20 04 or %o0, 4, %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 20067d0: f2 24 60 1c st %i1, [ %l1 + 0x1c ] the_period->next_length = length; 20067d4: f2 24 60 4c st %i1, [ %l1 + 0x4c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 20067d8: 40 00 10 4a call 200a900 <_Watchdog_Insert> 20067dc: c2 24 60 38 st %g1, [ %l1 + 0x38 ] _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 20067e0: b0 10 20 06 mov 6, %i0 20067e4: 40 00 0a ee call 200939c <_Thread_Enable_dispatch> 20067e8: 01 00 00 00 nop 20067ec: 81 c7 e0 08 ret 20067f0: 81 e8 00 00 restore case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 20067f4: 81 c7 e0 08 ret 20067f8: 91 e8 20 04 restore %g0, 4, %o0 0200ffdc : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 200ffdc: 9d e3 bf 90 save %sp, -112, %sp 200ffe0: 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 ) 200ffe4: 80 a6 60 00 cmp %i1, 0 200ffe8: 02 80 00 2c be 2010098 200ffec: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 200fff0: 03 00 80 c6 sethi %hi(0x2031800), %g1 200fff4: 40 00 09 1b call 2012460 <_API_Mutex_Lock> 200fff8: d0 00 60 9c ld [ %g1 + 0x9c ], %o0 ! 203189c <_RTEMS_Allocator_Mutex> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 200fffc: 92 10 00 10 mov %l0, %o1 2010000: 11 00 80 c5 sethi %hi(0x2031400), %o0 2010004: 94 07 bf f0 add %fp, -16, %o2 2010008: 40 00 0f d4 call 2013f58 <_Objects_Get_no_protection> 201000c: 90 12 22 14 or %o0, 0x214, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 2010010: c2 07 bf f0 ld [ %fp + -16 ], %g1 2010014: 80 a0 60 00 cmp %g1, 0 2010018: 02 80 00 05 be 201002c 201001c: a0 10 00 08 mov %o0, %l0 2010020: 80 a0 60 01 cmp %g1, 1 2010024: 10 80 00 0f b 2010060 2010028: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 201002c: 92 10 00 19 mov %i1, %o1 2010030: 94 10 00 1a mov %i2, %o2 2010034: 90 02 20 68 add %o0, 0x68, %o0 2010038: 96 07 bf f4 add %fp, -12, %o3 201003c: 40 00 0c 0a call 2013064 <_Heap_Extend> 2010040: b0 10 20 09 mov 9, %i0 starting_address, length, &amount_extended ); switch ( heap_status ) { 2010044: 80 a2 20 01 cmp %o0, 1 2010048: 02 80 00 12 be 2010090 201004c: 03 00 80 c6 sethi %hi(0x2031800), %g1 2010050: 0a 80 00 08 bcs 2010070 2010054: c6 07 bf f4 ld [ %fp + -12 ], %g3 2010058: 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; 201005c: b0 10 20 18 mov 0x18, %i0 starting_address, length, &amount_extended ); switch ( heap_status ) { 2010060: 32 80 00 0b bne,a 201008c 2010064: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 2010068: 10 80 00 0a b 2010090 201006c: 03 00 80 c6 sethi %hi(0x2031800), %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 2010070: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 the_region->maximum_segment_size += amount_extended; 2010074: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 2010078: 84 00 80 03 add %g2, %g3, %g2 the_region->maximum_segment_size += amount_extended; 201007c: 82 00 40 03 add %g1, %g3, %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 2010080: c4 24 20 54 st %g2, [ %l0 + 0x54 ] the_region->maximum_segment_size += amount_extended; 2010084: c2 24 20 5c st %g1, [ %l0 + 0x5c ] 2010088: b0 10 20 00 clr %i0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 201008c: 03 00 80 c6 sethi %hi(0x2031800), %g1 2010090: 40 00 09 0a call 20124b8 <_API_Mutex_Unlock> 2010094: d0 00 60 9c ld [ %g1 + 0x9c ], %o0 ! 203189c <_RTEMS_Allocator_Mutex> return return_status; } 2010098: 81 c7 e0 08 ret 201009c: 81 e8 00 00 restore 020103a4 : Objects_Id id, void *segment, size_t size, size_t *old_size ) { 20103a4: 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 ) 20103a8: 80 a6 e0 00 cmp %i3, 0 20103ac: 02 80 00 32 be 2010474 20103b0: 21 00 80 c6 sethi %hi(0x2031800), %l0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 20103b4: 40 00 08 2b call 2012460 <_API_Mutex_Lock> 20103b8: d0 04 20 9c ld [ %l0 + 0x9c ], %o0 ! 203189c <_RTEMS_Allocator_Mutex> 20103bc: 92 10 00 18 mov %i0, %o1 20103c0: 11 00 80 c5 sethi %hi(0x2031400), %o0 20103c4: 94 07 bf f0 add %fp, -16, %o2 20103c8: 40 00 0e e4 call 2013f58 <_Objects_Get_no_protection> 20103cc: 90 12 22 14 or %o0, 0x214, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 20103d0: c2 07 bf f0 ld [ %fp + -16 ], %g1 20103d4: 80 a0 60 00 cmp %g1, 0 20103d8: 02 80 00 0b be 2010404 20103dc: b0 10 00 08 mov %o0, %i0 20103e0: 82 18 60 01 xor %g1, 1, %g1 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 20103e4: d0 04 20 9c ld [ %l0 + 0x9c ], %o0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 20103e8: 80 a0 00 01 cmp %g0, %g1 20103ec: 82 40 3f ff addx %g0, -1, %g1 20103f0: b0 08 7f eb and %g1, -21, %i0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 20103f4: 40 00 08 31 call 20124b8 <_API_Mutex_Unlock> 20103f8: b0 06 20 19 add %i0, 0x19, %i0 20103fc: 81 c7 e0 08 ret 2010400: 81 e8 00 00 restore case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 2010404: 94 10 00 1a mov %i2, %o2 2010408: 92 10 00 19 mov %i1, %o1 201040c: 90 02 20 68 add %o0, 0x68, %o0 2010410: 96 07 bf ec add %fp, -20, %o3 2010414: 40 00 0c 94 call 2013664 <_Heap_Resize_block> 2010418: 98 07 bf f4 add %fp, -12, %o4 segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 201041c: c2 07 bf ec ld [ %fp + -20 ], %g1 _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 2010420: b4 92 20 00 orcc %o0, 0, %i2 2010424: 12 80 00 0b bne 2010450 2010428: c2 26 c0 00 st %g1, [ %i3 ] 201042c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 2010430: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2010434: 02 80 00 08 be 2010454 <== NOT EXECUTED 2010438: 03 00 80 c6 sethi %hi(0x2031800), %g1 <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ 201043c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2010440: 40 00 21 de call 2018bb8 <_Region_Process_queue> <== NOT EXECUTED 2010444: b0 10 20 00 clr %i0 <== NOT EXECUTED 2010448: 81 c7 e0 08 ret <== NOT EXECUTED 201044c: 81 e8 00 00 restore <== NOT EXECUTED else _RTEMS_Unlock_allocator(); 2010450: 03 00 80 c6 sethi %hi(0x2031800), %g1 2010454: d0 00 60 9c ld [ %g1 + 0x9c ], %o0 ! 203189c <_RTEMS_Allocator_Mutex> 2010458: 40 00 08 18 call 20124b8 <_API_Mutex_Unlock> 201045c: b0 10 20 00 clr %i0 return 2010460: 80 a6 a0 00 cmp %i2, 0 2010464: 02 bf ff e6 be 20103fc 2010468: 80 a6 a0 01 cmp %i2, 1 201046c: 02 bf ff e4 be 20103fc 2010470: b0 10 20 0d mov 0xd, %i0 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 2010474: b0 10 20 09 mov 9, %i0 } 2010478: 81 c7 e0 08 ret 201047c: 81 e8 00 00 restore 020051b4 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 20051b4: 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 ) ) 20051b8: a4 96 20 00 orcc %i0, 0, %l2 20051bc: 02 80 00 23 be 2005248 20051c0: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 20051c4: 80 a7 20 00 cmp %i4, 0 20051c8: 02 80 00 20 be 2005248 20051cc: b0 10 20 09 mov 9, %i0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 20051d0: 84 8e a0 c0 andcc %i2, 0xc0, %g2 20051d4: 02 80 00 0d be 2005208 20051d8: 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); 20051dc: 82 0e a0 30 and %i2, 0x30, %g1 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 20051e0: 80 a0 60 10 cmp %g1, 0x10 20051e4: 02 80 00 04 be 20051f4 20051e8: 80 a0 60 20 cmp %g1, 0x20 20051ec: 32 80 00 17 bne,a 2005248 20051f0: b0 10 20 0b mov 0xb, %i0 20051f4: 80 8e a0 04 btst 4, %i2 20051f8: 02 80 00 64 be 2005388 20051fc: 80 a0 a0 c0 cmp %g2, 0xc0 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 2005200: 02 80 00 62 be 2005388 2005204: 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 ) ) 2005208: 02 80 00 04 be 2005218 200520c: 80 a6 60 01 cmp %i1, 1 2005210: 18 80 00 0e bgu 2005248 2005214: b0 10 20 0a mov 0xa, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2005218: 03 00 80 5d sethi %hi(0x2017400), %g1 200521c: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 20176f0 <_Thread_Dispatch_disable_level> 2005220: 84 00 a0 01 inc %g2 2005224: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] * 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 ); 2005228: 11 00 80 5d sethi %hi(0x2017400), %o0 200522c: 40 00 05 57 call 2006788 <_Objects_Allocate> 2005230: 90 12 21 b4 or %o0, 0x1b4, %o0 ! 20175b4 <_Semaphore_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 2005234: a0 92 20 00 orcc %o0, 0, %l0 2005238: 12 80 00 06 bne 2005250 200523c: 80 a4 60 00 cmp %l1, 0 _Thread_Enable_dispatch(); 2005240: 40 00 09 1a call 20076a8 <_Thread_Enable_dispatch> 2005244: b0 10 20 05 mov 5, %i0 2005248: 81 c7 e0 08 ret 200524c: 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 ) ) { 2005250: 02 80 00 33 be 200531c 2005254: f4 24 20 10 st %i2, [ %l0 + 0x10 ] CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 2005258: 80 8e a0 40 btst 0x40, %i2 200525c: 12 80 00 06 bne 2005274 2005260: 82 10 20 02 mov 2, %g1 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 2005264: 80 8e a0 80 btst 0x80, %i2 2005268: 02 80 00 05 be 200527c 200526c: 80 8e a0 04 btst 4, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 2005270: 82 10 20 03 mov 3, %g1 2005274: 10 80 00 05 b 2005288 2005278: c2 27 bf e8 st %g1, [ %fp + -24 ] else if ( _Attributes_Is_priority( attribute_set ) ) 200527c: 12 bf ff fe bne 2005274 2005280: 82 10 20 01 mov 1, %g1 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; 2005284: c0 27 bf e8 clr [ %fp + -24 ] if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 2005288: 80 a4 60 10 cmp %l1, 0x10 200528c: 12 80 00 0f bne 20052c8 2005290: 82 10 20 02 mov 2, %g1 the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 2005294: c2 07 bf e8 ld [ %fp + -24 ], %g1 2005298: 80 a0 60 01 cmp %g1, 1 200529c: 08 80 00 07 bleu 20052b8 20052a0: c0 27 bf e0 clr [ %fp + -32 ] 20052a4: 80 a0 60 03 cmp %g1, 3 20052a8: 38 80 00 0b bgu,a 20052d4 20052ac: 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; 20052b0: 10 80 00 04 b 20052c0 20052b4: 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; 20052b8: 10 80 00 06 b 20052d0 20052bc: 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; 20052c0: 10 80 00 04 b 20052d0 20052c4: 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; 20052c8: 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; 20052cc: 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( 20052d0: 82 1e 60 01 xor %i1, 1, %g1 20052d4: 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; 20052d8: f6 27 bf ec st %i3, [ %fp + -20 ] mutex_status = _CORE_mutex_Initialize( 20052dc: 94 60 3f ff subx %g0, -1, %o2 20052e0: 90 04 20 14 add %l0, 0x14, %o0 20052e4: 40 00 03 2a call 2005f8c <_CORE_mutex_Initialize> 20052e8: 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 ) { 20052ec: 80 a2 20 06 cmp %o0, 6 20052f0: 32 80 00 19 bne,a 2005354 20052f4: 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 ); 20052f8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 20052fc: 11 00 80 5d sethi %hi(0x2017400), %o0 <== NOT EXECUTED 2005300: 90 12 21 b4 or %o0, 0x1b4, %o0 ! 20175b4 <_Semaphore_Information> <== NOT EXECUTED 2005304: 40 00 06 0e call 2006b3c <_Objects_Free> <== NOT EXECUTED 2005308: b0 10 20 13 mov 0x13, %i0 <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 200530c: 40 00 08 e7 call 20076a8 <_Thread_Enable_dispatch> <== NOT EXECUTED 2005310: 01 00 00 00 nop <== NOT EXECUTED 2005314: 81 c7 e0 08 ret <== NOT EXECUTED 2005318: 81 e8 00 00 restore <== NOT EXECUTED return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) 200531c: 80 8e a0 04 btst 4, %i2 2005320: 22 80 00 04 be,a 2005330 2005324: c0 27 bf f4 clr [ %fp + -12 ] the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 2005328: 82 10 20 01 mov 1, %g1 200532c: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 2005330: 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; 2005334: c0 27 bf e0 clr [ %fp + -32 ] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; 2005338: c0 27 bf ec clr [ %fp + -20 ] _CORE_semaphore_Initialize( 200533c: 94 10 00 19 mov %i1, %o2 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 2005340: 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( 2005344: 90 04 20 14 add %l0, 0x14, %o0 2005348: 40 00 03 e8 call 20062e8 <_CORE_semaphore_Initialize> 200534c: 92 07 bf f0 add %fp, -16, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2005350: c4 04 20 08 ld [ %l0 + 8 ], %g2 2005354: 03 00 80 5d sethi %hi(0x2017400), %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 2005358: e4 24 20 0c st %l2, [ %l0 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200535c: c6 00 61 d0 ld [ %g1 + 0x1d0 ], %g3 &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 2005360: c4 27 00 00 st %g2, [ %i4 ] 2005364: 03 00 00 3f sethi %hi(0xfc00), %g1 2005368: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 200536c: 84 08 80 01 and %g2, %g1, %g2 2005370: 85 28 a0 02 sll %g2, 2, %g2 the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 2005374: b0 10 20 00 clr %i0 2005378: 40 00 08 cc call 20076a8 <_Thread_Enable_dispatch> 200537c: e0 20 c0 02 st %l0, [ %g3 + %g2 ] 2005380: 81 c7 e0 08 ret 2005384: 81 e8 00 00 restore return RTEMS_SUCCESSFUL; 2005388: b0 10 20 0b mov 0xb, %i0 } 200538c: 81 c7 e0 08 ret 2005390: 81 e8 00 00 restore 02021454 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 2021454: 9d e3 bf 90 save %sp, -112, %sp 2021458: 11 00 81 6c sethi %hi(0x205b000), %o0 202145c: 92 10 00 18 mov %i0, %o1 2021460: 90 12 20 28 or %o0, 0x28, %o0 2021464: 7f ff a2 89 call 2009e88 <_Objects_Get> 2021468: 94 07 bf f4 add %fp, -12, %o2 register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 202146c: c2 07 bf f4 ld [ %fp + -12 ], %g1 2021470: 80 a0 60 00 cmp %g1, 0 2021474: 12 80 00 0f bne 20214b0 2021478: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 202147c: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 2021480: 80 88 60 30 btst 0x30, %g1 2021484: 02 80 00 06 be 202149c 2021488: 90 02 20 14 add %o0, 0x14, %o0 _CORE_mutex_Flush( 202148c: 92 10 20 00 clr %o1 2021490: 7f ff 9e ba call 2008f78 <_CORE_mutex_Flush> 2021494: 94 10 20 01 mov 1, %o2 2021498: 30 80 00 04 b,a 20214a8 &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 202149c: 92 10 20 00 clr %o1 <== NOT EXECUTED 20214a0: 7f ff 9f 8d call 20092d4 <_CORE_semaphore_Flush> <== NOT EXECUTED 20214a4: 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(); 20214a8: 7f ff a4 ea call 200a850 <_Thread_Enable_dispatch> 20214ac: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 20214b0: 81 c7 e0 08 ret 20214b4: 81 e8 00 00 restore 02014c14 : */ void rtems_shutdown_executive( uint32_t result ) { 2014c14: 9d e3 bf 10 save %sp, -240, %sp if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 2014c18: 05 00 80 5e sethi %hi(0x2017800), %g2 2014c1c: c2 00 a0 94 ld [ %g2 + 0x94 ], %g1 ! 2017894 <_System_state_Current> 2014c20: 80 a0 60 04 cmp %g1, 4 2014c24: 02 80 00 07 be 2014c40 2014c28: 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 ); 2014c2c: 13 00 80 5d sethi %hi(0x2017400), %o1 2014c30: c2 20 a0 94 st %g1, [ %g2 + 0x94 ] 2014c34: 92 12 62 68 or %o1, 0x268, %o1 2014c38: 7f ff d0 35 call 2008d0c <_CPU_Context_switch> 2014c3c: 90 07 bf 70 add %fp, -144, %o0 2014c40: 81 c7 e0 08 ret <== NOT EXECUTED 2014c44: 81 e8 00 00 restore <== NOT EXECUTED 02002f38 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 2002f38: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 2002f3c: 03 00 81 6c sethi %hi(0x205b000), %g1 <== NOT EXECUTED 2002f40: c2 00 62 24 ld [ %g1 + 0x224 ], %g1 ! 205b224 <_Thread_Executing> <== NOT EXECUTED ) { void *sp = __builtin_frame_address(0); #if defined(__GNUC__) if ( sp < the_stack->area ) { 2002f44: d0 00 60 c8 ld [ %g1 + 0xc8 ], %o0 <== NOT EXECUTED 2002f48: 80 a7 80 08 cmp %fp, %o0 <== NOT EXECUTED 2002f4c: 0a 80 00 07 bcs 2002f68 <== NOT EXECUTED 2002f50: b0 10 20 00 clr %i0 <== NOT EXECUTED 2002f54: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 <== NOT EXECUTED 2002f58: 82 02 00 01 add %o0, %g1, %g1 <== NOT EXECUTED 2002f5c: 80 a0 40 1e cmp %g1, %fp <== NOT EXECUTED 2002f60: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED 2002f64: 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 ) { 2002f68: 03 00 81 1f sethi %hi(0x2047c00), %g1 <== NOT EXECUTED 2002f6c: c2 00 62 28 ld [ %g1 + 0x228 ], %g1 ! 2047e28 <== NOT EXECUTED 2002f70: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2002f74: 02 80 00 0a be 2002f9c <== NOT EXECUTED 2002f78: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED pattern_ok = (!memcmp( 2002f7c: 90 02 20 08 add %o0, 8, %o0 <== NOT EXECUTED 2002f80: 13 00 81 6b sethi %hi(0x205ac00), %o1 <== NOT EXECUTED 2002f84: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 2002f88: 40 00 b5 b1 call 203064c <== NOT EXECUTED 2002f8c: 92 12 63 54 or %o1, 0x354, %o1 <== NOT EXECUTED 2002f90: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 2002f94: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED 2002f98: 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 ) 2002f9c: 80 8e 20 ff btst 0xff, %i0 <== NOT EXECUTED 2002fa0: 02 80 00 04 be 2002fb0 <== NOT EXECUTED 2002fa4: 80 8a 60 ff btst 0xff, %o1 <== NOT EXECUTED 2002fa8: 12 80 00 07 bne 2002fc4 <== NOT EXECUTED 2002fac: 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 ); 2002fb0: 03 00 81 6c sethi %hi(0x205b000), %g1 <== NOT EXECUTED 2002fb4: d0 00 62 24 ld [ %g1 + 0x224 ], %o0 ! 205b224 <_Thread_Executing> <== NOT EXECUTED 2002fb8: 92 0a 60 01 and %o1, 1, %o1 <== NOT EXECUTED 2002fbc: 7f ff ff c6 call 2002ed4 <== NOT EXECUTED 2002fc0: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return true; } 2002fc4: 81 c7 e0 08 ret <== NOT EXECUTED 2002fc8: 81 e8 00 00 restore <== NOT EXECUTED 02002eb8 : void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 2002eb8: 13 00 80 16 sethi %hi(0x2005800), %o1 <== NOT EXECUTED 2002ebc: 90 10 20 00 clr %o0 <== NOT EXECUTED 2002ec0: 92 12 62 28 or %o1, 0x228, %o1 <== NOT EXECUTED 2002ec4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2002ec8: 7f ff ff e6 call 2002e60 <== NOT EXECUTED 2002ecc: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 2002ed0: 01 00 00 00 nop 02002e60 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 2002e60: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED print_context = context; 2002e64: 23 00 81 1f sethi %hi(0x2047c00), %l1 <== NOT EXECUTED print_handler = print; 2002e68: 21 00 81 1f sethi %hi(0x2047c00), %l0 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 2002e6c: f0 24 62 2c st %i0, [ %l1 + 0x22c ] <== NOT EXECUTED print_handler = print; 2002e70: f2 24 22 30 st %i1, [ %l0 + 0x230 ] <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 2002e74: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2002e78: 13 00 81 01 sethi %hi(0x2040400), %o1 <== NOT EXECUTED 2002e7c: 9f c6 40 00 call %i1 <== NOT EXECUTED 2002e80: 92 12 61 78 or %o1, 0x178, %o1 ! 2040578 <== NOT EXECUTED (*print)( context, 2002e84: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2002e88: 13 00 81 01 sethi %hi(0x2040400), %o1 <== NOT EXECUTED 2002e8c: 9f c6 40 00 call %i1 <== NOT EXECUTED 2002e90: 92 12 61 90 or %o1, 0x190, %o1 ! 2040590 <== 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 ); 2002e94: 11 00 80 0b sethi %hi(0x2002c00), %o0 <== NOT EXECUTED 2002e98: 40 00 1a 3b call 2009784 <== NOT EXECUTED 2002e9c: 90 12 21 0c or %o0, 0x10c, %o0 ! 2002d0c <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 2002ea0: 7f ff ff 9b call 2002d0c <== NOT EXECUTED 2002ea4: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED print_context = NULL; 2002ea8: c0 24 62 2c clr [ %l1 + 0x22c ] <== NOT EXECUTED print_handler = NULL; 2002eac: c0 24 22 30 clr [ %l0 + 0x230 ] <== NOT EXECUTED } 2002eb0: 81 c7 e0 08 ret <== NOT EXECUTED 2002eb4: 81 e8 00 00 restore <== NOT EXECUTED 02002fcc : */ void rtems_stack_checker_switch_extension( Thread_Control *running, Thread_Control *heir ) { 2002fcc: 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; 2002fd0: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 ) { void *sp = __builtin_frame_address(0); #if defined(__GNUC__) if ( sp < the_stack->area ) { 2002fd4: 80 a7 80 08 cmp %fp, %o0 2002fd8: 0a 80 00 07 bcs 2002ff4 2002fdc: b2 10 20 00 clr %i1 2002fe0: c2 06 20 c4 ld [ %i0 + 0xc4 ], %g1 2002fe4: 82 02 00 01 add %o0, %g1, %g1 2002fe8: 80 a0 40 1e cmp %g1, %fp 2002fec: 82 60 3f ff subx %g0, -1, %g1 2002ff0: 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, 2002ff4: 90 02 20 08 add %o0, 8, %o0 2002ff8: 13 00 81 6b sethi %hi(0x205ac00), %o1 2002ffc: 94 10 20 10 mov 0x10, %o2 2003000: 40 00 b5 93 call 203064c 2003004: 92 12 63 54 or %o1, 0x354, %o1 2003008: 80 a0 00 08 cmp %g0, %o0 200300c: 82 60 3f ff subx %g0, -1, %g1 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 2003010: 80 8e 60 ff btst 0xff, %i1 2003014: 02 80 00 04 be 2003024 2003018: 80 a0 60 00 cmp %g1, 0 200301c: 12 80 00 05 bne 2003030 2003020: 01 00 00 00 nop Stack_check_report_blown_task( running, pattern_ok ); 2003024: b2 08 60 01 and %g1, 1, %i1 <== NOT EXECUTED 2003028: 7f ff ff ab call 2002ed4 <== NOT EXECUTED 200302c: 81 e8 00 00 restore <== NOT EXECUTED 2003030: 81 c7 e0 08 ret 2003034: 81 e8 00 00 restore 02006254 : const char * rtems_status_text( rtems_status_code status ) { 2006254: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED return rtems_assoc_name_by_local(rtems_status_assoc, status); 2006258: 11 00 80 87 sethi %hi(0x2021c00), %o0 <== NOT EXECUTED 200625c: 90 12 20 68 or %o0, 0x68, %o0 ! 2021c68 <== NOT EXECUTED 2006260: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2006264: 40 00 29 aa call 201090c <== NOT EXECUTED 2006268: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 200626c: 01 00 00 00 nop 02002d68 : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 2002d68: 03 00 80 5b sethi %hi(0x2016c00), %g1 <== NOT EXECUTED 2002d6c: d0 20 61 24 st %o0, [ %g1 + 0x124 ] ! 2016d24 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 2002d70: 03 00 80 5b sethi %hi(0x2016c00), %g1 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; return RTEMS_SUCCESSFUL; } 2002d74: 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; 2002d78: d2 20 61 28 st %o1, [ %g1 + 0x128 ] <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 2002d7c: 03 00 80 5b sethi %hi(0x2016c00), %g1 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 2002d80: 81 c3 e0 08 retl <== NOT EXECUTED 2002d84: d4 20 61 2c st %o2, [ %g1 + 0x12c ] ! 2016d2c <== NOT EXECUTED 020043fc : } } rtems_status_code rtems_termios_close (void *arg) { 20043fc: 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); 2004400: 03 00 80 5d sethi %hi(0x2017400), %g1 2004404: d0 00 61 a8 ld [ %g1 + 0x1a8 ], %o0 ! 20175a8 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2004408: c2 06 00 00 ld [ %i0 ], %g1 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 200440c: 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; 2004410: e0 00 60 28 ld [ %g1 + 0x28 ], %l0 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2004414: 40 00 04 0e call 200544c 2004418: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) 200441c: 80 a2 20 00 cmp %o0, 0 2004420: 12 80 00 26 bne 20044b8 2004424: 01 00 00 00 nop rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 2004428: c2 04 20 08 ld [ %l0 + 8 ], %g1 200442c: 82 00 7f ff add %g1, -1, %g1 2004430: 80 a0 60 00 cmp %g1, 0 2004434: 12 80 00 58 bne 2004594 2004438: c2 24 20 08 st %g1, [ %l0 + 8 ] if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 200443c: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 2004440: 03 00 80 5c sethi %hi(0x2017000), %g1 2004444: 85 28 a0 05 sll %g2, 5, %g2 2004448: 82 10 62 bc or %g1, 0x2bc, %g1 200444c: 82 00 40 02 add %g1, %g2, %g1 2004450: c2 00 60 04 ld [ %g1 + 4 ], %g1 2004454: 80 a0 60 00 cmp %g1, 0 2004458: 02 80 00 06 be 2004470 200445c: 01 00 00 00 nop /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 2004460: 9f c0 40 00 call %g1 <== NOT EXECUTED 2004464: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED * default: just flush output buffer */ drainOutput (tty); } if (tty->device.outputUsesInterrupts 2004468: 10 80 00 05 b 200447c <== NOT EXECUTED 200446c: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 <== NOT EXECUTED } else { /* * default: just flush output buffer */ drainOutput (tty); 2004470: 7f ff fd c2 call 2003b78 2004474: 90 10 00 10 mov %l0, %o0 } if (tty->device.outputUsesInterrupts 2004478: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 200447c: 80 a0 60 02 cmp %g1, 2 2004480: 32 80 00 10 bne,a 20044c0 2004484: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 2004488: d0 04 20 c4 ld [ %l0 + 0xc4 ], %o0 <== NOT EXECUTED 200448c: 40 00 02 a2 call 2004f14 <== NOT EXECUTED 2004490: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 2004494: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2004498: 12 80 00 08 bne 20044b8 <== NOT EXECUTED 200449c: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 20044a0: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0 <== NOT EXECUTED 20044a4: 40 00 02 9c call 2004f14 <== NOT EXECUTED 20044a8: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 20044ac: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20044b0: 22 80 00 04 be,a 20044c0 <== NOT EXECUTED 20044b4: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 20044b8: 40 00 05 a7 call 2005b54 <== NOT EXECUTED 20044bc: 01 00 00 00 nop <== NOT EXECUTED } if (tty->device.lastClose) 20044c0: 80 a0 60 00 cmp %g1, 0 20044c4: 22 80 00 07 be,a 20044e0 20044c8: c2 04 00 00 ld [ %l0 ], %g1 (*tty->device.lastClose)(tty->major, tty->minor, arg); 20044cc: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED 20044d0: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 <== NOT EXECUTED 20044d4: 9f c0 40 00 call %g1 <== NOT EXECUTED 20044d8: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED if (tty->forw == NULL) { 20044dc: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED 20044e0: 80 a0 60 00 cmp %g1, 0 20044e4: 12 80 00 08 bne 2004504 20044e8: c4 04 20 04 ld [ %l0 + 4 ], %g2 rtems_termios_ttyTail = tty->back; 20044ec: 03 00 80 5d sethi %hi(0x2017400), %g1 if ( rtems_termios_ttyTail != NULL ) { 20044f0: 80 a0 a0 00 cmp %g2, 0 20044f4: 02 80 00 05 be 2004508 20044f8: c4 20 61 ac st %g2, [ %g1 + 0x1ac ] rtems_termios_ttyTail->forw = NULL; 20044fc: 10 80 00 03 b 2004508 <== NOT EXECUTED 2004500: c0 20 80 00 clr [ %g2 ] <== NOT EXECUTED } } else { tty->forw->back = tty->back; 2004504: c4 20 60 04 st %g2, [ %g1 + 4 ] <== NOT EXECUTED } if (tty->back == NULL) { 2004508: c2 04 20 04 ld [ %l0 + 4 ], %g1 200450c: 80 a0 60 00 cmp %g1, 0 2004510: 12 80 00 08 bne 2004530 2004514: c4 04 00 00 ld [ %l0 ], %g2 rtems_termios_ttyHead = tty->forw; 2004518: 03 00 80 5d sethi %hi(0x2017400), %g1 if ( rtems_termios_ttyHead != NULL ) { 200451c: 80 a0 a0 00 cmp %g2, 0 2004520: 02 80 00 05 be 2004534 2004524: c4 20 61 b0 st %g2, [ %g1 + 0x1b0 ] rtems_termios_ttyHead->back = NULL; 2004528: 10 80 00 03 b 2004534 <== NOT EXECUTED 200452c: c0 20 a0 04 clr [ %g2 + 4 ] <== NOT EXECUTED } } else { tty->back->forw = tty->forw; 2004530: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 2004534: 40 00 03 98 call 2005394 2004538: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 rtems_semaphore_delete (tty->osem); 200453c: 40 00 03 96 call 2005394 2004540: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 2004544: 40 00 03 94 call 2005394 2004548: d0 04 20 8c ld [ %l0 + 0x8c ], %o0 if ((tty->device.pollRead == NULL) || 200454c: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 2004550: 80 a0 60 00 cmp %g1, 0 2004554: 02 80 00 06 be 200456c 2004558: 01 00 00 00 nop 200455c: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 2004560: 80 a0 60 02 cmp %g1, 2 2004564: 12 80 00 04 bne 2004574 2004568: 01 00 00 00 nop (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); 200456c: 40 00 03 8a call 2005394 <== NOT EXECUTED 2004570: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED free (tty->rawInBuf.theBuf); 2004574: 40 00 17 06 call 200a18c 2004578: d0 04 20 58 ld [ %l0 + 0x58 ], %o0 free (tty->rawOutBuf.theBuf); 200457c: 40 00 17 04 call 200a18c 2004580: d0 04 20 7c ld [ %l0 + 0x7c ], %o0 free (tty->cbuf); 2004584: 40 00 17 02 call 200a18c 2004588: d0 04 20 1c ld [ %l0 + 0x1c ], %o0 free (tty); 200458c: 40 00 17 00 call 200a18c 2004590: 90 10 00 10 mov %l0, %o0 } rtems_semaphore_release (rtems_termios_ttyMutex); 2004594: 03 00 80 5d sethi %hi(0x2017400), %g1 2004598: d0 00 61 a8 ld [ %g1 + 0x1a8 ], %o0 ! 20175a8 200459c: 40 00 03 f3 call 2005568 20045a0: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 20045a4: 81 c7 e0 08 ret 20045a8: 81 e8 00 00 restore 02002f94 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 2002f94: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 2002f98: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 2002f9c: c4 06 20 b4 ld [ %i0 + 0xb4 ], %g2 <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 2002fa0: 82 00 40 19 add %g1, %i1, %g1 <== NOT EXECUTED 2002fa4: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 2002fa8: 80 a0 a0 02 cmp %g2, 2 <== NOT EXECUTED 2002fac: 12 80 00 0a bne 2002fd4 <== NOT EXECUTED 2002fb0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 2002fb4: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 <== NOT EXECUTED 2002fb8: 40 00 07 d7 call 2004f14 <== NOT EXECUTED 2002fbc: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 2002fc0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2002fc4: 02 80 00 11 be 2003008 <== NOT EXECUTED 2002fc8: b0 10 20 00 clr %i0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 2002fcc: 40 00 0a e2 call 2005b54 <== NOT EXECUTED 2002fd0: 01 00 00 00 nop <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 2002fd4: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 2002fd8: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 2002fdc: 12 80 00 09 bne 2003000 <== NOT EXECUTED 2002fe0: 03 00 80 5c sethi %hi(0x2017000), %g1 <== NOT EXECUTED /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 2002fe4: c2 00 63 70 ld [ %g1 + 0x370 ], %g1 ! 2017370 <== NOT EXECUTED 2002fe8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2002fec: 02 80 00 07 be 2003008 <== NOT EXECUTED 2002ff0: b0 10 20 00 clr %i0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 2002ff4: 9f c0 40 00 call %g1 <== NOT EXECUTED 2002ff8: 01 00 00 00 nop <== NOT EXECUTED 2002ffc: 30 80 00 03 b,a 2003008 <== NOT EXECUTED } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 2003000: 7f ff ff 68 call 2002da0 <== NOT EXECUTED 2003004: 81 e8 00 00 restore <== NOT EXECUTED } } 2003008: 81 c7 e0 08 ret <== NOT EXECUTED 200300c: 81 e8 00 00 restore <== NOT EXECUTED 02003010 : * 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) { 2003010: 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) { 2003014: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 2003018: 05 00 80 5c sethi %hi(0x2017000), %g2 <== NOT EXECUTED 200301c: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 2003020: 84 10 a2 bc or %g2, 0x2bc, %g2 <== NOT EXECUTED 2003024: 82 00 60 10 add %g1, 0x10, %g1 <== NOT EXECUTED 2003028: c2 00 80 01 ld [ %g2 + %g1 ], %g1 <== NOT EXECUTED 200302c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2003030: 12 80 00 10 bne 2003070 <== NOT EXECUTED 2003034: 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, 2003038: 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); 200303c: aa 06 20 30 add %i0, 0x30, %l5 <== NOT EXECUTED 2003040: a2 10 20 00 clr %l1 <== NOT EXECUTED 2003044: 10 80 00 ac b 20032f4 <== NOT EXECUTED 2003048: 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++; 200304c: d0 0e 40 00 ldub [ %i1 ], %o0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_rint(c,tty); 2003050: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 2003054: 82 00 60 10 add %g1, 0x10, %g1 <== NOT EXECUTED 2003058: c2 04 00 01 ld [ %l0 + %g1 ], %g1 <== NOT EXECUTED 200305c: 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++; 2003060: b2 06 60 01 inc %i1 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_rint(c,tty); 2003064: 91 3a 20 18 sra %o0, 0x18, %o0 <== NOT EXECUTED 2003068: 9f c0 40 00 call %g1 <== NOT EXECUTED 200306c: 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--) { 2003070: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED 2003074: 80 a6 bf ff cmp %i2, -1 <== NOT EXECUTED 2003078: 32 bf ff f5 bne,a 200304c <== NOT EXECUTED 200307c: 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 )) { 2003080: c2 06 20 e4 ld [ %i0 + 0xe4 ], %g1 <== NOT EXECUTED 2003084: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2003088: 12 80 00 a6 bne 2003320 <== NOT EXECUTED 200308c: a2 10 20 00 clr %l1 <== NOT EXECUTED 2003090: c2 06 20 dc ld [ %i0 + 0xdc ], %g1 <== NOT EXECUTED 2003094: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2003098: 22 80 00 a3 be,a 2003324 <== NOT EXECUTED 200309c: b0 10 00 11 mov %l1, %i0 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 20030a0: d2 06 20 e0 ld [ %i0 + 0xe0 ], %o1 <== NOT EXECUTED 20030a4: 9f c0 40 00 call %g1 <== NOT EXECUTED 20030a8: 90 06 20 30 add %i0, 0x30, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 20030ac: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 20030b0: a2 10 20 00 clr %l1 <== NOT EXECUTED 20030b4: 10 80 00 9b b 2003320 <== NOT EXECUTED 20030b8: 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) { 20030bc: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 20030c0: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 20030c4: 02 80 00 1a be 200312c <== NOT EXECUTED 20030c8: 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]) { 20030cc: c4 0e 20 4a ldub [ %i0 + 0x4a ], %g2 <== NOT EXECUTED 20030d0: 83 2d 20 18 sll %l4, 0x18, %g1 <== NOT EXECUTED 20030d4: 87 38 60 18 sra %g1, 0x18, %g3 <== NOT EXECUTED 20030d8: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 20030dc: 12 80 00 0c bne 200310c <== NOT EXECUTED 20030e0: c2 0e 20 49 ldub [ %i0 + 0x49 ], %g1 <== NOT EXECUTED if (c == tty->termios.c_cc[VSTART]) { 20030e4: 82 08 60 ff and %g1, 0xff, %g1 <== NOT EXECUTED 20030e8: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 20030ec: 12 80 00 05 bne 2003100 <== NOT EXECUTED 20030f0: 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; 20030f4: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 20030f8: 10 80 00 0b b 2003124 <== NOT EXECUTED 20030fc: 82 18 60 10 xor %g1, 0x10, %g1 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 2003100: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 2003104: 10 80 00 08 b 2003124 <== NOT EXECUTED 2003108: 82 10 60 10 or %g1, 0x10, %g1 <== NOT EXECUTED } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 200310c: 82 08 60 ff and %g1, 0xff, %g1 <== NOT EXECUTED 2003110: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 2003114: 12 80 00 07 bne 2003130 <== NOT EXECUTED 2003118: 80 8c a0 ff btst 0xff, %l2 <== NOT EXECUTED /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 200311c: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 2003120: 82 08 7f ef and %g1, -17, %g1 <== NOT EXECUTED 2003124: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED 2003128: 30 80 00 04 b,a 2003138 <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { 200312c: 80 8c a0 ff btst 0xff, %l2 <== NOT EXECUTED 2003130: 02 80 00 1d be 20031a4 <== NOT EXECUTED 2003134: 01 00 00 00 nop <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 2003138: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 200313c: 82 08 60 30 and %g1, 0x30, %g1 <== NOT EXECUTED 2003140: 80 a0 60 20 cmp %g1, 0x20 <== NOT EXECUTED 2003144: 12 80 00 6b bne 20032f0 <== NOT EXECUTED 2003148: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 200314c: 7f ff fa fd call 2001d40 <== NOT EXECUTED 2003150: 01 00 00 00 nop <== NOT EXECUTED 2003154: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 2003158: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 200315c: 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; 2003160: 82 08 7f df and %g1, -33, %g1 <== NOT EXECUTED 2003164: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 2003168: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 200316c: 02 80 00 09 be 2003190 <== NOT EXECUTED 2003170: 01 00 00 00 nop <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 2003174: d2 06 20 84 ld [ %i0 + 0x84 ], %o1 <== NOT EXECUTED 2003178: c2 06 20 7c ld [ %i0 + 0x7c ], %g1 <== NOT EXECUTED 200317c: c4 06 20 a4 ld [ %i0 + 0xa4 ], %g2 <== NOT EXECUTED 2003180: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 2003184: 92 00 40 09 add %g1, %o1, %o1 <== NOT EXECUTED 2003188: 9f c0 80 00 call %g2 <== NOT EXECUTED 200318c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 2003190: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED 2003194: 7f ff fa ef call 2001d50 <== NOT EXECUTED 2003198: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 200319c: 10 80 00 56 b 20032f4 <== NOT EXECUTED 20031a0: b2 06 60 01 inc %i1 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 20031a4: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 <== NOT EXECUTED 20031a8: d2 06 20 64 ld [ %i0 + 0x64 ], %o1 <== NOT EXECUTED 20031ac: 40 00 42 ff call 2013da8 <.urem> <== NOT EXECUTED 20031b0: 90 02 20 01 inc %o0 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 20031b4: 7f ff fa e3 call 2001d40 <== NOT EXECUTED 20031b8: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 20031bc: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 20031c0: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED 20031c4: d0 06 20 64 ld [ %i0 + 0x64 ], %o0 <== NOT EXECUTED 20031c8: d2 06 20 64 ld [ %i0 + 0x64 ], %o1 <== NOT EXECUTED 20031cc: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED 20031d0: 40 00 42 f6 call 2013da8 <.urem> <== NOT EXECUTED 20031d4: 90 02 00 10 add %o0, %l0, %o0 <== NOT EXECUTED 20031d8: c2 06 20 c0 ld [ %i0 + 0xc0 ], %g1 <== NOT EXECUTED 20031dc: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 20031e0: 08 80 00 2d bleu 2003294 <== NOT EXECUTED 20031e4: 01 00 00 00 nop <== NOT EXECUTED 20031e8: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 20031ec: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 20031f0: 12 80 00 29 bne 2003294 <== NOT EXECUTED 20031f4: 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; 20031f8: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 20031fc: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED 2003200: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 2003204: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 2003208: 82 08 64 02 and %g1, 0x402, %g1 <== NOT EXECUTED 200320c: 80 a0 64 00 cmp %g1, 0x400 <== NOT EXECUTED 2003210: 12 80 00 13 bne 200325c <== NOT EXECUTED 2003214: 01 00 00 00 nop <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 2003218: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 200321c: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 2003220: 12 80 00 06 bne 2003238 <== NOT EXECUTED 2003224: 01 00 00 00 nop <== NOT EXECUTED 2003228: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED 200322c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2003230: 12 80 00 19 bne 2003294 <== NOT EXECUTED 2003234: 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; 2003238: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 200323c: c4 06 20 a4 ld [ %i0 + 0xa4 ], %g2 <== NOT EXECUTED 2003240: 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; 2003244: 82 10 60 02 or %g1, 2, %g1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 2003248: 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; 200324c: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED (*tty->device.write)(tty->minor, 2003250: 9f c0 80 00 call %g2 <== NOT EXECUTED 2003254: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2003258: 30 80 00 0f b,a 2003294 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 200325c: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 2003260: 82 08 61 04 and %g1, 0x104, %g1 <== NOT EXECUTED 2003264: 80 a0 61 00 cmp %g1, 0x100 <== NOT EXECUTED 2003268: 12 80 00 0b bne 2003294 <== NOT EXECUTED 200326c: 01 00 00 00 nop <== NOT EXECUTED == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 2003270: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 2003274: 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; 2003278: 82 10 60 04 or %g1, 4, %g1 <== NOT EXECUTED 200327c: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 2003280: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 2003284: 02 80 00 04 be 2003294 <== NOT EXECUTED 2003288: 01 00 00 00 nop <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 200328c: 9f c0 80 00 call %g2 <== NOT EXECUTED 2003290: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED } } } /* reenable interrupts */ rtems_interrupt_enable(level); 2003294: 7f ff fa af call 2001d50 <== NOT EXECUTED 2003298: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 200329c: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED 20032a0: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 20032a4: 32 80 00 04 bne,a 20032b4 <== NOT EXECUTED 20032a8: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 <== NOT EXECUTED dropped++; 20032ac: 10 80 00 11 b 20032f0 <== NOT EXECUTED 20032b0: a2 04 60 01 inc %l1 <== NOT EXECUTED } else { tty->rawInBuf.theBuf[newTail] = c; 20032b4: 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 )) { 20032b8: 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; 20032bc: 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 )) { 20032c0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20032c4: 32 80 00 0c bne,a 20032f4 <== NOT EXECUTED 20032c8: b2 06 60 01 inc %i1 <== NOT EXECUTED 20032cc: c2 06 20 dc ld [ %i0 + 0xdc ], %g1 <== NOT EXECUTED 20032d0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20032d4: 22 80 00 08 be,a 20032f4 <== NOT EXECUTED 20032d8: b2 06 60 01 inc %i1 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 20032dc: d2 06 20 e0 ld [ %i0 + 0xe0 ], %o1 <== NOT EXECUTED 20032e0: 9f c0 40 00 call %g1 <== NOT EXECUTED 20032e4: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 20032e8: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 20032ec: c2 26 20 e4 st %g1, [ %i0 + 0xe4 ] <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 20032f0: b2 06 60 01 inc %i1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 20032f4: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED 20032f8: 80 a6 bf ff cmp %i2, -1 <== NOT EXECUTED 20032fc: 12 bf ff 70 bne 20030bc <== NOT EXECUTED 2003300: 01 00 00 00 nop <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 2003304: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 2003308: d0 06 20 68 ld [ %i0 + 0x68 ], %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 200330c: 82 00 40 11 add %g1, %l1, %g1 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 2003310: 40 00 08 96 call 2005568 <== NOT EXECUTED 2003314: c2 26 20 78 st %g1, [ %i0 + 0x78 ] <== NOT EXECUTED return dropped; } 2003318: 81 c7 e0 08 ret <== NOT EXECUTED 200331c: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED 2003320: b0 10 00 11 mov %l1, %i0 <== NOT EXECUTED 2003324: 81 c7 e0 08 ret <== NOT EXECUTED 2003328: 81 e8 00 00 restore <== NOT EXECUTED 02002d1c : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 2002d1c: 9d e3 bf 98 save %sp, -104, %sp rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 2002d20: 03 00 80 5d sethi %hi(0x2017400), %g1 2002d24: c4 00 61 a8 ld [ %g1 + 0x1a8 ], %g2 ! 20175a8 2002d28: 80 a0 a0 00 cmp %g2, 0 2002d2c: 12 80 00 0d bne 2002d60 2002d30: 98 10 61 a8 or %g1, 0x1a8, %o4 sc = rtems_semaphore_create ( 2002d34: 11 15 14 9b sethi %hi(0x54526c00), %o0 2002d38: 92 10 20 01 mov 1, %o1 2002d3c: 90 12 21 69 or %o0, 0x169, %o0 2002d40: 94 10 20 54 mov 0x54, %o2 2002d44: 40 00 09 1c call 20051b4 2002d48: 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) 2002d4c: 80 a2 20 00 cmp %o0, 0 2002d50: 02 80 00 04 be 2002d60 2002d54: 01 00 00 00 nop rtems_fatal_error_occurred (sc); 2002d58: 40 00 0b 7f call 2005b54 <== NOT EXECUTED 2002d5c: 01 00 00 00 nop <== NOT EXECUTED 2002d60: 81 c7 e0 08 ret 2002d64: 81 e8 00 00 restore 02003ff0 : } } rtems_status_code rtems_termios_ioctl (void *arg) { 2003ff0: 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; 2003ff4: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 2003ff8: 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; 2003ffc: e2 00 60 28 ld [ %g1 + 0x28 ], %l1 <== NOT EXECUTED struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 2004000: 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); 2004004: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 <== NOT EXECUTED } } rtems_status_code rtems_termios_ioctl (void *arg) { 2004008: 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); 200400c: 92 10 20 00 clr %o1 <== NOT EXECUTED 2004010: 40 00 05 0f call 200544c <== NOT EXECUTED 2004014: 94 10 20 00 clr %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) { 2004018: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 200401c: 22 80 00 05 be,a 2004030 <== NOT EXECUTED 2004020: c4 04 a0 04 ld [ %l2 + 4 ], %g2 <== NOT EXECUTED args->ioctl_return = sc; 2004024: f0 24 a0 0c st %i0, [ %l2 + 0xc ] <== NOT EXECUTED 2004028: 81 c7 e0 08 ret <== NOT EXECUTED 200402c: 81 e8 00 00 restore <== NOT EXECUTED return sc; } switch (args->command) { 2004030: 80 a0 a0 04 cmp %g2, 4 <== NOT EXECUTED 2004034: 22 80 00 bf be,a 2004330 <== NOT EXECUTED 2004038: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED 200403c: 18 80 00 0b bgu 2004068 <== NOT EXECUTED 2004040: 03 10 01 19 sethi %hi(0x40046400), %g1 <== NOT EXECUTED 2004044: 80 a0 a0 02 cmp %g2, 2 <== NOT EXECUTED 2004048: 22 80 00 2c be,a 20040f8 <== NOT EXECUTED 200404c: d2 04 a0 08 ld [ %l2 + 8 ], %o1 <== NOT EXECUTED 2004050: 18 80 00 b1 bgu 2004314 <== NOT EXECUTED 2004054: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 2004058: 32 80 00 17 bne,a 20040b4 <== NOT EXECUTED 200405c: 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; 2004060: 10 80 00 22 b 20040e8 <== NOT EXECUTED 2004064: 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) { 2004068: 82 10 62 7f or %g1, 0x27f, %g1 <== NOT EXECUTED 200406c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2004070: 02 80 00 d1 be 20043b4 <== NOT EXECUTED 2004074: 01 00 00 00 nop <== NOT EXECUTED 2004078: 38 80 00 07 bgu,a 2004094 <== NOT EXECUTED 200407c: 03 10 01 1d sethi %hi(0x40047400), %g1 <== NOT EXECUTED 2004080: 80 a0 a0 05 cmp %g2, 5 <== NOT EXECUTED 2004084: 32 80 00 0c bne,a 20040b4 <== NOT EXECUTED 2004088: 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; 200408c: 10 80 00 a5 b 2004320 <== NOT EXECUTED 2004090: 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) { 2004094: 82 10 60 1a or %g1, 0x1a, %g1 <== NOT EXECUTED 2004098: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 200409c: 02 80 00 c2 be 20043a4 <== NOT EXECUTED 20040a0: 03 20 01 1d sethi %hi(0x80047400), %g1 <== NOT EXECUTED 20040a4: 82 10 60 1b or %g1, 0x1b, %g1 ! 8004741b <== NOT EXECUTED 20040a8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 20040ac: 02 80 00 a5 be 2004340 <== NOT EXECUTED 20040b0: c4 04 60 cc ld [ %l1 + 0xcc ], %g2 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 20040b4: 03 00 80 5c sethi %hi(0x2017000), %g1 <== NOT EXECUTED 20040b8: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 20040bc: 82 10 62 bc or %g1, 0x2bc, %g1 <== NOT EXECUTED 20040c0: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 20040c4: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 20040c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20040cc: 02 80 00 c7 be 20043e8 <== NOT EXECUTED 20040d0: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 20040d4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 20040d8: 9f c0 40 00 call %g1 <== NOT EXECUTED 20040dc: 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); 20040e0: 10 80 00 c2 b 20043e8 <== NOT EXECUTED 20040e4: 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; 20040e8: 92 04 60 30 add %l1, 0x30, %o1 <== NOT EXECUTED 20040ec: 40 00 25 aa call 200d794 <== NOT EXECUTED 20040f0: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED 20040f4: 30 80 00 bd b,a 20043e8 <== NOT EXECUTED break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 20040f8: 90 04 60 30 add %l1, 0x30, %o0 <== NOT EXECUTED 20040fc: 40 00 25 a6 call 200d794 <== NOT EXECUTED 2004100: 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) && 2004104: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 2004108: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 200410c: 02 80 00 20 be 200418c <== NOT EXECUTED 2004110: 01 00 00 00 nop <== NOT EXECUTED 2004114: c2 04 60 30 ld [ %l1 + 0x30 ], %g1 <== NOT EXECUTED 2004118: 80 88 64 00 btst 0x400, %g1 <== NOT EXECUTED 200411c: 12 80 00 1c bne 200418c <== NOT EXECUTED 2004120: 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); 2004124: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 2004128: 82 08 7d ef and %g1, -529, %g1 <== NOT EXECUTED 200412c: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 2004130: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 2004134: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 2004138: 02 80 00 15 be 200418c <== NOT EXECUTED 200413c: 01 00 00 00 nop <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 2004140: 7f ff f7 00 call 2001d40 <== NOT EXECUTED 2004144: 01 00 00 00 nop <== NOT EXECUTED 2004148: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 200414c: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 2004150: 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; 2004154: 82 08 7f df and %g1, -33, %g1 <== NOT EXECUTED 2004158: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 200415c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 2004160: 02 80 00 09 be 2004184 <== NOT EXECUTED 2004164: 01 00 00 00 nop <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 2004168: d2 04 60 84 ld [ %l1 + 0x84 ], %o1 <== NOT EXECUTED 200416c: c2 04 60 7c ld [ %l1 + 0x7c ], %g1 <== NOT EXECUTED 2004170: c4 04 60 a4 ld [ %l1 + 0xa4 ], %g2 <== NOT EXECUTED 2004174: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED 2004178: 92 00 40 09 add %g1, %o1, %o1 <== NOT EXECUTED 200417c: 9f c0 80 00 call %g2 <== NOT EXECUTED 2004180: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 2004184: 7f ff f6 f3 call 2001d50 <== NOT EXECUTED 2004188: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 200418c: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 2004190: 80 88 64 00 btst 0x400, %g1 <== NOT EXECUTED 2004194: 02 80 00 0c be 20041c4 <== NOT EXECUTED 2004198: 03 00 00 04 sethi %hi(0x1000), %g1 <== NOT EXECUTED 200419c: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED 20041a0: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED 20041a4: 12 80 00 08 bne 20041c4 <== NOT EXECUTED 20041a8: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 20041ac: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 20041b0: 82 08 7b ff and %g1, -1025, %g1 <== NOT EXECUTED 20041b4: 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); 20041b8: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 20041bc: 82 08 7f fd and %g1, -3, %g1 <== NOT EXECUTED 20041c0: 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) && 20041c4: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 20041c8: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 20041cc: 02 80 00 16 be 2004224 <== NOT EXECUTED 20041d0: c2 04 60 38 ld [ %l1 + 0x38 ], %g1 <== NOT EXECUTED 20041d4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20041d8: 06 80 00 14 bl 2004228 <== NOT EXECUTED 20041dc: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 20041e0: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 20041e4: 82 08 7e ff and %g1, -257, %g1 <== NOT EXECUTED 20041e8: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 20041ec: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 20041f0: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 20041f4: 02 80 00 08 be 2004214 <== NOT EXECUTED 20041f8: 01 00 00 00 nop <== NOT EXECUTED 20041fc: c2 04 60 b0 ld [ %l1 + 0xb0 ], %g1 <== NOT EXECUTED 2004200: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004204: 02 80 00 04 be 2004214 <== NOT EXECUTED 2004208: 01 00 00 00 nop <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 200420c: 9f c0 40 00 call %g1 <== NOT EXECUTED 2004210: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 2004214: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 2004218: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED 200421c: 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) { 2004220: c2 04 60 38 ld [ %l1 + 0x38 ], %g1 <== NOT EXECUTED 2004224: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004228: 36 80 00 06 bge,a 2004240 <== NOT EXECUTED 200422c: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED tty->flow_ctrl |= FL_MDRTS; 2004230: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 2004234: 82 10 61 00 or %g1, 0x100, %g1 <== NOT EXECUTED 2004238: 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) { 200423c: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED 2004240: 03 00 00 04 sethi %hi(0x1000), %g1 <== NOT EXECUTED 2004244: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED 2004248: 22 80 00 06 be,a 2004260 <== NOT EXECUTED 200424c: c2 04 60 30 ld [ %l1 + 0x30 ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXOF; 2004250: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 2004254: 82 10 64 00 or %g1, 0x400, %g1 <== NOT EXECUTED 2004258: 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) { 200425c: c2 04 60 30 ld [ %l1 + 0x30 ], %g1 <== NOT EXECUTED 2004260: 80 88 64 00 btst 0x400, %g1 <== NOT EXECUTED 2004264: 22 80 00 06 be,a 200427c <== NOT EXECUTED 2004268: c2 04 60 3c ld [ %l1 + 0x3c ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXON; 200426c: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 2004270: 82 10 62 00 or %g1, 0x200, %g1 <== NOT EXECUTED 2004274: 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) { 2004278: c2 04 60 3c ld [ %l1 + 0x3c ], %g1 <== NOT EXECUTED 200427c: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 2004280: 32 80 00 19 bne,a 20042e4 <== NOT EXECUTED 2004284: 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); 2004288: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED 200428c: 40 00 02 22 call 2004b14 <== NOT EXECUTED 2004290: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10; 2004294: d2 07 bf f4 ld [ %fp + -12 ], %o1 <== NOT EXECUTED 2004298: e0 0c 60 46 ldub [ %l1 + 0x46 ], %l0 <== NOT EXECUTED 200429c: 40 00 3d dd call 2013a10 <.umul> <== NOT EXECUTED 20042a0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 20042a4: 40 00 3e 15 call 2013af8 <.udiv> <== NOT EXECUTED 20042a8: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 20042ac: d0 24 60 54 st %o0, [ %l1 + 0x54 ] <== NOT EXECUTED if (tty->termios.c_cc[VTIME]) { 20042b0: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 20042b4: 02 80 00 08 be 20042d4 <== NOT EXECUTED 20042b8: c2 0c 60 47 ldub [ %l1 + 0x47 ], %g1 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 20042bc: c0 24 60 6c clr [ %l1 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) 20042c0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20042c4: 12 80 00 09 bne 20042e8 <== NOT EXECUTED 20042c8: d0 24 60 70 st %o0, [ %l1 + 0x70 ] <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 20042cc: 10 80 00 0a b 20042f4 <== NOT EXECUTED 20042d0: d0 24 60 74 st %o0, [ %l1 + 0x74 ] <== NOT EXECUTED } else { if (tty->termios.c_cc[VMIN]) { 20042d4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20042d8: 02 80 00 06 be 20042f0 <== NOT EXECUTED 20042dc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 20042e0: c0 24 60 6c clr [ %l1 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 20042e4: c0 24 60 70 clr [ %l1 + 0x70 ] <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 20042e8: 10 80 00 03 b 20042f4 <== NOT EXECUTED 20042ec: c0 24 60 74 clr [ %l1 + 0x74 ] <== NOT EXECUTED } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 20042f0: c2 24 60 6c st %g1, [ %l1 + 0x6c ] <== NOT EXECUTED } } } if (tty->device.setAttributes) 20042f4: c2 04 60 a8 ld [ %l1 + 0xa8 ], %g1 <== NOT EXECUTED 20042f8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20042fc: 02 80 00 3b be 20043e8 <== NOT EXECUTED 2004300: 01 00 00 00 nop <== NOT EXECUTED (*tty->device.setAttributes)(tty->minor, &tty->termios); 2004304: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED 2004308: 9f c0 40 00 call %g1 <== NOT EXECUTED 200430c: 92 04 60 30 add %l1, 0x30, %o1 <== NOT EXECUTED 2004310: 30 80 00 36 b,a 20043e8 <== NOT EXECUTED break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 2004314: 7f ff fe 19 call 2003b78 <== NOT EXECUTED 2004318: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 200431c: 30 80 00 33 b,a 20043e8 <== NOT EXECUTED break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 2004320: c2 24 60 d4 st %g1, [ %l1 + 0xd4 ] <== NOT EXECUTED 2004324: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED 2004328: 10 80 00 30 b 20043e8 <== NOT EXECUTED 200432c: c2 24 60 d8 st %g1, [ %l1 + 0xd8 ] <== NOT EXECUTED break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 2004330: c2 24 60 dc st %g1, [ %l1 + 0xdc ] <== NOT EXECUTED 2004334: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED 2004338: 10 80 00 2c b 20043e8 <== NOT EXECUTED 200433c: 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) { 2004340: 03 00 80 5c sethi %hi(0x2017000), %g1 <== NOT EXECUTED 2004344: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 2004348: 82 10 62 bc or %g1, 0x2bc, %g1 <== NOT EXECUTED 200434c: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 2004350: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 2004354: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004358: 22 80 00 06 be,a 2004370 <== NOT EXECUTED 200435c: c2 04 a0 08 ld [ %l2 + 8 ], %g1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 2004360: 9f c0 40 00 call %g1 <== NOT EXECUTED 2004364: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2004368: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 200436c: c2 04 a0 08 ld [ %l2 + 8 ], %g1 <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ 2004370: 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); 2004374: 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) { 2004378: 03 00 80 5c sethi %hi(0x2017000), %g1 <== NOT EXECUTED 200437c: 85 28 e0 05 sll %g3, 5, %g2 <== NOT EXECUTED 2004380: 82 10 62 bc or %g1, 0x2bc, %g1 <== NOT EXECUTED 2004384: c2 00 40 02 ld [ %g1 + %g2 ], %g1 <== NOT EXECUTED 2004388: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200438c: 02 80 00 17 be 20043e8 <== NOT EXECUTED 2004390: c6 24 60 cc st %g3, [ %l1 + 0xcc ] <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 2004394: 9f c0 40 00 call %g1 <== NOT EXECUTED 2004398: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 200439c: 10 80 00 13 b 20043e8 <== NOT EXECUTED 20043a0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 20043a4: c4 04 a0 08 ld [ %l2 + 8 ], %g2 <== NOT EXECUTED 20043a8: c2 04 60 cc ld [ %l1 + 0xcc ], %g1 <== NOT EXECUTED 20043ac: 10 80 00 0f b 20043e8 <== NOT EXECUTED 20043b0: c2 20 80 00 st %g1, [ %g2 ] <== NOT EXECUTED break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 20043b4: c4 04 60 60 ld [ %l1 + 0x60 ], %g2 <== NOT EXECUTED 20043b8: c2 04 60 5c ld [ %l1 + 0x5c ], %g1 <== NOT EXECUTED if ( rawnc < 0 ) 20043bc: 88 a0 80 01 subcc %g2, %g1, %g4 <== NOT EXECUTED 20043c0: 3c 80 00 05 bpos,a 20043d4 <== NOT EXECUTED 20043c4: c2 04 60 20 ld [ %l1 + 0x20 ], %g1 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 20043c8: c2 04 60 64 ld [ %l1 + 0x64 ], %g1 <== NOT EXECUTED 20043cc: 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; 20043d0: c2 04 60 20 ld [ %l1 + 0x20 ], %g1 <== NOT EXECUTED 20043d4: c4 04 60 24 ld [ %l1 + 0x24 ], %g2 <== NOT EXECUTED 20043d8: c6 04 a0 08 ld [ %l2 + 8 ], %g3 <== NOT EXECUTED 20043dc: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 20043e0: 82 00 40 04 add %g1, %g4, %g1 <== NOT EXECUTED 20043e4: c2 20 c0 00 st %g1, [ %g3 ] <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 20043e8: 40 00 04 60 call 2005568 <== NOT EXECUTED 20043ec: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 <== NOT EXECUTED args->ioctl_return = sc; 20043f0: f0 24 a0 0c st %i0, [ %l2 + 0xc ] <== NOT EXECUTED return sc; } 20043f4: 81 c7 e0 08 ret <== NOT EXECUTED 20043f8: 81 e8 00 00 restore <== NOT EXECUTED 020045ac : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 20045ac: 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, 20045b0: 03 00 80 5d sethi %hi(0x2017400), %g1 20045b4: d0 00 61 a8 ld [ %g1 + 0x1a8 ], %o0 ! 20175a8 20045b8: 92 10 20 00 clr %o1 20045bc: 40 00 03 a4 call 200544c 20045c0: 94 10 20 00 clr %o2 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 20045c4: a6 92 20 00 orcc %o0, 0, %l3 20045c8: 12 80 01 0a bne 20049f0 20045cc: 03 00 80 5d sethi %hi(0x2017400), %g1 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 20045d0: 10 80 00 0a b 20045f8 20045d4: e2 00 61 b0 ld [ %g1 + 0x1b0 ], %l1 ! 20175b0 if ((tty->major == major) && (tty->minor == minor)) 20045d8: 80 a0 40 18 cmp %g1, %i0 20045dc: 32 80 00 07 bne,a 20045f8 20045e0: e2 04 40 00 ld [ %l1 ], %l1 <== NOT EXECUTED 20045e4: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 20045e8: 80 a0 40 19 cmp %g1, %i1 20045ec: 22 80 00 da be,a 2004954 20045f0: 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) { 20045f4: e2 04 40 00 ld [ %l1 ], %l1 <== NOT EXECUTED 20045f8: 80 a4 60 00 cmp %l1, 0 20045fc: 32 bf ff f7 bne,a 20045d8 2004600: c2 04 60 0c ld [ %l1 + 0xc ], %g1 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 2004604: 10 80 00 fd b 20049f8 2004608: 90 10 20 01 mov 1, %o0 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 200460c: 03 00 80 5b sethi %hi(0x2016c00), %g1 2004610: c2 00 61 28 ld [ %g1 + 0x128 ], %g1 ! 2016d28 2004614: c2 24 60 64 st %g1, [ %l1 + 0x64 ] tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 2004618: d0 04 60 64 ld [ %l1 + 0x64 ], %o0 200461c: 40 00 18 44 call 200a72c 2004620: 01 00 00 00 nop if (tty->rawInBuf.theBuf == NULL) { 2004624: 80 a2 20 00 cmp %o0, 0 2004628: 12 80 00 08 bne 2004648 200462c: d0 24 60 58 st %o0, [ %l1 + 0x58 ] free(tty); 2004630: 40 00 16 d7 call 200a18c <== NOT EXECUTED 2004634: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 2004638: 03 00 80 5d sethi %hi(0x2017400), %g1 <== NOT EXECUTED 200463c: a6 10 20 1a mov 0x1a, %l3 <== NOT EXECUTED 2004640: 10 80 00 ea b 20049e8 <== NOT EXECUTED 2004644: d0 00 61 a8 ld [ %g1 + 0x1a8 ], %o0 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 2004648: 03 00 80 5b sethi %hi(0x2016c00), %g1 200464c: c2 00 61 2c ld [ %g1 + 0x12c ], %g1 ! 2016d2c 2004650: c2 24 60 88 st %g1, [ %l1 + 0x88 ] tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 2004654: d0 04 60 88 ld [ %l1 + 0x88 ], %o0 2004658: 40 00 18 35 call 200a72c 200465c: 01 00 00 00 nop if (tty->rawOutBuf.theBuf == NULL) { 2004660: 80 a2 20 00 cmp %o0, 0 2004664: 12 80 00 05 bne 2004678 2004668: d0 24 60 7c st %o0, [ %l1 + 0x7c ] free((void *)(tty->rawInBuf.theBuf)); 200466c: d0 04 60 58 ld [ %l1 + 0x58 ], %o0 <== NOT EXECUTED free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 2004670: 10 80 00 0c b 20046a0 <== NOT EXECUTED 2004674: a6 10 20 1a mov 0x1a, %l3 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 2004678: 03 00 80 5b sethi %hi(0x2016c00), %g1 200467c: 40 00 18 2c call 200a72c 2004680: d0 00 61 24 ld [ %g1 + 0x124 ], %o0 ! 2016d24 if (tty->cbuf == NULL) { 2004684: 80 a2 20 00 cmp %o0, 0 2004688: 12 80 00 0c bne 20046b8 200468c: d0 24 60 1c st %o0, [ %l1 + 0x1c ] free((void *)(tty->rawOutBuf.theBuf)); 2004690: d0 04 60 7c ld [ %l1 + 0x7c ], %o0 <== NOT EXECUTED 2004694: 40 00 16 be call 200a18c <== NOT EXECUTED 2004698: a6 10 20 1a mov 0x1a, %l3 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 200469c: d0 04 60 58 ld [ %l1 + 0x58 ], %o0 <== NOT EXECUTED 20046a0: 40 00 16 bb call 200a18c <== NOT EXECUTED 20046a4: 01 00 00 00 nop <== NOT EXECUTED free(tty); 20046a8: 40 00 16 b9 call 200a18c <== NOT EXECUTED 20046ac: 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); 20046b0: 10 80 00 cd b 20049e4 <== NOT EXECUTED 20046b4: 03 00 80 5d sethi %hi(0x2017400), %g1 <== NOT EXECUTED tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 20046b8: 03 00 80 5d sethi %hi(0x2017400), %g1 20046bc: c2 00 61 b0 ld [ %g1 + 0x1b0 ], %g1 ! 20175b0 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 20046c0: c0 24 60 d4 clr [ %l1 + 0xd4 ] tty->tty_snd.sw_arg = NULL; 20046c4: c0 24 60 d8 clr [ %l1 + 0xd8 ] tty->tty_rcv.sw_pfn = NULL; 20046c8: c0 24 60 dc clr [ %l1 + 0xdc ] tty->tty_rcv.sw_arg = NULL; 20046cc: c0 24 60 e0 clr [ %l1 + 0xe0 ] tty->tty_rcvwakeup = 0; 20046d0: c0 24 60 e4 clr [ %l1 + 0xe4 ] /* * link tty */ tty->forw = rtems_termios_ttyHead; 20046d4: c2 24 40 00 st %g1, [ %l1 ] tty->back = NULL; if (rtems_termios_ttyHead != NULL) 20046d8: 80 a0 60 00 cmp %g1, 0 20046dc: 02 80 00 03 be 20046e8 20046e0: c0 24 60 04 clr [ %l1 + 4 ] rtems_termios_ttyHead->back = tty; 20046e4: e2 20 60 04 st %l1, [ %g1 + 4 ] <== NOT EXECUTED rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 20046e8: 07 00 80 5d sethi %hi(0x2017400), %g3 20046ec: c4 00 e1 ac ld [ %g3 + 0x1ac ], %g2 ! 20175ac */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 20046f0: 03 00 80 5d sethi %hi(0x2017400), %g1 if (rtems_termios_ttyTail == NULL) 20046f4: 80 a0 a0 00 cmp %g2, 0 20046f8: 12 80 00 03 bne 2004704 20046fc: e0 20 61 b0 st %l0, [ %g1 + 0x1b0 ] rtems_termios_ttyTail = tty; 2004700: e0 20 e1 ac st %l0, [ %g3 + 0x1ac ] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 2004704: 25 00 80 5b sethi %hi(0x2016c00), %l2 2004708: c2 4c a1 30 ldsb [ %l2 + 0x130 ], %g1 ! 2016d30 200470c: 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; 2004710: f2 24 20 10 st %i1, [ %l0 + 0x10 ] tty->major = major; 2004714: f0 24 20 0c st %i0, [ %l0 + 0xc ] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 2004718: 90 12 21 00 or %o0, 0x100, %o0 200471c: 92 10 20 01 mov 1, %o1 2004720: 90 10 40 08 or %g1, %o0, %o0 2004724: 94 10 20 54 mov 0x54, %o2 2004728: 96 10 20 00 clr %o3 200472c: 40 00 02 a2 call 20051b4 2004730: 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) 2004734: 80 a2 20 00 cmp %o0, 0 2004738: 12 80 00 a8 bne 20049d8 200473c: 01 00 00 00 nop rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 2004740: c2 4c a1 30 ldsb [ %l2 + 0x130 ], %g1 2004744: 11 15 14 9b sethi %hi(0x54526c00), %o0 2004748: 92 10 20 01 mov 1, %o1 200474c: 90 12 23 00 or %o0, 0x300, %o0 2004750: 94 10 20 54 mov 0x54, %o2 2004754: 90 10 40 08 or %g1, %o0, %o0 2004758: 96 10 20 00 clr %o3 200475c: 40 00 02 96 call 20051b4 2004760: 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) 2004764: 80 a2 20 00 cmp %o0, 0 2004768: 12 80 00 9c bne 20049d8 200476c: 01 00 00 00 nop rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 2004770: c2 4c a1 30 ldsb [ %l2 + 0x130 ], %g1 2004774: 11 15 14 9e sethi %hi(0x54527800), %o0 2004778: 92 10 20 00 clr %o1 200477c: 90 10 40 08 or %g1, %o0, %o0 2004780: 94 10 20 20 mov 0x20, %o2 2004784: 96 10 20 00 clr %o3 2004788: 40 00 02 8b call 20051b4 200478c: 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) 2004790: 80 a2 20 00 cmp %o0, 0 2004794: 12 80 00 91 bne 20049d8 2004798: 01 00 00 00 nop rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 200479c: c0 24 20 94 clr [ %l0 + 0x94 ] /* * Set callbacks */ tty->device = *callbacks; 20047a0: 92 10 00 1b mov %i3, %o1 20047a4: 90 04 20 98 add %l0, 0x98, %o0 20047a8: 40 00 23 fb call 200d794 20047ac: 94 10 20 20 mov 0x20, %o2 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 20047b0: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 20047b4: 80 a0 60 02 cmp %g1, 2 20047b8: 32 80 00 1b bne,a 2004824 20047bc: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 sc = rtems_task_create ( 20047c0: c2 4c a1 30 ldsb [ %l2 + 0x130 ], %g1 <== NOT EXECUTED 20047c4: 11 15 1e 15 sethi %hi(0x54785400), %o0 <== NOT EXECUTED 20047c8: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 20047cc: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED 20047d0: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED 20047d4: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED 20047d8: 98 10 20 00 clr %o4 <== NOT EXECUTED 20047dc: 40 00 03 8f call 2005618 <== NOT EXECUTED 20047e0: 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) 20047e4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20047e8: 12 80 00 7c bne 20049d8 <== NOT EXECUTED 20047ec: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 20047f0: c2 4c a1 30 ldsb [ %l2 + 0x130 ], %g1 <== NOT EXECUTED 20047f4: 11 14 9e 15 sethi %hi(0x52785400), %o0 <== NOT EXECUTED 20047f8: 92 10 20 09 mov 9, %o1 <== NOT EXECUTED 20047fc: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED 2004800: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED 2004804: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED 2004808: 98 10 20 00 clr %o4 <== NOT EXECUTED 200480c: 40 00 03 83 call 2005618 <== NOT EXECUTED 2004810: 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) 2004814: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2004818: 12 80 00 70 bne 20049d8 <== NOT EXECUTED 200481c: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 2004820: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 2004824: 80 a0 60 00 cmp %g1, 0 2004828: 02 80 00 07 be 2004844 200482c: 03 00 80 5b sethi %hi(0x2016c00), %g1 2004830: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 2004834: 80 a0 60 02 cmp %g1, 2 2004838: 12 80 00 0f bne 2004874 200483c: 82 10 20 03 mov 3, %g1 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 2004840: 03 00 80 5b sethi %hi(0x2016c00), %g1 <== NOT EXECUTED 2004844: c2 48 61 30 ldsb [ %g1 + 0x130 ], %g1 ! 2016d30 <== NOT EXECUTED 2004848: 11 15 14 9c sethi %hi(0x54527000), %o0 <== NOT EXECUTED 200484c: 92 10 20 00 clr %o1 <== NOT EXECUTED 2004850: 90 12 22 00 or %o0, 0x200, %o0 <== NOT EXECUTED 2004854: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED 2004858: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED 200485c: 96 10 20 00 clr %o3 <== NOT EXECUTED 2004860: 40 00 02 55 call 20051b4 <== NOT EXECUTED 2004864: 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) 2004868: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200486c: 12 80 00 5b bne 20049d8 <== NOT EXECUTED 2004870: 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'; 2004874: c2 2c 20 41 stb %g1, [ %l0 + 0x41 ] tty->termios.c_cc[VQUIT] = '\034'; 2004878: 82 10 20 1c mov 0x1c, %g1 200487c: c2 2c 20 42 stb %g1, [ %l0 + 0x42 ] tty->termios.c_cc[VERASE] = '\177'; 2004880: 82 10 20 7f mov 0x7f, %g1 2004884: c2 2c 20 43 stb %g1, [ %l0 + 0x43 ] tty->termios.c_cc[VKILL] = '\025'; 2004888: 82 10 20 15 mov 0x15, %g1 200488c: c2 2c 20 44 stb %g1, [ %l0 + 0x44 ] tty->termios.c_cc[VEOF] = '\004'; 2004890: 82 10 20 04 mov 4, %g1 2004894: 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'; 2004898: 82 10 20 11 mov 0x11, %g1 200489c: c2 2c 20 49 stb %g1, [ %l0 + 0x49 ] tty->termios.c_cc[VSTOP] = '\023'; 20048a0: 82 10 20 13 mov 0x13, %g1 20048a4: c2 2c 20 4a stb %g1, [ %l0 + 0x4a ] tty->termios.c_cc[VSUSP] = '\032'; 20048a8: 82 10 20 1a mov 0x1a, %g1 20048ac: c2 2c 20 4b stb %g1, [ %l0 + 0x4b ] tty->termios.c_cc[VREPRINT] = '\022'; 20048b0: 82 10 20 12 mov 0x12, %g1 20048b4: c2 2c 20 4d stb %g1, [ %l0 + 0x4d ] tty->termios.c_cc[VDISCARD] = '\017'; 20048b8: 82 10 20 0f mov 0xf, %g1 20048bc: c2 2c 20 4e stb %g1, [ %l0 + 0x4e ] tty->termios.c_cc[VWERASE] = '\027'; 20048c0: 82 10 20 17 mov 0x17, %g1 20048c4: c2 2c 20 4f stb %g1, [ %l0 + 0x4f ] tty->termios.c_cc[VLNEXT] = '\026'; 20048c8: 82 10 20 16 mov 0x16, %g1 20048cc: c2 2c 20 50 stb %g1, [ %l0 + 0x50 ] } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 20048d0: 03 00 00 09 sethi %hi(0x2400), %g1 20048d4: 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'; 20048d8: c0 2c 20 4c clrb [ %l0 + 0x4c ] tty->termios.c_cc[VEOL2] = '\000'; 20048dc: 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') 20048e0: 1b 00 80 5b sethi %hi(0x2016c00), %o5 20048e4: c4 0b 61 30 ldub [ %o5 + 0x130 ], %g2 ! 2016d30 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 20048e8: c2 24 20 30 st %g1, [ %l0 + 0x30 ] tty->termios.c_oflag = OPOST | ONLCR | XTABS; 20048ec: 03 00 00 06 sethi %hi(0x1800), %g1 20048f0: 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; 20048f4: 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; 20048f8: 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; 20048fc: 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; 2004900: 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; 2004904: 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; 2004908: c2 24 20 38 st %g1, [ %l0 + 0x38 ] tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 200490c: 03 00 00 20 sethi %hi(0x8000), %g1 2004910: 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; 2004914: 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; 2004918: 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; 200491c: c6 24 20 bc st %g3, [ %l0 + 0xbc ] tty->highwater = tty->rawInBuf.Size * 3/4; 2004920: 83 29 20 01 sll %g4, 1, %g1 2004924: 82 00 40 04 add %g1, %g4, %g1 2004928: 83 30 60 02 srl %g1, 2, %g1 200492c: c2 24 20 c0 st %g1, [ %l0 + 0xc0 ] /* * Bump name characer */ if (c++ == 'z') 2004930: 82 00 a0 01 add %g2, 1, %g1 2004934: 85 28 a0 18 sll %g2, 0x18, %g2 2004938: 85 38 a0 18 sra %g2, 0x18, %g2 200493c: 80 a0 a0 7a cmp %g2, 0x7a 2004940: 12 80 00 04 bne 2004950 2004944: c2 2b 61 30 stb %g1, [ %o5 + 0x130 ] c = 'a'; 2004948: 82 10 20 61 mov 0x61, %g1 <== NOT EXECUTED 200494c: c2 2b 61 30 stb %g1, [ %o5 + 0x130 ] <== NOT EXECUTED } args->iop->data1 = tty; if (!tty->refcount++) { 2004950: c2 04 60 08 ld [ %l1 + 8 ], %g1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 2004954: c4 06 80 00 ld [ %i2 ], %g2 if (!tty->refcount++) { 2004958: 86 00 60 01 add %g1, 1, %g3 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 200495c: e2 20 a0 28 st %l1, [ %g2 + 0x28 ] if (!tty->refcount++) { 2004960: 80 a0 60 00 cmp %g1, 0 2004964: 12 80 00 1f bne 20049e0 2004968: c6 24 60 08 st %g3, [ %l1 + 8 ] if (tty->device.firstOpen) 200496c: c2 04 60 98 ld [ %l1 + 0x98 ], %g1 2004970: 80 a0 60 00 cmp %g1, 0 2004974: 02 80 00 05 be 2004988 2004978: 90 10 00 18 mov %i0, %o0 (*tty->device.firstOpen)(major, minor, arg); 200497c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2004980: 9f c0 40 00 call %g1 <== NOT EXECUTED 2004984: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 2004988: c2 04 60 b4 ld [ %l1 + 0xb4 ], %g1 200498c: 80 a0 60 02 cmp %g1, 2 2004990: 12 80 00 15 bne 20049e4 2004994: 03 00 80 5d sethi %hi(0x2017400), %g1 sc = rtems_task_start(tty->rxTaskId, 2004998: d0 04 60 c4 ld [ %l1 + 0xc4 ], %o0 <== NOT EXECUTED 200499c: 13 00 80 12 sethi %hi(0x2004800), %o1 <== NOT EXECUTED 20049a0: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 20049a4: 40 00 03 c9 call 20058c8 <== NOT EXECUTED 20049a8: 92 12 62 90 or %o1, 0x290, %o1 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 20049ac: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20049b0: 12 80 00 0a bne 20049d8 <== NOT EXECUTED 20049b4: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 20049b8: d0 04 60 c8 ld [ %l1 + 0xc8 ], %o0 <== NOT EXECUTED 20049bc: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 20049c0: 13 00 80 12 sethi %hi(0x2004800), %o1 <== NOT EXECUTED 20049c4: 40 00 03 c1 call 20058c8 <== NOT EXECUTED 20049c8: 92 12 62 14 or %o1, 0x214, %o1 ! 2004a14 <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 20049cc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20049d0: 02 80 00 05 be 20049e4 <== NOT EXECUTED 20049d4: 03 00 80 5d sethi %hi(0x2017400), %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 20049d8: 40 00 04 5f call 2005b54 <== NOT EXECUTED 20049dc: 01 00 00 00 nop <== NOT EXECUTED } } rtems_semaphore_release (rtems_termios_ttyMutex); 20049e0: 03 00 80 5d sethi %hi(0x2017400), %g1 20049e4: d0 00 61 a8 ld [ %g1 + 0x1a8 ], %o0 ! 20175a8 20049e8: 40 00 02 e0 call 2005568 20049ec: 01 00 00 00 nop return RTEMS_SUCCESSFUL; } 20049f0: 81 c7 e0 08 ret 20049f4: 91 e8 00 13 restore %g0, %l3, %o0 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 20049f8: 40 00 15 9b call 200a064 20049fc: 92 10 20 e8 mov 0xe8, %o1 if (tty == NULL) { 2004a00: a2 92 20 00 orcc %o0, 0, %l1 2004a04: 12 bf ff 02 bne 200460c 2004a08: 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); 2004a0c: 10 bf ff 0c b 200463c <== NOT EXECUTED 2004a10: 03 00 80 5d sethi %hi(0x2017400), %g1 <== NOT EXECUTED 0200332c : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 200332c: 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) { 2003330: 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) { 2003334: 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) { 2003338: 80 a0 60 00 cmp %g1, 0 200333c: 12 80 00 08 bne 200335c 2003340: a2 10 00 18 mov %i0, %l1 (*tty->device.write)(tty->minor, (void *)buf, len); 2003344: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 2003348: c2 06 a0 a4 ld [ %i2 + 0xa4 ], %g1 200334c: 9f c0 40 00 call %g1 2003350: 94 10 00 19 mov %i1, %o2 2003354: 81 c7 e0 08 ret 2003358: 81 e8 00 00 restore return; } newHead = tty->rawOutBuf.Head; 200335c: 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; 2003360: 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; 2003364: 10 80 00 39 b 2003448 <== NOT EXECUTED 2003368: 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; 200336c: d2 06 a0 88 ld [ %i2 + 0x88 ], %o1 <== NOT EXECUTED 2003370: 40 00 42 8e call 2013da8 <.urem> <== NOT EXECUTED 2003374: 90 04 20 01 add %l0, 1, %o0 <== NOT EXECUTED rtems_interrupt_disable (level); 2003378: 7f ff fa 72 call 2001d40 <== NOT EXECUTED 200337c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 2003380: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 2003384: 30 80 00 0f b,a 20033c0 <== NOT EXECUTED while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); 2003388: 7f ff fa 72 call 2001d50 <== NOT EXECUTED 200338c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 2003390: d0 06 a0 8c ld [ %i2 + 0x8c ], %o0 <== NOT EXECUTED 2003394: 92 10 20 00 clr %o1 <== NOT EXECUTED 2003398: 40 00 08 2d call 200544c <== NOT EXECUTED 200339c: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 20033a0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20033a4: 02 80 00 04 be 20033b4 <== NOT EXECUTED 20033a8: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 20033ac: 40 00 09 ea call 2005b54 <== NOT EXECUTED 20033b0: 01 00 00 00 nop <== NOT EXECUTED rtems_interrupt_disable (level); 20033b4: 7f ff fa 63 call 2001d40 <== NOT EXECUTED 20033b8: 01 00 00 00 nop <== NOT EXECUTED 20033bc: 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) { 20033c0: c2 06 a0 84 ld [ %i2 + 0x84 ], %g1 <== NOT EXECUTED 20033c4: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 20033c8: 22 bf ff f0 be,a 2003388 <== NOT EXECUTED 20033cc: 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++; 20033d0: c6 06 a0 80 ld [ %i2 + 0x80 ], %g3 <== NOT EXECUTED 20033d4: c4 0c 40 00 ldub [ %l1 ], %g2 <== NOT EXECUTED 20033d8: c2 06 a0 7c ld [ %i2 + 0x7c ], %g1 <== NOT EXECUTED 20033dc: c4 28 40 03 stb %g2, [ %g1 + %g3 ] <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 20033e0: 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; 20033e4: e0 26 a0 80 st %l0, [ %i2 + 0x80 ] <== NOT EXECUTED if (tty->rawOutBufState == rob_idle) { 20033e8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20033ec: 32 80 00 14 bne,a 200343c <== NOT EXECUTED 20033f0: a2 04 60 01 inc %l1 <== NOT EXECUTED /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 20033f4: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED 20033f8: 80 88 60 10 btst 0x10, %g1 <== NOT EXECUTED 20033fc: 12 80 00 0b bne 2003428 <== NOT EXECUTED 2003400: 01 00 00 00 nop <== NOT EXECUTED (*tty->device.write)(tty->minor, 2003404: d2 06 a0 84 ld [ %i2 + 0x84 ], %o1 <== NOT EXECUTED 2003408: c2 06 a0 7c ld [ %i2 + 0x7c ], %g1 <== NOT EXECUTED 200340c: c4 06 a0 a4 ld [ %i2 + 0xa4 ], %g2 <== NOT EXECUTED 2003410: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 <== NOT EXECUTED 2003414: 92 00 40 09 add %g1, %o1, %o1 <== NOT EXECUTED 2003418: 9f c0 80 00 call %g2 <== NOT EXECUTED 200341c: 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; 2003420: 10 80 00 06 b 2003438 <== NOT EXECUTED 2003424: 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; 2003428: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED 200342c: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED 2003430: c2 26 a0 b8 st %g1, [ %i2 + 0xb8 ] <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 2003434: 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++; 2003438: 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); 200343c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2003440: 7f ff fa 44 call 2001d50 <== NOT EXECUTED 2003444: 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) { 2003448: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 200344c: 12 bf ff c8 bne 200336c <== NOT EXECUTED 2003450: 01 00 00 00 nop <== NOT EXECUTED 2003454: 81 c7 e0 08 ret <== NOT EXECUTED 2003458: 81 e8 00 00 restore <== NOT EXECUTED 02003bf4 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 2003bf4: 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; 2003bf8: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED uint32_t count = args->count; 2003bfc: 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; 2003c00: e0 00 60 28 ld [ %g1 + 0x28 ], %l0 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; 2003c04: 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); 2003c08: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 2003c0c: 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); 2003c10: 92 10 20 00 clr %o1 <== NOT EXECUTED 2003c14: 40 00 06 0e call 200544c <== NOT EXECUTED 2003c18: 94 10 20 00 clr %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 2003c1c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2003c20: 12 80 00 10 bne 2003c60 <== NOT EXECUTED 2003c24: 03 00 80 5c sethi %hi(0x2017000), %g1 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 2003c28: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED 2003c2c: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 2003c30: 82 10 62 bc or %g1, 0x2bc, %g1 <== NOT EXECUTED 2003c34: 84 00 a0 08 add %g2, 8, %g2 <== NOT EXECUTED 2003c38: c2 00 40 02 ld [ %g1 + %g2 ], %g1 <== NOT EXECUTED 2003c3c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2003c40: 02 80 00 0a be 2003c68 <== NOT EXECUTED 2003c44: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 2003c48: 9f c0 40 00 call %g1 <== NOT EXECUTED 2003c4c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2003c50: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 2003c54: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED 2003c58: 40 00 06 44 call 2005568 <== NOT EXECUTED 2003c5c: c0 24 20 e4 clr [ %l0 + 0xe4 ] <== NOT EXECUTED 2003c60: 81 c7 e0 08 ret <== NOT EXECUTED 2003c64: 81 e8 00 00 restore <== NOT EXECUTED return sc; } if (tty->cindex == tty->ccount) { 2003c68: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED 2003c6c: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 2003c70: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2003c74: 12 80 00 d0 bne 2003fb4 <== NOT EXECUTED 2003c78: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; 2003c7c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED if (tty->device.pollRead != NULL 2003c80: 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; 2003c84: 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; 2003c88: c0 24 20 20 clr [ %l0 + 0x20 ] <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 2003c8c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 2003c90: 02 80 00 5b be 2003dfc <== NOT EXECUTED 2003c94: c0 24 20 24 clr [ %l0 + 0x24 ] <== NOT EXECUTED 2003c98: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 <== NOT EXECUTED 2003c9c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2003ca0: 12 80 00 58 bne 2003e00 <== NOT EXECUTED 2003ca4: 03 00 80 5b sethi %hi(0x2016c00), %g1 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 2003ca8: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 2003cac: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 2003cb0: 22 80 00 13 be,a 2003cfc <== NOT EXECUTED 2003cb4: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 2003cb8: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 2003cbc: 9f c0 40 00 call %g1 <== NOT EXECUTED 2003cc0: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 2003cc4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2003cc8: 16 80 00 06 bge 2003ce0 <== NOT EXECUTED 2003ccc: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED rtems_task_wake_after (1); 2003cd0: 40 00 07 19 call 2005934 <== NOT EXECUTED 2003cd4: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED { int n; if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); 2003cd8: 10 bf ff f9 b 2003cbc <== NOT EXECUTED 2003cdc: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED if (n < 0) { rtems_task_wake_after (1); } else { if (siproc (n, tty)) 2003ce0: 7f ff ff 63 call 2003a6c <== NOT EXECUTED 2003ce4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 2003ce8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2003cec: 22 bf ff f4 be,a 2003cbc <== NOT EXECUTED 2003cf0: 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)) { 2003cf4: 10 80 00 b0 b 2003fb4 <== NOT EXECUTED 2003cf8: 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]) 2003cfc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2003d00: 12 80 00 0a bne 2003d28 <== NOT EXECUTED 2003d04: a4 07 bf f4 add %fp, -12, %l2 <== NOT EXECUTED 2003d08: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED 2003d0c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2003d10: 02 80 00 07 be 2003d2c <== NOT EXECUTED 2003d14: a2 07 bf f0 add %fp, -16, %l1 <== NOT EXECUTED rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); 2003d18: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED 2003d1c: 40 00 03 7e call 2004b14 <== NOT EXECUTED 2003d20: 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); 2003d24: 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); 2003d28: 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); 2003d2c: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 2003d30: 9f c0 40 00 call %g1 <== NOT EXECUTED 2003d34: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 2003d38: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2003d3c: 36 80 00 1e bge,a 2003db4 <== NOT EXECUTED 2003d40: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 2003d44: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED 2003d48: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2003d4c: 02 80 00 0a be 2003d74 <== NOT EXECUTED 2003d50: c4 0c 20 46 ldub [ %l0 + 0x46 ], %g2 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 2003d54: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 2003d58: 02 80 00 13 be 2003da4 <== NOT EXECUTED 2003d5c: 01 00 00 00 nop <== NOT EXECUTED 2003d60: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 2003d64: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2003d68: 02 80 00 0f be 2003da4 <== NOT EXECUTED 2003d6c: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED 2003d70: 30 80 00 04 b,a 2003d80 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 2003d74: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 2003d78: 02 80 00 8e be 2003fb0 <== NOT EXECUTED 2003d7c: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED break; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); 2003d80: 40 00 03 65 call 2004b14 <== NOT EXECUTED 2003d84: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 2003d88: c6 04 20 54 ld [ %l0 + 0x54 ], %g3 <== NOT EXECUTED 2003d8c: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED 2003d90: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 2003d94: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 2003d98: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 2003d9c: 18 80 00 86 bgu 2003fb4 <== NOT EXECUTED 2003da0: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED break; } } rtems_task_wake_after (1); 2003da4: 40 00 06 e4 call 2005934 <== NOT EXECUTED 2003da8: 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); 2003dac: 10 bf ff e1 b 2003d30 <== NOT EXECUTED 2003db0: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED } } rtems_task_wake_after (1); } else { siproc (n, tty); 2003db4: 7f ff ff 2e call 2003a6c <== NOT EXECUTED 2003db8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 2003dbc: c4 0c 20 47 ldub [ %l0 + 0x47 ], %g2 <== NOT EXECUTED 2003dc0: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 2003dc4: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 2003dc8: 16 80 00 7a bge 2003fb0 <== NOT EXECUTED 2003dcc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 2003dd0: 22 bf ff d8 be,a 2003d30 <== NOT EXECUTED 2003dd4: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 2003dd8: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED 2003ddc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2003de0: 22 bf ff d4 be,a 2003d30 <== NOT EXECUTED 2003de4: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); 2003de8: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 2003dec: 40 00 03 4a call 2004b14 <== NOT EXECUTED 2003df0: 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); 2003df4: 10 bf ff cf b 2003d30 <== NOT EXECUTED 2003df8: 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) && 2003dfc: 03 00 80 5b sethi %hi(0x2016c00), %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; 2003e00: 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) && 2003e04: ba 10 61 24 or %g1, 0x124, %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, 2003e08: ae 04 20 49 add %l0, 0x49, %l7 <== NOT EXECUTED 2003e0c: 10 80 00 60 b 2003f8c <== NOT EXECUTED 2003e10: 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; 2003e14: d0 04 20 5c ld [ %l0 + 0x5c ], %o0 <== NOT EXECUTED 2003e18: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 2003e1c: 40 00 3f e3 call 2013da8 <.urem> <== NOT EXECUTED 2003e20: 90 02 20 01 inc %o0 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 2003e24: 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; 2003e28: 84 10 00 08 mov %o0, %g2 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 2003e2c: e2 08 40 08 ldub [ %g1 + %o0 ], %l1 <== NOT EXECUTED tty->rawInBuf.Head = newHead; 2003e30: d0 24 20 5c st %o0, [ %l0 + 0x5c ] <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 2003e34: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 2003e38: d0 04 20 64 ld [ %l0 + 0x64 ], %o0 <== NOT EXECUTED 2003e3c: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 2003e40: 90 02 00 01 add %o0, %g1, %o0 <== NOT EXECUTED 2003e44: 40 00 3f d9 call 2013da8 <.urem> <== NOT EXECUTED 2003e48: 90 22 00 02 sub %o0, %g2, %o0 <== NOT EXECUTED 2003e4c: c2 04 20 bc ld [ %l0 + 0xbc ], %g1 <== NOT EXECUTED 2003e50: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 2003e54: 3a 80 00 27 bcc,a 2003ef0 <== NOT EXECUTED 2003e58: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 2003e5c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 2003e60: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED 2003e64: 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)) 2003e68: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 2003e6c: 82 08 62 02 and %g1, 0x202, %g1 <== NOT EXECUTED 2003e70: 80 a0 62 02 cmp %g1, 0x202 <== NOT EXECUTED 2003e74: 12 80 00 11 bne 2003eb8 <== NOT EXECUTED 2003e78: 01 00 00 00 nop <== NOT EXECUTED 2003e7c: c2 04 20 94 ld [ %l0 + 0x94 ], %g1 <== NOT EXECUTED 2003e80: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2003e84: 22 80 00 07 be,a 2003ea0 <== NOT EXECUTED 2003e88: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 2003e8c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 2003e90: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 2003e94: 02 80 00 09 be 2003eb8 <== NOT EXECUTED 2003e98: 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, 2003e9c: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 2003ea0: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 2003ea4: 92 10 00 17 mov %l7, %o1 <== NOT EXECUTED 2003ea8: 9f c0 40 00 call %g1 <== NOT EXECUTED 2003eac: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 2003eb0: 10 80 00 10 b 2003ef0 <== NOT EXECUTED 2003eb4: 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) { 2003eb8: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 2003ebc: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 2003ec0: 22 80 00 0c be,a 2003ef0 <== NOT EXECUTED 2003ec4: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 2003ec8: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 2003ecc: 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; 2003ed0: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED 2003ed4: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 2003ed8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 2003edc: 22 80 00 05 be,a 2003ef0 <== NOT EXECUTED 2003ee0: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 2003ee4: 9f c0 80 00 call %g2 <== NOT EXECUTED 2003ee8: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 2003eec: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 2003ef0: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 2003ef4: 02 80 00 09 be 2003f18 <== NOT EXECUTED 2003ef8: 90 0c 60 ff and %l1, 0xff, %o0 <== NOT EXECUTED if (siproc (c, tty)) 2003efc: 7f ff fe dc call 2003a6c <== NOT EXECUTED 2003f00: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 2003f04: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2003f08: 32 80 00 0c bne,a 2003f38 <== NOT EXECUTED 2003f0c: 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; 2003f10: 10 80 00 0b b 2003f3c <== NOT EXECUTED 2003f14: 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); 2003f18: 7f ff fe d5 call 2003a6c <== NOT EXECUTED 2003f1c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 2003f20: c4 0c 20 47 ldub [ %l0 + 0x47 ], %g2 <== NOT EXECUTED 2003f24: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 2003f28: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 2003f2c: 26 80 00 04 bl,a 2003f3c <== NOT EXECUTED 2003f30: d4 04 20 70 ld [ %l0 + 0x70 ], %o2 <== NOT EXECUTED 2003f34: a8 10 20 00 clr %l4 <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 2003f38: 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) && 2003f3c: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 <== NOT EXECUTED 2003f40: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 2003f44: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2003f48: 02 80 00 08 be 2003f68 <== NOT EXECUTED 2003f4c: a2 10 00 14 mov %l4, %l1 <== NOT EXECUTED 2003f50: c2 07 40 00 ld [ %i5 ], %g1 <== NOT EXECUTED 2003f54: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 2003f58: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2003f5c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2003f60: 06 bf ff ad bl 2003e14 <== NOT EXECUTED 2003f64: 01 00 00 00 nop <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 2003f68: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED 2003f6c: 02 80 00 11 be 2003fb0 <== NOT EXECUTED 2003f70: a4 10 00 0a mov %o2, %l2 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 2003f74: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED 2003f78: 40 00 05 35 call 200544c <== NOT EXECUTED 2003f7c: d2 04 20 6c ld [ %l0 + 0x6c ], %o1 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 2003f80: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2003f84: 12 80 00 0c bne 2003fb4 <== NOT EXECUTED 2003f88: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; rtems_status_code sc; int wait = (int)1; while ( wait ) { 2003f8c: a8 10 00 11 mov %l1, %l4 <== NOT EXECUTED 2003f90: 10 bf ff eb b 2003f3c <== NOT EXECUTED 2003f94: 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++]; 2003f98: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED count--; 2003f9c: 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++]; 2003fa0: c2 08 40 02 ldub [ %g1 + %g2 ], %g1 <== NOT EXECUTED 2003fa4: c2 2d 40 00 stb %g1, [ %l5 ] <== NOT EXECUTED 2003fa8: c6 24 20 24 st %g3, [ %l0 + 0x24 ] <== NOT EXECUTED 2003fac: 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)) { 2003fb0: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 2003fb4: 22 80 00 08 be,a 2003fd4 <== NOT EXECUTED 2003fb8: c2 05 a0 0c ld [ %l6 + 0xc ], %g1 <== NOT EXECUTED 2003fbc: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED 2003fc0: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 2003fc4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2003fc8: 06 bf ff f4 bl 2003f98 <== NOT EXECUTED 2003fcc: 86 00 a0 01 add %g2, 1, %g3 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 2003fd0: c2 05 a0 0c ld [ %l6 + 0xc ], %g1 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 2003fd4: 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; 2003fd8: 82 20 40 13 sub %g1, %l3, %g1 <== NOT EXECUTED 2003fdc: c2 25 a0 14 st %g1, [ %l6 + 0x14 ] <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 2003fe0: 40 00 05 62 call 2005568 <== NOT EXECUTED 2003fe4: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED return sc; } 2003fe8: 81 c7 e0 08 ret <== NOT EXECUTED 2003fec: 81 e8 00 00 restore <== NOT EXECUTED 02002da0 : * 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) { 2002da0: 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)) 2002da4: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 2002da8: 82 08 64 03 and %g1, 0x403, %g1 <== NOT EXECUTED 2002dac: 80 a0 64 01 cmp %g1, 0x401 <== NOT EXECUTED 2002db0: 12 80 00 10 bne 2002df0 <== NOT EXECUTED 2002db4: a2 10 00 18 mov %i0, %l1 <== NOT EXECUTED == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 2002db8: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED 2002dbc: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 2002dc0: 92 06 20 4a add %i0, 0x4a, %o1 <== NOT EXECUTED 2002dc4: 9f c0 40 00 call %g1 <== NOT EXECUTED 2002dc8: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 2002dcc: 7f ff fb dd call 2001d40 <== NOT EXECUTED 2002dd0: 01 00 00 00 nop <== NOT EXECUTED tty->t_dqlen--; 2002dd4: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 2002dd8: 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--; 2002ddc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 2002de0: 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--; 2002de4: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 2002de8: c4 26 20 b8 st %g2, [ %i0 + 0xb8 ] <== NOT EXECUTED rtems_interrupt_enable(level); 2002dec: 30 80 00 12 b,a 2002e34 <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 2002df0: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 2002df4: 82 08 60 03 and %g1, 3, %g1 <== NOT EXECUTED 2002df8: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 2002dfc: 12 80 00 12 bne 2002e44 <== NOT EXECUTED 2002e00: 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, 2002e04: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED 2002e08: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 2002e0c: 9f c0 40 00 call %g1 <== NOT EXECUTED 2002e10: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 2002e14: 7f ff fb cb call 2001d40 <== NOT EXECUTED 2002e18: 01 00 00 00 nop <== NOT EXECUTED tty->t_dqlen--; 2002e1c: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 2002e20: 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--; 2002e24: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 2002e28: 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--; 2002e2c: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 2002e30: c4 26 20 b8 st %g2, [ %i0 + 0xb8 ] <== NOT EXECUTED rtems_interrupt_enable(level); 2002e34: 7f ff fb c7 call 2001d50 <== NOT EXECUTED 2002e38: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 2002e3c: 81 c7 e0 08 ret <== NOT EXECUTED 2002e40: 81 e8 00 00 restore <== NOT EXECUTED nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 2002e44: c4 06 20 80 ld [ %i0 + 0x80 ], %g2 <== NOT EXECUTED 2002e48: c2 06 20 84 ld [ %i0 + 0x84 ], %g1 <== NOT EXECUTED 2002e4c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2002e50: 12 80 00 0a bne 2002e78 <== NOT EXECUTED 2002e54: 01 00 00 00 nop <== NOT EXECUTED /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 2002e58: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED 2002e5c: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 2002e60: 12 bf ff f7 bne 2002e3c <== NOT EXECUTED 2002e64: b0 10 20 00 clr %i0 <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 2002e68: 40 00 09 c0 call 2005568 <== NOT EXECUTED 2002e6c: d0 04 60 8c ld [ %l1 + 0x8c ], %o0 <== NOT EXECUTED 2002e70: 81 c7 e0 08 ret <== NOT EXECUTED 2002e74: 81 e8 00 00 restore <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); 2002e78: 7f ff fb b2 call 2001d40 <== NOT EXECUTED 2002e7c: 01 00 00 00 nop <== NOT EXECUTED len = tty->t_dqlen; 2002e80: e0 06 20 90 ld [ %i0 + 0x90 ], %l0 <== NOT EXECUTED tty->t_dqlen = 0; 2002e84: c0 26 20 90 clr [ %i0 + 0x90 ] <== NOT EXECUTED rtems_interrupt_enable(level); 2002e88: 7f ff fb b2 call 2001d50 <== NOT EXECUTED 2002e8c: 01 00 00 00 nop <== NOT EXECUTED newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 2002e90: d0 06 20 84 ld [ %i0 + 0x84 ], %o0 <== NOT EXECUTED 2002e94: d2 06 20 88 ld [ %i0 + 0x88 ], %o1 <== NOT EXECUTED 2002e98: 40 00 43 c4 call 2013da8 <.urem> <== NOT EXECUTED 2002e9c: 90 04 00 08 add %l0, %o0, %o0 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 2002ea0: 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; 2002ea4: d0 24 60 84 st %o0, [ %l1 + 0x84 ] <== NOT EXECUTED if (tty->rawOutBufState == rob_wait) { 2002ea8: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 2002eac: 12 80 00 04 bne 2002ebc <== NOT EXECUTED 2002eb0: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 2002eb4: 40 00 09 ad call 2005568 <== NOT EXECUTED 2002eb8: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { 2002ebc: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 <== NOT EXECUTED 2002ec0: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 2002ec4: 12 80 00 0c bne 2002ef4 <== NOT EXECUTED 2002ec8: 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) { 2002ecc: c2 04 60 d4 ld [ %l1 + 0xd4 ], %g1 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 2002ed0: 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) { 2002ed4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2002ed8: 02 80 00 2c be 2002f88 <== NOT EXECUTED 2002edc: b0 10 20 00 clr %i0 <== NOT EXECUTED (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 2002ee0: d2 04 60 d8 ld [ %l1 + 0xd8 ], %o1 <== NOT EXECUTED 2002ee4: 9f c0 40 00 call %g1 <== NOT EXECUTED 2002ee8: 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); 2002eec: 10 80 00 27 b 2002f88 <== NOT EXECUTED 2002ef0: 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)) 2002ef4: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 2002ef8: 82 08 62 10 and %g1, 0x210, %g1 <== NOT EXECUTED 2002efc: 80 a0 62 10 cmp %g1, 0x210 <== NOT EXECUTED 2002f00: 12 80 00 0d bne 2002f34 <== NOT EXECUTED 2002f04: 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); 2002f08: 7f ff fb 8e call 2001d40 <== NOT EXECUTED 2002f0c: 01 00 00 00 nop <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 2002f10: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 2002f14: 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; 2002f18: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 2002f1c: 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; 2002f20: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ rtems_interrupt_enable(level); 2002f24: 7f ff fb 8b call 2001d50 <== NOT EXECUTED 2002f28: 01 00 00 00 nop <== NOT EXECUTED 2002f2c: 10 80 00 17 b 2002f88 <== NOT EXECUTED 2002f30: b0 10 20 00 clr %i0 ! 0 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 2002f34: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 <== NOT EXECUTED 2002f38: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 2002f3c: 08 80 00 05 bleu 2002f50 <== NOT EXECUTED 2002f40: 01 00 00 00 nop <== NOT EXECUTED nToSend = tty->rawOutBuf.Size - newTail; 2002f44: c2 04 60 88 ld [ %l1 + 0x88 ], %g1 <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; 2002f48: 10 80 00 04 b 2002f58 <== NOT EXECUTED 2002f4c: b0 20 40 10 sub %g1, %l0, %i0 <== NOT EXECUTED 2002f50: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 <== NOT EXECUTED 2002f54: 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)) { 2002f58: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 2002f5c: 80 88 66 00 btst 0x600, %g1 <== NOT EXECUTED 2002f60: 32 80 00 02 bne,a 2002f68 <== NOT EXECUTED 2002f64: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 2002f68: d2 04 60 7c ld [ %l1 + 0x7c ], %o1 <== NOT EXECUTED 2002f6c: c4 04 60 a4 ld [ %l1 + 0xa4 ], %g2 <== NOT EXECUTED 2002f70: 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*/ 2002f74: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 2002f78: 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*/ 2002f7c: c2 24 60 94 st %g1, [ %l1 + 0x94 ] <== NOT EXECUTED (*tty->device.write)(tty->minor, 2002f80: 9f c0 80 00 call %g2 <== NOT EXECUTED 2002f84: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 2002f88: e0 24 60 84 st %l0, [ %l1 + 0x84 ] <== NOT EXECUTED } return nToSend; } 2002f8c: 81 c7 e0 08 ret <== NOT EXECUTED 2002f90: 81 e8 00 00 restore <== NOT EXECUTED 02004a90 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 2004a90: 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 | 2004a94: 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 ( 2004a98: 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 | 2004a9c: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED 2004aa0: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 2004aa4: 94 10 20 00 clr %o2 <== NOT EXECUTED 2004aa8: 40 00 00 b9 call 2004d8c <== NOT EXECUTED 2004aac: 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) { 2004ab0: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 2004ab4: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 2004ab8: 22 80 00 07 be,a 2004ad4 <== NOT EXECUTED 2004abc: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1 <== NOT EXECUTED tty->rxTaskId = 0; 2004ac0: c0 26 20 c4 clr [ %i0 + 0xc4 ] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 2004ac4: 40 00 03 22 call 200574c <== NOT EXECUTED 2004ac8: 90 10 20 00 clr %o0 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 2004acc: 10 bf ff f5 b 2004aa0 <== NOT EXECUTED 2004ad0: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 2004ad4: 9f c0 40 00 call %g1 <== NOT EXECUTED 2004ad8: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED if (c != EOF) { 2004adc: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 2004ae0: 02 bf ff ef be 2004a9c <== NOT EXECUTED 2004ae4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; 2004ae8: d0 2f bf f7 stb %o0, [ %fp + -9 ] <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 2004aec: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2004af0: 7f ff f9 48 call 2003010 <== NOT EXECUTED 2004af4: 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 | 2004af8: 10 bf ff ea b 2004aa0 <== NOT EXECUTED 2004afc: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED 02002d88 : 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); 2002d88: d0 02 20 c4 ld [ %o0 + 0xc4 ], %o0 <== NOT EXECUTED 2002d8c: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 2002d90: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2002d94: 40 00 08 60 call 2004f14 <== NOT EXECUTED 2002d98: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 2002d9c: 01 00 00 00 nop 02004a14 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 2004a14: 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) { 2004a18: 03 00 80 5c sethi %hi(0x2017000), %g1 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 2004a1c: 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) { 2004a20: a2 10 62 bc or %g1, 0x2bc, %l1 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 2004a24: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 2004a28: 94 10 20 00 clr %o2 <== NOT EXECUTED 2004a2c: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 2004a30: 40 00 00 d7 call 2004d8c <== NOT EXECUTED 2004a34: 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) { 2004a38: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 2004a3c: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 2004a40: 02 80 00 07 be 2004a5c <== NOT EXECUTED 2004a44: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED tty->txTaskId = 0; 2004a48: c0 26 20 c8 clr [ %i0 + 0xc8 ] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 2004a4c: 40 00 03 40 call 200574c <== NOT EXECUTED 2004a50: 90 10 20 00 clr %o0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 2004a54: 10 bf ff f5 b 2004a28 <== NOT EXECUTED 2004a58: 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) { 2004a5c: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 2004a60: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 2004a64: 82 04 40 01 add %l1, %g1, %g1 <== NOT EXECUTED 2004a68: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED 2004a6c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004a70: 02 80 00 04 be 2004a80 <== NOT EXECUTED 2004a74: 01 00 00 00 nop <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 2004a78: 9f c0 40 00 call %g1 <== NOT EXECUTED 2004a7c: 01 00 00 00 nop <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 2004a80: 7f ff f8 c8 call 2002da0 <== NOT EXECUTED 2004a84: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 2004a88: 10 bf ff e8 b 2004a28 <== NOT EXECUTED 2004a8c: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 02003abc : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 2003abc: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2003ac0: c2 06 00 00 ld [ %i0 ], %g1 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2003ac4: 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; 2003ac8: e4 00 60 28 ld [ %g1 + 0x28 ], %l2 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2003acc: 94 10 20 00 clr %o2 2003ad0: 40 00 06 5f call 200544c 2003ad4: d0 04 a0 18 ld [ %l2 + 0x18 ], %o0 if (sc != RTEMS_SUCCESSFUL) 2003ad8: a6 92 20 00 orcc %o0, 0, %l3 2003adc: 12 80 00 25 bne 2003b70 2003ae0: 03 00 80 5c sethi %hi(0x2017000), %g1 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 2003ae4: c4 04 a0 cc ld [ %l2 + 0xcc ], %g2 2003ae8: 85 28 a0 05 sll %g2, 5, %g2 2003aec: 82 10 62 bc or %g1, 0x2bc, %g1 2003af0: 82 00 40 02 add %g1, %g2, %g1 2003af4: c2 00 60 0c ld [ %g1 + 0xc ], %g1 2003af8: 80 a0 60 00 cmp %g1, 0 2003afc: 02 80 00 06 be 2003b14 2003b00: 92 10 00 18 mov %i0, %o1 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 2003b04: 9f c0 40 00 call %g1 <== NOT EXECUTED 2003b08: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 2003b0c: 10 80 00 17 b 2003b68 <== NOT EXECUTED 2003b10: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 2003b14: c2 04 a0 34 ld [ %l2 + 0x34 ], %g1 2003b18: d2 06 20 0c ld [ %i0 + 0xc ], %o1 2003b1c: 80 88 60 01 btst 1, %g1 2003b20: 02 80 00 0e be 2003b58 2003b24: d0 06 20 08 ld [ %i0 + 8 ], %o0 uint32_t count = args->count; 2003b28: a2 10 00 09 mov %o1, %l1 char *buffer = args->buffer; 2003b2c: 10 80 00 06 b 2003b44 2003b30: a0 10 00 08 mov %o0, %l0 while (count--) oproc (*buffer++, tty); 2003b34: a2 04 7f ff add %l1, -1, %l1 2003b38: a0 04 20 01 inc %l0 2003b3c: 7f ff fe 48 call 200345c 2003b40: 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--) 2003b44: 80 a4 60 00 cmp %l1, 0 2003b48: 32 bf ff fb bne,a 2003b34 2003b4c: 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; 2003b50: 10 80 00 05 b 2003b64 2003b54: 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); 2003b58: 7f ff fd f5 call 200332c <== NOT EXECUTED 2003b5c: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED args->bytes_moved = args->count; 2003b60: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED 2003b64: c2 26 20 14 st %g1, [ %i0 + 0x14 ] } rtems_semaphore_release (tty->osem); 2003b68: 40 00 06 80 call 2005568 2003b6c: d0 04 a0 18 ld [ %l2 + 0x18 ], %o0 return sc; } 2003b70: 81 c7 e0 08 ret 2003b74: 91 e8 00 13 restore %g0, %l3, %o0 020065f0 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 20065f0: 9d e3 bf 90 save %sp, -112, %sp 20065f4: a4 10 00 18 mov %i0, %l2 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 20065f8: 80 a6 60 00 cmp %i1, 0 20065fc: 02 80 00 1c be 200666c 2006600: b0 10 20 0a mov 0xa, %i0 return RTEMS_INVALID_NUMBER; if ( !routine ) 2006604: 80 a6 a0 00 cmp %i2, 0 2006608: 02 80 00 19 be 200666c 200660c: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 2006610: 11 00 80 5a sethi %hi(0x2016800), %o0 2006614: 92 10 00 12 mov %l2, %o1 2006618: 90 12 21 64 or %o0, 0x164, %o0 200661c: 40 00 05 23 call 2007aa8 <_Objects_Get> 2006620: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 2006624: c2 07 bf f4 ld [ %fp + -12 ], %g1 2006628: a0 10 00 08 mov %o0, %l0 200662c: 80 a0 60 00 cmp %g1, 0 2006630: 12 80 00 0f bne 200666c 2006634: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 2006638: a2 02 20 10 add %o0, 0x10, %l1 200663c: 40 00 0c 53 call 2009788 <_Watchdog_Remove> 2006640: 90 10 00 11 mov %l1, %o0 _ISR_Disable( level ); 2006644: 7f ff ef 7e call 200243c 2006648: 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 ) { 200664c: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 2006650: 80 a0 60 00 cmp %g1, 0 2006654: 22 80 00 08 be,a 2006674 2006658: f4 24 20 2c st %i2, [ %l0 + 0x2c ] _ISR_Enable( level ); 200665c: 7f ff ef 7c call 200244c <== NOT EXECUTED 2006660: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 2006664: 40 00 07 52 call 20083ac <_Thread_Enable_dispatch> <== NOT EXECUTED 2006668: 01 00 00 00 nop <== NOT EXECUTED 200666c: 81 c7 e0 08 ret 2006670: 81 e8 00 00 restore void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 2006674: e4 24 20 30 st %l2, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 2006678: 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; 200667c: c0 24 20 38 clr [ %l0 + 0x38 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2006680: c0 24 20 18 clr [ %l0 + 0x18 ] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 2006684: 7f ff ef 72 call 200244c 2006688: b0 10 20 00 clr %i0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200668c: 92 10 00 11 mov %l1, %o1 2006690: 11 00 80 59 sethi %hi(0x2016400), %o0 2006694: 90 12 20 74 or %o0, 0x74, %o0 ! 2016474 <_Watchdog_Ticks_chain> 2006698: 40 00 0b e2 call 2009620 <_Watchdog_Insert> 200669c: f2 24 20 1c st %i1, [ %l0 + 0x1c ] _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 20066a0: 40 00 07 43 call 20083ac <_Thread_Enable_dispatch> 20066a4: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 20066a8: 81 c7 e0 08 ret 20066ac: 81 e8 00 00 restore 0201187c : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 201187c: 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 ) && 2011880: 80 a6 20 00 cmp %i0, 0 2011884: 02 80 00 06 be 201189c 2011888: 82 10 20 00 clr %g1 201188c: 03 00 80 b1 sethi %hi(0x202c400), %g1 2011890: c2 08 62 14 ldub [ %g1 + 0x214 ], %g1 ! 202c614 2011894: 80 a0 40 18 cmp %g1, %i0 2011898: 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 ) ) { 201189c: 80 a0 60 00 cmp %g1, 0 20118a0: 12 80 00 06 bne 20118b8 20118a4: a2 10 00 18 mov %i0, %l1 if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 20118a8: 80 a6 3f ff cmp %i0, -1 20118ac: 12 80 00 56 bne 2011a04 20118b0: 90 10 20 13 mov 0x13, %o0 20118b4: a2 10 20 00 clr %l1 20118b8: 05 00 80 c5 sethi %hi(0x2031400), %g2 20118bc: c2 00 a3 e0 ld [ %g2 + 0x3e0 ], %g1 ! 20317e0 <_Thread_Dispatch_disable_level> 20118c0: 82 00 60 01 inc %g1 20118c4: c2 20 a3 e0 st %g1, [ %g2 + 0x3e0 ] /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 20118c8: 31 00 80 b4 sethi %hi(0x202d000), %i0 initialized = true; 20118cc: 82 10 20 01 mov 1, %g1 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 20118d0: e0 0e 21 5c ldub [ %i0 + 0x15c ], %l0 initialized = true; _Thread_Enable_dispatch(); 20118d4: 40 00 0c 21 call 2014958 <_Thread_Enable_dispatch> 20118d8: c2 2e 21 5c stb %g1, [ %i0 + 0x15c ] if ( tmpInitialized ) 20118dc: 80 a4 20 00 cmp %l0, 0 20118e0: 12 80 00 49 bne 2011a04 20118e4: 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); 20118e8: 05 00 80 c5 sethi %hi(0x2031400), %g2 20118ec: 82 10 a2 f4 or %g2, 0x2f4, %g1 ! 20316f4 <_Timer_To_be_inserted> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 20118f0: 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; 20118f4: 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); 20118f8: 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( 20118fc: 92 10 00 11 mov %l1, %o1 2011900: 94 10 00 19 mov %i1, %o2 2011904: 19 00 00 20 sethi %hi(0x8000), %o4 2011908: c2 20 a2 f4 st %g1, [ %g2 + 0x2f4 ] 201190c: 98 16 80 0c or %i2, %o4, %o4 2011910: 11 15 12 53 sethi %hi(0x54494c00), %o0 2011914: 96 10 21 00 mov 0x100, %o3 2011918: 90 12 21 45 or %o0, 0x145, %o0 201191c: 7f ff fc 77 call 2010af8 2011920: 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) { 2011924: 80 a2 20 00 cmp %o0, 0 2011928: 02 80 00 04 be 2011938 201192c: 03 00 80 c5 sethi %hi(0x2031400), %g1 initialized = false; 2011930: 10 80 00 35 b 2011a04 2011934: c0 2e 21 5c clrb [ %i0 + 0x15c ] * 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( 2011938: 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 ) 201193c: 86 10 62 94 or %g1, 0x294, %g3 2011940: c4 10 e0 10 lduh [ %g3 + 0x10 ], %g2 2011944: 03 00 00 3f sethi %hi(0xfc00), %g1 2011948: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 201194c: 82 0a c0 01 and %o3, %g1, %g1 2011950: 80 a0 40 02 cmp %g1, %g2 2011954: 18 80 00 05 bgu 2011968 2011958: 98 10 20 00 clr %o4 return NULL; return information->local_table[ index ]; 201195c: c4 00 e0 1c ld [ %g3 + 0x1c ], %g2 2011960: 83 28 60 02 sll %g1, 2, %g1 2011964: d8 00 80 01 ld [ %g2 + %g1 ], %o4 2011968: 1b 00 80 c5 sethi %hi(0x2031400), %o5 201196c: 82 13 62 e8 or %o5, 0x2e8, %g1 ! 20316e8 <_Timer_Seconds_chain> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2011970: 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; 2011974: 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); 2011978: 82 00 60 04 add %g1, 4, %g1 201197c: c2 23 62 e8 st %g1, [ %o5 + 0x2e8 ] 2011980: 03 00 80 c8 sethi %hi(0x2032000), %g1 2011984: 09 00 80 c5 sethi %hi(0x2031400), %g4 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 2011988: c0 23 20 6c clr [ %o4 + 0x6c ] 201198c: 84 11 22 d4 or %g4, 0x2d4, %g2 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2011990: c0 23 20 50 clr [ %o4 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; 2011994: d6 23 20 68 st %o3, [ %o4 + 0x68 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2011998: 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; 201199c: c0 20 a0 04 clr [ %g2 + 4 ] 20119a0: d8 20 61 90 st %o4, [ %g1 + 0x190 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 20119a4: 84 00 a0 04 add %g2, 4, %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 20119a8: 07 00 80 51 sethi %hi(0x2014400), %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 20119ac: 03 00 80 c5 sethi %hi(0x2031400), %g1 the_watchdog->routine = routine; 20119b0: 86 10 e3 94 or %g3, 0x394, %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 20119b4: 82 10 63 00 or %g1, 0x300, %g1 the_watchdog->routine = routine; 20119b8: c6 23 20 64 st %g3, [ %o4 + 0x64 ] 20119bc: c4 21 22 d4 st %g2, [ %g4 + 0x2d4 ] 20119c0: c6 20 60 1c st %g3, [ %g1 + 0x1c ] the_watchdog->id = id; the_watchdog->user_data = user_data; 20119c4: c0 20 60 24 clr [ %g1 + 0x24 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 20119c8: c0 20 60 08 clr [ %g1 + 8 ] the_watchdog->routine = routine; the_watchdog->id = id; 20119cc: 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; 20119d0: 05 00 80 c8 sethi %hi(0x2032000), %g2 20119d4: 03 00 80 46 sethi %hi(0x2011800), %g1 20119d8: 82 10 62 0c or %g1, 0x20c, %g1 ! 2011a0c <_Timer_Server_schedule_operation_method> /* * Start the timer server */ status = rtems_task_start( 20119dc: 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; 20119e0: c2 20 a1 8c st %g1, [ %g2 + 0x18c ] /* * Start the timer server */ status = rtems_task_start( 20119e4: 13 00 80 46 sethi %hi(0x2011800), %o1 20119e8: 94 10 20 00 clr %o2 20119ec: 7f ff fd 99 call 2011050 20119f0: 92 12 62 bc or %o1, 0x2bc, %o1 id, /* the id from create */ (rtems_task_entry) _Timer_Server_body, /* the timer server entry point */ 0 /* there is no argument */ ); if (status) { 20119f4: 80 a2 20 00 cmp %o0, 0 20119f8: 02 80 00 03 be 2011a04 20119fc: 03 00 80 b4 sethi %hi(0x202d000), %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; 2011a00: c0 28 61 5c clrb [ %g1 + 0x15c ] ! 202d15c <== NOT EXECUTED } return status; } 2011a04: 81 c7 e0 08 ret 2011a08: 91 e8 00 08 restore %g0, %o0, %o0 020115f0 : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 20115f0: 9d e3 bf 90 save %sp, -112, %sp 20115f4: 11 00 80 c8 sethi %hi(0x2032000), %o0 20115f8: 92 10 00 18 mov %i0, %o1 20115fc: 90 12 21 4c or %o0, 0x14c, %o0 2011600: 40 00 0a 68 call 2013fa0 <_Objects_Get> 2011604: 94 07 bf f4 add %fp, -12, %o2 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 2011608: c2 07 bf f4 ld [ %fp + -12 ], %g1 201160c: a0 10 00 08 mov %o0, %l0 2011610: 80 a0 60 00 cmp %g1, 0 2011614: 12 80 00 19 bne 2011678 2011618: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 201161c: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 2011620: 80 a0 60 01 cmp %g1, 1 2011624: 22 80 00 0f be,a 2011660 2011628: 31 00 80 c8 sethi %hi(0x2032000), %i0 201162c: 2a 80 00 06 bcs,a 2011644 2011630: a0 02 20 10 add %o0, 0x10, %l0 2011634: 80 a0 60 04 cmp %g1, 4 2011638: 18 80 00 1c bgu 20116a8 201163c: 01 00 00 00 nop 2011640: 30 80 00 16 b,a 2011698 case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 2011644: 40 00 12 f0 call 2016204 <_Watchdog_Remove> 2011648: 90 10 00 10 mov %l0, %o0 _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 201164c: 92 10 00 10 mov %l0, %o1 2011650: 11 00 80 c6 sethi %hi(0x2031800), %o0 2011654: 40 00 12 92 call 201609c <_Watchdog_Insert> 2011658: 90 12 20 c4 or %o0, 0xc4, %o0 ! 20318c4 <_Watchdog_Ticks_chain> 201165c: 30 80 00 13 b,a 20116a8 break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { 2011660: c2 06 21 8c ld [ %i0 + 0x18c ], %g1 2011664: 80 a0 60 00 cmp %g1, 0 2011668: 12 80 00 06 bne 2011680 201166c: 01 00 00 00 nop _Thread_Enable_dispatch(); 2011670: 40 00 0c ba call 2014958 <_Thread_Enable_dispatch> <== NOT EXECUTED 2011674: b0 10 20 0e mov 0xe, %i0 ! e <== NOT EXECUTED 2011678: 81 c7 e0 08 ret 201167c: 81 e8 00 00 restore return RTEMS_INCORRECT_STATE; } _Watchdog_Remove( &the_timer->Ticker ); 2011680: 40 00 12 e1 call 2016204 <_Watchdog_Remove> 2011684: 90 02 20 10 add %o0, 0x10, %o0 (*_Timer_Server_schedule_operation)( the_timer ); 2011688: c2 06 21 8c ld [ %i0 + 0x18c ], %g1 201168c: 9f c0 40 00 call %g1 2011690: 90 10 00 10 mov %l0, %o0 2011694: 30 80 00 05 b,a 20116a8 break; case TIMER_TIME_OF_DAY: case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); 2011698: 40 00 0c b0 call 2014958 <_Thread_Enable_dispatch> 201169c: b0 10 20 0b mov 0xb, %i0 20116a0: 81 c7 e0 08 ret 20116a4: 81 e8 00 00 restore return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 20116a8: 40 00 0c ac call 2014958 <_Thread_Enable_dispatch> 20116ac: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 20116b0: 81 c7 e0 08 ret 20116b4: 81 e8 00 00 restore 020116b8 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 20116b8: 9d e3 bf 90 save %sp, -112, %sp Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 20116bc: 03 00 80 c8 sethi %hi(0x2032000), %g1 20116c0: c2 00 61 90 ld [ %g1 + 0x190 ], %g1 ! 2032190 <_Timer_Server> Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 20116c4: a2 10 00 18 mov %i0, %l1 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 20116c8: 80 a0 60 00 cmp %g1, 0 20116cc: 02 80 00 1e be 2011744 20116d0: b0 10 20 0e mov 0xe, %i0 return RTEMS_INCORRECT_STATE; if ( !routine ) 20116d4: 80 a6 a0 00 cmp %i2, 0 20116d8: 02 80 00 1b be 2011744 20116dc: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 20116e0: 80 a6 60 00 cmp %i1, 0 20116e4: 02 80 00 18 be 2011744 20116e8: b0 10 20 0a mov 0xa, %i0 20116ec: 11 00 80 c8 sethi %hi(0x2032000), %o0 20116f0: 92 10 00 11 mov %l1, %o1 20116f4: 90 12 21 4c or %o0, 0x14c, %o0 20116f8: 40 00 0a 2a call 2013fa0 <_Objects_Get> 20116fc: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 2011700: c2 07 bf f4 ld [ %fp + -12 ], %g1 2011704: a0 10 00 08 mov %o0, %l0 2011708: 80 a0 60 00 cmp %g1, 0 201170c: 12 80 00 0e bne 2011744 2011710: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 2011714: 40 00 12 bc call 2016204 <_Watchdog_Remove> 2011718: 90 02 20 10 add %o0, 0x10, %o0 _ISR_Disable( level ); 201171c: 7f ff e7 77 call 200b4f8 2011720: 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 ) { 2011724: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 2011728: 80 a0 60 00 cmp %g1, 0 201172c: 02 80 00 08 be 201174c 2011730: 82 10 20 01 mov 1, %g1 _ISR_Enable( level ); 2011734: 7f ff e7 75 call 200b508 <== NOT EXECUTED 2011738: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 201173c: 40 00 0c 87 call 2014958 <_Thread_Enable_dispatch> <== NOT EXECUTED 2011740: 01 00 00 00 nop <== NOT EXECUTED 2011744: 81 c7 e0 08 ret 2011748: 81 e8 00 00 restore Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 201174c: f4 24 20 2c st %i2, [ %l0 + 0x2c ] the_watchdog->id = id; 2011750: e2 24 20 30 st %l1, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 2011754: 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; 2011758: f2 24 20 1c st %i1, [ %l0 + 0x1c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 201175c: 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; 2011760: 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 ); 2011764: 7f ff e7 69 call 200b508 2011768: 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 ); 201176c: 03 00 80 c8 sethi %hi(0x2032000), %g1 2011770: c2 00 61 8c ld [ %g1 + 0x18c ], %g1 ! 203218c <_Timer_Server_schedule_operation> 2011774: 9f c0 40 00 call %g1 2011778: 90 10 00 10 mov %l0, %o0 _Thread_Enable_dispatch(); 201177c: 40 00 0c 77 call 2014958 <_Thread_Enable_dispatch> 2011780: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2011784: 81 c7 e0 08 ret 2011788: 81 e8 00 00 restore 02006270 : static int rtems_verror( uint32_t error_flag, const char *printf_format, va_list arglist ) { 2006270: 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) 2006274: 03 08 00 00 sethi %hi(0x20000000), %g1 <== NOT EXECUTED 2006278: a8 8e 00 01 andcc %i0, %g1, %l4 <== NOT EXECUTED 200627c: 02 80 00 11 be 20062c0 <== NOT EXECUTED 2006280: a6 10 00 18 mov %i0, %l3 <== NOT EXECUTED { if (rtems_panic_in_progress++) 2006284: 03 00 80 99 sethi %hi(0x2026400), %g1 <== NOT EXECUTED 2006288: c6 00 62 50 ld [ %g1 + 0x250 ], %g3 ! 2026650 <== NOT EXECUTED 200628c: 84 00 e0 01 add %g3, 1, %g2 <== NOT EXECUTED 2006290: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 2006294: 02 80 00 07 be 20062b0 <== NOT EXECUTED 2006298: c4 20 62 50 st %g2, [ %g1 + 0x250 ] <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 200629c: 05 00 80 9a sethi %hi(0x2026800), %g2 <== NOT EXECUTED 20062a0: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1 ! 2026840 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 20062a4: 82 00 60 01 inc %g1 <== NOT EXECUTED 20062a8: c2 20 a0 40 st %g1, [ %g2 + 0x40 ] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 20062ac: 03 00 80 99 sethi %hi(0x2026400), %g1 <== NOT EXECUTED 20062b0: c2 00 62 50 ld [ %g1 + 0x250 ], %g1 ! 2026650 <== NOT EXECUTED 20062b4: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 20062b8: 34 80 00 5b bg,a 2006424 <== NOT EXECUTED 20062bc: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 20062c0: 03 00 80 96 sethi %hi(0x2025800), %g1 <== NOT EXECUTED 20062c4: c2 00 60 08 ld [ %g1 + 8 ], %g1 ! 2025808 <_impure_ptr> <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 20062c8: 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 */ 20062cc: 40 00 3f 5a call 2016034 <== NOT EXECUTED 20062d0: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 20062d4: 03 1c 00 00 sethi %hi(0x70000000), %g1 <== NOT EXECUTED 20062d8: a0 2c c0 01 andn %l3, %g1, %l0 <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 20062dc: 03 10 00 00 sethi %hi(0x40000000), %g1 <== NOT EXECUTED 20062e0: 80 8c c0 01 btst %l3, %g1 <== NOT EXECUTED 20062e4: 02 80 00 05 be 20062f8 <== NOT EXECUTED 20062e8: 23 00 80 96 sethi %hi(0x2025800), %l1 <== NOT EXECUTED local_errno = errno; 20062ec: 40 00 3e 81 call 2015cf0 <__errno> <== NOT EXECUTED 20062f0: 01 00 00 00 nop <== NOT EXECUTED 20062f4: 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); 20062f8: c2 04 60 08 ld [ %l1 + 8 ], %g1 <== NOT EXECUTED 20062fc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2006300: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 2006304: 40 00 57 f5 call 201c2d8 <== NOT EXECUTED 2006308: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (status) 200630c: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 2006310: 02 80 00 0e be 2006348 <== NOT EXECUTED 2006314: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 2006318: c2 04 60 08 ld [ %l1 + 8 ], %g1 <== NOT EXECUTED const char * rtems_status_text( rtems_status_code status ) { return rtems_assoc_name_by_local(rtems_status_assoc, status); 200631c: 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)); 2006320: 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); 2006324: 11 00 80 87 sethi %hi(0x2021c00), %o0 <== NOT EXECUTED 2006328: 40 00 29 79 call 201090c <== NOT EXECUTED 200632c: 90 12 20 68 or %o0, 0x68, %o0 ! 2021c68 <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 2006330: 13 00 80 86 sethi %hi(0x2021800), %o1 <== NOT EXECUTED const char * rtems_status_text( rtems_status_code status ) { return rtems_assoc_name_by_local(rtems_status_assoc, status); 2006334: 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)); 2006338: 92 12 60 e8 or %o1, 0xe8, %o1 <== NOT EXECUTED 200633c: 40 00 40 a9 call 20165e0 <== NOT EXECUTED 2006340: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2006344: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED if (local_errno) 2006348: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 200634c: 02 80 00 1c be 20063bc <== NOT EXECUTED 2006350: 23 00 80 96 sethi %hi(0x2025800), %l1 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 2006354: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 2006358: 04 80 00 11 ble 200639c <== NOT EXECUTED 200635c: 03 00 80 96 sethi %hi(0x2025800), %g1 <== NOT EXECUTED 2006360: 40 00 4c 9c call 20195d0 <== NOT EXECUTED 2006364: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 2006368: c2 4a 00 00 ldsb [ %o0 ], %g1 <== NOT EXECUTED 200636c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2006370: 02 80 00 0b be 200639c <== NOT EXECUTED 2006374: 03 00 80 96 sethi %hi(0x2025800), %g1 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 2006378: c2 00 60 08 ld [ %g1 + 8 ], %g1 ! 2025808 <_impure_ptr> <== NOT EXECUTED 200637c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 2006380: 40 00 4c 94 call 20195d0 <== NOT EXECUTED 2006384: e0 00 60 0c ld [ %g1 + 0xc ], %l0 <== NOT EXECUTED 2006388: 13 00 80 86 sethi %hi(0x2021800), %o1 <== NOT EXECUTED 200638c: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 2006390: 92 12 60 f8 or %o1, 0xf8, %o1 <== NOT EXECUTED 2006394: 10 80 00 07 b 20063b0 <== NOT EXECUTED 2006398: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 200639c: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED 20063a0: 13 00 80 86 sethi %hi(0x2021800), %o1 <== NOT EXECUTED 20063a4: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 20063a8: 92 12 61 08 or %o1, 0x108, %o1 <== NOT EXECUTED 20063ac: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED 20063b0: 40 00 40 8c call 20165e0 <== NOT EXECUTED 20063b4: 23 00 80 96 sethi %hi(0x2025800), %l1 <== NOT EXECUTED 20063b8: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 20063bc: c2 04 60 08 ld [ %l1 + 8 ], %g1 <== NOT EXECUTED 20063c0: 13 00 80 88 sethi %hi(0x2022000), %o1 <== NOT EXECUTED 20063c4: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 20063c8: 40 00 40 86 call 20165e0 <== NOT EXECUTED 20063cc: 92 12 61 a0 or %o1, 0x1a0, %o1 <== NOT EXECUTED (void) fflush(stderr); 20063d0: c2 04 60 08 ld [ %l1 + 8 ], %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"); 20063d4: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED (void) fflush(stderr); 20063d8: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 20063dc: 40 00 3f 16 call 2016034 <== NOT EXECUTED 20063e0: b0 04 00 18 add %l0, %i0, %i0 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 20063e4: 03 0c 00 00 sethi %hi(0x30000000), %g1 <== NOT EXECUTED 20063e8: 80 8c c0 01 btst %l3, %g1 <== NOT EXECUTED 20063ec: 02 80 00 0e be 2006424 <== NOT EXECUTED 20063f0: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 20063f4: 02 80 00 07 be 2006410 <== NOT EXECUTED 20063f8: 90 10 20 00 clr %o0 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 20063fc: 13 00 80 86 sethi %hi(0x2021800), %o1 <== NOT EXECUTED 2006400: 40 00 00 18 call 2006460 <== NOT EXECUTED 2006404: 92 12 61 20 or %o1, 0x120, %o1 ! 2021920 <== NOT EXECUTED _exit(local_errno); 2006408: 40 00 01 fe call 2006c00 <_exit> <== NOT EXECUTED 200640c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); 2006410: 13 00 80 86 sethi %hi(0x2021800), %o1 <== NOT EXECUTED 2006414: 40 00 00 13 call 2006460 <== NOT EXECUTED 2006418: 92 12 61 38 or %o1, 0x138, %o1 ! 2021938 <== NOT EXECUTED abort(); 200641c: 40 00 3e 27 call 2015cb8 <== NOT EXECUTED 2006420: 01 00 00 00 nop <== NOT EXECUTED } } return chars_written; } 2006424: 81 c7 e0 08 ret <== NOT EXECUTED 2006428: 81 e8 00 00 restore <== NOT EXECUTED 0200628c : */ bool rtems_workspace_allocate( uintptr_t bytes, void **pointer ) { 200628c: 9d e3 bf 98 save %sp, -104, %sp void *ptr; /* * check the arguments */ if ( !pointer ) 2006290: 80 a6 60 00 cmp %i1, 0 2006294: 02 80 00 0d be 20062c8 2006298: 92 10 00 18 mov %i0, %o1 return false; if ( !bytes ) 200629c: 80 a6 20 00 cmp %i0, 0 20062a0: 02 80 00 0a be 20062c8 20062a4: 11 00 80 70 sethi %hi(0x201c000), %o0 return false; /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); 20062a8: 40 00 05 b0 call 2007968 <_Protected_heap_Allocate> 20062ac: 90 12 21 54 or %o0, 0x154, %o0 ! 201c154 <_Workspace_Area> if (!ptr) 20062b0: 80 a2 20 00 cmp %o0, 0 20062b4: 02 80 00 05 be 20062c8 20062b8: 01 00 00 00 nop return false; *pointer = ptr; 20062bc: d0 26 40 00 st %o0, [ %i1 ] 20062c0: 81 c7 e0 08 ret 20062c4: 91 e8 20 01 restore %g0, 1, %o0 return true; } 20062c8: 81 c7 e0 08 ret <== NOT EXECUTED 20062cc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 02006270 : * _Workspace_Allocate */ bool rtems_workspace_free( void *pointer ) { 2006270: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED return _Protected_heap_Free( &_Workspace_Area, pointer ); 2006274: 11 00 80 70 sethi %hi(0x201c000), %o0 <== NOT EXECUTED 2006278: 90 12 21 54 or %o0, 0x154, %o0 ! 201c154 <_Workspace_Area> <== NOT EXECUTED 200627c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2006280: 40 00 05 c6 call 2007998 <_Protected_heap_Free> <== NOT EXECUTED 2006284: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 2006288: 01 00 00 00 nop 020062d0 : bool rtems_workspace_get_information( Heap_Information_block *the_info ) { if ( !the_info ) 20062d0: 80 a2 20 00 cmp %o0, 0 20062d4: 12 80 00 04 bne 20062e4 20062d8: 92 10 00 08 mov %o0, %o1 return false; return _Protected_heap_Get_information( &_Workspace_Area, the_info ); } 20062dc: 81 c3 e0 08 retl <== NOT EXECUTED 20062e0: 01 00 00 00 nop <== NOT EXECUTED ) { if ( !the_info ) return false; return _Protected_heap_Get_information( &_Workspace_Area, the_info ); 20062e4: 11 00 80 70 sethi %hi(0x201c000), %o0 20062e8: 90 12 21 54 or %o0, 0x154, %o0 ! 201c154 <_Workspace_Area> 20062ec: 82 13 c0 00 mov %o7, %g1 20062f0: 40 00 05 b6 call 20079c8 <_Protected_heap_Get_information> 20062f4: 9e 10 40 00 mov %g1, %o7 20062f8: 01 00 00 00 nop 0201e7c8 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 201e7c8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED 201e7cc: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 <== NOT EXECUTED 201e7d0: 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); 201e7d4: 03 00 81 1e sethi %hi(0x2047800), %g1 <== NOT EXECUTED /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 201e7d8: a2 10 20 00 clr %l1 <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 201e7dc: aa 10 60 58 or %g1, 0x58, %l5 <== NOT EXECUTED /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 201e7e0: a4 10 20 00 clr %l2 <== NOT EXECUTED limit++; continue; } sign = 1; } if (!isdigit(c)) 201e7e4: 03 00 81 1e sethi %hi(0x2047800), %g1 <== NOT EXECUTED 201e7e8: a8 10 60 48 or %g1, 0x48, %l4 ! 2047848 <__ctype_ptr> <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 201e7ec: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 201e7f0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 201e7f4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201e7f8: 16 80 00 07 bge 201e814 <== NOT EXECUTED 201e7fc: c2 26 20 04 st %g1, [ %i0 + 4 ] <== NOT EXECUTED 201e800: d0 05 40 00 ld [ %l5 ], %o0 <== NOT EXECUTED 201e804: 40 00 50 2d call 20328b8 <__srget_r> <== NOT EXECUTED 201e808: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 201e80c: 10 80 00 06 b 201e824 <== NOT EXECUTED 201e810: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 201e814: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED 201e818: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 201e81c: e0 08 40 00 ldub [ %g1 ], %l0 <== NOT EXECUTED 201e820: c4 26 00 00 st %g2, [ %i0 ] <== NOT EXECUTED if (c == ':') 201e824: 80 a4 20 3a cmp %l0, 0x3a <== NOT EXECUTED 201e828: 02 80 00 21 be 201e8ac <== NOT EXECUTED 201e82c: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED break; if (sign == 0) { 201e830: 32 80 00 09 bne,a 201e854 <== NOT EXECUTED 201e834: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED if (c == '-') { 201e838: 80 a4 20 2d cmp %l0, 0x2d <== NOT EXECUTED 201e83c: 12 80 00 05 bne 201e850 <== NOT EXECUTED 201e840: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED sign = -1; limit++; 201e844: a6 04 e0 01 inc %l3 <== NOT EXECUTED 201e848: 10 bf ff e9 b 201e7ec <== NOT EXECUTED 201e84c: a4 10 3f ff mov -1, %l2 <== NOT EXECUTED continue; } sign = 1; } if (!isdigit(c)) 201e850: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED 201e854: c2 08 40 10 ldub [ %g1 + %l0 ], %g1 <== NOT EXECUTED 201e858: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 201e85c: 02 80 00 1c be 201e8cc <== NOT EXECUTED 201e860: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED return 0; d = c - '0'; if ((i > (limit / 10)) 201e864: 40 00 7e 4a call 203e18c <.udiv> <== NOT EXECUTED 201e868: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 201e86c: 80 a4 40 08 cmp %l1, %o0 <== NOT EXECUTED 201e870: 18 80 00 17 bgu 201e8cc <== NOT EXECUTED 201e874: 01 00 00 00 nop <== NOT EXECUTED 201e878: 12 80 00 08 bne 201e898 <== NOT EXECUTED 201e87c: a0 04 3f d0 add %l0, -48, %l0 <== NOT EXECUTED 201e880: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 201e884: 40 00 7e ee call 203e43c <.urem> <== NOT EXECUTED 201e888: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 201e88c: 80 a4 00 08 cmp %l0, %o0 <== NOT EXECUTED 201e890: 18 80 00 0f bgu 201e8cc <== NOT EXECUTED 201e894: 01 00 00 00 nop <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 201e898: 85 2c 60 03 sll %l1, 3, %g2 <== NOT EXECUTED 201e89c: 83 2c 60 01 sll %l1, 1, %g1 <== NOT EXECUTED 201e8a0: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 201e8a4: 10 bf ff d2 b 201e7ec <== NOT EXECUTED 201e8a8: a2 04 00 01 add %l0, %g1, %l1 <== NOT EXECUTED } if (sign == 0) 201e8ac: 02 80 00 08 be 201e8cc <== NOT EXECUTED 201e8b0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED return 0; *val = i * sign; 201e8b4: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 201e8b8: 40 00 7d fb call 203e0a4 <.umul> <== NOT EXECUTED 201e8bc: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 201e8c0: d0 26 40 00 st %o0, [ %i1 ] <== NOT EXECUTED 201e8c4: 81 c7 e0 08 ret <== NOT EXECUTED 201e8c8: 81 e8 00 00 restore <== NOT EXECUTED return 1; } 201e8cc: 81 c7 e0 08 ret <== NOT EXECUTED 201e8d0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 0201e8d4 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 201e8d4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int c; *name = *bufp; 201e8d8: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 201e8dc: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED for (;;) { c = getc(fp); 201e8e0: 03 00 81 1e sethi %hi(0x2047800), %g1 <== NOT EXECUTED 201e8e4: b2 10 60 58 or %g1, 0x58, %i1 ! 2047858 <_impure_ptr> <== NOT EXECUTED 201e8e8: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 201e8ec: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 201e8f0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201e8f4: 16 80 00 07 bge 201e910 <== NOT EXECUTED 201e8f8: c2 26 20 04 st %g1, [ %i0 + 4 ] <== NOT EXECUTED 201e8fc: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED 201e900: 40 00 4f ee call 20328b8 <__srget_r> <== NOT EXECUTED 201e904: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED if (c == ':') { 201e908: 10 80 00 07 b 201e924 <== NOT EXECUTED 201e90c: 80 a2 20 3a cmp %o0, 0x3a <== NOT EXECUTED { int c; *name = *bufp; for (;;) { c = getc(fp); 201e910: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED 201e914: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 201e918: d0 08 40 00 ldub [ %g1 ], %o0 <== NOT EXECUTED 201e91c: c4 26 00 00 st %g2, [ %i0 ] <== NOT EXECUTED if (c == ':') { 201e920: 80 a2 20 3a cmp %o0, 0x3a <== NOT EXECUTED 201e924: 12 80 00 07 bne 201e940 <== NOT EXECUTED 201e928: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED if (nlFlag) 201e92c: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 201e930: 22 80 00 1a be,a 201e998 <== NOT EXECUTED 201e934: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 201e938: 81 c7 e0 08 ret <== NOT EXECUTED 201e93c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (c == ':') { if (nlFlag) return 0; break; } if (c == '\n') { 201e940: 12 80 00 07 bne 201e95c <== NOT EXECUTED 201e944: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED if (!nlFlag) 201e948: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 201e94c: 32 80 00 13 bne,a 201e998 <== NOT EXECUTED 201e950: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 201e954: 81 c7 e0 08 ret <== NOT EXECUTED 201e958: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (c == '\n') { if (!nlFlag) return 0; break; } if (c == EOF) 201e95c: 22 80 00 17 be,a 201e9b8 <== NOT EXECUTED 201e960: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; if (*nleft < 2) 201e964: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED 201e968: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 201e96c: 28 80 00 13 bleu,a 201e9b8 <== NOT EXECUTED 201e970: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; **bufp = c; 201e974: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 201e978: d0 28 40 00 stb %o0, [ %g1 ] <== NOT EXECUTED ++(*bufp); 201e97c: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED --(*nleft); 201e980: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 201e984: 82 00 60 01 inc %g1 <== NOT EXECUTED --(*nleft); 201e988: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 201e98c: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED --(*nleft); 201e990: 10 bf ff d6 b 201e8e8 <== NOT EXECUTED 201e994: c4 26 c0 00 st %g2, [ %i3 ] <== NOT EXECUTED } **bufp = '\0'; 201e998: c0 28 40 00 clrb [ %g1 ] <== NOT EXECUTED ++(*bufp); 201e99c: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED --(*nleft); 201e9a0: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 201e9a4: 82 00 60 01 inc %g1 <== NOT EXECUTED --(*nleft); 201e9a8: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 201e9ac: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED --(*nleft); 201e9b0: c4 26 c0 00 st %g2, [ %i3 ] <== NOT EXECUTED 201e9b4: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return 1; } 201e9b8: 81 c7 e0 08 ret <== NOT EXECUTED 201e9bc: 81 e8 00 00 restore <== NOT EXECUTED 020052a0 : scandir( const char *dirname, struct dirent ***namelist, int (*select)(struct dirent *), int (*dcomp)(const struct dirent **, const struct dirent **)) { 20052a0: 9d e3 bf 48 save %sp, -184, %sp struct stat stb; long arraysz; DIR *dirp = NULL; int i; if ((dirp = opendir(dirname)) == NULL) 20052a4: 7f ff fd 9f call 2004920 20052a8: 90 10 00 18 mov %i0, %o0 20052ac: a8 92 20 00 orcc %o0, 0, %l4 20052b0: 02 80 00 6a be 2005458 20052b4: a0 07 bf a8 add %fp, -88, %l0 return(-1); if (fstat(dirp->dd_fd, &stb) < 0) 20052b8: d0 05 00 00 ld [ %l4 ], %o0 20052bc: 40 00 1d 61 call 200c840 20052c0: 92 10 00 10 mov %l0, %o1 20052c4: 80 a2 20 00 cmp %o0, 0 20052c8: 06 80 00 53 bl 2005414 20052cc: 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); 20052d0: 40 00 3b 24 call 2013f60 <.div> 20052d4: 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) 20052d8: 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); 20052dc: a6 10 00 08 mov %o0, %l3 names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *)); if (names == NULL) 20052e0: 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 *)); 20052e4: 91 2a 20 02 sll %o0, 2, %o0 20052e8: 7f ff fb 95 call 200413c 20052ec: ac 10 20 01 mov 1, %l6 if (names == NULL) 20052f0: 80 a2 20 00 cmp %o0, 0 20052f4: 12 80 00 34 bne 20053c4 20052f8: a2 10 00 08 mov %o0, %l1 20052fc: 10 80 00 48 b 200541c 2005300: b0 10 00 08 mov %o0, %i0 goto cleanup_and_bail; while ((d = readdir(dirp)) != NULL) { if (select != NULL && !(*select)(d)) 2005304: 22 80 00 08 be,a 2005324 2005308: d0 14 20 0a lduh [ %l0 + 0xa ], %o0 <== NOT EXECUTED 200530c: 9f c6 80 00 call %i2 2005310: 01 00 00 00 nop 2005314: 80 a2 20 00 cmp %o0, 0 2005318: 02 80 00 2b be 20053c4 200531c: 01 00 00 00 nop continue; /* just selected names */ /* * Make a minimum size copy of the data */ p = (struct dirent *)malloc(DIRSIZ(d)); 2005320: d0 14 20 0a lduh [ %l0 + 0xa ], %o0 2005324: 90 02 20 04 add %o0, 4, %o0 2005328: 90 0a 3f fc and %o0, -4, %o0 200532c: 7f ff fb 84 call 200413c 2005330: 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); 2005334: 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)); 2005338: a4 10 00 08 mov %o0, %l2 if (p == NULL) 200533c: 80 a4 a0 00 cmp %l2, 0 2005340: 02 80 00 37 be 200541c 2005344: 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; 2005348: 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; 200534c: c2 04 00 00 ld [ %l0 ], %g1 p->d_reclen = d->d_reclen; 2005350: 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); 2005354: 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; 2005358: c2 24 80 00 st %g1, [ %l2 ] p->d_reclen = d->d_reclen; 200535c: c4 34 a0 08 sth %g2, [ %l2 + 8 ] p->d_namlen = d->d_namlen; 2005360: c6 34 a0 0a sth %g3, [ %l2 + 0xa ] strncpy(p->d_name, d->d_name, p->d_namlen + 1); 2005364: 95 32 a0 10 srl %o2, 0x10, %o2 2005368: 40 00 33 2e call 2012020 200536c: 94 02 a0 01 inc %o2 /* * Check to make sure the array has space left and * realloc the maximum size. */ if (++nitems >= arraysz) { 2005370: b0 06 20 01 inc %i0 2005374: 80 a6 00 13 cmp %i0, %l3 2005378: 0a 80 00 11 bcs 20053bc 200537c: 82 26 00 16 sub %i0, %l6, %g1 if (fstat(dirp->dd_fd, &stb) < 0) 2005380: d0 05 00 00 ld [ %l4 ], %o0 <== NOT EXECUTED 2005384: 40 00 1d 2f call 200c840 <== NOT EXECUTED 2005388: 92 10 00 15 mov %l5, %o1 <== NOT EXECUTED 200538c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2005390: 06 80 00 23 bl 200541c <== NOT EXECUTED 2005394: 92 10 20 0c mov 0xc, %o1 <== NOT EXECUTED goto cleanup_and_bail; /* just might have grown */ arraysz = stb.st_size / 12; 2005398: 40 00 3a f2 call 2013f60 <.div> <== NOT EXECUTED 200539c: d0 07 bf c8 ld [ %fp + -56 ], %o0 <== NOT EXECUTED 20053a0: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED names = (struct dirent **)realloc((char *)names, 20053a4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 20053a8: 40 00 1d d5 call 200cafc <== NOT EXECUTED 20053ac: 93 2c e0 02 sll %l3, 2, %o1 <== NOT EXECUTED arraysz * sizeof(struct dirent *)); if (names == NULL) 20053b0: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 20053b4: 02 80 00 1a be 200541c <== NOT EXECUTED 20053b8: 82 26 00 16 sub %i0, %l6, %g1 <== NOT EXECUTED goto cleanup_and_bail; } names[nitems-1] = p; 20053bc: 83 28 60 02 sll %g1, 2, %g1 20053c0: 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) { 20053c4: 7f ff ff 1e call 200503c 20053c8: 90 10 00 14 mov %l4, %o0 20053cc: a0 92 20 00 orcc %o0, 0, %l0 20053d0: 12 bf ff cd bne 2005304 20053d4: 80 a6 a0 00 cmp %i2, 0 if (names == NULL) goto cleanup_and_bail; } names[nitems-1] = p; } closedir(dirp); 20053d8: 7f ff f8 3a call 20034c0 20053dc: 90 10 00 14 mov %l4, %o0 if (nitems && dcomp != NULL){ 20053e0: 80 a6 20 00 cmp %i0, 0 20053e4: 22 80 00 0a be,a 200540c 20053e8: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 20053ec: 80 a6 e0 00 cmp %i3, 0 20053f0: 02 80 00 06 be 2005408 20053f4: 96 10 00 1b mov %i3, %o3 qsort(names, nitems, sizeof(struct dirent *), 20053f8: 90 10 00 11 mov %l1, %o0 20053fc: 92 10 00 18 mov %i0, %o1 2005400: 40 00 30 00 call 2011400 2005404: 94 10 20 04 mov 4, %o2 (int (*)(const void *, const void *)) dcomp); } *namelist = names; 2005408: e2 26 40 00 st %l1, [ %i1 ] return(nitems); 200540c: 10 80 00 14 b 200545c 2005410: 92 10 00 18 mov %i0, %o1 2005414: a2 10 20 00 clr %l1 <== NOT EXECUTED 2005418: b0 10 20 00 clr %i0 <== NOT EXECUTED cleanup_and_bail: if ( dirp ) closedir( dirp ); 200541c: 7f ff f8 29 call 20034c0 2005420: 90 10 00 14 mov %l4, %o0 if ( names ) { 2005424: 80 a4 60 00 cmp %l1, 0 2005428: 02 80 00 0c be 2005458 200542c: b6 10 20 00 clr %i3 for (i=0; i < nitems; i++ ) free( names[i] ); 2005430: 10 80 00 05 b 2005444 <== NOT EXECUTED 2005434: 83 2e e0 02 sll %i3, 2, %g1 <== NOT EXECUTED 2005438: 7f ff f9 7c call 2003a28 <== NOT EXECUTED 200543c: b6 06 e0 01 inc %i3 <== NOT EXECUTED 2005440: 83 2e e0 02 sll %i3, 2, %g1 <== NOT EXECUTED if ( dirp ) closedir( dirp ); if ( names ) { for (i=0; i < nitems; i++ ) 2005444: 80 a6 c0 18 cmp %i3, %i0 <== NOT EXECUTED 2005448: 2a bf ff fc bcs,a 2005438 <== NOT EXECUTED 200544c: d0 04 40 01 ld [ %l1 + %g1 ], %o0 <== NOT EXECUTED free( names[i] ); free( names ); 2005450: 7f ff f9 76 call 2003a28 <== NOT EXECUTED 2005454: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2005458: 92 10 3f ff mov -1, %o1 } return(-1); } 200545c: 81 c7 e0 08 ret 2005460: 91 e8 00 09 restore %g0, %o1, %o0 0201e9c0 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 201e9c0: 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) 201e9c4: 98 10 20 00 clr %o4 <== NOT EXECUTED FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 201e9c8: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 201e9cc: 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) 201e9d0: b4 07 a0 50 add %fp, 0x50, %i2 <== NOT EXECUTED 201e9d4: b6 07 a0 4c add %fp, 0x4c, %i3 <== NOT EXECUTED 201e9d8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 201e9dc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 201e9e0: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 201e9e4: 7f ff ff bc call 201e8d4 <== NOT EXECUTED 201e9e8: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 201e9ec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201e9f0: 02 80 00 42 be 201eaf8 <== NOT EXECUTED 201e9f4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 201e9f8: 92 06 60 04 add %i1, 4, %o1 <== NOT EXECUTED 201e9fc: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 201ea00: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 201ea04: 7f ff ff b4 call 201e8d4 <== NOT EXECUTED 201ea08: 98 10 20 00 clr %o4 <== NOT EXECUTED 201ea0c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201ea10: 02 80 00 3a be 201eaf8 <== NOT EXECUTED 201ea14: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 201ea18: 7f ff ff 6c call 201e7c8 <== NOT EXECUTED 201ea1c: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED 201ea20: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201ea24: 02 80 00 35 be 201eaf8 <== NOT EXECUTED 201ea28: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 201ea2c: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 201ea30: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 201ea34: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED 201ea38: 7f ff ff a7 call 201e8d4 <== NOT EXECUTED 201ea3c: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED 201ea40: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201ea44: 02 80 00 2d be 201eaf8 <== NOT EXECUTED 201ea48: 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; 201ea4c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 201ea50: 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; 201ea54: c2 36 60 08 sth %g1, [ %i1 + 8 ] <== NOT EXECUTED /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 201ea58: 10 80 00 05 b 201ea6c <== NOT EXECUTED 201ea5c: 86 10 20 01 mov 1, %g3 <== NOT EXECUTED if(*cp == ',') memcount++; 201ea60: 82 18 60 2c xor %g1, 0x2c, %g1 <== NOT EXECUTED 201ea64: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 201ea68: 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++) { 201ea6c: c2 48 80 00 ldsb [ %g2 ], %g1 <== NOT EXECUTED 201ea70: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201ea74: 12 bf ff fb bne 201ea60 <== NOT EXECUTED 201ea78: 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)) 201ea7c: c4 07 a0 50 ld [ %fp + 0x50 ], %g2 <== NOT EXECUTED 201ea80: 83 28 e0 02 sll %g3, 2, %g1 <== NOT EXECUTED 201ea84: 82 00 60 13 add %g1, 0x13, %g1 <== NOT EXECUTED 201ea88: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 201ea8c: 0a 80 00 1b bcs 201eaf8 <== NOT EXECUTED 201ea90: 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; 201ea94: 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); 201ea98: 82 00 60 0f add %g1, 0xf, %g1 <== NOT EXECUTED 201ea9c: 82 08 7f f0 and %g1, -16, %g1 <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 201eaa0: 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); 201eaa4: c2 26 60 0c st %g1, [ %i1 + 0xc ] <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 201eaa8: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 201eaac: 10 80 00 0a b 201ead4 <== NOT EXECUTED 201eab0: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { 201eab4: 32 80 00 08 bne,a 201ead4 <== NOT EXECUTED 201eab8: 86 00 e0 01 inc %g3 <== NOT EXECUTED *cp = '\0'; 201eabc: c0 28 ff ff clrb [ %g3 + -1 ] <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 201eac0: c4 06 60 0c ld [ %i1 + 0xc ], %g2 <== NOT EXECUTED 201eac4: 83 29 20 02 sll %g4, 2, %g1 <== NOT EXECUTED 201eac8: 88 01 20 01 inc %g4 <== NOT EXECUTED 201eacc: c6 20 80 01 st %g3, [ %g2 + %g1 ] <== NOT EXECUTED 201ead0: 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++) { 201ead4: c2 48 ff ff ldsb [ %g3 + -1 ], %g1 <== NOT EXECUTED 201ead8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201eadc: 32 bf ff f6 bne,a 201eab4 <== NOT EXECUTED 201eae0: 80 a0 60 2c cmp %g1, 0x2c <== NOT EXECUTED if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 201eae4: c4 06 60 0c ld [ %i1 + 0xc ], %g2 <== NOT EXECUTED 201eae8: 83 29 20 02 sll %g4, 2, %g1 <== NOT EXECUTED 201eaec: c0 20 80 01 clr [ %g2 + %g1 ] <== NOT EXECUTED 201eaf0: 81 c7 e0 08 ret <== NOT EXECUTED 201eaf4: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED return 1; } 201eaf8: 81 c7 e0 08 ret <== NOT EXECUTED 201eafc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 0201eb48 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 201eb48: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 201eb4c: 98 10 20 00 clr %o4 <== NOT EXECUTED FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 201eb50: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 201eb54: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 201eb58: b4 07 a0 50 add %fp, 0x50, %i2 <== NOT EXECUTED 201eb5c: b6 07 a0 4c add %fp, 0x4c, %i3 <== NOT EXECUTED 201eb60: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 201eb64: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 201eb68: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 201eb6c: 7f ff ff 5a call 201e8d4 <== NOT EXECUTED 201eb70: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 201eb74: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201eb78: 02 80 00 39 be 201ec5c <== NOT EXECUTED 201eb7c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 201eb80: 92 06 60 04 add %i1, 4, %o1 <== NOT EXECUTED 201eb84: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 201eb88: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 201eb8c: 7f ff ff 52 call 201e8d4 <== NOT EXECUTED 201eb90: 98 10 20 00 clr %o4 <== NOT EXECUTED 201eb94: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201eb98: 02 80 00 31 be 201ec5c <== NOT EXECUTED 201eb9c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 201eba0: 7f ff ff 0a call 201e7c8 <== NOT EXECUTED 201eba4: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED 201eba8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201ebac: 02 80 00 2c be 201ec5c <== NOT EXECUTED 201ebb0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 201ebb4: 7f ff ff 05 call 201e7c8 <== NOT EXECUTED 201ebb8: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED 201ebbc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201ebc0: 02 80 00 27 be 201ec5c <== NOT EXECUTED 201ebc4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 201ebc8: 92 06 60 0c add %i1, 0xc, %o1 <== NOT EXECUTED 201ebcc: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 201ebd0: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 201ebd4: 7f ff ff 40 call 201e8d4 <== NOT EXECUTED 201ebd8: 98 10 20 00 clr %o4 <== NOT EXECUTED 201ebdc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201ebe0: 02 80 00 1f be 201ec5c <== NOT EXECUTED 201ebe4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 201ebe8: 92 06 60 10 add %i1, 0x10, %o1 <== NOT EXECUTED 201ebec: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 201ebf0: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 201ebf4: 7f ff ff 38 call 201e8d4 <== NOT EXECUTED 201ebf8: 98 10 20 00 clr %o4 <== NOT EXECUTED 201ebfc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201ec00: 02 80 00 17 be 201ec5c <== NOT EXECUTED 201ec04: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 201ec08: 92 06 60 14 add %i1, 0x14, %o1 <== NOT EXECUTED 201ec0c: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 201ec10: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 201ec14: 7f ff ff 30 call 201e8d4 <== NOT EXECUTED 201ec18: 98 10 20 00 clr %o4 <== NOT EXECUTED 201ec1c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201ec20: 02 80 00 0f be 201ec5c <== NOT EXECUTED 201ec24: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 201ec28: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 201ec2c: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 201ec30: 92 06 60 18 add %i1, 0x18, %o1 <== NOT EXECUTED 201ec34: 7f ff ff 28 call 201e8d4 <== NOT EXECUTED 201ec38: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED 201ec3c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201ec40: 02 80 00 07 be 201ec5c <== NOT EXECUTED 201ec44: 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; 201ec48: c2 36 60 08 sth %g1, [ %i1 + 8 ] <== NOT EXECUTED pwd->pw_gid = pwgid; 201ec4c: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 201ec50: c2 36 60 0a sth %g1, [ %i1 + 0xa ] <== NOT EXECUTED 201ec54: 81 c7 e0 08 ret <== NOT EXECUTED 201ec58: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED return 1; } 201ec5c: 81 c7 e0 08 ret <== NOT EXECUTED 201ec60: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 02007c04 : */ int sem_destroy( sem_t *sem ) { 2007c04: 9d e3 bf 90 save %sp, -112, %sp 2007c08: d2 06 00 00 ld [ %i0 ], %o1 2007c0c: 11 00 80 78 sethi %hi(0x201e000), %o0 2007c10: 94 07 bf f4 add %fp, -12, %o2 2007c14: 40 00 09 27 call 200a0b0 <_Objects_Get> 2007c18: 90 12 22 10 or %o0, 0x210, %o0 register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 2007c1c: c2 07 bf f4 ld [ %fp + -12 ], %g1 2007c20: 80 a0 60 00 cmp %g1, 0 2007c24: 12 80 00 14 bne 2007c74 2007c28: 01 00 00 00 nop case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { 2007c2c: c2 0a 20 14 ldub [ %o0 + 0x14 ], %g1 2007c30: 80 a0 60 00 cmp %g1, 0 2007c34: 02 80 00 0a be 2007c5c 2007c38: 01 00 00 00 nop _Thread_Enable_dispatch(); 2007c3c: 40 00 0b 5e call 200a9b4 <_Thread_Enable_dispatch> <== NOT EXECUTED 2007c40: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 2007c44: 40 00 23 a0 call 2010ac4 <__errno> <== NOT EXECUTED 2007c48: 01 00 00 00 nop <== NOT EXECUTED 2007c4c: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 2007c50: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2007c54: 81 c7 e0 08 ret <== NOT EXECUTED 2007c58: 81 e8 00 00 restore <== NOT EXECUTED } _POSIX_Semaphore_Delete( the_semaphore ); 2007c5c: 40 00 1b 3f call 200e958 <_POSIX_Semaphore_Delete> 2007c60: b0 10 20 00 clr %i0 _Thread_Enable_dispatch(); 2007c64: 40 00 0b 54 call 200a9b4 <_Thread_Enable_dispatch> 2007c68: 01 00 00 00 nop 2007c6c: 81 c7 e0 08 ret 2007c70: 81 e8 00 00 restore #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 2007c74: 40 00 23 94 call 2010ac4 <__errno> 2007c78: b0 10 3f ff mov -1, %i0 2007c7c: 82 10 20 16 mov 0x16, %g1 2007c80: c2 22 00 00 st %g1, [ %o0 ] } 2007c84: 81 c7 e0 08 ret 2007c88: 81 e8 00 00 restore 02007ce4 : int sem_init( sem_t *sem, int pshared, unsigned int value ) { 2007ce4: 9d e3 bf 90 save %sp, -112, %sp 2007ce8: 92 10 00 19 mov %i1, %o1 int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 2007cec: 80 a6 20 00 cmp %i0, 0 2007cf0: 12 80 00 08 bne 2007d10 2007cf4: 94 10 00 1a mov %i2, %o2 rtems_set_errno_and_return_minus_one( EINVAL ); 2007cf8: 40 00 23 73 call 2010ac4 <__errno> <== NOT EXECUTED 2007cfc: 01 00 00 00 nop <== NOT EXECUTED 2007d00: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 2007d04: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2007d08: 10 80 00 0a b 2007d30 <== NOT EXECUTED 2007d0c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED status = _POSIX_Semaphore_Create_support( 2007d10: 90 10 20 00 clr %o0 2007d14: 40 00 1a ca call 200e83c <_POSIX_Semaphore_Create_support> 2007d18: 96 07 bf f4 add %fp, -12, %o3 pshared, value, &the_semaphore ); if ( status != -1 ) 2007d1c: 80 a2 3f ff cmp %o0, -1 2007d20: 02 80 00 04 be 2007d30 2007d24: c2 07 bf f4 ld [ %fp + -12 ], %g1 *sem = the_semaphore->Object.id; 2007d28: c2 00 60 08 ld [ %g1 + 8 ], %g1 2007d2c: c2 26 00 00 st %g1, [ %i0 ] return status; } 2007d30: 81 c7 e0 08 ret 2007d34: 91 e8 00 08 restore %g0, %o0, %o0 02007eb0 : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 2007eb0: 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 ); 2007eb4: 92 07 bf f4 add %fp, -12, %o1 2007eb8: 40 00 18 1b call 200df24 <_POSIX_Absolute_timeout_to_ticks> 2007ebc: 90 10 00 19 mov %i1, %o0 switch ( status ) { 2007ec0: 80 a2 20 02 cmp %o0, 2 2007ec4: 18 80 00 03 bgu 2007ed0 2007ec8: 92 10 20 01 mov 1, %o1 2007ecc: 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 ); 2007ed0: d4 07 bf f4 ld [ %fp + -12 ], %o2 2007ed4: 90 10 00 18 mov %i0, %o0 2007ed8: 40 00 1a d3 call 200ea24 <_POSIX_Semaphore_Wait_support> 2007edc: 92 0a 60 01 and %o1, 1, %o1 break; } } return lock_status; } 2007ee0: 81 c7 e0 08 ret 2007ee4: 91 e8 00 08 restore %g0, %o0, %o0 02007fa8 : int sem_wait( sem_t *sem ) { return _POSIX_Semaphore_Wait_support( sem, TRUE, THREAD_QUEUE_WAIT_FOREVER ); 2007fa8: 92 10 20 01 mov 1, %o1 2007fac: 94 10 20 00 clr %o2 2007fb0: 82 13 c0 00 mov %o7, %g1 2007fb4: 40 00 1a 9c call 200ea24 <_POSIX_Semaphore_Wait_support> 2007fb8: 9e 10 40 00 mov %g1, %o7 2007fbc: 01 00 00 00 nop <== NOT EXECUTED 0201e764 : int setgid( gid_t gid ) { _POSIX_types_Gid = gid; 201e764: 03 00 81 1a sethi %hi(0x2046800), %g1 <== NOT EXECUTED 201e768: c2 00 61 0c ld [ %g1 + 0x10c ], %g1 ! 204690c <== NOT EXECUTED 201e76c: d0 30 60 2a sth %o0, [ %g1 + 0x2a ] <== NOT EXECUTED return 0; } 201e770: 81 c3 e0 08 retl <== NOT EXECUTED 201e774: 90 10 20 00 clr %o0 <== NOT EXECUTED 0201ed88 : return NULL; return &grent; } void setgrent(void) { 201ed88: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED init_etc_passwd_group(); 201ed8c: 7f ff ff c8 call 201ecac <== NOT EXECUTED 201ed90: 01 00 00 00 nop <== NOT EXECUTED if (group_fp != NULL) 201ed94: 03 00 81 69 sethi %hi(0x205a400), %g1 <== NOT EXECUTED 201ed98: d0 00 62 8c ld [ %g1 + 0x28c ], %o0 ! 205a68c <== NOT EXECUTED 201ed9c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201eda0: 22 80 00 05 be,a 201edb4 <== NOT EXECUTED 201eda4: 11 00 81 0b sethi %hi(0x2042c00), %o0 <== NOT EXECUTED fclose(group_fp); 201eda8: 40 00 3c c2 call 202e0b0 <== NOT EXECUTED 201edac: 01 00 00 00 nop <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 201edb0: 11 00 81 0b sethi %hi(0x2042c00), %o0 <== NOT EXECUTED 201edb4: 13 00 81 16 sethi %hi(0x2045800), %o1 <== NOT EXECUTED 201edb8: 90 12 23 20 or %o0, 0x320, %o0 <== NOT EXECUTED 201edbc: 40 00 3e d7 call 202e918 <== NOT EXECUTED 201edc0: 92 12 61 50 or %o1, 0x150, %o1 <== NOT EXECUTED 201edc4: 03 00 81 69 sethi %hi(0x205a400), %g1 <== NOT EXECUTED 201edc8: d0 20 62 8c st %o0, [ %g1 + 0x28c ] ! 205a68c <== NOT EXECUTED } 201edcc: 81 c7 e0 08 ret <== NOT EXECUTED 201edd0: 81 e8 00 00 restore <== NOT EXECUTED 0201ef80 : return NULL; return &pwent; } void setpwent(void) { 201ef80: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED init_etc_passwd_group(); 201ef84: 7f ff ff 4a call 201ecac <== NOT EXECUTED 201ef88: 01 00 00 00 nop <== NOT EXECUTED if (passwd_fp != NULL) 201ef8c: 03 00 81 69 sethi %hi(0x205a400), %g1 <== NOT EXECUTED 201ef90: d0 00 61 a4 ld [ %g1 + 0x1a4 ], %o0 ! 205a5a4 <== NOT EXECUTED 201ef94: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201ef98: 22 80 00 05 be,a 201efac <== NOT EXECUTED 201ef9c: 11 00 81 0b sethi %hi(0x2042c00), %o0 <== NOT EXECUTED fclose(passwd_fp); 201efa0: 40 00 3c 44 call 202e0b0 <== NOT EXECUTED 201efa4: 01 00 00 00 nop <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 201efa8: 11 00 81 0b sethi %hi(0x2042c00), %o0 <== NOT EXECUTED 201efac: 13 00 81 16 sethi %hi(0x2045800), %o1 <== NOT EXECUTED 201efb0: 90 12 22 a8 or %o0, 0x2a8, %o0 <== NOT EXECUTED 201efb4: 40 00 3e 59 call 202e918 <== NOT EXECUTED 201efb8: 92 12 61 50 or %o1, 0x150, %o1 <== NOT EXECUTED 201efbc: 03 00 81 69 sethi %hi(0x205a400), %g1 <== NOT EXECUTED 201efc0: d0 20 61 a4 st %o0, [ %g1 + 0x1a4 ] ! 205a5a4 <== NOT EXECUTED } 201efc4: 81 c7 e0 08 ret <== NOT EXECUTED 201efc8: 81 e8 00 00 restore <== NOT EXECUTED 020045f4 : int setuid( uid_t uid ) { _POSIX_types_Uid = uid; 20045f4: 03 00 81 1a sethi %hi(0x2046800), %g1 <== NOT EXECUTED 20045f8: c2 00 61 0c ld [ %g1 + 0x10c ], %g1 ! 204690c <== NOT EXECUTED 20045fc: d0 30 60 28 sth %o0, [ %g1 + 0x28 ] <== NOT EXECUTED return 0; } 2004600: 81 c3 e0 08 retl <== NOT EXECUTED 2004604: 90 10 20 00 clr %o0 <== NOT EXECUTED 02007fd0 : int sigwait( const sigset_t *set, int *sig ) { 2007fd0: 9d e3 bf 98 save %sp, -104, %sp int status; status = sigtimedwait( set, NULL, NULL ); 2007fd4: 92 10 20 00 clr %o1 2007fd8: 90 10 00 18 mov %i0, %o0 2007fdc: 7f ff ff 8d call 2007e10 2007fe0: 94 10 20 00 clr %o2 if ( status != -1 ) { 2007fe4: 80 a2 3f ff cmp %o0, -1 2007fe8: 02 80 00 07 be 2008004 2007fec: 80 a6 60 00 cmp %i1, 0 if ( sig ) 2007ff0: 02 80 00 03 be 2007ffc 2007ff4: b0 10 20 00 clr %i0 *sig = status; 2007ff8: d0 26 40 00 st %o0, [ %i1 ] 2007ffc: 81 c7 e0 08 ret 2008000: 81 e8 00 00 restore return 0; } return errno; 2008004: 40 00 21 fa call 20107ec <__errno> <== NOT EXECUTED 2008008: 01 00 00 00 nop <== NOT EXECUTED 200800c: f0 02 00 00 ld [ %o0 ], %i0 <== NOT EXECUTED } 2008010: 81 c7 e0 08 ret <== NOT EXECUTED 2008014: 81 e8 00 00 restore <== NOT EXECUTED 02003a6c : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 2003a6c: 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)) { 2003a70: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 2003a74: 80 88 6e 78 btst 0xe78, %g1 <== NOT EXECUTED 2003a78: 02 80 00 0e be 2003ab0 <== NOT EXECUTED 2003a7c: b0 0e 20 ff and %i0, 0xff, %i0 <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2003a80: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== NOT EXECUTED 2003a84: 94 10 20 00 clr %o2 <== NOT EXECUTED 2003a88: 40 00 06 71 call 200544c <== NOT EXECUTED 2003a8c: 92 10 20 00 clr %o1 <== NOT EXECUTED i = iproc (c, tty); 2003a90: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2003a94: 7f ff ff 80 call 2003894 <== NOT EXECUTED 2003a98: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2003a9c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 2003aa0: 40 00 06 b2 call 2005568 <== NOT EXECUTED 2003aa4: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 2003aa8: 81 c7 e0 08 ret <== NOT EXECUTED 2003aac: 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); 2003ab0: 7f ff ff 79 call 2003894 <== NOT EXECUTED 2003ab4: 81 e8 00 00 restore <== NOT EXECUTED 2003ab8: 01 00 00 00 nop 02005b50 : int _STAT_NAME( const char *path, struct stat *buf ) { 2005b50: 9d e3 bf 88 save %sp, -120, %sp /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 2005b54: 80 a6 60 00 cmp %i1, 0 2005b58: 12 80 00 06 bne 2005b70 2005b5c: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( EFAULT ); 2005b60: 40 00 a0 fc call 202df50 <__errno> 2005b64: b0 10 3f ff mov -1, %i0 2005b68: 10 80 00 1c b 2005bd8 2005b6c: 82 10 20 0e mov 0xe, %g1 status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); 2005b70: a0 07 bf e8 add %fp, -24, %l0 2005b74: 92 10 20 00 clr %o1 2005b78: 94 10 00 10 mov %l0, %o2 2005b7c: 96 10 20 01 mov 1, %o3 2005b80: 7f ff f9 fa call 2004368 2005b84: b0 10 3f ff mov -1, %i0 if ( status != 0 ) 2005b88: 80 a2 20 00 cmp %o0, 0 2005b8c: 12 80 00 14 bne 2005bdc 2005b90: c2 07 bf ec ld [ %fp + -20 ], %g1 return -1; if ( !loc.handlers->fstat_h ){ 2005b94: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 2005b98: 80 a0 60 00 cmp %g1, 0 2005b9c: 12 80 00 12 bne 2005be4 2005ba0: 92 10 20 00 clr %o1 rtems_filesystem_freenode( &loc ); 2005ba4: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 2005ba8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2005bac: 02 80 00 08 be 2005bcc <== NOT EXECUTED 2005bb0: 01 00 00 00 nop <== NOT EXECUTED 2005bb4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 2005bb8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2005bbc: 02 80 00 04 be 2005bcc <== NOT EXECUTED 2005bc0: 01 00 00 00 nop <== NOT EXECUTED 2005bc4: 9f c0 40 00 call %g1 <== NOT EXECUTED 2005bc8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 2005bcc: 40 00 a0 e1 call 202df50 <__errno> <== NOT EXECUTED 2005bd0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2005bd4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 2005bd8: c2 22 00 00 st %g1, [ %o0 ] 2005bdc: 81 c7 e0 08 ret 2005be0: 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) ); 2005be4: 94 10 20 50 mov 0x50, %o2 2005be8: 40 00 ab 4f call 2030924 2005bec: 90 10 00 19 mov %i1, %o0 status = (*loc.handlers->fstat_h)( &loc, buf ); 2005bf0: c2 07 bf ec ld [ %fp + -20 ], %g1 2005bf4: 92 10 00 19 mov %i1, %o1 2005bf8: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 2005bfc: 9f c0 40 00 call %g1 2005c00: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 2005c04: c2 07 bf f0 ld [ %fp + -16 ], %g1 2005c08: 80 a0 60 00 cmp %g1, 0 2005c0c: 02 bf ff f4 be 2005bdc 2005c10: b0 10 00 08 mov %o0, %i0 2005c14: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2005c18: 80 a0 60 00 cmp %g1, 0 2005c1c: 02 80 00 04 be 2005c2c 2005c20: 01 00 00 00 nop 2005c24: 9f c0 40 00 call %g1 2005c28: 90 10 00 10 mov %l0, %o0 return status; } 2005c2c: 81 c7 e0 08 ret 2005c30: 81 e8 00 00 restore 02020004 : int symlink( const char *actualpath, const char *sympath ) { 2020004: 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 ); 2020008: c2 4e 40 00 ldsb [ %i1 ], %g1 202000c: 80 a0 60 2f cmp %g1, 0x2f 2020010: 02 80 00 07 be 202002c 2020014: a0 10 00 18 mov %i0, %l0 2020018: 80 a0 60 5c cmp %g1, 0x5c 202001c: 02 80 00 04 be 202002c 2020020: 80 a0 60 00 cmp %g1, 0 2020024: 32 80 00 0a bne,a 202004c 2020028: 03 00 81 1a sethi %hi(0x2046800), %g1 202002c: 03 00 81 1a sethi %hi(0x2046800), %g1 2020030: d2 00 61 0c ld [ %g1 + 0x10c ], %o1 ! 204690c 2020034: 90 07 bf e4 add %fp, -28, %o0 2020038: 92 02 60 14 add %o1, 0x14, %o1 202003c: 40 00 41 b2 call 2030704 2020040: 94 10 20 10 mov 0x10, %o2 2020044: 10 80 00 08 b 2020064 2020048: 82 10 20 01 mov 1, %g1 202004c: d2 00 61 0c ld [ %g1 + 0x10c ], %o1 2020050: 90 07 bf e4 add %fp, -28, %o0 2020054: 92 02 60 04 add %o1, 4, %o1 2020058: 40 00 41 ab call 2030704 202005c: 94 10 20 10 mov 0x10, %o2 2020060: 82 10 20 00 clr %g1 result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 2020064: 90 06 40 01 add %i1, %g1, %o0 2020068: c2 07 bf ec ld [ %fp + -20 ], %g1 202006c: b2 07 bf e4 add %fp, -28, %i1 2020070: c2 00 60 04 ld [ %g1 + 4 ], %g1 2020074: 94 07 bf f4 add %fp, -12, %o2 2020078: 92 10 00 19 mov %i1, %o1 202007c: 9f c0 40 00 call %g1 2020080: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 2020084: 80 a2 20 00 cmp %o0, 0 2020088: 12 80 00 10 bne 20200c8 202008c: c2 07 bf ec ld [ %fp + -20 ], %g1 return -1; if ( !loc.ops->symlink_h ) { 2020090: c4 00 60 38 ld [ %g1 + 0x38 ], %g2 2020094: 80 a0 a0 00 cmp %g2, 0 2020098: 12 80 00 0e bne 20200d0 202009c: d4 07 bf f4 ld [ %fp + -12 ], %o2 rtems_filesystem_freenode( &loc ); 20200a0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 20200a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20200a8: 02 80 00 04 be 20200b8 <== NOT EXECUTED 20200ac: 01 00 00 00 nop <== NOT EXECUTED 20200b0: 9f c0 40 00 call %g1 <== NOT EXECUTED 20200b4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 20200b8: 40 00 37 a6 call 202df50 <__errno> <== NOT EXECUTED 20200bc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20200c0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 20200c4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20200c8: 81 c7 e0 08 ret 20200cc: 81 e8 00 00 restore } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 20200d0: 92 10 00 10 mov %l0, %o1 20200d4: 9f c0 80 00 call %g2 20200d8: 90 10 00 19 mov %i1, %o0 rtems_filesystem_freenode( &loc ); 20200dc: c2 07 bf ec ld [ %fp + -20 ], %g1 20200e0: 80 a0 60 00 cmp %g1, 0 20200e4: 02 bf ff f9 be 20200c8 20200e8: b0 10 00 08 mov %o0, %i0 20200ec: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 20200f0: 80 a0 60 00 cmp %g1, 0 20200f4: 02 80 00 04 be 2020104 20200f8: 01 00 00 00 nop 20200fc: 9f c0 40 00 call %g1 2020100: 90 10 00 19 mov %i1, %o0 return result; } 2020104: 81 c7 e0 08 ret 2020108: 81 e8 00 00 restore 02004d80 : */ long sysconf( int name ) { 2004d80: 9d e3 bf 98 save %sp, -104, %sp switch (name) { 2004d84: 80 a6 20 08 cmp %i0, 8 2004d88: 02 80 00 1f be 2004e04 2004d8c: 11 00 00 04 sethi %hi(0x1000), %o0 2004d90: 80 a6 20 08 cmp %i0, 8 2004d94: 14 80 00 09 bg 2004db8 2004d98: 80 a6 20 33 cmp %i0, 0x33 2004d9c: 80 a6 20 02 cmp %i0, 2 2004da0: 02 80 00 0d be 2004dd4 2004da4: 80 a6 20 04 cmp %i0, 4 2004da8: 12 80 00 12 bne 2004df0 2004dac: 03 00 80 50 sethi %hi(0x2014000), %g1 2004db0: 10 80 00 15 b 2004e04 2004db4: d0 00 63 f8 ld [ %g1 + 0x3f8 ], %o0 ! 20143f8 2004db8: 02 80 00 13 be 2004e04 2004dbc: 90 10 24 00 mov 0x400, %o0 2004dc0: 80 a6 22 03 cmp %i0, 0x203 2004dc4: 12 80 00 0b bne 2004df0 2004dc8: 90 10 20 00 clr %o0 default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 2004dcc: 81 c7 e0 08 ret <== NOT EXECUTED 2004dd0: 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); 2004dd4: 03 00 80 55 sethi %hi(0x2015400), %g1 2004dd8: d2 00 60 40 ld [ %g1 + 0x40 ], %o1 ! 2015440 <_TOD_Microseconds_per_tick> 2004ddc: 11 00 03 d0 sethi %hi(0xf4000), %o0 2004de0: 40 00 30 77 call 2010fbc <.udiv> 2004de4: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 2004de8: 81 c7 e0 08 ret 2004dec: 91 e8 00 08 restore %g0, %o0, %o0 default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 2004df0: 40 00 21 ad call 200d4a4 <__errno> 2004df4: 01 00 00 00 nop 2004df8: 82 10 20 16 mov 0x16, %g1 ! 16 2004dfc: c2 22 00 00 st %g1, [ %o0 ] 2004e00: 90 10 3f ff mov -1, %o0 } 2004e04: b0 10 00 08 mov %o0, %i0 2004e08: 81 c7 e0 08 ret 2004e0c: 81 e8 00 00 restore 02011434 : int tcgetattr( int fd, struct termios *tp ) { 2011434: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED return ioctl( fd, RTEMS_IO_GET_ATTRIBUTES, tp ); 2011438: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 201143c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2011440: 40 00 0f 08 call 2015060 <== NOT EXECUTED 2011444: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 2011448: 01 00 00 00 nop 0201144c : int tcsetattr( int fd, int opt, struct termios *tp ) { 201144c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED switch (opt) { 2011450: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 2011454: 02 80 00 10 be 2011494 <== NOT EXECUTED 2011458: 80 a6 60 01 cmp %i1, 1 <== NOT EXECUTED 201145c: 02 80 00 08 be 201147c <== NOT EXECUTED 2011460: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 2011464: 40 00 12 23 call 2015cf0 <__errno> <== NOT EXECUTED 2011468: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201146c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 2011470: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2011474: 81 c7 e0 08 ret <== NOT EXECUTED 2011478: 81 e8 00 00 restore <== NOT EXECUTED case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 201147c: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 2011480: 40 00 0e f8 call 2015060 <== NOT EXECUTED 2011484: 94 10 20 00 clr %o2 <== NOT EXECUTED 2011488: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201148c: 26 80 00 04 bl,a 201149c <== NOT EXECUTED 2011490: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 2011494: 40 00 0e f3 call 2015060 <== NOT EXECUTED 2011498: 93 e8 20 02 restore %g0, 2, %o1 <== NOT EXECUTED } } 201149c: 81 c7 e0 08 ret <== NOT EXECUTED 20114a0: 81 e8 00 00 restore <== NOT EXECUTED 02005590 : #include long telldir( DIR *dirp ) { 2005590: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_t *iop; if ( !dirp ) 2005594: 80 a6 20 00 cmp %i0, 0 2005598: 32 80 00 08 bne,a 20055b8 200559c: f0 06 00 00 ld [ %i0 ], %i0 rtems_set_errno_and_return_minus_one( EBADF ); 20055a0: 40 00 2b 2b call 201024c <__errno> <== NOT EXECUTED 20055a4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20055a8: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 20055ac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20055b0: 81 c7 e0 08 ret 20055b4: 81 e8 00 00 restore /* * Get the file control block structure associated with the * file descriptor */ iop = rtems_libio_iop( dirp->dd_fd ); 20055b8: 03 00 80 5c sethi %hi(0x2017000), %g1 20055bc: c2 00 62 e8 ld [ %g1 + 0x2e8 ], %g1 ! 20172e8 20055c0: 80 a6 00 01 cmp %i0, %g1 20055c4: 1a 80 00 0d bcc 20055f8 20055c8: 11 00 80 59 sethi %hi(0x2016400), %o0 20055cc: 03 00 80 60 sethi %hi(0x2018000), %g1 20055d0: c6 00 60 58 ld [ %g1 + 0x58 ], %g3 ! 2018058 20055d4: 85 2e 20 02 sll %i0, 2, %g2 20055d8: 83 2e 20 04 sll %i0, 4, %g1 20055dc: 82 20 40 02 sub %g1, %g2, %g1 20055e0: 82 00 40 18 add %g1, %i0, %g1 20055e4: 83 28 60 02 sll %g1, 2, %g1 if (iop == NULL) 20055e8: 86 80 c0 01 addcc %g3, %g1, %g3 20055ec: 32 bf ff f1 bne,a 20055b0 20055f0: f0 00 e0 08 ld [ %g3 + 8 ], %i0 assert(0); 20055f4: 11 00 80 59 sethi %hi(0x2016400), %o0 <== NOT EXECUTED 20055f8: 15 00 80 59 sethi %hi(0x2016400), %o2 <== NOT EXECUTED 20055fc: 17 00 80 59 sethi %hi(0x2016400), %o3 <== NOT EXECUTED 2005600: 90 12 20 f0 or %o0, 0xf0, %o0 <== NOT EXECUTED 2005604: 94 12 a1 48 or %o2, 0x148, %o2 <== NOT EXECUTED 2005608: 96 12 e1 40 or %o3, 0x140, %o3 <== NOT EXECUTED 200560c: 7f ff f7 3c call 20032fc <__assert_func> <== NOT EXECUTED 2005610: 92 10 20 2c mov 0x2c, %o1 <== NOT EXECUTED 2005614: 01 00 00 00 nop 020068a8 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 20068a8: 9d e3 bf 80 save %sp, -128, %sp Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 20068ac: 80 a6 a0 00 cmp %i2, 0 20068b0: 02 80 00 22 be 2006938 20068b4: 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 ) || 20068b8: c4 06 a0 0c ld [ %i2 + 0xc ], %g2 20068bc: 03 0e e6 b2 sethi %hi(0x3b9ac800), %g1 20068c0: 82 10 61 ff or %g1, 0x1ff, %g1 ! 3b9ac9ff 20068c4: 80 a0 80 01 cmp %g2, %g1 20068c8: 18 80 00 1c bgu 2006938 20068cc: 01 00 00 00 nop 20068d0: c4 06 a0 04 ld [ %i2 + 4 ], %g2 20068d4: 80 a0 80 01 cmp %g2, %g1 20068d8: 18 80 00 18 bgu 2006938 20068dc: 80 a0 a0 00 cmp %g2, 0 20068e0: 06 80 00 16 bl 2006938 20068e4: 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 ) { 20068e8: 80 a6 60 04 cmp %i1, 4 20068ec: 02 80 00 04 be 20068fc 20068f0: 80 a6 60 00 cmp %i1, 0 20068f4: 12 80 00 11 bne 2006938 20068f8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 20068fc: 90 07 bf e4 add %fp, -28, %o0 2006900: 92 10 00 1a mov %i2, %o1 2006904: 40 00 24 54 call 200fa54 2006908: 94 10 20 10 mov 0x10, %o2 /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 200690c: 80 a6 60 04 cmp %i1, 4 2006910: 12 80 00 14 bne 2006960 2006914: 92 10 00 18 mov %i0, %o1 /* Check for seconds in the past */ if ( _Timespec_Greater_than( &_TOD_Now, &normalize.it_value ) ) 2006918: b2 07 bf ec add %fp, -20, %i1 200691c: 21 00 80 70 sethi %hi(0x201c000), %l0 2006920: 92 10 00 19 mov %i1, %o1 2006924: 40 00 0e bd call 200a418 <_Timespec_Greater_than> 2006928: 90 14 22 04 or %l0, 0x204, %o0 200692c: 80 8a 20 ff btst 0xff, %o0 2006930: 02 80 00 08 be 2006950 2006934: 92 10 00 19 mov %i1, %o1 rtems_set_errno_and_return_minus_one( EINVAL ); 2006938: 40 00 22 2f call 200f1f4 <__errno> 200693c: b0 10 3f ff mov -1, %i0 2006940: 82 10 20 16 mov 0x16, %g1 2006944: c2 22 00 00 st %g1, [ %o0 ] 2006948: 81 c7 e0 08 ret 200694c: 81 e8 00 00 restore _Timespec_Subtract( &_TOD_Now, &normalize.it_value, &normalize.it_value ); 2006950: 90 14 22 04 or %l0, 0x204, %o0 2006954: 40 00 0e c2 call 200a45c <_Timespec_Subtract> 2006958: 94 10 00 19 mov %i1, %o2 200695c: 92 10 00 18 mov %i0, %o1 2006960: 11 00 80 71 sethi %hi(0x201c400), %o0 2006964: 94 07 bf f4 add %fp, -12, %o2 2006968: 40 00 08 9e call 2008be0 <_Objects_Get> 200696c: 90 12 20 c0 or %o0, 0xc0, %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 ) { 2006970: c2 07 bf f4 ld [ %fp + -12 ], %g1 2006974: 80 a0 60 00 cmp %g1, 0 2006978: 12 80 00 39 bne 2006a5c 200697c: 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 ) { 2006980: c2 07 bf ec ld [ %fp + -20 ], %g1 2006984: 80 a0 60 00 cmp %g1, 0 2006988: 12 80 00 14 bne 20069d8 200698c: c2 07 bf f0 ld [ %fp + -16 ], %g1 2006990: 80 a0 60 00 cmp %g1, 0 2006994: 12 80 00 11 bne 20069d8 2006998: 01 00 00 00 nop /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 200699c: 40 00 0f f3 call 200a968 <_Watchdog_Remove> 20069a0: 90 02 20 10 add %o0, 0x10, %o0 /* The old data of the timer are returned */ if ( ovalue ) 20069a4: 80 a6 e0 00 cmp %i3, 0 20069a8: 02 80 00 05 be 20069bc 20069ac: 90 10 00 1b mov %i3, %o0 *ovalue = ptimer->timer_data; 20069b0: 92 06 60 54 add %i1, 0x54, %o1 <== NOT EXECUTED 20069b4: 40 00 24 28 call 200fa54 <== NOT EXECUTED 20069b8: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED /* The new data are set */ ptimer->timer_data = normalize; 20069bc: 92 07 bf e4 add %fp, -28, %o1 20069c0: 94 10 20 10 mov 0x10, %o2 20069c4: 40 00 24 24 call 200fa54 20069c8: 90 06 60 54 add %i1, 0x54, %o0 /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 20069cc: 82 10 20 04 mov 4, %g1 20069d0: 10 80 00 1f b 2006a4c 20069d4: 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 ); 20069d8: 40 00 0e b5 call 200a4ac <_Timespec_To_ticks> 20069dc: 90 10 00 1a mov %i2, %o0 20069e0: d0 26 60 64 st %o0, [ %i1 + 0x64 ] initial_period = _Timespec_To_ticks( &normalize.it_value ); 20069e4: 40 00 0e b2 call 200a4ac <_Timespec_To_ticks> 20069e8: 90 07 bf ec add %fp, -20, %o0 activated = _POSIX_Timer_Insert_helper( 20069ec: 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 ); 20069f0: 92 10 00 08 mov %o0, %o1 activated = _POSIX_Timer_Insert_helper( 20069f4: 17 00 80 1a sethi %hi(0x2006800), %o3 20069f8: 90 06 60 10 add %i1, 0x10, %o0 20069fc: 96 12 e2 74 or %o3, 0x274, %o3 2006a00: 40 00 1a 8c call 200d430 <_POSIX_Timer_Insert_helper> 2006a04: 98 10 00 19 mov %i1, %o4 initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 2006a08: 80 8a 20 ff btst 0xff, %o0 2006a0c: 02 80 00 10 be 2006a4c 2006a10: 01 00 00 00 nop /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 2006a14: 80 a6 e0 00 cmp %i3, 0 2006a18: 02 80 00 05 be 2006a2c 2006a1c: 90 10 00 1b mov %i3, %o0 *ovalue = ptimer->timer_data; 2006a20: 92 06 60 54 add %i1, 0x54, %o1 2006a24: 40 00 24 0c call 200fa54 2006a28: 94 10 20 10 mov 0x10, %o2 ptimer->timer_data = normalize; 2006a2c: 92 07 bf e4 add %fp, -28, %o1 2006a30: 94 10 20 10 mov 0x10, %o2 2006a34: 40 00 24 08 call 200fa54 2006a38: 90 06 60 54 add %i1, 0x54, %o0 /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 2006a3c: 82 10 20 03 mov 3, %g1 _TOD_Get( &ptimer->time ); 2006a40: 90 06 60 6c add %i1, 0x6c, %o0 2006a44: 40 00 06 0a call 200826c <_TOD_Get> 2006a48: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] _Thread_Enable_dispatch(); 2006a4c: 40 00 0a a6 call 20094e4 <_Thread_Enable_dispatch> 2006a50: b0 10 20 00 clr %i0 2006a54: 81 c7 e0 08 ret 2006a58: 81 e8 00 00 restore #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 2006a5c: 40 00 21 e6 call 200f1f4 <__errno> <== NOT EXECUTED 2006a60: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2006a64: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2006a68: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } 2006a6c: 81 c7 e0 08 ret <== NOT EXECUTED 2006a70: 81 e8 00 00 restore <== NOT EXECUTED 020202a0 : */ char *ttyname( int fd ) { 20202a0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if ( !ttyname_r( fd, ttyname_buf, sizeof(ttyname_buf) ) ) 20202a4: 21 00 81 1a sethi %hi(0x2046800), %l0 <== NOT EXECUTED 20202a8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 20202ac: 94 10 24 06 mov 0x406, %o2 <== NOT EXECUTED 20202b0: 92 14 21 10 or %l0, 0x110, %o1 <== NOT EXECUTED 20202b4: 7f ff ff b8 call 2020194 <== NOT EXECUTED 20202b8: b0 14 21 10 or %l0, 0x110, %i0 <== NOT EXECUTED 20202bc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20202c0: 32 80 00 02 bne,a 20202c8 <== NOT EXECUTED 20202c4: b0 10 20 00 clr %i0 <== NOT EXECUTED return ttyname_buf; return NULL; } 20202c8: 81 c7 e0 08 ret <== NOT EXECUTED 20202cc: 81 e8 00 00 restore <== NOT EXECUTED 02020194 : int ttyname_r( int fd, char *name, size_t namesize ) { 2020194: 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) 2020198: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 202019c: 7f ff ff e2 call 2020124 <== NOT EXECUTED 20201a0: 92 07 bf d4 add %fp, -44, %o1 <== NOT EXECUTED 20201a4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20201a8: 06 80 00 16 bl 2020200 <== NOT EXECUTED 20201ac: 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)) 20201b0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 20201b4: 7f ff f7 be call 201e0ac <== NOT EXECUTED 20201b8: 92 07 bf 80 add %fp, -128, %o1 <== NOT EXECUTED 20201bc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20201c0: 12 80 00 10 bne 2020200 <== NOT EXECUTED 20201c4: c2 17 bf 8c lduh [ %fp + -116 ], %g1 <== NOT EXECUTED 20201c8: 05 00 00 3c sethi %hi(0xf000), %g2 <== NOT EXECUTED 20201cc: 82 08 40 02 and %g1, %g2, %g1 <== NOT EXECUTED 20201d0: 05 00 00 08 sethi %hi(0x2000), %g2 <== NOT EXECUTED 20201d4: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 20201d8: 12 80 00 0a bne 2020200 <== NOT EXECUTED 20201dc: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); if ((dp = opendir (_PATH_DEV)) == NULL) 20201e0: 11 00 81 0c sethi %hi(0x2043000), %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); 20201e4: 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) 20201e8: 90 12 20 10 or %o0, 0x10, %o0 <== NOT EXECUTED 20201ec: 7f ff fd b1 call 201f8b0 <== NOT EXECUTED 20201f0: a2 07 bf 30 add %fp, -208, %l1 <== NOT EXECUTED 20201f4: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 20201f8: 12 80 00 20 bne 2020278 <== NOT EXECUTED 20201fc: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); 2020200: 40 00 37 54 call 202df50 <__errno> <== NOT EXECUTED 2020204: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 2020208: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 202020c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2020210: 81 c7 e0 08 ret <== NOT EXECUTED 2020214: 81 e8 00 00 restore <== NOT EXECUTED for (rval = NULL; (dirp = readdir (dp)) != NULL ;) { if (dirp->d_ino != sb.st_ino) 2020218: c2 07 bf 88 ld [ %fp + -120 ], %g1 <== NOT EXECUTED 202021c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2020220: 12 80 00 16 bne 2020278 <== NOT EXECUTED 2020224: 92 02 20 0c add %o0, 0xc, %o1 <== NOT EXECUTED continue; strcpy (name + sizeof (_PATH_DEV) - 1, dirp->d_name); 2020228: 40 00 4b fe call 2033220 <== NOT EXECUTED 202022c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if (stat (name, &dsb) || sb.st_dev != dsb.st_dev || 2020230: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2020234: 7f ff 96 47 call 2005b50 <== NOT EXECUTED 2020238: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 202023c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2020240: 12 80 00 0e bne 2020278 <== NOT EXECUTED 2020244: c4 07 bf 30 ld [ %fp + -208 ], %g2 <== NOT EXECUTED 2020248: c2 07 bf 80 ld [ %fp + -128 ], %g1 <== NOT EXECUTED 202024c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 2020250: 12 80 00 0a bne 2020278 <== NOT EXECUTED 2020254: c4 07 bf 34 ld [ %fp + -204 ], %g2 <== NOT EXECUTED 2020258: c2 07 bf 84 ld [ %fp + -124 ], %g1 <== NOT EXECUTED 202025c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 2020260: 12 80 00 06 bne 2020278 <== NOT EXECUTED 2020264: c4 07 bf 38 ld [ %fp + -200 ], %g2 <== NOT EXECUTED 2020268: c2 07 bf 88 ld [ %fp + -120 ], %g1 <== NOT EXECUTED 202026c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 2020270: 02 80 00 08 be 2020290 <== NOT EXECUTED 2020274: 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 ;) 2020278: 7f ff fe 46 call 201fb90 <== NOT EXECUTED 202027c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2020280: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2020284: 32 bf ff e5 bne,a 2020218 <== NOT EXECUTED 2020288: c4 02 00 00 ld [ %o0 ], %g2 <== NOT EXECUTED sb.st_ino != dsb.st_ino) continue; rval = name; break; } (void) closedir (dp); 202028c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2020290: 40 00 2c ca call 202b5b8 <== NOT EXECUTED 2020294: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 2020298: 81 c7 e0 08 ret <== NOT EXECUTED 202029c: 81 e8 00 00 restore <== NOT EXECUTED 020202e8 : #include int unlink( const char *path ) { 20202e8: 9d e3 bf 88 save %sp, -120, %sp /* * Get the node to be unlinked. */ result = rtems_filesystem_evaluate_path( path, 0, &loc, false ); 20202ec: 92 10 20 00 clr %o1 20202f0: 90 10 00 18 mov %i0, %o0 20202f4: a0 07 bf e8 add %fp, -24, %l0 20202f8: 96 10 20 00 clr %o3 20202fc: 7f ff 90 1b call 2004368 2020300: 94 10 00 10 mov %l0, %o2 if ( result != 0 ) 2020304: 80 a2 20 00 cmp %o0, 0 2020308: 32 80 00 17 bne,a 2020364 202030c: b0 10 3f ff mov -1, %i0 return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); 2020310: 90 10 20 02 mov 2, %o0 2020314: 7f ff 8f e8 call 20042b4 2020318: 92 10 00 10 mov %l0, %o1 if (result != 0 && errno != ENOTSUP) { 202031c: 80 a2 20 00 cmp %o0, 0 2020320: 02 80 00 13 be 202036c 2020324: c2 07 bf f0 ld [ %fp + -16 ], %g1 2020328: 40 00 37 0a call 202df50 <__errno> <== NOT EXECUTED 202032c: 01 00 00 00 nop <== NOT EXECUTED 2020330: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 2020334: 80 a0 60 86 cmp %g1, 0x86 <== NOT EXECUTED 2020338: 02 80 00 0d be 202036c <== NOT EXECUTED 202033c: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 2020340: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2020344: 02 80 00 08 be 2020364 <== NOT EXECUTED 2020348: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202034c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 2020350: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2020354: 02 80 00 04 be 2020364 <== NOT EXECUTED 2020358: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 202035c: 9f c0 40 00 call %g1 <== NOT EXECUTED 2020360: 01 00 00 00 nop <== NOT EXECUTED 2020364: 81 c7 e0 08 ret 2020368: 81 e8 00 00 restore return -1; } if ( !loc.ops->node_type_h ) { 202036c: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 2020370: 80 a0 a0 00 cmp %g2, 0 2020374: 12 80 00 07 bne 2020390 2020378: a0 07 bf e8 add %fp, -24, %l0 rtems_filesystem_freenode( &loc ); 202037c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 2020380: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2020384: 12 80 00 1d bne 20203f8 <== NOT EXECUTED 2020388: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED 202038c: 30 80 00 1d b,a 2020400 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { 2020390: 9f c0 80 00 call %g2 2020394: 90 10 00 10 mov %l0, %o0 2020398: 80 a2 20 01 cmp %o0, 1 202039c: 12 80 00 0f bne 20203d8 20203a0: c2 07 bf f0 ld [ %fp + -16 ], %g1 rtems_filesystem_freenode( &loc ); 20203a4: 80 a0 60 00 cmp %g1, 0 20203a8: 02 80 00 08 be 20203c8 20203ac: 01 00 00 00 nop 20203b0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 20203b4: 80 a0 60 00 cmp %g1, 0 20203b8: 02 80 00 04 be 20203c8 20203bc: 01 00 00 00 nop 20203c0: 9f c0 40 00 call %g1 20203c4: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EISDIR ); 20203c8: 40 00 36 e2 call 202df50 <__errno> 20203cc: b0 10 3f ff mov -1, %i0 20203d0: 10 80 00 0f b 202040c 20203d4: 82 10 20 15 mov 0x15, %g1 } if ( !loc.ops->unlink_h ) { 20203d8: c4 00 60 0c ld [ %g1 + 0xc ], %g2 20203dc: 80 a0 a0 00 cmp %g2, 0 20203e0: 12 80 00 0e bne 2020418 20203e4: 01 00 00 00 nop rtems_filesystem_freenode( &loc ); 20203e8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 20203ec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20203f0: 02 80 00 04 be 2020400 <== NOT EXECUTED 20203f4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 20203f8: 9f c0 40 00 call %g1 <== NOT EXECUTED 20203fc: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 2020400: 40 00 36 d4 call 202df50 <__errno> <== NOT EXECUTED 2020404: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 2020408: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 202040c: c2 22 00 00 st %g1, [ %o0 ] 2020410: 81 c7 e0 08 ret 2020414: 81 e8 00 00 restore } result = (*loc.ops->unlink_h)( &loc ); 2020418: 9f c0 80 00 call %g2 202041c: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 2020420: c2 07 bf f0 ld [ %fp + -16 ], %g1 2020424: 80 a0 60 00 cmp %g1, 0 2020428: 02 bf ff cf be 2020364 202042c: b0 10 00 08 mov %o0, %i0 2020430: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2020434: 80 a0 60 00 cmp %g1, 0 2020438: 02 80 00 06 be 2020450 202043c: 01 00 00 00 nop 2020440: 9f c0 40 00 call %g1 2020444: 90 10 00 10 mov %l0, %o0 2020448: 81 c7 e0 08 ret 202044c: 81 e8 00 00 restore return result; } 2020450: 81 c7 e0 08 ret <== NOT EXECUTED 2020454: 81 e8 00 00 restore <== NOT EXECUTED 020204c4 : */ int unmount( const char *path ) { 20204c4: 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 ) ) 20204c8: 92 10 20 00 clr %o1 20204cc: 90 10 00 18 mov %i0, %o0 20204d0: a0 07 bf e8 add %fp, -24, %l0 20204d4: 96 10 20 01 mov 1, %o3 20204d8: 7f ff 8f a4 call 2004368 20204dc: 94 10 00 10 mov %l0, %o2 20204e0: 80 a2 20 00 cmp %o0, 0 20204e4: 12 80 00 6a bne 202068c 20204e8: c2 07 bf e8 ld [ %fp + -24 ], %g1 return -1; mt_entry = loc.mt_entry; 20204ec: 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) ){ 20204f0: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 20204f4: 80 a0 80 01 cmp %g2, %g1 20204f8: 02 80 00 0f be 2020534 20204fc: c6 07 bf f0 ld [ %fp + -16 ], %g3 rtems_filesystem_freenode( &loc ); 2020500: 80 a0 e0 00 cmp %g3, 0 2020504: 02 80 00 08 be 2020524 2020508: 01 00 00 00 nop 202050c: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 2020510: 80 a0 60 00 cmp %g1, 0 2020514: 02 80 00 04 be 2020524 2020518: 01 00 00 00 nop 202051c: 9f c0 40 00 call %g1 2020520: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EACCES ); 2020524: 40 00 36 8b call 202df50 <__errno> 2020528: 01 00 00 00 nop 202052c: 10 80 00 21 b 20205b0 2020530: 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 ); 2020534: 80 a0 e0 00 cmp %g3, 0 2020538: 22 80 00 09 be,a 202055c 202053c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 2020540: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 2020544: 80 a0 60 00 cmp %g1, 0 2020548: 22 80 00 05 be,a 202055c 202054c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 2020550: 9f c0 40 00 call %g1 2020554: 90 10 00 10 mov %l0, %o0 /* * Verify Unmount is supported by both filesystems. */ if ( !fs_mount_loc->ops->unmount_h ) 2020558: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 202055c: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 2020560: 80 a0 60 00 cmp %g1, 0 2020564: 02 80 00 07 be 2020580 2020568: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) 202056c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 2020570: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 2020574: 80 a0 60 00 cmp %g1, 0 2020578: 32 80 00 06 bne,a 2020590 202057c: 03 00 81 1a sethi %hi(0x2046800), %g1 rtems_set_errno_and_return_minus_one( ENOTSUP ); 2020580: 40 00 36 74 call 202df50 <__errno> <== NOT EXECUTED 2020584: 01 00 00 00 nop <== NOT EXECUTED 2020588: 10 80 00 0a b 20205b0 <== NOT EXECUTED 202058c: 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 ) 2020590: c2 00 61 0c ld [ %g1 + 0x10c ], %g1 2020594: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 2020598: 80 a0 40 18 cmp %g1, %i0 202059c: 12 80 00 08 bne 20205bc 20205a0: 03 00 81 6c sethi %hi(0x205b000), %g1 rtems_set_errno_and_return_minus_one( EBUSY ); 20205a4: 40 00 36 6b call 202df50 <__errno> 20205a8: 01 00 00 00 nop 20205ac: 82 10 20 10 mov 0x10, %g1 ! 10 20205b0: c2 22 00 00 st %g1, [ %o0 ] 20205b4: 81 c7 e0 08 ret 20205b8: 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; 20205bc: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 20205c0: 82 10 60 10 or %g1, 0x10, %g1 !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 20205c4: 10 80 00 07 b 20205e0 20205c8: 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 ) { 20205cc: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 20205d0: 80 a0 80 01 cmp %g2, %g1 20205d4: 02 bf ff f4 be 20205a4 20205d8: 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 ) { 20205dc: 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 ); 20205e0: 80 a0 c0 04 cmp %g3, %g4 20205e4: 32 bf ff fa bne,a 20205cc 20205e8: c4 00 e0 14 ld [ %g3 + 0x14 ], %g2 20205ec: 30 80 00 2a b,a 2020694 * 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 ) 20205f0: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 20205f4: 9f c0 40 00 call %g1 20205f8: 90 10 00 18 mov %i0, %o0 20205fc: 80 a2 20 00 cmp %o0, 0 2020600: 12 80 00 23 bne 202068c 2020604: 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){ 2020608: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 202060c: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 2020610: 9f c0 40 00 call %g1 2020614: 90 10 00 18 mov %i0, %o0 2020618: 80 a2 20 00 cmp %o0, 0 202061c: 02 80 00 0b be 2020648 2020620: 01 00 00 00 nop if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 2020624: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 2020628: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 <== NOT EXECUTED 202062c: 9f c0 40 00 call %g1 <== NOT EXECUTED 2020630: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2020634: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2020638: 02 80 00 15 be 202068c <== NOT EXECUTED 202063c: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 2020640: 7f ff a1 34 call 2008b10 <== NOT EXECUTED 2020644: 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 ); 2020648: 40 00 05 68 call 2021be8 <_Chain_Extract> 202064c: 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 ); 2020650: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 2020654: 80 a0 60 00 cmp %g1, 0 2020658: 02 80 00 09 be 202067c 202065c: 90 10 00 18 mov %i0, %o0 2020660: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2020664: 80 a0 60 00 cmp %g1, 0 2020668: 02 80 00 05 be 202067c 202066c: 01 00 00 00 nop 2020670: 9f c0 40 00 call %g1 2020674: 90 06 20 08 add %i0, 8, %o0 free( mt_entry ); 2020678: 90 10 00 18 mov %i0, %o0 202067c: 7f ff 8f 8d call 20044b0 2020680: b0 10 20 00 clr %i0 2020684: 81 c7 e0 08 ret 2020688: 81 e8 00 00 restore return 0; } 202068c: 81 c7 e0 08 ret 2020690: 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 ) 2020694: 7f ff 90 42 call 200479c 2020698: 90 10 00 18 mov %i0, %o0 202069c: 80 a2 20 01 cmp %o0, 1 20206a0: 32 bf ff d4 bne,a 20205f0 20206a4: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 20206a8: 30 bf ff bf b,a 20205a4 020206ac : int utime( const char *path, const struct utimbuf *times ) { 20206ac: 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 ) ) 20206b0: 92 10 20 00 clr %o1 20206b4: 90 10 00 18 mov %i0, %o0 20206b8: a0 07 bf e8 add %fp, -24, %l0 20206bc: 96 10 20 01 mov 1, %o3 20206c0: 94 10 00 10 mov %l0, %o2 20206c4: 7f ff 8f 29 call 2004368 20206c8: b0 10 3f ff mov -1, %i0 20206cc: 80 a2 20 00 cmp %o0, 0 20206d0: 12 80 00 10 bne 2020710 20206d4: c2 07 bf f0 ld [ %fp + -16 ], %g1 return -1; if ( !temp_loc.ops->utime_h ){ 20206d8: c4 00 60 30 ld [ %g1 + 0x30 ], %g2 20206dc: 80 a0 a0 00 cmp %g2, 0 20206e0: 32 80 00 0e bne,a 2020718 20206e4: d4 06 60 04 ld [ %i1 + 4 ], %o2 rtems_filesystem_freenode( &temp_loc ); 20206e8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 20206ec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20206f0: 02 80 00 04 be 2020700 <== NOT EXECUTED 20206f4: 01 00 00 00 nop <== NOT EXECUTED 20206f8: 9f c0 40 00 call %g1 <== NOT EXECUTED 20206fc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 2020700: 40 00 36 14 call 202df50 <__errno> <== NOT EXECUTED 2020704: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2020708: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 202070c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2020710: 81 c7 e0 08 ret 2020714: 81 e8 00 00 restore } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 2020718: d2 06 40 00 ld [ %i1 ], %o1 202071c: 9f c0 80 00 call %g2 2020720: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &temp_loc ); 2020724: c2 07 bf f0 ld [ %fp + -16 ], %g1 2020728: 80 a0 60 00 cmp %g1, 0 202072c: 02 bf ff f9 be 2020710 2020730: b0 10 00 08 mov %o0, %i0 2020734: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2020738: 80 a0 60 00 cmp %g1, 0 202073c: 02 80 00 04 be 202074c 2020740: 01 00 00 00 nop 2020744: 9f c0 40 00 call %g1 2020748: 90 10 00 10 mov %l0, %o0 return result; } 202074c: 81 c7 e0 08 ret 2020750: 81 e8 00 00 restore 0200299c : */ void vprintk( const char *fmt, va_list ap ) { 200299c: 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); 20029a0: 03 00 80 5a sethi %hi(0x2016800), %g1 if (maxwidth) maxwidth--; } count = 0; while ((n = num / base) > 0) { toPrint[count++] = (num - (n*base)); 20029a4: 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); 20029a8: ac 10 61 1c or %g1, 0x11c, %l6 count = 0; while ((n = num / base) > 0) { toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; 20029ac: 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)])]); 20029b0: 03 00 80 56 sethi %hi(0x2015800), %g1 20029b4: 10 80 00 c8 b 2002cd4 20029b8: b6 10 61 70 or %g1, 0x170, %i3 ! 2015970 base = 0; sign = 0; width = 0; minus = 0; lead = ' '; if (*fmt == '%') { 20029bc: 32 80 00 c4 bne,a 2002ccc 20029c0: c2 05 80 00 ld [ %l6 ], %g1 fmt++; 20029c4: b0 06 20 01 inc %i0 if (*fmt == '0' ) { 20029c8: c2 4e 00 00 ldsb [ %i0 ], %g1 20029cc: 80 a0 60 30 cmp %g1, 0x30 20029d0: 12 80 00 05 bne 20029e4 20029d4: ae 10 20 20 mov 0x20, %l7 lead = '0'; fmt++; 20029d8: b0 06 20 01 inc %i0 20029dc: ae 10 20 30 mov 0x30, %l7 } if (*fmt == '-' ) { 20029e0: c2 4e 00 00 ldsb [ %i0 ], %g1 20029e4: 80 a0 60 2d cmp %g1, 0x2d 20029e8: 12 80 00 04 bne 20029f8 20029ec: a6 10 20 00 clr %l3 minus = 1; fmt++; 20029f0: b0 06 20 01 inc %i0 20029f4: a6 10 20 01 mov 1, %l3 20029f8: 10 80 00 08 b 2002a18 20029fc: a8 10 20 00 clr %l4 } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; width += (*fmt - '0'); 2002a00: 85 38 60 18 sra %g1, 0x18, %g2 fmt++; 2002a04: b0 06 20 01 inc %i0 if (*fmt == '-' ) { minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; 2002a08: 83 2d 20 01 sll %l4, 1, %g1 width += (*fmt - '0'); 2002a0c: 84 00 bf d0 add %g2, -48, %g2 if (*fmt == '-' ) { minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; 2002a10: 82 00 40 03 add %g1, %g3, %g1 width += (*fmt - '0'); 2002a14: a8 00 80 01 add %g2, %g1, %l4 } if (*fmt == '-' ) { minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 2002a18: d0 0e 00 00 ldub [ %i0 ], %o0 width *= 10; 2002a1c: 87 2d 20 03 sll %l4, 3, %g3 } if (*fmt == '-' ) { minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 2002a20: 82 02 3f d0 add %o0, -48, %g1 2002a24: 82 08 60 ff and %g1, 0xff, %g1 2002a28: 80 a0 60 09 cmp %g1, 9 2002a2c: 08 bf ff f5 bleu 2002a00 2002a30: 83 2a 20 18 sll %o0, 0x18, %g1 width *= 10; width += (*fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 2002a34: 83 38 60 18 sra %g1, 0x18, %g1 2002a38: 80 a0 60 6c cmp %g1, 0x6c 2002a3c: 12 80 00 05 bne 2002a50 2002a40: 83 2a 20 18 sll %o0, 0x18, %g1 lflag = 1; c = *++fmt; 2002a44: b0 06 20 01 inc %i0 2002a48: d0 0e 00 00 ldub [ %i0 ], %o0 } switch (c) { 2002a4c: 83 2a 20 18 sll %o0, 0x18, %g1 2002a50: 83 38 60 18 sra %g1, 0x18, %g1 2002a54: 80 a0 60 64 cmp %g1, 0x64 2002a58: 02 80 00 2c be 2002b08 2002a5c: aa 10 20 0a mov 0xa, %l5 2002a60: 14 80 00 16 bg 2002ab8 2002a64: 80 a0 60 70 cmp %g1, 0x70 2002a68: 80 a0 60 4f cmp %g1, 0x4f 2002a6c: 02 80 00 60 be 2002bec 2002a70: aa 10 20 08 mov 8, %l5 2002a74: 14 80 00 09 bg 2002a98 2002a78: 80 a0 60 58 cmp %g1, 0x58 2002a7c: 80 a0 60 44 cmp %g1, 0x44 2002a80: 02 80 00 21 be 2002b04 2002a84: 80 a0 60 49 cmp %g1, 0x49 2002a88: 32 80 00 55 bne,a 2002bdc 2002a8c: 91 2a 20 18 sll %o0, 0x18, %o0 2002a90: 10 80 00 1e b 2002b08 <== NOT EXECUTED 2002a94: aa 10 20 0a mov 0xa, %l5 <== NOT EXECUTED 2002a98: 02 80 00 54 be 2002be8 <== NOT EXECUTED 2002a9c: 80 a0 60 63 cmp %g1, 0x63 <== NOT EXECUTED 2002aa0: 02 80 00 4b be 2002bcc <== NOT EXECUTED 2002aa4: 80 a0 60 55 cmp %g1, 0x55 <== NOT EXECUTED 2002aa8: 32 80 00 4d bne,a 2002bdc <== NOT EXECUTED 2002aac: 91 2a 20 18 sll %o0, 0x18, %o0 <== NOT EXECUTED 2002ab0: 10 80 00 4f b 2002bec <== NOT EXECUTED 2002ab4: aa 10 20 0a mov 0xa, %l5 <== NOT EXECUTED 2002ab8: 02 80 00 4c be 2002be8 2002abc: 80 a0 60 70 cmp %g1, 0x70 2002ac0: 14 80 00 09 bg 2002ae4 2002ac4: 80 a0 60 75 cmp %g1, 0x75 2002ac8: 80 a0 60 69 cmp %g1, 0x69 <== NOT EXECUTED 2002acc: 02 80 00 0e be 2002b04 <== NOT EXECUTED 2002ad0: 80 a0 60 6f cmp %g1, 0x6f <== NOT EXECUTED 2002ad4: 32 80 00 42 bne,a 2002bdc <== NOT EXECUTED 2002ad8: 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); 2002adc: 10 80 00 44 b 2002bec <== NOT EXECUTED 2002ae0: aa 10 20 08 mov 8, %l5 <== NOT EXECUTED if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) { 2002ae4: 02 80 00 0b be 2002b10 2002ae8: 80 a0 60 78 cmp %g1, 0x78 2002aec: 02 80 00 3f be 2002be8 2002af0: 80 a0 60 73 cmp %g1, 0x73 2002af4: 32 80 00 3a bne,a 2002bdc 2002af8: 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 *); 2002afc: 10 80 00 07 b 2002b18 2002b00: e4 06 40 00 ld [ %i1 ], %l2 if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) { 2002b04: aa 10 20 0a mov 0xa, %l5 <== NOT EXECUTED 2002b08: 10 80 00 3a b 2002bf0 2002b0c: 82 10 20 01 mov 1, %g1 2002b10: 10 80 00 37 b 2002bec 2002b14: 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 *); 2002b18: a2 10 20 00 clr %l1 2002b1c: b2 06 60 04 add %i1, 4, %i1 /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 2002b20: c2 4c 80 11 ldsb [ %l2 + %l1 ], %g1 2002b24: 80 a0 60 00 cmp %g1, 0 2002b28: 32 bf ff fe bne,a 2002b20 2002b2c: a2 04 60 01 inc %l1 ; /* leading spaces */ if ( !minus ) 2002b30: 80 a4 e0 00 cmp %l3, 0 2002b34: 02 80 00 07 be 2002b50 2002b38: a0 10 00 11 mov %l1, %l0 for ( i=len ; i 2002b40: 80 a5 20 00 cmp %l4, 0 for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i 2002b58: c2 05 80 00 ld [ %l6 ], %g1 <== NOT EXECUTED BSP_output_char(' '); /* no width option */ if (width == 0) { 2002b5c: 80 a5 20 00 cmp %l4, 0 2002b60: 22 80 00 02 be,a 2002b68 2002b64: a8 10 00 11 mov %l1, %l4 width = len; } /* output the string */ for ( i=0 ; i 2002b70: 80 a4 e0 00 cmp %l3, 0 2002b74: 10 80 00 06 b 2002b8c 2002b78: d0 4c 80 00 ldsb [ %l2 ], %o0 BSP_output_char(*str); 2002b7c: c2 05 80 00 ld [ %l6 ], %g1 2002b80: 9f c0 40 00 call %g1 2002b84: 01 00 00 00 nop if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i 2002b94: a4 04 a0 01 inc %l2 BSP_output_char(*str); /* trailing spaces */ if ( minus ) 2002b98: 80 a4 e0 00 cmp %l3, 0 2002b9c: 12 80 00 07 bne 2002bb8 2002ba0: a0 10 00 11 mov %l1, %l0 ) { char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 2002ba4: 10 80 00 4c b 2002cd4 2002ba8: b0 06 20 01 inc %i0 for ( i=0 ; i 2002bc0: c2 05 80 00 ld [ %l6 ], %g1 ) { char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 2002bc4: 10 80 00 44 b 2002cd4 2002bc8: b0 06 20 01 inc %i0 for ( i=len ; i <== NOT EXECUTED 2002bd8: b2 06 60 04 add %i1, 4, %i1 <== NOT EXECUTED break; default: BSP_output_char(c); 2002bdc: c2 05 80 00 ld [ %l6 ], %g1 2002be0: 10 80 00 3b b 2002ccc 2002be4: 91 3a 20 18 sra %o0, 0x18, %o0 2002be8: aa 10 20 10 mov 0x10, %l5 2002bec: 82 10 20 00 clr %g1 2002bf0: 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), 2002bf4: e2 06 40 00 ld [ %i1 ], %l1 { long unsigned int n; int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { 2002bf8: 80 a0 60 01 cmp %g1, 1 2002bfc: 12 80 00 0d bne 2002c30 2002c00: b2 10 00 02 mov %g2, %i1 2002c04: 80 a4 60 00 cmp %l1, 0 2002c08: 36 80 00 12 bge,a 2002c50 2002c0c: a4 10 20 00 clr %l2 BSP_output_char('-'); 2002c10: c2 05 80 00 ld [ %l6 ], %g1 <== NOT EXECUTED 2002c14: 9f c0 40 00 call %g1 <== NOT EXECUTED 2002c18: 90 10 20 2d mov 0x2d, %o0 <== NOT EXECUTED num = -num; if (maxwidth) maxwidth--; 2002c1c: 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; 2002c20: a2 20 00 11 neg %l1 <== NOT EXECUTED if (maxwidth) maxwidth--; 2002c24: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 2002c28: 82 40 20 00 addx %g0, 0, %g1 <== NOT EXECUTED 2002c2c: a8 25 00 01 sub %l4, %g1, %l4 <== NOT EXECUTED 2002c30: 10 80 00 08 b 2002c50 2002c34: a4 10 20 00 clr %l2 } count = 0; while ((n = num / base) > 0) { toPrint[count++] = (num - (n*base)); 2002c38: 40 00 43 76 call 2013a10 <.umul> 2002c3c: 92 10 00 15 mov %l5, %o1 2002c40: 90 24 40 08 sub %l1, %o0, %o0 2002c44: a2 10 00 10 mov %l0, %l1 2002c48: d0 2f 00 12 stb %o0, [ %i4 + %l2 ] 2002c4c: a4 10 00 13 mov %l3, %l2 num = -num; if (maxwidth) maxwidth--; } count = 0; while ((n = num / base) > 0) { 2002c50: 90 10 00 11 mov %l1, %o0 2002c54: 92 10 00 15 mov %l5, %o1 2002c58: 40 00 43 a8 call 2013af8 <.udiv> 2002c5c: a6 04 a0 01 add %l2, 1, %l3 2002c60: a0 92 20 00 orcc %o0, 0, %l0 2002c64: 32 bf ff f5 bne,a 2002c38 2002c68: 90 10 00 10 mov %l0, %o0 toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; 2002c6c: 82 07 40 12 add %i5, %l2, %g1 for (n=maxwidth ; n > count; n-- ) 2002c70: a0 10 00 14 mov %l4, %l0 count = 0; while ((n = num / base) > 0) { toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; 2002c74: e2 28 7f e8 stb %l1, [ %g1 + -24 ] for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); 2002c78: 10 80 00 05 b 2002c8c 2002c7c: a2 10 00 17 mov %l7, %l1 toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) 2002c80: a0 04 3f ff add %l0, -1, %l0 BSP_output_char(lead); 2002c84: 9f c0 40 00 call %g1 2002c88: 90 10 00 11 mov %l1, %o0 toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) 2002c8c: 80 a4 00 13 cmp %l0, %l3 2002c90: 38 bf ff fc bgu,a 2002c80 2002c94: c2 05 80 00 ld [ %l6 ], %g1 2002c98: 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)])]); 2002c9c: 10 80 00 07 b 2002cb8 2002ca0: a2 07 40 13 add %i5, %l3, %l1 2002ca4: c2 48 7f e7 ldsb [ %g1 + -25 ], %g1 2002ca8: c4 05 80 00 ld [ %l6 ], %g2 2002cac: d0 4e c0 01 ldsb [ %i3 + %g1 ], %o0 2002cb0: 9f c0 80 00 call %g2 2002cb4: 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++) { 2002cb8: 80 a4 00 13 cmp %l0, %l3 2002cbc: 0a bf ff fa bcs 2002ca4 2002cc0: 82 24 40 10 sub %l1, %l0, %g1 ) { char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 2002cc4: 10 80 00 04 b 2002cd4 2002cc8: 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); 2002ccc: 9f c0 40 00 call %g1 2002cd0: b0 06 20 01 inc %i0 ) { char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 2002cd4: d0 4e 00 00 ldsb [ %i0 ], %o0 2002cd8: 80 a2 20 00 cmp %o0, 0 2002cdc: 12 bf ff 38 bne 20029bc 2002ce0: 80 a2 20 25 cmp %o0, 0x25 base, sign, width, lead); } else { BSP_output_char(*fmt); } } } 2002ce4: 81 c7 e0 08 ret 2002ce8: 81 e8 00 00 restore 02014d88 : ssize_t write( int fd, const void *buffer, size_t count ) { 2014d88: 9d e3 bf 98 save %sp, -104, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 2014d8c: 03 00 80 5a sethi %hi(0x2016800), %g1 2014d90: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 ! 2016818 ssize_t write( int fd, const void *buffer, size_t count ) { 2014d94: 92 10 00 19 mov %i1, %o1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 2014d98: 80 a6 00 01 cmp %i0, %g1 2014d9c: 1a 80 00 0e bcc 2014dd4 2014da0: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 2014da4: 03 00 80 5d sethi %hi(0x2017400), %g1 2014da8: c6 00 61 14 ld [ %g1 + 0x114 ], %g3 ! 2017514 2014dac: 85 2e 20 02 sll %i0, 2, %g2 2014db0: 83 2e 20 04 sll %i0, 4, %g1 2014db4: 82 20 40 02 sub %g1, %g2, %g1 2014db8: 82 00 40 18 add %g1, %i0, %g1 2014dbc: 83 28 60 02 sll %g1, 2, %g1 2014dc0: b0 00 c0 01 add %g3, %g1, %i0 rtems_libio_check_is_open( iop ); 2014dc4: c2 06 20 0c ld [ %i0 + 0xc ], %g1 2014dc8: 80 88 61 00 btst 0x100, %g1 2014dcc: 12 80 00 06 bne 2014de4 2014dd0: 80 a6 60 00 cmp %i1, 0 2014dd4: 7f ff e0 7e call 200cfcc <__errno> <== NOT EXECUTED 2014dd8: 01 00 00 00 nop <== NOT EXECUTED 2014ddc: 10 80 00 15 b 2014e30 <== NOT EXECUTED 2014de0: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 2014de4: 02 80 00 08 be 2014e04 2014de8: 01 00 00 00 nop rtems_libio_check_count( count ); 2014dec: 80 a6 a0 00 cmp %i2, 0 2014df0: 02 80 00 1b be 2014e5c 2014df4: 90 10 20 00 clr %o0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 2014df8: 80 88 60 04 btst 4, %g1 2014dfc: 32 80 00 06 bne,a 2014e14 2014e00: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 2014e04: 7f ff e0 72 call 200cfcc <__errno> <== NOT EXECUTED 2014e08: 01 00 00 00 nop <== NOT EXECUTED 2014e0c: 10 80 00 09 b 2014e30 <== NOT EXECUTED 2014e10: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 2014e14: c2 00 60 0c ld [ %g1 + 0xc ], %g1 2014e18: 80 a0 60 00 cmp %g1, 0 2014e1c: 12 80 00 08 bne 2014e3c 2014e20: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 2014e24: 7f ff e0 6a call 200cfcc <__errno> <== NOT EXECUTED 2014e28: 01 00 00 00 nop <== NOT EXECUTED 2014e2c: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 2014e30: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2014e34: 10 80 00 0a b 2014e5c <== NOT EXECUTED 2014e38: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rc = (*iop->handlers->write_h)( iop, buffer, count ); 2014e3c: 9f c0 40 00 call %g1 2014e40: 90 10 00 18 mov %i0, %o0 if ( rc > 0 ) 2014e44: 80 a2 20 00 cmp %o0, 0 2014e48: 04 80 00 05 ble 2014e5c 2014e4c: 01 00 00 00 nop iop->offset += rc; 2014e50: c2 06 20 08 ld [ %i0 + 8 ], %g1 2014e54: 82 00 40 08 add %g1, %o0, %g1 2014e58: c2 26 20 08 st %g1, [ %i0 + 8 ] return rc; } 2014e5c: 81 c7 e0 08 ret 2014e60: 91 e8 00 08 restore %g0, %o0, %o0