40014ec0 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 40014ec0: 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(); 40014ec4: 40 00 06 78 call 400168a4 40014ec8: f0 06 00 00 ld [ %i0 ], %i0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 40014ecc: c2 16 20 38 lduh [ %i0 + 0x38 ], %g1 40014ed0: 91 2a 20 10 sll %o0, 0x10, %o0 40014ed4: 91 32 20 10 srl %o0, 0x10, %o0 40014ed8: 80 a2 00 01 cmp %o0, %g1 40014edc: 02 80 00 0a be 40014f04 40014ee0: 80 a2 20 00 cmp %o0, 0 40014ee4: 22 80 00 09 be,a 40014f08 <== NOT EXECUTED 40014ee8: f2 36 20 38 sth %i1, [ %i0 + 0x38 ] <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 40014eec: 40 00 37 00 call 40022aec <__errno> <== NOT EXECUTED 40014ef0: 01 00 00 00 nop <== NOT EXECUTED 40014ef4: 82 10 20 01 mov 1, %g1 ! 1 <== NOT EXECUTED 40014ef8: 84 10 3f ff mov -1, %g2 <== NOT EXECUTED 40014efc: 10 80 00 0a b 40014f24 <== NOT EXECUTED 40014f00: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED #endif jnode->st_uid = owner; 40014f04: f2 36 20 38 sth %i1, [ %i0 + 0x38 ] jnode->st_gid = group; 40014f08: f4 36 20 3a sth %i2, [ %i0 + 0x3a ] IMFS_update_ctime( jnode ); 40014f0c: 90 07 bf f0 add %fp, -16, %o0 40014f10: 7f ff bf ac call 40004dc0 40014f14: 92 10 20 00 clr %o1 40014f18: c2 07 bf f0 ld [ %fp + -16 ], %g1 40014f1c: 84 10 20 00 clr %g2 40014f20: c2 26 20 44 st %g1, [ %i0 + 0x44 ] return 0; } 40014f24: 81 c7 e0 08 ret 40014f28: 91 e8 00 02 restore %g0, %g2, %o0 4000d4d8 : IMFS_jnode_types_t type, char *name, mode_t mode, IMFS_types_union *info ) { 4000d4d8: 9d e3 bf 90 save %sp, -112, %sp struct timeval tv; IMFS_jnode_t *parent = NULL; IMFS_fs_info_t *fs_info; char *sym_name; if ( parent_loc != NULL ) 4000d4dc: a6 96 20 00 orcc %i0, 0, %l3 4000d4e0: 02 80 00 03 be 4000d4ec 4000d4e4: a4 10 20 00 clr %l2 parent = parent_loc->node_access; 4000d4e8: e4 04 c0 00 ld [ %l3 ], %l2 /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 4000d4ec: 90 10 20 01 mov 1, %o0 4000d4f0: 92 10 20 5c mov 0x5c, %o1 4000d4f4: 7f ff d3 ec call 400024a4 4000d4f8: b0 10 20 00 clr %i0 if ( !node ) 4000d4fc: a2 92 20 00 orcc %o0, 0, %l1 4000d500: 02 80 00 53 be 4000d64c 4000d504: 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 ); 4000d508: 92 10 00 1a mov %i2, %o1 4000d50c: 94 10 20 20 mov 0x20, %o2 /* * Fill in the basic information */ node->st_nlink = 1; node->type = type; 4000d510: f2 24 60 48 st %i1, [ %l1 + 0x48 ] /* * Fill in the basic information */ node->st_nlink = 1; 4000d514: c2 34 60 30 sth %g1, [ %l1 + 0x30 ] node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 4000d518: 40 00 08 49 call 4000f63c 4000d51c: 90 04 60 0c add %l1, 0xc, %o0 /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode & ~rtems_filesystem_umask; 4000d520: 03 10 00 64 sethi %hi(0x40019000), %g1 4000d524: c2 00 61 e0 ld [ %g1 + 0x1e0 ], %g1 ! 400191e0 /* * Set the type specific information */ switch (type) { 4000d528: 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; 4000d52c: c2 10 60 24 lduh [ %g1 + 0x24 ], %g1 /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 4000d530: b0 10 00 11 mov %l1, %i0 /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode & ~rtems_filesystem_umask; 4000d534: 82 2e c0 01 andn %i3, %g1, %g1 #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); 4000d538: 7f ff f8 82 call 4000b740 4000d53c: c2 34 60 2e sth %g1, [ %l1 + 0x2e ] node->st_gid = getegid(); 4000d540: 7f ff f8 7c call 4000b730 4000d544: d0 34 60 38 sth %o0, [ %l1 + 0x38 ] /* * Now set all the times. */ gettimeofday( &tv, 0 ); 4000d548: 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(); 4000d54c: d0 34 60 3a sth %o0, [ %l1 + 0x3a ] /* * Now set all the times. */ gettimeofday( &tv, 0 ); 4000d550: 7f ff f8 80 call 4000b750 4000d554: 90 07 bf f0 add %fp, -16, %o0 node->stat_atime = (time_t) tv.tv_sec; 4000d558: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* * Set the type specific information */ switch (type) { 4000d55c: 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; 4000d560: c2 24 60 44 st %g1, [ %l1 + 0x44 ] * Now set all the times. */ gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; 4000d564: c2 24 60 3c st %g1, [ %l1 + 0x3c ] /* * Set the type specific information */ switch (type) { 4000d568: 18 80 00 27 bgu 4000d604 4000d56c: c2 24 60 40 st %g1, [ %l1 + 0x40 ] 4000d570: 83 2e 60 02 sll %i1, 2, %g1 4000d574: 05 10 00 35 sethi %hi(0x4000d400), %g2 4000d578: 84 10 a0 c0 or %g2, 0xc0, %g2 ! 4000d4c0 4000d57c: c2 00 80 01 ld [ %g2 + %g1 ], %g1 4000d580: 81 c0 40 00 jmp %g1 4000d584: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000d588: 82 04 60 50 add %l1, 0x50, %g1 the_chain->permanent_null = NULL; 4000d58c: c0 24 60 50 clr [ %l1 + 0x50 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000d590: c2 24 60 4c st %g1, [ %l1 + 0x4c ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000d594: 82 04 60 4c add %l1, 0x4c, %g1 4000d598: 10 80 00 21 b 4000d61c 4000d59c: c2 24 60 54 st %g1, [ %l1 + 0x54 ] case IMFS_DIRECTORY: Chain_Initialize_empty(&node->info.directory.Entries); break; case IMFS_HARD_LINK: node->info.hard_link.link_node = info->hard_link.link_node; 4000d5a0: c2 07 00 00 ld [ %i4 ], %g1 4000d5a4: 10 80 00 1e b 4000d61c 4000d5a8: c2 24 60 4c st %g1, [ %l1 + 0x4c ] break; case IMFS_SYM_LINK: sym_name = calloc( 1, strlen( info->sym_link.name ) + 1 ); 4000d5ac: 40 00 07 ba call 4000f494 4000d5b0: d0 07 00 00 ld [ %i4 ], %o0 4000d5b4: 92 02 20 01 add %o0, 1, %o1 4000d5b8: 7f ff d3 bb call 400024a4 4000d5bc: 90 10 20 01 mov 1, %o0 strcpy( sym_name, info->sym_link.name ); 4000d5c0: d2 07 00 00 ld [ %i4 ], %o1 4000d5c4: 40 00 07 94 call 4000f414 4000d5c8: a0 10 00 08 mov %o0, %l0 node->info.sym_link.name = sym_name; 4000d5cc: 10 80 00 14 b 4000d61c 4000d5d0: e0 24 60 4c st %l0, [ %l1 + 0x4c ] break; case IMFS_DEVICE: node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; 4000d5d4: c2 07 20 04 ld [ %i4 + 4 ], %g1 strcpy( sym_name, info->sym_link.name ); node->info.sym_link.name = sym_name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; 4000d5d8: c4 07 00 00 ld [ %i4 ], %g2 node->info.device.minor = info->device.minor; 4000d5dc: c2 24 60 50 st %g1, [ %l1 + 0x50 ] strcpy( sym_name, info->sym_link.name ); node->info.sym_link.name = sym_name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; 4000d5e0: 10 80 00 0f b 4000d61c 4000d5e4: c4 24 60 4c st %g2, [ %l1 + 0x4c ] node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 4000d5e8: c0 24 60 4c clr [ %l1 + 0x4c ] <== NOT EXECUTED node->info.linearfile.direct = 0; 4000d5ec: c0 24 60 50 clr [ %l1 + 0x50 ] <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; 4000d5f0: c0 24 60 4c clr [ %l1 + 0x4c ] node->info.file.indirect = 0; 4000d5f4: c0 24 60 50 clr [ %l1 + 0x50 ] node->info.file.doubly_indirect = 0; 4000d5f8: c0 24 60 54 clr [ %l1 + 0x54 ] node->info.file.triply_indirect = 0; 4000d5fc: 10 80 00 08 b 4000d61c 4000d600: c0 24 60 58 clr [ %l1 + 0x58 ] break; default: assert(0); 4000d604: 11 10 00 60 sethi %hi(0x40018000), %o0 <== NOT EXECUTED 4000d608: 15 10 00 5f sethi %hi(0x40017c00), %o2 <== NOT EXECUTED 4000d60c: 90 12 23 50 or %o0, 0x350, %o0 <== NOT EXECUTED 4000d610: 94 12 a1 40 or %o2, 0x140, %o2 <== NOT EXECUTED 4000d614: 7f ff d2 28 call 40001eb4 <__assert> <== NOT EXECUTED 4000d618: 92 10 20 77 mov 0x77, %o1 <== NOT EXECUTED /* * If this node has a parent, then put it in that directory list. */ if ( parent ) { 4000d61c: 80 a4 a0 00 cmp %l2, 0 4000d620: 02 80 00 0b be 4000d64c 4000d624: 90 04 a0 4c add %l2, 0x4c, %o0 Chain_Append( &parent->info.directory.Entries, &node->Node ); 4000d628: 7f ff e4 7c call 40006818 <_Chain_Append> 4000d62c: 92 10 00 11 mov %l1, %o1 node->Parent = parent; fs_info = parent_loc->mt_entry->fs_info; 4000d630: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 * If this node has a parent, then put it in that directory list. */ if ( parent ) { Chain_Append( &parent->info.directory.Entries, &node->Node ); node->Parent = parent; 4000d634: e4 24 60 08 st %l2, [ %l1 + 8 ] fs_info = parent_loc->mt_entry->fs_info; 4000d638: c4 00 60 2c ld [ %g1 + 0x2c ], %g2 node->st_ino = ++fs_info->ino_count; 4000d63c: c2 00 80 00 ld [ %g2 ], %g1 4000d640: 82 00 60 01 inc %g1 4000d644: c2 20 80 00 st %g1, [ %g2 ] 4000d648: c2 24 60 34 st %g1, [ %l1 + 0x34 ] } return node; } 4000d64c: 81 c7 e0 08 ret 4000d650: 81 e8 00 00 restore 400038d0 : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 400038d0: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; Chain_Control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 400038d4: 80 a6 20 00 cmp %i0, 0 400038d8: 12 80 00 09 bne 400038fc 400038dc: 80 a6 60 00 cmp %i1, 0 400038e0: 11 10 00 7b sethi %hi(0x4001ec00), %o0 <== NOT EXECUTED 400038e4: 15 10 00 7b sethi %hi(0x4001ec00), %o2 <== NOT EXECUTED 400038e8: 90 12 20 50 or %o0, 0x50, %o0 <== NOT EXECUTED 400038ec: 94 12 a1 10 or %o2, 0x110, %o2 <== NOT EXECUTED 400038f0: 40 00 01 c1 call 40003ff4 <__assert> <== NOT EXECUTED 400038f4: 92 10 20 7f mov 0x7f, %o1 <== NOT EXECUTED assert( level >= 0 ); 400038f8: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 400038fc: 36 80 00 09 bge,a 40003920 40003900: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40003904: 11 10 00 7b sethi %hi(0x4001ec00), %o0 <== NOT EXECUTED 40003908: 15 10 00 7b sethi %hi(0x4001ec00), %o2 <== NOT EXECUTED 4000390c: 90 12 20 50 or %o0, 0x50, %o0 <== NOT EXECUTED 40003910: 94 12 a1 20 or %o2, 0x120, %o2 <== NOT EXECUTED 40003914: 40 00 01 b8 call 40003ff4 <__assert> <== NOT EXECUTED 40003918: 92 10 20 81 mov 0x81, %o1 <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); 4000391c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 40003920: 80 a0 60 01 cmp %g1, 1 40003924: 02 80 00 07 be 40003940 40003928: 11 10 00 7b sethi %hi(0x4001ec00), %o0 4000392c: 15 10 00 7b sethi %hi(0x4001ec00), %o2 <== NOT EXECUTED 40003930: 90 12 20 50 or %o0, 0x50, %o0 <== NOT EXECUTED 40003934: 94 12 a1 30 or %o2, 0x130, %o2 <== NOT EXECUTED 40003938: 40 00 01 af call 40003ff4 <__assert> <== NOT EXECUTED 4000393c: 92 10 20 83 mov 0x83, %o1 <== NOT EXECUTED the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 40003940: e0 06 20 4c ld [ %i0 + 0x4c ], %l0 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 40003944: 03 10 00 7b sethi %hi(0x4001ec00), %g1 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !_Chain_Is_tail( the_chain, the_node ); 40003948: b0 06 20 50 add %i0, 0x50, %i0 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 4000394c: a8 10 61 58 or %g1, 0x158, %l4 40003950: 27 10 00 83 sethi %hi(0x40020c00), %l3 IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 40003954: 10 80 00 13 b 400039a0 40003958: a4 06 60 01 add %i1, 1, %l2 !_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++ ) 4000395c: a2 04 60 01 inc %l1 fprintf(stdout, "...." ); 40003960: d2 00 60 08 ld [ %g1 + 8 ], %o1 40003964: 40 00 3b c5 call 40012878 40003968: 90 10 00 14 mov %l4, %o0 !_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++ ) 4000396c: 80 a4 40 19 cmp %l1, %i1 40003970: 04 bf ff fb ble 4000395c 40003974: c2 04 e2 58 ld [ %l3 + 0x258 ], %g1 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 40003978: 7f ff ff 82 call 40003780 4000397c: 90 10 00 10 mov %l0, %o0 if ( the_jnode->type == IMFS_DIRECTORY ) 40003980: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40003984: 80 a0 60 01 cmp %g1, 1 40003988: 32 80 00 06 bne,a 400039a0 4000398c: e0 04 00 00 ld [ %l0 ], %l0 IMFS_dump_directory( the_jnode, level + 1 ); 40003990: 90 10 00 10 mov %l0, %o0 40003994: 7f ff ff cf call 400038d0 40003998: 92 10 00 12 mov %l2, %o1 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !_Chain_Is_tail( the_chain, the_node ); the_node = the_node->next ) { 4000399c: e0 04 00 00 ld [ %l0 ], %l0 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !_Chain_Is_tail( the_chain, the_node ); 400039a0: 80 a4 00 18 cmp %l0, %i0 400039a4: 12 bf ff f2 bne 4000396c 400039a8: a2 10 20 00 clr %l1 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 400039ac: 81 c7 e0 08 ret 400039b0: 81 e8 00 00 restore 4000a8ec : int IMFS_eval_path( const char *pathname, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4000a8ec: 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; 4000a8f0: e0 06 80 00 ld [ %i2 ], %l0 int IMFS_eval_path( const char *pathname, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4000a8f4: a6 10 00 18 mov %i0, %l3 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 4000a8f8: a4 10 20 00 clr %l2 4000a8fc: 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 ); 4000a900: a8 07 bf c3 add %fp, -61, %l4 4000a904: ac 07 bf f4 add %fp, -12, %l6 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4000a908: 10 80 00 69 b 4000aaac 4000a90c: 2b 10 00 64 sethi %hi(0x40019000), %l5 * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], token, &len ); 4000a910: 92 10 00 14 mov %l4, %o1 4000a914: 40 00 01 d5 call 4000b068 4000a918: 94 10 00 16 mov %l6, %o2 i += len; if ( !pathloc->node_access ) 4000a91c: 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 ); 4000a920: a2 10 00 08 mov %o0, %l1 i += len; if ( !pathloc->node_access ) 4000a924: 80 a0 60 00 cmp %g1, 0 4000a928: 02 80 00 59 be 4000aa8c 4000a92c: c4 07 bf f4 ld [ %fp + -12 ], %g2 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 4000a930: 80 a2 20 00 cmp %o0, 0 4000a934: 02 80 00 12 be 4000a97c 4000a938: a4 04 80 02 add %l2, %g2, %l2 if ( node->type == IMFS_DIRECTORY ) 4000a93c: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000a940: 80 a0 60 01 cmp %g1, 1 4000a944: 12 80 00 0f bne 4000a980 4000a948: 80 a4 60 03 cmp %l1, 3 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 4000a94c: 90 10 00 1a mov %i2, %o0 4000a950: 7f ff ff b6 call 4000a828 4000a954: 92 10 20 01 mov 1, %o1 4000a958: 80 a2 20 00 cmp %o0, 0 4000a95c: 12 80 00 09 bne 4000a980 4000a960: 80 a4 60 03 cmp %l1, 3 rtems_set_errno_and_return_minus_one( EACCES ); 4000a964: 40 00 0d ee call 4000e11c <__errno> 4000a968: b0 10 3f ff mov -1, %i0 4000a96c: 82 10 20 0d mov 0xd, %g1 4000a970: c2 22 00 00 st %g1, [ %o0 ] 4000a974: 81 c7 e0 08 ret 4000a978: 81 e8 00 00 restore node = pathloc->node_access; switch( type ) { 4000a97c: 80 a4 60 03 cmp %l1, 3 4000a980: 02 80 00 1b be 4000a9ec 4000a984: e0 06 80 00 ld [ %i2 ], %l0 4000a988: 80 a4 60 04 cmp %l1, 4 4000a98c: 02 80 00 44 be 4000aa9c 4000a990: 80 a4 60 02 cmp %l1, 2 4000a994: 12 80 00 47 bne 4000aab0 4000a998: 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 ) 4000a99c: c2 05 61 e0 ld [ %l5 + 0x1e0 ], %g1 4000a9a0: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4000a9a4: 80 a4 00 01 cmp %l0, %g1 4000a9a8: 02 bf ff da be 4000a910 4000a9ac: 90 04 c0 12 add %l3, %l2, %o0 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 4000a9b0: d2 06 a0 0c ld [ %i2 + 0xc ], %o1 4000a9b4: c2 02 60 18 ld [ %o1 + 0x18 ], %g1 4000a9b8: 80 a4 00 01 cmp %l0, %g1 4000a9bc: 32 80 00 04 bne,a 4000a9cc 4000a9c0: 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; 4000a9c4: 10 80 00 48 b 4000aae4 4000a9c8: 92 02 60 08 add %o1, 8, %o1 *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),flags,pathloc); } } else { if ( !node->Parent ) 4000a9cc: 80 a4 20 00 cmp %l0, 0 4000a9d0: 32 80 00 3a bne,a 4000aab8 4000a9d4: e0 26 80 00 st %l0, [ %i2 ] rtems_set_errno_and_return_minus_one( ENOENT ); 4000a9d8: 40 00 0d d1 call 4000e11c <__errno> 4000a9dc: b0 10 3f ff mov -1, %i0 4000a9e0: e2 22 00 00 st %l1, [ %o0 ] 4000a9e4: 81 c7 e0 08 ret 4000a9e8: 81 e8 00 00 restore case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 4000a9ec: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000a9f0: 80 a0 60 03 cmp %g1, 3 4000a9f4: 12 80 00 0a bne 4000aa1c 4000a9f8: 80 a0 60 04 cmp %g1, 4 IMFS_evaluate_hard_link( pathloc, 0 ); 4000a9fc: 90 10 00 1a mov %i2, %o0 4000aa00: 7f ff ff a2 call 4000a888 4000aa04: 92 10 20 00 clr %o1 node = pathloc->node_access; 4000aa08: d0 06 80 00 ld [ %i2 ], %o0 if ( !node ) 4000aa0c: 80 a2 20 00 cmp %o0, 0 4000aa10: 32 80 00 0d bne,a 4000aa44 4000aa14: a0 10 00 08 mov %o0, %l0 4000aa18: 30 80 00 0f b,a 4000aa54 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 4000aa1c: 32 80 00 0b bne,a 4000aa48 4000aa20: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 result = IMFS_evaluate_sym_link( pathloc, 0 ); 4000aa24: 90 10 00 1a mov %i2, %o0 4000aa28: 40 00 00 50 call 4000ab68 4000aa2c: 92 10 20 00 clr %o1 4000aa30: b0 10 00 08 mov %o0, %i0 node = pathloc->node_access; if ( result == -1 ) 4000aa34: 80 a2 3f ff cmp %o0, -1 4000aa38: 02 bf ff cf be 4000a974 4000aa3c: 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; 4000aa40: a0 10 00 08 mov %o0, %l0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 4000aa44: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000aa48: 80 a0 60 01 cmp %g1, 1 4000aa4c: 22 80 00 06 be,a 4000aa64 4000aa50: d2 04 20 58 ld [ %l0 + 0x58 ], %o1 rtems_set_errno_and_return_minus_one( ENOTDIR ); 4000aa54: 40 00 0d b2 call 4000e11c <__errno> 4000aa58: b0 10 3f ff mov -1, %i0 4000aa5c: 10 bf ff c5 b 4000a970 4000aa60: 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 ) { 4000aa64: 80 a2 60 00 cmp %o1, 0 4000aa68: 02 80 00 04 be 4000aa78 4000aa6c: 90 10 00 10 mov %l0, %o0 newloc = node->info.directory.mt_fs->mt_fs_root; 4000aa70: 10 80 00 1d b 4000aae4 4000aa74: 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 ); 4000aa78: 40 00 01 4e call 4000afb0 4000aa7c: 92 10 00 14 mov %l4, %o1 if ( !node ) 4000aa80: a0 92 20 00 orcc %o0, 0, %l0 4000aa84: 32 80 00 0d bne,a 4000aab8 4000aa88: e0 26 80 00 st %l0, [ %i2 ] rtems_set_errno_and_return_minus_one( ENOENT ); 4000aa8c: 40 00 0d a4 call 4000e11c <__errno> 4000aa90: b0 10 3f ff mov -1, %i0 4000aa94: 10 bf ff b7 b 4000a970 4000aa98: 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 ); 4000aa9c: 40 00 0d a0 call 4000e11c <__errno> 4000aaa0: b0 10 3f ff mov -1, %i0 4000aaa4: 10 bf ff b3 b 4000a970 4000aaa8: 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) ) { 4000aaac: 80 a4 60 00 cmp %l1, 0 4000aab0: 22 80 00 06 be,a 4000aac8 4000aab4: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000aab8: 80 a4 60 04 cmp %l1, 4 4000aabc: 12 bf ff 95 bne 4000a910 4000aac0: 90 04 c0 12 add %l3, %l2, %o0 * new fs root node and let let the mounted filesystem set the handlers. * * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { 4000aac4: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 <== NOT EXECUTED 4000aac8: 80 a0 60 01 cmp %g1, 1 4000aacc: 12 80 00 18 bne 4000ab2c 4000aad0: 01 00 00 00 nop if ( node->info.directory.mt_fs != NULL ) { 4000aad4: d0 04 20 58 ld [ %l0 + 0x58 ], %o0 4000aad8: 80 a2 20 00 cmp %o0, 0 4000aadc: 02 80 00 14 be 4000ab2c 4000aae0: 92 02 20 18 add %o0, 0x18, %o1 newloc = node->info.directory.mt_fs->mt_fs_root; 4000aae4: a0 07 bf e4 add %fp, -28, %l0 4000aae8: 94 10 20 10 mov 0x10, %o2 4000aaec: 40 00 0f 61 call 4000e870 4000aaf0: 90 10 00 10 mov %l0, %o0 *pathloc = newloc; 4000aaf4: 92 10 00 10 mov %l0, %o1 4000aaf8: 94 10 20 10 mov 0x10, %o2 4000aafc: 40 00 0f 5d call 4000e870 4000ab00: 90 10 00 1a mov %i2, %o0 return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 4000ab04: c2 06 a0 08 ld [ %i2 + 8 ], %g1 4000ab08: d0 07 bf f4 ld [ %fp + -12 ], %o0 4000ab0c: c2 00 40 00 ld [ %g1 ], %g1 4000ab10: 90 24 80 08 sub %l2, %o0, %o0 4000ab14: 92 10 00 19 mov %i1, %o1 4000ab18: 90 04 c0 08 add %l3, %o0, %o0 4000ab1c: 9f c0 40 00 call %g1 4000ab20: 94 10 00 1a mov %i2, %o2 4000ab24: 81 c7 e0 08 ret 4000ab28: 91 e8 00 08 restore %g0, %o0, %o0 } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 4000ab2c: 7f ff ff 26 call 4000a7c4 4000ab30: 90 10 00 1a mov %i2, %o0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 4000ab34: 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 ); 4000ab38: b0 10 00 08 mov %o0, %i0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 4000ab3c: 7f ff ff 3b call 4000a828 4000ab40: 90 10 00 1a mov %i2, %o0 4000ab44: 80 a2 20 00 cmp %o0, 0 4000ab48: 12 80 00 06 bne 4000ab60 4000ab4c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 4000ab50: 40 00 0d 73 call 4000e11c <__errno> 4000ab54: b0 10 3f ff mov -1, %i0 ! ffffffff 4000ab58: 82 10 20 0d mov 0xd, %g1 4000ab5c: c2 22 00 00 st %g1, [ %o0 ] return result; } 4000ab60: 81 c7 e0 08 ret 4000ab64: 81 e8 00 00 restore 4000acec : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 4000acec: 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; 4000acf0: e0 06 40 00 ld [ %i1 ], %l0 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 4000acf4: a8 10 00 18 mov %i0, %l4 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 4000acf8: a6 10 20 00 clr %l3 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], token, &len ); 4000acfc: aa 07 bf c3 add %fp, -61, %l5 4000ad00: ae 07 bf f4 add %fp, -12, %l7 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4000ad04: 2d 10 00 64 sethi %hi(0x40019000), %l6 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], token, &len ); 4000ad08: 90 05 00 13 add %l4, %l3, %o0 4000ad0c: 92 10 00 15 mov %l5, %o1 4000ad10: 40 00 00 d6 call 4000b068 4000ad14: 94 10 00 17 mov %l7, %o2 i += len; if ( !pathloc->node_access ) 4000ad18: 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 ); 4000ad1c: a2 10 00 08 mov %o0, %l1 i += len; if ( !pathloc->node_access ) 4000ad20: 80 a0 60 00 cmp %g1, 0 4000ad24: 02 80 00 82 be 4000af2c 4000ad28: e4 07 bf f4 ld [ %fp + -12 ], %l2 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 4000ad2c: 80 a2 20 00 cmp %o0, 0 4000ad30: 22 80 00 10 be,a 4000ad70 4000ad34: a6 04 c0 12 add %l3, %l2, %l3 if ( node->type == IMFS_DIRECTORY ) 4000ad38: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000ad3c: 80 a0 60 01 cmp %g1, 1 4000ad40: 32 80 00 0c bne,a 4000ad70 4000ad44: a6 04 c0 12 add %l3, %l2, %l3 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 4000ad48: 90 10 00 19 mov %i1, %o0 4000ad4c: 7f ff fe b7 call 4000a828 4000ad50: 92 10 20 01 mov 1, %o1 4000ad54: 80 a2 20 00 cmp %o0, 0 4000ad58: 32 80 00 06 bne,a 4000ad70 4000ad5c: a6 04 c0 12 add %l3, %l2, %l3 rtems_set_errno_and_return_minus_one( EACCES ); 4000ad60: 40 00 0c ef call 4000e11c <__errno> 4000ad64: b0 10 3f ff mov -1, %i0 4000ad68: 10 80 00 83 b 4000af74 4000ad6c: 82 10 20 0d mov 0xd, %g1 node = pathloc->node_access; switch( type ) { 4000ad70: 80 a4 60 02 cmp %l1, 2 4000ad74: 02 80 00 0f be 4000adb0 4000ad78: e0 06 40 00 ld [ %i1 ], %l0 4000ad7c: 80 a4 60 02 cmp %l1, 2 4000ad80: 18 80 00 07 bgu 4000ad9c 4000ad84: 80 a4 60 03 cmp %l1, 3 4000ad88: 80 a4 60 00 cmp %l1, 0 4000ad8c: 02 80 00 56 be 4000aee4 4000ad90: 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 ); 4000ad94: 10 bf ff de b 4000ad0c 4000ad98: 90 05 00 13 add %l4, %l3, %o0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 4000ad9c: 02 80 00 19 be 4000ae00 4000ada0: 80 a4 60 04 cmp %l1, 4 4000ada4: 32 bf ff da bne,a 4000ad0c 4000ada8: 90 05 00 13 add %l4, %l3, %o0 <== NOT EXECUTED 4000adac: 30 80 00 52 b,a 4000aef4 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4000adb0: c2 05 a1 e0 ld [ %l6 + 0x1e0 ], %g1 4000adb4: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4000adb8: 80 a4 00 01 cmp %l0, %g1 4000adbc: 02 bf ff d4 be 4000ad0c 4000adc0: 90 05 00 13 add %l4, %l3, %o0 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 4000adc4: d2 06 60 0c ld [ %i1 + 0xc ], %o1 4000adc8: c2 02 60 18 ld [ %o1 + 0x18 ], %g1 4000adcc: 80 a4 00 01 cmp %l0, %g1 4000add0: 32 80 00 04 bne,a 4000ade0 4000add4: 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; 4000add8: 10 80 00 2a b 4000ae80 4000addc: 92 02 60 08 add %o1, 8, %o1 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 4000ade0: 80 a4 20 00 cmp %l0, 0 4000ade4: 32 bf ff c9 bne,a 4000ad08 4000ade8: e0 26 40 00 st %l0, [ %i1 ] rtems_set_errno_and_return_minus_one( ENOENT ); 4000adec: 40 00 0c cc call 4000e11c <__errno> 4000adf0: b0 10 3f ff mov -1, %i0 4000adf4: e2 22 00 00 st %l1, [ %o0 ] 4000adf8: 81 c7 e0 08 ret 4000adfc: 81 e8 00 00 restore pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 4000ae00: d0 04 20 48 ld [ %l0 + 0x48 ], %o0 4000ae04: 80 a2 20 03 cmp %o0, 3 4000ae08: 12 80 00 0a bne 4000ae30 4000ae0c: 80 a2 20 04 cmp %o0, 4 result = IMFS_evaluate_link( pathloc, 0 ); 4000ae10: 90 10 00 19 mov %i1, %o0 4000ae14: 7f ff ff 89 call 4000ac38 4000ae18: 92 10 20 00 clr %o1 if ( result == -1 ) 4000ae1c: 80 a2 3f ff cmp %o0, -1 4000ae20: 12 80 00 0c bne 4000ae50 4000ae24: b0 10 00 08 mov %o0, %i0 4000ae28: 81 c7 e0 08 ret <== NOT EXECUTED 4000ae2c: 81 e8 00 00 restore <== NOT EXECUTED return -1; } else if ( node->type == IMFS_SYM_LINK ) { 4000ae30: 32 80 00 09 bne,a 4000ae54 4000ae34: d0 06 40 00 ld [ %i1 ], %o0 result = IMFS_evaluate_link( pathloc, 0 ); 4000ae38: 90 10 00 19 mov %i1, %o0 4000ae3c: 7f ff ff 7f call 4000ac38 4000ae40: 92 10 20 00 clr %o1 if ( result == -1 ) 4000ae44: 80 a2 3f ff cmp %o0, -1 4000ae48: 02 bf ff ec be 4000adf8 4000ae4c: b0 10 00 08 mov %o0, %i0 return -1; } node = pathloc->node_access; 4000ae50: d0 06 40 00 ld [ %i1 ], %o0 if ( !node ) 4000ae54: 80 a2 20 00 cmp %o0, 0 4000ae58: 02 80 00 44 be 4000af68 4000ae5c: 01 00 00 00 nop /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 4000ae60: c2 02 20 48 ld [ %o0 + 0x48 ], %g1 4000ae64: 80 a0 60 01 cmp %g1, 1 4000ae68: 12 80 00 40 bne 4000af68 4000ae6c: 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 ) { 4000ae70: d2 02 20 58 ld [ %o0 + 0x58 ], %o1 4000ae74: 80 a2 60 00 cmp %o1, 0 4000ae78: 02 80 00 14 be 4000aec8 4000ae7c: 92 02 60 18 add %o1, 0x18, %o1 newloc = node->info.directory.mt_fs->mt_fs_root; 4000ae80: a0 07 bf e4 add %fp, -28, %l0 4000ae84: 94 10 20 10 mov 0x10, %o2 4000ae88: 40 00 0e 7a call 4000e870 4000ae8c: 90 10 00 10 mov %l0, %o0 *pathloc = newloc; 4000ae90: 92 10 00 10 mov %l0, %o1 4000ae94: 94 10 20 10 mov 0x10, %o2 4000ae98: 40 00 0e 76 call 4000e870 4000ae9c: 90 10 00 19 mov %i1, %o0 return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4000aea0: c2 06 60 08 ld [ %i1 + 8 ], %g1 4000aea4: d0 07 bf f4 ld [ %fp + -12 ], %o0 4000aea8: c2 00 60 04 ld [ %g1 + 4 ], %g1 4000aeac: 90 24 c0 08 sub %l3, %o0, %o0 4000aeb0: 92 10 00 19 mov %i1, %o1 4000aeb4: 90 05 00 08 add %l4, %o0, %o0 4000aeb8: 9f c0 40 00 call %g1 4000aebc: 94 10 00 1a mov %i2, %o2 4000aec0: 81 c7 e0 08 ret 4000aec4: 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 ); 4000aec8: 40 00 00 3a call 4000afb0 4000aecc: 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 ) 4000aed0: a0 92 20 00 orcc %o0, 0, %l0 4000aed4: 02 80 00 0c be 4000af04 4000aed8: c2 07 bf f4 ld [ %fp + -12 ], %g1 done = TRUE; else pathloc->node_access = node; 4000aedc: 10 bf ff 8b b 4000ad08 4000aee0: e0 26 40 00 st %l0, [ %i1 ] break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 4000aee4: 40 00 0c 8e call 4000e11c <__errno> 4000aee8: b0 10 3f ff mov -1, %i0 4000aeec: 10 80 00 22 b 4000af74 4000aef0: 82 10 20 11 mov 0x11, %g1 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4000aef4: 40 00 0c 8a call 4000e11c <__errno> 4000aef8: b0 10 3f ff mov -1, %i0 4000aefc: 10 80 00 1e b 4000af74 4000af00: 82 10 20 5b mov 0x5b, %g1 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 4000af04: 84 05 00 13 add %l4, %l3, %g2 4000af08: 82 24 c0 01 sub %l3, %g1, %g1 4000af0c: 82 05 00 01 add %l4, %g1, %g1 4000af10: 10 80 00 0b b 4000af3c 4000af14: 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 ] ) ) 4000af18: 80 a0 60 2f cmp %g1, 0x2f 4000af1c: 02 80 00 08 be 4000af3c 4000af20: 80 a0 60 5c cmp %g1, 0x5c 4000af24: 22 80 00 07 be,a 4000af40 4000af28: c2 48 80 00 ldsb [ %g2 ], %g1 rtems_set_errno_and_return_minus_one( ENOENT ); 4000af2c: 40 00 0c 7c call 4000e11c <__errno> 4000af30: b0 10 3f ff mov -1, %i0 4000af34: 10 80 00 10 b 4000af74 4000af38: 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++) { 4000af3c: c2 48 80 00 ldsb [ %g2 ], %g1 4000af40: 80 a0 60 00 cmp %g1, 0 4000af44: 12 bf ff f5 bne 4000af18 4000af48: 84 00 a0 01 inc %g2 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 4000af4c: 7f ff fe 1e call 4000a7c4 4000af50: 90 10 00 19 mov %i1, %o0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 4000af54: c2 06 40 00 ld [ %i1 ], %g1 4000af58: c2 00 60 48 ld [ %g1 + 0x48 ], %g1 4000af5c: 80 a0 60 01 cmp %g1, 1 4000af60: 02 80 00 08 be 4000af80 4000af64: b0 10 00 08 mov %o0, %i0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 4000af68: 40 00 0c 6d call 4000e11c <__errno> 4000af6c: b0 10 3f ff mov -1, %i0 4000af70: 82 10 20 14 mov 0x14, %g1 4000af74: c2 22 00 00 st %g1, [ %o0 ] 4000af78: 81 c7 e0 08 ret 4000af7c: 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 ) ) 4000af80: 90 10 00 19 mov %i1, %o0 4000af84: 7f ff fe 29 call 4000a828 4000af88: 92 10 20 03 mov 3, %o1 4000af8c: 80 a2 20 00 cmp %o0, 0 4000af90: 12 80 00 06 bne 4000afa8 4000af94: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 4000af98: 40 00 0c 61 call 4000e11c <__errno> 4000af9c: b0 10 3f ff mov -1, %i0 ! ffffffff 4000afa0: 82 10 20 0d mov 0xd, %g1 4000afa4: c2 22 00 00 st %g1, [ %o0 ] return result; } 4000afa8: 81 c7 e0 08 ret 4000afac: 81 e8 00 00 restore 4000a888 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4000a888: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *jnode = node->node_access; 4000a88c: e0 06 00 00 ld [ %i0 ], %l0 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 4000a890: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000a894: 80 a0 60 03 cmp %g1, 3 4000a898: 22 80 00 05 be,a 4000a8ac 4000a89c: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 rtems_fatal_error_occurred (0xABCD0000); 4000a8a0: 7f ff ef 1f call 4000651c <== NOT EXECUTED 4000a8a4: 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; 4000a8a8: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 <== NOT EXECUTED IMFS_Set_handlers( node ); 4000a8ac: 90 10 00 18 mov %i0, %o0 4000a8b0: 7f ff ff c5 call 4000a7c4 4000a8b4: c2 26 00 00 st %g1, [ %i0 ] /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 4000a8b8: 90 10 00 18 mov %i0, %o0 4000a8bc: 92 10 00 19 mov %i1, %o1 4000a8c0: 7f ff ff da call 4000a828 4000a8c4: b0 10 20 00 clr %i0 4000a8c8: 80 a2 20 00 cmp %o0, 0 4000a8cc: 12 80 00 06 bne 4000a8e4 4000a8d0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 4000a8d4: 40 00 0e 12 call 4000e11c <__errno> <== NOT EXECUTED 4000a8d8: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4000a8dc: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 4000a8e0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return result; } 4000a8e4: 81 c7 e0 08 ret 4000a8e8: 81 e8 00 00 restore 4000ab68 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4000ab68: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *jnode = node->node_access; 4000ab6c: e0 06 00 00 ld [ %i0 ], %l0 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 4000ab70: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000ab74: 80 a0 60 04 cmp %g1, 4 4000ab78: 02 80 00 04 be 4000ab88 4000ab7c: a2 10 00 18 mov %i0, %l1 rtems_fatal_error_occurred (0xABCD0000); 4000ab80: 7f ff ee 67 call 4000651c <== NOT EXECUTED 4000ab84: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED if ( !jnode->Parent ) 4000ab88: c2 04 20 08 ld [ %l0 + 8 ], %g1 4000ab8c: 80 a0 60 00 cmp %g1, 0 4000ab90: 32 80 00 06 bne,a 4000aba8 4000ab94: c2 24 40 00 st %g1, [ %l1 ] rtems_fatal_error_occurred( 0xBAD00000 ); 4000ab98: 7f ff ee 61 call 4000651c <== NOT EXECUTED 4000ab9c: 11 2e b4 00 sethi %hi(0xbad00000), %o0 <== NOT EXECUTED /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 4000aba0: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 4000aba4: c2 24 40 00 st %g1, [ %l1 ] <== NOT EXECUTED rtems_filesystem_get_sym_start_loc( 4000aba8: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 4000abac: c2 48 40 00 ldsb [ %g1 ], %g1 4000abb0: 80 a0 60 2f cmp %g1, 0x2f 4000abb4: 02 80 00 06 be 4000abcc 4000abb8: 80 a0 60 5c cmp %g1, 0x5c 4000abbc: 02 80 00 04 be 4000abcc 4000abc0: 80 a0 60 00 cmp %g1, 0 4000abc4: 12 80 00 09 bne 4000abe8 4000abc8: 82 10 20 00 clr %g1 4000abcc: 03 10 00 64 sethi %hi(0x40019000), %g1 4000abd0: d2 00 61 e0 ld [ %g1 + 0x1e0 ], %o1 ! 400191e0 4000abd4: 90 10 00 11 mov %l1, %o0 4000abd8: 92 02 60 14 add %o1, 0x14, %o1 4000abdc: 40 00 0f 25 call 4000e870 4000abe0: 94 10 20 10 mov 0x10, %o2 4000abe4: 82 10 20 01 mov 1, %g1 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 4000abe8: d0 04 20 4c ld [ %l0 + 0x4c ], %o0 4000abec: 94 10 00 11 mov %l1, %o2 4000abf0: 90 00 40 08 add %g1, %o0, %o0 4000abf4: 7f ff ff 3e call 4000a8ec 4000abf8: 92 10 00 19 mov %i1, %o1 4000abfc: b0 10 00 08 mov %o0, %i0 &jnode->info.sym_link.name[i], flags, node ); IMFS_Set_handlers( node ); 4000ac00: 7f ff fe f1 call 4000a7c4 4000ac04: 90 10 00 11 mov %l1, %o0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 4000ac08: 90 10 00 11 mov %l1, %o0 4000ac0c: 7f ff ff 07 call 4000a828 4000ac10: 92 10 00 19 mov %i1, %o1 4000ac14: 80 a2 20 00 cmp %o0, 0 4000ac18: 12 80 00 06 bne 4000ac30 4000ac1c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 4000ac20: 40 00 0d 3f call 4000e11c <__errno> <== NOT EXECUTED 4000ac24: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4000ac28: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 4000ac2c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return result; } 4000ac30: 81 c7 e0 08 ret 4000ac34: 81 e8 00 00 restore 4000d654 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 4000d654: 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(); 4000d658: 7f ff f8 3a call 4000b740 4000d65c: f0 06 00 00 ld [ %i0 ], %i0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4000d660: c2 16 20 38 lduh [ %i0 + 0x38 ], %g1 4000d664: 91 2a 20 10 sll %o0, 0x10, %o0 4000d668: 91 32 20 10 srl %o0, 0x10, %o0 4000d66c: 80 a2 00 01 cmp %o0, %g1 4000d670: 02 80 00 04 be 4000d680 4000d674: 80 a2 20 00 cmp %o0, 0 4000d678: 12 80 00 08 bne 4000d698 <== NOT EXECUTED 4000d67c: 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 ) ) ) 4000d680: 83 2e 60 10 sll %i1, 0x10, %g1 4000d684: 83 30 60 10 srl %g1, 0x10, %g1 4000d688: 82 08 7e 00 and %g1, -512, %g1 4000d68c: 80 a0 60 00 cmp %g1, 0 4000d690: 22 80 00 08 be,a 4000d6b0 4000d694: c2 16 20 2e lduh [ %i0 + 0x2e ], %g1 rtems_set_errno_and_return_minus_one( EPERM ); 4000d698: 40 00 02 a1 call 4000e11c <__errno> 4000d69c: 01 00 00 00 nop 4000d6a0: 82 10 20 01 mov 1, %g1 ! 1 4000d6a4: 84 10 3f ff mov -1, %g2 4000d6a8: 10 80 00 0b b 4000d6d4 4000d6ac: c2 22 00 00 st %g1, [ %o0 ] jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO); jnode->st_mode |= mode; IMFS_update_ctime( jnode ); 4000d6b0: 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; 4000d6b4: 82 08 7e 00 and %g1, -512, %g1 4000d6b8: 82 10 40 19 or %g1, %i1, %g1 IMFS_update_ctime( jnode ); 4000d6bc: 92 10 20 00 clr %o1 4000d6c0: 7f ff f8 24 call 4000b750 4000d6c4: c2 36 20 2e sth %g1, [ %i0 + 0x2e ] 4000d6c8: c2 07 bf f0 ld [ %fp + -16 ], %g1 4000d6cc: 84 10 20 00 clr %g2 4000d6d0: c2 26 20 44 st %g1, [ %i0 + 0x44 ] return 0; } 4000d6d4: 81 c7 e0 08 ret 4000d6d8: 91 e8 00 02 restore %g0, %g2, %o0 4000afb0 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 4000afb0: 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 ); 4000afb4: 80 a6 20 00 cmp %i0, 0 4000afb8: 12 80 00 09 bne 4000afdc 4000afbc: 80 a6 60 00 cmp %i1, 0 4000afc0: 11 10 00 60 sethi %hi(0x40018000), %o0 <== NOT EXECUTED 4000afc4: 15 10 00 60 sethi %hi(0x40018000), %o2 <== NOT EXECUTED 4000afc8: 90 12 21 d0 or %o0, 0x1d0, %o0 <== NOT EXECUTED 4000afcc: 94 12 a2 20 or %o2, 0x220, %o2 <== NOT EXECUTED 4000afd0: 7f ff db b9 call 40001eb4 <__assert> <== NOT EXECUTED 4000afd4: 92 10 20 2a mov 0x2a, %o1 <== NOT EXECUTED if ( !name ) 4000afd8: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 4000afdc: 22 80 00 12 be,a 4000b024 4000afe0: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; assert( name ); if ( !directory ) 4000afe4: 80 a6 20 00 cmp %i0, 0 4000afe8: 02 80 00 0f be 4000b024 4000afec: 90 10 00 19 mov %i1, %o0 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 4000aff0: 13 10 00 64 sethi %hi(0x40019000), %o1 4000aff4: 40 00 10 d8 call 4000f354 4000aff8: 92 12 61 60 or %o1, 0x160, %o1 ! 40019160 4000affc: 80 a2 20 00 cmp %o0, 0 4000b000: 02 80 00 09 be 4000b024 4000b004: 90 10 00 19 mov %i1, %o0 return directory; if ( !strcmp( name, dotdotname ) ) 4000b008: 13 10 00 64 sethi %hi(0x40019000), %o1 4000b00c: 40 00 10 d2 call 4000f354 4000b010: 92 12 61 68 or %o1, 0x168, %o1 ! 40019168 4000b014: 80 a2 20 00 cmp %o0, 0 4000b018: 32 80 00 05 bne,a 4000b02c 4000b01c: e0 06 20 4c ld [ %i0 + 0x4c ], %l0 return directory->Parent; 4000b020: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 4000b024: 81 c7 e0 08 ret <== NOT EXECUTED 4000b028: 81 e8 00 00 restore <== NOT EXECUTED the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; !_Chain_Is_tail( the_chain, the_node ); 4000b02c: 10 80 00 09 b 4000b050 4000b030: b0 06 20 50 add %i0, 0x50, %i0 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; if ( !strcmp( name, the_jnode->name ) ) 4000b034: 40 00 10 c8 call 4000f354 4000b038: 90 10 00 19 mov %i1, %o0 4000b03c: 80 a2 20 00 cmp %o0, 0 4000b040: 32 80 00 04 bne,a 4000b050 4000b044: e0 04 00 00 ld [ %l0 ], %l0 4000b048: 81 c7 e0 08 ret 4000b04c: 91 e8 00 10 restore %g0, %l0, %o0 return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; !_Chain_Is_tail( the_chain, the_node ); 4000b050: 80 a4 00 18 cmp %l0, %i0 4000b054: 12 bf ff f8 bne 4000b034 4000b058: 92 04 20 0c add %l0, 0xc, %o1 4000b05c: b0 10 20 00 clr %i0 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 4000b060: 81 c7 e0 08 ret 4000b064: 81 e8 00 00 restore 400158cc : ((IMFS_jnode_t *)( Chain_Head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 400158cc: 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; 400158d0: 94 10 20 10 mov 0x10, %o2 400158d4: 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; 400158d8: 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 ); 400158dc: 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; 400158e0: 40 00 3b 37 call 400245bc 400158e4: 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; 400158e8: c0 26 20 18 clr [ %i0 + 0x18 ] do { next = jnode->Parent; loc.node_access = (void *)jnode; 400158ec: e0 27 bf e8 st %l0, [ %fp + -24 ] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 400158f0: f0 04 20 08 ld [ %l0 + 8 ], %i0 loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 400158f4: 7f ff fd f9 call 400150d8 400158f8: 90 10 00 11 mov %l1, %o0 if ( jnode->type != IMFS_DIRECTORY ) { 400158fc: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40015900: 80 a0 60 01 cmp %g1, 1 40015904: 12 80 00 06 bne 4001591c 40015908: 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 ) ) { 4001590c: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 40015910: 80 a0 40 02 cmp %g1, %g2 40015914: 12 80 00 08 bne 40015934 40015918: 80 a4 20 00 cmp %l0, 0 result = IMFS_unlink( &loc ); 4001591c: 7f ff bb d2 call 40004864 40015920: 90 10 00 11 mov %l1, %o0 if (result != 0) 40015924: 80 a2 20 00 cmp %o0, 0 40015928: 12 80 00 13 bne 40015974 4001592c: a0 10 00 18 mov %i0, %l0 return -1; jnode = next; } if ( jnode != NULL ) { 40015930: 80 a4 20 00 cmp %l0, 0 40015934: 02 80 00 12 be 4001597c 40015938: 01 00 00 00 nop if ( jnode->type == IMFS_DIRECTORY ) { 4001593c: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40015940: 80 a0 60 01 cmp %g1, 1 40015944: 32 bf ff eb bne,a 400158f0 40015948: e0 27 bf e8 st %l0, [ %fp + -24 ] <== NOT EXECUTED if ( jnode_has_children( jnode ) ) 4001594c: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 40015950: 82 04 20 50 add %l0, 0x50, %g1 40015954: 80 a0 80 01 cmp %g2, %g1 40015958: 22 bf ff e6 be,a 400158f0 4001595c: e0 27 bf e8 st %l0, [ %fp + -24 ] jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 40015960: 80 a0 a0 00 cmp %g2, 0 40015964: 02 80 00 06 be 4001597c 40015968: a0 10 00 02 mov %g2, %l0 temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; 4001596c: 10 bf ff e1 b 400158f0 40015970: e0 27 bf e8 st %l0, [ %fp + -24 ] jnode = next; } if ( jnode != NULL ) { if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); 40015974: 81 c7 e0 08 ret <== NOT EXECUTED 40015978: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } } } while (jnode != NULL); return 0; } 4001597c: 81 c7 e0 08 ret 40015980: 91 e8 20 00 restore %g0, 0, %o0 4000b14c : rtems_filesystem_mount_table_entry_t *temp_mt_entry, rtems_filesystem_operations_table *op_table, rtems_filesystem_file_handlers_r *memfile_handlers, rtems_filesystem_file_handlers_r *directory_handlers ) { 4000b14c: 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, 4000b150: 03 10 00 62 sethi %hi(0x40018800), %g1 4000b154: c4 00 63 c0 ld [ %g1 + 0x3c0 ], %g2 ! 40018bc0 4000b158: 86 10 20 00 clr %g3 4000b15c: 10 80 00 05 b 4000b170 4000b160: 82 10 20 10 mov 0x10, %g1 * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { 4000b164: 22 80 00 02 be,a 4000b16c 4000b168: 86 10 20 01 mov 1, %g3 /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 4000b16c: 83 28 60 01 sll %g1, 1, %g1 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); 4000b170: 80 a0 e0 00 cmp %g3, 0 4000b174: 32 80 00 07 bne,a 4000b190 4000b178: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000b17c: 80 a0 62 00 cmp %g1, 0x200 4000b180: 04 bf ff f9 ble 4000b164 4000b184: 80 a0 40 02 cmp %g1, %g2 bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { is_valid = TRUE; } } *dest_bytes_per_block = ((is_valid) 4000b188: 84 10 20 80 mov 0x80, %g2 <== NOT EXECUTED 4000b18c: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED * 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( 4000b190: 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) 4000b194: c4 20 60 00 st %g2, [ %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( 4000b198: 92 10 20 01 mov 1, %o1 4000b19c: 90 10 20 00 clr %o0 4000b1a0: 15 10 00 5f sethi %hi(0x40017c00), %o2 4000b1a4: 17 00 00 10 sethi %hi(0x4000), %o3 4000b1a8: 94 12 a2 98 or %o2, 0x298, %o2 4000b1ac: 40 00 08 cb call 4000d4d8 4000b1b0: 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; 4000b1b4: 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( 4000b1b8: 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; 4000b1bc: f2 26 20 20 st %i1, [ %i0 + 0x20 ] "", ( S_IFDIR | 0755 ), NULL ); temp_mt_entry->mt_fs_root.handlers = directory_handlers; 4000b1c0: 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; 4000b1c4: 13 10 00 65 sethi %hi(0x40019400), %o1 4000b1c8: 90 06 20 30 add %i0, 0x30, %o0 4000b1cc: 40 00 0d a9 call 4000e870 4000b1d0: 92 12 60 d8 or %o1, 0xd8, %o1 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 4000b1d4: 90 10 20 01 mov 1, %o0 4000b1d8: 7f ff dc b3 call 400024a4 4000b1dc: 92 10 20 0c mov 0xc, %o1 if ( !fs_info ){ 4000b1e0: 80 a2 20 00 cmp %o0, 0 4000b1e4: 12 80 00 0a bne 4000b20c 4000b1e8: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 free(temp_mt_entry->mt_fs_root.node_access); 4000b1ec: 7f ff db f0 call 400021ac <== NOT EXECUTED 4000b1f0: 90 10 00 02 mov %g2, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 4000b1f4: 40 00 0b ca call 4000e11c <__errno> <== NOT EXECUTED 4000b1f8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000b1fc: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 4000b200: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000b204: 81 c7 e0 08 ret <== NOT EXECUTED 4000b208: 81 e8 00 00 restore <== NOT EXECUTED /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 4000b20c: 82 10 20 01 mov 1, %g1 4000b210: 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; 4000b214: 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; 4000b218: f6 22 20 08 st %i3, [ %o0 + 8 ] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 4000b21c: 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; 4000b220: 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; } 4000b224: 81 c7 e0 08 ret 4000b228: 91 e8 20 00 restore %g0, 0, %o0 400045f8 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 400045f8: 9d e3 bf 58 save %sp, -168, %sp /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 400045fc: c2 06 00 00 ld [ %i0 ], %g1 40004600: c2 27 bf dc st %g1, [ %fp + -36 ] if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 40004604: c2 10 60 30 lduh [ %g1 + 0x30 ], %g1 40004608: 80 a0 60 07 cmp %g1, 7 4000460c: 08 80 00 06 bleu 40004624 40004610: 90 10 00 1a mov %i2, %o0 rtems_set_errno_and_return_minus_one( EMLINK ); 40004614: 40 00 79 36 call 40022aec <__errno> 40004618: 01 00 00 00 nop 4000461c: 10 80 00 13 b 40004668 40004620: 82 10 20 1f mov 0x1f, %g1 ! 1f /* * Remove any separators at the end of the string. */ IMFS_get_token( token, new_name, &i ); 40004624: a0 07 bf bb add %fp, -69, %l0 40004628: 94 07 bf f4 add %fp, -12, %o2 4000462c: 7f ff ff 78 call 4000440c 40004630: 92 10 00 10 mov %l0, %o1 /* * Create a new link node. */ new_node = IMFS_create_node( 40004634: 90 10 00 19 mov %i1, %o0 40004638: 94 10 00 10 mov %l0, %o2 4000463c: 92 10 20 03 mov 3, %o1 40004640: 17 00 00 28 sethi %hi(0xa000), %o3 40004644: 98 07 bf dc add %fp, -36, %o4 40004648: 40 00 42 3f call 40014f44 4000464c: 96 12 e1 ff or %o3, 0x1ff, %o3 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 40004650: 80 a2 20 00 cmp %o0, 0 40004654: 12 80 00 08 bne 40004674 40004658: c4 07 bf dc ld [ %fp + -36 ], %g2 rtems_set_errno_and_return_minus_one( ENOMEM ); 4000465c: 40 00 79 24 call 40022aec <__errno> <== NOT EXECUTED 40004660: 01 00 00 00 nop <== NOT EXECUTED 40004664: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 40004668: c2 22 00 00 st %g1, [ %o0 ] 4000466c: 81 c7 e0 08 ret 40004670: 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 ); 40004674: 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++; 40004678: c2 10 a0 30 lduh [ %g2 + 0x30 ], %g1 IMFS_update_ctime( info.hard_link.link_node ); 4000467c: 92 10 20 00 clr %o1 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 40004680: 82 00 60 01 inc %g1 IMFS_update_ctime( info.hard_link.link_node ); 40004684: 40 00 01 cf call 40004dc0 40004688: c2 30 a0 30 sth %g1, [ %g2 + 0x30 ] 4000468c: c4 07 bf ec ld [ %fp + -20 ], %g2 40004690: c2 07 bf dc ld [ %fp + -36 ], %g1 40004694: c4 20 60 44 st %g2, [ %g1 + 0x44 ] return 0; } 40004698: 81 c7 e0 08 ret 4000469c: 91 e8 20 00 restore %g0, 0, %o0 40019f70 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 40019f70: 9d e3 bf 98 save %sp, -104, %sp block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 40019f74: 80 a6 20 00 cmp %i0, 0 40019f78: 32 80 00 09 bne,a 40019f9c 40019f7c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40019f80: 92 10 21 69 mov 0x169, %o1 <== NOT EXECUTED 40019f84: 11 10 00 d6 sethi %hi(0x40035800), %o0 <== NOT EXECUTED 40019f88: 15 10 00 d7 sethi %hi(0x40035c00), %o2 <== NOT EXECUTED 40019f8c: 90 12 23 b0 or %o0, 0x3b0, %o0 <== NOT EXECUTED 40019f90: 7f ff aa d1 call 40004ad4 <__assert> <== NOT EXECUTED 40019f94: 94 12 a0 00 mov %o2, %o2 <== NOT EXECUTED 40019f98: 30 80 00 0d b,a 40019fcc <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 40019f9c: 80 a0 60 05 cmp %g1, 5 40019fa0: 02 80 00 07 be 40019fbc 40019fa4: 11 10 00 d6 sethi %hi(0x40035800), %o0 40019fa8: 15 10 00 d7 sethi %hi(0x40035c00), %o2 <== NOT EXECUTED 40019fac: 90 12 23 b0 or %o0, 0x3b0, %o0 <== NOT EXECUTED 40019fb0: 94 12 a0 10 or %o2, 0x10, %o2 <== NOT EXECUTED 40019fb4: 7f ff aa c8 call 40004ad4 <__assert> <== NOT EXECUTED 40019fb8: 92 10 21 6d mov 0x16d, %o1 <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) 40019fbc: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40019fc0: 80 a0 60 05 cmp %g1, 5 40019fc4: 02 80 00 08 be 40019fe4 40019fc8: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( EIO ); 40019fcc: 40 00 22 c8 call 40022aec <__errno> <== NOT EXECUTED 40019fd0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40019fd4: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 40019fd8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40019fdc: 81 c7 e0 08 ret 40019fe0: 81 e8 00 00 restore block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 40019fe4: 92 10 00 19 mov %i1, %o1 40019fe8: 7f ff fe 68 call 40019988 40019fec: 94 10 20 01 mov 1, %o2 if ( *block_entry_ptr ) 40019ff0: 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 ); 40019ff4: b2 10 00 08 mov %o0, %i1 if ( *block_entry_ptr ) 40019ff8: 80 a0 60 00 cmp %g1, 0 40019ffc: 12 bf ff f8 bne 40019fdc 4001a000: b0 10 20 00 clr %i0 #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 4001a004: 7f ff fe 54 call 40019954 4001a008: b0 10 20 01 mov 1, %i0 if ( !memory ) 4001a00c: 80 a2 20 00 cmp %o0, 0 4001a010: 02 80 00 04 be 4001a020 4001a014: 01 00 00 00 nop return 1; *block_entry_ptr = memory; 4001a018: d0 26 40 00 st %o0, [ %i1 ] 4001a01c: b0 10 20 00 clr %i0 return 0; } 4001a020: 81 c7 e0 08 ret 4001a024: 81 e8 00 00 restore 4001a028 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 4001a028: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 4001a02c: 80 a6 20 00 cmp %i0, 0 4001a030: 32 80 00 09 bne,a 4001a054 4001a034: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4001a038: 92 10 21 31 mov 0x131, %o1 <== NOT EXECUTED 4001a03c: 11 10 00 d6 sethi %hi(0x40035800), %o0 <== NOT EXECUTED 4001a040: 15 10 00 d7 sethi %hi(0x40035c00), %o2 <== NOT EXECUTED 4001a044: 90 12 23 b0 or %o0, 0x3b0, %o0 <== NOT EXECUTED 4001a048: 7f ff aa a3 call 40004ad4 <__assert> <== NOT EXECUTED 4001a04c: 94 12 a0 00 mov %o2, %o2 <== NOT EXECUTED 4001a050: 30 80 00 0d b,a 4001a084 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4001a054: 80 a0 60 05 cmp %g1, 5 4001a058: 02 80 00 07 be 4001a074 4001a05c: 11 10 00 d6 sethi %hi(0x40035800), %o0 4001a060: 15 10 00 d7 sethi %hi(0x40035c00), %o2 <== NOT EXECUTED 4001a064: 90 12 23 b0 or %o0, 0x3b0, %o0 <== NOT EXECUTED 4001a068: 94 12 a0 10 or %o2, 0x10, %o2 <== NOT EXECUTED 4001a06c: 7f ff aa 9a call 40004ad4 <__assert> <== NOT EXECUTED 4001a070: 92 10 21 35 mov 0x135, %o1 <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) 4001a074: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4001a078: 80 a0 60 05 cmp %g1, 5 4001a07c: 22 80 00 06 be,a 4001a094 4001a080: 03 10 00 e8 sethi %hi(0x4003a000), %g1 rtems_set_errno_and_return_minus_one( EIO ); 4001a084: 40 00 22 9a call 40022aec <__errno> <== NOT EXECUTED 4001a088: 01 00 00 00 nop <== NOT EXECUTED 4001a08c: 10 80 00 31 b 4001a150 <== NOT EXECUTED 4001a090: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 4001a094: e2 00 62 f4 ld [ %g1 + 0x2f4 ], %l1 4001a098: a1 34 60 02 srl %l1, 2, %l0 4001a09c: 92 10 00 10 mov %l0, %o1 4001a0a0: 7f ff a3 d6 call 40002ff8 <.umul> 4001a0a4: 90 04 20 01 add %l0, 1, %o0 4001a0a8: 92 10 00 10 mov %l0, %o1 4001a0ac: 7f ff a3 d3 call 40002ff8 <.umul> 4001a0b0: 90 02 20 01 inc %o0 4001a0b4: 92 10 00 11 mov %l1, %o1 4001a0b8: 7f ff a3 d0 call 40002ff8 <.umul> 4001a0bc: 90 02 3f ff add %o0, -1, %o0 4001a0c0: 80 a6 40 08 cmp %i1, %o0 4001a0c4: 2a 80 00 06 bcs,a 4001a0dc 4001a0c8: e0 06 20 4c ld [ %i0 + 0x4c ], %l0 rtems_set_errno_and_return_minus_one( EINVAL ); 4001a0cc: 40 00 22 88 call 40022aec <__errno> <== NOT EXECUTED 4001a0d0: 01 00 00 00 nop <== NOT EXECUTED 4001a0d4: 10 80 00 1f b 4001a150 <== NOT EXECUTED 4001a0d8: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) 4001a0dc: 80 a6 40 10 cmp %i1, %l0 4001a0e0: 04 80 00 24 ble 4001a170 4001a0e4: 82 10 20 00 clr %g1 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 4001a0e8: 92 10 00 11 mov %l1, %o1 4001a0ec: 40 00 5f 5f call 40031e68 <.div> 4001a0f0: 90 10 00 19 mov %i1, %o0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 4001a0f4: 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; 4001a0f8: a4 10 00 08 mov %o0, %l2 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 4001a0fc: 40 00 5f 5b call 40031e68 <.div> 4001a100: 90 10 00 10 mov %l0, %o0 4001a104: a0 10 00 08 mov %o0, %l0 4001a108: 10 80 00 15 b 4001a15c 4001a10c: a2 10 00 08 mov %o0, %l1 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { 4001a110: 7f ff ff 98 call 40019f70 4001a114: 90 10 00 18 mov %i0, %o0 4001a118: 80 a2 20 00 cmp %o0, 0 4001a11c: 22 80 00 10 be,a 4001a15c 4001a120: a0 04 20 01 inc %l0 for ( ; block>=old_blocks ; block-- ) { 4001a124: 10 80 00 06 b 4001a13c <== NOT EXECUTED 4001a128: 80 a4 00 11 cmp %l0, %l1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 4001a12c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001a130: 7f ff fe c6 call 40019c48 <== NOT EXECUTED 4001a134: 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-- ) { 4001a138: 80 a4 00 11 cmp %l0, %l1 <== NOT EXECUTED 4001a13c: 1a bf ff fc bcc 4001a12c <== NOT EXECUTED 4001a140: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 4001a144: 40 00 22 6a call 40022aec <__errno> <== NOT EXECUTED 4001a148: 01 00 00 00 nop <== NOT EXECUTED 4001a14c: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 4001a150: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001a154: 10 80 00 07 b 4001a170 <== NOT EXECUTED 4001a158: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4001a15c: 80 a4 00 12 cmp %l0, %l2 4001a160: 08 bf ff ec bleu 4001a110 4001a164: 92 10 00 10 mov %l0, %o1 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 4001a168: f2 26 20 4c st %i1, [ %i0 + 0x4c ] 4001a16c: 82 10 20 00 clr %g1 return 0; } 4001a170: 81 c7 e0 08 ret 4001a174: 91 e8 00 01 restore %g0, %g1, %o0 40019988 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 40019988: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 4001998c: 80 a6 20 00 cmp %i0, 0 40019990: 32 80 00 0a bne,a 400199b8 40019994: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40019998: 11 10 00 d6 sethi %hi(0x40035800), %o0 <== NOT EXECUTED 4001999c: 92 10 23 86 mov 0x386, %o1 <== NOT EXECUTED 400199a0: 90 12 23 b0 or %o0, 0x3b0, %o0 <== NOT EXECUTED 400199a4: 15 10 00 d7 sethi %hi(0x40035c00), %o2 <== NOT EXECUTED 400199a8: 7f ff ac 4b call 40004ad4 <__assert> <== NOT EXECUTED 400199ac: 94 12 a0 00 mov %o2, %o2 ! 40035c00 <_POSIX_Threads_Default_attributes+0x88> <== NOT EXECUTED 400199b0: 81 c7 e0 08 ret <== NOT EXECUTED 400199b4: 81 e8 00 00 restore <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 400199b8: 80 a0 60 05 cmp %g1, 5 400199bc: 02 80 00 07 be 400199d8 400199c0: 11 10 00 d6 sethi %hi(0x40035800), %o0 400199c4: 15 10 00 d7 sethi %hi(0x40035c00), %o2 <== NOT EXECUTED 400199c8: 90 12 23 b0 or %o0, 0x3b0, %o0 <== NOT EXECUTED 400199cc: 94 12 a0 10 or %o2, 0x10, %o2 <== NOT EXECUTED 400199d0: 7f ff ac 41 call 40004ad4 <__assert> <== NOT EXECUTED 400199d4: 92 10 23 8a mov 0x38a, %o1 <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) 400199d8: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 400199dc: 80 a0 60 05 cmp %g1, 5 400199e0: 32 bf ff f4 bne,a 400199b0 400199e4: b0 10 20 00 clr %i0 <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 400199e8: 03 10 00 e8 sethi %hi(0x4003a000), %g1 400199ec: c2 00 62 f4 ld [ %g1 + 0x2f4 ], %g1 ! 4003a2f4 400199f0: a3 30 60 02 srl %g1, 2, %l1 400199f4: 82 04 7f ff add %l1, -1, %g1 400199f8: 80 a6 40 01 cmp %i1, %g1 400199fc: 18 80 00 15 bgu 40019a50 40019a00: 90 04 60 01 add %l1, 1, %o0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { 40019a04: 80 a6 a0 00 cmp %i2, 0 40019a08: 02 80 00 0e be 40019a40 40019a0c: e0 06 20 50 ld [ %i0 + 0x50 ], %l0 if ( !p ) { 40019a10: 80 a4 20 00 cmp %l0, 0 40019a14: 32 80 00 09 bne,a 40019a38 40019a18: c4 06 20 50 ld [ %i0 + 0x50 ], %g2 p = memfile_alloc_block(); 40019a1c: 7f ff ff ce call 40019954 40019a20: 01 00 00 00 nop if ( !p ) 40019a24: 80 a2 20 00 cmp %o0, 0 40019a28: 22 bf ff e2 be,a 400199b0 40019a2c: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->indirect = p; 40019a30: d0 26 20 50 st %o0, [ %i0 + 0x50 ] } return &info->indirect[ my_block ]; 40019a34: c4 06 20 50 ld [ %i0 + 0x50 ], %g2 40019a38: 10 80 00 7f b 40019c34 40019a3c: 83 2e 60 02 sll %i1, 2, %g1 } if ( !p ) return 0; return &info->indirect[ my_block ]; 40019a40: 83 2e 60 02 sll %i1, 2, %g1 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 40019a44: 80 a4 20 00 cmp %l0, 0 return 0; return &info->indirect[ my_block ]; 40019a48: 10 80 00 32 b 40019b10 40019a4c: b0 04 00 01 add %l0, %g1, %i0 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 40019a50: 7f ff a5 6a call 40002ff8 <.umul> <== NOT EXECUTED 40019a54: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40019a58: 82 02 3f ff add %o0, -1, %g1 <== NOT EXECUTED 40019a5c: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 40019a60: 18 80 00 30 bgu 40019b20 <== NOT EXECUTED 40019a64: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 40019a68: a0 26 40 11 sub %i1, %l1, %l0 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 40019a6c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40019a70: 40 00 61 a8 call 40032110 <.urem> <== NOT EXECUTED 40019a74: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40019a78: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 40019a7c: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40019a80: 40 00 60 f8 call 40031e60 <.udiv> <== NOT EXECUTED 40019a84: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 40019a88: 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; 40019a8c: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 40019a90: 02 80 00 18 be 40019af0 <== NOT EXECUTED 40019a94: e0 06 20 54 ld [ %i0 + 0x54 ], %l0 <== NOT EXECUTED if ( !p ) { 40019a98: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40019a9c: 32 80 00 09 bne,a 40019ac0 <== NOT EXECUTED 40019aa0: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED p = memfile_alloc_block(); 40019aa4: 7f ff ff ac call 40019954 <== NOT EXECUTED 40019aa8: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 40019aac: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40019ab0: 02 80 00 63 be 40019c3c <== NOT EXECUTED 40019ab4: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED return 0; info->doubly_indirect = p; 40019ab8: d0 26 20 54 st %o0, [ %i0 + 0x54 ] <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; 40019abc: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED 40019ac0: c2 04 00 11 ld [ %l0 + %l1 ], %g1 <== NOT EXECUTED if ( !p1 ) { 40019ac4: 90 90 60 00 orcc %g1, 0, %o0 <== NOT EXECUTED 40019ac8: 12 80 00 4f bne 40019c04 <== NOT EXECUTED 40019acc: 83 2c a0 02 sll %l2, 2, %g1 <== NOT EXECUTED p1 = memfile_alloc_block(); 40019ad0: 7f ff ff a1 call 40019954 <== NOT EXECUTED 40019ad4: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 40019ad8: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 40019adc: 02 80 00 58 be 40019c3c <== NOT EXECUTED 40019ae0: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 40019ae4: c2 24 00 11 st %g1, [ %l0 + %l1 ] <== NOT EXECUTED } return (block_p *)&p1[ singly ]; 40019ae8: 10 80 00 47 b 40019c04 <== NOT EXECUTED 40019aec: 83 2c a0 02 sll %l2, 2, %g1 <== NOT EXECUTED } if ( !p ) 40019af0: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40019af4: 02 bf ff af be 400199b0 <== NOT EXECUTED 40019af8: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 40019afc: 83 2a 20 02 sll %o0, 2, %g1 <== NOT EXECUTED 40019b00: c2 04 00 01 ld [ %l0 + %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 ]; 40019b04: 85 2c a0 02 sll %l2, 2, %g2 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 40019b08: 80 a0 60 00 cmp %g1, 0 <== 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 ]; 40019b0c: b0 00 40 02 add %g1, %g2, %i0 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 40019b10: 12 80 00 4c bne 40019c40 40019b14: 01 00 00 00 nop p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 40019b18: 81 c7 e0 08 ret <== NOT EXECUTED 40019b1c: 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 ) { 40019b20: 90 02 20 01 inc %o0 <== NOT EXECUTED 40019b24: 7f ff a5 35 call 40002ff8 <.umul> <== NOT EXECUTED 40019b28: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40019b2c: 90 02 3f ff add %o0, -1, %o0 <== NOT EXECUTED 40019b30: 80 a6 40 08 cmp %i1, %o0 <== NOT EXECUTED 40019b34: 18 80 00 42 bgu 40019c3c <== NOT EXECUTED 40019b38: a0 26 40 10 sub %i1, %l0, %l0 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 40019b3c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40019b40: 40 00 61 74 call 40032110 <.urem> <== NOT EXECUTED 40019b44: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40019b48: 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; 40019b4c: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40019b50: 40 00 60 c4 call 40031e60 <.udiv> <== NOT EXECUTED 40019b54: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 40019b58: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40019b5c: 40 00 60 c1 call 40031e60 <.udiv> <== NOT EXECUTED 40019b60: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 40019b64: 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; 40019b68: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 40019b6c: 40 00 61 69 call 40032110 <.urem> <== NOT EXECUTED 40019b70: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 40019b74: 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; 40019b78: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 40019b7c: 02 80 00 24 be 40019c0c <== NOT EXECUTED 40019b80: e0 06 20 58 ld [ %i0 + 0x58 ], %l0 <== NOT EXECUTED if ( !p ) { 40019b84: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40019b88: 12 80 00 09 bne 40019bac <== NOT EXECUTED 40019b8c: b5 2e 60 02 sll %i1, 2, %i2 <== NOT EXECUTED p = memfile_alloc_block(); 40019b90: 7f ff ff 71 call 40019954 <== NOT EXECUTED 40019b94: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 40019b98: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40019b9c: 02 80 00 28 be 40019c3c <== NOT EXECUTED 40019ba0: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED return 0; info->triply_indirect = p; 40019ba4: d0 26 20 58 st %o0, [ %i0 + 0x58 ] <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 40019ba8: b5 2e 60 02 sll %i1, 2, %i2 <== NOT EXECUTED 40019bac: c2 04 00 1a ld [ %l0 + %i2 ], %g1 <== NOT EXECUTED if ( !p1 ) { 40019bb0: a2 90 60 00 orcc %g1, 0, %l1 <== NOT EXECUTED 40019bb4: 32 80 00 09 bne,a 40019bd8 <== NOT EXECUTED 40019bb8: a1 2c a0 02 sll %l2, 2, %l0 <== NOT EXECUTED p1 = memfile_alloc_block(); 40019bbc: 7f ff ff 66 call 40019954 <== NOT EXECUTED 40019bc0: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 40019bc4: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 40019bc8: 02 80 00 1d be 40019c3c <== NOT EXECUTED 40019bcc: a2 10 00 01 mov %g1, %l1 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 40019bd0: c2 24 00 1a st %g1, [ %l0 + %i2 ] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 40019bd4: a1 2c a0 02 sll %l2, 2, %l0 <== NOT EXECUTED 40019bd8: c2 04 40 10 ld [ %l1 + %l0 ], %g1 <== NOT EXECUTED if ( !p2 ) { 40019bdc: 90 90 60 00 orcc %g1, 0, %o0 <== NOT EXECUTED 40019be0: 12 80 00 09 bne 40019c04 <== NOT EXECUTED 40019be4: 83 2c e0 02 sll %l3, 2, %g1 <== NOT EXECUTED p2 = memfile_alloc_block(); 40019be8: 7f ff ff 5b call 40019954 <== NOT EXECUTED 40019bec: 01 00 00 00 nop <== NOT EXECUTED if ( !p2 ) 40019bf0: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 40019bf4: 02 80 00 12 be 40019c3c <== NOT EXECUTED 40019bf8: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 40019bfc: c2 24 40 10 st %g1, [ %l1 + %l0 ] <== NOT EXECUTED } return (block_p *)&p2[ singly ]; 40019c00: 83 2c e0 02 sll %l3, 2, %g1 <== NOT EXECUTED 40019c04: 81 c7 e0 08 ret <== NOT EXECUTED 40019c08: 91 ea 00 01 restore %o0, %g1, %o0 <== NOT EXECUTED } if ( !p ) 40019c0c: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40019c10: 02 bf ff 68 be 400199b0 <== NOT EXECUTED 40019c14: 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 ]; 40019c18: 83 2e 60 02 sll %i1, 2, %g1 <== NOT EXECUTED 40019c1c: d0 04 00 01 ld [ %l0 + %g1 ], %o0 <== NOT EXECUTED if ( !p1 ) 40019c20: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40019c24: 02 bf ff 63 be 400199b0 <== NOT EXECUTED 40019c28: 83 2c a0 02 sll %l2, 2, %g1 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 40019c2c: c4 02 00 01 ld [ %o0 + %g1 ], %g2 <== NOT EXECUTED 40019c30: 83 2c e0 02 sll %l3, 2, %g1 <== NOT EXECUTED 40019c34: 81 c7 e0 08 ret 40019c38: 91 e8 40 02 restore %g1, %g2, %o0 40019c3c: b0 10 20 00 clr %i0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 40019c40: 81 c7 e0 08 ret 40019c44: 81 e8 00 00 restore 4001a568 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 4001a568: 9d e3 bf 90 save %sp, -112, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 4001a56c: a8 96 20 00 orcc %i0, 0, %l4 4001a570: 32 80 00 09 bne,a 4001a594 4001a574: c2 05 20 48 ld [ %l4 + 0x48 ], %g1 4001a578: 92 10 22 4a mov 0x24a, %o1 <== NOT EXECUTED 4001a57c: 11 10 00 d6 sethi %hi(0x40035800), %o0 <== NOT EXECUTED 4001a580: 15 10 00 d7 sethi %hi(0x40035c00), %o2 <== NOT EXECUTED 4001a584: 90 12 23 b0 or %o0, 0x3b0, %o0 <== NOT EXECUTED 4001a588: 7f ff a9 53 call 40004ad4 <__assert> <== NOT EXECUTED 4001a58c: 94 12 a0 00 mov %o2, %o2 <== NOT EXECUTED 4001a590: 30 80 00 0f b,a 4001a5cc <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 4001a594: 82 00 7f fb add %g1, -5, %g1 4001a598: 80 a0 60 01 cmp %g1, 1 4001a59c: 08 80 00 07 bleu 4001a5b8 4001a5a0: 11 10 00 d6 sethi %hi(0x40035800), %o0 4001a5a4: 15 10 00 d7 sethi %hi(0x40035c00), %o2 <== NOT EXECUTED 4001a5a8: 90 12 23 b0 or %o0, 0x3b0, %o0 <== NOT EXECUTED 4001a5ac: 94 12 a0 60 or %o2, 0x60, %o2 <== NOT EXECUTED 4001a5b0: 7f ff a9 49 call 40004ad4 <__assert> <== NOT EXECUTED 4001a5b4: 92 10 22 4f mov 0x24f, %o1 <== NOT EXECUTED the_jnode->type == IMFS_LINEAR_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE && 4001a5b8: c4 05 20 48 ld [ %l4 + 0x48 ], %g2 4001a5bc: 82 00 bf fb add %g2, -5, %g1 4001a5c0: 80 a0 60 01 cmp %g1, 1 4001a5c4: 08 80 00 06 bleu 4001a5dc 4001a5c8: 80 a6 a0 00 cmp %i2, 0 the_jnode->type != IMFS_LINEAR_FILE ) rtems_set_errno_and_return_minus_one( EIO ); 4001a5cc: 40 00 21 48 call 40022aec <__errno> <== NOT EXECUTED 4001a5d0: 01 00 00 00 nop <== NOT EXECUTED 4001a5d4: 10 80 00 0d b 4001a608 <== NOT EXECUTED 4001a5d8: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 4001a5dc: 12 80 00 0e bne 4001a614 4001a5e0: 80 a6 e0 00 cmp %i3, 0 4001a5e4: 11 10 00 d6 sethi %hi(0x40035800), %o0 <== NOT EXECUTED 4001a5e8: 15 10 00 d7 sethi %hi(0x40035c00), %o2 <== NOT EXECUTED 4001a5ec: 92 10 22 58 mov 0x258, %o1 <== NOT EXECUTED 4001a5f0: 90 12 23 b0 or %o0, 0x3b0, %o0 <== NOT EXECUTED 4001a5f4: 7f ff a9 38 call 40004ad4 <__assert> <== NOT EXECUTED 4001a5f8: 94 12 a0 b0 or %o2, 0xb0, %o2 <== NOT EXECUTED if ( !dest ) rtems_set_errno_and_return_minus_one( EINVAL ); 4001a5fc: 40 00 21 3c call 40022aec <__errno> <== NOT EXECUTED 4001a600: 01 00 00 00 nop <== NOT EXECUTED 4001a604: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4001a608: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001a60c: 10 80 00 74 b 4001a7dc <== NOT EXECUTED 4001a610: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 4001a614: 02 bf ff fa be 4001a5fc 4001a618: 80 a0 a0 06 cmp %g2, 6 /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 4001a61c: 32 80 00 0d bne,a 4001a650 4001a620: c4 05 20 4c ld [ %l4 + 0x4c ], %g2 unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 4001a624: c2 05 20 4c ld [ %l4 + 0x4c ], %g1 <== NOT EXECUTED 4001a628: b0 10 00 1b mov %i3, %i0 <== NOT EXECUTED 4001a62c: 82 20 40 19 sub %g1, %i1, %g1 <== NOT EXECUTED 4001a630: 80 a6 c0 01 cmp %i3, %g1 <== NOT EXECUTED 4001a634: 08 80 00 03 bleu 4001a640 <== NOT EXECUTED 4001a638: d2 05 20 50 ld [ %l4 + 0x50 ], %o1 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 4001a63c: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 4001a640: 92 02 40 19 add %o1, %i1, %o1 <== NOT EXECUTED 4001a644: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED 4001a648: 10 80 00 5d b 4001a7bc <== NOT EXECUTED 4001a64c: 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 ) 4001a650: 82 06 c0 19 add %i3, %i1, %g1 4001a654: 80 a0 40 02 cmp %g1, %g2 4001a658: 08 80 00 03 bleu 4001a664 4001a65c: a0 10 00 1b mov %i3, %l0 my_length = the_jnode->info.file.size - start; 4001a660: a0 20 80 19 sub %g2, %i1, %l0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4001a664: 03 10 00 e8 sethi %hi(0x4003a000), %g1 4001a668: e2 00 62 f4 ld [ %g1 + 0x2f4 ], %l1 ! 4003a2f4 4001a66c: 90 10 00 19 mov %i1, %o0 4001a670: 40 00 5e aa call 40032118 <.rem> 4001a674: 92 10 00 11 mov %l1, %o1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4001a678: 92 10 00 11 mov %l1, %o1 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4001a67c: a4 10 00 08 mov %o0, %l2 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4001a680: 40 00 5d fa call 40031e68 <.div> 4001a684: 90 10 00 19 mov %i1, %o0 if ( start_offset ) { 4001a688: 80 a4 a0 00 cmp %l2, 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; 4001a68c: b2 10 00 08 mov %o0, %i1 if ( start_offset ) { 4001a690: a6 10 00 1a mov %i2, %l3 4001a694: 02 80 00 1d be 4001a708 4001a698: 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 ); 4001a69c: 90 10 00 14 mov %l4, %o0 4001a6a0: 92 10 00 19 mov %i1, %o1 4001a6a4: 7f ff fc b9 call 40019988 4001a6a8: 94 10 20 00 clr %o2 assert( block_ptr ); 4001a6ac: 80 a2 20 00 cmp %o0, 0 4001a6b0: 12 80 00 0a bne 4001a6d8 4001a6b4: 92 24 40 12 sub %l1, %l2, %o1 4001a6b8: 11 10 00 d6 sethi %hi(0x40035800), %o0 <== NOT EXECUTED 4001a6bc: 92 10 22 94 mov 0x294, %o1 <== NOT EXECUTED 4001a6c0: 90 12 23 b0 or %o0, 0x3b0, %o0 <== NOT EXECUTED 4001a6c4: 15 10 00 d7 sethi %hi(0x40035c00), %o2 <== NOT EXECUTED 4001a6c8: 7f ff a9 03 call 40004ad4 <__assert> <== NOT EXECUTED 4001a6cc: 94 12 a0 50 or %o2, 0x50, %o2 ! 40035c50 <_POSIX_Threads_Default_attributes+0xd8> <== NOT EXECUTED 4001a6d0: 10 80 00 43 b 4001a7dc <== NOT EXECUTED 4001a6d4: 94 10 20 00 clr %o2 <== 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; 4001a6d8: 80 a4 00 09 cmp %l0, %o1 4001a6dc: 08 80 00 03 bleu 4001a6e8 4001a6e0: 94 10 00 10 mov %l0, %o2 4001a6e4: 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 ); 4001a6e8: d2 02 00 00 ld [ %o0 ], %o1 dest += to_copy; 4001a6ec: a6 06 80 0a add %i2, %o2, %l3 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 ); 4001a6f0: 92 04 80 09 add %l2, %o1, %o1 dest += to_copy; block++; 4001a6f4: b2 06 60 01 inc %i1 my_length -= to_copy; 4001a6f8: a0 24 00 0a sub %l0, %o2, %l0 4001a6fc: 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 ); 4001a700: 40 00 27 af call 400245bc 4001a704: 90 10 00 1a mov %i2, %o0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4001a708: 03 10 00 e8 sethi %hi(0x4003a000), %g1 4001a70c: f4 00 62 f4 ld [ %g1 + 0x2f4 ], %i2 ! 4003a2f4 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4001a710: 10 80 00 12 b 4001a758 4001a714: a2 10 00 01 mov %g1, %l1 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4001a718: 7f ff fc 9c call 40019988 4001a71c: 01 00 00 00 nop assert( block_ptr ); 4001a720: 80 a2 20 00 cmp %o0, 0 4001a724: 32 80 00 06 bne,a 4001a73c 4001a728: d2 02 00 00 ld [ %o0 ], %o1 4001a72c: 11 10 00 d6 sethi %hi(0x40035800), %o0 <== NOT EXECUTED 4001a730: 92 10 22 a5 mov 0x2a5, %o1 <== NOT EXECUTED 4001a734: 10 80 00 1a b 4001a79c <== NOT EXECUTED 4001a738: 90 12 23 b0 or %o0, 0x3b0, %o0 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; 4001a73c: 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 ); 4001a740: 90 10 00 13 mov %l3, %o0 dest += to_copy; block++; my_length -= to_copy; 4001a744: a0 24 00 1a sub %l0, %i2, %l0 copied += to_copy; 4001a748: b0 06 00 1a add %i0, %i2, %i0 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 ); 4001a74c: a6 04 c0 1a add %l3, %i2, %l3 4001a750: 40 00 27 9b call 400245bc 4001a754: 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 ) { 4001a758: c2 04 62 f4 ld [ %l1 + 0x2f4 ], %g1 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4001a75c: 92 10 00 19 mov %i1, %o1 4001a760: 94 10 20 00 clr %o2 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4001a764: 80 a4 00 01 cmp %l0, %g1 4001a768: 1a bf ff ec bcc 4001a718 4001a76c: 90 10 00 14 mov %l4, %o0 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 4001a770: 80 a4 20 00 cmp %l0, 0 4001a774: 22 80 00 15 be,a 4001a7c8 4001a778: 90 07 bf f0 add %fp, -16, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4001a77c: 7f ff fc 83 call 40019988 4001a780: 01 00 00 00 nop assert( block_ptr ); 4001a784: 80 a2 20 00 cmp %o0, 0 4001a788: 32 80 00 0a bne,a 4001a7b0 4001a78c: d2 02 00 00 ld [ %o0 ], %o1 4001a790: 11 10 00 d6 sethi %hi(0x40035800), %o0 <== NOT EXECUTED 4001a794: 92 10 22 b7 mov 0x2b7, %o1 <== NOT EXECUTED 4001a798: 90 12 23 b0 or %o0, 0x3b0, %o0 <== NOT EXECUTED 4001a79c: 15 10 00 d7 sethi %hi(0x40035c00), %o2 <== NOT EXECUTED 4001a7a0: 7f ff a8 cd call 40004ad4 <__assert> <== NOT EXECUTED 4001a7a4: 94 12 a0 50 or %o2, 0x50, %o2 ! 40035c50 <_POSIX_Threads_Default_attributes+0xd8> <== NOT EXECUTED if ( !block_ptr ) return copied; 4001a7a8: 10 80 00 0d b 4001a7dc <== NOT EXECUTED 4001a7ac: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; 4001a7b0: b0 06 00 10 add %i0, %l0, %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 ); 4001a7b4: 90 10 00 13 mov %l3, %o0 4001a7b8: 94 10 00 10 mov %l0, %o2 4001a7bc: 40 00 27 80 call 400245bc 4001a7c0: 01 00 00 00 nop copied += my_length; } IMFS_update_atime( the_jnode ); 4001a7c4: 90 07 bf f0 add %fp, -16, %o0 4001a7c8: 7f ff a9 7e call 40004dc0 4001a7cc: 92 10 20 00 clr %o1 4001a7d0: c2 07 bf f0 ld [ %fp + -16 ], %g1 return copied; 4001a7d4: 94 10 00 18 mov %i0, %o2 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); 4001a7d8: c2 25 20 3c st %g1, [ %l4 + 0x3c ] return copied; } 4001a7dc: 81 c7 e0 08 ret 4001a7e0: 91 e8 00 0a restore %g0, %o2, %o0 40019ce8 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 40019ce8: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40019cec: 80 a6 20 00 cmp %i0, 0 40019cf0: 32 80 00 09 bne,a 40019d14 40019cf4: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40019cf8: 92 10 21 ec mov 0x1ec, %o1 <== NOT EXECUTED 40019cfc: 11 10 00 d6 sethi %hi(0x40035800), %o0 <== NOT EXECUTED 40019d00: 15 10 00 d7 sethi %hi(0x40035c00), %o2 <== NOT EXECUTED 40019d04: 90 12 23 b0 or %o0, 0x3b0, %o0 <== NOT EXECUTED 40019d08: 7f ff ab 73 call 40004ad4 <__assert> <== NOT EXECUTED 40019d0c: 94 12 a0 00 mov %o2, %o2 <== NOT EXECUTED 40019d10: 30 80 00 0d b,a 40019d44 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 40019d14: 80 a0 60 05 cmp %g1, 5 40019d18: 02 80 00 07 be 40019d34 40019d1c: 11 10 00 d6 sethi %hi(0x40035800), %o0 40019d20: 15 10 00 d7 sethi %hi(0x40035c00), %o2 <== NOT EXECUTED 40019d24: 90 12 23 b0 or %o0, 0x3b0, %o0 <== NOT EXECUTED 40019d28: 94 12 a0 10 or %o2, 0x10, %o2 <== NOT EXECUTED 40019d2c: 7f ff ab 6a call 40004ad4 <__assert> <== NOT EXECUTED 40019d30: 92 10 21 f0 mov 0x1f0, %o1 <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) 40019d34: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40019d38: 80 a0 60 05 cmp %g1, 5 40019d3c: 22 80 00 08 be,a 40019d5c 40019d40: 21 10 00 e8 sethi %hi(0x4003a000), %l0 rtems_set_errno_and_return_minus_one( EIO ); 40019d44: 40 00 23 6a call 40022aec <__errno> <== NOT EXECUTED 40019d48: 01 00 00 00 nop <== NOT EXECUTED 40019d4c: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 40019d50: 84 10 3f ff mov -1, %g2 <== NOT EXECUTED 40019d54: 10 80 00 4b b 40019e80 <== NOT EXECUTED 40019d58: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 40019d5c: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; 40019d60: c4 04 22 f4 ld [ %l0 + 0x2f4 ], %g2 * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 40019d64: 80 a0 60 00 cmp %g1, 0 40019d68: 02 80 00 05 be 40019d7c 40019d6c: a5 30 a0 02 srl %g2, 2, %l2 memfile_free_blocks_in_table( &info->indirect, to_free ); 40019d70: 90 06 20 50 add %i0, 0x50, %o0 40019d74: 7f ff ff c1 call 40019c78 40019d78: 92 10 00 12 mov %l2, %o1 } if ( info->doubly_indirect ) { 40019d7c: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 for ( i=0 ; iindirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { 40019d84: 80 a0 60 00 cmp %g1, 0 40019d88: 12 80 00 0c bne 40019db8 40019d8c: a0 10 20 00 clr %l0 } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 40019d90: 10 80 00 13 b 40019ddc 40019d94: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { 40019d98: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { 40019da0: c4 02 00 01 ld [ %o0 + %g1 ], %g2 <== NOT EXECUTED 40019da4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40019da8: 02 80 00 04 be 40019db8 <== NOT EXECUTED 40019dac: 90 02 00 01 add %o0, %g1, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( 40019db0: 7f ff ff b2 call 40019c78 <== NOT EXECUTED 40019db4: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i <== NOT EXECUTED 40019dc8: 91 2c 20 02 sll %l0, 2, %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 ); 40019dcc: 90 06 20 54 add %i0, 0x54, %o0 <== NOT EXECUTED 40019dd0: 7f ff ff aa call 40019c78 <== NOT EXECUTED 40019dd4: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED } if ( info->triply_indirect ) { 40019dd8: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 <== NOT EXECUTED 40019ddc: 84 10 20 00 clr %g2 40019de0: 80 a0 60 00 cmp %g1, 0 40019de4: a6 10 20 00 clr %l3 40019de8: 12 80 00 1d bne 40019e5c 40019dec: 2b 10 00 e8 sethi %hi(0x4003a000), %l5 memfile_free_blocks_in_table( (block_p **)&info->triply_indirect, to_free ); } return 0; } 40019df0: 81 c7 e0 08 ret 40019df4: 91 e8 00 02 restore %g0, %g2, %o0 } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 40019df8: a9 2c e0 02 sll %l3, 2, %l4 <== NOT EXECUTED for ( i=0 ; itriply_indirect[i]; 40019dfc: d0 00 40 14 ld [ %g1 + %l4 ], %o0 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 40019e00: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40019e04: 22 80 00 1c be,a 40019e74 <== NOT EXECUTED 40019e08: 90 06 20 58 add %i0, 0x58, %o0 <== NOT EXECUTED break; 40019e0c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 40019e10: 10 80 00 09 b 40019e34 <== NOT EXECUTED 40019e14: a2 10 20 00 clr %l1 <== NOT EXECUTED for ( j=0 ; j <== NOT EXECUTED 40019e24: a2 04 60 01 inc %l1 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 40019e28: 7f ff ff 94 call 40019c78 <== NOT EXECUTED 40019e2c: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j <== NOT EXECUTED 40019e44: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 40019e48: 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 40019e58: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED 40019e6c: 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( 40019e70: 90 06 20 58 add %i0, 0x58, %o0 <== NOT EXECUTED 40019e74: 7f ff ff 81 call 40019c78 <== NOT EXECUTED 40019e78: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 40019e7c: 84 10 20 00 clr %g2 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 40019e80: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED 40019e84: 81 c7 e0 08 ret <== NOT EXECUTED 40019e88: 81 e8 00 00 restore <== NOT EXECUTED 40019c48 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 40019c48: 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 ); 40019c4c: 94 10 20 00 clr %o2 <== NOT EXECUTED 40019c50: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40019c54: 7f ff ff 4d call 40019988 <== NOT EXECUTED 40019c58: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED ptr = *block_entry_ptr; 40019c5c: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED *block_entry_ptr = 0; memfile_free_block( ptr ); return 1; } 40019c60: 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; 40019c64: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED memfile_free_block( ptr ); 40019c68: 7f ff ff 32 call 40019930 <== NOT EXECUTED 40019c6c: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED return 1; } 40019c70: 81 c7 e0 08 ret <== NOT EXECUTED 40019c74: 81 e8 00 00 restore <== NOT EXECUTED 4001a23c : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 4001a23c: 9d e3 bf 90 save %sp, -112, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 4001a240: 80 a6 20 00 cmp %i0, 0 4001a244: 32 80 00 09 bne,a 4001a268 4001a248: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4001a24c: 92 10 22 e1 mov 0x2e1, %o1 <== NOT EXECUTED 4001a250: 11 10 00 d6 sethi %hi(0x40035800), %o0 <== NOT EXECUTED 4001a254: 15 10 00 d7 sethi %hi(0x40035c00), %o2 <== NOT EXECUTED 4001a258: 90 12 23 b0 or %o0, 0x3b0, %o0 <== NOT EXECUTED 4001a25c: 7f ff aa 1e call 40004ad4 <__assert> <== NOT EXECUTED 4001a260: 94 12 a0 00 mov %o2, %o2 <== NOT EXECUTED 4001a264: 30 80 00 0d b,a 4001a298 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4001a268: 80 a0 60 05 cmp %g1, 5 4001a26c: 02 80 00 07 be 4001a288 4001a270: 11 10 00 d6 sethi %hi(0x40035800), %o0 4001a274: 15 10 00 d7 sethi %hi(0x40035c00), %o2 <== NOT EXECUTED 4001a278: 90 12 23 b0 or %o0, 0x3b0, %o0 <== NOT EXECUTED 4001a27c: 94 12 a0 10 or %o2, 0x10, %o2 <== NOT EXECUTED 4001a280: 7f ff aa 15 call 40004ad4 <__assert> <== NOT EXECUTED 4001a284: 92 10 22 e5 mov 0x2e5, %o1 <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) 4001a288: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4001a28c: 80 a0 60 05 cmp %g1, 5 4001a290: 02 80 00 06 be 4001a2a8 4001a294: 80 a6 a0 00 cmp %i2, 0 rtems_set_errno_and_return_minus_one( EIO ); 4001a298: 40 00 22 15 call 40022aec <__errno> <== NOT EXECUTED 4001a29c: a4 10 3f ff mov -1, %l2 <== NOT EXECUTED 4001a2a0: 10 80 00 0d b 4001a2d4 <== NOT EXECUTED 4001a2a4: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED /* * Error check arguments */ assert( source ); 4001a2a8: 12 80 00 0d bne 4001a2dc 4001a2ac: 80 a6 e0 00 cmp %i3, 0 4001a2b0: 11 10 00 d6 sethi %hi(0x40035800), %o0 <== NOT EXECUTED 4001a2b4: 15 10 00 d7 sethi %hi(0x40035c00), %o2 <== NOT EXECUTED 4001a2b8: 92 10 22 ed mov 0x2ed, %o1 <== NOT EXECUTED 4001a2bc: 90 12 23 b0 or %o0, 0x3b0, %o0 <== NOT EXECUTED 4001a2c0: 7f ff aa 05 call 40004ad4 <__assert> <== NOT EXECUTED 4001a2c4: 94 12 a0 48 or %o2, 0x48, %o2 <== NOT EXECUTED if ( !source ) rtems_set_errno_and_return_minus_one( EINVAL ); 4001a2c8: 40 00 22 09 call 40022aec <__errno> <== NOT EXECUTED 4001a2cc: a4 10 3f ff mov -1, %l2 <== NOT EXECUTED 4001a2d0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4001a2d4: 10 80 00 71 b 4001a498 <== NOT EXECUTED 4001a2d8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 4001a2dc: 02 bf ff fb be 4001a2c8 4001a2e0: 01 00 00 00 nop * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { 4001a2e4: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 /* * 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; 4001a2e8: 92 06 c0 19 add %i3, %i1, %o1 if ( last_byte > the_jnode->info.file.size ) { 4001a2ec: 80 a2 40 01 cmp %o1, %g1 4001a2f0: 08 80 00 0b bleu 4001a31c 4001a2f4: 03 10 00 e8 sethi %hi(0x4003a000), %g1 status = IMFS_memfile_extend( the_jnode, last_byte ); 4001a2f8: 7f ff ff 4c call 4001a028 4001a2fc: 90 10 00 18 mov %i0, %o0 if ( status ) 4001a300: 80 a2 20 00 cmp %o0, 0 4001a304: 22 80 00 06 be,a 4001a31c 4001a308: 03 10 00 e8 sethi %hi(0x4003a000), %g1 rtems_set_errno_and_return_minus_one( ENOSPC ); 4001a30c: 40 00 21 f8 call 40022aec <__errno> <== NOT EXECUTED 4001a310: a4 10 3f ff mov -1, %l2 <== NOT EXECUTED 4001a314: 10 bf ff f0 b 4001a2d4 <== NOT EXECUTED 4001a318: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4001a31c: e0 00 62 f4 ld [ %g1 + 0x2f4 ], %l0 4001a320: 90 10 00 19 mov %i1, %o0 4001a324: 40 00 5f 7d call 40032118 <.rem> 4001a328: 92 10 00 10 mov %l0, %o1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4001a32c: 92 10 00 10 mov %l0, %o1 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4001a330: a2 10 00 08 mov %o0, %l1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4001a334: 40 00 5e cd call 40031e68 <.div> 4001a338: 90 10 00 19 mov %i1, %o0 if ( start_offset ) { 4001a33c: 80 a4 60 00 cmp %l1, 0 4001a340: 12 80 00 05 bne 4001a354 4001a344: b2 10 00 08 mov %o0, %i1 4001a348: a0 10 00 1a mov %i2, %l0 4001a34c: 10 80 00 1d b 4001a3c0 4001a350: a4 10 20 00 clr %l2 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 ); 4001a354: 90 10 00 18 mov %i0, %o0 4001a358: 92 10 00 19 mov %i1, %o1 4001a35c: 7f ff fd 8b call 40019988 4001a360: 94 10 20 00 clr %o2 assert( block_ptr ); 4001a364: 80 a2 20 00 cmp %o0, 0 4001a368: 32 80 00 0b bne,a 4001a394 4001a36c: 94 24 00 11 sub %l0, %l1, %o2 4001a370: 11 10 00 d6 sethi %hi(0x40035800), %o0 <== NOT EXECUTED 4001a374: 92 10 23 1a mov 0x31a, %o1 <== NOT EXECUTED 4001a378: 90 12 23 b0 or %o0, 0x3b0, %o0 <== NOT EXECUTED 4001a37c: 15 10 00 d7 sethi %hi(0x40035c00), %o2 <== NOT EXECUTED 4001a380: a4 10 20 00 clr %l2 <== NOT EXECUTED 4001a384: 7f ff a9 d4 call 40004ad4 <__assert> <== NOT EXECUTED 4001a388: 94 12 a0 50 or %o2, 0x50, %o2 <== NOT EXECUTED } IMFS_atime_mtime_update( the_jnode ); return copied; } 4001a38c: 81 c7 e0 08 ret <== NOT EXECUTED 4001a390: 91 e8 00 12 restore %g0, %l2, %o0 <== NOT EXECUTED */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 4001a394: 80 a2 80 1b cmp %o2, %i3 4001a398: 38 80 00 02 bgu,a 4001a3a0 4001a39c: 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 ); 4001a3a0: d0 02 00 00 ld [ %o0 ], %o0 src += to_copy; 4001a3a4: 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 ); 4001a3a8: 90 04 40 08 add %l1, %o0, %o0 src += to_copy; block++; 4001a3ac: b2 06 60 01 inc %i1 my_length -= to_copy; 4001a3b0: b6 26 c0 0a sub %i3, %o2, %i3 copied += to_copy; 4001a3b4: a4 10 00 0a mov %o2, %l2 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 ); 4001a3b8: 40 00 28 81 call 400245bc 4001a3bc: 92 10 00 1a mov %i2, %o1 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4001a3c0: 03 10 00 e8 sethi %hi(0x4003a000), %g1 4001a3c4: f4 00 62 f4 ld [ %g1 + 0x2f4 ], %i2 ! 4003a2f4 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4001a3c8: 10 80 00 14 b 4001a418 4001a3cc: a2 10 00 01 mov %g1, %l1 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4001a3d0: 7f ff fd 6e call 40019988 4001a3d4: 01 00 00 00 nop assert( block_ptr ); 4001a3d8: 80 a2 20 00 cmp %o0, 0 4001a3dc: 32 80 00 08 bne,a 4001a3fc 4001a3e0: d0 02 00 00 ld [ %o0 ], %o0 4001a3e4: 11 10 00 d6 sethi %hi(0x40035800), %o0 <== NOT EXECUTED 4001a3e8: 15 10 00 d7 sethi %hi(0x40035c00), %o2 <== NOT EXECUTED 4001a3ec: 90 12 23 b0 or %o0, 0x3b0, %o0 <== NOT EXECUTED 4001a3f0: 94 12 a0 50 or %o2, 0x50, %o2 <== NOT EXECUTED 4001a3f4: 10 80 00 1c b 4001a464 <== NOT EXECUTED 4001a3f8: 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 ); 4001a3fc: 92 10 00 10 mov %l0, %o1 src += to_copy; block++; 4001a400: b2 06 60 01 inc %i1 my_length -= to_copy; 4001a404: b6 26 c0 1a sub %i3, %i2, %i3 4001a408: a4 04 80 1a add %l2, %i2, %l2 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 ); 4001a40c: a0 04 00 1a add %l0, %i2, %l0 4001a410: 40 00 28 6b call 400245bc 4001a414: 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 ) { 4001a418: c2 04 62 f4 ld [ %l1 + 0x2f4 ], %g1 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4001a41c: 92 10 00 19 mov %i1, %o1 4001a420: 94 10 20 00 clr %o2 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4001a424: 80 a6 c0 01 cmp %i3, %g1 4001a428: 1a bf ff ea bcc 4001a3d0 4001a42c: 90 10 00 18 mov %i0, %o0 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 4001a430: 80 a6 e0 00 cmp %i3, 0 4001a434: 22 80 00 14 be,a 4001a484 4001a438: 90 07 bf f0 add %fp, -16, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4001a43c: 7f ff fd 53 call 40019988 4001a440: 01 00 00 00 nop assert( block_ptr ); 4001a444: 80 a2 20 00 cmp %o0, 0 4001a448: 32 80 00 0a bne,a 4001a470 4001a44c: d0 02 00 00 ld [ %o0 ], %o0 4001a450: 11 10 00 d6 sethi %hi(0x40035800), %o0 <== NOT EXECUTED 4001a454: 15 10 00 d7 sethi %hi(0x40035c00), %o2 <== NOT EXECUTED 4001a458: 90 12 23 b0 or %o0, 0x3b0, %o0 <== NOT EXECUTED 4001a45c: 94 12 a0 50 or %o2, 0x50, %o2 <== NOT EXECUTED 4001a460: 92 10 23 44 mov 0x344, %o1 <== NOT EXECUTED 4001a464: 7f ff a9 9c call 40004ad4 <__assert> <== NOT EXECUTED 4001a468: b0 10 00 12 mov %l2, %i0 <== NOT EXECUTED 4001a46c: 30 80 00 0c b,a 4001a49c <== 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; 4001a470: a4 04 80 1b add %l2, %i3, %l2 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 ); 4001a474: 92 10 00 10 mov %l0, %o1 4001a478: 40 00 28 51 call 400245bc 4001a47c: 94 10 00 1b mov %i3, %o2 my_length = 0; copied += to_copy; } IMFS_atime_mtime_update( the_jnode ); 4001a480: 90 07 bf f0 add %fp, -16, %o0 4001a484: 7f ff aa 4f call 40004dc0 4001a488: 92 10 20 00 clr %o1 4001a48c: c2 07 bf f0 ld [ %fp + -16 ], %g1 4001a490: c2 26 20 3c st %g1, [ %i0 + 0x3c ] 4001a494: c2 26 20 40 st %g1, [ %i0 + 0x40 ] return copied; } 4001a498: b0 10 00 12 mov %l2, %i0 4001a49c: 81 c7 e0 08 ret 4001a4a0: 81 e8 00 00 restore 4000b22c : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4000b22c: 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 ); 4000b230: 90 10 00 18 mov %i0, %o0 4000b234: 92 07 bf c3 add %fp, -61, %o1 4000b238: 7f ff ff 8c call 4000b068 4000b23c: 94 07 bf f4 add %fp, -12, %o2 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 4000b240: 03 00 00 3c sethi %hi(0xf000), %g1 4000b244: b3 2e 60 10 sll %i1, 0x10, %i1 4000b248: 97 36 60 10 srl %i1, 0x10, %o3 4000b24c: 84 0a c0 01 and %o3, %g1, %g2 4000b250: 03 00 00 10 sethi %hi(0x4000), %g1 4000b254: 80 a0 80 01 cmp %g2, %g1 4000b258: 02 80 00 17 be 4000b2b4 4000b25c: 90 10 00 1c mov %i4, %o0 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 4000b260: 03 00 00 20 sethi %hi(0x8000), %g1 4000b264: 80 a0 80 01 cmp %g2, %g1 4000b268: 02 80 00 14 be 4000b2b8 4000b26c: 92 10 20 05 mov 5, %o1 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 4000b270: 03 00 00 18 sethi %hi(0x6000), %g1 4000b274: 80 a0 80 01 cmp %g2, %g1 4000b278: 02 80 00 05 be 4000b28c 4000b27c: 03 00 00 08 sethi %hi(0x2000), %g1 4000b280: 80 a0 80 01 cmp %g2, %g1 4000b284: 12 80 00 06 bne 4000b29c 4000b288: 01 00 00 00 nop type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 4000b28c: f6 27 bf e8 st %i3, [ %fp + -24 ] 4000b290: f4 27 bf e4 st %i2, [ %fp + -28 ] 4000b294: 10 80 00 09 b 4000b2b8 4000b298: 92 10 20 02 mov 2, %o1 } else { rtems_set_errno_and_return_minus_one( EINVAL ); 4000b29c: 40 00 0b a0 call 4000e11c <__errno> <== NOT EXECUTED 4000b2a0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000b2a4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000b2a8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000b2ac: 81 c7 e0 08 ret <== NOT EXECUTED 4000b2b0: 81 e8 00 00 restore <== NOT EXECUTED 4000b2b4: 92 10 20 01 mov 1, %o1 /* * Allocate and fill in an IMFS jnode */ new_node = IMFS_create_node( 4000b2b8: 94 07 bf c3 add %fp, -61, %o2 4000b2bc: 98 07 bf e4 add %fp, -28, %o4 4000b2c0: 40 00 08 86 call 4000d4d8 4000b2c4: b0 10 20 00 clr %i0 new_name, mode, &info ); if ( !new_node ) 4000b2c8: 80 a2 20 00 cmp %o0, 0 4000b2cc: 12 80 00 06 bne 4000b2e4 4000b2d0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOMEM ); 4000b2d4: 40 00 0b 92 call 4000e11c <__errno> <== NOT EXECUTED 4000b2d8: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4000b2dc: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 4000b2e0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; } 4000b2e4: 81 c7 e0 08 ret 4000b2e8: 81 e8 00 00 restore 40004760 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 40004760: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 40004764: c4 06 20 08 ld [ %i0 + 8 ], %g2 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 40004768: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1 4000476c: 80 a0 60 01 cmp %g1, 1 40004770: 22 80 00 08 be,a 40004790 40004774: f0 20 a0 58 st %i0, [ %g2 + 0x58 ] rtems_set_errno_and_return_minus_one( ENOTDIR ); 40004778: 40 00 78 dd call 40022aec <__errno> <== NOT EXECUTED 4000477c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004780: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 40004784: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004788: 81 c7 e0 08 ret <== NOT EXECUTED 4000478c: 81 e8 00 00 restore <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } 40004790: 81 c7 e0 08 ret 40004794: 91 e8 20 00 restore %g0, 0, %o0 40003780 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 40003780: 9d e3 bf 98 save %sp, -104, %sp assert( the_jnode ); 40003784: 80 a6 20 00 cmp %i0, 0 40003788: 12 80 00 09 bne 400037ac 4000378c: 21 10 00 83 sethi %hi(0x40020c00), %l0 40003790: 11 10 00 7b sethi %hi(0x4001ec00), %o0 <== NOT EXECUTED 40003794: 15 10 00 7b sethi %hi(0x4001ec00), %o2 <== NOT EXECUTED 40003798: 90 12 20 50 or %o0, 0x50, %o0 <== NOT EXECUTED 4000379c: 94 12 a0 a0 or %o2, 0xa0, %o2 <== NOT EXECUTED 400037a0: 40 00 02 15 call 40003ff4 <__assert> <== NOT EXECUTED 400037a4: 92 10 20 38 mov 0x38, %o1 <== NOT EXECUTED fprintf(stdout, "%s", the_jnode->name ); 400037a8: 21 10 00 83 sethi %hi(0x40020c00), %l0 <== NOT EXECUTED 400037ac: c2 04 22 58 ld [ %l0 + 0x258 ], %g1 ! 40020e58 <_impure_ptr> 400037b0: 90 06 20 0c add %i0, 0xc, %o0 400037b4: 40 00 3c 31 call 40012878 400037b8: d2 00 60 08 ld [ %g1 + 8 ], %o1 switch( the_jnode->type ) { 400037bc: d4 06 20 48 ld [ %i0 + 0x48 ], %o2 400037c0: 82 02 bf ff add %o2, -1, %g1 400037c4: 80 a0 60 05 cmp %g1, 5 400037c8: 38 80 00 34 bgu,a 40003898 400037cc: c2 04 22 58 ld [ %l0 + 0x258 ], %g1 <== NOT EXECUTED 400037d0: 83 28 60 02 sll %g1, 2, %g1 400037d4: 05 10 00 0d sethi %hi(0x40003400), %g2 400037d8: 84 10 a3 2c or %g2, 0x32c, %g2 ! 4000372c 400037dc: c2 00 80 01 ld [ %g2 + %g1 ], %g1 400037e0: 81 c0 40 00 jmp %g1 400037e4: 01 00 00 00 nop case IMFS_DIRECTORY: fprintf(stdout, "/" ); 400037e8: c2 04 22 58 ld [ %l0 + 0x258 ], %g1 400037ec: 90 10 20 2f mov 0x2f, %o0 400037f0: 40 00 3b e1 call 40012774 400037f4: d2 00 60 08 ld [ %g1 + 8 ], %o1 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 400037f8: 10 80 00 33 b 400038c4 400037fc: 31 10 00 7a sethi %hi(0x4001e800), %i0 case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 40003800: c2 04 22 58 ld [ %l0 + 0x258 ], %g1 40003804: d6 06 20 50 ld [ %i0 + 0x50 ], %o3 40003808: d0 00 60 08 ld [ %g1 + 8 ], %o0 4000380c: d4 06 20 4c ld [ %i0 + 0x4c ], %o2 40003810: 13 10 00 7b sethi %hi(0x4001ec00), %o1 40003814: 10 80 00 08 b 40003834 40003818: 92 12 60 b0 or %o1, 0xb0, %o1 ! 4001ecb0 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 4000381c: c2 04 22 58 ld [ %l0 + 0x258 ], %g1 <== NOT EXECUTED 40003820: d6 06 20 50 ld [ %i0 + 0x50 ], %o3 <== NOT EXECUTED 40003824: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 40003828: d4 06 20 4c ld [ %i0 + 0x4c ], %o2 <== NOT EXECUTED 4000382c: 13 10 00 7b sethi %hi(0x4001ec00), %o1 <== NOT EXECUTED 40003830: 92 12 60 c8 or %o1, 0xc8, %o1 ! 4001ecc8 <== NOT EXECUTED 40003834: 40 00 3b c4 call 40012744 40003838: 31 10 00 7a sethi %hi(0x4001e800), %i0 4000383c: 30 80 00 22 b,a 400038c4 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 40003840: c2 04 22 58 ld [ %l0 + 0x258 ], %g1 40003844: d4 06 20 4c ld [ %i0 + 0x4c ], %o2 40003848: d0 00 60 08 ld [ %g1 + 8 ], %o0 4000384c: 13 10 00 7b sethi %hi(0x4001ec00), %o1 40003850: 40 00 3b bd call 40012744 40003854: 92 12 60 d8 or %o1, 0xd8, %o1 ! 4001ecd8 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 40003858: 10 80 00 1b b 400038c4 4000385c: 31 10 00 7a sethi %hi(0x4001e800), %i0 (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 40003860: c2 04 22 58 ld [ %l0 + 0x258 ], %g1 <== NOT EXECUTED 40003864: 11 10 00 7b sethi %hi(0x4001ec00), %o0 <== NOT EXECUTED 40003868: d2 00 60 08 ld [ %g1 + 8 ], %o1 <== NOT EXECUTED 4000386c: 40 00 3c 03 call 40012878 <== NOT EXECUTED 40003870: 90 12 20 e8 or %o0, 0xe8, %o0 <== NOT EXECUTED assert(0); 40003874: 10 80 00 0e b 400038ac <== NOT EXECUTED 40003878: 92 10 20 5d mov 0x5d, %o1 <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 4000387c: c2 04 22 58 ld [ %l0 + 0x258 ], %g1 <== NOT EXECUTED 40003880: 11 10 00 7b sethi %hi(0x4001ec00), %o0 <== NOT EXECUTED 40003884: d2 00 60 08 ld [ %g1 + 8 ], %o1 <== NOT EXECUTED 40003888: 40 00 3b fc call 40012878 <== NOT EXECUTED 4000388c: 90 12 20 e8 or %o0, 0xe8, %o0 <== NOT EXECUTED assert(0); 40003890: 10 80 00 07 b 400038ac <== NOT EXECUTED 40003894: 92 10 20 62 mov 0x62, %o1 <== NOT EXECUTED break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 40003898: 13 10 00 7b sethi %hi(0x4001ec00), %o1 <== NOT EXECUTED 4000389c: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 400038a0: 40 00 3b a9 call 40012744 <== NOT EXECUTED 400038a4: 92 12 61 00 or %o1, 0x100, %o1 <== NOT EXECUTED assert(0); 400038a8: 92 10 20 67 mov 0x67, %o1 <== NOT EXECUTED 400038ac: 11 10 00 7b sethi %hi(0x4001ec00), %o0 <== NOT EXECUTED 400038b0: 15 10 00 7a sethi %hi(0x4001e800), %o2 <== NOT EXECUTED 400038b4: 90 12 20 50 or %o0, 0x50, %o0 <== NOT EXECUTED 400038b8: 40 00 01 cf call 40003ff4 <__assert> <== NOT EXECUTED 400038bc: 94 12 a2 00 or %o2, 0x200, %o2 <== NOT EXECUTED break; } puts(""); 400038c0: 31 10 00 7a sethi %hi(0x4001e800), %i0 <== NOT EXECUTED 400038c4: 40 00 42 3e call 400141bc 400038c8: 91 ee 23 58 restore %i0, 0x358, %o0 400038cc: 01 00 00 00 nop 400047a4 : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 400047a4: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *node; int i; node = loc->node_access; 400047a8: c6 06 00 00 ld [ %i0 ], %g3 if ( node->type != IMFS_SYM_LINK ) 400047ac: c2 00 e0 48 ld [ %g3 + 0x48 ], %g1 400047b0: 80 a0 60 04 cmp %g1, 4 400047b4: 02 80 00 0a be 400047dc 400047b8: b0 10 20 00 clr %i0 rtems_set_errno_and_return_minus_one( EINVAL ); 400047bc: 40 00 78 cc call 40022aec <__errno> <== NOT EXECUTED 400047c0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400047c4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400047c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400047cc: 81 c7 e0 08 ret <== NOT EXECUTED 400047d0: 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]; 400047d4: c2 2e 00 19 stb %g1, [ %i0 + %i1 ] 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++ ) 400047d8: b0 06 20 01 inc %i0 400047dc: 80 a6 00 1a cmp %i0, %i2 400047e0: 02 80 00 07 be 400047fc 400047e4: 01 00 00 00 nop 400047e8: c2 00 e0 4c ld [ %g3 + 0x4c ], %g1 400047ec: c4 48 40 18 ldsb [ %g1 + %i0 ], %g2 400047f0: 80 a0 a0 00 cmp %g2, 0 400047f4: 12 bf ff f8 bne 400047d4 400047f8: c2 08 40 18 ldub [ %g1 + %i0 ], %g1 buf[i] = node->info.sym_link.name[i]; return i; } 400047fc: 81 c7 e0 08 ret 40004800: 81 e8 00 00 restore 4000b2f8 : */ int IMFS_rmnod( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4000b2f8: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4000b2fc: 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 ) { 4000b300: c2 04 20 08 ld [ %l0 + 8 ], %g1 4000b304: 80 a0 60 00 cmp %g1, 0 4000b308: 22 80 00 06 be,a 4000b320 4000b30c: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 <== NOT EXECUTED Chain_Extract( (Chain_Node *) the_jnode ); 4000b310: 40 00 05 65 call 4000c8a4 <_Chain_Extract> 4000b314: 90 10 00 10 mov %l0, %o0 the_jnode->Parent = NULL; 4000b318: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4000b31c: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 4000b320: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4000b324: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 4000b328: 90 07 bf f0 add %fp, -16, %o0 4000b32c: 40 00 01 09 call 4000b750 4000b330: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 4000b334: 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) ) { 4000b338: 90 10 00 10 mov %l0, %o0 4000b33c: 40 00 01 3e call 4000b834 4000b340: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 4000b344: 80 a2 20 00 cmp %o0, 0 4000b348: 12 80 00 18 bne 4000b3a8 4000b34c: 01 00 00 00 nop 4000b350: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 4000b354: 80 a0 60 00 cmp %g1, 0 4000b358: 12 80 00 14 bne 4000b3a8 4000b35c: 03 10 00 64 sethi %hi(0x40019000), %g1 /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 4000b360: c6 00 61 e0 ld [ %g1 + 0x1e0 ], %g3 ! 400191e0 4000b364: c4 06 00 00 ld [ %i0 ], %g2 4000b368: c2 00 e0 04 ld [ %g3 + 4 ], %g1 4000b36c: 80 a0 40 02 cmp %g1, %g2 4000b370: 22 80 00 02 be,a 4000b378 4000b374: c0 20 e0 04 clr [ %g3 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 4000b378: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000b37c: 80 a0 60 04 cmp %g1, 4 4000b380: 12 80 00 08 bne 4000b3a0 4000b384: 01 00 00 00 nop if ( the_jnode->info.sym_link.name ) 4000b388: d0 04 20 4c ld [ %l0 + 0x4c ], %o0 4000b38c: 80 a2 20 00 cmp %o0, 0 4000b390: 02 80 00 04 be 4000b3a0 4000b394: 01 00 00 00 nop free( the_jnode->info.sym_link.name ); 4000b398: 7f ff db 85 call 400021ac 4000b39c: 01 00 00 00 nop } free( the_jnode ); 4000b3a0: 7f ff db 83 call 400021ac 4000b3a4: 90 10 00 10 mov %l0, %o0 } return 0; } 4000b3a8: 81 c7 e0 08 ret 4000b3ac: 91 e8 20 00 restore %g0, 0, %o0 4000b3b0 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 4000b3b0: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 4000b3b4: f0 06 00 00 ld [ %i0 ], %i0 switch ( the_jnode->type ) { 4000b3b8: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4000b3bc: 80 a0 60 04 cmp %g1, 4 4000b3c0: 22 80 00 18 be,a 4000b420 4000b3c4: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED 4000b3c8: 14 80 00 07 bg 4000b3e4 4000b3cc: 80 a0 60 06 cmp %g1, 6 4000b3d0: 80 a0 60 02 cmp %g1, 2 4000b3d4: 12 80 00 0d bne 4000b408 4000b3d8: 01 00 00 00 nop rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 4000b3dc: 10 80 00 06 b 4000b3f4 4000b3e0: c4 06 20 4c ld [ %i0 + 0x4c ], %g2 4000b3e4: 14 80 00 09 bg 4000b408 4000b3e8: 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; 4000b3ec: 10 80 00 05 b 4000b400 4000b3f0: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 temp.__overlay.minor = _minor; 4000b3f4: c6 06 20 50 ld [ %i0 + 0x50 ], %g3 switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_dev = rtems_filesystem_make_dev_t( io->major, io->minor ); 4000b3f8: 10 80 00 0a b 4000b420 4000b3fc: c4 3e 40 00 std %g2, [ %i1 ] break; case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 4000b400: 10 80 00 08 b 4000b420 4000b404: 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 ); 4000b408: 40 00 0b 45 call 4000e11c <__errno> <== NOT EXECUTED 4000b40c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000b410: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000b414: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000b418: 81 c7 e0 08 ret <== NOT EXECUTED 4000b41c: 81 e8 00 00 restore <== NOT EXECUTED break; } buf->st_mode = the_jnode->st_mode; 4000b420: c2 16 20 2e lduh [ %i0 + 0x2e ], %g1 buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4000b424: 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; 4000b428: c2 36 60 0c sth %g1, [ %i1 + 0xc ] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4000b42c: 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; 4000b430: 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; 4000b434: 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; 4000b438: 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; 4000b43c: 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; 4000b440: 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; 4000b444: 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; 4000b448: 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; 4000b44c: 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; 4000b450: 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; 4000b454: 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; 4000b458: 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; 4000b45c: c2 26 60 34 st %g1, [ %i1 + 0x34 ] return 0; } 4000b460: 81 c7 e0 08 ret 4000b464: 91 e8 20 00 restore %g0, 0, %o0 40004804 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 40004804: 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 ); 40004808: a0 07 bf c3 add %fp, -61, %l0 4000480c: 94 07 bf f4 add %fp, -12, %o2 40004810: 92 10 00 10 mov %l0, %o1 40004814: 7f ff fe fe call 4000440c 40004818: 90 10 00 1a mov %i2, %o0 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 4000481c: 90 10 00 18 mov %i0, %o0 * Remove any separators at the end of the string. */ IMFS_get_token( node_name, new_name, &i ); info.sym_link.name = link_name; 40004820: f2 27 bf e4 st %i1, [ %fp + -28 ] /* * Create a new link node. */ new_node = IMFS_create_node( 40004824: 94 10 00 10 mov %l0, %o2 40004828: 92 10 20 04 mov 4, %o1 4000482c: 17 00 00 28 sethi %hi(0xa000), %o3 40004830: 98 07 bf e4 add %fp, -28, %o4 40004834: 96 12 e1 ff or %o3, 0x1ff, %o3 40004838: 40 00 41 c3 call 40014f44 4000483c: b0 10 20 00 clr %i0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 40004840: 80 a2 20 00 cmp %o0, 0 40004844: 12 80 00 06 bne 4000485c 40004848: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOMEM ); 4000484c: 40 00 78 a8 call 40022aec <__errno> <== NOT EXECUTED 40004850: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40004854: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40004858: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; } 4000485c: 81 c7 e0 08 ret 40004860: 81 e8 00 00 restore 40004864 : #include int IMFS_unlink( rtems_filesystem_location_info_t *loc /* IN */ ) { 40004864: 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; 40004868: 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 ) { 4000486c: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40004870: 80 a0 60 03 cmp %g1, 3 40004874: 32 80 00 2a bne,a 4000491c 40004878: c2 06 20 04 ld [ %i0 + 4 ], %g1 if ( !node->info.hard_link.link_node ) 4000487c: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 40004880: 80 a0 60 00 cmp %g1, 0 40004884: 12 80 00 08 bne 400048a4 40004888: a2 07 bf e0 add %fp, -32, %l1 rtems_set_errno_and_return_minus_one( EINVAL ); 4000488c: 40 00 78 98 call 40022aec <__errno> <== NOT EXECUTED 40004890: 01 00 00 00 nop <== NOT EXECUTED 40004894: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 40004898: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000489c: 10 80 00 23 b 40004928 <== NOT EXECUTED 400048a0: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED the_link = *loc; 400048a4: 92 10 00 18 mov %i0, %o1 400048a8: 94 10 20 10 mov 0x10, %o2 400048ac: 40 00 7f 44 call 400245bc 400048b0: 90 10 00 11 mov %l1, %o0 the_link.node_access = node->info.hard_link.link_node; 400048b4: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 IMFS_Set_handlers( &the_link ); 400048b8: 90 10 00 11 mov %l1, %o0 400048bc: 40 00 42 07 call 400150d8 400048c0: c2 27 bf e0 st %g1, [ %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) 400048c4: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 400048c8: c2 10 a0 30 lduh [ %g2 + 0x30 ], %g1 400048cc: 80 a0 60 01 cmp %g1, 1 400048d0: 12 80 00 0b bne 400048fc 400048d4: 82 00 7f ff add %g1, -1, %g1 { result = (*the_link.handlers->rmnod_h)( &the_link ); 400048d8: c2 07 bf e4 ld [ %fp + -28 ], %g1 400048dc: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 400048e0: 9f c0 40 00 call %g1 400048e4: 90 10 00 11 mov %l1, %o0 if ( result != 0 ) 400048e8: 80 a2 20 00 cmp %o0, 0 400048ec: 12 80 00 0f bne 40004928 400048f0: 90 10 3f ff mov -1, %o0 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( loc ); 400048f4: 10 80 00 0a b 4000491c 400048f8: c2 06 20 04 ld [ %i0 + 4 ], %g1 return -1; } else { node->info.hard_link.link_node->st_nlink --; IMFS_update_ctime( node->info.hard_link.link_node ); 400048fc: 90 07 bf f0 add %fp, -16, %o0 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 40004900: c2 30 a0 30 sth %g1, [ %g2 + 0x30 ] IMFS_update_ctime( node->info.hard_link.link_node ); 40004904: 40 00 01 2f call 40004dc0 40004908: 92 10 20 00 clr %o1 4000490c: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 40004910: c2 07 bf f0 ld [ %fp + -16 ], %g1 40004914: c2 20 a0 44 st %g1, [ %g2 + 0x44 ] /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( loc ); 40004918: c2 06 20 04 ld [ %i0 + 4 ], %g1 4000491c: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 40004920: 9f c0 40 00 call %g1 40004924: 90 10 00 18 mov %i0, %o0 return result; } 40004928: 81 c7 e0 08 ret 4000492c: 91 e8 00 08 restore %g0, %o0, %o0 40004930 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 40004930: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 40004934: c4 06 20 08 ld [ %i0 + 8 ], %g2 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 40004938: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1 4000493c: 80 a0 60 01 cmp %g1, 1 40004940: 22 80 00 06 be,a 40004958 40004944: c2 00 a0 58 ld [ %g2 + 0x58 ], %g1 rtems_set_errno_and_return_minus_one( ENOTDIR ); 40004948: 40 00 78 69 call 40022aec <__errno> <== NOT EXECUTED 4000494c: 01 00 00 00 nop <== NOT EXECUTED 40004950: 10 80 00 08 b 40004970 <== NOT EXECUTED 40004954: 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 ) 40004958: 80 a0 60 00 cmp %g1, 0 4000495c: 32 80 00 08 bne,a 4000497c 40004960: c0 20 a0 58 clr [ %g2 + 0x58 ] rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 40004964: 40 00 78 62 call 40022aec <__errno> <== NOT EXECUTED 40004968: 01 00 00 00 nop <== NOT EXECUTED 4000496c: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 40004970: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004974: 81 c7 e0 08 ret <== NOT EXECUTED 40004978: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 4000497c: 81 c7 e0 08 ret 40004980: 91 e8 20 00 restore %g0, 0, %o0 4002290c : assert( 0 ); return 0; } int POSIX_BOTTOM_REACHED() { 4002290c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED assert( 0 ); 40022910: 92 10 20 22 mov 0x22, %o1 <== NOT EXECUTED 40022914: 11 10 00 99 sethi %hi(0x40026400), %o0 <== NOT EXECUTED 40022918: 15 10 00 8b sethi %hi(0x40022c00), %o2 <== NOT EXECUTED 4002291c: 90 12 23 a8 or %o0, 0x3a8, %o0 <== NOT EXECUTED 40022920: 94 12 a1 80 or %o2, 0x180, %o2 <== NOT EXECUTED 40022924: 7f ff 8d 90 call 40005f64 <__assert> <== NOT EXECUTED 40022928: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 4002292c: 81 c7 e0 08 ret <== NOT EXECUTED 40022930: 81 e8 00 00 restore <== NOT EXECUTED 40022934 : */ #include int POSIX_MP_NOT_IMPLEMENTED() { 40022934: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED assert( 0 ); 40022938: 92 10 20 1c mov 0x1c, %o1 <== NOT EXECUTED 4002293c: 11 10 00 99 sethi %hi(0x40026400), %o0 <== NOT EXECUTED 40022940: 15 10 00 8b sethi %hi(0x40022c00), %o2 <== NOT EXECUTED 40022944: 90 12 23 a8 or %o0, 0x3a8, %o0 <== NOT EXECUTED 40022948: 94 12 a1 80 or %o2, 0x180, %o2 <== NOT EXECUTED 4002294c: 7f ff 8d 86 call 40005f64 <__assert> <== NOT EXECUTED 40022950: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 40022954: 81 c7 e0 08 ret <== NOT EXECUTED 40022958: 81 e8 00 00 restore <== NOT EXECUTED 400228e4 : assert( 0 ); return 0; } int POSIX_NOT_IMPLEMENTED() { 400228e4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED assert( 0 ); 400228e8: 92 10 20 28 mov 0x28, %o1 <== NOT EXECUTED 400228ec: 11 10 00 99 sethi %hi(0x40026400), %o0 <== NOT EXECUTED 400228f0: 15 10 00 8b sethi %hi(0x40022c00), %o2 <== NOT EXECUTED 400228f4: 90 12 23 a8 or %o0, 0x3a8, %o0 <== NOT EXECUTED 400228f8: 94 12 a1 80 or %o2, 0x180, %o2 <== NOT EXECUTED 400228fc: 7f ff 8d 9a call 40005f64 <__assert> <== NOT EXECUTED 40022900: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 40022904: 81 c7 e0 08 ret <== NOT EXECUTED 40022908: 81 e8 00 00 restore <== NOT EXECUTED 400024f0 : void RTEMS_Malloc_Initialize( void *start, size_t length, size_t sbrk_amount ) { 400024f0: 9d e3 bf 98 save %sp, -104, %sp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 400024f4: 03 10 00 67 sethi %hi(0x40019c00), %g1 400024f8: 82 10 60 c0 or %g1, 0xc0, %g1 ! 40019cc0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 400024fc: c2 20 7f fc st %g1, [ %g1 + -4 ] 40002500: 82 00 7f fc add %g1, -4, %g1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40002504: 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; 40002508: c0 20 60 04 clr [ %g1 + 4 ] * get length worth of memory using sbrk. Make sure we * align the address that we get back. */ starting_address = start; RTEMS_Malloc_Sbrk_amount = sbrk_amount; 4000250c: 03 10 00 67 sethi %hi(0x40019c00), %g1 if (!starting_address) { 40002510: 80 a6 20 00 cmp %i0, 0 40002514: 12 80 00 11 bne 40002558 40002518: f4 20 60 b8 st %i2, [ %g1 + 0xb8 ] uaddress = (uintptr_t)sbrk(length); 4000251c: 7f ff fd 48 call 40001a3c <== NOT EXECUTED 40002520: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if (uaddress == (uintptr_t) -1) { 40002524: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 40002528: 12 80 00 04 bne 40002538 <== NOT EXECUTED 4000252c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 40002530: 40 00 0f fb call 4000651c <== NOT EXECUTED 40002534: 90 10 20 1a mov 0x1a, %o0 <== NOT EXECUTED /* DOES NOT RETURN!!! */ } if (uaddress & (CPU_HEAP_ALIGNMENT-1)) { 40002538: 80 8e 20 07 btst 7, %i0 <== NOT EXECUTED 4000253c: 02 80 00 08 be 4000255c <== NOT EXECUTED 40002540: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED old_address = uaddress; uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1); 40002544: 82 06 20 08 add %i0, 8, %g1 <== NOT EXECUTED 40002548: 82 08 7f f8 and %g1, -8, %g1 <== NOT EXECUTED /* * adjust the length by whatever we aligned by */ length -= uaddress - old_address; 4000254c: 84 20 40 18 sub %g1, %i0, %g2 <== NOT EXECUTED 40002550: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED 40002554: b2 26 40 02 sub %i1, %g2, %i1 <== 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_cpu_configuration_get_do_zero_of_workspace() ) 40002558: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000255c: c2 00 62 44 ld [ %g1 + 0x244 ], %g1 ! 40019e44 <_CPU_Table+0x10> 40002560: 80 a0 60 00 cmp %g1, 0 40002564: 02 80 00 07 be 40002580 40002568: 92 10 00 18 mov %i0, %o1 memset( starting_address, 0, length ); 4000256c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40002570: 92 10 20 00 clr %o1 <== NOT EXECUTED 40002574: 40 00 30 ec call 4000e924 <== NOT EXECUTED 40002578: 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 ); 4000257c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40002580: 94 10 00 19 mov %i1, %o2 40002584: 11 10 00 67 sethi %hi(0x40019c00), %o0 40002588: 96 10 20 08 mov 8, %o3 4000258c: 40 00 12 c1 call 40007090 <_Heap_Initialize> 40002590: 90 12 20 60 or %o0, 0x60, %o0 &RTEMS_Malloc_Heap, starting_address, length, CPU_HEAP_ALIGNMENT ); if ( !status ) 40002594: 80 a2 20 00 cmp %o0, 0 40002598: 12 80 00 04 bne 400025a8 4000259c: 01 00 00 00 nop rtems_fatal_error_occurred( status ); 400025a0: 40 00 0f df call 4000651c <== NOT EXECUTED 400025a4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 400025a8: 81 c7 e0 08 ret 400025ac: 81 e8 00 00 restore 40002680 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 40002680: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED void *low; void *high_water_mark; Stack_Control *stack; char name[5]; if ( !the_thread ) 40002684: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40002688: 02 80 00 3e be 40002780 <== NOT EXECUTED 4000268c: 03 10 00 78 sethi %hi(0x4001e000), %g1 <== NOT EXECUTED return; if ( !print_handler ) 40002690: c2 00 60 8c ld [ %g1 + 0x8c ], %g1 ! 4001e08c <== NOT EXECUTED 40002694: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002698: 02 80 00 3a be 40002780 <== NOT EXECUTED 4000269c: 80 a6 3f ff cmp %i0, -1 <== NOT EXECUTED /* * XXX HACK to get to interrupt stack */ if (the_thread == (Thread_Control *) -1) { 400026a0: 12 80 00 09 bne 400026c4 <== NOT EXECUTED 400026a4: a2 06 20 d0 add %i0, 0xd0, %l1 <== NOT EXECUTED if (Stack_check_Interrupt_stack.area) { 400026a8: 03 10 00 78 sethi %hi(0x4001e000), %g1 <== NOT EXECUTED 400026ac: 82 10 62 50 or %g1, 0x250, %g1 ! 4001e250 <== NOT EXECUTED 400026b0: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED stack = &Stack_check_Interrupt_stack; the_thread = 0; } else return; 400026b4: a2 10 00 01 mov %g1, %l1 <== NOT EXECUTED /* * XXX HACK to get to interrupt stack */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 400026b8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400026bc: 02 80 00 31 be 40002780 <== NOT EXECUTED 400026c0: b0 10 20 00 clr %i0 <== NOT EXECUTED else return; } else stack = &the_thread->Start.Initial_stack; low = Stack_check_usable_stack_start(stack); 400026c4: c2 04 60 04 ld [ %l1 + 4 ], %g1 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 400026c8: c4 04 40 00 ld [ %l1 ], %g2 <== NOT EXECUTED else return; } else stack = &the_thread->Start.Initial_stack; low = Stack_check_usable_stack_start(stack); 400026cc: a0 00 60 10 add %g1, 0x10, %l0 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 400026d0: a4 00 bf f0 add %g2, -16, %l2 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 400026d4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400026d8: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 400026dc: 7f ff ff d9 call 40002640 <== NOT EXECUTED 400026e0: a6 10 20 00 clr %l3 <== NOT EXECUTED if ( high_water_mark ) 400026e4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400026e8: 02 80 00 03 be 400026f4 <== NOT EXECUTED 400026ec: 82 04 00 12 add %l0, %l2, %g1 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 400026f0: a6 20 40 08 sub %g1, %o0, %l3 <== NOT EXECUTED else used = 0; if ( the_thread ) { 400026f4: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 400026f8: 02 80 00 07 be 40002714 <== NOT EXECUTED 400026fc: 92 10 20 05 mov 5, %o1 <== NOT EXECUTED rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40002700: d0 06 20 08 ld [ %i0 + 8 ], %o0 <== NOT EXECUTED 40002704: 40 00 10 21 call 40006788 <== NOT EXECUTED 40002708: 94 07 bf f3 add %fp, -13, %o2 <== NOT EXECUTED name[ 2 ] = 'T'; name[ 3 ] = 'R'; name[ 4 ] = '\0'; } (*print_handler)( 4000270c: 10 80 00 0c b 4000273c <== NOT EXECUTED 40002710: 03 10 00 78 sethi %hi(0x4001e000), %g1 <== NOT EXECUTED used = 0; if ( the_thread ) { rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); } else { name[ 0 ] = 'I'; 40002714: 82 10 20 49 mov 0x49, %g1 <== NOT EXECUTED 40002718: c2 2f bf f3 stb %g1, [ %fp + -13 ] <== NOT EXECUTED name[ 1 ] = 'N'; 4000271c: 82 10 20 4e mov 0x4e, %g1 <== NOT EXECUTED 40002720: c2 2f bf f4 stb %g1, [ %fp + -12 ] <== NOT EXECUTED name[ 2 ] = 'T'; 40002724: 82 10 20 54 mov 0x54, %g1 <== NOT EXECUTED name[ 3 ] = 'R'; name[ 4 ] = '\0'; 40002728: c0 2f bf f7 clrb [ %fp + -9 ] <== NOT EXECUTED if ( the_thread ) { rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); } else { name[ 0 ] = 'I'; name[ 1 ] = 'N'; name[ 2 ] = 'T'; 4000272c: c2 2f bf f5 stb %g1, [ %fp + -11 ] <== NOT EXECUTED name[ 3 ] = 'R'; 40002730: 82 10 20 52 mov 0x52, %g1 <== NOT EXECUTED 40002734: c2 2f bf f6 stb %g1, [ %fp + -10 ] <== NOT EXECUTED name[ 4 ] = '\0'; } (*print_handler)( 40002738: 03 10 00 78 sethi %hi(0x4001e000), %g1 <== NOT EXECUTED 4000273c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40002740: c4 00 60 8c ld [ %g1 + 0x8c ], %g2 <== NOT EXECUTED 40002744: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 40002748: 03 10 00 78 sethi %hi(0x4001e000), %g1 <== NOT EXECUTED 4000274c: 02 80 00 03 be 40002758 <== NOT EXECUTED 40002750: d0 00 60 88 ld [ %g1 + 0x88 ], %o0 ! 4001e088 <== NOT EXECUTED 40002754: d4 06 20 08 ld [ %i0 + 8 ], %o2 <== NOT EXECUTED 40002758: da 04 40 00 ld [ %l1 ], %o5 <== NOT EXECUTED 4000275c: d8 04 60 04 ld [ %l1 + 4 ], %o4 <== NOT EXECUTED 40002760: 13 10 00 6d sethi %hi(0x4001b400), %o1 <== NOT EXECUTED 40002764: 9a 03 00 0d add %o4, %o5, %o5 <== NOT EXECUTED 40002768: e4 23 a0 5c st %l2, [ %sp + 0x5c ] <== NOT EXECUTED 4000276c: e6 23 a0 60 st %l3, [ %sp + 0x60 ] <== NOT EXECUTED 40002770: 9a 03 7f ff add %o5, -1, %o5 <== NOT EXECUTED 40002774: 92 12 61 58 or %o1, 0x158, %o1 <== NOT EXECUTED 40002778: 9f c0 80 00 call %g2 <== NOT EXECUTED 4000277c: 96 07 bf f3 add %fp, -13, %o3 <== NOT EXECUTED 40002780: 81 c7 e0 08 ret <== NOT EXECUTED 40002784: 81 e8 00 00 restore <== NOT EXECUTED 40002640 : /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 40002640: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 40002644: 92 0a 7f fc and %o1, -4, %o1 <== NOT EXECUTED if (*base != U32_PATTERN) 40002648: 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++) 4000264c: 84 02 00 09 add %o0, %o1, %g2 <== NOT EXECUTED if (*base != U32_PATTERN) 40002650: 10 80 00 06 b 40002668 <== NOT EXECUTED 40002654: 86 10 61 a5 or %g1, 0x1a5, %g3 <== NOT EXECUTED 40002658: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 4000265c: 12 80 00 07 bne 40002678 <== NOT EXECUTED 40002660: 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++) 40002664: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED 40002668: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED 4000266c: 2a bf ff fb bcs,a 40002658 <== NOT EXECUTED 40002670: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40002674: 90 10 20 00 clr %o0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 40002678: 81 c3 e0 08 retl <== NOT EXECUTED 4000267c: 01 00 00 00 nop 4000283c : */ void Stack_check_report_blown_task( Thread_Control *running, boolean pattern_ok ) { 4000283c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; printk( 40002840: d4 1e 20 08 ldd [ %i0 + 8 ], %o2 <== NOT EXECUTED 40002844: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40002848: 11 10 00 6d sethi %hi(0x4001b400), %o0 <== NOT EXECUTED 4000284c: 40 00 05 b9 call 40003f30 <== NOT EXECUTED 40002850: 90 12 21 e0 or %o0, 0x1e0, %o0 ! 4001b5e0 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif printk( 40002854: d4 06 20 d4 ld [ %i0 + 0xd4 ], %o2 <== NOT EXECUTED 40002858: c2 06 20 d0 ld [ %i0 + 0xd0 ], %g1 <== NOT EXECUTED 4000285c: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40002860: 96 10 00 01 mov %g1, %o3 <== NOT EXECUTED 40002864: 94 02 80 01 add %o2, %g1, %o2 <== NOT EXECUTED 40002868: 11 10 00 6d sethi %hi(0x4001b400), %o0 <== NOT EXECUTED 4000286c: 94 02 bf ff add %o2, -1, %o2 <== NOT EXECUTED 40002870: 40 00 05 b0 call 40003f30 <== NOT EXECUTED 40002874: 90 12 22 20 or %o0, 0x220, %o0 <== NOT EXECUTED stack->area, stack->area + stack->size - 1, stack->size ); if ( !pattern_ok ) { 40002878: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 4000287c: 12 80 00 07 bne 40002898 <== NOT EXECUTED 40002880: 11 10 00 6d sethi %hi(0x4001b400), %o0 <== NOT EXECUTED printk( 40002884: d2 06 20 d4 ld [ %i0 + 0xd4 ], %o1 <== NOT EXECUTED 40002888: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED 4000288c: 90 12 22 50 or %o0, 0x250, %o0 <== NOT EXECUTED 40002890: 40 00 05 a8 call 40003f30 <== NOT EXECUTED 40002894: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED " Damaged pattern begins at 0x%08lx and is %ld bytes long\n", (unsigned long) Stack_check_Get_pattern_area(stack), (long) PATTERN_SIZE_BYTES); } rtems_fatal_error_occurred( 0x81 ); 40002898: 40 00 13 b8 call 40007778 <== NOT EXECUTED 4000289c: 91 e8 20 81 restore %g0, 0x81, %o0 <== NOT EXECUTED 400028a0: 01 00 00 00 nop 4000672c <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 4000672c: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40006730: 03 10 00 68 sethi %hi(0x4001a000), %g1 40006734: e0 00 60 b0 ld [ %g1 + 0xb0 ], %l0 ! 4001a0b0 <_API_extensions_List> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40006738: 03 10 00 68 sethi %hi(0x4001a000), %g1 4000673c: 10 80 00 08 b 4000675c <_API_extensions_Run_postdriver+0x30> 40006740: a2 10 60 b4 or %g1, 0xb4, %l1 ! 4001a0b4 <_API_extensions_List+0x4> !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postdriver_hook ) 40006744: 80 a0 60 00 cmp %g1, 0 40006748: 22 80 00 05 be,a 4000675c <_API_extensions_Run_postdriver+0x30> 4000674c: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postdriver_hook)(); 40006750: 9f c0 40 00 call %g1 40006754: 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 ) { 40006758: 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 ) ; 4000675c: 80 a4 00 11 cmp %l0, %l1 40006760: 32 bf ff f9 bne,a 40006744 <_API_extensions_Run_postdriver+0x18> 40006764: c2 04 20 0c ld [ %l0 + 0xc ], %g1 the_extension = (API_extensions_Control *) the_node; if ( the_extension->postdriver_hook ) (*the_extension->postdriver_hook)(); } } 40006768: 81 c7 e0 08 ret 4000676c: 81 e8 00 00 restore 400067d0 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 400067d0: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 400067d4: 03 10 00 68 sethi %hi(0x4001a000), %g1 400067d8: e0 00 60 b0 ld [ %g1 + 0xb0 ], %l0 ! 4001a0b0 <_API_extensions_List> the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postswitch_hook ) (*the_extension->postswitch_hook)( _Thread_Executing ); 400067dc: 23 10 00 67 sethi %hi(0x40019c00), %l1 400067e0: 03 10 00 68 sethi %hi(0x4001a000), %g1 400067e4: 10 80 00 08 b 40006804 <_API_extensions_Run_postswitch+0x34> 400067e8: a4 10 60 b4 or %g1, 0xb4, %l2 ! 4001a0b4 <_API_extensions_List+0x4> !_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 ) 400067ec: 80 a0 60 00 cmp %g1, 0 400067f0: 22 80 00 05 be,a 40006804 <_API_extensions_Run_postswitch+0x34> 400067f4: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postswitch_hook)( _Thread_Executing ); 400067f8: 9f c0 40 00 call %g1 400067fc: d0 04 62 fc ld [ %l1 + 0x2fc ], %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 ) { 40006800: 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 ) ; 40006804: 80 a4 00 12 cmp %l0, %l2 40006808: 32 bf ff f9 bne,a 400067ec <_API_extensions_Run_postswitch+0x1c> 4000680c: 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 ); } } 40006810: 81 c7 e0 08 ret 40006814: 81 e8 00 00 restore 4000678c <_API_extensions_Run_predriver>: * * _API_extensions_Run_predriver */ void _API_extensions_Run_predriver( void ) { 4000678c: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40006790: 03 10 00 68 sethi %hi(0x4001a000), %g1 40006794: e0 00 60 b0 ld [ %g1 + 0xb0 ], %l0 ! 4001a0b0 <_API_extensions_List> 40006798: 03 10 00 68 sethi %hi(0x4001a000), %g1 4000679c: 10 80 00 08 b 400067bc <_API_extensions_Run_predriver+0x30> 400067a0: a2 10 60 b4 or %g1, 0xb4, %l1 ! 4001a0b4 <_API_extensions_List+0x4> !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->predriver_hook ) 400067a4: 80 a0 60 00 cmp %g1, 0 400067a8: 22 80 00 05 be,a 400067bc <_API_extensions_Run_predriver+0x30> 400067ac: e0 04 00 00 ld [ %l0 ], %l0 (*the_extension->predriver_hook)(); 400067b0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400067b4: 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 ) { 400067b8: 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 ) ; 400067bc: 80 a4 00 11 cmp %l0, %l1 400067c0: 32 bf ff f9 bne,a 400067a4 <_API_extensions_Run_predriver+0x18> 400067c4: c2 04 20 08 ld [ %l0 + 8 ], %g1 the_extension = (API_extensions_Control *) the_node; if ( the_extension->predriver_hook ) (*the_extension->predriver_hook)(); } } 400067c8: 81 c7 e0 08 ret 400067cc: 81 e8 00 00 restore 40008aa8 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 40008aa8: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing = _Thread_Executing; 40008aac: 03 10 00 72 sethi %hi(0x4001c800), %g1 * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 40008ab0: 7f ff e8 55 call 40002c04 40008ab4: e0 00 62 0c ld [ %g1 + 0x20c ], %l0 ! 4001ca0c <_Thread_Executing> 40008ab8: 84 10 00 08 mov %o0, %g2 switch ( the_rwlock->current_state ) { 40008abc: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 40008ac0: 80 a0 60 01 cmp %g1, 1 40008ac4: 22 80 00 0e be,a 40008afc <_CORE_RWLock_Release+0x54> 40008ac8: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40008acc: 0a 80 00 06 bcs 40008ae4 <_CORE_RWLock_Release+0x3c> 40008ad0: 80 a0 60 02 cmp %g1, 2 40008ad4: 32 80 00 13 bne,a 40008b20 <_CORE_RWLock_Release+0x78> 40008ad8: c0 26 20 44 clr [ %i0 + 0x44 ] <== NOT EXECUTED return CORE_RWLOCK_SUCCESSFUL; } executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; break; case CORE_RWLOCK_LOCKED_FOR_WRITING: executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 40008adc: 10 80 00 10 b 40008b1c <_CORE_RWLock_Release+0x74> 40008ae0: c0 24 20 34 clr [ %l0 + 0x34 ] */ _ISR_Disable( level ); switch ( the_rwlock->current_state ) { case CORE_RWLOCK_UNLOCKED: _ISR_Enable( level ); 40008ae4: 7f ff e8 4c call 40002c14 <== NOT EXECUTED 40008ae8: b0 10 20 00 clr %i0 <== NOT EXECUTED executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 40008aec: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 40008af0: c2 24 20 34 st %g1, [ %l0 + 0x34 ] <== NOT EXECUTED 40008af4: 81 c7 e0 08 ret <== NOT EXECUTED 40008af8: 81 e8 00 00 restore <== NOT EXECUTED return CORE_RWLOCK_SUCCESSFUL; case CORE_RWLOCK_LOCKED_FOR_READING: the_rwlock->number_of_readers -= 1; 40008afc: 82 00 7f ff add %g1, -1, %g1 if ( the_rwlock->number_of_readers != 0 ) { 40008b00: 80 a0 60 00 cmp %g1, 0 40008b04: 02 80 00 05 be 40008b18 <_CORE_RWLock_Release+0x70> 40008b08: c2 26 20 48 st %g1, [ %i0 + 0x48 ] /* must be unlocked again */ _ISR_Enable( level ); 40008b0c: 7f ff e8 42 call 40002c14 40008b10: b0 10 20 00 clr %i0 40008b14: 30 80 00 25 b,a 40008ba8 <_CORE_RWLock_Release+0x100> return CORE_RWLOCK_SUCCESSFUL; } executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; break; case CORE_RWLOCK_LOCKED_FOR_WRITING: executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 40008b18: 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; 40008b1c: c0 26 20 44 clr [ %i0 + 0x44 ] _ISR_Enable( level ); 40008b20: 7f ff e8 3d call 40002c14 40008b24: 90 10 00 02 mov %g2, %o0 next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 40008b28: 40 00 09 36 call 4000b000 <_Thread_queue_Dequeue> 40008b2c: 90 10 00 18 mov %i0, %o0 if ( next ) { 40008b30: 80 a2 20 00 cmp %o0, 0 40008b34: 22 80 00 1d be,a 40008ba8 <_CORE_RWLock_Release+0x100> 40008b38: b0 10 20 00 clr %i0 if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 40008b3c: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 40008b40: 80 a0 60 01 cmp %g1, 1 40008b44: 32 80 00 05 bne,a 40008b58 <_CORE_RWLock_Release+0xb0> 40008b48: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 40008b4c: 82 10 20 02 mov 2, %g1 40008b50: 10 80 00 15 b 40008ba4 <_CORE_RWLock_Release+0xfc> 40008b54: 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; 40008b58: 84 10 20 01 mov 1, %g2 } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 40008b5c: 82 00 60 01 inc %g1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 40008b60: c4 26 20 44 st %g2, [ %i0 + 0x44 ] } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 40008b64: 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 ); 40008b68: 40 00 0a ba call 4000b650 <_Thread_queue_First> 40008b6c: 90 10 00 18 mov %i0, %o0 if ( !next || 40008b70: 80 a2 20 00 cmp %o0, 0 40008b74: 22 80 00 0d be,a 40008ba8 <_CORE_RWLock_Release+0x100> 40008b78: b0 10 20 00 clr %i0 40008b7c: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 40008b80: 80 a0 60 01 cmp %g1, 1 40008b84: 02 80 00 08 be 40008ba4 <_CORE_RWLock_Release+0xfc> 40008b88: 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; 40008b8c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 40008b90: 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; 40008b94: 82 00 60 01 inc %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 40008b98: 40 00 0a 41 call 4000b49c <_Thread_queue_Extract> 40008b9c: c2 26 20 48 st %g1, [ %i0 + 0x48 ] 40008ba0: 30 bf ff f2 b,a 40008b68 <_CORE_RWLock_Release+0xc0> } } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 40008ba4: b0 10 20 00 clr %i0 40008ba8: 81 c7 e0 08 ret 40008bac: 81 e8 00 00 restore 40008bb0 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 40008bb0: 9d e3 bf 90 save %sp, -112, %sp uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 40008bb4: 92 96 20 00 orcc %i0, 0, %o1 40008bb8: 12 80 00 0a bne 40008be0 <_CORE_RWLock_Timeout+0x30> 40008bbc: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008bc0: 03 10 00 72 sethi %hi(0x4001c800), %g1 <== NOT EXECUTED 40008bc4: c4 00 61 30 ld [ %g1 + 0x130 ], %g2 ! 4001c930 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40008bc8: 84 00 a0 01 inc %g2 <== NOT EXECUTED 40008bcc: c4 20 61 30 st %g2, [ %g1 + 0x130 ] <== NOT EXECUTED Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 40008bd0: 03 10 00 72 sethi %hi(0x4001c800), %g1 <== NOT EXECUTED 40008bd4: d2 00 62 0c ld [ %g1 + 0x20c ], %o1 ! 4001ca0c <_Thread_Executing> <== NOT EXECUTED 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; 40008bd8: 10 80 00 18 b 40008c38 <_CORE_RWLock_Timeout+0x88> <== NOT EXECUTED 40008bdc: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 40008be0: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 40008be4: 80 a0 a0 04 cmp %g2, 4 40008be8: 18 80 00 0e bgu 40008c20 <_CORE_RWLock_Timeout+0x70> 40008bec: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40008bf0: 83 32 60 1b srl %o1, 0x1b, %g1 40008bf4: 80 a0 60 01 cmp %g1, 1 40008bf8: 12 80 00 0a bne 40008c20 <_CORE_RWLock_Timeout+0x70> 40008bfc: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40008c00: 83 28 a0 02 sll %g2, 2, %g1 40008c04: 05 10 00 72 sethi %hi(0x4001c800), %g2 40008c08: 84 10 a0 90 or %g2, 0x90, %g2 ! 4001c890 <_Objects_Information_table> 40008c0c: c2 00 80 01 ld [ %g2 + %g1 ], %g1 40008c10: d0 00 60 04 ld [ %g1 + 4 ], %o0 if ( !information ) { 40008c14: 80 a2 20 00 cmp %o0, 0 40008c18: 12 80 00 05 bne 40008c2c <_CORE_RWLock_Timeout+0x7c> 40008c1c: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; 40008c20: 92 10 20 00 clr %o1 <== NOT EXECUTED 40008c24: 10 80 00 05 b 40008c38 <_CORE_RWLock_Timeout+0x88> <== NOT EXECUTED 40008c28: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40008c2c: 40 00 03 46 call 40009944 <_Objects_Get> 40008c30: 94 07 bf f4 add %fp, -12, %o2 40008c34: 92 10 00 08 mov %o0, %o1 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 40008c38: c2 07 bf f4 ld [ %fp + -12 ], %g1 40008c3c: 80 a0 60 00 cmp %g1, 0 40008c40: 12 80 00 18 bne 40008ca0 <_CORE_RWLock_Timeout+0xf0> 40008c44: 01 00 00 00 nop */ static inline void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 40008c48: c4 02 60 44 ld [ %o1 + 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_QUEUE_SYNCHRONIZED && 40008c4c: c6 00 a0 30 ld [ %g2 + 0x30 ], %g3 40008c50: 80 a0 e0 00 cmp %g3, 0 40008c54: 02 80 00 0b be 40008c80 <_CORE_RWLock_Timeout+0xd0> 40008c58: 03 10 00 72 sethi %hi(0x4001c800), %g1 40008c5c: c2 00 62 0c ld [ %g1 + 0x20c ], %g1 ! 4001ca0c <_Thread_Executing> <== NOT EXECUTED 40008c60: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED 40008c64: 32 80 00 08 bne,a 40008c84 <_CORE_RWLock_Timeout+0xd4> <== NOT EXECUTED 40008c68: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 <== NOT EXECUTED _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_QUEUE_SATISFIED ) 40008c6c: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 40008c70: 02 80 00 08 be 40008c90 <_CORE_RWLock_Timeout+0xe0> <== NOT EXECUTED 40008c74: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED the_thread_queue->sync_state = THREAD_QUEUE_TIMEOUT; 40008c78: 10 80 00 06 b 40008c90 <_CORE_RWLock_Timeout+0xe0> <== NOT EXECUTED 40008c7c: c2 20 a0 30 st %g1, [ %g2 + 0x30 ] <== NOT EXECUTED } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 40008c80: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 40008c84: d0 02 60 44 ld [ %o1 + 0x44 ], %o0 40008c88: 40 00 0a 05 call 4000b49c <_Thread_queue_Extract> 40008c8c: c2 22 60 34 st %g1, [ %o1 + 0x34 ] */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 40008c90: 05 10 00 72 sethi %hi(0x4001c800), %g2 40008c94: c2 00 a1 30 ld [ %g2 + 0x130 ], %g1 ! 4001c930 <_Thread_Dispatch_disable_level> 40008c98: 82 00 7f ff add %g1, -1, %g1 40008c9c: c2 20 a1 30 st %g1, [ %g2 + 0x130 ] 40008ca0: 81 c7 e0 08 ret 40008ca4: 81 e8 00 00 restore 400134d8 <_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 ) { 400134d8: 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 ) { 400134dc: 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 ) { 400134e0: 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 ) { 400134e4: 80 a6 80 01 cmp %i2, %g1 400134e8: 18 80 00 17 bgu 40013544 <_CORE_message_queue_Broadcast+0x6c> 400134ec: 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 ) { 400134f0: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 400134f4: 80 a0 60 00 cmp %g1, 0 400134f8: 02 80 00 0a be 40013520 <_CORE_message_queue_Broadcast+0x48> 400134fc: a2 10 20 00 clr %l1 *count = 0; 40013500: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED 40013504: 81 c7 e0 08 ret <== NOT EXECUTED 40013508: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4001350c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 40013510: 40 00 22 be call 4001c008 40013514: a2 04 60 01 inc %l1 buffer, waitp->return_argument, size ); *(uint32_t *)the_thread->Wait.return_argument_1 = size; 40013518: c2 04 20 2c ld [ %l0 + 0x2c ], %g1 4001351c: 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))) { 40013520: 40 00 0b 3f call 4001621c <_Thread_queue_Dequeue> 40013524: 90 10 00 12 mov %l2, %o0 40013528: 92 10 00 19 mov %i1, %o1 4001352c: a0 10 00 08 mov %o0, %l0 40013530: 80 a2 20 00 cmp %o0, 0 40013534: 12 bf ff f6 bne 4001350c <_CORE_message_queue_Broadcast+0x34> 40013538: 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; 4001353c: e2 27 40 00 st %l1, [ %i5 ] 40013540: b0 10 20 00 clr %i0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 40013544: 81 c7 e0 08 ret 40013548: 81 e8 00 00 restore 400137c4 <_CORE_message_queue_Initialize>: CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, uint32_t maximum_message_size ) { 400137c4: 9d e3 bf 98 save %sp, -104, %sp uint32_t message_buffering_required; uint32_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; the_message_queue->number_of_pending_messages = 0; 400137c8: c0 26 20 48 clr [ %i0 + 0x48 ] ) { uint32_t message_buffering_required; uint32_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 400137cc: f4 26 20 44 st %i2, [ %i0 + 0x44 ] the_message_queue->number_of_pending_messages = 0; the_message_queue->maximum_message_size = maximum_message_size; 400137d0: f6 26 20 4c st %i3, [ %i0 + 0x4c ] CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 400137d4: c0 26 20 60 clr [ %i0 + 0x60 ] the_message_queue->notify_argument = the_argument; 400137d8: c0 26 20 64 clr [ %i0 + 0x64 ] * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 400137dc: 80 8e e0 03 btst 3, %i3 400137e0: 02 80 00 07 be 400137fc <_CORE_message_queue_Initialize+0x38> 400137e4: a0 10 00 1b mov %i3, %l0 allocated_message_size += sizeof(uint32_t); 400137e8: 82 06 e0 04 add %i3, 4, %g1 allocated_message_size &= ~(sizeof(uint32_t) - 1); 400137ec: a0 08 7f fc and %g1, -4, %l0 } if (allocated_message_size < maximum_message_size) 400137f0: 80 a4 00 1b cmp %l0, %i3 400137f4: 0a 80 00 24 bcs 40013884 <_CORE_message_queue_Initialize+0xc0> 400137f8: 01 00 00 00 nop /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = maximum_pending_messages * 400137fc: b6 04 20 14 add %l0, 0x14, %i3 40013800: 92 10 00 1a mov %i2, %o1 40013804: 40 00 2a 67 call 4001e1a0 <.umul> 40013808: 90 10 00 1b mov %i3, %o0 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 4001380c: 80 a2 00 10 cmp %o0, %l0 40013810: 0a 80 00 1d bcs 40013884 <_CORE_message_queue_Initialize+0xc0> 40013814: 92 10 00 08 mov %o0, %o1 40013818: 11 10 00 93 sethi %hi(0x40024c00), %o0 4001381c: 7f ff e7 da call 4000d784 <_Heap_Allocate> 40013820: 90 12 20 cc or %o0, 0xcc, %o0 ! 40024ccc <_Workspace_Area> * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 40013824: 80 a2 20 00 cmp %o0, 0 40013828: 02 80 00 17 be 40013884 <_CORE_message_queue_Initialize+0xc0> 4001382c: d0 26 20 5c st %o0, [ %i0 + 0x5c ] /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 40013830: 92 10 00 08 mov %o0, %o1 40013834: 94 10 00 1a mov %i2, %o2 40013838: 90 06 20 68 add %i0, 0x68, %o0 4001383c: 7f ff ff 88 call 4001365c <_Chain_Initialize> 40013840: 96 10 00 1b mov %i3, %o3 allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 40013844: c2 06 40 00 ld [ %i1 ], %g1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 40013848: c0 26 20 54 clr [ %i0 + 0x54 ] 4001384c: 82 18 60 01 xor %g1, 1, %g1 40013850: 80 a0 00 01 cmp %g0, %g1 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40013854: 82 06 20 54 add %i0, 0x54, %g1 40013858: c2 26 20 50 st %g1, [ %i0 + 0x50 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4001385c: 82 06 20 50 add %i0, 0x50, %g1 40013860: 90 10 00 18 mov %i0, %o0 40013864: c2 26 20 58 st %g1, [ %i0 + 0x58 ] 40013868: 92 60 3f ff subx %g0, -1, %o1 4001386c: 94 10 20 80 mov 0x80, %o2 40013870: 96 10 20 06 mov 6, %o3 40013874: 7f ff f1 64 call 4000fe04 <_Thread_queue_Initialize> 40013878: b0 10 20 01 mov 1, %i0 4001387c: 81 c7 e0 08 ret 40013880: 81 e8 00 00 restore STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return TRUE; } 40013884: 81 c7 e0 08 ret <== NOT EXECUTED 40013888: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40013350 <_CORE_message_queue_Seize>: void *buffer, size_t *size, boolean wait, Watchdog_Interval timeout ) { 40013350: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; Thread_Control *the_thread; executing = _Thread_Executing; 40013354: 03 10 00 a3 sethi %hi(0x40028c00), %g1 40013358: e2 00 61 8c ld [ %g1 + 0x18c ], %l1 ! 40028d8c <_Thread_Executing> void *buffer, size_t *size, boolean wait, Watchdog_Interval timeout ) { 4001335c: a0 10 00 18 mov %i0, %l0 Thread_Control *executing; Thread_Control *the_thread; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; _ISR_Disable( level ); 40013360: 7f ff bc 68 call 40002500 40013364: c0 24 60 34 clr [ %l1 + 0x34 ] 40013368: 86 10 00 08 mov %o0, %g3 if ( the_message_queue->number_of_pending_messages != 0 ) { 4001336c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40013370: 80 a0 60 00 cmp %g1, 0 40013374: 02 80 00 2a be 4001341c <_CORE_message_queue_Seize+0xcc> 40013378: 80 a7 20 00 cmp %i4, 0 */ RTEMS_INLINE_ROUTINE boolean _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4001337c: f2 06 20 50 ld [ %i0 + 0x50 ], %i1 the_message_queue->number_of_pending_messages -= 1; 40013380: 82 00 7f ff add %g1, -1, %g1 40013384: c2 26 20 48 st %g1, [ %i0 + 0x48 ] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 40013388: 82 06 20 54 add %i0, 0x54, %g1 4001338c: 80 a6 40 01 cmp %i1, %g1 40013390: 32 80 00 04 bne,a 400133a0 <_CORE_message_queue_Seize+0x50> 40013394: c2 06 40 00 ld [ %i1 ], %g1 40013398: 10 80 00 05 b 400133ac <_CORE_message_queue_Seize+0x5c> <== NOT EXECUTED 4001339c: b2 10 20 00 clr %i1 <== NOT EXECUTED Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; new_first->previous = _Chain_Head(the_chain); 400133a0: 84 06 20 50 add %i0, 0x50, %g2 Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 400133a4: c2 26 20 50 st %g1, [ %i0 + 0x50 ] new_first->previous = _Chain_Head(the_chain); 400133a8: c4 20 60 04 st %g2, [ %g1 + 4 ] the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); _ISR_Enable( level ); 400133ac: 7f ff bc 59 call 40002510 400133b0: 90 10 00 03 mov %g3, %o0 *size = the_message->Contents.size; 400133b4: d4 06 60 0c ld [ %i1 + 0xc ], %o2 _Thread_Executing->Wait.count = the_message->priority; 400133b8: 03 10 00 a3 sethi %hi(0x40028c00), %g1 the_message_queue->number_of_pending_messages -= 1; the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); _ISR_Enable( level ); *size = the_message->Contents.size; 400133bc: d4 26 c0 00 st %o2, [ %i3 ] _Thread_Executing->Wait.count = the_message->priority; 400133c0: c4 00 61 8c ld [ %g1 + 0x18c ], %g2 400133c4: c2 06 60 08 ld [ %i1 + 8 ], %g1 _CORE_message_queue_Copy_buffer(the_message->Contents.buffer,buffer,*size); 400133c8: 92 10 00 1a mov %i2, %o1 the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); _ISR_Enable( level ); *size = the_message->Contents.size; _Thread_Executing->Wait.count = the_message->priority; 400133cc: c2 20 a0 24 st %g1, [ %g2 + 0x24 ] _CORE_message_queue_Copy_buffer(the_message->Contents.buffer,buffer,*size); 400133d0: a2 06 60 10 add %i1, 0x10, %l1 400133d4: 7f ff ff d8 call 40013334 <_CORE_message_queue_Copy_buffer> 400133d8: 90 10 00 11 mov %l1, %o0 * * NOTE: If we note that the queue was not full before this receive, * then we can avoid this dequeue. */ the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 400133dc: 7f ff e9 03 call 4000d7e8 <_Thread_queue_Dequeue> 400133e0: 90 10 00 10 mov %l0, %o0 if ( !the_thread ) { 400133e4: 82 92 20 00 orcc %o0, 0, %g1 400133e8: 32 80 00 04 bne,a 400133f8 <_CORE_message_queue_Seize+0xa8> 400133ec: d4 00 60 30 ld [ %g1 + 0x30 ], %o2 RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 400133f0: 7f ff df 21 call 4000b074 <_Chain_Append> 400133f4: 91 ec 20 68 restore %l0, 0x68, %o0 * waiting task. */ the_message->priority = the_thread->Wait.count; the_message->Contents.size = (uint32_t)the_thread->Wait.option; _CORE_message_queue_Copy_buffer( 400133f8: d0 00 60 28 ld [ %g1 + 0x28 ], %o0 * There was a thread waiting to send a message. This code * puts the messages in the message queue on behalf of the * waiting task. */ the_message->priority = the_thread->Wait.count; 400133fc: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 the_message->Contents.size = (uint32_t)the_thread->Wait.option; 40013400: d4 26 60 0c st %o2, [ %i1 + 0xc ] * There was a thread waiting to send a message. This code * puts the messages in the message queue on behalf of the * waiting task. */ the_message->priority = the_thread->Wait.count; 40013404: c2 26 60 08 st %g1, [ %i1 + 8 ] the_message->Contents.size = (uint32_t)the_thread->Wait.option; _CORE_message_queue_Copy_buffer( 40013408: 7f ff ff cb call 40013334 <_CORE_message_queue_Copy_buffer> 4001340c: 92 10 00 11 mov %l1, %o1 the_thread->Wait.return_argument, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 40013410: f4 06 60 08 ld [ %i1 + 8 ], %i2 40013414: 40 00 0c 18 call 40016474 <_CORE_message_queue_Insert_message> 40013418: 91 e8 00 10 restore %g0, %l0, %o0 the_message->priority ); return; } if ( !wait ) { 4001341c: 12 80 00 08 bne 4001343c <_CORE_message_queue_Seize+0xec> 40013420: 82 10 20 01 mov 1, %g1 _ISR_Enable( level ); 40013424: 7f ff bc 3b call 40002510 40013428: 01 00 00 00 nop executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 4001342c: 82 10 20 04 mov 4, %g1 ! 4 40013430: c2 24 60 34 st %g1, [ %l1 + 0x34 ] executing->Wait.return_argument_1 = (void *)size; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 40013434: 81 c7 e0 08 ret 40013438: 81 e8 00 00 restore _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 = buffer; executing->Wait.return_argument_1 = (void *)size; 4001343c: f6 24 60 2c st %i3, [ %l1 + 0x2c ] executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 40013440: f0 24 60 44 st %i0, [ %l1 + 0x44 ] executing->Wait.id = id; 40013444: f2 24 60 20 st %i1, [ %l1 + 0x20 ] executing->Wait.return_argument = buffer; 40013448: f4 24 60 28 st %i2, [ %l1 + 0x28 ] RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; 4001344c: c2 26 20 30 st %g1, [ %i0 + 0x30 ] executing->Wait.return_argument_1 = (void *)size; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 40013450: 7f ff bc 30 call 40002510 40013454: 35 10 00 37 sethi %hi(0x4000dc00), %i2 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 40013458: b2 10 00 1d mov %i5, %i1 4001345c: 7f ff e9 51 call 4000d9a0 <_Thread_queue_Enqueue_with_handler> 40013460: 95 ee a2 38 restore %i2, 0x238, %o2 40013464: 01 00 00 00 nop 40013484 <_CORE_message_queue_Submit>: CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, boolean wait, Watchdog_Interval timeout ) { 40013484: 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 ) { 40013488: 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, boolean wait, Watchdog_Interval timeout ) { 4001348c: 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 ) { 40013490: 80 a6 80 01 cmp %i2, %g1 40013494: 18 80 00 3f bgu 40013590 <_CORE_message_queue_Submit+0x10c> 40013498: 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 ) { 4001349c: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 400134a0: 80 a0 60 00 cmp %g1, 0 400134a4: 32 80 00 0f bne,a 400134e0 <_CORE_message_queue_Submit+0x5c> 400134a8: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 400134ac: 7f ff e8 cf call 4000d7e8 <_Thread_queue_Dequeue> 400134b0: 90 10 00 11 mov %l1, %o0 if ( the_thread ) { 400134b4: a0 92 20 00 orcc %o0, 0, %l0 400134b8: 02 80 00 09 be 400134dc <_CORE_message_queue_Submit+0x58> 400134bc: 90 10 00 19 mov %i1, %o0 _CORE_message_queue_Copy_buffer( 400134c0: d2 04 20 28 ld [ %l0 + 0x28 ], %o1 400134c4: 7f ff ff e9 call 40013468 <_CORE_message_queue_Copy_buffer> 400134c8: 94 10 00 1a mov %i2, %o2 buffer, the_thread->Wait.return_argument, size ); *(size_t *)the_thread->Wait.return_argument_1 = size; 400134cc: c2 04 20 2c ld [ %l0 + 0x2c ], %g1 the_thread->Wait.count = submit_type; 400134d0: fa 24 20 24 st %i5, [ %l0 + 0x24 ] _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument, size ); *(size_t *)the_thread->Wait.return_argument_1 = size; 400134d4: 10 80 00 15 b 40013528 <_CORE_message_queue_Submit+0xa4> 400134d8: 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 < 400134dc: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 400134e0: c2 04 60 44 ld [ %l1 + 0x44 ], %g1 400134e4: 80 a0 80 01 cmp %g2, %g1 400134e8: 1a 80 00 12 bcc 40013530 <_CORE_message_queue_Submit+0xac> 400134ec: c2 07 a0 5c ld [ %fp + 0x5c ], %g1 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 *) 400134f0: 7f ff de ed call 4000b0a4 <_Chain_Get> 400134f4: 90 04 60 68 add %l1, 0x68, %o0 /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 400134f8: a0 92 20 00 orcc %o0, 0, %l0 400134fc: 02 80 00 27 be 40013598 <_CORE_message_queue_Submit+0x114> 40013500: 90 10 00 19 mov %i1, %o0 return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED; } _CORE_message_queue_Copy_buffer( 40013504: 92 04 20 10 add %l0, 0x10, %o1 40013508: 7f ff ff d8 call 40013468 <_CORE_message_queue_Copy_buffer> 4001350c: 94 10 00 1a mov %i2, %o2 size ); the_message->Contents.size = size; the_message->priority = submit_type; _CORE_message_queue_Insert_message( 40013510: 90 10 00 11 mov %l1, %o0 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 40013514: f4 24 20 0c st %i2, [ %l0 + 0xc ] the_message->priority = submit_type; 40013518: fa 24 20 08 st %i5, [ %l0 + 8 ] _CORE_message_queue_Insert_message( 4001351c: 92 10 00 10 mov %l0, %o1 40013520: 40 00 0b d5 call 40016474 <_CORE_message_queue_Insert_message> 40013524: 94 10 00 1d mov %i5, %o2 40013528: 81 c7 e0 08 ret 4001352c: 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 ) { 40013530: 80 a0 60 00 cmp %g1, 0 40013534: 02 80 00 17 be 40013590 <_CORE_message_queue_Submit+0x10c> 40013538: 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() ) { 4001353c: 03 10 00 a3 sethi %hi(0x40028c00), %g1 40013540: c2 00 61 74 ld [ %g1 + 0x174 ], %g1 ! 40028d74 <_ISR_Nest_level> 40013544: 80 a0 60 00 cmp %g1, 0 40013548: 12 80 00 14 bne 40013598 <_CORE_message_queue_Submit+0x114> 4001354c: 03 10 00 a3 sethi %hi(0x40028c00), %g1 */ { Thread_Control *executing = _Thread_Executing; _ISR_Disable( level ); 40013550: 7f ff bb ec call 40002500 40013554: e0 00 61 8c ld [ %g1 + 0x18c ], %l0 ! 40028d8c <_Thread_Executing> 40013558: 82 10 20 01 mov 1, %g1 _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 = buffer; executing->Wait.option = size; executing->Wait.count = submit_type; 4001355c: 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; 40013560: f6 24 20 20 st %i3, [ %l0 + 0x20 ] executing->Wait.return_argument = buffer; 40013564: f2 24 20 28 st %i1, [ %l0 + 0x28 ] executing->Wait.option = size; 40013568: 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; 4001356c: e2 24 20 44 st %l1, [ %l0 + 0x44 ] 40013570: c2 24 60 30 st %g1, [ %l1 + 0x30 ] executing->Wait.id = id; executing->Wait.return_argument = buffer; executing->Wait.option = size; executing->Wait.count = submit_type; _ISR_Enable( level ); 40013574: 7f ff bb e7 call 40002510 40013578: b0 10 20 07 mov 7, %i0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 4001357c: d2 07 a0 60 ld [ %fp + 0x60 ], %o1 40013580: 90 10 00 11 mov %l1, %o0 40013584: 15 10 00 37 sethi %hi(0x4000dc00), %o2 40013588: 7f ff e9 06 call 4000d9a0 <_Thread_queue_Enqueue_with_handler> 4001358c: 94 12 a2 38 or %o2, 0x238, %o2 ! 4000de38 <_Thread_queue_Timeout> 40013590: 81 c7 e0 08 ret 40013594: 81 e8 00 00 restore } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 40013598: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED } 4001359c: 81 c7 e0 08 ret <== NOT EXECUTED 400135a0: 81 e8 00 00 restore <== NOT EXECUTED 40006950 <_CORE_mutex_Seize_interrupt_blocking>: void _CORE_mutex_Seize_interrupt_blocking( CORE_mutex_Control *the_mutex, Watchdog_Interval timeout ) { 40006950: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; executing = _Thread_Executing; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { 40006954: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40006958: 80 a0 60 02 cmp %g1, 2 Watchdog_Interval timeout ) { Thread_Control *executing; executing = _Thread_Executing; 4000695c: 03 10 00 67 sethi %hi(0x40019c00), %g1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { 40006960: 12 80 00 0a bne 40006988 <_CORE_mutex_Seize_interrupt_blocking+0x38> 40006964: d2 00 62 fc ld [ %g1 + 0x2fc ], %o1 ! 40019efc <_Thread_Executing> if ( the_mutex->holder->current_priority > executing->current_priority ) { 40006968: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 4000696c: d2 02 60 14 ld [ %o1 + 0x14 ], %o1 40006970: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 40006974: 80 a0 40 09 cmp %g1, %o1 40006978: 28 80 00 05 bleu,a 4000698c <_CORE_mutex_Seize_interrupt_blocking+0x3c> 4000697c: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 _Thread_Change_priority( 40006980: 40 00 07 47 call 4000869c <_Thread_Change_priority> 40006984: 94 10 20 00 clr %o2 FALSE ); } } the_mutex->blocked_count++; 40006988: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); 4000698c: 90 10 00 18 mov %i0, %o0 FALSE ); } } the_mutex->blocked_count++; 40006990: 82 00 60 01 inc %g1 _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); 40006994: 92 10 00 19 mov %i1, %o1 FALSE ); } } the_mutex->blocked_count++; 40006998: c2 26 20 58 st %g1, [ %i0 + 0x58 ] _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); 4000699c: 15 10 00 25 sethi %hi(0x40009400), %o2 400069a0: 40 00 09 d3 call 400090ec <_Thread_queue_Enqueue_with_handler> 400069a4: 94 12 a1 84 or %o2, 0x184, %o2 ! 40009584 <_Thread_queue_Timeout> #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400069a8: 05 10 00 67 sethi %hi(0x40019c00), %g2 400069ac: c2 00 a2 20 ld [ %g2 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> 400069b0: 82 00 7f ff add %g1, -1, %g1 400069b4: c2 20 a2 20 st %g1, [ %g2 + 0x220 ] 400069b8: c2 00 a2 20 ld [ %g2 + 0x220 ], %g1 400069bc: 80 a0 60 00 cmp %g1, 0 400069c0: 12 80 00 04 bne 400069d0 <_CORE_mutex_Seize_interrupt_blocking+0x80> 400069c4: 01 00 00 00 nop _Thread_Dispatch(); 400069c8: 40 00 08 61 call 40008b4c <_Thread_Dispatch> 400069cc: 81 e8 00 00 restore 400069d0: 81 c7 e0 08 ret <== NOT EXECUTED 400069d4: 81 e8 00 00 restore <== NOT EXECUTED 400069d8 <_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 ) { 400069d8: 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 ) { 400069dc: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 400069e0: 80 a0 60 00 cmp %g1, 0 400069e4: 02 80 00 07 be 40006a00 <_CORE_mutex_Surrender+0x28> 400069e8: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !_Thread_Is_executing( holder ) ) 400069ec: 03 10 00 67 sethi %hi(0x40019c00), %g1 400069f0: c2 00 62 fc ld [ %g1 + 0x2fc ], %g1 ! 40019efc <_Thread_Executing> 400069f4: 80 a2 00 01 cmp %o0, %g1 400069f8: 12 80 00 51 bne 40006b3c <_CORE_mutex_Surrender+0x164> 400069fc: 84 10 20 03 mov 3, %g2 return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 40006a00: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 40006a04: 80 a0 60 00 cmp %g1, 0 40006a08: 02 80 00 4c be 40006b38 <_CORE_mutex_Surrender+0x160> 40006a0c: 82 00 7f ff add %g1, -1, %g1 return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; if ( the_mutex->nest_count != 0 ) { 40006a10: 80 a0 60 00 cmp %g1, 0 40006a14: 02 80 00 09 be 40006a38 <_CORE_mutex_Surrender+0x60> 40006a18: c2 26 20 54 st %g1, [ %i0 + 0x54 ] switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40006a1c: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 40006a20: 80 a0 60 00 cmp %g1, 0 40006a24: 02 80 00 46 be 40006b3c <_CORE_mutex_Surrender+0x164> 40006a28: 84 10 20 00 clr %g2 40006a2c: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40006a30: 02 80 00 43 be 40006b3c <_CORE_mutex_Surrender+0x164> <== NOT EXECUTED 40006a34: 84 10 20 02 mov 2, %g2 <== NOT EXECUTED 40006a38: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40006a3c: 80 a0 60 02 cmp %g1, 2 40006a40: 22 80 00 06 be,a 40006a58 <_CORE_mutex_Surrender+0x80> 40006a44: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 40006a48: 80 a0 60 03 cmp %g1, 3 40006a4c: 32 80 00 07 bne,a 40006a68 <_CORE_mutex_Surrender+0x90> 40006a50: c0 26 20 5c clr [ %i0 + 0x5c ] _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) holder->resource_count--; 40006a54: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 40006a58: 82 00 7f ff add %g1, -1, %g1 40006a5c: c2 22 20 1c st %g1, [ %o0 + 0x1c ] 40006a60: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 the_mutex->holder = NULL; 40006a64: c0 26 20 5c clr [ %i0 + 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 ) || 40006a68: 80 a0 60 02 cmp %g1, 2 40006a6c: 02 80 00 05 be 40006a80 <_CORE_mutex_Surrender+0xa8> 40006a70: c0 26 20 60 clr [ %i0 + 0x60 ] 40006a74: 80 a0 60 03 cmp %g1, 3 40006a78: 12 80 00 0d bne 40006aac <_CORE_mutex_Surrender+0xd4> 40006a7c: 01 00 00 00 nop _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( holder->resource_count == 0 && 40006a80: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 40006a84: 80 a0 60 00 cmp %g1, 0 40006a88: 12 80 00 09 bne 40006aac <_CORE_mutex_Surrender+0xd4> 40006a8c: 01 00 00 00 nop 40006a90: d2 02 20 18 ld [ %o0 + 0x18 ], %o1 40006a94: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 40006a98: 80 a2 40 01 cmp %o1, %g1 40006a9c: 02 80 00 04 be 40006aac <_CORE_mutex_Surrender+0xd4> 40006aa0: 01 00 00 00 nop holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 40006aa4: 40 00 06 fe call 4000869c <_Thread_Change_priority> 40006aa8: 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 ) ) ) { 40006aac: 40 00 09 22 call 40008f34 <_Thread_queue_Dequeue> 40006ab0: 90 10 00 18 mov %i0, %o0 40006ab4: 86 92 20 00 orcc %o0, 0, %g3 40006ab8: 02 80 00 1f be 40006b34 <_CORE_mutex_Surrender+0x15c> 40006abc: 82 10 20 01 mov 1, %g1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 40006ac0: c2 00 e0 08 ld [ %g3 + 8 ], %g1 the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 40006ac4: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 40006ac8: c2 26 20 60 st %g1, [ %i0 + 0x60 ] } else #endif { the_mutex->holder = the_thread; 40006acc: c6 26 20 5c st %g3, [ %i0 + 0x5c ] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 40006ad0: 82 10 20 01 mov 1, %g1 switch ( the_mutex->Attributes.discipline ) { 40006ad4: 80 a0 a0 02 cmp %g2, 2 40006ad8: 02 80 00 07 be 40006af4 <_CORE_mutex_Surrender+0x11c> 40006adc: c2 26 20 54 st %g1, [ %i0 + 0x54 ] 40006ae0: 80 a0 a0 03 cmp %g2, 3 40006ae4: 12 80 00 16 bne 40006b3c <_CORE_mutex_Surrender+0x164> 40006ae8: 84 10 20 00 clr %g2 break; case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_thread->resource_count++; break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: the_thread->resource_count++; 40006aec: 10 80 00 07 b 40006b08 <_CORE_mutex_Surrender+0x130> 40006af0: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 switch ( the_mutex->Attributes.discipline ) { case CORE_MUTEX_DISCIPLINES_FIFO: case CORE_MUTEX_DISCIPLINES_PRIORITY: break; case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_thread->resource_count++; 40006af4: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 40006af8: 84 10 20 00 clr %g2 40006afc: 82 00 60 01 inc %g1 40006b00: 10 80 00 0f b 40006b3c <_CORE_mutex_Surrender+0x164> 40006b04: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: the_thread->resource_count++; if (the_mutex->Attributes.priority_ceiling < 40006b08: c4 00 e0 14 ld [ %g3 + 0x14 ], %g2 break; case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_thread->resource_count++; break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: the_thread->resource_count++; 40006b0c: 82 00 60 01 inc %g1 40006b10: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] if (the_mutex->Attributes.priority_ceiling < 40006b14: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 40006b18: 80 a2 40 02 cmp %o1, %g2 40006b1c: 3a 80 00 08 bcc,a 40006b3c <_CORE_mutex_Surrender+0x164> 40006b20: 84 10 20 00 clr %g2 <== NOT EXECUTED the_thread->current_priority){ _Thread_Change_priority( 40006b24: 40 00 06 de call 4000869c <_Thread_Change_priority> 40006b28: 94 10 20 00 clr %o2 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 40006b2c: 10 80 00 04 b 40006b3c <_CORE_mutex_Surrender+0x164> 40006b30: 84 10 20 00 clr %g2 40006b34: c2 26 20 50 st %g1, [ %i0 + 0x50 ] 40006b38: 84 10 20 00 clr %g2 return CORE_MUTEX_STATUS_SUCCESSFUL; } 40006b3c: 81 c7 e0 08 ret 40006b40: 91 e8 00 02 restore %g0, %g2, %o0 400076c0 <_CORE_spinlock_Release>: */ CORE_spinlock_Status _CORE_spinlock_Release( CORE_spinlock_Control *the_spinlock ) { 400076c0: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 400076c4: 7f ff eb 47 call 400023e0 400076c8: 01 00 00 00 nop /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 400076cc: c2 06 20 04 ld [ %i0 + 4 ], %g1 400076d0: 80 a0 60 00 cmp %g1, 0 400076d4: 12 80 00 06 bne 400076ec <_CORE_spinlock_Release+0x2c> 400076d8: 03 10 00 50 sethi %hi(0x40014000), %g1 _ISR_Enable( level ); 400076dc: 7f ff eb 45 call 400023f0 400076e0: b0 10 20 06 mov 6, %i0 400076e4: 81 c7 e0 08 ret 400076e8: 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 ) { 400076ec: c2 00 62 dc ld [ %g1 + 0x2dc ], %g1 400076f0: c4 06 20 0c ld [ %i0 + 0xc ], %g2 400076f4: c2 00 60 08 ld [ %g1 + 8 ], %g1 400076f8: 80 a0 80 01 cmp %g2, %g1 400076fc: 02 80 00 06 be 40007714 <_CORE_spinlock_Release+0x54> 40007700: 01 00 00 00 nop _ISR_Enable( level ); 40007704: 7f ff eb 3b call 400023f0 <== NOT EXECUTED 40007708: b0 10 20 02 mov 2, %i0 ! 2 <== NOT EXECUTED 4000770c: 81 c7 e0 08 ret <== NOT EXECUTED 40007710: 81 e8 00 00 restore <== NOT EXECUTED } /* * Let it be unlocked. */ the_spinlock->users -= 1; 40007714: c2 06 20 08 ld [ %i0 + 8 ], %g1 40007718: 82 00 7f ff add %g1, -1, %g1 4000771c: c2 26 20 08 st %g1, [ %i0 + 8 ] the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 40007720: c0 26 20 04 clr [ %i0 + 4 ] the_spinlock->holder = 0; 40007724: c0 26 20 0c clr [ %i0 + 0xc ] _ISR_Enable( level ); 40007728: 7f ff eb 32 call 400023f0 4000772c: b0 10 20 00 clr %i0 return CORE_SPINLOCK_SUCCESSFUL; } 40007730: 81 c7 e0 08 ret 40007734: 81 e8 00 00 restore 40007738 <_CORE_spinlock_Wait>: CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, boolean wait, Watchdog_Interval timeout ) { 40007738: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; 4000773c: 03 10 00 50 sethi %hi(0x40014000), %g1 40007740: c2 00 63 84 ld [ %g1 + 0x384 ], %g1 ! 40014384 <_Watchdog_Ticks_since_boot> _ISR_Disable( level ); 40007744: 7f ff eb 27 call 400023e0 40007748: a2 06 80 01 add %i2, %g1, %l1 4000774c: 86 10 00 08 mov %o0, %g3 if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 40007750: c2 06 20 04 ld [ %i0 + 4 ], %g1 40007754: 80 a0 60 01 cmp %g1, 1 40007758: 12 80 00 0c bne 40007788 <_CORE_spinlock_Wait+0x50> 4000775c: 03 10 00 50 sethi %hi(0x40014000), %g1 40007760: c2 00 62 dc ld [ %g1 + 0x2dc ], %g1 ! 400142dc <_Thread_Executing> 40007764: c4 06 20 0c ld [ %i0 + 0xc ], %g2 40007768: c2 00 60 08 ld [ %g1 + 8 ], %g1 4000776c: 80 a0 80 01 cmp %g2, %g1 40007770: 12 80 00 06 bne 40007788 <_CORE_spinlock_Wait+0x50> 40007774: 01 00 00 00 nop (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); 40007778: 7f ff eb 1e call 400023f0 4000777c: b0 10 20 01 mov 1, %i0 ! 1 40007780: 81 c7 e0 08 ret 40007784: 81 e8 00 00 restore return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 40007788: c2 06 20 08 ld [ %i0 + 8 ], %g1 } /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { 4000778c: 25 10 00 50 sethi %hi(0x40014000), %l2 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; 40007790: 82 00 60 01 inc %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007794: 21 10 00 50 sethi %hi(0x40014000), %l0 40007798: c2 26 20 08 st %g1, [ %i0 + 8 ] for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 4000779c: c2 06 20 04 ld [ %i0 + 4 ], %g1 400077a0: 80 a0 60 00 cmp %g1, 0 400077a4: 12 80 00 0d bne 400077d8 <_CORE_spinlock_Wait+0xa0> 400077a8: 80 a6 60 00 cmp %i1, 0 the_spinlock->lock = CORE_SPINLOCK_LOCKED; the_spinlock->holder = _Thread_Executing->Object.id; 400077ac: 03 10 00 50 sethi %hi(0x40014000), %g1 400077b0: c4 00 62 dc ld [ %g1 + 0x2dc ], %g2 ! 400142dc <_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; 400077b4: 82 10 20 01 mov 1, %g1 400077b8: c2 26 20 04 st %g1, [ %i0 + 4 ] the_spinlock->holder = _Thread_Executing->Object.id; 400077bc: c2 00 a0 08 ld [ %g2 + 8 ], %g1 400077c0: c2 26 20 0c st %g1, [ %i0 + 0xc ] _ISR_Enable( level ); 400077c4: b0 10 20 00 clr %i0 400077c8: 7f ff eb 0a call 400023f0 400077cc: 90 10 00 03 mov %g3, %o0 400077d0: 81 c7 e0 08 ret 400077d4: 81 e8 00 00 restore } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 400077d8: 12 80 00 0a bne 40007800 <_CORE_spinlock_Wait+0xc8> 400077dc: 80 a6 a0 00 cmp %i2, 0 the_spinlock->users -= 1; 400077e0: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 400077e4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400077e8: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED _ISR_Enable( level ); 400077ec: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED 400077f0: 7f ff eb 00 call 400023f0 <== NOT EXECUTED 400077f4: 90 10 00 03 mov %g3, %o0 <== NOT EXECUTED 400077f8: 81 c7 e0 08 ret <== NOT EXECUTED 400077fc: 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) ) { 40007800: 02 80 00 0e be 40007838 <_CORE_spinlock_Wait+0x100> 40007804: 01 00 00 00 nop 40007808: c2 04 a3 84 ld [ %l2 + 0x384 ], %g1 <== NOT EXECUTED 4000780c: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 40007810: 18 80 00 0a bgu 40007838 <_CORE_spinlock_Wait+0x100> <== NOT EXECUTED 40007814: 01 00 00 00 nop <== NOT EXECUTED the_spinlock->users -= 1; 40007818: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 4000781c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40007820: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED _ISR_Enable( level ); 40007824: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED 40007828: 7f ff ea f2 call 400023f0 <== NOT EXECUTED 4000782c: 90 10 00 03 mov %g3, %o0 <== NOT EXECUTED 40007830: 81 c7 e0 08 ret <== NOT EXECUTED 40007834: 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 ); 40007838: 7f ff ea ee call 400023f0 4000783c: 90 10 00 03 mov %g3, %o0 40007840: c2 04 22 00 ld [ %l0 + 0x200 ], %g1 40007844: 82 00 7f ff add %g1, -1, %g1 40007848: c2 24 22 00 st %g1, [ %l0 + 0x200 ] 4000784c: c2 04 22 00 ld [ %l0 + 0x200 ], %g1 40007850: 80 a0 60 00 cmp %g1, 0 40007854: 12 80 00 04 bne 40007864 <_CORE_spinlock_Wait+0x12c> 40007858: 01 00 00 00 nop _Thread_Dispatch(); 4000785c: 40 00 07 a4 call 400096ec <_Thread_Dispatch> 40007860: 01 00 00 00 nop rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007864: c2 04 22 00 ld [ %l0 + 0x200 ], %g1 40007868: 82 00 60 01 inc %g1 4000786c: c2 24 22 00 st %g1, [ %l0 + 0x200 ] /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 40007870: 7f ff ea dc call 400023e0 40007874: 01 00 00 00 nop 40007878: 86 10 00 08 mov %o0, %g3 4000787c: 30 bf ff c8 b,a 4000779c <_CORE_spinlock_Wait+0x64> 4000c82c <_Debug_Is_enabled>: */ boolean _Debug_Is_enabled( rtems_debug_control level ) { 4000c82c: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 4000c830: c2 00 63 00 ld [ %g1 + 0x300 ], %g1 ! 40019f00 <_Debug_Level> <== NOT EXECUTED 4000c834: 90 0a 00 01 and %o0, %g1, %o0 <== NOT EXECUTED return (_Debug_Level & level) ? TRUE : FALSE; } 4000c838: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 4000c83c: 81 c3 e0 08 retl <== NOT EXECUTED 4000c840: 90 40 20 00 addx %g0, 0, %o0 <== NOT EXECUTED 4000507c <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 4000507c: 9d e3 bf 98 save %sp, -104, %sp rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Event_Sync_states sync_state; executing = _Thread_Executing; 40005080: 03 10 00 67 sethi %hi(0x40019c00), %g1 40005084: e0 00 62 fc ld [ %g1 + 0x2fc ], %l0 ! 40019efc <_Thread_Executing> executing->Wait.return_code = RTEMS_SUCCESSFUL; 40005088: c0 24 20 34 clr [ %l0 + 0x34 ] api = executing->API_Extensions[ THREAD_API_RTEMS ]; _ISR_Disable( level ); 4000508c: 7f ff f3 33 call 40001d58 40005090: e4 04 21 6c ld [ %l0 + 0x16c ], %l2 40005094: 84 10 00 08 mov %o0, %g2 pending_events = api->pending_events; 40005098: c2 04 a0 40 ld [ %l2 + 0x40 ], %g1 seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 4000509c: a2 8e 00 01 andcc %i0, %g1, %l1 400050a0: 02 80 00 0e be 400050d8 <_Event_Seize+0x5c> 400050a4: 80 8e 60 01 btst 1, %i1 400050a8: 80 a4 40 18 cmp %l1, %i0 400050ac: 02 80 00 04 be 400050bc <_Event_Seize+0x40> 400050b0: 80 8e 60 02 btst 2, %i1 400050b4: 02 80 00 09 be 400050d8 <_Event_Seize+0x5c> 400050b8: 80 8e 60 01 btst 1, %i1 (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 400050bc: 82 28 40 11 andn %g1, %l1, %g1 400050c0: c2 24 a0 40 st %g1, [ %l2 + 0x40 ] _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 400050c4: 7f ff f3 29 call 40001d68 400050c8: 01 00 00 00 nop 400050cc: e2 26 c0 00 st %l1, [ %i3 ] 400050d0: 81 c7 e0 08 ret 400050d4: 81 e8 00 00 restore *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 400050d8: 22 80 00 09 be,a 400050fc <_Event_Seize+0x80> 400050dc: 23 10 00 6a sethi %hi(0x4001a800), %l1 _ISR_Enable( level ); 400050e0: 7f ff f3 22 call 40001d68 400050e4: 90 10 00 02 mov %g2, %o0 executing->Wait.return_code = RTEMS_UNSATISFIED; 400050e8: 82 10 20 0d mov 0xd, %g1 400050ec: c2 24 20 34 st %g1, [ %l0 + 0x34 ] *event_out = seized_events; 400050f0: e2 26 c0 00 st %l1, [ %i3 ] 400050f4: 81 c7 e0 08 ret 400050f8: 81 e8 00 00 restore return; } _Event_Sync_state = EVENT_SYNC_NOTHING_HAPPENED; 400050fc: 82 10 20 01 mov 1, %g1 executing->Wait.option = (uint32_t ) option_set; 40005100: f2 24 20 30 st %i1, [ %l0 + 0x30 ] executing->Wait.count = (uint32_t ) event_in; 40005104: f0 24 20 24 st %i0, [ %l0 + 0x24 ] executing->Wait.return_argument = event_out; 40005108: f6 24 20 28 st %i3, [ %l0 + 0x28 ] executing->Wait.return_code = RTEMS_UNSATISFIED; *event_out = seized_events; return; } _Event_Sync_state = EVENT_SYNC_NOTHING_HAPPENED; 4000510c: c2 24 60 04 st %g1, [ %l1 + 4 ] executing->Wait.option = (uint32_t ) option_set; executing->Wait.count = (uint32_t ) event_in; executing->Wait.return_argument = event_out; _ISR_Enable( level ); 40005110: 7f ff f3 16 call 40001d68 40005114: 90 10 00 02 mov %g2, %o0 if ( ticks ) { 40005118: 80 a6 a0 00 cmp %i2, 0 4000511c: 02 80 00 0f be 40005158 <_Event_Seize+0xdc> 40005120: 90 10 00 10 mov %l0, %o0 _Watchdog_Initialize( 40005124: c2 04 20 08 ld [ %l0 + 8 ], %g1 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40005128: 11 10 00 67 sethi %hi(0x40019c00), %o0 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 4000512c: c2 24 20 68 st %g1, [ %l0 + 0x68 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40005130: 03 10 00 15 sethi %hi(0x40005400), %g1 40005134: 82 10 60 04 or %g1, 4, %g1 ! 40005404 <_Event_Timeout> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40005138: f4 24 20 54 st %i2, [ %l0 + 0x54 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4000513c: c0 24 20 50 clr [ %l0 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 40005140: c0 24 20 6c clr [ %l0 + 0x6c ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40005144: c2 24 20 64 st %g1, [ %l0 + 0x64 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40005148: 90 12 23 1c or %o0, 0x31c, %o0 4000514c: 40 00 13 5d call 40009ec0 <_Watchdog_Insert> 40005150: 92 04 20 48 add %l0, 0x48, %o1 NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 40005154: 90 10 00 10 mov %l0, %o0 40005158: 40 00 11 63 call 400096e4 <_Thread_Set_state> 4000515c: 92 10 21 00 mov 0x100, %o1 _ISR_Disable( level ); 40005160: 7f ff f2 fe call 40001d58 40005164: 01 00 00 00 nop 40005168: b0 10 00 08 mov %o0, %i0 sync_state = _Event_Sync_state; 4000516c: c4 04 60 04 ld [ %l1 + 4 ], %g2 _Event_Sync_state = EVENT_SYNC_SYNCHRONIZED; 40005170: c0 24 60 04 clr [ %l1 + 4 ] switch ( sync_state ) { 40005174: 80 a0 a0 02 cmp %g2, 2 40005178: 02 80 00 08 be 40005198 <_Event_Seize+0x11c> 4000517c: 80 a0 a0 03 cmp %g2, 3 40005180: 02 80 00 09 be 400051a4 <_Event_Seize+0x128> 40005184: 80 a0 a0 01 cmp %g2, 1 40005188: 12 80 00 15 bne 400051dc <_Event_Seize+0x160> 4000518c: 01 00 00 00 nop * enter the synchronization states above. */ return; case EVENT_SYNC_NOTHING_HAPPENED: _ISR_Enable( level ); 40005190: 7f ff f2 f6 call 40001d68 40005194: 81 e8 00 00 restore return; case EVENT_SYNC_TIMEOUT: executing->Wait.return_code = RTEMS_TIMEOUT; 40005198: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED 4000519c: c2 24 20 34 st %g1, [ %l0 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 400051a0: 30 80 00 0b b,a 400051cc <_Event_Seize+0x150> <== NOT EXECUTED _Thread_Unblock( executing ); return; case EVENT_SYNC_SATISFIED: if ( _Watchdog_Is_active( &executing->Timer ) ) { 400051a4: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 400051a8: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 400051ac: 12 80 00 08 bne 400051cc <_Event_Seize+0x150> <== NOT EXECUTED 400051b0: 01 00 00 00 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 400051b4: c4 24 20 50 st %g2, [ %l0 + 0x50 ] <== NOT EXECUTED _Watchdog_Deactivate( &executing->Timer ); _ISR_Enable( level ); 400051b8: 7f ff f2 ec call 40001d68 <== NOT EXECUTED 400051bc: b0 10 00 10 mov %l0, %i0 <== NOT EXECUTED (void) _Watchdog_Remove( &executing->Timer ); 400051c0: 40 00 13 98 call 4000a020 <_Watchdog_Remove> <== NOT EXECUTED 400051c4: 90 04 20 48 add %l0, 0x48, %o0 <== NOT EXECUTED 400051c8: 30 80 00 03 b,a 400051d4 <_Event_Seize+0x158> <== NOT EXECUTED } else _ISR_Enable( level ); 400051cc: 7f ff f2 e7 call 40001d68 <== NOT EXECUTED 400051d0: b0 10 00 10 mov %l0, %i0 <== NOT EXECUTED _Thread_Unblock( executing ); 400051d4: 7f ff ff a4 call 40005064 <_Thread_Unblock> <== NOT EXECUTED 400051d8: 81 e8 00 00 restore <== NOT EXECUTED 400051dc: 81 c7 e0 08 ret <== NOT EXECUTED 400051e0: 81 e8 00 00 restore <== NOT EXECUTED 400052fc <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 400052fc: 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 ]; 40005300: e2 06 21 6c ld [ %i0 + 0x16c ], %l1 option_set = (rtems_option) the_thread->Wait.option; 40005304: e6 06 20 30 ld [ %i0 + 0x30 ], %l3 _ISR_Disable( level ); 40005308: 7f ff f2 94 call 40001d58 4000530c: a0 10 00 18 mov %i0, %l0 40005310: a4 10 00 08 mov %o0, %l2 pending_events = api->pending_events; 40005314: c8 04 60 40 ld [ %l1 + 0x40 ], %g4 event_condition = (rtems_event_set) the_thread->Wait.count; 40005318: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 seized_events = _Event_sets_Get( pending_events, event_condition ); if ( !_Event_sets_Is_empty( seized_events ) ) { 4000531c: 86 88 80 04 andcc %g2, %g4, %g3 40005320: 02 80 00 36 be 400053f8 <_Event_Surrender+0xfc> 40005324: 01 00 00 00 nop if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 40005328: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 4000532c: 80 88 61 00 btst 0x100, %g1 40005330: 02 80 00 1e be 400053a8 <_Event_Surrender+0xac> 40005334: 1b 10 00 6a sethi %hi(0x4001a800), %o5 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 40005338: 80 a0 c0 02 cmp %g3, %g2 4000533c: 02 80 00 04 be 4000534c <_Event_Surrender+0x50> 40005340: 80 8c e0 02 btst 2, %l3 40005344: 02 80 00 19 be 400053a8 <_Event_Surrender+0xac> 40005348: 01 00 00 00 nop api->pending_events = 4000534c: 82 29 00 03 andn %g4, %g3, %g1 40005350: c2 24 60 40 st %g1, [ %l1 + 0x40 ] _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40005354: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 if ( !_Event_sets_Is_empty( seized_events ) ) { 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; 40005358: c0 24 20 24 clr [ %l0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 4000535c: c6 20 40 00 st %g3, [ %g1 ] _ISR_Flash( level ); 40005360: 7f ff f2 82 call 40001d68 40005364: 01 00 00 00 nop 40005368: 7f ff f2 7c call 40001d58 4000536c: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 40005370: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 40005374: 80 a0 60 02 cmp %g1, 2 40005378: 02 80 00 05 be 4000538c <_Event_Surrender+0x90> 4000537c: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 40005380: 7f ff f2 7a call 40001d68 40005384: 90 10 00 12 mov %l2, %o0 40005388: 30 80 00 06 b,a 400053a0 <_Event_Surrender+0xa4> 4000538c: c2 24 20 50 st %g1, [ %l0 + 0x50 ] _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 40005390: 7f ff f2 76 call 40001d68 40005394: 90 10 00 12 mov %l2, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 40005398: 40 00 13 22 call 4000a020 <_Watchdog_Remove> 4000539c: 90 04 20 48 add %l0, 0x48, %o0 _Thread_Unblock( the_thread ); 400053a0: 7f ff ff d1 call 400052e4 <_Thread_Unblock> 400053a4: 81 e8 00 00 restore } return; } } switch ( _Event_Sync_state ) { 400053a8: c2 03 60 04 ld [ %o5 + 4 ], %g1 <== NOT EXECUTED 400053ac: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400053b0: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 400053b4: 18 80 00 11 bgu 400053f8 <_Event_Surrender+0xfc> <== NOT EXECUTED 400053b8: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED case EVENT_SYNC_SATISFIED: break; case EVENT_SYNC_NOTHING_HAPPENED: case EVENT_SYNC_TIMEOUT: if ( !_Thread_Is_executing( the_thread ) ) 400053bc: c2 00 62 fc ld [ %g1 + 0x2fc ], %g1 ! 40019efc <_Thread_Executing> <== NOT EXECUTED 400053c0: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 400053c4: 12 80 00 0d bne 400053f8 <_Event_Surrender+0xfc> <== NOT EXECUTED 400053c8: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED break; if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 400053cc: 02 80 00 04 be 400053dc <_Event_Surrender+0xe0> <== NOT EXECUTED 400053d0: 80 8c e0 02 btst 2, %l3 <== NOT EXECUTED 400053d4: 02 80 00 09 be 400053f8 <_Event_Surrender+0xfc> <== NOT EXECUTED 400053d8: 01 00 00 00 nop <== NOT EXECUTED api->pending_events = 400053dc: 82 29 00 03 andn %g4, %g3, %g1 <== NOT EXECUTED 400053e0: c2 24 60 40 st %g1, [ %l1 + 0x40 ] <== NOT EXECUTED _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 400053e4: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED break; 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; 400053e8: c0 24 20 24 clr [ %l0 + 0x24 ] <== NOT EXECUTED *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 400053ec: c6 20 40 00 st %g3, [ %g1 ] <== NOT EXECUTED _Event_Sync_state = EVENT_SYNC_SATISFIED; 400053f0: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED 400053f4: c2 23 60 04 st %g1, [ %o5 + 4 ] <== NOT EXECUTED } break; } } _ISR_Enable( level ); 400053f8: 7f ff f2 5c call 40001d68 400053fc: 91 e8 00 12 restore %g0, %l2, %o0 40005400: 01 00 00 00 nop 40005404 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 40005404: 9d e3 bf 90 save %sp, -112, %sp uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 40005408: 92 96 20 00 orcc %i0, 0, %o1 4000540c: 12 80 00 0a bne 40005434 <_Event_Timeout+0x30> 40005410: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40005414: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 40005418: c4 00 62 20 ld [ %g1 + 0x220 ], %g2 ! 40019e20 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000541c: 84 00 a0 01 inc %g2 <== NOT EXECUTED 40005420: c4 20 62 20 st %g2, [ %g1 + 0x220 ] <== NOT EXECUTED Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 40005424: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 40005428: f0 00 62 fc ld [ %g1 + 0x2fc ], %i0 ! 40019efc <_Thread_Executing> <== NOT EXECUTED 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; 4000542c: 10 80 00 18 b 4000548c <_Event_Timeout+0x88> <== NOT EXECUTED 40005430: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED 40005434: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 40005438: 80 a0 a0 04 cmp %g2, 4 4000543c: 18 80 00 0e bgu 40005474 <_Event_Timeout+0x70> 40005440: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40005444: 83 32 60 1b srl %o1, 0x1b, %g1 40005448: 80 a0 60 01 cmp %g1, 1 4000544c: 12 80 00 0a bne 40005474 <_Event_Timeout+0x70> 40005450: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40005454: 83 28 a0 02 sll %g2, 2, %g1 40005458: 05 10 00 67 sethi %hi(0x40019c00), %g2 4000545c: 84 10 a1 80 or %g2, 0x180, %g2 ! 40019d80 <_Objects_Information_table> 40005460: c2 00 80 01 ld [ %g2 + %g1 ], %g1 40005464: d0 00 60 04 ld [ %g1 + 4 ], %o0 if ( !information ) { 40005468: 80 a2 20 00 cmp %o0, 0 4000546c: 12 80 00 05 bne 40005480 <_Event_Timeout+0x7c> 40005470: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; 40005474: b0 10 20 00 clr %i0 <== NOT EXECUTED 40005478: 10 80 00 05 b 4000548c <_Event_Timeout+0x88> <== NOT EXECUTED 4000547c: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40005480: 40 00 08 bf call 4000777c <_Objects_Get> 40005484: 94 07 bf f4 add %fp, -12, %o2 40005488: b0 10 00 08 mov %o0, %i0 Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); switch ( location ) { 4000548c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005490: 80 a0 60 00 cmp %g1, 0 40005494: 12 80 00 27 bne 40005530 <_Event_Timeout+0x12c> 40005498: 01 00 00 00 nop * 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. */ _ISR_Disable( level ); 4000549c: 7f ff f2 2f call 40001d58 400054a0: 01 00 00 00 nop 400054a4: 86 10 00 08 mov %o0, %g3 if ( the_thread->Wait.count ) { /* verify thread is waiting */ 400054a8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 400054ac: 80 a0 60 00 cmp %g1, 0 400054b0: 02 80 00 1a be 40005518 <_Event_Timeout+0x114> 400054b4: 05 10 00 6a sethi %hi(0x4001a800), %g2 the_thread->Wait.count = 0; if ( _Event_Sync_state != EVENT_SYNC_SYNCHRONIZED && 400054b8: c2 00 a0 04 ld [ %g2 + 4 ], %g1 ! 4001a804 <_Event_Sync_state> 400054bc: 80 a0 60 00 cmp %g1, 0 400054c0: 02 80 00 0d be 400054f4 <_Event_Timeout+0xf0> 400054c4: c0 26 20 24 clr [ %i0 + 0x24 ] 400054c8: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 400054cc: c2 00 62 fc ld [ %g1 + 0x2fc ], %g1 ! 40019efc <_Thread_Executing> <== NOT EXECUTED 400054d0: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 400054d4: 12 80 00 09 bne 400054f8 <_Event_Timeout+0xf4> <== NOT EXECUTED 400054d8: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state != EVENT_SYNC_SATISFIED ) { 400054dc: c2 00 a0 04 ld [ %g2 + 4 ], %g1 <== NOT EXECUTED 400054e0: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 400054e4: 02 80 00 03 be 400054f0 <_Event_Timeout+0xec> <== NOT EXECUTED 400054e8: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED _Event_Sync_state = EVENT_SYNC_TIMEOUT; 400054ec: c2 20 a0 04 st %g1, [ %g2 + 4 ] <== NOT EXECUTED } _ISR_Enable( level ); 400054f0: 30 80 00 0a b,a 40005518 <_Event_Timeout+0x114> <== NOT EXECUTED } else { the_thread->Wait.return_code = RTEMS_TIMEOUT; 400054f4: 82 10 20 06 mov 6, %g1 400054f8: c2 26 20 34 st %g1, [ %i0 + 0x34 ] _ISR_Enable( level ); 400054fc: 7f ff f2 1b call 40001d68 40005500: 90 10 00 03 mov %g3, %o0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 40005504: 90 10 00 18 mov %i0, %o0 40005508: 13 04 00 ff sethi %hi(0x1003fc00), %o1 4000550c: 40 00 0c d6 call 40008864 <_Thread_Clear_state> 40005510: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 40005514: 30 80 00 03 b,a 40005520 <_Event_Timeout+0x11c> _Thread_Unblock( the_thread ); } } else { _ISR_Enable( level ); 40005518: 7f ff f2 14 call 40001d68 <== NOT EXECUTED 4000551c: 01 00 00 00 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 40005520: 05 10 00 67 sethi %hi(0x40019c00), %g2 40005524: c2 00 a2 20 ld [ %g2 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> 40005528: 82 00 7f ff add %g1, -1, %g1 4000552c: c2 20 a2 20 st %g1, [ %g2 + 0x220 ] 40005530: 81 c7 e0 08 ret 40005534: 81 e8 00 00 restore 40018f04 <_Heap_Get_free_information>: */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 40018f04: da 02 20 08 ld [ %o0 + 8 ], %o5 <== NOT EXECUTED ) { Heap_Block *the_block; Heap_Block *const tail = _Heap_Tail(the_heap); info->number = 0; 40018f08: c0 22 40 00 clr [ %o1 ] <== NOT EXECUTED info->largest = 0; 40018f0c: c0 22 60 04 clr [ %o1 + 4 ] <== NOT EXECUTED info->total = 0; 40018f10: 10 80 00 0e b 40018f48 <_Heap_Get_free_information+0x44> <== NOT EXECUTED 40018f14: c0 22 60 08 clr [ %o1 + 8 ] <== NOT EXECUTED uint32_t const the_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)); info->number++; 40018f18: c2 02 40 00 ld [ %o1 ], %g1 <== NOT EXECUTED info->total += the_size; 40018f1c: c4 02 60 08 ld [ %o1 + 8 ], %g2 <== NOT EXECUTED if ( info->largest < the_size ) 40018f20: c8 02 60 04 ld [ %o1 + 4 ], %g4 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 40018f24: 86 08 ff fe and %g3, -2, %g3 <== NOT EXECUTED uint32_t const the_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)); info->number++; 40018f28: 82 00 60 01 inc %g1 <== NOT EXECUTED info->total += the_size; 40018f2c: 84 00 80 03 add %g2, %g3, %g2 <== NOT EXECUTED uint32_t const the_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)); info->number++; 40018f30: c2 22 40 00 st %g1, [ %o1 ] <== NOT EXECUTED info->total += the_size; if ( info->largest < the_size ) 40018f34: 80 a1 00 03 cmp %g4, %g3 <== NOT EXECUTED 40018f38: 1a 80 00 03 bcc 40018f44 <_Heap_Get_free_information+0x40> <== NOT EXECUTED 40018f3c: c4 22 60 08 st %g2, [ %o1 + 8 ] <== NOT EXECUTED info->largest = the_size; 40018f40: c6 22 60 04 st %g3, [ %o1 + 4 ] <== NOT EXECUTED info->largest = 0; info->total = 0; for(the_block = _Heap_First(the_heap); the_block != tail; the_block = the_block->next) 40018f44: da 03 60 08 ld [ %o5 + 8 ], %o5 <== NOT EXECUTED info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_First(the_heap); the_block != tail; 40018f48: 80 a3 40 08 cmp %o5, %o0 <== NOT EXECUTED 40018f4c: 32 bf ff f3 bne,a 40018f18 <_Heap_Get_free_information+0x14> <== NOT EXECUTED 40018f50: c6 03 60 04 ld [ %o5 + 4 ], %g3 <== NOT EXECUTED info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 40018f54: 81 c3 e0 08 retl <== NOT EXECUTED 40018f58: 01 00 00 00 nop 40007090 <_Heap_Initialize>: Heap_Control *the_heap, void *starting_address, size_t size, uint32_t page_size ) { 40007090: 9d e3 bf 98 save %sp, -104, %sp _H_uptr_t start; _H_uptr_t aligned_start; uint32_t overhead; Heap_Statistics *const stats = &the_heap->stats; if (page_size == 0) 40007094: 80 a6 e0 00 cmp %i3, 0 40007098: 12 80 00 05 bne 400070ac <_Heap_Initialize+0x1c> 4000709c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] page_size = CPU_ALIGNMENT; 400070a0: 82 10 20 08 mov 8, %g1 <== NOT EXECUTED 400070a4: 10 80 00 05 b 400070b8 <_Heap_Initialize+0x28> <== NOT EXECUTED 400070a8: c2 27 a0 50 st %g1, [ %fp + 0x50 ] <== NOT EXECUTED else _Heap_Align_up( &page_size, CPU_ALIGNMENT ); 400070ac: 90 07 a0 50 add %fp, 0x50, %o0 400070b0: 7f ff ff b0 call 40006f70 <_Heap_Align_up> 400070b4: 92 10 20 08 mov 8, %o1 /* Calculate aligned_start so that aligned_start + HEAP_BLOCK_USER_OFFSET (value of user pointer) is aligned on 'page_size' boundary. Make sure resulting 'aligned_start' is not below 'starting_address'. */ start = _H_p2u(starting_address); aligned_start = start + HEAP_BLOCK_USER_OFFSET; _Heap_Align_up_uptr ( &aligned_start, page_size ); 400070b8: e0 07 a0 50 ld [ %fp + 0x50 ], %l0 /* Calculate aligned_start so that aligned_start + HEAP_BLOCK_USER_OFFSET (value of user pointer) is aligned on 'page_size' boundary. Make sure resulting 'aligned_start' is not below 'starting_address'. */ start = _H_p2u(starting_address); aligned_start = start + HEAP_BLOCK_USER_OFFSET; 400070bc: a4 06 60 08 add %i1, 8, %l2 uint32_t alignment ) { _H_uptr_t v = *value; uint32_t a = alignment; _H_uptr_t r = v % a; 400070c0: 92 10 00 10 mov %l0, %o1 400070c4: 40 00 38 eb call 40015470 <.urem> 400070c8: 90 10 00 12 mov %l2, %o0 *value = r ? v - r + a : v; 400070cc: 80 a2 20 00 cmp %o0, 0 400070d0: 02 80 00 05 be 400070e4 <_Heap_Initialize+0x54> 400070d4: 82 10 20 10 mov 0x10, %g1 400070d8: 82 04 80 10 add %l2, %l0, %g1 400070dc: a4 20 40 08 sub %g1, %o0, %l2 _Heap_Align_up_uptr ( &aligned_start, page_size ); aligned_start -= HEAP_BLOCK_USER_OFFSET; /* Calculate 'min_block_size'. It's HEAP_MIN_BLOCK_SIZE aligned up to the nearest multiple of 'page_size'. */ the_heap->min_block_size = HEAP_MIN_BLOCK_SIZE; 400070e0: 82 10 20 10 mov 0x10, %g1 _Heap_Align_up ( &the_heap->min_block_size, page_size ); 400070e4: 92 10 00 10 mov %l0, %o1 _Heap_Align_up_uptr ( &aligned_start, page_size ); aligned_start -= HEAP_BLOCK_USER_OFFSET; /* Calculate 'min_block_size'. It's HEAP_MIN_BLOCK_SIZE aligned up to the nearest multiple of 'page_size'. */ the_heap->min_block_size = HEAP_MIN_BLOCK_SIZE; 400070e8: c2 26 20 14 st %g1, [ %i0 + 0x14 ] _Heap_Align_up ( &the_heap->min_block_size, page_size ); 400070ec: 7f ff ff a1 call 40006f70 <_Heap_Align_up> 400070f0: 90 06 20 14 add %i0, 0x14, %o0 (value of user pointer) is aligned on 'page_size' boundary. Make sure resulting 'aligned_start' is not below 'starting_address'. */ start = _H_p2u(starting_address); aligned_start = start + HEAP_BLOCK_USER_OFFSET; _Heap_Align_up_uptr ( &aligned_start, page_size ); aligned_start -= HEAP_BLOCK_USER_OFFSET; 400070f4: b6 04 bf f8 add %l2, -8, %i3 /* Calculate 'the_size' -- size of the first block so that there is enough space at the end for the permanent last block. It is equal to 'size' minus total overhead aligned down to the nearest multiple of 'page_size'. */ overhead = HEAP_OVERHEAD + (aligned_start - start); 400070f8: 82 26 c0 19 sub %i3, %i1, %g1 400070fc: 82 00 60 08 add %g1, 8, %g1 if ( size < overhead ) 40007100: 80 a6 80 01 cmp %i2, %g1 40007104: 0a 80 00 2b bcs 400071b0 <_Heap_Initialize+0x120> 40007108: e2 07 a0 50 ld [ %fp + 0x50 ], %l1 return 0; /* Too small area for the heap */ the_size = size - overhead; 4000710c: a0 26 80 01 sub %i2, %g1, %l0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 40007110: 92 10 00 11 mov %l1, %o1 40007114: 40 00 38 d7 call 40015470 <.urem> 40007118: 90 10 00 10 mov %l0, %o0 _Heap_Align_down ( &the_size, page_size ); if ( the_size == 0 ) 4000711c: a0 a4 00 08 subcc %l0, %o0, %l0 40007120: 02 80 00 24 be 400071b0 <_Heap_Initialize+0x120> 40007124: 07 10 00 66 sethi %hi(0x40019800), %g3 return 0; /* Too small area for the heap */ the_heap->page_size = page_size; 40007128: e2 26 20 10 st %l1, [ %i0 + 0x10 ] the_heap->begin = starting_address; the_heap->end = starting_address + size; the_block = (Heap_Block *) aligned_start; the_block->prev_size = page_size; 4000712c: e2 24 bf f8 st %l1, [ %l2 + -8 ] the_block->size = the_size | HEAP_PREV_USED; 40007130: 82 14 20 01 or %l0, 1, %g1 stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 40007134: c4 00 e3 f8 ld [ %g3 + 0x3f8 ], %g2 the_heap->end = starting_address + size; the_block = (Heap_Block *) aligned_start; the_block->prev_size = page_size; the_block->size = the_size | HEAP_PREV_USED; 40007138: c2 26 e0 04 st %g1, [ %i3 + 4 ] _HAssert(_Heap_Is_aligned(the_heap->min_block_size, page_size)); _HAssert(_Heap_Is_aligned_ptr(_Heap_User_area(the_block), page_size)); the_block = _Heap_Block_at( the_block, the_size ); the_heap->final = the_block; /* Permanent final block of the heap */ the_block->prev_size = the_size; /* Previous block is free */ 4000713c: e0 26 c0 10 st %l0, [ %i3 + %l0 ] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 40007140: 88 06 c0 10 add %i3, %l0, %g4 the_block->size = page_size; 40007144: e2 21 20 04 st %l1, [ %g4 + 4 ] the_block = (Heap_Block *) aligned_start; the_block->prev_size = page_size; the_block->size = the_size | HEAP_PREV_USED; the_block->next = _Heap_Tail( the_heap ); 40007148: f0 26 e0 08 st %i0, [ %i3 + 8 ] the_block->prev = _Heap_Head( the_heap ); 4000714c: f0 26 e0 0c st %i0, [ %i3 + 0xc ] stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 40007150: c4 26 20 28 st %g2, [ %i0 + 0x28 ] the_block->size = page_size; stats->size = size; stats->free_size = the_size; stats->min_free_size = the_size; stats->free_blocks = 1; 40007154: 82 10 20 01 mov 1, %g1 the_block = _Heap_Block_at( the_block, the_size ); the_heap->final = the_block; /* Permanent final block of the heap */ the_block->prev_size = the_size; /* Previous block is free */ the_block->size = page_size; stats->size = size; 40007158: f4 26 20 2c st %i2, [ %i0 + 0x2c ] stats->free_size = the_size; stats->min_free_size = the_size; stats->free_blocks = 1; stats->max_free_blocks = 1; 4000715c: c2 26 20 3c st %g1, [ %i0 + 0x3c ] the_block->size = page_size; stats->size = size; stats->free_size = the_size; stats->min_free_size = the_size; stats->free_blocks = 1; 40007160: c2 26 20 38 st %g1, [ %i0 + 0x38 ] the_heap->final = the_block; /* Permanent final block of the heap */ the_block->prev_size = the_size; /* Previous block is free */ the_block->size = page_size; stats->size = size; stats->free_size = the_size; 40007164: e0 26 20 30 st %l0, [ %i0 + 0x30 ] stats->min_free_size = the_size; 40007168: e0 26 20 34 st %l0, [ %i0 + 0x34 ] stats->free_blocks = 1; stats->max_free_blocks = 1; stats->used_blocks = 0; 4000716c: c0 26 20 40 clr [ %i0 + 0x40 ] stats->max_search = 0; 40007170: c0 26 20 44 clr [ %i0 + 0x44 ] stats->allocs = 0; 40007174: c0 26 20 48 clr [ %i0 + 0x48 ] stats->searches = 0; 40007178: c0 26 20 4c clr [ %i0 + 0x4c ] stats->frees = 0; 4000717c: c0 26 20 50 clr [ %i0 + 0x50 ] stats->resizes = 0; 40007180: c0 26 20 54 clr [ %i0 + 0x54 ] if ( the_size == 0 ) return 0; /* Too small area for the heap */ the_heap->page_size = page_size; the_heap->begin = starting_address; the_heap->end = starting_address + size; 40007184: 82 06 40 1a add %i1, %i2, %g1 stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 40007188: 84 00 a0 01 inc %g2 if ( the_size == 0 ) return 0; /* Too small area for the heap */ the_heap->page_size = page_size; the_heap->begin = starting_address; the_heap->end = starting_address + size; 4000718c: c2 26 20 1c st %g1, [ %i0 + 0x1c ] _Heap_Align_down ( &the_size, page_size ); if ( the_size == 0 ) return 0; /* Too small area for the heap */ the_heap->page_size = page_size; the_heap->begin = starting_address; 40007190: f2 26 20 18 st %i1, [ %i0 + 0x18 ] the_block->prev_size = page_size; the_block->size = the_size | HEAP_PREV_USED; the_block->next = _Heap_Tail( the_heap ); the_block->prev = _Heap_Head( the_heap ); _Heap_Head(the_heap)->next = the_block; 40007194: f6 26 20 08 st %i3, [ %i0 + 8 ] _Heap_Tail(the_heap)->prev = the_block; 40007198: f6 26 20 0c st %i3, [ %i0 + 0xc ] the_heap->start = the_block; 4000719c: f6 26 20 20 st %i3, [ %i0 + 0x20 ] _HAssert(_Heap_Is_aligned(the_heap->page_size, CPU_ALIGNMENT)); _HAssert(_Heap_Is_aligned(the_heap->min_block_size, page_size)); _HAssert(_Heap_Is_aligned_ptr(_Heap_User_area(the_block), page_size)); the_block = _Heap_Block_at( the_block, the_size ); the_heap->final = the_block; /* Permanent final block of the heap */ 400071a0: c8 26 20 24 st %g4, [ %i0 + 0x24 ] stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 400071a4: c4 20 e3 f8 st %g2, [ %g3 + 0x3f8 ] return ( the_size - HEAP_BLOCK_USED_OVERHEAD ); 400071a8: 81 c7 e0 08 ret 400071ac: 91 ec 3f fc restore %l0, -4, %o0 } 400071b0: 81 c7 e0 08 ret 400071b4: 91 e8 20 00 restore %g0, 0, %o0 4000ca2c <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 4000ca2c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED 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; uint32_t const page_size = the_heap->page_size; 4000ca30: e6 06 20 10 ld [ %i0 + 0x10 ], %l3 <== NOT EXECUTED 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; 4000ca34: ea 06 20 14 ld [ %i0 + 0x14 ], %l5 <== NOT EXECUTED uint32_t const page_size = the_heap->page_size; *old_mem_size = 0; 4000ca38: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED *avail_mem_size = 0; 4000ca3c: c0 27 00 00 clr [ %i4 ] <== NOT EXECUTED /* 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); 4000ca40: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4000ca44: 40 00 22 8b call 40015470 <.urem> <== NOT EXECUTED 4000ca48: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE boolean _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 ); 4000ca4c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 <== NOT EXECUTED /* 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); 4000ca50: 90 26 40 08 sub %i1, %o0, %o0 <== NOT EXECUTED 4000ca54: a4 02 3f f8 add %o0, -8, %l2 <== NOT EXECUTED _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)) 4000ca58: 80 a4 80 01 cmp %l2, %g1 <== NOT EXECUTED 4000ca5c: 0a 80 00 78 bcs 4000cc3c <_Heap_Resize_block+0x210> <== NOT EXECUTED 4000ca60: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 <== NOT EXECUTED 4000ca64: 80 a4 80 02 cmp %l2, %g2 <== NOT EXECUTED 4000ca68: 38 80 00 78 bgu,a 4000cc48 <_Heap_Resize_block+0x21c> <== NOT EXECUTED 4000ca6c: 84 10 20 02 mov 2, %g2 <== NOT EXECUTED return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 4000ca70: c6 04 a0 04 ld [ %l2 + 4 ], %g3 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 4000ca74: ae 08 ff fe and %g3, -2, %l7 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 4000ca78: a2 04 80 17 add %l2, %l7, %l1 <== NOT EXECUTED 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) || 4000ca7c: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 4000ca80: 2a 80 00 72 bcs,a 4000cc48 <_Heap_Resize_block+0x21c> <== NOT EXECUTED 4000ca84: 84 10 20 02 mov 2, %g2 <== NOT EXECUTED 4000ca88: 80 a4 40 02 cmp %l1, %g2 <== NOT EXECUTED 4000ca8c: 38 80 00 6f bgu,a 4000cc48 <_Heap_Resize_block+0x21c> <== NOT EXECUTED 4000ca90: 84 10 20 02 mov 2, %g2 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE boolean _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 4000ca94: c2 04 60 04 ld [ %l1 + 4 ], %g1 <== NOT EXECUTED 4000ca98: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000ca9c: 02 80 00 68 be 4000cc3c <_Heap_Resize_block+0x210> <== NOT EXECUTED 4000caa0: a8 08 7f fe and %g1, -2, %l4 <== NOT EXECUTED !_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) || 4000caa4: 80 a4 40 02 cmp %l1, %g2 <== NOT EXECUTED 4000caa8: ac 10 20 01 mov 1, %l6 <== NOT EXECUTED 4000caac: 02 80 00 04 be 4000cabc <_Heap_Resize_block+0x90> <== NOT EXECUTED 4000cab0: ba 04 40 14 add %l1, %l4, %i5 <== NOT EXECUTED 4000cab4: c2 07 60 04 ld [ %i5 + 4 ], %g1 <== NOT EXECUTED 4000cab8: ac 08 60 01 and %g1, 1, %l6 <== NOT EXECUTED _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) 4000cabc: 82 24 40 19 sub %l1, %i1, %g1 <== NOT EXECUTED 4000cac0: 82 00 60 04 add %g1, 4, %g1 <== NOT EXECUTED + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; 4000cac4: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED if (size > old_user_size) { 4000cac8: 80 a6 80 01 cmp %i2, %g1 <== NOT EXECUTED 4000cacc: 08 80 00 1f bleu 4000cb48 <_Heap_Resize_block+0x11c> <== NOT EXECUTED 4000cad0: b6 08 e0 01 and %g3, 1, %i3 <== NOT EXECUTED /* 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 */ 4000cad4: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED 4000cad8: 12 80 00 5b bne 4000cc44 <_Heap_Resize_block+0x218> <== NOT EXECUTED 4000cadc: a0 26 80 01 sub %i2, %g1, %l0 <== NOT EXECUTED uint32_t alignment ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; 4000cae0: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED 4000cae4: 40 00 22 63 call 40015470 <.urem> <== NOT EXECUTED 4000cae8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED *value = r ? v - r + a : v; 4000caec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000caf0: 02 80 00 05 be 4000cb04 <_Heap_Resize_block+0xd8> <== NOT EXECUTED 4000caf4: 80 a4 00 15 cmp %l0, %l5 <== NOT EXECUTED 4000caf8: 82 04 00 13 add %l0, %l3, %g1 <== NOT EXECUTED 4000cafc: a0 20 40 08 sub %g1, %o0, %l0 <== NOT EXECUTED 4000cb00: 80 a4 00 15 cmp %l0, %l5 <== NOT EXECUTED 4000cb04: 1a 80 00 03 bcc 4000cb10 <_Heap_Resize_block+0xe4> <== NOT EXECUTED 4000cb08: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000cb0c: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 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) 4000cb10: 80 a2 00 14 cmp %o0, %l4 <== NOT EXECUTED 4000cb14: 38 80 00 4d bgu,a 4000cc48 <_Heap_Resize_block+0x21c> <== NOT EXECUTED 4000cb18: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */ add_block_size = 4000cb1c: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 4000cb20: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 4000cb24: 7f ff e9 31 call 40006fe8 <_Heap_Block_allocate> <== NOT EXECUTED 4000cb28: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED _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; 4000cb2c: 90 02 00 17 add %o0, %l7, %o0 <== NOT EXECUTED 4000cb30: 90 12 00 1b or %o0, %i3, %o0 <== NOT EXECUTED 4000cb34: d0 24 a0 04 st %o0, [ %l2 + 4 ] <== NOT EXECUTED --stats->used_blocks; 4000cb38: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 <== NOT EXECUTED 4000cb3c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000cb40: 10 80 00 3a b 4000cc28 <_Heap_Resize_block+0x1fc> <== NOT EXECUTED 4000cb44: c2 26 20 40 st %g1, [ %i0 + 0x40 ] <== NOT EXECUTED } } else { /* Calculate how much memory we could free */ uint32_t free_block_size = old_user_size - size; 4000cb48: a0 20 40 1a sub %g1, %i2, %l0 <== NOT EXECUTED uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 4000cb4c: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED 4000cb50: 40 00 22 48 call 40015470 <.urem> <== NOT EXECUTED 4000cb54: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 4000cb58: a0 a4 00 08 subcc %l0, %o0, %l0 <== NOT EXECUTED 4000cb5c: 22 80 00 34 be,a 4000cc2c <_Heap_Resize_block+0x200> <== NOT EXECUTED 4000cb60: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 <== NOT EXECUTED /* 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; 4000cb64: 84 25 c0 10 sub %l7, %l0, %g2 <== NOT EXECUTED if (new_block_size < min_block_size) { 4000cb68: 80 a0 80 15 cmp %g2, %l5 <== NOT EXECUTED 4000cb6c: 1a 80 00 08 bcc 4000cb8c <_Heap_Resize_block+0x160> <== NOT EXECUTED 4000cb70: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED uint32_t delta = min_block_size - new_block_size; 4000cb74: 82 25 40 02 sub %l5, %g2, %g1 <== NOT EXECUTED _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 4000cb78: a0 a4 00 01 subcc %l0, %g1, %l0 <== NOT EXECUTED 4000cb7c: 22 80 00 2c be,a 4000cc2c <_Heap_Resize_block+0x200> <== NOT EXECUTED 4000cb80: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 <== NOT EXECUTED ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; } new_block_size += delta; 4000cb84: 84 00 80 01 add %g2, %g1, %g2 <== NOT EXECUTED _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) { 4000cb88: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED 4000cb8c: 12 80 00 15 bne 4000cbe0 <_Heap_Resize_block+0x1b4> <== NOT EXECUTED 4000cb90: 80 a4 00 15 cmp %l0, %l5 <== NOT EXECUTED 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; 4000cb94: 82 10 80 1b or %g2, %i3, %g1 <== NOT EXECUTED 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; 4000cb98: 86 04 00 14 add %l0, %l4, %g3 <== NOT EXECUTED _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; 4000cb9c: c2 24 a0 04 st %g1, [ %l2 + 4 ] <== NOT EXECUTED new_next_block->size = new_next_block_size | HEAP_PREV_USED; 4000cba0: 82 10 e0 01 or %g3, 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 ); 4000cba4: 84 04 80 02 add %l2, %g2, %g2 <== NOT EXECUTED next_next_block->prev_size = new_next_block_size; 4000cba8: c6 27 40 00 st %g3, [ %i5 ] <== NOT EXECUTED Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 4000cbac: da 04 60 0c ld [ %l1 + 0xc ], %o5 <== NOT EXECUTED Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; 4000cbb0: c8 04 60 08 ld [ %l1 + 8 ], %g4 <== NOT EXECUTED _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; 4000cbb4: c2 20 a0 04 st %g1, [ %g2 + 4 ] <== NOT EXECUTED 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; 4000cbb8: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 <== NOT EXECUTED Heap_Block *prev = block->prev; block = new_block; block->next = next; 4000cbbc: c8 20 a0 08 st %g4, [ %g2 + 8 ] <== NOT EXECUTED 4000cbc0: 82 00 40 10 add %g1, %l0, %g1 <== NOT EXECUTED block->prev = prev; 4000cbc4: da 20 a0 0c st %o5, [ %g2 + 0xc ] <== NOT EXECUTED 4000cbc8: c2 26 20 30 st %g1, [ %i0 + 0x30 ] <== NOT EXECUTED *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 4000cbcc: 86 00 ff fc add %g3, -4, %g3 <== NOT EXECUTED next->prev = prev->next = block; 4000cbd0: c4 21 20 0c st %g2, [ %g4 + 0xc ] <== NOT EXECUTED 4000cbd4: c4 23 60 08 st %g2, [ %o5 + 8 ] <== NOT EXECUTED 4000cbd8: 10 80 00 14 b 4000cc28 <_Heap_Resize_block+0x1fc> <== NOT EXECUTED 4000cbdc: c6 27 00 00 st %g3, [ %i4 ] <== NOT EXECUTED } else if (free_block_size >= min_block_size) { 4000cbe0: 2a 80 00 13 bcs,a 4000cc2c <_Heap_Resize_block+0x200> <== NOT EXECUTED 4000cbe4: c2 06 20 54 ld [ %i0 + 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; 4000cbe8: 82 10 80 1b or %g2, %i3, %g1 <== NOT EXECUTED 4000cbec: 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; 4000cbf0: 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 ); 4000cbf4: 92 04 80 02 add %l2, %g2, %o1 <== NOT EXECUTED 4000cbf8: c2 22 60 04 st %g1, [ %o1 + 4 ] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 4000cbfc: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 4000cc00: c4 06 20 50 ld [ %i0 + 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 */ 4000cc04: 82 00 60 01 inc %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 4000cc08: 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 */ 4000cc0c: c2 26 20 40 st %g1, [ %i0 + 0x40 ] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 4000cc10: c4 26 20 50 st %g2, [ %i0 + 0x50 ] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 4000cc14: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED 4000cc18: 7f ff e8 64 call 40006da8 <_Heap_Free> <== NOT EXECUTED 4000cc1c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 4000cc20: 82 04 3f fc add %l0, -4, %g1 <== NOT EXECUTED 4000cc24: c2 27 00 00 st %g1, [ %i4 ] <== NOT EXECUTED } } } ++stats->resizes; 4000cc28: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 <== NOT EXECUTED 4000cc2c: 84 10 20 00 clr %g2 <== NOT EXECUTED 4000cc30: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000cc34: 10 80 00 05 b 4000cc48 <_Heap_Resize_block+0x21c> <== NOT EXECUTED 4000cc38: c2 26 20 54 st %g1, [ %i0 + 0x54 ] <== NOT EXECUTED return HEAP_RESIZE_SUCCESSFUL; 4000cc3c: 10 80 00 03 b 4000cc48 <_Heap_Resize_block+0x21c> <== NOT EXECUTED 4000cc40: 84 10 20 02 mov 2, %g2 <== NOT EXECUTED 4000cc44: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED } 4000cc48: 81 c7 e0 08 ret <== NOT EXECUTED 4000cc4c: 91 e8 00 02 restore %g0, %g2, %o0 <== NOT EXECUTED 4000cc50 <_Heap_Size_of_user_area>: boolean _Heap_Size_of_user_area( Heap_Control *the_heap, void *starting_address, size_t *size ) { 4000cc50: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED Heap_Block *the_block; Heap_Block *next_block; uint32_t the_size; if ( !_Addresses_Is_in_range( 4000cc54: e2 06 20 20 ld [ %i0 + 0x20 ], %l1 <== NOT EXECUTED 4000cc58: 80 a6 40 11 cmp %i1, %l1 <== NOT EXECUTED 4000cc5c: 0a 80 00 1f bcs 4000ccd8 <_Heap_Size_of_user_area+0x88> <== NOT EXECUTED 4000cc60: e0 06 20 24 ld [ %i0 + 0x24 ], %l0 <== NOT EXECUTED 4000cc64: 80 a6 40 10 cmp %i1, %l0 <== NOT EXECUTED 4000cc68: 18 80 00 1c bgu 4000ccd8 <_Heap_Size_of_user_area+0x88> <== NOT EXECUTED 4000cc6c: 01 00 00 00 nop <== NOT EXECUTED /* 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); 4000cc70: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 <== NOT EXECUTED 4000cc74: 40 00 21 ff call 40015470 <.urem> <== NOT EXECUTED 4000cc78: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4000cc7c: 90 26 40 08 sub %i1, %o0, %o0 <== NOT EXECUTED 4000cc80: 90 02 3f f8 add %o0, -8, %o0 <== NOT EXECUTED return( FALSE ); _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 ) ) 4000cc84: 80 a2 00 11 cmp %o0, %l1 <== NOT EXECUTED 4000cc88: 0a 80 00 14 bcs 4000ccd8 <_Heap_Size_of_user_area+0x88> <== NOT EXECUTED 4000cc8c: 80 a2 00 10 cmp %o0, %l0 <== NOT EXECUTED 4000cc90: 18 80 00 12 bgu 4000ccd8 <_Heap_Size_of_user_area+0x88> <== NOT EXECUTED 4000cc94: 01 00 00 00 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 4000cc98: c2 02 20 04 ld [ %o0 + 4 ], %g1 <== NOT EXECUTED 4000cc9c: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED 4000cca0: 90 02 00 01 add %o0, %g1, %o0 <== NOT EXECUTED the_size = _Heap_Block_size( the_block ); next_block = _Heap_Block_at( the_block, the_size ); _HAssert(_Heap_Is_block_in( the_heap, next_block )); _HAssert(_Heap_Is_prev_used( next_block )); if ( 4000cca4: 80 a2 00 11 cmp %o0, %l1 <== NOT EXECUTED 4000cca8: 0a 80 00 0c bcs 4000ccd8 <_Heap_Size_of_user_area+0x88> <== NOT EXECUTED 4000ccac: 80 a2 00 10 cmp %o0, %l0 <== NOT EXECUTED 4000ccb0: 18 80 00 0a bgu 4000ccd8 <_Heap_Size_of_user_area+0x88> <== NOT EXECUTED 4000ccb4: 01 00 00 00 nop <== NOT EXECUTED 4000ccb8: c2 02 20 04 ld [ %o0 + 4 ], %g1 <== NOT EXECUTED 4000ccbc: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000ccc0: 02 80 00 06 be 4000ccd8 <_Heap_Size_of_user_area+0x88> <== NOT EXECUTED 4000ccc4: 82 22 00 19 sub %o0, %i1, %g1 <== NOT EXECUTED and then add correction equal to the offset of the 'size' field of the 'Heap_Block' structure. The correction is due to the fact that 'prev_size' field of the next block is actually used as user accessible area of 'the_block'. */ *size = _Addresses_Subtract ( next_block, starting_address ) 4000ccc8: 82 00 60 04 add %g1, 4, %g1 <== NOT EXECUTED 4000cccc: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED 4000ccd0: 81 c7 e0 08 ret <== NOT EXECUTED 4000ccd4: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED + HEAP_BLOCK_HEADER_OFFSET; return( TRUE ); } 4000ccd8: 81 c7 e0 08 ret <== NOT EXECUTED 4000ccdc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000657c <_IO_Manager_initialization>: void _IO_Manager_initialization( rtems_driver_address_table *driver_table, uint32_t drivers_in_table, uint32_t number_of_drivers ) { 4000657c: 9d e3 bf 98 save %sp, -104, %sp 40006580: 23 10 00 6a sethi %hi(0x4001a800), %l1 /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) 40006584: 80 a6 80 19 cmp %i2, %i1 40006588: 18 80 00 06 bgu 400065a0 <_IO_Manager_initialization+0x24> 4000658c: 25 10 00 6a sethi %hi(0x4001a800), %l2 * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; 40006590: f0 24 60 58 st %i0, [ %l1 + 0x58 ] _IO_Number_of_drivers = number_of_drivers; 40006594: f2 24 a0 54 st %i1, [ %l2 + 0x54 ] 40006598: 81 c7 e0 08 ret 4000659c: 81 e8 00 00 restore /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 400065a0: 83 2e a0 03 sll %i2, 3, %g1 <== NOT EXECUTED 400065a4: a1 2e a0 05 sll %i2, 5, %l0 <== NOT EXECUTED 400065a8: a0 24 00 01 sub %l0, %g1, %l0 <== NOT EXECUTED 400065ac: 40 00 0e f0 call 4000a16c <_Workspace_Allocate_or_fatal_error> <== NOT EXECUTED 400065b0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 400065b4: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 400065b8: f4 24 a0 54 st %i2, [ %l2 + 0x54 ] <== NOT EXECUTED /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 400065bc: d0 24 60 58 st %o0, [ %l1 + 0x58 ] <== NOT EXECUTED _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 400065c0: 40 00 20 d9 call 4000e924 <== NOT EXECUTED 400065c4: 92 10 20 00 clr %o1 <== NOT EXECUTED _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; 400065c8: e2 04 60 58 ld [ %l1 + 0x58 ], %l1 <== NOT EXECUTED 400065cc: b4 10 20 00 clr %i2 <== NOT EXECUTED 400065d0: 10 80 00 07 b 400065ec <_IO_Manager_initialization+0x70> <== NOT EXECUTED 400065d4: a0 10 20 00 clr %l0 <== NOT EXECUTED 400065d8: 92 04 00 18 add %l0, %i0, %o1 <== NOT EXECUTED memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 400065dc: b4 06 a0 01 inc %i2 <== NOT EXECUTED 400065e0: a0 04 20 18 add %l0, 0x18, %l0 <== NOT EXECUTED _IO_Driver_address_table[index] = driver_table[index]; 400065e4: 40 00 20 a3 call 4000e870 <== NOT EXECUTED 400065e8: 94 10 20 18 mov 0x18, %o2 <== NOT EXECUTED memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 400065ec: 80 a6 80 19 cmp %i2, %i1 <== NOT EXECUTED 400065f0: 12 bf ff fa bne 400065d8 <_IO_Manager_initialization+0x5c> <== NOT EXECUTED 400065f4: 90 04 00 11 add %l0, %l1, %o0 <== NOT EXECUTED 400065f8: 81 c7 e0 08 ret <== NOT EXECUTED 400065fc: 81 e8 00 00 restore <== NOT EXECUTED 400071f8 <_ISR_Handler_initialization>: * * Output parameters: NONE */ void _ISR_Handler_initialization( void ) { 400071f8: 9d e3 bf 98 save %sp, -104, %sp _ISR_Signals_to_thread_executing = FALSE; 400071fc: 03 10 00 67 sethi %hi(0x40019c00), %g1 40007200: c0 20 63 a8 clr [ %g1 + 0x3a8 ] ! 40019fa8 <_ISR_Signals_to_thread_executing> _ISR_Nest_level = 0; 40007204: 03 10 00 67 sethi %hi(0x40019c00), %g1 _ISR_Vector_table = _Workspace_Allocate_or_fatal_error( 40007208: 90 10 24 00 mov 0x400, %o0 void _ISR_Handler_initialization( void ) { _ISR_Signals_to_thread_executing = FALSE; _ISR_Nest_level = 0; 4000720c: c0 20 62 e4 clr [ %g1 + 0x2e4 ] _ISR_Vector_table = _Workspace_Allocate_or_fatal_error( 40007210: 40 00 0b d7 call 4000a16c <_Workspace_Allocate_or_fatal_error> 40007214: 01 00 00 00 nop _CPU_Initialize_vectors(); #if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE ) if ( _CPU_Table.interrupt_stack_size < STACK_MINIMUM_SIZE ) 40007218: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000721c: a0 10 62 34 or %g1, 0x234, %l0 ! 40019e34 <_CPU_Table> 40007220: c4 04 20 18 ld [ %l0 + 0x18 ], %g2 { _ISR_Signals_to_thread_executing = FALSE; _ISR_Nest_level = 0; _ISR_Vector_table = _Workspace_Allocate_or_fatal_error( 40007224: 03 10 00 67 sethi %hi(0x40019c00), %g1 _CPU_Initialize_vectors(); #if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE ) if ( _CPU_Table.interrupt_stack_size < STACK_MINIMUM_SIZE ) 40007228: 80 a0 af ff cmp %g2, 0xfff 4000722c: 18 80 00 06 bgu 40007244 <_ISR_Handler_initialization+0x4c> 40007230: d0 20 62 c4 st %o0, [ %g1 + 0x2c4 ] _Internal_error_Occurred( 40007234: 90 10 20 00 clr %o0 <== NOT EXECUTED 40007238: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000723c: 7f ff ff df call 400071b8 <_Internal_error_Occurred> <== NOT EXECUTED 40007240: 94 10 20 05 mov 5, %o2 <== NOT EXECUTED INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL ); _CPU_Interrupt_stack_low = 40007244: 40 00 0b ca call 4000a16c <_Workspace_Allocate_or_fatal_error> 40007248: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 _Workspace_Allocate_or_fatal_error( _CPU_Table.interrupt_stack_size ); _CPU_Interrupt_stack_high = _Addresses_Add_offset( 4000724c: c4 04 20 18 ld [ %l0 + 0x18 ], %g2 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL ); _CPU_Interrupt_stack_low = 40007250: 03 10 00 67 sethi %hi(0x40019c00), %g1 _Workspace_Allocate_or_fatal_error( _CPU_Table.interrupt_stack_size ); _CPU_Interrupt_stack_high = _Addresses_Add_offset( 40007254: 84 02 00 02 add %o0, %g2, %g2 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL ); _CPU_Interrupt_stack_low = 40007258: d0 20 62 30 st %o0, [ %g1 + 0x230 ] _Workspace_Allocate_or_fatal_error( _CPU_Table.interrupt_stack_size ); _CPU_Interrupt_stack_high = _Addresses_Add_offset( 4000725c: 03 10 00 67 sethi %hi(0x40019c00), %g1 40007260: c4 20 61 7c st %g2, [ %g1 + 0x17c ] ! 40019d7c <_CPU_Interrupt_stack_high> #if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE ) _CPU_Install_interrupt_stack(); #endif } 40007264: 81 c7 e0 08 ret 40007268: 81 e8 00 00 restore 400165a4 <_Objects_Copy_name_raw>: const size_t length ) { uint32_t *source_p = (uint32_t *) source; uint32_t *destination_p = (uint32_t *) destination; size_t tmp_length = length / OBJECTS_NAME_ALIGNMENT; 400165a4: 10 80 00 05 b 400165b8 <_Objects_Copy_name_raw+0x14> <== NOT EXECUTED 400165a8: 95 32 a0 02 srl %o2, 2, %o2 <== NOT EXECUTED while ( tmp_length-- ) *destination_p++ = *source_p++; 400165ac: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED 400165b0: c2 22 40 00 st %g1, [ %o1 ] <== NOT EXECUTED 400165b4: 92 02 60 04 add %o1, 4, %o1 <== NOT EXECUTED { uint32_t *source_p = (uint32_t *) source; uint32_t *destination_p = (uint32_t *) destination; size_t tmp_length = length / OBJECTS_NAME_ALIGNMENT; while ( tmp_length-- ) 400165b8: 94 02 bf ff add %o2, -1, %o2 <== NOT EXECUTED 400165bc: 80 a2 bf ff cmp %o2, -1 <== NOT EXECUTED 400165c0: 32 bf ff fb bne,a 400165ac <_Objects_Copy_name_raw+0x8> <== NOT EXECUTED 400165c4: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED *destination_p++ = *source_p++; } 400165c8: 81 c3 e0 08 retl <== NOT EXECUTED 400165cc: 01 00 00 00 nop 40007348 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 40007348: 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; 4000734c: 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 ) 40007350: e0 16 20 10 lduh [ %i0 + 0x10 ], %l0 40007354: 03 00 00 3f sethi %hi(0xfc00), %g1 40007358: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000735c: a2 08 80 01 and %g2, %g1, %l1 40007360: 80 a4 00 11 cmp %l0, %l1 40007364: 3a 80 00 06 bcc,a 4000737c <_Objects_Extend_information+0x34> 40007368: e4 06 20 18 ld [ %i0 + 0x18 ], %l2 4000736c: ac 10 00 11 mov %l1, %l6 40007370: 90 10 20 00 clr %o0 40007374: 10 80 00 12 b 400073bc <_Objects_Extend_information+0x74> 40007378: b8 10 20 00 clr %i4 block_count = 0; else { block_count = information->maximum / information->allocation_size; 4000737c: 90 10 00 10 mov %l0, %o0 40007380: 92 10 00 12 mov %l2, %o1 40007384: 40 00 37 8f call 400151c0 <.udiv> 40007388: ac 10 00 11 mov %l1, %l6 4000738c: 10 80 00 09 b 400073b0 <_Objects_Extend_information+0x68> 40007390: b8 10 20 00 clr %i4 for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 40007394: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 40007398: c2 00 40 02 ld [ %g1 + %g2 ], %g1 4000739c: 80 a0 60 00 cmp %g1, 0 400073a0: 02 80 00 08 be 400073c0 <_Objects_Extend_information+0x78> 400073a4: 80 a5 80 10 cmp %l6, %l0 break; else index_base += information->allocation_size; 400073a8: ac 05 80 12 add %l6, %l2, %l6 if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 400073ac: b8 07 20 01 inc %i4 400073b0: 80 a7 00 08 cmp %i4, %o0 400073b4: 12 bf ff f8 bne 40007394 <_Objects_Extend_information+0x4c> 400073b8: 85 2f 20 02 sll %i4, 2, %g2 /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 400073bc: 80 a5 80 10 cmp %l6, %l0 400073c0: 2a 80 00 63 bcs,a 4000754c <_Objects_Extend_information+0x204> 400073c4: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 400073c8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 400073cc: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 400073d0: ae 04 00 01 add %l0, %g1, %l7 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 400073d4: 80 a0 a0 00 cmp %g2, 0 /* * Up the block count and maximum */ block_count++; 400073d8: a0 02 20 01 add %o0, 1, %l0 400073dc: 82 05 c0 11 add %l7, %l1, %g1 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 400073e0: 02 80 00 0b be 4000740c <_Objects_Extend_information+0xc4> 400073e4: 91 2c 20 01 sll %l0, 1, %o0 object_blocks = (void**) 400073e8: 90 02 00 10 add %o0, %l0, %o0 400073ec: 90 00 40 08 add %g1, %o0, %o0 400073f0: 7f ff ff cf call 4000732c <_Workspace_Allocate> 400073f4: 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 ) 400073f8: a4 92 20 00 orcc %o0, 0, %l2 400073fc: 32 80 00 0a bne,a 40007424 <_Objects_Extend_information+0xdc> 40007400: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40007404: 81 c7 e0 08 ret <== NOT EXECUTED 40007408: 81 e8 00 00 restore <== NOT EXECUTED return; } else { object_blocks = (void**) 4000740c: 90 02 00 10 add %o0, %l0, %o0 40007410: 90 00 40 08 add %g1, %o0, %o0 40007414: 40 00 0b 56 call 4000a16c <_Workspace_Allocate_or_fatal_error> 40007418: 91 2a 20 02 sll %o0, 2, %o0 4000741c: a4 10 00 08 mov %o0, %l2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 40007420: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 /* * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; 40007424: ba 04 3f ff add %l0, -1, %i5 if ( information->maximum > minimum_index ) { 40007428: 80 a0 40 11 cmp %g1, %l1 4000742c: 84 10 20 00 clr %g2 40007430: 83 2c 20 02 sll %l0, 2, %g1 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 40007434: a8 04 80 01 add %l2, %g1, %l4 object_blocks, block_count * sizeof(void*) ); name_table = (Objects_Name *) _Addresses_Add_offset( 40007438: aa 05 00 01 add %l4, %g1, %l5 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 4000743c: 08 80 00 19 bleu 400074a0 <_Objects_Extend_information+0x158> 40007440: a6 05 40 01 add %l5, %g1, %l3 /* * 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, 40007444: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 40007448: a1 2f 60 02 sll %i5, 2, %l0 4000744c: 90 10 00 12 mov %l2, %o0 40007450: 40 00 1d 08 call 4000e870 40007454: 94 10 00 10 mov %l0, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 40007458: d2 06 20 38 ld [ %i0 + 0x38 ], %o1 4000745c: 94 10 00 10 mov %l0, %o2 40007460: 40 00 1d 04 call 4000e870 40007464: 90 10 00 14 mov %l4, %o0 information->inactive_per_block, block_count * sizeof(uint32_t ) ); memcpy( name_table, 40007468: d2 06 20 24 ld [ %i0 + 0x24 ], %o1 4000746c: 94 10 00 10 mov %l0, %o2 40007470: 40 00 1d 00 call 4000e870 40007474: 90 10 00 15 mov %l5, %o0 information->name_table, block_count * sizeof(Objects_Name *) ); memcpy( local_table, 40007478: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 4000747c: d2 06 20 20 ld [ %i0 + 0x20 ], %o1 40007480: 94 02 80 11 add %o2, %l1, %o2 40007484: 90 10 00 13 mov %l3, %o0 40007488: 40 00 1c fa call 4000e870 4000748c: 95 2a a0 02 sll %o2, 2, %o2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 40007490: 10 80 00 08 b 400074b0 <_Objects_Extend_information+0x168> 40007494: 83 2f 60 02 sll %i5, 2, %g1 else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 40007498: 84 00 a0 01 inc %g2 local_table[ index ] = NULL; 4000749c: c0 20 40 13 clr [ %g1 + %l3 ] else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 400074a0: 80 a0 80 11 cmp %g2, %l1 400074a4: 32 bf ff fd bne,a 40007498 <_Objects_Extend_information+0x150> 400074a8: 83 28 a0 02 sll %g2, 2, %g1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 400074ac: 83 2f 60 02 sll %i5, 2, %g1 inactive_per_block[block_count] = 0; 400074b0: c0 25 00 01 clr [ %l4 + %g1 ] /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 400074b4: c0 24 80 01 clr [ %l2 + %g1 ] inactive_per_block[block_count] = 0; name_table[block_count] = NULL; for ( index=index_base ; index < ( information->allocation_size + index_base ); 400074b8: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; name_table[block_count] = NULL; 400074bc: c0 25 40 01 clr [ %l5 + %g1 ] for ( index=index_base ; index < ( information->allocation_size + index_base ); 400074c0: 83 2d a0 02 sll %l6, 2, %g1 400074c4: 86 05 80 02 add %l6, %g2, %g3 400074c8: 84 04 c0 01 add %l3, %g1, %g2 400074cc: 10 80 00 04 b 400074dc <_Objects_Extend_information+0x194> 400074d0: 82 10 00 16 mov %l6, %g1 index++ ) { local_table[ index ] = NULL; 400074d4: c0 20 bf fc clr [ %g2 + -4 ] inactive_per_block[block_count] = 0; name_table[block_count] = NULL; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 400074d8: 82 00 60 01 inc %g1 object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; name_table[block_count] = NULL; for ( index=index_base ; index < ( information->allocation_size + index_base ); 400074dc: 80 a0 40 03 cmp %g1, %g3 400074e0: 0a bf ff fd bcs 400074d4 <_Objects_Extend_information+0x18c> 400074e4: 84 00 a0 04 add %g2, 4, %g2 index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 400074e8: 7f ff ea 1c call 40001d58 400074ec: 01 00 00 00 nop 400074f0: a0 10 00 08 mov %o0, %l0 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->name_table = name_table; information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 400074f4: d0 06 00 00 ld [ %i0 ], %o0 400074f8: d2 16 20 04 lduh [ %i0 + 4 ], %o1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 400074fc: e8 26 20 38 st %l4, [ %i0 + 0x38 ] information->name_table = name_table; 40007500: ea 26 20 24 st %l5, [ %i0 + 0x24 ] information->local_table = local_table; 40007504: e6 26 20 20 st %l3, [ %i0 + 0x20 ] information->maximum = maximum; 40007508: ee 36 20 10 sth %l7, [ %i0 + 0x10 ] information->maximum_id = _Objects_Build_id( 4000750c: 97 2d e0 10 sll %l7, 0x10, %o3 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 40007510: e2 06 20 3c ld [ %i0 + 0x3c ], %l1 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->name_table = name_table; information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 40007514: 97 32 e0 10 srl %o3, 0x10, %o3 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 40007518: e4 26 20 3c st %l2, [ %i0 + 0x3c ] information->inactive_per_block = inactive_per_block; information->name_table = name_table; information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 4000751c: 7f ff ff 7d call 40007310 <_Objects_Build_id> 40007520: 94 10 20 01 mov 1, %o2 40007524: d0 26 20 0c st %o0, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 40007528: 7f ff ea 10 call 40001d68 4000752c: 90 10 00 10 mov %l0, %o0 if ( old_tables ) 40007530: 80 a4 60 00 cmp %l1, 0 40007534: 02 80 00 05 be 40007548 <_Objects_Extend_information+0x200> 40007538: 11 10 00 67 sethi %hi(0x40019c00), %o0 RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 4000753c: 92 10 00 11 mov %l1, %o1 40007540: 7f ff fe 1a call 40006da8 <_Heap_Free> 40007544: 90 12 22 6c or %o0, 0x26c, %o0 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 40007548: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 4000754c: e2 06 20 3c ld [ %i0 + 0x3c ], %l1 40007550: 80 a0 60 00 cmp %g1, 0 40007554: a1 2f 20 02 sll %i4, 2, %l0 40007558: d0 16 20 44 lduh [ %i0 + 0x44 ], %o0 4000755c: 02 80 00 11 be 400075a0 <_Objects_Extend_information+0x258> 40007560: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 information->object_blocks[ block ] = 40007564: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 40007568: 91 2a 20 10 sll %o0, 0x10, %o0 4000756c: 91 32 20 10 srl %o0, 0x10, %o0 40007570: 40 00 36 da call 400150d8 <.umul> 40007574: 90 02 00 01 add %o0, %g1, %o0 40007578: 7f ff ff 6d call 4000732c <_Workspace_Allocate> 4000757c: 01 00 00 00 nop _Workspace_Allocate( (information->allocation_size * information->name_length) + (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 40007580: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 40007584: d0 24 00 11 st %o0, [ %l0 + %l1 ] _Workspace_Allocate( (information->allocation_size * information->name_length) + (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 40007588: c2 00 40 10 ld [ %g1 + %l0 ], %g1 4000758c: 80 a0 60 00 cmp %g1, 0 40007590: 32 80 00 0d bne,a 400075c4 <_Objects_Extend_information+0x27c> 40007594: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 40007598: 81 c7 e0 08 ret <== NOT EXECUTED 4000759c: 81 e8 00 00 restore <== NOT EXECUTED return; } else { information->object_blocks[ block ] = 400075a0: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 400075a4: 91 2a 20 10 sll %o0, 0x10, %o0 400075a8: 91 32 20 10 srl %o0, 0x10, %o0 400075ac: 40 00 36 cb call 400150d8 <.umul> 400075b0: 90 02 00 01 add %o0, %g1, %o0 400075b4: 40 00 0a ee call 4000a16c <_Workspace_Allocate_or_fatal_error> 400075b8: 01 00 00 00 nop 400075bc: d0 24 00 11 st %o0, [ %l0 + %l1 ] 400075c0: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 400075c4: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 400075c8: 40 00 36 c4 call 400150d8 <.umul> 400075cc: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 (information->allocation_size * information->name_length) + (information->allocation_size * information->size) ); } name_area = (Objects_Name *) _Addresses_Add_offset( 400075d0: a7 2f 20 02 sll %i4, 2, %l3 information->object_blocks[ block ], (information->allocation_size * information->size) ); information->name_table[ block ] = name_area; 400075d4: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 400075d8: c2 04 00 13 ld [ %l0 + %l3 ], %g1 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 400075dc: d4 06 20 18 ld [ %i0 + 0x18 ], %o2 400075e0: a2 02 00 01 add %o0, %g1, %l1 400075e4: d6 06 20 1c ld [ %i0 + 0x1c ], %o3 name_area = (Objects_Name *) _Addresses_Add_offset( information->object_blocks[ block ], (information->allocation_size * information->size) ); information->name_table[ block ] = name_area; 400075e8: e2 20 80 13 st %l1, [ %g2 + %l3 ] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 400075ec: d2 04 00 13 ld [ %l0 + %l3 ], %o1 400075f0: 90 07 bf ec add %fp, -20, %o0 400075f4: a4 10 00 16 mov %l6, %l2 * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { 400075f8: aa 10 00 08 mov %o0, %l5 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 400075fc: 40 00 14 b4 call 4000c8cc <_Chain_Initialize> 40007600: a8 06 20 28 add %i0, 0x28, %l4 40007604: 30 80 00 0c b,a 40007634 <_Objects_Extend_information+0x2ec> index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 40007608: d2 16 20 04 lduh [ %i0 + 4 ], %o1 4000760c: d0 06 00 00 ld [ %i0 ], %o0 40007610: 7f ff ff 40 call 40007310 <_Objects_Build_id> 40007614: a4 04 a0 01 inc %l2 40007618: c2 16 20 44 lduh [ %i0 + 0x44 ], %g1 4000761c: d0 24 20 08 st %o0, [ %l0 + 8 ] information->the_class, _Objects_Local_node, index ); the_object->name = (void *) name_area; 40007620: e2 24 20 0c st %l1, [ %l0 + 0xc ] name_area = _Addresses_Add_offset( name_area, information->name_length ); _Chain_Append( &information->Inactive, &the_object->Node ); 40007624: 92 10 00 10 mov %l0, %o1 40007628: a2 04 40 01 add %l1, %g1, %l1 4000762c: 7f ff fc 7b call 40006818 <_Chain_Append> 40007630: 90 10 00 14 mov %l4, %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 ) { 40007634: 7f ff fc 85 call 40006848 <_Chain_Get> 40007638: 90 10 00 15 mov %l5, %o0 the_object->id = _Objects_Build_id( 4000763c: 96 10 00 12 mov %l2, %o3 * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { 40007640: a0 10 00 08 mov %o0, %l0 40007644: 80 a2 20 00 cmp %o0, 0 40007648: 12 bf ff f0 bne 40007608 <_Objects_Extend_information+0x2c0> 4000764c: 94 10 20 01 mov 1, %o2 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 40007650: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 40007654: c4 06 20 38 ld [ %i0 + 0x38 ], %g2 information->inactive += information->allocation_size; 40007658: c6 16 20 34 lduh [ %i0 + 0x34 ], %g3 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 4000765c: c2 20 80 13 st %g1, [ %g2 + %l3 ] information->inactive += information->allocation_size; 40007660: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 40007664: 82 00 40 03 add %g1, %g3, %g1 40007668: c2 36 20 34 sth %g1, [ %i0 + 0x34 ] 4000766c: 81 c7 e0 08 ret 40007670: 81 e8 00 00 restore 400091d0 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 400091d0: 9d e3 bf 88 save %sp, -120, %sp 400091d4: 92 10 00 18 mov %i0, %o1 uint32_t i; char lname[5]; Objects_Control *the_object; Objects_Locations location; if ( length == 0 ) 400091d8: 80 a6 60 00 cmp %i1, 0 400091dc: 02 80 00 43 be 400092e8 <_Objects_Get_name_as_string+0x118> 400091e0: b0 10 00 1a mov %i2, %i0 return NULL; if ( name == NULL ) 400091e4: 80 a6 a0 00 cmp %i2, 0 400091e8: 02 80 00 3e be 400092e0 <_Objects_Get_name_as_string+0x110> 400091ec: 85 32 60 16 srl %o1, 0x16, %g2 if ( !_Objects_Is_class_valid( the_class ) ) return NULL; the_api = _Objects_Get_API( id ); return _Objects_Information_table[ the_api ][ the_class ]; 400091f0: 03 10 00 9a sethi %hi(0x40026800), %g1 400091f4: 84 08 a0 1c and %g2, 0x1c, %g2 400091f8: 82 10 61 b0 or %g1, 0x1b0, %g1 400091fc: c4 00 40 02 ld [ %g1 + %g2 ], %g2 40009200: 83 32 60 1b srl %o1, 0x1b, %g1 40009204: 83 28 60 02 sll %g1, 2, %g1 40009208: e0 00 80 01 ld [ %g2 + %g1 ], %l0 return NULL; information = _Objects_Get_information( id ); if ( !information ) 4000920c: 80 a4 20 00 cmp %l0, 0 40009210: 22 80 00 34 be,a 400092e0 <_Objects_Get_name_as_string+0x110> 40009214: b0 10 20 00 clr %i0 <== NOT EXECUTED return NULL; the_object = _Objects_Get( information, id, &location ); 40009218: 90 10 00 10 mov %l0, %o0 4000921c: 40 00 00 36 call 400092f4 <_Objects_Get> 40009220: 94 07 bf f4 add %fp, -12, %o2 switch ( location ) { 40009224: c2 07 bf f4 ld [ %fp + -12 ], %g1 40009228: 80 a0 60 00 cmp %g1, 0 4000922c: 32 80 00 2d bne,a 400092e0 <_Objects_Get_name_as_string+0x110> 40009230: b0 10 20 00 clr %i0 <== NOT EXECUTED case OBJECTS_ERROR: return NULL; case OBJECTS_LOCAL: if ( information->is_string ) { 40009234: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 40009238: 80 a0 60 00 cmp %g1, 0 4000923c: 12 80 00 0b bne 40009268 <_Objects_Get_name_as_string+0x98> 40009240: d0 02 20 0c ld [ %o0 + 0xc ], %o0 s = the_object->name; } else { uint32_t u32_name = (uint32_t) the_object->name; lname[ 0 ] = (u32_name >> 24) & 0xff; 40009244: 83 32 20 18 srl %o0, 0x18, %g1 40009248: c2 2f bf ef stb %g1, [ %fp + -17 ] lname[ 1 ] = (u32_name >> 16) & 0xff; 4000924c: 83 32 20 10 srl %o0, 0x10, %g1 lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; 40009250: d0 2f bf f2 stb %o0, [ %fp + -14 ] s = the_object->name; } else { uint32_t u32_name = (uint32_t) the_object->name; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 40009254: c2 2f bf f0 stb %g1, [ %fp + -16 ] lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 40009258: c0 2f bf f3 clrb [ %fp + -13 ] } else { uint32_t u32_name = (uint32_t) the_object->name; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 4000925c: 83 32 20 08 srl %o0, 8, %g1 lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 40009260: 90 07 bf ef add %fp, -17, %o0 } else { uint32_t u32_name = (uint32_t) the_object->name; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 40009264: c2 2f bf f1 stb %g1, [ %fp + -15 ] lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 40009268: 84 10 00 18 mov %i0, %g2 4000926c: 88 10 20 01 mov 1, %g4 s = lname; } for ( i=0, d=name ; i<(length-1) && *s ; i++, s++, d++ ) { *d = (!isprint(*s)) ? '*' : *s; 40009270: 10 80 00 09 b 40009294 <_Objects_Get_name_as_string+0xc4> 40009274: 19 10 00 78 sethi %hi(0x4001e000), %o4 40009278: c2 03 23 d0 ld [ %o4 + 0x3d0 ], %g1 ! 4001e3d0 <__ctype_ptr> 4000927c: c2 48 40 03 ldsb [ %g1 + %g3 ], %g1 40009280: 80 88 60 97 btst 0x97, %g1 40009284: 22 80 00 02 be,a 4000928c <_Objects_Get_name_as_string+0xbc> 40009288: 9a 10 20 2a mov 0x2a, %o5 <== NOT EXECUTED 4000928c: da 28 80 00 stb %o5, [ %g2 ] lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; s = lname; } for ( i=0, d=name ; i<(length-1) && *s ; i++, s++, d++ ) { 40009290: 84 00 a0 01 inc %g2 40009294: 80 a1 00 19 cmp %g4, %i1 40009298: 02 80 00 07 be 400092b4 <_Objects_Get_name_as_string+0xe4> 4000929c: 82 02 00 04 add %o0, %g4, %g1 400092a0: c6 48 7f ff ldsb [ %g1 + -1 ], %g3 400092a4: 88 01 20 01 inc %g4 400092a8: 80 a0 e0 00 cmp %g3, 0 400092ac: 12 bf ff f3 bne 40009278 <_Objects_Get_name_as_string+0xa8> 400092b0: da 08 7f ff ldub [ %g1 + -1 ], %o5 *d = (!isprint(*s)) ? '*' : *s; } *d = '\0'; 400092b4: c0 28 80 00 clrb [ %g2 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400092b8: 03 10 00 9a sethi %hi(0x40026800), %g1 400092bc: c4 00 62 50 ld [ %g1 + 0x250 ], %g2 ! 40026a50 <_Thread_Dispatch_disable_level> 400092c0: 84 00 bf ff add %g2, -1, %g2 400092c4: c4 20 62 50 st %g2, [ %g1 + 0x250 ] 400092c8: c2 00 62 50 ld [ %g1 + 0x250 ], %g1 400092cc: 80 a0 60 00 cmp %g1, 0 400092d0: 12 80 00 07 bne 400092ec <_Objects_Get_name_as_string+0x11c> 400092d4: 01 00 00 00 nop _Thread_Dispatch(); 400092d8: 40 00 04 bc call 4000a5c8 <_Thread_Dispatch> 400092dc: 01 00 00 00 nop 400092e0: 81 c7 e0 08 ret 400092e4: 81 e8 00 00 restore 400092e8: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } 400092ec: 81 c7 e0 08 ret <== NOT EXECUTED 400092f0: 81 e8 00 00 restore <== NOT EXECUTED 400165d0 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 400165d0: 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) 400165d4: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 400165d8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <== NOT EXECUTED 400165dc: 80 8e 40 01 btst %i1, %g1 <== NOT EXECUTED 400165e0: 22 80 00 02 be,a 400165e8 <_Objects_Get_next+0x18> <== NOT EXECUTED 400165e4: 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) 400165e8: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 400165ec: a0 10 63 ff or %g1, 0x3ff, %l0 ! ffff <== NOT EXECUTED 400165f0: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED 400165f4: 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); 400165f8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400165fc: 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) 40016600: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40016604: 18 80 00 0a bgu 4001662c <_Objects_Get_next+0x5c> <== NOT EXECUTED 40016608: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 4001660c: 7f ff d6 73 call 4000bfd8 <_Objects_Get> <== NOT EXECUTED 40016610: b2 06 60 01 inc %i1 <== NOT EXECUTED next_id++; } while (*location_p != OBJECTS_LOCAL); 40016614: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 40016618: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001661c: 32 bf ff f6 bne,a 400165f4 <_Objects_Get_next+0x24> <== NOT EXECUTED 40016620: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED *next_id_p = next_id; 40016624: 10 80 00 07 b 40016640 <_Objects_Get_next+0x70> <== NOT EXECUTED 40016628: f2 26 c0 00 st %i1, [ %i3 ] <== NOT EXECUTED do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 4001662c: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 40016630: 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; 40016634: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 40016638: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED 4001663c: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED return 0; } 40016640: 81 c7 e0 08 ret <== NOT EXECUTED 40016644: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40014a14 <_Objects_Get_no_protection>: ) { Objects_Control *the_object; uint32_t index; index = id - information->minimum_id + 1; 40014a14: c2 02 20 08 ld [ %o0 + 8 ], %g1 if ( information->maximum >= index ) { 40014a18: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 ) { Objects_Control *the_object; uint32_t index; index = id - information->minimum_id + 1; 40014a1c: 92 22 40 01 sub %o1, %g1, %o1 40014a20: 82 02 60 01 add %o1, 1, %g1 if ( information->maximum >= index ) { 40014a24: 80 a0 80 01 cmp %g2, %g1 40014a28: 0a 80 00 0b bcs 40014a54 <_Objects_Get_no_protection+0x40> 40014a2c: 83 28 60 02 sll %g1, 2, %g1 if ( (the_object = information->local_table[ index ]) != NULL ) { 40014a30: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40014a34: d0 00 80 01 ld [ %g2 + %g1 ], %o0 40014a38: 80 a2 20 00 cmp %o0, 0 40014a3c: 02 80 00 04 be 40014a4c <_Objects_Get_no_protection+0x38> 40014a40: 82 10 20 02 mov 2, %g1 *location = OBJECTS_LOCAL; 40014a44: 81 c3 e0 08 retl 40014a48: c0 22 80 00 clr [ %o2 ] return the_object; } *location = OBJECTS_ERROR; 40014a4c: 81 c3 e0 08 retl <== NOT EXECUTED 40014a50: c2 22 80 00 st %g1, [ %o2 ] <== NOT EXECUTED return NULL; } *location = OBJECTS_ERROR; 40014a54: 82 10 20 02 mov 2, %g1 40014a58: 90 10 20 00 clr %o0 /* * Not supported for multiprocessing */ return NULL; } 40014a5c: 81 c3 e0 08 retl 40014a60: c2 22 80 00 st %g1, [ %o2 ] 400079e0 <_Objects_Handler_initialization>: uint32_t node, uint32_t maximum_nodes, uint32_t maximum_global_objects ) { if ( node < 1 || node > maximum_nodes ) 400079e0: 80 a2 20 00 cmp %o0, 0 400079e4: 22 80 00 05 be,a 400079f8 <_Objects_Handler_initialization+0x18> 400079e8: 90 10 20 00 clr %o0 <== NOT EXECUTED 400079ec: 80 a2 00 09 cmp %o0, %o1 400079f0: 08 80 00 07 bleu 40007a0c <_Objects_Handler_initialization+0x2c> 400079f4: 90 10 20 00 clr %o0 _Internal_error_Occurred( 400079f8: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 400079fc: 94 10 20 08 mov 8, %o2 <== NOT EXECUTED 40007a00: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40007a04: 7f ff fd ed call 400071b8 <_Internal_error_Occurred> <== NOT EXECUTED 40007a08: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40007a0c: 81 c3 e0 08 retl 40007a10: 01 00 00 00 nop 40008e24 <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 40008e24: 9d e3 bf 90 save %sp, -112, %sp 40008e28: 92 10 00 18 mov %i0, %o1 uint32_t the_class; Objects_Information *information; Objects_Control *the_object = (Objects_Control *) 0; Objects_Locations ignored_location; if ( !name ) 40008e2c: 80 a6 60 00 cmp %i1, 0 40008e30: 02 80 00 26 be 40008ec8 <_Objects_Id_to_name+0xa4> 40008e34: b0 10 20 01 mov 1, %i0 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 40008e38: 83 32 60 18 srl %o1, 0x18, %g1 40008e3c: 82 08 60 07 and %g1, 7, %g1 return OBJECTS_INVALID_NAME; the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) 40008e40: 80 a0 60 04 cmp %g1, 4 40008e44: 18 80 00 23 bgu 40008ed0 <_Objects_Id_to_name+0xac> 40008e48: 85 28 60 02 sll %g1, 2, %g2 return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( id ); information = _Objects_Information_table[ the_api ][ the_class ]; 40008e4c: 03 10 00 7a sethi %hi(0x4001e800), %g1 40008e50: 82 10 60 b0 or %g1, 0xb0, %g1 ! 4001e8b0 <_Objects_Information_table> 40008e54: c4 00 40 02 ld [ %g1 + %g2 ], %g2 40008e58: 83 32 60 1b srl %o1, 0x1b, %g1 40008e5c: 83 28 60 02 sll %g1, 2, %g1 40008e60: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( !information ) 40008e64: 80 a2 20 00 cmp %o0, 0 40008e68: 02 80 00 18 be 40008ec8 <_Objects_Id_to_name+0xa4> 40008e6c: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; if ( information->is_string ) 40008e70: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 40008e74: 80 a0 60 00 cmp %g1, 0 40008e78: 12 80 00 17 bne 40008ed4 <_Objects_Id_to_name+0xb0> 40008e7c: 01 00 00 00 nop return OBJECTS_INVALID_ID; the_object = _Objects_Get( information, id, &ignored_location ); 40008e80: 7f ff ff c4 call 40008d90 <_Objects_Get> 40008e84: 94 07 bf f4 add %fp, -12, %o2 if ( !the_object ) 40008e88: 80 a2 20 00 cmp %o0, 0 40008e8c: 02 80 00 0f be 40008ec8 <_Objects_Id_to_name+0xa4> 40008e90: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; *name = the_object->name; 40008e94: c2 02 20 0c ld [ %o0 + 0xc ], %g1 40008e98: c2 26 40 00 st %g1, [ %i1 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008e9c: 05 10 00 7a sethi %hi(0x4001e800), %g2 40008ea0: c2 00 a1 50 ld [ %g2 + 0x150 ], %g1 ! 4001e950 <_Thread_Dispatch_disable_level> 40008ea4: b0 10 20 00 clr %i0 40008ea8: 82 00 7f ff add %g1, -1, %g1 40008eac: c2 20 a1 50 st %g1, [ %g2 + 0x150 ] 40008eb0: c2 00 a1 50 ld [ %g2 + 0x150 ], %g1 40008eb4: 80 a0 60 00 cmp %g1, 0 40008eb8: 12 80 00 07 bne 40008ed4 <_Objects_Id_to_name+0xb0> 40008ebc: 01 00 00 00 nop _Thread_Dispatch(); 40008ec0: 40 00 04 d6 call 4000a218 <_Thread_Dispatch> 40008ec4: 01 00 00 00 nop 40008ec8: 81 c7 e0 08 ret 40008ecc: 81 e8 00 00 restore 40008ed0: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 40008ed4: 81 c7 e0 08 ret <== NOT EXECUTED 40008ed8: 81 e8 00 00 restore <== NOT EXECUTED 400078e4 <_Objects_Name_to_id>: Objects_Information *information, Objects_Name name, uint32_t node, Objects_Id *id ) { 400078e4: 9d e3 bf 98 save %sp, -104, %sp 400078e8: a2 10 00 18 mov %i0, %l1 Objects_Control *the_object; uint32_t index; uint32_t name_length; Objects_Name_comparators compare_them; if ( !id ) 400078ec: 80 a6 e0 00 cmp %i3, 0 400078f0: 02 80 00 3a be 400079d8 <_Objects_Name_to_id+0xf4> 400078f4: b0 10 20 02 mov 2, %i0 return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 400078f8: 80 a6 60 00 cmp %i1, 0 400078fc: 02 80 00 2d be 400079b0 <_Objects_Name_to_id+0xcc> 40007900: 01 00 00 00 nop return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 40007904: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 40007908: 80 a0 60 00 cmp %g1, 0 4000790c: 02 80 00 29 be 400079b0 <_Objects_Name_to_id+0xcc> 40007910: 80 a6 a0 00 cmp %i2, 0 40007914: 22 80 00 2a be,a 400079bc <_Objects_Name_to_id+0xd8> 40007918: c2 04 60 40 ld [ %l1 + 0x40 ], %g1 4000791c: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 40007920: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 40007924: 80 a6 80 01 cmp %i2, %g1 40007928: 02 80 00 24 be 400079b8 <_Objects_Name_to_id+0xd4> 4000792c: 80 a6 a0 01 cmp %i2, 1 40007930: 22 80 00 23 be,a 400079bc <_Objects_Name_to_id+0xd8> 40007934: c2 04 60 40 ld [ %l1 + 0x40 ], %g1 name_length = information->name_length; if ( information->is_string ) compare_them = _Objects_Compare_name_string; else compare_them = _Objects_Compare_name_raw; for ( index = 1; index <= information->maximum; index++ ) { 40007938: 81 c7 e0 08 ret 4000793c: 91 e8 20 01 restore %g0, 1, %o0 if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 40007940: a4 10 60 f0 or %g1, 0xf0, %l2 for ( index = 1; index <= information->maximum; index++ ) { the_object = information->local_table[ index ]; if ( !the_object || !the_object->name ) continue; if ( (*compare_them)( name, the_object->name, name_length ) ) { 40007944: 83 28 a0 10 sll %g2, 0x10, %g1 if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 40007948: a0 10 20 01 mov 1, %l0 for ( index = 1; index <= information->maximum; index++ ) { the_object = information->local_table[ index ]; if ( !the_object || !the_object->name ) continue; if ( (*compare_them)( name, the_object->name, name_length ) ) { 4000794c: 10 80 00 15 b 400079a0 <_Objects_Name_to_id+0xbc> 40007950: b1 30 60 10 srl %g1, 0x10, %i0 if ( information->is_string ) compare_them = _Objects_Compare_name_string; else compare_them = _Objects_Compare_name_raw; for ( index = 1; index <= information->maximum; index++ ) { the_object = information->local_table[ index ]; 40007954: c2 04 60 20 ld [ %l1 + 0x20 ], %g1 name_length = information->name_length; if ( information->is_string ) compare_them = _Objects_Compare_name_string; else compare_them = _Objects_Compare_name_raw; for ( index = 1; index <= information->maximum; index++ ) { 40007958: a0 04 20 01 inc %l0 the_object = information->local_table[ index ]; 4000795c: f4 00 40 02 ld [ %g1 + %g2 ], %i2 if ( !the_object || !the_object->name ) 40007960: 80 a6 a0 00 cmp %i2, 0 40007964: 02 80 00 0f be 400079a0 <_Objects_Name_to_id+0xbc> 40007968: 90 10 00 19 mov %i1, %o0 4000796c: d2 06 a0 0c ld [ %i2 + 0xc ], %o1 40007970: 80 a2 60 00 cmp %o1, 0 40007974: 02 80 00 0b be 400079a0 <_Objects_Name_to_id+0xbc> 40007978: 94 10 00 18 mov %i0, %o2 continue; if ( (*compare_them)( name, the_object->name, name_length ) ) { 4000797c: 9f c4 80 00 call %l2 40007980: 01 00 00 00 nop 40007984: 80 a2 20 00 cmp %o0, 0 40007988: 22 80 00 07 be,a 400079a4 <_Objects_Name_to_id+0xc0> 4000798c: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 *id = the_object->id; 40007990: c2 06 a0 08 ld [ %i2 + 8 ], %g1 40007994: c2 26 c0 00 st %g1, [ %i3 ] 40007998: 81 c7 e0 08 ret 4000799c: 91 e8 20 00 restore %g0, 0, %o0 name_length = information->name_length; if ( information->is_string ) compare_them = _Objects_Compare_name_string; else compare_them = _Objects_Compare_name_raw; for ( index = 1; index <= information->maximum; index++ ) { 400079a0: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 400079a4: 80 a4 00 01 cmp %l0, %g1 400079a8: 08 bf ff eb bleu 40007954 <_Objects_Name_to_id+0x70> 400079ac: 85 2c 20 02 sll %l0, 2, %g2 400079b0: 81 c7 e0 08 ret 400079b4: 91 e8 20 01 restore %g0, 1, %o0 search_local_node = TRUE; if ( search_local_node ) { name_length = information->name_length; if ( information->is_string ) compare_them = _Objects_Compare_name_string; 400079b8: c2 04 60 40 ld [ %l1 + 0x40 ], %g1 _Objects_Is_local_node( node ) )) search_local_node = TRUE; if ( search_local_node ) { name_length = information->name_length; 400079bc: c4 14 60 44 lduh [ %l1 + 0x44 ], %g2 if ( information->is_string ) compare_them = _Objects_Compare_name_string; 400079c0: 80 a0 60 00 cmp %g1, 0 400079c4: 03 10 00 33 sethi %hi(0x4000cc00), %g1 400079c8: 02 bf ff df be 40007944 <_Objects_Name_to_id+0x60> 400079cc: a4 10 60 e0 or %g1, 0xe0, %l2 ! 4000cce0 <_Objects_Compare_name_raw> if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 400079d0: 10 bf ff dc b 40007940 <_Objects_Name_to_id+0x5c> 400079d4: 03 10 00 33 sethi %hi(0x4000cc00), %g1 return ( _Objects_MP_Global_name_search( information, name, node, id ) ); #else return OBJECTS_INVALID_NAME; #endif } 400079d8: 81 c7 e0 08 ret <== NOT EXECUTED 400079dc: 81 e8 00 00 restore <== NOT EXECUTED 40007a14 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 40007a14: 9d e3 bf 98 save %sp, -104, %sp 40007a18: 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; 40007a1c: e0 06 20 18 ld [ %i0 + 0x18 ], %l0 40007a20: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 40007a24: 03 00 00 3f sethi %hi(0xfc00), %g1 40007a28: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40007a2c: 92 10 00 10 mov %l0, %o1 40007a30: a2 08 80 01 and %g2, %g1, %l1 40007a34: 40 00 35 e3 call 400151c0 <.udiv> 40007a38: 90 22 00 11 sub %o0, %l1, %o0 40007a3c: 86 10 20 00 clr %g3 40007a40: 10 80 00 33 b 40007b0c <_Objects_Shrink_information+0xf8> 40007a44: a4 10 20 00 clr %l2 for ( block = 0; block < block_count; block++ ) { 40007a48: 86 00 e0 01 inc %g3 if ( information->inactive_per_block[ block ] == information->allocation_size ) { 40007a4c: c2 00 40 12 ld [ %g1 + %l2 ], %g1 40007a50: 80 a0 40 10 cmp %g1, %l0 40007a54: 12 80 00 2c bne 40007b04 <_Objects_Shrink_information+0xf0> 40007a58: 84 04 a0 04 add %l2, 4, %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; 40007a5c: e0 06 20 28 ld [ %i0 + 0x28 ], %l0 40007a60: 03 00 00 3f sethi %hi(0xfc00), %g1 40007a64: a6 10 63 ff or %g1, 0x3ff, %l3 ! ffff 40007a68: c2 04 20 08 ld [ %l0 + 8 ], %g1 40007a6c: 84 08 40 13 and %g1, %l3, %g2 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 40007a70: 80 a0 80 11 cmp %g2, %l1 40007a74: 2a 80 00 0c bcs,a 40007aa4 <_Objects_Shrink_information+0x90> 40007a78: e0 04 00 00 ld [ %l0 ], %l0 40007a7c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 40007a80: 82 04 40 01 add %l1, %g1, %g1 40007a84: 80 a0 80 01 cmp %g2, %g1 40007a88: 1a 80 00 06 bcc 40007aa0 <_Objects_Shrink_information+0x8c> 40007a8c: 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 ); 40007a90: 40 00 13 85 call 4000c8a4 <_Chain_Extract> 40007a94: 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 ) ); 40007a98: 10 80 00 04 b 40007aa8 <_Objects_Shrink_information+0x94> 40007a9c: 80 a4 20 00 cmp %l0, 0 the_object = NULL; _Chain_Extract( &extract_me->Node ); } else { the_object = (Objects_Control *) the_object->Node.next; 40007aa0: e0 04 00 00 ld [ %l0 ], %l0 } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 40007aa4: 80 a4 20 00 cmp %l0, 0 40007aa8: 22 80 00 07 be,a 40007ac4 <_Objects_Shrink_information+0xb0> 40007aac: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 40007ab0: c2 04 00 00 ld [ %l0 ], %g1 40007ab4: 80 a0 60 00 cmp %g1, 0 40007ab8: 32 bf ff ed bne,a 40007a6c <_Objects_Shrink_information+0x58> 40007abc: c2 04 20 08 ld [ %l0 + 8 ], %g1 40007ac0: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 40007ac4: 11 10 00 67 sethi %hi(0x40019c00), %o0 40007ac8: d2 00 40 12 ld [ %g1 + %l2 ], %o1 40007acc: 7f ff fc b7 call 40006da8 <_Heap_Free> 40007ad0: 90 12 22 6c or %o0, 0x26c, %o0 */ _Workspace_Free( information->object_blocks[ block ] ); information->name_table[ block ] = NULL; information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 40007ad4: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->name_table[ block ] = NULL; 40007ad8: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 40007adc: c0 20 40 12 clr [ %g1 + %l2 ] * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->name_table[ block ] = NULL; information->object_blocks[ block ] = NULL; 40007ae0: c8 06 20 3c ld [ %i0 + 0x3c ], %g4 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 40007ae4: c2 16 20 34 lduh [ %i0 + 0x34 ], %g1 40007ae8: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->name_table[ block ] = NULL; 40007aec: c0 20 c0 12 clr [ %g3 + %l2 ] information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 40007af0: 82 20 40 02 sub %g1, %g2, %g1 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->name_table[ block ] = NULL; information->object_blocks[ block ] = NULL; 40007af4: c0 21 00 12 clr [ %g4 + %l2 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 40007af8: c2 36 20 34 sth %g1, [ %i0 + 0x34 ] 40007afc: 81 c7 e0 08 ret 40007b00: 81 e8 00 00 restore return; } index_base += information->allocation_size; 40007b04: 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++ ) { 40007b08: a4 10 00 02 mov %g2, %l2 40007b0c: 80 a0 c0 08 cmp %g3, %o0 40007b10: 32 bf ff ce bne,a 40007a48 <_Objects_Shrink_information+0x34> 40007b14: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 40007b18: 81 c7 e0 08 ret 40007b1c: 81 e8 00 00 restore 40006600 <_POSIX_API_Initialize>: void _POSIX_API_Initialize( rtems_configuration_table *configuration_table ) { 40006600: 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; 40006604: f0 06 20 30 ld [ %i0 + 0x30 ], %i0 if ( !api_configuration ) 40006608: 80 a6 20 00 cmp %i0, 0 4000660c: 32 80 00 05 bne,a 40006620 <_POSIX_API_Initialize+0x20> 40006610: d0 06 20 14 ld [ %i0 + 0x14 ], %o0 40006614: 03 10 00 66 sethi %hi(0x40019800), %g1 <== NOT EXECUTED 40006618: b0 10 63 c4 or %g1, 0x3c4, %i0 ! 40019bc4 <_POSIX_Default_configuration> <== NOT EXECUTED api_configuration = &_POSIX_Default_configuration; _Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects; _POSIX_signals_Manager_Initialization( 4000661c: 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; 40006620: 05 10 00 67 sethi %hi(0x40019c00), %g2 40006624: 03 10 00 68 sethi %hi(0x4001a000), %g1 40006628: 82 10 63 b8 or %g1, 0x3b8, %g1 ! 4001a3b8 <_POSIX_Objects> _POSIX_signals_Manager_Initialization( 4000662c: 40 00 16 22 call 4000beb4 <_POSIX_signals_Manager_Initialization> 40006630: c2 20 a1 8c st %g1, [ %g2 + 0x18c ] api_configuration->maximum_queued_signals ); _POSIX_Threads_Manager_initialization( 40006634: d2 06 20 2c ld [ %i0 + 0x2c ], %o1 40006638: d4 06 20 30 ld [ %i0 + 0x30 ], %o2 4000663c: 40 00 16 92 call 4000c084 <_POSIX_Threads_Manager_initialization> 40006640: 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( 40006644: 40 00 15 ca call 4000bd6c <_POSIX_Condition_variables_Manager_initialization> 40006648: d0 06 20 08 ld [ %i0 + 8 ], %o0 api_configuration->maximum_condition_variables ); _POSIX_Key_Manager_initialization( api_configuration->maximum_keys ); 4000664c: 40 00 15 d4 call 4000bd9c <_POSIX_Key_Manager_initialization> 40006650: d0 06 20 0c ld [ %i0 + 0xc ], %o0 _POSIX_Mutex_Manager_initialization( 40006654: 40 00 15 f4 call 4000be24 <_POSIX_Mutex_Manager_initialization> 40006658: d0 06 20 04 ld [ %i0 + 4 ], %o0 api_configuration->maximum_mutexes ); _POSIX_Message_queue_Manager_initialization( 4000665c: 40 00 15 dc call 4000bdcc <_POSIX_Message_queue_Manager_initialization> 40006660: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 api_configuration->maximum_message_queues ); _POSIX_Semaphore_Manager_initialization( 40006664: 40 00 17 45 call 4000c378 <_POSIX_Semaphore_Manager_initialization> 40006668: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 api_configuration->maximum_semaphores ); _POSIX_Timer_Manager_initialization( api_configuration->maximum_timers ); 4000666c: 40 00 17 36 call 4000c344 <_POSIX_Timer_Manager_initialization> 40006670: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 _POSIX_Barrier_Manager_initialization( api_configuration->maximum_barriers ); 40006674: 40 00 15 f8 call 4000be54 <_POSIX_Barrier_Manager_initialization> 40006678: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 _POSIX_RWLock_Manager_initialization( api_configuration->maximum_rwlocks ); 4000667c: 40 00 16 02 call 4000be84 <_POSIX_RWLock_Manager_initialization> 40006680: d0 06 20 24 ld [ %i0 + 0x24 ], %o0 _POSIX_Spinlock_Manager_initialization(api_configuration->maximum_spinlocks); 40006684: f0 06 20 28 ld [ %i0 + 0x28 ], %i0 40006688: 40 00 16 69 call 4000c02c <_POSIX_Spinlock_Manager_initialization> 4000668c: 81 e8 00 00 restore 40006690: 01 00 00 00 nop 4000d33c <_POSIX_Barrier_Translate_core_barrier_return_code>: int _POSIX_Barrier_Translate_core_barrier_return_code( CORE_barrier_Status the_barrier_status ) { if ( the_barrier_status <= CORE_BARRIER_TIMEOUT ) 4000d33c: 80 a2 20 03 cmp %o0, 3 4000d340: 08 80 00 05 bleu 4000d354 <_POSIX_Barrier_Translate_core_barrier_return_code+0x18> 4000d344: 85 2a 20 02 sll %o0, 2, %g2 return _POSIX_Barrier_Return_codes[the_barrier_status]; return POSIX_BOTTOM_REACHED(); 4000d348: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000d34c: 7f ff e3 29 call 40005ff0 <== NOT EXECUTED 4000d350: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED } 4000d354: 03 10 00 66 sethi %hi(0x40019800), %g1 4000d358: 82 10 61 f8 or %g1, 0x1f8, %g1 ! 400199f8 <_POSIX_Barrier_Return_codes> 4000d35c: 81 c3 e0 08 retl 4000d360: d0 00 40 02 ld [ %g1 + %g2 ], %o0 4000636c <_POSIX_Condition_variables_Signal_support>: int _POSIX_Condition_variables_Signal_support( pthread_cond_t *cond, boolean is_broadcast ) { 4000636c: 9d e3 bf 90 save %sp, -112, %sp ) { Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 40006370: 80 a6 20 00 cmp %i0, 0 40006374: 02 80 00 0d be 400063a8 <_POSIX_Condition_variables_Signal_support+0x3c> 40006378: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *id == PTHREAD_COND_INITIALIZER ) { 4000637c: c2 06 00 00 ld [ %i0 ], %g1 40006380: 80 a0 7f ff cmp %g1, -1 40006384: 32 80 00 0c bne,a 400063b4 <_POSIX_Condition_variables_Signal_support+0x48> 40006388: d2 06 00 00 ld [ %i0 ], %o1 /* * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); 4000638c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40006390: 7f ff ff ba call 40006278 <== NOT EXECUTED 40006394: 92 10 20 00 clr %o1 <== NOT EXECUTED if ( status ) { 40006398: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000639c: 22 80 00 06 be,a 400063b4 <_POSIX_Condition_variables_Signal_support+0x48> <== NOT EXECUTED 400063a0: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED *location = OBJECTS_ERROR; 400063a4: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 400063a8: a0 10 20 00 clr %l0 400063ac: 10 80 00 07 b 400063c8 <_POSIX_Condition_variables_Signal_support+0x5c> 400063b0: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 400063b4: 11 10 00 62 sethi %hi(0x40018800), %o0 400063b8: 94 07 bf f4 add %fp, -12, %o2 400063bc: 40 00 0e b9 call 40009ea0 <_Objects_Get> 400063c0: 90 12 20 6c or %o0, 0x6c, %o0 400063c4: a0 10 00 08 mov %o0, %l0 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; Thread_Control *the_thread; the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { 400063c8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400063cc: 80 a0 60 00 cmp %g1, 0 400063d0: 02 80 00 06 be 400063e8 <_POSIX_Condition_variables_Signal_support+0x7c> 400063d4: b0 04 20 18 add %l0, 0x18, %i0 400063d8: 80 a0 60 02 cmp %g1, 2 400063dc: 08 80 00 1c bleu 4000644c <_POSIX_Condition_variables_Signal_support+0xe0> 400063e0: 90 10 20 16 mov 0x16, %o0 400063e4: 30 80 00 18 b,a 40006444 <_POSIX_Condition_variables_Signal_support+0xd8> <== NOT EXECUTED case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: do { the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue ); 400063e8: 40 00 14 5d call 4000b55c <_Thread_queue_Dequeue> 400063ec: 90 10 00 18 mov %i0, %o0 if ( !the_thread ) 400063f0: 80 a2 20 00 cmp %o0, 0 400063f4: 22 80 00 02 be,a 400063fc <_POSIX_Condition_variables_Signal_support+0x90> 400063f8: c0 24 20 14 clr [ %l0 + 0x14 ] the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; } while ( is_broadcast && the_thread ); 400063fc: 80 a6 60 00 cmp %i1, 0 40006400: 02 80 00 04 be 40006410 <_POSIX_Condition_variables_Signal_support+0xa4> 40006404: 80 a2 20 00 cmp %o0, 0 40006408: 12 bf ff f8 bne 400063e8 <_POSIX_Condition_variables_Signal_support+0x7c> 4000640c: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006410: 03 10 00 60 sethi %hi(0x40018000), %g1 40006414: c4 00 63 20 ld [ %g1 + 0x320 ], %g2 ! 40018320 <_Thread_Dispatch_disable_level> 40006418: 90 10 20 00 clr %o0 4000641c: 84 00 bf ff add %g2, -1, %g2 40006420: c4 20 63 20 st %g2, [ %g1 + 0x320 ] 40006424: c2 00 63 20 ld [ %g1 + 0x320 ], %g1 40006428: 80 a0 60 00 cmp %g1, 0 4000642c: 12 80 00 08 bne 4000644c <_POSIX_Condition_variables_Signal_support+0xe0> 40006430: 01 00 00 00 nop _Thread_Dispatch(); 40006434: 40 00 13 50 call 4000b174 <_Thread_Dispatch> 40006438: 01 00 00 00 nop 4000643c: 10 80 00 04 b 4000644c <_POSIX_Condition_variables_Signal_support+0xe0> 40006440: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40006444: 40 00 04 47 call 40007560 <== NOT EXECUTED 40006448: 01 00 00 00 nop <== NOT EXECUTED } 4000644c: 81 c7 e0 08 ret 40006450: 91 e8 00 08 restore %g0, %o0, %o0 400064ec <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, boolean already_timedout ) { 400064ec: 9d e3 bf 90 save %sp, -112, %sp Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 400064f0: 80 a6 60 00 cmp %i1, 0 400064f4: 22 80 00 40 be,a 400065f4 <_POSIX_Condition_variables_Wait_support+0x108> 400064f8: b0 10 20 16 mov 0x16, %i0 400064fc: c2 06 40 00 ld [ %i1 ], %g1 40006500: 80 a0 7f ff cmp %g1, -1 40006504: 32 80 00 09 bne,a 40006528 <_POSIX_Condition_variables_Wait_support+0x3c> 40006508: d2 06 40 00 ld [ %i1 ], %o1 4000650c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40006510: 40 00 00 c2 call 40006818 <== NOT EXECUTED 40006514: 92 10 20 00 clr %o1 <== NOT EXECUTED 40006518: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000651c: 32 80 00 36 bne,a 400065f4 <_POSIX_Condition_variables_Wait_support+0x108> <== NOT EXECUTED 40006520: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED return (POSIX_Mutex_Control *) 40006524: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 40006528: 11 10 00 61 sethi %hi(0x40018400), %o0 4000652c: 94 07 bf f4 add %fp, -12, %o2 40006530: 40 00 0e 5c call 40009ea0 <_Objects_Get> 40006534: 90 12 23 84 or %o0, 0x384, %o0 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 40006538: 80 a2 20 00 cmp %o0, 0 4000653c: 22 80 00 2e be,a 400065f4 <_POSIX_Condition_variables_Wait_support+0x108> 40006540: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 40006544: 05 10 00 60 sethi %hi(0x40018000), %g2 40006548: c2 00 a3 20 ld [ %g2 + 0x320 ], %g1 ! 40018320 <_Thread_Dispatch_disable_level> ) { Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 4000654c: 80 a6 20 00 cmp %i0, 0 40006550: 82 00 7f ff add %g1, -1, %g1 40006554: c2 20 a3 20 st %g1, [ %g2 + 0x320 ] 40006558: 02 80 00 0d be 4000658c <_POSIX_Condition_variables_Wait_support+0xa0> 4000655c: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *id == PTHREAD_COND_INITIALIZER ) { 40006560: c2 06 00 00 ld [ %i0 ], %g1 40006564: 80 a0 7f ff cmp %g1, -1 40006568: 32 80 00 0c bne,a 40006598 <_POSIX_Condition_variables_Wait_support+0xac> 4000656c: d2 06 00 00 ld [ %i0 ], %o1 /* * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); 40006570: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40006574: 7f ff ff 41 call 40006278 <== NOT EXECUTED 40006578: 92 10 20 00 clr %o1 <== NOT EXECUTED if ( status ) { 4000657c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40006580: 22 80 00 06 be,a 40006598 <_POSIX_Condition_variables_Wait_support+0xac> <== NOT EXECUTED 40006584: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED *location = OBJECTS_ERROR; 40006588: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 4000658c: a2 10 20 00 clr %l1 40006590: 10 80 00 07 b 400065ac <_POSIX_Condition_variables_Wait_support+0xc0> 40006594: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 40006598: 11 10 00 62 sethi %hi(0x40018800), %o0 4000659c: 94 07 bf f4 add %fp, -12, %o2 400065a0: 40 00 0e 40 call 40009ea0 <_Objects_Get> 400065a4: 90 12 20 6c or %o0, 0x6c, %o0 400065a8: a2 10 00 08 mov %o0, %l1 } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { 400065ac: c2 07 bf f4 ld [ %fp + -12 ], %g1 400065b0: 80 a0 60 00 cmp %g1, 0 400065b4: 22 80 00 07 be,a 400065d0 <_POSIX_Condition_variables_Wait_support+0xe4> 400065b8: c4 04 60 14 ld [ %l1 + 0x14 ], %g2 400065bc: 80 a0 60 02 cmp %g1, 2 400065c0: 18 80 00 36 bgu 40006698 <_POSIX_Condition_variables_Wait_support+0x1ac> 400065c4: 01 00 00 00 nop if ( mutex_status ) return EINVAL; return status; } return POSIX_BOTTOM_REACHED(); 400065c8: 81 c7 e0 08 ret 400065cc: 91 e8 20 16 restore %g0, 0x16, %o0 #endif case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 400065d0: 80 a0 a0 00 cmp %g2, 0 400065d4: 02 80 00 0a be 400065fc <_POSIX_Condition_variables_Wait_support+0x110> 400065d8: 01 00 00 00 nop 400065dc: c2 06 40 00 ld [ %i1 ], %g1 400065e0: 80 a0 80 01 cmp %g2, %g1 400065e4: 02 80 00 06 be 400065fc <_POSIX_Condition_variables_Wait_support+0x110> 400065e8: 01 00 00 00 nop _Thread_Enable_dispatch(); 400065ec: 7f ff ff b3 call 400064b8 <_Thread_Enable_dispatch> <== NOT EXECUTED 400065f0: b0 10 20 16 mov 0x16, %i0 ! 16 <== NOT EXECUTED 400065f4: 81 c7 e0 08 ret 400065f8: 81 e8 00 00 restore return EINVAL; } (void) pthread_mutex_unlock( mutex ); 400065fc: 40 00 01 95 call 40006c50 40006600: 90 10 00 19 mov %i1, %o0 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 40006604: 80 a6 e0 00 cmp %i3, 0 40006608: 12 80 00 1b bne 40006674 <_POSIX_Condition_variables_Wait_support+0x188> 4000660c: 21 10 00 60 sethi %hi(0x40018000), %l0 the_cond->Mutex = *mutex; 40006610: c2 06 40 00 ld [ %i1 ], %g1 40006614: c2 24 60 14 st %g1, [ %l1 + 0x14 ] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 40006618: c2 04 23 fc ld [ %l0 + 0x3fc ], %g1 _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 4000661c: 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; 40006620: 84 04 60 18 add %l1, 0x18, %g2 _Thread_Executing->Wait.id = *cond; 40006624: 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; 40006628: c4 20 60 44 st %g2, [ %g1 + 0x44 ] _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 4000662c: 92 10 00 1a mov %i2, %o1 40006630: 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; 40006634: 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 ); 40006638: 15 10 00 2f sethi %hi(0x4000bc00), %o2 RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; 4000663c: 82 10 20 01 mov 1, %g1 40006640: 94 12 a0 34 or %o2, 0x34, %o2 40006644: 40 00 14 34 call 4000b714 <_Thread_queue_Enqueue_with_handler> 40006648: c2 24 60 48 st %g1, [ %l1 + 0x48 ] _Thread_Enable_dispatch(); 4000664c: 7f ff ff 9b call 400064b8 <_Thread_Enable_dispatch> 40006650: 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; 40006654: c2 04 23 fc ld [ %l0 + 0x3fc ], %g1 40006658: f0 00 60 34 ld [ %g1 + 0x34 ], %i0 if ( status && status != ETIMEDOUT ) 4000665c: 80 a6 20 00 cmp %i0, 0 40006660: 02 80 00 07 be 4000667c <_POSIX_Condition_variables_Wait_support+0x190> 40006664: 80 a6 20 74 cmp %i0, 0x74 40006668: 12 80 00 0f bne 400066a4 <_POSIX_Condition_variables_Wait_support+0x1b8> 4000666c: 01 00 00 00 nop 40006670: 30 80 00 03 b,a 4000667c <_POSIX_Condition_variables_Wait_support+0x190> return status; } else { _Thread_Enable_dispatch(); 40006674: 7f ff ff 91 call 400064b8 <_Thread_Enable_dispatch> 40006678: b0 10 20 74 mov 0x74, %i0 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 4000667c: 40 00 00 c7 call 40006998 40006680: 90 10 00 19 mov %i1, %o0 if ( mutex_status ) 40006684: 80 a2 20 00 cmp %o0, 0 40006688: 02 80 00 07 be 400066a4 <_POSIX_Condition_variables_Wait_support+0x1b8> 4000668c: 01 00 00 00 nop return EINVAL; return status; } return POSIX_BOTTOM_REACHED(); 40006690: 81 c7 e0 08 ret 40006694: 91 e8 20 16 restore %g0, 0x16, %o0 40006698: 40 00 03 b2 call 40007560 <== NOT EXECUTED 4000669c: 01 00 00 00 nop <== NOT EXECUTED 400066a0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } 400066a4: 81 c7 e0 08 ret 400066a8: 81 e8 00 00 restore 4000d7d4 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 4000d7d4: 9d e3 bf 98 save %sp, -104, %sp uint32_t iterations; boolean are_all_null; POSIX_Keys_Control *the_key; void *value; thread_index = _Objects_Get_index( thread->Object.id ); 4000d7d8: 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 ]; 4000d7dc: 05 00 00 3f sethi %hi(0xfc00), %g2 4000d7e0: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 4000d7e4: 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); 4000d7e8: 83 30 60 16 srl %g1, 0x16, %g1 4000d7ec: a7 28 a0 02 sll %g2, 2, %l3 4000d7f0: a8 08 60 1c and %g1, 0x1c, %l4 4000d7f4: a4 10 20 00 clr %l2 for ( ; ; ) { are_all_null = TRUE; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 4000d7f8: 03 10 00 68 sethi %hi(0x4001a000), %g1 4000d7fc: aa 10 63 20 or %g1, 0x320, %l5 ! 4001a320 <_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 ]; 4000d800: a0 10 20 01 mov 1, %l0 4000d804: 10 80 00 1b b 4000d870 <_POSIX_Keys_Run_destructors+0x9c> 4000d808: 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 *) 4000d80c: c2 05 60 20 ld [ %l5 + 0x20 ], %g1 4000d810: c4 00 40 02 ld [ %g1 + %g2 ], %g2 _POSIX_Keys_Information.local_table[ index ]; if ( the_key && the_key->is_active && the_key->destructor ) { 4000d814: 80 a0 a0 00 cmp %g2, 0 4000d818: 02 80 00 16 be 4000d870 <_POSIX_Keys_Run_destructors+0x9c> 4000d81c: a0 04 20 01 inc %l0 4000d820: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4000d824: 80 a0 60 00 cmp %g1, 0 4000d828: 02 80 00 12 be 4000d870 <_POSIX_Keys_Run_destructors+0x9c> 4000d82c: b0 05 00 02 add %l4, %g2, %i0 4000d830: c4 00 a0 14 ld [ %g2 + 0x14 ], %g2 4000d834: 80 a0 a0 00 cmp %g2, 0 4000d838: 22 80 00 0f be,a 4000d874 <_POSIX_Keys_Run_destructors+0xa0> 4000d83c: c2 15 60 10 lduh [ %l5 + 0x10 ], %g1 <== NOT EXECUTED value = the_key->Values[ thread_api ][ thread_index ]; 4000d840: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 4000d844: c2 00 40 13 ld [ %g1 + %l3 ], %g1 if ( value ) { 4000d848: 90 90 60 00 orcc %g1, 0, %o0 4000d84c: 22 80 00 0a be,a 4000d874 <_POSIX_Keys_Run_destructors+0xa0> 4000d850: c2 15 60 10 lduh [ %l5 + 0x10 ], %g1 <== NOT EXECUTED (*the_key->destructor)( value ); 4000d854: 9f c0 80 00 call %g2 4000d858: 01 00 00 00 nop if ( the_key->Values[ thread_api ][ thread_index ] ) 4000d85c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 4000d860: c2 00 40 13 ld [ %g1 + %l3 ], %g1 4000d864: 80 a0 00 01 cmp %g0, %g1 4000d868: 82 40 3f ff addx %g0, -1, %g1 4000d86c: a2 0c 40 01 and %l1, %g1, %l1 for ( ; ; ) { are_all_null = TRUE; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 4000d870: c2 15 60 10 lduh [ %l5 + 0x10 ], %g1 4000d874: 80 a4 00 01 cmp %l0, %g1 4000d878: 08 bf ff e5 bleu 4000d80c <_POSIX_Keys_Run_destructors+0x38> 4000d87c: 85 2c 20 02 sll %l0, 2, %g2 are_all_null = FALSE; } } } if ( are_all_null == TRUE ) 4000d880: 80 a4 60 01 cmp %l1, 1 4000d884: 02 80 00 05 be 4000d898 <_POSIX_Keys_Run_destructors+0xc4> 4000d888: 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 ) 4000d88c: 80 a4 a0 04 cmp %l2, 4 4000d890: 12 bf ff dd bne 4000d804 <_POSIX_Keys_Run_destructors+0x30> 4000d894: a0 10 20 01 mov 1, %l0 4000d898: 81 c7 e0 08 ret 4000d89c: 81 e8 00 00 restore 40012948 <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 40012948: 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 ); 4001294c: 92 10 20 ff mov 0xff, %o1 40012950: 40 00 11 a9 call 40016ff4 40012954: 90 10 00 18 mov %i0, %o0 const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 40012958: 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 ); 4001295c: a0 10 00 08 mov %o0, %l0 const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 40012960: 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 ) 40012964: 80 a2 20 ff cmp %o0, 0xff 40012968: 18 80 00 62 bgu 40012af0 <_POSIX_Message_queue_Create_support+0x1a8> 4001296c: b0 10 20 5b mov 0x5b, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40012970: 05 10 00 93 sethi %hi(0x40024c00), %g2 40012974: c2 00 a0 80 ld [ %g2 + 0x80 ], %g1 ! 40024c80 <_Thread_Dispatch_disable_level> 40012978: 82 00 60 01 inc %g1 4001297c: c2 20 a0 80 st %g1, [ %g2 + 0x80 ] * 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 ) { 40012980: a4 10 20 10 mov 0x10, %l2 40012984: 80 a6 a0 00 cmp %i2, 0 40012988: 02 80 00 14 be 400129d8 <_POSIX_Message_queue_Create_support+0x90> 4001298c: a2 10 20 0a mov 0xa, %l1 attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 40012990: c2 06 a0 04 ld [ %i2 + 4 ], %g1 40012994: 80 a0 60 00 cmp %g1, 0 40012998: 04 80 00 06 ble 400129b0 <_POSIX_Message_queue_Create_support+0x68> 4001299c: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 400129a0: c2 06 a0 08 ld [ %i2 + 8 ], %g1 400129a4: 80 a0 60 00 cmp %g1, 0 400129a8: 34 80 00 08 bg,a 400129c8 <_POSIX_Message_queue_Create_support+0x80> 400129ac: 90 07 bf e8 add %fp, -24, %o0 _Thread_Enable_dispatch(); 400129b0: 7f ff ff d9 call 40012914 <_Thread_Enable_dispatch> 400129b4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); 400129b8: 40 00 0a 46 call 400152d0 <__errno> 400129bc: 01 00 00 00 nop 400129c0: 10 80 00 3a b 40012aa8 <_POSIX_Message_queue_Create_support+0x160> 400129c4: 82 10 20 16 mov 0x16, %g1 ! 16 } attr = *attr_ptr; 400129c8: 40 00 0c 28 call 40015a68 400129cc: 94 10 20 10 mov 0x10, %o2 400129d0: e4 07 bf f0 ld [ %fp + -16 ], %l2 400129d4: 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 *) 400129d8: 27 10 00 94 sethi %hi(0x40025000), %l3 400129dc: 7f ff ec c2 call 4000dce4 <_Objects_Allocate> 400129e0: 90 14 e0 98 or %l3, 0x98, %o0 ! 40025098 <_POSIX_Message_queue_Information> rtems_set_errno_and_return_minus_one( ENFILE ); } #endif the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 400129e4: b4 92 20 00 orcc %o0, 0, %i2 400129e8: 32 80 00 08 bne,a 40012a08 <_POSIX_Message_queue_Create_support+0xc0> 400129ec: 82 10 20 01 mov 1, %g1 _Thread_Enable_dispatch(); 400129f0: 7f ff ff c9 call 40012914 <_Thread_Enable_dispatch> <== NOT EXECUTED 400129f4: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENFILE ); 400129f8: 40 00 0a 36 call 400152d0 <__errno> <== NOT EXECUTED 400129fc: 01 00 00 00 nop <== NOT EXECUTED 40012a00: 10 80 00 2a b 40012aa8 <_POSIX_Message_queue_Create_support+0x160> <== NOT EXECUTED 40012a04: 82 10 20 17 mov 0x17, %g1 ! 17 <== NOT EXECUTED } the_mq->process_shared = pshared; 40012a08: f2 26 a0 10 st %i1, [ %i2 + 0x10 ] 40012a0c: 92 10 00 10 mov %l0, %o1 the_mq->named = TRUE; the_mq->open_count = 1; the_mq->linked = TRUE; 40012a10: c2 26 a0 18 st %g1, [ %i2 + 0x18 ] _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; the_mq->named = TRUE; 40012a14: c2 26 a0 14 st %g1, [ %i2 + 0x14 ] the_mq->open_count = 1; 40012a18: c2 26 a0 1c st %g1, [ %i2 + 0x1c ] 40012a1c: 21 10 00 93 sethi %hi(0x40024c00), %l0 40012a20: 7f ff eb 59 call 4000d784 <_Heap_Allocate> 40012a24: 90 14 20 cc or %l0, 0xcc, %o0 ! 40024ccc <_Workspace_Area> * Make a copy of the user's string for name just in case it was * dynamically constructed. */ name = _Workspace_Allocate(n); if (!name) { 40012a28: b2 92 20 00 orcc %o0, 0, %i1 40012a2c: 12 80 00 0a bne 40012a54 <_POSIX_Message_queue_Create_support+0x10c> 40012a30: 01 00 00 00 nop _POSIX_Message_queue_Free( the_mq ); 40012a34: 7f ff ff b1 call 400128f8 <_POSIX_Message_queue_Free> <== NOT EXECUTED 40012a38: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED _Thread_Enable_dispatch(); 40012a3c: 7f ff ff b6 call 40012914 <_Thread_Enable_dispatch> <== NOT EXECUTED 40012a40: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 40012a44: 40 00 0a 23 call 400152d0 <__errno> <== NOT EXECUTED 40012a48: 01 00 00 00 nop <== NOT EXECUTED 40012a4c: 10 80 00 17 b 40012aa8 <_POSIX_Message_queue_Create_support+0x160> <== NOT EXECUTED 40012a50: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED } strcpy( name, name_arg ); 40012a54: 40 00 0f 03 call 40016660 40012a58: 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( 40012a5c: 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; 40012a60: c0 26 a0 60 clr [ %i2 + 0x60 ] if ( ! _CORE_message_queue_Initialize( 40012a64: 96 10 00 12 mov %l2, %o3 40012a68: 90 06 a0 20 add %i2, 0x20, %o0 40012a6c: 40 00 03 56 call 400137c4 <_CORE_message_queue_Initialize> 40012a70: 92 06 a0 60 add %i2, 0x60, %o1 40012a74: 80 a2 20 00 cmp %o0, 0 40012a78: 12 80 00 0f bne 40012ab4 <_POSIX_Message_queue_Create_support+0x16c> 40012a7c: 90 14 e0 98 or %l3, 0x98, %o0 #if 0 && defined(RTEMS_MULTIPROCESSING) if ( pshared == PTHREAD_PROCESS_SHARED ) _Objects_MP_Close( &_POSIX_Message_queue_Information, the_mq->Object.id ); #endif _POSIX_Message_queue_Free( the_mq ); 40012a80: 7f ff ff 9e call 400128f8 <_POSIX_Message_queue_Free> <== NOT EXECUTED 40012a84: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 40012a88: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40012a8c: 7f ff eb 65 call 4000d820 <_Heap_Free> <== NOT EXECUTED 40012a90: 90 14 20 cc or %l0, 0xcc, %o0 <== NOT EXECUTED _Workspace_Free(name); _Thread_Enable_dispatch(); 40012a94: 7f ff ff a0 call 40012914 <_Thread_Enable_dispatch> <== NOT EXECUTED 40012a98: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); 40012a9c: 40 00 0a 0d call 400152d0 <__errno> <== NOT EXECUTED 40012aa0: 01 00 00 00 nop <== NOT EXECUTED 40012aa4: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 40012aa8: c2 22 00 00 st %g1, [ %o0 ] 40012aac: 81 c7 e0 08 ret 40012ab0: 91 e8 3f ff restore %g0, -1, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 40012ab4: c2 06 a0 08 ld [ %i2 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40012ab8: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 40012abc: 05 00 00 3f sethi %hi(0xfc00), %g2 40012ac0: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40012ac4: 82 08 40 02 and %g1, %g2, %g1 40012ac8: 80 a0 40 03 cmp %g1, %g3 40012acc: 38 80 00 06 bgu,a 40012ae4 <_POSIX_Message_queue_Create_support+0x19c> 40012ad0: f4 26 c0 00 st %i2, [ %i3 ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40012ad4: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40012ad8: 83 28 60 02 sll %g1, 2, %g1 40012adc: f4 20 80 01 st %i2, [ %g2 + %g1 ] &_POSIX_Message_queue_Information, &the_mq->Object, (char *) name ); *message_queue = the_mq; 40012ae0: f4 26 c0 00 st %i2, [ %i3 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 40012ae4: f2 26 a0 0c st %i1, [ %i2 + 0xc ] (char *) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 40012ae8: 7f ff ff 8b call 40012914 <_Thread_Enable_dispatch> 40012aec: b0 10 20 00 clr %i0 return 0; } 40012af0: 81 c7 e0 08 ret 40012af4: 81 e8 00 00 restore 40009930 <_POSIX_Message_queue_Delete>: */ void _POSIX_Message_queue_Delete( POSIX_Message_queue_Control *the_mq ) { 40009930: 9d e3 bf 98 save %sp, -104, %sp if ( !the_mq->linked && !the_mq->open_count ) { 40009934: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 40009938: 80 a0 60 00 cmp %g1, 0 4000993c: 12 80 00 1f bne 400099b8 <_POSIX_Message_queue_Delete+0x88> 40009940: b2 10 00 18 mov %i0, %i1 40009944: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 40009948: 80 a0 60 00 cmp %g1, 0 4000994c: 12 80 00 1b bne 400099b8 <_POSIX_Message_queue_Delete+0x88> 40009950: 01 00 00 00 nop /* the name memory may have been freed by unlink. */ if ( the_mq->Object.name ) 40009954: d2 06 20 0c ld [ %i0 + 0xc ], %o1 40009958: 80 a2 60 00 cmp %o1, 0 4000995c: 02 80 00 04 be 4000996c <_POSIX_Message_queue_Delete+0x3c> 40009960: 11 10 00 93 sethi %hi(0x40024c00), %o0 RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 40009964: 40 00 0f af call 4000d820 <_Heap_Free> <== NOT EXECUTED 40009968: 90 12 20 cc or %o0, 0xcc, %o0 ! 40024ccc <_Workspace_Area> <== NOT EXECUTED Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000996c: 03 10 00 94 sethi %hi(0x40025000), %g1 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40009970: c6 06 60 08 ld [ %i1 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40009974: b0 10 60 98 or %g1, 0x98, %i0 40009978: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 4000997c: 03 00 00 3f sethi %hi(0xfc00), %g1 40009980: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40009984: 82 08 c0 01 and %g3, %g1, %g1 40009988: 80 a0 40 02 cmp %g1, %g2 4000998c: 18 80 00 05 bgu 400099a0 <_POSIX_Message_queue_Delete+0x70> 40009990: 90 06 60 20 add %i1, 0x20, %o0 information->local_table[ index ] = the_object; 40009994: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 40009998: 83 28 60 02 sll %g1, 2, %g1 4000999c: c0 20 80 01 clr [ %g2 + %g1 ] _Workspace_Free( the_mq->Object.name ); _Objects_Close( &_POSIX_Message_queue_Information, &the_mq->Object ); _CORE_message_queue_Close( 400099a0: 92 10 20 00 clr %o1 400099a4: 94 10 20 05 mov 5, %o2 400099a8: 40 00 0d 7b call 4000cf94 <_CORE_message_queue_Close> 400099ac: c0 26 60 0c clr [ %i1 + 0xc ] RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 400099b0: 40 00 11 cf call 4000e0ec <_Objects_Free> 400099b4: 81 e8 00 00 restore 400099b8: 81 c7 e0 08 ret 400099bc: 81 e8 00 00 restore 400128f8 <_POSIX_Message_queue_Free>: */ RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { 400128f8: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 400128fc: 11 10 00 94 sethi %hi(0x40025000), %o0 <== NOT EXECUTED 40012900: 90 12 20 98 or %o0, 0x98, %o0 ! 40025098 <_POSIX_Message_queue_Information> <== NOT EXECUTED 40012904: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40012908: 7f ff ed f9 call 4000e0ec <_Objects_Free> <== NOT EXECUTED 4001290c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40012910: 01 00 00 00 nop 40009e60 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, boolean wait, Watchdog_Interval timeout ) { 40009e60: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) 40009e64: 11 10 00 94 sethi %hi(0x40025000), %o0 40009e68: 94 07 bf f4 add %fp, -12, %o2 40009e6c: 90 12 22 50 or %o0, 0x250, %o0 40009e70: 40 00 10 e1 call 4000e1f4 <_Objects_Get> 40009e74: 92 10 00 18 mov %i0, %o1 Objects_Locations location; size_t length_out; boolean do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 40009e78: c2 07 bf f4 ld [ %fp + -12 ], %g1 size_t msg_len, unsigned int *msg_prio, boolean wait, Watchdog_Interval timeout ) { 40009e7c: 94 10 00 19 mov %i1, %o2 Objects_Locations location; size_t length_out; boolean do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 40009e80: 80 a0 60 01 cmp %g1, 1 40009e84: 02 80 00 09 be 40009ea8 <_POSIX_Message_queue_Receive_support+0x48> 40009e88: 9a 10 00 1d mov %i5, %o5 40009e8c: 80 a0 60 01 cmp %g1, 1 40009e90: 2a 80 00 0c bcs,a 40009ec0 <_POSIX_Message_queue_Receive_support+0x60> 40009e94: c4 02 20 14 ld [ %o0 + 0x14 ], %g2 40009e98: 80 a0 60 02 cmp %g1, 2 40009e9c: 12 80 00 3f bne 40009f98 <_POSIX_Message_queue_Receive_support+0x138> 40009ea0: 01 00 00 00 nop 40009ea4: 30 80 00 0d b,a 40009ed8 <_POSIX_Message_queue_Receive_support+0x78> case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); case OBJECTS_REMOTE: _Thread_Dispatch(); 40009ea8: 40 00 15 88 call 4000f4c8 <_Thread_Dispatch> <== NOT EXECUTED 40009eac: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 40009eb0: 40 00 05 c9 call 4000b5d4 <== NOT EXECUTED 40009eb4: 01 00 00 00 nop <== NOT EXECUTED _Thread_Executing->Wait.return_code ) ); } return POSIX_BOTTOM_REACHED(); } 40009eb8: 81 c7 e0 08 ret <== NOT EXECUTED 40009ebc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: _Thread_Dispatch(); return POSIX_MP_NOT_IMPLEMENTED(); rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 40009ec0: 82 08 a0 03 and %g2, 3, %g1 40009ec4: 80 a0 60 01 cmp %g1, 1 40009ec8: 32 80 00 0a bne,a 40009ef0 <_POSIX_Message_queue_Receive_support+0x90> 40009ecc: d0 02 20 10 ld [ %o0 + 0x10 ], %o0 _Thread_Enable_dispatch(); 40009ed0: 7f ff ff d7 call 40009e2c <_Thread_Enable_dispatch> 40009ed4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); 40009ed8: 40 00 2c fe call 400152d0 <__errno> 40009edc: 01 00 00 00 nop 40009ee0: 82 10 20 09 mov 9, %g1 ! 9 40009ee4: c2 22 00 00 st %g1, [ %o0 ] 40009ee8: 10 80 00 2e b 40009fa0 <_POSIX_Message_queue_Receive_support+0x140> 40009eec: 90 10 3f ff mov -1, %o0 } the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 40009ef0: c2 02 20 6c ld [ %o0 + 0x6c ], %g1 40009ef4: 80 a6 80 01 cmp %i2, %g1 40009ef8: 1a 80 00 08 bcc 40009f18 <_POSIX_Message_queue_Receive_support+0xb8> 40009efc: 80 a7 20 00 cmp %i4, 0 _Thread_Enable_dispatch(); 40009f00: 7f ff ff cb call 40009e2c <_Thread_Enable_dispatch> 40009f04: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EMSGSIZE ); 40009f08: 40 00 2c f2 call 400152d0 <__errno> 40009f0c: 01 00 00 00 nop 40009f10: 10 bf ff f5 b 40009ee4 <_POSIX_Message_queue_Receive_support+0x84> 40009f14: 82 10 20 7a mov 0x7a, %g1 ! 7a length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 40009f18: 02 80 00 05 be 40009f2c <_POSIX_Message_queue_Receive_support+0xcc> 40009f1c: 98 10 20 00 clr %o4 do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? FALSE : TRUE; 40009f20: 83 30 a0 0e srl %g2, 0xe, %g1 40009f24: 82 18 60 01 xor %g1, 1, %g1 40009f28: 98 08 60 01 and %g1, 1, %o4 /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 40009f2c: 82 10 3f ff mov -1, %g1 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 40009f30: 90 02 20 20 add %o0, 0x20, %o0 40009f34: 92 10 00 18 mov %i0, %o1 40009f38: 96 07 bf f0 add %fp, -16, %o3 40009f3c: 40 00 0c 43 call 4000d048 <_CORE_message_queue_Seize> 40009f40: c2 27 bf f0 st %g1, [ %fp + -16 ] &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 40009f44: 7f ff ff ba call 40009e2c <_Thread_Enable_dispatch> 40009f48: 3b 10 00 93 sethi %hi(0x40024c00), %i5 *msg_prio = 40009f4c: c4 07 61 5c ld [ %i5 + 0x15c ], %g2 ! 40024d5c <_Thread_Executing> 40009f50: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1 _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 40009f54: c6 00 a0 34 ld [ %g2 + 0x34 ], %g3 do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 40009f58: 85 38 60 1f sra %g1, 0x1f, %g2 40009f5c: 82 18 80 01 xor %g2, %g1, %g1 40009f60: 82 20 40 02 sub %g1, %g2, %g1 _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 40009f64: 80 a0 e0 00 cmp %g3, 0 40009f68: 12 80 00 04 bne 40009f78 <_POSIX_Message_queue_Receive_support+0x118> 40009f6c: c2 26 c0 00 st %g1, [ %i3 ] return length_out; 40009f70: 10 80 00 0c b 40009fa0 <_POSIX_Message_queue_Receive_support+0x140> 40009f74: d0 07 bf f0 ld [ %fp + -16 ], %o0 rtems_set_errno_and_return_minus_one( 40009f78: 40 00 2c d6 call 400152d0 <__errno> 40009f7c: 01 00 00 00 nop 40009f80: c2 07 61 5c ld [ %i5 + 0x15c ], %g1 40009f84: a0 10 00 08 mov %o0, %l0 40009f88: 40 00 00 d2 call 4000a2d0 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 40009f8c: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 40009f90: 10 bf ff d6 b 40009ee8 <_POSIX_Message_queue_Receive_support+0x88> 40009f94: d0 24 00 00 st %o0, [ %l0 ] _POSIX_Message_queue_Translate_core_message_queue_return_code( _Thread_Executing->Wait.return_code ) ); } return POSIX_BOTTOM_REACHED(); 40009f98: 40 00 05 85 call 4000b5ac <== NOT EXECUTED 40009f9c: 01 00 00 00 nop <== NOT EXECUTED } 40009fa0: b0 10 00 08 mov %o0, %i0 40009fa4: 81 c7 e0 08 ret 40009fa8: 81 e8 00 00 restore 40009ff8 <_POSIX_Message_queue_Send_support>: size_t msg_len, uint32_t msg_prio, boolean wait, Watchdog_Interval timeout ) { 40009ff8: 9d e3 bf 88 save %sp, -120, %sp /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) 40009ffc: 80 a6 e0 20 cmp %i3, 0x20 4000a000: 28 80 00 06 bleu,a 4000a018 <_POSIX_Message_queue_Send_support+0x20> 4000a004: 11 10 00 94 sethi %hi(0x40025000), %o0 rtems_set_errno_and_return_minus_one( EINVAL ); 4000a008: 40 00 2c b2 call 400152d0 <__errno> 4000a00c: 01 00 00 00 nop 4000a010: 10 80 00 12 b 4000a058 <_POSIX_Message_queue_Send_support+0x60> 4000a014: 82 10 20 16 mov 0x16, %g1 ! 16 4000a018: 92 10 00 18 mov %i0, %o1 4000a01c: 90 12 22 50 or %o0, 0x250, %o0 4000a020: 40 00 10 75 call 4000e1f4 <_Objects_Get> 4000a024: 94 07 bf f4 add %fp, -12, %o2 the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4000a028: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000a02c: 80 a0 60 01 cmp %g1, 1 4000a030: 02 80 00 0d be 4000a064 <_POSIX_Message_queue_Send_support+0x6c> 4000a034: 01 00 00 00 nop 4000a038: 2a 80 00 11 bcs,a 4000a07c <_POSIX_Message_queue_Send_support+0x84> 4000a03c: c4 02 20 14 ld [ %o0 + 0x14 ], %g2 4000a040: 80 a0 60 02 cmp %g1, 2 4000a044: 12 80 00 35 bne 4000a118 <_POSIX_Message_queue_Send_support+0x120> 4000a048: 01 00 00 00 nop case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); 4000a04c: 40 00 2c a1 call 400152d0 <__errno> 4000a050: 01 00 00 00 nop 4000a054: 82 10 20 09 mov 9, %g1 ! 9 4000a058: c2 22 00 00 st %g1, [ %o0 ] 4000a05c: 10 80 00 31 b 4000a120 <_POSIX_Message_queue_Send_support+0x128> 4000a060: 90 10 3f ff mov -1, %o0 case OBJECTS_REMOTE: _Thread_Dispatch(); 4000a064: 40 00 15 19 call 4000f4c8 <_Thread_Dispatch> <== NOT EXECUTED 4000a068: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 4000a06c: 40 00 05 5a call 4000b5d4 <== NOT EXECUTED 4000a070: 01 00 00 00 nop <== NOT EXECUTED msg_status ) ); } return POSIX_BOTTOM_REACHED(); } 4000a074: 81 c7 e0 08 ret <== NOT EXECUTED 4000a078: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED _Thread_Dispatch(); return POSIX_MP_NOT_IMPLEMENTED(); rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { 4000a07c: 80 88 a0 03 btst 3, %g2 4000a080: 12 80 00 05 bne 4000a094 <_POSIX_Message_queue_Send_support+0x9c> 4000a084: 80 a7 20 00 cmp %i4, 0 _Thread_Enable_dispatch(); 4000a088: 7f ff ff cf call 40009fc4 <_Thread_Enable_dispatch> 4000a08c: 01 00 00 00 nop 4000a090: 30 bf ff ef b,a 4000a04c <_POSIX_Message_queue_Send_support+0x54> rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 4000a094: d0 02 20 10 ld [ %o0 + 0x10 ], %o0 /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4000a098: 02 80 00 05 be 4000a0ac <_POSIX_Message_queue_Send_support+0xb4> 4000a09c: 82 10 20 00 clr %g1 do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? FALSE : TRUE; 4000a0a0: 83 30 a0 0e srl %g2, 0xe, %g1 4000a0a4: 82 18 60 01 xor %g1, 1, %g1 4000a0a8: 82 08 60 01 and %g1, 1, %g1 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4000a0ac: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 4000a0b0: fa 23 a0 60 st %i5, [ %sp + 0x60 ] 4000a0b4: 92 10 00 19 mov %i1, %o1 4000a0b8: 94 10 00 1a mov %i2, %o2 4000a0bc: 96 10 00 18 mov %i0, %o3 4000a0c0: 9a 20 00 1b neg %i3, %o5 4000a0c4: 98 10 20 00 clr %o4 4000a0c8: 40 00 0c 2d call 4000d17c <_CORE_message_queue_Submit> 4000a0cc: 90 02 20 20 add %o0, 0x20, %o0 _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 4000a0d0: 7f ff ff bd call 40009fc4 <_Thread_Enable_dispatch> 4000a0d4: ba 10 00 08 mov %o0, %i5 * after it wakes up. The returned status is correct for * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) 4000a0d8: 80 a7 60 07 cmp %i5, 7 4000a0dc: 12 80 00 06 bne 4000a0f4 <_POSIX_Message_queue_Send_support+0xfc> 4000a0e0: 80 a7 60 00 cmp %i5, 0 msg_status = _Thread_Executing->Wait.return_code; 4000a0e4: 03 10 00 93 sethi %hi(0x40024c00), %g1 4000a0e8: c2 00 61 5c ld [ %g1 + 0x15c ], %g1 ! 40024d5c <_Thread_Executing> 4000a0ec: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 if ( !msg_status ) 4000a0f0: 80 a7 60 00 cmp %i5, 0 4000a0f4: 02 80 00 0b be 4000a120 <_POSIX_Message_queue_Send_support+0x128> 4000a0f8: 90 10 20 00 clr %o0 return msg_status; rtems_set_errno_and_return_minus_one( 4000a0fc: 40 00 2c 75 call 400152d0 <__errno> 4000a100: 01 00 00 00 nop 4000a104: a0 10 00 08 mov %o0, %l0 4000a108: 40 00 00 72 call 4000a2d0 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4000a10c: 90 10 00 1d mov %i5, %o0 4000a110: 10 bf ff d3 b 4000a05c <_POSIX_Message_queue_Send_support+0x64> 4000a114: d0 24 00 00 st %o0, [ %l0 ] _POSIX_Message_queue_Translate_core_message_queue_return_code( msg_status ) ); } return POSIX_BOTTOM_REACHED(); 4000a118: 40 00 05 25 call 4000b5ac <== NOT EXECUTED 4000a11c: 01 00 00 00 nop <== NOT EXECUTED } 4000a120: b0 10 00 08 mov %o0, %i0 4000a124: 81 c7 e0 08 ret 4000a128: 81 e8 00 00 restore 4000a2d0 <_POSIX_Message_queue_Translate_core_message_queue_return_code>: */ int _POSIX_Message_queue_Translate_core_message_queue_return_code( uint32_t the_message_queue_status ) { 4000a2d0: 9d e3 bf 98 save %sp, -104, %sp switch ( the_message_queue_status ) { 4000a2d4: 80 a6 20 03 cmp %i0, 3 4000a2d8: 02 80 00 1c be 4000a348 <_POSIX_Message_queue_Translate_core_message_queue_return_code+0x78> 4000a2dc: 94 10 00 18 mov %i0, %o2 4000a2e0: 80 a6 20 03 cmp %i0, 3 4000a2e4: 18 80 00 0a bgu 4000a30c <_POSIX_Message_queue_Translate_core_message_queue_return_code+0x3c> 4000a2e8: 80 a6 20 05 cmp %i0, 5 4000a2ec: 80 a6 20 01 cmp %i0, 1 4000a2f0: 02 80 00 1e be 4000a368 <_POSIX_Message_queue_Translate_core_message_queue_return_code+0x98> 4000a2f4: b0 10 20 7a mov 0x7a, %i0 4000a2f8: 80 a2 a0 01 cmp %o2, 1 4000a2fc: 38 80 00 1b bgu,a 4000a368 <_POSIX_Message_queue_Translate_core_message_queue_return_code+0x98> 4000a300: b0 10 20 0b mov 0xb, %i0 4000a304: 81 c7 e0 08 ret <== NOT EXECUTED 4000a308: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000a30c: 02 80 00 11 be 4000a350 <_POSIX_Message_queue_Translate_core_message_queue_return_code+0x80> 4000a310: 80 a6 20 05 cmp %i0, 5 4000a314: 2a 80 00 15 bcs,a 4000a368 <_POSIX_Message_queue_Translate_core_message_queue_return_code+0x98> 4000a318: b0 10 20 0b mov 0xb, %i0 4000a31c: 80 a6 20 06 cmp %i0, 6 4000a320: 02 80 00 08 be 4000a340 <_POSIX_Message_queue_Translate_core_message_queue_return_code+0x70> 4000a324: 03 00 44 44 sethi %hi(0x1111000), %g1 4000a328: 82 10 61 11 or %g1, 0x111, %g1 ! 1111111 <== NOT EXECUTED 4000a32c: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 4000a330: 12 80 00 0a bne 4000a358 <_POSIX_Message_queue_Translate_core_message_queue_return_code+0x88> <== NOT EXECUTED 4000a334: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED 4000a338: 81 c7 e0 08 ret <== NOT EXECUTED 4000a33c: 91 e8 20 58 restore %g0, 0x58, %o0 <== NOT EXECUTED 4000a340: 81 c7 e0 08 ret 4000a344: 91 e8 20 74 restore %g0, 0x74, %o0 /* * Bad message size */ case CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE: return EMSGSIZE; 4000a348: 81 c7 e0 08 ret <== NOT EXECUTED 4000a34c: 91 e8 20 0c restore %g0, 0xc, %o0 <== NOT EXECUTED /* * Out of message buffers to queue pending message */ case CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED: return ENOMEM; 4000a350: 81 c7 e0 08 ret 4000a354: 91 e8 20 09 restore %g0, 9, %o0 * RTEMS POSIX API implementation does not support multiprocessing. */ case THREAD_STATUS_PROXY_BLOCKING: return ENOSYS; } _Internal_error_Occurred( 4000a358: 40 00 0e 36 call 4000dc30 <_Internal_error_Occurred> <== NOT EXECUTED 4000a35c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED INTERNAL_ERROR_POSIX_API, TRUE, the_message_queue_status ); return POSIX_BOTTOM_REACHED(); 4000a360: 40 00 04 93 call 4000b5ac <== NOT EXECUTED 4000a364: 81 e8 00 00 restore <== NOT EXECUTED } 4000a368: 81 c7 e0 08 ret 4000a36c: 81 e8 00 00 restore 4000f518 <_POSIX_Mutex_From_core_mutex_status>: */ int _POSIX_Mutex_From_core_mutex_status( CORE_mutex_Status status ) { 4000f518: 9d e3 bf 98 save %sp, -104, %sp switch ( status ) { 4000f51c: 80 a6 20 06 cmp %i0, 6 4000f520: 18 80 00 14 bgu 4000f570 <_POSIX_Mutex_From_core_mutex_status+0x58> 4000f524: 92 10 20 32 mov 0x32, %o1 4000f528: 83 2e 20 02 sll %i0, 2, %g1 4000f52c: 05 10 00 3d sethi %hi(0x4000f400), %g2 4000f530: 84 10 a0 fc or %g2, 0xfc, %g2 ! 4000f4fc <_POSIX_Message_queue_Manager_initialization+0x58> 4000f534: c2 00 80 01 ld [ %g2 + %g1 ], %g1 4000f538: 81 c0 40 00 jmp %g1 4000f53c: 01 00 00 00 nop 4000f540: 81 c7 e0 08 ret 4000f544: 91 e8 20 74 restore %g0, 0x74, %o0 4000f548: 81 c7 e0 08 ret 4000f54c: 91 e8 20 16 restore %g0, 0x16, %o0 4000f550: 81 c7 e0 08 ret 4000f554: 91 e8 20 00 restore %g0, 0, %o0 case CORE_MUTEX_STATUS_SUCCESSFUL: return 0; 4000f558: 81 c7 e0 08 ret 4000f55c: 91 e8 20 10 restore %g0, 0x10, %o0 case CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT: return EBUSY; 4000f560: 81 c7 e0 08 ret 4000f564: 91 e8 20 2d restore %g0, 0x2d, %o0 case CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED: return EDEADLK; 4000f568: 81 c7 e0 08 ret 4000f56c: 91 e8 20 01 restore %g0, 1, %o0 case CORE_MUTEX_STATUS_CEILING_VIOLATED: return EINVAL; default: break; } assert( 0 ); 4000f570: 11 10 00 61 sethi %hi(0x40018400), %o0 <== NOT EXECUTED 4000f574: 15 10 00 5b sethi %hi(0x40016c00), %o2 <== NOT EXECUTED 4000f578: 90 12 23 18 or %o0, 0x318, %o0 <== NOT EXECUTED 4000f57c: 94 12 a1 50 or %o2, 0x150, %o2 <== NOT EXECUTED 4000f580: 7f ff d2 18 call 40003de0 <__assert> <== NOT EXECUTED 4000f584: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 4000f588: 81 c7 e0 08 ret <== NOT EXECUTED 4000f58c: 81 e8 00 00 restore <== NOT EXECUTED 400073f0 <_POSIX_Mutex_Lock_support>: int _POSIX_Mutex_Lock_support( pthread_mutex_t *mutex, boolean blocking, Watchdog_Interval timeout ) { 400073f0: 9d e3 bf 90 save %sp, -112, %sp ISR_Level *level ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 400073f4: 80 a6 20 00 cmp %i0, 0 400073f8: 32 80 00 05 bne,a 4000740c <_POSIX_Mutex_Lock_support+0x1c> 400073fc: c2 06 00 00 ld [ %i0 ], %g1 40007400: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 40007404: 10 80 00 15 b 40007458 <_POSIX_Mutex_Lock_support+0x68> <== NOT EXECUTED 40007408: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED 4000740c: 80 a0 7f ff cmp %g1, -1 40007410: 32 80 00 0c bne,a 40007440 <_POSIX_Mutex_Lock_support+0x50> 40007414: d2 06 00 00 ld [ %i0 ], %o1 40007418: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000741c: 7f ff ff 8f call 40007258 <== NOT EXECUTED 40007420: 92 10 20 00 clr %o1 <== NOT EXECUTED 40007424: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40007428: 22 80 00 06 be,a 40007440 <_POSIX_Mutex_Lock_support+0x50> <== NOT EXECUTED 4000742c: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED 40007430: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 40007434: b0 10 20 00 clr %i0 <== NOT EXECUTED 40007438: 10 80 00 08 b 40007458 <_POSIX_Mutex_Lock_support+0x68> <== NOT EXECUTED 4000743c: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED return (POSIX_Mutex_Control *) 40007440: 11 10 00 69 sethi %hi(0x4001a400), %o0 40007444: 94 07 bf f4 add %fp, -12, %o2 40007448: 90 12 21 74 or %o0, 0x174, %o0 4000744c: 40 00 0e 1e call 4000acc4 <_Objects_Get_isr_disable> 40007450: 96 07 bf f0 add %fp, -16, %o3 40007454: b0 10 00 08 mov %o0, %i0 register POSIX_Mutex_Control *the_mutex; Objects_Locations location; ISR_Level level; the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &location, &level ); switch ( location ) { 40007458: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000745c: 80 a0 60 00 cmp %g1, 0 40007460: 22 80 00 06 be,a 40007478 <_POSIX_Mutex_Lock_support+0x88> 40007464: 03 10 00 68 sethi %hi(0x4001a000), %g1 40007468: 80 a0 60 02 cmp %g1, 2 4000746c: 08 80 00 86 bleu 40007684 <_POSIX_Mutex_Lock_support+0x294> 40007470: 90 10 20 16 mov 0x16, %o0 40007474: 30 80 00 82 b,a 4000767c <_POSIX_Mutex_Lock_support+0x28c> <== NOT EXECUTED ); #endif case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_mutex_Seize( 40007478: c2 00 61 10 ld [ %g1 + 0x110 ], %g1 4000747c: 80 a0 60 00 cmp %g1, 0 40007480: 02 80 00 0e be 400074b8 <_POSIX_Mutex_Lock_support+0xc8> 40007484: 03 10 00 68 sethi %hi(0x4001a000), %g1 40007488: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 4000748c: 02 80 00 0c be 400074bc <_POSIX_Mutex_Lock_support+0xcc> <== NOT EXECUTED 40007490: c4 00 61 ec ld [ %g1 + 0x1ec ], %g2 <== NOT EXECUTED 40007494: 03 10 00 68 sethi %hi(0x4001a000), %g1 <== NOT EXECUTED 40007498: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1 ! 4001a2f0 <_System_state_Current> <== NOT EXECUTED 4000749c: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 400074a0: 08 80 00 05 bleu 400074b4 <_POSIX_Mutex_Lock_support+0xc4> <== NOT EXECUTED 400074a4: 90 10 20 00 clr %o0 <== NOT EXECUTED 400074a8: 92 10 20 00 clr %o1 <== NOT EXECUTED 400074ac: 40 00 0c b3 call 4000a778 <_Internal_error_Occurred> <== NOT EXECUTED 400074b0: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 400074b4: 03 10 00 68 sethi %hi(0x4001a000), %g1 <== NOT EXECUTED 400074b8: c4 00 61 ec ld [ %g1 + 0x1ec ], %g2 ! 4001a1ec <_Thread_Executing> CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 400074bc: d0 07 bf f0 ld [ %fp + -16 ], %o0 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 400074c0: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 400074c4: c2 06 20 64 ld [ %i0 + 0x64 ], %g1 400074c8: 80 a0 60 00 cmp %g1, 0 400074cc: 22 80 00 3a be,a 400075b4 <_POSIX_Mutex_Lock_support+0x1c4> 400074d0: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 the_mutex->lock = CORE_MUTEX_LOCKED; 400074d4: c0 26 20 64 clr [ %i0 + 0x64 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 400074d8: c2 00 a0 08 ld [ %g2 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 400074dc: c6 06 20 5c ld [ %i0 + 0x5c ], %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; 400074e0: c2 26 20 74 st %g1, [ %i0 + 0x74 ] 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; 400074e4: c4 26 20 70 st %g2, [ %i0 + 0x70 ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 400074e8: 82 10 20 01 mov 1, %g1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 400074ec: 80 a0 e0 02 cmp %g3, 2 400074f0: 02 80 00 05 be 40007504 <_POSIX_Mutex_Lock_support+0x114> 400074f4: c2 26 20 68 st %g1, [ %i0 + 0x68 ] 400074f8: 80 a0 e0 03 cmp %g3, 3 400074fc: 32 80 00 06 bne,a 40007514 <_POSIX_Mutex_Lock_support+0x124> 40007500: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40007504: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 40007508: 82 00 60 01 inc %g1 4000750c: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40007510: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 40007514: 80 a0 60 03 cmp %g1, 3 40007518: 22 80 00 03 be,a 40007524 <_POSIX_Mutex_Lock_support+0x134> 4000751c: c6 06 20 60 ld [ %i0 + 0x60 ], %g3 _ISR_Enable( level ); 40007520: 30 80 00 35 b,a 400075f4 <_POSIX_Mutex_Lock_support+0x204> { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 40007524: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 if ( current == ceiling ) { 40007528: 80 a0 40 03 cmp %g1, %g3 4000752c: 12 80 00 03 bne 40007538 <_POSIX_Mutex_Lock_support+0x148> 40007530: 01 00 00 00 nop _ISR_Enable( level ); 40007534: 30 80 00 30 b,a 400075f4 <_POSIX_Mutex_Lock_support+0x204> <== NOT EXECUTED return 0; } if ( current > ceiling ) { 40007538: 08 80 00 17 bleu 40007594 <_POSIX_Mutex_Lock_support+0x1a4> 4000753c: 82 10 20 06 mov 6, %g1 40007540: 21 10 00 68 sethi %hi(0x4001a000), %l0 40007544: c2 04 21 10 ld [ %l0 + 0x110 ], %g1 ! 4001a110 <_Thread_Dispatch_disable_level> 40007548: 82 00 60 01 inc %g1 4000754c: c2 24 21 10 st %g1, [ %l0 + 0x110 ] _Thread_Disable_dispatch(); _ISR_Enable( level ); 40007550: 7f ff f1 d1 call 40003c94 40007554: 01 00 00 00 nop _Thread_Change_priority( 40007558: d2 06 20 60 ld [ %i0 + 0x60 ], %o1 4000755c: d0 06 20 70 ld [ %i0 + 0x70 ], %o0 40007560: 40 00 11 80 call 4000bb60 <_Thread_Change_priority> 40007564: 94 10 20 00 clr %o2 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007568: c2 04 21 10 ld [ %l0 + 0x110 ], %g1 4000756c: 82 00 7f ff add %g1, -1, %g1 40007570: c2 24 21 10 st %g1, [ %l0 + 0x110 ] 40007574: c2 04 21 10 ld [ %l0 + 0x110 ], %g1 40007578: 80 a0 60 00 cmp %g1, 0 4000757c: 32 80 00 3b bne,a 40007668 <_POSIX_Mutex_Lock_support+0x278> 40007580: 03 10 00 68 sethi %hi(0x4001a000), %g1 <== NOT EXECUTED _Thread_Dispatch(); 40007584: 40 00 12 a3 call 4000c010 <_Thread_Dispatch> 40007588: 01 00 00 00 nop the_mutex->Object.id, blocking, timeout, level ); return _POSIX_Mutex_From_core_mutex_status( 4000758c: 10 80 00 37 b 40007668 <_POSIX_Mutex_Lock_support+0x278> 40007590: 03 10 00 68 sethi %hi(0x4001a000), %g1 ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 40007594: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] the_mutex->lock = CORE_MUTEX_UNLOCKED; 40007598: 82 10 20 01 mov 1, %g1 the_mutex->nest_count = 0; /* undo locking above */ 4000759c: c0 26 20 68 clr [ %i0 + 0x68 ] _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 400075a0: c2 26 20 64 st %g1, [ %i0 + 0x64 ] the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 400075a4: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 400075a8: 82 00 7f ff add %g1, -1, %g1 400075ac: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] _ISR_Enable( level ); 400075b0: 30 80 00 11 b,a 400075f4 <_POSIX_Mutex_Lock_support+0x204> /* * 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 ) ) { 400075b4: 80 a0 40 02 cmp %g1, %g2 400075b8: 12 80 00 13 bne 40007604 <_POSIX_Mutex_Lock_support+0x214> 400075bc: 80 a6 60 00 cmp %i1, 0 switch ( the_mutex->Attributes.lock_nesting_behavior ) { 400075c0: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 400075c4: 80 a0 60 00 cmp %g1, 0 400075c8: 22 80 00 07 be,a 400075e4 <_POSIX_Mutex_Lock_support+0x1f4> 400075cc: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 <== NOT EXECUTED 400075d0: 80 a0 60 01 cmp %g1, 1 400075d4: 12 80 00 0c bne 40007604 <_POSIX_Mutex_Lock_support+0x214> 400075d8: 80 a6 60 00 cmp %i1, 0 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; 400075dc: 10 80 00 05 b 400075f0 <_POSIX_Mutex_Lock_support+0x200> 400075e0: 82 10 20 02 mov 2, %g1 * 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++; 400075e4: 82 00 60 01 inc %g1 <== NOT EXECUTED 400075e8: c2 26 20 68 st %g1, [ %i0 + 0x68 ] <== NOT EXECUTED _ISR_Enable( level ); 400075ec: 30 80 00 02 b,a 400075f4 <_POSIX_Mutex_Lock_support+0x204> <== NOT EXECUTED return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 400075f0: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] _ISR_Enable( level ); 400075f4: 7f ff f1 a8 call 40003c94 400075f8: 01 00 00 00 nop 400075fc: 10 80 00 1b b 40007668 <_POSIX_Mutex_Lock_support+0x278> 40007600: 03 10 00 68 sethi %hi(0x4001a000), %g1 ); #endif case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_mutex_Seize( 40007604: 12 80 00 08 bne 40007624 <_POSIX_Mutex_Lock_support+0x234> 40007608: 21 10 00 68 sethi %hi(0x4001a000), %l0 4000760c: 7f ff f1 a2 call 40003c94 40007610: d0 07 bf f0 ld [ %fp + -16 ], %o0 40007614: c4 04 21 ec ld [ %l0 + 0x1ec ], %g2 40007618: 82 10 20 01 mov 1, %g1 4000761c: 10 80 00 12 b 40007664 <_POSIX_Mutex_Lock_support+0x274> 40007620: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] 40007624: c8 04 21 ec ld [ %l0 + 0x1ec ], %g4 40007628: c6 06 20 08 ld [ %i0 + 8 ], %g3 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000762c: 05 10 00 68 sethi %hi(0x4001a000), %g2 40007630: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 4001a110 <_Thread_Dispatch_disable_level> 40007634: c6 21 20 20 st %g3, [ %g4 + 0x20 ] 40007638: 82 00 60 01 inc %g1 4000763c: a0 06 20 14 add %i0, 0x14, %l0 40007640: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] 40007644: e0 21 20 44 st %l0, [ %g4 + 0x44 ] RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; 40007648: 82 10 20 01 mov 1, %g1 4000764c: c2 26 20 44 st %g1, [ %i0 + 0x44 ] 40007650: 7f ff f1 91 call 40003c94 40007654: d0 07 bf f0 ld [ %fp + -16 ], %o0 40007658: 90 10 00 10 mov %l0, %o0 4000765c: 40 00 09 ff call 40009e58 <_CORE_mutex_Seize_interrupt_blocking> 40007660: 92 10 00 1a mov %i2, %o1 the_mutex->Object.id, blocking, timeout, level ); return _POSIX_Mutex_From_core_mutex_status( 40007664: 03 10 00 68 sethi %hi(0x4001a000), %g1 40007668: c2 00 61 ec ld [ %g1 + 0x1ec ], %g1 ! 4001a1ec <_Thread_Executing> 4000766c: 40 00 1f ab call 4000f518 <_POSIX_Mutex_From_core_mutex_status> 40007670: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 (CORE_mutex_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 40007674: 81 c7 e0 08 ret 40007678: 91 e8 00 08 restore %g0, %o0, %o0 ); return _POSIX_Mutex_From_core_mutex_status( (CORE_mutex_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 4000767c: 40 00 03 4b call 400083a8 <== NOT EXECUTED 40007680: 01 00 00 00 nop <== NOT EXECUTED } 40007684: b0 10 00 08 mov %o0, %i0 40007688: 81 c7 e0 08 ret 4000768c: 81 e8 00 00 restore 4000621c <_POSIX_RWLock_Translate_core_RWLock_return_code>: int _POSIX_RWLock_Translate_core_RWLock_return_code( CORE_RWLock_Status the_rwlock_status ) { if ( the_rwlock_status <= CORE_RWLOCK_STATUS_LAST ) 4000621c: 80 a2 20 03 cmp %o0, 3 40006220: 08 80 00 05 bleu 40006234 <_POSIX_RWLock_Translate_core_RWLock_return_code+0x18> 40006224: 85 2a 20 02 sll %o0, 2, %g2 return _POSIX_RWLock_Return_codes[the_rwlock_status]; return POSIX_BOTTOM_REACHED(); 40006228: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000622c: 40 00 02 68 call 40006bcc <== NOT EXECUTED 40006230: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED } 40006234: 03 10 00 6a sethi %hi(0x4001a800), %g1 40006238: 82 10 62 ec or %g1, 0x2ec, %g1 ! 4001aaec <_POSIX_RWLock_Return_codes> 4000623c: 81 c3 e0 08 retl 40006240: d0 00 40 02 ld [ %g1 + %g2 ], %o0 4000e5e0 <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 4000e5e0: 9d e3 bf 98 save %sp, -104, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000e5e4: 03 10 00 7c sethi %hi(0x4001f000), %g1 4000e5e8: c4 00 62 80 ld [ %g1 + 0x280 ], %g2 ! 4001f280 <_Thread_Dispatch_disable_level> 4000e5ec: 84 00 a0 01 inc %g2 4000e5f0: c4 20 62 80 st %g2, [ %g1 + 0x280 ] char *name_p = (char *)name; _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { 4000e5f4: 80 a6 60 00 cmp %i1, 0 4000e5f8: 02 80 00 08 be 4000e618 <_POSIX_Semaphore_Create_support+0x38> 4000e5fc: 80 a6 20 00 cmp %i0, 0 _Thread_Enable_dispatch(); 4000e600: 7f ff ff eb call 4000e5ac <_Thread_Enable_dispatch> 4000e604: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSYS ); 4000e608: 40 00 08 93 call 40010854 <__errno> 4000e60c: 01 00 00 00 nop 4000e610: 10 80 00 19 b 4000e674 <_POSIX_Semaphore_Create_support+0x94> 4000e614: 82 10 20 58 mov 0x58, %g1 ! 58 } if ( name ) { 4000e618: 02 80 00 0d be 4000e64c <_POSIX_Semaphore_Create_support+0x6c> 4000e61c: 11 10 00 7d sethi %hi(0x4001f400), %o0 if( strlen(name) > PATH_MAX ) { 4000e620: 40 00 0f 05 call 40012234 4000e624: 90 10 00 18 mov %i0, %o0 4000e628: 80 a2 20 ff cmp %o0, 0xff 4000e62c: 28 80 00 08 bleu,a 4000e64c <_POSIX_Semaphore_Create_support+0x6c> 4000e630: 11 10 00 7d sethi %hi(0x4001f400), %o0 _Thread_Enable_dispatch(); 4000e634: 7f ff ff de call 4000e5ac <_Thread_Enable_dispatch> <== NOT EXECUTED 4000e638: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4000e63c: 40 00 08 86 call 40010854 <__errno> <== NOT EXECUTED 4000e640: 01 00 00 00 nop <== NOT EXECUTED 4000e644: 10 80 00 0c b 4000e674 <_POSIX_Semaphore_Create_support+0x94> <== NOT EXECUTED 4000e648: 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 *) 4000e64c: 7f ff ea d8 call 400091ac <_Objects_Allocate> 4000e650: 90 12 22 00 or %o0, 0x200, %o0 } } the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 4000e654: b2 92 20 00 orcc %o0, 0, %i1 4000e658: 12 80 00 0a bne 4000e680 <_POSIX_Semaphore_Create_support+0xa0> 4000e65c: 80 a6 20 00 cmp %i0, 0 _Thread_Enable_dispatch(); 4000e660: 7f ff ff d3 call 4000e5ac <_Thread_Enable_dispatch> 4000e664: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSPC ); 4000e668: 40 00 08 7b call 40010854 <__errno> 4000e66c: 01 00 00 00 nop 4000e670: 82 10 20 1c mov 0x1c, %g1 ! 1c 4000e674: c2 22 00 00 st %g1, [ %o0 ] 4000e678: 81 c7 e0 08 ret 4000e67c: 91 e8 3f ff restore %g0, -1, %o0 } #endif the_semaphore->process_shared = pshared; if ( name ) { 4000e680: 02 80 00 07 be 4000e69c <_POSIX_Semaphore_Create_support+0xbc> 4000e684: c0 26 60 10 clr [ %i1 + 0x10 ] the_semaphore->named = TRUE; 4000e688: 82 10 20 01 mov 1, %g1 the_semaphore->open_count = 1; the_semaphore->linked = TRUE; 4000e68c: c2 26 60 18 st %g1, [ %i1 + 0x18 ] #endif the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; 4000e690: c2 26 60 14 st %g1, [ %i1 + 0x14 ] the_semaphore->open_count = 1; 4000e694: 10 80 00 05 b 4000e6a8 <_POSIX_Semaphore_Create_support+0xc8> 4000e698: c2 26 60 1c st %g1, [ %i1 + 0x1c ] the_semaphore->linked = TRUE; } else { the_semaphore->named = FALSE; 4000e69c: c0 26 60 14 clr [ %i1 + 0x14 ] the_semaphore->open_count = 0; 4000e6a0: c0 26 60 1c clr [ %i1 + 0x1c ] the_semaphore->linked = FALSE; 4000e6a4: c0 26 60 18 clr [ %i1 + 0x18 ] /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 4000e6a8: 82 10 3f ff mov -1, %g1 * be derived from the current scheduling policy. One * thing is certain, no matter what we decide, it won't be * the same as all other POSIX implementations. :) */ the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; 4000e6ac: c0 26 60 64 clr [ %i1 + 0x64 ] /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 4000e6b0: c2 26 60 60 st %g1, [ %i1 + 0x60 ] _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 4000e6b4: 94 10 00 1a mov %i2, %o2 4000e6b8: 90 06 60 20 add %i1, 0x20, %o0 4000e6bc: 7f ff e8 f6 call 40008a94 <_CORE_semaphore_Initialize> 4000e6c0: 92 06 60 60 add %i1, 0x60, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000e6c4: 03 10 00 7d sethi %hi(0x4001f400), %g1 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 4000e6c8: c6 06 60 08 ld [ %i1 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000e6cc: 88 10 62 00 or %g1, 0x200, %g4 4000e6d0: c4 11 20 10 lduh [ %g4 + 0x10 ], %g2 4000e6d4: 03 00 00 3f sethi %hi(0xfc00), %g1 4000e6d8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000e6dc: 82 08 c0 01 and %g3, %g1, %g1 4000e6e0: 80 a0 40 02 cmp %g1, %g2 4000e6e4: 38 80 00 06 bgu,a 4000e6fc <_POSIX_Semaphore_Create_support+0x11c> 4000e6e8: f0 26 60 0c st %i0, [ %i1 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 4000e6ec: c4 01 20 20 ld [ %g4 + 0x20 ], %g2 4000e6f0: 83 28 60 02 sll %g1, 2, %g1 4000e6f4: f2 20 80 01 st %i1, [ %g2 + %g1 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 4000e6f8: f0 26 60 0c st %i0, [ %i1 + 0xc ] * Make the semaphore available for use. */ _Objects_Open(&_POSIX_Semaphore_Information, &the_semaphore->Object, name_p); *the_sem = the_semaphore; 4000e6fc: f2 26 c0 00 st %i1, [ %i3 ] name_p, 0 /* proxy id - Not used */ ); #endif _Thread_Enable_dispatch(); 4000e700: 7f ff ff ab call 4000e5ac <_Thread_Enable_dispatch> 4000e704: b0 10 20 00 clr %i0 return 0; } 4000e708: 81 c7 e0 08 ret 4000e70c: 81 e8 00 00 restore 4000e800 <_POSIX_Semaphore_Wait_support>: int _POSIX_Semaphore_Wait_support( sem_t *sem, boolean blocking, Watchdog_Interval timeout ) { 4000e800: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get ( sem_t *id, Objects_Locations *location ) { return (POSIX_Semaphore_Control *) 4000e804: d2 06 00 00 ld [ %i0 ], %o1 4000e808: 94 07 bf f4 add %fp, -12, %o2 4000e80c: 11 10 00 7d sethi %hi(0x4001f400), %o0 4000e810: 7f ff eb ab call 400096bc <_Objects_Get> 4000e814: 90 12 22 00 or %o0, 0x200, %o0 ! 4001f600 <_POSIX_Semaphore_Information> POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 4000e818: c2 07 bf f4 ld [ %fp + -12 ], %g1 int _POSIX_Semaphore_Wait_support( sem_t *sem, boolean blocking, Watchdog_Interval timeout ) { 4000e81c: 94 10 00 19 mov %i1, %o2 POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 4000e820: 80 a0 60 01 cmp %g1, 1 4000e824: 02 80 00 09 be 4000e848 <_POSIX_Semaphore_Wait_support+0x48> 4000e828: 96 10 00 1a mov %i2, %o3 4000e82c: 80 a0 60 01 cmp %g1, 1 4000e830: 2a 80 00 0c bcs,a 4000e860 <_POSIX_Semaphore_Wait_support+0x60> 4000e834: d2 02 20 08 ld [ %o0 + 8 ], %o1 4000e838: 80 a0 60 02 cmp %g1, 2 4000e83c: 12 80 00 29 bne 4000e8e0 <_POSIX_Semaphore_Wait_support+0xe0> 4000e840: 01 00 00 00 nop 4000e844: 30 80 00 03 b,a 4000e850 <_POSIX_Semaphore_Wait_support+0x50> case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_REMOTE: _Thread_Dispatch(); 4000e848: 7f ff f0 52 call 4000a990 <_Thread_Dispatch> <== NOT EXECUTED 4000e84c: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 4000e850: 40 00 08 01 call 40010854 <__errno> 4000e854: 01 00 00 00 nop 4000e858: 10 80 00 1f b 4000e8d4 <_POSIX_Semaphore_Wait_support+0xd4> 4000e85c: 82 10 20 16 mov 0x16, %g1 ! 16 case OBJECTS_LOCAL: _CORE_semaphore_Seize( 4000e860: 40 00 01 78 call 4000ee40 <_CORE_semaphore_Seize> 4000e864: 90 02 20 20 add %o0, 0x20, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000e868: 03 10 00 7c sethi %hi(0x4001f000), %g1 4000e86c: c4 00 62 80 ld [ %g1 + 0x280 ], %g2 ! 4001f280 <_Thread_Dispatch_disable_level> 4000e870: 84 00 bf ff add %g2, -1, %g2 4000e874: c4 20 62 80 st %g2, [ %g1 + 0x280 ] 4000e878: c2 00 62 80 ld [ %g1 + 0x280 ], %g1 4000e87c: 80 a0 60 00 cmp %g1, 0 4000e880: 12 80 00 05 bne 4000e894 <_POSIX_Semaphore_Wait_support+0x94> 4000e884: 03 10 00 7c sethi %hi(0x4001f000), %g1 _Thread_Dispatch(); 4000e888: 7f ff f0 42 call 4000a990 <_Thread_Dispatch> 4000e88c: 01 00 00 00 nop the_semaphore->Object.id, blocking, timeout ); _Thread_Enable_dispatch(); switch ( _Thread_Executing->Wait.return_code ) { 4000e890: 03 10 00 7c sethi %hi(0x4001f000), %g1 4000e894: c2 00 63 5c ld [ %g1 + 0x35c ], %g1 ! 4001f35c <_Thread_Executing> 4000e898: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 4000e89c: 80 a0 60 02 cmp %g1, 2 4000e8a0: 02 80 00 06 be 4000e8b8 <_POSIX_Semaphore_Wait_support+0xb8> 4000e8a4: 80 a0 60 03 cmp %g1, 3 4000e8a8: 02 80 00 08 be 4000e8c8 <_POSIX_Semaphore_Wait_support+0xc8> 4000e8ac: 80 a0 60 01 cmp %g1, 1 4000e8b0: 12 80 00 0c bne 4000e8e0 <_POSIX_Semaphore_Wait_support+0xe0> 4000e8b4: 01 00 00 00 nop case CORE_SEMAPHORE_STATUS_SUCCESSFUL: break; case CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT: rtems_set_errno_and_return_minus_one( EAGAIN ); case CORE_SEMAPHORE_WAS_DELETED: rtems_set_errno_and_return_minus_one( EAGAIN ); 4000e8b8: 40 00 07 e7 call 40010854 <__errno> 4000e8bc: 01 00 00 00 nop 4000e8c0: 10 80 00 05 b 4000e8d4 <_POSIX_Semaphore_Wait_support+0xd4> 4000e8c4: 82 10 20 0b mov 0xb, %g1 ! b case CORE_SEMAPHORE_TIMEOUT: rtems_set_errno_and_return_minus_one( ETIMEDOUT ); 4000e8c8: 40 00 07 e3 call 40010854 <__errno> 4000e8cc: 01 00 00 00 nop 4000e8d0: 82 10 20 74 mov 0x74, %g1 ! 74 4000e8d4: c2 22 00 00 st %g1, [ %o0 ] 4000e8d8: 81 c7 e0 08 ret 4000e8dc: 91 e8 3f ff restore %g0, -1, %o0 */ break; } } return 0; } 4000e8e0: 81 c7 e0 08 ret 4000e8e4: 91 e8 20 00 restore %g0, 0, %o0 400056e8 <_POSIX_Spinlock_Translate_core_spinlock_return_code>: int _POSIX_Spinlock_Translate_core_spinlock_return_code( CORE_spinlock_Status the_spinlock_status ) { if ( the_spinlock_status <= CORE_SPINLOCK_STATUS_LAST ) 400056e8: 80 a2 20 06 cmp %o0, 6 400056ec: 08 80 00 05 bleu 40005700 <_POSIX_Spinlock_Translate_core_spinlock_return_code+0x18> 400056f0: 85 2a 20 02 sll %o0, 2, %g2 return _POSIX_Spinlock_Return_codes[the_spinlock_status]; return POSIX_BOTTOM_REACHED(); 400056f4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400056f8: 40 00 00 6d call 400058ac <== NOT EXECUTED 400056fc: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED } 40005700: 03 10 00 49 sethi %hi(0x40012400), %g1 40005704: 82 10 63 6c or %g1, 0x36c, %g1 ! 4001276c <_POSIX_Spinlock_Return_codes> 40005708: 81 c3 e0 08 retl 4000570c: d0 00 40 02 ld [ %g1 + %g2 ], %o0 4000c13c <_POSIX_Threads_Create_extension>: boolean _POSIX_Threads_Create_extension( Thread_Control *executing, Thread_Control *created ) { 4000c13c: 9d e3 bf 98 save %sp, -104, %sp RTEMS_INLINE_ROUTINE void *_Workspace_Allocate( size_t size ) { return _Heap_Allocate( &_Workspace_Area, size ); 4000c140: 11 10 00 67 sethi %hi(0x40019c00), %o0 4000c144: 92 10 20 e4 mov 0xe4, %o1 4000c148: 90 12 22 6c or %o0, 0x26c, %o0 4000c14c: 7f ff ea f0 call 40006d0c <_Heap_Allocate> 4000c150: b0 10 20 00 clr %i0 POSIX_API_Control *api; POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); if ( !api ) 4000c154: a2 92 20 00 orcc %o0, 0, %l1 4000c158: 02 80 00 39 be 4000c23c <_POSIX_Threads_Create_extension+0x100> 4000c15c: 94 10 20 38 mov 0x38, %o2 return FALSE; created->API_Extensions[ THREAD_API_POSIX ] = api; 4000c160: e2 26 61 70 st %l1, [ %i1 + 0x170 ] /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; 4000c164: 21 10 00 60 sethi %hi(0x40018000), %l0 4000c168: a0 14 22 88 or %l0, 0x288, %l0 ! 40018288 <_POSIX_Threads_Default_attributes> 4000c16c: 40 00 09 c1 call 4000e870 4000c170: 92 10 00 10 mov %l0, %o1 api->detachstate = _POSIX_Threads_Default_attributes.detachstate; 4000c174: c2 04 20 34 ld [ %l0 + 0x34 ], %g1 api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; 4000c178: c4 04 20 14 ld [ %l0 + 0x14 ], %g2 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; 4000c17c: c2 24 60 38 st %g1, [ %l1 + 0x38 ] api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; 4000c180: c4 24 60 7c st %g2, [ %l1 + 0x7c ] api->schedparam = _POSIX_Threads_Default_attributes.schedparam; 4000c184: 92 04 20 18 add %l0, 0x18, %o1 4000c188: 90 04 60 80 add %l1, 0x80, %o0 4000c18c: 40 00 09 b9 call 4000e870 4000c190: 94 10 20 18 mov 0x18, %o2 api->schedparam.sched_priority = 4000c194: c4 06 60 14 ld [ %i1 + 0x14 ], %g2 4000c198: 82 10 20 ff mov 0xff, %g1 4000c19c: 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; 4000c1a0: 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 = 4000c1a4: 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 && 4000c1a8: c6 06 60 08 ld [ %i1 + 8 ], %g3 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000c1ac: 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; 4000c1b0: c0 24 60 d4 clr [ %l1 + 0xd4 ] 4000c1b4: c2 24 60 d8 st %g1, [ %l1 + 0xd8 ] api->cancelability_state = PTHREAD_CANCEL_ENABLE; 4000c1b8: c0 24 60 cc clr [ %l1 + 0xcc ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000c1bc: 82 04 60 d8 add %l1, 0xd8, %g1 api->cancelability_type = PTHREAD_CANCEL_DEFERRED; 4000c1c0: c0 24 60 d0 clr [ %l1 + 0xd0 ] 4000c1c4: 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 && 4000c1c8: 83 30 e0 18 srl %g3, 0x18, %g1 4000c1cc: 82 08 60 07 and %g1, 7, %g1 4000c1d0: 80 a0 60 03 cmp %g1, 3 4000c1d4: 12 80 00 0b bne 4000c200 <_POSIX_Threads_Create_extension+0xc4> 4000c1d8: c0 24 60 dc clr [ %l1 + 0xdc ] 4000c1dc: 83 30 e0 1b srl %g3, 0x1b, %g1 4000c1e0: 80 a0 60 01 cmp %g1, 1 4000c1e4: 32 80 00 08 bne,a 4000c204 <_POSIX_Threads_Create_extension+0xc8> 4000c1e8: 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; 4000c1ec: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000c1f0: c2 00 62 fc ld [ %g1 + 0x2fc ], %g1 ! 40019efc <_Thread_Executing> 4000c1f4: c2 00 61 70 ld [ %g1 + 0x170 ], %g1 4000c1f8: 10 80 00 03 b 4000c204 <_POSIX_Threads_Create_extension+0xc8> 4000c1fc: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 } else { api->signals_blocked = 0xffffffff; 4000c200: 82 10 3f ff mov -1, %g1 4000c204: c2 24 60 c4 st %g1, [ %l1 + 0xc4 ] } _Thread_queue_Initialize( 4000c208: 90 04 60 3c add %l1, 0x3c, %o0 4000c20c: 92 10 20 00 clr %o1 4000c210: 15 00 00 04 sethi %hi(0x1000), %o2 4000c214: 7f ff f4 9d call 40009488 <_Thread_queue_Initialize> 4000c218: 96 10 20 00 clr %o3 THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_JOIN_AT_EXIT, 0 ); _Watchdog_Initialize( 4000c21c: 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; 4000c220: f2 24 60 c0 st %i1, [ %l1 + 0xc0 ] void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 4000c224: c2 24 60 bc st %g1, [ %l1 + 0xbc ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4000c228: c0 24 60 a4 clr [ %l1 + 0xa4 ] the_watchdog->routine = routine; 4000c22c: 03 10 00 30 sethi %hi(0x4000c000), %g1 the_watchdog->id = id; the_watchdog->user_data = user_data; 4000c230: b0 10 20 01 mov 1, %i0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4000c234: 82 10 62 94 or %g1, 0x294, %g1 4000c238: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] created->Object.id, created ); return TRUE; } 4000c23c: 81 c7 e0 08 ret 4000c240: 81 e8 00 00 restore 400063c4 <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body( void ) { 400063c4: 9d e3 bf 58 save %sp, -168, %sp uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = _POSIX_Threads_User_initialization_threads; 400063c8: 03 10 00 78 sethi %hi(0x4001e000), %g1 400063cc: e0 00 60 2c ld [ %g1 + 0x2c ], %l0 ! 4001e02c <_POSIX_Threads_User_initialization_threads> maximum = _POSIX_Threads_Number_of_initialization_threads; 400063d0: 03 10 00 78 sethi %hi(0x4001e000), %g1 if ( !user_threads || maximum == 0 ) 400063d4: 80 a4 20 00 cmp %l0, 0 400063d8: 02 80 00 3b be 400064c4 <_POSIX_Threads_Initialize_user_threads_body+0x100> 400063dc: ec 00 60 fc ld [ %g1 + 0xfc ], %l6 400063e0: 80 a5 a0 00 cmp %l6, 0 400063e4: 02 80 00 38 be 400064c4 <_POSIX_Threads_Initialize_user_threads_body+0x100> 400063e8: 03 10 00 6f sethi %hi(0x4001bc00), %g1 return; 400063ec: aa 10 20 00 clr %l5 * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { status = pthread_attr_init( &attr ); assert( !status ); 400063f0: a8 10 60 50 or %g1, 0x50, %l4 user_threads = _POSIX_Threads_User_initialization_threads; maximum = _POSIX_Threads_Number_of_initialization_threads; if ( !user_threads || maximum == 0 ) return; 400063f4: a4 10 20 00 clr %l2 * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { status = pthread_attr_init( &attr ); assert( !status ); 400063f8: 03 10 00 6c sethi %hi(0x4001b000), %g1 * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { status = pthread_attr_init( &attr ); 400063fc: a2 07 bf bc add %fp, -68, %l1 assert( !status ); 40006400: a6 10 60 28 or %g1, 0x28, %l3 assert( !status ); status = pthread_attr_setstacksize( &attr, user_threads[ index ].stack_size); assert( !status ); status = pthread_create( 40006404: 10 80 00 2d b 400064b8 <_POSIX_Threads_Initialize_user_threads_body+0xf4> 40006408: ae 07 bf f4 add %fp, -12, %l7 * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { status = pthread_attr_init( &attr ); 4000640c: 40 00 1f 11 call 4000e050 40006410: aa 05 60 01 inc %l5 assert( !status ); 40006414: 80 a2 20 00 cmp %o0, 0 40006418: 02 80 00 07 be 40006434 <_POSIX_Threads_Initialize_user_threads_body+0x70> 4000641c: 92 10 20 02 mov 2, %o1 40006420: 94 10 00 13 mov %l3, %o2 <== NOT EXECUTED 40006424: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED 40006428: 7f ff f2 3f call 40002d24 <__assert> <== NOT EXECUTED 4000642c: 92 10 20 47 mov 0x47, %o1 <== NOT EXECUTED status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 40006430: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40006434: 40 00 1f 12 call 4000e07c 40006438: 90 10 00 11 mov %l1, %o0 assert( !status ); 4000643c: 80 a2 20 00 cmp %o0, 0 40006440: 02 80 00 07 be 4000645c <_POSIX_Threads_Initialize_user_threads_body+0x98> 40006444: 82 04 00 12 add %l0, %l2, %g1 40006448: 94 10 00 13 mov %l3, %o2 <== NOT EXECUTED 4000644c: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED 40006450: 7f ff f2 35 call 40002d24 <__assert> <== NOT EXECUTED 40006454: 92 10 20 4a mov 0x4a, %o1 <== NOT EXECUTED status = pthread_attr_setstacksize( &attr, user_threads[ index ].stack_size); 40006458: 82 04 00 12 add %l0, %l2, %g1 <== NOT EXECUTED 4000645c: d2 00 60 04 ld [ %g1 + 4 ], %o1 40006460: 40 00 1f 17 call 4000e0bc 40006464: 90 10 00 11 mov %l1, %o0 assert( !status ); 40006468: 80 a2 20 00 cmp %o0, 0 4000646c: 22 80 00 07 be,a 40006488 <_POSIX_Threads_Initialize_user_threads_body+0xc4> 40006470: d4 04 80 10 ld [ %l2 + %l0 ], %o2 40006474: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED 40006478: 92 10 20 4d mov 0x4d, %o1 <== NOT EXECUTED 4000647c: 7f ff f2 2a call 40002d24 <__assert> <== NOT EXECUTED 40006480: 94 10 00 13 mov %l3, %o2 <== NOT EXECUTED status = pthread_create( 40006484: d4 04 80 10 ld [ %l2 + %l0 ], %o2 <== NOT EXECUTED 40006488: 92 10 00 11 mov %l1, %o1 4000648c: 96 10 20 00 clr %o3 40006490: 90 10 00 17 mov %l7, %o0 40006494: 7f ff fe fe call 4000608c 40006498: a4 04 a0 08 add %l2, 8, %l2 &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); assert( !status ); 4000649c: 80 a2 20 00 cmp %o0, 0 400064a0: 02 80 00 07 be 400064bc <_POSIX_Threads_Initialize_user_threads_body+0xf8> 400064a4: 80 a5 40 16 cmp %l5, %l6 400064a8: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED 400064ac: 92 10 20 55 mov 0x55, %o1 <== NOT EXECUTED 400064b0: 7f ff f2 1d call 40002d24 <__assert> <== NOT EXECUTED 400064b4: 94 10 00 13 mov %l3, %o2 <== NOT EXECUTED * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 400064b8: 80 a5 40 16 cmp %l5, %l6 400064bc: 12 bf ff d4 bne 4000640c <_POSIX_Threads_Initialize_user_threads_body+0x48> 400064c0: 90 10 00 11 mov %l1, %o0 400064c4: 81 c7 e0 08 ret 400064c8: 81 e8 00 00 restore 4000c294 <_POSIX_Threads_Sporadic_budget_TSR>: void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id, void *argument ) { 4000c294: 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 ]; 4000c298: f0 06 61 70 ld [ %i1 + 0x170 ], %i0 ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget ); 4000c29c: 40 00 03 d2 call 4000d1e4 <_Timespec_To_ticks> 4000c2a0: 90 06 20 90 add %i0, 0x90, %o0 if ( !ticks ) 4000c2a4: 80 a2 20 00 cmp %o0, 0 4000c2a8: 22 80 00 02 be,a 4000c2b0 <_POSIX_Threads_Sporadic_budget_TSR+0x1c> 4000c2ac: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000c2b0: 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 || 4000c2b4: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 4000c2b8: 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; 4000c2bc: d0 26 60 84 st %o0, [ %i1 + 0x84 ] 4000c2c0: 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 || 4000c2c4: 80 a0 e0 00 cmp %g3, 0 4000c2c8: 02 80 00 06 be 4000c2e0 <_POSIX_Threads_Sporadic_budget_TSR+0x4c> 4000c2cc: d2 26 60 18 st %o1, [ %i1 + 0x18 ] 4000c2d0: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 4000c2d4: 80 a0 40 09 cmp %g1, %o1 4000c2d8: 08 80 00 05 bleu 4000c2ec <_POSIX_Threads_Sporadic_budget_TSR+0x58> 4000c2dc: 01 00 00 00 nop the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); 4000c2e0: 90 10 00 19 mov %i1, %o0 4000c2e4: 7f ff f0 ee call 4000869c <_Thread_Change_priority> 4000c2e8: 94 10 20 01 mov 1, %o2 ticks = _Timespec_To_ticks( &api->schedparam.ss_replenish_period ); 4000c2ec: 40 00 03 be call 4000d1e4 <_Timespec_To_ticks> 4000c2f0: 90 06 20 88 add %i0, 0x88, %o0 if ( !ticks ) 4000c2f4: 80 a2 20 00 cmp %o0, 0 4000c2f8: 22 80 00 02 be,a 4000c300 <_POSIX_Threads_Sporadic_budget_TSR+0x6c> 4000c2fc: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000c300: d0 26 20 a8 st %o0, [ %i0 + 0xa8 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4000c304: b2 06 20 9c add %i0, 0x9c, %i1 4000c308: 31 10 00 67 sethi %hi(0x40019c00), %i0 4000c30c: 7f ff f6 ed call 40009ec0 <_Watchdog_Insert> 4000c310: 91 ee 23 1c restore %i0, 0x31c, %o0 4000c314: 01 00 00 00 nop 4000c244 <_POSIX_Threads_Sporadic_budget_callout>: ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4000c244: c2 02 21 70 ld [ %o0 + 0x170 ], %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 || 4000c248: c6 02 20 1c ld [ %o0 + 0x1c ], %g3 RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (255 - priority); 4000c24c: 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 */ 4000c250: 82 10 3f ff mov -1, %g1 4000c254: c2 22 20 84 st %g1, [ %o0 + 0x84 ] 4000c258: 82 10 20 ff mov 0xff, %g1 4000c25c: 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 || 4000c260: 80 a0 e0 00 cmp %g3, 0 4000c264: 02 80 00 06 be 4000c27c <_POSIX_Threads_Sporadic_budget_callout+0x38> 4000c268: d2 22 20 18 st %o1, [ %o0 + 0x18 ] 4000c26c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 <== NOT EXECUTED 4000c270: 80 a0 40 09 cmp %g1, %o1 <== NOT EXECUTED 4000c274: 08 80 00 06 bleu 4000c28c <_POSIX_Threads_Sporadic_budget_callout+0x48> <== NOT EXECUTED 4000c278: 01 00 00 00 nop <== NOT EXECUTED the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); 4000c27c: 94 10 20 01 mov 1, %o2 ! 1 4000c280: 82 13 c0 00 mov %o7, %g1 4000c284: 7f ff f1 06 call 4000869c <_Thread_Change_priority> 4000c288: 9e 10 40 00 mov %g1, %o7 4000c28c: 81 c3 e0 08 retl <== NOT EXECUTED 4000c290: 01 00 00 00 nop 40004fac <_POSIX_Threads_cancel_run>: */ void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 40004fac: 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 ]; 40004fb0: f2 06 21 70 ld [ %i0 + 0x170 ], %i1 handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 40004fb4: 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; 40004fb8: a2 06 60 dc add %i1, 0xdc, %l1 40004fbc: c2 26 60 cc st %g1, [ %i1 + 0xcc ] RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 40004fc0: 03 10 00 5b sethi %hi(0x40016c00), %g1 40004fc4: 10 80 00 11 b 40005008 <_POSIX_Threads_cancel_run+0x5c> 40004fc8: a4 10 62 6c or %g1, 0x26c, %l2 ! 40016e6c <_Workspace_Area> while ( !_Chain_Is_empty( handler_stack ) ) { _ISR_Disable( level ); 40004fcc: 7f ff f3 a1 call 40001e50 <== NOT EXECUTED 40004fd0: 01 00 00 00 nop <== NOT EXECUTED handler = (POSIX_Cancel_Handler_control *) 40004fd4: e0 04 60 04 ld [ %l1 + 4 ], %l0 <== NOT EXECUTED ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 40004fd8: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED previous = the_node->previous; 40004fdc: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED next->previous = previous; previous->next = next; 40004fe0: 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; 40004fe4: c2 20 a0 04 st %g1, [ %g2 + 4 ] <== NOT EXECUTED _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 40004fe8: 7f ff f3 9e call 40001e60 <== NOT EXECUTED 40004fec: 01 00 00 00 nop <== NOT EXECUTED (*handler->routine)( handler->arg ); 40004ff0: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 40004ff4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004ff8: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED 40004ffc: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40005000: 40 00 0a 4a call 40007928 <_Heap_Free> <== NOT EXECUTED 40005004: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { 40005008: c2 06 60 d8 ld [ %i1 + 0xd8 ], %g1 4000500c: 80 a0 40 11 cmp %g1, %l1 40005010: 12 bf ff ef bne 40004fcc <_POSIX_Threads_cancel_run+0x20> 40005014: 03 10 00 5b sethi %hi(0x40016c00), %g1 } /* Now we can delete the thread */ the_thread->Wait.return_argument = PTHREAD_CANCELED; _Thread_Close( 40005018: c6 06 20 08 ld [ %i0 + 8 ], %g3 4000501c: 85 30 e0 16 srl %g3, 0x16, %g2 40005020: 82 10 61 80 or %g1, 0x180, %g1 40005024: 84 08 a0 1c and %g2, 0x1c, %g2 40005028: c2 00 40 02 ld [ %g1 + %g2 ], %g1 4000502c: 87 30 e0 1b srl %g3, 0x1b, %g3 40005030: 87 28 e0 02 sll %g3, 2, %g3 40005034: d0 00 40 03 ld [ %g1 + %g3 ], %o0 40005038: 92 10 00 18 mov %i0, %o1 _Workspace_Free( handler ); } /* Now we can delete the thread */ the_thread->Wait.return_argument = PTHREAD_CANCELED; 4000503c: 82 10 3f ff mov -1, %g1 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 40005040: b2 10 00 18 mov %i0, %i1 40005044: c2 26 20 28 st %g1, [ %i0 + 0x28 ] _Thread_Close( 40005048: 40 00 10 dd call 400093bc <_Thread_Close> 4000504c: 31 10 00 5c sethi %hi(0x40017000), %i0 40005050: 40 00 0c 69 call 400081f4 <_Objects_Free> 40005054: 91 ee 21 08 restore %i0, 0x108, %o0 40005058: 01 00 00 00 nop 4000b120 <_POSIX_Timer_TSR>: * Description: This is the operation that is ran when a timer expires * ***************************************************************************/ void _POSIX_Timer_TSR(Objects_Id timer, void *data) { 4000b120: 9d e3 bf 98 save %sp, -104, %sp boolean activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 4000b124: c2 06 60 68 ld [ %i1 + 0x68 ], %g1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 4000b128: c4 06 60 54 ld [ %i1 + 0x54 ], %g2 boolean activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 4000b12c: 82 00 60 01 inc %g1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 4000b130: 80 a0 a0 00 cmp %g2, 0 4000b134: 12 80 00 06 bne 4000b14c <_POSIX_Timer_TSR+0x2c> 4000b138: c2 26 60 68 st %g1, [ %i1 + 0x68 ] 4000b13c: c2 06 60 58 ld [ %i1 + 0x58 ], %g1 <== NOT EXECUTED 4000b140: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000b144: 02 80 00 0f be 4000b180 <_POSIX_Timer_TSR+0x60> <== NOT EXECUTED 4000b148: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { #if 0 status = rtems_timer_fire_after( ptimer->timer_id, ptimer->ticks, _POSIX_Timer_TSR, ptimer ); #endif activated = _Watchdog_Insert_ticks_helper( 4000b14c: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 4000b150: d4 06 60 08 ld [ %i1 + 8 ], %o2 4000b154: 90 06 60 10 add %i1, 0x10, %o0 4000b158: 17 10 00 2c sethi %hi(0x4000b000), %o3 4000b15c: 98 10 00 19 mov %i1, %o4 4000b160: 7f ff ff 68 call 4000af00 <_Watchdog_Insert_ticks_helper> 4000b164: 96 12 e1 20 or %o3, 0x120, %o3 ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 4000b168: 80 a2 20 00 cmp %o0, 0 4000b16c: 02 80 00 0a be 4000b194 <_POSIX_Timer_TSR+0x74> 4000b170: 01 00 00 00 nop return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 4000b174: 40 00 09 21 call 4000d5f8 <_TOD_Get> 4000b178: 90 06 60 6c add %i1, 0x6c, %o0 4000b17c: 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 ) ) { 4000b180: d0 06 60 38 ld [ %i1 + 0x38 ], %o0 4000b184: d2 06 60 44 ld [ %i1 + 0x44 ], %o1 4000b188: 40 00 1f 9e call 40013000 4000b18c: 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; 4000b190: c0 26 60 68 clr [ %i1 + 0x68 ] 4000b194: 81 c7 e0 08 ret 4000b198: 81 e8 00 00 restore 4000c01c <_POSIX_signals_Abnormal_termination_handler>: /*** PROCESS WIDE STUFF ****/ sigset_t _POSIX_signals_Pending; void _POSIX_signals_Abnormal_termination_handler( int signo ) { 4000c01c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED exit( 1 ); 4000c020: 40 00 08 42 call 4000e128 <== NOT EXECUTED 4000c024: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000c028: 01 00 00 00 nop 4000d8a0 <_POSIX_signals_Check_signal>: boolean _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, boolean is_global ) { 4000d8a0: 9d e3 bf 88 save %sp, -120, %sp siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4000d8a4: 98 10 20 01 mov 1, %o4 4000d8a8: 96 10 00 1a mov %i2, %o3 4000d8ac: a6 07 bf ec add %fp, -20, %l3 4000d8b0: 90 10 00 18 mov %i0, %o0 4000d8b4: 92 10 00 19 mov %i1, %o1 4000d8b8: 40 00 00 2e call 4000d970 <_POSIX_signals_Clear_signals> 4000d8bc: 94 10 00 13 mov %l3, %o2 4000d8c0: 80 a2 20 00 cmp %o0, 0 4000d8c4: 02 80 00 29 be 4000d968 <_POSIX_signals_Check_signal+0xc8> 4000d8c8: 03 10 00 69 sethi %hi(0x4001a400), %g1 /* * Since we made a union of these, only one test is necessary but this is * safer. */ assert( _POSIX_signals_Vectors[ signo ].sa_handler || 4000d8cc: a4 10 60 b4 or %g1, 0xb4, %l2 ! 4001a4b4 <_POSIX_signals_Vectors> 4000d8d0: 83 2e 60 04 sll %i1, 4, %g1 4000d8d4: 85 2e 60 02 sll %i1, 2, %g2 4000d8d8: a2 20 40 02 sub %g1, %g2, %l1 4000d8dc: b4 04 40 12 add %l1, %l2, %i2 4000d8e0: c2 06 a0 08 ld [ %i2 + 8 ], %g1 4000d8e4: 80 a0 60 00 cmp %g1, 0 4000d8e8: 12 80 00 0a bne 4000d910 <_POSIX_signals_Check_signal+0x70> 4000d8ec: 80 a0 60 01 cmp %g1, 1 4000d8f0: 11 10 00 60 sethi %hi(0x40018000), %o0 <== NOT EXECUTED 4000d8f4: 15 10 00 61 sethi %hi(0x40018400), %o2 <== NOT EXECUTED 4000d8f8: 90 12 23 b0 or %o0, 0x3b0, %o0 <== NOT EXECUTED 4000d8fc: 94 12 a0 00 mov %o2, %o2 <== NOT EXECUTED 4000d900: 7f ff d1 6d call 40001eb4 <__assert> <== NOT EXECUTED 4000d904: 92 10 20 33 mov 0x33, %o1 <== NOT EXECUTED /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 4000d908: c2 06 a0 08 ld [ %i2 + 8 ], %g1 <== NOT EXECUTED 4000d90c: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4000d910: 02 80 00 16 be 4000d968 <_POSIX_signals_Check_signal+0xc8> 4000d914: 01 00 00 00 nop /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 4000d918: e0 06 20 c4 ld [ %i0 + 0xc4 ], %l0 api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 4000d91c: c2 06 a0 04 ld [ %i2 + 4 ], %g1 /* Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 4000d920: c4 04 80 11 ld [ %l2 + %l1 ], %g2 /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 4000d924: 82 10 40 10 or %g1, %l0, %g1 /* Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 4000d928: 80 a0 a0 02 cmp %g2, 2 4000d92c: 12 80 00 09 bne 4000d950 <_POSIX_signals_Check_signal+0xb0> 4000d930: c2 26 20 c4 st %g1, [ %i0 + 0xc4 ] case SA_SIGINFO: /* * * assert( is_global ); */ (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 4000d934: c2 06 a0 08 ld [ %i2 + 8 ], %g1 4000d938: 90 10 00 19 mov %i1, %o0 4000d93c: 92 10 00 13 mov %l3, %o1 4000d940: 9f c0 40 00 call %g1 4000d944: 94 10 20 00 clr %o2 /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 4000d948: 10 80 00 06 b 4000d960 <_POSIX_signals_Check_signal+0xc0> 4000d94c: e0 26 20 c4 st %l0, [ %i0 + 0xc4 ] &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 4000d950: c2 06 a0 08 ld [ %i2 + 8 ], %g1 4000d954: 9f c0 40 00 call %g1 4000d958: 90 10 00 19 mov %i1, %o0 /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 4000d95c: e0 26 20 c4 st %l0, [ %i0 + 0xc4 ] 4000d960: 81 c7 e0 08 ret 4000d964: 91 e8 20 01 restore %g0, 1, %o0 return TRUE; } 4000d968: 81 c7 e0 08 ret 4000d96c: 91 e8 20 00 restore %g0, 0, %o0 4000d970 <_POSIX_signals_Clear_signals>: int signo, siginfo_t *info, boolean is_global, boolean check_blocked ) { 4000d970: 9d e3 bf 98 save %sp, -104, %sp sigset_t signals_blocked; ISR_Level level; boolean do_callout; POSIX_signals_Siginfo_node *psiginfo; mask = signo_to_mask( signo ); 4000d974: 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 ) 4000d978: 80 a7 20 00 cmp %i4, 0 sigset_t signals_blocked; ISR_Level level; boolean do_callout; POSIX_signals_Siginfo_node *psiginfo; mask = signo_to_mask( signo ); 4000d97c: 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 ) 4000d980: b8 10 3f ff mov -1, %i4 4000d984: 02 80 00 04 be 4000d994 <_POSIX_signals_Clear_signals+0x24> 4000d988: a1 28 40 02 sll %g1, %g2, %l0 signals_blocked = ~api->signals_blocked; 4000d98c: c2 06 20 c4 ld [ %i0 + 0xc4 ], %g1 4000d990: 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 ); 4000d994: 7f ff d0 f1 call 40001d58 4000d998: 01 00 00 00 nop 4000d99c: a2 10 00 08 mov %o0, %l1 if ( is_global ) { 4000d9a0: 80 a6 e0 00 cmp %i3, 0 4000d9a4: 22 80 00 35 be,a 4000da78 <_POSIX_signals_Clear_signals+0x108> 4000d9a8: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { 4000d9ac: 03 10 00 69 sethi %hi(0x4001a400), %g1 4000d9b0: c2 00 62 80 ld [ %g1 + 0x280 ], %g1 ! 4001a680 <_POSIX_signals_Pending> 4000d9b4: 82 0c 00 01 and %l0, %g1, %g1 4000d9b8: 80 88 40 1c btst %g1, %i4 4000d9bc: 02 80 00 36 be 4000da94 <_POSIX_signals_Clear_signals+0x124> 4000d9c0: 83 2e 60 02 sll %i1, 2, %g1 if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 4000d9c4: 85 2e 60 04 sll %i1, 4, %g2 4000d9c8: 84 20 80 01 sub %g2, %g1, %g2 4000d9cc: 03 10 00 69 sethi %hi(0x4001a400), %g1 4000d9d0: 82 10 60 b4 or %g1, 0xb4, %g1 ! 4001a4b4 <_POSIX_signals_Vectors> 4000d9d4: c2 00 40 02 ld [ %g1 + %g2 ], %g1 4000d9d8: 80 a0 60 02 cmp %g1, 2 4000d9dc: 12 80 00 23 bne 4000da68 <_POSIX_signals_Clear_signals+0xf8> 4000d9e0: 03 10 00 69 sethi %hi(0x4001a400), %g1 psiginfo = (POSIX_signals_Siginfo_node *) 4000d9e4: 88 10 62 84 or %g1, 0x284, %g4 ! 4001a684 <_POSIX_signals_Siginfo> */ RTEMS_INLINE_ROUTINE boolean _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000d9e8: f8 00 80 04 ld [ %g2 + %g4 ], %i4 4000d9ec: 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; 4000d9f0: 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)) 4000d9f4: 80 a7 00 0d cmp %i4, %o5 4000d9f8: 32 80 00 04 bne,a 4000da08 <_POSIX_signals_Clear_signals+0x98> 4000d9fc: c2 07 00 00 ld [ %i4 ], %g1 4000da00: 10 80 00 04 b 4000da10 <_POSIX_signals_Clear_signals+0xa0> <== NOT EXECUTED 4000da04: 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; 4000da08: c2 20 80 04 st %g1, [ %g2 + %g4 ] new_first->previous = _Chain_Head(the_chain); 4000da0c: c6 20 60 04 st %g3, [ %g1 + 4 ] _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); if ( _Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 4000da10: c2 00 c0 00 ld [ %g3 ], %g1 4000da14: 80 a0 40 0d cmp %g1, %o5 4000da18: 12 80 00 05 bne 4000da2c <_POSIX_signals_Clear_signals+0xbc> 4000da1c: 80 a7 20 00 cmp %i4, 0 _POSIX_signals_Clear_process_signals( mask ); 4000da20: 40 00 01 a7 call 4000e0bc <_POSIX_signals_Clear_process_signals> 4000da24: 90 10 00 10 mov %l0, %o0 if ( psiginfo ) { 4000da28: 80 a7 20 00 cmp %i4, 0 4000da2c: 02 80 00 1b be 4000da98 <_POSIX_signals_Clear_signals+0x128> 4000da30: b0 10 20 01 mov 1, %i0 *info = psiginfo->Info; 4000da34: 90 10 00 1a mov %i2, %o0 4000da38: 92 07 20 08 add %i4, 8, %o1 4000da3c: 40 00 03 8d call 4000e870 4000da40: 94 10 20 0c mov 0xc, %o2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000da44: 03 10 00 69 sethi %hi(0x4001a400), %g1 4000da48: 82 10 62 38 or %g1, 0x238, %g1 ! 4001a638 <_POSIX_signals_Inactive_siginfo+0x4> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000da4c: c2 27 00 00 st %g1, [ %i4 ] old_last_node = the_chain->last; 4000da50: 82 00 7f fc add %g1, -4, %g1 4000da54: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_chain->last = the_node; 4000da58: f8 20 60 08 st %i4, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000da5c: 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; 4000da60: 10 80 00 0e b 4000da98 <_POSIX_signals_Clear_signals+0x128> 4000da64: f8 20 80 00 st %i4, [ %g2 ] &psiginfo->Node ); } else do_callout = FALSE; } else _POSIX_signals_Clear_process_signals( mask ); 4000da68: 40 00 01 95 call 4000e0bc <_POSIX_signals_Clear_process_signals> 4000da6c: 90 10 00 10 mov %l0, %o0 do_callout = TRUE; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; 4000da70: 10 80 00 0a b 4000da98 <_POSIX_signals_Clear_signals+0x128> 4000da74: b0 10 20 01 mov 1, %i0 } else _POSIX_signals_Clear_process_signals( mask ); do_callout = TRUE; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { 4000da78: 82 0c 00 08 and %l0, %o0, %g1 4000da7c: 80 88 40 1c btst %g1, %i4 4000da80: 02 80 00 05 be 4000da94 <_POSIX_signals_Clear_signals+0x124> 4000da84: 82 2a 00 10 andn %o0, %l0, %g1 api->signals_pending &= ~mask; 4000da88: c2 26 20 c8 st %g1, [ %i0 + 0xc8 ] 4000da8c: 10 80 00 03 b 4000da98 <_POSIX_signals_Clear_signals+0x128> 4000da90: b0 10 20 01 mov 1, %i0 4000da94: b0 10 20 00 clr %i0 do_callout = TRUE; } } _ISR_Enable( level ); 4000da98: 7f ff d0 b4 call 40001d68 4000da9c: 90 10 00 11 mov %l1, %o0 return do_callout; } 4000daa0: 81 c7 e0 08 ret 4000daa4: 81 e8 00 00 restore 4000626c <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 4000626c: 86 10 00 08 mov %o0, %g3 40006270: 90 10 20 1b mov 0x1b, %o0 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 40006274: 84 02 3f ff add %o0, -1, %g2 40006278: 82 10 20 01 mov 1, %g1 4000627c: 83 28 40 02 sll %g1, %g2, %g1 40006280: 80 88 40 03 btst %g1, %g3 40006284: 12 80 00 12 bne 400062cc <_POSIX_signals_Get_highest+0x60> 40006288: 01 00 00 00 nop sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4000628c: 90 02 20 01 inc %o0 40006290: 80 a2 20 20 cmp %o0, 0x20 40006294: 12 bf ff f9 bne 40006278 <_POSIX_signals_Get_highest+0xc> 40006298: 84 02 3f ff add %o0, -1, %g2 4000629c: 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 ) ) 400062a0: 84 02 3f ff add %o0, -1, %g2 400062a4: 82 10 20 01 mov 1, %g1 400062a8: 83 28 40 02 sll %g1, %g2, %g1 400062ac: 80 88 40 03 btst %g1, %g3 400062b0: 12 80 00 07 bne 400062cc <_POSIX_signals_Get_highest+0x60> 400062b4: 01 00 00 00 nop return signo; } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 400062b8: 90 02 20 01 inc %o0 400062bc: 80 a2 20 1b cmp %o0, 0x1b 400062c0: 12 bf ff f9 bne 400062a4 <_POSIX_signals_Get_highest+0x38> 400062c4: 84 02 3f ff add %o0, -1, %g2 400062c8: 90 10 20 00 clr %o0 <== NOT EXECUTED if ( set & signo_to_mask( signo ) ) return signo; } return 0; } 400062cc: 81 c3 e0 08 retl 400062d0: 01 00 00 00 nop 4000bf4c <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 4000bf4c: 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 ]; 4000bf50: e0 06 21 70 ld [ %i0 + 0x170 ], %l0 * processed at all. No point in doing this loop otherwise. */ restart: _ISR_Disable( level ); if ( !(~api->signals_blocked & 4000bf54: 23 10 00 69 sethi %hi(0x4001a400), %l1 * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ restart: _ISR_Disable( level ); 4000bf58: 7f ff d7 80 call 40001d58 4000bf5c: 01 00 00 00 nop 4000bf60: b0 10 00 08 mov %o0, %i0 if ( !(~api->signals_blocked & 4000bf64: c2 04 62 80 ld [ %l1 + 0x280 ], %g1 4000bf68: c4 04 20 c8 ld [ %l0 + 0xc8 ], %g2 4000bf6c: c6 04 20 c4 ld [ %l0 + 0xc4 ], %g3 4000bf70: 82 10 40 02 or %g1, %g2, %g1 4000bf74: 80 a8 40 03 andncc %g1, %g3, %g0 4000bf78: 12 80 00 04 bne 4000bf88 <_POSIX_signals_Post_switch_extension+0x3c> 4000bf7c: 01 00 00 00 nop (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 4000bf80: 7f ff d7 7a call 40001d68 4000bf84: 81 e8 00 00 restore return; } _ISR_Enable( level ); 4000bf88: 7f ff d7 78 call 40001d68 4000bf8c: b0 10 20 1b mov 0x1b, %i0 for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, FALSE ) ) 4000bf90: 92 10 00 18 mov %i0, %o1 4000bf94: 94 10 20 00 clr %o2 4000bf98: 40 00 06 42 call 4000d8a0 <_POSIX_signals_Check_signal> 4000bf9c: 90 10 00 10 mov %l0, %o0 4000bfa0: 80 a2 20 00 cmp %o0, 0 4000bfa4: 12 bf ff ed bne 4000bf58 <_POSIX_signals_Post_switch_extension+0xc> 4000bfa8: 92 10 00 18 mov %i0, %o1 goto restart; if ( _POSIX_signals_Check_signal( api, signo, TRUE ) ) 4000bfac: 90 10 00 10 mov %l0, %o0 4000bfb0: 94 10 20 01 mov 1, %o2 4000bfb4: 40 00 06 3b call 4000d8a0 <_POSIX_signals_Check_signal> 4000bfb8: b0 06 20 01 inc %i0 4000bfbc: 80 a2 20 00 cmp %o0, 0 4000bfc0: 12 bf ff e6 bne 4000bf58 <_POSIX_signals_Post_switch_extension+0xc> 4000bfc4: 80 a6 20 20 cmp %i0, 0x20 _ISR_Enable( level ); return; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4000bfc8: 12 bf ff f3 bne 4000bf94 <_POSIX_signals_Post_switch_extension+0x48> 4000bfcc: 92 10 00 18 mov %i0, %o1 4000bfd0: 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 ) ) 4000bfd4: 92 10 00 18 mov %i0, %o1 4000bfd8: 94 10 20 00 clr %o2 4000bfdc: 40 00 06 31 call 4000d8a0 <_POSIX_signals_Check_signal> 4000bfe0: 90 10 00 10 mov %l0, %o0 4000bfe4: 80 a2 20 00 cmp %o0, 0 4000bfe8: 12 bf ff dc bne 4000bf58 <_POSIX_signals_Post_switch_extension+0xc> 4000bfec: 92 10 00 18 mov %i0, %o1 goto restart; if ( _POSIX_signals_Check_signal( api, signo, TRUE ) ) 4000bff0: 90 10 00 10 mov %l0, %o0 4000bff4: 94 10 20 01 mov 1, %o2 4000bff8: 40 00 06 2a call 4000d8a0 <_POSIX_signals_Check_signal> 4000bffc: b0 06 20 01 inc %i0 4000c000: 80 a2 20 00 cmp %o0, 0 4000c004: 12 bf ff d5 bne 4000bf58 <_POSIX_signals_Post_switch_extension+0xc> 4000c008: 80 a6 20 1b cmp %i0, 0x1b } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 4000c00c: 12 bf ff f3 bne 4000bfd8 <_POSIX_signals_Post_switch_extension+0x8c> 4000c010: 92 10 00 18 mov %i0, %o1 if ( _POSIX_signals_Check_signal( api, signo, TRUE ) ) goto restart; } } 4000c014: 81 c7 e0 08 ret <== NOT EXECUTED 4000c018: 81 e8 00 00 restore <== NOT EXECUTED 40022688 <_POSIX_signals_Unblock_thread>: boolean _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 40022688: 9d e3 bf 98 save %sp, -104, %sp /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 4002268c: c8 06 20 10 ld [ %i0 + 0x10 ], %g4 40022690: 05 04 00 20 sethi %hi(0x10008000), %g2 sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; mask = signo_to_mask( signo ); 40022694: 82 06 7f ff add %i1, -1, %g1 40022698: 9a 10 20 01 mov 1, %o5 boolean _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 4002269c: 92 10 00 1a mov %i2, %o1 sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; mask = signo_to_mask( signo ); 400226a0: 87 2b 40 01 sll %o5, %g1, %g3 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 400226a4: 82 09 00 02 and %g4, %g2, %g1 400226a8: 80 a0 40 02 cmp %g1, %g2 400226ac: 12 80 00 19 bne 40022710 <_POSIX_signals_Unblock_thread+0x88> 400226b0: c4 06 21 70 ld [ %i0 + 0x170 ], %g2 if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 400226b4: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 400226b8: 80 88 c0 01 btst %g3, %g1 400226bc: 12 80 00 06 bne 400226d4 <_POSIX_signals_Unblock_thread+0x4c> 400226c0: 82 10 20 04 mov 4, %g1 400226c4: c2 00 a0 c4 ld [ %g2 + 0xc4 ], %g1 400226c8: 80 a8 c0 01 andncc %g3, %g1, %g0 400226cc: 02 80 00 31 be 40022790 <_POSIX_signals_Unblock_thread+0x108> 400226d0: 82 10 20 04 mov 4, %g1 the_thread->Wait.return_code = EINTR; 400226d4: c2 26 20 34 st %g1, [ %i0 + 0x34 ] the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 400226d8: 80 a2 60 00 cmp %o1, 0 400226dc: 12 80 00 06 bne 400226f4 <_POSIX_signals_Unblock_thread+0x6c> 400226e0: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 the_info->si_signo = signo; 400226e4: f2 22 00 00 st %i1, [ %o0 ] the_info->si_code = SI_USER; 400226e8: da 22 20 04 st %o5, [ %o0 + 4 ] the_info->si_value.sival_int = 0; 400226ec: 10 80 00 04 b 400226fc <_POSIX_signals_Unblock_thread+0x74> 400226f0: c0 22 20 08 clr [ %o0 + 8 ] } else { *the_info = *info; 400226f4: 7f ff d6 47 call 40018010 400226f8: 94 10 20 0c mov 0xc, %o2 } _Thread_queue_Extract_with_proxy( the_thread ); 400226fc: 90 10 00 18 mov %i0, %o0 40022700: 7f ff ad 61 call 4000dc84 <_Thread_queue_Extract_with_proxy> 40022704: b0 10 20 01 mov 1, %i0 40022708: 81 c7 e0 08 ret 4002270c: 81 e8 00 00 restore */ return FALSE; } if ( ~api->signals_blocked & mask ) { 40022710: c2 00 a0 c4 ld [ %g2 + 0xc4 ], %g1 40022714: 80 a8 c0 01 andncc %g3, %g1, %g0 40022718: 02 80 00 1e be 40022790 <_POSIX_signals_Unblock_thread+0x108> 4002271c: 03 04 00 00 sethi %hi(0x10000000), %g1 the_thread->do_post_task_switch_extension = TRUE; if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 40022720: 80 89 00 01 btst %g4, %g1 40022724: 02 80 00 1b be 40022790 <_POSIX_signals_Unblock_thread+0x108> 40022728: da 26 20 78 st %o5, [ %i0 + 0x78 ] the_thread->Wait.return_code = EINTR; 4002272c: 82 10 20 04 mov 4, %g1 40022730: c2 26 20 34 st %g1, [ %i0 + 0x34 ] if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) 40022734: 03 00 00 ef sethi %hi(0x3bc00), %g1 40022738: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4002273c: 80 89 00 01 btst %g4, %g1 40022740: 02 80 00 06 be 40022758 <_POSIX_signals_Unblock_thread+0xd0> 40022744: 80 89 20 08 btst 8, %g4 _Thread_queue_Extract_with_proxy( the_thread ); 40022748: 7f ff ad 4f call 4000dc84 <_Thread_queue_Extract_with_proxy> <== NOT EXECUTED 4002274c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 40022750: 81 c7 e0 08 ret <== NOT EXECUTED 40022754: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED else if ( _States_Is_delaying(the_thread->current_state)){ 40022758: 22 bf ff ec be,a 40022708 <_POSIX_signals_Unblock_thread+0x80> 4002275c: b0 10 20 00 clr %i0 <== NOT EXECUTED if ( _Watchdog_Is_active( &the_thread->Timer ) ) 40022760: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 40022764: 80 a0 60 02 cmp %g1, 2 40022768: 32 80 00 05 bne,a 4002277c <_POSIX_signals_Unblock_thread+0xf4> 4002276c: 13 04 00 ff sethi %hi(0x1003fc00), %o1 <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 40022770: 7f ff b0 77 call 4000e94c <_Watchdog_Remove> 40022774: 90 06 20 48 add %i0, 0x48, %o0 40022778: 13 04 00 ff sethi %hi(0x1003fc00), %o1 4002277c: 90 10 00 18 mov %i0, %o0 40022780: 7f ff aa 50 call 4000d0c0 <_Thread_Clear_state> 40022784: 92 12 63 f8 or %o1, 0x3f8, %o1 40022788: 81 c7 e0 08 ret 4002278c: 91 e8 20 00 restore %g0, 0, %o0 40022790: b0 10 20 00 clr %i0 } } } return FALSE; } 40022794: 81 c7 e0 08 ret 40022798: 81 e8 00 00 restore 40007b54 <_Protected_heap_Allocate>: void *_Protected_heap_Allocate( Heap_Control *the_heap, size_t size ) { 40007b54: 9d e3 bf 98 save %sp, -104, %sp void *p; _RTEMS_Lock_allocator(); 40007b58: 7f ff e8 80 call 40001d58 40007b5c: 01 00 00 00 nop 40007b60: a2 10 00 08 mov %o0, %l1 40007b64: 03 10 00 67 sethi %hi(0x40019c00), %g1 40007b68: c2 00 62 20 ld [ %g1 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> 40007b6c: 80 a0 60 00 cmp %g1, 0 40007b70: 02 80 00 0b be 40007b9c <_Protected_heap_Allocate+0x48> 40007b74: 03 10 00 67 sethi %hi(0x40019c00), %g1 40007b78: 03 10 00 68 sethi %hi(0x4001a000), %g1 40007b7c: c2 00 60 00 ld [ %g1 ], %g1 40007b80: 80 a0 60 01 cmp %g1, 1 40007b84: 08 80 00 05 bleu 40007b98 <_Protected_heap_Allocate+0x44> 40007b88: 90 10 20 00 clr %o0 40007b8c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40007b90: 7f ff fd 8a call 400071b8 <_Internal_error_Occurred> <== NOT EXECUTED 40007b94: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 40007b98: 03 10 00 67 sethi %hi(0x40019c00), %g1 40007b9c: e0 00 62 f4 ld [ %g1 + 0x2f4 ], %l0 ! 40019ef4 <_RTEMS_Allocator_Mutex> Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 40007ba0: 03 10 00 67 sethi %hi(0x40019c00), %g1 40007ba4: c4 00 62 fc ld [ %g1 + 0x2fc ], %g2 ! 40019efc <_Thread_Executing> executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40007ba8: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 40007bac: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 40007bb0: 80 a0 60 00 cmp %g1, 0 40007bb4: 22 80 00 33 be,a 40007c80 <_Protected_heap_Allocate+0x12c> 40007bb8: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 40007bbc: c0 24 20 60 clr [ %l0 + 0x60 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40007bc0: c2 00 a0 08 ld [ %g2 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40007bc4: c6 04 20 58 ld [ %l0 + 0x58 ], %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; 40007bc8: c2 24 20 70 st %g1, [ %l0 + 0x70 ] 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; 40007bcc: c4 24 20 6c st %g2, [ %l0 + 0x6c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 40007bd0: 82 10 20 01 mov 1, %g1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40007bd4: 80 a0 e0 02 cmp %g3, 2 40007bd8: 02 80 00 05 be 40007bec <_Protected_heap_Allocate+0x98> 40007bdc: c2 24 20 64 st %g1, [ %l0 + 0x64 ] 40007be0: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 40007be4: 32 80 00 06 bne,a 40007bfc <_Protected_heap_Allocate+0xa8> <== NOT EXECUTED 40007be8: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40007bec: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 40007bf0: 82 00 60 01 inc %g1 40007bf4: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40007bf8: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 40007bfc: 80 a0 60 03 cmp %g1, 3 40007c00: 22 80 00 03 be,a 40007c0c <_Protected_heap_Allocate+0xb8> 40007c04: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED _ISR_Enable( level ); 40007c08: 30 80 00 2c b,a 40007cb8 <_Protected_heap_Allocate+0x164> { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 40007c0c: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 40007c10: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40007c14: 12 80 00 03 bne 40007c20 <_Protected_heap_Allocate+0xcc> <== NOT EXECUTED 40007c18: 01 00 00 00 nop <== NOT EXECUTED _ISR_Enable( level ); 40007c1c: 30 80 00 27 b,a 40007cb8 <_Protected_heap_Allocate+0x164> <== NOT EXECUTED return 0; } if ( current > ceiling ) { 40007c20: 08 80 00 10 bleu 40007c60 <_Protected_heap_Allocate+0x10c> <== NOT EXECUTED 40007c24: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007c28: 05 10 00 67 sethi %hi(0x40019c00), %g2 <== NOT EXECUTED 40007c2c: c2 00 a2 20 ld [ %g2 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40007c30: 82 00 60 01 inc %g1 <== NOT EXECUTED 40007c34: c2 20 a2 20 st %g1, [ %g2 + 0x220 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 40007c38: 7f ff e8 4c call 40001d68 <== NOT EXECUTED 40007c3c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED _Thread_Change_priority( 40007c40: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 40007c44: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 40007c48: 40 00 02 95 call 4000869c <_Thread_Change_priority> <== NOT EXECUTED 40007c4c: 94 10 20 00 clr %o2 <== NOT EXECUTED the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 40007c50: 7f ff ff b4 call 40007b20 <_Thread_Enable_dispatch> <== NOT EXECUTED 40007c54: 01 00 00 00 nop <== NOT EXECUTED p = _Heap_Allocate( the_heap, size ); 40007c58: 10 80 00 32 b 40007d20 <_Protected_heap_Allocate+0x1cc> <== NOT EXECUTED 40007c5c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 40007c60: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 40007c64: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40007c68: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 40007c6c: c2 24 20 60 st %g1, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 40007c70: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40007c74: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40007c78: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40007c7c: 30 80 00 0f b,a 40007cb8 <_Protected_heap_Allocate+0x164> <== NOT EXECUTED /* * 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 ) ) { 40007c80: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40007c84: 32 80 00 13 bne,a 40007cd0 <_Protected_heap_Allocate+0x17c> <== NOT EXECUTED 40007c88: 21 10 00 67 sethi %hi(0x40019c00), %l0 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40007c8c: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 ! 40019c50 <_PathLocale> <== NOT EXECUTED 40007c90: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40007c94: 22 80 00 07 be,a 40007cb0 <_Protected_heap_Allocate+0x15c> <== NOT EXECUTED 40007c98: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 40007c9c: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40007ca0: 32 80 00 0c bne,a 40007cd0 <_Protected_heap_Allocate+0x17c> <== NOT EXECUTED 40007ca4: 21 10 00 67 sethi %hi(0x40019c00), %l0 <== NOT EXECUTED 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; 40007ca8: 10 80 00 08 b 40007cc8 <_Protected_heap_Allocate+0x174> <== NOT EXECUTED 40007cac: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED * 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++; 40007cb0: 82 00 60 01 inc %g1 <== NOT EXECUTED 40007cb4: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 40007cb8: 7f ff e8 2c call 40001d68 40007cbc: 90 10 00 11 mov %l1, %o0 40007cc0: 10 80 00 18 b 40007d20 <_Protected_heap_Allocate+0x1cc> 40007cc4: 90 10 00 18 mov %i0, %o0 return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 40007cc8: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 40007ccc: 30 bf ff fb b,a 40007cb8 <_Protected_heap_Allocate+0x164> <== NOT EXECUTED size_t size ) { void *p; _RTEMS_Lock_allocator(); 40007cd0: c6 04 22 f4 ld [ %l0 + 0x2f4 ], %g3 <== NOT EXECUTED 40007cd4: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 40007cd8: da 00 e0 08 ld [ %g3 + 8 ], %o5 <== NOT EXECUTED 40007cdc: c8 00 62 fc ld [ %g1 + 0x2fc ], %g4 <== NOT EXECUTED 40007ce0: 05 10 00 67 sethi %hi(0x40019c00), %g2 <== NOT EXECUTED 40007ce4: c2 00 a2 20 ld [ %g2 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40007ce8: da 21 20 20 st %o5, [ %g4 + 0x20 ] <== NOT EXECUTED 40007cec: 82 00 60 01 inc %g1 <== NOT EXECUTED 40007cf0: c2 20 a2 20 st %g1, [ %g2 + 0x220 ] <== NOT EXECUTED 40007cf4: 82 00 e0 10 add %g3, 0x10, %g1 <== NOT EXECUTED 40007cf8: c2 21 20 44 st %g1, [ %g4 + 0x44 ] <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; 40007cfc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40007d00: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 40007d04: 7f ff e8 19 call 40001d68 <== NOT EXECUTED 40007d08: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40007d0c: d0 04 22 f4 ld [ %l0 + 0x2f4 ], %o0 <== NOT EXECUTED 40007d10: 92 10 20 00 clr %o1 <== NOT EXECUTED 40007d14: 7f ff fb 0f call 40006950 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 40007d18: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED p = _Heap_Allocate( the_heap, size ); 40007d1c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40007d20: 7f ff fb fb call 40006d0c <_Heap_Allocate> 40007d24: 92 10 00 19 mov %i1, %o1 40007d28: 05 10 00 67 sethi %hi(0x40019c00), %g2 40007d2c: c2 00 a2 20 ld [ %g2 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> 40007d30: b0 10 00 08 mov %o0, %i0 40007d34: 82 00 60 01 inc %g1 40007d38: c2 20 a2 20 st %g1, [ %g2 + 0x220 ] _RTEMS_Unlock_allocator(); 40007d3c: 03 10 00 67 sethi %hi(0x40019c00), %g1 40007d40: d0 00 62 f4 ld [ %g1 + 0x2f4 ], %o0 ! 40019ef4 <_RTEMS_Allocator_Mutex> 40007d44: 94 10 20 00 clr %o2 40007d48: d2 02 20 08 ld [ %o0 + 8 ], %o1 40007d4c: 7f ff fb 23 call 400069d8 <_CORE_mutex_Surrender> 40007d50: 90 02 20 10 add %o0, 0x10, %o0 40007d54: 7f ff ff 73 call 40007b20 <_Thread_Enable_dispatch> 40007d58: 01 00 00 00 nop return p; } 40007d5c: 81 c7 e0 08 ret 40007d60: 81 e8 00 00 restore 40007d98 <_Protected_heap_Extend>: boolean _Protected_heap_Extend( Heap_Control *the_heap, void *starting_address, size_t size ) { 40007d98: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED Heap_Extend_status status; uint32_t amount_extended; _RTEMS_Lock_allocator(); 40007d9c: 7f ff e7 ef call 40001d58 <== NOT EXECUTED 40007da0: 01 00 00 00 nop <== NOT EXECUTED 40007da4: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED 40007da8: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 40007dac: c2 00 62 20 ld [ %g1 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40007db0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40007db4: 02 80 00 0b be 40007de0 <_Protected_heap_Extend+0x48> <== NOT EXECUTED 40007db8: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 40007dbc: 03 10 00 68 sethi %hi(0x4001a000), %g1 <== NOT EXECUTED 40007dc0: c2 00 60 00 ld [ %g1 ], %g1 <== NOT EXECUTED 40007dc4: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40007dc8: 08 80 00 05 bleu 40007ddc <_Protected_heap_Extend+0x44> <== NOT EXECUTED 40007dcc: 90 10 20 00 clr %o0 <== NOT EXECUTED 40007dd0: 92 10 20 00 clr %o1 <== NOT EXECUTED 40007dd4: 7f ff fc f9 call 400071b8 <_Internal_error_Occurred> <== NOT EXECUTED 40007dd8: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 40007ddc: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 40007de0: e0 00 62 f4 ld [ %g1 + 0x2f4 ], %l0 ! 40019ef4 <_RTEMS_Allocator_Mutex> <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 40007de4: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 40007de8: c4 00 62 fc ld [ %g1 + 0x2fc ], %g2 ! 40019efc <_Thread_Executing> <== NOT EXECUTED executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40007dec: c0 20 a0 34 clr [ %g2 + 0x34 ] <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 40007df0: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 40007df4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40007df8: 22 80 00 33 be,a 40007ec4 <_Protected_heap_Extend+0x12c> <== NOT EXECUTED 40007dfc: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 40007e00: c0 24 20 60 clr [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40007e04: c2 00 a0 08 ld [ %g2 + 8 ], %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40007e08: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 <== NOT EXECUTED 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; 40007e0c: c2 24 20 70 st %g1, [ %l0 + 0x70 ] <== NOT EXECUTED 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; 40007e10: c4 24 20 6c st %g2, [ %l0 + 0x6c ] <== NOT EXECUTED the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 40007e14: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40007e18: 80 a0 e0 02 cmp %g3, 2 <== NOT EXECUTED 40007e1c: 02 80 00 05 be 40007e30 <_Protected_heap_Extend+0x98> <== NOT EXECUTED 40007e20: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED 40007e24: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 40007e28: 32 80 00 06 bne,a 40007e40 <_Protected_heap_Extend+0xa8> <== NOT EXECUTED 40007e2c: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40007e30: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40007e34: 82 00 60 01 inc %g1 <== NOT EXECUTED 40007e38: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40007e3c: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 <== NOT EXECUTED 40007e40: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 40007e44: 22 80 00 03 be,a 40007e50 <_Protected_heap_Extend+0xb8> <== NOT EXECUTED 40007e48: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED _ISR_Enable( level ); 40007e4c: 30 80 00 2c b,a 40007efc <_Protected_heap_Extend+0x164> <== NOT EXECUTED { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 40007e50: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 40007e54: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40007e58: 12 80 00 03 bne 40007e64 <_Protected_heap_Extend+0xcc> <== NOT EXECUTED 40007e5c: 01 00 00 00 nop <== NOT EXECUTED _ISR_Enable( level ); 40007e60: 30 80 00 27 b,a 40007efc <_Protected_heap_Extend+0x164> <== NOT EXECUTED return 0; } if ( current > ceiling ) { 40007e64: 08 80 00 10 bleu 40007ea4 <_Protected_heap_Extend+0x10c> <== NOT EXECUTED 40007e68: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007e6c: 05 10 00 67 sethi %hi(0x40019c00), %g2 <== NOT EXECUTED 40007e70: c2 00 a2 20 ld [ %g2 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40007e74: 82 00 60 01 inc %g1 <== NOT EXECUTED 40007e78: c2 20 a2 20 st %g1, [ %g2 + 0x220 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 40007e7c: 7f ff e7 bb call 40001d68 <== NOT EXECUTED 40007e80: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED _Thread_Change_priority( 40007e84: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 40007e88: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 40007e8c: 40 00 02 04 call 4000869c <_Thread_Change_priority> <== NOT EXECUTED 40007e90: 94 10 20 00 clr %o2 <== NOT EXECUTED the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 40007e94: 7f ff ff b4 call 40007d64 <_Thread_Enable_dispatch> <== NOT EXECUTED 40007e98: 01 00 00 00 nop <== NOT EXECUTED status = _Heap_Extend(the_heap, starting_address, size, &amount_extended); 40007e9c: 10 80 00 32 b 40007f64 <_Protected_heap_Extend+0x1cc> <== NOT EXECUTED 40007ea0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 40007ea4: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 40007ea8: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40007eac: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 40007eb0: c2 24 20 60 st %g1, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 40007eb4: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40007eb8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40007ebc: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40007ec0: 30 80 00 0f b,a 40007efc <_Protected_heap_Extend+0x164> <== NOT EXECUTED /* * 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 ) ) { 40007ec4: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40007ec8: 32 80 00 13 bne,a 40007f14 <_Protected_heap_Extend+0x17c> <== NOT EXECUTED 40007ecc: 21 10 00 67 sethi %hi(0x40019c00), %l0 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40007ed0: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 ! 40019c50 <_PathLocale> <== NOT EXECUTED 40007ed4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40007ed8: 22 80 00 07 be,a 40007ef4 <_Protected_heap_Extend+0x15c> <== NOT EXECUTED 40007edc: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 40007ee0: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40007ee4: 12 80 00 0c bne 40007f14 <_Protected_heap_Extend+0x17c> <== NOT EXECUTED 40007ee8: 21 10 00 67 sethi %hi(0x40019c00), %l0 <== NOT EXECUTED 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; 40007eec: 10 80 00 08 b 40007f0c <_Protected_heap_Extend+0x174> <== NOT EXECUTED 40007ef0: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED * 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++; 40007ef4: 82 00 60 01 inc %g1 <== NOT EXECUTED 40007ef8: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 40007efc: 7f ff e7 9b call 40001d68 <== NOT EXECUTED 40007f00: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40007f04: 10 80 00 18 b 40007f64 <_Protected_heap_Extend+0x1cc> <== NOT EXECUTED 40007f08: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 40007f0c: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 40007f10: 30 bf ff fb b,a 40007efc <_Protected_heap_Extend+0x164> <== NOT EXECUTED ) { Heap_Extend_status status; uint32_t amount_extended; _RTEMS_Lock_allocator(); 40007f14: c6 04 22 f4 ld [ %l0 + 0x2f4 ], %g3 <== NOT EXECUTED 40007f18: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 40007f1c: da 00 e0 08 ld [ %g3 + 8 ], %o5 <== NOT EXECUTED 40007f20: c8 00 62 fc ld [ %g1 + 0x2fc ], %g4 <== NOT EXECUTED 40007f24: 05 10 00 67 sethi %hi(0x40019c00), %g2 <== NOT EXECUTED 40007f28: c2 00 a2 20 ld [ %g2 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40007f2c: da 21 20 20 st %o5, [ %g4 + 0x20 ] <== NOT EXECUTED 40007f30: 82 00 60 01 inc %g1 <== NOT EXECUTED 40007f34: c2 20 a2 20 st %g1, [ %g2 + 0x220 ] <== NOT EXECUTED 40007f38: 82 00 e0 10 add %g3, 0x10, %g1 <== NOT EXECUTED 40007f3c: c2 21 20 44 st %g1, [ %g4 + 0x44 ] <== NOT EXECUTED 40007f40: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40007f44: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 40007f48: 7f ff e7 88 call 40001d68 <== NOT EXECUTED 40007f4c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40007f50: d0 04 22 f4 ld [ %l0 + 0x2f4 ], %o0 <== NOT EXECUTED 40007f54: 92 10 20 00 clr %o1 <== NOT EXECUTED 40007f58: 7f ff fa 7e call 40006950 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 40007f5c: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED status = _Heap_Extend(the_heap, starting_address, size, &amount_extended); 40007f60: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40007f64: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40007f68: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 40007f6c: 40 00 12 7f call 4000c968 <_Heap_Extend> <== NOT EXECUTED 40007f70: 96 07 bf f4 add %fp, -12, %o3 <== NOT EXECUTED 40007f74: 05 10 00 67 sethi %hi(0x40019c00), %g2 <== NOT EXECUTED 40007f78: c2 00 a2 20 ld [ %g2 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40007f7c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 40007f80: 82 00 60 01 inc %g1 <== NOT EXECUTED 40007f84: c2 20 a2 20 st %g1, [ %g2 + 0x220 ] <== NOT EXECUTED _RTEMS_Unlock_allocator(); 40007f88: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 40007f8c: d0 00 62 f4 ld [ %g1 + 0x2f4 ], %o0 ! 40019ef4 <_RTEMS_Allocator_Mutex> <== NOT EXECUTED 40007f90: 94 10 20 00 clr %o2 <== NOT EXECUTED 40007f94: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 40007f98: 7f ff fa 90 call 400069d8 <_CORE_mutex_Surrender> <== NOT EXECUTED 40007f9c: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED 40007fa0: 7f ff ff 71 call 40007d64 <_Thread_Enable_dispatch> <== NOT EXECUTED 40007fa4: 01 00 00 00 nop <== NOT EXECUTED return (status == HEAP_EXTEND_SUCCESSFUL); } 40007fa8: 80 a0 00 10 cmp %g0, %l0 <== NOT EXECUTED 40007fac: b0 60 3f ff subx %g0, -1, %i0 <== NOT EXECUTED 40007fb0: 81 c7 e0 08 ret <== NOT EXECUTED 40007fb4: 81 e8 00 00 restore <== NOT EXECUTED 40007fec <_Protected_heap_Free>: boolean _Protected_heap_Free( Heap_Control *the_heap, void *start_address ) { 40007fec: 9d e3 bf 98 save %sp, -104, %sp boolean status; _RTEMS_Lock_allocator(); 40007ff0: 7f ff e7 5a call 40001d58 40007ff4: 01 00 00 00 nop 40007ff8: a2 10 00 08 mov %o0, %l1 40007ffc: 03 10 00 67 sethi %hi(0x40019c00), %g1 40008000: c2 00 62 20 ld [ %g1 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> 40008004: 80 a0 60 00 cmp %g1, 0 40008008: 02 80 00 0b be 40008034 <_Protected_heap_Free+0x48> 4000800c: 03 10 00 67 sethi %hi(0x40019c00), %g1 40008010: 03 10 00 68 sethi %hi(0x4001a000), %g1 <== NOT EXECUTED 40008014: c2 00 60 00 ld [ %g1 ], %g1 <== NOT EXECUTED 40008018: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4000801c: 08 80 00 05 bleu 40008030 <_Protected_heap_Free+0x44> <== NOT EXECUTED 40008020: 90 10 20 00 clr %o0 <== NOT EXECUTED 40008024: 92 10 20 00 clr %o1 <== NOT EXECUTED 40008028: 7f ff fc 64 call 400071b8 <_Internal_error_Occurred> <== NOT EXECUTED 4000802c: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 40008030: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 40008034: e0 00 62 f4 ld [ %g1 + 0x2f4 ], %l0 ! 40019ef4 <_RTEMS_Allocator_Mutex> Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 40008038: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000803c: c4 00 62 fc ld [ %g1 + 0x2fc ], %g2 ! 40019efc <_Thread_Executing> executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40008040: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 40008044: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 40008048: 80 a0 60 00 cmp %g1, 0 4000804c: 22 80 00 33 be,a 40008118 <_Protected_heap_Free+0x12c> 40008050: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 40008054: c0 24 20 60 clr [ %l0 + 0x60 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40008058: c2 00 a0 08 ld [ %g2 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 4000805c: c6 04 20 58 ld [ %l0 + 0x58 ], %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; 40008060: c2 24 20 70 st %g1, [ %l0 + 0x70 ] 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; 40008064: c4 24 20 6c st %g2, [ %l0 + 0x6c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 40008068: 82 10 20 01 mov 1, %g1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000806c: 80 a0 e0 02 cmp %g3, 2 40008070: 02 80 00 05 be 40008084 <_Protected_heap_Free+0x98> 40008074: c2 24 20 64 st %g1, [ %l0 + 0x64 ] 40008078: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 4000807c: 32 80 00 06 bne,a 40008094 <_Protected_heap_Free+0xa8> <== NOT EXECUTED 40008080: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40008084: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 40008088: 82 00 60 01 inc %g1 4000808c: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40008090: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 40008094: 80 a0 60 03 cmp %g1, 3 40008098: 22 80 00 03 be,a 400080a4 <_Protected_heap_Free+0xb8> 4000809c: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED _ISR_Enable( level ); 400080a0: 30 80 00 2c b,a 40008150 <_Protected_heap_Free+0x164> { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 400080a4: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 400080a8: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 400080ac: 12 80 00 03 bne 400080b8 <_Protected_heap_Free+0xcc> <== NOT EXECUTED 400080b0: 01 00 00 00 nop <== NOT EXECUTED _ISR_Enable( level ); 400080b4: 30 80 00 27 b,a 40008150 <_Protected_heap_Free+0x164> <== NOT EXECUTED return 0; } if ( current > ceiling ) { 400080b8: 08 80 00 10 bleu 400080f8 <_Protected_heap_Free+0x10c> <== NOT EXECUTED 400080bc: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400080c0: 05 10 00 67 sethi %hi(0x40019c00), %g2 <== NOT EXECUTED 400080c4: c2 00 a2 20 ld [ %g2 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 400080c8: 82 00 60 01 inc %g1 <== NOT EXECUTED 400080cc: c2 20 a2 20 st %g1, [ %g2 + 0x220 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 400080d0: 7f ff e7 26 call 40001d68 <== NOT EXECUTED 400080d4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED _Thread_Change_priority( 400080d8: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 400080dc: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 400080e0: 40 00 01 6f call 4000869c <_Thread_Change_priority> <== NOT EXECUTED 400080e4: 94 10 20 00 clr %o2 <== NOT EXECUTED the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 400080e8: 7f ff ff b4 call 40007fb8 <_Thread_Enable_dispatch> <== NOT EXECUTED 400080ec: 01 00 00 00 nop <== NOT EXECUTED status = _Heap_Free( the_heap, start_address ); 400080f0: 10 80 00 32 b 400081b8 <_Protected_heap_Free+0x1cc> <== NOT EXECUTED 400080f4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 400080f8: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 400080fc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40008100: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 40008104: c2 24 20 60 st %g1, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 40008108: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4000810c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40008110: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40008114: 30 80 00 0f b,a 40008150 <_Protected_heap_Free+0x164> <== NOT EXECUTED /* * 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 ) ) { 40008118: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 4000811c: 32 80 00 13 bne,a 40008168 <_Protected_heap_Free+0x17c> <== NOT EXECUTED 40008120: 21 10 00 67 sethi %hi(0x40019c00), %l0 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40008124: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 ! 40019c50 <_PathLocale> <== NOT EXECUTED 40008128: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000812c: 22 80 00 07 be,a 40008148 <_Protected_heap_Free+0x15c> <== NOT EXECUTED 40008130: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 40008134: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40008138: 32 80 00 0c bne,a 40008168 <_Protected_heap_Free+0x17c> <== NOT EXECUTED 4000813c: 21 10 00 67 sethi %hi(0x40019c00), %l0 <== NOT EXECUTED 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; 40008140: 10 80 00 08 b 40008160 <_Protected_heap_Free+0x174> <== NOT EXECUTED 40008144: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED * 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++; 40008148: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000814c: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 40008150: 7f ff e7 06 call 40001d68 40008154: 90 10 00 11 mov %l1, %o0 40008158: 10 80 00 18 b 400081b8 <_Protected_heap_Free+0x1cc> 4000815c: 90 10 00 18 mov %i0, %o0 return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 40008160: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 40008164: 30 bf ff fb b,a 40008150 <_Protected_heap_Free+0x164> <== NOT EXECUTED void *start_address ) { boolean status; _RTEMS_Lock_allocator(); 40008168: c6 04 22 f4 ld [ %l0 + 0x2f4 ], %g3 <== NOT EXECUTED 4000816c: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 40008170: da 00 e0 08 ld [ %g3 + 8 ], %o5 <== NOT EXECUTED 40008174: c8 00 62 fc ld [ %g1 + 0x2fc ], %g4 <== NOT EXECUTED 40008178: 05 10 00 67 sethi %hi(0x40019c00), %g2 <== NOT EXECUTED 4000817c: c2 00 a2 20 ld [ %g2 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40008180: da 21 20 20 st %o5, [ %g4 + 0x20 ] <== NOT EXECUTED 40008184: 82 00 60 01 inc %g1 <== NOT EXECUTED 40008188: c2 20 a2 20 st %g1, [ %g2 + 0x220 ] <== NOT EXECUTED 4000818c: 82 00 e0 10 add %g3, 0x10, %g1 <== NOT EXECUTED 40008190: c2 21 20 44 st %g1, [ %g4 + 0x44 ] <== NOT EXECUTED 40008194: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40008198: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 4000819c: 7f ff e6 f3 call 40001d68 <== NOT EXECUTED 400081a0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400081a4: d0 04 22 f4 ld [ %l0 + 0x2f4 ], %o0 <== NOT EXECUTED 400081a8: 92 10 20 00 clr %o1 <== NOT EXECUTED 400081ac: 7f ff f9 e9 call 40006950 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 400081b0: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED status = _Heap_Free( the_heap, start_address ); 400081b4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400081b8: 7f ff fa fc call 40006da8 <_Heap_Free> 400081bc: 92 10 00 19 mov %i1, %o1 400081c0: 05 10 00 67 sethi %hi(0x40019c00), %g2 400081c4: c2 00 a2 20 ld [ %g2 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> 400081c8: b0 10 00 08 mov %o0, %i0 400081cc: 82 00 60 01 inc %g1 400081d0: c2 20 a2 20 st %g1, [ %g2 + 0x220 ] _RTEMS_Unlock_allocator(); 400081d4: 03 10 00 67 sethi %hi(0x40019c00), %g1 400081d8: d0 00 62 f4 ld [ %g1 + 0x2f4 ], %o0 ! 40019ef4 <_RTEMS_Allocator_Mutex> 400081dc: 94 10 20 00 clr %o2 400081e0: d2 02 20 08 ld [ %o0 + 8 ], %o1 400081e4: 7f ff f9 fd call 400069d8 <_CORE_mutex_Surrender> 400081e8: 90 02 20 10 add %o0, 0x10, %o0 400081ec: 7f ff ff 73 call 40007fb8 <_Thread_Enable_dispatch> 400081f0: 01 00 00 00 nop return status; } 400081f4: 81 c7 e0 08 ret 400081f8: 81 e8 00 00 restore 40008230 <_Protected_heap_Get_block_size>: boolean _Protected_heap_Get_block_size( Heap_Control *the_heap, void *starting_address, size_t *size ) { 40008230: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED boolean status; _RTEMS_Lock_allocator(); 40008234: 7f ff e6 c9 call 40001d58 <== NOT EXECUTED 40008238: 01 00 00 00 nop <== NOT EXECUTED 4000823c: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED 40008240: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 40008244: c2 00 62 20 ld [ %g1 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40008248: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000824c: 02 80 00 0b be 40008278 <_Protected_heap_Get_block_size+0x48> <== NOT EXECUTED 40008250: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 40008254: 03 10 00 68 sethi %hi(0x4001a000), %g1 <== NOT EXECUTED 40008258: c2 00 60 00 ld [ %g1 ], %g1 <== NOT EXECUTED 4000825c: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40008260: 08 80 00 05 bleu 40008274 <_Protected_heap_Get_block_size+0x44> <== NOT EXECUTED 40008264: 90 10 20 00 clr %o0 <== NOT EXECUTED 40008268: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000826c: 7f ff fb d3 call 400071b8 <_Internal_error_Occurred> <== NOT EXECUTED 40008270: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 40008274: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 40008278: e0 00 62 f4 ld [ %g1 + 0x2f4 ], %l0 ! 40019ef4 <_RTEMS_Allocator_Mutex> <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 4000827c: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 40008280: c4 00 62 fc ld [ %g1 + 0x2fc ], %g2 ! 40019efc <_Thread_Executing> <== NOT EXECUTED executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40008284: c0 20 a0 34 clr [ %g2 + 0x34 ] <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 40008288: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 4000828c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008290: 22 80 00 33 be,a 4000835c <_Protected_heap_Get_block_size+0x12c> <== NOT EXECUTED 40008294: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 40008298: c0 24 20 60 clr [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000829c: c2 00 a0 08 ld [ %g2 + 8 ], %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 400082a0: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 <== NOT EXECUTED 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; 400082a4: c2 24 20 70 st %g1, [ %l0 + 0x70 ] <== NOT EXECUTED 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; 400082a8: c4 24 20 6c st %g2, [ %l0 + 0x6c ] <== NOT EXECUTED the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 400082ac: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 400082b0: 80 a0 e0 02 cmp %g3, 2 <== NOT EXECUTED 400082b4: 02 80 00 05 be 400082c8 <_Protected_heap_Get_block_size+0x98> <== NOT EXECUTED 400082b8: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED 400082bc: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 400082c0: 32 80 00 06 bne,a 400082d8 <_Protected_heap_Get_block_size+0xa8> <== NOT EXECUTED 400082c4: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 400082c8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 400082cc: 82 00 60 01 inc %g1 <== NOT EXECUTED 400082d0: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 400082d4: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 <== NOT EXECUTED 400082d8: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 400082dc: 22 80 00 03 be,a 400082e8 <_Protected_heap_Get_block_size+0xb8> <== NOT EXECUTED 400082e0: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED _ISR_Enable( level ); 400082e4: 30 80 00 2c b,a 40008394 <_Protected_heap_Get_block_size+0x164> <== NOT EXECUTED { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 400082e8: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 400082ec: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 400082f0: 12 80 00 03 bne 400082fc <_Protected_heap_Get_block_size+0xcc> <== NOT EXECUTED 400082f4: 01 00 00 00 nop <== NOT EXECUTED _ISR_Enable( level ); 400082f8: 30 80 00 27 b,a 40008394 <_Protected_heap_Get_block_size+0x164> <== NOT EXECUTED return 0; } if ( current > ceiling ) { 400082fc: 08 80 00 10 bleu 4000833c <_Protected_heap_Get_block_size+0x10c> <== NOT EXECUTED 40008300: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008304: 05 10 00 67 sethi %hi(0x40019c00), %g2 <== NOT EXECUTED 40008308: c2 00 a2 20 ld [ %g2 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000830c: 82 00 60 01 inc %g1 <== NOT EXECUTED 40008310: c2 20 a2 20 st %g1, [ %g2 + 0x220 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 40008314: 7f ff e6 95 call 40001d68 <== NOT EXECUTED 40008318: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED _Thread_Change_priority( 4000831c: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 40008320: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 40008324: 40 00 00 de call 4000869c <_Thread_Change_priority> <== NOT EXECUTED 40008328: 94 10 20 00 clr %o2 <== NOT EXECUTED the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 4000832c: 7f ff ff b4 call 400081fc <_Thread_Enable_dispatch> <== NOT EXECUTED 40008330: 01 00 00 00 nop <== NOT EXECUTED status = _Heap_Size_of_user_area( the_heap, starting_address, size ); 40008334: 10 80 00 32 b 400083fc <_Protected_heap_Get_block_size+0x1cc> <== NOT EXECUTED 40008338: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4000833c: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 40008340: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40008344: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 40008348: c2 24 20 60 st %g1, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 4000834c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40008350: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40008354: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40008358: 30 80 00 0f b,a 40008394 <_Protected_heap_Get_block_size+0x164> <== NOT EXECUTED /* * 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 ) ) { 4000835c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40008360: 32 80 00 13 bne,a 400083ac <_Protected_heap_Get_block_size+0x17c> <== NOT EXECUTED 40008364: 21 10 00 67 sethi %hi(0x40019c00), %l0 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40008368: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 ! 40019c50 <_PathLocale> <== NOT EXECUTED 4000836c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008370: 22 80 00 07 be,a 4000838c <_Protected_heap_Get_block_size+0x15c> <== NOT EXECUTED 40008374: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 40008378: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4000837c: 32 80 00 0c bne,a 400083ac <_Protected_heap_Get_block_size+0x17c> <== NOT EXECUTED 40008380: 21 10 00 67 sethi %hi(0x40019c00), %l0 <== NOT EXECUTED 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; 40008384: 10 80 00 08 b 400083a4 <_Protected_heap_Get_block_size+0x174> <== NOT EXECUTED 40008388: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED * 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++; 4000838c: 82 00 60 01 inc %g1 <== NOT EXECUTED 40008390: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 40008394: 7f ff e6 75 call 40001d68 <== NOT EXECUTED 40008398: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000839c: 10 80 00 18 b 400083fc <_Protected_heap_Get_block_size+0x1cc> <== NOT EXECUTED 400083a0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 400083a4: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 400083a8: 30 bf ff fb b,a 40008394 <_Protected_heap_Get_block_size+0x164> <== NOT EXECUTED size_t *size ) { boolean status; _RTEMS_Lock_allocator(); 400083ac: c6 04 22 f4 ld [ %l0 + 0x2f4 ], %g3 <== NOT EXECUTED 400083b0: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 400083b4: da 00 e0 08 ld [ %g3 + 8 ], %o5 <== NOT EXECUTED 400083b8: c8 00 62 fc ld [ %g1 + 0x2fc ], %g4 <== NOT EXECUTED 400083bc: 05 10 00 67 sethi %hi(0x40019c00), %g2 <== NOT EXECUTED 400083c0: c2 00 a2 20 ld [ %g2 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 400083c4: da 21 20 20 st %o5, [ %g4 + 0x20 ] <== NOT EXECUTED 400083c8: 82 00 60 01 inc %g1 <== NOT EXECUTED 400083cc: c2 20 a2 20 st %g1, [ %g2 + 0x220 ] <== NOT EXECUTED 400083d0: 82 00 e0 10 add %g3, 0x10, %g1 <== NOT EXECUTED 400083d4: c2 21 20 44 st %g1, [ %g4 + 0x44 ] <== NOT EXECUTED 400083d8: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 400083dc: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 400083e0: 7f ff e6 62 call 40001d68 <== NOT EXECUTED 400083e4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400083e8: d0 04 22 f4 ld [ %l0 + 0x2f4 ], %o0 <== NOT EXECUTED 400083ec: 92 10 20 00 clr %o1 <== NOT EXECUTED 400083f0: 7f ff f9 58 call 40006950 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 400083f4: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED status = _Heap_Size_of_user_area( the_heap, starting_address, size ); 400083f8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400083fc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40008400: 40 00 12 14 call 4000cc50 <_Heap_Size_of_user_area> <== NOT EXECUTED 40008404: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 40008408: 05 10 00 67 sethi %hi(0x40019c00), %g2 <== NOT EXECUTED 4000840c: c2 00 a2 20 ld [ %g2 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40008410: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 40008414: 82 00 60 01 inc %g1 <== NOT EXECUTED 40008418: c2 20 a2 20 st %g1, [ %g2 + 0x220 ] <== NOT EXECUTED _RTEMS_Unlock_allocator(); 4000841c: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 40008420: d0 00 62 f4 ld [ %g1 + 0x2f4 ], %o0 ! 40019ef4 <_RTEMS_Allocator_Mutex> <== NOT EXECUTED 40008424: 94 10 20 00 clr %o2 <== NOT EXECUTED 40008428: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 4000842c: 7f ff f9 6b call 400069d8 <_CORE_mutex_Surrender> <== NOT EXECUTED 40008430: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED 40008434: 7f ff ff 72 call 400081fc <_Thread_Enable_dispatch> <== NOT EXECUTED 40008438: 01 00 00 00 nop <== NOT EXECUTED return status; } 4000843c: 81 c7 e0 08 ret <== NOT EXECUTED 40008440: 81 e8 00 00 restore <== NOT EXECUTED 4000b9f8 <_Protected_heap_Get_free_information>: void _Protected_heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 4000b9f8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED _RTEMS_Lock_allocator(); 4000b9fc: 7f ff e0 6f call 40003bb8 <== NOT EXECUTED 4000ba00: 01 00 00 00 nop <== NOT EXECUTED 4000ba04: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED 4000ba08: 03 10 00 eb sethi %hi(0x4003ac00), %g1 <== NOT EXECUTED 4000ba0c: c2 00 63 70 ld [ %g1 + 0x370 ], %g1 ! 4003af70 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000ba10: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ba14: 02 80 00 0b be 4000ba40 <_Protected_heap_Get_free_information+0x48> <== NOT EXECUTED 4000ba18: 03 10 00 ec sethi %hi(0x4003b000), %g1 <== NOT EXECUTED 4000ba1c: 03 10 00 ec sethi %hi(0x4003b000), %g1 <== NOT EXECUTED 4000ba20: c2 00 61 50 ld [ %g1 + 0x150 ], %g1 ! 4003b150 <_System_state_Current> <== NOT EXECUTED 4000ba24: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4000ba28: 08 80 00 05 bleu 4000ba3c <_Protected_heap_Get_free_information+0x44> <== NOT EXECUTED 4000ba2c: 90 10 20 00 clr %o0 <== NOT EXECUTED 4000ba30: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000ba34: 7f ff fb 80 call 4000a834 <_Internal_error_Occurred> <== NOT EXECUTED 4000ba38: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 4000ba3c: 03 10 00 ec sethi %hi(0x4003b000), %g1 <== NOT EXECUTED 4000ba40: e0 00 60 44 ld [ %g1 + 0x44 ], %l0 ! 4003b044 <_RTEMS_Allocator_Mutex> <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 4000ba44: 03 10 00 ec sethi %hi(0x4003b000), %g1 <== NOT EXECUTED 4000ba48: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 ! 4003b04c <_Thread_Executing> <== NOT EXECUTED executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4000ba4c: c0 20 a0 34 clr [ %g2 + 0x34 ] <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4000ba50: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 4000ba54: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ba58: 22 80 00 33 be,a 4000bb24 <_Protected_heap_Get_free_information+0x12c> <== NOT EXECUTED 4000ba5c: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 4000ba60: c0 24 20 60 clr [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000ba64: c2 00 a0 08 ld [ %g2 + 8 ], %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 4000ba68: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 <== NOT EXECUTED 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; 4000ba6c: c2 24 20 70 st %g1, [ %l0 + 0x70 ] <== NOT EXECUTED 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; 4000ba70: c4 24 20 6c st %g2, [ %l0 + 0x6c ] <== NOT EXECUTED the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4000ba74: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000ba78: 80 a0 e0 02 cmp %g3, 2 <== NOT EXECUTED 4000ba7c: 02 80 00 05 be 4000ba90 <_Protected_heap_Get_free_information+0x98> <== NOT EXECUTED 4000ba80: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED 4000ba84: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 4000ba88: 32 80 00 06 bne,a 4000baa0 <_Protected_heap_Get_free_information+0xa8> <== NOT EXECUTED 4000ba8c: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 4000ba90: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4000ba94: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000ba98: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000ba9c: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 <== NOT EXECUTED 4000baa0: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 4000baa4: 22 80 00 03 be,a 4000bab0 <_Protected_heap_Get_free_information+0xb8> <== NOT EXECUTED 4000baa8: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED _ISR_Enable( level ); 4000baac: 30 80 00 2c b,a 4000bb5c <_Protected_heap_Get_free_information+0x164> <== NOT EXECUTED { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 4000bab0: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 4000bab4: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 4000bab8: 12 80 00 03 bne 4000bac4 <_Protected_heap_Get_free_information+0xcc> <== NOT EXECUTED 4000babc: 01 00 00 00 nop <== NOT EXECUTED _ISR_Enable( level ); 4000bac0: 30 80 00 27 b,a 4000bb5c <_Protected_heap_Get_free_information+0x164> <== NOT EXECUTED return 0; } if ( current > ceiling ) { 4000bac4: 08 80 00 10 bleu 4000bb04 <_Protected_heap_Get_free_information+0x10c> <== NOT EXECUTED 4000bac8: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000bacc: 05 10 00 eb sethi %hi(0x4003ac00), %g2 <== NOT EXECUTED 4000bad0: c2 00 a3 70 ld [ %g2 + 0x370 ], %g1 ! 4003af70 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000bad4: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000bad8: c2 20 a3 70 st %g1, [ %g2 + 0x370 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 4000badc: 7f ff e0 3b call 40003bc8 <== NOT EXECUTED 4000bae0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED _Thread_Change_priority( 4000bae4: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 4000bae8: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 4000baec: 40 00 00 db call 4000be58 <_Thread_Change_priority> <== NOT EXECUTED 4000baf0: 94 10 20 00 clr %o2 <== NOT EXECUTED the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 4000baf4: 7f ff ff b4 call 4000b9c4 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000baf8: 01 00 00 00 nop <== NOT EXECUTED _Heap_Get_free_information( the_heap, info ); 4000bafc: 10 80 00 32 b 4000bbc4 <_Protected_heap_Get_free_information+0x1cc> <== NOT EXECUTED 4000bb00: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4000bb04: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 4000bb08: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 4000bb0c: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 4000bb10: c2 24 20 60 st %g1, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 4000bb14: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4000bb18: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000bb1c: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 4000bb20: 30 80 00 0f b,a 4000bb5c <_Protected_heap_Get_free_information+0x164> <== NOT EXECUTED /* * 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 ) ) { 4000bb24: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 4000bb28: 32 80 00 13 bne,a 4000bb74 <_Protected_heap_Get_free_information+0x17c> <== NOT EXECUTED 4000bb2c: 21 10 00 ec sethi %hi(0x4003b000), %l0 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4000bb30: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 ! 4003b050 <_Debug_Level> <== NOT EXECUTED 4000bb34: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000bb38: 22 80 00 07 be,a 4000bb54 <_Protected_heap_Get_free_information+0x15c> <== NOT EXECUTED 4000bb3c: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 4000bb40: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4000bb44: 32 80 00 0c bne,a 4000bb74 <_Protected_heap_Get_free_information+0x17c> <== NOT EXECUTED 4000bb48: 21 10 00 ec sethi %hi(0x4003b000), %l0 <== NOT EXECUTED 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; 4000bb4c: 10 80 00 08 b 4000bb6c <_Protected_heap_Get_free_information+0x174> <== NOT EXECUTED 4000bb50: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED * 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++; 4000bb54: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000bb58: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 4000bb5c: 7f ff e0 1b call 40003bc8 <== NOT EXECUTED 4000bb60: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000bb64: 10 80 00 18 b 4000bbc4 <_Protected_heap_Get_free_information+0x1cc> <== NOT EXECUTED 4000bb68: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 4000bb6c: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 4000bb70: 30 bf ff fb b,a 4000bb5c <_Protected_heap_Get_free_information+0x164> <== NOT EXECUTED void _Protected_heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { _RTEMS_Lock_allocator(); 4000bb74: c6 04 20 44 ld [ %l0 + 0x44 ], %g3 <== NOT EXECUTED 4000bb78: 03 10 00 ec sethi %hi(0x4003b000), %g1 <== NOT EXECUTED 4000bb7c: da 00 e0 08 ld [ %g3 + 8 ], %o5 <== NOT EXECUTED 4000bb80: c8 00 60 4c ld [ %g1 + 0x4c ], %g4 <== NOT EXECUTED 4000bb84: 05 10 00 eb sethi %hi(0x4003ac00), %g2 <== NOT EXECUTED 4000bb88: c2 00 a3 70 ld [ %g2 + 0x370 ], %g1 ! 4003af70 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000bb8c: da 21 20 20 st %o5, [ %g4 + 0x20 ] <== NOT EXECUTED 4000bb90: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000bb94: c2 20 a3 70 st %g1, [ %g2 + 0x370 ] <== NOT EXECUTED 4000bb98: 82 00 e0 10 add %g3, 0x10, %g1 <== NOT EXECUTED 4000bb9c: c2 21 20 44 st %g1, [ %g4 + 0x44 ] <== NOT EXECUTED 4000bba0: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 4000bba4: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 4000bba8: 7f ff e0 08 call 40003bc8 <== NOT EXECUTED 4000bbac: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000bbb0: d0 04 20 44 ld [ %l0 + 0x44 ], %o0 <== NOT EXECUTED 4000bbb4: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000bbb8: 7f ff f9 05 call 40009fcc <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 4000bbbc: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED _Heap_Get_free_information( the_heap, info ); 4000bbc0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000bbc4: 40 00 34 d0 call 40018f04 <_Heap_Get_free_information> <== NOT EXECUTED 4000bbc8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000bbcc: 05 10 00 eb sethi %hi(0x4003ac00), %g2 <== NOT EXECUTED 4000bbd0: c2 00 a3 70 ld [ %g2 + 0x370 ], %g1 ! 4003af70 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000bbd4: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000bbd8: c2 20 a3 70 st %g1, [ %g2 + 0x370 ] <== NOT EXECUTED _RTEMS_Unlock_allocator(); 4000bbdc: 03 10 00 ec sethi %hi(0x4003b000), %g1 <== NOT EXECUTED 4000bbe0: d0 00 60 44 ld [ %g1 + 0x44 ], %o0 ! 4003b044 <_RTEMS_Allocator_Mutex> <== NOT EXECUTED 4000bbe4: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000bbe8: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 4000bbec: 7f ff f9 1a call 4000a054 <_CORE_mutex_Surrender> <== NOT EXECUTED 4000bbf0: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED 4000bbf4: 7f ff ff 74 call 4000b9c4 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000bbf8: 81 e8 00 00 restore <== NOT EXECUTED 4000bbfc: 01 00 00 00 nop 40008478 <_Protected_heap_Resize_block>: boolean _Protected_heap_Resize_block( Heap_Control *the_heap, void *starting_address, size_t size ) { 40008478: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED Heap_Resize_status status; uint32_t old_mem_size; uint32_t avail_mem_size; _RTEMS_Lock_allocator(); 4000847c: 7f ff e6 37 call 40001d58 <== NOT EXECUTED 40008480: 01 00 00 00 nop <== NOT EXECUTED 40008484: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED 40008488: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 4000848c: c2 00 62 20 ld [ %g1 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40008490: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008494: 02 80 00 0b be 400084c0 <_Protected_heap_Resize_block+0x48> <== NOT EXECUTED 40008498: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 4000849c: 03 10 00 68 sethi %hi(0x4001a000), %g1 <== NOT EXECUTED 400084a0: c2 00 60 00 ld [ %g1 ], %g1 <== NOT EXECUTED 400084a4: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 400084a8: 08 80 00 05 bleu 400084bc <_Protected_heap_Resize_block+0x44> <== NOT EXECUTED 400084ac: 90 10 20 00 clr %o0 <== NOT EXECUTED 400084b0: 92 10 20 00 clr %o1 <== NOT EXECUTED 400084b4: 7f ff fb 41 call 400071b8 <_Internal_error_Occurred> <== NOT EXECUTED 400084b8: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 400084bc: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 400084c0: e0 00 62 f4 ld [ %g1 + 0x2f4 ], %l0 ! 40019ef4 <_RTEMS_Allocator_Mutex> <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 400084c4: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 400084c8: c4 00 62 fc ld [ %g1 + 0x2fc ], %g2 ! 40019efc <_Thread_Executing> <== NOT EXECUTED executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 400084cc: c0 20 a0 34 clr [ %g2 + 0x34 ] <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 400084d0: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 400084d4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400084d8: 22 80 00 33 be,a 400085a4 <_Protected_heap_Resize_block+0x12c> <== NOT EXECUTED 400084dc: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 400084e0: c0 24 20 60 clr [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 400084e4: c2 00 a0 08 ld [ %g2 + 8 ], %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 400084e8: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 <== NOT EXECUTED 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; 400084ec: c2 24 20 70 st %g1, [ %l0 + 0x70 ] <== NOT EXECUTED 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; 400084f0: c4 24 20 6c st %g2, [ %l0 + 0x6c ] <== NOT EXECUTED the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 400084f4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 400084f8: 80 a0 e0 02 cmp %g3, 2 <== NOT EXECUTED 400084fc: 02 80 00 05 be 40008510 <_Protected_heap_Resize_block+0x98> <== NOT EXECUTED 40008500: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED 40008504: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 40008508: 32 80 00 06 bne,a 40008520 <_Protected_heap_Resize_block+0xa8> <== NOT EXECUTED 4000850c: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40008510: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40008514: 82 00 60 01 inc %g1 <== NOT EXECUTED 40008518: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000851c: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 <== NOT EXECUTED 40008520: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 40008524: 22 80 00 03 be,a 40008530 <_Protected_heap_Resize_block+0xb8> <== NOT EXECUTED 40008528: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED _ISR_Enable( level ); 4000852c: 30 80 00 2c b,a 400085dc <_Protected_heap_Resize_block+0x164> <== NOT EXECUTED { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 40008530: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 40008534: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40008538: 12 80 00 03 bne 40008544 <_Protected_heap_Resize_block+0xcc> <== NOT EXECUTED 4000853c: 01 00 00 00 nop <== NOT EXECUTED _ISR_Enable( level ); 40008540: 30 80 00 27 b,a 400085dc <_Protected_heap_Resize_block+0x164> <== NOT EXECUTED return 0; } if ( current > ceiling ) { 40008544: 08 80 00 10 bleu 40008584 <_Protected_heap_Resize_block+0x10c> <== NOT EXECUTED 40008548: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000854c: 05 10 00 67 sethi %hi(0x40019c00), %g2 <== NOT EXECUTED 40008550: c2 00 a2 20 ld [ %g2 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40008554: 82 00 60 01 inc %g1 <== NOT EXECUTED 40008558: c2 20 a2 20 st %g1, [ %g2 + 0x220 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 4000855c: 7f ff e6 03 call 40001d68 <== NOT EXECUTED 40008560: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED _Thread_Change_priority( 40008564: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 40008568: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 4000856c: 40 00 00 4c call 4000869c <_Thread_Change_priority> <== NOT EXECUTED 40008570: 94 10 20 00 clr %o2 <== NOT EXECUTED the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 40008574: 7f ff ff b4 call 40008444 <_Thread_Enable_dispatch> <== NOT EXECUTED 40008578: 01 00 00 00 nop <== NOT EXECUTED status = _Heap_Resize_block( 4000857c: 10 80 00 32 b 40008644 <_Protected_heap_Resize_block+0x1cc> <== NOT EXECUTED 40008580: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 40008584: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 40008588: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 4000858c: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 40008590: c2 24 20 60 st %g1, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 40008594: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40008598: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000859c: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 400085a0: 30 80 00 0f b,a 400085dc <_Protected_heap_Resize_block+0x164> <== NOT EXECUTED /* * 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 ) ) { 400085a4: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400085a8: 32 80 00 13 bne,a 400085f4 <_Protected_heap_Resize_block+0x17c> <== NOT EXECUTED 400085ac: 21 10 00 67 sethi %hi(0x40019c00), %l0 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 400085b0: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 ! 40019c50 <_PathLocale> <== NOT EXECUTED 400085b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400085b8: 22 80 00 07 be,a 400085d4 <_Protected_heap_Resize_block+0x15c> <== NOT EXECUTED 400085bc: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 400085c0: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 400085c4: 12 80 00 0c bne 400085f4 <_Protected_heap_Resize_block+0x17c> <== NOT EXECUTED 400085c8: 21 10 00 67 sethi %hi(0x40019c00), %l0 <== NOT EXECUTED 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; 400085cc: 10 80 00 08 b 400085ec <_Protected_heap_Resize_block+0x174> <== NOT EXECUTED 400085d0: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED * 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++; 400085d4: 82 00 60 01 inc %g1 <== NOT EXECUTED 400085d8: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 400085dc: 7f ff e5 e3 call 40001d68 <== NOT EXECUTED 400085e0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400085e4: 10 80 00 18 b 40008644 <_Protected_heap_Resize_block+0x1cc> <== NOT EXECUTED 400085e8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 400085ec: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 400085f0: 30 bf ff fb b,a 400085dc <_Protected_heap_Resize_block+0x164> <== NOT EXECUTED { Heap_Resize_status status; uint32_t old_mem_size; uint32_t avail_mem_size; _RTEMS_Lock_allocator(); 400085f4: c6 04 22 f4 ld [ %l0 + 0x2f4 ], %g3 <== NOT EXECUTED 400085f8: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 400085fc: da 00 e0 08 ld [ %g3 + 8 ], %o5 <== NOT EXECUTED 40008600: c8 00 62 fc ld [ %g1 + 0x2fc ], %g4 <== NOT EXECUTED 40008604: 05 10 00 67 sethi %hi(0x40019c00), %g2 <== NOT EXECUTED 40008608: c2 00 a2 20 ld [ %g2 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000860c: da 21 20 20 st %o5, [ %g4 + 0x20 ] <== NOT EXECUTED 40008610: 82 00 60 01 inc %g1 <== NOT EXECUTED 40008614: c2 20 a2 20 st %g1, [ %g2 + 0x220 ] <== NOT EXECUTED 40008618: 82 00 e0 10 add %g3, 0x10, %g1 <== NOT EXECUTED 4000861c: c2 21 20 44 st %g1, [ %g4 + 0x44 ] <== NOT EXECUTED 40008620: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40008624: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 40008628: 7f ff e5 d0 call 40001d68 <== NOT EXECUTED 4000862c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40008630: d0 04 22 f4 ld [ %l0 + 0x2f4 ], %o0 <== NOT EXECUTED 40008634: 92 10 20 00 clr %o1 <== NOT EXECUTED 40008638: 7f ff f8 c6 call 40006950 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 4000863c: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED status = _Heap_Resize_block( 40008640: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40008644: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40008648: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 4000864c: 96 07 bf f4 add %fp, -12, %o3 <== NOT EXECUTED 40008650: 40 00 10 f7 call 4000ca2c <_Heap_Resize_block> <== NOT EXECUTED 40008654: 98 07 bf f0 add %fp, -16, %o4 <== NOT EXECUTED 40008658: 05 10 00 67 sethi %hi(0x40019c00), %g2 <== NOT EXECUTED 4000865c: c2 00 a2 20 ld [ %g2 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40008660: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 40008664: 82 00 60 01 inc %g1 <== NOT EXECUTED 40008668: c2 20 a2 20 st %g1, [ %g2 + 0x220 ] <== NOT EXECUTED the_heap, starting_address, size, &old_mem_size, &avail_mem_size ); _RTEMS_Unlock_allocator(); 4000866c: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 40008670: d0 00 62 f4 ld [ %g1 + 0x2f4 ], %o0 ! 40019ef4 <_RTEMS_Allocator_Mutex> <== NOT EXECUTED 40008674: 94 10 20 00 clr %o2 <== NOT EXECUTED 40008678: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 4000867c: 7f ff f8 d7 call 400069d8 <_CORE_mutex_Surrender> <== NOT EXECUTED 40008680: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED 40008684: 7f ff ff 70 call 40008444 <_Thread_Enable_dispatch> <== NOT EXECUTED 40008688: 01 00 00 00 nop <== NOT EXECUTED return (status == HEAP_RESIZE_SUCCESSFUL); } 4000868c: 80 a0 00 10 cmp %g0, %l0 <== NOT EXECUTED 40008690: b0 60 3f ff subx %g0, -1, %i0 <== NOT EXECUTED 40008694: 81 c7 e0 08 ret <== NOT EXECUTED 40008698: 81 e8 00 00 restore <== NOT EXECUTED 4000c70c <_RTEMS_tasks_Delete_extension>: User_extensions_routine _RTEMS_tasks_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { 4000c70c: 9d e3 bf 98 save %sp, -104, %sp /* * Free per task variable memory */ tvp = deleted->task_variables; 4000c710: e0 06 61 7c ld [ %i1 + 0x17c ], %l0 deleted->task_variables = NULL; while (tvp) { next = (rtems_task_variable_t *)tvp->next; if (_Thread_Is_executing(deleted)) { 4000c714: 25 10 00 67 sethi %hi(0x40019c00), %l2 /* * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; 4000c718: 10 80 00 18 b 4000c778 <_RTEMS_tasks_Delete_extension+0x6c> 4000c71c: c0 26 61 7c clr [ %i1 + 0x17c ] 4000c720: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 <== NOT EXECUTED while (tvp) { next = (rtems_task_variable_t *)tvp->next; if (_Thread_Is_executing(deleted)) { 4000c724: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 4000c728: 12 80 00 0c bne 4000c758 <_RTEMS_tasks_Delete_extension+0x4c> <== NOT EXECUTED 4000c72c: e2 04 00 00 ld [ %l0 ], %l1 <== NOT EXECUTED if (tvp->dtor) 4000c730: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000c734: 22 80 00 06 be,a 4000c74c <_RTEMS_tasks_Delete_extension+0x40> <== NOT EXECUTED 4000c738: c4 04 20 04 ld [ %l0 + 4 ], %g2 <== NOT EXECUTED (*tvp->dtor)(*tvp->ptr); 4000c73c: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED 4000c740: 9f c0 80 00 call %g2 <== NOT EXECUTED 4000c744: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED *tvp->ptr = tvp->gval; 4000c748: c4 04 20 04 ld [ %l0 + 4 ], %g2 <== NOT EXECUTED 4000c74c: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 4000c750: 10 80 00 07 b 4000c76c <_RTEMS_tasks_Delete_extension+0x60> <== NOT EXECUTED 4000c754: c2 20 80 00 st %g1, [ %g2 ] <== NOT EXECUTED } else { if (tvp->dtor) 4000c758: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000c75c: 02 80 00 05 be 4000c770 <_RTEMS_tasks_Delete_extension+0x64> <== NOT EXECUTED 4000c760: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED (*tvp->dtor)(tvp->tval); 4000c764: 9f c0 80 00 call %g2 <== NOT EXECUTED 4000c768: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED } _Workspace_Free( tvp ); 4000c76c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000c770: 7f ff ff e0 call 4000c6f0 <_Workspace_Free> <== NOT EXECUTED 4000c774: a0 10 00 11 mov %l1, %l0 <== NOT EXECUTED * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 4000c778: 80 a4 20 00 cmp %l0, 0 4000c77c: 12 bf ff e9 bne 4000c720 <_RTEMS_tasks_Delete_extension+0x14> 4000c780: c2 04 a2 fc ld [ %l2 + 0x2fc ], %g1 /* * Free API specific memory */ (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] ); 4000c784: 7f ff ff db call 4000c6f0 <_Workspace_Free> 4000c788: d0 06 61 6c ld [ %i1 + 0x16c ], %o0 deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL; 4000c78c: c0 26 61 6c clr [ %i1 + 0x16c ] } 4000c790: 81 c7 e0 08 ret 4000c794: 81 e8 00 00 restore 40006038 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 40006038: 9d e3 bf 90 save %sp, -112, %sp rtems_status_code return_value; rtems_initialization_tasks_table *user_tasks; rtems_api_configuration_table *api_configuration; api_configuration = _Configuration_Table->RTEMS_api_configuration; 4000603c: 03 10 00 67 sethi %hi(0x40019c00), %g1 40006040: c2 00 62 e0 ld [ %g1 + 0x2e0 ], %g1 ! 40019ee0 <_Configuration_Table> 40006044: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 /* * NOTE: This is slightly different from the Ada implementation. */ user_tasks = api_configuration->User_initialization_tasks_table; 40006048: d0 00 60 28 ld [ %g1 + 0x28 ], %o0 maximum = api_configuration->number_of_initialization_tasks; if ( !user_tasks || maximum == 0 ) 4000604c: 80 a2 20 00 cmp %o0, 0 40006050: 02 80 00 25 be 400060e4 <_RTEMS_tasks_Initialize_user_tasks_body+0xac> 40006054: e4 00 60 24 ld [ %g1 + 0x24 ], %l2 40006058: 80 a4 a0 00 cmp %l2, 0 4000605c: 02 80 00 22 be 400060e4 <_RTEMS_tasks_Initialize_user_tasks_body+0xac> 40006060: a0 10 00 08 mov %o0, %l0 return; 40006064: a2 10 20 00 clr %l1 for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 40006068: 10 80 00 1c b 400060d8 <_RTEMS_tasks_Initialize_user_tasks_body+0xa0> 4000606c: a6 07 bf f4 add %fp, -12, %l3 40006070: d6 04 20 14 ld [ %l0 + 0x14 ], %o3 40006074: d8 04 20 0c ld [ %l0 + 0xc ], %o4 40006078: d2 04 20 08 ld [ %l0 + 8 ], %o1 4000607c: d4 04 20 04 ld [ %l0 + 4 ], %o2 40006080: d0 04 00 00 ld [ %l0 ], %o0 40006084: 7f ff ff 34 call 40005d54 40006088: a2 04 60 01 inc %l1 user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 4000608c: 80 a2 20 00 cmp %o0, 0 40006090: 22 80 00 07 be,a 400060ac <_RTEMS_tasks_Initialize_user_tasks_body+0x74> 40006094: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); 40006098: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 4000609c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 400060a0: 40 00 04 46 call 400071b8 <_Internal_error_Occurred> <== NOT EXECUTED 400060a4: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED return_value = rtems_task_start( 400060a8: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 <== NOT EXECUTED 400060ac: d4 04 20 18 ld [ %l0 + 0x18 ], %o2 400060b0: d0 07 bf f4 ld [ %fp + -12 ], %o0 400060b4: 40 00 00 1b call 40006120 400060b8: a0 04 20 1c add %l0, 0x1c, %l0 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 400060bc: 80 a2 20 00 cmp %o0, 0 400060c0: 02 80 00 07 be 400060dc <_RTEMS_tasks_Initialize_user_tasks_body+0xa4> 400060c4: 80 a4 40 12 cmp %l1, %l2 _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); 400060c8: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 400060cc: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 400060d0: 40 00 04 3a call 400071b8 <_Internal_error_Occurred> <== NOT EXECUTED 400060d4: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED maximum = api_configuration->number_of_initialization_tasks; if ( !user_tasks || maximum == 0 ) return; for ( index=0 ; index < maximum ; index++ ) { 400060d8: 80 a4 40 12 cmp %l1, %l2 400060dc: 12 bf ff e5 bne 40006070 <_RTEMS_tasks_Initialize_user_tasks_body+0x38> 400060e0: 9a 10 00 13 mov %l3, %o5 400060e4: 81 c7 e0 08 ret 400060e8: 81 e8 00 00 restore 40006c48 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 40006c48: 9d e3 bf 90 save %sp, -112, %sp 40006c4c: 11 10 00 7a sethi %hi(0x4001e800), %o0 40006c50: 92 10 00 18 mov %i0, %o1 40006c54: 90 12 22 68 or %o0, 0x268, %o0 40006c58: 40 00 09 5f call 400091d4 <_Objects_Get> 40006c5c: 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 ) { 40006c60: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006c64: 80 a0 60 00 cmp %g1, 0 40006c68: 12 80 00 20 bne 40006ce8 <_Rate_monotonic_Timeout+0xa0> 40006c6c: b0 10 00 08 mov %o0, %i0 case OBJECTS_REMOTE: /* impossible */ case OBJECTS_ERROR: break; case OBJECTS_LOCAL: the_thread = the_period->owner; 40006c70: d0 02 20 50 ld [ %o0 + 0x50 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 40006c74: 03 00 00 10 sethi %hi(0x4000), %g1 40006c78: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 40006c7c: 80 88 80 01 btst %g2, %g1 40006c80: 22 80 00 0c be,a 40006cb0 <_Rate_monotonic_Timeout+0x68> 40006c84: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 40006c88: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40006c8c: c2 06 20 08 ld [ %i0 + 8 ], %g1 40006c90: 80 a0 80 01 cmp %g2, %g1 40006c94: 32 80 00 07 bne,a 40006cb0 <_Rate_monotonic_Timeout+0x68> 40006c98: 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 ); 40006c9c: 13 04 00 ff sethi %hi(0x1003fc00), %o1 40006ca0: 40 00 0d 87 call 4000a2bc <_Thread_Clear_state> 40006ca4: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); 40006ca8: 10 80 00 08 b 40006cc8 <_Rate_monotonic_Timeout+0x80> 40006cac: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 40006cb0: 80 a0 60 01 cmp %g1, 1 40006cb4: 12 80 00 08 bne 40006cd4 <_Rate_monotonic_Timeout+0x8c> 40006cb8: 82 10 20 04 mov 4, %g1 the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); 40006cbc: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 <== NOT EXECUTED the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _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; 40006cc0: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED 40006cc4: c2 26 20 38 st %g1, [ %i0 + 0x38 ] <== NOT EXECUTED _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); 40006cc8: 7f ff ff d8 call 40006c28 <_Watchdog_Insert_ticks> 40006ccc: 90 06 20 10 add %i0, 0x10, %o0 40006cd0: 30 80 00 02 b,a 40006cd8 <_Rate_monotonic_Timeout+0x90> } else the_period->state = RATE_MONOTONIC_EXPIRED; 40006cd4: 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; 40006cd8: 05 10 00 7b sethi %hi(0x4001ec00), %g2 40006cdc: c2 00 a0 00 ld [ %g2 ], %g1 40006ce0: 82 00 7f ff add %g1, -1, %g1 40006ce4: c2 20 a0 00 st %g1, [ %g2 ] 40006ce8: 81 c7 e0 08 ret 40006cec: 81 e8 00 00 restore 400085bc <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 400085bc: 9d e3 bf 98 save %sp, -104, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400085c0: 03 10 00 9a sethi %hi(0x40026800), %g1 400085c4: c4 00 62 50 ld [ %g1 + 0x250 ], %g2 ! 40026a50 <_Thread_Dispatch_disable_level> 400085c8: 84 00 a0 01 inc %g2 400085cc: c4 20 62 50 st %g2, [ %g1 + 0x250 ] _Thread_Disable_dispatch(); _TOD_Deactivate(); if ( time->tv_sec < _TOD_Seconds_since_epoch ) 400085d0: 03 10 00 9a sethi %hi(0x40026800), %g1 400085d4: d2 06 00 00 ld [ %i0 ], %o1 400085d8: c2 00 63 08 ld [ %g1 + 0x308 ], %g1 400085dc: 80 a2 40 01 cmp %o1, %g1 400085e0: 36 80 00 05 bge,a 400085f4 <_TOD_Set+0x38> 400085e4: 92 22 40 01 sub %o1, %g1, %o1 _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, 400085e8: 92 20 40 09 sub %g1, %o1, %o1 400085ec: 10 80 00 03 b 400085f8 <_TOD_Set+0x3c> 400085f0: 90 10 20 01 mov 1, %o0 _TOD_Seconds_since_epoch - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, 400085f4: 90 10 20 00 clr %o0 400085f8: 7f ff ff e9 call 4000859c <_Watchdog_Adjust_seconds> 400085fc: 01 00 00 00 nop time->tv_sec - _TOD_Seconds_since_epoch ); /* POSIX format TOD (timespec) */ _TOD_Now = *time; 40008600: c4 06 00 00 ld [ %i0 ], %g2 40008604: 03 10 00 9a sethi %hi(0x40026800), %g1 40008608: c4 20 63 08 st %g2, [ %g1 + 0x308 ] ! 40026b08 <_TOD_Now> 4000860c: c4 06 20 04 ld [ %i0 + 4 ], %g2 40008610: 82 10 63 08 or %g1, 0x308, %g1 40008614: c4 20 60 04 st %g2, [ %g1 + 4 ] _TOD_Is_set = TRUE; 40008618: 84 10 20 01 mov 1, %g2 4000861c: 03 10 00 9a sethi %hi(0x40026800), %g1 40008620: c4 20 62 8c st %g2, [ %g1 + 0x28c ] ! 40026a8c <_TOD_Is_set> #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008624: 05 10 00 9a sethi %hi(0x40026800), %g2 40008628: c2 00 a2 50 ld [ %g2 + 0x250 ], %g1 ! 40026a50 <_Thread_Dispatch_disable_level> 4000862c: 82 00 7f ff add %g1, -1, %g1 40008630: c2 20 a2 50 st %g1, [ %g2 + 0x250 ] 40008634: c2 00 a2 50 ld [ %g2 + 0x250 ], %g1 40008638: 80 a0 60 00 cmp %g1, 0 4000863c: 12 80 00 04 bne 4000864c <_TOD_Set+0x90> 40008640: 01 00 00 00 nop _Thread_Dispatch(); 40008644: 40 00 07 e1 call 4000a5c8 <_Thread_Dispatch> <== NOT EXECUTED 40008648: 81 e8 00 00 restore <== NOT EXECUTED 4000864c: 81 c7 e0 08 ret 40008650: 81 e8 00 00 restore 400089dc <_Thread_Create_idle>: */ const char *_Thread_Idle_name = "IDLE"; void _Thread_Create_idle( void ) { 400089dc: 9d e3 bf 80 save %sp, -128, %sp * This routine allocates an internal thread. */ RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Internal_allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_Thread_Internal_information ); 400089e0: 11 10 00 67 sethi %hi(0x40019c00), %o0 400089e4: 7f ff fa 22 call 4000726c <_Objects_Allocate> 400089e8: 90 12 23 b0 or %o0, 0x3b0, %o0 ! 40019fb0 <_Thread_Internal_information> idle = (void *) _CPU_Thread_Idle_body; #else idle = (void *) _Thread_Idle_body; #endif if ( _CPU_Table.idle_task ) 400089ec: 03 10 00 67 sethi %hi(0x40019c00), %g1 400089f0: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 40019e40 <_CPU_Table+0xc> * 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(); 400089f4: 03 10 00 68 sethi %hi(0x4001a000), %g1 400089f8: d0 20 60 08 st %o0, [ %g1 + 8 ] ! 4001a008 <_Thread_Idle> idle = (void *) _CPU_Thread_Idle_body; #else idle = (void *) _Thread_Idle_body; #endif if ( _CPU_Table.idle_task ) 400089fc: 80 a0 a0 00 cmp %g2, 0 40008a00: 03 10 00 23 sethi %hi(0x40008c00), %g1 40008a04: 02 80 00 03 be 40008a10 <_Thread_Create_idle+0x34> 40008a08: b4 10 60 8c or %g1, 0x8c, %i2 ! 40008c8c <_Thread_Idle_body> idle = _CPU_Table.idle_task; 40008a0c: b4 10 00 02 mov %g2, %i2 <== NOT EXECUTED idle_task_stack_size = _CPU_Table.idle_task_stack_size; 40008a10: 03 10 00 67 sethi %hi(0x40019c00), %g1 40008a14: d6 00 62 48 ld [ %g1 + 0x248 ], %o3 ! 40019e48 <_CPU_Table+0x14> if ( idle_task_stack_size < STACK_MINIMUM_SIZE ) 40008a18: 80 a2 ef ff cmp %o3, 0xfff 40008a1c: 28 80 00 02 bleu,a 40008a24 <_Thread_Create_idle+0x48> 40008a20: 17 00 00 04 sethi %hi(0x1000), %o3 idle_task_stack_size = STACK_MINIMUM_SIZE; _Thread_Initialize( 40008a24: 03 10 00 64 sethi %hi(0x40019000), %g1 40008a28: c2 00 61 18 ld [ %g1 + 0x118 ], %g1 ! 40019118 <_Thread_Idle_name> 40008a2c: 92 10 00 08 mov %o0, %o1 40008a30: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 40008a34: 82 10 20 01 mov 1, %g1 40008a38: c0 23 a0 60 clr [ %sp + 0x60 ] 40008a3c: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 40008a40: c0 23 a0 64 clr [ %sp + 0x64 ] 40008a44: c0 23 a0 68 clr [ %sp + 0x68 ] 40008a48: 11 10 00 67 sethi %hi(0x40019c00), %o0 40008a4c: 94 10 20 00 clr %o2 40008a50: 90 12 23 b0 or %o0, 0x3b0, %o0 40008a54: 98 10 20 00 clr %o4 40008a58: 40 00 00 8e call 40008c90 <_Thread_Initialize> 40008a5c: 9a 10 20 ff mov 0xff, %o5 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 40008a60: 03 10 00 68 sethi %hi(0x4001a000), %g1 40008a64: c4 00 60 08 ld [ %g1 + 8 ], %g2 ! 4001a008 <_Thread_Idle> 40008a68: 03 10 00 67 sethi %hi(0x40019c00), %g1 40008a6c: c4 20 62 fc st %g2, [ %g1 + 0x2fc ] ! 40019efc <_Thread_Executing> 40008a70: 03 10 00 67 sethi %hi(0x40019c00), %g1 _Thread_Executing = _Thread_Idle; _Thread_Start( 40008a74: 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 = 40008a78: c4 20 62 d4 st %g2, [ %g1 + 0x2d4 ] _Thread_Executing = _Thread_Idle; _Thread_Start( 40008a7c: b2 10 20 00 clr %i1 40008a80: b6 10 20 00 clr %i3 40008a84: 40 00 03 d8 call 400099e4 <_Thread_Start> 40008a88: 99 e8 20 00 restore %g0, 0, %o4 40008a8c: 01 00 00 00 nop 40008a90 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored ) { 40008a90: 9d e3 bf 90 save %sp, -112, %sp uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 40008a94: 92 96 20 00 orcc %i0, 0, %o1 40008a98: 12 80 00 0a bne 40008ac0 <_Thread_Delay_ended+0x30> 40008a9c: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008aa0: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 40008aa4: c4 00 62 20 ld [ %g1 + 0x220 ], %g2 ! 40019e20 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40008aa8: 84 00 a0 01 inc %g2 <== NOT EXECUTED 40008aac: c4 20 62 20 st %g2, [ %g1 + 0x220 ] <== NOT EXECUTED Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 40008ab0: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 40008ab4: d0 00 62 fc ld [ %g1 + 0x2fc ], %o0 ! 40019efc <_Thread_Executing> <== NOT EXECUTED 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; 40008ab8: 10 80 00 19 b 40008b1c <_Thread_Delay_ended+0x8c> <== NOT EXECUTED 40008abc: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 40008ac0: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 40008ac4: 80 a0 a0 04 cmp %g2, 4 40008ac8: 18 80 00 06 bgu 40008ae0 <_Thread_Delay_ended+0x50> 40008acc: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40008ad0: 83 32 60 1b srl %o1, 0x1b, %g1 40008ad4: 80 a0 60 01 cmp %g1, 1 40008ad8: 02 80 00 05 be 40008aec <_Thread_Delay_ended+0x5c> 40008adc: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; 40008ae0: 90 10 20 00 clr %o0 <== NOT EXECUTED 40008ae4: 10 80 00 0e b 40008b1c <_Thread_Delay_ended+0x8c> <== NOT EXECUTED 40008ae8: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40008aec: 83 28 a0 02 sll %g2, 2, %g1 40008af0: 05 10 00 67 sethi %hi(0x40019c00), %g2 40008af4: 84 10 a1 80 or %g2, 0x180, %g2 ! 40019d80 <_Objects_Information_table> 40008af8: c2 00 80 01 ld [ %g2 + %g1 ], %g1 40008afc: d0 00 60 04 ld [ %g1 + 4 ], %o0 if ( !information ) { 40008b00: 80 a2 20 00 cmp %o0, 0 40008b04: 12 80 00 04 bne 40008b14 <_Thread_Delay_ended+0x84> 40008b08: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; 40008b0c: 10 80 00 04 b 40008b1c <_Thread_Delay_ended+0x8c> <== NOT EXECUTED 40008b10: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40008b14: 7f ff fb 1a call 4000777c <_Objects_Get> 40008b18: 94 07 bf f4 add %fp, -12, %o2 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 40008b1c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40008b20: 80 a0 60 00 cmp %g1, 0 40008b24: 12 80 00 08 bne 40008b44 <_Thread_Delay_ended+0xb4> 40008b28: 13 04 00 ff sethi %hi(0x1003fc00), %o1 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 40008b2c: 7f ff ff 4e call 40008864 <_Thread_Clear_state> 40008b30: 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; 40008b34: 05 10 00 67 sethi %hi(0x40019c00), %g2 40008b38: c2 00 a2 20 ld [ %g2 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> 40008b3c: 82 00 7f ff add %g1, -1, %g1 40008b40: c2 20 a2 20 st %g1, [ %g2 + 0x220 ] 40008b44: 81 c7 e0 08 ret 40008b48: 81 e8 00 00 restore 4000de7c <_Thread_Evaluate_mode>: boolean _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing; 4000de7c: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000de80: c4 00 62 fc ld [ %g1 + 0x2fc ], %g2 ! 40019efc <_Thread_Executing> if ( !_States_Is_ready( executing->current_state ) || 4000de84: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4000de88: 80 a0 60 00 cmp %g1, 0 4000de8c: 32 80 00 0b bne,a 4000deb8 <_Thread_Evaluate_mode+0x3c> 4000de90: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED 4000de94: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000de98: c2 00 62 d4 ld [ %g1 + 0x2d4 ], %g1 ! 40019ed4 <_Thread_Heir> 4000de9c: 80 a0 80 01 cmp %g2, %g1 4000dea0: 02 80 00 0b be 4000decc <_Thread_Evaluate_mode+0x50> 4000dea4: 01 00 00 00 nop 4000dea8: c2 00 a0 7c ld [ %g2 + 0x7c ], %g1 4000deac: 80 a0 60 00 cmp %g1, 0 4000deb0: 02 80 00 07 be 4000decc <_Thread_Evaluate_mode+0x50> 4000deb4: 84 10 20 01 mov 1, %g2 ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { _Context_Switch_necessary = TRUE; 4000deb8: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000debc: 90 10 20 01 mov 1, %o0 4000dec0: c4 20 63 0c st %g2, [ %g1 + 0x30c ] 4000dec4: 81 c3 e0 08 retl 4000dec8: 01 00 00 00 nop return TRUE; } return FALSE; } 4000decc: 81 c3 e0 08 retl 4000ded0: 90 10 20 00 clr %o0 ! 0 4000ded4 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4000ded4: 9d e3 bf 98 save %sp, -104, %sp #endif #if defined(__USE__MAIN__) extern void _main(void); #endif executing = _Thread_Executing; 4000ded8: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000dedc: f4 00 62 fc ld [ %g1 + 0x2fc ], %i2 ! 40019efc <_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(); 4000dee0: 3f 10 00 37 sethi %hi(0x4000dc00), %i7 4000dee4: be 17 e2 d4 or %i7, 0x2d4, %i7 ! 4000ded4 <_Thread_Handler> * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; _ISR_Set_level(level); 4000dee8: d0 06 a0 c4 ld [ %i2 + 0xc4 ], %o0 4000deec: 7f ff cf 9f call 40001d68 4000def0: 91 2a 20 08 sll %o0, 8, %o0 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 4000def4: 05 10 00 67 sethi %hi(0x40019c00), %g2 doneConstructors = 1; 4000def8: 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; 4000defc: f2 08 a0 3c ldub [ %g2 + 0x3c ], %i1 * 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 ); 4000df00: 90 10 00 1a mov %i2, %o0 4000df04: 7f ff ef 70 call 40009cc4 <_User_extensions_Thread_begin> 4000df08: c2 28 a0 3c stb %g1, [ %g2 + 0x3c ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000df0c: 05 10 00 67 sethi %hi(0x40019c00), %g2 4000df10: c2 00 a2 20 ld [ %g2 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> 4000df14: 82 00 7f ff add %g1, -1, %g1 4000df18: c2 20 a2 20 st %g1, [ %g2 + 0x220 ] 4000df1c: c2 00 a2 20 ld [ %g2 + 0x220 ], %g1 4000df20: 80 a0 60 00 cmp %g1, 0 4000df24: 12 80 00 05 bne 4000df38 <_Thread_Handler+0x64> 4000df28: 83 2e 60 18 sll %i1, 0x18, %g1 _Thread_Dispatch(); 4000df2c: 7f ff eb 08 call 40008b4c <_Thread_Dispatch> 4000df30: 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) */ 4000df34: 83 2e 60 18 sll %i1, 0x18, %g1 4000df38: 80 a0 60 00 cmp %g1, 0 4000df3c: 32 80 00 05 bne,a 4000df50 <_Thread_Handler+0x7c> 4000df40: c2 06 a0 ac ld [ %i2 + 0xac ], %g1 _init (); 4000df44: 40 00 2b 0f call 40018b80 <_init> 4000df48: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 4000df4c: c2 06 a0 ac ld [ %i2 + 0xac ], %g1 4000df50: 80 a0 60 01 cmp %g1, 1 4000df54: 22 80 00 0d be,a 4000df88 <_Thread_Handler+0xb4> 4000df58: c2 06 a0 a8 ld [ %i2 + 0xa8 ], %g1 4000df5c: 2a 80 00 09 bcs,a 4000df80 <_Thread_Handler+0xac> 4000df60: c2 06 a0 a8 ld [ %i2 + 0xa8 ], %g1 4000df64: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000df68: 02 80 00 0d be 4000df9c <_Thread_Handler+0xc8> <== NOT EXECUTED 4000df6c: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 4000df70: 12 80 00 14 bne 4000dfc0 <_Thread_Handler+0xec> <== NOT EXECUTED 4000df74: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = 4000df78: 10 80 00 0c b 4000dfa8 <_Thread_Handler+0xd4> <== NOT EXECUTED 4000df7c: c2 06 a0 a8 ld [ %i2 + 0xa8 ], %g1 <== NOT EXECUTED __main (); #endif switch ( executing->Start.prototype ) { case THREAD_START_NUMERIC: executing->Wait.return_argument = 4000df80: 10 80 00 03 b 4000df8c <_Thread_Handler+0xb8> 4000df84: d0 06 a0 b4 ld [ %i2 + 0xb4 ], %o0 (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); break; case THREAD_START_POINTER: executing->Wait.return_argument = 4000df88: d0 06 a0 b0 ld [ %i2 + 0xb0 ], %o0 4000df8c: 9f c0 40 00 call %g1 4000df90: 01 00 00 00 nop executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = 4000df94: 10 80 00 0a b 4000dfbc <_Thread_Handler+0xe8> 4000df98: d0 26 a0 28 st %o0, [ %i2 + 0x28 ] (*(Thread_Entry_pointer) executing->Start.entry_point)( executing->Start.pointer_argument ); break; case THREAD_START_BOTH_POINTER_FIRST: executing->Wait.return_argument = 4000df9c: c2 06 a0 a8 ld [ %i2 + 0xa8 ], %g1 <== NOT EXECUTED 4000dfa0: 10 80 00 04 b 4000dfb0 <_Thread_Handler+0xdc> <== NOT EXECUTED 4000dfa4: d0 1e a0 b0 ldd [ %i2 + 0xb0 ], %o0 <== NOT EXECUTED executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = 4000dfa8: d0 06 a0 b4 ld [ %i2 + 0xb4 ], %o0 <== NOT EXECUTED 4000dfac: d2 06 a0 b0 ld [ %i2 + 0xb0 ], %o1 <== NOT EXECUTED 4000dfb0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000dfb4: 01 00 00 00 nop <== NOT EXECUTED 4000dfb8: d0 26 a0 28 st %o0, [ %i2 + 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 ); 4000dfbc: 90 10 00 1a mov %i2, %o0 4000dfc0: 7f ff ef 64 call 40009d50 <_User_extensions_Thread_exitted> 4000dfc4: b0 10 20 00 clr %i0 _Internal_error_Occurred( 4000dfc8: b2 10 20 01 mov 1, %i1 4000dfcc: 7f ff e4 7b call 400071b8 <_Internal_error_Occurred> 4000dfd0: 95 e8 20 06 restore %g0, 6, %o2 4000dfd4: 01 00 00 00 nop 40008e4c <_Thread_Handler_initialization>: void _Thread_Handler_initialization( uint32_t ticks_per_timeslice, uint32_t maximum_extensions, uint32_t maximum_proxies ) { 40008e4c: 9d e3 bf 90 save %sp, -112, %sp /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( ( _CPU_Table.stack_allocate_hook == 0 ) 40008e50: 03 10 00 67 sethi %hi(0x40019c00), %g1 40008e54: 82 10 62 34 or %g1, 0x234, %g1 ! 40019e34 <_CPU_Table> 40008e58: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 40008e5c: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 40008e60: 80 a0 00 02 cmp %g0, %g2 40008e64: 84 60 3f ff subx %g0, -1, %g2 40008e68: 80 a0 00 01 cmp %g0, %g1 40008e6c: 82 60 3f ff subx %g0, -1, %g1 40008e70: 80 a0 80 01 cmp %g2, %g1 40008e74: 02 80 00 07 be 40008e90 <_Thread_Handler_initialization+0x44> 40008e78: 03 10 00 67 sethi %hi(0x40019c00), %g1 == ( _CPU_Table.stack_free_hook == 0 ) ) ) _Internal_error_Occurred( 40008e7c: 90 10 20 00 clr %o0 <== NOT EXECUTED 40008e80: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40008e84: 7f ff f8 cd call 400071b8 <_Internal_error_Occurred> <== NOT EXECUTED 40008e88: 94 10 20 0f mov 0xf, %o2 <== NOT EXECUTED INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = FALSE; 40008e8c: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 40008e90: c0 20 63 0c clr [ %g1 + 0x30c ] ! 40019f0c <_Context_Switch_necessary> _Thread_Executing = NULL; 40008e94: 03 10 00 67 sethi %hi(0x40019c00), %g1 40008e98: c0 20 62 fc clr [ %g1 + 0x2fc ] ! 40019efc <_Thread_Executing> _Thread_Heir = NULL; 40008e9c: 03 10 00 67 sethi %hi(0x40019c00), %g1 40008ea0: c0 20 62 d4 clr [ %g1 + 0x2d4 ] ! 40019ed4 <_Thread_Heir> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; 40008ea4: 03 10 00 67 sethi %hi(0x40019c00), %g1 40008ea8: c0 20 62 ec clr [ %g1 + 0x2ec ] ! 40019eec <_Thread_Do_post_task_switch_extension> _Thread_Maximum_extensions = maximum_extensions; 40008eac: 03 10 00 67 sethi %hi(0x40019c00), %g1 40008eb0: f2 20 62 e8 st %i1, [ %g1 + 0x2e8 ] ! 40019ee8 <_Thread_Maximum_extensions> _Thread_Ticks_per_timeslice = ticks_per_timeslice; 40008eb4: 03 10 00 67 sethi %hi(0x40019c00), %g1 _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 40008eb8: 90 10 2c 00 mov 0xc00, %o0 40008ebc: 40 00 04 ac call 4000a16c <_Workspace_Allocate_or_fatal_error> 40008ec0: f0 20 61 78 st %i0, [ %g1 + 0x178 ] 40008ec4: 03 10 00 67 sethi %hi(0x40019c00), %g1 40008ec8: 84 10 00 08 mov %o0, %g2 40008ecc: d0 20 61 74 st %o0, [ %g1 + 0x174 ] (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 40008ed0: 86 02 2c 00 add %o0, 0xc00, %g3 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40008ed4: 82 00 a0 04 add %g2, 4, %g1 the_chain->permanent_null = NULL; 40008ed8: c0 20 a0 04 clr [ %g2 + 4 ] the_chain->last = _Chain_Head(the_chain); 40008edc: 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); 40008ee0: c2 20 80 00 st %g1, [ %g2 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40008ee4: 84 00 a0 0c add %g2, 0xc, %g2 40008ee8: 80 a0 80 03 cmp %g2, %g3 40008eec: 12 bf ff fb bne 40008ed8 <_Thread_Handler_initialization+0x8c> 40008ef0: 82 00 a0 04 add %g2, 4, %g1 /* * Initialize this class of objects. */ _Objects_Initialize_information( 40008ef4: 03 10 00 67 sethi %hi(0x40019c00), %g1 40008ef8: c2 00 63 28 ld [ %g1 + 0x328 ], %g1 ! 40019f28 <_System_state_Is_multiprocessing> 40008efc: 96 10 20 02 mov 2, %o3 40008f00: 80 a0 00 01 cmp %g0, %g1 40008f04: 82 10 20 08 mov 8, %g1 40008f08: 96 42 ff ff addx %o3, -1, %o3 40008f0c: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 40008f10: 11 10 00 67 sethi %hi(0x40019c00), %o0 40008f14: 92 10 20 01 mov 1, %o1 40008f18: 90 12 23 b0 or %o0, 0x3b0, %o0 40008f1c: 94 10 20 01 mov 1, %o2 40008f20: 98 10 21 80 mov 0x180, %o4 40008f24: 7f ff fa 3b call 40007810 <_Objects_Initialize_information> 40008f28: 9a 10 20 01 mov 1, %o5 FALSE, /* TRUE if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 40008f2c: 81 c7 e0 08 ret 40008f30: 81 e8 00 00 restore 40008c90 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 40008c90: 9d e3 bf 98 save %sp, -104, %sp /* * Initialize the Ada self pointer */ the_thread->rtems_ada_self = NULL; 40008c94: c0 26 60 80 clr [ %i1 + 0x80 ] /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 40008c98: 80 a6 a0 00 cmp %i2, 0 40008c9c: 12 80 00 10 bne 40008cdc <_Thread_Initialize+0x4c> 40008ca0: e0 07 a0 60 ld [ %fp + 0x60 ], %l0 if ( !_Stack_Is_enough( stack_size ) ) 40008ca4: 80 a6 ef ff cmp %i3, 0xfff 40008ca8: 08 80 00 03 bleu 40008cb4 <_Thread_Initialize+0x24> 40008cac: 13 00 00 04 sethi %hi(0x1000), %o1 40008cb0: 92 10 00 1b mov %i3, %o1 actual_stack_size = STACK_MINIMUM_SIZE; else actual_stack_size = stack_size; actual_stack_size = _Thread_Stack_Allocate( the_thread, actual_stack_size ); 40008cb4: 40 00 03 13 call 40009900 <_Thread_Stack_Allocate> 40008cb8: 90 10 00 19 mov %i1, %o0 if ( !actual_stack_size || actual_stack_size < stack_size ) 40008cbc: 80 a2 20 00 cmp %o0, 0 40008cc0: 02 80 00 1f be 40008d3c <_Thread_Initialize+0xac> 40008cc4: 80 a2 00 1b cmp %o0, %i3 40008cc8: 0a 80 00 1d bcs 40008d3c <_Thread_Initialize+0xac> 40008ccc: 82 10 20 01 mov 1, %g1 return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; 40008cd0: f4 06 60 d8 ld [ %i1 + 0xd8 ], %i2 the_thread->Start.core_allocated_stack = TRUE; 40008cd4: 10 80 00 04 b 40008ce4 <_Thread_Initialize+0x54> 40008cd8: c2 26 60 cc st %g1, [ %i1 + 0xcc ] } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = FALSE; 40008cdc: c0 26 60 cc clr [ %i1 + 0xcc ] <== NOT EXECUTED 40008ce0: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 40008ce4: 03 10 00 67 sethi %hi(0x40019c00), %g1 40008ce8: d2 00 62 e8 ld [ %g1 + 0x2e8 ], %o1 ! 40019ee8 <_Thread_Maximum_extensions> Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 40008cec: f4 26 60 d4 st %i2, [ %i1 + 0xd4 ] the_stack->size = size; 40008cf0: d0 26 60 d0 st %o0, [ %i1 + 0xd0 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40008cf4: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 40008cf8: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 40008cfc: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 40008d00: c0 26 60 6c clr [ %i1 + 0x6c ] /* * Clear the libc reent hook. */ the_thread->libc_reent = NULL; 40008d04: c0 26 61 68 clr [ %i1 + 0x168 ] /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 40008d08: 80 a2 60 00 cmp %o1, 0 40008d0c: 02 80 00 0e be 40008d44 <_Thread_Initialize+0xb4> 40008d10: b6 10 20 00 clr %i3 RTEMS_INLINE_ROUTINE void *_Workspace_Allocate( size_t size ) { return _Heap_Allocate( &_Workspace_Area, size ); 40008d14: 92 02 60 01 inc %o1 40008d18: 11 10 00 67 sethi %hi(0x40019c00), %o0 40008d1c: 93 2a 60 02 sll %o1, 2, %o1 40008d20: 7f ff f7 fb call 40006d0c <_Heap_Allocate> 40008d24: 90 12 22 6c or %o0, 0x26c, %o0 extensions_area = _Workspace_Allocate( (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 40008d28: b6 92 20 00 orcc %o0, 0, %i3 40008d2c: 12 80 00 07 bne 40008d48 <_Thread_Initialize+0xb8> 40008d30: 80 a6 e0 00 cmp %i3, 0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 40008d34: 40 00 03 0a call 4000995c <_Thread_Stack_Free> <== NOT EXECUTED 40008d38: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40008d3c: 81 c7 e0 08 ret 40008d40: 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 ) { 40008d44: 80 a6 e0 00 cmp %i3, 0 40008d48: 02 80 00 0d be 40008d7c <_Thread_Initialize+0xec> 40008d4c: f6 26 61 78 st %i3, [ %i1 + 0x178 ] int i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 40008d50: 03 10 00 67 sethi %hi(0x40019c00), %g1 40008d54: c2 00 62 e8 ld [ %g1 + 0x2e8 ], %g1 ! 40019ee8 <_Thread_Maximum_extensions> 40008d58: 86 10 20 00 clr %g3 40008d5c: 10 80 00 05 b 40008d70 <_Thread_Initialize+0xe0> 40008d60: 88 00 60 01 add %g1, 1, %g4 the_thread->extensions[i] = NULL; 40008d64: 83 28 e0 02 sll %g3, 2, %g1 * call. */ if ( the_thread->extensions ) { int i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 40008d68: 86 00 e0 01 inc %g3 the_thread->extensions[i] = NULL; 40008d6c: c0 20 80 01 clr [ %g2 + %g1 ] * call. */ if ( the_thread->extensions ) { int i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 40008d70: 80 a0 c0 04 cmp %g3, %g4 40008d74: 32 bf ff fc bne,a 40008d64 <_Thread_Initialize+0xd4> 40008d78: c4 06 61 78 ld [ %i1 + 0x178 ], %g2 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 40008d7c: c2 07 a0 5c ld [ %fp + 0x5c ], %g1 the_thread->Start.budget_algorithm = budget_algorithm; 40008d80: e0 26 60 bc st %l0, [ %i1 + 0xbc ] /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 40008d84: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ] the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 40008d88: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 switch ( budget_algorithm ) { 40008d8c: 80 a4 20 02 cmp %l0, 2 40008d90: 12 80 00 05 bne 40008da4 <_Thread_Initialize+0x114> 40008d94: c2 26 60 c0 st %g1, [ %i1 + 0xc0 ] 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; 40008d98: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 40008d9c: c2 00 61 78 ld [ %g1 + 0x178 ], %g1 ! 40019d78 <_Thread_Ticks_per_timeslice> <== NOT EXECUTED 40008da0: c2 26 60 84 st %g1, [ %i1 + 0x84 ] <== NOT EXECUTED break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 40008da4: c2 07 a0 68 ld [ %fp + 0x68 ], %g1 the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; 40008da8: c0 26 60 44 clr [ %i1 + 0x44 ] break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 40008dac: c2 26 60 c4 st %g1, [ %i1 + 0xc4 ] the_thread->current_state = STATES_DORMANT; 40008db0: 82 10 20 01 mov 1, %g1 the_thread->Wait.queue = NULL; the_thread->resource_count = 0; 40008db4: c0 26 60 1c clr [ %i1 + 0x1c ] break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 40008db8: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->suspend_count = 0; 40008dbc: c0 26 60 70 clr [ %i1 + 0x70 ] the_thread->real_priority = priority; 40008dc0: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; 40008dc4: fa 26 60 c8 st %i5, [ %i1 + 0xc8 ] _Thread_Set_priority( the_thread, priority ); 40008dc8: 92 10 00 1d mov %i5, %o1 40008dcc: 40 00 02 2c call 4000967c <_Thread_Set_priority> 40008dd0: 90 10 00 19 mov %i1, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 40008dd4: c4 06 60 08 ld [ %i1 + 8 ], %g2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40008dd8: c6 16 20 10 lduh [ %i0 + 0x10 ], %g3 /* * Initialize the CPU usage statistics */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS the_thread->cpu_time_used.tv_sec = 0; 40008ddc: c0 26 60 90 clr [ %i1 + 0x90 ] 40008de0: 03 00 00 3f sethi %hi(0xfc00), %g1 40008de4: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40008de8: 82 08 80 01 and %g2, %g1, %g1 40008dec: 80 a0 40 03 cmp %g1, %g3 40008df0: 18 80 00 05 bgu 40008e04 <_Thread_Initialize+0x174> 40008df4: c0 26 60 94 clr [ %i1 + 0x94 ] information->local_table[ index ] = the_object; 40008df8: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 40008dfc: 83 28 60 02 sll %g1, 2, %g1 40008e00: f2 20 80 01 st %i1, [ %g2 + %g1 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 40008e04: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 /* * Invoke create extensions */ if ( !_User_extensions_Thread_create( the_thread ) ) { 40008e08: 90 10 00 19 mov %i1, %o0 40008e0c: c2 26 60 0c st %g1, [ %i1 + 0xc ] 40008e10: 40 00 03 e1 call 40009d94 <_User_extensions_Thread_create> 40008e14: b0 10 20 01 mov 1, %i0 40008e18: 80 a2 20 00 cmp %o0, 0 40008e1c: 12 80 00 0a bne 40008e44 <_Thread_Initialize+0x1b4> 40008e20: 80 a6 e0 00 cmp %i3, 0 if ( extensions_area ) 40008e24: 02 80 00 05 be 40008e38 <_Thread_Initialize+0x1a8> <== NOT EXECUTED 40008e28: 11 10 00 67 sethi %hi(0x40019c00), %o0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 40008e2c: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 40008e30: 7f ff f7 de call 40006da8 <_Heap_Free> <== NOT EXECUTED 40008e34: 90 12 22 6c or %o0, 0x26c, %o0 <== NOT EXECUTED #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 40008e38: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40008e3c: 40 00 02 c8 call 4000995c <_Thread_Stack_Free> <== NOT EXECUTED 40008e40: b0 10 20 00 clr %i0 <== NOT EXECUTED return FALSE; } return TRUE; } 40008e44: 81 c7 e0 08 ret 40008e48: 81 e8 00 00 restore 4000df9c <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, uint32_t numeric_argument ) { 4000df9c: 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; 4000dfa0: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 4000dfa4: c4 06 20 bc ld [ %i0 + 0xbc ], %g2 the_thread->budget_callout = the_thread->Start.budget_callout; 4000dfa8: c6 06 20 c0 ld [ %i0 + 0xc0 ], %g3 uint32_t numeric_argument ) { the_thread->resource_count = 0; the_thread->suspend_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; 4000dfac: c2 26 20 7c st %g1, [ %i0 + 0x7c ] the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; 4000dfb0: c4 3e 20 88 std %g2, [ %i0 + 0x88 ] the_thread->Start.pointer_argument = pointer_argument; 4000dfb4: f2 26 20 b0 st %i1, [ %i0 + 0xb0 ] the_thread->Start.numeric_argument = numeric_argument; 4000dfb8: f4 26 20 b4 st %i2, [ %i0 + 0xb4 ] Thread_Control *the_thread, void *pointer_argument, uint32_t numeric_argument ) { the_thread->resource_count = 0; 4000dfbc: c0 26 20 1c clr [ %i0 + 0x1c ] the_thread->suspend_count = 0; 4000dfc0: 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 ) ) { 4000dfc4: 7f ff f0 55 call 4000a118 <_Thread_queue_Extract_with_proxy> 4000dfc8: 90 10 00 18 mov %i0, %o0 4000dfcc: 80 a2 20 00 cmp %o0, 0 4000dfd0: 32 80 00 09 bne,a 4000dff4 <_Thread_Reset+0x58> 4000dfd4: f2 06 20 c8 ld [ %i0 + 0xc8 ], %i1 if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4000dfd8: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000dfdc: 80 a0 60 02 cmp %g1, 2 4000dfe0: 32 80 00 05 bne,a 4000dff4 <_Thread_Reset+0x58> 4000dfe4: f2 06 20 c8 ld [ %i0 + 0xc8 ], %i1 (void) _Watchdog_Remove( &the_thread->Timer ); 4000dfe8: 7f ff f3 8d call 4000ae1c <_Watchdog_Remove> <== NOT EXECUTED 4000dfec: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4000dff0: f2 06 20 c8 ld [ %i0 + 0xc8 ], %i1 <== NOT EXECUTED 4000dff4: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 4000dff8: 80 a0 40 19 cmp %g1, %i1 4000dffc: 02 80 00 05 be 4000e010 <_Thread_Reset+0x74> 4000e000: 01 00 00 00 nop the_thread->real_priority = the_thread->Start.initial_priority; 4000e004: f2 26 20 18 st %i1, [ %i0 + 0x18 ] _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4000e008: 7f ff f1 0a call 4000a430 <_Thread_Set_priority> 4000e00c: 81 e8 00 00 restore 4000e010: 81 c7 e0 08 ret 4000e014: 81 e8 00 00 restore 4000d14c <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4000d14c: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4000d150: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000d154: e0 00 62 fc ld [ %g1 + 0x2fc ], %l0 ! 40019efc <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 4000d158: 7f ff d3 00 call 40001d58 4000d15c: e2 04 20 98 ld [ %l0 + 0x98 ], %l1 4000d160: b0 10 00 08 mov %o0, %i0 if ( _Chain_Has_only_one_node( ready ) ) { 4000d164: c4 04 40 00 ld [ %l1 ], %g2 4000d168: c2 04 60 08 ld [ %l1 + 8 ], %g1 4000d16c: 80 a0 80 01 cmp %g2, %g1 4000d170: 32 80 00 03 bne,a 4000d17c <_Thread_Reset_timeslice+0x30> 4000d174: c6 04 00 00 ld [ %l0 ], %g3 _ISR_Enable( level ); 4000d178: 30 80 00 18 b,a 4000d1d8 <_Thread_Reset_timeslice+0x8c> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4000d17c: c4 04 20 04 ld [ %l0 + 4 ], %g2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000d180: 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; 4000d184: c6 20 80 00 st %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000d188: c2 24 00 00 st %g1, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000d18c: 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; 4000d190: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 4000d194: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000d198: 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; 4000d19c: e0 20 40 00 st %l0, [ %g1 ] return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4000d1a0: 7f ff d2 f2 call 40001d68 4000d1a4: 01 00 00 00 nop 4000d1a8: 7f ff d2 ec call 40001d58 4000d1ac: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 4000d1b0: 05 10 00 67 sethi %hi(0x40019c00), %g2 4000d1b4: c2 00 a2 d4 ld [ %g2 + 0x2d4 ], %g1 ! 40019ed4 <_Thread_Heir> 4000d1b8: 80 a4 00 01 cmp %l0, %g1 4000d1bc: 32 80 00 05 bne,a 4000d1d0 <_Thread_Reset_timeslice+0x84> 4000d1c0: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED _Thread_Heir = (Thread_Control *) ready->first; 4000d1c4: c2 04 40 00 ld [ %l1 ], %g1 4000d1c8: c2 20 a2 d4 st %g1, [ %g2 + 0x2d4 ] _Context_Switch_necessary = TRUE; 4000d1cc: 84 10 20 01 mov 1, %g2 4000d1d0: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000d1d4: c4 20 63 0c st %g2, [ %g1 + 0x30c ] ! 40019f0c <_Context_Switch_necessary> _ISR_Enable( level ); 4000d1d8: 7f ff d2 e4 call 40001d68 4000d1dc: 81 e8 00 00 restore 4000d1e0: 01 00 00 00 nop 4000b150 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, boolean force ) { 4000b150: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4000b154: 7f ff de 4a call 40002a7c 4000b158: 01 00 00 00 nop 4000b15c: a0 10 00 08 mov %o0, %l0 if ( force == TRUE ) 4000b160: 80 a6 60 01 cmp %i1, 1 4000b164: 32 80 00 04 bne,a 4000b174 <_Thread_Resume+0x24> 4000b168: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 <== NOT EXECUTED the_thread->suspend_count = 0; 4000b16c: 10 80 00 04 b 4000b17c <_Thread_Resume+0x2c> 4000b170: c0 26 20 70 clr [ %i0 + 0x70 ] else the_thread->suspend_count--; 4000b174: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000b178: c2 26 20 70 st %g1, [ %i0 + 0x70 ] <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 4000b17c: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 4000b180: 80 a0 60 00 cmp %g1, 0 4000b184: 22 80 00 03 be,a 4000b190 <_Thread_Resume+0x40> 4000b188: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 _ISR_Enable( level ); 4000b18c: 30 80 00 2e b,a 4000b244 <_Thread_Resume+0xf4> <== NOT EXECUTED return; } current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { 4000b190: 80 88 60 02 btst 2, %g1 4000b194: 02 80 00 2c be 4000b244 <_Thread_Resume+0xf4> 4000b198: 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 ) ) { 4000b19c: 80 a0 60 00 cmp %g1, 0 4000b1a0: 12 80 00 29 bne 4000b244 <_Thread_Resume+0xf4> 4000b1a4: 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; 4000b1a8: c8 06 20 9c ld [ %i0 + 0x9c ], %g4 4000b1ac: c4 16 20 a2 lduh [ %i0 + 0xa2 ], %g2 4000b1b0: 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); 4000b1b4: c6 06 20 98 ld [ %i0 + 0x98 ], %g3 4000b1b8: 82 10 40 02 or %g1, %g2, %g1 4000b1bc: c2 31 00 00 sth %g1, [ %g4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000b1c0: 82 00 e0 04 add %g3, 4, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 4000b1c4: 09 10 00 9a sethi %hi(0x40026800), %g4 4000b1c8: c2 26 00 00 st %g1, [ %i0 ] 4000b1cc: da 16 20 a0 lduh [ %i0 + 0xa0 ], %o5 old_last_node = the_chain->last; 4000b1d0: c2 00 e0 08 ld [ %g3 + 8 ], %g1 4000b1d4: c4 11 23 20 lduh [ %g4 + 0x320 ], %g2 the_chain->last = the_node; 4000b1d8: f0 20 e0 08 st %i0, [ %g3 + 8 ] 4000b1dc: 84 10 80 0d or %g2, %o5, %g2 old_last_node->next = the_node; the_node->previous = old_last_node; 4000b1e0: c2 26 20 04 st %g1, [ %i0 + 4 ] 4000b1e4: c4 31 23 20 sth %g2, [ %g4 + 0x320 ] 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; 4000b1e8: f0 20 40 00 st %i0, [ %g1 ] _ISR_Flash( level ); 4000b1ec: 7f ff de 28 call 40002a8c 4000b1f0: 90 10 00 10 mov %l0, %o0 4000b1f4: 7f ff de 22 call 40002a7c 4000b1f8: 01 00 00 00 nop if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 4000b1fc: 07 10 00 9a sethi %hi(0x40026800), %g3 4000b200: c2 00 e3 04 ld [ %g3 + 0x304 ], %g1 ! 40026b04 <_Thread_Heir> 4000b204: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 4000b208: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4000b20c: 80 a0 80 01 cmp %g2, %g1 4000b210: 1a 80 00 0d bcc 4000b244 <_Thread_Resume+0xf4> 4000b214: 03 10 00 9a sethi %hi(0x40026800), %g1 _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4000b218: c2 00 63 2c ld [ %g1 + 0x32c ], %g1 ! 40026b2c <_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; 4000b21c: f0 20 e3 04 st %i0, [ %g3 + 0x304 ] if ( _Thread_Executing->is_preemptible || 4000b220: c2 00 60 7c ld [ %g1 + 0x7c ], %g1 4000b224: 80 a0 60 00 cmp %g1, 0 4000b228: 32 80 00 05 bne,a 4000b23c <_Thread_Resume+0xec> 4000b22c: 84 10 20 01 mov 1, %g2 4000b230: 80 a0 a0 00 cmp %g2, 0 4000b234: 12 80 00 04 bne 4000b244 <_Thread_Resume+0xf4> 4000b238: 84 10 20 01 mov 1, %g2 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 4000b23c: 03 10 00 9a sethi %hi(0x40026800), %g1 4000b240: c4 20 63 3c st %g2, [ %g1 + 0x33c ] ! 40026b3c <_Context_Switch_necessary> } } } _ISR_Enable( level ); 4000b244: 7f ff de 12 call 40002a8c 4000b248: 91 e8 00 10 restore %g0, %l0, %o0 4000b24c: 01 00 00 00 nop 40009900 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 40009900: 9d e3 bf 98 save %sp, -104, %sp void *stack_addr = 0; size_t the_stack_size = stack_size; if ( !_Stack_Is_enough( the_stack_size ) ) 40009904: 80 a6 6f ff cmp %i1, 0xfff 40009908: 28 80 00 02 bleu,a 40009910 <_Thread_Stack_Allocate+0x10> 4000990c: 33 00 00 04 sethi %hi(0x1000), %i1 <== NOT EXECUTED * 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 ( _CPU_Table.stack_allocate_hook ) { 40009910: 03 10 00 67 sethi %hi(0x40019c00), %g1 40009914: c2 00 62 54 ld [ %g1 + 0x254 ], %g1 ! 40019e54 <_CPU_Table+0x20> 40009918: 80 a0 60 00 cmp %g1, 0 4000991c: 02 80 00 06 be 40009934 <_Thread_Stack_Allocate+0x34> 40009920: 92 06 60 10 add %i1, 0x10, %o1 stack_addr = (*_CPU_Table.stack_allocate_hook)( the_stack_size ); 40009924: 9f c0 40 00 call %g1 <== NOT EXECUTED 40009928: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 4000992c: 10 80 00 07 b 40009948 <_Thread_Stack_Allocate+0x48> <== NOT EXECUTED 40009930: d0 26 20 d8 st %o0, [ %i0 + 0xd8 ] <== NOT EXECUTED RTEMS_INLINE_ROUTINE void *_Workspace_Allocate( size_t size ) { return _Heap_Allocate( &_Workspace_Area, size ); 40009934: 11 10 00 67 sethi %hi(0x40019c00), %o0 40009938: b2 10 00 09 mov %o1, %i1 4000993c: 7f ff f4 f4 call 40006d0c <_Heap_Allocate> 40009940: 90 12 22 6c or %o0, 0x26c, %o0 40009944: d0 26 20 d8 st %o0, [ %i0 + 0xd8 ] the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 40009948: 80 a0 00 08 cmp %g0, %o0 4000994c: b0 60 20 00 subx %g0, 0, %i0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 40009950: b0 0e 40 18 and %i1, %i0, %i0 40009954: 81 c7 e0 08 ret 40009958: 81 e8 00 00 restore 4000995c <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 4000995c: 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 ) 40009960: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 40009964: 80 a0 60 00 cmp %g1, 0 40009968: 02 80 00 08 be 40009988 <_Thread_Stack_Free+0x2c> 4000996c: 03 10 00 67 sethi %hi(0x40019c00), %g1 * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( _CPU_Table.stack_free_hook ) 40009970: c2 00 62 58 ld [ %g1 + 0x258 ], %g1 ! 40019e58 <_CPU_Table+0x24> 40009974: 80 a0 60 00 cmp %g1, 0 40009978: 02 80 00 06 be 40009990 <_Thread_Stack_Free+0x34> 4000997c: d0 06 20 d4 ld [ %i0 + 0xd4 ], %o0 (*_CPU_Table.stack_free_hook)( the_thread->Start.Initial_stack.area ); 40009980: 9f c0 40 00 call %g1 <== NOT EXECUTED 40009984: 01 00 00 00 nop <== NOT EXECUTED 40009988: 81 c7 e0 08 ret <== NOT EXECUTED 4000998c: 81 e8 00 00 restore <== NOT EXECUTED RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 40009990: 31 10 00 67 sethi %hi(0x40019c00), %i0 40009994: b2 10 00 08 mov %o0, %i1 40009998: 7f ff f5 04 call 40006da8 <_Heap_Free> 4000999c: 91 ee 22 6c restore %i0, 0x26c, %o0 400099a0: 01 00 00 00 nop 40008f34 <_Thread_queue_Dequeue>: Thread_queue_Control *the_thread_queue ) { Thread_Control *the_thread; switch ( the_thread_queue->discipline ) { 40008f34: c2 02 20 34 ld [ %o0 + 0x34 ], %g1 40008f38: 80 a0 60 00 cmp %g1, 0 40008f3c: 02 80 00 05 be 40008f50 <_Thread_queue_Dequeue+0x1c> 40008f40: 80 a0 60 01 cmp %g1, 1 40008f44: 12 80 00 09 bne 40008f68 <_Thread_queue_Dequeue+0x34> 40008f48: 01 00 00 00 nop 40008f4c: 30 80 00 04 b,a 40008f5c <_Thread_queue_Dequeue+0x28> case THREAD_QUEUE_DISCIPLINE_FIFO: the_thread = _Thread_queue_Dequeue_fifo( the_thread_queue ); 40008f50: 82 13 c0 00 mov %o7, %g1 40008f54: 40 00 0f 88 call 4000cd74 <_Thread_queue_Dequeue_fifo> 40008f58: 9e 10 40 00 mov %g1, %o7 break; case THREAD_QUEUE_DISCIPLINE_PRIORITY: the_thread = _Thread_queue_Dequeue_priority( the_thread_queue ); 40008f5c: 82 13 c0 00 mov %o7, %g1 40008f60: 40 00 00 0a call 40008f88 <_Thread_queue_Dequeue_priority> 40008f64: 9e 10 40 00 mov %g1, %o7 the_thread = NULL; break; } return( the_thread ); } 40008f68: 81 c3 e0 08 retl <== NOT EXECUTED 40008f6c: 90 10 20 00 clr %o0 <== NOT EXECUTED 4000cd74 <_Thread_queue_Dequeue_fifo>: */ Thread_Control *_Thread_queue_Dequeue_fifo( Thread_queue_Control *the_thread_queue ) { 4000cd74: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *the_thread; _ISR_Disable( level ); 4000cd78: 7f ff d3 f8 call 40001d58 4000cd7c: a0 10 00 18 mov %i0, %l0 4000cd80: 84 10 00 08 mov %o0, %g2 */ RTEMS_INLINE_ROUTINE boolean _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000cd84: f0 06 00 00 ld [ %i0 ], %i0 if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) { 4000cd88: 82 04 20 04 add %l0, 4, %g1 4000cd8c: 80 a6 00 01 cmp %i0, %g1 4000cd90: 22 80 00 16 be,a 4000cde8 <_Thread_queue_Dequeue_fifo+0x74> 4000cd94: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4000cd98: c2 06 00 00 ld [ %i0 ], %g1 the_chain->first = new_first; 4000cd9c: c2 24 00 00 st %g1, [ %l0 ] the_thread = (Thread_Control *) _Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4000cda0: c4 06 20 50 ld [ %i0 + 0x50 ], %g2 new_first->previous = _Chain_Head(the_chain); 4000cda4: e0 20 60 04 st %l0, [ %g1 + 4 ] 4000cda8: 80 a0 a0 02 cmp %g2, 2 4000cdac: 02 80 00 05 be 4000cdc0 <_Thread_queue_Dequeue_fifo+0x4c> 4000cdb0: c0 26 20 44 clr [ %i0 + 0x44 ] _ISR_Enable( level ); 4000cdb4: 7f ff d3 ed call 40001d68 4000cdb8: 01 00 00 00 nop 4000cdbc: 30 80 00 07 b,a 4000cdd8 <_Thread_queue_Dequeue_fifo+0x64> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 4000cdc0: 82 10 20 03 mov 3, %g1 ! 3 4000cdc4: c2 26 20 50 st %g1, [ %i0 + 0x50 ] _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000cdc8: 7f ff d3 e8 call 40001d68 4000cdcc: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); 4000cdd0: 7f ff f4 94 call 4000a020 <_Watchdog_Remove> 4000cdd4: 90 06 20 48 add %i0, 0x48, %o0 _Thread_Unblock( the_thread ); 4000cdd8: 7f ff ff e1 call 4000cd5c <_Thread_Unblock> 4000cddc: 90 10 00 18 mov %i0, %o0 4000cde0: 81 c7 e0 08 ret 4000cde4: 81 e8 00 00 restore #endif return the_thread; } switch ( the_thread_queue->sync_state ) { 4000cde8: 80 a0 60 02 cmp %g1, 2 4000cdec: 18 80 00 06 bgu 4000ce04 <_Thread_queue_Dequeue_fifo+0x90> 4000cdf0: 80 a0 60 03 cmp %g1, 3 4000cdf4: 80 a0 60 01 cmp %g1, 1 4000cdf8: 1a 80 00 0a bcc 4000ce20 <_Thread_queue_Dequeue_fifo+0xac> 4000cdfc: 82 10 20 03 mov 3, %g1 4000ce00: 30 80 00 03 b,a 4000ce0c <_Thread_queue_Dequeue_fifo+0x98> 4000ce04: 12 bf ff f7 bne 4000cde0 <_Thread_queue_Dequeue_fifo+0x6c> <== NOT EXECUTED 4000ce08: b0 10 20 00 clr %i0 <== NOT EXECUTED case THREAD_QUEUE_SYNCHRONIZED: case THREAD_QUEUE_SATISFIED: _ISR_Enable( level ); 4000ce0c: b0 10 20 00 clr %i0 4000ce10: 7f ff d3 d6 call 40001d68 4000ce14: 90 10 00 02 mov %g2, %o0 4000ce18: 81 c7 e0 08 ret 4000ce1c: 81 e8 00 00 restore return NULL; case THREAD_QUEUE_NOTHING_HAPPENED: case THREAD_QUEUE_TIMEOUT: the_thread_queue->sync_state = THREAD_QUEUE_SATISFIED; 4000ce20: c2 24 20 30 st %g1, [ %l0 + 0x30 ] <== NOT EXECUTED _ISR_Enable( level ); 4000ce24: 7f ff d3 d1 call 40001d68 <== NOT EXECUTED 4000ce28: 01 00 00 00 nop <== NOT EXECUTED return _Thread_Executing; 4000ce2c: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 4000ce30: f0 00 62 fc ld [ %g1 + 0x2fc ], %i0 ! 40019efc <_Thread_Executing> <== NOT EXECUTED } return NULL; /* this is only to prevent warnings */ } 4000ce34: 81 c7 e0 08 ret <== NOT EXECUTED 4000ce38: 81 e8 00 00 restore <== NOT EXECUTED 40008f88 <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 40008f88: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 40008f8c: 7f ff e3 73 call 40001d58 40008f90: 01 00 00 00 nop 40008f94: 98 10 00 08 mov %o0, %o4 40008f98: 86 10 20 00 clr %g3 40008f9c: 88 10 20 00 clr %g4 */ RTEMS_INLINE_ROUTINE boolean _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 40008fa0: d0 01 00 18 ld [ %g4 + %i0 ], %o0 for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { 40008fa4: 85 28 e0 02 sll %g3, 2, %g2 40008fa8: 83 28 e0 04 sll %g3, 4, %g1 40008fac: 82 20 40 02 sub %g1, %g2, %g1 40008fb0: 82 06 00 01 add %i0, %g1, %g1 40008fb4: 82 00 60 04 add %g1, 4, %g1 40008fb8: 80 a2 00 01 cmp %o0, %g1 40008fbc: 02 80 00 04 be 40008fcc <_Thread_queue_Dequeue_priority+0x44> 40008fc0: 88 01 20 0c add %g4, 0xc, %g4 the_thread = (Thread_Control *) 40008fc4: 10 80 00 1c b 40009034 <_Thread_queue_Dequeue_priority+0xac> 40008fc8: b0 10 00 08 mov %o0, %i0 Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 40008fcc: 86 00 e0 01 inc %g3 Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 40008fd0: 80 a0 e0 04 cmp %g3, 4 40008fd4: 32 bf ff f4 bne,a 40008fa4 <_Thread_queue_Dequeue_priority+0x1c> 40008fd8: d0 01 00 18 ld [ %g4 + %i0 ], %o0 the_thread_queue->Queues.Priority[ index ].first; goto dequeue; } } switch ( the_thread_queue->sync_state ) { 40008fdc: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40008fe0: 80 a0 60 02 cmp %g1, 2 40008fe4: 18 80 00 06 bgu 40008ffc <_Thread_queue_Dequeue_priority+0x74> 40008fe8: 80 a0 60 03 cmp %g1, 3 40008fec: 80 a0 60 01 cmp %g1, 1 40008ff0: 1a 80 00 0a bcc 40009018 <_Thread_queue_Dequeue_priority+0x90> 40008ff4: 82 10 20 03 mov 3, %g1 40008ff8: 30 80 00 03 b,a 40009004 <_Thread_queue_Dequeue_priority+0x7c> 40008ffc: 12 80 00 0e bne 40009034 <_Thread_queue_Dequeue_priority+0xac> <== NOT EXECUTED 40009000: b0 10 20 00 clr %i0 <== NOT EXECUTED case THREAD_QUEUE_SYNCHRONIZED: case THREAD_QUEUE_SATISFIED: _ISR_Enable( level ); 40009004: b0 10 20 00 clr %i0 40009008: 7f ff e3 58 call 40001d68 4000900c: 90 10 00 0c mov %o4, %o0 40009010: 81 c7 e0 08 ret 40009014: 81 e8 00 00 restore return NULL; case THREAD_QUEUE_NOTHING_HAPPENED: case THREAD_QUEUE_TIMEOUT: the_thread_queue->sync_state = THREAD_QUEUE_SATISFIED; 40009018: c2 26 20 30 st %g1, [ %i0 + 0x30 ] <== NOT EXECUTED _ISR_Enable( level ); 4000901c: 7f ff e3 53 call 40001d68 <== NOT EXECUTED 40009020: 90 10 00 0c mov %o4, %o0 <== NOT EXECUTED return _Thread_Executing; 40009024: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 40009028: f0 00 62 fc ld [ %g1 + 0x2fc ], %i0 ! 40019efc <_Thread_Executing> <== NOT EXECUTED 4000902c: 81 c7 e0 08 ret <== NOT EXECUTED 40009030: 81 e8 00 00 restore <== NOT EXECUTED } dequeue: the_thread->Wait.queue = NULL; new_first_node = the_thread->Wait.Block2n.first; 40009034: c6 06 20 38 ld [ %i0 + 0x38 ], %g3 new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; previous_node = the_thread->Object.Node.previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 40009038: 82 06 20 3c add %i0, 0x3c, %g1 _ISR_Enable( level ); return _Thread_Executing; } dequeue: the_thread->Wait.queue = NULL; 4000903c: c0 26 20 44 clr [ %i0 + 0x44 ] new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; previous_node = the_thread->Object.Node.previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 40009040: 80 a0 c0 01 cmp %g3, %g1 dequeue: the_thread->Wait.queue = NULL; new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 40009044: c4 06 00 00 ld [ %i0 ], %g2 previous_node = the_thread->Object.Node.previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 40009048: 02 80 00 14 be 40009098 <_Thread_queue_Dequeue_priority+0x110> 4000904c: c2 06 20 04 ld [ %i0 + 4 ], %g1 last_node = the_thread->Wait.Block2n.last; 40009050: da 06 20 40 ld [ %i0 + 0x40 ], %o5 new_second_node = new_first_node->next; 40009054: c8 00 c0 00 ld [ %g3 ], %g4 previous_node->next = new_first_node; next_node->previous = new_first_node; 40009058: c6 20 a0 04 st %g3, [ %g2 + 4 ] if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; 4000905c: c6 20 40 00 st %g3, [ %g1 ] next_node->previous = new_first_node; new_first_node->next = next_node; 40009060: c4 20 c0 00 st %g2, [ %g3 ] new_first_node->previous = previous_node; 40009064: c2 20 e0 04 st %g1, [ %g3 + 4 ] if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 40009068: c4 06 20 38 ld [ %i0 + 0x38 ], %g2 4000906c: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 40009070: 80 a0 80 01 cmp %g2, %g1 40009074: 22 80 00 0c be,a 400090a4 <_Thread_queue_Dequeue_priority+0x11c> 40009078: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 /* > two threads on 2-n */ new_second_node->previous = 4000907c: 82 00 e0 38 add %g3, 0x38, %g1 40009080: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 40009084: c8 20 e0 38 st %g4, [ %g3 + 0x38 ] new_first_thread->Wait.Block2n.last = last_node; 40009088: da 20 e0 40 st %o5, [ %g3 + 0x40 ] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4000908c: 82 00 e0 3c add %g3, 0x3c, %g1 40009090: 10 80 00 04 b 400090a0 <_Thread_queue_Dequeue_priority+0x118> 40009094: c2 23 40 00 st %g1, [ %o5 ] } } else { previous_node->next = next_node; next_node->previous = previous_node; 40009098: 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; 4000909c: c4 20 40 00 st %g2, [ %g1 ] next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 400090a0: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 400090a4: 80 a0 60 02 cmp %g1, 2 400090a8: 02 80 00 08 be 400090c8 <_Thread_queue_Dequeue_priority+0x140> 400090ac: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 400090b0: 7f ff e3 2e call 40001d68 400090b4: 90 10 00 0c mov %o4, %o0 _Thread_Unblock( the_thread ); 400090b8: 7f ff ff ae call 40008f70 <_Thread_Unblock> 400090bc: 90 10 00 18 mov %i0, %o0 400090c0: 81 c7 e0 08 ret 400090c4: 81 e8 00 00 restore RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 400090c8: c2 26 20 50 st %g1, [ %i0 + 0x50 ] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 400090cc: 7f ff e3 27 call 40001d68 400090d0: 90 10 00 0c mov %o4, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 400090d4: 40 00 03 d3 call 4000a020 <_Watchdog_Remove> 400090d8: 90 06 20 48 add %i0, 0x48, %o0 _Thread_Unblock( the_thread ); 400090dc: 7f ff ff a5 call 40008f70 <_Thread_Unblock> 400090e0: 90 10 00 18 mov %i0, %o0 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 400090e4: 81 c7 e0 08 ret 400090e8: 81 e8 00 00 restore 4000ce3c <_Thread_queue_Enqueue_fifo>: void _Thread_queue_Enqueue_fifo ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4000ce3c: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_queue_States sync_state; _ISR_Disable( level ); 4000ce40: 7f ff d3 c6 call 40001d58 4000ce44: a0 10 00 18 mov %i0, %l0 void _Thread_queue_Enqueue_fifo ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4000ce48: b0 10 00 19 mov %i1, %i0 ISR_Level level; Thread_queue_States sync_state; _ISR_Disable( level ); sync_state = the_thread_queue->sync_state; 4000ce4c: c4 04 20 30 ld [ %l0 + 0x30 ], %g2 the_thread_queue->sync_state = THREAD_QUEUE_SYNCHRONIZED; switch ( sync_state ) { 4000ce50: 80 a0 a0 02 cmp %g2, 2 4000ce54: 02 80 00 10 be 4000ce94 <_Thread_queue_Enqueue_fifo+0x58> 4000ce58: c0 24 20 30 clr [ %l0 + 0x30 ] 4000ce5c: 80 a0 a0 03 cmp %g2, 3 4000ce60: 02 80 00 12 be 4000cea8 <_Thread_queue_Enqueue_fifo+0x6c> 4000ce64: 80 a0 a0 01 cmp %g2, 1 4000ce68: 32 80 00 1e bne,a 4000cee0 <_Thread_queue_Enqueue_fifo+0xa4> 4000ce6c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000ce70: 82 04 20 04 add %l0, 4, %g1 4000ce74: c2 26 40 00 st %g1, [ %i1 ] old_last_node = the_chain->last; 4000ce78: c2 04 20 08 ld [ %l0 + 8 ], %g1 the_chain->last = the_node; 4000ce7c: f2 24 20 08 st %i1, [ %l0 + 8 ] case THREAD_QUEUE_NOTHING_HAPPENED: _Chain_Append_unprotected( &the_thread_queue->Queues.Fifo, &the_thread->Object.Node ); the_thread->Wait.queue = the_thread_queue; 4000ce80: e0 26 60 44 st %l0, [ %i1 + 0x44 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000ce84: c2 26 60 04 st %g1, [ %i1 + 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; 4000ce88: f2 20 40 00 st %i1, [ %g1 ] _ISR_Enable( level ); 4000ce8c: 7f ff d3 b7 call 40001d68 4000ce90: 91 e8 00 08 restore %g0, %o0, %o0 return; case THREAD_QUEUE_TIMEOUT: the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4000ce94: c2 06 60 44 ld [ %i1 + 0x44 ], %g1 <== NOT EXECUTED the_thread->Wait.queue = NULL; 4000ce98: c0 26 60 44 clr [ %i1 + 0x44 ] <== NOT EXECUTED the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return; case THREAD_QUEUE_TIMEOUT: the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4000ce9c: c2 00 60 3c ld [ %g1 + 0x3c ], %g1 <== NOT EXECUTED 4000cea0: c2 26 60 34 st %g1, [ %i1 + 0x34 ] <== NOT EXECUTED the_thread->Wait.queue = NULL; _ISR_Enable( level ); 4000cea4: 30 80 00 0d b,a 4000ced8 <_Thread_queue_Enqueue_fifo+0x9c> <== NOT EXECUTED break; case THREAD_QUEUE_SATISFIED: if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 4000cea8: c2 06 60 50 ld [ %i1 + 0x50 ], %g1 <== NOT EXECUTED 4000ceac: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000ceb0: 12 80 00 0a bne 4000ced8 <_Thread_queue_Enqueue_fifo+0x9c> <== NOT EXECUTED 4000ceb4: 01 00 00 00 nop <== NOT EXECUTED 4000ceb8: c4 26 60 50 st %g2, [ %i1 + 0x50 ] <== NOT EXECUTED _Watchdog_Deactivate( &the_thread->Timer ); the_thread->Wait.queue = NULL; 4000cebc: c0 26 60 44 clr [ %i1 + 0x44 ] <== NOT EXECUTED _ISR_Enable( level ); 4000cec0: 7f ff d3 aa call 40001d68 <== NOT EXECUTED 4000cec4: 01 00 00 00 nop <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 4000cec8: 7f ff f4 56 call 4000a020 <_Watchdog_Remove> <== NOT EXECUTED 4000cecc: 90 06 60 48 add %i1, 0x48, %o0 <== NOT EXECUTED 4000ced0: 10 80 00 04 b 4000cee0 <_Thread_queue_Enqueue_fifo+0xa4> <== NOT EXECUTED 4000ced4: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED } else _ISR_Enable( level ); 4000ced8: 7f ff d3 a4 call 40001d68 <== NOT EXECUTED 4000cedc: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED 4000cee0: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <== NOT EXECUTED 4000cee4: 7f ff ee 60 call 40008864 <_Thread_Clear_state> <== NOT EXECUTED 4000cee8: 81 e8 00 00 restore <== NOT EXECUTED 4000ceec: 01 00 00 00 nop 40009170 <_Thread_queue_Enqueue_priority>: void _Thread_queue_Enqueue_priority( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 40009170: 9d e3 bf 98 save %sp, -104, %sp States_Control block_state; Thread_queue_States sync_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 40009174: 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); 40009178: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; 4000917c: 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); 40009180: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40009184: 82 06 60 38 add %i1, 0x38, %g1 40009188: 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 ) ) 4000918c: 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); 40009190: 85 34 a0 06 srl %l2, 6, %g2 40009194: 12 80 00 34 bne 40009264 <_Thread_queue_Enqueue_priority+0xf4> 40009198: ec 06 20 38 ld [ %i0 + 0x38 ], %l6 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 4000919c: 83 28 a0 04 sll %g2, 4, %g1 400091a0: 85 28 a0 02 sll %g2, 2, %g2 400091a4: aa 20 40 02 sub %g1, %g2, %l5 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 400091a8: 82 06 00 15 add %i0, %l5, %g1 400091ac: a8 00 60 04 add %g1, 4, %l4 if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 400091b0: 7f ff e2 ea call 40001d58 400091b4: 01 00 00 00 nop 400091b8: a2 10 00 08 mov %o0, %l1 search_thread = (Thread_Control *) header->first; 400091bc: e0 06 00 15 ld [ %i0 + %l5 ], %l0 400091c0: 10 80 00 18 b 40009220 <_Thread_queue_Enqueue_priority+0xb0> 400091c4: a6 10 3f ff mov -1, %l3 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { search_priority = search_thread->current_priority; if ( priority <= search_priority ) 400091c8: 80 a4 80 13 cmp %l2, %l3 400091cc: 28 80 00 19 bleu,a 40009230 <_Thread_queue_Enqueue_priority+0xc0> 400091d0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.next; 400091d4: e0 04 00 00 ld [ %l0 ], %l0 if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) ) 400091d8: 80 a4 00 14 cmp %l0, %l4 400091dc: 22 80 00 15 be,a 40009230 <_Thread_queue_Enqueue_priority+0xc0> 400091e0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; 400091e4: e6 04 20 14 ld [ %l0 + 0x14 ], %l3 if ( priority <= search_priority ) 400091e8: 80 a4 80 13 cmp %l2, %l3 400091ec: 28 80 00 11 bleu,a 40009230 <_Thread_queue_Enqueue_priority+0xc0> 400091f0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; #endif _ISR_Flash( level ); 400091f4: 7f ff e2 dd call 40001d68 400091f8: 90 10 00 11 mov %l1, %o0 400091fc: 7f ff e2 d7 call 40001d58 40009200: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 40009204: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40009208: 80 8d 80 01 btst %l6, %g1 4000920c: 32 80 00 05 bne,a 40009220 <_Thread_queue_Enqueue_priority+0xb0> 40009210: e0 04 00 00 ld [ %l0 ], %l0 _ISR_Enable( level ); 40009214: 7f ff e2 d5 call 40001d68 <== NOT EXECUTED 40009218: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000921c: 30 bf ff e5 b,a 400091b0 <_Thread_queue_Enqueue_priority+0x40> <== 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 ) ) { 40009220: 80 a4 00 14 cmp %l0, %l4 40009224: 32 bf ff e9 bne,a 400091c8 <_Thread_queue_Enqueue_priority+0x58> 40009228: e6 04 20 14 ld [ %l0 + 0x14 ], %l3 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != THREAD_QUEUE_NOTHING_HAPPENED ) 4000922c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40009230: 80 a0 60 01 cmp %g1, 1 40009234: 32 80 00 47 bne,a 40009350 <_Thread_queue_Enqueue_priority+0x1e0> 40009238: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 <== NOT EXECUTED goto synchronize; the_thread_queue->sync_state = THREAD_QUEUE_SYNCHRONIZED; if ( priority == search_priority ) 4000923c: 80 a4 80 13 cmp %l2, %l3 40009240: 02 80 00 3c be 40009330 <_Thread_queue_Enqueue_priority+0x1c0> 40009244: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 40009248: c2 04 20 04 ld [ %l0 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 4000924c: e0 26 40 00 st %l0, [ %i1 ] the_node->previous = previous_node; 40009250: 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; 40009254: 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; 40009258: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 4000925c: f2 24 20 04 st %i1, [ %l0 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40009260: 30 80 00 32 b,a 40009328 <_Thread_queue_Enqueue_priority+0x1b8> restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 40009264: 83 28 a0 04 sll %g2, 4, %g1 40009268: 85 28 a0 02 sll %g2, 2, %g2 4000926c: 82 20 40 02 sub %g1, %g2, %g1 40009270: a6 00 40 18 add %g1, %i0, %l3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 40009274: aa 10 00 13 mov %l3, %l5 return; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 40009278: 7f ff e2 b8 call 40001d58 4000927c: 01 00 00 00 nop 40009280: a2 10 00 08 mov %o0, %l1 search_thread = (Thread_Control *) header->last; 40009284: e0 05 60 08 ld [ %l5 + 8 ], %l0 40009288: 10 80 00 18 b 400092e8 <_Thread_queue_Enqueue_priority+0x178> 4000928c: a8 10 21 00 mov 0x100, %l4 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { search_priority = search_thread->current_priority; if ( priority >= search_priority ) 40009290: 80 a4 80 14 cmp %l2, %l4 40009294: 3a 80 00 19 bcc,a 400092f8 <_Thread_queue_Enqueue_priority+0x188> 40009298: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 4000929c: e0 04 20 04 ld [ %l0 + 4 ], %l0 if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 400092a0: 80 a4 00 13 cmp %l0, %l3 400092a4: 22 80 00 15 be,a 400092f8 <_Thread_queue_Enqueue_priority+0x188> 400092a8: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; 400092ac: e8 04 20 14 ld [ %l0 + 0x14 ], %l4 if ( priority >= search_priority ) 400092b0: 80 a4 80 14 cmp %l2, %l4 400092b4: 3a 80 00 11 bcc,a 400092f8 <_Thread_queue_Enqueue_priority+0x188> 400092b8: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 <== NOT EXECUTED break; #endif _ISR_Flash( level ); 400092bc: 7f ff e2 ab call 40001d68 400092c0: 90 10 00 11 mov %l1, %o0 400092c4: 7f ff e2 a5 call 40001d58 400092c8: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 400092cc: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 400092d0: 80 8d 80 01 btst %l6, %g1 400092d4: 32 80 00 05 bne,a 400092e8 <_Thread_queue_Enqueue_priority+0x178> 400092d8: e0 04 20 04 ld [ %l0 + 4 ], %l0 _ISR_Enable( level ); 400092dc: 7f ff e2 a3 call 40001d68 <== NOT EXECUTED 400092e0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400092e4: 30 bf ff e5 b,a 40009278 <_Thread_queue_Enqueue_priority+0x108> <== NOT EXECUTED restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 400092e8: 80 a4 00 13 cmp %l0, %l3 400092ec: 32 bf ff e9 bne,a 40009290 <_Thread_queue_Enqueue_priority+0x120> 400092f0: e8 04 20 14 ld [ %l0 + 0x14 ], %l4 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != THREAD_QUEUE_NOTHING_HAPPENED ) 400092f4: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 400092f8: 80 a0 60 01 cmp %g1, 1 400092fc: 32 80 00 15 bne,a 40009350 <_Thread_queue_Enqueue_priority+0x1e0> 40009300: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 <== NOT EXECUTED goto synchronize; the_thread_queue->sync_state = THREAD_QUEUE_SYNCHRONIZED; if ( priority == search_priority ) 40009304: 80 a4 80 14 cmp %l2, %l4 40009308: 02 80 00 0a be 40009330 <_Thread_queue_Enqueue_priority+0x1c0> 4000930c: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 40009310: c2 04 00 00 ld [ %l0 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 40009314: 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; 40009318: 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; 4000931c: f0 26 60 44 st %i0, [ %i1 + 0x44 ] 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; 40009320: f2 24 00 00 st %i1, [ %l0 ] next_node->previous = the_node; 40009324: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40009328: 7f ff e2 90 call 40001d68 4000932c: 91 e8 00 11 restore %g0, %l1, %o0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40009330: 82 04 20 3c add %l0, 0x3c, %g1 return; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 40009334: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40009338: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 4000933c: 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; 40009340: 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; 40009344: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 40009348: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 4000934c: 30 bf ff f7 b,a 40009328 <_Thread_queue_Enqueue_priority+0x1b8> synchronize: sync_state = the_thread_queue->sync_state; the_thread_queue->sync_state = THREAD_QUEUE_SYNCHRONIZED; switch ( sync_state ) { 40009350: 80 a0 a0 02 cmp %g2, 2 <== NOT EXECUTED 40009354: 02 80 00 07 be 40009370 <_Thread_queue_Enqueue_priority+0x200> <== NOT EXECUTED 40009358: c0 26 20 30 clr [ %i0 + 0x30 ] <== NOT EXECUTED 4000935c: 80 a0 a0 03 cmp %g2, 3 <== NOT EXECUTED 40009360: 12 80 00 17 bne 400093bc <_Thread_queue_Enqueue_priority+0x24c> <== NOT EXECUTED 40009364: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED the_thread->Wait.queue = NULL; _ISR_Enable( level ); break; case THREAD_QUEUE_SATISFIED: if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 40009368: 10 80 00 07 b 40009384 <_Thread_queue_Enqueue_priority+0x214> <== NOT EXECUTED 4000936c: c2 06 60 50 ld [ %i1 + 0x50 ], %g1 <== NOT EXECUTED * This should never happen. All of this was dealt with above. */ break; case THREAD_QUEUE_TIMEOUT: the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 40009370: c2 06 60 44 ld [ %i1 + 0x44 ], %g1 <== NOT EXECUTED the_thread->Wait.queue = NULL; 40009374: c0 26 60 44 clr [ %i1 + 0x44 ] <== NOT EXECUTED * This should never happen. All of this was dealt with above. */ break; case THREAD_QUEUE_TIMEOUT: the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 40009378: c2 00 60 3c ld [ %g1 + 0x3c ], %g1 <== NOT EXECUTED 4000937c: c2 26 60 34 st %g1, [ %i1 + 0x34 ] <== NOT EXECUTED the_thread->Wait.queue = NULL; _ISR_Enable( level ); 40009380: 30 80 00 0c b,a 400093b0 <_Thread_queue_Enqueue_priority+0x240> <== NOT EXECUTED break; case THREAD_QUEUE_SATISFIED: if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 40009384: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40009388: 12 80 00 0a bne 400093b0 <_Thread_queue_Enqueue_priority+0x240> <== NOT EXECUTED 4000938c: 01 00 00 00 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 40009390: c4 26 60 50 st %g2, [ %i1 + 0x50 ] <== NOT EXECUTED _Watchdog_Deactivate( &the_thread->Timer ); the_thread->Wait.queue = NULL; 40009394: c0 26 60 44 clr [ %i1 + 0x44 ] <== NOT EXECUTED _ISR_Enable( level ); 40009398: 7f ff e2 74 call 40001d68 <== NOT EXECUTED 4000939c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 400093a0: 40 00 03 20 call 4000a020 <_Watchdog_Remove> <== NOT EXECUTED 400093a4: 90 06 60 48 add %i1, 0x48, %o0 <== NOT EXECUTED 400093a8: 10 80 00 05 b 400093bc <_Thread_queue_Enqueue_priority+0x24c> <== NOT EXECUTED 400093ac: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED } else _ISR_Enable( level ); 400093b0: 7f ff e2 6e call 40001d68 <== NOT EXECUTED 400093b4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400093b8: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED 400093bc: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED 400093c0: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <== NOT EXECUTED 400093c4: 7f ff fd 28 call 40008864 <_Thread_Clear_state> <== NOT EXECUTED 400093c8: 81 e8 00 00 restore <== NOT EXECUTED 400093cc: 01 00 00 00 nop 400090ec <_Thread_queue_Enqueue_with_handler>: void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { 400090ec: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; the_thread = _Thread_Executing; 400090f0: 03 10 00 67 sethi %hi(0x40019c00), %g1 else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 400090f4: d2 06 20 38 ld [ %i0 + 0x38 ], %o1 Thread_queue_Timeout_callout handler ) { Thread_Control *the_thread; the_thread = _Thread_Executing; 400090f8: e0 00 62 fc ld [ %g1 + 0x2fc ], %l0 void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { 400090fc: a2 10 00 18 mov %i0, %l1 else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 40009100: 40 00 01 79 call 400096e4 <_Thread_Set_state> 40009104: 90 10 00 10 mov %l0, %o0 /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { 40009108: 80 a6 60 00 cmp %i1, 0 4000910c: 22 80 00 0d be,a 40009140 <_Thread_queue_Enqueue_with_handler+0x54> 40009110: c2 04 60 34 ld [ %l1 + 0x34 ], %g1 _Watchdog_Initialize( 40009114: c2 04 20 08 ld [ %l0 + 8 ], %g1 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40009118: 11 10 00 67 sethi %hi(0x40019c00), %o0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4000911c: f4 24 20 64 st %i2, [ %l0 + 0x64 ] the_watchdog->id = id; 40009120: c2 24 20 68 st %g1, [ %l0 + 0x68 ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40009124: f2 24 20 54 st %i1, [ %l0 + 0x54 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40009128: c0 24 20 50 clr [ %l0 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 4000912c: c0 24 20 6c clr [ %l0 + 0x6c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40009130: 90 12 23 1c or %o0, 0x31c, %o0 40009134: 40 00 03 63 call 40009ec0 <_Watchdog_Insert> 40009138: 92 04 20 48 add %l0, 0x48, %o1 } /* * Now enqueue the thread per the discipline for this thread queue. */ switch( the_thread_queue->discipline ) { 4000913c: c2 04 60 34 ld [ %l1 + 0x34 ], %g1 40009140: 80 a0 60 00 cmp %g1, 0 40009144: 02 80 00 05 be 40009158 <_Thread_queue_Enqueue_with_handler+0x6c> 40009148: 80 a0 60 01 cmp %g1, 1 4000914c: 12 80 00 07 bne 40009168 <_Thread_queue_Enqueue_with_handler+0x7c> 40009150: 01 00 00 00 nop 40009154: 30 80 00 03 b,a 40009160 <_Thread_queue_Enqueue_with_handler+0x74> case THREAD_QUEUE_DISCIPLINE_FIFO: _Thread_queue_Enqueue_fifo( the_thread_queue, the_thread ); 40009158: 40 00 0f 39 call 4000ce3c <_Thread_queue_Enqueue_fifo> 4000915c: 93 e8 00 10 restore %g0, %l0, %o1 break; case THREAD_QUEUE_DISCIPLINE_PRIORITY: _Thread_queue_Enqueue_priority( the_thread_queue, the_thread ); 40009160: 40 00 00 04 call 40009170 <_Thread_queue_Enqueue_priority> 40009164: 93 e8 00 10 restore %g0, %l0, %o1 40009168: 81 c7 e0 08 ret <== NOT EXECUTED 4000916c: 81 e8 00 00 restore <== NOT EXECUTED 4000cef0 <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { switch ( the_thread_queue->discipline ) { 4000cef0: c2 02 20 34 ld [ %o0 + 0x34 ], %g1 4000cef4: 80 a0 60 00 cmp %g1, 0 4000cef8: 02 80 00 05 be 4000cf0c <_Thread_queue_Extract+0x1c> 4000cefc: 80 a0 60 01 cmp %g1, 1 4000cf00: 12 80 00 09 bne 4000cf24 <_Thread_queue_Extract+0x34> 4000cf04: 94 10 20 00 clr %o2 4000cf08: 30 80 00 04 b,a 4000cf18 <_Thread_queue_Extract+0x28> case THREAD_QUEUE_DISCIPLINE_FIFO: _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); 4000cf0c: 82 13 c0 00 mov %o7, %g1 4000cf10: 40 00 04 32 call 4000dfd8 <_Thread_queue_Extract_fifo> 4000cf14: 9e 10 40 00 mov %g1, %o7 break; case THREAD_QUEUE_DISCIPLINE_PRIORITY: _Thread_queue_Extract_priority( the_thread_queue, the_thread ); 4000cf18: 82 13 c0 00 mov %o7, %g1 4000cf1c: 40 00 00 04 call 4000cf2c <_Thread_queue_Extract_priority_helper> 4000cf20: 9e 10 40 00 mov %g1, %o7 4000cf24: 81 c3 e0 08 retl <== NOT EXECUTED 4000cf28: 01 00 00 00 nop 4000dfd8 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4000dfd8: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 4000dfdc: 7f ff cf 5f call 40001d58 4000dfe0: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4000dfe4: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000dfe8: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000dfec: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000dff0: 80 88 80 01 btst %g2, %g1 4000dff4: 32 80 00 04 bne,a 4000e004 <_Thread_queue_Extract_fifo+0x2c> 4000dff8: c2 06 40 00 ld [ %i1 ], %g1 _ISR_Enable( level ); 4000dffc: 7f ff cf 5b call 40001d68 <== NOT EXECUTED 4000e000: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4000e004: 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 ) ) { 4000e008: c6 06 60 50 ld [ %i1 + 0x50 ], %g3 next->previous = previous; previous->next = next; 4000e00c: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000e010: c4 20 60 04 st %g2, [ %g1 + 4 ] 4000e014: 80 a0 e0 02 cmp %g3, 2 4000e018: 02 80 00 06 be 4000e030 <_Thread_queue_Extract_fifo+0x58> 4000e01c: c0 26 60 44 clr [ %i1 + 0x44 ] _ISR_Enable( level ); 4000e020: 7f ff cf 52 call 40001d68 4000e024: 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 ); 4000e028: 10 80 00 0a b 4000e050 <_Thread_queue_Extract_fifo+0x78> 4000e02c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000e030: 82 10 20 03 mov 3, %g1 4000e034: c2 26 60 50 st %g1, [ %i1 + 0x50 ] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000e038: 7f ff cf 4c call 40001d68 4000e03c: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); 4000e040: 7f ff ef f8 call 4000a020 <_Watchdog_Remove> 4000e044: 90 06 60 48 add %i1, 0x48, %o0 4000e048: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000e04c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000e050: 7f ff ea 05 call 40008864 <_Thread_Clear_state> 4000e054: 81 e8 00 00 restore 4000e058: 01 00 00 00 nop 4000cf2c <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, boolean requeuing ) { 4000cf2c: 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 ); 4000cf30: 7f ff d3 8a call 40001d58 4000cf34: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4000cf38: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000cf3c: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000cf40: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000cf44: 80 88 80 01 btst %g2, %g1 4000cf48: 32 80 00 03 bne,a 4000cf54 <_Thread_queue_Extract_priority_helper+0x28> 4000cf4c: c6 06 60 38 ld [ %i1 + 0x38 ], %g3 _ISR_Enable( level ); 4000cf50: 30 80 00 1d b,a 4000cfc4 <_Thread_queue_Extract_priority_helper+0x98> <== NOT EXECUTED */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4000cf54: 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; 4000cf58: c4 06 40 00 ld [ %i1 ], %g2 previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4000cf5c: 80 a0 c0 01 cmp %g3, %g1 4000cf60: 02 80 00 14 be 4000cfb0 <_Thread_queue_Extract_priority_helper+0x84> 4000cf64: 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; 4000cf68: da 06 60 40 ld [ %i1 + 0x40 ], %o5 new_second_node = new_first_node->next; 4000cf6c: c8 00 c0 00 ld [ %g3 ], %g4 previous_node->next = new_first_node; next_node->previous = new_first_node; 4000cf70: 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; 4000cf74: c6 20 40 00 st %g3, [ %g1 ] next_node->previous = new_first_node; new_first_node->next = next_node; 4000cf78: c4 20 c0 00 st %g2, [ %g3 ] new_first_node->previous = previous_node; 4000cf7c: c2 20 e0 04 st %g1, [ %g3 + 4 ] if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4000cf80: c4 06 60 38 ld [ %i1 + 0x38 ], %g2 4000cf84: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 4000cf88: 80 a0 80 01 cmp %g2, %g1 4000cf8c: 02 80 00 0c be 4000cfbc <_Thread_queue_Extract_priority_helper+0x90> 4000cf90: 80 a6 a0 00 cmp %i2, 0 /* > two threads on 2-n */ new_second_node->previous = 4000cf94: 82 00 e0 38 add %g3, 0x38, %g1 <== NOT EXECUTED 4000cf98: c2 21 20 04 st %g1, [ %g4 + 4 ] <== NOT EXECUTED _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 4000cf9c: c8 20 e0 38 st %g4, [ %g3 + 0x38 ] <== NOT EXECUTED new_first_thread->Wait.Block2n.last = last_node; 4000cfa0: da 20 e0 40 st %o5, [ %g3 + 0x40 ] <== NOT EXECUTED last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4000cfa4: 82 00 e0 3c add %g3, 0x3c, %g1 <== NOT EXECUTED 4000cfa8: 10 80 00 05 b 4000cfbc <_Thread_queue_Extract_priority_helper+0x90> <== NOT EXECUTED 4000cfac: c2 23 40 00 st %g1, [ %o5 ] <== NOT EXECUTED } } else { previous_node->next = next_node; next_node->previous = previous_node; 4000cfb0: 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; 4000cfb4: c4 20 40 00 st %g2, [ %g1 ] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4000cfb8: 80 a6 a0 00 cmp %i2, 0 4000cfbc: 22 80 00 04 be,a 4000cfcc <_Thread_queue_Extract_priority_helper+0xa0> 4000cfc0: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 _ISR_Enable( level ); 4000cfc4: 7f ff d3 69 call 40001d68 4000cfc8: 91 e8 00 08 restore %g0, %o0, %o0 return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4000cfcc: 80 a0 60 02 cmp %g1, 2 4000cfd0: 02 80 00 06 be 4000cfe8 <_Thread_queue_Extract_priority_helper+0xbc> 4000cfd4: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 4000cfd8: 7f ff d3 64 call 40001d68 4000cfdc: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000cfe0: 10 80 00 08 b 4000d000 <_Thread_queue_Extract_priority_helper+0xd4> 4000cfe4: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000cfe8: c2 26 20 50 st %g1, [ %i0 + 0x50 ] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000cfec: 7f ff d3 5f call 40001d68 4000cff0: 33 04 00 ff sethi %hi(0x1003fc00), %i1 (void) _Watchdog_Remove( &the_thread->Timer ); 4000cff4: 7f ff f4 0b call 4000a020 <_Watchdog_Remove> 4000cff8: 90 06 20 48 add %i0, 0x48, %o0 4000cffc: b2 16 63 f8 or %i1, 0x3f8, %i1 4000d000: 7f ff ee 19 call 40008864 <_Thread_Clear_state> 4000d004: 81 e8 00 00 restore 4000d008: 01 00 00 00 nop 400093d0 <_Thread_queue_Extract_with_proxy>: */ boolean _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { 400093d0: 9d e3 bf 98 save %sp, -104, %sp States_Control state; Objects_Information *the_information; Objects_Thread_queue_Extract_callout proxy_extract_callout; state = the_thread->current_state; 400093d4: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 */ boolean _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { 400093d8: a0 10 00 18 mov %i0, %l0 Objects_Information *the_information; Objects_Thread_queue_Extract_callout proxy_extract_callout; state = the_thread->current_state; if ( _States_Is_waiting_on_thread_queue( state ) ) { 400093dc: 03 00 00 ef sethi %hi(0x3bc00), %g1 400093e0: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 400093e4: 80 88 80 01 btst %g2, %g1 400093e8: 02 80 00 1e be 40009460 <_Thread_queue_Extract_with_proxy+0x90> 400093ec: b0 10 20 00 clr %i0 if ( _States_Is_waiting_for_rpc_reply( state ) && 400093f0: 03 00 00 08 sethi %hi(0x2000), %g1 400093f4: 80 88 80 01 btst %g2, %g1 400093f8: 22 80 00 17 be,a 40009454 <_Thread_queue_Extract_with_proxy+0x84> 400093fc: d0 04 20 44 ld [ %l0 + 0x44 ], %o0 40009400: 03 00 00 e7 sethi %hi(0x39c00), %g1 <== NOT EXECUTED 40009404: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 39ee0 <== NOT EXECUTED 40009408: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED 4000940c: 22 80 00 12 be,a 40009454 <_Thread_queue_Extract_with_proxy+0x84> <== NOT EXECUTED 40009410: d0 04 20 44 ld [ %l0 + 0x44 ], %o0 <== NOT EXECUTED _States_Is_locally_blocked( state ) ) { the_information = _Objects_Get_information( the_thread->Wait.id ); 40009414: c6 04 20 20 ld [ %l0 + 0x20 ], %g3 <== NOT EXECUTED proxy_extract_callout = 40009418: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 4000941c: 85 30 e0 16 srl %g3, 0x16, %g2 <== NOT EXECUTED 40009420: 82 10 61 80 or %g1, 0x180, %g1 <== NOT EXECUTED 40009424: 84 08 a0 1c and %g2, 0x1c, %g2 <== NOT EXECUTED 40009428: c2 00 40 02 ld [ %g1 + %g2 ], %g1 <== NOT EXECUTED 4000942c: 87 30 e0 1b srl %g3, 0x1b, %g3 <== NOT EXECUTED 40009430: 87 28 e0 02 sll %g3, 2, %g3 <== NOT EXECUTED 40009434: c2 00 40 03 ld [ %g1 + %g3 ], %g1 <== NOT EXECUTED 40009438: c2 00 60 48 ld [ %g1 + 0x48 ], %g1 <== NOT EXECUTED (Objects_Thread_queue_Extract_callout) the_information->extract; if ( proxy_extract_callout ) 4000943c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009440: 22 80 00 05 be,a 40009454 <_Thread_queue_Extract_with_proxy+0x84> <== NOT EXECUTED 40009444: d0 04 20 44 ld [ %l0 + 0x44 ], %o0 <== NOT EXECUTED (*proxy_extract_callout)( the_thread ); 40009448: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000944c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED } _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 40009450: d0 04 20 44 ld [ %l0 + 0x44 ], %o0 <== NOT EXECUTED 40009454: 92 10 00 10 mov %l0, %o1 40009458: 40 00 0e a6 call 4000cef0 <_Thread_queue_Extract> 4000945c: b0 10 20 01 mov 1, %i0 return TRUE; } return FALSE; } 40009460: 81 c7 e0 08 ret 40009464: 81 e8 00 00 restore 4000ba90 <_Thread_queue_First>: Thread_queue_Control *the_thread_queue ) { Thread_Control *the_thread; switch ( the_thread_queue->discipline ) { 4000ba90: c2 02 20 34 ld [ %o0 + 0x34 ], %g1 4000ba94: 80 a0 60 00 cmp %g1, 0 4000ba98: 02 80 00 05 be 4000baac <_Thread_queue_First+0x1c> 4000ba9c: 80 a0 60 01 cmp %g1, 1 4000baa0: 12 80 00 09 bne 4000bac4 <_Thread_queue_First+0x34> 4000baa4: 01 00 00 00 nop 4000baa8: 30 80 00 04 b,a 4000bab8 <_Thread_queue_First+0x28> case THREAD_QUEUE_DISCIPLINE_FIFO: the_thread = _Thread_queue_First_fifo( the_thread_queue ); 4000baac: 82 13 c0 00 mov %o7, %g1 4000bab0: 40 00 0f 51 call 4000f7f4 <_Thread_queue_First_fifo> 4000bab4: 9e 10 40 00 mov %g1, %o7 break; case THREAD_QUEUE_DISCIPLINE_PRIORITY: the_thread = _Thread_queue_First_priority( the_thread_queue ); 4000bab8: 82 13 c0 00 mov %o7, %g1 4000babc: 40 00 00 04 call 4000bacc <_Thread_queue_First_priority> 4000bac0: 9e 10 40 00 mov %g1, %o7 the_thread = NULL; break; } return the_thread; } 4000bac4: 81 c3 e0 08 retl <== NOT EXECUTED 4000bac8: 90 10 20 00 clr %o0 <== NOT EXECUTED 40009514 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 40009514: 9d e3 bf 98 save %sp, -104, %sp /* just in case the thread really wasn't blocked here */ if ( !the_thread_queue ) { 40009518: 80 a6 20 00 cmp %i0, 0 4000951c: 02 80 00 18 be 4000957c <_Thread_queue_Requeue+0x68> 40009520: 01 00 00 00 nop return; } switch ( the_thread_queue->discipline ) { 40009524: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 40009528: 80 a4 20 01 cmp %l0, 1 4000952c: 12 80 00 14 bne 4000957c <_Thread_queue_Requeue+0x68> 40009530: 01 00 00 00 nop break; case THREAD_QUEUE_DISCIPLINE_PRIORITY: { Thread_queue_Control *tq = the_thread_queue; ISR_Level level; _ISR_Disable( level ); 40009534: 7f ff e2 09 call 40001d58 40009538: 01 00 00 00 nop 4000953c: a2 10 00 08 mov %o0, %l1 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 40009540: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 40009544: 03 00 00 ef sethi %hi(0x3bc00), %g1 40009548: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000954c: 80 88 80 01 btst %g2, %g1 40009550: 02 80 00 09 be 40009574 <_Thread_queue_Requeue+0x60> 40009554: 90 10 00 18 mov %i0, %o0 _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, TRUE ); 40009558: 92 10 00 19 mov %i1, %o1 4000955c: 94 10 20 01 mov 1, %o2 40009560: 40 00 0e 73 call 4000cf2c <_Thread_queue_Extract_priority_helper> 40009564: e0 26 20 30 st %l0, [ %i0 + 0x30 ] _Thread_queue_Enqueue_priority( tq, the_thread ); 40009568: 90 10 00 18 mov %i0, %o0 4000956c: 7f ff ff 01 call 40009170 <_Thread_queue_Enqueue_priority> 40009570: 92 10 00 19 mov %i1, %o1 } _ISR_Enable( level ); 40009574: 7f ff e1 fd call 40001d68 40009578: 91 e8 00 11 restore %g0, %l1, %o0 4000957c: 81 c7 e0 08 ret <== NOT EXECUTED 40009580: 81 e8 00 00 restore <== NOT EXECUTED 40009584 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored ) { 40009584: 9d e3 bf 90 save %sp, -112, %sp uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 40009588: 92 96 20 00 orcc %i0, 0, %o1 4000958c: 12 80 00 0a bne 400095b4 <_Thread_queue_Timeout+0x30> 40009590: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40009594: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 40009598: c4 00 62 20 ld [ %g1 + 0x220 ], %g2 ! 40019e20 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000959c: 84 00 a0 01 inc %g2 <== NOT EXECUTED 400095a0: c4 20 62 20 st %g2, [ %g1 + 0x220 ] <== NOT EXECUTED Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 400095a4: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 400095a8: d2 00 62 fc ld [ %g1 + 0x2fc ], %o1 ! 40019efc <_Thread_Executing> <== NOT EXECUTED 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; 400095ac: 10 80 00 18 b 4000960c <_Thread_queue_Timeout+0x88> <== NOT EXECUTED 400095b0: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 400095b4: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 400095b8: 80 a0 a0 04 cmp %g2, 4 400095bc: 18 80 00 0e bgu 400095f4 <_Thread_queue_Timeout+0x70> 400095c0: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 400095c4: 83 32 60 1b srl %o1, 0x1b, %g1 400095c8: 80 a0 60 01 cmp %g1, 1 400095cc: 12 80 00 0a bne 400095f4 <_Thread_queue_Timeout+0x70> 400095d0: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 400095d4: 83 28 a0 02 sll %g2, 2, %g1 400095d8: 05 10 00 67 sethi %hi(0x40019c00), %g2 400095dc: 84 10 a1 80 or %g2, 0x180, %g2 ! 40019d80 <_Objects_Information_table> 400095e0: c2 00 80 01 ld [ %g2 + %g1 ], %g1 400095e4: d0 00 60 04 ld [ %g1 + 4 ], %o0 if ( !information ) { 400095e8: 80 a2 20 00 cmp %o0, 0 400095ec: 12 80 00 05 bne 40009600 <_Thread_queue_Timeout+0x7c> 400095f0: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; 400095f4: 92 10 20 00 clr %o1 <== NOT EXECUTED 400095f8: 10 80 00 05 b 4000960c <_Thread_queue_Timeout+0x88> <== NOT EXECUTED 400095fc: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40009600: 7f ff f8 5f call 4000777c <_Objects_Get> 40009604: 94 07 bf f4 add %fp, -12, %o2 40009608: 92 10 00 08 mov %o0, %o1 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 4000960c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40009610: 80 a0 60 00 cmp %g1, 0 40009614: 12 80 00 18 bne 40009674 <_Thread_queue_Timeout+0xf0> 40009618: 01 00 00 00 nop */ static inline void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 4000961c: c4 02 60 44 ld [ %o1 + 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_QUEUE_SYNCHRONIZED && 40009620: c6 00 a0 30 ld [ %g2 + 0x30 ], %g3 40009624: 80 a0 e0 00 cmp %g3, 0 40009628: 02 80 00 0b be 40009654 <_Thread_queue_Timeout+0xd0> 4000962c: 03 10 00 67 sethi %hi(0x40019c00), %g1 40009630: c2 00 62 fc ld [ %g1 + 0x2fc ], %g1 ! 40019efc <_Thread_Executing> <== NOT EXECUTED 40009634: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED 40009638: 32 80 00 08 bne,a 40009658 <_Thread_queue_Timeout+0xd4> <== NOT EXECUTED 4000963c: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 <== NOT EXECUTED _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_QUEUE_SATISFIED ) 40009640: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 40009644: 02 80 00 08 be 40009664 <_Thread_queue_Timeout+0xe0> <== NOT EXECUTED 40009648: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED the_thread_queue->sync_state = THREAD_QUEUE_TIMEOUT; 4000964c: 10 80 00 06 b 40009664 <_Thread_queue_Timeout+0xe0> <== NOT EXECUTED 40009650: c2 20 a0 30 st %g1, [ %g2 + 0x30 ] <== NOT EXECUTED } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 40009654: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 40009658: d0 02 60 44 ld [ %o1 + 0x44 ], %o0 4000965c: 40 00 0e 25 call 4000cef0 <_Thread_queue_Extract> 40009660: c2 22 60 34 st %g1, [ %o1 + 0x34 ] */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 40009664: 05 10 00 67 sethi %hi(0x40019c00), %g2 40009668: c2 00 a2 20 ld [ %g2 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> 4000966c: 82 00 7f ff add %g1, -1, %g1 40009670: c2 20 a2 20 st %g1, [ %g2 + 0x220 ] 40009674: 81 c7 e0 08 ret 40009678: 81 e8 00 00 restore 400129e8 <_Timer_Server_body>: */ Thread _Timer_Server_body( uint32_t ignored ) { 400129e8: 9d e3 bf 98 save %sp, -104, %sp /* * Initialize the "last time" markers to indicate the timer that * the server was initiated. */ _Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot; 400129ec: 03 10 00 ce sethi %hi(0x40033800), %g1 400129f0: c8 00 62 94 ld [ %g1 + 0x294 ], %g4 ! 40033a94 <_Watchdog_Ticks_since_boot> _Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch; 400129f4: 03 10 00 ce sethi %hi(0x40033800), %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400129f8: 07 10 00 ce sethi %hi(0x40033800), %g3 400129fc: da 00 61 c8 ld [ %g1 + 0x1c8 ], %o5 40012a00: c2 00 e1 10 ld [ %g3 + 0x110 ], %g1 /* * Initialize the "last time" markers to indicate the timer that * the server was initiated. */ _Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot; 40012a04: 05 10 00 ce sethi %hi(0x40033800), %g2 40012a08: 82 00 60 01 inc %g1 40012a0c: c8 20 a0 1c st %g4, [ %g2 + 0x1c ] 40012a10: c2 20 e1 10 st %g1, [ %g3 + 0x110 ] _Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch; 40012a14: 03 10 00 ce sethi %hi(0x40033800), %g1 40012a18: da 20 60 18 st %o5, [ %g1 + 0x18 ] ! 40033818 <_Timer_Server_seconds_last_time> ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40012a1c: 03 10 00 ce sethi %hi(0x40033800), %g1 */ RTEMS_INLINE_ROUTINE boolean _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 40012a20: 27 10 00 ce sethi %hi(0x40033800), %l3 40012a24: ba 10 62 0c or %g1, 0x20c, %i5 40012a28: 82 14 e0 0c or %l3, 0xc, %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40012a2c: ae 00 60 04 add %g1, 4, %l7 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40012a30: 03 10 00 ce sethi %hi(0x40033800), %g1 */ RTEMS_INLINE_ROUTINE boolean _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 40012a34: 25 10 00 ce sethi %hi(0x40033800), %l2 40012a38: a2 10 60 2c or %g1, 0x2c, %l1 40012a3c: 82 14 a0 20 or %l2, 0x20, %g1 40012a40: a8 10 00 03 mov %g3, %l4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40012a44: ac 00 60 04 add %g1, 4, %l6 /* * Block until there is something to do. */ _Thread_Set_state( _Timer_Server, STATES_DELAYING ); 40012a48: 21 10 00 d0 sethi %hi(0x40034000), %l0 _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 40012a4c: 03 10 00 ce sethi %hi(0x40033800), %g1 40012a50: aa 10 62 00 or %g1, 0x200, %l5 ! 40033a00 <_Watchdog_Seconds_chain> 40012a54: d0 04 23 98 ld [ %l0 + 0x398 ], %o0 40012a58: 40 00 10 38 call 40016b38 <_Thread_Set_state> 40012a5c: 92 10 20 08 mov 8, %o1 */ RTEMS_INLINE_ROUTINE boolean _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 40012a60: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 _Timer_Server_reset_ticks_timer(); 40012a64: 80 a0 40 17 cmp %g1, %l7 40012a68: 22 80 00 09 be,a 40012a8c <_Timer_Server_body+0xa4> 40012a6c: c2 04 a0 20 ld [ %l2 + 0x20 ], %g1 40012a70: d2 04 23 98 ld [ %l0 + 0x398 ], %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40012a74: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40012a78: 90 10 00 1d mov %i5, %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40012a7c: c2 22 60 54 st %g1, [ %o1 + 0x54 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40012a80: 40 00 12 e7 call 4001761c <_Watchdog_Insert> 40012a84: 92 02 60 48 add %o1, 0x48, %o1 40012a88: c2 04 a0 20 ld [ %l2 + 0x20 ], %g1 _Timer_Server_reset_seconds_timer(); 40012a8c: 80 a0 40 16 cmp %g1, %l6 40012a90: 02 80 00 06 be 40012aa8 <_Timer_Server_body+0xc0> 40012a94: 92 10 00 11 mov %l1, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40012a98: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED 40012a9c: c2 24 60 0c st %g1, [ %l1 + 0xc ] <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 40012aa0: 40 00 12 df call 4001761c <_Watchdog_Insert> <== NOT EXECUTED 40012aa4: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED _Thread_Enable_dispatch(); 40012aa8: 7f ff ff c3 call 400129b4 <_Thread_Enable_dispatch> 40012aac: 01 00 00 00 nop * At this point, at least one of the timers this task relies * upon has fired. Stop them both while we process any outstanding * timers. Before we block, we will restart them. */ _Timer_Server_stop_ticks_timer(); 40012ab0: d0 04 23 98 ld [ %l0 + 0x398 ], %o0 40012ab4: 40 00 13 32 call 4001777c <_Watchdog_Remove> 40012ab8: 90 02 20 48 add %o0, 0x48, %o0 _Timer_Server_stop_seconds_timer(); 40012abc: 40 00 13 30 call 4001777c <_Watchdog_Remove> 40012ac0: 90 10 00 11 mov %l1, %o0 40012ac4: c2 05 21 10 ld [ %l4 + 0x110 ], %g1 40012ac8: 82 00 60 01 inc %g1 40012acc: c2 25 21 10 st %g1, [ %l4 + 0x110 ] * This ensures that the primary difference is that _ISR_Nest_level * is 0 for task-based timers and non-zero for the others. */ _Thread_Disable_dispatch(); _Timer_Server_process_ticks_chain(); 40012ad0: 7f ff ff a7 call 4001296c <_Timer_Server_process_ticks_chain> 40012ad4: 01 00 00 00 nop _Timer_Server_process_seconds_chain(); 40012ad8: 7f ff ff 8d call 4001290c <_Timer_Server_process_seconds_chain> 40012adc: 01 00 00 00 nop /* * Block until there is something to do. */ _Thread_Set_state( _Timer_Server, STATES_DELAYING ); 40012ae0: 10 bf ff de b 40012a58 <_Timer_Server_body+0x70> 40012ae4: d0 04 23 98 ld [ %l0 + 0x398 ], %o0 4001296c <_Timer_Server_process_ticks_chain>: void _Timer_Server_process_ticks_chain(void) { Watchdog_Interval snapshot; Watchdog_Interval ticks; snapshot = _Watchdog_Ticks_since_boot; 4001296c: 03 10 00 ce sethi %hi(0x40033800), %g1 40012970: c4 00 62 94 ld [ %g1 + 0x294 ], %g2 ! 40033a94 <_Watchdog_Ticks_since_boot> if ( snapshot >= _Timer_Server_ticks_last_time ) 40012974: 03 10 00 ce sethi %hi(0x40033800), %g1 40012978: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4003381c <_Timer_Server_ticks_last_time> 4001297c: 80 a0 80 01 cmp %g2, %g1 40012980: 1a 80 00 04 bcc 40012990 <_Timer_Server_process_ticks_chain+0x24> 40012984: 94 20 80 01 sub %g2, %g1, %o2 ticks = snapshot - _Timer_Server_ticks_last_time; else ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot; 40012988: 82 38 00 01 xnor %g0, %g1, %g1 <== NOT EXECUTED 4001298c: 94 00 40 02 add %g1, %g2, %o2 <== NOT EXECUTED _Timer_Server_ticks_last_time = snapshot; 40012990: 03 10 00 ce sethi %hi(0x40033800), %g1 _Watchdog_Adjust( &_Timer_Ticks_chain, WATCHDOG_FORWARD, ticks ); 40012994: 11 10 00 ce sethi %hi(0x40033800), %o0 if ( snapshot >= _Timer_Server_ticks_last_time ) ticks = snapshot - _Timer_Server_ticks_last_time; else ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot; _Timer_Server_ticks_last_time = snapshot; 40012998: c4 20 60 1c st %g2, [ %g1 + 0x1c ] _Watchdog_Adjust( &_Timer_Ticks_chain, WATCHDOG_FORWARD, ticks ); 4001299c: 90 12 20 0c or %o0, 0xc, %o0 400129a0: 92 10 20 00 clr %o1 400129a4: 82 13 c0 00 mov %o7, %g1 400129a8: 40 00 12 f5 call 4001757c <_Watchdog_Adjust> 400129ac: 9e 10 40 00 mov %g1, %o7 400129b0: 01 00 00 00 nop 4000b944 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 4000b944: 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; 4000b948: c2 06 40 00 ld [ %i1 ], %g1 /* * 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; 4000b94c: de 06 20 04 ld [ %i0 + 4 ], %o7 right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4000b950: 96 10 00 01 mov %g1, %o3 4000b954: 95 38 60 1f sra %g1, 0x1f, %o2 4000b958: 83 30 60 1d srl %g1, 0x1d, %g1 4000b95c: 9b 2a e0 03 sll %o3, 3, %o5 4000b960: 99 2a a0 03 sll %o2, 3, %o4 4000b964: 98 10 40 0c or %g1, %o4, %o4 4000b968: 83 33 60 1b srl %o5, 0x1b, %g1 4000b96c: 85 2b 20 05 sll %o4, 5, %g2 4000b970: 87 2b 60 05 sll %o5, 5, %g3 4000b974: 84 10 40 02 or %g1, %g2, %g2 4000b978: 86 a0 c0 0d subcc %g3, %o5, %g3 4000b97c: 83 30 e0 1a srl %g3, 0x1a, %g1 4000b980: 84 60 80 0c subx %g2, %o4, %g2 4000b984: 9b 28 e0 06 sll %g3, 6, %o5 4000b988: 99 28 a0 06 sll %g2, 6, %o4 4000b98c: 9a a3 40 03 subcc %o5, %g3, %o5 4000b990: 98 10 40 0c or %g1, %o4, %o4 4000b994: 98 63 00 02 subx %o4, %g2, %o4 4000b998: 9a 83 40 0b addcc %o5, %o3, %o5 4000b99c: 83 33 60 1e srl %o5, 0x1e, %g1 4000b9a0: 98 43 00 0a addx %o4, %o2, %o4 4000b9a4: 87 2b 60 02 sll %o5, 2, %g3 4000b9a8: 85 2b 20 02 sll %o4, 2, %g2 4000b9ac: 9a 83 40 03 addcc %o5, %g3, %o5 4000b9b0: 84 10 40 02 or %g1, %g2, %g2 4000b9b4: 83 33 60 1e srl %o5, 0x1e, %g1 4000b9b8: 98 43 00 02 addx %o4, %g2, %o4 4000b9bc: 87 2b 60 02 sll %o5, 2, %g3 4000b9c0: 85 2b 20 02 sll %o4, 2, %g2 4000b9c4: 9a 83 40 03 addcc %o5, %g3, %o5 4000b9c8: 84 10 40 02 or %g1, %g2, %g2 4000b9cc: 83 33 60 1e srl %o5, 0x1e, %g1 4000b9d0: 98 43 00 02 addx %o4, %g2, %o4 4000b9d4: 85 2b 20 02 sll %o4, 2, %g2 4000b9d8: 84 10 40 02 or %g1, %g2, %g2 right += rhs->tv_nsec; 4000b9dc: c2 06 60 04 ld [ %i1 + 4 ], %g1 * 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; 4000b9e0: 87 2b 60 02 sll %o5, 2, %g3 4000b9e4: 9a 83 40 03 addcc %o5, %g3, %o5 right += rhs->tv_nsec; 4000b9e8: 95 38 60 1f sra %g1, 0x1f, %o2 * 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; 4000b9ec: 98 43 00 02 addx %o4, %g2, %o4 4000b9f0: 89 33 60 17 srl %o5, 0x17, %g4 4000b9f4: 85 2b 20 09 sll %o4, 9, %g2 4000b9f8: 87 2b 60 09 sll %o5, 9, %g3 4000b9fc: 84 11 00 02 or %g4, %g2, %g2 right += rhs->tv_nsec; 4000ba00: 96 80 c0 01 addcc %g3, %g1, %o3 4000ba04: 94 40 80 0a addx %g2, %o2, %o2 if ( right == 0 ) { 4000ba08: 80 92 80 0b orcc %o2, %o3, %g0 4000ba0c: 12 80 00 06 bne 4000ba24 <_Timespec_Divide+0xe0> 4000ba10: f0 06 00 00 ld [ %i0 ], %i0 *ival_percentage = 0; 4000ba14: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED *fval_percentage = 0; 4000ba18: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED 4000ba1c: 81 c7 e0 08 ret <== NOT EXECUTED 4000ba20: 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; 4000ba24: 83 36 20 1d srl %i0, 0x1d, %g1 4000ba28: 9b 2e 20 03 sll %i0, 3, %o5 4000ba2c: 91 3e 20 1f sra %i0, 0x1f, %o0 4000ba30: 99 2a 20 03 sll %o0, 3, %o4 4000ba34: 98 10 40 0c or %g1, %o4, %o4 4000ba38: 83 33 60 1b srl %o5, 0x1b, %g1 4000ba3c: 85 2b 20 05 sll %o4, 5, %g2 4000ba40: 87 2b 60 05 sll %o5, 5, %g3 4000ba44: 84 10 40 02 or %g1, %g2, %g2 4000ba48: 86 a0 c0 0d subcc %g3, %o5, %g3 4000ba4c: 83 30 e0 1a srl %g3, 0x1a, %g1 4000ba50: 84 60 80 0c subx %g2, %o4, %g2 4000ba54: 9b 28 e0 06 sll %g3, 6, %o5 4000ba58: 99 28 a0 06 sll %g2, 6, %o4 4000ba5c: 9a a3 40 03 subcc %o5, %g3, %o5 4000ba60: 98 10 40 0c or %g1, %o4, %o4 4000ba64: 98 63 00 02 subx %o4, %g2, %o4 4000ba68: 9a 83 40 18 addcc %o5, %i0, %o5 4000ba6c: 83 33 60 1e srl %o5, 0x1e, %g1 4000ba70: 98 43 00 08 addx %o4, %o0, %o4 4000ba74: 87 2b 60 02 sll %o5, 2, %g3 4000ba78: 85 2b 20 02 sll %o4, 2, %g2 4000ba7c: 9a 83 40 03 addcc %o5, %g3, %o5 4000ba80: 84 10 40 02 or %g1, %g2, %g2 4000ba84: 83 33 60 1e srl %o5, 0x1e, %g1 4000ba88: 98 43 00 02 addx %o4, %g2, %o4 4000ba8c: 87 2b 60 02 sll %o5, 2, %g3 4000ba90: 85 2b 20 02 sll %o4, 2, %g2 4000ba94: 9a 83 40 03 addcc %o5, %g3, %o5 4000ba98: 84 10 40 02 or %g1, %g2, %g2 4000ba9c: 83 33 60 1e srl %o5, 0x1e, %g1 4000baa0: 98 43 00 02 addx %o4, %g2, %o4 4000baa4: 87 2b 60 02 sll %o5, 2, %g3 4000baa8: 85 2b 20 02 sll %o4, 2, %g2 4000baac: 9a 83 40 03 addcc %o5, %g3, %o5 4000bab0: 84 10 40 02 or %g1, %g2, %g2 4000bab4: 83 33 60 17 srl %o5, 0x17, %g1 4000bab8: 98 43 00 02 addx %o4, %g2, %o4 4000babc: 93 2b 60 09 sll %o5, 9, %o1 4000bac0: 91 2b 20 09 sll %o4, 9, %o0 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 4000bac4: 92 82 40 0f addcc %o1, %o7, %o1 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4000bac8: 90 10 40 08 or %g1, %o0, %o0 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 4000bacc: 83 32 60 1e srl %o1, 0x1e, %g1 4000bad0: a1 3b e0 1f sra %o7, 0x1f, %l0 4000bad4: 87 2a 60 02 sll %o1, 2, %g3 4000bad8: 90 42 00 10 addx %o0, %l0, %o0 4000badc: 85 2a 20 02 sll %o0, 2, %g2 4000bae0: 84 10 40 02 or %g1, %g2, %g2 4000bae4: 83 30 e0 1b srl %g3, 0x1b, %g1 4000bae8: 99 28 a0 05 sll %g2, 5, %o4 4000baec: 9b 28 e0 05 sll %g3, 5, %o5 4000baf0: 98 10 40 0c or %g1, %o4, %o4 4000baf4: 9a a3 40 03 subcc %o5, %g3, %o5 4000baf8: 98 63 00 02 subx %o4, %g2, %o4 4000bafc: 9a 83 40 09 addcc %o5, %o1, %o5 4000bb00: 83 33 60 1e srl %o5, 0x1e, %g1 4000bb04: 98 43 00 08 addx %o4, %o0, %o4 4000bb08: 87 2b 60 02 sll %o5, 2, %g3 4000bb0c: 85 2b 20 02 sll %o4, 2, %g2 4000bb10: 9a 83 40 03 addcc %o5, %g3, %o5 4000bb14: 84 10 40 02 or %g1, %g2, %g2 4000bb18: 83 33 60 1e srl %o5, 0x1e, %g1 4000bb1c: 87 2b 60 02 sll %o5, 2, %g3 4000bb20: 98 43 00 02 addx %o4, %g2, %o4 4000bb24: 9a 83 40 03 addcc %o5, %g3, %o5 4000bb28: 85 2b 20 02 sll %o4, 2, %g2 4000bb2c: 84 10 40 02 or %g1, %g2, %g2 4000bb30: 83 33 60 1b srl %o5, 0x1b, %g1 4000bb34: 98 43 00 02 addx %o4, %g2, %o4 4000bb38: 93 2b 60 05 sll %o5, 5, %o1 4000bb3c: 91 2b 20 05 sll %o4, 5, %o0 4000bb40: 40 00 35 10 call 40018f80 <__udivdi3> 4000bb44: 90 10 40 08 or %g1, %o0, %o0 *ival_percentage = answer / 1000; 4000bb48: 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; 4000bb4c: a0 10 00 08 mov %o0, %l0 4000bb50: a2 10 00 09 mov %o1, %l1 *ival_percentage = answer / 1000; 4000bb54: 96 10 23 e8 mov 0x3e8, %o3 4000bb58: 40 00 35 0a call 40018f80 <__udivdi3> 4000bb5c: 90 10 00 10 mov %l0, %o0 *fval_percentage = answer % 1000; 4000bb60: 90 10 00 10 mov %l0, %o0 * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; *ival_percentage = answer / 1000; 4000bb64: d2 26 80 00 st %o1, [ %i2 ] *fval_percentage = answer % 1000; 4000bb68: 94 10 20 00 clr %o2 4000bb6c: 92 10 00 11 mov %l1, %o1 4000bb70: 40 00 35 e3 call 400192fc <__umoddi3> 4000bb74: 96 10 23 e8 mov 0x3e8, %o3 4000bb78: d2 26 c0 00 st %o1, [ %i3 ] 4000bb7c: 81 c7 e0 08 ret 4000bb80: 81 e8 00 00 restore 40009d08 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, boolean is_internal, uint32_t the_error ) { 40009d08: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 40009d0c: 03 10 00 68 sethi %hi(0x4001a000), %g1 40009d10: 82 10 60 a4 or %g1, 0xa4, %g1 ! 4001a0a4 <_User_extensions_List> 40009d14: e0 00 60 08 ld [ %g1 + 8 ], %l0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 40009d18: 10 80 00 09 b 40009d3c <_User_extensions_Fatal+0x34> 40009d1c: a2 10 00 01 mov %g1, %l1 !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) 40009d20: 80 a0 60 00 cmp %g1, 0 40009d24: 02 80 00 05 be 40009d38 <_User_extensions_Fatal+0x30> 40009d28: 90 10 00 18 mov %i0, %o0 (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 40009d2c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40009d30: 9f c0 40 00 call %g1 <== NOT EXECUTED 40009d34: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 40009d38: e0 04 20 04 ld [ %l0 + 4 ], %l0 { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; 40009d3c: 80 a4 00 11 cmp %l0, %l1 40009d40: 32 bf ff f8 bne,a 40009d20 <_User_extensions_Fatal+0x18> 40009d44: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 40009d48: 81 c7 e0 08 ret 40009d4c: 81 e8 00 00 restore 4000e5c4 <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 4000e5c4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED _Chain_Extract( &the_extension->Node ); 4000e5c8: 40 00 13 1d call 4001323c <_Chain_Extract> <== NOT EXECUTED 4000e5cc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 4000e5d0: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 4000e5d4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000e5d8: 02 80 00 04 be 4000e5e8 <_User_extensions_Remove_set+0x24> <== NOT EXECUTED 4000e5dc: 01 00 00 00 nop <== NOT EXECUTED _Chain_Extract( &the_extension->Switch.Node ); 4000e5e0: 40 00 13 17 call 4001323c <_Chain_Extract> <== NOT EXECUTED 4000e5e4: 91 ee 20 08 restore %i0, 8, %o0 <== NOT EXECUTED 4000e5e8: 81 c7 e0 08 ret <== NOT EXECUTED 4000e5ec: 81 e8 00 00 restore <== NOT EXECUTED 40009d94 <_User_extensions_Thread_create>: */ boolean _User_extensions_Thread_create ( Thread_Control *the_thread ) { 40009d94: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; User_extensions_Control *the_extension; boolean status; for ( the_node = _User_extensions_List.first ; 40009d98: 03 10 00 68 sethi %hi(0x4001a000), %g1 40009d9c: e0 00 60 a4 ld [ %g1 + 0xa4 ], %l0 ! 4001a0a4 <_User_extensions_List> 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)( 40009da0: 23 10 00 67 sethi %hi(0x40019c00), %l1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40009da4: 03 10 00 68 sethi %hi(0x4001a000), %g1 40009da8: 10 80 00 0d b 40009ddc <_User_extensions_Thread_create+0x48> 40009dac: a4 10 60 a8 or %g1, 0xa8, %l2 ! 4001a0a8 <_User_extensions_List+0x4> !_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 ) { 40009db0: 80 a0 60 00 cmp %g1, 0 40009db4: 02 80 00 09 be 40009dd8 <_User_extensions_Thread_create+0x44> 40009db8: 92 10 00 18 mov %i0, %o1 status = (*the_extension->Callouts.thread_create)( 40009dbc: 9f c0 40 00 call %g1 40009dc0: d0 04 62 fc ld [ %l1 + 0x2fc ], %o0 _Thread_Executing, the_thread ); if ( !status ) 40009dc4: 80 a2 20 00 cmp %o0, 0 40009dc8: 32 80 00 05 bne,a 40009ddc <_User_extensions_Thread_create+0x48> 40009dcc: e0 04 00 00 ld [ %l0 ], %l0 40009dd0: 81 c7 e0 08 ret <== NOT EXECUTED 40009dd4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED User_extensions_Control *the_extension; boolean status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 40009dd8: e0 04 00 00 ld [ %l0 ], %l0 Chain_Node *the_node; User_extensions_Control *the_extension; boolean status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 40009ddc: 80 a4 00 12 cmp %l0, %l2 40009de0: 32 bf ff f4 bne,a 40009db0 <_User_extensions_Thread_create+0x1c> 40009de4: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 return FALSE; } } return TRUE; } 40009de8: 81 c7 e0 08 ret 40009dec: 91 e8 20 01 restore %g0, 1, %o0 40009ec0 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 40009ec0: 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; 40009ec4: 03 10 00 67 sethi %hi(0x40019c00), %g1 void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 40009ec8: 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; 40009ecc: e6 00 62 e4 ld [ %g1 + 0x2e4 ], %l3 _ISR_Disable( level ); 40009ed0: 7f ff df a2 call 40001d58 40009ed4: 01 00 00 00 nop 40009ed8: 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 ) { 40009edc: c2 06 60 08 ld [ %i1 + 8 ], %g1 40009ee0: 80 a0 60 00 cmp %g1, 0 40009ee4: 02 80 00 03 be 40009ef0 <_Watchdog_Insert+0x30> 40009ee8: 03 10 00 67 sethi %hi(0x40019c00), %g1 _ISR_Enable( level ); 40009eec: 30 80 00 37 b,a 40009fc8 <_Watchdog_Insert+0x108> <== NOT EXECUTED return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 40009ef0: c4 00 63 a0 ld [ %g1 + 0x3a0 ], %g2 ! 40019fa0 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 40009ef4: 86 10 20 01 mov 1, %g3 _Watchdog_Sync_count++; 40009ef8: 84 00 a0 01 inc %g2 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 40009efc: c6 26 60 08 st %g3, [ %i1 + 8 ] _Watchdog_Sync_count++; 40009f00: c4 20 63 a0 st %g2, [ %g1 + 0x3a0 ] if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 40009f04: 29 10 00 67 sethi %hi(0x40019c00), %l4 the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 40009f08: 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 ; 40009f0c: e2 05 40 00 ld [ %l5 ], %l1 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 40009f10: 80 a4 a0 00 cmp %l2, 0 40009f14: 22 80 00 1c be,a 40009f84 <_Watchdog_Insert+0xc4> 40009f18: c4 04 60 04 ld [ %l1 + 4 ], %g2 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 40009f1c: c2 04 40 00 ld [ %l1 ], %g1 40009f20: 80 a0 60 00 cmp %g1, 0 40009f24: 22 80 00 18 be,a 40009f84 <_Watchdog_Insert+0xc4> 40009f28: c4 04 60 04 ld [ %l1 + 4 ], %g2 break; if ( delta_interval < after->delta_interval ) { 40009f2c: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 40009f30: 80 a4 80 10 cmp %l2, %l0 40009f34: 1a 80 00 04 bcc 40009f44 <_Watchdog_Insert+0x84> 40009f38: 82 24 00 12 sub %l0, %l2, %g1 after->delta_interval -= delta_interval; 40009f3c: 10 80 00 11 b 40009f80 <_Watchdog_Insert+0xc0> 40009f40: 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 ); 40009f44: 7f ff df 89 call 40001d68 40009f48: 90 10 00 18 mov %i0, %o0 40009f4c: 7f ff df 83 call 40001d58 40009f50: 01 00 00 00 nop if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 40009f54: c2 06 60 08 ld [ %i1 + 8 ], %g1 40009f58: 80 a0 60 01 cmp %g1, 1 40009f5c: 12 80 00 15 bne 40009fb0 <_Watchdog_Insert+0xf0> 40009f60: a4 24 80 10 sub %l2, %l0, %l2 goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 40009f64: c2 05 22 f8 ld [ %l4 + 0x2f8 ], %g1 40009f68: 80 a0 40 13 cmp %g1, %l3 40009f6c: 28 bf ff e9 bleu,a 40009f10 <_Watchdog_Insert+0x50> 40009f70: e2 04 40 00 ld [ %l1 ], %l1 _Watchdog_Sync_level = insert_isr_nest_level; 40009f74: e6 25 22 f8 st %l3, [ %l4 + 0x2f8 ] the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 40009f78: 10 bf ff e5 b 40009f0c <_Watchdog_Insert+0x4c> 40009f7c: 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 ); 40009f80: c4 04 60 04 ld [ %l1 + 4 ], %g2 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 40009f84: 03 10 00 67 sethi %hi(0x40019c00), %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 40009f88: c6 00 80 00 ld [ %g2 ], %g3 40009f8c: c2 00 63 a4 ld [ %g1 + 0x3a4 ], %g1 after_node->next = the_node; 40009f90: f2 20 80 00 st %i1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 40009f94: c4 26 60 04 st %g2, [ %i1 + 4 ] 40009f98: c2 26 60 14 st %g1, [ %i1 + 0x14 ] } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 40009f9c: e4 26 60 10 st %l2, [ %i1 + 0x10 ] RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 40009fa0: 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; 40009fa4: 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; 40009fa8: c6 26 40 00 st %g3, [ %i1 ] 40009fac: 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; 40009fb0: 03 10 00 67 sethi %hi(0x40019c00), %g1 _Watchdog_Sync_count--; 40009fb4: 05 10 00 67 sethi %hi(0x40019c00), %g2 _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 40009fb8: e6 20 62 f8 st %l3, [ %g1 + 0x2f8 ] _Watchdog_Sync_count--; 40009fbc: c2 00 a3 a0 ld [ %g2 + 0x3a0 ], %g1 40009fc0: 82 00 7f ff add %g1, -1, %g1 40009fc4: c2 20 a3 a0 st %g1, [ %g2 + 0x3a0 ] _ISR_Enable( level ); 40009fc8: 7f ff df 68 call 40001d68 40009fcc: 81 e8 00 00 restore 40009fd0: 01 00 00 00 nop 4000af00 <_Watchdog_Insert_ticks_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { 4000af00: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; (void) _Watchdog_Remove( timer ); 4000af04: 40 00 16 f3 call 40010ad0 <_Watchdog_Remove> 4000af08: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 4000af0c: 7f ff ed dd call 40006680 4000af10: 01 00 00 00 nop 4000af14: 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 ) { 4000af18: c2 06 20 08 ld [ %i0 + 8 ], %g1 4000af1c: 80 a0 60 00 cmp %g1, 0 4000af20: 22 80 00 06 be,a 4000af38 <_Watchdog_Insert_ticks_helper+0x38> 4000af24: f6 26 20 1c st %i3, [ %i0 + 0x1c ] _ISR_Enable( level ); 4000af28: 7f ff ed da call 40006690 <== NOT EXECUTED 4000af2c: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000af30: 81 c7 e0 08 ret <== NOT EXECUTED 4000af34: 81 e8 00 00 restore <== NOT EXECUTED void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 4000af38: f4 26 20 20 st %i2, [ %i0 + 0x20 ] the_watchdog->user_data = user_data; 4000af3c: f8 26 20 24 st %i4, [ %i0 + 0x24 ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000af40: f2 26 20 0c st %i1, [ %i0 + 0xc ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4000af44: c0 26 20 08 clr [ %i0 + 8 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4000af48: 92 10 00 18 mov %i0, %o1 4000af4c: 11 10 00 93 sethi %hi(0x40024c00), %o0 4000af50: 40 00 16 88 call 40010970 <_Watchdog_Insert> 4000af54: 90 12 21 7c or %o0, 0x17c, %o0 ! 40024d7c <_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 ); 4000af58: b0 10 20 01 mov 1, %i0 4000af5c: 7f ff ed cd call 40006690 4000af60: 90 10 00 10 mov %l0, %o0 return TRUE; } 4000af64: 81 c7 e0 08 ret 4000af68: 81 e8 00 00 restore 4000a020 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 4000a020: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 4000a024: 7f ff df 4d call 40001d58 4000a028: 01 00 00 00 nop previous_state = the_watchdog->state; 4000a02c: e0 06 20 08 ld [ %i0 + 8 ], %l0 switch ( previous_state ) { 4000a030: 80 a4 20 01 cmp %l0, 1 4000a034: 22 80 00 1e be,a 4000a0ac <_Watchdog_Remove+0x8c> 4000a038: c0 26 20 08 clr [ %i0 + 8 ] <== NOT EXECUTED 4000a03c: 0a 80 00 1d bcs 4000a0b0 <_Watchdog_Remove+0x90> 4000a040: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000a044: 80 a4 20 03 cmp %l0, 3 4000a048: 18 80 00 1a bgu 4000a0b0 <_Watchdog_Remove+0x90> 4000a04c: 01 00 00 00 nop 4000a050: c6 06 00 00 ld [ %i0 ], %g3 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 4000a054: c0 26 20 08 clr [ %i0 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 4000a058: c2 00 c0 00 ld [ %g3 ], %g1 4000a05c: 80 a0 60 00 cmp %g1, 0 4000a060: 02 80 00 07 be 4000a07c <_Watchdog_Remove+0x5c> 4000a064: 03 10 00 67 sethi %hi(0x40019c00), %g1 next_watchdog->delta_interval += the_watchdog->delta_interval; 4000a068: c2 00 e0 10 ld [ %g3 + 0x10 ], %g1 4000a06c: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 4000a070: 82 00 40 02 add %g1, %g2, %g1 4000a074: c2 20 e0 10 st %g1, [ %g3 + 0x10 ] if ( _Watchdog_Sync_count ) 4000a078: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000a07c: c2 00 63 a0 ld [ %g1 + 0x3a0 ], %g1 ! 40019fa0 <_Watchdog_Sync_count> 4000a080: 80 a0 60 00 cmp %g1, 0 4000a084: 22 80 00 07 be,a 4000a0a0 <_Watchdog_Remove+0x80> 4000a088: c4 06 00 00 ld [ %i0 ], %g2 _Watchdog_Sync_level = _ISR_Nest_level; 4000a08c: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 4000a090: c4 00 62 e4 ld [ %g1 + 0x2e4 ], %g2 ! 40019ee4 <_ISR_Nest_level> <== NOT EXECUTED 4000a094: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 4000a098: c4 20 62 f8 st %g2, [ %g1 + 0x2f8 ] ! 40019ef8 <_Watchdog_Sync_level> <== NOT EXECUTED ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4000a09c: c4 06 00 00 ld [ %i0 ], %g2 <== NOT EXECUTED previous = the_node->previous; 4000a0a0: c2 06 20 04 ld [ %i0 + 4 ], %g1 next->previous = previous; previous->next = next; 4000a0a4: c4 20 40 00 st %g2, [ %g1 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000a0a8: c2 20 a0 04 st %g1, [ %g2 + 4 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4000a0ac: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000a0b0: c2 00 63 a4 ld [ %g1 + 0x3a4 ], %g1 ! 40019fa4 <_Watchdog_Ticks_since_boot> 4000a0b4: c2 26 20 18 st %g1, [ %i0 + 0x18 ] _ISR_Enable( level ); 4000a0b8: 7f ff df 2c call 40001d68 4000a0bc: b0 10 00 10 mov %l0, %i0 return( previous_state ); } 4000a0c0: 81 c7 e0 08 ret 4000a0c4: 81 e8 00 00 restore 4000a16c <_Workspace_Allocate_or_fatal_error>: */ void *_Workspace_Allocate_or_fatal_error( size_t size ) { 4000a16c: 9d e3 bf 98 save %sp, -104, %sp RTEMS_INLINE_ROUTINE void *_Workspace_Allocate( size_t size ) { return _Heap_Allocate( &_Workspace_Area, size ); 4000a170: 11 10 00 67 sethi %hi(0x40019c00), %o0 4000a174: 92 10 00 18 mov %i0, %o1 4000a178: 7f ff f2 e5 call 40006d0c <_Heap_Allocate> 4000a17c: 90 12 22 6c or %o0, 0x26c, %o0 void *memory; memory = _Workspace_Allocate( size ); if ( memory == NULL ) 4000a180: b0 92 20 00 orcc %o0, 0, %i0 4000a184: 12 80 00 04 bne 4000a194 <_Workspace_Allocate_or_fatal_error+0x28> 4000a188: 92 10 20 01 mov 1, %o1 _Internal_error_Occurred( 4000a18c: 7f ff f4 0b call 400071b8 <_Internal_error_Occurred> <== NOT EXECUTED 4000a190: 94 10 20 04 mov 4, %o2 <== NOT EXECUTED TRUE, INTERNAL_ERROR_WORKSPACE_ALLOCATION ); return memory; } 4000a194: 81 c7 e0 08 ret 4000a198: 81 e8 00 00 restore 4000a19c <_Workspace_Handler_initialization>: void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 4000a19c: 9d e3 bf 98 save %sp, -104, %sp uint32_t *zero_out_array; uint32_t index; uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 4000a1a0: 80 a6 20 00 cmp %i0, 0 4000a1a4: 02 80 00 04 be 4000a1b4 <_Workspace_Handler_initialization+0x18> 4000a1a8: 80 8e 20 07 btst 7, %i0 4000a1ac: 02 80 00 07 be 4000a1c8 <_Workspace_Handler_initialization+0x2c> 4000a1b0: 03 10 00 67 sethi %hi(0x40019c00), %g1 _Internal_error_Occurred( 4000a1b4: 90 10 20 00 clr %o0 <== NOT EXECUTED 4000a1b8: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000a1bc: 7f ff f3 ff call 400071b8 <_Internal_error_Occurred> <== NOT EXECUTED 4000a1c0: 94 10 20 02 mov 2, %o2 <== NOT EXECUTED INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _CPU_Table.do_zero_of_workspace ) { 4000a1c4: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 4000a1c8: c2 00 62 44 ld [ %g1 + 0x244 ], %g1 ! 40019e44 <_CPU_Table+0x10> 4000a1cc: 84 10 20 00 clr %g2 4000a1d0: 80 a0 60 00 cmp %g1, 0 4000a1d4: 12 80 00 06 bne 4000a1ec <_Workspace_Handler_initialization+0x50> 4000a1d8: 87 36 60 02 srl %i1, 2, %g3 index < size / sizeof( uint32_t ) ; index++ ) zero_out_array[ index ] = 0; } memory_available = _Heap_Initialize( 4000a1dc: 10 80 00 08 b 4000a1fc <_Workspace_Handler_initialization+0x60> 4000a1e0: 92 10 00 18 mov %i0, %o1 ); if ( _CPU_Table.do_zero_of_workspace ) { for( zero_out_array = (uint32_t *) starting_address, index = 0 ; index < size / sizeof( uint32_t ) ; index++ ) 4000a1e4: 84 00 a0 01 inc %g2 <== NOT EXECUTED zero_out_array[ index ] = 0; 4000a1e8: c0 20 40 18 clr [ %g1 + %i0 ] <== NOT EXECUTED INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _CPU_Table.do_zero_of_workspace ) { for( zero_out_array = (uint32_t *) starting_address, index = 0 ; index < size / sizeof( uint32_t ) ; 4000a1ec: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED 4000a1f0: 0a bf ff fd bcs 4000a1e4 <_Workspace_Handler_initialization+0x48> <== NOT EXECUTED 4000a1f4: 83 28 a0 02 sll %g2, 2, %g1 <== NOT EXECUTED index++ ) zero_out_array[ index ] = 0; } memory_available = _Heap_Initialize( 4000a1f8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000a1fc: 94 10 00 19 mov %i1, %o2 4000a200: 11 10 00 67 sethi %hi(0x40019c00), %o0 4000a204: 96 10 20 08 mov 8, %o3 4000a208: 7f ff f3 a2 call 40007090 <_Heap_Initialize> 4000a20c: 90 12 22 6c or %o0, 0x26c, %o0 starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 4000a210: 80 a2 20 00 cmp %o0, 0 4000a214: 12 80 00 05 bne 4000a228 <_Workspace_Handler_initialization+0x8c> 4000a218: b0 10 20 00 clr %i0 _Internal_error_Occurred( 4000a21c: b2 10 20 01 mov 1, %i1 <== NOT EXECUTED 4000a220: 7f ff f3 e6 call 400071b8 <_Internal_error_Occurred> <== NOT EXECUTED 4000a224: 95 e8 20 03 restore %g0, 3, %o2 <== NOT EXECUTED 4000a228: 81 c7 e0 08 ret 4000a22c: 81 e8 00 00 restore 40017688 <_exit>: #include #if !defined(RTEMS_UNIX) void _exit(int status) { 40017688: 9d e3 bf 98 save %sp, -104, %sp * 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(); 4001768c: 7f ff ff e4 call 4001761c 40017690: 01 00 00 00 nop rtems_shutdown_executive(status); 40017694: 40 00 00 47 call 400177b0 40017698: 90 10 00 18 mov %i0, %o0 4001769c: 30 80 00 00 b,a 4001769c <_exit+0x14> <== NOT EXECUTED 40020694 <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 40020694: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40020698: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 4002069c: 94 10 00 0b mov %o3, %o2 <== NOT EXECUTED 400206a0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400206a4: 7f ff ff 78 call 40020484 <== NOT EXECUTED 400206a8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400206ac: 01 00 00 00 nop 40021f6c <_getpid_r>: pid_t _getpid_r( struct _reent *ptr ) { return getpid(); } 40021f6c: 81 c3 e0 08 retl <== NOT EXECUTED 40021f70: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000b7b4 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 4000b7b4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000b7b8: 7f ff ff e6 call 4000b750 <== NOT EXECUTED 4000b7bc: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000b7c0: 01 00 00 00 nop 400221e8 <_kill_r>: struct _reent *ptr, pid_t pid, int sig ) { return kill( pid, sig ); 400221e8: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 400221ec: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 400221f0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400221f4: 7f ff ff f8 call 400221d4 <== NOT EXECUTED 400221f8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400221fc: 01 00 00 00 nop 40003a98 <_link_r>: struct _reent *ptr, const char *existing, const char *new ) { return link( existing, new ); 40003a98: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40003a9c: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40003aa0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40003aa4: 7f ff ff 65 call 40003838 <== NOT EXECUTED 40003aa8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40003aac: 01 00 00 00 nop 4000248c <_realloc_r>: struct _reent *ignored, void *ptr, size_t size ) { return realloc( ptr, size ); 4000248c: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40002490: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40002494: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40002498: 7f ff ff b8 call 40002378 <== NOT EXECUTED 4000249c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400024a0: 01 00 00 00 nop 400064ac <_stat_r>: struct _reent *ptr, const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 400064ac: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 400064b0: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 400064b4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400064b8: 7f ff ff c4 call 400063c8 <== NOT EXECUTED 400064bc: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400064c0: 01 00 00 00 nop 40017bb8 <_unlink_r>: int _unlink_r( struct _reent *ptr, const char *path ) { return unlink( path ); 40017bb8: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40017bbc: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40017bc0: 7f ff ff a2 call 40017a48 <== NOT EXECUTED 40017bc4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40017bc8: 01 00 00 00 nop 400051ac : int alphasort(d1, d2) const void *d1; const void *d2; { return(strcmp((*(struct dirent **)d1)->d_name, 400051ac: d0 02 00 00 ld [ %o0 ], %o0 <== NOT EXECUTED 400051b0: d2 02 40 00 ld [ %o1 ], %o1 <== NOT EXECUTED 400051b4: 90 02 20 0c add %o0, 0xc, %o0 <== NOT EXECUTED 400051b8: 92 02 60 0c add %o1, 0xc, %o1 <== NOT EXECUTED 400051bc: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400051c0: 40 00 35 da call 40012928 <== NOT EXECUTED 400051c4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400051c8: 01 00 00 00 nop 40015d8c : #include int chdir( const char *pathname ) { 40015d8c: 9d e3 bf 88 save %sp, -120, %sp /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 40015d90: 92 10 20 01 mov 1, %o1 40015d94: 90 10 00 18 mov %i0, %o0 40015d98: a0 07 bf e8 add %fp, -24, %l0 40015d9c: 96 10 20 01 mov 1, %o3 40015da0: 94 10 00 10 mov %l0, %o2 40015da4: 7f ff bb b6 call 40004c7c 40015da8: b0 10 3f ff mov -1, %i0 pathname, RTEMS_LIBIO_PERMS_SEARCH, &loc, TRUE ); if ( result != 0 ) 40015dac: 80 a2 20 00 cmp %o0, 0 40015db0: 12 80 00 37 bne 40015e8c 40015db4: c4 07 bf f0 ld [ %fp + -16 ], %g2 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 40015db8: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40015dbc: 80 a0 60 00 cmp %g1, 0 40015dc0: 12 80 00 0c bne 40015df0 40015dc4: 01 00 00 00 nop rtems_filesystem_freenode( &loc ); 40015dc8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40015dcc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40015dd0: 02 80 00 04 be 40015de0 <== NOT EXECUTED 40015dd4: 01 00 00 00 nop <== NOT EXECUTED 40015dd8: 9f c0 40 00 call %g1 <== NOT EXECUTED 40015ddc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40015de0: 40 00 33 43 call 40022aec <__errno> <== NOT EXECUTED 40015de4: 01 00 00 00 nop <== NOT EXECUTED 40015de8: 10 80 00 14 b 40015e38 <== NOT EXECUTED 40015dec: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 40015df0: 9f c0 40 00 call %g1 40015df4: 90 10 00 10 mov %l0, %o0 40015df8: 80 a2 20 01 cmp %o0, 1 40015dfc: 02 80 00 12 be 40015e44 40015e00: 03 10 00 e3 sethi %hi(0x40038c00), %g1 rtems_filesystem_freenode( &loc ); 40015e04: c2 07 bf f0 ld [ %fp + -16 ], %g1 40015e08: 80 a0 60 00 cmp %g1, 0 40015e0c: 02 80 00 08 be 40015e2c 40015e10: 01 00 00 00 nop 40015e14: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40015e18: 80 a0 60 00 cmp %g1, 0 40015e1c: 02 80 00 04 be 40015e2c 40015e20: 01 00 00 00 nop 40015e24: 9f c0 40 00 call %g1 40015e28: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 40015e2c: 40 00 33 30 call 40022aec <__errno> 40015e30: 01 00 00 00 nop 40015e34: 82 10 20 14 mov 0x14, %g1 ! 14 40015e38: c2 22 00 00 st %g1, [ %o0 ] 40015e3c: 81 c7 e0 08 ret 40015e40: 91 e8 3f ff restore %g0, -1, %o0 } rtems_filesystem_freenode( &rtems_filesystem_current ); 40015e44: d0 00 60 60 ld [ %g1 + 0x60 ], %o0 40015e48: c2 02 20 0c ld [ %o0 + 0xc ], %g1 40015e4c: 80 a0 60 00 cmp %g1, 0 40015e50: 22 80 00 09 be,a 40015e74 40015e54: 03 10 00 e3 sethi %hi(0x40038c00), %g1 <== NOT EXECUTED 40015e58: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 40038c1c 40015e5c: 80 a0 60 00 cmp %g1, 0 40015e60: 22 80 00 05 be,a 40015e74 40015e64: 03 10 00 e3 sethi %hi(0x40038c00), %g1 <== NOT EXECUTED 40015e68: 9f c0 40 00 call %g1 40015e6c: 90 02 20 04 add %o0, 4, %o0 rtems_filesystem_current = loc; 40015e70: 03 10 00 e3 sethi %hi(0x40038c00), %g1 40015e74: d0 00 60 60 ld [ %g1 + 0x60 ], %o0 ! 40038c60 40015e78: 92 07 bf e8 add %fp, -24, %o1 40015e7c: 90 02 20 04 add %o0, 4, %o0 40015e80: 94 10 20 10 mov 0x10, %o2 40015e84: 40 00 39 ce call 400245bc 40015e88: b0 10 20 00 clr %i0 return 0; } 40015e8c: 81 c7 e0 08 ret 40015e90: 81 e8 00 00 restore 40015e94 : int chmod( const char *path, mode_t mode ) { 40015e94: 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 ); 40015e98: 92 10 20 00 clr %o1 40015e9c: 90 10 00 18 mov %i0, %o0 40015ea0: a0 07 bf e8 add %fp, -24, %l0 40015ea4: 96 10 20 01 mov 1, %o3 40015ea8: 94 10 00 10 mov %l0, %o2 40015eac: 7f ff bb 74 call 40004c7c 40015eb0: b0 10 3f ff mov -1, %i0 if ( status != 0 ) 40015eb4: 80 a2 20 00 cmp %o0, 0 40015eb8: 12 80 00 24 bne 40015f48 40015ebc: c2 07 bf ec ld [ %fp + -20 ], %g1 return -1; if ( !loc.handlers ){ 40015ec0: 80 a0 60 00 cmp %g1, 0 40015ec4: 32 80 00 10 bne,a 40015f04 40015ec8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 rtems_filesystem_freenode( &loc ); 40015ecc: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40015ed0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40015ed4: 02 80 00 08 be 40015ef4 <== NOT EXECUTED 40015ed8: 01 00 00 00 nop <== NOT EXECUTED 40015edc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40015ee0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40015ee4: 02 80 00 04 be 40015ef4 <== NOT EXECUTED 40015ee8: 01 00 00 00 nop <== NOT EXECUTED 40015eec: 9f c0 40 00 call %g1 <== NOT EXECUTED 40015ef0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 40015ef4: 40 00 32 fe call 40022aec <__errno> <== NOT EXECUTED 40015ef8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40015efc: 10 80 00 12 b 40015f44 <== NOT EXECUTED 40015f00: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED } if ( !loc.handlers->fchmod_h ){ 40015f04: 80 a0 60 00 cmp %g1, 0 40015f08: 12 80 00 12 bne 40015f50 40015f0c: 93 2e 60 10 sll %i1, 0x10, %o1 rtems_filesystem_freenode( &loc ); 40015f10: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40015f14: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40015f18: 02 80 00 08 be 40015f38 <== NOT EXECUTED 40015f1c: 01 00 00 00 nop <== NOT EXECUTED 40015f20: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40015f24: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40015f28: 02 80 00 04 be 40015f38 <== NOT EXECUTED 40015f2c: 01 00 00 00 nop <== NOT EXECUTED 40015f30: 9f c0 40 00 call %g1 <== NOT EXECUTED 40015f34: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40015f38: 40 00 32 ed call 40022aec <__errno> <== NOT EXECUTED 40015f3c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40015f40: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40015f44: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40015f48: 81 c7 e0 08 ret 40015f4c: 81 e8 00 00 restore } result = (*loc.handlers->fchmod_h)( &loc, mode ); 40015f50: 90 10 00 10 mov %l0, %o0 40015f54: 9f c0 40 00 call %g1 40015f58: 93 32 60 10 srl %o1, 0x10, %o1 rtems_filesystem_freenode( &loc ); 40015f5c: c2 07 bf f0 ld [ %fp + -16 ], %g1 40015f60: 80 a0 60 00 cmp %g1, 0 40015f64: 02 bf ff f9 be 40015f48 40015f68: b0 10 00 08 mov %o0, %i0 40015f6c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40015f70: 80 a0 60 00 cmp %g1, 0 40015f74: 02 80 00 04 be 40015f84 40015f78: 01 00 00 00 nop 40015f7c: 9f c0 40 00 call %g1 40015f80: 90 10 00 10 mov %l0, %o0 return result; } 40015f84: 81 c7 e0 08 ret 40015f88: 81 e8 00 00 restore 40015f8c : int chown( const char *path, uid_t owner, gid_t group ) { 40015f8c: 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 ) ) 40015f90: 92 10 20 00 clr %o1 40015f94: 90 10 00 18 mov %i0, %o0 40015f98: a0 07 bf e8 add %fp, -24, %l0 40015f9c: 96 10 20 01 mov 1, %o3 40015fa0: 94 10 00 10 mov %l0, %o2 40015fa4: 7f ff bb 36 call 40004c7c 40015fa8: b0 10 3f ff mov -1, %i0 40015fac: 80 a2 20 00 cmp %o0, 0 40015fb0: 12 80 00 10 bne 40015ff0 40015fb4: c2 07 bf f0 ld [ %fp + -16 ], %g1 return -1; if ( !loc.ops->chown_h ) { 40015fb8: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 40015fbc: 80 a0 a0 00 cmp %g2, 0 40015fc0: 12 80 00 0e bne 40015ff8 40015fc4: 93 2e 60 10 sll %i1, 0x10, %o1 rtems_filesystem_freenode( &loc ); 40015fc8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40015fcc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40015fd0: 02 80 00 04 be 40015fe0 <== NOT EXECUTED 40015fd4: 01 00 00 00 nop <== NOT EXECUTED 40015fd8: 9f c0 40 00 call %g1 <== NOT EXECUTED 40015fdc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40015fe0: 40 00 32 c3 call 40022aec <__errno> <== NOT EXECUTED 40015fe4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40015fe8: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40015fec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40015ff0: 81 c7 e0 08 ret 40015ff4: 81 e8 00 00 restore } result = (*loc.ops->chown_h)( &loc, owner, group ); 40015ff8: 95 2e a0 10 sll %i2, 0x10, %o2 40015ffc: 93 32 60 10 srl %o1, 0x10, %o1 40016000: 95 32 a0 10 srl %o2, 0x10, %o2 40016004: 9f c0 80 00 call %g2 40016008: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 4001600c: c2 07 bf f0 ld [ %fp + -16 ], %g1 40016010: 80 a0 60 00 cmp %g1, 0 40016014: 02 bf ff f7 be 40015ff0 40016018: b0 10 00 08 mov %o0, %i0 4001601c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40016020: 80 a0 60 00 cmp %g1, 0 40016024: 02 80 00 04 be 40016034 40016028: 01 00 00 00 nop 4001602c: 9f c0 40 00 call %g1 40016030: 90 10 00 10 mov %l0, %o0 return result; } 40016034: 81 c7 e0 08 ret 40016038: 81 e8 00 00 restore 4001603c : #include int chroot( const char *pathname ) { 4001603c: 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) { 40016040: 23 10 00 e3 sethi %hi(0x40038c00), %l1 40016044: e0 04 60 60 ld [ %l1 + 0x60 ], %l0 ! 40038c60 40016048: 03 10 00 ed sethi %hi(0x4003b400), %g1 4001604c: 82 10 61 f4 or %g1, 0x1f4, %g1 ! 4003b5f4 40016050: 80 a4 00 01 cmp %l0, %g1 40016054: 12 80 00 0e bne 4001608c 40016058: 01 00 00 00 nop rtems_libio_set_private_env(); /* try to set a new private env*/ 4001605c: 40 00 05 39 call 40017540 40016060: 01 00 00 00 nop if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 40016064: c2 04 60 60 ld [ %l1 + 0x60 ], %g1 40016068: 80 a0 40 10 cmp %g1, %l0 4001606c: 12 80 00 08 bne 4001608c 40016070: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 40016074: 40 00 32 9e call 40022aec <__errno> <== NOT EXECUTED 40016078: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4001607c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40016080: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40016084: 81 c7 e0 08 ret <== NOT EXECUTED 40016088: 81 e8 00 00 restore <== NOT EXECUTED }; result = chdir(pathname); 4001608c: 7f ff ff 40 call 40015d8c 40016090: 90 10 00 18 mov %i0, %o0 if (result) { 40016094: 80 a2 20 00 cmp %o0, 0 40016098: 12 80 00 0a bne 400160c0 4001609c: 11 10 00 d5 sethi %hi(0x40035400), %o0 rtems_set_errno_and_return_minus_one( errno ); }; /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 400160a0: 92 10 20 00 clr %o1 400160a4: 90 12 20 80 or %o0, 0x80, %o0 400160a8: 94 07 bf e8 add %fp, -24, %o2 400160ac: 7f ff ba f4 call 40004c7c 400160b0: 96 10 20 00 clr %o3 400160b4: 80 a2 20 00 cmp %o0, 0 400160b8: 02 80 00 0a be 400160e0 400160bc: 03 10 00 e3 sethi %hi(0x40038c00), %g1 /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 400160c0: 40 00 32 8b call 40022aec <__errno> <== NOT EXECUTED 400160c4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400160c8: 40 00 32 89 call 40022aec <__errno> <== NOT EXECUTED 400160cc: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 400160d0: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 400160d4: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED 400160d8: 81 c7 e0 08 ret <== NOT EXECUTED 400160dc: 81 e8 00 00 restore <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); 400160e0: d0 00 60 60 ld [ %g1 + 0x60 ], %o0 400160e4: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 400160e8: 80 a0 60 00 cmp %g1, 0 400160ec: 22 80 00 09 be,a 40016110 400160f0: 03 10 00 e3 sethi %hi(0x40038c00), %g1 <== NOT EXECUTED 400160f4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 40038c1c 400160f8: 80 a0 60 00 cmp %g1, 0 400160fc: 22 80 00 05 be,a 40016110 40016100: 03 10 00 e3 sethi %hi(0x40038c00), %g1 <== NOT EXECUTED 40016104: 9f c0 40 00 call %g1 40016108: 90 02 20 14 add %o0, 0x14, %o0 rtems_filesystem_root = loc; 4001610c: 03 10 00 e3 sethi %hi(0x40038c00), %g1 40016110: d0 00 60 60 ld [ %g1 + 0x60 ], %o0 ! 40038c60 40016114: 92 07 bf e8 add %fp, -24, %o1 40016118: 94 10 20 10 mov 0x10, %o2 4001611c: 90 02 20 14 add %o0, 0x14, %o0 40016120: 40 00 39 27 call 400245bc 40016124: b0 10 20 00 clr %i0 return 0; } 40016128: 81 c7 e0 08 ret 4001612c: 81 e8 00 00 restore 40005d74 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 40005d74: 9d e3 bf 98 save %sp, -104, %sp if ( !tp ) 40005d78: 90 96 60 00 orcc %i1, 0, %o0 40005d7c: 12 80 00 08 bne 40005d9c 40005d80: 80 a6 20 02 cmp %i0, 2 rtems_set_errno_and_return_minus_one( EINVAL ); 40005d84: 40 00 27 5d call 4000faf8 <__errno> <== NOT EXECUTED 40005d88: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40005d8c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40005d90: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40005d94: 81 c7 e0 08 ret <== NOT EXECUTED 40005d98: 81 e8 00 00 restore <== NOT EXECUTED switch ( clock_id ) { 40005d9c: 02 80 00 10 be 40005ddc 40005da0: 80 a6 20 02 cmp %i0, 2 40005da4: 18 80 00 06 bgu 40005dbc 40005da8: 80 a6 20 03 cmp %i0, 3 40005dac: 80 a6 20 01 cmp %i0, 1 40005db0: 12 80 00 11 bne 40005df4 40005db4: 01 00 00 00 nop 40005db8: 30 80 00 06 b,a 40005dd0 40005dbc: 02 80 00 0c be 40005dec <== NOT EXECUTED 40005dc0: 80 a6 20 04 cmp %i0, 4 <== NOT EXECUTED 40005dc4: 12 80 00 0c bne 40005df4 <== NOT EXECUTED 40005dc8: 01 00 00 00 nop <== NOT EXECUTED 40005dcc: 30 80 00 04 b,a 40005ddc <== NOT EXECUTED case CLOCK_REALTIME: _TOD_Get(tp); 40005dd0: 40 00 0a b8 call 400088b0 <_TOD_Get> 40005dd4: b0 10 20 00 clr %i0 40005dd8: 30 80 00 0b b,a 40005e04 break; #endif #ifdef _POSIX_CPUTIME case CLOCK_PROCESS_CPUTIME: _TOD_Get_uptime(tp); 40005ddc: 40 00 0a ce call 40008914 <_TOD_Get_uptime> <== NOT EXECUTED 40005de0: b0 10 20 00 clr %i0 <== NOT EXECUTED 40005de4: 81 c7 e0 08 ret <== NOT EXECUTED 40005de8: 81 e8 00 00 restore <== NOT EXECUTED break; #endif #ifdef _POSIX_THREAD_CPUTIME case CLOCK_THREAD_CPUTIME: return POSIX_NOT_IMPLEMENTED(); 40005dec: 40 00 02 fb call 400069d8 <== NOT EXECUTED 40005df0: 81 e8 00 00 restore <== NOT EXECUTED break; #endif default: rtems_set_errno_and_return_minus_one( EINVAL ); 40005df4: 40 00 27 41 call 4000faf8 <__errno> <== NOT EXECUTED 40005df8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40005dfc: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40005e00: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return 0; } 40005e04: 81 c7 e0 08 ret 40005e08: 81 e8 00 00 restore 40005e0c : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 40005e0c: 9d e3 bf 98 save %sp, -104, %sp if ( !tp ) 40005e10: 90 96 60 00 orcc %i1, 0, %o0 40005e14: 02 80 00 0d be 40005e48 40005e18: 80 a6 20 02 cmp %i0, 2 rtems_set_errno_and_return_minus_one( EINVAL ); switch ( clock_id ) { 40005e1c: 02 80 00 22 be 40005ea4 40005e20: 80 a6 20 03 cmp %i0, 3 40005e24: 02 80 00 20 be 40005ea4 40005e28: 80 a6 20 01 cmp %i0, 1 40005e2c: 12 80 00 20 bne 40005eac 40005e30: 03 08 76 b9 sethi %hi(0x21dae400), %g1 case CLOCK_REALTIME: if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 40005e34: c4 02 00 00 ld [ %o0 ], %g2 40005e38: 82 10 60 ff or %g1, 0xff, %g1 40005e3c: 80 a0 80 01 cmp %g2, %g1 40005e40: 18 80 00 08 bgu 40005e60 40005e44: 21 10 00 76 sethi %hi(0x4001d800), %l0 rtems_set_errno_and_return_minus_one( EINVAL ); 40005e48: 40 00 27 2c call 4000faf8 <__errno> <== NOT EXECUTED 40005e4c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40005e50: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40005e54: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40005e58: 81 c7 e0 08 ret <== NOT EXECUTED 40005e5c: 81 e8 00 00 restore <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40005e60: c2 04 23 30 ld [ %l0 + 0x330 ], %g1 40005e64: 82 00 60 01 inc %g1 40005e68: c2 24 23 30 st %g1, [ %l0 + 0x330 ] _Thread_Disable_dispatch(); _TOD_Set( tp ); 40005e6c: 40 00 0a da call 400089d4 <_TOD_Set> 40005e70: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40005e74: c2 04 23 30 ld [ %l0 + 0x330 ], %g1 40005e78: b0 10 20 00 clr %i0 40005e7c: 82 00 7f ff add %g1, -1, %g1 40005e80: c2 24 23 30 st %g1, [ %l0 + 0x330 ] 40005e84: c2 04 23 30 ld [ %l0 + 0x330 ], %g1 40005e88: 80 a0 60 00 cmp %g1, 0 40005e8c: 12 80 00 0c bne 40005ebc 40005e90: 01 00 00 00 nop _Thread_Dispatch(); 40005e94: 40 00 12 69 call 4000a838 <_Thread_Dispatch> 40005e98: 01 00 00 00 nop 40005e9c: 81 c7 e0 08 ret 40005ea0: 81 e8 00 00 restore break; #endif #ifdef _POSIX_THREAD_CPUTIME case CLOCK_THREAD_CPUTIME: return POSIX_NOT_IMPLEMENTED(); 40005ea4: 40 00 02 cd call 400069d8 <== NOT EXECUTED 40005ea8: 81 e8 00 00 restore <== NOT EXECUTED break; #endif default: rtems_set_errno_and_return_minus_one( EINVAL ); 40005eac: 40 00 27 13 call 4000faf8 <__errno> 40005eb0: b0 10 3f ff mov -1, %i0 40005eb4: 82 10 20 16 mov 0x16, %g1 40005eb8: c2 22 00 00 st %g1, [ %o0 ] } return 0; } 40005ebc: 81 c7 e0 08 ret 40005ec0: 81 e8 00 00 restore 40016130 : * close a directory. */ int closedir(dirp) register DIR *dirp; { 40016130: 9d e3 bf 98 save %sp, -104, %sp int fd; if ( !dirp ) 40016134: a0 96 20 00 orcc %i0, 0, %l0 40016138: 02 80 00 0b be 40016164 4001613c: 82 10 3f ff mov -1, %g1 rtems_set_errno_and_return_minus_one( EBADF ); fd = dirp->dd_fd; dirp->dd_fd = -1; dirp->dd_loc = 0; (void)free((void *)dirp->dd_buf); 40016140: d0 04 20 0c ld [ %l0 + 0xc ], %o0 int fd; if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); fd = dirp->dd_fd; 40016144: f0 04 00 00 ld [ %l0 ], %i0 dirp->dd_fd = -1; dirp->dd_loc = 0; 40016148: c0 24 20 04 clr [ %l0 + 4 ] (void)free((void *)dirp->dd_buf); 4001614c: 7f ff bc 2b call 400051f8 40016150: c2 24 00 00 st %g1, [ %l0 ] (void)free((void *)dirp); 40016154: 7f ff bc 29 call 400051f8 40016158: 90 10 00 10 mov %l0, %o0 return(close(fd)); 4001615c: 7f ff ba 69 call 40004b00 40016160: 81 e8 00 00 restore register DIR *dirp; { int fd; if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); 40016164: 40 00 32 62 call 40022aec <__errno> <== NOT EXECUTED 40016168: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001616c: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 40016170: 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)); } 40016174: 81 c7 e0 08 ret <== NOT EXECUTED 40016178: 81 e8 00 00 restore <== NOT EXECUTED 4000d42c : */ int device_close( rtems_libio_t *iop ) { 4000d42c: 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; 4000d430: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 args.iop = iop; 4000d434: f0 27 bf ec st %i0, [ %fp + -20 ] args.flags = 0; 4000d438: c0 27 bf f0 clr [ %fp + -16 ] args.mode = 0; 4000d43c: c0 27 bf f4 clr [ %fp + -12 ] status = rtems_io_close( 4000d440: d2 00 60 50 ld [ %g1 + 0x50 ], %o1 4000d444: d0 00 60 4c ld [ %g1 + 0x4c ], %o0 4000d448: 94 07 bf ec add %fp, -20, %o2 4000d44c: 40 00 02 1e call 4000dcc4 4000d450: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 4000d454: 80 a2 20 00 cmp %o0, 0 4000d458: 02 80 00 05 be 4000d46c 4000d45c: 01 00 00 00 nop return rtems_deviceio_errno(status); 4000d460: 7f ff ff a3 call 4000d2ec <== NOT EXECUTED 4000d464: 01 00 00 00 nop <== NOT EXECUTED 4000d468: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } return 0; } 4000d46c: 81 c7 e0 08 ret 4000d470: 81 e8 00 00 restore 4000d320 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4000d320: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED args.iop = iop; args.command = command; args.buffer = buffer; the_jnode = iop->file_info; 4000d324: 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; 4000d328: f2 27 bf ec st %i1, [ %fp + -20 ] <== NOT EXECUTED args.buffer = buffer; 4000d32c: 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; 4000d330: 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( 4000d334: d2 00 60 50 ld [ %g1 + 0x50 ], %o1 <== NOT EXECUTED 4000d338: d0 00 60 4c ld [ %g1 + 0x4c ], %o0 <== NOT EXECUTED 4000d33c: 40 00 02 78 call 4000dd1c <== NOT EXECUTED 4000d340: 94 07 bf e8 add %fp, -24, %o2 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000d344: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d348: 22 80 00 06 be,a 4000d360 <== NOT EXECUTED 4000d34c: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED return rtems_deviceio_errno(status); 4000d350: 7f ff ff e7 call 4000d2ec <== NOT EXECUTED 4000d354: 01 00 00 00 nop <== NOT EXECUTED return args.ioctl_return; } 4000d358: 81 c7 e0 08 ret <== NOT EXECUTED 4000d35c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000d360: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4000d364: 81 c7 e0 08 ret <== NOT EXECUTED 4000d368: 81 e8 00 00 restore <== NOT EXECUTED 4000d474 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4000d474: 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; 4000d478: 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; 4000d47c: c4 06 20 2c ld [ %i0 + 0x2c ], %g2 args.iop = iop; 4000d480: f0 27 bf ec st %i0, [ %fp + -20 ] args.flags = iop->flags; 4000d484: c2 27 bf f0 st %g1, [ %fp + -16 ] args.mode = mode; 4000d488: f6 27 bf f4 st %i3, [ %fp + -12 ] status = rtems_io_open( 4000d48c: d2 00 a0 50 ld [ %g2 + 0x50 ], %o1 4000d490: d0 00 a0 4c ld [ %g2 + 0x4c ], %o0 4000d494: 94 07 bf ec add %fp, -20, %o2 4000d498: 40 00 02 37 call 4000dd74 4000d49c: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000d4a0: 80 a2 20 00 cmp %o0, 0 4000d4a4: 02 80 00 05 be 4000d4b8 4000d4a8: 01 00 00 00 nop return rtems_deviceio_errno(status); 4000d4ac: 7f ff ff 90 call 4000d2ec <== NOT EXECUTED 4000d4b0: 01 00 00 00 nop <== NOT EXECUTED 4000d4b4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED return 0; } 4000d4b8: 81 c7 e0 08 ret 4000d4bc: 81 e8 00 00 restore 4000d3cc : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4000d3cc: 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; 4000d3d0: 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; 4000d3d4: 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; 4000d3d8: c6 06 20 2c ld [ %i0 + 0x2c ], %g3 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; 4000d3dc: 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; 4000d3e0: c2 27 bf e4 st %g1, [ %fp + -28 ] <== NOT EXECUTED args.buffer = buffer; args.count = count; 4000d3e4: f4 27 bf ec st %i2, [ %fp + -20 ] <== NOT EXECUTED args.flags = iop->flags; 4000d3e8: 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; 4000d3ec: 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; 4000d3f0: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED status = rtems_io_read( 4000d3f4: d2 00 e0 50 ld [ %g3 + 0x50 ], %o1 <== NOT EXECUTED 4000d3f8: d0 00 e0 4c ld [ %g3 + 0x4c ], %o0 <== NOT EXECUTED 4000d3fc: 40 00 02 74 call 4000ddcc <== NOT EXECUTED 4000d400: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000d404: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d408: 22 80 00 06 be,a 4000d420 <== NOT EXECUTED 4000d40c: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED return rtems_deviceio_errno(status); 4000d410: 7f ff ff b7 call 4000d2ec <== NOT EXECUTED 4000d414: 01 00 00 00 nop <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4000d418: 81 c7 e0 08 ret <== NOT EXECUTED 4000d41c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000d420: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4000d424: 81 c7 e0 08 ret <== NOT EXECUTED 4000d428: 81 e8 00 00 restore <== NOT EXECUTED 4000d36c : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4000d36c: 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; 4000d370: 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; 4000d374: 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; 4000d378: c6 06 20 2c ld [ %i0 + 0x2c ], %g3 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 4000d37c: 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; 4000d380: c2 27 bf e4 st %g1, [ %fp + -28 ] args.buffer = (void *) buffer; args.count = count; 4000d384: f4 27 bf ec st %i2, [ %fp + -20 ] args.flags = iop->flags; 4000d388: 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; 4000d38c: 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; 4000d390: c0 27 bf f4 clr [ %fp + -12 ] status = rtems_io_write( 4000d394: d2 00 e0 50 ld [ %g3 + 0x50 ], %o1 4000d398: d0 00 e0 4c ld [ %g3 + 0x4c ], %o0 4000d39c: 40 00 02 a2 call 4000de24 4000d3a0: 94 07 bf e0 add %fp, -32, %o2 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000d3a4: 80 a2 20 00 cmp %o0, 0 4000d3a8: 22 80 00 06 be,a 4000d3c0 4000d3ac: d0 07 bf f4 ld [ %fp + -12 ], %o0 return rtems_deviceio_errno(status); 4000d3b0: 7f ff ff cf call 4000d2ec <== NOT EXECUTED 4000d3b4: 01 00 00 00 nop <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4000d3b8: 81 c7 e0 08 ret <== NOT EXECUTED 4000d3bc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000d3c0: b0 10 00 08 mov %o0, %i0 4000d3c4: 81 c7 e0 08 ret 4000d3c8: 81 e8 00 00 restore 40003e28 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 40003e28: 9d e3 bf 98 save %sp, -104, %sp rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 40003e2c: c2 06 20 b4 ld [ %i0 + 0xb4 ], %g1 40003e30: 80 a0 60 00 cmp %g1, 0 40003e34: 02 80 00 1a be 40003e9c 40003e38: 01 00 00 00 nop rtems_interrupt_disable (level); 40003e3c: 7f ff f7 c7 call 40001d58 <== NOT EXECUTED 40003e40: 01 00 00 00 nop <== NOT EXECUTED 40003e44: 30 80 00 0f b,a 40003e80 <== NOT EXECUTED while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 40003e48: c2 26 20 94 st %g1, [ %i0 + 0x94 ] <== NOT EXECUTED rtems_interrupt_enable (level); 40003e4c: 7f ff f7 c7 call 40001d68 <== NOT EXECUTED 40003e50: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 40003e54: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 40003e58: 92 10 20 00 clr %o1 <== NOT EXECUTED 40003e5c: 40 00 06 b1 call 40005920 <== NOT EXECUTED 40003e60: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 40003e64: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003e68: 02 80 00 04 be 40003e78 <== NOT EXECUTED 40003e6c: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40003e70: 40 00 09 ab call 4000651c <== NOT EXECUTED 40003e74: 01 00 00 00 nop <== NOT EXECUTED rtems_interrupt_disable (level); 40003e78: 7f ff f7 b8 call 40001d58 <== NOT EXECUTED 40003e7c: 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) { 40003e80: c4 06 20 84 ld [ %i0 + 0x84 ], %g2 <== NOT EXECUTED 40003e84: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 40003e88: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40003e8c: 12 bf ff ef bne 40003e48 <== NOT EXECUTED 40003e90: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 40003e94: 7f ff f7 b5 call 40001d68 <== NOT EXECUTED 40003e98: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40003e9c: 81 c7 e0 08 ret 40003ea0: 81 e8 00 00 restore 40002cfc : int dup2( int fildes, int fildes2 ) { 40002cfc: 9d e3 bf 48 save %sp, -184, %sp /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 40002d00: a0 07 bf a8 add %fp, -88, %l0 40002d04: 90 10 00 18 mov %i0, %o0 40002d08: 40 00 01 b1 call 400033cc 40002d0c: 92 10 00 10 mov %l0, %o1 if ( status == -1 ) 40002d10: 80 a2 3f ff cmp %o0, -1 40002d14: 02 80 00 0e be 40002d4c 40002d18: 90 10 3f ff mov -1, %o0 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 40002d1c: 92 10 00 10 mov %l0, %o1 40002d20: 40 00 01 ab call 400033cc 40002d24: 90 10 00 19 mov %i1, %o0 if ( status == -1 ) 40002d28: 80 a2 3f ff cmp %o0, -1 40002d2c: 02 80 00 07 be 40002d48 40002d30: 90 10 00 18 mov %i0, %o0 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 40002d34: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED 40002d38: 40 00 00 96 call 40002f90 <== NOT EXECUTED 40002d3c: 92 10 20 00 clr %o1 <== NOT EXECUTED } 40002d40: 81 c7 e0 08 ret <== NOT EXECUTED 40002d44: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 40002d48: 90 10 3f ff mov -1, %o0 } 40002d4c: b0 10 00 08 mov %o0, %i0 40002d50: 81 c7 e0 08 ret 40002d54: 81 e8 00 00 restore 4000389c : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 4000389c: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 400038a0: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 400038a4: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 400038a8: 02 80 00 1a be 40003910 <== NOT EXECUTED 400038ac: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400038b0: 03 10 00 65 sethi %hi(0x40019400), %g1 <== NOT EXECUTED 400038b4: c2 00 61 08 ld [ %g1 + 0x108 ], %g1 ! 40019508 <__ctype_ptr> <== NOT EXECUTED 400038b8: 84 0e 20 ff and %i0, 0xff, %g2 <== NOT EXECUTED 400038bc: c2 08 40 02 ldub [ %g1 + %g2 ], %g1 <== NOT EXECUTED 400038c0: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 400038c4: 22 80 00 14 be,a 40003914 <== NOT EXECUTED 400038c8: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED 400038cc: 80 a0 a0 09 cmp %g2, 9 <== NOT EXECUTED 400038d0: 02 80 00 10 be 40003910 <== NOT EXECUTED 400038d4: 80 a0 a0 0a cmp %g2, 0xa <== NOT EXECUTED 400038d8: 02 80 00 0e be 40003910 <== NOT EXECUTED 400038dc: 82 1e 20 40 xor %i0, 0x40, %g1 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 400038e0: c2 2f bf f7 stb %g1, [ %fp + -9 ] <== 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] = '^'; 400038e4: 82 10 20 5e mov 0x5e, %g1 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 400038e8: 90 07 bf f6 add %fp, -10, %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] = '^'; 400038ec: c2 2f bf f6 stb %g1, [ %fp + -10 ] <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 400038f0: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 400038f4: 7f ff ff 3c call 400035e4 <== NOT EXECUTED 400038f8: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED tty->column += 2; 400038fc: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 40003900: 82 00 60 02 add %g1, 2, %g1 <== NOT EXECUTED 40003904: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED 40003908: 81 c7 e0 08 ret <== NOT EXECUTED 4000390c: 81 e8 00 00 restore <== NOT EXECUTED } else { oproc (c, tty); 40003910: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED 40003914: 7f ff ff 80 call 40003714 <== NOT EXECUTED 40003918: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000391c: 81 c7 e0 08 ret <== NOT EXECUTED 40003920: 81 e8 00 00 restore <== NOT EXECUTED 400168d8 : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 400168d8: 03 10 00 e9 sethi %hi(0x4003a400), %g1 <== NOT EXECUTED 400168dc: d0 00 61 d4 ld [ %g1 + 0x1d4 ], %o0 ! 4003a5d4 <== NOT EXECUTED 400168e0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400168e4: 02 80 00 05 be 400168f8 <== NOT EXECUTED 400168e8: 01 00 00 00 nop <== NOT EXECUTED fclose(group_fp); 400168ec: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400168f0: 40 00 30 d5 call 40022c44 <== NOT EXECUTED 400168f4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400168f8: 81 c3 e0 08 retl <== NOT EXECUTED 400168fc: 01 00 00 00 nop 40016900 : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 40016900: 03 10 00 e9 sethi %hi(0x4003a400), %g1 <== NOT EXECUTED 40016904: d0 00 60 ec ld [ %g1 + 0xec ], %o0 ! 4003a4ec <== NOT EXECUTED 40016908: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001690c: 02 80 00 05 be 40016920 <== NOT EXECUTED 40016910: 01 00 00 00 nop <== NOT EXECUTED fclose(passwd_fp); 40016914: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40016918: 40 00 30 cb call 40022c44 <== NOT EXECUTED 4001691c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40016920: 81 c3 e0 08 retl <== NOT EXECUTED 40016924: 01 00 00 00 nop 40003924 : * 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) { 40003924: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (tty->ccount == 0) 40003928: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 <== NOT EXECUTED 4000392c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003930: 02 80 00 0a be 40003958 <== NOT EXECUTED 40003934: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED return; if (lineFlag) { 40003938: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 4000393c: 02 80 00 7d be 40003b30 <== NOT EXECUTED 40003940: 03 10 00 60 sethi %hi(0x40018000), %g1 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { 40003944: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 40003948: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 4000394c: 32 80 00 05 bne,a 40003960 <== NOT EXECUTED 40003950: 80 88 60 10 btst 0x10, %g1 <== NOT EXECUTED tty->ccount = 0; 40003954: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED 40003958: 81 c7 e0 08 ret <== NOT EXECUTED 4000395c: 81 e8 00 00 restore <== NOT EXECUTED return; } if (!(tty->termios.c_lflag & ECHOE)) { 40003960: 12 80 00 74 bne 40003b30 <== NOT EXECUTED 40003964: 03 10 00 60 sethi %hi(0x40018000), %g1 <== NOT EXECUTED tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 40003968: 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; 4000396c: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 40003970: 7f ff ff cb call 4000389c <== NOT EXECUTED 40003974: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 40003978: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED echo ('\n', tty); 4000397c: 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) 40003980: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40003984: 12 80 00 11 bne 400039c8 <== NOT EXECUTED 40003988: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED 4000398c: 30 80 00 71 b,a 40003b50 <== NOT EXECUTED } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { 40003990: c6 04 20 3c ld [ %l0 + 0x3c ], %g3 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 40003994: 82 01 3f ff add %g4, -1, %g1 <== NOT EXECUTED 40003998: c2 24 20 20 st %g1, [ %l0 + 0x20 ] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 4000399c: 80 88 e0 08 btst 8, %g3 <== NOT EXECUTED 400039a0: 02 80 00 5f be 40003b1c <== NOT EXECUTED 400039a4: c4 08 80 01 ldub [ %g2 + %g1 ], %g2 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 400039a8: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 400039ac: 12 80 00 09 bne 400039d0 <== NOT EXECUTED 400039b0: 83 28 a0 18 sll %g2, 0x18, %g1 <== NOT EXECUTED 400039b4: 80 88 e0 10 btst 0x10, %g3 <== NOT EXECUTED 400039b8: 12 80 00 07 bne 400039d4 <== NOT EXECUTED 400039bc: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); 400039c0: f0 0c 20 43 ldub [ %l0 + 0x43 ], %i0 <== NOT EXECUTED 400039c4: b2 10 00 10 mov %l0, %i1 <== NOT EXECUTED 400039c8: 7f ff ff b5 call 4000389c <== NOT EXECUTED 400039cc: 81 e8 00 00 restore <== NOT EXECUTED } else if (c == '\t') { 400039d0: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED 400039d4: 80 a0 60 09 cmp %g1, 9 <== NOT EXECUTED 400039d8: 32 80 00 2c bne,a 40003a88 <== NOT EXECUTED 400039dc: c2 04 61 08 ld [ %l1 + 0x108 ], %g1 <== NOT EXECUTED int col = tty->read_start_column; 400039e0: 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)) { 400039e4: d8 04 61 08 ld [ %l1 + 0x108 ], %o4 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 400039e8: 9a 01 3f ff add %g4, -1, %o5 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 400039ec: 88 08 e2 00 and %g3, 0x200, %g4 <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 400039f0: 10 80 00 14 b 40003a40 <== NOT EXECUTED 400039f4: 86 10 20 00 clr %g3 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 400039f8: c4 48 40 03 ldsb [ %g1 + %g3 ], %g2 <== NOT EXECUTED 400039fc: c2 08 40 03 ldub [ %g1 + %g3 ], %g1 <== NOT EXECUTED 40003a00: 80 a0 a0 09 cmp %g2, 9 <== NOT EXECUTED 40003a04: 12 80 00 05 bne 40003a18 <== NOT EXECUTED 40003a08: 82 08 60 ff and %g1, 0xff, %g1 <== NOT EXECUTED col = (col | 7) + 1; 40003a0c: 82 16 20 07 or %i0, 7, %g1 <== NOT EXECUTED 40003a10: 10 80 00 0b b 40003a3c <== NOT EXECUTED 40003a14: b0 00 60 01 add %g1, 1, %i0 <== NOT EXECUTED } else if (iscntrl (c)) { 40003a18: c2 0b 00 01 ldub [ %o4 + %g1 ], %g1 <== NOT EXECUTED 40003a1c: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40003a20: 22 80 00 07 be,a 40003a3c <== NOT EXECUTED 40003a24: b0 06 20 01 inc %i0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 40003a28: 80 a1 20 00 cmp %g4, 0 <== NOT EXECUTED 40003a2c: 32 80 00 04 bne,a 40003a3c <== NOT EXECUTED 40003a30: b0 06 20 02 add %i0, 2, %i0 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 40003a34: 10 80 00 03 b 40003a40 <== NOT EXECUTED 40003a38: 86 00 e0 01 inc %g3 <== NOT EXECUTED 40003a3c: 86 00 e0 01 inc %g3 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 40003a40: 80 a0 c0 0d cmp %g3, %o5 <== NOT EXECUTED 40003a44: 32 bf ff ed bne,a 400039f8 <== NOT EXECUTED 40003a48: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 40003a4c: 10 80 00 08 b 40003a6c <== NOT EXECUTED 40003a50: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 40003a54: 7f ff fe e4 call 400035e4 <== NOT EXECUTED 40003a58: 01 00 00 00 nop <== NOT EXECUTED tty->column--; 40003a5c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40003a60: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40003a64: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 40003a68: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 40003a6c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40003a70: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 40003a74: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED 40003a78: 14 bf ff f7 bg 40003a54 <== NOT EXECUTED 40003a7c: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 40003a80: 10 80 00 28 b 40003b20 <== NOT EXECUTED 40003a84: 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)) { 40003a88: b0 08 a0 ff and %g2, 0xff, %i0 <== NOT EXECUTED 40003a8c: c2 08 40 18 ldub [ %g1 + %i0 ], %g1 <== NOT EXECUTED 40003a90: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40003a94: 02 80 00 10 be 40003ad4 <== NOT EXECUTED 40003a98: c2 04 61 08 ld [ %l1 + 0x108 ], %g1 <== NOT EXECUTED 40003a9c: 80 88 e2 00 btst 0x200, %g3 <== NOT EXECUTED 40003aa0: 22 80 00 0e be,a 40003ad8 <== NOT EXECUTED 40003aa4: c2 08 40 18 ldub [ %g1 + %i0 ], %g1 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 40003aa8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40003aac: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 40003ab0: 7f ff fe cd call 400035e4 <== NOT EXECUTED 40003ab4: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) 40003ab8: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40003abc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003ac0: 22 80 00 05 be,a 40003ad4 <== NOT EXECUTED 40003ac4: c2 04 61 08 ld [ %l1 + 0x108 ], %g1 <== NOT EXECUTED tty->column--; 40003ac8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40003acc: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 40003ad0: c2 04 61 08 ld [ %l1 + 0x108 ], %g1 <== NOT EXECUTED 40003ad4: c2 08 40 18 ldub [ %g1 + %i0 ], %g1 <== NOT EXECUTED 40003ad8: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40003adc: 02 80 00 07 be 40003af8 <== NOT EXECUTED 40003ae0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40003ae4: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 40003ae8: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 40003aec: 02 80 00 0d be 40003b20 <== NOT EXECUTED 40003af0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 40003af4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40003af8: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 40003afc: 7f ff fe ba call 400035e4 <== NOT EXECUTED 40003b00: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) 40003b04: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40003b08: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003b0c: 02 80 00 05 be 40003b20 <== NOT EXECUTED 40003b10: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED tty->column--; 40003b14: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40003b18: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED } } } if (!lineFlag) 40003b1c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40003b20: 02 80 00 0c be 40003b50 <== NOT EXECUTED 40003b24: 01 00 00 00 nop <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 40003b28: 10 80 00 07 b 40003b44 <== NOT EXECUTED 40003b2c: c8 04 20 20 ld [ %l0 + 0x20 ], %g4 <== NOT EXECUTED 40003b30: 23 10 00 65 sethi %hi(0x40019400), %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); 40003b34: a4 10 60 40 or %g1, 0x40, %l2 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 40003b38: 03 10 00 60 sethi %hi(0x40018000), %g1 <== NOT EXECUTED 40003b3c: a6 10 60 38 or %g1, 0x38, %l3 ! 40018038 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 40003b40: c8 04 20 20 ld [ %l0 + 0x20 ], %g4 <== NOT EXECUTED 40003b44: 80 a1 20 00 cmp %g4, 0 <== NOT EXECUTED 40003b48: 32 bf ff 92 bne,a 40003990 <== NOT EXECUTED 40003b4c: c4 04 20 1c ld [ %l0 + 0x1c ], %g2 <== NOT EXECUTED 40003b50: 81 c7 e0 08 ret <== NOT EXECUTED 40003b54: 81 e8 00 00 restore <== NOT EXECUTED 40020484 : int fcntl( int fd, int cmd, ... ) { 40020484: 9d e3 bf 90 save %sp, -112, %sp int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 40020488: 03 10 00 e1 sethi %hi(0x40038400), %g1 4002048c: da 00 60 4c ld [ %g1 + 0x4c ], %o5 ! 4003844c ... ) { int ret; va_list ap; va_start( ap, cmd ); 40020490: 86 07 a0 4c add %fp, 0x4c, %g3 int fcntl( int fd, int cmd, ... ) { 40020494: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 40020498: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 4002049c: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 400204a0: fa 27 a0 58 st %i5, [ %fp + 0x58 ] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 400204a4: 80 a6 00 0d cmp %i0, %o5 400204a8: 1a 80 00 0e bcc 400204e0 400204ac: c6 27 bf f4 st %g3, [ %fp + -12 ] iop = rtems_libio_iop( fd ); 400204b0: 03 10 00 eb sethi %hi(0x4003ac00), %g1 400204b4: c8 00 61 94 ld [ %g1 + 0x194 ], %g4 ! 4003ad94 400204b8: 85 2e 20 02 sll %i0, 2, %g2 400204bc: 83 2e 20 04 sll %i0, 4, %g1 400204c0: 82 20 40 02 sub %g1, %g2, %g1 400204c4: 82 00 40 18 add %g1, %i0, %g1 400204c8: 83 28 60 02 sll %g1, 2, %g1 400204cc: b0 01 00 01 add %g4, %g1, %i0 rtems_libio_check_is_open(iop); 400204d0: d0 06 20 0c ld [ %i0 + 0xc ], %o0 400204d4: 80 8a 21 00 btst 0x100, %o0 400204d8: 12 80 00 07 bne 400204f4 400204dc: 80 a6 60 09 cmp %i1, 9 400204e0: 40 00 09 83 call 40022aec <__errno> <== NOT EXECUTED 400204e4: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED 400204e8: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 400204ec: 10 80 00 68 b 4002068c <== NOT EXECUTED 400204f0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 400204f4: 18 80 00 50 bgu 40020634 400204f8: 83 2e 60 02 sll %i1, 2, %g1 400204fc: 05 10 00 81 sethi %hi(0x40020400), %g2 40020500: 84 10 a0 5c or %g2, 0x5c, %g2 ! 4002045c 40020504: c2 00 80 01 ld [ %g2 + %g1 ], %g1 40020508: 81 c0 40 00 jmp %g1 4002050c: 01 00 00 00 nop case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 40020510: d0 00 c0 00 ld [ %g3 ], %o0 if ( fd2 ) 40020514: 80 a2 20 00 cmp %o0, 0 40020518: 02 80 00 0b be 40020544 4002051c: 80 a2 00 0d cmp %o0, %o5 diop = rtems_libio_iop( fd2 ); 40020520: 1a 80 00 0e bcc 40020558 <== NOT EXECUTED 40020524: ba 10 20 00 clr %i5 <== NOT EXECUTED 40020528: 85 2a 20 02 sll %o0, 2, %g2 <== NOT EXECUTED 4002052c: 83 2a 20 04 sll %o0, 4, %g1 <== NOT EXECUTED 40020530: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 40020534: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED 40020538: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 4002053c: 10 80 00 07 b 40020558 <== NOT EXECUTED 40020540: ba 01 00 01 add %g4, %g1, %i5 <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 40020544: 7f ff 92 de call 400050bc 40020548: 01 00 00 00 nop if ( diop == 0 ) { 4002054c: ba 92 20 00 orcc %o0, 0, %i5 40020550: 22 80 00 4f be,a 4002068c 40020554: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED ret = -1; break; } } diop->handlers = iop->handlers; 40020558: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 diop->file_info = iop->file_info; 4002055c: c4 06 20 2c ld [ %i0 + 0x2c ], %g2 diop->flags = iop->flags; 40020560: c6 06 20 0c ld [ %i0 + 0xc ], %g3 ret = -1; break; } } diop->handlers = iop->handlers; 40020564: c2 27 60 30 st %g1, [ %i5 + 0x30 ] diop->file_info = iop->file_info; 40020568: c4 27 60 2c st %g2, [ %i5 + 0x2c ] diop->flags = iop->flags; 4002056c: c6 27 60 0c st %g3, [ %i5 + 0xc ] diop->pathinfo = iop->pathinfo; 40020570: 90 07 60 10 add %i5, 0x10, %o0 40020574: 92 06 20 10 add %i0, 0x10, %o1 40020578: 40 00 10 11 call 400245bc 4002057c: 94 10 20 10 mov 0x10, %o2 ret = (int) (diop - rtems_libio_iops); 40020580: 03 10 00 eb sethi %hi(0x4003ac00), %g1 40020584: c6 00 61 94 ld [ %g1 + 0x194 ], %g3 ! 4003ad94 40020588: 86 27 40 03 sub %i5, %g3, %g3 4002058c: 87 38 e0 02 sra %g3, 2, %g3 40020590: 83 28 e0 02 sll %g3, 2, %g1 40020594: 85 28 e0 06 sll %g3, 6, %g2 40020598: 84 20 80 01 sub %g2, %g1, %g2 4002059c: 83 28 a0 06 sll %g2, 6, %g1 400205a0: 82 20 40 02 sub %g1, %g2, %g1 400205a4: 85 28 60 0c sll %g1, 0xc, %g2 400205a8: 82 00 40 02 add %g1, %g2, %g1 400205ac: 82 00 40 03 add %g1, %g3, %g1 400205b0: 83 28 60 04 sll %g1, 4, %g1 400205b4: 82 20 40 03 sub %g1, %g3, %g1 400205b8: 83 28 60 02 sll %g1, 2, %g1 400205bc: 10 80 00 23 b 40020648 400205c0: b8 20 c0 01 sub %g3, %g1, %i4 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 400205c4: 83 32 20 0b srl %o0, 0xb, %g1 400205c8: 10 80 00 23 b 40020654 400205cc: b8 08 60 01 and %g1, 1, %i4 * 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 ) ) 400205d0: c2 00 c0 00 ld [ %g3 ], %g1 400205d4: 80 a0 60 00 cmp %g1, 0 400205d8: 22 80 00 03 be,a 400205e4 400205dc: 82 0a 37 ff and %o0, -2049, %g1 <== NOT EXECUTED 400205e0: 82 12 28 00 or %o0, 0x800, %g1 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 400205e4: c2 26 20 0c st %g1, [ %i0 + 0xc ] 400205e8: 10 80 00 1b b 40020654 400205ec: b8 10 20 00 clr %i4 break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 400205f0: 7f ff 92 48 call 40004f10 400205f4: 01 00 00 00 nop 400205f8: 10 80 00 14 b 40020648 400205fc: b8 10 00 08 mov %o0, %i4 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 40020600: d0 00 c0 00 ld [ %g3 ], %o0 40020604: 7f ff 92 e4 call 40005194 40020608: b8 10 20 00 clr %i4 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 4002060c: c2 06 20 0c ld [ %i0 + 0xc ], %g1 40020610: 90 0a 22 01 and %o0, 0x201, %o0 40020614: 82 08 7d fe and %g1, -514, %g1 40020618: 90 12 00 01 or %o0, %g1, %o0 4002061c: 10 80 00 0e b 40020654 40020620: d0 26 20 0c st %o0, [ %i0 + 0xc ] errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 40020624: 40 00 09 32 call 40022aec <__errno> 40020628: 01 00 00 00 nop 4002062c: 10 80 00 05 b 40020640 40020630: 82 10 20 86 mov 0x86, %g1 ! 86 ret = -1; break; default: errno = EINVAL; 40020634: 40 00 09 2e call 40022aec <__errno> 40020638: 01 00 00 00 nop 4002063c: 82 10 20 16 mov 0x16, %g1 ! 16 40020640: 10 80 00 12 b 40020688 40020644: c2 22 00 00 st %g1, [ %o0 ] /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 40020648: 80 a7 20 00 cmp %i4, 0 4002064c: 06 80 00 10 bl 4002068c 40020650: 01 00 00 00 nop if (iop->handlers->fcntl_h) { 40020654: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40020658: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 4002065c: 80 a0 60 00 cmp %g1, 0 40020660: 02 80 00 0b be 4002068c 40020664: 90 10 00 19 mov %i1, %o0 int err = (*iop->handlers->fcntl_h)( cmd, iop ); 40020668: 9f c0 40 00 call %g1 4002066c: 92 10 00 18 mov %i0, %o1 if (err) { 40020670: ba 92 20 00 orcc %o0, 0, %i5 40020674: 02 80 00 06 be 4002068c 40020678: 01 00 00 00 nop errno = err; 4002067c: 40 00 09 1c call 40022aec <__errno> <== NOT EXECUTED 40020680: 01 00 00 00 nop <== NOT EXECUTED 40020684: fa 22 00 00 st %i5, [ %o0 ] <== NOT EXECUTED { int ret; va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); 40020688: b8 10 3f ff mov -1, %i4 return ret; } 4002068c: 81 c7 e0 08 ret 40020690: 91 e8 00 1c restore %g0, %i4, %o0 40003290 : long fpathconf( int fd, int name ) { 40003290: 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); 40003294: 03 10 00 5c sethi %hi(0x40017000), %g1 40003298: c2 00 63 6c ld [ %g1 + 0x36c ], %g1 ! 4001736c 4000329c: 80 a6 00 01 cmp %i0, %g1 400032a0: 1a 80 00 0d bcc 400032d4 400032a4: 85 2e 20 02 sll %i0, 2, %g2 iop = rtems_libio_iop(fd); 400032a8: 03 10 00 61 sethi %hi(0x40018400), %g1 400032ac: c6 00 60 40 ld [ %g1 + 0x40 ], %g3 ! 40018440 400032b0: 83 2e 20 04 sll %i0, 4, %g1 400032b4: 82 20 40 02 sub %g1, %g2, %g1 400032b8: 82 00 40 18 add %g1, %i0, %g1 400032bc: 83 28 60 02 sll %g1, 2, %g1 400032c0: 82 00 40 03 add %g1, %g3, %g1 rtems_libio_check_is_open(iop); 400032c4: c6 00 60 0c ld [ %g1 + 0xc ], %g3 400032c8: 80 88 e1 00 btst 0x100, %g3 400032cc: 12 80 00 06 bne 400032e4 400032d0: 80 88 e0 02 btst 2, %g3 400032d4: 40 00 35 75 call 400108a8 <__errno> 400032d8: 01 00 00 00 nop 400032dc: 10 80 00 07 b 400032f8 400032e0: 82 10 20 09 mov 9, %g1 ! 9 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 400032e4: 12 80 00 08 bne 40003304 400032e8: 80 a6 60 0b cmp %i1, 0xb 400032ec: 40 00 35 6f call 400108a8 <__errno> <== NOT EXECUTED 400032f0: 01 00 00 00 nop <== NOT EXECUTED 400032f4: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 400032f8: c2 22 00 00 st %g1, [ %o0 ] 400032fc: 81 c7 e0 08 ret 40003300: 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 ) { 40003304: 18 80 00 2c bgu 400033b4 40003308: f0 00 60 1c ld [ %g1 + 0x1c ], %i0 4000330c: 83 2e 60 02 sll %i1, 2, %g1 40003310: 05 10 00 0c sethi %hi(0x40003000), %g2 40003314: 84 10 a2 60 or %g2, 0x260, %g2 ! 40003260 40003318: c2 00 80 01 ld [ %g2 + %g1 ], %g1 4000331c: 81 c0 40 00 jmp %g1 40003320: 01 00 00 00 nop case _PC_LINK_MAX: return_value = the_limits->link_max; 40003324: f0 06 20 30 ld [ %i0 + 0x30 ], %i0 40003328: 81 c7 e0 08 ret 4000332c: 81 e8 00 00 restore break; case _PC_MAX_CANON: return_value = the_limits->max_canon; 40003330: f0 06 20 34 ld [ %i0 + 0x34 ], %i0 40003334: 81 c7 e0 08 ret 40003338: 81 e8 00 00 restore break; case _PC_MAX_INPUT: return_value = the_limits->max_input; 4000333c: f0 06 20 38 ld [ %i0 + 0x38 ], %i0 40003340: 81 c7 e0 08 ret 40003344: 81 e8 00 00 restore break; case _PC_NAME_MAX: return_value = the_limits->name_max; 40003348: f0 06 20 3c ld [ %i0 + 0x3c ], %i0 4000334c: 81 c7 e0 08 ret 40003350: 81 e8 00 00 restore break; case _PC_PATH_MAX: return_value = the_limits->path_max; 40003354: f0 06 20 40 ld [ %i0 + 0x40 ], %i0 40003358: 81 c7 e0 08 ret 4000335c: 81 e8 00 00 restore break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 40003360: f0 06 20 44 ld [ %i0 + 0x44 ], %i0 40003364: 81 c7 e0 08 ret 40003368: 81 e8 00 00 restore break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 4000336c: f0 06 20 4c ld [ %i0 + 0x4c ], %i0 40003370: 81 c7 e0 08 ret 40003374: 81 e8 00 00 restore break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 40003378: f0 06 20 50 ld [ %i0 + 0x50 ], %i0 4000337c: 81 c7 e0 08 ret 40003380: 81 e8 00 00 restore break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 40003384: f0 06 20 5c ld [ %i0 + 0x5c ], %i0 40003388: 81 c7 e0 08 ret 4000338c: 81 e8 00 00 restore break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 40003390: f0 06 20 48 ld [ %i0 + 0x48 ], %i0 40003394: 81 c7 e0 08 ret 40003398: 81 e8 00 00 restore break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 4000339c: f0 06 20 54 ld [ %i0 + 0x54 ], %i0 400033a0: 81 c7 e0 08 ret 400033a4: 81 e8 00 00 restore break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 400033a8: f0 06 20 58 ld [ %i0 + 0x58 ], %i0 400033ac: 81 c7 e0 08 ret 400033b0: 81 e8 00 00 restore break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 400033b4: 40 00 35 3d call 400108a8 <__errno> 400033b8: b0 10 3f ff mov -1, %i0 400033bc: 82 10 20 16 mov 0x16, %g1 400033c0: c2 22 00 00 st %g1, [ %o0 ] break; } return return_value; } 400033c4: 81 c7 e0 08 ret 400033c8: 81 e8 00 00 restore 400021ac : } void free( void *ptr ) { 400021ac: 9d e3 bf 98 save %sp, -104, %sp MSBUMP(free_calls, 1); if ( !ptr ) 400021b0: 80 a6 20 00 cmp %i0, 0 400021b4: 02 80 00 1f be 40002230 400021b8: 03 10 00 68 sethi %hi(0x4001a000), %g1 /* * Do not attempt to free memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 400021bc: c2 00 60 00 ld [ %g1 ], %g1 400021c0: 80 a0 60 03 cmp %g1, 3 400021c4: 12 80 00 0e bne 400021fc 400021c8: 03 10 00 67 sethi %hi(0x40019c00), %g1 if ((_Thread_Dispatch_disable_level > 0) || (_ISR_Nest_level > 0)) { 400021cc: c2 00 62 20 ld [ %g1 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> 400021d0: 80 a0 60 00 cmp %g1, 0 400021d4: 12 80 00 06 bne 400021ec 400021d8: 03 10 00 67 sethi %hi(0x40019c00), %g1 400021dc: c2 00 62 e4 ld [ %g1 + 0x2e4 ], %g1 ! 40019ee4 <_ISR_Nest_level> 400021e0: 80 a0 60 00 cmp %g1, 0 400021e4: 02 80 00 07 be 40002200 400021e8: 37 10 00 67 sethi %hi(0x40019c00), %i3 Chain_Append(&RTEMS_Malloc_GC_list, (Chain_Node *)ptr); 400021ec: b2 10 00 18 mov %i0, %i1 400021f0: 31 10 00 67 sethi %hi(0x40019c00), %i0 400021f4: 40 00 11 89 call 40006818 <_Chain_Append> 400021f8: 91 ee 20 bc restore %i0, 0xbc, %o0 MSBUMP(lifetime_freed, size); } } #endif if ( !_Protected_heap_Free( &RTEMS_Malloc_Heap, ptr ) ) { 400021fc: 37 10 00 67 sethi %hi(0x40019c00), %i3 <== NOT EXECUTED 40002200: 92 10 00 18 mov %i0, %o1 40002204: 40 00 17 7a call 40007fec <_Protected_heap_Free> 40002208: 90 16 e0 60 or %i3, 0x60, %o0 4000220c: 80 a2 20 00 cmp %o0, 0 40002210: 12 80 00 08 bne 40002230 40002214: 82 16 e0 60 or %i3, 0x60, %g1 printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 40002218: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 <== NOT EXECUTED 4000221c: f4 00 60 18 ld [ %g1 + 0x18 ], %i2 <== NOT EXECUTED 40002220: b2 10 00 18 mov %i0, %i1 <== NOT EXECUTED 40002224: 31 10 00 5f sethi %hi(0x40017c00), %i0 <== NOT EXECUTED 40002228: 40 00 03 60 call 40002fa8 <== NOT EXECUTED 4000222c: 91 ee 23 c8 restore %i0, 0x3c8, %o0 <== NOT EXECUTED 40002230: 81 c7 e0 08 ret 40002234: 81 e8 00 00 restore 4001741c : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 4001741c: 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 40017420: 03 10 00 ed sethi %hi(0x4003b400), %g1 <== NOT EXECUTED 40017424: 82 10 61 f4 or %g1, 0x1f4, %g1 ! 4003b5f4 <== NOT EXECUTED 40017428: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 4001742c: 02 80 00 18 be 4001748c <== NOT EXECUTED 40017430: 01 00 00 00 nop <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 40017434: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED 40017438: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001743c: 22 80 00 09 be,a 40017460 <== NOT EXECUTED 40017440: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED 40017444: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40017448: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001744c: 22 80 00 05 be,a 40017460 <== NOT EXECUTED 40017450: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED 40017454: 9f c0 40 00 call %g1 <== NOT EXECUTED 40017458: 90 06 20 04 add %i0, 4, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 4001745c: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED 40017460: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40017464: 02 80 00 08 be 40017484 <== NOT EXECUTED 40017468: 01 00 00 00 nop <== NOT EXECUTED 4001746c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40017470: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40017474: 02 80 00 04 be 40017484 <== NOT EXECUTED 40017478: 01 00 00 00 nop <== NOT EXECUTED 4001747c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40017480: 90 06 20 14 add %i0, 0x14, %o0 <== NOT EXECUTED free(env); 40017484: 7f ff b7 5d call 400051f8 <== NOT EXECUTED 40017488: 81 e8 00 00 restore <== NOT EXECUTED 4001748c: 81 c7 e0 08 ret <== NOT EXECUTED 40017490: 81 e8 00 00 restore <== NOT EXECUTED 400173e0 : int fstat( int fd, struct stat *sbuf ) { 400173e0: 9d e3 bf 98 save %sp, -104, %sp /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 400173e4: 80 a6 60 00 cmp %i1, 0 400173e8: 32 80 00 06 bne,a 40017400 400173ec: 03 10 00 62 sethi %hi(0x40018800), %g1 rtems_set_errno_and_return_minus_one( EFAULT ); 400173f0: 7f ff db 4b call 4000e11c <__errno> 400173f4: 01 00 00 00 nop 400173f8: 10 80 00 2a b 400174a0 400173fc: 82 10 20 0e mov 0xe, %g1 ! e /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 40017400: c2 00 63 bc ld [ %g1 + 0x3bc ], %g1 40017404: 80 a6 00 01 cmp %i0, %g1 40017408: 1a 80 00 23 bcc 40017494 4001740c: 03 10 00 67 sethi %hi(0x40019c00), %g1 40017410: c6 00 60 54 ld [ %g1 + 0x54 ], %g3 ! 40019c54 40017414: 85 2e 20 02 sll %i0, 2, %g2 40017418: 83 2e 20 04 sll %i0, 4, %g1 4001741c: 82 20 40 02 sub %g1, %g2, %g1 40017420: 82 00 40 18 add %g1, %i0, %g1 40017424: 83 28 60 02 sll %g1, 2, %g1 40017428: b0 00 40 03 add %g1, %g3, %i0 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 4001742c: c2 06 20 0c ld [ %i0 + 0xc ], %g1 40017430: 80 88 61 00 btst 0x100, %g1 40017434: 02 80 00 18 be 40017494 40017438: 01 00 00 00 nop if ( !iop->handlers ) 4001743c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40017440: 80 a0 60 00 cmp %g1, 0 40017444: 02 80 00 14 be 40017494 40017448: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 4001744c: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 40017450: 80 a0 60 00 cmp %g1, 0 40017454: 12 80 00 06 bne 4001746c 40017458: 92 10 20 00 clr %o1 rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001745c: 7f ff db 30 call 4000e11c <__errno> <== NOT EXECUTED 40017460: 01 00 00 00 nop <== NOT EXECUTED 40017464: 10 80 00 0f b 400174a0 <== NOT EXECUTED 40017468: 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) ); 4001746c: 94 10 20 50 mov 0x50, %o2 40017470: 7f ff dd 2d call 4000e924 40017474: 90 10 00 19 mov %i1, %o0 return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 40017478: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 4001747c: 90 06 20 10 add %i0, 0x10, %o0 40017480: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 40017484: 9f c0 40 00 call %g1 40017488: 92 10 00 19 mov %i1, %o1 } 4001748c: 81 c7 e0 08 ret 40017490: 91 e8 00 08 restore %g0, %o0, %o0 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); 40017494: 7f ff db 22 call 4000e11c <__errno> 40017498: 01 00 00 00 nop 4001749c: 82 10 20 09 mov 9, %g1 ! 9 400174a0: c2 22 00 00 st %g1, [ %o0 ] 400174a4: 90 10 3f ff mov -1, %o0 * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 400174a8: b0 10 00 08 mov %o0, %i0 400174ac: 81 c7 e0 08 ret 400174b0: 81 e8 00 00 restore 400034b8 : #include int fsync( int fd ) { 400034b8: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_t *iop; rtems_libio_check_fd( fd ); 400034bc: 03 10 00 5c sethi %hi(0x40017000), %g1 400034c0: c2 00 63 6c ld [ %g1 + 0x36c ], %g1 ! 4001736c 400034c4: 80 a6 00 01 cmp %i0, %g1 400034c8: 1a 80 00 16 bcc 40003520 400034cc: 85 2e 20 02 sll %i0, 2, %g2 iop = rtems_libio_iop( fd ); 400034d0: 03 10 00 61 sethi %hi(0x40018400), %g1 400034d4: c6 00 60 40 ld [ %g1 + 0x40 ], %g3 ! 40018440 400034d8: 83 2e 20 04 sll %i0, 4, %g1 400034dc: 82 20 40 02 sub %g1, %g2, %g1 400034e0: 82 00 40 18 add %g1, %i0, %g1 400034e4: 83 28 60 02 sll %g1, 2, %g1 400034e8: 90 00 40 03 add %g1, %g3, %o0 rtems_libio_check_is_open(iop); 400034ec: c6 02 20 0c ld [ %o0 + 0xc ], %g3 400034f0: 80 88 e1 00 btst 0x100, %g3 400034f4: 02 80 00 0b be 40003520 400034f8: 80 88 e0 04 btst 4, %g3 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 400034fc: 32 80 00 06 bne,a 40003514 40003500: c6 02 20 30 ld [ %o0 + 0x30 ], %g3 40003504: 40 00 34 e9 call 400108a8 <__errno> 40003508: 01 00 00 00 nop 4000350c: 10 80 00 0f b 40003548 40003510: 82 10 20 16 mov 0x16, %g1 ! 16 /* * Now process the fsync(). */ if ( !iop->handlers ) 40003514: 80 a0 e0 00 cmp %g3, 0 40003518: 32 80 00 06 bne,a 40003530 4000351c: c2 00 e0 28 ld [ %g3 + 0x28 ], %g1 rtems_set_errno_and_return_minus_one( EBADF ); 40003520: 40 00 34 e2 call 400108a8 <__errno> <== NOT EXECUTED 40003524: 01 00 00 00 nop <== NOT EXECUTED 40003528: 10 80 00 08 b 40003548 <== NOT EXECUTED 4000352c: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 40003530: 80 a0 60 00 cmp %g1, 0 40003534: 12 80 00 08 bne 40003554 40003538: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000353c: 40 00 34 db call 400108a8 <__errno> 40003540: 01 00 00 00 nop 40003544: 82 10 20 86 mov 0x86, %g1 ! 86 40003548: c2 22 00 00 st %g1, [ %o0 ] 4000354c: 10 80 00 04 b 4000355c 40003550: 90 10 3f ff mov -1, %o0 return (*iop->handlers->fsync_h)( iop ); 40003554: 9f c0 40 00 call %g1 40003558: 01 00 00 00 nop } 4000355c: 81 c7 e0 08 ret 40003560: 91 e8 00 08 restore %g0, %o0, %o0 4000b640 : int ftruncate( int fd, off_t length ) { 4000b640: 9d e3 bf 88 save %sp, -120, %sp rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 4000b644: 03 10 00 62 sethi %hi(0x40018800), %g1 4000b648: c2 00 63 bc ld [ %g1 + 0x3bc ], %g1 ! 40018bbc 4000b64c: 80 a6 00 01 cmp %i0, %g1 4000b650: 1a 80 00 0d bcc 4000b684 4000b654: 85 2e 20 02 sll %i0, 2, %g2 iop = rtems_libio_iop( fd ); 4000b658: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000b65c: c6 00 60 54 ld [ %g1 + 0x54 ], %g3 ! 40019c54 4000b660: 83 2e 20 04 sll %i0, 4, %g1 4000b664: 82 20 40 02 sub %g1, %g2, %g1 4000b668: 82 00 40 18 add %g1, %i0, %g1 4000b66c: 83 28 60 02 sll %g1, 2, %g1 4000b670: b0 00 40 03 add %g1, %g3, %i0 rtems_libio_check_is_open(iop); 4000b674: c2 06 20 0c ld [ %i0 + 0xc ], %g1 4000b678: 80 88 61 00 btst 0x100, %g1 4000b67c: 12 80 00 06 bne 4000b694 4000b680: a0 07 bf e8 add %fp, -24, %l0 4000b684: 40 00 0a a6 call 4000e11c <__errno> <== NOT EXECUTED 4000b688: 01 00 00 00 nop <== NOT EXECUTED 4000b68c: 10 80 00 22 b 4000b714 <== NOT EXECUTED 4000b690: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 4000b694: 92 06 20 10 add %i0, 0x10, %o1 4000b698: 90 10 00 10 mov %l0, %o0 4000b69c: 40 00 0c 75 call 4000e870 4000b6a0: 94 10 20 10 mov 0x10, %o2 if ( !loc.ops->node_type_h ) 4000b6a4: c2 07 bf f0 ld [ %fp + -16 ], %g1 4000b6a8: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 4000b6ac: 80 a0 60 00 cmp %g1, 0 4000b6b0: 02 80 00 16 be 4000b708 4000b6b4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 4000b6b8: 9f c0 40 00 call %g1 4000b6bc: 90 10 00 10 mov %l0, %o0 4000b6c0: 80 a2 20 01 cmp %o0, 1 4000b6c4: 32 80 00 06 bne,a 4000b6dc 4000b6c8: c2 06 20 0c ld [ %i0 + 0xc ], %g1 rtems_set_errno_and_return_minus_one( EISDIR ); 4000b6cc: 40 00 0a 94 call 4000e11c <__errno> <== NOT EXECUTED 4000b6d0: 01 00 00 00 nop <== NOT EXECUTED 4000b6d4: 10 80 00 10 b 4000b714 <== NOT EXECUTED 4000b6d8: 82 10 20 15 mov 0x15, %g1 ! 15 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4000b6dc: 80 88 60 04 btst 4, %g1 4000b6e0: 32 80 00 06 bne,a 4000b6f8 4000b6e4: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 4000b6e8: 40 00 0a 8d call 4000e11c <__errno> <== NOT EXECUTED 4000b6ec: 01 00 00 00 nop <== NOT EXECUTED 4000b6f0: 10 80 00 09 b 4000b714 <== NOT EXECUTED 4000b6f4: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) 4000b6f8: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 4000b6fc: 80 a0 60 00 cmp %g1, 0 4000b700: 32 80 00 08 bne,a 4000b720 4000b704: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000b708: 40 00 0a 85 call 4000e11c <__errno> <== NOT EXECUTED 4000b70c: 01 00 00 00 nop <== NOT EXECUTED 4000b710: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4000b714: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000b718: 10 80 00 04 b 4000b728 <== NOT EXECUTED 4000b71c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED return (*iop->handlers->ftruncate_h)( iop, length ); 4000b720: 9f c0 40 00 call %g1 4000b724: 92 10 00 19 mov %i1, %o1 } 4000b728: 81 c7 e0 08 ret 4000b72c: 91 e8 00 08 restore %g0, %o0, %o0 4001649c : char * getcwd (pt, size) char *pt; size_t size; { 4001649c: 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) 400164a0: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 400164a4: 02 80 00 0b be 400164d0 <== NOT EXECUTED 400164a8: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED if (!size) { errno = EINVAL; return (char *) NULL; } ept = pt + size; 400164ac: b6 10 20 00 clr %i3 <== NOT EXECUTED */ if (pt) { ptsize = 0; if (!size) 400164b0: 12 80 00 0f bne 400164ec <== NOT EXECUTED 400164b4: b2 06 00 19 add %i0, %i1, %i1 <== NOT EXECUTED { errno = EINVAL; 400164b8: 40 00 31 8d call 40022aec <__errno> <== NOT EXECUTED 400164bc: b0 10 20 00 clr %i0 <== NOT EXECUTED 400164c0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400164c4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400164c8: 81 c7 e0 08 ret <== NOT EXECUTED 400164cc: 81 e8 00 00 restore <== NOT EXECUTED } ept = pt + size; } else { if (!(pt = (char *) malloc (ptsize = 1024 - 4))) 400164d0: 7f ff bb 72 call 40005298 <== NOT EXECUTED 400164d4: 90 10 23 fc mov 0x3fc, %o0 <== NOT EXECUTED 400164d8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400164dc: 02 bf ff fb be 400164c8 <== NOT EXECUTED 400164e0: b6 10 23 fc mov 0x3fc, %i3 <== NOT EXECUTED 400164e4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED { return (char *) NULL; } ept = pt + ptsize; 400164e8: b2 02 23 fc add %o0, 0x3fc, %i1 <== NOT EXECUTED } bpt = ept - 1; *bpt = '\0'; 400164ec: 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))) 400164f0: 90 10 23 fc mov 0x3fc, %o0 <== NOT EXECUTED 400164f4: 7f ff bb 69 call 40005298 <== NOT EXECUTED 400164f8: ac 06 7f ff add %i1, -1, %l6 <== NOT EXECUTED 400164fc: a4 92 20 00 orcc %o0, 0, %l2 <== NOT EXECUTED 40016500: 02 80 00 d7 be 4001685c <== NOT EXECUTED 40016504: 82 10 20 2e mov 0x2e, %g1 <== NOT EXECUTED goto err; } eup = up + MAXPATHLEN; bup = up; up[0] = '.'; up[1] = '\0'; 40016508: c0 2c a0 01 clrb [ %l2 + 1 ] <== NOT EXECUTED { goto err; } eup = up + MAXPATHLEN; bup = up; up[0] = '.'; 4001650c: c2 2c 80 00 stb %g1, [ %l2 ] <== NOT EXECUTED up[1] = '\0'; /* Save root values, so know when to stop. */ if (stat ("/", &s)) 40016510: a0 07 bf a8 add %fp, -88, %l0 <== NOT EXECUTED 40016514: 11 10 00 d3 sethi %hi(0x40034c00), %o0 <== NOT EXECUTED 40016518: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4001651c: 7f ff bf ab call 400063c8 <== NOT EXECUTED 40016520: 90 12 23 f8 or %o0, 0x3f8, %o0 <== NOT EXECUTED 40016524: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40016528: 12 80 00 ce bne 40016860 <== NOT EXECUTED 4001652c: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED goto err; root_dev = s.st_dev; 40016530: c4 1f bf a8 ldd [ %fp + -88 ], %g2 <== NOT EXECUTED if (!(up = (char *) malloc (upsize = 1024 - 4))) { goto err; } eup = up + MAXPATHLEN; 40016534: 82 04 a4 00 add %l2, 0x400, %g1 <== NOT EXECUTED up[1] = '\0'; /* Save root values, so know when to stop. */ if (stat ("/", &s)) goto err; root_dev = s.st_dev; 40016538: c4 3f bf 98 std %g2, [ %fp + -104 ] <== NOT EXECUTED root_ino = s.st_ino; 4001653c: c6 07 bf b0 ld [ %fp + -80 ], %g3 <== NOT EXECUTED if (!(up = (char *) malloc (upsize = 1024 - 4))) { goto err; } eup = up + MAXPATHLEN; 40016540: 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. */ 40016544: 40 00 31 6a call 40022aec <__errno> <== NOT EXECUTED 40016548: c6 27 bf a0 st %g3, [ %fp + -96 ] <== NOT EXECUTED 4001654c: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED 40016550: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED 40016554: a6 10 00 12 mov %l2, %l3 <== NOT EXECUTED 40016558: c4 27 bf 94 st %g2, [ %fp + -108 ] <== NOT EXECUTED 4001655c: b4 10 23 fc mov 0x3fc, %i2 <== NOT EXECUTED for (first = 1;; first = 0) { /* Stat the current level. */ if (_stat (up, &s)) 40016560: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40016564: 7f ff bf 99 call 400063c8 <== NOT EXECUTED 40016568: 92 07 bf a8 add %fp, -88, %o1 <== NOT EXECUTED 4001656c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40016570: 12 80 00 bb bne 4001685c <== NOT EXECUTED 40016574: e8 1f bf a8 ldd [ %fp + -88 ], %l4 <== 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) 40016578: c6 07 bf 98 ld [ %fp + -104 ], %g3 <== NOT EXECUTED 4001657c: 80 a0 c0 14 cmp %g3, %l4 <== NOT EXECUTED 40016580: 12 80 00 14 bne 400165d0 <== NOT EXECUTED 40016584: f8 07 bf b0 ld [ %fp + -80 ], %i4 <== NOT EXECUTED 40016588: c2 07 bf 9c ld [ %fp + -100 ], %g1 <== NOT EXECUTED 4001658c: 80 a0 40 15 cmp %g1, %l5 <== NOT EXECUTED 40016590: 12 80 00 11 bne 400165d4 <== NOT EXECUTED 40016594: c6 07 bf a4 ld [ %fp + -92 ], %g3 <== NOT EXECUTED 40016598: c4 07 bf a0 ld [ %fp + -96 ], %g2 <== NOT EXECUTED 4001659c: 80 a0 80 1c cmp %g2, %i4 <== NOT EXECUTED 400165a0: 12 80 00 0e bne 400165d8 <== NOT EXECUTED 400165a4: 82 04 e4 04 add %l3, 0x404, %g1 <== NOT EXECUTED { *--bpt = '/'; 400165a8: 82 10 20 2f mov 0x2f, %g1 <== NOT EXECUTED 400165ac: 92 05 bf ff add %l6, -1, %o1 <== NOT EXECUTED 400165b0: c2 2d bf ff stb %g1, [ %l6 + -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); 400165b4: 94 26 40 09 sub %i1, %o1, %o2 <== NOT EXECUTED 400165b8: 40 00 38 2e call 40024670 <== NOT EXECUTED 400165bc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED free (up); 400165c0: 7f ff bb 0e call 400051f8 <== NOT EXECUTED 400165c4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400165c8: 81 c7 e0 08 ret <== NOT EXECUTED 400165cc: 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) 400165d0: c6 07 bf a4 ld [ %fp + -92 ], %g3 <== NOT EXECUTED 400165d4: 82 04 e4 04 add %l3, 0x404, %g1 <== NOT EXECUTED 400165d8: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 400165dc: 0a 80 00 0c bcs 4001660c <== NOT EXECUTED 400165e0: 82 10 20 2e mov 0x2e, %g1 <== NOT EXECUTED { if (!(up = (char *) realloc (up, upsize *= 2))) 400165e4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400165e8: b5 2e a0 01 sll %i2, 1, %i2 <== NOT EXECUTED 400165ec: 7f ff bb 76 call 400053c4 <== NOT EXECUTED 400165f0: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 400165f4: a4 92 20 00 orcc %o0, 0, %l2 <== NOT EXECUTED 400165f8: 02 80 00 99 be 4001685c <== NOT EXECUTED 400165fc: 82 04 80 1a add %l2, %i2, %g1 <== NOT EXECUTED { goto err; } bup = up; eup = up + upsize; 40016600: a6 10 00 12 mov %l2, %l3 <== NOT EXECUTED 40016604: c2 27 bf a4 st %g1, [ %fp + -92 ] <== NOT EXECUTED } *bup++ = '.'; 40016608: 82 10 20 2e mov 0x2e, %g1 <== NOT EXECUTED *bup++ = '.'; *bup = '\0'; 4001660c: c0 2c e0 02 clrb [ %l3 + 2 ] <== NOT EXECUTED } bup = up; eup = up + upsize; } *bup++ = '.'; *bup++ = '.'; 40016610: c2 2c e0 01 stb %g1, [ %l3 + 1 ] <== NOT EXECUTED goto err; } bup = up; eup = up + upsize; } *bup++ = '.'; 40016614: c2 2c c0 00 stb %g1, [ %l3 ] <== NOT EXECUTED *bup++ = '.'; *bup = '\0'; /* Open and stat parent directory. */ if (!(dir = _opendir (up)) || _fstat (__dirfd (dir), &s)) 40016618: 40 00 03 5c call 40017388 <== NOT EXECUTED 4001661c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40016620: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED 40016624: 02 80 00 8f be 40016860 <== NOT EXECUTED 40016628: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 4001662c: d0 07 40 00 ld [ %i5 ], %o0 <== NOT EXECUTED 40016630: 40 00 28 20 call 400206b0 <== NOT EXECUTED 40016634: 92 07 bf a8 add %fp, -88, %o1 <== NOT EXECUTED 40016638: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001663c: 12 80 00 92 bne 40016884 <== NOT EXECUTED 40016640: 82 10 20 2f mov 0x2f, %g1 <== NOT EXECUTED goto err; /* Add trailing slash for next directory. */ *bup++ = '/'; 40016644: c2 2c e0 02 stb %g1, [ %l3 + 2 ] <== 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) 40016648: c2 07 bf a8 ld [ %fp + -88 ], %g1 <== NOT EXECUTED 4001664c: 80 a0 40 14 cmp %g1, %l4 <== NOT EXECUTED 40016650: 12 80 00 06 bne 40016668 <== NOT EXECUTED 40016654: a6 04 e0 03 add %l3, 3, %l3 <== NOT EXECUTED 40016658: c2 07 bf ac ld [ %fp + -84 ], %g1 <== NOT EXECUTED 4001665c: 80 a0 40 15 cmp %g1, %l5 <== NOT EXECUTED 40016660: 02 80 00 04 be 40016670 <== NOT EXECUTED 40016664: 01 00 00 00 nop <== NOT EXECUTED 40016668: 10 80 00 0c b 40016698 <== NOT EXECUTED 4001666c: ae 10 20 00 clr %l7 ! 0 <== NOT EXECUTED { for (;;) { if (!(dp = _readdir (dir))) 40016670: 40 00 03 fc call 40017660 <== NOT EXECUTED 40016674: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 40016678: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 4001667c: 02 80 00 6b be 40016828 <== NOT EXECUTED 40016680: ae 10 20 00 clr %l7 <== NOT EXECUTED goto notfound; if (dp->d_ino == ino) 40016684: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED 40016688: 80 a0 40 1c cmp %g1, %i4 <== NOT EXECUTED 4001668c: 02 80 00 36 be 40016764 <== NOT EXECUTED 40016690: a0 04 60 0c add %l1, 0xc, %l0 <== NOT EXECUTED 40016694: 30 bf ff f7 b,a 40016670 <== NOT EXECUTED } } else for (;;) { if (!(dp = _readdir (dir))) 40016698: 40 00 03 f2 call 40017660 <== NOT EXECUTED 4001669c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 400166a0: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 400166a4: 02 80 00 61 be 40016828 <== NOT EXECUTED 400166a8: 01 00 00 00 nop <== NOT EXECUTED goto notfound; if (ISDOT (dp)) 400166ac: c2 4c 60 0c ldsb [ %l1 + 0xc ], %g1 <== NOT EXECUTED 400166b0: 80 a0 60 2e cmp %g1, 0x2e <== NOT EXECUTED 400166b4: 12 80 00 0d bne 400166e8 <== NOT EXECUTED 400166b8: a0 04 60 0c add %l1, 0xc, %l0 <== NOT EXECUTED 400166bc: c2 4c 60 0d ldsb [ %l1 + 0xd ], %g1 <== NOT EXECUTED 400166c0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400166c4: 02 bf ff f5 be 40016698 <== NOT EXECUTED 400166c8: 05 00 3f ff sethi %hi(0xfffc00), %g2 <== NOT EXECUTED 400166cc: c2 04 60 0c ld [ %l1 + 0xc ], %g1 <== NOT EXECUTED 400166d0: 07 00 0b 80 sethi %hi(0x2e0000), %g3 <== NOT EXECUTED 400166d4: 84 10 a3 00 or %g2, 0x300, %g2 <== NOT EXECUTED 400166d8: 82 08 40 02 and %g1, %g2, %g1 <== NOT EXECUTED 400166dc: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 400166e0: 02 bf ff ee be 40016698 <== NOT EXECUTED 400166e4: 01 00 00 00 nop <== NOT EXECUTED continue; bcopy (dp->d_name, bup, strlen (dp->d_name) + 1); 400166e8: 40 00 45 f8 call 40027ec8 <== NOT EXECUTED 400166ec: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400166f0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 400166f4: 94 02 20 01 add %o0, 1, %o2 <== NOT EXECUTED 400166f8: 40 00 37 de call 40024670 <== NOT EXECUTED 400166fc: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED /* Save the first error for later. */ if (stat (up, &s)) 40016700: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40016704: 7f ff bf 31 call 400063c8 <== NOT EXECUTED 40016708: 92 07 bf a8 add %fp, -88, %o1 <== NOT EXECUTED 4001670c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40016710: 02 80 00 0c be 40016740 <== NOT EXECUTED 40016714: c2 07 bf a8 ld [ %fp + -88 ], %g1 <== NOT EXECUTED { if (!save_errno) 40016718: 80 a5 e0 00 cmp %l7, 0 <== NOT EXECUTED 4001671c: 12 80 00 05 bne 40016730 <== NOT EXECUTED 40016720: 01 00 00 00 nop <== NOT EXECUTED save_errno = errno; 40016724: 40 00 30 f2 call 40022aec <__errno> <== NOT EXECUTED 40016728: 01 00 00 00 nop <== NOT EXECUTED 4001672c: ee 02 00 00 ld [ %o0 ], %l7 <== NOT EXECUTED errno = 0; 40016730: 40 00 30 ef call 40022aec <__errno> <== NOT EXECUTED 40016734: 01 00 00 00 nop <== NOT EXECUTED 40016738: 10 bf ff d8 b 40016698 <== NOT EXECUTED 4001673c: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED continue; } if (s.st_dev == dev && s.st_ino == ino) 40016740: 80 a0 40 14 cmp %g1, %l4 <== NOT EXECUTED 40016744: 12 bf ff d5 bne 40016698 <== NOT EXECUTED 40016748: c2 07 bf ac ld [ %fp + -84 ], %g1 <== NOT EXECUTED 4001674c: 80 a0 40 15 cmp %g1, %l5 <== NOT EXECUTED 40016750: 12 bf ff d2 bne 40016698 <== NOT EXECUTED 40016754: c2 07 bf b0 ld [ %fp + -80 ], %g1 <== NOT EXECUTED 40016758: 80 a0 40 1c cmp %g1, %i4 <== NOT EXECUTED 4001675c: 12 bf ff cf bne 40016698 <== NOT EXECUTED 40016760: 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)) 40016764: 40 00 45 d9 call 40027ec8 <== NOT EXECUTED 40016768: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4001676c: c2 07 bf 94 ld [ %fp + -108 ], %g1 <== NOT EXECUTED 40016770: a2 25 80 18 sub %l6, %i0, %l1 <== NOT EXECUTED 40016774: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 40016778: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED 4001677c: 82 00 60 01 inc %g1 <== NOT EXECUTED 40016780: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED 40016784: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 40016788: 18 80 00 17 bgu 400167e4 <== NOT EXECUTED 4001678c: c4 07 bf 94 ld [ %fp + -108 ], %g2 <== NOT EXECUTED { size_t len, off; if (!ptsize) 40016790: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 40016794: 32 80 00 07 bne,a 400167b0 <== NOT EXECUTED 40016798: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED { errno = ERANGE; 4001679c: 40 00 30 d4 call 40022aec <__errno> <== NOT EXECUTED 400167a0: 01 00 00 00 nop <== NOT EXECUTED 400167a4: 82 10 20 22 mov 0x22, %g1 ! 22 <== NOT EXECUTED 400167a8: 10 80 00 37 b 40016884 <== NOT EXECUTED 400167ac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED goto err; } off = bpt - pt; len = ept - bpt; if (!(pt = (char *) realloc (pt, ptsize *= 2))) 400167b0: b7 2e e0 01 sll %i3, 1, %i3 <== NOT EXECUTED 400167b4: 7f ff bb 04 call 400053c4 <== NOT EXECUTED 400167b8: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 400167bc: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 400167c0: 02 80 00 31 be 40016884 <== NOT EXECUTED 400167c4: 82 26 40 16 sub %i1, %l6, %g1 <== NOT EXECUTED { goto err; } bpt = pt + off; ept = pt + ptsize; (void) bcopy (bpt, ept - len, len); 400167c8: 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; 400167cc: b2 06 00 1b add %i0, %i3, %i1 <== NOT EXECUTED (void) bcopy (bpt, ept - len, len); 400167d0: 94 10 00 01 mov %g1, %o2 <== NOT EXECUTED 400167d4: ac 26 40 01 sub %i1, %g1, %l6 <== NOT EXECUTED 400167d8: 40 00 37 a6 call 40024670 <== NOT EXECUTED 400167dc: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED bpt = ept - len; } if (!first) 400167e0: c4 07 bf 94 ld [ %fp + -108 ], %g2 <== NOT EXECUTED 400167e4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400167e8: 12 80 00 04 bne 400167f8 <== NOT EXECUTED 400167ec: 82 10 20 2f mov 0x2f, %g1 <== NOT EXECUTED *--bpt = '/'; 400167f0: ac 05 bf ff add %l6, -1, %l6 <== NOT EXECUTED 400167f4: c2 2d 80 00 stb %g1, [ %l6 ] <== NOT EXECUTED bpt -= strlen (dp->d_name); 400167f8: 40 00 45 b4 call 40027ec8 <== NOT EXECUTED 400167fc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED bcopy (dp->d_name, bpt, strlen (dp->d_name)); 40016800: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40016804: 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); 40016808: ac 25 80 08 sub %l6, %o0, %l6 <== NOT EXECUTED bcopy (dp->d_name, bpt, strlen (dp->d_name)); (void) _closedir (dir); dir = 0; /* Truncate any file name. */ *bup = '\0'; 4001680c: c0 27 bf 94 clr [ %fp + -108 ] <== NOT EXECUTED bpt = ept - len; } if (!first) *--bpt = '/'; bpt -= strlen (dp->d_name); bcopy (dp->d_name, bpt, strlen (dp->d_name)); 40016810: 40 00 37 98 call 40024670 <== NOT EXECUTED 40016814: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED (void) _closedir (dir); 40016818: 7f ff fe 46 call 40016130 <== NOT EXECUTED 4001681c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED dir = 0; /* Truncate any file name. */ *bup = '\0'; 40016820: 10 bf ff 50 b 40016560 <== NOT EXECUTED 40016824: c0 2c c0 00 clrb [ %l3 ] <== 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) 40016828: 40 00 30 b1 call 40022aec <__errno> <== NOT EXECUTED 4001682c: 01 00 00 00 nop <== NOT EXECUTED 40016830: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40016834: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40016838: 12 80 00 13 bne 40016884 <== NOT EXECUTED 4001683c: 01 00 00 00 nop <== NOT EXECUTED errno = save_errno ? save_errno : ENOENT; 40016840: 40 00 30 ab call 40022aec <__errno> <== NOT EXECUTED 40016844: 01 00 00 00 nop <== NOT EXECUTED 40016848: 80 a5 e0 00 cmp %l7, 0 <== NOT EXECUTED 4001684c: 22 80 00 02 be,a 40016854 <== NOT EXECUTED 40016850: ae 10 20 02 mov 2, %l7 <== NOT EXECUTED 40016854: 10 80 00 0c b 40016884 <== NOT EXECUTED 40016858: ee 22 00 00 st %l7, [ %o0 ] <== NOT EXECUTED /* FALLTHROUGH */ err: if(dir) (void) _closedir (dir); if (ptsize) 4001685c: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 40016860: 02 80 00 05 be 40016874 <== NOT EXECUTED 40016864: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED free (pt); 40016868: 7f ff ba 64 call 400051f8 <== NOT EXECUTED 4001686c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED free (up); 40016870: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40016874: 7f ff ba 61 call 400051f8 <== NOT EXECUTED 40016878: b0 10 20 00 clr %i0 <== NOT EXECUTED 4001687c: 81 c7 e0 08 ret <== NOT EXECUTED 40016880: 81 e8 00 00 restore <== NOT EXECUTED errno = save_errno ? save_errno : ENOENT; /* FALLTHROUGH */ err: if(dir) (void) _closedir (dir); 40016884: 7f ff fe 2b call 40016130 <== NOT EXECUTED 40016888: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED if (ptsize) 4001688c: 10 bf ff f5 b 40016860 <== NOT EXECUTED 40016890: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 4002079c : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 4002079c: 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 ); 400207a0: 03 10 00 e1 sethi %hi(0x40038400), %g1 400207a4: c2 00 60 4c ld [ %g1 + 0x4c ], %g1 ! 4003844c 400207a8: 80 a6 00 01 cmp %i0, %g1 400207ac: 1a 80 00 0a bcc 400207d4 400207b0: a0 10 20 00 clr %l0 400207b4: 03 10 00 eb sethi %hi(0x4003ac00), %g1 400207b8: c6 00 61 94 ld [ %g1 + 0x194 ], %g3 ! 4003ad94 400207bc: 85 2e 20 02 sll %i0, 2, %g2 400207c0: 83 2e 20 04 sll %i0, 4, %g1 400207c4: 82 20 40 02 sub %g1, %g2, %g1 400207c8: 82 00 40 18 add %g1, %i0, %g1 400207cc: 83 28 60 02 sll %g1, 2, %g1 400207d0: a0 00 40 03 add %g1, %g3, %l0 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 400207d4: b0 07 bf e8 add %fp, -24, %i0 400207d8: 92 04 20 10 add %l0, 0x10, %o1 400207dc: 90 10 00 18 mov %i0, %o0 400207e0: 40 00 0f 77 call 400245bc 400207e4: 94 10 20 10 mov 0x10, %o2 if ( !loc.ops->node_type_h ) 400207e8: c2 07 bf f0 ld [ %fp + -16 ], %g1 400207ec: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 400207f0: 80 a0 60 00 cmp %g1, 0 400207f4: 02 80 00 11 be 40020838 400207f8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 400207fc: 9f c0 40 00 call %g1 40020800: 90 10 00 18 mov %i0, %o0 40020804: 80 a2 20 01 cmp %o0, 1 40020808: 22 80 00 08 be,a 40020828 4002080c: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 rtems_set_errno_and_return_minus_one( ENOTDIR ); 40020810: 40 00 08 b7 call 40022aec <__errno> 40020814: 01 00 00 00 nop 40020818: 82 10 20 14 mov 0x14, %g1 ! 14 4002081c: c2 22 00 00 st %g1, [ %o0 ] 40020820: 10 80 00 0d b 40020854 40020824: 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 ) 40020828: c2 00 60 08 ld [ %g1 + 8 ], %g1 4002082c: 80 a0 60 00 cmp %g1, 0 40020830: 32 80 00 06 bne,a 40020848 40020834: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 40020838: 40 00 08 ad call 40022aec <__errno> <== NOT EXECUTED 4002083c: 01 00 00 00 nop <== NOT EXECUTED 40020840: 10 bf ff f7 b 4002081c <== NOT EXECUTED 40020844: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 40020848: 92 10 00 19 mov %i1, %o1 4002084c: 9f c0 40 00 call %g1 40020850: 94 10 00 1a mov %i2, %o2 } 40020854: 81 c7 e0 08 ret 40020858: 91 e8 00 08 restore %g0, %o0, %o0 400168b4 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 400168b4: 03 10 00 e3 sethi %hi(0x40038c00), %g1 <== NOT EXECUTED 400168b8: c2 00 60 60 ld [ %g1 + 0x60 ], %g1 ! 40038c60 <== NOT EXECUTED return _POSIX_types_Gid; } 400168bc: 81 c3 e0 08 retl <== NOT EXECUTED 400168c0: d0 10 60 2a lduh [ %g1 + 0x2a ], %o0 <== NOT EXECUTED 40016f1c : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 40016f1c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED FILE *fp; int match; init_etc_passwd_group(); 40016f20: 7f ff ff b7 call 40016dfc <== NOT EXECUTED 40016f24: 01 00 00 00 nop <== NOT EXECUTED if ((fp = fopen("/etc/group", "r")) == NULL) { 40016f28: 11 10 00 d6 sethi %hi(0x40035800), %o0 <== NOT EXECUTED 40016f2c: 13 10 00 df sethi %hi(0x40037c00), %o1 <== NOT EXECUTED 40016f30: 90 12 23 30 or %o0, 0x330, %o0 <== NOT EXECUTED 40016f34: 40 00 31 42 call 4002343c <== NOT EXECUTED 40016f38: 92 12 62 d8 or %o1, 0x2d8, %o1 <== NOT EXECUTED 40016f3c: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 40016f40: 12 80 00 08 bne 40016f60 <== NOT EXECUTED 40016f44: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED errno = EINVAL; 40016f48: 40 00 2e e9 call 40022aec <__errno> <== NOT EXECUTED 40016f4c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40016f50: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40016f54: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40016f58: 81 c7 e0 08 ret <== NOT EXECUTED 40016f5c: 81 e8 00 00 restore <== NOT EXECUTED return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 40016f60: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40016f64: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED 40016f68: 7f ff fe ea call 40016b10 <== NOT EXECUTED 40016f6c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40016f70: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40016f74: 12 80 00 0a bne 40016f9c <== NOT EXECUTED 40016f78: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED errno = EINVAL; 40016f7c: 40 00 2e dc call 40022aec <__errno> <== NOT EXECUTED 40016f80: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40016f84: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40016f88: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 40016f8c: 40 00 2f 2e call 40022c44 <== NOT EXECUTED 40016f90: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40016f94: 81 c7 e0 08 ret <== NOT EXECUTED 40016f98: 81 e8 00 00 restore <== NOT EXECUTED return -1; } if (name) { 40016f9c: 22 80 00 07 be,a 40016fb8 <== NOT EXECUTED 40016fa0: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED match = (strcmp(grp->gr_name, name) == 0); 40016fa4: d0 06 80 00 ld [ %i2 ], %o0 <== NOT EXECUTED 40016fa8: 40 00 3d a7 call 40026644 <== NOT EXECUTED 40016fac: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40016fb0: 10 80 00 04 b 40016fc0 <== NOT EXECUTED 40016fb4: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED } else { match = (grp->gr_gid == gid); 40016fb8: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 40016fbc: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 40016fc0: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } if (match) { 40016fc4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40016fc8: 02 bf ff e6 be 40016f60 <== NOT EXECUTED 40016fcc: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED fclose(fp); 40016fd0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40016fd4: 40 00 2f 1c call 40022c44 <== NOT EXECUTED 40016fd8: b0 10 20 00 clr %i0 <== NOT EXECUTED *result = grp; 40016fdc: f4 27 40 00 st %i2, [ %i5 ] <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 40016fe0: 81 c7 e0 08 ret <== NOT EXECUTED 40016fe4: 81 e8 00 00 restore <== NOT EXECUTED 40016c50 : return NULL; return p; } struct group *getgrent() { 40016c50: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (group_fp == NULL) 40016c54: 03 10 00 e9 sethi %hi(0x4003a400), %g1 <== NOT EXECUTED 40016c58: d0 00 61 d4 ld [ %g1 + 0x1d4 ], %o0 ! 4003a5d4 <== NOT EXECUTED 40016c5c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40016c60: 02 80 00 0b be 40016c8c <== NOT EXECUTED 40016c64: 15 10 00 e9 sethi %hi(0x4003a400), %o2 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 40016c68: 21 10 00 e9 sethi %hi(0x4003a400), %l0 <== NOT EXECUTED 40016c6c: 92 14 22 a0 or %l0, 0x2a0, %o1 ! 4003a6a0 <== NOT EXECUTED 40016c70: 94 12 a1 d8 or %o2, 0x1d8, %o2 <== NOT EXECUTED 40016c74: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 40016c78: 7f ff ff a6 call 40016b10 <== NOT EXECUTED 40016c7c: b0 14 22 a0 or %l0, 0x2a0, %i0 <== NOT EXECUTED 40016c80: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40016c84: 12 80 00 03 bne 40016c90 <== NOT EXECUTED 40016c88: 01 00 00 00 nop <== NOT EXECUTED 40016c8c: b0 10 20 00 clr %i0 ! 0 <== NOT EXECUTED return NULL; return &grent; } 40016c90: 81 c7 e0 08 ret <== NOT EXECUTED 40016c94: 81 e8 00 00 restore <== NOT EXECUTED 40017020 : } struct group *getgrgid( gid_t gid ) { 40017020: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 40017024: 13 10 00 e9 sethi %hi(0x4003a400), %o1 <== NOT EXECUTED 40017028: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 4001702c: 92 12 62 a0 or %o1, 0x2a0, %o1 <== NOT EXECUTED 40017030: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 40017034: 15 10 00 e9 sethi %hi(0x4003a400), %o2 <== NOT EXECUTED 40017038: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4001703c: 94 12 a1 d8 or %o2, 0x1d8, %o2 <== NOT EXECUTED 40017040: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 40017044: 7f ff ff e9 call 40016fe8 <== NOT EXECUTED 40017048: b0 10 20 00 clr %i0 <== NOT EXECUTED 4001704c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40017050: 22 80 00 02 be,a 40017058 <== NOT EXECUTED 40017054: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 40017058: 81 c7 e0 08 ret <== NOT EXECUTED 4001705c: 81 e8 00 00 restore <== NOT EXECUTED 40016fe8 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 40016fe8: 82 10 00 09 mov %o1, %g1 <== NOT EXECUTED 40016fec: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 40016ff0: 86 10 00 0b mov %o3, %g3 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 40016ff4: 93 2a 20 10 sll %o0, 0x10, %o1 <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 40016ff8: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 40016ffc: 94 10 00 01 mov %g1, %o2 <== NOT EXECUTED 40017000: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 40017004: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 40017008: 98 10 00 03 mov %g3, %o4 <== NOT EXECUTED 4001700c: 90 10 20 00 clr %o0 <== NOT EXECUTED 40017010: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40017014: 7f ff ff c2 call 40016f1c <== NOT EXECUTED 40017018: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4001701c: 01 00 00 00 nop 4001708c : } struct group *getgrnam( const char *name ) { 4001708c: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 40017090: 13 10 00 e9 sethi %hi(0x4003a400), %o1 <== NOT EXECUTED 40017094: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40017098: 92 12 62 a0 or %o1, 0x2a0, %o1 <== NOT EXECUTED 4001709c: 15 10 00 e9 sethi %hi(0x4003a400), %o2 <== NOT EXECUTED 400170a0: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 400170a4: 94 12 a1 d8 or %o2, 0x1d8, %o2 <== NOT EXECUTED 400170a8: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 400170ac: 7f ff ff ed call 40017060 <== NOT EXECUTED 400170b0: b0 10 20 00 clr %i0 <== NOT EXECUTED 400170b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400170b8: 22 80 00 02 be,a 400170c0 <== NOT EXECUTED 400170bc: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 400170c0: 81 c7 e0 08 ret <== NOT EXECUTED 400170c4: 81 e8 00 00 restore <== NOT EXECUTED 40017060 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 40017060: 82 10 00 0a mov %o2, %g1 <== NOT EXECUTED 40017064: 84 10 00 0b mov %o3, %g2 <== NOT EXECUTED 40017068: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getgr_r(name, 0, grp, buffer, bufsize, result); 4001706c: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 40017070: 96 10 00 01 mov %g1, %o3 <== NOT EXECUTED 40017074: 98 10 00 02 mov %g2, %o4 <== NOT EXECUTED 40017078: 92 10 20 00 clr %o1 <== NOT EXECUTED 4001707c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40017080: 7f ff ff a7 call 40016f1c <== NOT EXECUTED 40017084: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40017088: 01 00 00 00 nop 4001710c : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 4001710c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED FILE *fp; int match; init_etc_passwd_group(); 40017110: 7f ff ff 3b call 40016dfc <== NOT EXECUTED 40017114: 01 00 00 00 nop <== NOT EXECUTED if ((fp = fopen("/etc/passwd", "r")) == NULL) { 40017118: 11 10 00 d6 sethi %hi(0x40035800), %o0 <== NOT EXECUTED 4001711c: 13 10 00 df sethi %hi(0x40037c00), %o1 <== NOT EXECUTED 40017120: 90 12 22 b8 or %o0, 0x2b8, %o0 <== NOT EXECUTED 40017124: 40 00 30 c6 call 4002343c <== NOT EXECUTED 40017128: 92 12 62 d8 or %o1, 0x2d8, %o1 <== NOT EXECUTED 4001712c: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 40017130: 12 80 00 08 bne 40017150 <== NOT EXECUTED 40017134: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED errno = EINVAL; 40017138: 40 00 2e 6d call 40022aec <__errno> <== NOT EXECUTED 4001713c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40017140: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40017144: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40017148: 81 c7 e0 08 ret <== NOT EXECUTED 4001714c: 81 e8 00 00 restore <== NOT EXECUTED return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 40017150: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40017154: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED 40017158: 7f ff fe d0 call 40016c98 <== NOT EXECUTED 4001715c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40017160: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40017164: 12 80 00 0a bne 4001718c <== NOT EXECUTED 40017168: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED errno = EINVAL; 4001716c: 40 00 2e 60 call 40022aec <__errno> <== NOT EXECUTED 40017170: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40017174: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40017178: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 4001717c: 40 00 2e b2 call 40022c44 <== NOT EXECUTED 40017180: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40017184: 81 c7 e0 08 ret <== NOT EXECUTED 40017188: 81 e8 00 00 restore <== NOT EXECUTED return -1; } if (name) { 4001718c: 22 80 00 07 be,a 400171a8 <== NOT EXECUTED 40017190: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED match = (strcmp(pwd->pw_name, name) == 0); 40017194: d0 06 80 00 ld [ %i2 ], %o0 <== NOT EXECUTED 40017198: 40 00 3d 2b call 40026644 <== NOT EXECUTED 4001719c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 400171a0: 10 80 00 04 b 400171b0 <== NOT EXECUTED 400171a4: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED } else { match = (pwd->pw_uid == uid); 400171a8: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 400171ac: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 400171b0: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } if (match) { 400171b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400171b8: 02 bf ff e6 be 40017150 <== NOT EXECUTED 400171bc: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED fclose(fp); 400171c0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400171c4: 40 00 2e a0 call 40022c44 <== NOT EXECUTED 400171c8: b0 10 20 00 clr %i0 <== NOT EXECUTED *result = pwd; 400171cc: f4 27 40 00 st %i2, [ %i5 ] <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 400171d0: 81 c7 e0 08 ret <== NOT EXECUTED 400171d4: 81 e8 00 00 restore <== NOT EXECUTED 40016db4 : return NULL; return p; } struct passwd *getpwent() { 40016db4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (passwd_fp == NULL) 40016db8: 03 10 00 e9 sethi %hi(0x4003a400), %g1 <== NOT EXECUTED 40016dbc: d0 00 60 ec ld [ %g1 + 0xec ], %o0 ! 4003a4ec <== NOT EXECUTED 40016dc0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40016dc4: 02 80 00 0b be 40016df0 <== NOT EXECUTED 40016dc8: 15 10 00 e9 sethi %hi(0x4003a400), %o2 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 40016dcc: 21 10 00 e9 sethi %hi(0x4003a400), %l0 <== NOT EXECUTED 40016dd0: 92 14 21 b8 or %l0, 0x1b8, %o1 ! 4003a5b8 <== NOT EXECUTED 40016dd4: 94 12 a0 f0 or %o2, 0xf0, %o2 <== NOT EXECUTED 40016dd8: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 40016ddc: 7f ff ff af call 40016c98 <== NOT EXECUTED 40016de0: b0 14 21 b8 or %l0, 0x1b8, %i0 <== NOT EXECUTED 40016de4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40016de8: 12 80 00 03 bne 40016df4 <== NOT EXECUTED 40016dec: 01 00 00 00 nop <== NOT EXECUTED 40016df0: b0 10 20 00 clr %i0 ! 0 <== NOT EXECUTED return NULL; return &pwent; } 40016df4: 81 c7 e0 08 ret <== NOT EXECUTED 40016df8: 81 e8 00 00 restore <== NOT EXECUTED 4001727c : } struct passwd *getpwnam( const char *name ) { 4001727c: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 40017280: 13 10 00 e9 sethi %hi(0x4003a400), %o1 <== NOT EXECUTED 40017284: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40017288: 92 12 61 b8 or %o1, 0x1b8, %o1 <== NOT EXECUTED 4001728c: 15 10 00 e9 sethi %hi(0x4003a400), %o2 <== NOT EXECUTED 40017290: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 40017294: 94 12 a0 f0 or %o2, 0xf0, %o2 <== NOT EXECUTED 40017298: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 4001729c: 7f ff ff ed call 40017250 <== NOT EXECUTED 400172a0: b0 10 20 00 clr %i0 <== NOT EXECUTED 400172a4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400172a8: 22 80 00 02 be,a 400172b0 <== NOT EXECUTED 400172ac: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 400172b0: 81 c7 e0 08 ret <== NOT EXECUTED 400172b4: 81 e8 00 00 restore <== NOT EXECUTED 40017250 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 40017250: 82 10 00 0a mov %o2, %g1 <== NOT EXECUTED 40017254: 84 10 00 0b mov %o3, %g2 <== NOT EXECUTED 40017258: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getpw_r(name, 0, pwd, buffer, bufsize, result); 4001725c: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 40017260: 96 10 00 01 mov %g1, %o3 <== NOT EXECUTED 40017264: 98 10 00 02 mov %g2, %o4 <== NOT EXECUTED 40017268: 92 10 20 00 clr %o1 <== NOT EXECUTED 4001726c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40017270: 7f ff ff a7 call 4001710c <== NOT EXECUTED 40017274: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40017278: 01 00 00 00 nop 40017210 : } struct passwd *getpwuid( uid_t uid ) { 40017210: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 40017214: 13 10 00 e9 sethi %hi(0x4003a400), %o1 <== NOT EXECUTED 40017218: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 4001721c: 92 12 61 b8 or %o1, 0x1b8, %o1 <== NOT EXECUTED 40017220: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 40017224: 15 10 00 e9 sethi %hi(0x4003a400), %o2 <== NOT EXECUTED 40017228: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4001722c: 94 12 a0 f0 or %o2, 0xf0, %o2 <== NOT EXECUTED 40017230: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 40017234: 7f ff ff e9 call 400171d8 <== NOT EXECUTED 40017238: b0 10 20 00 clr %i0 <== NOT EXECUTED 4001723c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40017240: 22 80 00 02 be,a 40017248 <== NOT EXECUTED 40017244: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 40017248: 81 c7 e0 08 ret <== NOT EXECUTED 4001724c: 81 e8 00 00 restore <== NOT EXECUTED 400171d8 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 400171d8: 82 10 00 09 mov %o1, %g1 <== NOT EXECUTED 400171dc: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 400171e0: 86 10 00 0b mov %o3, %g3 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 400171e4: 93 2a 20 10 sll %o0, 0x10, %o1 <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 400171e8: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 400171ec: 94 10 00 01 mov %g1, %o2 <== NOT EXECUTED 400171f0: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 400171f4: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 400171f8: 98 10 00 03 mov %g3, %o4 <== NOT EXECUTED 400171fc: 90 10 20 00 clr %o0 <== NOT EXECUTED 40017200: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40017204: 7f ff ff c2 call 4001710c <== NOT EXECUTED 40017208: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4001720c: 01 00 00 00 nop 4000b750 : int gettimeofday( struct timeval *tp, void * __tz ) { 4000b750: 9d e3 bf 90 save %sp, -112, %sp /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 4000b754: 80 a6 20 00 cmp %i0, 0 4000b758: 12 80 00 08 bne 4000b778 4000b75c: 01 00 00 00 nop errno = EFAULT; 4000b760: 40 00 0a 6f call 4000e11c <__errno> <== NOT EXECUTED 4000b764: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4000b768: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 4000b76c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000b770: 81 c7 e0 08 ret <== NOT EXECUTED 4000b774: 81 e8 00 00 restore <== NOT EXECUTED ) { ISR_Level level; struct timespec now; _ISR_Disable(level); 4000b778: 7f ff d9 78 call 40001d58 4000b77c: 01 00 00 00 nop 4000b780: a0 10 00 08 mov %o0, %l0 _TOD_Get( &now ); 4000b784: 7f ff ed 18 call 40006be4 <_TOD_Get> 4000b788: 90 07 bf f0 add %fp, -16, %o0 _ISR_Enable(level); 4000b78c: 7f ff d9 77 call 40001d68 4000b790: 90 10 00 10 mov %l0, %o0 time->tv_sec = now.tv_sec; time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 4000b794: d0 07 bf f4 ld [ %fp + -12 ], %o0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); time->tv_sec = now.tv_sec; 4000b798: c2 07 bf f0 ld [ %fp + -16 ], %g1 time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 4000b79c: 92 10 23 e8 mov 0x3e8, %o1 4000b7a0: 40 00 26 88 call 400151c0 <.udiv> 4000b7a4: c2 26 00 00 st %g1, [ %i0 ] 4000b7a8: 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; } 4000b7ac: 81 c7 e0 08 ret 4000b7b0: 91 e8 20 00 restore %g0, 0, %o0 400172b8 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 400172b8: 03 10 00 e3 sethi %hi(0x40038c00), %g1 <== NOT EXECUTED 400172bc: c2 00 60 60 ld [ %g1 + 0x60 ], %g1 ! 40038c60 <== NOT EXECUTED return _POSIX_types_Uid; } 400172c0: 81 c3 e0 08 retl <== NOT EXECUTED 400172c4: d0 10 60 28 lduh [ %g1 + 0x28 ], %o0 <== NOT EXECUTED 4002021c : */ int imfs_dir_rmnod( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4002021c: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 40020220: e0 06 00 00 ld [ %i0 ], %l0 /* * You cannot remove a node that still has children */ if ( ! Chain_Is_empty( &the_jnode->info.directory.Entries ) ) 40020224: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 40020228: 82 04 20 50 add %l0, 0x50, %g1 4002022c: 80 a0 80 01 cmp %g2, %g1 40020230: 22 80 00 06 be,a 40020248 40020234: c2 06 20 0c ld [ %i0 + 0xc ], %g1 rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 40020238: 40 00 0a 2d call 40022aec <__errno> 4002023c: 01 00 00 00 nop 40020240: 10 80 00 0d b 40020274 40020244: 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 ) 40020248: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 4002024c: 80 a0 40 10 cmp %g1, %l0 40020250: 02 80 00 06 be 40020268 40020254: 01 00 00 00 nop /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 40020258: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 4002025c: 80 a0 60 00 cmp %g1, 0 40020260: 22 80 00 08 be,a 40020280 40020264: c2 04 20 08 ld [ %l0 + 8 ], %g1 rtems_set_errno_and_return_minus_one( EBUSY ); 40020268: 40 00 0a 21 call 40022aec <__errno> 4002026c: 01 00 00 00 nop 40020270: 82 10 20 10 mov 0x10, %g1 ! 10 40020274: c2 22 00 00 st %g1, [ %o0 ] 40020278: 81 c7 e0 08 ret 4002027c: 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 ) { 40020280: 80 a0 60 00 cmp %g1, 0 40020284: 22 80 00 06 be,a 4002029c 40020288: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 Chain_Extract( (Chain_Node *) the_jnode ); 4002028c: 7f ff e2 bc call 40018d7c <_Chain_Extract> 40020290: 90 10 00 10 mov %l0, %o0 the_jnode->Parent = NULL; 40020294: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 40020298: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 4002029c: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 400202a0: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 400202a4: 90 07 bf f0 add %fp, -16, %o0 400202a8: 7f ff 92 c6 call 40004dc0 400202ac: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 400202b0: 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) ) { 400202b4: 90 10 00 10 mov %l0, %o0 400202b8: 7f ff 93 2c call 40004f68 400202bc: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 400202c0: 80 a2 20 00 cmp %o0, 0 400202c4: 12 80 00 11 bne 40020308 400202c8: 01 00 00 00 nop 400202cc: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 400202d0: 80 a0 60 00 cmp %g1, 0 400202d4: 12 80 00 0d bne 40020308 400202d8: 03 10 00 e3 sethi %hi(0x40038c00), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 400202dc: c6 00 60 60 ld [ %g1 + 0x60 ], %g3 ! 40038c60 400202e0: c4 06 00 00 ld [ %i0 ], %g2 400202e4: c2 00 e0 04 ld [ %g3 + 4 ], %g1 400202e8: 80 a0 40 02 cmp %g1, %g2 400202ec: 22 80 00 02 be,a 400202f4 400202f0: c0 20 e0 04 clr [ %g3 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 400202f4: 90 10 00 10 mov %l0, %o0 400202f8: 7f ff 93 c0 call 400051f8 400202fc: b0 10 20 00 clr %i0 40020300: 81 c7 e0 08 ret 40020304: 81 e8 00 00 restore } return 0; } 40020308: 81 c7 e0 08 ret 4002030c: 91 e8 20 00 restore %g0, 0, %o0 40016dfc : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 40016dfc: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 40016e00: 05 10 00 e9 sethi %hi(0x4003a400), %g2 <== NOT EXECUTED 40016e04: c2 48 a0 e8 ldsb [ %g2 + 0xe8 ], %g1 ! 4003a4e8 <== NOT EXECUTED 40016e08: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40016e0c: 12 80 00 31 bne 40016ed0 <== NOT EXECUTED 40016e10: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED return; etc_passwd_initted = 1; mkdir("/etc", 0777); 40016e14: 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; 40016e18: c2 28 a0 e8 stb %g1, [ %g2 + 0xe8 ] <== NOT EXECUTED mkdir("/etc", 0777); 40016e1c: 11 10 00 d6 sethi %hi(0x40035800), %o0 <== NOT EXECUTED 40016e20: 40 00 01 2f call 400172dc <== NOT EXECUTED 40016e24: 90 12 22 b0 or %o0, 0x2b0, %o0 ! 40035ab0 <_CPU_Trap_slot_template+0xe70> <== NOT EXECUTED /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 40016e28: 31 10 00 d6 sethi %hi(0x40035800), %i0 <== NOT EXECUTED 40016e2c: 13 10 00 df sethi %hi(0x40037c00), %o1 <== NOT EXECUTED 40016e30: 90 16 22 b8 or %i0, 0x2b8, %o0 <== NOT EXECUTED 40016e34: 40 00 31 82 call 4002343c <== NOT EXECUTED 40016e38: 92 12 62 d8 or %o1, 0x2d8, %o1 <== NOT EXECUTED 40016e3c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40016e40: 12 80 00 0d bne 40016e74 <== NOT EXECUTED 40016e44: 01 00 00 00 nop <== NOT EXECUTED fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 40016e48: 90 16 22 b8 or %i0, 0x2b8, %o0 <== NOT EXECUTED 40016e4c: 13 10 00 d3 sethi %hi(0x40034c00), %o1 <== NOT EXECUTED 40016e50: 40 00 31 7b call 4002343c <== NOT EXECUTED 40016e54: 92 12 60 50 or %o1, 0x50, %o1 ! 40034c50 <_CPU_Trap_slot_template+0x10> <== NOT EXECUTED 40016e58: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40016e5c: 02 80 00 08 be 40016e7c <== NOT EXECUTED 40016e60: 11 10 00 d6 sethi %hi(0x40035800), %o0 <== NOT EXECUTED fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 40016e64: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40016e68: 40 00 31 ca call 40023590 <== NOT EXECUTED 40016e6c: 90 12 22 c8 or %o0, 0x2c8, %o0 <== NOT EXECUTED "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 40016e70: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40016e74: 40 00 2f 74 call 40022c44 <== NOT EXECUTED 40016e78: 01 00 00 00 nop <== NOT EXECUTED } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 40016e7c: 31 10 00 d6 sethi %hi(0x40035800), %i0 <== NOT EXECUTED 40016e80: 13 10 00 df sethi %hi(0x40037c00), %o1 <== NOT EXECUTED 40016e84: 90 16 23 30 or %i0, 0x330, %o0 <== NOT EXECUTED 40016e88: 40 00 31 6d call 4002343c <== NOT EXECUTED 40016e8c: 92 12 62 d8 or %o1, 0x2d8, %o1 <== NOT EXECUTED 40016e90: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40016e94: 22 80 00 04 be,a 40016ea4 <== NOT EXECUTED 40016e98: 90 16 23 30 or %i0, 0x330, %o0 <== NOT EXECUTED fclose(fp); 40016e9c: 10 80 00 0b b 40016ec8 <== NOT EXECUTED 40016ea0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } else if ((fp = fopen("/etc/group", "w")) != NULL) { 40016ea4: 13 10 00 d3 sethi %hi(0x40034c00), %o1 <== NOT EXECUTED 40016ea8: 40 00 31 65 call 4002343c <== NOT EXECUTED 40016eac: 92 12 60 50 or %o1, 0x50, %o1 ! 40034c50 <_CPU_Trap_slot_template+0x10> <== NOT EXECUTED 40016eb0: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40016eb4: 02 80 00 07 be 40016ed0 <== NOT EXECUTED 40016eb8: 11 10 00 d6 sethi %hi(0x40035800), %o0 <== NOT EXECUTED fprintf( fp, "root:x:0:root\n" 40016ebc: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40016ec0: 40 00 31 b4 call 40023590 <== NOT EXECUTED 40016ec4: 90 12 23 40 or %o0, 0x340, %o0 <== NOT EXECUTED "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 40016ec8: 40 00 2f 5f call 40022c44 <== NOT EXECUTED 40016ecc: 81 e8 00 00 restore <== NOT EXECUTED 40016ed0: 81 c7 e0 08 ret <== NOT EXECUTED 40016ed4: 81 e8 00 00 restore <== NOT EXECUTED 40015e80 : int ioctl( int fd, ioctl_command_t command, ... ) { 40015e80: 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 ); 40015e84: 03 10 00 9a sethi %hi(0x40026800), %g1 40015e88: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 ! 4002682c int ioctl( int fd, ioctl_command_t command, ... ) { 40015e8c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 40015e90: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 40015e94: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 40015e98: f4 27 a0 4c st %i2, [ %fp + 0x4c ] va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 40015e9c: 80 a6 00 01 cmp %i0, %g1 40015ea0: 1a 80 00 14 bcc 40015ef0 40015ea4: 92 10 00 19 mov %i1, %o1 iop = rtems_libio_iop( fd ); 40015ea8: 03 10 00 a2 sethi %hi(0x40028800), %g1 40015eac: c6 00 62 e8 ld [ %g1 + 0x2e8 ], %g3 ! 40028ae8 40015eb0: 85 2e 20 02 sll %i0, 2, %g2 40015eb4: 83 2e 20 04 sll %i0, 4, %g1 40015eb8: 82 20 40 02 sub %g1, %g2, %g1 40015ebc: 82 00 40 18 add %g1, %i0, %g1 40015ec0: 83 28 60 02 sll %g1, 2, %g1 40015ec4: 90 00 40 03 add %g1, %g3, %o0 rtems_libio_check_is_open(iop); 40015ec8: c2 02 20 0c ld [ %o0 + 0xc ], %g1 40015ecc: 80 88 61 00 btst 0x100, %g1 40015ed0: 02 80 00 08 be 40015ef0 40015ed4: 01 00 00 00 nop /* * Now process the ioctl(). */ if ( !iop->handlers ) 40015ed8: 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 *); 40015edc: 82 07 a0 50 add %fp, 0x50, %g1 40015ee0: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * Now process the ioctl(). */ if ( !iop->handlers ) 40015ee4: 80 a0 a0 00 cmp %g2, 0 40015ee8: 12 80 00 06 bne 40015f00 40015eec: 94 10 00 1a mov %i2, %o2 rtems_set_errno_and_return_minus_one( EBADF ); 40015ef0: 40 00 02 56 call 40016848 <__errno> <== NOT EXECUTED 40015ef4: 01 00 00 00 nop <== NOT EXECUTED 40015ef8: 10 80 00 09 b 40015f1c <== NOT EXECUTED 40015efc: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED if ( !iop->handlers->ioctl_h ) 40015f00: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40015f04: 80 a0 60 00 cmp %g1, 0 40015f08: 12 80 00 08 bne 40015f28 40015f0c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 40015f10: 40 00 02 4e call 40016848 <__errno> <== NOT EXECUTED 40015f14: 01 00 00 00 nop <== NOT EXECUTED 40015f18: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40015f1c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40015f20: 10 80 00 04 b 40015f30 <== NOT EXECUTED 40015f24: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 40015f28: 9f c0 40 00 call %g1 40015f2c: 01 00 00 00 nop return rc; } 40015f30: 81 c7 e0 08 ret 40015f34: 91 e8 00 08 restore %g0, %o0, %o0 40003b58 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 40003b58: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 40003b5c: c4 06 60 30 ld [ %i1 + 0x30 ], %g2 <== NOT EXECUTED 40003b60: 80 88 a0 20 btst 0x20, %g2 <== NOT EXECUTED 40003b64: 02 80 00 03 be 40003b70 <== NOT EXECUTED 40003b68: a2 10 00 18 mov %i0, %l1 <== NOT EXECUTED c &= 0x7f; 40003b6c: a2 0e 20 7f and %i0, 0x7f, %l1 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 40003b70: 80 88 a2 00 btst 0x200, %g2 <== NOT EXECUTED 40003b74: 02 80 00 0b be 40003ba0 <== NOT EXECUTED 40003b78: 82 0c 60 ff and %l1, 0xff, %g1 <== NOT EXECUTED c = tolower (c); 40003b7c: 03 10 00 65 sethi %hi(0x40019400), %g1 <== NOT EXECUTED 40003b80: c2 00 61 08 ld [ %g1 + 0x108 ], %g1 ! 40019508 <__ctype_ptr> <== NOT EXECUTED 40003b84: 90 0c 60 ff and %l1, 0xff, %o0 <== NOT EXECUTED 40003b88: c2 08 40 08 ldub [ %g1 + %o0 ], %g1 <== NOT EXECUTED 40003b8c: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40003b90: 32 80 00 02 bne,a 40003b98 <== NOT EXECUTED 40003b94: 90 02 20 20 add %o0, 0x20, %o0 <== NOT EXECUTED 40003b98: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED if (c == '\r') { 40003b9c: 82 0c 60 ff and %l1, 0xff, %g1 <== NOT EXECUTED 40003ba0: 80 a0 60 0d cmp %g1, 0xd <== NOT EXECUTED 40003ba4: 12 80 00 09 bne 40003bc8 <== NOT EXECUTED 40003ba8: 80 a0 60 0a cmp %g1, 0xa <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) 40003bac: 80 88 a0 80 btst 0x80, %g2 <== NOT EXECUTED 40003bb0: 12 80 00 59 bne 40003d14 <== NOT EXECUTED 40003bb4: 80 88 a1 00 btst 0x100, %g2 <== NOT EXECUTED return 0; if (tty->termios.c_iflag & ICRNL) 40003bb8: 32 80 00 0d bne,a 40003bec <== NOT EXECUTED 40003bbc: a2 10 20 0a mov 0xa, %l1 <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 40003bc0: 10 80 00 0c b 40003bf0 <== NOT EXECUTED 40003bc4: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== 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)) { 40003bc8: 12 80 00 07 bne 40003be4 <== NOT EXECUTED 40003bcc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003bd0: 80 88 a0 40 btst 0x40, %g2 <== NOT EXECUTED 40003bd4: 32 80 00 06 bne,a 40003bec <== NOT EXECUTED 40003bd8: a2 10 20 0d mov 0xd, %l1 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 40003bdc: 10 80 00 05 b 40003bf0 <== NOT EXECUTED 40003be0: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== NOT EXECUTED 40003be4: 02 80 00 3a be 40003ccc <== NOT EXECUTED 40003be8: 03 10 00 64 sethi %hi(0x40019000), %g1 <== NOT EXECUTED 40003bec: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== NOT EXECUTED 40003bf0: 80 88 a0 02 btst 2, %g2 <== NOT EXECUTED 40003bf4: 02 80 00 36 be 40003ccc <== NOT EXECUTED 40003bf8: 03 10 00 64 sethi %hi(0x40019000), %g1 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 40003bfc: c2 0e 60 43 ldub [ %i1 + 0x43 ], %g1 <== NOT EXECUTED 40003c00: a0 0c 60 ff and %l1, 0xff, %l0 <== NOT EXECUTED erase (tty, 0); 40003c04: 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]) { 40003c08: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 40003c0c: 02 80 00 08 be 40003c2c <== NOT EXECUTED 40003c10: 92 10 20 00 clr %o1 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 40003c14: c2 0e 60 44 ldub [ %i1 + 0x44 ], %g1 <== NOT EXECUTED 40003c18: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 40003c1c: 32 80 00 07 bne,a 40003c38 <== NOT EXECUTED 40003c20: c2 0e 60 45 ldub [ %i1 + 0x45 ], %g1 <== NOT EXECUTED erase (tty, 1); 40003c24: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40003c28: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40003c2c: 7f ff ff 3e call 40003924 <== NOT EXECUTED 40003c30: b0 10 20 00 clr %i0 <== NOT EXECUTED 40003c34: 30 80 00 39 b,a 40003d18 <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VEOF]) { 40003c38: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 40003c3c: 02 80 00 37 be 40003d18 <== NOT EXECUTED 40003c40: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return 1; } else if (c == '\n') { 40003c44: 80 a4 20 0a cmp %l0, 0xa <== NOT EXECUTED 40003c48: 32 80 00 0d bne,a 40003c7c <== NOT EXECUTED 40003c4c: c2 0e 60 4c ldub [ %i1 + 0x4c ], %g1 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) 40003c50: 80 88 a0 48 btst 0x48, %g2 <== NOT EXECUTED 40003c54: 22 80 00 06 be,a 40003c6c <== NOT EXECUTED 40003c58: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 40003c5c: 90 10 20 0a mov 0xa, %o0 <== NOT EXECUTED 40003c60: 7f ff ff 0f call 4000389c <== NOT EXECUTED 40003c64: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 40003c68: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 40003c6c: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED 40003c70: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED 40003c74: 10 80 00 13 b 40003cc0 <== NOT EXECUTED 40003c78: e0 28 80 01 stb %l0, [ %g2 + %g1 ] <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) 40003c7c: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 40003c80: 02 80 00 07 be 40003c9c <== NOT EXECUTED 40003c84: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED 40003c88: c2 0e 60 51 ldub [ %i1 + 0x51 ], %g1 <== NOT EXECUTED 40003c8c: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 40003c90: 12 80 00 0f bne 40003ccc <== NOT EXECUTED 40003c94: 03 10 00 64 sethi %hi(0x40019000), %g1 <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 40003c98: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED 40003c9c: 22 80 00 06 be,a 40003cb4 <== NOT EXECUTED 40003ca0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 40003ca4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40003ca8: 7f ff fe fd call 4000389c <== NOT EXECUTED 40003cac: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 40003cb0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 40003cb4: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED 40003cb8: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED 40003cbc: e2 28 80 01 stb %l1, [ %g2 + %g1 ] <== NOT EXECUTED 40003cc0: c6 26 60 20 st %g3, [ %i1 + 0x20 ] <== NOT EXECUTED 40003cc4: 81 c7 e0 08 ret <== NOT EXECUTED 40003cc8: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 40003ccc: c4 06 60 20 ld [ %i1 + 0x20 ], %g2 <== NOT EXECUTED 40003cd0: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 <== NOT EXECUTED 40003cd4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40003cd8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40003cdc: 16 80 00 0f bge 40003d18 <== NOT EXECUTED 40003ce0: b0 10 20 00 clr %i0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 40003ce4: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 40003ce8: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 40003cec: 22 80 00 06 be,a 40003d04 <== NOT EXECUTED 40003cf0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 40003cf4: 90 0c 60 ff and %l1, 0xff, %o0 <== NOT EXECUTED 40003cf8: 7f ff fe e9 call 4000389c <== NOT EXECUTED 40003cfc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 40003d00: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 40003d04: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED 40003d08: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED 40003d0c: e2 28 80 01 stb %l1, [ %g2 + %g1 ] <== NOT EXECUTED 40003d10: c6 26 60 20 st %g3, [ %i1 + 0x20 ] <== NOT EXECUTED 40003d14: b0 10 20 00 clr %i0 <== NOT EXECUTED } return 0; } 40003d18: 81 c7 e0 08 ret <== NOT EXECUTED 40003d1c: 81 e8 00 00 restore <== NOT EXECUTED 4002230c : int killinfo( pid_t pid, int sig, const union sigval *value ) { 4002230c: 9d e3 bf 88 save %sp, -120, %sp /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 40022310: 7f ff ff 15 call 40021f64 40022314: 01 00 00 00 nop 40022318: 80 a6 00 08 cmp %i0, %o0 4002231c: 02 80 00 06 be 40022334 40022320: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); 40022324: 7f ff d1 49 call 40016848 <__errno> 40022328: 01 00 00 00 nop 4002232c: 10 80 00 07 b 40022348 40022330: 82 10 20 03 mov 3, %g1 ! 3 /* * Validate the signal passed. */ if ( !sig ) 40022334: 12 80 00 08 bne 40022354 40022338: 82 06 7f ff add %i1, -1, %g1 rtems_set_errno_and_return_minus_one( EINVAL ); 4002233c: 7f ff d1 43 call 40016848 <__errno> 40022340: 01 00 00 00 nop 40022344: 82 10 20 16 mov 0x16, %g1 ! 16 40022348: c2 22 00 00 st %g1, [ %o0 ] 4002234c: 10 80 00 bc b 4002263c 40022350: 90 10 3f ff mov -1, %o0 if ( !is_valid_signo(sig) ) 40022354: 80 a0 60 1f cmp %g1, 0x1f 40022358: 18 bf ff f9 bgu 4002233c 4002235c: 83 2e 60 02 sll %i1, 2, %g1 /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 40022360: 85 2e 60 04 sll %i1, 4, %g2 40022364: 84 20 80 01 sub %g2, %g1, %g2 40022368: 03 10 00 a4 sethi %hi(0x40029000), %g1 4002236c: 82 10 63 c8 or %g1, 0x3c8, %g1 ! 400293c8 <_POSIX_signals_Vectors> 40022370: 84 00 80 01 add %g2, %g1, %g2 40022374: c2 00 a0 08 ld [ %g2 + 8 ], %g1 40022378: 80 a0 60 01 cmp %g1, 1 4002237c: 02 80 00 b0 be 4002263c 40022380: 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. */ switch ( sig ) { 40022384: 80 a6 60 0b cmp %i1, 0xb 40022388: 18 80 00 0d bgu 400223bc 4002238c: 84 10 20 01 mov 1, %g2 40022390: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40022394: 83 28 40 19 sll %g1, %i1, %g1 <== NOT EXECUTED 40022398: 80 88 69 10 btst 0x910, %g1 <== NOT EXECUTED 4002239c: 22 80 00 09 be,a 400223c0 <== NOT EXECUTED 400223a0: f2 27 bf ec st %i1, [ %fp + -20 ] <== NOT EXECUTED case SIGFPE: case SIGILL: case SIGSEGV: return pthread_kill( pthread_self(), sig ); 400223a4: 40 00 01 4c call 400228d4 <== NOT EXECUTED 400223a8: 01 00 00 00 nop <== NOT EXECUTED 400223ac: 40 00 01 09 call 400227d0 <== NOT EXECUTED 400223b0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } _Thread_Enable_dispatch(); return 0; } 400223b4: 81 c7 e0 08 ret <== NOT EXECUTED 400223b8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 400223bc: f2 27 bf ec st %i1, [ %fp + -20 ] siginfo->si_code = SI_USER; 400223c0: c4 27 bf f0 st %g2, [ %fp + -16 ] return pthread_kill( pthread_self(), sig ); default: break; } mask = signo_to_mask( sig ); 400223c4: 82 06 7f ff add %i1, -1, %g1 */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { 400223c8: 80 a6 a0 00 cmp %i2, 0 400223cc: 12 80 00 04 bne 400223dc 400223d0: b1 28 80 01 sll %g2, %g1, %i0 siginfo->si_value.sival_int = 0; 400223d4: 10 80 00 04 b 400223e4 400223d8: c0 27 bf f4 clr [ %fp + -12 ] } else { siginfo->si_value = *value; 400223dc: c2 06 80 00 ld [ %i2 ], %g1 400223e0: c2 27 bf f4 st %g1, [ %fp + -12 ] rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400223e4: 05 10 00 a3 sethi %hi(0x40028c00), %g2 400223e8: c2 00 a0 b0 ld [ %g2 + 0xb0 ], %g1 ! 40028cb0 <_Thread_Dispatch_disable_level> 400223ec: 82 00 60 01 inc %g1 400223f0: c2 20 a0 b0 st %g1, [ %g2 + 0xb0 ] /* * 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; 400223f4: 03 10 00 a3 sethi %hi(0x40028c00), %g1 400223f8: c4 00 61 8c ld [ %g1 + 0x18c ], %g2 ! 40028d8c <_Thread_Executing> api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 400223fc: c2 00 a1 70 ld [ %g2 + 0x170 ], %g1 40022400: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 40022404: 80 ae 00 01 andncc %i0, %g1, %g0 40022408: 12 80 00 65 bne 4002259c 4002240c: 03 10 00 a5 sethi %hi(0x40029400), %g1 goto process_it; 40022410: 88 10 61 54 or %g1, 0x154, %g4 ! 40029554 <_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 ; 40022414: 98 01 20 30 add %g4, 0x30, %o4 index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; 40022418: c2 01 00 00 ld [ %g4 ], %g1 !_Chain_Is_tail( the_chain, the_node ) ; 4002241c: 10 80 00 0b b 40022448 40022420: 9a 01 20 04 add %g4, 4, %o5 the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 40022424: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 40022428: 80 8e 00 01 btst %i0, %g1 4002242c: 12 80 00 5c bne 4002259c 40022430: c6 00 a1 70 ld [ %g2 + 0x170 ], %g3 40022434: c2 00 e0 c4 ld [ %g3 + 0xc4 ], %g1 <== NOT EXECUTED 40022438: 80 ae 00 01 andncc %i0, %g1, %g0 <== NOT EXECUTED 4002243c: 12 80 00 59 bne 400225a0 <== NOT EXECUTED 40022440: 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 ) { 40022444: c2 00 80 00 ld [ %g2 ], %g1 <== 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 ) ; 40022448: 80 a0 40 0d cmp %g1, %o5 4002244c: 12 bf ff f6 bne 40022424 40022450: 84 10 00 01 mov %g1, %g2 40022454: 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 ; 40022458: 80 a1 00 0c cmp %g4, %o4 4002245c: 32 bf ff f0 bne,a 4002241c 40022460: c2 01 00 00 ld [ %g4 ], %g1 the_api++ ) { if ( the_api == OBJECTS_INTERNAL_THREADS ) continue; if ( !_Objects_Information_table[ the_api ] ) /* API not installed */ 40022464: 03 10 00 a3 sethi %hi(0x40028c00), %g1 40022468: ae 10 60 10 or %g1, 0x10, %l7 ! 40028c10 <_Objects_Information_table> continue; maximum = the_info->maximum; object_table = the_info->local_table; assert( object_table ); /* always at least 1 entry */ 4002246c: 03 10 00 99 sethi %hi(0x40026400), %g1 */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 40022470: a4 10 21 00 mov 0x100, %l2 continue; maximum = the_info->maximum; object_table = the_info->local_table; assert( object_table ); /* always at least 1 entry */ 40022474: ac 10 63 50 or %g1, 0x350, %l6 */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 40022478: a0 10 20 00 clr %l0 continue; maximum = the_info->maximum; object_table = the_info->local_table; assert( object_table ); /* always at least 1 entry */ 4002247c: 03 10 00 99 sethi %hi(0x40026400), %g1 */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 40022480: b4 10 20 02 mov 2, %i2 continue; maximum = the_info->maximum; object_table = the_info->local_table; assert( object_table ); /* always at least 1 entry */ 40022484: aa 10 63 98 or %g1, 0x398, %l5 * 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 ) 40022488: 10 80 00 04 b 40022498 4002248c: 29 04 00 00 sethi %hi(0x10000000), %l4 for ( the_api = 2; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( the_api == OBJECTS_INTERNAL_THREADS ) 40022490: 22 80 00 3d be,a 40022584 40022494: b4 06 a0 01 inc %i2 <== NOT EXECUTED continue; if ( !_Objects_Information_table[ the_api ] ) /* API not installed */ 40022498: 83 2e a0 02 sll %i2, 2, %g1 4002249c: c2 05 c0 01 ld [ %l7 + %g1 ], %g1 400224a0: 80 a0 60 00 cmp %g1, 0 400224a4: 22 80 00 38 be,a 40022584 400224a8: b4 06 a0 01 inc %i2 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 400224ac: c2 00 60 04 ld [ %g1 + 4 ], %g1 if ( !the_info ) /* manager not installed */ 400224b0: 80 a0 60 00 cmp %g1, 0 400224b4: 22 80 00 34 be,a 40022584 400224b8: b4 06 a0 01 inc %i2 <== NOT EXECUTED continue; maximum = the_info->maximum; object_table = the_info->local_table; 400224bc: e2 00 60 20 ld [ %g1 + 0x20 ], %l1 assert( object_table ); /* always at least 1 entry */ 400224c0: 80 a4 60 00 cmp %l1, 0 400224c4: 12 80 00 06 bne 400224dc 400224c8: e6 10 60 10 lduh [ %g1 + 0x10 ], %l3 400224cc: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED 400224d0: 92 10 20 c1 mov 0xc1, %o1 <== NOT EXECUTED 400224d4: 7f ff 8e a4 call 40005f64 <__assert> <== NOT EXECUTED 400224d8: 94 10 00 15 mov %l5, %o2 <== NOT EXECUTED 400224dc: 10 80 00 26 b 40022574 400224e0: 9a 10 20 01 mov 1, %o5 for ( index = 1 ; index <= maximum ; index++ ) { the_thread = (Thread_Control *) object_table[ index ]; 400224e4: c4 00 40 11 ld [ %g1 + %l1 ], %g2 if ( !the_thread ) 400224e8: 80 a0 a0 00 cmp %g2, 0 400224ec: 22 80 00 22 be,a 40022574 400224f0: 9a 03 60 01 inc %o5 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 400224f4: c8 00 a0 14 ld [ %g2 + 0x14 ], %g4 400224f8: 80 a1 00 12 cmp %g4, %l2 400224fc: 38 80 00 1e bgu,a 40022574 40022500: 9a 03 60 01 inc %o5 <== NOT EXECUTED /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 40022504: c2 00 a1 70 ld [ %g2 + 0x170 ], %g1 if ( !api || !_POSIX_signals_Is_interested( api, mask ) ) 40022508: 80 a0 60 00 cmp %g1, 0 4002250c: 22 80 00 1a be,a 40022574 40022510: 9a 03 60 01 inc %o5 <== NOT EXECUTED 40022514: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 40022518: 80 ae 00 01 andncc %i0, %g1, %g0 4002251c: 22 80 00 16 be,a 40022574 40022520: 9a 03 60 01 inc %o5 * Now we know the thread under connsideration is interested. * If the thread under consideration is of higher priority, then * it becomes the interested thread. */ if ( the_thread->current_priority < interested_priority ) { 40022524: 80 a1 00 12 cmp %g4, %l2 40022528: 2a 80 00 11 bcs,a 4002256c 4002252c: a0 10 00 02 mov %g2, %l0 * 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 ) ) 40022530: c6 04 20 10 ld [ %l0 + 0x10 ], %g3 <== NOT EXECUTED 40022534: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40022538: 22 80 00 0f be,a 40022574 <== NOT EXECUTED 4002253c: 9a 03 60 01 inc %o5 <== NOT EXECUTED * Now the interested thread is blocked. * If the thread we are considering is not, the it becomes the * interested thread. */ if ( _States_Is_ready( the_thread->current_state ) ) { 40022540: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED 40022544: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40022548: 22 80 00 09 be,a 4002256c <== NOT EXECUTED 4002254c: a0 10 00 02 mov %g2, %l0 <== 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 ) 40022550: 80 88 c0 14 btst %g3, %l4 <== NOT EXECUTED 40022554: 32 80 00 08 bne,a 40022574 <== NOT EXECUTED 40022558: 9a 03 60 01 inc %o5 <== NOT EXECUTED * If the thread under consideration is interruptible by a signal, * then it becomes the interested thread. */ /* XXX need a new states macro */ if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 4002255c: 80 88 40 14 btst %g1, %l4 <== NOT EXECUTED 40022560: 22 80 00 05 be,a 40022574 <== NOT EXECUTED 40022564: 9a 03 60 01 inc %o5 <== NOT EXECUTED 40022568: a0 10 00 02 mov %g2, %l0 <== NOT EXECUTED 4002256c: a4 10 00 04 mov %g4, %l2 maximum = the_info->maximum; object_table = the_info->local_table; assert( object_table ); /* always at least 1 entry */ for ( index = 1 ; index <= maximum ; index++ ) { 40022570: 9a 03 60 01 inc %o5 40022574: 80 a3 40 13 cmp %o5, %l3 40022578: 08 bf ff db bleu 400224e4 4002257c: 83 2b 60 02 sll %o5, 2, %g1 interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for ( the_api = 2; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 40022580: b4 06 a0 01 inc %i2 interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for ( the_api = 2; the_api <= OBJECTS_APIS_LAST; 40022584: 80 a6 a0 04 cmp %i2, 4 40022588: 08 bf ff c2 bleu 40022490 4002258c: 80 a6 a0 01 cmp %i2, 1 interested_priority = the_thread->current_priority; } } } if ( interested_thread ) { 40022590: 80 a4 20 00 cmp %l0, 0 40022594: 02 80 00 0b be 400225c0 40022598: 84 10 00 10 mov %l0, %g2 * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = TRUE; 4002259c: 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 ) ) { 400225a0: 90 10 00 02 mov %g2, %o0 * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = TRUE; 400225a4: c2 20 a0 78 st %g1, [ %g2 + 0x78 ] /* * 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 ) ) { 400225a8: 92 10 00 19 mov %i1, %o1 400225ac: 40 00 00 37 call 40022688 <_POSIX_signals_Unblock_thread> 400225b0: 94 07 bf ec add %fp, -20, %o2 400225b4: 80 a2 20 00 cmp %o0, 0 400225b8: 12 80 00 1e bne 40022630 400225bc: 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 ); 400225c0: 40 00 00 22 call 40022648 <_POSIX_signals_Set_process_signals> 400225c4: 90 10 00 18 mov %i0, %o0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 400225c8: 83 2e 60 02 sll %i1, 2, %g1 400225cc: 85 2e 60 04 sll %i1, 4, %g2 400225d0: b2 20 80 01 sub %g2, %g1, %i1 400225d4: 03 10 00 a4 sethi %hi(0x40029000), %g1 400225d8: 82 10 63 c8 or %g1, 0x3c8, %g1 ! 400293c8 <_POSIX_signals_Vectors> 400225dc: c2 00 40 19 ld [ %g1 + %i1 ], %g1 400225e0: 80 a0 60 02 cmp %g1, 2 400225e4: 12 80 00 13 bne 40022630 400225e8: 11 10 00 a5 sethi %hi(0x40029400), %o0 psiginfo = (POSIX_signals_Siginfo_node *) 400225ec: 7f ff a2 ae call 4000b0a4 <_Chain_Get> 400225f0: 90 12 21 48 or %o0, 0x148, %o0 ! 40029548 <_POSIX_signals_Inactive_siginfo> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 400225f4: b4 92 20 00 orcc %o0, 0, %i2 400225f8: 12 80 00 06 bne 40022610 400225fc: 92 07 bf ec add %fp, -20, %o1 rtems_set_errno_and_return_minus_one( EAGAIN ); 40022600: 7f ff d0 92 call 40016848 <__errno> <== NOT EXECUTED 40022604: 01 00 00 00 nop <== NOT EXECUTED 40022608: 10 bf ff 50 b 40022348 <== NOT EXECUTED 4002260c: 82 10 20 0b mov 0xb, %g1 ! b <== NOT EXECUTED } psiginfo->Info = *siginfo; 40022610: 90 06 a0 08 add %i2, 8, %o0 40022614: 7f ff d6 7f call 40018010 40022618: 94 10 20 0c mov 0xc, %o2 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 4002261c: 11 10 00 a5 sethi %hi(0x40029400), %o0 40022620: 92 10 00 1a mov %i2, %o1 40022624: 90 12 21 98 or %o0, 0x198, %o0 40022628: 7f ff a2 93 call 4000b074 <_Chain_Append> 4002262c: 90 06 40 08 add %i1, %o0, %o0 } _Thread_Enable_dispatch(); 40022630: 7f ff ff 2a call 400222d8 <_Thread_Enable_dispatch> 40022634: 01 00 00 00 nop 40022638: 90 10 20 00 clr %o0 ! 0 return 0; } 4002263c: b0 10 00 08 mov %o0, %i0 40022640: 81 c7 e0 08 ret 40022644: 81 e8 00 00 restore 4001761c : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 4001761c: 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())) 40017620: 03 10 00 68 sethi %hi(0x4001a000), %g1 40017624: c2 00 60 00 ld [ %g1 ], %g1 40017628: 80 a0 60 03 cmp %g1, 3 4001762c: 12 80 00 15 bne 40017680 40017630: 21 10 00 65 sethi %hi(0x40019400), %l0 /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != &libc_global_reent) { 40017634: c4 04 21 10 ld [ %l0 + 0x110 ], %g2 ! 40019510 <_impure_ptr> 40017638: 03 10 00 63 sethi %hi(0x40018c00), %g1 4001763c: b0 10 60 c0 or %g1, 0xc0, %i0 ! 40018cc0 40017640: 80 a0 80 18 cmp %g2, %i0 40017644: 02 80 00 06 be 4001765c 40017648: c2 04 21 10 ld [ %l0 + 0x110 ], %g1 _wrapup_reent(&libc_global_reent); 4001764c: 40 00 00 a1 call 400178d0 <_wrapup_reent> 40017650: 90 10 00 18 mov %i0, %o0 /* Don't reclaim this one, just in case we do printfs * on the way out to ROM. */ _reclaim_reent(&libc_global_reent); #endif _REENT = &libc_global_reent; 40017654: f0 24 21 10 st %i0, [ %l0 + 0x110 ] * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 40017658: c2 04 21 10 ld [ %l0 + 0x110 ], %g1 4001765c: 7f ff db 06 call 4000e274 40017660: d0 00 60 04 ld [ %g1 + 4 ], %o0 fclose (stdout); 40017664: c2 04 21 10 ld [ %l0 + 0x110 ], %g1 40017668: 7f ff db 03 call 4000e274 4001766c: d0 00 60 08 ld [ %g1 + 8 ], %o0 fclose (stderr); 40017670: c2 04 21 10 ld [ %l0 + 0x110 ], %g1 40017674: f0 00 60 0c ld [ %g1 + 0xc ], %i0 40017678: 7f ff da ff call 4000e274 4001767c: 81 e8 00 00 restore 40017680: 81 c7 e0 08 ret <== NOT EXECUTED 40017684: 81 e8 00 00 restore <== NOT EXECUTED 40003838 : int link( const char *existing, const char *new ) { 40003838: 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 ); 4000383c: 92 10 20 00 clr %o1 40003840: 90 10 00 18 mov %i0, %o0 40003844: 94 07 bf e4 add %fp, -28, %o2 40003848: 96 10 20 01 mov 1, %o3 4000384c: 7f ff fe a8 call 400032ec 40003850: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 40003854: 80 a2 20 00 cmp %o0, 0 40003858: 12 80 00 8e bne 40003a90 4000385c: 01 00 00 00 nop /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 40003860: c2 4e 40 00 ldsb [ %i1 ], %g1 40003864: 80 a0 60 2f cmp %g1, 0x2f 40003868: 02 80 00 06 be 40003880 4000386c: 80 a0 60 5c cmp %g1, 0x5c 40003870: 02 80 00 04 be 40003880 40003874: 80 a0 60 00 cmp %g1, 0 40003878: 12 80 00 0a bne 400038a0 4000387c: 03 10 00 63 sethi %hi(0x40018c00), %g1 40003880: 03 10 00 63 sethi %hi(0x40018c00), %g1 40003884: d2 00 61 f0 ld [ %g1 + 0x1f0 ], %o1 ! 40018df0 40003888: 90 07 bf d4 add %fp, -44, %o0 4000388c: 92 02 60 14 add %o1, 0x14, %o1 40003890: 40 00 36 2f call 4001114c 40003894: 94 10 20 10 mov 0x10, %o2 40003898: 10 80 00 08 b 400038b8 4000389c: 84 10 20 01 mov 1, %g2 400038a0: d2 00 61 f0 ld [ %g1 + 0x1f0 ], %o1 400038a4: 90 07 bf d4 add %fp, -44, %o0 400038a8: 92 02 60 04 add %o1, 4, %o1 400038ac: 40 00 36 28 call 4001114c 400038b0: 94 10 20 10 mov 0x10, %o2 400038b4: 84 10 20 00 clr %g2 if ( !parent_loc.ops->evalformake_h ) { 400038b8: c2 07 bf dc ld [ %fp + -36 ], %g1 400038bc: c2 00 60 04 ld [ %g1 + 4 ], %g1 400038c0: 80 a0 60 00 cmp %g1, 0 400038c4: 12 80 00 0b bne 400038f0 400038c8: 90 06 40 02 add %i1, %g2, %o0 rtems_filesystem_freenode( &existing_loc ); 400038cc: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 400038d0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400038d4: 02 80 00 51 be 40003a18 <== NOT EXECUTED 400038d8: 01 00 00 00 nop <== NOT EXECUTED 400038dc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400038e0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400038e4: 12 80 00 4b bne 40003a10 <== NOT EXECUTED 400038e8: 90 07 bf e4 add %fp, -28, %o0 <== NOT EXECUTED 400038ec: 30 80 00 4b b,a 40003a18 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 400038f0: b0 07 bf d4 add %fp, -44, %i0 400038f4: 94 07 bf f4 add %fp, -12, %o2 400038f8: 9f c0 40 00 call %g1 400038fc: 92 10 00 18 mov %i0, %o1 if ( result != 0 ) { 40003900: b2 92 20 00 orcc %o0, 0, %i1 40003904: 02 80 00 11 be 40003948 40003908: c4 07 bf e0 ld [ %fp + -32 ], %g2 rtems_filesystem_freenode( &existing_loc ); 4000390c: c2 07 bf ec ld [ %fp + -20 ], %g1 40003910: 80 a0 60 00 cmp %g1, 0 40003914: 02 80 00 08 be 40003934 40003918: 01 00 00 00 nop 4000391c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40003920: 80 a0 60 00 cmp %g1, 0 40003924: 02 80 00 04 be 40003934 40003928: 01 00 00 00 nop 4000392c: 9f c0 40 00 call %g1 40003930: 90 07 bf e4 add %fp, -28, %o0 rtems_set_errno_and_return_minus_one( result ); 40003934: 40 00 34 25 call 400109c8 <__errno> 40003938: b0 10 3f ff mov -1, %i0 4000393c: f2 22 00 00 st %i1, [ %o0 ] 40003940: 81 c7 e0 08 ret 40003944: 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 ) { 40003948: c2 07 bf f0 ld [ %fp + -16 ], %g1 4000394c: 80 a0 80 01 cmp %g2, %g1 40003950: 02 80 00 1a be 400039b8 40003954: c2 07 bf dc ld [ %fp + -36 ], %g1 rtems_filesystem_freenode( &existing_loc ); 40003958: c2 07 bf ec ld [ %fp + -20 ], %g1 4000395c: 80 a0 60 00 cmp %g1, 0 40003960: 22 80 00 09 be,a 40003984 40003964: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 40003968: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000396c: 80 a0 60 00 cmp %g1, 0 40003970: 22 80 00 05 be,a 40003984 40003974: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 40003978: 9f c0 40 00 call %g1 4000397c: 90 07 bf e4 add %fp, -28, %o0 rtems_filesystem_freenode( &parent_loc ); 40003980: c2 07 bf dc ld [ %fp + -36 ], %g1 40003984: 80 a0 60 00 cmp %g1, 0 40003988: 02 80 00 08 be 400039a8 4000398c: 01 00 00 00 nop 40003990: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40003994: 80 a0 60 00 cmp %g1, 0 40003998: 02 80 00 04 be 400039a8 4000399c: 01 00 00 00 nop 400039a0: 9f c0 40 00 call %g1 400039a4: 90 07 bf d4 add %fp, -44, %o0 rtems_set_errno_and_return_minus_one( EXDEV ); 400039a8: 40 00 34 08 call 400109c8 <__errno> 400039ac: b0 10 3f ff mov -1, %i0 400039b0: 10 80 00 1d b 40003a24 400039b4: 82 10 20 12 mov 0x12, %g1 } if ( !parent_loc.ops->link_h ) { 400039b8: c2 00 60 08 ld [ %g1 + 8 ], %g1 400039bc: 80 a0 60 00 cmp %g1, 0 400039c0: 12 80 00 1c bne 40003a30 400039c4: d4 07 bf f4 ld [ %fp + -12 ], %o2 rtems_filesystem_freenode( &existing_loc ); 400039c8: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 400039cc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400039d0: 22 80 00 09 be,a 400039f4 <== NOT EXECUTED 400039d4: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 400039d8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400039dc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400039e0: 22 80 00 05 be,a 400039f4 <== NOT EXECUTED 400039e4: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 400039e8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400039ec: 90 07 bf e4 add %fp, -28, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 400039f0: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 400039f4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400039f8: 02 80 00 08 be 40003a18 <== NOT EXECUTED 400039fc: 01 00 00 00 nop <== NOT EXECUTED 40003a00: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40003a04: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003a08: 02 80 00 04 be 40003a18 <== NOT EXECUTED 40003a0c: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED 40003a10: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003a14: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40003a18: 40 00 33 ec call 400109c8 <__errno> <== NOT EXECUTED 40003a1c: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40003a20: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40003a24: c2 22 00 00 st %g1, [ %o0 ] 40003a28: 81 c7 e0 08 ret 40003a2c: 81 e8 00 00 restore } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 40003a30: 92 10 00 18 mov %i0, %o1 40003a34: b2 07 bf e4 add %fp, -28, %i1 40003a38: 9f c0 40 00 call %g1 40003a3c: 90 10 00 19 mov %i1, %o0 rtems_filesystem_freenode( &existing_loc ); 40003a40: c2 07 bf ec ld [ %fp + -20 ], %g1 40003a44: 80 a0 60 00 cmp %g1, 0 40003a48: 02 80 00 08 be 40003a68 40003a4c: b0 10 00 08 mov %o0, %i0 40003a50: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40003a54: 80 a0 60 00 cmp %g1, 0 40003a58: 22 80 00 05 be,a 40003a6c 40003a5c: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 40003a60: 9f c0 40 00 call %g1 40003a64: 90 10 00 19 mov %i1, %o0 rtems_filesystem_freenode( &parent_loc ); 40003a68: c2 07 bf dc ld [ %fp + -36 ], %g1 40003a6c: 80 a0 60 00 cmp %g1, 0 40003a70: 02 80 00 08 be 40003a90 40003a74: 01 00 00 00 nop 40003a78: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40003a7c: 80 a0 60 00 cmp %g1, 0 40003a80: 02 80 00 04 be 40003a90 40003a84: 01 00 00 00 nop 40003a88: 9f c0 40 00 call %g1 40003a8c: 90 07 bf d4 add %fp, -44, %o0 return result; } 40003a90: 81 c7 e0 08 ret 40003a94: 81 e8 00 00 restore 4001750c : off_t lseek( int fd, off_t offset, int whence ) { 4001750c: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 40017510: 03 10 00 62 sethi %hi(0x40018800), %g1 40017514: c2 00 63 bc ld [ %g1 + 0x3bc ], %g1 ! 40018bbc off_t lseek( int fd, off_t offset, int whence ) { 40017518: 92 10 00 19 mov %i1, %o1 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 4001751c: 80 a6 00 01 cmp %i0, %g1 40017520: 1a 80 00 0e bcc 40017558 40017524: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 40017528: 03 10 00 67 sethi %hi(0x40019c00), %g1 4001752c: c6 00 60 54 ld [ %g1 + 0x54 ], %g3 ! 40019c54 40017530: 85 2e 20 02 sll %i0, 2, %g2 40017534: 83 2e 20 04 sll %i0, 4, %g1 40017538: 82 20 40 02 sub %g1, %g2, %g1 4001753c: 82 00 40 18 add %g1, %i0, %g1 40017540: 83 28 60 02 sll %g1, 2, %g1 40017544: b0 00 40 03 add %g1, %g3, %i0 rtems_libio_check_is_open(iop); 40017548: c2 06 20 0c ld [ %i0 + 0xc ], %g1 4001754c: 80 88 61 00 btst 0x100, %g1 40017550: 32 80 00 06 bne,a 40017568 40017554: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40017558: 7f ff da f1 call 4000e11c <__errno> <== NOT EXECUTED 4001755c: 01 00 00 00 nop <== NOT EXECUTED 40017560: 10 80 00 1c b 400175d0 <== NOT EXECUTED 40017564: 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 ) 40017568: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4001756c: 80 a0 60 00 cmp %g1, 0 40017570: 12 80 00 06 bne 40017588 40017574: 80 a6 a0 01 cmp %i2, 1 rtems_set_errno_and_return_minus_one( ENOTSUP ); 40017578: 7f ff da e9 call 4000e11c <__errno> <== NOT EXECUTED 4001757c: 01 00 00 00 nop <== NOT EXECUTED 40017580: 10 80 00 14 b 400175d0 <== NOT EXECUTED 40017584: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 40017588: 02 80 00 09 be 400175ac 4001758c: f4 06 20 08 ld [ %i0 + 8 ], %i2 40017590: 80 a2 a0 02 cmp %o2, 2 40017594: 02 80 00 08 be 400175b4 40017598: 80 a2 a0 00 cmp %o2, 0 4001759c: 12 80 00 0a bne 400175c4 400175a0: 01 00 00 00 nop case SEEK_SET: iop->offset = offset; 400175a4: 10 80 00 0e b 400175dc 400175a8: f2 26 20 08 st %i1, [ %i0 + 8 ] break; case SEEK_CUR: iop->offset += offset; 400175ac: 10 80 00 04 b 400175bc 400175b0: 82 06 40 1a add %i1, %i2, %g1 break; case SEEK_END: iop->offset = iop->size + offset; 400175b4: c2 06 20 04 ld [ %i0 + 4 ], %g1 400175b8: 82 06 40 01 add %i1, %g1, %g1 400175bc: 10 80 00 08 b 400175dc 400175c0: c2 26 20 08 st %g1, [ %i0 + 8 ] break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 400175c4: 7f ff da d6 call 4000e11c <__errno> 400175c8: 01 00 00 00 nop 400175cc: 82 10 20 16 mov 0x16, %g1 ! 16 400175d0: c2 22 00 00 st %g1, [ %o0 ] 400175d4: 10 80 00 09 b 400175f8 400175d8: 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 ); 400175dc: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 400175e0: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 400175e4: 9f c0 40 00 call %g1 400175e8: 90 10 00 18 mov %i0, %o0 if ( status == (off_t) -1 ) 400175ec: 80 a2 3f ff cmp %o0, -1 400175f0: 22 80 00 02 be,a 400175f8 400175f4: f4 26 20 08 st %i2, [ %i0 + 8 ] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 400175f8: 81 c7 e0 08 ret 400175fc: 91 e8 00 08 restore %g0, %o0, %o0 4000224c : #ifdef RTEMS_NEWLIB void *malloc( size_t size ) { 4000224c: 9d e3 bf 98 save %sp, -104, %sp uint32_t sbrk_amount; Chain_Node *to_be_freed; MSBUMP(malloc_calls, 1); if ( !size ) 40002250: a4 96 20 00 orcc %i0, 0, %l2 40002254: 02 80 00 41 be 40002358 40002258: 03 10 00 68 sethi %hi(0x4001a000), %g1 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 4000225c: c2 00 60 00 ld [ %g1 ], %g1 40002260: 80 a0 60 03 cmp %g1, 3 40002264: 12 80 00 10 bne 400022a4 40002268: 03 10 00 67 sethi %hi(0x40019c00), %g1 if (_Thread_Dispatch_disable_level > 0) 4000226c: 03 10 00 67 sethi %hi(0x40019c00), %g1 40002270: c2 00 62 20 ld [ %g1 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> 40002274: 80 a0 60 00 cmp %g1, 0 40002278: 12 80 00 36 bne 40002350 4000227c: b0 10 20 00 clr %i0 return (void *) 0; if (_ISR_Nest_level > 0) 40002280: 03 10 00 67 sethi %hi(0x40019c00), %g1 40002284: c2 00 62 e4 ld [ %g1 + 0x2e4 ], %g1 ! 40019ee4 <_ISR_Nest_level> 40002288: 80 a0 60 00 cmp %g1, 0 4000228c: 02 80 00 06 be 400022a4 40002290: 03 10 00 67 sethi %hi(0x40019c00), %g1 40002294: 30 80 00 32 b,a 4000235c <== NOT EXECUTED /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = Chain_Get(&RTEMS_Malloc_GC_list)) != NULL) free(to_be_freed); 40002298: 7f ff ff c5 call 400021ac 4000229c: 01 00 00 00 nop 400022a0: 30 80 00 02 b,a 400022a8 } /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = Chain_Get(&RTEMS_Malloc_GC_list)) != NULL) 400022a4: a0 10 60 bc or %g1, 0xbc, %l0 400022a8: 40 00 11 68 call 40006848 <_Chain_Get> 400022ac: 90 10 00 10 mov %l0, %o0 400022b0: 80 a2 20 00 cmp %o0, 0 400022b4: 12 bf ff f9 bne 40002298 400022b8: 23 10 00 67 sethi %hi(0x40019c00), %l1 */ #ifdef MALLOC_ARENA_CHECK size += sizeof(struct mallocNode) + SENTINELSIZE; #endif return_this = _Protected_heap_Allocate( &RTEMS_Malloc_Heap, size ); 400022bc: 92 10 00 12 mov %l2, %o1 400022c0: 40 00 16 25 call 40007b54 <_Protected_heap_Allocate> 400022c4: 90 14 60 60 or %l1, 0x60, %o0 if ( !return_this ) { 400022c8: b0 92 20 00 orcc %o0, 0, %i0 400022cc: 12 80 00 21 bne 40002350 400022d0: 03 10 00 67 sethi %hi(0x40019c00), %g1 * Round to the "requested sbrk amount" so hopefully we won't have * to grow again for a while. This effectively does sbrk() calls * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; 400022d4: e0 00 60 b8 ld [ %g1 + 0xb8 ], %l0 ! 40019cb8 <== NOT EXECUTED if ( sbrk_amount == 0 ) 400022d8: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 400022dc: 02 80 00 1d be 40002350 <== NOT EXECUTED 400022e0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); 400022e4: 40 00 4b b7 call 400151c0 <.udiv> <== NOT EXECUTED 400022e8: 90 04 80 10 add %l2, %l0, %o0 <== NOT EXECUTED 400022ec: 40 00 4b 7b call 400150d8 <.umul> <== NOT EXECUTED 400022f0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if ((starting_address = (void *)sbrk(the_size)) 400022f4: 7f ff fd d2 call 40001a3c <== NOT EXECUTED 400022f8: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 400022fc: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 40002300: 02 80 00 14 be 40002350 <== NOT EXECUTED 40002304: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED == (void*) -1) return (void *) 0; if ( !_Protected_heap_Extend( 40002308: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 4000230c: 40 00 16 a3 call 40007d98 <_Protected_heap_Extend> <== NOT EXECUTED 40002310: 90 14 60 60 or %l1, 0x60, %o0 <== NOT EXECUTED 40002314: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40002318: 12 80 00 05 bne 4000232c <== NOT EXECUTED 4000231c: 90 14 60 60 or %l1, 0x60, %o0 <== NOT EXECUTED &RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); 40002320: 7f ff fd c7 call 40001a3c <== NOT EXECUTED 40002324: 90 20 00 10 neg %l0, %o0 <== NOT EXECUTED 40002328: 30 80 00 06 b,a 40002340 <== NOT EXECUTED return (void *) 0; } MSBUMP(space_available, the_size); return_this = _Protected_heap_Allocate( &RTEMS_Malloc_Heap, size ); 4000232c: 40 00 16 0a call 40007b54 <_Protected_heap_Allocate> <== NOT EXECUTED 40002330: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED if ( !return_this ) { 40002334: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40002338: 12 80 00 09 bne 4000235c <== NOT EXECUTED 4000233c: 01 00 00 00 nop <== NOT EXECUTED errno = ENOMEM; 40002340: 40 00 2f 77 call 4000e11c <__errno> <== NOT EXECUTED 40002344: 01 00 00 00 nop <== NOT EXECUTED 40002348: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 4000234c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40002350: 81 c7 e0 08 ret 40002354: 81 e8 00 00 restore return (void *) 0; 40002358: b0 10 20 00 clr %i0 mallocNodeHead.forw = mp; rtems_interrupt_enable(key); } #endif return return_this; } 4000235c: 81 c7 e0 08 ret 40002360: 81 e8 00 00 restore 400051c8 : /* * Find amount of free heap remaining */ size_t malloc_free_space( void ) { 400051c8: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED Heap_Information info; _Protected_heap_Get_free_information( &RTEMS_Malloc_Heap, &info ); 400051cc: 11 10 00 eb sethi %hi(0x4003ac00), %o0 <== NOT EXECUTED 400051d0: 92 07 bf ec add %fp, -20, %o1 <== NOT EXECUTED 400051d4: 40 00 1a 09 call 4000b9f8 <_Protected_heap_Get_free_information> <== NOT EXECUTED 400051d8: 90 12 21 a0 or %o0, 0x1a0, %o0 <== NOT EXECUTED return (size_t) info.largest; } 400051dc: f0 07 bf f0 ld [ %fp + -16 ], %i0 <== NOT EXECUTED 400051e0: 81 c7 e0 08 ret <== NOT EXECUTED 400051e4: 81 e8 00 00 restore <== NOT EXECUTED 40019e8c : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 40019e8c: 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) ) { 40019e90: 7f ff ac 36 call 40004f68 40019e94: 90 10 00 18 mov %i0, %o0 40019e98: 80 a2 20 00 cmp %o0, 0 40019e9c: 12 80 00 13 bne 40019ee8 40019ea0: 01 00 00 00 nop 40019ea4: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 40019ea8: 80 a0 60 00 cmp %g1, 0 40019eac: 12 80 00 0f bne 40019ee8 40019eb0: 03 10 00 e3 sethi %hi(0x40038c00), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 40019eb4: c4 00 60 60 ld [ %g1 + 0x60 ], %g2 ! 40038c60 40019eb8: c2 00 a0 04 ld [ %g2 + 4 ], %g1 40019ebc: 80 a0 40 18 cmp %g1, %i0 40019ec0: 22 80 00 02 be,a 40019ec8 40019ec4: 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) 40019ec8: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40019ecc: 80 a0 60 06 cmp %g1, 6 40019ed0: 02 80 00 04 be 40019ee0 40019ed4: 01 00 00 00 nop IMFS_memfile_remove( the_jnode ); 40019ed8: 7f ff ff 84 call 40019ce8 40019edc: 90 10 00 18 mov %i0, %o0 free( the_jnode ); 40019ee0: 7f ff ac c6 call 400051f8 40019ee4: 90 10 00 18 mov %i0, %o0 } return 0; } 40019ee8: 81 c7 e0 08 ret 40019eec: 91 e8 20 00 restore %g0, 0, %o0 40019c78 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 40019c78: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( block_table ); 40019c7c: 80 a6 20 00 cmp %i0, 0 40019c80: 32 80 00 08 bne,a 40019ca0 40019c84: e2 06 00 00 ld [ %i0 ], %l1 40019c88: 31 10 00 d6 sethi %hi(0x40035800), %i0 <== NOT EXECUTED 40019c8c: 35 10 00 d7 sethi %hi(0x40035c00), %i2 <== NOT EXECUTED 40019c90: b0 16 23 b0 or %i0, 0x3b0, %i0 <== NOT EXECUTED 40019c94: b4 16 a0 38 or %i2, 0x38, %i2 <== NOT EXECUTED 40019c98: 7f ff ab 8f call 40004ad4 <__assert> <== NOT EXECUTED 40019c9c: 93 e8 21 b1 restore %g0, 0x1b1, %o1 <== NOT EXECUTED /* * Now go through all the slots in the table and free the memory. */ b = *block_table; 40019ca0: a0 10 20 00 clr %l0 40019ca4: 10 80 00 09 b 40019cc8 40019ca8: b4 10 20 00 clr %i2 for ( i=0 ; i 40019cb4: a0 04 20 01 inc %l0 memfile_free_block( b[i] ); 40019cb8: 7f ff ff 1e call 40019930 40019cbc: 01 00 00 00 nop b[i] = 0; 40019cc0: c0 26 80 11 clr [ %i2 + %l1 ] * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 40019cd0: d0 06 80 11 ld [ %i2 + %l1 ], %o0 /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 40019cd4: 7f ff ff 17 call 40019930 40019cd8: d0 06 00 00 ld [ %i0 ], %o0 *block_table = 0; 40019cdc: c0 26 00 00 clr [ %i0 ] } 40019ce0: 81 c7 e0 08 ret 40019ce4: 81 e8 00 00 restore 4001a178 : int memfile_ftruncate( rtems_libio_t *iop, off_t length ) { 4001a178: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4001a17c: 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 ) 4001a180: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 4001a184: 80 a6 40 01 cmp %i1, %g1 4001a188: 04 80 00 06 ble 4001a1a0 4001a18c: 92 10 00 19 mov %i1, %o1 return IMFS_memfile_extend( the_jnode, length ); 4001a190: 7f ff ff a6 call 4001a028 <== NOT EXECUTED 4001a194: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } 4001a198: 81 c7 e0 08 ret <== NOT EXECUTED 4001a19c: 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; 4001a1a0: f2 24 20 4c st %i1, [ %l0 + 0x4c ] iop->size = the_jnode->info.file.size; 4001a1a4: f2 26 20 04 st %i1, [ %i0 + 4 ] IMFS_update_atime( the_jnode ); 4001a1a8: 90 07 bf f0 add %fp, -16, %o0 4001a1ac: 7f ff ab 05 call 40004dc0 4001a1b0: 92 10 20 00 clr %o1 4001a1b4: c2 07 bf f0 ld [ %fp + -16 ], %g1 4001a1b8: 90 10 20 00 clr %o0 4001a1bc: c2 24 20 3c st %g1, [ %l0 + 0x3c ] return 0; } 4001a1c0: b0 10 00 08 mov %o0, %i0 4001a1c4: 81 c7 e0 08 ret 4001a1c8: 81 e8 00 00 restore 4001a1cc : off_t memfile_lseek( rtems_libio_t *iop, off_t offset, int whence ) { 4001a1cc: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4001a1d0: e0 06 20 2c ld [ %i0 + 0x2c ], %l0 if (the_jnode->type == IMFS_LINEAR_FILE) { 4001a1d4: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4001a1d8: 80 a0 60 06 cmp %g1, 6 4001a1dc: 12 80 00 09 bne 4001a200 4001a1e0: d2 06 20 08 ld [ %i0 + 8 ], %o1 if (iop->offset > the_jnode->info.linearfile.size) 4001a1e4: d0 04 20 4c ld [ %l0 + 0x4c ], %o0 <== NOT EXECUTED 4001a1e8: 80 a2 40 08 cmp %o1, %o0 <== NOT EXECUTED 4001a1ec: 34 80 00 11 bg,a 4001a230 <== NOT EXECUTED 4001a1f0: d0 26 20 08 st %o0, [ %i0 + 8 ] <== NOT EXECUTED 4001a1f4: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 4001a1f8: 81 c7 e0 08 ret <== NOT EXECUTED 4001a1fc: 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 )) 4001a200: 7f ff ff 8a call 4001a028 4001a204: 90 10 00 10 mov %l0, %o0 4001a208: 80 a2 20 00 cmp %o0, 0 4001a20c: 22 80 00 08 be,a 4001a22c 4001a210: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 rtems_set_errno_and_return_minus_one( ENOSPC ); 4001a214: 40 00 22 36 call 40022aec <__errno> <== NOT EXECUTED 4001a218: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001a21c: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 4001a220: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001a224: 81 c7 e0 08 ret <== NOT EXECUTED 4001a228: 81 e8 00 00 restore <== NOT EXECUTED iop->size = the_jnode->info.file.size; 4001a22c: c2 26 20 04 st %g1, [ %i0 + 4 ] } return iop->offset; 4001a230: f0 06 20 08 ld [ %i0 + 8 ], %i0 } 4001a234: 81 c7 e0 08 ret 4001a238: 81 e8 00 00 restore 4001a4d4 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4001a4d4: 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)) 4001a4d8: c2 06 20 0c ld [ %i0 + 0xc ], %g1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4001a4dc: 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)) 4001a4e0: 80 88 62 04 btst 0x204, %g1 4001a4e4: 02 80 00 17 be 4001a540 4001a4e8: e0 06 20 2c ld [ %i0 + 0x2c ], %l0 4001a4ec: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4001a4f0: 80 a0 60 06 cmp %g1, 6 4001a4f4: 32 80 00 14 bne,a 4001a544 4001a4f8: c2 04 60 0c ld [ %l1 + 0xc ], %g1 && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; 4001a4fc: d6 04 20 4c ld [ %l0 + 0x4c ], %o3 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 4001a500: d4 04 20 50 ld [ %l0 + 0x50 ], %o2 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 4001a504: 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; 4001a508: 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; 4001a50c: 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; 4001a510: 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; 4001a514: 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) 4001a518: 80 a2 e0 00 cmp %o3, 0 <== NOT EXECUTED 4001a51c: 02 80 00 09 be 4001a540 <== NOT EXECUTED 4001a520: c2 24 20 48 st %g1, [ %l0 + 0x48 ] <== NOT EXECUTED 4001a524: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4001a528: 92 10 20 00 clr %o1 <== NOT EXECUTED 4001a52c: 7f ff ff 44 call 4001a23c <== NOT EXECUTED 4001a530: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001a534: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 4001a538: 02 80 00 0a be 4001a560 <== NOT EXECUTED 4001a53c: 01 00 00 00 nop <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 4001a540: c2 04 60 0c ld [ %l1 + 0xc ], %g1 4001a544: 80 88 62 00 btst 0x200, %g1 4001a548: 02 80 00 04 be 4001a558 4001a54c: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 iop->offset = the_jnode->info.file.size; 4001a550: c2 24 60 08 st %g1, [ %l1 + 8 ] iop->size = the_jnode->info.file.size; 4001a554: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 4001a558: b0 10 20 00 clr %i0 4001a55c: c2 24 60 04 st %g1, [ %l1 + 4 ] return 0; } 4001a560: 81 c7 e0 08 ret 4001a564: 81 e8 00 00 restore 4001a7e4 : ssize_t memfile_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4001a7e4: 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 ); 4001a7e8: d2 02 20 08 ld [ %o0 + 8 ], %o1 4001a7ec: d0 02 20 2c ld [ %o0 + 0x2c ], %o0 ssize_t memfile_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4001a7f0: 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 ); 4001a7f4: 94 10 00 01 mov %g1, %o2 4001a7f8: 82 13 c0 00 mov %o7, %g1 4001a7fc: 7f ff ff 5b call 4001a568 4001a800: 9e 10 40 00 mov %g1, %o7 4001a804: 01 00 00 00 nop <== NOT EXECUTED 40019ef0 : */ int memfile_rmnod( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 40019ef0: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 40019ef4: 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 ) { 40019ef8: c2 06 20 08 ld [ %i0 + 8 ], %g1 40019efc: 80 a0 60 00 cmp %g1, 0 40019f00: 22 80 00 06 be,a 40019f18 40019f04: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 <== NOT EXECUTED Chain_Extract( (Chain_Node *) the_jnode ); 40019f08: 7f ff fb 9d call 40018d7c <_Chain_Extract> 40019f0c: 90 10 00 18 mov %i0, %o0 the_jnode->Parent = NULL; 40019f10: c0 26 20 08 clr [ %i0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 40019f14: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 40019f18: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 40019f1c: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 40019f20: 90 07 bf f0 add %fp, -16, %o0 40019f24: 7f ff ab a7 call 40004dc0 40019f28: c2 36 20 30 sth %g1, [ %i0 + 0x30 ] 40019f2c: c2 07 bf f0 ld [ %fp + -16 ], %g1 return memfile_check_rmnod( the_jnode ); 40019f30: 90 10 00 18 mov %i0, %o0 40019f34: 7f ff ff d6 call 40019e8c 40019f38: c2 26 20 44 st %g1, [ %i0 + 0x44 ] } 40019f3c: 81 c7 e0 08 ret 40019f40: 91 e8 00 08 restore %g0, %o0, %o0 4000a788 : int miniIMFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { return IMFS_initialize_support( 4000a788: 13 10 00 64 sethi %hi(0x40019000), %o1 4000a78c: 15 10 00 67 sethi %hi(0x40019c00), %o2 4000a790: 92 12 61 1c or %o1, 0x11c, %o1 4000a794: 94 12 a0 04 or %o2, 4, %o2 4000a798: 96 10 00 0a mov %o2, %o3 4000a79c: 82 13 c0 00 mov %o7, %g1 4000a7a0: 40 00 02 6b call 4000b14c 4000a7a4: 9e 10 40 00 mov %g1, %o7 4000a7a8: 01 00 00 00 nop <== NOT EXECUTED 400025b0 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 400025b0: 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) ) ) 400025b4: 03 00 00 3c sethi %hi(0xf000), %g1 400025b8: b3 2e 60 10 sll %i1, 0x10, %i1 400025bc: b3 36 60 10 srl %i1, 0x10, %i1 400025c0: 84 8e 40 01 andcc %i1, %g1, %g2 400025c4: 32 80 00 06 bne,a 400025dc 400025c8: 03 00 00 04 sethi %hi(0x1000), %g1 rtems_set_errno_and_return_minus_one( EINVAL ); 400025cc: 40 00 2e d4 call 4000e11c <__errno> <== NOT EXECUTED 400025d0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400025d4: 10 80 00 35 b 400026a8 <== NOT EXECUTED 400025d8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED if ( S_ISFIFO(mode) ) 400025dc: 80 a0 80 01 cmp %g2, %g1 400025e0: 02 80 00 2f be 4000269c 400025e4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 400025e8: c2 4e 00 00 ldsb [ %i0 ], %g1 400025ec: 80 a0 60 2f cmp %g1, 0x2f 400025f0: 02 80 00 06 be 40002608 400025f4: 80 a0 60 5c cmp %g1, 0x5c 400025f8: 02 80 00 04 be 40002608 400025fc: 80 a0 60 00 cmp %g1, 0 40002600: 12 80 00 0a bne 40002628 40002604: 03 10 00 64 sethi %hi(0x40019000), %g1 40002608: 03 10 00 64 sethi %hi(0x40019000), %g1 4000260c: d2 00 61 e0 ld [ %g1 + 0x1e0 ], %o1 ! 400191e0 40002610: 90 07 bf e4 add %fp, -28, %o0 40002614: 92 02 60 14 add %o1, 0x14, %o1 40002618: 40 00 30 96 call 4000e870 4000261c: 94 10 20 10 mov 0x10, %o2 40002620: 10 80 00 08 b 40002640 40002624: 84 10 20 01 mov 1, %g2 40002628: d2 00 61 e0 ld [ %g1 + 0x1e0 ], %o1 4000262c: 90 07 bf e4 add %fp, -28, %o0 40002630: 92 02 60 04 add %o1, 4, %o1 40002634: 40 00 30 8f call 4000e870 40002638: 94 10 20 10 mov 0x10, %o2 4000263c: 84 10 20 00 clr %g2 if ( !temp_loc.ops->evalformake_h ) { 40002640: c2 07 bf ec ld [ %fp + -20 ], %g1 40002644: c2 00 60 04 ld [ %g1 + 4 ], %g1 40002648: 80 a0 60 00 cmp %g1, 0 4000264c: 02 80 00 14 be 4000269c 40002650: 90 06 00 02 add %i0, %g2, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 40002654: a0 07 bf e4 add %fp, -28, %l0 40002658: 94 07 bf f4 add %fp, -12, %o2 4000265c: 92 10 00 10 mov %l0, %o1 40002660: 9f c0 40 00 call %g1 40002664: b0 10 3f ff mov -1, %i0 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 40002668: 80 a2 20 00 cmp %o0, 0 4000266c: 12 80 00 10 bne 400026ac 40002670: c2 07 bf ec ld [ %fp + -20 ], %g1 return -1; if ( !temp_loc.ops->mknod_h ) { 40002674: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 40002678: 80 a0 a0 00 cmp %g2, 0 4000267c: 12 80 00 0e bne 400026b4 40002680: d0 07 bf f4 ld [ %fp + -12 ], %o0 rtems_filesystem_freenode( &temp_loc ); 40002684: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40002688: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000268c: 02 80 00 04 be 4000269c <== NOT EXECUTED 40002690: 01 00 00 00 nop <== NOT EXECUTED 40002694: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002698: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000269c: 40 00 2e a0 call 4000e11c <__errno> 400026a0: b0 10 3f ff mov -1, %i0 400026a4: 82 10 20 86 mov 0x86, %g1 400026a8: c2 22 00 00 st %g1, [ %o0 ] 400026ac: 81 c7 e0 08 ret 400026b0: 81 e8 00 00 restore } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 400026b4: 92 10 00 19 mov %i1, %o1 400026b8: 94 10 00 1a mov %i2, %o2 400026bc: 96 10 00 1b mov %i3, %o3 400026c0: 9f c0 80 00 call %g2 400026c4: 98 10 00 10 mov %l0, %o4 rtems_filesystem_freenode( &temp_loc ); 400026c8: c2 07 bf ec ld [ %fp + -20 ], %g1 400026cc: 80 a0 60 00 cmp %g1, 0 400026d0: 02 bf ff f7 be 400026ac 400026d4: b0 10 00 08 mov %o0, %i0 400026d8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400026dc: 80 a0 60 00 cmp %g1, 0 400026e0: 02 80 00 04 be 400026f0 400026e4: 01 00 00 00 nop 400026e8: 9f c0 40 00 call %g1 400026ec: 90 10 00 10 mov %l0, %o0 return result; } 400026f0: 81 c7 e0 08 ret 400026f4: 81 e8 00 00 restore 4000badc : rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, char *device, char *mount_point ) { 4000badc: 9d e3 bf 88 save %sp, -120, %sp /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 4000bae0: 80 a6 60 00 cmp %i1, 0 4000bae4: 02 80 00 05 be 4000baf8 4000bae8: a2 10 00 18 mov %i0, %l1 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 4000baec: 80 a6 a0 01 cmp %i2, 1 4000baf0: 28 80 00 06 bleu,a 4000bb08 4000baf4: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 4000baf8: 40 00 09 89 call 4000e11c <__errno> 4000bafc: 01 00 00 00 nop 4000bb00: 10 80 00 17 b 4000bb5c 4000bb04: 82 10 20 16 mov 0x16, %g1 ! 16 return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 4000bb08: 80 a0 60 00 cmp %g1, 0 4000bb0c: 12 80 00 07 bne 4000bb28 4000bb10: 80 a6 e0 00 cmp %i3, 0 errno = ENOTSUP; 4000bb14: 40 00 09 82 call 4000e11c <__errno> <== NOT EXECUTED 4000bb18: b4 10 20 00 clr %i2 <== NOT EXECUTED 4000bb1c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000bb20: 10 80 00 77 b 4000bcfc <== NOT EXECUTED 4000bb24: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 4000bb28: 02 80 00 05 be 4000bb3c 4000bb2c: 90 10 20 64 mov 0x64, %o0 size += strlen( device ) + 1; 4000bb30: 40 00 0e 59 call 4000f494 <== NOT EXECUTED 4000bb34: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 4000bb38: 90 02 20 65 add %o0, 0x65, %o0 <== NOT EXECUTED temp_mt_entry = malloc( size ); 4000bb3c: 7f ff d9 c4 call 4000224c 4000bb40: 01 00 00 00 nop if ( !temp_mt_entry ) { 4000bb44: a0 92 20 00 orcc %o0, 0, %l0 4000bb48: 32 80 00 07 bne,a 4000bb64 4000bb4c: f4 24 20 28 st %i2, [ %l0 + 0x28 ] errno = ENOMEM; 4000bb50: 40 00 09 73 call 4000e11c <__errno> <== NOT EXECUTED 4000bb54: 01 00 00 00 nop <== NOT EXECUTED 4000bb58: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 4000bb5c: 10 80 00 78 b 4000bd3c 4000bb60: c2 22 00 00 st %g1, [ %o0 ] return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; 4000bb64: e0 24 20 24 st %l0, [ %l0 + 0x24 ] temp_mt_entry->options = options; if ( device ) { 4000bb68: 80 a6 e0 00 cmp %i3, 0 4000bb6c: 02 80 00 08 be 4000bb8c 4000bb70: b4 10 00 10 mov %l0, %i2 temp_mt_entry->dev = 4000bb74: 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 ); 4000bb78: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 4000bb7c: 40 00 0e 26 call 4000f414 <== NOT EXECUTED 4000bb80: 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 ) { 4000bb84: 10 80 00 04 b 4000bb94 <== NOT EXECUTED 4000bb88: 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; 4000bb8c: 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 ) { 4000bb90: 80 a7 20 00 cmp %i4, 0 4000bb94: 02 80 00 3b be 4000bc80 4000bb98: 90 10 00 1c mov %i4, %o0 if ( rtems_filesystem_evaluate_path( 4000bb9c: 92 10 20 07 mov 7, %o1 4000bba0: b8 07 bf e8 add %fp, -24, %i4 4000bba4: 96 10 20 01 mov 1, %o3 4000bba8: 7f ff d8 fb call 40001f94 4000bbac: 94 10 00 1c mov %i4, %o2 4000bbb0: 80 a2 3f ff cmp %o0, -1 4000bbb4: 02 80 00 52 be 4000bcfc 4000bbb8: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 4000bbbc: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 4000bbc0: 80 a0 60 00 cmp %g1, 0 4000bbc4: 12 80 00 06 bne 4000bbdc 4000bbc8: 01 00 00 00 nop errno = ENOTSUP; 4000bbcc: 40 00 09 54 call 4000e11c <__errno> <== NOT EXECUTED 4000bbd0: 01 00 00 00 nop <== NOT EXECUTED * 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; 4000bbd4: 10 80 00 0a b 4000bbfc <== NOT EXECUTED 4000bbd8: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 4000bbdc: 9f c0 40 00 call %g1 4000bbe0: 90 10 00 1c mov %i4, %o0 4000bbe4: 80 a2 20 01 cmp %o0, 1 4000bbe8: 02 80 00 07 be 4000bc04 4000bbec: 03 10 00 69 sethi %hi(0x4001a400), %g1 errno = ENOTDIR; 4000bbf0: 40 00 09 4b call 4000e11c <__errno> 4000bbf4: 01 00 00 00 nop 4000bbf8: 82 10 20 14 mov 0x14, %g1 ! 14 4000bbfc: 10 80 00 41 b 4000bd00 4000bc00: c2 22 00 00 st %g1, [ %o0 ] for ( the_node = rtems_filesystem_mount_table_control.first; !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 ) 4000bc04: c8 07 bf e8 ld [ %fp + -24 ], %g4 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 4000bc08: c4 00 60 a8 ld [ %g1 + 0xa8 ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000bc0c: 03 10 00 69 sethi %hi(0x4001a400), %g1 4000bc10: 10 80 00 06 b 4000bc28 4000bc14: 86 10 60 ac or %g1, 0xac, %g3 ! 4001a4ac !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 ) 4000bc18: 80 a0 40 04 cmp %g1, %g4 4000bc1c: 02 80 00 08 be 4000bc3c 4000bc20: 01 00 00 00 nop * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; !Chain_Is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 4000bc24: c4 00 80 00 ld [ %g2 ], %g2 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; !Chain_Is_tail( &rtems_filesystem_mount_table_control, the_node ); 4000bc28: 80 a0 80 03 cmp %g2, %g3 4000bc2c: 32 bf ff fb bne,a 4000bc18 4000bc30: 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; 4000bc34: 10 80 00 44 b 4000bd44 4000bc38: 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; 4000bc3c: 40 00 09 38 call 4000e11c <__errno> 4000bc40: b8 07 bf e8 add %fp, -24, %i4 4000bc44: 10 bf ff ee b 4000bbfc 4000bc48: 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; 4000bc4c: 40 00 09 34 call 4000e11c <__errno> <== NOT EXECUTED 4000bc50: b8 07 bf e8 add %fp, -24, %i4 <== NOT EXECUTED 4000bc54: 10 bf ff ea b 4000bbfc <== NOT EXECUTED 4000bc58: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 4000bc5c: 9f c0 c0 00 call %g3 4000bc60: 90 10 00 10 mov %l0, %o0 4000bc64: 80 a2 20 00 cmp %o0, 0 4000bc68: 02 80 00 04 be 4000bc78 4000bc6c: 90 07 bf e8 add %fp, -24, %o0 4000bc70: 10 80 00 24 b 4000bd00 <== NOT EXECUTED 4000bc74: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED 4000bc78: 10 80 00 0a b 4000bca0 4000bc7c: 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; 4000bc80: c0 24 20 18 clr [ %l0 + 0x18 ] temp_mt_entry->mt_fs_root.handlers = NULL; 4000bc84: c0 24 20 1c clr [ %l0 + 0x1c ] temp_mt_entry->mt_fs_root.ops = NULL; 4000bc88: c0 24 20 20 clr [ %l0 + 0x20 ] temp_mt_entry->mt_point_node.node_access = NULL; 4000bc8c: c0 24 20 08 clr [ %l0 + 8 ] temp_mt_entry->mt_point_node.handlers = NULL; 4000bc90: c0 24 20 0c clr [ %l0 + 0xc ] temp_mt_entry->mt_point_node.ops = NULL; 4000bc94: c0 24 20 10 clr [ %l0 + 0x10 ] temp_mt_entry->mt_point_node.mt_entry = NULL; 4000bc98: c0 24 20 14 clr [ %l0 + 0x14 ] 4000bc9c: b8 10 20 00 clr %i4 } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 4000bca0: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 4000bca4: 9f c0 40 00 call %g1 4000bca8: 90 10 00 10 mov %l0, %o0 4000bcac: 80 a2 20 00 cmp %o0, 0 4000bcb0: 02 80 00 09 be 4000bcd4 4000bcb4: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 4000bcb8: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 <== NOT EXECUTED 4000bcbc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000bcc0: 02 80 00 10 be 4000bd00 <== NOT EXECUTED 4000bcc4: 01 00 00 00 nop <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 4000bcc8: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000bccc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000bcd0: 30 80 00 0c b,a 4000bd00 <== NOT EXECUTED /* * Add the mount table entry to the mount table chain */ Chain_Append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); 4000bcd4: 11 10 00 69 sethi %hi(0x4001a400), %o0 4000bcd8: 92 10 00 10 mov %l0, %o1 4000bcdc: 7f ff ea cf call 40006818 <_Chain_Append> 4000bce0: 90 12 20 a8 or %o0, 0xa8, %o0 if ( mt_entry ) 4000bce4: 80 a4 60 00 cmp %l1, 0 4000bce8: 02 80 00 03 be 4000bcf4 4000bcec: b0 10 20 00 clr %i0 *mt_entry = temp_mt_entry; 4000bcf0: e0 24 40 00 st %l0, [ %l1 ] 4000bcf4: 81 c7 e0 08 ret 4000bcf8: 81 e8 00 00 restore 4000bcfc: b8 10 20 00 clr %i4 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 4000bd00: 7f ff d9 2b call 400021ac 4000bd04: 90 10 00 1a mov %i2, %o0 if ( loc_to_free ) 4000bd08: 80 a7 20 00 cmp %i4, 0 4000bd0c: 02 80 00 0c be 4000bd3c 4000bd10: 01 00 00 00 nop rtems_filesystem_freenode( loc_to_free ); 4000bd14: c2 07 20 08 ld [ %i4 + 8 ], %g1 4000bd18: 80 a0 60 00 cmp %g1, 0 4000bd1c: 02 80 00 08 be 4000bd3c 4000bd20: 01 00 00 00 nop 4000bd24: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000bd28: 80 a0 60 00 cmp %g1, 0 4000bd2c: 02 80 00 04 be 4000bd3c 4000bd30: 01 00 00 00 nop 4000bd34: 9f c0 40 00 call %g1 4000bd38: 90 10 00 1c mov %i4, %o0 4000bd3c: 81 c7 e0 08 ret 4000bd40: 91 e8 3f ff restore %g0, -1, %o0 * 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; 4000bd44: 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; 4000bd48: 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; 4000bd4c: 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 ){ 4000bd50: 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; 4000bd54: 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; 4000bd58: 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 ){ 4000bd5c: 80 a0 e0 00 cmp %g3, 0 4000bd60: 12 bf ff bf bne 4000bc5c 4000bd64: c2 24 20 10 st %g1, [ %l0 + 0x10 ] 4000bd68: 30 bf ff b9 b,a 4000bc4c <== NOT EXECUTED 40009828 : */ int mq_close( mqd_t mqdes ) { 40009828: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) 4000982c: 21 10 00 94 sethi %hi(0x40025000), %l0 40009830: 92 10 00 18 mov %i0, %o1 40009834: 94 07 bf f4 add %fp, -12, %o2 40009838: 40 00 12 6f call 4000e1f4 <_Objects_Get> 4000983c: 90 14 22 50 or %l0, 0x250, %o0 POSIX_Message_queue_Control *the_mq; POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 40009840: c2 07 bf f4 ld [ %fp + -12 ], %g1 40009844: 80 a0 60 01 cmp %g1, 1 40009848: 02 80 00 0e be 40009880 4000984c: b0 10 00 08 mov %o0, %i0 40009850: 80 a0 60 01 cmp %g1, 1 40009854: 2a 80 00 11 bcs,a 40009898 40009858: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 4000985c: 80 a0 60 02 cmp %g1, 2 40009860: 12 80 00 2f bne 4000991c 40009864: 01 00 00 00 nop case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); 40009868: 40 00 2e 9a call 400152d0 <__errno> 4000986c: 01 00 00 00 nop 40009870: 82 10 20 09 mov 9, %g1 ! 9 40009874: c2 22 00 00 st %g1, [ %o0 ] 40009878: 10 80 00 2b b 40009924 4000987c: 90 10 3f ff mov -1, %o0 case OBJECTS_REMOTE: _Thread_Dispatch(); 40009880: 40 00 17 12 call 4000f4c8 <_Thread_Dispatch> <== NOT EXECUTED 40009884: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 40009888: 40 00 07 53 call 4000b5d4 <== NOT EXECUTED 4000988c: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40009890: 81 c7 e0 08 ret <== NOT EXECUTED 40009894: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED * being disassociated. This may result in the queue being really * deleted. */ the_mq = the_mq_fd->Queue; the_mq->open_count -= 1; 40009898: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 _POSIX_Message_queue_Delete( the_mq ); 4000989c: 90 10 00 02 mov %g2, %o0 * being disassociated. This may result in the queue being really * deleted. */ the_mq = the_mq_fd->Queue; the_mq->open_count -= 1; 400098a0: 82 00 7f ff add %g1, -1, %g1 _POSIX_Message_queue_Delete( the_mq ); 400098a4: 40 00 00 23 call 40009930 <_POSIX_Message_queue_Delete> 400098a8: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400098ac: 90 14 22 50 or %l0, 0x250, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 400098b0: c4 06 20 08 ld [ %i0 + 8 ], %g2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400098b4: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 400098b8: 03 00 00 3f sethi %hi(0xfc00), %g1 400098bc: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400098c0: 82 08 80 01 and %g2, %g1, %g1 400098c4: 80 a0 40 03 cmp %g1, %g3 400098c8: 38 80 00 06 bgu,a 400098e0 400098cc: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 400098d0: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 400098d4: 83 28 60 02 sll %g1, 2, %g1 400098d8: c0 20 80 01 clr [ %g2 + %g1 ] uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 400098dc: c0 26 20 0c clr [ %i0 + 0xc ] RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); 400098e0: 40 00 12 03 call 4000e0ec <_Objects_Free> 400098e4: 92 10 00 18 mov %i0, %o1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400098e8: 03 10 00 93 sethi %hi(0x40024c00), %g1 400098ec: c4 00 60 80 ld [ %g1 + 0x80 ], %g2 ! 40024c80 <_Thread_Dispatch_disable_level> 400098f0: 90 10 20 00 clr %o0 400098f4: 84 00 bf ff add %g2, -1, %g2 400098f8: c4 20 60 80 st %g2, [ %g1 + 0x80 ] 400098fc: c2 00 60 80 ld [ %g1 + 0x80 ], %g1 40009900: 80 a0 60 00 cmp %g1, 0 40009904: 32 80 00 09 bne,a 40009928 40009908: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED _Thread_Dispatch(); 4000990c: 40 00 16 ef call 4000f4c8 <_Thread_Dispatch> 40009910: 01 00 00 00 nop 40009914: 10 80 00 04 b 40009924 40009918: 90 10 20 00 clr %o0 ! 0 _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 4000991c: 40 00 07 24 call 4000b5ac <== NOT EXECUTED 40009920: 01 00 00 00 nop <== NOT EXECUTED } 40009924: b0 10 00 08 mov %o0, %i0 40009928: 81 c7 e0 08 ret 4000992c: 81 e8 00 00 restore 400099c0 : int mq_getattr( mqd_t mqdes, struct mq_attr *mqstat ) { 400099c0: 9d e3 bf 90 save %sp, -112, %sp POSIX_Message_queue_Control *the_mq; POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; CORE_message_queue_Attributes *the_mq_attr; if ( !mqstat ) 400099c4: 80 a6 60 00 cmp %i1, 0 400099c8: 12 80 00 06 bne 400099e0 400099cc: 92 10 00 18 mov %i0, %o1 rtems_set_errno_and_return_minus_one( EINVAL ); 400099d0: 40 00 2e 40 call 400152d0 <__errno> 400099d4: 01 00 00 00 nop 400099d8: 10 80 00 12 b 40009a20 400099dc: 82 10 20 16 mov 0x16, %g1 ! 16 RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) 400099e0: 11 10 00 94 sethi %hi(0x40025000), %o0 400099e4: 94 07 bf f4 add %fp, -12, %o2 400099e8: 40 00 12 03 call 4000e1f4 <_Objects_Get> 400099ec: 90 12 22 50 or %o0, 0x250, %o0 the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 400099f0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400099f4: 80 a0 60 01 cmp %g1, 1 400099f8: 02 80 00 0d be 40009a2c 400099fc: 01 00 00 00 nop 40009a00: 2a 80 00 11 bcs,a 40009a44 40009a04: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 40009a08: 80 a0 60 02 cmp %g1, 2 40009a0c: 12 80 00 23 bne 40009a98 40009a10: 01 00 00 00 nop case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); 40009a14: 40 00 2e 2f call 400152d0 <__errno> 40009a18: 01 00 00 00 nop 40009a1c: 82 10 20 09 mov 9, %g1 ! 9 40009a20: c2 22 00 00 st %g1, [ %o0 ] 40009a24: 10 80 00 1f b 40009aa0 40009a28: 90 10 3f ff mov -1, %o0 case OBJECTS_REMOTE: _Thread_Dispatch(); 40009a2c: 40 00 16 a7 call 4000f4c8 <_Thread_Dispatch> <== NOT EXECUTED 40009a30: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 40009a34: 40 00 06 e8 call 4000b5d4 <== NOT EXECUTED 40009a38: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40009a3c: 81 c7 e0 08 ret <== NOT EXECUTED 40009a40: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED * Return the old values. */ the_mq_attr = &the_mq->Message_queue.Attributes; mqstat->mq_flags = the_mq_fd->oflag; 40009a44: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 40009a48: c2 26 40 00 st %g1, [ %i1 ] mqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size; 40009a4c: c2 00 a0 6c ld [ %g2 + 0x6c ], %g1 40009a50: c2 26 60 08 st %g1, [ %i1 + 8 ] mqstat->mq_maxmsg = the_mq->Message_queue.maximum_pending_messages; 40009a54: c2 00 a0 64 ld [ %g2 + 0x64 ], %g1 40009a58: c2 26 60 04 st %g1, [ %i1 + 4 ] mqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages; 40009a5c: c2 00 a0 68 ld [ %g2 + 0x68 ], %g1 40009a60: c2 26 60 0c st %g1, [ %i1 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40009a64: 05 10 00 93 sethi %hi(0x40024c00), %g2 40009a68: c2 00 a0 80 ld [ %g2 + 0x80 ], %g1 ! 40024c80 <_Thread_Dispatch_disable_level> 40009a6c: 90 10 20 00 clr %o0 40009a70: 82 00 7f ff add %g1, -1, %g1 40009a74: c2 20 a0 80 st %g1, [ %g2 + 0x80 ] 40009a78: c2 00 a0 80 ld [ %g2 + 0x80 ], %g1 40009a7c: 80 a0 60 00 cmp %g1, 0 40009a80: 32 80 00 09 bne,a 40009aa4 40009a84: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED _Thread_Dispatch(); 40009a88: 40 00 16 90 call 4000f4c8 <_Thread_Dispatch> 40009a8c: 01 00 00 00 nop 40009a90: 10 80 00 04 b 40009aa0 40009a94: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40009a98: 40 00 06 c5 call 4000b5ac <== NOT EXECUTED 40009a9c: 01 00 00 00 nop <== NOT EXECUTED } 40009aa0: b0 10 00 08 mov %o0, %i0 40009aa4: 81 c7 e0 08 ret 40009aa8: 81 e8 00 00 restore 40009b04 : int mq_notify( mqd_t mqdes, const struct sigevent *notification ) { 40009b04: 9d e3 bf 90 save %sp, -112, %sp 40009b08: 11 10 00 94 sethi %hi(0x40025000), %o0 40009b0c: 92 10 00 18 mov %i0, %o1 40009b10: 90 12 22 50 or %o0, 0x250, %o0 40009b14: 40 00 11 b8 call 4000e1f4 <_Objects_Get> 40009b18: 94 07 bf f4 add %fp, -12, %o2 POSIX_Message_queue_Control *the_mq; POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 40009b1c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40009b20: 80 a0 60 01 cmp %g1, 1 40009b24: 02 80 00 0c be 40009b54 40009b28: 92 10 00 19 mov %i1, %o1 40009b2c: 80 a0 60 01 cmp %g1, 1 40009b30: 0a 80 00 0f bcs 40009b6c 40009b34: 80 a6 60 00 cmp %i1, 0 40009b38: 80 a0 60 02 cmp %g1, 2 40009b3c: 12 80 00 29 bne 40009be0 40009b40: 01 00 00 00 nop case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); 40009b44: 40 00 2d e3 call 400152d0 <__errno> 40009b48: 01 00 00 00 nop 40009b4c: 10 80 00 13 b 40009b98 40009b50: 82 10 20 09 mov 9, %g1 ! 9 case OBJECTS_REMOTE: _Thread_Dispatch(); 40009b54: 40 00 16 5d call 4000f4c8 <_Thread_Dispatch> <== NOT EXECUTED 40009b58: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 40009b5c: 40 00 06 9e call 4000b5d4 <== NOT EXECUTED 40009b60: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40009b64: 81 c7 e0 08 ret <== NOT EXECUTED 40009b68: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: the_mq = the_mq_fd->Queue; if ( notification ) { 40009b6c: 02 80 00 17 be 40009bc8 40009b70: f0 02 20 10 ld [ %o0 + 0x10 ], %i0 if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) { 40009b74: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 40009b78: 80 a0 60 00 cmp %g1, 0 40009b7c: 22 80 00 0a be,a 40009ba4 40009b80: c0 26 20 80 clr [ %i0 + 0x80 ] _Thread_Enable_dispatch(); 40009b84: 7f ff ff ca call 40009aac <_Thread_Enable_dispatch> 40009b88: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBUSY ); 40009b8c: 40 00 2d d1 call 400152d0 <__errno> 40009b90: 01 00 00 00 nop 40009b94: 82 10 20 10 mov 0x10, %g1 ! 10 40009b98: c2 22 00 00 st %g1, [ %o0 ] 40009b9c: 10 80 00 13 b 40009be8 40009ba0: 90 10 3f ff mov -1, %o0 the_message_queue->notify_argument = the_argument; 40009ba4: c0 26 20 84 clr [ %i0 + 0x84 ] } _CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL ); the_mq->notification = *notification; 40009ba8: 90 06 20 94 add %i0, 0x94, %o0 40009bac: 40 00 2f af call 40015a68 40009bb0: 94 10 20 14 mov 0x14, %o2 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 40009bb4: 03 10 00 26 sethi %hi(0x40009800), %g1 the_message_queue->notify_argument = the_argument; 40009bb8: f0 26 20 84 st %i0, [ %i0 + 0x84 ] CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 40009bbc: 82 10 62 e0 or %g1, 0x2e0, %g1 40009bc0: 10 80 00 04 b 40009bd0 40009bc4: c2 26 20 80 st %g1, [ %i0 + 0x80 ] the_message_queue->notify_argument = the_argument; 40009bc8: c0 26 20 84 clr [ %i0 + 0x84 ] CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 40009bcc: c0 26 20 80 clr [ %i0 + 0x80 ] _CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL ); } _Thread_Enable_dispatch(); 40009bd0: 7f ff ff b7 call 40009aac <_Thread_Enable_dispatch> 40009bd4: 01 00 00 00 nop 40009bd8: 10 80 00 04 b 40009be8 40009bdc: 90 10 20 00 clr %o0 ! 0 return 0; } return POSIX_BOTTOM_REACHED(); 40009be0: 40 00 06 73 call 4000b5ac <== NOT EXECUTED 40009be4: 01 00 00 00 nop <== NOT EXECUTED } 40009be8: b0 10 00 08 mov %o0, %i0 40009bec: 81 c7 e0 08 ret 40009bf0: 81 e8 00 00 restore 40009c74 : int oflag, ... /* mode_t mode, */ /* struct mq_attr attr */ ) { 40009c74: 9d e3 bf 88 save %sp, -120, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40009c78: 05 10 00 93 sethi %hi(0x40024c00), %g2 40009c7c: c2 00 a0 80 ld [ %g2 + 0x80 ], %g1 ! 40024c80 <_Thread_Dispatch_disable_level> 40009c80: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 40009c84: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 40009c88: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 40009c8c: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 40009c90: 82 00 60 01 inc %g1 40009c94: a0 10 00 18 mov %i0, %l0 40009c98: c2 20 a0 80 st %g1, [ %g2 + 0x80 ] POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 40009c9c: b6 8e 62 00 andcc %i1, 0x200, %i3 40009ca0: 02 80 00 05 be 40009cb4 40009ca4: b4 10 20 00 clr %i2 va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); 40009ca8: f4 07 a0 50 ld [ %fp + 0x50 ], %i2 40009cac: 82 07 a0 54 add %fp, 0x54, %g1 40009cb0: c2 27 bf f4 st %g1, [ %fp + -12 ] */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *) 40009cb4: 39 10 00 94 sethi %hi(0x40025000), %i4 40009cb8: 40 00 10 0b call 4000dce4 <_Objects_Allocate> 40009cbc: 90 17 22 50 or %i4, 0x250, %o0 ! 40025250 <_POSIX_Message_queue_Information_fds> va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { 40009cc0: b0 92 20 00 orcc %o0, 0, %i0 40009cc4: 32 80 00 08 bne,a 40009ce4 40009cc8: f2 26 20 14 st %i1, [ %i0 + 0x14 ] _Thread_Enable_dispatch(); 40009ccc: 7f ff ff dd call 40009c40 <_Thread_Enable_dispatch> 40009cd0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENFILE ); 40009cd4: 40 00 2d 7f call 400152d0 <__errno> 40009cd8: 01 00 00 00 nop 40009cdc: 10 80 00 20 b 40009d5c 40009ce0: 82 10 20 17 mov 0x17, %g1 ! 17 } the_mq_fd->oflag = oflag; status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 40009ce4: 90 10 00 10 mov %l0, %o0 40009ce8: 40 00 23 84 call 40012af8 <_POSIX_Message_queue_Name_to_id> 40009cec: 92 07 bf f0 add %fp, -16, %o1 * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "message queue does not exist" * or some other miscellaneous error on the name. */ if ( status ) { 40009cf0: ba 92 20 00 orcc %o0, 0, %i5 40009cf4: 02 80 00 10 be 40009d34 40009cf8: 82 0e 6a 00 and %i1, 0xa00, %g1 /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { 40009cfc: 80 a7 60 02 cmp %i5, 2 40009d00: 12 80 00 04 bne 40009d10 40009d04: 80 a6 e0 00 cmp %i3, 0 40009d08: 12 80 00 2c bne 40009db8 40009d0c: 90 10 00 10 mov %l0, %o0 _POSIX_Message_queue_Free_fd( the_mq_fd ); 40009d10: 7f ff ff c5 call 40009c24 <_POSIX_Message_queue_Free_fd> 40009d14: 90 10 00 18 mov %i0, %o0 _Thread_Enable_dispatch(); 40009d18: 7f ff ff ca call 40009c40 <_Thread_Enable_dispatch> 40009d1c: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); 40009d20: 40 00 2d 6c call 400152d0 <__errno> 40009d24: 01 00 00 00 nop 40009d28: fa 22 00 00 st %i5, [ %o0 ] 40009d2c: 81 c7 e0 08 ret 40009d30: 81 e8 00 00 restore /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 40009d34: 80 a0 6a 00 cmp %g1, 0xa00 40009d38: 12 80 00 0b bne 40009d64 40009d3c: d2 07 bf f0 ld [ %fp + -16 ], %o1 _POSIX_Message_queue_Free_fd( the_mq_fd ); 40009d40: 7f ff ff b9 call 40009c24 <_POSIX_Message_queue_Free_fd> 40009d44: 90 10 00 18 mov %i0, %o0 _Thread_Enable_dispatch(); 40009d48: 7f ff ff be call 40009c40 <_Thread_Enable_dispatch> 40009d4c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); 40009d50: 40 00 2d 60 call 400152d0 <__errno> 40009d54: 01 00 00 00 nop 40009d58: 82 10 20 11 mov 0x11, %g1 ! 11 40009d5c: 10 80 00 22 b 40009de4 40009d60: c2 22 00 00 st %g1, [ %o0 ] RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control *) 40009d64: 94 07 bf e8 add %fp, -24, %o2 <== NOT EXECUTED 40009d68: 11 10 00 94 sethi %hi(0x40025000), %o0 <== NOT EXECUTED 40009d6c: 40 00 11 22 call 4000e1f4 <_Objects_Get> <== NOT EXECUTED 40009d70: 90 12 20 98 or %o0, 0x98, %o0 ! 40025098 <_POSIX_Message_queue_Information> <== NOT EXECUTED * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); the_mq->open_count += 1; 40009d74: c4 02 20 1c ld [ %o0 + 0x1c ], %g2 <== NOT EXECUTED 40009d78: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED the_mq_fd->Queue = the_mq; _Objects_Open( 40009d7c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED /* * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); 40009d80: c2 27 bf ec st %g1, [ %fp + -20 ] <== NOT EXECUTED the_mq->open_count += 1; 40009d84: 84 00 a0 01 inc %g2 <== NOT EXECUTED the_mq_fd->Queue = the_mq; _Objects_Open( 40009d88: 90 17 22 50 or %i4, 0x250, %o0 <== NOT EXECUTED 40009d8c: 94 10 20 00 clr %o2 <== NOT EXECUTED * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); the_mq->open_count += 1; the_mq_fd->Queue = the_mq; 40009d90: c2 26 20 10 st %g1, [ %i0 + 0x10 ] <== NOT EXECUTED _Objects_Open( 40009d94: 7f ff ff 98 call 40009bf4 <_Objects_Open> <== NOT EXECUTED 40009d98: c4 20 60 1c st %g2, [ %g1 + 0x1c ] <== NOT EXECUTED &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 40009d9c: 7f ff ff a9 call 40009c40 <_Thread_Enable_dispatch> <== NOT EXECUTED 40009da0: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); 40009da4: 7f ff ff a7 call 40009c40 <_Thread_Enable_dispatch> <== NOT EXECUTED 40009da8: 01 00 00 00 nop <== NOT EXECUTED return (mqd_t)the_mq_fd->Object.id; 40009dac: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 40009db0: 81 c7 e0 08 ret <== NOT EXECUTED 40009db4: 81 e8 00 00 restore <== NOT EXECUTED /* * At this point, the message queue does not exist and everything has been * checked. We should go ahead and create a message queue. */ status = _POSIX_Message_queue_Create_support( 40009db8: 94 10 00 1a mov %i2, %o2 40009dbc: 92 10 20 01 mov 1, %o1 40009dc0: 40 00 22 e2 call 40012948 <_POSIX_Message_queue_Create_support> 40009dc4: 96 07 bf ec add %fp, -20, %o3 /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { 40009dc8: 80 a2 3f ff cmp %o0, -1 40009dcc: 12 80 00 08 bne 40009dec 40009dd0: c2 07 bf ec ld [ %fp + -20 ], %g1 _Thread_Enable_dispatch(); 40009dd4: 7f ff ff 9b call 40009c40 <_Thread_Enable_dispatch> 40009dd8: 01 00 00 00 nop _POSIX_Message_queue_Free_fd( the_mq_fd ); 40009ddc: 7f ff ff 92 call 40009c24 <_POSIX_Message_queue_Free_fd> 40009de0: 90 10 00 18 mov %i0, %o0 40009de4: 81 c7 e0 08 ret 40009de8: 91 e8 3f ff restore %g0, -1, %o0 return (mqd_t) -1; } the_mq_fd->Queue = the_mq; _Objects_Open( 40009dec: 92 10 00 18 mov %i0, %o1 40009df0: 90 17 22 50 or %i4, 0x250, %o0 40009df4: 94 10 20 00 clr %o2 40009df8: 7f ff ff 7f call 40009bf4 <_Objects_Open> 40009dfc: c2 26 20 10 st %g1, [ %i0 + 0x10 ] &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 40009e00: 7f ff ff 90 call 40009c40 <_Thread_Enable_dispatch> 40009e04: 01 00 00 00 nop return (mqd_t) the_mq_fd->Object.id; 40009e08: f0 06 20 08 ld [ %i0 + 8 ], %i0 } 40009e0c: 81 c7 e0 08 ret 40009e10: 81 e8 00 00 restore 4000a12c : int mq_setattr( mqd_t mqdes, const struct mq_attr *mqstat, struct mq_attr *omqstat ) { 4000a12c: 9d e3 bf 90 save %sp, -112, %sp POSIX_Message_queue_Control_fd *the_mq_fd; CORE_message_queue_Control *the_core_mq; Objects_Locations location; if ( !mqstat ) 4000a130: 80 a6 60 00 cmp %i1, 0 4000a134: 12 80 00 06 bne 4000a14c 4000a138: 92 10 00 18 mov %i0, %o1 rtems_set_errno_and_return_minus_one( EINVAL ); 4000a13c: 40 00 2c 65 call 400152d0 <__errno> 4000a140: 01 00 00 00 nop 4000a144: 10 80 00 12 b 4000a18c 4000a148: 82 10 20 16 mov 0x16, %g1 ! 16 4000a14c: 11 10 00 94 sethi %hi(0x40025000), %o0 4000a150: 94 07 bf f4 add %fp, -12, %o2 4000a154: 40 00 10 28 call 4000e1f4 <_Objects_Get> 4000a158: 90 12 22 50 or %o0, 0x250, %o0 the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4000a15c: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000a160: 80 a0 60 01 cmp %g1, 1 4000a164: 02 80 00 0d be 4000a198 4000a168: 01 00 00 00 nop 4000a16c: 0a 80 00 11 bcs 4000a1b0 4000a170: 80 a6 a0 00 cmp %i2, 0 4000a174: 80 a0 60 02 cmp %g1, 2 4000a178: 12 80 00 27 bne 4000a214 4000a17c: 01 00 00 00 nop case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); 4000a180: 40 00 2c 54 call 400152d0 <__errno> 4000a184: 01 00 00 00 nop 4000a188: 82 10 20 09 mov 9, %g1 ! 9 4000a18c: c2 22 00 00 st %g1, [ %o0 ] 4000a190: 10 80 00 23 b 4000a21c 4000a194: 90 10 3f ff mov -1, %o0 case OBJECTS_REMOTE: _Thread_Dispatch(); 4000a198: 40 00 14 cc call 4000f4c8 <_Thread_Dispatch> <== NOT EXECUTED 4000a19c: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 4000a1a0: 40 00 05 0d call 4000b5d4 <== NOT EXECUTED 4000a1a4: 01 00 00 00 nop <== NOT EXECUTED the_mq_fd->oflag = mqstat->mq_flags; _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000a1a8: 81 c7 e0 08 ret <== NOT EXECUTED 4000a1ac: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED /* * Return the old values. */ if ( omqstat ) { 4000a1b0: 02 80 00 0a be 4000a1d8 4000a1b4: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 omqstat->mq_flags = the_mq_fd->oflag; 4000a1b8: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 4000a1bc: c2 26 80 00 st %g1, [ %i2 ] omqstat->mq_msgsize = the_core_mq->maximum_message_size; 4000a1c0: c2 00 a0 6c ld [ %g2 + 0x6c ], %g1 4000a1c4: c2 26 a0 08 st %g1, [ %i2 + 8 ] omqstat->mq_maxmsg = the_core_mq->maximum_pending_messages; 4000a1c8: c2 00 a0 64 ld [ %g2 + 0x64 ], %g1 4000a1cc: c2 26 a0 04 st %g1, [ %i2 + 4 ] omqstat->mq_curmsgs = the_core_mq->number_of_pending_messages; 4000a1d0: c2 00 a0 68 ld [ %g2 + 0x68 ], %g1 4000a1d4: c2 26 a0 0c st %g1, [ %i2 + 0xc ] } the_mq_fd->oflag = mqstat->mq_flags; 4000a1d8: c2 06 40 00 ld [ %i1 ], %g1 4000a1dc: c2 22 20 14 st %g1, [ %o0 + 0x14 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000a1e0: 05 10 00 93 sethi %hi(0x40024c00), %g2 4000a1e4: c2 00 a0 80 ld [ %g2 + 0x80 ], %g1 ! 40024c80 <_Thread_Dispatch_disable_level> 4000a1e8: 90 10 20 00 clr %o0 4000a1ec: 82 00 7f ff add %g1, -1, %g1 4000a1f0: c2 20 a0 80 st %g1, [ %g2 + 0x80 ] 4000a1f4: c2 00 a0 80 ld [ %g2 + 0x80 ], %g1 4000a1f8: 80 a0 60 00 cmp %g1, 0 4000a1fc: 32 80 00 09 bne,a 4000a220 4000a200: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED _Thread_Dispatch(); 4000a204: 40 00 14 b1 call 4000f4c8 <_Thread_Dispatch> 4000a208: 01 00 00 00 nop 4000a20c: 10 80 00 04 b 4000a21c 4000a210: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 4000a214: 40 00 04 e6 call 4000b5ac <== NOT EXECUTED 4000a218: 01 00 00 00 nop <== NOT EXECUTED } 4000a21c: b0 10 00 08 mov %o0, %i0 4000a220: 81 c7 e0 08 ret 4000a224: 81 e8 00 00 restore 4000a228 : char *msg_ptr, size_t msg_len, unsigned int *msg_prio, const struct timespec *abstime ) { 4000a228: 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 ) ) { 4000a22c: 92 07 bf f4 add %fp, -12, %o1 4000a230: 40 00 00 88 call 4000a450 <_POSIX_Absolute_timeout_to_ticks> 4000a234: 90 10 00 1c mov %i4, %o0 char *msg_ptr, size_t msg_len, unsigned int *msg_prio, const struct timespec *abstime ) { 4000a238: 92 10 00 19 mov %i1, %o1 4000a23c: 94 10 00 1a mov %i2, %o2 * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ switch ( _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ) ) { 4000a240: 80 a2 20 02 cmp %o0, 2 4000a244: 08 80 00 07 bleu 4000a260 4000a248: 96 10 00 1b mov %i3, %o3 4000a24c: 80 a2 20 03 cmp %o0, 3 4000a250: 22 80 00 05 be,a 4000a264 4000a254: b8 10 20 01 mov 1, %i4 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } return _POSIX_Message_queue_Receive_support( 4000a258: 10 80 00 04 b 4000a268 <== NOT EXECUTED 4000a25c: da 07 bf f4 ld [ %fp + -12 ], %o5 <== NOT EXECUTED * 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 ) ) { 4000a260: b8 10 20 00 clr %i4 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } return _POSIX_Message_queue_Receive_support( 4000a264: da 07 bf f4 ld [ %fp + -12 ], %o5 4000a268: 90 10 00 18 mov %i0, %o0 4000a26c: 7f ff fe fd call 40009e60 <_POSIX_Message_queue_Receive_support> 4000a270: 98 10 00 1c mov %i4, %o4 msg_len, msg_prio, do_wait, ticks ); } 4000a274: 81 c7 e0 08 ret 4000a278: 91 e8 00 08 restore %g0, %o0, %o0 4000a27c : const char *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec *abstime ) { 4000a27c: 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 ) ) { 4000a280: 92 07 bf f4 add %fp, -12, %o1 4000a284: 40 00 00 73 call 4000a450 <_POSIX_Absolute_timeout_to_ticks> 4000a288: 90 10 00 1c mov %i4, %o0 const char *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec *abstime ) { 4000a28c: 92 10 00 19 mov %i1, %o1 4000a290: 94 10 00 1a mov %i2, %o2 * 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 ) ) { 4000a294: 80 a2 20 02 cmp %o0, 2 4000a298: 08 80 00 07 bleu 4000a2b4 4000a29c: 96 10 00 1b mov %i3, %o3 4000a2a0: 80 a2 20 03 cmp %o0, 3 4000a2a4: 22 80 00 05 be,a 4000a2b8 4000a2a8: b8 10 20 01 mov 1, %i4 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } return _POSIX_Message_queue_Send_support( 4000a2ac: 10 80 00 04 b 4000a2bc <== NOT EXECUTED 4000a2b0: da 07 bf f4 ld [ %fp + -12 ], %o5 <== NOT EXECUTED * 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 ) ) { 4000a2b4: b8 10 20 00 clr %i4 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } return _POSIX_Message_queue_Send_support( 4000a2b8: da 07 bf f4 ld [ %fp + -12 ], %o5 4000a2bc: 90 10 00 18 mov %i0, %o0 4000a2c0: 7f ff ff 4e call 40009ff8 <_POSIX_Message_queue_Send_support> 4000a2c4: 98 10 00 1c mov %i4, %o4 msg_len, msg_prio, do_wait, ticks ); } 4000a2c8: 81 c7 e0 08 ret 4000a2cc: 91 e8 00 08 restore %g0, %o0, %o0 40002784 : */ int newlib_free_buffers( FILE *fp ) { 40002784: 9d e3 bf 98 save %sp, -104, %sp switch ( fileno(fp) ) { 40002788: 40 00 2f 35 call 4000e45c 4000278c: 90 10 00 18 mov %i0, %o0 40002790: 80 a2 20 02 cmp %o0, 2 40002794: 18 80 00 0e bgu 400027cc 40002798: 01 00 00 00 nop case 0: case 1: case 2: if (fp->_flags & __SMBF) { 4000279c: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 400027a0: 80 88 60 80 btst 0x80, %g1 400027a4: 02 80 00 0c be 400027d4 400027a8: 01 00 00 00 nop free( fp->_bf._base ); 400027ac: 7f ff fe 80 call 400021ac 400027b0: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 fp->_flags &= ~__SMBF; 400027b4: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 fp->_bf._base = fp->_p = (unsigned char *) NULL; 400027b8: c0 26 20 10 clr [ %i0 + 0x10 ] case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 400027bc: 82 08 7f 7f and %g1, -129, %g1 fp->_bf._base = fp->_p = (unsigned char *) NULL; 400027c0: c0 26 00 00 clr [ %i0 ] case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 400027c4: 10 80 00 04 b 400027d4 400027c8: c2 36 20 0c sth %g1, [ %i0 + 0xc ] fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 400027cc: 40 00 2e aa call 4000e274 <== NOT EXECUTED 400027d0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED } return 0; } 400027d4: 81 c7 e0 08 ret 400027d8: 91 e8 20 00 restore %g0, 0, %o0 400028ac : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *pargp ) { 400028ac: 9d e3 bf 98 save %sp, -104, %sp rtems_device_driver status; if ( !initialized ) { 400028b0: 05 10 00 77 sethi %hi(0x4001dc00), %g2 400028b4: c2 48 a1 3c ldsb [ %g2 + 0x13c ], %g1 ! 4001dd3c 400028b8: 80 a0 60 00 cmp %g1, 0 400028bc: 12 80 00 0f bne 400028f8 400028c0: 82 10 20 01 mov 1, %g1 initialized = 1; status = rtems_io_register_name( 400028c4: 11 10 00 6c sethi %hi(0x4001b000), %o0 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 400028c8: c2 28 a1 3c stb %g1, [ %g2 + 0x13c ] status = rtems_io_register_name( 400028cc: 90 12 23 a0 or %o0, 0x3a0, %o0 400028d0: 92 10 00 18 mov %i0, %o1 400028d4: 40 00 00 4e call 40002a0c 400028d8: 94 10 20 00 clr %o2 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 400028dc: 80 a2 20 00 cmp %o0, 0 400028e0: 02 80 00 05 be 400028f4 400028e4: 03 10 00 77 sethi %hi(0x4001dc00), %g1 rtems_fatal_error_occurred(status); 400028e8: 40 00 12 96 call 40007340 <== NOT EXECUTED 400028ec: 01 00 00 00 nop <== NOT EXECUTED NULL_major = major; 400028f0: 03 10 00 77 sethi %hi(0x4001dc00), %g1 <== NOT EXECUTED 400028f4: f0 20 62 f0 st %i0, [ %g1 + 0x2f0 ] ! 4001def0 } return RTEMS_SUCCESSFUL; } 400028f8: 81 c7 e0 08 ret 400028fc: 91 e8 20 00 restore %g0, 0, %o0 40002888 : void *pargp ) { rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 40002888: 80 a2 a0 00 cmp %o2, 0 4000288c: 02 80 00 04 be 4000289c 40002890: 01 00 00 00 nop rw_args->bytes_moved = rw_args->count; 40002894: c2 02 a0 0c ld [ %o2 + 0xc ], %g1 <== NOT EXECUTED 40002898: c2 22 a0 14 st %g1, [ %o2 + 0x14 ] <== NOT EXECUTED return NULL_SUCCESSFUL; } 4000289c: 81 c3 e0 08 retl 400028a0: 90 10 20 00 clr %o0 400029e0 : int open( const char *pathname, int flags, ... ) { 400029e0: 9d e3 bf 80 save %sp, -128, %sp 400029e4: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 400029e8: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 400029ec: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 400029f0: f4 27 a0 4c st %i2, [ %fp + 0x4c ] /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 400029f4: 82 06 60 01 add %i1, 1, %g1 if ( ( status & _FREAD ) == _FREAD ) eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 400029f8: 80 88 60 02 btst 2, %g1 * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 400029fc: 82 08 60 01 and %g1, 1, %g1 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 40002a00: 02 80 00 03 be 40002a0c 40002a04: a1 28 60 02 sll %g1, 2, %l0 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 40002a08: a0 14 20 02 or %l0, 2, %l0 va_start(ap, flags); mode = va_arg( ap, int ); 40002a0c: 82 07 a0 50 add %fp, 0x50, %g1 * descriptors are obtained using socket(), not open(). */ /* allocate a file control block */ iop = rtems_libio_allocate(); if ( iop == 0 ) { 40002a10: b8 10 20 17 mov 0x17, %i4 * 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(); 40002a14: 40 00 23 dd call 4000b988 40002a18: c2 27 bf f4 st %g1, [ %fp + -12 ] if ( iop == 0 ) { 40002a1c: ba 92 20 00 orcc %o0, 0, %i5 40002a20: 02 80 00 98 be 40002c80 40002a24: 92 10 00 10 mov %l0, %o1 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 40002a28: 90 10 00 18 mov %i0, %o0 40002a2c: a0 07 bf e4 add %fp, -28, %l0 40002a30: 96 10 20 01 mov 1, %o3 40002a34: 7f ff fd 58 call 40001f94 40002a38: 94 10 00 10 mov %l0, %o2 pathname, eval_flags, &loc, TRUE ); if ( status == -1 ) { 40002a3c: 80 a2 3f ff cmp %o0, -1 40002a40: 12 80 00 28 bne 40002ae0 40002a44: 82 0e 6a 00 and %i1, 0xa00, %g1 if ( errno != ENOENT ) { 40002a48: 40 00 2d b5 call 4000e11c <__errno> 40002a4c: 01 00 00 00 nop 40002a50: c2 02 00 00 ld [ %o0 ], %g1 40002a54: 80 a0 60 02 cmp %g1, 2 40002a58: 02 80 00 06 be 40002a70 40002a5c: 80 8e 62 00 btst 0x200, %i1 rc = errno; 40002a60: 40 00 2d af call 4000e11c <__errno> 40002a64: b6 10 20 00 clr %i3 40002a68: 10 80 00 71 b 40002c2c 40002a6c: f8 02 00 00 ld [ %o0 ], %i4 goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 40002a70: b8 10 20 02 mov 2, %i4 40002a74: 02 80 00 71 be 40002c38 40002a78: b6 10 20 00 clr %i3 rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 40002a7c: 13 3f ff e0 sethi %hi(0xffff8000), %o1 40002a80: 90 10 00 18 mov %i0, %o0 40002a84: 92 16 80 09 or %i2, %o1, %o1 40002a88: 94 10 20 00 clr %o2 40002a8c: 93 2a 60 10 sll %o1, 0x10, %o1 40002a90: 96 10 20 00 clr %o3 40002a94: 7f ff fe c7 call 400025b0 40002a98: 93 32 60 10 srl %o1, 0x10, %o1 if ( rc ) { 40002a9c: 80 a2 20 00 cmp %o0, 0 40002aa0: 02 80 00 06 be 40002ab8 40002aa4: 94 10 00 10 mov %l0, %o2 rc = errno; 40002aa8: 40 00 2d 9d call 4000e11c <__errno> <== NOT EXECUTED 40002aac: 01 00 00 00 nop <== NOT EXECUTED 40002ab0: 10 80 00 5f b 40002c2c <== NOT EXECUTED 40002ab4: f8 02 00 00 ld [ %o0 ], %i4 <== NOT EXECUTED goto done; } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, 0x0, &loc, TRUE ); 40002ab8: 90 10 00 18 mov %i0, %o0 40002abc: 92 10 20 00 clr %o1 40002ac0: 96 10 20 01 mov 1, %o3 40002ac4: 7f ff fd 34 call 40001f94 40002ac8: b8 10 20 0d mov 0xd, %i4 if ( status != 0 ) { /* The file did not exist */ 40002acc: 80 a2 20 00 cmp %o0, 0 40002ad0: 12 80 00 5a bne 40002c38 40002ad4: b6 10 20 00 clr %i3 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 40002ad8: 10 80 00 07 b 40002af4 40002adc: 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)) { 40002ae0: b6 10 00 10 mov %l0, %i3 40002ae4: 80 a0 6a 00 cmp %g1, 0xa00 40002ae8: 02 80 00 54 be 40002c38 40002aec: b8 10 20 11 mov 0x11, %i4 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 40002af0: c2 07 bf e8 ld [ %fp + -24 ], %g1 iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 40002af4: e0 07 60 0c ld [ %i5 + 0xc ], %l0 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 40002af8: c2 27 60 30 st %g1, [ %i5 + 0x30 ] iop->file_info = loc.node_access; 40002afc: c2 07 bf e4 ld [ %fp + -28 ], %g1 iop->flags |= rtems_libio_fcntl_flags( flags ); 40002b00: 90 10 00 19 mov %i1, %o0 40002b04: 40 00 23 d7 call 4000ba60 40002b08: c2 27 60 2c st %g1, [ %i5 + 0x2c ] 40002b0c: 90 12 00 10 or %o0, %l0, %o0 iop->pathinfo = loc; 40002b10: 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 ); 40002b14: d0 27 60 0c st %o0, [ %i5 + 0xc ] iop->pathinfo = loc; 40002b18: a0 07 bf e4 add %fp, -28, %l0 40002b1c: 90 07 60 10 add %i5, 0x10, %o0 40002b20: 40 00 2f 54 call 4000e870 40002b24: 92 10 00 10 mov %l0, %o1 if ( !iop->handlers->open_h ) { 40002b28: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 40002b2c: b8 10 20 86 mov 0x86, %i4 40002b30: c2 00 40 00 ld [ %g1 ], %g1 40002b34: 80 a0 60 00 cmp %g1, 0 40002b38: 02 80 00 40 be 40002c38 40002b3c: b6 10 00 10 mov %l0, %i3 rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 40002b40: 92 10 00 18 mov %i0, %o1 40002b44: 96 10 00 1a mov %i2, %o3 40002b48: 90 10 00 1d mov %i5, %o0 40002b4c: 9f c0 40 00 call %g1 40002b50: 94 10 00 19 mov %i1, %o2 if ( rc ) 40002b54: b8 92 20 00 orcc %o0, 0, %i4 40002b58: 12 80 00 36 bne 40002c30 40002b5c: 80 a7 20 00 cmp %i4, 0 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 40002b60: 80 8e 64 00 btst 0x400, %i1 40002b64: 02 80 00 4c be 40002c94 40002b68: 03 10 00 67 sethi %hi(0x40019c00), %g1 rc = ftruncate( iop - rtems_libio_iops, 0 ); 40002b6c: 21 10 00 67 sethi %hi(0x40019c00), %l0 40002b70: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 ! 40019c54 40002b74: 92 10 20 00 clr %o1 40002b78: 84 27 40 02 sub %i5, %g2, %g2 40002b7c: 85 38 a0 02 sra %g2, 2, %g2 40002b80: 87 28 a0 02 sll %g2, 2, %g3 40002b84: 83 28 a0 06 sll %g2, 6, %g1 40002b88: 82 20 40 03 sub %g1, %g3, %g1 40002b8c: 91 28 60 06 sll %g1, 6, %o0 40002b90: 90 22 00 01 sub %o0, %g1, %o0 40002b94: 83 2a 20 0c sll %o0, 0xc, %g1 40002b98: 90 02 00 01 add %o0, %g1, %o0 40002b9c: 90 02 00 02 add %o0, %g2, %o0 40002ba0: 91 2a 20 04 sll %o0, 4, %o0 40002ba4: 90 22 00 02 sub %o0, %g2, %o0 40002ba8: 91 2a 20 02 sll %o0, 2, %o0 40002bac: 40 00 22 a5 call 4000b640 40002bb0: 90 20 80 08 sub %g2, %o0, %o0 if ( rc ) { 40002bb4: b8 92 20 00 orcc %o0, 0, %i4 40002bb8: 02 80 00 37 be 40002c94 40002bbc: 03 10 00 67 sethi %hi(0x40019c00), %g1 if(errno) rc = errno; 40002bc0: 40 00 2d 57 call 4000e11c <__errno> <== NOT EXECUTED 40002bc4: 01 00 00 00 nop <== NOT EXECUTED 40002bc8: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40002bcc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002bd0: 02 80 00 06 be 40002be8 <== NOT EXECUTED 40002bd4: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 <== NOT EXECUTED 40002bd8: 40 00 2d 51 call 4000e11c <__errno> <== NOT EXECUTED 40002bdc: 01 00 00 00 nop <== NOT EXECUTED 40002be0: f8 02 00 00 ld [ %o0 ], %i4 <== NOT EXECUTED close( iop - rtems_libio_iops ); 40002be4: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 <== NOT EXECUTED 40002be8: b6 10 20 00 clr %i3 <== NOT EXECUTED 40002bec: 84 27 40 02 sub %i5, %g2, %g2 <== NOT EXECUTED 40002bf0: 85 38 a0 02 sra %g2, 2, %g2 <== NOT EXECUTED 40002bf4: 87 28 a0 02 sll %g2, 2, %g3 <== NOT EXECUTED 40002bf8: 83 28 a0 06 sll %g2, 6, %g1 <== NOT EXECUTED 40002bfc: 82 20 40 03 sub %g1, %g3, %g1 <== NOT EXECUTED 40002c00: 91 28 60 06 sll %g1, 6, %o0 <== NOT EXECUTED 40002c04: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED 40002c08: 83 2a 20 0c sll %o0, 0xc, %g1 <== NOT EXECUTED 40002c0c: ba 10 20 00 clr %i5 <== NOT EXECUTED 40002c10: 90 02 00 01 add %o0, %g1, %o0 <== NOT EXECUTED 40002c14: 90 02 00 02 add %o0, %g2, %o0 <== NOT EXECUTED 40002c18: 91 2a 20 04 sll %o0, 4, %o0 <== NOT EXECUTED 40002c1c: 90 22 00 02 sub %o0, %g2, %o0 <== NOT EXECUTED 40002c20: 91 2a 20 02 sll %o0, 2, %o0 <== NOT EXECUTED 40002c24: 40 00 22 55 call 4000b578 <== NOT EXECUTED 40002c28: 90 20 80 08 sub %g2, %o0, %o0 <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 40002c2c: 80 a7 20 00 cmp %i4, 0 40002c30: 02 80 00 19 be 40002c94 40002c34: 03 10 00 67 sethi %hi(0x40019c00), %g1 if ( iop ) 40002c38: 80 a7 60 00 cmp %i5, 0 40002c3c: 02 80 00 05 be 40002c50 40002c40: 80 a6 e0 00 cmp %i3, 0 rtems_libio_free( iop ); 40002c44: 40 00 23 3a call 4000b92c 40002c48: 90 10 00 1d mov %i5, %o0 if ( loc_to_free ) 40002c4c: 80 a6 e0 00 cmp %i3, 0 40002c50: 02 80 00 0c be 40002c80 40002c54: 01 00 00 00 nop rtems_filesystem_freenode( loc_to_free ); 40002c58: c2 06 e0 08 ld [ %i3 + 8 ], %g1 40002c5c: 80 a0 60 00 cmp %g1, 0 40002c60: 02 80 00 08 be 40002c80 40002c64: 01 00 00 00 nop 40002c68: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40002c6c: 80 a0 60 00 cmp %g1, 0 40002c70: 02 80 00 04 be 40002c80 40002c74: 01 00 00 00 nop 40002c78: 9f c0 40 00 call %g1 40002c7c: 90 10 00 1b mov %i3, %o0 rtems_set_errno_and_return_minus_one( rc ); 40002c80: 40 00 2d 27 call 4000e11c <__errno> 40002c84: b0 10 3f ff mov -1, %i0 40002c88: f8 22 00 00 st %i4, [ %o0 ] 40002c8c: 81 c7 e0 08 ret 40002c90: 81 e8 00 00 restore } return iop - rtems_libio_iops; 40002c94: c6 00 60 54 ld [ %g1 + 0x54 ], %g3 40002c98: 86 27 40 03 sub %i5, %g3, %g3 40002c9c: 87 38 e0 02 sra %g3, 2, %g3 40002ca0: 83 28 e0 02 sll %g3, 2, %g1 40002ca4: 85 28 e0 06 sll %g3, 6, %g2 40002ca8: 84 20 80 01 sub %g2, %g1, %g2 40002cac: 83 28 a0 06 sll %g2, 6, %g1 40002cb0: 82 20 40 02 sub %g1, %g2, %g1 40002cb4: 85 28 60 0c sll %g1, 0xc, %g2 40002cb8: 82 00 40 02 add %g1, %g2, %g1 40002cbc: 82 00 40 03 add %g1, %g3, %g1 40002cc0: 83 28 60 04 sll %g1, 4, %g1 40002cc4: 82 20 40 03 sub %g1, %g3, %g1 40002cc8: 83 28 60 02 sll %g1, 2, %g1 40002ccc: b0 20 c0 01 sub %g3, %g1, %i0 } 40002cd0: 81 c7 e0 08 ret 40002cd4: 81 e8 00 00 restore 40002968 : /* * This is a replaceable stub */ void open_dev_console(void) { 40002968: 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) { 4000296c: 31 10 00 5f sethi %hi(0x40017c00), %i0 40002970: 92 10 20 00 clr %o1 40002974: 90 16 20 d0 or %i0, 0xd0, %o0 40002978: 40 00 00 1a call 400029e0 4000297c: 94 10 20 00 clr %o2 40002980: 80 a2 3f ff cmp %o0, -1 40002984: 02 80 00 15 be 400029d8 40002988: 90 16 20 d0 or %i0, 0xd0, %o0 /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) 4000298c: 92 10 20 01 mov 1, %o1 40002990: 40 00 00 14 call 400029e0 40002994: 94 10 20 00 clr %o2 40002998: 80 a2 3f ff cmp %o0, -1 4000299c: 32 80 00 06 bne,a 400029b4 400029a0: 90 16 20 d0 or %i0, 0xd0, %o0 rtems_fatal_error_occurred( error_code | '1' ); 400029a4: 11 14 d5 11 sethi %hi(0x53544400), %o0 <== NOT EXECUTED 400029a8: 40 00 0e dd call 4000651c <== NOT EXECUTED 400029ac: 90 12 20 31 or %o0, 0x31, %o0 ! 53544431 <== NOT EXECUTED if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 400029b0: 90 16 20 d0 or %i0, 0xd0, %o0 <== NOT EXECUTED 400029b4: 92 10 20 01 mov 1, %o1 400029b8: 40 00 00 0a call 400029e0 400029bc: 94 10 20 00 clr %o2 400029c0: 80 a2 3f ff cmp %o0, -1 400029c4: 12 80 00 05 bne 400029d8 400029c8: 31 14 d5 11 sethi %hi(0x53544400), %i0 rtems_fatal_error_occurred( error_code | '2' ); 400029cc: b0 16 20 32 or %i0, 0x32, %i0 ! 53544432 <== NOT EXECUTED 400029d0: 40 00 0e d3 call 4000651c <== NOT EXECUTED 400029d4: 81 e8 00 00 restore <== NOT EXECUTED 400029d8: 81 c7 e0 08 ret 400029dc: 81 e8 00 00 restore 40017388 : * open a directory. */ DIR * opendir(name) const char *name; { 40017388: 9d e3 bf 98 save %sp, -104, %sp register DIR *dirp; register int fd; if ((fd = open(name, 0)) == -1) 4001738c: 92 10 20 00 clr %o1 40017390: 90 10 00 18 mov %i0, %o0 40017394: 7f ff ba 52 call 40005cdc 40017398: b0 10 20 00 clr %i0 4001739c: 80 a2 3f ff cmp %o0, -1 400173a0: 02 80 00 18 be 40017400 400173a4: a0 10 00 08 mov %o0, %l0 return NULL; if (fcntl(fd, F_SETFD, 1) == -1 || 400173a8: 92 10 20 02 mov 2, %o1 400173ac: 40 00 24 36 call 40020484 400173b0: 94 10 20 01 mov 1, %o2 400173b4: 80 a2 3f ff cmp %o0, -1 400173b8: 02 80 00 10 be 400173f8 400173bc: 90 10 00 10 mov %l0, %o0 400173c0: 7f ff b7 b6 call 40005298 400173c4: 90 10 20 18 mov 0x18, %o0 400173c8: 80 a2 20 00 cmp %o0, 0 400173cc: 22 80 00 0b be,a 400173f8 400173d0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400173d4: b0 10 00 08 mov %o0, %i0 * 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); 400173d8: 7f ff b7 b0 call 40005298 400173dc: 90 10 22 00 mov 0x200, %o0 dirp->dd_len = 512; 400173e0: 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); 400173e4: d0 26 20 0c st %o0, [ %i0 + 0xc ] dirp->dd_len = 512; if (dirp->dd_buf == NULL) { 400173e8: 80 a2 20 00 cmp %o0, 0 400173ec: 12 80 00 07 bne 40017408 400173f0: c2 26 20 10 st %g1, [ %i0 + 0x10 ] close (fd); 400173f4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400173f8: 7f ff b5 c2 call 40004b00 <== NOT EXECUTED 400173fc: b0 10 20 00 clr %i0 <== NOT EXECUTED 40017400: 81 c7 e0 08 ret <== NOT EXECUTED 40017404: 81 e8 00 00 restore <== NOT EXECUTED return NULL; } dirp->dd_fd = fd; 40017408: e0 26 00 00 st %l0, [ %i0 ] dirp->dd_loc = 0; 4001740c: c0 26 20 04 clr [ %i0 + 4 ] dirp->dd_seek = 0; 40017410: c0 26 20 14 clr [ %i0 + 0x14 ] /* * Set up seek point for rewinddir. */ return dirp; } 40017414: 81 c7 e0 08 ret 40017418: 81 e8 00 00 restore 40003714 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 40003714: 9d e3 bf 98 save %sp, -104, %sp int i; if (tty->termios.c_oflag & OPOST) { 40003718: c8 06 60 34 ld [ %i1 + 0x34 ], %g4 4000371c: 80 89 20 01 btst 1, %g4 40003720: 02 80 00 59 be 40003884 40003724: f0 2f a0 44 stb %i0, [ %fp + 0x44 ] switch (c) { 40003728: 82 0e 20 ff and %i0, 0xff, %g1 4000372c: 80 a0 60 09 cmp %g1, 9 40003730: 22 80 00 2b be,a 400037dc 40003734: c6 06 60 28 ld [ %i1 + 0x28 ], %g3 40003738: 18 80 00 07 bgu 40003754 4000373c: 80 a0 60 0a cmp %g1, 0xa 40003740: 80 a0 60 08 cmp %g1, 8 <== NOT EXECUTED 40003744: 12 80 00 3c bne 40003834 <== NOT EXECUTED 40003748: 80 89 20 02 btst 2, %g4 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 4000374c: 10 80 00 35 b 40003820 <== NOT EXECUTED 40003750: 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) { 40003754: 02 80 00 06 be 4000376c 40003758: 80 a0 60 0d cmp %g1, 0xd 4000375c: 32 80 00 36 bne,a 40003834 40003760: 80 89 20 02 btst 2, %g4 tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 40003764: 10 80 00 10 b 400037a4 <== NOT EXECUTED 40003768: 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) 4000376c: 80 89 20 20 btst 0x20, %g4 40003770: 32 80 00 02 bne,a 40003778 40003774: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED tty->column = 0; if (tty->termios.c_oflag & ONLCR) { 40003778: c2 06 60 34 ld [ %i1 + 0x34 ], %g1 4000377c: 80 88 60 04 btst 4, %g1 40003780: 02 80 00 42 be 40003888 40003784: 94 10 00 19 mov %i1, %o2 rtems_termios_puts ("\r", 1, tty); 40003788: 11 10 00 60 sethi %hi(0x40018000), %o0 4000378c: 92 10 20 01 mov 1, %o1 40003790: 90 12 20 20 or %o0, 0x20, %o0 40003794: 7f ff ff 94 call 400035e4 40003798: 94 10 00 19 mov %i1, %o2 c = '\n'; if (tty->termios.c_oflag & ONLRET) tty->column = 0; break; } tty->column = 0; 4000379c: 10 80 00 3a b 40003884 400037a0: c0 26 60 28 clr [ %i1 + 0x28 ] tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 400037a4: 02 80 00 06 be 400037bc <== NOT EXECUTED 400037a8: 80 89 20 08 btst 8, %g4 <== NOT EXECUTED 400037ac: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 400037b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400037b4: 02 80 00 17 be 40003810 <== NOT EXECUTED 400037b8: 80 89 20 08 btst 8, %g4 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 400037bc: 22 80 00 32 be,a 40003884 <== NOT EXECUTED 400037c0: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED c = '\n'; 400037c4: 82 10 20 0a mov 0xa, %g1 <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 400037c8: 80 89 20 20 btst 0x20, %g4 <== NOT EXECUTED 400037cc: 02 80 00 2e be 40003884 <== NOT EXECUTED 400037d0: c2 2f a0 44 stb %g1, [ %fp + 0x44 ] <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; 400037d4: 10 80 00 2c b 40003884 <== NOT EXECUTED 400037d8: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { 400037dc: 05 00 00 06 sethi %hi(0x1800), %g2 400037e0: 82 09 00 02 and %g4, %g2, %g1 400037e4: 80 a0 40 02 cmp %g1, %g2 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 400037e8: 84 08 e0 07 and %g3, 7, %g2 400037ec: 82 10 20 08 mov 8, %g1 400037f0: 92 20 40 02 sub %g1, %g2, %o1 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 400037f4: 12 80 00 09 bne 40003818 400037f8: 84 02 40 03 add %o1, %g3, %g2 tty->column += i; 400037fc: c4 26 60 28 st %g2, [ %i1 + 0x28 ] rtems_termios_puts ( " ", i, tty); 40003800: 94 10 00 19 mov %i1, %o2 40003804: 11 10 00 60 sethi %hi(0x40018000), %o0 40003808: 7f ff ff 77 call 400035e4 4000380c: 90 12 20 28 or %o0, 0x28, %o0 ! 40018028 40003810: 81 c7 e0 08 ret 40003814: 81 e8 00 00 restore return; } tty->column += i; 40003818: 10 80 00 1b b 40003884 <== NOT EXECUTED 4000381c: c4 26 60 28 st %g2, [ %i1 + 0x28 ] <== NOT EXECUTED break; case '\b': if (tty->column > 0) 40003820: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003824: 04 80 00 18 ble 40003884 <== NOT EXECUTED 40003828: 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++; 4000382c: 10 80 00 16 b 40003884 <== NOT EXECUTED 40003830: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 40003834: 02 80 00 0b be 40003860 40003838: c4 0f a0 44 ldub [ %fp + 0x44 ], %g2 c = toupper(c); 4000383c: 03 10 00 65 sethi %hi(0x40019400), %g1 <== NOT EXECUTED 40003840: c2 00 61 08 ld [ %g1 + 0x108 ], %g1 ! 40019508 <__ctype_ptr> <== NOT EXECUTED oproc (unsigned char c, struct rtems_termios_tty *tty) { int i; if (tty->termios.c_oflag & OPOST) { switch (c) { 40003844: b0 0e 20 ff and %i0, 0xff, %i0 <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); 40003848: c2 08 40 18 ldub [ %g1 + %i0 ], %g1 <== NOT EXECUTED 4000384c: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 40003850: 32 80 00 02 bne,a 40003858 <== NOT EXECUTED 40003854: b0 06 3f e0 add %i0, -32, %i0 <== NOT EXECUTED 40003858: f0 2f a0 44 stb %i0, [ %fp + 0x44 ] <== NOT EXECUTED if (!iscntrl(c)) 4000385c: c4 0f a0 44 ldub [ %fp + 0x44 ], %g2 <== NOT EXECUTED 40003860: 03 10 00 65 sethi %hi(0x40019400), %g1 40003864: c2 00 61 08 ld [ %g1 + 0x108 ], %g1 ! 40019508 <__ctype_ptr> 40003868: c2 08 40 02 ldub [ %g1 + %g2 ], %g1 4000386c: 80 88 60 20 btst 0x20, %g1 40003870: 12 80 00 06 bne 40003888 40003874: 94 10 00 19 mov %i1, %o2 tty->column++; 40003878: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 4000387c: 82 00 60 01 inc %g1 40003880: c2 26 60 28 st %g1, [ %i1 + 0x28 ] break; } } rtems_termios_puts (&c, 1, tty); 40003884: 94 10 00 19 mov %i1, %o2 40003888: 90 07 a0 44 add %fp, 0x44, %o0 4000388c: 7f ff ff 56 call 400035e4 40003890: 92 10 20 01 mov 1, %o1 40003894: 81 c7 e0 08 ret 40003898: 81 e8 00 00 restore 40005758 : */ int pthread_barrier_destroy( pthread_barrier_t *barrier ) { 40005758: 9d e3 bf 90 save %sp, -112, %sp POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 4000575c: 80 a6 20 00 cmp %i0, 0 40005760: 02 80 00 2c be 40005810 40005764: 94 07 bf f4 add %fp, -12, %o2 RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( pthread_barrier_t *barrier, Objects_Locations *location ) { return (POSIX_Barrier_Control *) _Objects_Get( 40005768: d2 06 00 00 ld [ %i0 ], %o1 4000576c: 31 10 00 6e sethi %hi(0x4001b800), %i0 40005770: 40 00 0c b4 call 40008a40 <_Objects_Get> 40005774: 90 16 22 20 or %i0, 0x220, %o0 ! 4001ba20 <_POSIX_Barrier_Information> return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); switch ( location ) { 40005778: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000577c: 80 a0 60 00 cmp %g1, 0 40005780: 02 80 00 07 be 4000579c 40005784: 88 10 00 08 mov %o0, %g4 40005788: 80 a0 60 02 cmp %g1, 2 4000578c: 18 80 00 1d bgu 40005800 40005790: 90 10 20 16 mov 0x16, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40005794: 81 c7 e0 08 ret 40005798: 91 e8 00 08 restore %g0, %o0, %o0 case OBJECTS_REMOTE: case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: if ( the_barrier->Barrier.number_of_waiting_threads != 0 ) { 4000579c: c2 02 20 58 ld [ %o0 + 0x58 ], %g1 400057a0: 80 a0 60 00 cmp %g1, 0 400057a4: 22 80 00 06 be,a 400057bc 400057a8: 90 16 22 20 or %i0, 0x220, %o0 _Thread_Enable_dispatch(); 400057ac: 7f ff ff de call 40005724 <_Thread_Enable_dispatch> 400057b0: 01 00 00 00 nop 400057b4: 10 80 00 18 b 40005814 400057b8: 90 10 20 10 mov 0x10, %o0 ! 10 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 400057bc: c2 01 20 08 ld [ %g4 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400057c0: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 400057c4: 05 00 00 3f sethi %hi(0xfc00), %g2 400057c8: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 400057cc: 82 08 40 02 and %g1, %g2, %g1 400057d0: 80 a0 40 03 cmp %g1, %g3 400057d4: 18 80 00 05 bgu 400057e8 400057d8: 92 10 00 04 mov %g4, %o1 information->local_table[ index ] = the_object; 400057dc: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 400057e0: 83 28 60 02 sll %g1, 2, %g1 400057e4: c0 20 80 01 clr [ %g2 + %g1 ] */ RTEMS_INLINE_ROUTINE void _POSIX_Barrier_Free ( POSIX_Barrier_Control *the_barrier ) { _Objects_Free( &_POSIX_Barrier_Information, &the_barrier->Object ); 400057e8: 40 00 0c 54 call 40008938 <_Objects_Free> 400057ec: c0 21 20 0c clr [ %g4 + 0xc ] _Objects_Close( &_POSIX_Barrier_Information, &the_barrier->Object ); _POSIX_Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 400057f0: 7f ff ff cd call 40005724 <_Thread_Enable_dispatch> 400057f4: 01 00 00 00 nop 400057f8: 10 80 00 07 b 40005814 400057fc: 90 10 20 00 clr %o0 ! 0 return 0; } return POSIX_BOTTOM_REACHED(); 40005800: 40 00 01 fc call 40005ff0 <== NOT EXECUTED 40005804: 01 00 00 00 nop <== NOT EXECUTED } 40005808: 81 c7 e0 08 ret <== NOT EXECUTED 4000580c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40005810: 90 10 20 16 mov 0x16, %o0 } 40005814: b0 10 00 08 mov %o0, %i0 40005818: 81 c7 e0 08 ret 4000581c: 81 e8 00 00 restore 40005854 : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { 40005854: 9d e3 bf 88 save %sp, -120, %sp const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 40005858: 80 a6 20 00 cmp %i0, 0 4000585c: 02 80 00 36 be 40005934 40005860: a0 10 00 19 mov %i1, %l0 return EINVAL; if ( count == 0 ) 40005864: 80 a6 a0 00 cmp %i2, 0 40005868: 02 80 00 33 be 40005934 4000586c: 80 a6 60 00 cmp %i1, 0 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 40005870: 32 80 00 06 bne,a 40005888 40005874: c2 04 00 00 ld [ %l0 ], %g1 the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); 40005878: a0 07 bf e8 add %fp, -24, %l0 4000587c: 7f ff ff 93 call 400056c8 40005880: 90 10 00 10 mov %l0, %o0 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 40005884: c2 04 00 00 ld [ %l0 ], %g1 40005888: 80 a0 60 00 cmp %g1, 0 4000588c: 02 80 00 2a be 40005934 40005890: 01 00 00 00 nop return EINVAL; switch ( the_attr->process_shared ) { 40005894: c2 04 20 04 ld [ %l0 + 4 ], %g1 40005898: 80 a0 60 00 cmp %g1, 0 4000589c: 12 80 00 26 bne 40005934 400058a0: 05 10 00 6d sethi %hi(0x4001b400), %g2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400058a4: c2 00 a1 70 ld [ %g2 + 0x170 ], %g1 ! 4001b570 <_Thread_Dispatch_disable_level> /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; the_attributes.maximum_count = count; 400058a8: f4 27 bf f4 st %i2, [ %fp + -12 ] 400058ac: 82 00 60 01 inc %g1 } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 400058b0: c0 27 bf f0 clr [ %fp + -16 ] 400058b4: c2 20 a1 70 st %g1, [ %g2 + 0x170 ] * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void ) { return (POSIX_Barrier_Control *) 400058b8: 35 10 00 6e sethi %hi(0x4001b800), %i2 400058bc: 40 00 0b 1d call 40008530 <_Objects_Allocate> 400058c0: 90 16 a2 20 or %i2, 0x220, %o0 ! 4001ba20 <_POSIX_Barrier_Information> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 400058c4: a0 92 20 00 orcc %o0, 0, %l0 400058c8: 12 80 00 06 bne 400058e0 400058cc: 90 04 20 10 add %l0, 0x10, %o0 _Thread_Enable_dispatch(); 400058d0: 7f ff ff d4 call 40005820 <_Thread_Enable_dispatch> 400058d4: b0 10 20 0b mov 0xb, %i0 400058d8: 81 c7 e0 08 ret 400058dc: 81 e8 00 00 restore return EAGAIN; } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 400058e0: 40 00 08 6b call 40007a8c <_CORE_barrier_Initialize> 400058e4: 92 07 bf f0 add %fp, -16, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400058e8: 90 16 a2 20 or %i2, 0x220, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 400058ec: c2 04 20 08 ld [ %l0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400058f0: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 400058f4: 05 00 00 3f sethi %hi(0xfc00), %g2 400058f8: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 400058fc: 82 08 40 02 and %g1, %g2, %g1 40005900: 80 a0 40 03 cmp %g1, %g3 40005904: 38 80 00 06 bgu,a 4000591c 40005908: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED information->local_table[ index ] = the_object; 4000590c: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40005910: 83 28 60 02 sll %g1, 2, %g1 40005914: e0 20 80 01 st %l0, [ %g2 + %g1 ] ); /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; 40005918: c2 04 20 08 ld [ %l0 + 8 ], %g1 if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 4000591c: c0 24 20 0c clr [ %l0 + 0xc ] 40005920: c2 26 00 00 st %g1, [ %i0 ] _Thread_Enable_dispatch(); 40005924: 7f ff ff bf call 40005820 <_Thread_Enable_dispatch> 40005928: b0 10 20 00 clr %i0 4000592c: 81 c7 e0 08 ret 40005930: 81 e8 00 00 restore return 0; } 40005934: 81 c7 e0 08 ret 40005938: 91 e8 20 16 restore %g0, 0x16, %o0 4000593c : */ int pthread_barrier_wait( pthread_barrier_t *barrier ) { 4000593c: 9d e3 bf 90 save %sp, -112, %sp POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 40005940: 80 a6 20 00 cmp %i0, 0 40005944: 02 80 00 28 be 400059e4 40005948: 11 10 00 6e sethi %hi(0x4001b800), %o0 RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( pthread_barrier_t *barrier, Objects_Locations *location ) { return (POSIX_Barrier_Control *) _Objects_Get( 4000594c: d2 06 00 00 ld [ %i0 ], %o1 40005950: 94 07 bf f4 add %fp, -12, %o2 40005954: 40 00 0c 3b call 40008a40 <_Objects_Get> 40005958: 90 12 22 20 or %o0, 0x220, %o0 return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); switch ( location ) { 4000595c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005960: 80 a0 60 00 cmp %g1, 0 40005964: 22 80 00 07 be,a 40005980 40005968: d2 02 20 08 ld [ %o0 + 8 ], %o1 4000596c: 80 a0 60 02 cmp %g1, 2 40005970: 18 80 00 19 bgu 400059d4 40005974: 90 10 20 16 mov 0x16, %o0 return _POSIX_Barrier_Translate_core_barrier_return_code( _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 40005978: 81 c7 e0 08 ret 4000597c: 91 e8 00 08 restore %g0, %o0, %o0 case OBJECTS_REMOTE: case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_barrier_Wait( 40005980: 94 10 20 01 mov 1, %o2 40005984: 90 02 20 10 add %o0, 0x10, %o0 40005988: 96 10 20 00 clr %o3 4000598c: 40 00 08 4c call 40007abc <_CORE_barrier_Wait> 40005990: 98 10 20 00 clr %o4 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40005994: 03 10 00 6d sethi %hi(0x4001b400), %g1 40005998: c4 00 61 70 ld [ %g1 + 0x170 ], %g2 ! 4001b570 <_Thread_Dispatch_disable_level> 4000599c: 84 00 bf ff add %g2, -1, %g2 400059a0: c4 20 61 70 st %g2, [ %g1 + 0x170 ] 400059a4: c2 00 61 70 ld [ %g1 + 0x170 ], %g1 400059a8: 80 a0 60 00 cmp %g1, 0 400059ac: 12 80 00 05 bne 400059c0 400059b0: 03 10 00 6d sethi %hi(0x4001b400), %g1 _Thread_Dispatch(); 400059b4: 40 00 10 d8 call 40009d14 <_Thread_Dispatch> 400059b8: 01 00 00 00 nop TRUE, 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_Barrier_Translate_core_barrier_return_code( 400059bc: 03 10 00 6d sethi %hi(0x4001b400), %g1 400059c0: c2 00 62 4c ld [ %g1 + 0x24c ], %g1 ! 4001b64c <_Thread_Executing> 400059c4: 40 00 1e 5e call 4000d33c <_POSIX_Barrier_Translate_core_barrier_return_code> 400059c8: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 400059cc: 81 c7 e0 08 ret 400059d0: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Enable_dispatch(); return _POSIX_Barrier_Translate_core_barrier_return_code( _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 400059d4: 40 00 01 87 call 40005ff0 <== NOT EXECUTED 400059d8: 01 00 00 00 nop <== NOT EXECUTED } 400059dc: 81 c7 e0 08 ret <== NOT EXECUTED 400059e0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED _Thread_Enable_dispatch(); return _POSIX_Barrier_Translate_core_barrier_return_code( _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 400059e4: 90 10 20 16 mov 0x16, %o0 } 400059e8: b0 10 00 08 mov %o0, %i0 400059ec: 81 c7 e0 08 ret 400059f0: 81 e8 00 00 restore 40004ed4 : */ int pthread_cancel( pthread_t thread ) { 40004ed4: 9d e3 bf 90 save %sp, -112, %sp /* * Don't even think about deleting a resource from an ISR. */ if ( _ISR_Is_in_progress() ) 40004ed8: 03 10 00 5b sethi %hi(0x40016c00), %g1 40004edc: c2 00 62 e4 ld [ %g1 + 0x2e4 ], %g1 ! 40016ee4 <_ISR_Nest_level> */ int pthread_cancel( pthread_t thread ) { 40004ee0: 92 10 00 18 mov %i0, %o1 /* * Don't even think about deleting a resource from an ISR. */ if ( _ISR_Is_in_progress() ) 40004ee4: 80 a0 60 00 cmp %g1, 0 40004ee8: 12 80 00 2e bne 40004fa0 40004eec: 90 10 20 47 mov 0x47, %o0 RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 40004ef0: 11 10 00 5c sethi %hi(0x40017000), %o0 40004ef4: 94 07 bf f4 add %fp, -12, %o2 40004ef8: 40 00 0d 01 call 400082fc <_Objects_Get> 40004efc: 90 12 21 08 or %o0, 0x108, %o0 return EPROTO; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 40004f00: c2 07 bf f4 ld [ %fp + -12 ], %g1 40004f04: 80 a0 60 01 cmp %g1, 1 40004f08: 02 80 00 08 be 40004f28 40004f0c: 01 00 00 00 nop 40004f10: 2a 80 00 0a bcs,a 40004f38 40004f14: c6 02 21 70 ld [ %o0 + 0x170 ], %g3 40004f18: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40004f1c: 02 80 00 21 be 40004fa0 <== NOT EXECUTED 40004f20: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 40004f24: 30 80 00 1d b,a 40004f98 <== NOT EXECUTED case OBJECTS_ERROR: return EINVAL; case OBJECTS_REMOTE: return POSIX_MP_NOT_IMPLEMENTED(); 40004f28: 40 00 02 9b call 40005994 <== NOT EXECUTED 40004f2c: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40004f30: 81 c7 e0 08 ret <== NOT EXECUTED 40004f34: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: return POSIX_MP_NOT_IMPLEMENTED(); case OBJECTS_LOCAL: thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; thread_support->cancelation_requested = 1; 40004f38: 82 10 20 01 mov 1, %g1 if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 40004f3c: c4 00 e0 cc ld [ %g3 + 0xcc ], %g2 40004f40: 80 a0 a0 00 cmp %g2, 0 40004f44: 12 80 00 08 bne 40004f64 40004f48: c2 20 e0 d4 st %g1, [ %g3 + 0xd4 ] 40004f4c: c2 00 e0 d0 ld [ %g3 + 0xd0 ], %g1 40004f50: 80 a0 60 01 cmp %g1, 1 40004f54: 12 80 00 04 bne 40004f64 40004f58: 01 00 00 00 nop thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS ) { _POSIX_Threads_cancel_run( the_thread ); 40004f5c: 40 00 00 14 call 40004fac <_POSIX_Threads_cancel_run> 40004f60: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40004f64: 03 10 00 5b sethi %hi(0x40016c00), %g1 40004f68: c4 00 62 20 ld [ %g1 + 0x220 ], %g2 ! 40016e20 <_Thread_Dispatch_disable_level> 40004f6c: 90 10 20 00 clr %o0 40004f70: 84 00 bf ff add %g2, -1, %g2 40004f74: c4 20 62 20 st %g2, [ %g1 + 0x220 ] 40004f78: c2 00 62 20 ld [ %g1 + 0x220 ], %g1 40004f7c: 80 a0 60 00 cmp %g1, 0 40004f80: 32 80 00 09 bne,a 40004fa4 40004f84: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED _Thread_Dispatch(); 40004f88: 40 00 11 92 call 400095d0 <_Thread_Dispatch> 40004f8c: 01 00 00 00 nop 40004f90: 10 80 00 04 b 40004fa0 40004f94: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40004f98: 40 00 02 75 call 4000596c <== NOT EXECUTED 40004f9c: 01 00 00 00 nop <== NOT EXECUTED } 40004fa0: b0 10 00 08 mov %o0, %i0 40004fa4: 81 c7 e0 08 ret 40004fa8: 81 e8 00 00 restore 40006148 : */ int pthread_cond_destroy( pthread_cond_t *cond ) { 40006148: 9d e3 bf 90 save %sp, -112, %sp ) { Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 4000614c: 80 a6 20 00 cmp %i0, 0 40006150: 32 80 00 05 bne,a 40006164 40006154: c2 06 00 00 ld [ %i0 ], %g1 *location = OBJECTS_ERROR; 40006158: 82 10 20 02 mov 2, %g1 4000615c: 10 80 00 14 b 400061ac 40006160: c2 27 bf f4 st %g1, [ %fp + -12 ] return (POSIX_Condition_variables_Control *) 0; } if ( *id == PTHREAD_COND_INITIALIZER ) { 40006164: 80 a0 7f ff cmp %g1, -1 40006168: 32 80 00 0c bne,a 40006198 4000616c: d2 06 00 00 ld [ %i0 ], %o1 /* * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); 40006170: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40006174: 40 00 00 41 call 40006278 <== NOT EXECUTED 40006178: 92 10 20 00 clr %o1 <== NOT EXECUTED if ( status ) { 4000617c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40006180: 22 80 00 06 be,a 40006198 <== NOT EXECUTED 40006184: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED *location = OBJECTS_ERROR; 40006188: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 4000618c: b0 10 20 00 clr %i0 <== NOT EXECUTED 40006190: 10 80 00 07 b 400061ac <== NOT EXECUTED 40006194: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 40006198: 11 10 00 62 sethi %hi(0x40018800), %o0 4000619c: 94 07 bf f4 add %fp, -12, %o2 400061a0: 40 00 0f 40 call 40009ea0 <_Objects_Get> 400061a4: 90 12 20 6c or %o0, 0x6c, %o0 400061a8: b0 10 00 08 mov %o0, %i0 POSIX_Condition_variables_Control *the_cond; Objects_Locations location; the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { 400061ac: c2 07 bf f4 ld [ %fp + -12 ], %g1 400061b0: 80 a0 60 00 cmp %g1, 0 400061b4: 02 80 00 05 be 400061c8 400061b8: 80 a0 60 02 cmp %g1, 2 400061bc: 08 80 00 20 bleu 4000623c 400061c0: 90 10 20 16 mov 0x16, %o0 400061c4: 30 80 00 1c b,a 40006234 <== NOT EXECUTED return EINVAL; case OBJECTS_LOCAL: if ( _Thread_queue_First( &the_cond->Wait_queue ) ) { 400061c8: 40 00 16 32 call 4000ba90 <_Thread_queue_First> 400061cc: 90 06 20 18 add %i0, 0x18, %o0 400061d0: 80 a2 20 00 cmp %o0, 0 400061d4: 02 80 00 06 be 400061ec 400061d8: 03 10 00 62 sethi %hi(0x40018800), %g1 _Thread_Enable_dispatch(); 400061dc: 7f ff ff ce call 40006114 <_Thread_Enable_dispatch> 400061e0: 01 00 00 00 nop 400061e4: 10 80 00 16 b 4000623c 400061e8: 90 10 20 10 mov 0x10, %o0 ! 10 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 400061ec: c6 06 20 08 ld [ %i0 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400061f0: 90 10 60 6c or %g1, 0x6c, %o0 400061f4: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 400061f8: 03 00 00 3f sethi %hi(0xfc00), %g1 400061fc: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40006200: 82 08 c0 01 and %g3, %g1, %g1 40006204: 80 a0 40 02 cmp %g1, %g2 40006208: 18 80 00 05 bgu 4000621c 4000620c: 92 10 00 18 mov %i0, %o1 information->local_table[ index ] = the_object; 40006210: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40006214: 83 28 60 02 sll %g1, 2, %g1 40006218: c0 20 80 01 clr [ %g2 + %g1 ] RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free ( POSIX_Condition_variables_Control *the_condition_variable ) { _Objects_Free( 4000621c: 40 00 0e df call 40009d98 <_Objects_Free> 40006220: c0 26 20 0c clr [ %i0 + 0xc ] 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 40006224: 7f ff ff bc call 40006114 <_Thread_Enable_dispatch> 40006228: 01 00 00 00 nop 4000622c: 10 80 00 04 b 4000623c 40006230: 90 10 20 00 clr %o0 ! 0 return 0; } return POSIX_BOTTOM_REACHED(); 40006234: 40 00 04 cb call 40007560 <== NOT EXECUTED 40006238: 01 00 00 00 nop <== NOT EXECUTED } 4000623c: 81 c7 e0 08 ret 40006240: 91 e8 00 08 restore %g0, %o0, %o0 40006278 : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 40006278: 9d e3 bf 98 save %sp, -104, %sp POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 4000627c: 03 10 00 59 sethi %hi(0x40016400), %g1 int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 40006280: a4 10 00 18 mov %i0, %l2 POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 40006284: 80 a6 60 00 cmp %i1, 0 40006288: 02 80 00 03 be 40006294 4000628c: a0 10 61 94 or %g1, 0x194, %l0 40006290: a0 10 00 19 mov %i1, %l0 /* * XXX: Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 40006294: c2 04 20 04 ld [ %l0 + 4 ], %g1 40006298: 80 a0 60 01 cmp %g1, 1 4000629c: 32 80 00 04 bne,a 400062ac 400062a0: c2 04 00 00 ld [ %l0 ], %g1 return POSIX_MP_NOT_IMPLEMENTED(); 400062a4: 40 00 04 b9 call 40007588 <== NOT EXECUTED 400062a8: 81 e8 00 00 restore <== NOT EXECUTED if ( !the_attr->is_initialized ) 400062ac: 80 a0 60 00 cmp %g1, 0 400062b0: 02 80 00 0e be 400062e8 400062b4: b0 10 20 16 mov 0x16, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400062b8: 05 10 00 60 sethi %hi(0x40018000), %g2 400062bc: c2 00 a3 20 ld [ %g2 + 0x320 ], %g1 ! 40018320 <_Thread_Dispatch_disable_level> 400062c0: 82 00 60 01 inc %g1 400062c4: c2 20 a3 20 st %g1, [ %g2 + 0x320 ] */ RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) 400062c8: 23 10 00 62 sethi %hi(0x40018800), %l1 400062cc: 40 00 0d b1 call 40009990 <_Objects_Allocate> 400062d0: 90 14 60 6c or %l1, 0x6c, %o0 ! 4001886c <_POSIX_Condition_variables_Information> _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { 400062d4: b2 92 20 00 orcc %o0, 0, %i1 400062d8: 32 80 00 06 bne,a 400062f0 400062dc: c2 04 20 04 ld [ %l0 + 4 ], %g1 _Thread_Enable_dispatch(); 400062e0: 7f ff ff d9 call 40006244 <_Thread_Enable_dispatch> 400062e4: b0 10 20 0c mov 0xc, %i0 400062e8: 81 c7 e0 08 ret 400062ec: 81 e8 00 00 restore the_cond->process_shared = the_attr->process_shared; the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( 400062f0: 90 06 60 18 add %i1, 0x18, %o0 _Thread_Enable_dispatch(); return EAGAIN; } #endif the_cond->process_shared = the_attr->process_shared; 400062f4: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 400062f8: c0 26 60 14 clr [ %i1 + 0x14 ] /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( 400062fc: 92 10 20 00 clr %o1 40006300: 94 10 28 00 mov 0x800, %o2 40006304: 40 00 16 0d call 4000bb38 <_Thread_queue_Initialize> 40006308: 96 10 20 74 mov 0x74, %o3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000630c: 90 14 60 6c or %l1, 0x6c, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 40006310: c4 06 60 08 ld [ %i1 + 8 ], %g2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006314: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 40006318: 03 00 00 3f sethi %hi(0xfc00), %g1 4000631c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40006320: 82 08 80 01 and %g2, %g1, %g1 40006324: 80 a0 40 03 cmp %g1, %g3 40006328: 38 80 00 06 bgu,a 40006340 4000632c: c2 06 60 08 ld [ %i1 + 8 ], %g1 <== NOT EXECUTED information->local_table[ index ] = the_object; 40006330: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40006334: 83 28 60 02 sll %g1, 2, %g1 40006338: f2 20 80 01 st %i1, [ %g2 + %g1 ] &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; 4000633c: c2 06 60 08 ld [ %i1 + 8 ], %g1 if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 40006340: c0 26 60 0c clr [ %i1 + 0xc ] 40006344: c2 24 80 00 st %g1, [ %l2 ] 0, /* Name not used */ 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 40006348: 7f ff ff bf call 40006244 <_Thread_Enable_dispatch> 4000634c: b0 10 20 00 clr %i0 return 0; } 40006350: 81 c7 e0 08 ret 40006354: 81 e8 00 00 restore 4000608c : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 4000608c: 9d e3 bf 68 save %sp, -152, %sp Thread_Control *the_thread; POSIX_API_Control *api; int schedpolicy = SCHED_RR; struct sched_param schedparam; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 40006090: 03 10 00 6f sethi %hi(0x4001bc00), %g1 pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 40006094: ac 10 00 18 mov %i0, %l6 Thread_Control *the_thread; POSIX_API_Control *api; int schedpolicy = SCHED_RR; struct sched_param schedparam; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 40006098: 80 a6 60 00 cmp %i1, 0 4000609c: 02 80 00 03 be 400060a8 400060a0: a2 10 60 a0 or %g1, 0xa0, %l1 400060a4: a2 10 00 19 mov %i1, %l1 if ( !the_attr->is_initialized ) 400060a8: c2 04 40 00 ld [ %l1 ], %g1 400060ac: 80 a0 60 00 cmp %g1, 0 400060b0: 02 80 00 65 be 40006244 400060b4: b0 10 20 16 mov 0x16, %i0 /* * Core Thread Initialize insures we get the minimum amount of * stack space if it is allowed to allocate it itself. */ if ( the_attr->stackaddr && !_Stack_Is_enough( the_attr->stacksize ) ) 400060b8: c2 04 60 04 ld [ %l1 + 4 ], %g1 400060bc: 80 a0 60 00 cmp %g1, 0 400060c0: 22 80 00 07 be,a 400060dc 400060c4: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 400060c8: c2 04 60 08 ld [ %l1 + 8 ], %g1 400060cc: 80 a0 6f ff cmp %g1, 0xfff 400060d0: 08 80 00 8b bleu 400062fc 400060d4: 01 00 00 00 nop * 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 ) { 400060d8: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 <== NOT EXECUTED 400060dc: 80 a0 60 01 cmp %g1, 1 400060e0: 02 80 00 06 be 400060f8 400060e4: 80 a0 60 02 cmp %g1, 2 400060e8: 12 80 00 57 bne 40006244 400060ec: b0 10 20 16 mov 0x16, %i0 schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 400060f0: 10 80 00 0a b 40006118 400060f4: e4 04 60 14 ld [ %l1 + 0x14 ], %l2 * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 400060f8: 03 10 00 77 sethi %hi(0x4001dc00), %g1 400060fc: c2 00 60 0c ld [ %g1 + 0xc ], %g1 ! 4001dc0c <_Thread_Executing> schedpolicy = api->schedpolicy; schedparam = api->schedparam; 40006100: 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 ]; 40006104: d2 00 61 70 ld [ %g1 + 0x170 ], %o1 schedpolicy = api->schedpolicy; schedparam = api->schedparam; 40006108: 94 10 20 18 mov 0x18, %o2 */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; schedpolicy = api->schedpolicy; 4000610c: e4 02 60 7c ld [ %o1 + 0x7c ], %l2 schedparam = api->schedparam; 40006110: 10 80 00 05 b 40006124 40006114: 92 02 60 80 add %o1, 0x80, %o1 break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; schedparam = the_attr->schedparam; 40006118: 90 07 bf e0 add %fp, -32, %o0 4000611c: 92 04 60 18 add %l1, 0x18, %o1 40006120: 94 10 20 18 mov 0x18, %o2 40006124: 40 00 28 62 call 400102ac 40006128: 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 ) 4000612c: c2 04 60 0c ld [ %l1 + 0xc ], %g1 40006130: 80 a0 60 00 cmp %g1, 0 40006134: 12 80 00 44 bne 40006244 40006138: ea 07 bf e0 ld [ %fp + -32 ], %l5 /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 4000613c: 82 05 7f ff add %l5, -1, %g1 40006140: 80 a0 60 fd cmp %g1, 0xfd 40006144: 18 80 00 6d bgu 400062f8 40006148: 80 a4 a0 01 cmp %l2, 1 */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 4000614c: 02 80 00 10 be 4000618c 40006150: a0 10 20 00 clr %l0 40006154: 14 80 00 08 bg 40006174 40006158: 80 a4 a0 02 cmp %l2, 2 4000615c: 80 a4 a0 00 cmp %l2, 0 40006160: a0 10 20 01 mov 1, %l0 40006164: 02 80 00 1a be 400061cc 40006168: a8 10 20 00 clr %l4 *thread = the_thread->Object.id; _Thread_Enable_dispatch(); return 0; 4000616c: 81 c7 e0 08 ret 40006170: 91 e8 20 16 restore %g0, 0x16, %o0 */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 40006174: 02 80 00 05 be 40006188 40006178: 80 a4 a0 03 cmp %l2, 3 4000617c: 12 80 00 32 bne 40006244 40006180: b0 10 20 16 mov 0x16, %i0 40006184: 30 80 00 04 b,a 40006194 40006188: a0 10 20 02 mov 2, %l0 <== NOT EXECUTED 4000618c: 10 80 00 10 b 400061cc 40006190: a8 10 20 00 clr %l4 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 ) < 40006194: 40 00 16 1c call 4000ba04 <_Timespec_To_ticks> 40006198: 90 07 bf e8 add %fp, -24, %o0 4000619c: a0 10 00 08 mov %o0, %l0 400061a0: 40 00 16 19 call 4000ba04 <_Timespec_To_ticks> 400061a4: 90 07 bf f0 add %fp, -16, %o0 400061a8: 80 a4 00 08 cmp %l0, %o0 400061ac: 0a 80 00 53 bcs 400062f8 400061b0: 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 ) ) 400061b4: 82 00 7f ff add %g1, -1, %g1 400061b8: 80 a0 60 fd cmp %g1, 0xfd 400061bc: 18 80 00 4f bgu 400062f8 400061c0: 03 10 00 19 sethi %hi(0x40006400), %g1 400061c4: a0 10 20 03 mov 3, %l0 400061c8: a8 10 62 b4 or %g1, 0x2b4, %l4 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400061cc: 05 10 00 76 sethi %hi(0x4001d800), %g2 400061d0: c2 00 a3 30 ld [ %g2 + 0x330 ], %g1 ! 4001db30 <_Thread_Dispatch_disable_level> 400061d4: 82 00 60 01 inc %g1 400061d8: c2 20 a3 30 st %g1, [ %g2 + 0x330 ] * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 400061dc: 27 10 00 77 sethi %hi(0x4001dc00), %l3 400061e0: 40 00 0b 9d call 40009054 <_Objects_Allocate> 400061e4: 90 14 e2 18 or %l3, 0x218, %o0 ! 4001de18 <_POSIX_Threads_Information> * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 400061e8: b2 92 20 00 orcc %o0, 0, %i1 400061ec: 02 80 00 14 be 4000623c 400061f0: 90 14 e2 18 or %l3, 0x218, %o0 /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 400061f4: d4 04 60 04 ld [ %l1 + 4 ], %o2 400061f8: d6 04 60 08 ld [ %l1 + 8 ], %o3 400061fc: e0 23 a0 60 st %l0, [ %sp + 0x60 ] 40006200: e8 23 a0 64 st %l4, [ %sp + 0x64 ] 40006204: c0 23 a0 68 clr [ %sp + 0x68 ] 40006208: c0 23 a0 6c clr [ %sp + 0x6c ] 4000620c: 9a 10 20 ff mov 0xff, %o5 40006210: a6 10 20 01 mov 1, %l3 40006214: 9a 23 40 15 sub %o5, %l5, %o5 40006218: e6 23 a0 5c st %l3, [ %sp + 0x5c ] 4000621c: 92 10 00 19 mov %i1, %o1 40006220: 40 00 11 ed call 4000a9d4 <_Thread_Initialize> 40006224: 98 10 20 00 clr %o4 budget_callout, 0, /* isr level */ NULL /* posix threads don't have a name */ ); if ( !status ) { 40006228: 80 a2 20 00 cmp %o0, 0 4000622c: 32 80 00 08 bne,a 4000624c 40006230: e0 06 61 70 ld [ %i1 + 0x170 ], %l0 _POSIX_Threads_Free( the_thread ); 40006234: 7f ff ff 82 call 4000603c <_POSIX_Threads_Free> 40006238: 90 10 00 19 mov %i1, %o0 _Thread_Enable_dispatch(); 4000623c: 7f ff ff 87 call 40006058 <_Thread_Enable_dispatch> 40006240: b0 10 20 0b mov 0xb, %i0 40006244: 81 c7 e0 08 ret 40006248: 81 e8 00 00 restore */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; 4000624c: 92 10 00 11 mov %l1, %o1 40006250: 94 10 20 38 mov 0x38, %o2 40006254: 40 00 28 16 call 400102ac 40006258: 90 10 00 10 mov %l0, %o0 api->detachstate = the_attr->detachstate; 4000625c: c2 04 60 34 ld [ %l1 + 0x34 ], %g1 api->schedpolicy = schedpolicy; api->schedparam = schedparam; 40006260: 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; 40006264: c2 24 20 38 st %g1, [ %l0 + 0x38 ] api->schedpolicy = schedpolicy; api->schedparam = schedparam; 40006268: 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; 4000626c: e4 24 20 7c st %l2, [ %l0 + 0x7c ] api->schedparam = schedparam; 40006270: 40 00 28 0f call 400102ac 40006274: 90 04 20 80 add %l0, 0x80, %o0 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 40006278: 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; 4000627c: e6 26 60 78 st %l3, [ %i1 + 0x78 ] /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 40006280: 96 10 00 1b mov %i3, %o3 40006284: 90 10 00 19 mov %i1, %o0 40006288: 92 10 20 01 mov 1, %o1 4000628c: 40 00 15 27 call 4000b728 <_Thread_Start> 40006290: 98 10 20 00 clr %o4 start_routine, arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { 40006294: 80 a4 a0 03 cmp %l2, 3 40006298: 12 80 00 09 bne 400062bc 4000629c: a2 10 00 08 mov %o0, %l1 _Watchdog_Insert_ticks( 400062a0: 40 00 15 d9 call 4000ba04 <_Timespec_To_ticks> 400062a4: 90 04 20 88 add %l0, 0x88, %o0 400062a8: 92 04 20 9c add %l0, 0x9c, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 400062ac: d0 24 20 a8 st %o0, [ %l0 + 0xa8 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400062b0: 11 10 00 77 sethi %hi(0x4001dc00), %o0 400062b4: 40 00 16 cd call 4000bde8 <_Watchdog_Insert> 400062b8: 90 12 20 2c or %o0, 0x2c, %o0 ! 4001dc2c <_Watchdog_Ticks_chain> /* * _Thread_Start only fails if the thread was in the incorrect state */ if ( !status ) { 400062bc: 80 a4 60 00 cmp %l1, 0 400062c0: 12 80 00 08 bne 400062e0 400062c4: 90 10 00 19 mov %i1, %o0 _POSIX_Threads_Free( the_thread ); 400062c8: 7f ff ff 5d call 4000603c <_POSIX_Threads_Free> <== NOT EXECUTED 400062cc: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 400062d0: 7f ff ff 62 call 40006058 <_Thread_Enable_dispatch> <== NOT EXECUTED 400062d4: 01 00 00 00 nop <== NOT EXECUTED 400062d8: 81 c7 e0 08 ret <== NOT EXECUTED 400062dc: 81 e8 00 00 restore <== NOT EXECUTED /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 400062e0: c2 06 60 08 ld [ %i1 + 8 ], %g1 _Thread_Enable_dispatch(); 400062e4: b0 10 20 00 clr %i0 400062e8: 7f ff ff 5c call 40006058 <_Thread_Enable_dispatch> 400062ec: c2 25 80 00 st %g1, [ %l6 ] 400062f0: 81 c7 e0 08 ret 400062f4: 81 e8 00 00 restore return 0; 400062f8: b0 10 20 16 mov 0x16, %i0 } 400062fc: 81 c7 e0 08 ret 40006300: 81 e8 00 00 restore 40005740 : #include int pthread_detach( pthread_t thread ) { 40005740: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 40005744: 11 10 00 5b sethi %hi(0x40016c00), %o0 40005748: 92 10 00 18 mov %i0, %o1 4000574c: 90 12 22 d8 or %o0, 0x2d8, %o0 40005750: 40 00 0b ff call 4000874c <_Objects_Get> 40005754: 94 07 bf f4 add %fp, -12, %o2 register Thread_Control *the_thread; POSIX_API_Control *api; Objects_Locations location; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 40005758: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000575c: 80 a0 60 00 cmp %g1, 0 40005760: 22 80 00 06 be,a 40005778 40005764: c2 02 21 70 ld [ %o0 + 0x170 ], %g1 40005768: 80 a0 60 02 cmp %g1, 2 4000576c: 08 80 00 13 bleu 400057b8 40005770: 90 10 20 03 mov 3, %o0 40005774: 30 80 00 0f b,a 400057b0 <== NOT EXECUTED case OBJECTS_REMOTE: return ESRCH; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->detachstate = PTHREAD_CREATE_DETACHED; 40005778: c0 20 60 38 clr [ %g1 + 0x38 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000577c: 05 10 00 5a sethi %hi(0x40016800), %g2 40005780: c2 00 a3 f0 ld [ %g2 + 0x3f0 ], %g1 ! 40016bf0 <_Thread_Dispatch_disable_level> 40005784: 90 10 20 00 clr %o0 40005788: 82 00 7f ff add %g1, -1, %g1 4000578c: c2 20 a3 f0 st %g1, [ %g2 + 0x3f0 ] 40005790: c2 00 a3 f0 ld [ %g2 + 0x3f0 ], %g1 40005794: 80 a0 60 00 cmp %g1, 0 40005798: 12 80 00 08 bne 400057b8 4000579c: 01 00 00 00 nop _Thread_Dispatch(); 400057a0: 40 00 10 a0 call 40009a20 <_Thread_Dispatch> 400057a4: 01 00 00 00 nop 400057a8: 10 80 00 04 b 400057b8 400057ac: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 400057b0: 40 00 01 82 call 40005db8 <== NOT EXECUTED 400057b4: 01 00 00 00 nop <== NOT EXECUTED } 400057b8: 81 c7 e0 08 ret 400057bc: 91 e8 00 08 restore %g0, %o0, %o0 4000daa8 : #include void pthread_exit( void *value_ptr ) { 4000daa8: 9d e3 bf 98 save %sp, -104, %sp Objects_Information *the_information; the_information = _Objects_Get_information( _Thread_Executing->Object.id ); 4000daac: 25 10 00 67 sethi %hi(0x40019c00), %l2 4000dab0: c2 04 a2 fc ld [ %l2 + 0x2fc ], %g1 ! 40019efc <_Thread_Executing> 4000dab4: c6 00 60 08 ld [ %g1 + 8 ], %g3 if ( !_Objects_Is_class_valid( the_class ) ) return NULL; the_api = _Objects_Get_API( id ); return _Objects_Information_table[ the_api ][ the_class ]; 4000dab8: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000dabc: 85 30 e0 16 srl %g3, 0x16, %g2 4000dac0: 82 10 61 80 or %g1, 0x180, %g1 4000dac4: 84 08 a0 1c and %g2, 0x1c, %g2 4000dac8: c2 00 40 02 ld [ %g1 + %g2 ], %g1 4000dacc: 87 30 e0 1b srl %g3, 0x1b, %g3 4000dad0: 87 28 e0 02 sll %g3, 2, %g3 4000dad4: e2 00 40 03 ld [ %g1 + %g3 ], %l1 /* This should never happen if _Thread_Get() works right */ assert( the_information ); 4000dad8: 80 a4 60 00 cmp %l1, 0 4000dadc: 12 80 00 09 bne 4000db00 4000dae0: 21 10 00 67 sethi %hi(0x40019c00), %l0 4000dae4: 11 10 00 61 sethi %hi(0x40018400), %o0 <== NOT EXECUTED 4000dae8: 15 10 00 61 sethi %hi(0x40018400), %o2 <== NOT EXECUTED 4000daec: 90 12 20 60 or %o0, 0x60, %o0 <== NOT EXECUTED 4000daf0: 94 12 a0 a8 or %o2, 0xa8, %o2 <== NOT EXECUTED 4000daf4: 7f ff d0 f0 call 40001eb4 <__assert> <== NOT EXECUTED 4000daf8: 92 10 20 25 mov 0x25, %o1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000dafc: 21 10 00 67 sethi %hi(0x40019c00), %l0 <== NOT EXECUTED 4000db00: c2 04 22 20 ld [ %l0 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> 4000db04: 82 00 60 01 inc %g1 4000db08: c2 24 22 20 st %g1, [ %l0 + 0x220 ] _Thread_Disable_dispatch(); _Thread_Executing->Wait.return_argument = value_ptr; 4000db0c: d2 04 a2 fc ld [ %l2 + 0x2fc ], %o1 _Thread_Close( the_information, _Thread_Executing ); 4000db10: 90 10 00 11 mov %l1, %o0 4000db14: 7f ff eb 89 call 40008938 <_Thread_Close> 4000db18: f0 22 60 28 st %i0, [ %o1 + 0x28 ] RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 4000db1c: d2 04 a2 fc ld [ %l2 + 0x2fc ], %o1 4000db20: 11 10 00 68 sethi %hi(0x4001a000), %o0 4000db24: 7f ff e6 d4 call 40007674 <_Objects_Free> 4000db28: 90 12 21 08 or %o0, 0x108, %o0 ! 4001a108 <_POSIX_Threads_Information> #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000db2c: c2 04 22 20 ld [ %l0 + 0x220 ], %g1 4000db30: 82 00 7f ff add %g1, -1, %g1 4000db34: c2 24 22 20 st %g1, [ %l0 + 0x220 ] 4000db38: c2 04 22 20 ld [ %l0 + 0x220 ], %g1 4000db3c: 80 a0 60 00 cmp %g1, 0 4000db40: 12 80 00 04 bne 4000db50 4000db44: 01 00 00 00 nop _Thread_Dispatch(); 4000db48: 7f ff ec 01 call 40008b4c <_Thread_Dispatch> 4000db4c: 81 e8 00 00 restore 4000db50: 81 c7 e0 08 ret <== NOT EXECUTED 4000db54: 81 e8 00 00 restore <== NOT EXECUTED 40007cc8 : int pthread_getschedparam( pthread_t thread, int *policy, struct sched_param *param ) { 40007cc8: 9d e3 bf 90 save %sp, -112, %sp Objects_Locations location; POSIX_API_Control *api; register Thread_Control *the_thread; if ( !policy || !param ) 40007ccc: 80 a6 60 00 cmp %i1, 0 40007cd0: 02 80 00 05 be 40007ce4 40007cd4: 92 10 00 18 mov %i0, %o1 40007cd8: 80 a6 a0 00 cmp %i2, 0 40007cdc: 32 80 00 04 bne,a 40007cec 40007ce0: 11 10 00 68 sethi %hi(0x4001a000), %o0 40007ce4: 10 80 00 27 b 40007d80 40007ce8: 90 10 20 16 mov 0x16, %o0 RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 40007cec: 94 07 bf f4 add %fp, -12, %o2 40007cf0: 40 00 0c 13 call 4000ad3c <_Objects_Get> 40007cf4: 90 12 23 f8 or %o0, 0x3f8, %o0 return EINVAL; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 40007cf8: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007cfc: 80 a0 60 00 cmp %g1, 0 40007d00: 02 80 00 06 be 40007d18 40007d04: b0 10 00 08 mov %o0, %i0 40007d08: 80 a0 60 02 cmp %g1, 2 40007d0c: 08 80 00 1d bleu 40007d80 40007d10: 90 10 20 03 mov 3, %o0 40007d14: 30 80 00 19 b,a 40007d78 <== NOT EXECUTED case OBJECTS_ERROR: case OBJECTS_REMOTE: return ESRCH; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 40007d18: d2 02 21 70 ld [ %o0 + 0x170 ], %o1 if ( policy ) *policy = api->schedpolicy; if ( param ) { *param = api->schedparam; 40007d1c: 94 10 20 18 mov 0x18, %o2 case OBJECTS_REMOTE: return ESRCH; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( policy ) *policy = api->schedpolicy; 40007d20: c2 02 60 7c ld [ %o1 + 0x7c ], %g1 if ( param ) { *param = api->schedparam; 40007d24: 90 10 00 1a mov %i2, %o0 case OBJECTS_REMOTE: return ESRCH; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( policy ) *policy = api->schedpolicy; 40007d28: c2 26 40 00 st %g1, [ %i1 ] if ( param ) { *param = api->schedparam; 40007d2c: 40 00 28 05 call 40011d40 40007d30: 92 02 60 80 add %o1, 0x80, %o1 param->sched_priority = 40007d34: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 40007d38: 82 10 20 ff mov 0xff, %g1 40007d3c: 82 20 40 02 sub %g1, %g2, %g1 40007d40: c2 26 80 00 st %g1, [ %i2 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007d44: 05 10 00 68 sethi %hi(0x4001a000), %g2 40007d48: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 4001a110 <_Thread_Dispatch_disable_level> 40007d4c: 90 10 20 00 clr %o0 40007d50: 82 00 7f ff add %g1, -1, %g1 40007d54: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] 40007d58: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 40007d5c: 80 a0 60 00 cmp %g1, 0 40007d60: 12 80 00 08 bne 40007d80 40007d64: 01 00 00 00 nop _Thread_Dispatch(); 40007d68: 40 00 10 aa call 4000c010 <_Thread_Dispatch> 40007d6c: 01 00 00 00 nop 40007d70: 10 80 00 04 b 40007d80 40007d74: 90 10 20 00 clr %o0 ! 0 } _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40007d78: 40 00 01 8c call 400083a8 <== NOT EXECUTED 40007d7c: 01 00 00 00 nop <== NOT EXECUTED } 40007d80: 81 c7 e0 08 ret 40007d84: 91 e8 00 08 restore %g0, %o0, %o0 40005748 : */ void *pthread_getspecific( pthread_key_t key ) { 40005748: 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 *) 4000574c: 11 10 00 5c sethi %hi(0x40017000), %o0 40005750: 92 10 00 18 mov %i0, %o1 40005754: 90 12 23 10 or %o0, 0x310, %o0 40005758: 40 00 0c a5 call 400089ec <_Objects_Get> 4000575c: 94 07 bf f4 add %fp, -12, %o2 uint32_t index; Objects_Locations location; void *key_data; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 40005760: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005764: 80 a0 60 00 cmp %g1, 0 40005768: 22 80 00 06 be,a 40005780 4000576c: 03 10 00 5b sethi %hi(0x40016c00), %g1 40005770: 80 a0 60 02 cmp %g1, 2 40005774: 08 80 00 18 bleu 400057d4 40005778: b0 10 20 00 clr %i0 4000577c: 30 80 00 18 b,a 400057dc <== NOT EXECUTED case OBJECTS_ERROR: case OBJECTS_REMOTE: /* should never happen */ return NULL; case OBJECTS_LOCAL: api = _Objects_Get_API( _Thread_Executing->Object.id ); 40005780: c2 00 62 ec ld [ %g1 + 0x2ec ], %g1 40005784: c4 00 60 08 ld [ %g1 + 8 ], %g2 index = _Objects_Get_index( _Thread_Executing->Object.id ); key_data = (void *) the_key->Values[ api ][ index ]; 40005788: 83 30 a0 16 srl %g2, 0x16, %g1 4000578c: 82 08 60 1c and %g1, 0x1c, %g1 40005790: 82 00 40 08 add %g1, %o0, %g1 40005794: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 40005798: 03 00 00 3f sethi %hi(0xfc00), %g1 4000579c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400057a0: 84 08 80 01 and %g2, %g1, %g2 400057a4: 85 28 a0 02 sll %g2, 2, %g2 400057a8: f0 00 c0 02 ld [ %g3 + %g2 ], %i0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400057ac: 05 10 00 5b sethi %hi(0x40016c00), %g2 400057b0: c2 00 a2 10 ld [ %g2 + 0x210 ], %g1 ! 40016e10 <_Thread_Dispatch_disable_level> 400057b4: 82 00 7f ff add %g1, -1, %g1 400057b8: c2 20 a2 10 st %g1, [ %g2 + 0x210 ] 400057bc: c2 00 a2 10 ld [ %g2 + 0x210 ], %g1 400057c0: 80 a0 60 00 cmp %g1, 0 400057c4: 12 80 00 08 bne 400057e4 400057c8: 01 00 00 00 nop _Thread_Dispatch(); 400057cc: 40 00 11 3d call 40009cc0 <_Thread_Dispatch> 400057d0: 01 00 00 00 nop 400057d4: 81 c7 e0 08 ret 400057d8: 81 e8 00 00 restore _Thread_Enable_dispatch(); return key_data; } (void) POSIX_BOTTOM_REACHED(); 400057dc: 40 00 02 1f call 40006058 <== NOT EXECUTED 400057e0: b0 10 20 00 clr %i0 <== NOT EXECUTED return (void *)NULL; } 400057e4: 81 c7 e0 08 ret <== NOT EXECUTED 400057e8: 81 e8 00 00 restore <== NOT EXECUTED 400071dc : int pthread_join( pthread_t thread, void **value_ptr ) { 400071dc: 9d e3 bf 90 save %sp, -112, %sp 400071e0: 11 10 00 65 sethi %hi(0x40019400), %o0 400071e4: 92 10 00 18 mov %i0, %o1 400071e8: 90 12 21 78 or %o0, 0x178, %o0 400071ec: 40 00 0b d0 call 4000a12c <_Objects_Get> 400071f0: 94 07 bf f4 add %fp, -12, %o2 POSIX_API_Control *api; Objects_Locations location; void *return_pointer; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 400071f4: c2 07 bf f4 ld [ %fp + -12 ], %g1 400071f8: 80 a0 60 00 cmp %g1, 0 400071fc: 22 80 00 06 be,a 40007214 40007200: c4 02 21 70 ld [ %o0 + 0x170 ], %g2 40007204: 80 a0 60 02 cmp %g1, 2 40007208: 08 80 00 25 bleu 4000729c 4000720c: 90 10 20 03 mov 3, %o0 40007210: 30 80 00 21 b,a 40007294 <== NOT EXECUTED case OBJECTS_REMOTE: return ESRCH; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->detachstate == PTHREAD_CREATE_DETACHED ) { 40007214: c2 00 a0 38 ld [ %g2 + 0x38 ], %g1 40007218: 80 a0 60 00 cmp %g1, 0 4000721c: 12 80 00 06 bne 40007234 40007220: 03 10 00 64 sethi %hi(0x40019000), %g1 _Thread_Enable_dispatch(); 40007224: 7f ff ff e1 call 400071a8 <_Thread_Enable_dispatch> 40007228: 01 00 00 00 nop 4000722c: 10 80 00 1c b 4000729c 40007230: 90 10 20 16 mov 0x16, %o0 ! 16 RTEMS_INLINE_ROUTINE boolean _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 40007234: c6 00 63 6c ld [ %g1 + 0x36c ], %g3 return EINVAL; } if ( _Thread_Is_executing( the_thread ) ) { 40007238: 80 a2 00 03 cmp %o0, %g3 4000723c: 12 80 00 06 bne 40007254 40007240: 82 07 bf f0 add %fp, -16, %g1 _Thread_Enable_dispatch(); 40007244: 7f ff ff d9 call 400071a8 <_Thread_Enable_dispatch> 40007248: 01 00 00 00 nop 4000724c: 10 80 00 14 b 4000729c 40007250: 90 10 20 2d mov 0x2d, %o0 ! 2d _Thread_Executing->Wait.return_argument = &return_pointer; _Thread_queue_Enter_critical_section( &api->Join_List ); _Thread_queue_Enqueue( &api->Join_List, WATCHDOG_NO_TIMEOUT ); 40007254: 90 00 a0 3c add %g2, 0x3c, %o0 /* * Put ourself on the threads join list */ _Thread_Executing->Wait.return_argument = &return_pointer; 40007258: c2 20 e0 28 st %g1, [ %g3 + 0x28 ] _Thread_queue_Enter_critical_section( &api->Join_List ); _Thread_queue_Enqueue( &api->Join_List, WATCHDOG_NO_TIMEOUT ); 4000725c: 92 10 20 00 clr %o1 RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; 40007260: 82 10 20 01 mov 1, %g1 40007264: 15 10 00 2f sethi %hi(0x4000bc00), %o2 40007268: 94 12 a2 38 or %o2, 0x238, %o2 ! 4000be38 <_Thread_queue_Timeout> 4000726c: 40 00 11 cd call 4000b9a0 <_Thread_queue_Enqueue_with_handler> 40007270: c2 20 a0 6c st %g1, [ %g2 + 0x6c ] _Thread_Enable_dispatch(); 40007274: 7f ff ff cd call 400071a8 <_Thread_Enable_dispatch> 40007278: 01 00 00 00 nop if ( value_ptr ) 4000727c: 80 a6 60 00 cmp %i1, 0 40007280: 02 80 00 07 be 4000729c 40007284: 90 10 20 00 clr %o0 *value_ptr = return_pointer; 40007288: c2 07 bf f0 ld [ %fp + -16 ], %g1 4000728c: 10 80 00 04 b 4000729c 40007290: c2 26 40 00 st %g1, [ %i1 ] return 0; } return POSIX_BOTTOM_REACHED(); 40007294: 40 00 01 41 call 40007798 <== NOT EXECUTED 40007298: 01 00 00 00 nop <== NOT EXECUTED } 4000729c: 81 c7 e0 08 ret 400072a0: 91 e8 00 08 restore %g0, %o0, %o0 400054e0 : int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 400054e0: 9d e3 bf 98 save %sp, -104, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400054e4: 03 10 00 5b sethi %hi(0x40016c00), %g1 400054e8: c4 00 62 10 ld [ %g1 + 0x210 ], %g2 ! 40016e10 <_Thread_Dispatch_disable_level> 400054ec: 84 00 a0 01 inc %g2 400054f0: c4 20 62 10 st %g2, [ %g1 + 0x210 ] * _POSIX_Keys_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ) { return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information ); 400054f4: 11 10 00 5c sethi %hi(0x40017000), %o0 400054f8: 40 00 0b f9 call 400084dc <_Objects_Allocate> 400054fc: 90 12 23 10 or %o0, 0x310, %o0 ! 40017310 <_POSIX_Keys_Information> _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 40005500: a0 92 20 00 orcc %o0, 0, %l0 40005504: 12 80 00 06 bne 4000551c 40005508: 03 10 00 5b sethi %hi(0x40016c00), %g1 _Thread_Enable_dispatch(); 4000550c: 7f ff ff e8 call 400054ac <_Thread_Enable_dispatch> 40005510: b0 10 20 0b mov 0xb, %i0 40005514: 81 c7 e0 08 ret 40005518: 81 e8 00 00 restore return EAGAIN; } the_key->destructor = destructor; 4000551c: f2 24 20 14 st %i1, [ %l0 + 0x14 ] for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] && 40005520: aa 10 61 70 or %g1, 0x170, %l5 if ( !the_key ) { _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 40005524: a2 10 00 10 mov %l0, %l1 RTEMS_INLINE_ROUTINE void *_Workspace_Allocate( size_t size ) { return _Heap_Allocate( &_Workspace_Area, size ); 40005528: 03 10 00 5b sethi %hi(0x40016c00), %g1 4000552c: a6 10 20 01 mov 1, %l3 40005530: a8 10 62 5c or %g1, 0x25c, %l4 for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] && 40005534: a5 2c e0 02 sll %l3, 2, %l2 40005538: c2 04 80 15 ld [ %l2 + %l5 ], %g1 4000553c: 80 a0 60 00 cmp %g1, 0 40005540: 02 80 00 29 be 400055e4 40005544: 90 10 00 14 mov %l4, %o0 40005548: c2 00 60 04 ld [ %g1 + 4 ], %g1 4000554c: 80 a0 60 00 cmp %g1, 0 40005550: 22 80 00 26 be,a 400055e8 40005554: c0 24 60 1c clr [ %l1 + 0x1c ] <== NOT EXECUTED _Objects_Information_table[ the_api ][ 1 ] ) { bytes_to_allocate = sizeof( void * ) * 40005558: c2 10 60 10 lduh [ %g1 + 0x10 ], %g1 4000555c: 82 00 60 01 inc %g1 40005560: b3 28 60 02 sll %g1, 2, %i1 40005564: 40 00 0a 86 call 40007f7c <_Heap_Allocate> 40005568: 92 10 00 19 mov %i1, %o1 (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { 4000556c: 82 92 20 00 orcc %o0, 0, %g1 40005570: 32 80 00 18 bne,a 400055d0 40005574: c2 24 60 1c st %g1, [ %l1 + 0x1c ] 40005578: 82 04 a0 14 add %l2, 0x14, %g1 <== NOT EXECUTED 4000557c: b0 10 20 00 clr %i0 <== NOT EXECUTED 40005580: b2 04 00 01 add %l0, %g1, %i1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 40005584: 03 10 00 5b sethi %hi(0x40016c00), %g1 <== NOT EXECUTED 40005588: 10 80 00 05 b 4000559c <== NOT EXECUTED 4000558c: a2 10 62 5c or %g1, 0x25c, %l1 ! 40016e5c <_Workspace_Area> <== NOT EXECUTED 40005590: d2 06 60 04 ld [ %i1 + 4 ], %o1 <== NOT EXECUTED 40005594: 40 00 0a a1 call 40008018 <_Heap_Free> <== NOT EXECUTED 40005598: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000559c: b0 06 20 01 inc %i0 <== NOT EXECUTED for ( --the_api; the_api >= 1; 400055a0: 80 a6 00 13 cmp %i0, %l3 <== NOT EXECUTED 400055a4: 12 bf ff fb bne 40005590 <== NOT EXECUTED 400055a8: b2 06 7f fc add %i1, -4, %i1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 400055ac: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 400055b0: 11 10 00 5c sethi %hi(0x40017000), %o0 <== NOT EXECUTED 400055b4: 90 12 23 10 or %o0, 0x310, %o0 ! 40017310 <_POSIX_Keys_Information> <== NOT EXECUTED 400055b8: 40 00 0c cb call 400088e4 <_Objects_Free> <== NOT EXECUTED 400055bc: b0 10 20 0c mov 0xc, %i0 <== NOT EXECUTED the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 400055c0: 7f ff ff bb call 400054ac <_Thread_Enable_dispatch> <== NOT EXECUTED 400055c4: 01 00 00 00 nop <== NOT EXECUTED 400055c8: 81 c7 e0 08 ret <== NOT EXECUTED 400055cc: 81 e8 00 00 restore <== NOT EXECUTED return ENOMEM; } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); 400055d0: 94 10 00 19 mov %i1, %o2 400055d4: 40 00 29 21 call 4000fa58 400055d8: 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++ ) { 400055dc: 10 80 00 04 b 400055ec 400055e0: a6 04 e0 01 inc %l3 } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); } else { the_key->Values[ the_api ] = NULL; 400055e4: c0 24 60 1c clr [ %l1 + 0x1c ] * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 400055e8: a6 04 e0 01 inc %l3 * 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; 400055ec: 80 a4 e0 05 cmp %l3, 5 400055f0: 12 bf ff d1 bne 40005534 400055f4: a2 04 60 04 add %l1, 4, %l1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400055f8: 03 10 00 5c sethi %hi(0x40017000), %g1 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 400055fc: c6 04 20 08 ld [ %l0 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40005600: 88 10 63 10 or %g1, 0x310, %g4 40005604: c4 11 20 10 lduh [ %g4 + 0x10 ], %g2 } } the_key->is_active = TRUE; 40005608: 82 10 20 01 mov 1, %g1 4000560c: c2 24 20 10 st %g1, [ %l0 + 0x10 ] 40005610: 03 00 00 3f sethi %hi(0xfc00), %g1 40005614: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40005618: 82 08 c0 01 and %g3, %g1, %g1 4000561c: 80 a0 40 02 cmp %g1, %g2 40005620: 38 80 00 06 bgu,a 40005638 40005624: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED information->local_table[ index ] = the_object; 40005628: c4 01 20 20 ld [ %g4 + 0x20 ], %g2 4000562c: 83 28 60 02 sll %g1, 2, %g1 40005630: e0 20 80 01 st %l0, [ %g2 + %g1 ] _Objects_Open( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 40005634: c2 04 20 08 ld [ %l0 + 8 ], %g1 if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 40005638: c0 24 20 0c clr [ %l0 + 0xc ] 4000563c: c2 26 00 00 st %g1, [ %i0 ] _Thread_Enable_dispatch(); 40005640: 7f ff ff 9b call 400054ac <_Thread_Enable_dispatch> 40005644: b0 10 20 00 clr %i0 return 0; } 40005648: 81 c7 e0 08 ret 4000564c: 81 e8 00 00 restore 40005650 : */ int pthread_key_delete( pthread_key_t key ) { 40005650: 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 *) 40005654: 92 10 00 18 mov %i0, %o1 40005658: 94 07 bf f4 add %fp, -12, %o2 4000565c: 31 10 00 5c sethi %hi(0x40017000), %i0 40005660: 40 00 0c e3 call 400089ec <_Objects_Get> 40005664: 90 16 23 10 or %i0, 0x310, %o0 ! 40017310 <_POSIX_Keys_Information> register POSIX_Keys_Control *the_key; Objects_Locations location; uint32_t the_api; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 40005668: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000566c: 80 a0 60 00 cmp %g1, 0 40005670: 02 80 00 06 be 40005688 40005674: a0 10 00 08 mov %o0, %l0 40005678: 80 a0 60 02 cmp %g1, 2 4000567c: 08 80 00 31 bleu 40005740 40005680: 90 10 20 16 mov 0x16, %o0 40005684: 30 80 00 2d b,a 40005738 <== NOT EXECUTED Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40005688: 90 16 23 10 or %i0, 0x310, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 4000568c: c2 04 20 08 ld [ %l0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40005690: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 40005694: 05 00 00 3f sethi %hi(0xfc00), %g2 40005698: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 4000569c: 82 08 40 02 and %g1, %g2, %g1 400056a0: 80 a0 40 03 cmp %g1, %g3 400056a4: 38 80 00 06 bgu,a 400056bc 400056a8: 03 10 00 5b sethi %hi(0x40016c00), %g1 <== NOT EXECUTED information->local_table[ index ] = the_object; 400056ac: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 400056b0: 83 28 60 02 sll %g1, 2, %g1 400056b4: c0 20 80 01 clr [ %g2 + %g1 ] 400056b8: 03 10 00 5b sethi %hi(0x40016c00), %g1 uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 400056bc: c0 24 20 0c clr [ %l0 + 0xc ] case OBJECTS_REMOTE: /* should never happen */ return EINVAL; case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); the_key->is_active = FALSE; 400056c0: c0 24 20 10 clr [ %l0 + 0x10 ] 400056c4: a2 10 62 5c or %g1, 0x25c, %l1 400056c8: b0 10 20 00 clr %i0 for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) if ( the_key->Values[ the_api ] ) 400056cc: 82 04 00 18 add %l0, %i0, %g1 400056d0: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 400056d4: 80 a2 60 00 cmp %o1, 0 400056d8: 02 80 00 04 be 400056e8 400056dc: b0 06 20 04 add %i0, 4, %i0 400056e0: 40 00 0a 4e call 40008018 <_Heap_Free> 400056e4: 90 10 00 11 mov %l1, %o0 _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); the_key->is_active = FALSE; for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; 400056e8: 80 a6 20 10 cmp %i0, 0x10 400056ec: 12 bf ff f9 bne 400056d0 400056f0: 82 04 00 18 add %l0, %i0, %g1 RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 400056f4: 92 10 00 10 mov %l0, %o1 400056f8: 11 10 00 5c sethi %hi(0x40017000), %o0 400056fc: 40 00 0c 7a call 400088e4 <_Objects_Free> 40005700: 90 12 23 10 or %o0, 0x310, %o0 ! 40017310 <_POSIX_Keys_Information> #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40005704: 05 10 00 5b sethi %hi(0x40016c00), %g2 40005708: c2 00 a2 10 ld [ %g2 + 0x210 ], %g1 ! 40016e10 <_Thread_Dispatch_disable_level> 4000570c: 90 10 20 00 clr %o0 40005710: 82 00 7f ff add %g1, -1, %g1 40005714: c2 20 a2 10 st %g1, [ %g2 + 0x210 ] 40005718: c2 00 a2 10 ld [ %g2 + 0x210 ], %g1 4000571c: 80 a0 60 00 cmp %g1, 0 40005720: 12 80 00 08 bne 40005740 40005724: 01 00 00 00 nop _Thread_Dispatch(); 40005728: 40 00 11 66 call 40009cc0 <_Thread_Dispatch> 4000572c: 01 00 00 00 nop 40005730: 10 80 00 04 b 40005740 40005734: 90 10 20 00 clr %o0 ! 0 _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40005738: 40 00 02 48 call 40006058 <== NOT EXECUTED 4000573c: 01 00 00 00 nop <== NOT EXECUTED } 40005740: 81 c7 e0 08 ret 40005744: 91 e8 00 08 restore %g0, %o0, %o0 400227d0 : int pthread_kill( pthread_t thread, int sig ) { 400227d0: 9d e3 bf 90 save %sp, -112, %sp POSIX_API_Control *api; Thread_Control *the_thread; Objects_Locations location; if ( !sig ) 400227d4: 80 a6 60 00 cmp %i1, 0 400227d8: 02 80 00 06 be 400227f0 400227dc: 92 10 00 18 mov %i0, %o1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 400227e0: a0 06 7f ff add %i1, -1, %l0 400227e4: 80 a4 20 1f cmp %l0, 0x1f 400227e8: 28 80 00 06 bleu,a 40022800 400227ec: 11 10 00 a3 sethi %hi(0x40028c00), %o0 rtems_set_errno_and_return_minus_one( EINVAL ); 400227f0: 7f ff d0 16 call 40016848 <__errno> 400227f4: 01 00 00 00 nop 400227f8: 10 80 00 0f b 40022834 400227fc: 82 10 20 16 mov 0x16, %g1 ! 16 RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 40022800: 94 07 bf f4 add %fp, -12, %o2 40022804: 7f ff a5 f5 call 4000bfd8 <_Objects_Get> 40022808: 90 12 23 e4 or %o0, 0x3e4, %o0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) rtems_set_errno_and_return_minus_one( ENOSYS ); */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 4002280c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40022810: 80 a0 60 00 cmp %g1, 0 40022814: 02 80 00 0b be 40022840 40022818: b0 10 00 08 mov %o0, %i0 4002281c: 80 a0 60 02 cmp %g1, 2 40022820: 18 80 00 29 bgu 400228c4 40022824: 01 00 00 00 nop case OBJECTS_ERROR: case OBJECTS_REMOTE: rtems_set_errno_and_return_minus_one( ESRCH ); 40022828: 7f ff d0 08 call 40016848 <__errno> 4002282c: 01 00 00 00 nop 40022830: 82 10 20 03 mov 3, %g1 ! 3 40022834: c2 22 00 00 st %g1, [ %o0 ] 40022838: 10 80 00 25 b 400228cc 4002283c: 90 10 3f ff mov -1, %o0 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( sig ) { if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 40022840: 83 2e 60 02 sll %i1, 2, %g1 40022844: 85 2e 60 04 sll %i1, 4, %g2 40022848: 84 20 80 01 sub %g2, %g1, %g2 4002284c: 03 10 00 a4 sethi %hi(0x40029000), %g1 40022850: 82 10 63 c8 or %g1, 0x3c8, %g1 ! 400293c8 <_POSIX_signals_Vectors> 40022854: 84 00 80 01 add %g2, %g1, %g2 40022858: c2 00 a0 08 ld [ %g2 + 8 ], %g1 4002285c: 80 a0 60 01 cmp %g1, 1 40022860: 02 80 00 15 be 400228b4 40022864: c6 02 21 70 ld [ %o0 + 0x170 ], %g3 return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 40022868: c4 00 e0 c8 ld [ %g3 + 0xc8 ], %g2 (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 4002286c: 92 10 00 19 mov %i1, %o1 return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 40022870: b2 10 20 01 mov 1, %i1 40022874: 83 2e 40 10 sll %i1, %l0, %g1 40022878: 84 10 80 01 or %g2, %g1, %g2 (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 4002287c: 94 10 20 00 clr %o2 40022880: 7f ff ff 82 call 40022688 <_POSIX_signals_Unblock_thread> 40022884: 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 ) ) 40022888: 03 10 00 a3 sethi %hi(0x40028c00), %g1 4002288c: c2 00 61 74 ld [ %g1 + 0x174 ], %g1 ! 40028d74 <_ISR_Nest_level> 40022890: 80 a0 60 00 cmp %g1, 0 40022894: 02 80 00 08 be 400228b4 40022898: f2 26 20 78 st %i1, [ %i0 + 0x78 ] 4002289c: 03 10 00 a3 sethi %hi(0x40028c00), %g1 400228a0: c2 00 61 8c ld [ %g1 + 0x18c ], %g1 ! 40028d8c <_Thread_Executing> 400228a4: 80 a6 00 01 cmp %i0, %g1 400228a8: 12 80 00 03 bne 400228b4 400228ac: 03 10 00 a3 sethi %hi(0x40028c00), %g1 _ISR_Signals_to_thread_executing = TRUE; 400228b0: f2 20 62 38 st %i1, [ %g1 + 0x238 ] ! 40028e38 <_ISR_Signals_to_thread_executing> <== NOT EXECUTED } _Thread_Enable_dispatch(); 400228b4: 7f ff ff ba call 4002279c <_Thread_Enable_dispatch> 400228b8: 01 00 00 00 nop 400228bc: 10 80 00 04 b 400228cc 400228c0: 90 10 20 00 clr %o0 ! 0 return 0; } return POSIX_BOTTOM_REACHED(); 400228c4: 40 00 00 12 call 4002290c <== NOT EXECUTED 400228c8: 01 00 00 00 nop <== NOT EXECUTED } 400228cc: 81 c7 e0 08 ret 400228d0: 91 e8 00 08 restore %g0, %o0, %o0 4000703c : */ int pthread_mutex_destroy( pthread_mutex_t *mutex ) { 4000703c: 9d e3 bf 90 save %sp, -112, %sp Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40007040: 80 a6 20 00 cmp %i0, 0 40007044: 02 80 00 0d be 40007078 40007048: 82 10 20 02 mov 2, %g1 4000704c: c2 06 00 00 ld [ %i0 ], %g1 40007050: 80 a0 7f ff cmp %g1, -1 40007054: 32 80 00 0c bne,a 40007084 40007058: d2 06 00 00 ld [ %i0 ], %o1 4000705c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40007060: 40 00 00 7e call 40007258 <== NOT EXECUTED 40007064: 92 10 20 00 clr %o1 <== NOT EXECUTED 40007068: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000706c: 22 80 00 06 be,a 40007084 <== NOT EXECUTED 40007070: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED 40007074: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 40007078: a0 10 20 00 clr %l0 <== NOT EXECUTED 4000707c: 10 80 00 07 b 40007098 <== NOT EXECUTED 40007080: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED return (POSIX_Mutex_Control *) 40007084: 11 10 00 69 sethi %hi(0x4001a400), %o0 40007088: 94 07 bf f4 add %fp, -12, %o2 4000708c: 40 00 0f 2c call 4000ad3c <_Objects_Get> 40007090: 90 12 21 74 or %o0, 0x174, %o0 40007094: a0 10 00 08 mov %o0, %l0 register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { 40007098: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000709c: 80 a0 60 00 cmp %g1, 0 400070a0: 22 80 00 06 be,a 400070b8 400070a4: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 400070a8: 80 a0 60 02 cmp %g1, 2 400070ac: 08 80 00 23 bleu 40007138 400070b0: 90 10 20 16 mov 0x16, %o0 400070b4: 30 80 00 1f b,a 40007130 <== NOT EXECUTED /* * XXX: There is an error for the mutex being locked * or being in use by a condition variable. */ if ( _CORE_mutex_Is_locked( &the_mutex->Mutex ) ) { 400070b8: 80 a0 60 00 cmp %g1, 0 400070bc: 12 80 00 06 bne 400070d4 400070c0: 03 10 00 69 sethi %hi(0x4001a400), %g1 _Thread_Enable_dispatch(); 400070c4: 7f ff ff d1 call 40007008 <_Thread_Enable_dispatch> 400070c8: 01 00 00 00 nop 400070cc: 10 80 00 1b b 40007138 400070d0: 90 10 20 10 mov 0x10, %o0 ! 10 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 400070d4: c6 04 20 08 ld [ %l0 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400070d8: b0 10 61 74 or %g1, 0x174, %i0 400070dc: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 400070e0: 03 00 00 3f sethi %hi(0xfc00), %g1 400070e4: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400070e8: 82 08 c0 01 and %g3, %g1, %g1 400070ec: 80 a0 40 02 cmp %g1, %g2 400070f0: 18 80 00 05 bgu 40007104 400070f4: 94 10 20 16 mov 0x16, %o2 information->local_table[ index ] = the_object; 400070f8: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 400070fc: 83 28 60 02 sll %g1, 2, %g1 40007100: c0 20 80 01 clr [ %g2 + %g1 ] return EBUSY; } _Objects_Close( &_POSIX_Mutex_Information, &the_mutex->Object ); _CORE_mutex_Flush( 40007104: 90 04 20 14 add %l0, 0x14, %o0 40007108: 92 10 20 00 clr %o1 4000710c: 40 00 0b 21 call 40009d90 <_CORE_mutex_Flush> 40007110: c0 24 20 0c clr [ %l0 + 0xc ] RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free ( POSIX_Mutex_Control *the_mutex ) { _Objects_Free( &_POSIX_Mutex_Information, &the_mutex->Object ); 40007114: 90 10 00 18 mov %i0, %o0 40007118: 40 00 0e c7 call 4000ac34 <_Objects_Free> 4000711c: 92 10 00 10 mov %l0, %o1 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 40007120: 7f ff ff ba call 40007008 <_Thread_Enable_dispatch> 40007124: 01 00 00 00 nop 40007128: 10 80 00 04 b 40007138 4000712c: 90 10 20 00 clr %o0 ! 0 return 0; } return POSIX_BOTTOM_REACHED(); 40007130: 40 00 04 9e call 400083a8 <== NOT EXECUTED 40007134: 01 00 00 00 nop <== NOT EXECUTED } 40007138: 81 c7 e0 08 ret 4000713c: 91 e8 00 08 restore %g0, %o0, %o0 40007140 : int pthread_mutex_getprioceiling( pthread_mutex_t *mutex, int *prioceiling ) { 40007140: 9d e3 bf 90 save %sp, -112, %sp register POSIX_Mutex_Control *the_mutex; Objects_Locations location; if ( !prioceiling ) 40007144: 80 a6 60 00 cmp %i1, 0 40007148: 02 80 00 33 be 40007214 4000714c: 80 a6 20 00 cmp %i0, 0 Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40007150: 02 80 00 0d be 40007184 40007154: 82 10 20 02 mov 2, %g1 40007158: c2 06 00 00 ld [ %i0 ], %g1 4000715c: 80 a0 7f ff cmp %g1, -1 40007160: 32 80 00 0c bne,a 40007190 40007164: d2 06 00 00 ld [ %i0 ], %o1 40007168: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000716c: 40 00 00 3b call 40007258 <== NOT EXECUTED 40007170: 92 10 20 00 clr %o1 <== NOT EXECUTED 40007174: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40007178: 22 80 00 06 be,a 40007190 <== NOT EXECUTED 4000717c: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED 40007180: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 40007184: 90 10 20 00 clr %o0 <== NOT EXECUTED 40007188: 10 80 00 06 b 400071a0 <== NOT EXECUTED 4000718c: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED return (POSIX_Mutex_Control *) 40007190: 11 10 00 69 sethi %hi(0x4001a400), %o0 40007194: 94 07 bf f4 add %fp, -12, %o2 40007198: 40 00 0e e9 call 4000ad3c <_Objects_Get> 4000719c: 90 12 21 74 or %o0, 0x174, %o0 return EINVAL; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { 400071a0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400071a4: 80 a0 60 00 cmp %g1, 0 400071a8: 22 80 00 07 be,a 400071c4 400071ac: c4 02 20 60 ld [ %o0 + 0x60 ], %g2 400071b0: 80 a0 60 02 cmp %g1, 2 400071b4: 18 80 00 14 bgu 40007204 400071b8: 90 10 20 16 mov 0x16, %o0 ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 400071bc: 81 c7 e0 08 ret 400071c0: 91 e8 00 08 restore %g0, %o0, %o0 return POSIX_MP_NOT_IMPLEMENTED(); /* XXX feels questionable */ #endif case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: *prioceiling = _POSIX_Priority_From_core( 400071c4: 82 10 20 ff mov 0xff, %g1 400071c8: 82 20 40 02 sub %g1, %g2, %g1 400071cc: c2 26 40 00 st %g1, [ %i1 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400071d0: 05 10 00 68 sethi %hi(0x4001a000), %g2 400071d4: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 4001a110 <_Thread_Dispatch_disable_level> 400071d8: 90 10 20 00 clr %o0 400071dc: 82 00 7f ff add %g1, -1, %g1 400071e0: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] 400071e4: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 400071e8: 80 a0 60 00 cmp %g1, 0 400071ec: 32 80 00 0c bne,a 4000721c 400071f0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED _Thread_Dispatch(); 400071f4: 40 00 13 87 call 4000c010 <_Thread_Dispatch> 400071f8: 01 00 00 00 nop 400071fc: 10 80 00 07 b 40007218 40007200: 90 10 20 00 clr %o0 ! 0 the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40007204: 40 00 04 69 call 400083a8 <== NOT EXECUTED 40007208: 01 00 00 00 nop <== NOT EXECUTED } 4000720c: 81 c7 e0 08 ret <== NOT EXECUTED 40007210: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40007214: 90 10 20 16 mov 0x16, %o0 } 40007218: b0 10 00 08 mov %o0, %i0 4000721c: 81 c7 e0 08 ret 40007220: 81 e8 00 00 restore 40007258 : int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 40007258: 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; 4000725c: 03 10 00 60 sethi %hi(0x40018000), %g1 40007260: 80 a6 60 00 cmp %i1, 0 40007264: 02 80 00 03 be 40007270 40007268: a0 10 63 1c or %g1, 0x31c, %l0 4000726c: a0 10 00 19 mov %i1, %l0 else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 40007270: 80 a6 20 00 cmp %i0, 0 40007274: 22 80 00 2e be,a 4000732c 40007278: b0 10 20 16 mov 0x16, %i0 return EBUSY; } } #endif if ( !the_attr->is_initialized ) 4000727c: c2 04 00 00 ld [ %l0 ], %g1 40007280: 80 a0 60 00 cmp %g1, 0 40007284: 22 80 00 2a be,a 4000732c 40007288: b0 10 20 16 mov 0x16, %i0 /* * XXX: Be careful about attributes when global!!! */ assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE ); 4000728c: c2 04 20 04 ld [ %l0 + 4 ], %g1 40007290: 80 a0 60 00 cmp %g1, 0 40007294: 22 80 00 09 be,a 400072b8 40007298: c2 04 20 0c ld [ %l0 + 0xc ], %g1 4000729c: 11 10 00 60 sethi %hi(0x40018000), %o0 <== NOT EXECUTED 400072a0: 15 10 00 60 sethi %hi(0x40018000), %o2 <== NOT EXECUTED 400072a4: 90 12 23 30 or %o0, 0x330, %o0 <== NOT EXECUTED 400072a8: 94 12 a3 78 or %o2, 0x378, %o2 <== NOT EXECUTED 400072ac: 7f ff f2 cd call 40003de0 <__assert> <== NOT EXECUTED 400072b0: 92 10 20 64 mov 0x64, %o1 <== NOT EXECUTED /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 400072b4: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 400072b8: 80 a0 60 01 cmp %g1, 1 400072bc: 02 80 00 08 be 400072dc 400072c0: 80 a0 60 02 cmp %g1, 2 400072c4: 02 80 00 08 be 400072e4 400072c8: 80 a0 60 00 cmp %g1, 0 400072cc: 02 80 00 07 be 400072e8 400072d0: a2 10 20 00 clr %l1 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return 0; 400072d4: 81 c7 e0 08 ret 400072d8: 91 e8 20 16 restore %g0, 0x16, %o0 /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 400072dc: 10 80 00 03 b 400072e8 400072e0: a2 10 20 02 mov 2, %l1 400072e4: a2 10 20 03 mov 3, %l1 break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 400072e8: c2 04 20 08 ld [ %l0 + 8 ], %g1 400072ec: 82 00 7f ff add %g1, -1, %g1 400072f0: 80 a0 60 fd cmp %g1, 0xfd 400072f4: 38 80 00 0e bgu,a 4000732c 400072f8: b0 10 20 16 mov 0x16, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400072fc: 03 10 00 68 sethi %hi(0x4001a000), %g1 40007300: c4 00 61 10 ld [ %g1 + 0x110 ], %g2 ! 4001a110 <_Thread_Dispatch_disable_level> 40007304: 84 00 a0 01 inc %g2 40007308: c4 20 61 10 st %g2, [ %g1 + 0x110 ] * _POSIX_Mutex_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ) { return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information ); 4000730c: 11 10 00 69 sethi %hi(0x4001a400), %o0 40007310: 40 00 0d 47 call 4000a82c <_Objects_Allocate> 40007314: 90 12 21 74 or %o0, 0x174, %o0 ! 4001a574 <_POSIX_Mutex_Information> _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 40007318: b2 92 20 00 orcc %o0, 0, %i1 4000731c: 32 80 00 06 bne,a 40007334 40007320: c2 04 20 04 ld [ %l0 + 4 ], %g1 _Thread_Enable_dispatch(); 40007324: 7f ff ff c0 call 40007224 <_Thread_Enable_dispatch> 40007328: b0 10 20 0b mov 0xb, %i0 4000732c: 81 c7 e0 08 ret 40007330: 81 e8 00 00 restore _Thread_Enable_dispatch(); return EAGAIN; } #endif the_mutex->process_shared = the_attr->process_shared; 40007334: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) 40007338: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 4000733c: 80 a0 60 00 cmp %g1, 0 40007340: 02 80 00 04 be 40007350 40007344: 82 10 20 01 mov 1, %g1 the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 40007348: 10 80 00 03 b 40007354 <== NOT EXECUTED 4000734c: c0 26 60 54 clr [ %i1 + 0x54 ] <== NOT EXECUTED else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; 40007350: c2 26 60 54 st %g1, [ %i1 + 0x54 ] the_mutex_attr->only_owner_release = TRUE; the_mutex_attr->priority_ceiling = 40007354: 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; 40007358: 82 10 20 01 mov 1, %g1 4000735c: c2 26 60 58 st %g1, [ %i1 + 0x58 ] the_mutex_attr->priority_ceiling = 40007360: 82 10 20 ff mov 0xff, %g1 40007364: 82 20 40 02 sub %g1, %g2, %g1 _POSIX_Priority_To_core( the_attr->prio_ceiling ); the_mutex_attr->discipline = the_discipline; 40007368: e2 26 60 5c st %l1, [ %i1 + 0x5c ] 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 = 4000736c: c2 26 60 60 st %g1, [ %i1 + 0x60 ] /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 40007370: 90 06 60 14 add %i1, 0x14, %o0 40007374: 92 06 60 54 add %i1, 0x54, %o1 40007378: 40 00 0a 8a call 40009da0 <_CORE_mutex_Initialize> 4000737c: 94 10 20 01 mov 1, %o2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40007380: 03 10 00 69 sethi %hi(0x4001a400), %g1 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 40007384: c6 06 60 08 ld [ %i1 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40007388: 88 10 61 74 or %g1, 0x174, %g4 4000738c: c4 11 20 10 lduh [ %g4 + 0x10 ], %g2 40007390: 03 00 00 3f sethi %hi(0xfc00), %g1 40007394: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40007398: 82 08 c0 01 and %g3, %g1, %g1 4000739c: 80 a0 40 02 cmp %g1, %g2 400073a0: 38 80 00 06 bgu,a 400073b8 400073a4: c2 06 60 08 ld [ %i1 + 8 ], %g1 <== NOT EXECUTED information->local_table[ index ] = the_object; 400073a8: c4 01 20 20 ld [ %g4 + 0x20 ], %g2 400073ac: 83 28 60 02 sll %g1, 2, %g1 400073b0: f2 20 80 01 st %i1, [ %g2 + %g1 ] CORE_MUTEX_UNLOCKED ); _Objects_Open( &_POSIX_Mutex_Information, &the_mutex->Object, 0 ); *mutex = the_mutex->Object.id; 400073b4: c2 06 60 08 ld [ %i1 + 8 ], %g1 if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 400073b8: c0 26 60 0c clr [ %i1 + 0xc ] 400073bc: c2 26 00 00 st %g1, [ %i0 ] 0, /* Name not used */ 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 400073c0: 7f ff ff 99 call 40007224 <_Thread_Enable_dispatch> 400073c4: b0 10 20 00 clr %i0 400073c8: 81 c7 e0 08 ret 400073cc: 81 e8 00 00 restore return 0; } 400073d0: 81 c7 e0 08 ret <== NOT EXECUTED 400073d4: 81 e8 00 00 restore <== NOT EXECUTED 40007690 : int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 40007690: 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 ) 40007694: 80 a6 a0 00 cmp %i2, 0 40007698: 02 80 00 3f be 40007794 4000769c: 82 06 7f ff add %i1, -1, %g1 return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 400076a0: 80 a0 60 fd cmp %g1, 0xfd 400076a4: 18 80 00 3d bgu 40007798 400076a8: a0 10 20 16 mov 0x16, %l0 /* * Must acquire the mutex before we can change it's ceiling */ status = pthread_mutex_lock( mutex ); 400076ac: 7f ff ff 4b call 400073d8 400076b0: 90 10 00 18 mov %i0, %o0 if ( status ) 400076b4: a0 92 20 00 orcc %o0, 0, %l0 400076b8: 12 80 00 38 bne 40007798 400076bc: 80 a6 20 00 cmp %i0, 0 Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 400076c0: 02 80 00 0d be 400076f4 400076c4: 82 10 20 02 mov 2, %g1 400076c8: c2 06 00 00 ld [ %i0 ], %g1 400076cc: 80 a0 7f ff cmp %g1, -1 400076d0: 32 80 00 0c bne,a 40007700 400076d4: d2 06 00 00 ld [ %i0 ], %o1 400076d8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400076dc: 7f ff fe df call 40007258 <== NOT EXECUTED 400076e0: 92 10 20 00 clr %o1 <== NOT EXECUTED 400076e4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400076e8: 22 80 00 06 be,a 40007700 <== NOT EXECUTED 400076ec: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED 400076f0: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 400076f4: 90 10 20 00 clr %o0 <== NOT EXECUTED 400076f8: 10 80 00 06 b 40007710 <== NOT EXECUTED 400076fc: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED return (POSIX_Mutex_Control *) 40007700: 11 10 00 69 sethi %hi(0x4001a400), %o0 40007704: 94 07 bf f4 add %fp, -12, %o2 40007708: 40 00 0d 8d call 4000ad3c <_Objects_Get> 4000770c: 90 12 21 74 or %o0, 0x174, %o0 return status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { 40007710: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007714: 80 a0 60 00 cmp %g1, 0 40007718: 22 80 00 07 be,a 40007734 4000771c: c6 02 20 60 ld [ %o0 + 0x60 ], %g3 40007720: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40007724: 18 80 00 18 bgu 40007784 <== NOT EXECUTED 40007728: 01 00 00 00 nop <== NOT EXECUTED #endif ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 4000772c: 10 80 00 1b b 40007798 <== NOT EXECUTED 40007730: a0 10 20 16 mov 0x16, %l0 ! 16 <== NOT EXECUTED case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; _CORE_mutex_Surrender( 40007734: d2 02 20 08 ld [ %o0 + 8 ], %o1 return EINVAL; #endif case OBJECTS_ERROR: return EINVAL; /* impossible to get here */ case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 40007738: 82 10 20 ff mov 0xff, %g1 the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 4000773c: 84 20 40 19 sub %g1, %i1, %g2 return EINVAL; #endif case OBJECTS_ERROR: return EINVAL; /* impossible to get here */ case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 40007740: 82 20 40 03 sub %g1, %g3, %g1 the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 40007744: c4 22 20 60 st %g2, [ %o0 + 0x60 ] return EINVAL; #endif case OBJECTS_ERROR: return EINVAL; /* impossible to get here */ case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 40007748: c2 26 80 00 st %g1, [ %i2 ] the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; _CORE_mutex_Surrender( 4000774c: 94 10 20 00 clr %o2 40007750: 40 00 09 e4 call 40009ee0 <_CORE_mutex_Surrender> 40007754: 90 02 20 14 add %o0, 0x14, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007758: 05 10 00 68 sethi %hi(0x4001a000), %g2 4000775c: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 4001a110 <_Thread_Dispatch_disable_level> 40007760: 82 00 7f ff add %g1, -1, %g1 40007764: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] 40007768: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 4000776c: 80 a0 60 00 cmp %g1, 0 40007770: 12 80 00 0b bne 4000779c 40007774: b0 10 00 10 mov %l0, %i0 _Thread_Dispatch(); 40007778: 40 00 12 26 call 4000c010 <_Thread_Dispatch> 4000777c: 01 00 00 00 nop 40007780: 30 80 00 07 b,a 4000779c #endif ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40007784: 40 00 03 09 call 400083a8 <== NOT EXECUTED 40007788: 01 00 00 00 nop <== NOT EXECUTED 4000778c: 10 80 00 03 b 40007798 <== NOT EXECUTED 40007790: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 40007794: a0 10 20 16 mov 0x16, %l0 } 40007798: b0 10 00 10 mov %l0, %i0 4000779c: 81 c7 e0 08 ret 400077a0: 81 e8 00 00 restore 400077a4 : int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { 400077a4: 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 ); 400077a8: 90 10 00 19 mov %i1, %o0 400077ac: 40 00 00 4b call 400078d8 <_POSIX_Absolute_timeout_to_ticks> 400077b0: 92 07 bf f4 add %fp, -12, %o1 switch ( status ) { 400077b4: 80 a2 20 02 cmp %o0, 2 400077b8: 28 80 00 07 bleu,a 400077d4 400077bc: b2 10 20 00 clr %i1 <== NOT EXECUTED 400077c0: 80 a2 20 03 cmp %o0, 3 400077c4: 22 80 00 04 be,a 400077d4 400077c8: b2 10 20 01 mov 1, %i1 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } lock_status = _POSIX_Mutex_Lock_support( 400077cc: 10 80 00 03 b 400077d8 <== NOT EXECUTED 400077d0: d4 07 bf f4 ld [ %fp + -12 ], %o2 <== NOT EXECUTED 400077d4: d4 07 bf f4 ld [ %fp + -12 ], %o2 400077d8: 90 10 00 18 mov %i0, %o0 400077dc: 7f ff ff 05 call 400073f0 <_POSIX_Mutex_Lock_support> 400077e0: 92 10 00 19 mov %i1, %o1 break; } } return lock_status; } 400077e4: 81 c7 e0 08 ret 400077e8: 91 e8 00 08 restore %g0, %o0, %o0 40007804 : */ int pthread_mutex_unlock( pthread_mutex_t *mutex ) { 40007804: 9d e3 bf 90 save %sp, -112, %sp Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40007808: 80 a6 20 00 cmp %i0, 0 4000780c: 02 80 00 0d be 40007840 40007810: 82 10 20 02 mov 2, %g1 40007814: c2 06 00 00 ld [ %i0 ], %g1 40007818: 80 a0 7f ff cmp %g1, -1 4000781c: 32 80 00 0c bne,a 4000784c 40007820: d2 06 00 00 ld [ %i0 ], %o1 40007824: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40007828: 7f ff fe 8c call 40007258 <== NOT EXECUTED 4000782c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40007830: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40007834: 22 80 00 06 be,a 4000784c <== NOT EXECUTED 40007838: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED 4000783c: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 40007840: 90 10 20 00 clr %o0 <== NOT EXECUTED 40007844: 10 80 00 06 b 4000785c <== NOT EXECUTED 40007848: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED return (POSIX_Mutex_Control *) 4000784c: 11 10 00 69 sethi %hi(0x4001a400), %o0 40007850: 94 07 bf f4 add %fp, -12, %o2 40007854: 40 00 0d 3a call 4000ad3c <_Objects_Get> 40007858: 90 12 21 74 or %o0, 0x174, %o0 register POSIX_Mutex_Control *the_mutex; Objects_Locations location; CORE_mutex_Status status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { 4000785c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007860: 80 a0 60 00 cmp %g1, 0 40007864: 22 80 00 06 be,a 4000787c 40007868: d2 02 20 08 ld [ %o0 + 8 ], %o1 4000786c: 80 a0 60 02 cmp %g1, 2 40007870: 08 80 00 17 bleu 400078cc 40007874: 90 10 20 16 mov 0x16, %o0 40007878: 30 80 00 13 b,a 400078c4 <== NOT EXECUTED ); #endif case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: status = _CORE_mutex_Surrender( 4000787c: 94 10 20 00 clr %o2 40007880: 40 00 09 98 call 40009ee0 <_CORE_mutex_Surrender> 40007884: 90 02 20 14 add %o0, 0x14, %o0 40007888: b0 10 00 08 mov %o0, %i0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000788c: 03 10 00 68 sethi %hi(0x4001a000), %g1 40007890: c4 00 61 10 ld [ %g1 + 0x110 ], %g2 ! 4001a110 <_Thread_Dispatch_disable_level> 40007894: 84 00 bf ff add %g2, -1, %g2 40007898: c4 20 61 10 st %g2, [ %g1 + 0x110 ] 4000789c: c2 00 61 10 ld [ %g1 + 0x110 ], %g1 400078a0: 80 a0 60 00 cmp %g1, 0 400078a4: 12 80 00 04 bne 400078b4 400078a8: 01 00 00 00 nop _Thread_Dispatch(); 400078ac: 40 00 11 d9 call 4000c010 <_Thread_Dispatch> 400078b0: 01 00 00 00 nop #else NULL #endif ); _Thread_Enable_dispatch(); return _POSIX_Mutex_From_core_mutex_status( status ); 400078b4: 40 00 1f 19 call 4000f518 <_POSIX_Mutex_From_core_mutex_status> 400078b8: 90 10 00 18 mov %i0, %o0 break; } return POSIX_BOTTOM_REACHED(); } 400078bc: 81 c7 e0 08 ret 400078c0: 91 e8 00 08 restore %g0, %o0, %o0 ); _Thread_Enable_dispatch(); return _POSIX_Mutex_From_core_mutex_status( status ); break; } return POSIX_BOTTOM_REACHED(); 400078c4: 40 00 02 b9 call 400083a8 <== NOT EXECUTED 400078c8: 01 00 00 00 nop <== NOT EXECUTED } 400078cc: b0 10 00 08 mov %o0, %i0 400078d0: 81 c7 e0 08 ret 400078d4: 81 e8 00 00 restore 40005d54 : */ int pthread_rwlock_destroy( pthread_rwlock_t *rwlock ) { 40005d54: 9d e3 bf 90 save %sp, -112, %sp POSIX_RWLock_Control *the_rwlock = NULL; Objects_Locations location; if ( !rwlock ) 40005d58: 80 a6 20 00 cmp %i0, 0 40005d5c: 02 80 00 2d be 40005e10 40005d60: 21 10 00 72 sethi %hi(0x4001c800), %l0 RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 40005d64: d2 06 00 00 ld [ %i0 ], %o1 40005d68: 94 07 bf f4 add %fp, -12, %o2 40005d6c: 40 00 0e f6 call 40009944 <_Objects_Get> 40005d70: 90 14 23 cc or %l0, 0x3cc, %o0 return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 40005d74: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005d78: 80 a0 60 00 cmp %g1, 0 40005d7c: 02 80 00 07 be 40005d98 40005d80: b0 10 00 08 mov %o0, %i0 40005d84: 80 a0 60 02 cmp %g1, 2 40005d88: 18 80 00 1e bgu 40005e00 40005d8c: 90 10 20 16 mov 0x16, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40005d90: 81 c7 e0 08 ret 40005d94: 91 e8 00 08 restore %g0, %o0, %o0 case OBJECTS_LOCAL: /* * If there is at least one thread waiting, then do not delete it. */ if ( _Thread_queue_First( &the_rwlock->RWLock.Wait_queue ) != NULL ) { 40005d98: 40 00 16 2e call 4000b650 <_Thread_queue_First> 40005d9c: 90 02 20 10 add %o0, 0x10, %o0 40005da0: 80 a2 20 00 cmp %o0, 0 40005da4: 22 80 00 06 be,a 40005dbc 40005da8: 90 14 23 cc or %l0, 0x3cc, %o0 _Thread_Enable_dispatch(); 40005dac: 7f ff ff dd call 40005d20 <_Thread_Enable_dispatch> 40005db0: 01 00 00 00 nop 40005db4: 10 80 00 18 b 40005e14 40005db8: 90 10 20 10 mov 0x10, %o0 ! 10 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40005dbc: c2 06 20 08 ld [ %i0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40005dc0: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 40005dc4: 05 00 00 3f sethi %hi(0xfc00), %g2 40005dc8: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40005dcc: 82 08 40 02 and %g1, %g2, %g1 40005dd0: 80 a0 40 03 cmp %g1, %g3 40005dd4: 18 80 00 05 bgu 40005de8 40005dd8: 92 10 00 18 mov %i0, %o1 information->local_table[ index ] = the_object; 40005ddc: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40005de0: 83 28 60 02 sll %g1, 2, %g1 40005de4: c0 20 80 01 clr [ %g2 + %g1 ] */ RTEMS_INLINE_ROUTINE void _POSIX_RWLock_Free ( POSIX_RWLock_Control *the_RWLock ) { _Objects_Free( &_POSIX_RWLock_Information, &the_RWLock->Object ); 40005de8: 40 00 0e 95 call 4000983c <_Objects_Free> 40005dec: c0 26 20 0c clr [ %i0 + 0xc ] _Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object ); _POSIX_RWLock_Free( the_rwlock ); _Thread_Enable_dispatch(); 40005df0: 7f ff ff cc call 40005d20 <_Thread_Enable_dispatch> 40005df4: 01 00 00 00 nop 40005df8: 10 80 00 07 b 40005e14 40005dfc: 90 10 20 00 clr %o0 ! 0 return 0; } return POSIX_BOTTOM_REACHED(); 40005e00: 40 00 03 73 call 40006bcc <== NOT EXECUTED 40005e04: 01 00 00 00 nop <== NOT EXECUTED } 40005e08: 81 c7 e0 08 ret <== NOT EXECUTED 40005e0c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40005e10: 90 10 20 16 mov 0x16, %o0 } 40005e14: b0 10 00 08 mov %o0, %i0 40005e18: 81 c7 e0 08 ret 40005e1c: 81 e8 00 00 restore 40005e54 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 40005e54: 9d e3 bf 88 save %sp, -120, %sp const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 40005e58: 80 a6 20 00 cmp %i0, 0 40005e5c: 02 80 00 32 be 40005f24 40005e60: a0 10 00 19 mov %i1, %l0 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 40005e64: 80 a6 60 00 cmp %i1, 0 40005e68: 32 80 00 06 bne,a 40005e80 40005e6c: c2 04 00 00 ld [ %l0 ], %g1 the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 40005e70: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED 40005e74: 40 00 03 2c call 40006b24 <== NOT EXECUTED 40005e78: 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 ) 40005e7c: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED 40005e80: 80 a0 60 00 cmp %g1, 0 40005e84: 02 80 00 28 be 40005f24 40005e88: 01 00 00 00 nop return EINVAL; switch ( the_attr->process_shared ) { 40005e8c: c2 04 20 04 ld [ %l0 + 4 ], %g1 40005e90: 80 a0 60 00 cmp %g1, 0 40005e94: 12 80 00 24 bne 40005f24 40005e98: 05 10 00 72 sethi %hi(0x4001c800), %g2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40005e9c: c2 00 a1 30 ld [ %g2 + 0x130 ], %g1 ! 4001c930 <_Thread_Dispatch_disable_level> 40005ea0: 82 00 60 01 inc %g1 40005ea4: c2 20 a1 30 st %g1, [ %g2 + 0x130 ] * 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 *) 40005ea8: 33 10 00 72 sethi %hi(0x4001c800), %i1 40005eac: 40 00 0d 62 call 40009434 <_Objects_Allocate> 40005eb0: 90 16 63 cc or %i1, 0x3cc, %o0 ! 4001cbcc <_POSIX_RWLock_Information> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 40005eb4: a0 92 20 00 orcc %o0, 0, %l0 40005eb8: 12 80 00 06 bne 40005ed0 40005ebc: 90 04 20 10 add %l0, 0x10, %o0 _Thread_Enable_dispatch(); 40005ec0: 7f ff ff d8 call 40005e20 <_Thread_Enable_dispatch> 40005ec4: b0 10 20 0b mov 0xb, %i0 40005ec8: 81 c7 e0 08 ret 40005ecc: 81 e8 00 00 restore return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 40005ed0: 40 00 0a 95 call 40008924 <_CORE_RWLock_Initialize> 40005ed4: 92 07 bf f4 add %fp, -12, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40005ed8: 90 16 63 cc or %i1, 0x3cc, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 40005edc: c2 04 20 08 ld [ %l0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40005ee0: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 40005ee4: 05 00 00 3f sethi %hi(0xfc00), %g2 40005ee8: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40005eec: 82 08 40 02 and %g1, %g2, %g1 40005ef0: 80 a0 40 03 cmp %g1, %g3 40005ef4: 38 80 00 06 bgu,a 40005f0c 40005ef8: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED information->local_table[ index ] = the_object; 40005efc: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40005f00: 83 28 60 02 sll %g1, 2, %g1 40005f04: e0 20 80 01 st %l0, [ %g2 + %g1 ] &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 40005f08: c2 04 20 08 ld [ %l0 + 8 ], %g1 if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 40005f0c: c0 24 20 0c clr [ %l0 + 0xc ] 40005f10: c2 26 00 00 st %g1, [ %i0 ] _Thread_Enable_dispatch(); 40005f14: 7f ff ff c3 call 40005e20 <_Thread_Enable_dispatch> 40005f18: b0 10 20 00 clr %i0 40005f1c: 81 c7 e0 08 ret 40005f20: 81 e8 00 00 restore return 0; } 40005f24: 81 c7 e0 08 ret 40005f28: 91 e8 20 16 restore %g0, 0x16, %o0 40005f2c : */ int pthread_rwlock_rdlock( pthread_rwlock_t *rwlock ) { 40005f2c: 9d e3 bf 90 save %sp, -112, %sp POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 40005f30: 80 a6 20 00 cmp %i0, 0 40005f34: 02 80 00 28 be 40005fd4 40005f38: 11 10 00 72 sethi %hi(0x4001c800), %o0 RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 40005f3c: d2 06 00 00 ld [ %i0 ], %o1 40005f40: 94 07 bf f4 add %fp, -12, %o2 40005f44: 40 00 0e 80 call 40009944 <_Objects_Get> 40005f48: 90 12 23 cc or %o0, 0x3cc, %o0 return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 40005f4c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005f50: 80 a0 60 00 cmp %g1, 0 40005f54: 22 80 00 07 be,a 40005f70 40005f58: d2 06 00 00 ld [ %i0 ], %o1 40005f5c: 80 a0 60 02 cmp %g1, 2 40005f60: 18 80 00 19 bgu 40005fc4 40005f64: 90 10 20 16 mov 0x16, %o0 (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 40005f68: 81 c7 e0 08 ret 40005f6c: 91 e8 00 08 restore %g0, %o0, %o0 case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 40005f70: 90 02 20 10 add %o0, 0x10, %o0 40005f74: 94 10 20 01 mov 1, %o2 40005f78: 96 10 20 00 clr %o3 40005f7c: 40 00 0a 75 call 40008950 <_CORE_RWLock_Obtain_for_reading> 40005f80: 98 10 20 00 clr %o4 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40005f84: 03 10 00 72 sethi %hi(0x4001c800), %g1 40005f88: c4 00 61 30 ld [ %g1 + 0x130 ], %g2 ! 4001c930 <_Thread_Dispatch_disable_level> 40005f8c: 84 00 bf ff add %g2, -1, %g2 40005f90: c4 20 61 30 st %g2, [ %g1 + 0x130 ] 40005f94: c2 00 61 30 ld [ %g1 + 0x130 ], %g1 40005f98: 80 a0 60 00 cmp %g1, 0 40005f9c: 12 80 00 05 bne 40005fb0 40005fa0: 03 10 00 72 sethi %hi(0x4001c800), %g1 _Thread_Dispatch(); 40005fa4: 40 00 13 1d call 4000ac18 <_Thread_Dispatch> 40005fa8: 01 00 00 00 nop 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 40005fac: 03 10 00 72 sethi %hi(0x4001c800), %g1 40005fb0: c2 00 62 0c ld [ %g1 + 0x20c ], %g1 ! 4001ca0c <_Thread_Executing> 40005fb4: 40 00 00 9a call 4000621c <_POSIX_RWLock_Translate_core_RWLock_return_code> 40005fb8: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 40005fbc: 81 c7 e0 08 ret 40005fc0: 91 e8 00 08 restore %g0, %o0, %o0 return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40005fc4: 40 00 03 02 call 40006bcc <== NOT EXECUTED 40005fc8: 01 00 00 00 nop <== NOT EXECUTED } 40005fcc: 81 c7 e0 08 ret <== NOT EXECUTED 40005fd0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40005fd4: 90 10 20 16 mov 0x16, %o0 } 40005fd8: b0 10 00 08 mov %o0, %i0 40005fdc: 81 c7 e0 08 ret 40005fe0: 81 e8 00 00 restore 40005fe4 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 40005fe4: 9d e3 bf 90 save %sp, -112, %sp Objects_Locations location; Watchdog_Interval ticks; boolean do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 40005fe8: 80 a6 20 00 cmp %i0, 0 40005fec: 02 80 00 41 be 400060f0 40005ff0: 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 ); 40005ff4: 40 00 20 fc call 4000e3e4 <_POSIX_Absolute_timeout_to_ticks> 40005ff8: 92 07 bf f0 add %fp, -16, %o1 switch (status) { 40005ffc: 80 a2 20 02 cmp %o0, 2 40006000: 08 80 00 07 bleu 4000601c 40006004: b2 10 00 08 mov %o0, %i1 40006008: 80 a2 20 03 cmp %o0, 3 4000600c: 22 80 00 05 be,a 40006020 40006010: a0 10 20 01 mov 1, %l0 40006014: 10 80 00 04 b 40006024 <== NOT EXECUTED 40006018: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED 4000601c: a0 10 20 00 clr %l0 40006020: d2 06 00 00 ld [ %i0 ], %o1 40006024: 11 10 00 72 sethi %hi(0x4001c800), %o0 40006028: 94 07 bf f4 add %fp, -12, %o2 4000602c: 40 00 0e 46 call 40009944 <_Objects_Get> 40006030: 90 12 23 cc or %o0, 0x3cc, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 40006034: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006038: 80 a0 60 00 cmp %g1, 0 4000603c: 22 80 00 07 be,a 40006058 40006040: d2 06 00 00 ld [ %i0 ], %o1 40006044: 80 a0 60 02 cmp %g1, 2 40006048: 18 80 00 26 bgu 400060e0 4000604c: 90 10 20 16 mov 0x16, %o0 (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 40006050: 81 c7 e0 08 ret 40006054: 91 e8 00 08 restore %g0, %o0, %o0 case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 40006058: d6 07 bf f0 ld [ %fp + -16 ], %o3 4000605c: 90 02 20 10 add %o0, 0x10, %o0 40006060: 94 10 00 10 mov %l0, %o2 40006064: 40 00 0a 3b call 40008950 <_CORE_RWLock_Obtain_for_reading> 40006068: 98 10 20 00 clr %o4 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000606c: 03 10 00 72 sethi %hi(0x4001c800), %g1 40006070: c4 00 61 30 ld [ %g1 + 0x130 ], %g2 ! 4001c930 <_Thread_Dispatch_disable_level> 40006074: 84 00 bf ff add %g2, -1, %g2 40006078: c4 20 61 30 st %g2, [ %g1 + 0x130 ] 4000607c: c2 00 61 30 ld [ %g1 + 0x130 ], %g1 40006080: 80 a0 60 00 cmp %g1, 0 40006084: 12 80 00 05 bne 40006098 40006088: 80 a4 20 00 cmp %l0, 0 _Thread_Dispatch(); 4000608c: 40 00 12 e3 call 4000ac18 <_Thread_Dispatch> 40006090: 01 00 00 00 nop ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 40006094: 80 a4 20 00 cmp %l0, 0 40006098: 12 80 00 0c bne 400060c8 4000609c: 03 10 00 72 sethi %hi(0x4001c800), %g1 400060a0: c2 00 62 0c ld [ %g1 + 0x20c ], %g1 ! 4001ca0c <_Thread_Executing> <== NOT EXECUTED 400060a4: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 <== NOT EXECUTED 400060a8: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 400060ac: 12 80 00 07 bne 400060c8 <== NOT EXECUTED 400060b0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 400060b4: 02 80 00 10 be 400060f4 <== NOT EXECUTED 400060b8: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 400060bc: 80 a6 60 02 cmp %i1, 2 <== NOT EXECUTED 400060c0: 08 80 00 0d bleu 400060f4 <== NOT EXECUTED 400060c4: 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( 400060c8: 03 10 00 72 sethi %hi(0x4001c800), %g1 400060cc: c2 00 62 0c ld [ %g1 + 0x20c ], %g1 ! 4001ca0c <_Thread_Executing> 400060d0: 40 00 00 53 call 4000621c <_POSIX_RWLock_Translate_core_RWLock_return_code> 400060d4: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 400060d8: 81 c7 e0 08 ret 400060dc: 91 e8 00 08 restore %g0, %o0, %o0 return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 400060e0: 40 00 02 bb call 40006bcc <== NOT EXECUTED 400060e4: 01 00 00 00 nop <== NOT EXECUTED } 400060e8: 81 c7 e0 08 ret <== NOT EXECUTED 400060ec: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 400060f0: 90 10 20 16 mov 0x16, %o0 } 400060f4: b0 10 00 08 mov %o0, %i0 400060f8: 81 c7 e0 08 ret 400060fc: 81 e8 00 00 restore 40006100 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 40006100: 9d e3 bf 90 save %sp, -112, %sp Objects_Locations location; Watchdog_Interval ticks; boolean do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 40006104: 80 a6 20 00 cmp %i0, 0 40006108: 02 80 00 41 be 4000620c 4000610c: 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 ); 40006110: 40 00 20 b5 call 4000e3e4 <_POSIX_Absolute_timeout_to_ticks> 40006114: 92 07 bf f0 add %fp, -16, %o1 switch (status) { 40006118: 80 a2 20 02 cmp %o0, 2 4000611c: 08 80 00 07 bleu 40006138 40006120: b2 10 00 08 mov %o0, %i1 40006124: 80 a2 20 03 cmp %o0, 3 40006128: 22 80 00 05 be,a 4000613c 4000612c: a0 10 20 01 mov 1, %l0 40006130: 10 80 00 04 b 40006140 <== NOT EXECUTED 40006134: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED 40006138: a0 10 20 00 clr %l0 4000613c: d2 06 00 00 ld [ %i0 ], %o1 40006140: 11 10 00 72 sethi %hi(0x4001c800), %o0 40006144: 94 07 bf f4 add %fp, -12, %o2 40006148: 40 00 0d ff call 40009944 <_Objects_Get> 4000614c: 90 12 23 cc or %o0, 0x3cc, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 40006150: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006154: 80 a0 60 00 cmp %g1, 0 40006158: 22 80 00 07 be,a 40006174 4000615c: d2 06 00 00 ld [ %i0 ], %o1 40006160: 80 a0 60 02 cmp %g1, 2 40006164: 18 80 00 26 bgu 400061fc 40006168: 90 10 20 16 mov 0x16, %o0 (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 4000616c: 81 c7 e0 08 ret 40006170: 91 e8 00 08 restore %g0, %o0, %o0 case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 40006174: d6 07 bf f0 ld [ %fp + -16 ], %o3 40006178: 90 02 20 10 add %o0, 0x10, %o0 4000617c: 94 10 00 10 mov %l0, %o2 40006180: 40 00 0a 28 call 40008a20 <_CORE_RWLock_Obtain_for_writing> 40006184: 98 10 20 00 clr %o4 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006188: 03 10 00 72 sethi %hi(0x4001c800), %g1 4000618c: c4 00 61 30 ld [ %g1 + 0x130 ], %g2 ! 4001c930 <_Thread_Dispatch_disable_level> 40006190: 84 00 bf ff add %g2, -1, %g2 40006194: c4 20 61 30 st %g2, [ %g1 + 0x130 ] 40006198: c2 00 61 30 ld [ %g1 + 0x130 ], %g1 4000619c: 80 a0 60 00 cmp %g1, 0 400061a0: 12 80 00 05 bne 400061b4 400061a4: 80 a4 20 00 cmp %l0, 0 _Thread_Dispatch(); 400061a8: 40 00 12 9c call 4000ac18 <_Thread_Dispatch> 400061ac: 01 00 00 00 nop ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 400061b0: 80 a4 20 00 cmp %l0, 0 400061b4: 12 80 00 0c bne 400061e4 400061b8: 03 10 00 72 sethi %hi(0x4001c800), %g1 400061bc: c2 00 62 0c ld [ %g1 + 0x20c ], %g1 ! 4001ca0c <_Thread_Executing> <== NOT EXECUTED 400061c0: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 <== NOT EXECUTED 400061c4: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 400061c8: 12 80 00 07 bne 400061e4 <== NOT EXECUTED 400061cc: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 400061d0: 02 80 00 10 be 40006210 <== NOT EXECUTED 400061d4: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 400061d8: 80 a6 60 02 cmp %i1, 2 <== NOT EXECUTED 400061dc: 08 80 00 0d bleu 40006210 <== NOT EXECUTED 400061e0: 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( 400061e4: 03 10 00 72 sethi %hi(0x4001c800), %g1 400061e8: c2 00 62 0c ld [ %g1 + 0x20c ], %g1 ! 4001ca0c <_Thread_Executing> 400061ec: 40 00 00 0c call 4000621c <_POSIX_RWLock_Translate_core_RWLock_return_code> 400061f0: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 400061f4: 81 c7 e0 08 ret 400061f8: 91 e8 00 08 restore %g0, %o0, %o0 return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 400061fc: 40 00 02 74 call 40006bcc <== NOT EXECUTED 40006200: 01 00 00 00 nop <== NOT EXECUTED } 40006204: 81 c7 e0 08 ret <== NOT EXECUTED 40006208: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 4000620c: 90 10 20 16 mov 0x16, %o0 } 40006210: b0 10 00 08 mov %o0, %i0 40006214: 81 c7 e0 08 ret 40006218: 81 e8 00 00 restore 40006244 : */ int pthread_rwlock_tryrdlock( pthread_rwlock_t *rwlock ) { 40006244: 9d e3 bf 90 save %sp, -112, %sp POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 40006248: 80 a6 20 00 cmp %i0, 0 4000624c: 02 80 00 28 be 400062ec 40006250: 11 10 00 72 sethi %hi(0x4001c800), %o0 40006254: d2 06 00 00 ld [ %i0 ], %o1 40006258: 94 07 bf f4 add %fp, -12, %o2 4000625c: 40 00 0d ba call 40009944 <_Objects_Get> 40006260: 90 12 23 cc or %o0, 0x3cc, %o0 return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 40006264: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006268: 80 a0 60 00 cmp %g1, 0 4000626c: 22 80 00 07 be,a 40006288 40006270: d2 06 00 00 ld [ %i0 ], %o1 40006274: 80 a0 60 02 cmp %g1, 2 40006278: 18 80 00 19 bgu 400062dc 4000627c: 90 10 20 16 mov 0x16, %o0 (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 40006280: 81 c7 e0 08 ret 40006284: 91 e8 00 08 restore %g0, %o0, %o0 case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 40006288: 90 02 20 10 add %o0, 0x10, %o0 4000628c: 94 10 20 00 clr %o2 40006290: 96 10 20 00 clr %o3 40006294: 40 00 09 af call 40008950 <_CORE_RWLock_Obtain_for_reading> 40006298: 98 10 20 00 clr %o4 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000629c: 03 10 00 72 sethi %hi(0x4001c800), %g1 400062a0: c4 00 61 30 ld [ %g1 + 0x130 ], %g2 ! 4001c930 <_Thread_Dispatch_disable_level> 400062a4: 84 00 bf ff add %g2, -1, %g2 400062a8: c4 20 61 30 st %g2, [ %g1 + 0x130 ] 400062ac: c2 00 61 30 ld [ %g1 + 0x130 ], %g1 400062b0: 80 a0 60 00 cmp %g1, 0 400062b4: 12 80 00 05 bne 400062c8 400062b8: 03 10 00 72 sethi %hi(0x4001c800), %g1 _Thread_Dispatch(); 400062bc: 40 00 12 57 call 4000ac18 <_Thread_Dispatch> 400062c0: 01 00 00 00 nop NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 400062c4: 03 10 00 72 sethi %hi(0x4001c800), %g1 400062c8: c2 00 62 0c ld [ %g1 + 0x20c ], %g1 ! 4001ca0c <_Thread_Executing> 400062cc: 7f ff ff d4 call 4000621c <_POSIX_RWLock_Translate_core_RWLock_return_code> 400062d0: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 400062d4: 81 c7 e0 08 ret 400062d8: 91 e8 00 08 restore %g0, %o0, %o0 return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 400062dc: 40 00 02 3c call 40006bcc <== NOT EXECUTED 400062e0: 01 00 00 00 nop <== NOT EXECUTED } 400062e4: 81 c7 e0 08 ret <== NOT EXECUTED 400062e8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 400062ec: 90 10 20 16 mov 0x16, %o0 } 400062f0: b0 10 00 08 mov %o0, %i0 400062f4: 81 c7 e0 08 ret 400062f8: 81 e8 00 00 restore 400062fc : */ int pthread_rwlock_trywrlock( pthread_rwlock_t *rwlock ) { 400062fc: 9d e3 bf 90 save %sp, -112, %sp POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 40006300: 80 a6 20 00 cmp %i0, 0 40006304: 02 80 00 28 be 400063a4 40006308: 11 10 00 72 sethi %hi(0x4001c800), %o0 4000630c: d2 06 00 00 ld [ %i0 ], %o1 40006310: 94 07 bf f4 add %fp, -12, %o2 40006314: 40 00 0d 8c call 40009944 <_Objects_Get> 40006318: 90 12 23 cc or %o0, 0x3cc, %o0 return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 4000631c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006320: 80 a0 60 00 cmp %g1, 0 40006324: 22 80 00 07 be,a 40006340 40006328: d2 06 00 00 ld [ %i0 ], %o1 4000632c: 80 a0 60 02 cmp %g1, 2 40006330: 18 80 00 19 bgu 40006394 40006334: 90 10 20 16 mov 0x16, %o0 (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 40006338: 81 c7 e0 08 ret 4000633c: 91 e8 00 08 restore %g0, %o0, %o0 case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 40006340: 90 02 20 10 add %o0, 0x10, %o0 40006344: 94 10 20 00 clr %o2 40006348: 96 10 20 00 clr %o3 4000634c: 40 00 09 b5 call 40008a20 <_CORE_RWLock_Obtain_for_writing> 40006350: 98 10 20 00 clr %o4 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006354: 03 10 00 72 sethi %hi(0x4001c800), %g1 40006358: c4 00 61 30 ld [ %g1 + 0x130 ], %g2 ! 4001c930 <_Thread_Dispatch_disable_level> 4000635c: 84 00 bf ff add %g2, -1, %g2 40006360: c4 20 61 30 st %g2, [ %g1 + 0x130 ] 40006364: c2 00 61 30 ld [ %g1 + 0x130 ], %g1 40006368: 80 a0 60 00 cmp %g1, 0 4000636c: 12 80 00 05 bne 40006380 40006370: 03 10 00 72 sethi %hi(0x4001c800), %g1 _Thread_Dispatch(); 40006374: 40 00 12 29 call 4000ac18 <_Thread_Dispatch> 40006378: 01 00 00 00 nop 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 4000637c: 03 10 00 72 sethi %hi(0x4001c800), %g1 40006380: c2 00 62 0c ld [ %g1 + 0x20c ], %g1 ! 4001ca0c <_Thread_Executing> 40006384: 7f ff ff a6 call 4000621c <_POSIX_RWLock_Translate_core_RWLock_return_code> 40006388: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 4000638c: 81 c7 e0 08 ret 40006390: 91 e8 00 08 restore %g0, %o0, %o0 return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40006394: 40 00 02 0e call 40006bcc <== NOT EXECUTED 40006398: 01 00 00 00 nop <== NOT EXECUTED } 4000639c: 81 c7 e0 08 ret <== NOT EXECUTED 400063a0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 400063a4: 90 10 20 16 mov 0x16, %o0 } 400063a8: b0 10 00 08 mov %o0, %i0 400063ac: 81 c7 e0 08 ret 400063b0: 81 e8 00 00 restore 400063b4 : */ int pthread_rwlock_unlock( pthread_rwlock_t *rwlock ) { 400063b4: 9d e3 bf 90 save %sp, -112, %sp POSIX_RWLock_Control *the_rwlock; Objects_Locations location; CORE_RWLock_Status status; if ( !rwlock ) 400063b8: 80 a6 20 00 cmp %i0, 0 400063bc: 02 80 00 23 be 40006448 400063c0: 11 10 00 72 sethi %hi(0x4001c800), %o0 400063c4: d2 06 00 00 ld [ %i0 ], %o1 400063c8: 94 07 bf f4 add %fp, -12, %o2 400063cc: 40 00 0d 5e call 40009944 <_Objects_Get> 400063d0: 90 12 23 cc or %o0, 0x3cc, %o0 return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 400063d4: c2 07 bf f4 ld [ %fp + -12 ], %g1 400063d8: 80 a0 60 00 cmp %g1, 0 400063dc: 02 80 00 06 be 400063f4 400063e0: 80 a0 60 02 cmp %g1, 2 400063e4: 18 80 00 15 bgu 40006438 400063e8: 90 10 20 16 mov 0x16, %o0 _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( status ); } return POSIX_BOTTOM_REACHED(); } 400063ec: 81 c7 e0 08 ret 400063f0: 91 e8 00 08 restore %g0, %o0, %o0 case OBJECTS_REMOTE: case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: status = _CORE_RWLock_Release( &the_rwlock->RWLock ); 400063f4: 40 00 09 ad call 40008aa8 <_CORE_RWLock_Release> 400063f8: 90 02 20 10 add %o0, 0x10, %o0 400063fc: b0 10 00 08 mov %o0, %i0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006400: 03 10 00 72 sethi %hi(0x4001c800), %g1 40006404: c4 00 61 30 ld [ %g1 + 0x130 ], %g2 ! 4001c930 <_Thread_Dispatch_disable_level> 40006408: 84 00 bf ff add %g2, -1, %g2 4000640c: c4 20 61 30 st %g2, [ %g1 + 0x130 ] 40006410: c2 00 61 30 ld [ %g1 + 0x130 ], %g1 40006414: 80 a0 60 00 cmp %g1, 0 40006418: 12 80 00 04 bne 40006428 4000641c: 01 00 00 00 nop _Thread_Dispatch(); 40006420: 40 00 11 fe call 4000ac18 <_Thread_Dispatch> 40006424: 01 00 00 00 nop _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( status ); 40006428: 7f ff ff 7d call 4000621c <_POSIX_RWLock_Translate_core_RWLock_return_code> 4000642c: 90 10 00 18 mov %i0, %o0 } return POSIX_BOTTOM_REACHED(); } 40006430: 81 c7 e0 08 ret 40006434: 91 e8 00 08 restore %g0, %o0, %o0 status = _CORE_RWLock_Release( &the_rwlock->RWLock ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( status ); } return POSIX_BOTTOM_REACHED(); 40006438: 40 00 01 e5 call 40006bcc <== NOT EXECUTED 4000643c: 01 00 00 00 nop <== NOT EXECUTED } 40006440: 81 c7 e0 08 ret <== NOT EXECUTED 40006444: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED status = _CORE_RWLock_Release( &the_rwlock->RWLock ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( status ); } return POSIX_BOTTOM_REACHED(); 40006448: 90 10 20 16 mov 0x16, %o0 } 4000644c: b0 10 00 08 mov %o0, %i0 40006450: 81 c7 e0 08 ret 40006454: 81 e8 00 00 restore 40006458 : */ int pthread_rwlock_wrlock( pthread_rwlock_t *rwlock ) { 40006458: 9d e3 bf 90 save %sp, -112, %sp POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 4000645c: 80 a6 20 00 cmp %i0, 0 40006460: 02 80 00 28 be 40006500 40006464: 11 10 00 72 sethi %hi(0x4001c800), %o0 40006468: d2 06 00 00 ld [ %i0 ], %o1 4000646c: 94 07 bf f4 add %fp, -12, %o2 40006470: 40 00 0d 35 call 40009944 <_Objects_Get> 40006474: 90 12 23 cc or %o0, 0x3cc, %o0 return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 40006478: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000647c: 80 a0 60 00 cmp %g1, 0 40006480: 22 80 00 07 be,a 4000649c 40006484: d2 06 00 00 ld [ %i0 ], %o1 40006488: 80 a0 60 02 cmp %g1, 2 4000648c: 18 80 00 19 bgu 400064f0 40006490: 90 10 20 16 mov 0x16, %o0 (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 40006494: 81 c7 e0 08 ret 40006498: 91 e8 00 08 restore %g0, %o0, %o0 case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 4000649c: 90 02 20 10 add %o0, 0x10, %o0 400064a0: 94 10 20 01 mov 1, %o2 400064a4: 96 10 20 00 clr %o3 400064a8: 40 00 09 5e call 40008a20 <_CORE_RWLock_Obtain_for_writing> 400064ac: 98 10 20 00 clr %o4 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400064b0: 03 10 00 72 sethi %hi(0x4001c800), %g1 400064b4: c4 00 61 30 ld [ %g1 + 0x130 ], %g2 ! 4001c930 <_Thread_Dispatch_disable_level> 400064b8: 84 00 bf ff add %g2, -1, %g2 400064bc: c4 20 61 30 st %g2, [ %g1 + 0x130 ] 400064c0: c2 00 61 30 ld [ %g1 + 0x130 ], %g1 400064c4: 80 a0 60 00 cmp %g1, 0 400064c8: 12 80 00 05 bne 400064dc 400064cc: 03 10 00 72 sethi %hi(0x4001c800), %g1 _Thread_Dispatch(); 400064d0: 40 00 11 d2 call 4000ac18 <_Thread_Dispatch> 400064d4: 01 00 00 00 nop 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 400064d8: 03 10 00 72 sethi %hi(0x4001c800), %g1 400064dc: c2 00 62 0c ld [ %g1 + 0x20c ], %g1 ! 4001ca0c <_Thread_Executing> 400064e0: 7f ff ff 4f call 4000621c <_POSIX_RWLock_Translate_core_RWLock_return_code> 400064e4: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 400064e8: 81 c7 e0 08 ret 400064ec: 91 e8 00 08 restore %g0, %o0, %o0 return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 400064f0: 40 00 01 b7 call 40006bcc <== NOT EXECUTED 400064f4: 01 00 00 00 nop <== NOT EXECUTED } 400064f8: 81 c7 e0 08 ret <== NOT EXECUTED 400064fc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40006500: 90 10 20 16 mov 0x16, %o0 } 40006504: b0 10 00 08 mov %o0, %i0 40006508: 81 c7 e0 08 ret 4000650c: 81 e8 00 00 restore 40005708 : int pthread_setcancelstate( int state, int *oldstate ) { 40005708: 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() ) 4000570c: 03 10 00 5b sethi %hi(0x40016c00), %g1 40005710: c2 00 62 e4 ld [ %g1 + 0x2e4 ], %g1 ! 40016ee4 <_ISR_Nest_level> int pthread_setcancelstate( int state, int *oldstate ) { 40005714: 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() ) 40005718: 80 a0 60 00 cmp %g1, 0 4000571c: 12 80 00 28 bne 400057bc 40005720: b0 10 20 47 mov 0x47, %i0 return EPROTO; if ( !oldstate ) 40005724: 80 a6 60 00 cmp %i1, 0 40005728: 02 80 00 27 be 400057c4 4000572c: 80 a1 20 01 cmp %g4, 1 return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 40005730: 38 80 00 23 bgu,a 400057bc 40005734: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40005738: 07 10 00 5b sethi %hi(0x40016c00), %g3 return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 4000573c: 1b 10 00 5b sethi %hi(0x40016c00), %o5 40005740: c2 00 e2 20 ld [ %g3 + 0x220 ], %g1 40005744: c4 03 62 fc ld [ %o5 + 0x2fc ], %g2 40005748: 82 00 60 01 inc %g1 4000574c: c4 00 a1 70 ld [ %g2 + 0x170 ], %g2 40005750: c2 20 e2 20 st %g1, [ %g3 + 0x220 ] _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 40005754: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1 thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 40005758: 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; 4000575c: c2 26 40 00 st %g1, [ %i1 ] thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 40005760: 12 80 00 0c bne 40005790 40005764: c8 20 a0 cc st %g4, [ %g2 + 0xcc ] 40005768: c2 00 a0 d0 ld [ %g2 + 0xd0 ], %g1 4000576c: 80 a0 60 01 cmp %g1, 1 40005770: 12 80 00 08 bne 40005790 40005774: 01 00 00 00 nop 40005778: c2 00 a0 d4 ld [ %g2 + 0xd4 ], %g1 <== NOT EXECUTED 4000577c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005780: 02 80 00 04 be 40005790 <== NOT EXECUTED 40005784: 01 00 00 00 nop <== NOT EXECUTED thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) _POSIX_Threads_cancel_run( _Thread_Executing ); 40005788: 7f ff fe 09 call 40004fac <_POSIX_Threads_cancel_run> <== NOT EXECUTED 4000578c: d0 03 62 fc ld [ %o5 + 0x2fc ], %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40005790: 03 10 00 5b sethi %hi(0x40016c00), %g1 40005794: c4 00 62 20 ld [ %g1 + 0x220 ], %g2 ! 40016e20 <_Thread_Dispatch_disable_level> 40005798: b0 10 20 00 clr %i0 4000579c: 84 00 bf ff add %g2, -1, %g2 400057a0: c4 20 62 20 st %g2, [ %g1 + 0x220 ] 400057a4: c2 00 62 20 ld [ %g1 + 0x220 ], %g1 400057a8: 80 a0 60 00 cmp %g1, 0 400057ac: 12 80 00 07 bne 400057c8 400057b0: 01 00 00 00 nop _Thread_Dispatch(); 400057b4: 40 00 0f 87 call 400095d0 <_Thread_Dispatch> 400057b8: 01 00 00 00 nop 400057bc: 81 c7 e0 08 ret 400057c0: 81 e8 00 00 restore 400057c4: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } 400057c8: 81 c7 e0 08 ret <== NOT EXECUTED 400057cc: 81 e8 00 00 restore <== NOT EXECUTED 400057d0 : int pthread_setcanceltype( int type, int *oldtype ) { 400057d0: 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() ) 400057d4: 03 10 00 5b sethi %hi(0x40016c00), %g1 400057d8: c2 00 62 e4 ld [ %g1 + 0x2e4 ], %g1 ! 40016ee4 <_ISR_Nest_level> int pthread_setcanceltype( int type, int *oldtype ) { 400057dc: 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() ) 400057e0: 80 a0 60 00 cmp %g1, 0 400057e4: 12 80 00 28 bne 40005884 400057e8: b0 10 20 47 mov 0x47, %i0 return EPROTO; if ( !oldtype ) 400057ec: 80 a6 60 00 cmp %i1, 0 400057f0: 02 80 00 27 be 4000588c 400057f4: 80 a1 20 01 cmp %g4, 1 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 400057f8: 38 80 00 23 bgu,a 40005884 400057fc: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40005800: 07 10 00 5b sethi %hi(0x40016c00), %g3 return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 40005804: 1b 10 00 5b sethi %hi(0x40016c00), %o5 40005808: c2 00 e2 20 ld [ %g3 + 0x220 ], %g1 4000580c: c4 03 62 fc ld [ %o5 + 0x2fc ], %g2 40005810: 82 00 60 01 inc %g1 40005814: c4 00 a1 70 ld [ %g2 + 0x170 ], %g2 40005818: c2 20 e2 20 st %g1, [ %g3 + 0x220 ] _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 4000581c: c2 00 a0 d0 ld [ %g2 + 0xd0 ], %g1 40005820: c2 26 40 00 st %g1, [ %i1 ] thread_support->cancelability_type = type; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 40005824: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1 40005828: 80 a0 60 00 cmp %g1, 0 4000582c: 12 80 00 0b bne 40005858 40005830: c8 20 a0 d0 st %g4, [ %g2 + 0xd0 ] 40005834: 80 a1 20 01 cmp %g4, 1 40005838: 12 80 00 08 bne 40005858 4000583c: 01 00 00 00 nop 40005840: c2 00 a0 d4 ld [ %g2 + 0xd4 ], %g1 40005844: 80 a0 60 00 cmp %g1, 0 40005848: 02 80 00 04 be 40005858 4000584c: 01 00 00 00 nop thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) _POSIX_Threads_cancel_run( _Thread_Executing ); 40005850: 7f ff fd d7 call 40004fac <_POSIX_Threads_cancel_run> <== NOT EXECUTED 40005854: d0 03 62 fc ld [ %o5 + 0x2fc ], %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40005858: 03 10 00 5b sethi %hi(0x40016c00), %g1 4000585c: c4 00 62 20 ld [ %g1 + 0x220 ], %g2 ! 40016e20 <_Thread_Dispatch_disable_level> 40005860: b0 10 20 00 clr %i0 40005864: 84 00 bf ff add %g2, -1, %g2 40005868: c4 20 62 20 st %g2, [ %g1 + 0x220 ] 4000586c: c2 00 62 20 ld [ %g1 + 0x220 ], %g1 40005870: 80 a0 60 00 cmp %g1, 0 40005874: 12 80 00 07 bne 40005890 40005878: 01 00 00 00 nop _Thread_Dispatch(); 4000587c: 40 00 0f 55 call 400095d0 <_Thread_Dispatch> 40005880: 01 00 00 00 nop 40005884: 81 c7 e0 08 ret 40005888: 81 e8 00 00 restore 4000588c: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } 40005890: 81 c7 e0 08 ret <== NOT EXECUTED 40005894: 81 e8 00 00 restore <== NOT EXECUTED 40008188 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 40008188: 9d e3 bf 90 save %sp, -112, %sp /* * Check all the parameters */ if ( !param ) 4000818c: 80 a6 a0 00 cmp %i2, 0 40008190: 02 80 00 70 be 40008350 40008194: 90 10 20 16 mov 0x16, %o0 return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 40008198: c2 06 80 00 ld [ %i2 ], %g1 4000819c: 82 00 7f ff add %g1, -1, %g1 400081a0: 80 a0 60 fd cmp %g1, 0xfd 400081a4: 18 80 00 6b bgu 40008350 400081a8: 80 a6 60 01 cmp %i1, 1 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 400081ac: 02 80 00 10 be 400081ec 400081b0: a2 10 20 00 clr %l1 400081b4: 14 80 00 08 bg 400081d4 400081b8: 80 a6 60 02 cmp %i1, 2 400081bc: 80 a6 60 00 cmp %i1, 0 400081c0: a2 10 20 01 mov 1, %l1 400081c4: 02 80 00 1b be 40008230 400081c8: a4 10 20 00 clr %l2 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 400081cc: 81 c7 e0 08 ret 400081d0: 91 e8 00 08 restore %g0, %o0, %o0 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 400081d4: 02 80 00 05 be 400081e8 400081d8: 80 a6 60 03 cmp %i1, 3 400081dc: 32 80 00 5d bne,a 40008350 400081e0: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 400081e4: 30 80 00 04 b,a 400081f4 400081e8: a2 10 20 02 mov 2, %l1 400081ec: 10 80 00 11 b 40008230 400081f0: 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 ) < 400081f4: 40 00 13 e0 call 4000d174 <_Timespec_To_ticks> 400081f8: 90 06 a0 08 add %i2, 8, %o0 400081fc: a0 10 00 08 mov %o0, %l0 40008200: 40 00 13 dd call 4000d174 <_Timespec_To_ticks> 40008204: 90 06 a0 10 add %i2, 0x10, %o0 40008208: 80 a4 00 08 cmp %l0, %o0 4000820c: 2a 80 00 51 bcs,a 40008350 40008210: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED _Timespec_To_ticks( ¶m->ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) 40008214: c2 06 a0 04 ld [ %i2 + 4 ], %g1 40008218: 82 00 7f ff add %g1, -1, %g1 4000821c: 80 a0 60 fd cmp %g1, 0xfd 40008220: 18 80 00 4b bgu 4000834c 40008224: 03 10 00 20 sethi %hi(0x40008000), %g1 40008228: a2 10 20 03 mov 3, %l1 4000822c: a4 10 60 78 or %g1, 0x78, %l2 40008230: 92 10 00 18 mov %i0, %o1 40008234: 11 10 00 68 sethi %hi(0x4001a000), %o0 40008238: 94 07 bf f4 add %fp, -12, %o2 4000823c: 40 00 0a c0 call 4000ad3c <_Objects_Get> 40008240: 90 12 23 f8 or %o0, 0x3f8, %o0 /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 40008244: c2 07 bf f4 ld [ %fp + -12 ], %g1 40008248: 80 a0 60 00 cmp %g1, 0 4000824c: 02 80 00 06 be 40008264 40008250: b0 10 00 08 mov %o0, %i0 40008254: 80 a0 60 02 cmp %g1, 2 40008258: 08 80 00 3e bleu 40008350 4000825c: 90 10 20 03 mov 3, %o0 40008260: 30 80 00 37 b,a 4000833c <== NOT EXECUTED case OBJECTS_ERROR: case OBJECTS_REMOTE: return ESRCH; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 40008264: e0 02 21 70 ld [ %o0 + 0x170 ], %l0 if ( api->schedpolicy == SCHED_SPORADIC ) 40008268: c2 04 20 7c ld [ %l0 + 0x7c ], %g1 4000826c: 80 a0 60 03 cmp %g1, 3 40008270: 32 80 00 05 bne,a 40008284 40008274: f2 24 20 7c st %i1, [ %l0 + 0x7c ] (void) _Watchdog_Remove( &api->Sporadic_timer ); 40008278: 40 00 15 10 call 4000d6b8 <_Watchdog_Remove> 4000827c: 90 04 20 9c add %l0, 0x9c, %o0 api->schedpolicy = policy; 40008280: f2 24 20 7c st %i1, [ %l0 + 0x7c ] api->schedparam = *param; 40008284: 92 10 00 1a mov %i2, %o1 40008288: 90 04 20 80 add %l0, 0x80, %o0 4000828c: 40 00 26 ad call 40011d40 40008290: 94 10 20 18 mov 0x18, %o2 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 40008294: 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; 40008298: e2 26 20 88 st %l1, [ %i0 + 0x88 ] the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 4000829c: 80 a0 60 00 cmp %g1, 0 400082a0: 06 80 00 1a bl 40008308 400082a4: e4 26 20 8c st %l2, [ %i0 + 0x8c ] 400082a8: 80 a0 60 02 cmp %g1, 2 400082ac: 24 80 00 07 ble,a 400082c8 400082b0: c4 04 20 80 ld [ %l0 + 0x80 ], %g2 400082b4: 80 a0 60 03 cmp %g1, 3 400082b8: 12 80 00 14 bne 40008308 400082bc: 01 00 00 00 nop TRUE ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 400082c0: 10 80 00 0c b 400082f0 400082c4: 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; 400082c8: 03 10 00 68 sethi %hi(0x4001a000), %g1 400082cc: c2 00 60 68 ld [ %g1 + 0x68 ], %g1 ! 4001a068 <_Thread_Ticks_per_timeslice> the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 400082d0: 90 10 00 18 mov %i0, %o0 switch ( api->schedpolicy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 400082d4: c2 26 20 84 st %g1, [ %i0 + 0x84 ] 400082d8: 92 10 20 ff mov 0xff, %o1 the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 400082dc: 94 10 20 01 mov 1, %o2 400082e0: 92 22 40 02 sub %o1, %g2, %o1 400082e4: 40 00 0e 1f call 4000bb60 <_Thread_Change_priority> 400082e8: d2 26 20 18 st %o1, [ %i0 + 0x18 ] 400082ec: 30 80 00 07 b,a 40008308 ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; _Watchdog_Remove( &api->Sporadic_timer ); 400082f0: 90 04 20 9c add %l0, 0x9c, %o0 400082f4: 40 00 14 f1 call 4000d6b8 <_Watchdog_Remove> 400082f8: c2 24 20 98 st %g1, [ %l0 + 0x98 ] _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 400082fc: 92 10 00 18 mov %i0, %o1 40008300: 7f ff ff 72 call 400080c8 <_POSIX_Threads_Sporadic_budget_TSR> 40008304: 90 10 20 00 clr %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008308: 03 10 00 68 sethi %hi(0x4001a000), %g1 4000830c: c4 00 61 10 ld [ %g1 + 0x110 ], %g2 ! 4001a110 <_Thread_Dispatch_disable_level> 40008310: 90 10 20 00 clr %o0 40008314: 84 00 bf ff add %g2, -1, %g2 40008318: c4 20 61 10 st %g2, [ %g1 + 0x110 ] 4000831c: c2 00 61 10 ld [ %g1 + 0x110 ], %g1 40008320: 80 a0 60 00 cmp %g1, 0 40008324: 32 80 00 0c bne,a 40008354 40008328: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED _Thread_Dispatch(); 4000832c: 40 00 0f 39 call 4000c010 <_Thread_Dispatch> 40008330: 01 00 00 00 nop 40008334: 10 80 00 07 b 40008350 40008338: 90 10 20 00 clr %o0 ! 0 } _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 4000833c: 40 00 00 1b call 400083a8 <== NOT EXECUTED 40008340: 01 00 00 00 nop <== NOT EXECUTED } 40008344: 81 c7 e0 08 ret <== NOT EXECUTED 40008348: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED } _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 4000834c: 90 10 20 16 mov 0x16, %o0 } 40008350: b0 10 00 08 mov %o0, %i0 40008354: 81 c7 e0 08 ret 40008358: 81 e8 00 00 restore 400057ec : int pthread_setspecific( pthread_key_t key, const void *value ) { 400057ec: 9d e3 bf 90 save %sp, -112, %sp 400057f0: 11 10 00 5c sethi %hi(0x40017000), %o0 400057f4: 92 10 00 18 mov %i0, %o1 400057f8: 90 12 23 10 or %o0, 0x310, %o0 400057fc: 40 00 0c 7c call 400089ec <_Objects_Get> 40005800: 94 07 bf f4 add %fp, -12, %o2 uint32_t api; uint32_t index; Objects_Locations location; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 40005804: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005808: 80 a0 60 00 cmp %g1, 0 4000580c: 22 80 00 06 be,a 40005824 40005810: 03 10 00 5b sethi %hi(0x40016c00), %g1 40005814: 80 a0 60 02 cmp %g1, 2 40005818: 08 80 00 1d bleu 4000588c 4000581c: 90 10 20 16 mov 0x16, %o0 40005820: 30 80 00 19 b,a 40005884 <== NOT EXECUTED case OBJECTS_ERROR: case OBJECTS_REMOTE: /* should never happen */ return EINVAL; case OBJECTS_LOCAL: api = _Objects_Get_API( _Thread_Executing->Object.id ); 40005824: c2 00 62 ec ld [ %g1 + 0x2ec ], %g1 40005828: c4 00 60 08 ld [ %g1 + 8 ], %g2 index = _Objects_Get_index( _Thread_Executing->Object.id ); the_key->Values[ api ][ index ] = (void *) value; 4000582c: 83 30 a0 16 srl %g2, 0x16, %g1 40005830: 82 08 60 1c and %g1, 0x1c, %g1 40005834: 82 00 40 08 add %g1, %o0, %g1 40005838: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 4000583c: 03 00 00 3f sethi %hi(0xfc00), %g1 40005840: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40005844: 84 08 80 01 and %g2, %g1, %g2 40005848: 85 28 a0 02 sll %g2, 2, %g2 4000584c: f2 20 c0 02 st %i1, [ %g3 + %g2 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40005850: 05 10 00 5b sethi %hi(0x40016c00), %g2 40005854: c2 00 a2 10 ld [ %g2 + 0x210 ], %g1 ! 40016e10 <_Thread_Dispatch_disable_level> 40005858: 90 10 20 00 clr %o0 4000585c: 82 00 7f ff add %g1, -1, %g1 40005860: c2 20 a2 10 st %g1, [ %g2 + 0x210 ] 40005864: c2 00 a2 10 ld [ %g2 + 0x210 ], %g1 40005868: 80 a0 60 00 cmp %g1, 0 4000586c: 12 80 00 08 bne 4000588c 40005870: 01 00 00 00 nop _Thread_Dispatch(); 40005874: 40 00 11 13 call 40009cc0 <_Thread_Dispatch> 40005878: 01 00 00 00 nop 4000587c: 10 80 00 04 b 4000588c 40005880: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40005884: 40 00 01 f5 call 40006058 <== NOT EXECUTED 40005888: 01 00 00 00 nop <== NOT EXECUTED } 4000588c: 81 c7 e0 08 ret 40005890: 91 e8 00 08 restore %g0, %o0, %o0 40005498 : */ int pthread_spin_destroy( pthread_spinlock_t *spinlock ) { 40005498: 9d e3 bf 90 save %sp, -112, %sp POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; if ( !spinlock ) 4000549c: 80 a6 20 00 cmp %i0, 0 400054a0: 02 80 00 2c be 40005550 400054a4: 94 07 bf f4 add %fp, -12, %o2 RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get ( pthread_spinlock_t *spinlock, Objects_Locations *location ) { return (POSIX_Spinlock_Control *) _Objects_Get( 400054a8: d2 06 00 00 ld [ %i0 ], %o1 400054ac: 31 10 00 51 sethi %hi(0x40014400), %i0 400054b0: 40 00 0b da call 40008418 <_Objects_Get> 400054b4: 90 16 21 34 or %i0, 0x134, %o0 ! 40014534 <_POSIX_Spinlock_Information> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 400054b8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400054bc: 80 a0 60 00 cmp %g1, 0 400054c0: 02 80 00 07 be 400054dc 400054c4: 88 10 00 08 mov %o0, %g4 400054c8: 80 a0 60 02 cmp %g1, 2 400054cc: 18 80 00 1d bgu 40005540 400054d0: 90 10 20 16 mov 0x16, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 400054d4: 81 c7 e0 08 ret 400054d8: 91 e8 00 08 restore %g0, %o0, %o0 RTEMS_INLINE_ROUTINE boolean _CORE_spinlock_Is_busy( CORE_spinlock_Control *the_spinlock ) { return (the_spinlock->users != 0); 400054dc: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 case OBJECTS_REMOTE: case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: if ( _CORE_spinlock_Is_busy( &the_spinlock->Spinlock ) ) { 400054e0: 80 a0 60 00 cmp %g1, 0 400054e4: 22 80 00 06 be,a 400054fc 400054e8: 90 16 21 34 or %i0, 0x134, %o0 _Thread_Enable_dispatch(); 400054ec: 7f ff ff de call 40005464 <_Thread_Enable_dispatch> 400054f0: 01 00 00 00 nop 400054f4: 10 80 00 18 b 40005554 400054f8: 90 10 20 10 mov 0x10, %o0 ! 10 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 400054fc: c2 01 20 08 ld [ %g4 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40005500: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 40005504: 05 00 00 3f sethi %hi(0xfc00), %g2 40005508: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 4000550c: 82 08 40 02 and %g1, %g2, %g1 40005510: 80 a0 40 03 cmp %g1, %g3 40005514: 18 80 00 05 bgu 40005528 40005518: 92 10 00 04 mov %g4, %o1 information->local_table[ index ] = the_object; 4000551c: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40005520: 83 28 60 02 sll %g1, 2, %g1 40005524: c0 20 80 01 clr [ %g2 + %g1 ] */ RTEMS_INLINE_ROUTINE void _POSIX_Spinlock_Free ( POSIX_Spinlock_Control *the_spinlock ) { _Objects_Free( &_POSIX_Spinlock_Information, &the_spinlock->Object ); 40005528: 40 00 0b 7a call 40008310 <_Objects_Free> 4000552c: c0 21 20 0c clr [ %g4 + 0xc ] _Objects_Close( &_POSIX_Spinlock_Information, &the_spinlock->Object ); _POSIX_Spinlock_Free( the_spinlock ); _Thread_Enable_dispatch(); 40005530: 7f ff ff cd call 40005464 <_Thread_Enable_dispatch> 40005534: 01 00 00 00 nop 40005538: 10 80 00 07 b 40005554 4000553c: 90 10 20 00 clr %o0 ! 0 return 0; } return POSIX_BOTTOM_REACHED(); 40005540: 40 00 00 db call 400058ac <== NOT EXECUTED 40005544: 01 00 00 00 nop <== NOT EXECUTED } 40005548: 81 c7 e0 08 ret <== NOT EXECUTED 4000554c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40005550: 90 10 20 16 mov 0x16, %o0 } 40005554: b0 10 00 08 mov %o0, %i0 40005558: 81 c7 e0 08 ret 4000555c: 81 e8 00 00 restore 40005594 : int pthread_spin_init( pthread_spinlock_t *spinlock, int pshared ) { 40005594: 9d e3 bf 90 save %sp, -112, %sp POSIX_Spinlock_Control *the_spinlock; CORE_spinlock_Attributes attributes; if ( !spinlock ) 40005598: 80 a6 20 00 cmp %i0, 0 4000559c: 02 80 00 26 be 40005634 400055a0: 80 a6 60 00 cmp %i1, 0 return EINVAL; switch ( pshared ) { 400055a4: 12 80 00 24 bne 40005634 400055a8: 05 10 00 50 sethi %hi(0x40014000), %g2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400055ac: c2 00 a2 00 ld [ %g2 + 0x200 ], %g1 ! 40014200 <_Thread_Dispatch_disable_level> 400055b0: 82 00 60 01 inc %g1 400055b4: c2 20 a2 00 st %g1, [ %g2 + 0x200 ] * This function allocates a spinlock control block from * the inactive chain of free spinlock control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Allocate( void ) { return (POSIX_Spinlock_Control *) 400055b8: 21 10 00 51 sethi %hi(0x40014400), %l0 400055bc: 40 00 0a 53 call 40007f08 <_Objects_Allocate> 400055c0: 90 14 21 34 or %l0, 0x134, %o0 ! 40014534 <_POSIX_Spinlock_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_spinlock = _POSIX_Spinlock_Allocate(); if ( !the_spinlock ) { 400055c4: b2 92 20 00 orcc %o0, 0, %i1 400055c8: 12 80 00 06 bne 400055e0 400055cc: 90 06 60 10 add %i1, 0x10, %o0 _Thread_Enable_dispatch(); 400055d0: 7f ff ff e4 call 40005560 <_Thread_Enable_dispatch> 400055d4: b0 10 20 0b mov 0xb, %i0 400055d8: 81 c7 e0 08 ret 400055dc: 81 e8 00 00 restore return EAGAIN; } _CORE_spinlock_Initialize( &the_spinlock->Spinlock, &attributes ); 400055e0: 40 00 08 31 call 400076a4 <_CORE_spinlock_Initialize> 400055e4: 92 07 bf f4 add %fp, -12, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400055e8: 90 14 21 34 or %l0, 0x134, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 400055ec: c2 06 60 08 ld [ %i1 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400055f0: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 400055f4: 05 00 00 3f sethi %hi(0xfc00), %g2 400055f8: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 400055fc: 82 08 40 02 and %g1, %g2, %g1 40005600: 80 a0 40 03 cmp %g1, %g3 40005604: 38 80 00 06 bgu,a 4000561c 40005608: c2 06 60 08 ld [ %i1 + 8 ], %g1 <== NOT EXECUTED information->local_table[ index ] = the_object; 4000560c: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40005610: 83 28 60 02 sll %g1, 2, %g1 40005614: f2 20 80 01 st %i1, [ %g2 + %g1 ] &_POSIX_Spinlock_Information, &the_spinlock->Object, 0 ); *spinlock = the_spinlock->Object.id; 40005618: c2 06 60 08 ld [ %i1 + 8 ], %g1 if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 4000561c: c0 26 60 0c clr [ %i1 + 0xc ] 40005620: c2 26 00 00 st %g1, [ %i0 ] _Thread_Enable_dispatch(); 40005624: 7f ff ff cf call 40005560 <_Thread_Enable_dispatch> 40005628: b0 10 20 00 clr %i0 4000562c: 81 c7 e0 08 ret 40005630: 81 e8 00 00 restore return 0; } 40005634: 81 c7 e0 08 ret 40005638: 91 e8 20 16 restore %g0, 0x16, %o0 4000563c : */ int pthread_spin_lock( pthread_spinlock_t *spinlock ) { 4000563c: 9d e3 bf 90 save %sp, -112, %sp POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 40005640: 80 a6 20 00 cmp %i0, 0 40005644: 02 80 00 25 be 400056d8 40005648: 11 10 00 51 sethi %hi(0x40014400), %o0 RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get ( pthread_spinlock_t *spinlock, Objects_Locations *location ) { return (POSIX_Spinlock_Control *) _Objects_Get( 4000564c: d2 06 00 00 ld [ %i0 ], %o1 40005650: 94 07 bf f4 add %fp, -12, %o2 40005654: 40 00 0b 71 call 40008418 <_Objects_Get> 40005658: 90 12 21 34 or %o0, 0x134, %o0 return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 4000565c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005660: 80 a0 60 00 cmp %g1, 0 40005664: 02 80 00 07 be 40005680 40005668: 92 10 20 01 mov 1, %o1 4000566c: 80 a0 60 02 cmp %g1, 2 40005670: 18 80 00 16 bgu 400056c8 40005674: 90 10 20 16 mov 0x16, %o0 status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, TRUE, 0 ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); } return POSIX_BOTTOM_REACHED(); } 40005678: 81 c7 e0 08 ret 4000567c: 91 e8 00 08 restore %g0, %o0, %o0 case OBJECTS_REMOTE: case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, TRUE, 0 ); 40005680: 94 10 20 00 clr %o2 40005684: 40 00 08 2d call 40007738 <_CORE_spinlock_Wait> 40005688: 90 02 20 10 add %o0, 0x10, %o0 4000568c: b0 10 00 08 mov %o0, %i0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40005690: 03 10 00 50 sethi %hi(0x40014000), %g1 40005694: c4 00 62 00 ld [ %g1 + 0x200 ], %g2 ! 40014200 <_Thread_Dispatch_disable_level> 40005698: 84 00 bf ff add %g2, -1, %g2 4000569c: c4 20 62 00 st %g2, [ %g1 + 0x200 ] 400056a0: c2 00 62 00 ld [ %g1 + 0x200 ], %g1 400056a4: 80 a0 60 00 cmp %g1, 0 400056a8: 12 80 00 04 bne 400056b8 400056ac: 01 00 00 00 nop _Thread_Dispatch(); 400056b0: 40 00 10 0f call 400096ec <_Thread_Dispatch> 400056b4: 01 00 00 00 nop _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 400056b8: 40 00 00 0c call 400056e8 <_POSIX_Spinlock_Translate_core_spinlock_return_code> 400056bc: 90 10 00 18 mov %i0, %o0 } return POSIX_BOTTOM_REACHED(); } 400056c0: 81 c7 e0 08 ret 400056c4: 91 e8 00 08 restore %g0, %o0, %o0 case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, TRUE, 0 ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); } return POSIX_BOTTOM_REACHED(); 400056c8: 40 00 00 79 call 400058ac <== NOT EXECUTED 400056cc: 01 00 00 00 nop <== NOT EXECUTED } 400056d0: 81 c7 e0 08 ret <== NOT EXECUTED 400056d4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, TRUE, 0 ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); } return POSIX_BOTTOM_REACHED(); 400056d8: 90 10 20 16 mov 0x16, %o0 } 400056dc: b0 10 00 08 mov %o0, %i0 400056e0: 81 c7 e0 08 ret 400056e4: 81 e8 00 00 restore 40005710 : */ int pthread_spin_trylock( pthread_spinlock_t *spinlock ) { 40005710: 9d e3 bf 90 save %sp, -112, %sp POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 40005714: 80 a6 20 00 cmp %i0, 0 40005718: 02 80 00 25 be 400057ac 4000571c: 11 10 00 51 sethi %hi(0x40014400), %o0 40005720: d2 06 00 00 ld [ %i0 ], %o1 40005724: 94 07 bf f4 add %fp, -12, %o2 40005728: 40 00 0b 3c call 40008418 <_Objects_Get> 4000572c: 90 12 21 34 or %o0, 0x134, %o0 return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 40005730: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005734: 80 a0 60 00 cmp %g1, 0 40005738: 02 80 00 07 be 40005754 4000573c: 92 10 20 00 clr %o1 40005740: 80 a0 60 02 cmp %g1, 2 40005744: 18 80 00 16 bgu 4000579c 40005748: 90 10 20 16 mov 0x16, %o0 status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, FALSE, 0 ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); } return POSIX_BOTTOM_REACHED(); } 4000574c: 81 c7 e0 08 ret 40005750: 91 e8 00 08 restore %g0, %o0, %o0 case OBJECTS_REMOTE: case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, FALSE, 0 ); 40005754: 94 10 20 00 clr %o2 40005758: 40 00 07 f8 call 40007738 <_CORE_spinlock_Wait> 4000575c: 90 02 20 10 add %o0, 0x10, %o0 40005760: b0 10 00 08 mov %o0, %i0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40005764: 03 10 00 50 sethi %hi(0x40014000), %g1 40005768: c4 00 62 00 ld [ %g1 + 0x200 ], %g2 ! 40014200 <_Thread_Dispatch_disable_level> 4000576c: 84 00 bf ff add %g2, -1, %g2 40005770: c4 20 62 00 st %g2, [ %g1 + 0x200 ] 40005774: c2 00 62 00 ld [ %g1 + 0x200 ], %g1 40005778: 80 a0 60 00 cmp %g1, 0 4000577c: 12 80 00 04 bne 4000578c 40005780: 01 00 00 00 nop _Thread_Dispatch(); 40005784: 40 00 0f da call 400096ec <_Thread_Dispatch> 40005788: 01 00 00 00 nop _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 4000578c: 7f ff ff d7 call 400056e8 <_POSIX_Spinlock_Translate_core_spinlock_return_code> 40005790: 90 10 00 18 mov %i0, %o0 } return POSIX_BOTTOM_REACHED(); } 40005794: 81 c7 e0 08 ret 40005798: 91 e8 00 08 restore %g0, %o0, %o0 case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, FALSE, 0 ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); } return POSIX_BOTTOM_REACHED(); 4000579c: 40 00 00 44 call 400058ac <== NOT EXECUTED 400057a0: 01 00 00 00 nop <== NOT EXECUTED } 400057a4: 81 c7 e0 08 ret <== NOT EXECUTED 400057a8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, FALSE, 0 ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); } return POSIX_BOTTOM_REACHED(); 400057ac: 90 10 20 16 mov 0x16, %o0 } 400057b0: b0 10 00 08 mov %o0, %i0 400057b4: 81 c7 e0 08 ret 400057b8: 81 e8 00 00 restore 400057bc : */ int pthread_spin_unlock( pthread_spinlock_t *spinlock ) { 400057bc: 9d e3 bf 90 save %sp, -112, %sp POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 400057c0: 80 a6 20 00 cmp %i0, 0 400057c4: 02 80 00 23 be 40005850 400057c8: 11 10 00 51 sethi %hi(0x40014400), %o0 400057cc: d2 06 00 00 ld [ %i0 ], %o1 400057d0: 94 07 bf f4 add %fp, -12, %o2 400057d4: 40 00 0b 11 call 40008418 <_Objects_Get> 400057d8: 90 12 21 34 or %o0, 0x134, %o0 return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 400057dc: c2 07 bf f4 ld [ %fp + -12 ], %g1 400057e0: 80 a0 60 00 cmp %g1, 0 400057e4: 02 80 00 06 be 400057fc 400057e8: 80 a0 60 02 cmp %g1, 2 400057ec: 18 80 00 15 bgu 40005840 400057f0: 90 10 20 16 mov 0x16, %o0 status = _CORE_spinlock_Release( &the_spinlock->Spinlock ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); } return POSIX_BOTTOM_REACHED(); } 400057f4: 81 c7 e0 08 ret 400057f8: 91 e8 00 08 restore %g0, %o0, %o0 case OBJECTS_REMOTE: case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: status = _CORE_spinlock_Release( &the_spinlock->Spinlock ); 400057fc: 40 00 07 b1 call 400076c0 <_CORE_spinlock_Release> 40005800: 90 02 20 10 add %o0, 0x10, %o0 40005804: b0 10 00 08 mov %o0, %i0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40005808: 03 10 00 50 sethi %hi(0x40014000), %g1 4000580c: c4 00 62 00 ld [ %g1 + 0x200 ], %g2 ! 40014200 <_Thread_Dispatch_disable_level> 40005810: 84 00 bf ff add %g2, -1, %g2 40005814: c4 20 62 00 st %g2, [ %g1 + 0x200 ] 40005818: c2 00 62 00 ld [ %g1 + 0x200 ], %g1 4000581c: 80 a0 60 00 cmp %g1, 0 40005820: 12 80 00 04 bne 40005830 40005824: 01 00 00 00 nop _Thread_Dispatch(); 40005828: 40 00 0f b1 call 400096ec <_Thread_Dispatch> 4000582c: 01 00 00 00 nop _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 40005830: 7f ff ff ae call 400056e8 <_POSIX_Spinlock_Translate_core_spinlock_return_code> 40005834: 90 10 00 18 mov %i0, %o0 } return POSIX_BOTTOM_REACHED(); } 40005838: 81 c7 e0 08 ret 4000583c: 91 e8 00 08 restore %g0, %o0, %o0 case OBJECTS_LOCAL: status = _CORE_spinlock_Release( &the_spinlock->Spinlock ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); } return POSIX_BOTTOM_REACHED(); 40005840: 40 00 00 1b call 400058ac <== NOT EXECUTED 40005844: 01 00 00 00 nop <== NOT EXECUTED } 40005848: 81 c7 e0 08 ret <== NOT EXECUTED 4000584c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_LOCAL: status = _CORE_spinlock_Release( &the_spinlock->Spinlock ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); } return POSIX_BOTTOM_REACHED(); 40005850: 90 10 20 16 mov 0x16, %o0 } 40005854: b0 10 00 08 mov %o0, %i0 40005858: 81 c7 e0 08 ret 4000585c: 81 e8 00 00 restore 400058bc : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 400058bc: 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() ) 400058c0: 03 10 00 5b sethi %hi(0x40016c00), %g1 400058c4: c2 00 62 e4 ld [ %g1 + 0x2e4 ], %g1 ! 40016ee4 <_ISR_Nest_level> 400058c8: 80 a0 60 00 cmp %g1, 0 400058cc: 12 80 00 1c bne 4000593c 400058d0: 07 10 00 5b sethi %hi(0x40016c00), %g3 return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 400058d4: 09 10 00 5b sethi %hi(0x40016c00), %g4 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400058d8: c2 00 e2 20 ld [ %g3 + 0x220 ], %g1 400058dc: c4 01 22 fc ld [ %g4 + 0x2fc ], %g2 400058e0: 82 00 60 01 inc %g1 400058e4: c4 00 a1 70 ld [ %g2 + 0x170 ], %g2 400058e8: c2 20 e2 20 st %g1, [ %g3 + 0x220 ] _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 400058ec: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1 400058f0: 80 a0 60 00 cmp %g1, 0 400058f4: 12 80 00 08 bne 40005914 400058f8: 01 00 00 00 nop 400058fc: c2 00 a0 d4 ld [ %g2 + 0xd4 ], %g1 40005900: 80 a0 60 00 cmp %g1, 0 40005904: 02 80 00 04 be 40005914 40005908: 01 00 00 00 nop thread_support->cancelation_requested ) _POSIX_Threads_cancel_run( _Thread_Executing ); 4000590c: 7f ff fd a8 call 40004fac <_POSIX_Threads_cancel_run> 40005910: d0 01 22 fc ld [ %g4 + 0x2fc ], %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40005914: 03 10 00 5b sethi %hi(0x40016c00), %g1 40005918: c4 00 62 20 ld [ %g1 + 0x220 ], %g2 ! 40016e20 <_Thread_Dispatch_disable_level> 4000591c: 84 00 bf ff add %g2, -1, %g2 40005920: c4 20 62 20 st %g2, [ %g1 + 0x220 ] 40005924: c2 00 62 20 ld [ %g1 + 0x220 ], %g1 40005928: 80 a0 60 00 cmp %g1, 0 4000592c: 12 80 00 04 bne 4000593c 40005930: 01 00 00 00 nop _Thread_Dispatch(); 40005934: 40 00 0f 27 call 400095d0 <_Thread_Dispatch> 40005938: 81 e8 00 00 restore 4000593c: 81 c7 e0 08 ret <== NOT EXECUTED 40005940: 81 e8 00 00 restore <== NOT EXECUTED 400176a0 : ssize_t read( int fd, void *buffer, size_t count ) { 400176a0: 9d e3 bf 98 save %sp, -104, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 400176a4: 03 10 00 62 sethi %hi(0x40018800), %g1 400176a8: c2 00 63 bc ld [ %g1 + 0x3bc ], %g1 ! 40018bbc ssize_t read( int fd, void *buffer, size_t count ) { 400176ac: 92 10 00 19 mov %i1, %o1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 400176b0: 80 a6 00 01 cmp %i0, %g1 400176b4: 1a 80 00 0e bcc 400176ec 400176b8: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 400176bc: 03 10 00 67 sethi %hi(0x40019c00), %g1 400176c0: c6 00 60 54 ld [ %g1 + 0x54 ], %g3 ! 40019c54 400176c4: 85 2e 20 02 sll %i0, 2, %g2 400176c8: 83 2e 20 04 sll %i0, 4, %g1 400176cc: 82 20 40 02 sub %g1, %g2, %g1 400176d0: 82 00 40 18 add %g1, %i0, %g1 400176d4: 83 28 60 02 sll %g1, 2, %g1 400176d8: b0 00 40 03 add %g1, %g3, %i0 rtems_libio_check_is_open(iop); 400176dc: c2 06 20 0c ld [ %i0 + 0xc ], %g1 400176e0: 80 88 61 00 btst 0x100, %g1 400176e4: 12 80 00 06 bne 400176fc 400176e8: 80 a6 60 00 cmp %i1, 0 400176ec: 7f ff da 8c call 4000e11c <__errno> <== NOT EXECUTED 400176f0: 01 00 00 00 nop <== NOT EXECUTED 400176f4: 10 80 00 14 b 40017744 <== NOT EXECUTED 400176f8: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 400176fc: 02 80 00 07 be 40017718 40017700: 80 a6 a0 00 cmp %i2, 0 rtems_libio_check_count( count ); 40017704: 02 80 00 1b be 40017770 40017708: 90 10 20 00 clr %o0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 4001770c: 80 88 60 02 btst 2, %g1 40017710: 32 80 00 06 bne,a 40017728 40017714: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40017718: 7f ff da 81 call 4000e11c <__errno> <== NOT EXECUTED 4001771c: 01 00 00 00 nop <== NOT EXECUTED 40017720: 10 80 00 09 b 40017744 <== NOT EXECUTED 40017724: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) 40017728: c2 00 60 08 ld [ %g1 + 8 ], %g1 4001772c: 80 a0 60 00 cmp %g1, 0 40017730: 12 80 00 08 bne 40017750 40017734: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 40017738: 7f ff da 79 call 4000e11c <__errno> <== NOT EXECUTED 4001773c: 01 00 00 00 nop <== NOT EXECUTED 40017740: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40017744: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40017748: 10 80 00 0a b 40017770 <== NOT EXECUTED 4001774c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rc = (*iop->handlers->read_h)( iop, buffer, count ); 40017750: 9f c0 40 00 call %g1 40017754: 90 10 00 18 mov %i0, %o0 if ( rc > 0 ) 40017758: 80 a2 20 00 cmp %o0, 0 4001775c: 04 80 00 05 ble 40017770 40017760: 01 00 00 00 nop iop->offset += rc; 40017764: c2 06 20 08 ld [ %i0 + 8 ], %g1 40017768: 82 00 40 08 add %g1, %o0, %g1 4001776c: c2 26 20 08 st %g1, [ %i0 + 8 ] return rc; } 40017770: 81 c7 e0 08 ret 40017774: 91 e8 00 08 restore %g0, %o0, %o0 40017660 : /* * get next entry in a directory. */ struct dirent * readdir(dirp) register DIR *dirp; { 40017660: 9d e3 bf 98 save %sp, -104, %sp register struct dirent *dp; if ( !dirp ) 40017664: a0 96 20 00 orcc %i0, 0, %l0 40017668: 02 80 00 2a be 40017710 4001766c: b0 10 20 00 clr %i0 return NULL; for (;;) { if (dirp->dd_loc == 0) { 40017670: c2 04 20 04 ld [ %l0 + 4 ], %g1 40017674: 80 a0 60 00 cmp %g1, 0 40017678: 32 80 00 0a bne,a 400176a0 4001767c: c6 04 20 04 ld [ %l0 + 4 ], %g3 dirp->dd_size = getdents (dirp->dd_fd, 40017680: d0 04 00 00 ld [ %l0 ], %o0 40017684: d2 04 20 0c ld [ %l0 + 0xc ], %o1 40017688: 40 00 24 45 call 4002079c 4001768c: d4 04 20 10 ld [ %l0 + 0x10 ], %o2 dirp->dd_buf, dirp->dd_len); if (dirp->dd_size <= 0) 40017690: 80 a2 20 00 cmp %o0, 0 40017694: 04 80 00 1e ble 4001770c 40017698: d0 24 20 08 st %o0, [ %l0 + 8 ] return NULL; } if (dirp->dd_loc >= dirp->dd_size) { 4001769c: c6 04 20 04 ld [ %l0 + 4 ], %g3 400176a0: c2 04 20 08 ld [ %l0 + 8 ], %g1 400176a4: 80 a0 c0 01 cmp %g3, %g1 400176a8: 26 80 00 04 bl,a 400176b8 400176ac: da 04 20 0c ld [ %l0 + 0xc ], %o5 dirp->dd_loc = 0; 400176b0: 10 bf ff f0 b 40017670 400176b4: c0 24 20 04 clr [ %l0 + 4 ] continue; } dp = (struct dirent *)(dirp->dd_buf + dirp->dd_loc); 400176b8: b0 00 c0 0d add %g3, %o5, %i0 if ((intptr_t)dp & 03) /* bogus pointer check */ 400176bc: 80 8e 20 03 btst 3, %i0 400176c0: 32 80 00 14 bne,a 40017710 400176c4: b0 10 20 00 clr %i0 <== NOT EXECUTED return NULL; if (dp->d_reclen <= 0 || 400176c8: c4 16 20 08 lduh [ %i0 + 8 ], %g2 400176cc: 80 a0 a0 00 cmp %g2, 0 400176d0: 02 80 00 0f be 4001770c 400176d4: 88 00 80 03 add %g2, %g3, %g4 400176d8: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 400176dc: 82 00 60 01 inc %g1 400176e0: 82 20 40 03 sub %g1, %g3, %g1 400176e4: 80 a0 80 01 cmp %g2, %g1 400176e8: 34 80 00 0a bg,a 40017710 400176ec: b0 10 20 00 clr %i0 <== NOT EXECUTED dp->d_reclen > dirp->dd_len + 1 - dirp->dd_loc) return NULL; dirp->dd_loc += dp->d_reclen; 400176f0: c8 24 20 04 st %g4, [ %l0 + 4 ] if (dp->d_ino == 0) 400176f4: c2 00 c0 0d ld [ %g3 + %o5 ], %g1 400176f8: 80 a0 60 00 cmp %g1, 0 400176fc: 12 80 00 05 bne 40017710 40017700: 01 00 00 00 nop if ( !dirp ) return NULL; for (;;) { if (dirp->dd_loc == 0) { 40017704: 10 bf ff dc b 40017674 <== NOT EXECUTED 40017708: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED 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) 4001770c: b0 10 20 00 clr %i0 continue; return (dp); } } 40017710: 81 c7 e0 08 ret 40017714: 81 e8 00 00 restore 400059a4 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 400059a4: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t loc; int result; if (!buf) 400059a8: 80 a6 60 00 cmp %i1, 0 400059ac: 12 80 00 06 bne 400059c4 400059b0: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( EFAULT ); 400059b4: 40 00 32 49 call 400122d8 <__errno> <== NOT EXECUTED 400059b8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400059bc: 10 80 00 30 b 40005a7c <== NOT EXECUTED 400059c0: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, 0, &loc, FALSE ); 400059c4: a0 07 bf e8 add %fp, -24, %l0 400059c8: 92 10 20 00 clr %o1 400059cc: 94 10 00 10 mov %l0, %o2 400059d0: 96 10 20 00 clr %o3 400059d4: 7f ff fa 29 call 40004278 400059d8: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 400059dc: 80 a2 20 00 cmp %o0, 0 400059e0: 12 80 00 28 bne 40005a80 400059e4: c4 07 bf f0 ld [ %fp + -16 ], %g2 return -1; if ( !loc.ops->node_type_h ){ 400059e8: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 400059ec: 80 a0 60 00 cmp %g1, 0 400059f0: 12 80 00 04 bne 40005a00 400059f4: 01 00 00 00 nop rtems_filesystem_freenode( &loc ); 400059f8: 10 80 00 19 b 40005a5c <== NOT EXECUTED 400059fc: 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 ){ 40005a00: 9f c0 40 00 call %g1 40005a04: 90 10 00 10 mov %l0, %o0 40005a08: 80 a2 20 04 cmp %o0, 4 40005a0c: 02 80 00 0f be 40005a48 40005a10: c2 07 bf f0 ld [ %fp + -16 ], %g1 rtems_filesystem_freenode( &loc ); 40005a14: 80 a0 60 00 cmp %g1, 0 40005a18: 02 80 00 08 be 40005a38 40005a1c: 01 00 00 00 nop 40005a20: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40005a24: 80 a0 60 00 cmp %g1, 0 40005a28: 02 80 00 04 be 40005a38 40005a2c: 01 00 00 00 nop 40005a30: 9f c0 40 00 call %g1 40005a34: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); 40005a38: 40 00 32 28 call 400122d8 <__errno> 40005a3c: b0 10 3f ff mov -1, %i0 40005a40: 10 80 00 0f b 40005a7c 40005a44: 82 10 20 16 mov 0x16, %g1 } if ( !loc.ops->readlink_h ){ 40005a48: c4 00 60 3c ld [ %g1 + 0x3c ], %g2 40005a4c: 80 a0 a0 00 cmp %g2, 0 40005a50: 12 80 00 0e bne 40005a88 40005a54: 92 10 00 19 mov %i1, %o1 rtems_filesystem_freenode( &loc ); 40005a58: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40005a5c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005a60: 02 80 00 04 be 40005a70 <== NOT EXECUTED 40005a64: 01 00 00 00 nop <== NOT EXECUTED 40005a68: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005a6c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40005a70: 40 00 32 1a call 400122d8 <__errno> <== NOT EXECUTED 40005a74: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40005a78: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40005a7c: c2 22 00 00 st %g1, [ %o0 ] 40005a80: 81 c7 e0 08 ret 40005a84: 81 e8 00 00 restore } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 40005a88: 94 10 00 1a mov %i2, %o2 40005a8c: 9f c0 80 00 call %g2 40005a90: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40005a94: c2 07 bf f0 ld [ %fp + -16 ], %g1 40005a98: 80 a0 60 00 cmp %g1, 0 40005a9c: 02 bf ff f9 be 40005a80 40005aa0: b0 10 00 08 mov %o0, %i0 40005aa4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40005aa8: 80 a0 60 00 cmp %g1, 0 40005aac: 02 80 00 04 be 40005abc 40005ab0: 01 00 00 00 nop 40005ab4: 9f c0 40 00 call %g1 40005ab8: 90 10 00 10 mov %l0, %o0 return result; } 40005abc: 81 c7 e0 08 ret 40005ac0: 81 e8 00 00 restore 40002378 : void *realloc( void *ptr, size_t size ) { 40002378: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 4000237c: 03 10 00 68 sethi %hi(0x4001a000), %g1 <== NOT EXECUTED 40002380: c2 00 60 00 ld [ %g1 ], %g1 <== NOT EXECUTED 40002384: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 40002388: 12 80 00 0c bne 400023b8 <== NOT EXECUTED 4000238c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED if (_Thread_Dispatch_disable_level > 0) 40002390: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 40002394: c2 00 62 20 ld [ %g1 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40002398: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000239c: 32 80 00 12 bne,a 400023e4 <== NOT EXECUTED 400023a0: b0 10 20 00 clr %i0 <== NOT EXECUTED return (void *) 0; if (_ISR_Nest_level > 0) 400023a4: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 400023a8: c2 00 62 e4 ld [ %g1 + 0x2e4 ], %g1 ! 40019ee4 <_ISR_Nest_level> <== NOT EXECUTED 400023ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400023b0: 12 80 00 34 bne 40002480 <== NOT EXECUTED 400023b4: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED } /* * Continue with realloc(). */ if ( !ptr ) 400023b8: 12 80 00 06 bne 400023d0 <== NOT EXECUTED 400023bc: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED return malloc( size ); 400023c0: 7f ff ff a3 call 4000224c <== NOT EXECUTED 400023c4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 400023c8: 81 c7 e0 08 ret <== NOT EXECUTED 400023cc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED if ( !size ) { 400023d0: 12 80 00 07 bne 400023ec <== NOT EXECUTED 400023d4: 23 10 00 67 sethi %hi(0x40019c00), %l1 <== NOT EXECUTED free( ptr ); 400023d8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400023dc: 7f ff ff 74 call 400021ac <== NOT EXECUTED 400023e0: b0 10 20 00 clr %i0 <== NOT EXECUTED 400023e4: 81 c7 e0 08 ret <== NOT EXECUTED 400023e8: 81 e8 00 00 restore <== NOT EXECUTED memcpy(np,ptr,size); free(ptr); return np; } #endif if ( _Protected_heap_Resize_block( &RTEMS_Malloc_Heap, ptr, size ) ) { 400023ec: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 400023f0: 90 14 60 60 or %l1, 0x60, %o0 <== NOT EXECUTED 400023f4: 40 00 18 21 call 40008478 <_Protected_heap_Resize_block> <== NOT EXECUTED 400023f8: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED 400023fc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40002400: 12 80 00 21 bne 40002484 <== NOT EXECUTED 40002404: 01 00 00 00 nop <== NOT EXECUTED return ptr; } new_area = malloc( size ); 40002408: 7f ff ff 91 call 4000224c <== NOT EXECUTED 4000240c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED * There used to be a free on this error case but it is wrong to * free the memory per OpenGroup Single UNIX Specification V2 * and the C Standard. */ if ( !new_area ) { 40002410: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 40002414: 02 80 00 1b be 40002480 <== NOT EXECUTED 40002418: 90 14 60 60 or %l1, 0x60, %o0 <== NOT EXECUTED return (void *) 0; } if ( !_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, ptr, &old_size) ) { 4000241c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40002420: 40 00 17 84 call 40008230 <_Protected_heap_Get_block_size> <== NOT EXECUTED 40002424: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 40002428: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000242c: 12 80 00 08 bne 4000244c <== NOT EXECUTED 40002430: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED errno = EINVAL; 40002434: 40 00 2f 3a call 4000e11c <__errno> <== NOT EXECUTED 40002438: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000243c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40002440: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40002444: 81 c7 e0 08 ret <== NOT EXECUTED 40002448: 81 e8 00 00 restore <== NOT EXECUTED return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 4000244c: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 40002450: 08 80 00 03 bleu 4000245c <== NOT EXECUTED 40002454: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40002458: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED 4000245c: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 40002460: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40002464: 40 00 31 03 call 4000e870 <== NOT EXECUTED 40002468: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED free( ptr ); 4000246c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40002470: 7f ff ff 4f call 400021ac <== NOT EXECUTED 40002474: b0 10 00 10 mov %l0, %i0 <== NOT EXECUTED 40002478: 81 c7 e0 08 ret <== NOT EXECUTED 4000247c: 81 e8 00 00 restore <== NOT EXECUTED return new_area; 40002480: b0 10 20 00 clr %i0 <== NOT EXECUTED } 40002484: 81 c7 e0 08 ret <== NOT EXECUTED 40002488: 81 e8 00 00 restore <== NOT EXECUTED 40017718 : #include int rmdir( const char *pathname ) { 40017718: 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 ); 4001771c: 92 10 20 00 clr %o1 40017720: 90 10 00 18 mov %i0, %o0 40017724: a0 07 bf e8 add %fp, -24, %l0 40017728: 96 10 20 00 clr %o3 4001772c: 7f ff b5 54 call 40004c7c 40017730: 94 10 00 10 mov %l0, %o2 if ( result != 0 ) 40017734: 80 a2 20 00 cmp %o0, 0 40017738: 32 80 00 11 bne,a 4001777c 4001773c: b0 10 3f ff mov -1, %i0 return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); 40017740: 90 10 20 02 mov 2, %o0 40017744: 7f ff b5 21 call 40004bc8 40017748: 92 10 00 10 mov %l0, %o1 if (result != 0) { 4001774c: 80 a2 20 00 cmp %o0, 0 40017750: 02 80 00 0d be 40017784 40017754: c2 07 bf f0 ld [ %fp + -16 ], %g1 rtems_filesystem_freenode( &loc ); 40017758: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001775c: 02 80 00 08 be 4001777c <== NOT EXECUTED 40017760: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40017764: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40017768: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001776c: 02 80 00 04 be 4001777c <== NOT EXECUTED 40017770: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40017774: 9f c0 40 00 call %g1 <== NOT EXECUTED 40017778: 01 00 00 00 nop <== NOT EXECUTED 4001777c: 81 c7 e0 08 ret 40017780: 81 e8 00 00 restore /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 40017784: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 40017788: 80 a0 a0 00 cmp %g2, 0 4001778c: 22 80 00 1e be,a 40017804 40017790: 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 ){ 40017794: 9f c0 80 00 call %g2 40017798: 90 10 00 10 mov %l0, %o0 4001779c: 80 a2 20 01 cmp %o0, 1 400177a0: 02 80 00 10 be 400177e0 400177a4: c2 07 bf ec ld [ %fp + -20 ], %g1 rtems_filesystem_freenode( &loc ); 400177a8: c2 07 bf f0 ld [ %fp + -16 ], %g1 400177ac: 80 a0 60 00 cmp %g1, 0 400177b0: 02 80 00 08 be 400177d0 400177b4: 01 00 00 00 nop 400177b8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400177bc: 80 a0 60 00 cmp %g1, 0 400177c0: 02 80 00 04 be 400177d0 400177c4: 01 00 00 00 nop 400177c8: 9f c0 40 00 call %g1 400177cc: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 400177d0: 40 00 2c c7 call 40022aec <__errno> 400177d4: b0 10 3f ff mov -1, %i0 400177d8: 10 80 00 13 b 40017824 400177dc: 82 10 20 14 mov 0x14, %g1 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 400177e0: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 400177e4: 80 a0 60 00 cmp %g1, 0 400177e8: 12 80 00 12 bne 40017830 400177ec: 01 00 00 00 nop rtems_filesystem_freenode( &loc ); 400177f0: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 400177f4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400177f8: 02 80 00 08 be 40017818 <== NOT EXECUTED 400177fc: 01 00 00 00 nop <== NOT EXECUTED 40017800: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40017804: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40017808: 02 80 00 04 be 40017818 <== NOT EXECUTED 4001780c: 01 00 00 00 nop <== NOT EXECUTED 40017810: 9f c0 40 00 call %g1 <== NOT EXECUTED 40017814: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40017818: 40 00 2c b5 call 40022aec <__errno> <== NOT EXECUTED 4001781c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40017820: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40017824: c2 22 00 00 st %g1, [ %o0 ] 40017828: 81 c7 e0 08 ret 4001782c: 81 e8 00 00 restore } result = (*loc.handlers->rmnod_h)( &loc ); 40017830: 9f c0 40 00 call %g1 40017834: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40017838: c2 07 bf f0 ld [ %fp + -16 ], %g1 4001783c: 80 a0 60 00 cmp %g1, 0 40017840: 02 bf ff cf be 4001777c 40017844: b0 10 00 08 mov %o0, %i0 40017848: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4001784c: 80 a0 60 00 cmp %g1, 0 40017850: 02 80 00 06 be 40017868 40017854: 01 00 00 00 nop 40017858: 9f c0 40 00 call %g1 4001785c: 90 10 00 10 mov %l0, %o0 40017860: 81 c7 e0 08 ret 40017864: 81 e8 00 00 restore return result; } 40017868: 81 c7 e0 08 ret <== NOT EXECUTED 4001786c: 81 e8 00 00 restore <== NOT EXECUTED 40015dec : sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[32] = ""; #endif return bad_buffer; } 40015dec: 11 10 00 9f sethi %hi(0x40027c00), %o0 <== NOT EXECUTED 40015df0: 81 c3 e0 08 retl <== NOT EXECUTED 40015df4: 90 12 20 70 or %o0, 0x70, %o0 ! 40027c70 <== NOT EXECUTED 40011914 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 40011914: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 40011918: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001191c: 40 00 00 09 call 40011940 <== NOT EXECUTED 40011920: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED if (nap) 40011924: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40011928: 32 80 00 04 bne,a 40011938 <== NOT EXECUTED 4001192c: f0 02 00 00 ld [ %o0 ], %i0 <== NOT EXECUTED return nap->name; return rtems_assoc_name_bad(local_value); 40011930: 40 00 11 2f call 40015dec <== NOT EXECUTED 40011934: 91 e8 00 19 restore %g0, %i1, %o0 <== NOT EXECUTED } 40011938: 81 c7 e0 08 ret <== NOT EXECUTED 4001193c: 81 e8 00 00 restore <== NOT EXECUTED 4000e05c : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4000e05c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4000e060: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED 4000e064: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000e068: 02 80 00 0e be 4000e0a0 <== NOT EXECUTED 4000e06c: 84 10 20 00 clr %g2 <== NOT EXECUTED 4000e070: 13 10 00 60 sethi %hi(0x40018000), %o1 <== NOT EXECUTED 4000e074: 40 00 04 b8 call 4000f354 <== NOT EXECUTED 4000e078: 92 12 63 a0 or %o1, 0x3a0, %o1 ! 400183a0 <_POSIX_Threads_Default_attributes+0x118> <== NOT EXECUTED 4000e07c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000e080: 02 80 00 07 be 4000e09c <== NOT EXECUTED 4000e084: 84 10 00 18 mov %i0, %g2 <== NOT EXECUTED default_ap = ap++; 4000e088: 10 80 00 06 b 4000e0a0 <== NOT EXECUTED 4000e08c: 84 10 20 00 clr %g2 <== NOT EXECUTED for ( ; ap->name; ap++) if (ap->local_value == local_value) 4000e090: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED 4000e094: 02 80 00 08 be 4000e0b4 <== NOT EXECUTED 4000e098: 01 00 00 00 nop <== NOT EXECUTED const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4000e09c: b0 06 20 0c add %i0, 0xc, %i0 <== NOT EXECUTED 4000e0a0: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED 4000e0a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000e0a8: 32 bf ff fa bne,a 4000e090 <== NOT EXECUTED 4000e0ac: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 4000e0b0: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED if (ap->local_value == local_value) return ap; return default_ap; } 4000e0b4: 81 c7 e0 08 ret <== NOT EXECUTED 4000e0b8: 81 e8 00 00 restore <== NOT EXECUTED 4000d7ac : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4000d7ac: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 4000d7b0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000d7b4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000d7b8: 40 00 02 29 call 4000e05c <== NOT EXECUTED 4000d7bc: b0 10 20 00 clr %i0 <== NOT EXECUTED if (nap) 4000d7c0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d7c4: 32 80 00 02 bne,a 4000d7cc <== NOT EXECUTED 4000d7c8: f0 02 20 08 ld [ %o0 + 8 ], %i0 <== NOT EXECUTED return nap->remote_value; return 0; } 4000d7cc: 81 c7 e0 08 ret <== NOT EXECUTED 4000d7d0: 81 e8 00 00 restore <== NOT EXECUTED 40005d08 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 40005d08: 9d e3 bf 90 save %sp, -112, %sp Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 40005d0c: a2 96 20 00 orcc %i0, 0, %l1 40005d10: 02 80 00 1b be 40005d7c 40005d14: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 40005d18: 80 a6 e0 00 cmp %i3, 0 40005d1c: 02 80 00 18 be 40005d7c 40005d20: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 40005d24: 80 8e 60 10 btst 0x10, %i1 40005d28: 02 80 00 06 be 40005d40 40005d2c: 80 a6 a0 00 cmp %i2, 0 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 40005d30: 02 80 00 13 be 40005d7c 40005d34: b0 10 20 0a mov 0xa, %i0 if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 40005d38: 10 80 00 04 b 40005d48 40005d3c: c0 27 bf f0 clr [ %fp + -16 ] if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; 40005d40: 82 10 20 01 mov 1, %g1 40005d44: c2 27 bf f0 st %g1, [ %fp + -16 ] rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40005d48: 05 10 00 79 sethi %hi(0x4001e400), %g2 40005d4c: c2 00 a0 50 ld [ %g2 + 0x50 ], %g1 ! 4001e450 <_Thread_Dispatch_disable_level> the_attributes.maximum_count = maximum_waiters; 40005d50: f4 27 bf f4 st %i2, [ %fp + -12 ] 40005d54: 82 00 60 01 inc %g1 40005d58: c2 20 a0 50 st %g1, [ %g2 + 0x50 ] * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void ) { return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information ); 40005d5c: 21 10 00 78 sethi %hi(0x4001e000), %l0 40005d60: 40 00 09 fc call 40008550 <_Objects_Allocate> 40005d64: 90 14 22 b4 or %l0, 0x2b4, %o0 ! 4001e2b4 <_Barrier_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 40005d68: b4 92 20 00 orcc %o0, 0, %i2 40005d6c: 12 80 00 06 bne 40005d84 40005d70: 90 06 a0 14 add %i2, 0x14, %o0 _Thread_Enable_dispatch(); 40005d74: 7f ff ff d8 call 40005cd4 <_Thread_Enable_dispatch> 40005d78: b0 10 20 05 mov 5, %i0 40005d7c: 81 c7 e0 08 ret 40005d80: 81 e8 00 00 restore return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 40005d84: f2 26 a0 10 st %i1, [ %i2 + 0x10 ] _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 40005d88: 40 00 07 3e call 40007a80 <_CORE_barrier_Initialize> 40005d8c: 92 07 bf f0 add %fp, -16, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40005d90: 90 14 22 b4 or %l0, 0x2b4, %o0 Objects_Name name ) { uint32_t index; index = _Objects_Get_index( the_object->id ); 40005d94: c6 06 a0 08 ld [ %i2 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40005d98: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 40005d9c: 03 00 00 3f sethi %hi(0xfc00), %g1 40005da0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40005da4: 82 08 c0 01 and %g3, %g1, %g1 40005da8: 80 a0 40 02 cmp %g1, %g2 40005dac: 38 80 00 06 bgu,a 40005dc4 40005db0: e2 26 a0 0c st %l1, [ %i2 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40005db4: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40005db8: 83 28 60 02 sll %g1, 2, %g1 40005dbc: f4 20 80 01 st %i2, [ %g2 + %g1 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 40005dc0: e2 26 a0 0c st %l1, [ %i2 + 0xc ] &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 40005dc4: c6 26 c0 00 st %g3, [ %i3 ] _Thread_Enable_dispatch(); 40005dc8: 7f ff ff c3 call 40005cd4 <_Thread_Enable_dispatch> 40005dcc: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 40005dd0: 81 c7 e0 08 ret 40005dd4: 81 e8 00 00 restore 40005dd8 : */ rtems_status_code rtems_barrier_delete( rtems_id id ) { 40005dd8: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 40005ddc: 21 10 00 78 sethi %hi(0x4001e000), %l0 40005de0: 92 10 00 18 mov %i0, %o1 40005de4: 94 07 bf f4 add %fp, -12, %o2 40005de8: 40 00 0b 1e call 40008a60 <_Objects_Get> 40005dec: 90 14 22 b4 or %l0, 0x2b4, %o0 Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 40005df0: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005df4: 80 a0 60 00 cmp %g1, 0 40005df8: 02 80 00 07 be 40005e14 40005dfc: b0 10 00 08 mov %o0, %i0 40005e00: 80 a0 60 02 cmp %g1, 2 40005e04: 08 80 00 22 bleu 40005e8c 40005e08: b0 10 20 04 mov 4, %i0 40005e0c: 81 c7 e0 08 ret <== NOT EXECUTED 40005e10: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: _CORE_barrier_Flush( 40005e14: 90 02 20 14 add %o0, 0x14, %o0 40005e18: 92 10 20 00 clr %o1 40005e1c: 40 00 12 4c call 4000a74c <_Thread_queue_Flush> 40005e20: 94 10 20 02 mov 2, %o2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40005e24: 90 14 22 b4 or %l0, 0x2b4, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40005e28: c2 06 20 08 ld [ %i0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40005e2c: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 40005e30: 05 00 00 3f sethi %hi(0xfc00), %g2 40005e34: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40005e38: 82 08 40 02 and %g1, %g2, %g1 40005e3c: 80 a0 40 03 cmp %g1, %g3 40005e40: 38 80 00 06 bgu,a 40005e58 40005e44: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40005e48: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40005e4c: 83 28 60 02 sll %g1, 2, %g1 40005e50: c0 20 80 01 clr [ %g2 + %g1 ] uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 40005e54: c0 26 20 0c clr [ %i0 + 0xc ] */ RTEMS_INLINE_ROUTINE void _Barrier_Free ( Barrier_Control *the_barrier ) { _Objects_Free( &_Barrier_Information, &the_barrier->Object ); 40005e58: 40 00 0a c0 call 40008958 <_Objects_Free> 40005e5c: 92 10 00 18 mov %i0, %o1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40005e60: 03 10 00 79 sethi %hi(0x4001e400), %g1 40005e64: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 ! 4001e450 <_Thread_Dispatch_disable_level> 40005e68: b0 10 20 00 clr %i0 40005e6c: 84 00 bf ff add %g2, -1, %g2 40005e70: c4 20 60 50 st %g2, [ %g1 + 0x50 ] 40005e74: c2 00 60 50 ld [ %g1 + 0x50 ], %g1 40005e78: 80 a0 60 00 cmp %g1, 0 40005e7c: 12 80 00 04 bne 40005e8c 40005e80: 01 00 00 00 nop _Thread_Dispatch(); 40005e84: 40 00 0f eb call 40009e30 <_Thread_Dispatch> 40005e88: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40005e8c: 81 c7 e0 08 ret 40005e90: 81 e8 00 00 restore 40005ecc : rtems_status_code rtems_barrier_release( rtems_id id, uint32_t *released ) { 40005ecc: 9d e3 bf 90 save %sp, -112, %sp 40005ed0: a0 10 00 18 mov %i0, %l0 Barrier_Control *the_barrier; Objects_Locations location; if ( !released ) 40005ed4: 80 a6 60 00 cmp %i1, 0 40005ed8: 02 80 00 1f be 40005f54 40005edc: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 40005ee0: 11 10 00 78 sethi %hi(0x4001e000), %o0 40005ee4: 92 10 00 10 mov %l0, %o1 40005ee8: 90 12 22 b4 or %o0, 0x2b4, %o0 40005eec: 40 00 0a dd call 40008a60 <_Objects_Get> 40005ef0: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 40005ef4: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005ef8: 80 a0 60 00 cmp %g1, 0 40005efc: 02 80 00 07 be 40005f18 40005f00: 92 10 00 10 mov %l0, %o1 40005f04: 80 a0 60 02 cmp %g1, 2 40005f08: 08 80 00 13 bleu 40005f54 40005f0c: b0 10 20 04 mov 4, %i0 40005f10: 81 c7 e0 08 ret <== NOT EXECUTED 40005f14: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: *released = _CORE_barrier_Release( &the_barrier->Barrier, id, NULL ); 40005f18: 94 10 20 00 clr %o2 40005f1c: 40 00 06 e5 call 40007ab0 <_CORE_barrier_Release> 40005f20: 90 02 20 14 add %o0, 0x14, %o0 40005f24: d0 26 40 00 st %o0, [ %i1 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40005f28: 03 10 00 79 sethi %hi(0x4001e400), %g1 40005f2c: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 ! 4001e450 <_Thread_Dispatch_disable_level> 40005f30: b0 10 20 00 clr %i0 40005f34: 84 00 bf ff add %g2, -1, %g2 40005f38: c4 20 60 50 st %g2, [ %g1 + 0x50 ] 40005f3c: c2 00 60 50 ld [ %g1 + 0x50 ], %g1 40005f40: 80 a0 60 00 cmp %g1, 0 40005f44: 12 80 00 04 bne 40005f54 40005f48: 01 00 00 00 nop _Thread_Dispatch(); 40005f4c: 40 00 0f b9 call 40009e30 <_Thread_Dispatch> 40005f50: 01 00 00 00 nop return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40005f54: 81 c7 e0 08 ret 40005f58: 81 e8 00 00 restore 40005f5c : rtems_status_code rtems_barrier_wait( rtems_id id, rtems_interval timeout ) { 40005f5c: 9d e3 bf 90 save %sp, -112, %sp 40005f60: 11 10 00 78 sethi %hi(0x4001e000), %o0 40005f64: 92 10 00 18 mov %i0, %o1 40005f68: 90 12 22 b4 or %o0, 0x2b4, %o0 40005f6c: 40 00 0a bd call 40008a60 <_Objects_Get> 40005f70: 94 07 bf f4 add %fp, -12, %o2 Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 40005f74: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005f78: 80 a0 60 00 cmp %g1, 0 40005f7c: 02 80 00 07 be 40005f98 40005f80: 96 10 00 19 mov %i1, %o3 40005f84: 80 a0 60 02 cmp %g1, 2 40005f88: 08 80 00 17 bleu 40005fe4 40005f8c: 90 10 20 04 mov 4, %o0 40005f90: 10 80 00 15 b 40005fe4 <== NOT EXECUTED 40005f94: 90 10 20 19 mov 0x19, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: _CORE_barrier_Wait( 40005f98: 90 02 20 14 add %o0, 0x14, %o0 40005f9c: 92 10 00 18 mov %i0, %o1 40005fa0: 94 10 20 01 mov 1, %o2 40005fa4: 40 00 06 ce call 40007adc <_CORE_barrier_Wait> 40005fa8: 98 10 20 00 clr %o4 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40005fac: 03 10 00 79 sethi %hi(0x4001e400), %g1 40005fb0: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 ! 4001e450 <_Thread_Dispatch_disable_level> 40005fb4: 84 00 bf ff add %g2, -1, %g2 40005fb8: c4 20 60 50 st %g2, [ %g1 + 0x50 ] 40005fbc: c2 00 60 50 ld [ %g1 + 0x50 ], %g1 40005fc0: 80 a0 60 00 cmp %g1, 0 40005fc4: 12 80 00 05 bne 40005fd8 40005fc8: 03 10 00 79 sethi %hi(0x4001e400), %g1 _Thread_Dispatch(); 40005fcc: 40 00 0f 99 call 40009e30 <_Thread_Dispatch> 40005fd0: 01 00 00 00 nop TRUE, timeout, NULL ); _Thread_Enable_dispatch(); return _Barrier_Translate_core_barrier_return_code( 40005fd4: 03 10 00 79 sethi %hi(0x4001e400), %g1 40005fd8: c2 00 61 2c ld [ %g1 + 0x12c ], %g1 ! 4001e52c <_Thread_Executing> 40005fdc: 40 00 1d e9 call 4000d780 <_Barrier_Translate_core_barrier_return_code> 40005fe0: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 _Thread_Executing->Wait.return_code ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40005fe4: 81 c7 e0 08 ret 40005fe8: 91 e8 00 08 restore %g0, %o0, %o0 40004e30 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 40004e30: 9d e3 bf 68 save %sp, -152, %sp 40004e34: 82 10 00 18 mov %i0, %g1 if ( !time_buffer ) 40004e38: 80 a6 60 00 cmp %i1, 0 40004e3c: 02 80 00 47 be 40004f58 40004e40: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; switch ( option ) { 40004e44: 80 a0 60 04 cmp %g1, 4 40004e48: 18 80 00 44 bgu 40004f58 40004e4c: b0 10 20 19 mov 0x19, %i0 40004e50: 83 28 60 02 sll %g1, 2, %g1 40004e54: 05 10 00 13 sethi %hi(0x40004c00), %g2 40004e58: 84 10 a1 dc or %g2, 0x1dc, %g2 ! 40004ddc 40004e5c: c2 00 80 01 ld [ %g2 + %g1 ], %g1 40004e60: 81 c0 40 00 jmp %g1 40004e64: 01 00 00 00 nop case RTEMS_CLOCK_GET_TOD: { struct tm time; struct timeval now; rtems_time_of_day *tmbuf = (rtems_time_of_day *)time_buffer; if ( !_TOD_Is_set ) 40004e68: 03 10 00 67 sethi %hi(0x40019c00), %g1 40004e6c: c2 00 62 5c ld [ %g1 + 0x25c ], %g1 ! 40019e5c <_TOD_Is_set> 40004e70: 80 a0 60 00 cmp %g1, 0 40004e74: 22 80 00 39 be,a 40004f58 40004e78: b0 10 20 0b mov 0xb, %i0 return RTEMS_NOT_DEFINED; /* Obtain the current time */ _TOD_Get_timeval( &now ); 40004e7c: a0 07 bf f0 add %fp, -16, %l0 40004e80: 7f ff ff dc call 40004df0 <_TOD_Get_timeval> 40004e84: 90 10 00 10 mov %l0, %o0 /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); 40004e88: 92 07 bf cc add %fp, -52, %o1 40004e8c: 40 00 26 74 call 4000e85c 40004e90: 90 10 00 10 mov %l0, %o0 tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / _TOD_Microseconds_per_tick; 40004e94: 03 10 00 67 sethi %hi(0x40019c00), %g1 40004e98: d2 00 63 fc ld [ %g1 + 0x3fc ], %o1 ! 40019ffc <_TOD_Microseconds_per_tick> gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; 40004e9c: c2 07 bf d8 ld [ %fp + -40 ], %g1 tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / _TOD_Microseconds_per_tick; 40004ea0: d0 07 bf f4 ld [ %fp + -12 ], %o0 gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; 40004ea4: c2 26 60 08 st %g1, [ %i1 + 8 ] tmbuf->hour = time.tm_hour; 40004ea8: c2 07 bf d4 ld [ %fp + -44 ], %g1 40004eac: c2 26 60 0c st %g1, [ %i1 + 0xc ] tmbuf->minute = time.tm_min; 40004eb0: c2 07 bf d0 ld [ %fp + -48 ], %g1 40004eb4: c2 26 60 10 st %g1, [ %i1 + 0x10 ] tmbuf->second = time.tm_sec; 40004eb8: c2 07 bf cc ld [ %fp + -52 ], %g1 40004ebc: c2 26 60 14 st %g1, [ %i1 + 0x14 ] /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 40004ec0: c2 07 bf e0 ld [ %fp + -32 ], %g1 40004ec4: 82 00 67 6c add %g1, 0x76c, %g1 40004ec8: c2 26 40 00 st %g1, [ %i1 ] tmbuf->month = time.tm_mon + 1; 40004ecc: c2 07 bf dc ld [ %fp + -36 ], %g1 40004ed0: 82 00 60 01 inc %g1 tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / _TOD_Microseconds_per_tick; 40004ed4: 40 00 40 bb call 400151c0 <.udiv> 40004ed8: c2 26 60 04 st %g1, [ %i1 + 4 ] 40004edc: 10 80 00 1c b 40004f4c 40004ee0: d0 26 60 18 st %o0, [ %i1 + 0x18 ] return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH: { rtems_interval *interval = (rtems_interval *)time_buffer; if ( !_TOD_Is_set ) 40004ee4: 03 10 00 67 sethi %hi(0x40019c00), %g1 40004ee8: c2 00 62 5c ld [ %g1 + 0x25c ], %g1 ! 40019e5c <_TOD_Is_set> 40004eec: 80 a0 60 00 cmp %g1, 0 40004ef0: 02 80 00 19 be 40004f54 40004ef4: 03 10 00 67 sethi %hi(0x40019c00), %g1 return RTEMS_NOT_DEFINED; *interval = _TOD_Seconds_since_epoch; 40004ef8: 10 80 00 04 b 40004f08 40004efc: c2 00 62 d8 ld [ %g1 + 0x2d8 ], %g1 ! 40019ed8 <_TOD_Now> } case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = _Watchdog_Ticks_since_boot; 40004f00: 03 10 00 67 sethi %hi(0x40019c00), %g1 40004f04: c2 00 63 a4 ld [ %g1 + 0x3a4 ], %g1 ! 40019fa4 <_Watchdog_Ticks_since_boot> 40004f08: c2 26 40 00 st %g1, [ %i1 ] 40004f0c: 81 c7 e0 08 ret 40004f10: 91 e8 20 00 restore %g0, 0, %o0 } case RTEMS_CLOCK_GET_TICKS_PER_SECOND: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = TOD_MICROSECONDS_PER_SECOND / _TOD_Microseconds_per_tick; 40004f14: 03 10 00 67 sethi %hi(0x40019c00), %g1 40004f18: d2 00 63 fc ld [ %g1 + 0x3fc ], %o1 ! 40019ffc <_TOD_Microseconds_per_tick> 40004f1c: 11 00 03 d0 sethi %hi(0xf4000), %o0 40004f20: 40 00 40 a8 call 400151c0 <.udiv> 40004f24: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 40004f28: 10 80 00 09 b 40004f4c 40004f2c: d0 26 40 00 st %o0, [ %i1 ] } case RTEMS_CLOCK_GET_TIME_VALUE: { struct timeval *time = (struct timeval *)time_buffer; if ( !_TOD_Is_set ) 40004f30: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 40004f34: c2 00 62 5c ld [ %g1 + 0x25c ], %g1 ! 40019e5c <_TOD_Is_set> <== NOT EXECUTED 40004f38: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004f3c: 22 80 00 07 be,a 40004f58 <== NOT EXECUTED 40004f40: b0 10 20 0b mov 0xb, %i0 <== NOT EXECUTED return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); 40004f44: 7f ff ff ab call 40004df0 <_TOD_Get_timeval> <== NOT EXECUTED 40004f48: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40004f4c: 81 c7 e0 08 ret 40004f50: 91 e8 20 00 restore %g0, 0, %o0 return RTEMS_SUCCESSFUL; 40004f54: b0 10 20 0b mov 0xb, %i0 <== NOT EXECUTED } } return RTEMS_INTERNAL_ERROR; /* should never get here */ } 40004f58: 81 c7 e0 08 ret 40004f5c: 81 e8 00 00 restore 40004f80 : * * NOTE: This routine only works for leap-years through 2099. */ rtems_status_code rtems_clock_tick( void ) { 40004f80: 9d e3 bf 98 save %sp, -104, %sp _TOD_Tickle_ticks(); 40004f84: 40 00 07 40 call 40006c84 <_TOD_Tickle_ticks> 40004f88: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void ) { _Watchdog_Tickle( &_Watchdog_Ticks_chain ); 40004f8c: 11 10 00 67 sethi %hi(0x40019c00), %o0 40004f90: 40 00 14 4e call 4000a0c8 <_Watchdog_Tickle> 40004f94: 90 12 23 1c or %o0, 0x31c, %o0 ! 40019f1c <_Watchdog_Ticks_chain> _Watchdog_Tickle_ticks(); _Thread_Tickle_timeslice(); 40004f98: 40 00 12 a5 call 40009a2c <_Thread_Tickle_timeslice> 40004f9c: 01 00 00 00 nop * otherwise. */ RTEMS_INLINE_ROUTINE boolean _Thread_Is_context_switch_necessary( void ) { return ( _Context_Switch_necessary ); 40004fa0: 03 10 00 67 sethi %hi(0x40019c00), %g1 40004fa4: c2 00 63 0c ld [ %g1 + 0x30c ], %g1 ! 40019f0c <_Context_Switch_necessary> if ( _Thread_Is_context_switch_necessary() && 40004fa8: 80 a0 60 00 cmp %g1, 0 40004fac: 02 80 00 08 be 40004fcc 40004fb0: 03 10 00 67 sethi %hi(0x40019c00), %g1 * otherwise. */ RTEMS_INLINE_ROUTINE boolean _Thread_Is_dispatching_enabled( void ) { return ( _Thread_Dispatch_disable_level == 0 ); 40004fb4: c2 00 62 20 ld [ %g1 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> 40004fb8: 80 a0 60 00 cmp %g1, 0 40004fbc: 12 80 00 04 bne 40004fcc 40004fc0: 01 00 00 00 nop _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); 40004fc4: 40 00 0e e2 call 40008b4c <_Thread_Dispatch> <== NOT EXECUTED 40004fc8: 01 00 00 00 nop <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 40004fcc: 81 c7 e0 08 ret 40004fd0: 91 e8 20 00 restore %g0, 0, %o0 40002a9c : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 40002a9c: 9d e3 bf 68 save %sp, -152, %sp struct timespec uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 40002aa0: 80 a6 60 00 cmp %i1, 0 40002aa4: 02 80 00 62 be 40002c2c 40002aa8: a0 07 bf e0 add %fp, -32, %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 ); 40002aac: 40 00 16 94 call 400084fc <_TOD_Get_uptime> 40002ab0: 90 10 00 10 mov %l0, %o0 _Timespec_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 40002ab4: 92 10 00 10 mov %l0, %o1 40002ab8: a2 07 bf d8 add %fp, -40, %l1 40002abc: 11 10 00 9c sethi %hi(0x40027000), %o0 40002ac0: 94 10 00 11 mov %l1, %o2 40002ac4: 40 00 24 30 call 4000bb84 <_Timespec_Subtract> 40002ac8: 90 12 20 e4 or %o0, 0xe4, %o0 } } } #endif (*print)( context, "CPU Usage by thread\n" 40002acc: 90 10 00 18 mov %i0, %o0 40002ad0: 13 10 00 6f sethi %hi(0x4001bc00), %o1 40002ad4: 9f c6 40 00 call %i1 40002ad8: 92 12 62 f8 or %o1, 0x2f8, %o1 ! 4001bef8 40002adc: 03 10 00 9a sethi %hi(0x40026800), %g1 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40002ae0: ac 07 bf eb add %fp, -21, %l6 } } } #endif (*print)( context, "CPU Usage by thread\n" 40002ae4: a6 10 61 b4 or %g1, 0x1b4, %l3 /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40002ae8: 37 10 00 9a sethi %hi(0x40026800), %i3 struct timespec used; _Timespec_Subtract( 40002aec: 03 10 00 9a sethi %hi(0x40026800), %g1 &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timespec_Add_to( &ran, &used ); }; _Timespec_Divide( &ran, &total, &ival, &fval ); 40002af0: aa 07 bf d0 add %fp, -48, %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( 40002af4: b4 10 63 34 or %g1, 0x334, %i2 &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timespec_Add_to( &ran, &used ); }; _Timespec_Divide( &ran, &total, &ival, &fval ); 40002af8: b8 07 bf f4 add %fp, -12, %i4 40002afc: ba 07 bf f0 add %fp, -16, %i5 * 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( 40002b00: a8 07 bf c8 add %fp, -56, %l4 " ID NAME TICKS PERCENT\n" #endif ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 40002b04: ae 04 e0 10 add %l3, 0x10, %l7 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 40002b08: c2 04 c0 00 ld [ %l3 ], %g1 40002b0c: 80 a0 60 00 cmp %g1, 0 40002b10: 22 80 00 3b be,a 40002bfc 40002b14: a6 04 e0 04 add %l3, 4, %l3 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 40002b18: e2 00 60 04 ld [ %g1 + 4 ], %l1 if ( information ) { 40002b1c: 80 a4 60 00 cmp %l1, 0 40002b20: 12 80 00 30 bne 40002be0 40002b24: a4 10 20 01 mov 1, %l2 for ( i=1 ; i <= information->maximum ; i++ ) { 40002b28: 10 80 00 35 b 40002bfc <== NOT EXECUTED 40002b2c: a6 04 e0 04 add %l3, 4, %l3 <== NOT EXECUTED the_thread = (Thread_Control *)information->local_table[ i ]; 40002b30: c2 04 60 20 ld [ %l1 + 0x20 ], %g1 40002b34: e0 00 40 02 ld [ %g1 + %g2 ], %l0 if ( !the_thread ) 40002b38: 80 a4 20 00 cmp %l0, 0 40002b3c: 02 80 00 29 be 40002be0 40002b40: a4 04 a0 01 inc %l2 continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40002b44: 40 00 0f a4 call 400069d4 40002b48: d0 04 20 08 ld [ %l0 + 8 ], %o0 (*print)( context, "0x%08" PRIx32 " %4s ", the_thread->Object.id, name ); 40002b4c: d4 04 20 08 ld [ %l0 + 8 ], %o2 40002b50: 90 10 00 18 mov %i0, %o0 40002b54: 13 10 00 6f sethi %hi(0x4001bc00), %o1 40002b58: 96 10 00 16 mov %l6, %o3 40002b5c: 9f c6 40 00 call %i1 40002b60: 92 12 63 38 or %o1, 0x338, %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; 40002b64: c4 1c 20 90 ldd [ %l0 + 0x90 ], %g2 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40002b68: c2 06 e3 2c ld [ %i3 + 0x32c ], %g1 #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; 40002b6c: c4 3f bf d0 std %g2, [ %fp + -48 ] if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40002b70: c4 00 60 08 ld [ %g1 + 8 ], %g2 40002b74: c2 04 20 08 ld [ %l0 + 8 ], %g1 40002b78: 80 a0 80 01 cmp %g2, %g1 40002b7c: 12 80 00 0a bne 40002ba4 40002b80: 94 10 00 1c mov %i4, %o2 struct timespec used; _Timespec_Subtract( 40002b84: 90 10 00 1a mov %i2, %o0 40002b88: 92 07 bf e0 add %fp, -32, %o1 40002b8c: 40 00 23 fe call 4000bb84 <_Timespec_Subtract> 40002b90: 94 10 00 14 mov %l4, %o2 &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timespec_Add_to( &ran, &used ); 40002b94: 90 10 00 15 mov %l5, %o0 40002b98: 40 00 23 53 call 4000b8e4 <_Timespec_Add_to> 40002b9c: 92 10 00 14 mov %l4, %o1 }; _Timespec_Divide( &ran, &total, &ival, &fval ); 40002ba0: 94 10 00 1c mov %i4, %o2 40002ba4: 96 10 00 1d mov %i5, %o3 40002ba8: 90 10 00 15 mov %l5, %o0 40002bac: 40 00 23 66 call 4000b944 <_Timespec_Divide> 40002bb0: 92 07 bf d8 add %fp, -40, %o1 /* * Print the information */ (*print)( context, 40002bb4: d0 07 bf d4 ld [ %fp + -44 ], %o0 40002bb8: 40 00 57 9a call 40018a20 <.udiv> 40002bbc: 92 10 23 e8 mov 0x3e8, %o1 40002bc0: d4 07 bf d0 ld [ %fp + -48 ], %o2 40002bc4: d8 07 bf f4 ld [ %fp + -12 ], %o4 40002bc8: da 07 bf f0 ld [ %fp + -16 ], %o5 40002bcc: 96 10 00 08 mov %o0, %o3 40002bd0: 13 10 00 6f sethi %hi(0x4001bc00), %o1 40002bd4: 90 10 00 18 mov %i0, %o0 40002bd8: 9f c6 40 00 call %i1 40002bdc: 92 12 63 50 or %o1, 0x350, %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++ ) { 40002be0: c2 14 60 10 lduh [ %l1 + 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 ); 40002be4: 94 10 00 16 mov %l6, %o2 40002be8: 92 10 20 05 mov 5, %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++ ) { 40002bec: 80 a4 80 01 cmp %l2, %g1 40002bf0: 08 bf ff d0 bleu 40002b30 40002bf4: 85 2c a0 02 sll %l2, 2, %g2 40002bf8: a6 04 e0 04 add %l3, 4, %l3 " ID NAME TICKS PERCENT\n" #endif ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 40002bfc: 80 a4 c0 17 cmp %l3, %l7 40002c00: 32 bf ff c3 bne,a 40002b0c 40002c04: c2 04 c0 00 ld [ %l3 ], %g1 } } } #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS (*print)( context, "Time since last CPU Usage reset %" PRId32 40002c08: d0 07 bf dc ld [ %fp + -36 ], %o0 40002c0c: 40 00 57 85 call 40018a20 <.udiv> 40002c10: 92 10 23 e8 mov 0x3e8, %o1 40002c14: d4 07 bf d8 ld [ %fp + -40 ], %o2 40002c18: 96 10 00 08 mov %o0, %o3 40002c1c: 13 10 00 6f sethi %hi(0x4001bc00), %o1 40002c20: 90 10 00 18 mov %i0, %o0 40002c24: 9f c6 40 00 call %i1 40002c28: 92 12 63 68 or %o1, 0x368, %o1 40002c2c: 81 c7 e0 08 ret 40002c30: 81 e8 00 00 restore 4000d2ec : { 0, 0, 0 }, }; static int rtems_deviceio_errno(rtems_status_code code) { 4000d2ec: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 4000d2f0: 11 10 00 65 sethi %hi(0x40019400), %o0 <== NOT EXECUTED 4000d2f4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000d2f8: 40 00 01 2d call 4000d7ac <== NOT EXECUTED 4000d2fc: 90 12 20 54 or %o0, 0x54, %o0 <== NOT EXECUTED 4000d300: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4000d304: 02 80 00 05 be 4000d318 <== NOT EXECUTED 4000d308: 01 00 00 00 nop <== NOT EXECUTED { errno = rc; 4000d30c: 40 00 03 84 call 4000e11c <__errno> <== NOT EXECUTED 4000d310: 01 00 00 00 nop <== NOT EXECUTED 4000d314: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED return -1; } return -1; } 4000d318: 81 c7 e0 08 ret <== NOT EXECUTED 4000d31c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 40006190 : int rtems_error( int error_flag, const char *printf_format, ... ) { 40006190: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); 40006194: 94 07 a0 4c add %fp, 0x4c, %o2 <== NOT EXECUTED int rtems_error( int error_flag, const char *printf_format, ... ) { 40006198: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 4000619c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 400061a0: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 400061a4: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); chars_written = rtems_verror(error_flag, printf_format, arglist); 400061a8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400061ac: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400061b0: 7f ff ff 7f call 40005fac <== NOT EXECUTED 400061b4: d4 27 bf f4 st %o2, [ %fp + -12 ] <== NOT EXECUTED va_end(arglist); return chars_written; } 400061b8: 81 c7 e0 08 ret <== NOT EXECUTED 400061bc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 400051e4 : rtems_status_code rtems_event_send( Objects_Id id, rtems_event_set event_in ) { 400051e4: 9d e3 bf 90 save %sp, -112, %sp uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 400051e8: 92 96 20 00 orcc %i0, 0, %o1 400051ec: 12 80 00 0a bne 40005214 400051f0: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400051f4: 03 10 00 67 sethi %hi(0x40019c00), %g1 400051f8: c4 00 62 20 ld [ %g1 + 0x220 ], %g2 ! 40019e20 <_Thread_Dispatch_disable_level> 400051fc: 84 00 a0 01 inc %g2 40005200: c4 20 62 20 st %g2, [ %g1 + 0x220 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 40005204: 03 10 00 67 sethi %hi(0x40019c00), %g1 40005208: f0 00 62 fc ld [ %g1 + 0x2fc ], %i0 ! 40019efc <_Thread_Executing> 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; 4000520c: 10 80 00 18 b 4000526c 40005210: c0 27 bf f4 clr [ %fp + -12 ] */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 40005214: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 40005218: 80 a0 a0 04 cmp %g2, 4 4000521c: 18 80 00 0e bgu 40005254 40005220: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40005224: 83 32 60 1b srl %o1, 0x1b, %g1 40005228: 80 a0 60 01 cmp %g1, 1 4000522c: 12 80 00 0a bne 40005254 40005230: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40005234: 83 28 a0 02 sll %g2, 2, %g1 40005238: 05 10 00 67 sethi %hi(0x40019c00), %g2 4000523c: 84 10 a1 80 or %g2, 0x180, %g2 ! 40019d80 <_Objects_Information_table> 40005240: c2 00 80 01 ld [ %g2 + %g1 ], %g1 40005244: d0 00 60 04 ld [ %g1 + 4 ], %o0 if ( !information ) { 40005248: 80 a2 20 00 cmp %o0, 0 4000524c: 12 80 00 05 bne 40005260 40005250: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; 40005254: b0 10 20 00 clr %i0 40005258: 10 80 00 05 b 4000526c 4000525c: c2 27 bf f4 st %g1, [ %fp + -12 ] goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40005260: 40 00 09 47 call 4000777c <_Objects_Get> 40005264: 94 07 bf f4 add %fp, -12, %o2 40005268: b0 10 00 08 mov %o0, %i0 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); switch ( location ) { 4000526c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005270: 80 a0 60 00 cmp %g1, 0 40005274: 02 80 00 06 be 4000528c 40005278: 80 a0 60 02 cmp %g1, 2 4000527c: 08 80 00 18 bleu 400052dc 40005280: b0 10 20 04 mov 4, %i0 40005284: 81 c7 e0 08 ret <== NOT EXECUTED 40005288: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED rtems_event_set *the_event_set ) { ISR_Level level; _ISR_Disable( level ); 4000528c: 7f ff f2 b3 call 40001d58 40005290: e0 06 21 6c ld [ %i0 + 0x16c ], %l0 *the_event_set |= the_new_events; 40005294: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 40005298: 82 10 40 19 or %g1, %i1, %g1 4000529c: c2 24 20 40 st %g1, [ %l0 + 0x40 ] _ISR_Enable( level ); 400052a0: 7f ff f2 b2 call 40001d68 400052a4: 01 00 00 00 nop case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); 400052a8: 40 00 00 15 call 400052fc <_Event_Surrender> 400052ac: 90 10 00 18 mov %i0, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400052b0: 05 10 00 67 sethi %hi(0x40019c00), %g2 400052b4: c2 00 a2 20 ld [ %g2 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> 400052b8: b0 10 20 00 clr %i0 400052bc: 82 00 7f ff add %g1, -1, %g1 400052c0: c2 20 a2 20 st %g1, [ %g2 + 0x220 ] 400052c4: c2 00 a2 20 ld [ %g2 + 0x220 ], %g1 400052c8: 80 a0 60 00 cmp %g1, 0 400052cc: 12 80 00 04 bne 400052dc 400052d0: 01 00 00 00 nop _Thread_Dispatch(); 400052d4: 40 00 0e 1e call 40008b4c <_Thread_Dispatch> 400052d8: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400052dc: 81 c7 e0 08 ret 400052e0: 81 e8 00 00 restore 4000abf4 : rtems_status_code rtems_extension_create( rtems_name name, rtems_extensions_table *extension_table, Objects_Id *id ) { 4000abf4: 9d e3 bf 98 save %sp, -104, %sp Extension_Control *the_extension; if ( !rtems_is_name_valid( name ) ) 4000abf8: a4 96 20 00 orcc %i0, 0, %l2 4000abfc: 02 80 00 0e be 4000ac34 4000ac00: b0 10 20 03 mov 3, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000ac04: 05 10 00 a3 sethi %hi(0x40028c00), %g2 4000ac08: c2 00 a0 b0 ld [ %g2 + 0xb0 ], %g1 ! 40028cb0 <_Thread_Dispatch_disable_level> 4000ac0c: 82 00 60 01 inc %g1 4000ac10: c2 20 a0 b0 st %g1, [ %g2 + 0xb0 ] * the inactive chain of free extension control blocks. */ RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); 4000ac14: 23 10 00 a3 sethi %hi(0x40028c00), %l1 4000ac18: 40 00 03 ac call 4000bac8 <_Objects_Allocate> 4000ac1c: 90 14 63 4c or %l1, 0x34c, %o0 ! 40028f4c <_Extension_Information> _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { 4000ac20: a0 92 20 00 orcc %o0, 0, %l0 4000ac24: 12 80 00 06 bne 4000ac3c 4000ac28: 90 04 20 10 add %l0, 0x10, %o0 _Thread_Enable_dispatch(); 4000ac2c: 7f ff ff e5 call 4000abc0 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000ac30: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED 4000ac34: 81 c7 e0 08 ret <== NOT EXECUTED 4000ac38: 81 e8 00 00 restore <== NOT EXECUTED return RTEMS_TOO_MANY; } _User_extensions_Add_set( &the_extension->Extension, extension_table ); 4000ac3c: 40 00 0e 28 call 4000e4dc <_User_extensions_Add_set> 4000ac40: 92 10 00 19 mov %i1, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000ac44: 90 14 63 4c or %l1, 0x34c, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 4000ac48: c2 04 20 08 ld [ %l0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000ac4c: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 4000ac50: 05 00 00 3f sethi %hi(0xfc00), %g2 4000ac54: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 4000ac58: 82 08 40 02 and %g1, %g2, %g1 4000ac5c: 80 a0 40 03 cmp %g1, %g3 4000ac60: 38 80 00 06 bgu,a 4000ac78 4000ac64: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED information->local_table[ index ] = the_object; 4000ac68: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 4000ac6c: 83 28 60 02 sll %g1, 2, %g1 4000ac70: e0 20 80 01 st %l0, [ %g2 + %g1 ] &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; 4000ac74: c2 04 20 08 ld [ %l0 + 8 ], %g1 if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 4000ac78: e4 24 20 0c st %l2, [ %l0 + 0xc ] 4000ac7c: c2 26 80 00 st %g1, [ %i2 ] _Thread_Enable_dispatch(); 4000ac80: 7f ff ff d0 call 4000abc0 <_Thread_Enable_dispatch> 4000ac84: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 4000ac88: 81 c7 e0 08 ret 4000ac8c: 81 e8 00 00 restore 4000ac90 : */ rtems_status_code rtems_extension_delete( Objects_Id id ) { 4000ac90: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get ( Objects_Id id, Objects_Locations *location ) { return (Extension_Control *) 4000ac94: 21 10 00 a3 sethi %hi(0x40028c00), %l0 <== NOT EXECUTED 4000ac98: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000ac9c: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 4000aca0: 40 00 04 ce call 4000bfd8 <_Objects_Get> <== NOT EXECUTED 4000aca4: 90 14 23 4c or %l0, 0x34c, %o0 <== NOT EXECUTED Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 4000aca8: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4000acac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000acb0: 02 80 00 07 be 4000accc <== NOT EXECUTED 4000acb4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4000acb8: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000acbc: 08 80 00 20 bleu 4000ad3c <== NOT EXECUTED 4000acc0: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED 4000acc4: 81 c7 e0 08 ret <== NOT EXECUTED 4000acc8: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED case OBJECTS_ERROR: case OBJECTS_REMOTE: /* should never return this */ return RTEMS_INVALID_ID; case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); 4000accc: 40 00 0e 3e call 4000e5c4 <_User_extensions_Remove_set> <== NOT EXECUTED 4000acd0: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000acd4: 90 14 23 4c or %l0, 0x34c, %o0 <== NOT EXECUTED ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 4000acd8: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000acdc: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 <== NOT EXECUTED 4000ace0: 05 00 00 3f sethi %hi(0xfc00), %g2 <== NOT EXECUTED 4000ace4: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff <== NOT EXECUTED 4000ace8: 82 08 40 02 and %g1, %g2, %g1 <== NOT EXECUTED 4000acec: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 4000acf0: 38 80 00 06 bgu,a 4000ad08 <== NOT EXECUTED 4000acf4: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 4000acf8: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 <== NOT EXECUTED 4000acfc: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 4000ad00: c0 20 80 01 clr [ %g2 + %g1 ] <== NOT EXECUTED uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 4000ad04: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Extension_Free ( Extension_Control *the_extension ) { _Objects_Free( &_Extension_Information, &the_extension->Object ); 4000ad08: 40 00 04 72 call 4000bed0 <_Objects_Free> <== NOT EXECUTED 4000ad0c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000ad10: 03 10 00 a3 sethi %hi(0x40028c00), %g1 <== NOT EXECUTED 4000ad14: c4 00 60 b0 ld [ %g1 + 0xb0 ], %g2 ! 40028cb0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000ad18: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000ad1c: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED 4000ad20: c4 20 60 b0 st %g2, [ %g1 + 0xb0 ] <== NOT EXECUTED 4000ad24: c2 00 60 b0 ld [ %g1 + 0xb0 ], %g1 <== NOT EXECUTED 4000ad28: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ad2c: 12 80 00 04 bne 4000ad3c <== NOT EXECUTED 4000ad30: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 4000ad34: 40 00 09 9d call 4000d3a8 <_Thread_Dispatch> <== NOT EXECUTED 4000ad38: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000ad3c: 81 c7 e0 08 ret <== NOT EXECUTED 4000ad40: 81 e8 00 00 restore <== NOT EXECUTED 40001ee0 : int rtems_filesystem_evaluate_parent( int flags, rtems_filesystem_location_info_t *pathloc ) { 40001ee0: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t parent; int result; if ( !pathloc ) 40001ee4: 80 a6 60 00 cmp %i1, 0 40001ee8: 32 80 00 06 bne,a 40001f00 40001eec: c2 06 60 08 ld [ %i1 + 8 ], %g1 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 40001ef0: 40 00 30 8b call 4000e11c <__errno> <== NOT EXECUTED 40001ef4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40001ef8: 10 80 00 09 b 40001f1c <== NOT EXECUTED 40001efc: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED if ( !pathloc->ops->evalpath_h ) 40001f00: c2 00 40 00 ld [ %g1 ], %g1 40001f04: 80 a0 60 00 cmp %g1, 0 40001f08: 12 80 00 08 bne 40001f28 40001f0c: a0 07 bf e8 add %fp, -24, %l0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 40001f10: 40 00 30 83 call 4000e11c <__errno> <== NOT EXECUTED 40001f14: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40001f18: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40001f1c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40001f20: 81 c7 e0 08 ret <== NOT EXECUTED 40001f24: 81 e8 00 00 restore <== NOT EXECUTED parent = *pathloc; 40001f28: 92 10 00 19 mov %i1, %o1 40001f2c: 94 10 20 10 mov 0x10, %o2 40001f30: 40 00 32 50 call 4000e870 40001f34: 90 10 00 10 mov %l0, %o0 result = (*pathloc->ops->evalpath_h)( "..", flags, &parent ); 40001f38: c2 06 60 08 ld [ %i1 + 8 ], %g1 40001f3c: 92 10 00 18 mov %i0, %o1 40001f40: c2 00 40 00 ld [ %g1 ], %g1 40001f44: 11 10 00 5f sethi %hi(0x40017c00), %o0 40001f48: 94 10 00 10 mov %l0, %o2 40001f4c: 9f c0 40 00 call %g1 40001f50: 90 12 23 c0 or %o0, 0x3c0, %o0 if (result != 0){ 40001f54: b0 92 20 00 orcc %o0, 0, %i0 40001f58: 02 80 00 04 be 40001f68 40001f5c: c2 07 bf f0 ld [ %fp + -16 ], %g1 40001f60: 81 c7 e0 08 ret <== NOT EXECUTED 40001f64: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED return -1; } rtems_filesystem_freenode( &parent ); 40001f68: 80 a0 60 00 cmp %g1, 0 40001f6c: 02 80 00 08 be 40001f8c 40001f70: 01 00 00 00 nop 40001f74: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40001f78: 80 a0 60 00 cmp %g1, 0 40001f7c: 02 80 00 04 be 40001f8c 40001f80: 01 00 00 00 nop 40001f84: 9f c0 40 00 call %g1 40001f88: 90 10 00 10 mov %l0, %o0 return result; } 40001f8c: 81 c7 e0 08 ret 40001f90: 81 e8 00 00 restore 40001f94 : const char *pathname, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 40001f94: 9d e3 bf 98 save %sp, -104, %sp /* * Verify Input parameters. */ if ( !pathname ) 40001f98: 80 a6 20 00 cmp %i0, 0 40001f9c: 12 80 00 06 bne 40001fb4 40001fa0: 80 a6 a0 00 cmp %i2, 0 rtems_set_errno_and_return_minus_one( EFAULT ); 40001fa4: 40 00 30 5e call 4000e11c <__errno> 40001fa8: b0 10 3f ff mov -1, %i0 40001fac: 10 80 00 43 b 400020b8 40001fb0: 82 10 20 0e mov 0xe, %g1 if ( !pathloc ) 40001fb4: 32 80 00 06 bne,a 40001fcc 40001fb8: c2 4e 00 00 ldsb [ %i0 ], %g1 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 40001fbc: 40 00 30 58 call 4000e11c <__errno> <== NOT EXECUTED 40001fc0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40001fc4: 10 80 00 3d b 400020b8 <== NOT EXECUTED 40001fc8: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 40001fcc: 80 a0 60 2f cmp %g1, 0x2f 40001fd0: 02 80 00 06 be 40001fe8 40001fd4: 80 a0 60 5c cmp %g1, 0x5c 40001fd8: 02 80 00 04 be 40001fe8 40001fdc: 80 a0 60 00 cmp %g1, 0 40001fe0: 12 80 00 0a bne 40002008 40001fe4: 03 10 00 64 sethi %hi(0x40019000), %g1 40001fe8: 03 10 00 64 sethi %hi(0x40019000), %g1 40001fec: d2 00 61 e0 ld [ %g1 + 0x1e0 ], %o1 ! 400191e0 40001ff0: 90 10 00 1a mov %i2, %o0 40001ff4: 92 02 60 14 add %o1, 0x14, %o1 40001ff8: 40 00 32 1e call 4000e870 40001ffc: 94 10 20 10 mov 0x10, %o2 40002000: 10 80 00 08 b 40002020 40002004: 84 10 20 01 mov 1, %g2 40002008: d2 00 61 e0 ld [ %g1 + 0x1e0 ], %o1 4000200c: 90 10 00 1a mov %i2, %o0 40002010: 92 02 60 04 add %o1, 4, %o1 40002014: 40 00 32 17 call 4000e870 40002018: 94 10 20 10 mov 0x10, %o2 4000201c: 84 10 20 00 clr %g2 if ( !pathloc->ops->evalpath_h ) 40002020: c2 06 a0 08 ld [ %i2 + 8 ], %g1 40002024: c2 00 40 00 ld [ %g1 ], %g1 40002028: 80 a0 60 00 cmp %g1, 0 4000202c: 02 80 00 20 be 400020ac 40002030: 90 06 00 02 add %i0, %g2, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( &pathname[i], flags, pathloc ); 40002034: 92 10 00 19 mov %i1, %o1 40002038: 9f c0 40 00 call %g1 4000203c: 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 ) { 40002040: b0 92 20 00 orcc %o0, 0, %i0 40002044: 12 80 00 1e bne 400020bc 40002048: 80 a6 e0 00 cmp %i3, 0 4000204c: 02 80 00 21 be 400020d0 40002050: 01 00 00 00 nop if ( !pathloc->ops->node_type_h ){ 40002054: c2 06 a0 08 ld [ %i2 + 8 ], %g1 40002058: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 4000205c: 80 a0 a0 00 cmp %g2, 0 40002060: 22 80 00 0e be,a 40002098 40002064: 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 ); 40002068: 9f c0 80 00 call %g2 4000206c: 90 10 00 1a mov %i2, %o0 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 40002070: 90 02 3f fd add %o0, -3, %o0 40002074: 80 a2 20 01 cmp %o0, 1 40002078: 18 80 00 16 bgu 400020d0 4000207c: 01 00 00 00 nop ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 40002080: c2 06 a0 08 ld [ %i2 + 8 ], %g1 40002084: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 40002088: 80 a0 a0 00 cmp %g2, 0 4000208c: 12 80 00 0e bne 400020c4 40002090: 90 10 00 1a mov %i2, %o0 rtems_filesystem_freenode( pathloc ); 40002094: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40002098: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000209c: 02 80 00 04 be 400020ac <== NOT EXECUTED 400020a0: 01 00 00 00 nop <== NOT EXECUTED 400020a4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400020a8: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400020ac: 40 00 30 1c call 4000e11c <__errno> <== NOT EXECUTED 400020b0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400020b4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400020b8: c2 22 00 00 st %g1, [ %o0 ] 400020bc: 81 c7 e0 08 ret 400020c0: 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 ); 400020c4: 9f c0 80 00 call %g2 400020c8: 92 10 00 19 mov %i1, %o1 400020cc: b0 10 00 08 mov %o0, %i0 } } return result; } 400020d0: 81 c7 e0 08 ret 400020d4: 81 e8 00 00 restore 4000b468 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 4000b468: 9d e3 bf 80 save %sp, -128, %sp /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 4000b46c: 25 10 00 64 sethi %hi(0x40019000), %l2 4000b470: c4 04 a1 e0 ld [ %l2 + 0x1e0 ], %g2 ! 400191e0 4000b474: 82 10 20 12 mov 0x12, %g1 init_fs_mount_table(); 4000b478: 40 00 01 91 call 4000babc 4000b47c: c2 30 a0 24 sth %g1, [ %g2 + 0x24 ] /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 4000b480: 03 10 00 62 sethi %hi(0x40018800), %g1 4000b484: c2 00 63 d8 ld [ %g1 + 0x3d8 ], %g1 ! 40018bd8 4000b488: 80 a0 60 00 cmp %g1, 0 4000b48c: 12 80 00 06 bne 4000b4a4 4000b490: 03 10 00 62 sethi %hi(0x40018800), %g1 rtems_fatal_error_occurred( 0xABCD0001 ); 4000b494: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 4000b498: 7f ff ec 21 call 4000651c <== NOT EXECUTED 4000b49c: 90 12 20 01 or %o0, 1, %o0 ! abcd0001 <== NOT EXECUTED mt = &rtems_filesystem_mount_table[0]; 4000b4a0: 03 10 00 62 sethi %hi(0x40018800), %g1 <== NOT EXECUTED 4000b4a4: c2 00 63 d4 ld [ %g1 + 0x3d4 ], %g1 ! 40018bd4 status = mount( 4000b4a8: 90 07 bf f4 add %fp, -12, %o0 4000b4ac: d8 00 60 0c ld [ %g1 + 0xc ], %o4 4000b4b0: d2 00 40 00 ld [ %g1 ], %o1 4000b4b4: d4 00 60 04 ld [ %g1 + 4 ], %o2 4000b4b8: 40 00 01 89 call 4000badc 4000b4bc: d6 00 60 08 ld [ %g1 + 8 ], %o3 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 4000b4c0: 80 a2 3f ff cmp %o0, -1 4000b4c4: 32 80 00 06 bne,a 4000b4dc 4000b4c8: d0 04 a1 e0 ld [ %l2 + 0x1e0 ], %o0 rtems_fatal_error_occurred( 0xABCD0002 ); 4000b4cc: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 4000b4d0: 7f ff ec 13 call 4000651c <== NOT EXECUTED 4000b4d4: 90 12 20 02 or %o0, 2, %o0 ! abcd0002 <== NOT EXECUTED rtems_filesystem_link_counts = 0; 4000b4d8: d0 04 a1 e0 ld [ %l2 + 0x1e0 ], %o0 <== NOT EXECUTED * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 4000b4dc: 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; 4000b4e0: 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; 4000b4e4: 92 02 60 18 add %o1, 0x18, %o1 4000b4e8: 94 10 20 10 mov 0x10, %o2 4000b4ec: 40 00 0c e1 call 4000e870 4000b4f0: 90 02 20 14 add %o0, 0x14, %o0 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000b4f4: a0 07 bf e4 add %fp, -28, %l0 4000b4f8: 96 10 20 00 clr %o3 4000b4fc: 23 10 00 60 sethi %hi(0x40018000), %l1 4000b500: 92 10 20 00 clr %o1 4000b504: 94 10 00 10 mov %l0, %o2 4000b508: 7f ff da a3 call 40001f94 4000b50c: 90 14 62 38 or %l1, 0x238, %o0 rtems_filesystem_root = loc; 4000b510: d0 04 a1 e0 ld [ %l2 + 0x1e0 ], %o0 4000b514: 92 10 00 10 mov %l0, %o1 4000b518: 94 10 20 10 mov 0x10, %o2 4000b51c: 40 00 0c d5 call 4000e870 4000b520: 90 02 20 14 add %o0, 0x14, %o0 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000b524: 96 10 20 00 clr %o3 4000b528: 92 10 20 00 clr %o1 4000b52c: 94 10 00 10 mov %l0, %o2 4000b530: 7f ff da 99 call 40001f94 4000b534: 90 14 62 38 or %l1, 0x238, %o0 rtems_filesystem_current = loc; 4000b538: d0 04 a1 e0 ld [ %l2 + 0x1e0 ], %o0 4000b53c: 92 10 00 10 mov %l0, %o1 4000b540: 94 10 20 10 mov 0x10, %o2 4000b544: 40 00 0c cb call 4000e870 4000b548: 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); 4000b54c: 92 10 21 ff mov 0x1ff, %o1 4000b550: 11 10 00 60 sethi %hi(0x40018000), %o0 4000b554: 40 00 01 50 call 4000ba94 4000b558: 90 12 22 40 or %o0, 0x240, %o0 ! 40018240 <_CPU_Trap_slot_template+0x80> if ( status != 0 ) 4000b55c: 80 a2 20 00 cmp %o0, 0 4000b560: 02 80 00 04 be 4000b570 4000b564: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 rtems_fatal_error_occurred( 0xABCD0003 ); 4000b568: 7f ff eb ed call 4000651c <== NOT EXECUTED 4000b56c: 90 12 20 03 or %o0, 3, %o0 ! abcd0003 <== NOT EXECUTED 4000b570: 81 c7 e0 08 ret 4000b574: 81 e8 00 00 restore 40006c60 : ); rtems_boolean rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 40006c60: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40006c64: c4 02 40 00 ld [ %o1 ], %g2 <== NOT EXECUTED 40006c68: 82 18 40 02 xor %g1, %g2, %g1 <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 40006c6c: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 40006c70: 81 c3 e0 08 retl <== NOT EXECUTED 40006c74: 90 60 3f ff subx %g0, -1, %o0 <== NOT EXECUTED 40006538 : #include const char *rtems_get_version_string(void) { return _RTEMS_version; } 40006538: 11 10 00 62 sethi %hi(0x40018800), %o0 <== NOT EXECUTED 4000653c: 81 c3 e0 08 retl <== NOT EXECUTED 40006540: 90 12 23 58 or %o0, 0x358, %o0 ! 40018b58 <_RTEMS_version> <== NOT EXECUTED 400062d8 : rtems_interrupt_level rtems_initialize_executive_early( rtems_configuration_table *configuration_table, rtems_cpu_table *cpu_table ) { 400062d8: 9d e3 bf 80 save %sp, -128, %sp * Dispatching and interrupts are disabled until the end of the * initialization sequence. This prevents an inadvertent context * switch before the executive is initialized. */ _ISR_Disable( bsp_level ); 400062dc: 7f ff ee 9f call 40001d58 400062e0: 01 00 00 00 nop 400062e4: a4 10 00 08 mov %o0, %l2 if ( configuration_table == NULL ) 400062e8: 80 a6 20 00 cmp %i0, 0 400062ec: 12 80 00 07 bne 40006308 400062f0: 03 10 00 68 sethi %hi(0x4001a000), %g1 _Internal_error_Occurred( 400062f4: 90 10 20 00 clr %o0 <== NOT EXECUTED 400062f8: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 400062fc: 40 00 03 af call 400071b8 <_Internal_error_Occurred> <== NOT EXECUTED 40006300: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _System_state_Handler_initialization ( boolean is_multiprocessing ) { _System_state_Current = SYSTEM_STATE_BEFORE_INITIALIZATION; 40006304: 03 10 00 68 sethi %hi(0x4001a000), %g1 <== NOT EXECUTED 40006308: c0 20 60 00 clr [ %g1 ] _System_state_Is_multiprocessing = is_multiprocessing; 4000630c: 03 10 00 67 sethi %hi(0x40019c00), %g1 /* * Grab our own copy of the user's CPU table. */ _CPU_Table = *cpu_table; 40006310: 94 10 20 28 mov 0x28, %o2 40006314: 92 10 00 19 mov %i1, %o1 40006318: c0 20 63 28 clr [ %g1 + 0x328 ] 4000631c: 11 10 00 67 sethi %hi(0x40019c00), %o0 40006320: 40 00 21 54 call 4000e870 40006324: 90 12 22 34 or %o0, 0x234, %o0 ! 40019e34 <_CPU_Table> /* * Provided just for user convenience. */ _Configuration_Table = configuration_table; 40006328: 03 10 00 67 sethi %hi(0x40019c00), %g1 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_NO_CPU_TABLE ); _CPU_Initialize( cpu_table, _Thread_Dispatch ); 4000632c: 90 10 00 19 mov %i1, %o0 40006330: 13 10 00 22 sethi %hi(0x40008800), %o1 40006334: 92 12 63 4c or %o1, 0x34c, %o1 ! 40008b4c <_Thread_Dispatch> 40006338: 40 00 10 c3 call 4000a644 <_CPU_Initialize> 4000633c: f0 20 62 e0 st %i0, [ %g1 + 0x2e0 ] /* * Do this as early as possible to insure no debugging output * is even attempted to be printed. */ _Debug_Manager_initialization(); 40006340: 40 00 19 41 call 4000c844 <_Debug_Manager_initialization> 40006344: 01 00 00 00 nop _API_extensions_Initialization(); 40006348: 40 00 00 f2 call 40006710 <_API_extensions_Initialization> 4000634c: 01 00 00 00 nop _Thread_Dispatch_initialization(); _Workspace_Handler_initialization( 40006350: d2 06 20 04 ld [ %i0 + 4 ], %o1 40006354: d0 06 00 00 ld [ %i0 ], %o0 * This routine initializes the thread dispatching subsystem. */ RTEMS_INLINE_ROUTINE void _Thread_Dispatch_initialization( void ) { _Thread_Dispatch_disable_level = 1; 40006358: 84 10 20 01 mov 1, %g2 4000635c: 03 10 00 67 sethi %hi(0x40019c00), %g1 40006360: c4 20 62 20 st %g2, [ %g1 + 0x220 ] ! 40019e20 <_Thread_Dispatch_disable_level> 40006364: 40 00 0f 8e call 4000a19c <_Workspace_Handler_initialization> 40006368: 23 10 00 67 sethi %hi(0x40019c00), %l1 (void *)configuration_table->work_space_start, configuration_table->work_space_size ); _User_extensions_Handler_initialization( 4000636c: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 40006370: 40 00 0e 2e call 40009c28 <_User_extensions_Handler_initialization> 40006374: d2 06 20 24 ld [ %i0 + 0x24 ], %o1 configuration_table->number_of_initial_extensions, configuration_table->User_extension_table ); _ISR_Handler_initialization(); 40006378: 40 00 03 a0 call 400071f8 <_ISR_Handler_initialization> 4000637c: a0 07 bf e8 add %fp, -24, %l0 _Objects_Handler_initialization( 40006380: 90 10 20 01 mov 1, %o0 40006384: 92 10 20 01 mov 1, %o1 40006388: 40 00 05 96 call 400079e0 <_Objects_Handler_initialization> 4000638c: 94 10 20 00 clr %o2 multiprocessing_table->node, multiprocessing_table->maximum_nodes, multiprocessing_table->maximum_global_objects ); _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects; 40006390: 05 10 00 67 sethi %hi(0x40019c00), %g2 /* * Initialize the internal allocator Mutex */ _API_Mutex_Initialization( 1 ); 40006394: c0 23 a0 5c clr [ %sp + 0x5c ] multiprocessing_table->node, multiprocessing_table->maximum_nodes, multiprocessing_table->maximum_global_objects ); _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects; 40006398: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000639c: 82 10 62 60 or %g1, 0x260, %g1 ! 40019e60 <_Internal_Objects> /* * Initialize the internal allocator Mutex */ _API_Mutex_Initialization( 1 ); 400063a0: 96 10 20 01 mov 1, %o3 multiprocessing_table->node, multiprocessing_table->maximum_nodes, multiprocessing_table->maximum_global_objects ); _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects; 400063a4: c2 20 a1 84 st %g1, [ %g2 + 0x184 ] /* * Initialize the internal allocator Mutex */ _API_Mutex_Initialization( 1 ); 400063a8: 98 10 20 74 mov 0x74, %o4 400063ac: 9a 10 20 00 clr %o5 400063b0: 90 14 63 2c or %l1, 0x32c, %o0 400063b4: 92 10 20 01 mov 1, %o1 400063b8: 40 00 05 16 call 40007810 <_Objects_Initialize_information> 400063bc: 94 10 20 02 mov 2, %o2 _API_Mutex_Allocate( _RTEMS_Allocator_Mutex ); 400063c0: 94 10 20 10 mov 0x10, %o2 400063c4: 13 10 00 60 sethi %hi(0x40018000), %o1 400063c8: 90 10 00 10 mov %l0, %o0 400063cc: 40 00 21 29 call 4000e870 400063d0: 92 12 61 a8 or %o1, 0x1a8, %o1 400063d4: 40 00 03 a6 call 4000726c <_Objects_Allocate> 400063d8: 90 14 63 2c or %l1, 0x32c, %o0 400063dc: 03 10 00 67 sethi %hi(0x40019c00), %g1 400063e0: 84 10 00 08 mov %o0, %g2 400063e4: 92 10 00 10 mov %l0, %o1 400063e8: c4 20 62 f4 st %g2, [ %g1 + 0x2f4 ] 400063ec: 90 02 20 10 add %o0, 0x10, %o0 400063f0: 40 00 01 2a call 40006898 <_CORE_mutex_Initialize> 400063f4: 94 10 20 01 mov 1, %o2 RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { size_t index; _Priority_Major_bit_map = 0; 400063f8: 03 10 00 67 sethi %hi(0x40019c00), %g1 400063fc: 84 10 20 00 clr %g2 40006400: c0 30 62 f0 clrh [ %g1 + 0x2f0 ] for ( index=0 ; index <16 ; index++ ) _Priority_Bit_map[ index ] = 0; 40006404: 03 10 00 67 sethi %hi(0x40019c00), %g1 40006408: 82 10 63 80 or %g1, 0x380, %g1 ! 40019f80 <_Priority_Bit_map> 4000640c: c0 30 80 01 clrh [ %g2 + %g1 ] 40006410: 84 00 a0 02 add %g2, 2, %g2 RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { size_t index; _Priority_Major_bit_map = 0; for ( index=0 ; index <16 ; index++ ) 40006414: 80 a0 a0 20 cmp %g2, 0x20 40006418: 32 bf ff fe bne,a 40006410 4000641c: c0 30 80 01 clrh [ %g2 + %g1 ] _Priority_Handler_initialization(); _Watchdog_Handler_initialization(); 40006420: 40 00 0e ed call 40009fd4 <_Watchdog_Handler_initialization> 40006424: 01 00 00 00 nop _TOD_Handler_initialization( configuration_table->microseconds_per_tick ); 40006428: 40 00 02 08 call 40006c48 <_TOD_Handler_initialization> 4000642c: d0 06 20 0c ld [ %i0 + 0xc ], %o0 _Thread_Handler_initialization( 40006430: d2 06 20 08 ld [ %i0 + 8 ], %o1 40006434: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 40006438: 40 00 0a 85 call 40008e4c <_Thread_Handler_initialization> 4000643c: 94 10 20 00 clr %o2 ); #endif /* MANAGERS */ _RTEMS_API_Initialize( configuration_table ); 40006440: 40 00 00 95 call 40006694 <_RTEMS_API_Initialize> 40006444: 90 10 00 18 mov %i0, %o0 _Extension_Manager_initialization( configuration_table->maximum_extensions ); 40006448: 40 00 00 28 call 400064e8 <_Extension_Manager_initialization> 4000644c: d0 06 20 08 ld [ %i0 + 8 ], %o0 _IO_Manager_initialization( 40006450: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 40006454: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 40006458: 40 00 00 49 call 4000657c <_IO_Manager_initialization> 4000645c: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 configuration_table->number_of_device_drivers, configuration_table->maximum_drivers ); #ifdef RTEMS_POSIX_API _POSIX_API_Initialize( configuration_table ); 40006460: 40 00 00 68 call 40006600 <_POSIX_API_Initialize> 40006464: 90 10 00 18 mov %i0, %o0 RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 40006468: 84 10 20 01 mov 1, %g2 4000646c: 03 10 00 68 sethi %hi(0x4001a000), %g1 * * At this point all API extensions are in place. After the call to * _Thread_Create_idle() _Thread_Executing and _Thread_Heir will be set. */ _Thread_Create_idle(); 40006470: 40 00 09 5b call 400089dc <_Thread_Create_idle> 40006474: c4 20 60 00 st %g2, [ %g1 ] /* * Scheduling can properly occur now as long as we avoid dispatching. */ if ( cpu_table->pretasking_hook ) 40006478: d0 06 40 00 ld [ %i1 ], %o0 4000647c: 80 a2 20 00 cmp %o0, 0 40006480: 02 80 00 04 be 40006490 40006484: 01 00 00 00 nop (*cpu_table->pretasking_hook)(); 40006488: 9f c2 00 00 call %o0 4000648c: 01 00 00 00 nop /* * Run the API and BSPs predriver hook. */ _API_extensions_Run_predriver(); 40006490: 40 00 00 bf call 4000678c <_API_extensions_Run_predriver> 40006494: 01 00 00 00 nop if ( _CPU_Table.predriver_hook ) 40006498: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000649c: a0 10 62 34 or %g1, 0x234, %l0 ! 40019e34 <_CPU_Table> 400064a0: c2 04 20 04 ld [ %l0 + 4 ], %g1 400064a4: 80 a0 60 00 cmp %g1, 0 400064a8: 02 80 00 04 be 400064b8 400064ac: 01 00 00 00 nop (*_CPU_Table.predriver_hook)(); 400064b0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400064b4: 01 00 00 00 nop <== NOT EXECUTED * Initialize all the device drivers and initialize the MPCI layer. * * NOTE: The MPCI may be build upon a device driver. */ _IO_Initialize_all_drivers(); 400064b8: 40 00 00 23 call 40006544 <_IO_Initialize_all_drivers> 400064bc: 01 00 00 00 nop * Run the APIs and BSPs postdriver hooks. * * The API extensions are supposed to create user initialization tasks. */ _API_extensions_Run_postdriver(); 400064c0: 40 00 00 9b call 4000672c <_API_extensions_Run_postdriver> 400064c4: 01 00 00 00 nop if ( _CPU_Table.postdriver_hook ) 400064c8: c2 04 20 08 ld [ %l0 + 8 ], %g1 400064cc: 80 a0 60 00 cmp %g1, 0 400064d0: 02 80 00 04 be 400064e0 400064d4: 01 00 00 00 nop (*_CPU_Table.postdriver_hook)(); 400064d8: 9f c0 40 00 call %g1 400064dc: 01 00 00 00 nop return bsp_level; } 400064e0: 81 c7 e0 08 ret 400064e4: 91 e8 00 12 restore %g0, %l2, %o0 40001d78 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 40001d78: 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 ); 40001d7c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40001d80: a4 07 bf e8 add %fp, -24, %l2 <== NOT EXECUTED 40001d84: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40001d88: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED 40001d8c: 40 00 00 82 call 40001f94 <== NOT EXECUTED 40001d90: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 40001d94: 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 ); 40001d98: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 40001d9c: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED 40001da0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001da4: 12 80 00 0e bne 40001ddc <== NOT EXECUTED 40001da8: e2 07 bf e8 ld [ %fp + -24 ], %l1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40001dac: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40001db0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001db4: 02 80 00 04 be 40001dc4 <== NOT EXECUTED 40001db8: 01 00 00 00 nop <== NOT EXECUTED 40001dbc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40001dc0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40001dc4: 40 00 30 d6 call 4000e11c <__errno> <== NOT EXECUTED 40001dc8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40001dcc: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40001dd0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40001dd4: 81 c7 e0 08 ret <== NOT EXECUTED 40001dd8: 81 e8 00 00 restore <== NOT EXECUTED } node_type = (*loc.ops->node_type_h)( &loc ); 40001ddc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40001de0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 40001de4: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40001de8: 12 80 00 05 bne 40001dfc <== NOT EXECUTED 40001dec: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40001df0: 80 a2 20 02 cmp %o0, 2 <== NOT EXECUTED 40001df4: 22 80 00 0d be,a 40001e28 <== NOT EXECUTED 40001df8: f0 26 40 00 st %i0, [ %i1 ] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40001dfc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001e00: 02 80 00 1c be 40001e70 <== NOT EXECUTED 40001e04: 01 00 00 00 nop <== NOT EXECUTED 40001e08: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40001e0c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001e10: 02 80 00 18 be 40001e70 <== NOT EXECUTED 40001e14: 01 00 00 00 nop <== NOT EXECUTED 40001e18: 9f c0 40 00 call %g1 <== NOT EXECUTED 40001e1c: 90 10 00 12 mov %l2, %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 ); 40001e20: 81 c7 e0 08 ret <== NOT EXECUTED 40001e24: 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 ); 40001e28: 40 00 35 9b call 4000f494 <== NOT EXECUTED 40001e2c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40001e30: d0 26 60 04 st %o0, [ %i1 + 4 ] <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 40001e34: c2 04 60 4c ld [ %l1 + 0x4c ], %g1 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 40001e38: 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; 40001e3c: c2 26 60 08 st %g1, [ %i1 + 8 ] <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 40001e40: c2 04 60 50 ld [ %l1 + 0x50 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40001e44: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40001e48: 02 80 00 0c be 40001e78 <== NOT EXECUTED 40001e4c: c2 26 60 0c st %g1, [ %i1 + 0xc ] <== NOT EXECUTED 40001e50: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40001e54: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001e58: 02 80 00 08 be 40001e78 <== NOT EXECUTED 40001e5c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40001e60: 9f c0 40 00 call %g1 <== NOT EXECUTED 40001e64: b0 10 20 00 clr %i0 <== NOT EXECUTED 40001e68: 81 c7 e0 08 ret <== NOT EXECUTED 40001e6c: 81 e8 00 00 restore <== NOT EXECUTED 40001e70: 81 c7 e0 08 ret <== NOT EXECUTED 40001e74: 91 e8 20 0d restore %g0, 0xd, %o0 <== NOT EXECUTED 40001e78: b0 10 20 00 clr %i0 <== NOT EXECUTED #endif return RTEMS_SUCCESSFUL; } 40001e7c: 81 c7 e0 08 ret <== NOT EXECUTED 40001e80: 81 e8 00 00 restore <== NOT EXECUTED 400075d8 : rtems_status_code rtems_io_register_driver( rtems_device_major_number major, rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 400075d8: 9d e3 bf 98 save %sp, -104, %sp /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 400075dc: 92 96 60 00 orcc %i1, 0, %o1 400075e0: 02 80 00 40 be 400076e0 400075e4: 80 a6 a0 00 cmp %i2, 0 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) 400075e8: 02 80 00 41 be 400076ec 400075ec: 82 10 20 09 mov 9, %g1 return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 400075f0: c2 02 40 00 ld [ %o1 ], %g1 400075f4: 80 a0 60 00 cmp %g1, 0 400075f8: 12 80 00 07 bne 40007614 400075fc: 03 10 00 78 sethi %hi(0x4001e000), %g1 40007600: c2 02 60 04 ld [ %o1 + 4 ], %g1 40007604: 80 a0 60 00 cmp %g1, 0 40007608: 22 80 00 39 be,a 400076ec 4000760c: 82 10 20 09 mov 9, %g1 *registered_major = 0; /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 40007610: 03 10 00 78 sethi %hi(0x4001e000), %g1 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) return RTEMS_INVALID_ADDRESS; *registered_major = 0; 40007614: c0 26 80 00 clr [ %i2 ] /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 40007618: c8 00 63 5c ld [ %g1 + 0x35c ], %g4 4000761c: 80 a6 00 04 cmp %i0, %g4 40007620: 1a 80 00 33 bcc 400076ec 40007624: 82 10 20 0a mov 0xa, %g1 /* * Test for initialise/open being present to indicate the driver slot is * in use. */ if ( major == 0 ) { 40007628: 80 a6 20 00 cmp %i0, 0 4000762c: 12 80 00 18 bne 4000768c 40007630: 03 10 00 78 sethi %hi(0x4001e000), %g1 boolean found = FALSE; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 40007634: c6 00 63 60 ld [ %g1 + 0x360 ], %g3 ! 4001e360 <_IO_Driver_address_table> 40007638: 85 29 20 03 sll %g4, 3, %g2 4000763c: 83 29 20 05 sll %g4, 5, %g1 40007640: b0 01 3f ff add %g4, -1, %i0 40007644: 82 20 40 02 sub %g1, %g2, %g1 40007648: 82 00 7f e8 add %g1, -24, %g1 4000764c: 10 80 00 0b b 40007678 40007650: 84 00 40 03 add %g1, %g3, %g2 if ( !_IO_Driver_address_table[major].initialization_entry && 40007654: 80 a0 60 00 cmp %g1, 0 40007658: 32 80 00 07 bne,a 40007674 4000765c: b0 06 3f ff add %i0, -1, %i0 40007660: c2 00 a0 04 ld [ %g2 + 4 ], %g1 40007664: 80 a0 60 00 cmp %g1, 0 40007668: 02 80 00 09 be 4000768c 4000766c: 03 10 00 78 sethi %hi(0x4001e000), %g1 * in use. */ if ( major == 0 ) { boolean found = FALSE; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 40007670: b0 06 3f ff add %i0, -1, %i0 <== NOT EXECUTED 40007674: 84 00 bf e8 add %g2, -24, %g2 40007678: 80 a6 20 00 cmp %i0, 0 4000767c: 32 bf ff f6 bne,a 40007654 40007680: c2 00 80 00 ld [ %g2 ], %g1 40007684: 10 80 00 1a b 400076ec 40007688: 82 10 20 05 mov 5, %g1 if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 4000768c: c6 00 63 60 ld [ %g1 + 0x360 ], %g3 40007690: 85 2e 20 03 sll %i0, 3, %g2 40007694: 83 2e 20 05 sll %i0, 5, %g1 40007698: 82 20 40 02 sub %g1, %g2, %g1 4000769c: c4 00 40 03 ld [ %g1 + %g3 ], %g2 400076a0: 80 a0 a0 00 cmp %g2, 0 400076a4: 12 80 00 11 bne 400076e8 400076a8: 90 00 40 03 add %g1, %g3, %o0 400076ac: c2 02 20 04 ld [ %o0 + 4 ], %g1 400076b0: 80 a0 60 00 cmp %g1, 0 400076b4: 32 80 00 0e bne,a 400076ec 400076b8: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 400076bc: 40 00 20 2e call 4000f774 400076c0: 94 10 20 18 mov 0x18, %o2 *registered_major = major; rtems_io_initialize( major, 0, NULL ); 400076c4: 90 10 00 18 mov %i0, %o0 _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; *registered_major = major; 400076c8: f0 26 80 00 st %i0, [ %i2 ] rtems_io_initialize( major, 0, NULL ); 400076cc: 92 10 20 00 clr %o1 400076d0: 7f ff ff 52 call 40007418 400076d4: 94 10 20 00 clr %o2 400076d8: 10 80 00 05 b 400076ec 400076dc: 82 10 20 00 clr %g1 return RTEMS_SUCCESSFUL; 400076e0: 10 80 00 03 b 400076ec 400076e4: 82 10 20 09 mov 9, %g1 400076e8: 82 10 20 0c mov 0xc, %g1 } 400076ec: 81 c7 e0 08 ret 400076f0: 91 e8 00 01 restore %g0, %g1, %o0 40008c3c : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 40008c3c: 9d e3 bf 98 save %sp, -104, %sp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 40008c40: 80 a6 20 00 cmp %i0, 0 40008c44: 02 80 00 1d be 40008cb8 40008c48: 03 10 00 9a sethi %hi(0x40026800), %g1 return; 40008c4c: a4 10 61 b4 or %g1, 0x1b4, %l2 ! 400269b4 <_Objects_Information_table+0x4> for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 40008c50: a6 04 a0 10 add %l2, 0x10, %l3 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 40008c54: c2 04 80 00 ld [ %l2 ], %g1 40008c58: 80 a0 60 00 cmp %g1, 0 40008c5c: 22 80 00 14 be,a 40008cac 40008c60: a4 04 a0 04 add %l2, 4, %l2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 40008c64: e0 00 60 04 ld [ %g1 + 4 ], %l0 if ( information ) { 40008c68: 80 a4 20 00 cmp %l0, 0 40008c6c: 12 80 00 0b bne 40008c98 40008c70: a2 10 20 01 mov 1, %l1 for ( i=1 ; i <= information->maximum ; i++ ) { 40008c74: 10 80 00 0e b 40008cac <== NOT EXECUTED 40008c78: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED the_thread = (Thread_Control *)information->local_table[ i ]; 40008c7c: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 40008c80: d0 00 40 08 ld [ %g1 + %o0 ], %o0 if ( !the_thread ) 40008c84: 80 a2 20 00 cmp %o0, 0 40008c88: 02 80 00 04 be 40008c98 40008c8c: a2 04 60 01 inc %l1 continue; (*routine)(the_thread); 40008c90: 9f c6 00 00 call %i0 40008c94: 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++ ) { 40008c98: c2 14 20 10 lduh [ %l0 + 0x10 ], %g1 40008c9c: 80 a4 40 01 cmp %l1, %g1 40008ca0: 08 bf ff f7 bleu 40008c7c 40008ca4: 91 2c 60 02 sll %l1, 2, %o0 40008ca8: a4 04 a0 04 add %l2, 4, %l2 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 40008cac: 80 a4 80 13 cmp %l2, %l3 40008cb0: 32 bf ff ea bne,a 40008c58 40008cb4: c2 04 80 00 ld [ %l2 ], %g1 40008cb8: 81 c7 e0 08 ret 40008cbc: 81 e8 00 00 restore 4000b988 : * 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 ) { 4000b988: 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 ); 4000b98c: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000b990: d0 00 60 5c ld [ %g1 + 0x5c ], %o0 ! 40019c5c 4000b994: 92 10 20 00 clr %o1 4000b998: 7f ff e7 e2 call 40005920 4000b99c: 94 10 20 00 clr %o2 if (rtems_libio_iop_freelist) { 4000b9a0: 23 10 00 67 sethi %hi(0x40019c00), %l1 4000b9a4: c4 04 60 58 ld [ %l1 + 0x58 ], %g2 ! 40019c58 4000b9a8: 80 a0 a0 00 cmp %g2, 0 4000b9ac: 02 80 00 28 be 4000ba4c 4000b9b0: b0 10 20 00 clr %i0 rc = rtems_semaphore_create( 4000b9b4: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000b9b8: c6 00 60 54 ld [ %g1 + 0x54 ], %g3 ! 40019c54 4000b9bc: 92 10 20 01 mov 1, %o1 4000b9c0: 86 20 80 03 sub %g2, %g3, %g3 4000b9c4: 87 38 e0 02 sra %g3, 2, %g3 4000b9c8: 83 28 e0 02 sll %g3, 2, %g1 4000b9cc: 85 28 e0 06 sll %g3, 6, %g2 4000b9d0: 84 20 80 01 sub %g2, %g1, %g2 4000b9d4: 83 28 a0 06 sll %g2, 6, %g1 4000b9d8: 82 20 40 02 sub %g1, %g2, %g1 4000b9dc: 85 28 60 0c sll %g1, 0xc, %g2 4000b9e0: 82 00 40 02 add %g1, %g2, %g1 4000b9e4: 82 00 40 03 add %g1, %g3, %g1 4000b9e8: 83 28 60 04 sll %g1, 4, %g1 4000b9ec: 82 20 40 03 sub %g1, %g3, %g1 4000b9f0: 83 28 60 02 sll %g1, 2, %g1 4000b9f4: 86 20 c0 01 sub %g3, %g1, %g3 4000b9f8: 94 10 20 54 mov 0x54, %o2 4000b9fc: 96 10 20 00 clr %o3 4000ba00: 11 13 10 92 sethi %hi(0x4c424800), %o0 4000ba04: 98 07 bf f4 add %fp, -12, %o4 4000ba08: 90 12 21 00 or %o0, 0x100, %o0 4000ba0c: 7f ff e6 eb call 400055b8 4000ba10: 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) 4000ba14: 80 a2 20 00 cmp %o0, 0 4000ba18: 32 80 00 0d bne,a 4000ba4c 4000ba1c: b0 10 20 00 clr %i0 <== NOT EXECUTED goto failed; iop = rtems_libio_iop_freelist; 4000ba20: f0 04 60 58 ld [ %l1 + 0x58 ], %i0 next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); 4000ba24: 92 10 20 00 clr %o1 &sema ); if (rc != RTEMS_SUCCESSFUL) goto failed; iop = rtems_libio_iop_freelist; next = iop->data1; 4000ba28: e0 06 20 28 ld [ %i0 + 0x28 ], %l0 (void) memset( iop, 0, sizeof(rtems_libio_t) ); 4000ba2c: 90 10 00 18 mov %i0, %o0 4000ba30: 40 00 0b bd call 4000e924 4000ba34: 94 10 20 34 mov 0x34, %o2 iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; 4000ba38: c2 07 bf f4 ld [ %fp + -12 ], %g1 rtems_libio_iop_freelist = next; 4000ba3c: e0 24 60 58 st %l0, [ %l1 + 0x58 ] 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; 4000ba40: 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; 4000ba44: 82 10 21 00 mov 0x100, %g1 4000ba48: c2 26 20 0c st %g1, [ %i0 + 0xc ] failed: iop = 0; done: rtems_semaphore_release( rtems_libio_semaphore ); 4000ba4c: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000ba50: 7f ff e8 7b call 40005c3c 4000ba54: d0 00 60 5c ld [ %g1 + 0x5c ], %o0 ! 40019c5c return iop; } 4000ba58: 81 c7 e0 08 ret 4000ba5c: 81 e8 00 00 restore 400020d8 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 400020d8: 9d e3 bf 98 save %sp, -104, %sp rtems_status_code rc; int i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 400020dc: 23 10 00 62 sethi %hi(0x40018800), %l1 400020e0: d0 04 63 bc ld [ %l1 + 0x3bc ], %o0 ! 40018bbc 400020e4: 80 a2 20 00 cmp %o0, 0 400020e8: 22 80 00 1e be,a 40002160 400020ec: 11 13 10 92 sethi %hi(0x4c424800), %o0 <== NOT EXECUTED { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 400020f0: 92 10 20 34 mov 0x34, %o1 400020f4: 40 00 00 ec call 400024a4 400020f8: 21 10 00 67 sethi %hi(0x40019c00), %l0 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 400020fc: 80 a2 20 00 cmp %o0, 0 40002100: 12 80 00 04 bne 40002110 40002104: d0 24 20 54 st %o0, [ %l0 + 0x54 ] rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 40002108: 40 00 11 05 call 4000651c <== NOT EXECUTED 4000210c: 90 10 20 1a mov 0x1a, %o0 <== NOT EXECUTED iop = rtems_libio_iop_freelist = rtems_libio_iops; 40002110: c8 04 20 54 ld [ %l0 + 0x54 ], %g4 for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++) 40002114: c6 04 63 bc ld [ %l1 + 0x3bc ], %g3 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; 40002118: 03 10 00 67 sethi %hi(0x40019c00), %g1 for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++) 4000211c: 84 10 20 00 clr %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; 40002120: c8 20 60 58 st %g4, [ %g1 + 0x58 ] for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++) 40002124: 10 80 00 03 b 40002130 40002128: 82 10 00 04 mov %g4, %g1 iop->data1 = iop + 1; 4000212c: c2 20 7f f4 st %g1, [ %g1 + -12 ] 40002130: 84 00 a0 01 inc %g2 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++) 40002134: 80 a0 80 03 cmp %g2, %g3 40002138: 12 bf ff fd bne 4000212c 4000213c: 82 00 60 34 add %g1, 0x34, %g1 iop->data1 = iop + 1; iop->data1 = NULL; 40002140: 85 28 e0 02 sll %g3, 2, %g2 40002144: 83 28 e0 04 sll %g3, 4, %g1 40002148: 82 20 40 02 sub %g1, %g2, %g1 4000214c: 82 00 40 03 add %g1, %g3, %g1 40002150: 83 28 60 02 sll %g1, 2, %g1 40002154: 82 00 40 04 add %g1, %g4, %g1 40002158: c0 20 7f f4 clr [ %g1 + -12 ] /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 4000215c: 11 13 10 92 sethi %hi(0x4c424800), %o0 40002160: 92 10 20 01 mov 1, %o1 40002164: 90 12 21 4f or %o0, 0x14f, %o0 40002168: 94 10 20 54 mov 0x54, %o2 4000216c: 96 10 20 00 clr %o3 40002170: 19 10 00 67 sethi %hi(0x40019c00), %o4 40002174: 40 00 0d 11 call 400055b8 40002178: 98 13 20 5c or %o4, 0x5c, %o4 ! 40019c5c 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 4000217c: 80 a2 20 00 cmp %o0, 0 40002180: 02 80 00 04 be 40002190 40002184: 01 00 00 00 nop rtems_fatal_error_occurred( rc ); 40002188: 40 00 10 e5 call 4000651c <== NOT EXECUTED 4000218c: 01 00 00 00 nop <== NOT EXECUTED /* * Initialize the base file system infrastructure. */ rtems_filesystem_initialize(); 40002190: 40 00 24 b6 call 4000b468 40002194: 81 e8 00 00 restore 40002198: 01 00 00 00 nop 40017540 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 40017540: 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); 40017544: 90 10 20 00 clr %o0 40017548: 92 10 20 00 clr %o1 4001754c: 40 00 03 ae call 40018404 40017550: 94 07 bf f4 add %fp, -12, %o2 if (sc != RTEMS_SUCCESSFUL) return sc; 40017554: b0 92 20 00 orcc %o0, 0, %i0 40017558: 12 80 00 19 bne 400175bc 4001755c: 25 10 00 e3 sethi %hi(0x40038c00), %l2 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 40017560: c4 04 a0 60 ld [ %l2 + 0x60 ], %g2 ! 40038c60 40017564: 03 10 00 ed sethi %hi(0x4003b400), %g1 40017568: 82 10 61 f4 or %g1, 0x1f4, %g1 ! 4003b5f4 4001756c: 80 a0 80 01 cmp %g2, %g1 40017570: 12 80 00 15 bne 400175c4 40017574: a2 14 a0 60 or %l2, 0x60, %l1 rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 40017578: 7f ff b7 48 call 40005298 4001757c: 90 10 20 40 mov 0x40, %o0 if (!tmp) 40017580: a0 92 20 00 orcc %o0, 0, %l0 40017584: 12 80 00 04 bne 40017594 40017588: 92 10 00 11 mov %l1, %o1 4001758c: 81 c7 e0 08 ret <== NOT EXECUTED 40017590: 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); 40017594: 90 10 20 00 clr %o0 40017598: 15 10 00 5d sethi %hi(0x40017400), %o2 4001759c: 40 00 04 b2 call 40018864 400175a0: 94 12 a0 1c or %o2, 0x1c, %o2 ! 4001741c if (sc != RTEMS_SUCCESSFUL) { 400175a4: a2 92 20 00 orcc %o0, 0, %l1 400175a8: 22 80 00 07 be,a 400175c4 400175ac: e0 24 a0 60 st %l0, [ %l2 + 0x60 ] /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 400175b0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400175b4: 7f ff b7 11 call 400051f8 <== NOT EXECUTED 400175b8: b0 10 00 11 mov %l1, %i0 <== NOT EXECUTED 400175bc: 81 c7 e0 08 ret <== NOT EXECUTED 400175c0: 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*/ 400175c4: 23 10 00 e3 sethi %hi(0x40038c00), %l1 400175c8: d0 04 60 60 ld [ %l1 + 0x60 ], %o0 ! 40038c60 400175cc: 94 10 20 40 mov 0x40, %o2 400175d0: 13 10 00 ed sethi %hi(0x4003b400), %o1 400175d4: 40 00 33 fa call 400245bc 400175d8: 92 12 61 f4 or %o1, 0x1f4, %o1 ! 4003b5f4 rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 400175dc: 03 10 00 eb sethi %hi(0x4003ac00), %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*/ 400175e0: d0 04 60 60 ld [ %l1 + 0x60 ], %o0 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 400175e4: d2 00 62 08 ld [ %g1 + 0x208 ], %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*/ 400175e8: c2 07 bf f4 ld [ %fp + -12 ], %g1 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 400175ec: 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*/ 400175f0: c2 22 00 00 st %g1, [ %o0 ] /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 400175f4: 94 10 20 10 mov 0x10, %o2 400175f8: 40 00 33 f1 call 400245bc 400175fc: 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); 40017600: a0 07 bf e4 add %fp, -28, %l0 40017604: 96 10 20 00 clr %o3 40017608: 25 10 00 d3 sethi %hi(0x40034c00), %l2 4001760c: 92 10 20 00 clr %o1 40017610: 94 10 00 10 mov %l0, %o2 40017614: 7f ff b5 9a call 40004c7c 40017618: 90 14 a3 f8 or %l2, 0x3f8, %o0 rtems_filesystem_root = loc; 4001761c: d0 04 60 60 ld [ %l1 + 0x60 ], %o0 40017620: 92 10 00 10 mov %l0, %o1 40017624: 94 10 20 10 mov 0x10, %o2 40017628: 40 00 33 e5 call 400245bc 4001762c: 90 02 20 14 add %o0, 0x14, %o0 rtems_filesystem_evaluate_path("/", 0, &loc, 0); 40017630: 92 10 20 00 clr %o1 40017634: 94 10 00 10 mov %l0, %o2 40017638: 90 14 a3 f8 or %l2, 0x3f8, %o0 4001763c: 7f ff b5 90 call 40004c7c 40017640: 96 10 20 00 clr %o3 rtems_filesystem_current = loc; 40017644: d0 04 60 60 ld [ %l1 + 0x60 ], %o0 40017648: 92 10 00 10 mov %l0, %o1 4001764c: 90 02 20 04 add %o0, 4, %o0 40017650: 40 00 33 db call 400245bc 40017654: 94 10 20 10 mov 0x10, %o2 return RTEMS_SUCCESSFUL; } 40017658: 81 c7 e0 08 ret 4001765c: 81 e8 00 00 restore 40017494 : * 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) { 40017494: 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); 40017498: 90 10 20 00 clr %o0 <== NOT EXECUTED 4001749c: 92 10 20 00 clr %o1 <== NOT EXECUTED 400174a0: 40 00 03 d9 call 40018404 <== NOT EXECUTED 400174a4: 94 07 bf f0 add %fp, -16, %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 400174a8: 86 92 20 00 orcc %o0, 0, %g3 <== NOT EXECUTED 400174ac: 12 80 00 23 bne 40017538 <== NOT EXECUTED 400174b0: 25 10 00 e3 sethi %hi(0x40038c00), %l2 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 400174b4: e0 04 a0 60 ld [ %l2 + 0x60 ], %l0 ! 40038c60 <== NOT EXECUTED 400174b8: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 400174bc: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED 400174c0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400174c4: 12 80 00 09 bne 400174e8 <== NOT EXECUTED 400174c8: a2 14 a0 60 or %l2, 0x60, %l1 <== 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); 400174cc: 40 00 05 42 call 400189d4 <== NOT EXECUTED 400174d0: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 400174d4: 86 92 20 00 orcc %o0, 0, %g3 <== NOT EXECUTED 400174d8: 12 80 00 18 bne 40017538 <== NOT EXECUTED 400174dc: 01 00 00 00 nop <== NOT EXECUTED free_user_env(tmp); 400174e0: 7f ff ff cf call 4001741c <== NOT EXECUTED 400174e4: 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, 400174e8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400174ec: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 400174f0: 40 00 05 a5 call 40018b84 <== NOT EXECUTED 400174f4: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 400174f8: 86 92 20 00 orcc %o0, 0, %g3 <== NOT EXECUTED 400174fc: 12 80 00 0c bne 4001752c <== NOT EXECUTED 40017500: 03 10 00 ed sethi %hi(0x4003b400), %g1 <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 40017504: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40017508: 15 10 00 5d sethi %hi(0x40017400), %o2 <== NOT EXECUTED 4001750c: 40 00 04 d6 call 40018864 <== NOT EXECUTED 40017510: 94 12 a0 1c or %o2, 0x1c, %o2 ! 4001741c <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 40017514: 86 92 20 00 orcc %o0, 0, %g3 <== NOT EXECUTED 40017518: 12 80 00 05 bne 4001752c <== NOT EXECUTED 4001751c: 03 10 00 ed sethi %hi(0x4003b400), %g1 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 40017520: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40017524: 10 80 00 05 b 40017538 <== NOT EXECUTED 40017528: c2 24 a0 60 st %g1, [ %l2 + 0x60 ] <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 4001752c: 05 10 00 e3 sethi %hi(0x40038c00), %g2 <== NOT EXECUTED 40017530: 82 10 61 f4 or %g1, 0x1f4, %g1 <== NOT EXECUTED 40017534: c2 20 a0 60 st %g1, [ %g2 + 0x60 ] <== NOT EXECUTED return sc; } 40017538: 81 c7 e0 08 ret <== NOT EXECUTED 4001753c: 91 e8 00 03 restore %g0, %g3, %o0 <== NOT EXECUTED 4000b7dc : */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 4000b7dc: 84 10 00 08 mov %o0, %g2 uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4000b7e0: 82 08 a0 06 and %g2, 6, %g1 4000b7e4: 80 a0 60 06 cmp %g1, 6 4000b7e8: 02 80 00 07 be 4000b804 4000b7ec: 90 10 20 02 mov 2, %o0 fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 4000b7f0: 80 88 a0 02 btst 2, %g2 4000b7f4: 12 80 00 04 bne 4000b804 4000b7f8: 90 10 20 00 clr %o0 4000b7fc: 83 30 a0 02 srl %g2, 2, %g1 <== NOT EXECUTED 4000b800: 90 08 60 01 and %g1, 1, %o0 <== NOT EXECUTED fcntl_flags |= O_RDONLY; } else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) { fcntl_flags |= O_WRONLY; } if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) { 4000b804: 80 88 a0 01 btst 1, %g2 4000b808: 02 80 00 04 be 4000b818 4000b80c: 80 88 a2 00 btst 0x200, %g2 fcntl_flags |= O_NONBLOCK; 4000b810: 03 00 00 10 sethi %hi(0x4000), %g1 4000b814: 90 12 00 01 or %o0, %g1, %o0 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 4000b818: 32 80 00 02 bne,a 4000b820 4000b81c: 90 12 20 08 or %o0, 8, %o0 fcntl_flags |= O_APPEND; } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 4000b820: 80 88 a4 00 btst 0x400, %g2 4000b824: 32 80 00 02 bne,a 4000b82c 4000b828: 90 12 22 00 or %o0, 0x200, %o0 fcntl_flags |= O_CREAT; } return fcntl_flags; } 4000b82c: 81 c3 e0 08 retl 4000b830: 01 00 00 00 nop 4000e784 : Objects_Id id, void *buffer, size_t size, uint32_t *count ) { 4000e784: 9d e3 bf 90 save %sp, -112, %sp register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status core_status; if ( !buffer ) 4000e788: 80 a6 60 00 cmp %i1, 0 4000e78c: 02 80 00 26 be 4000e824 4000e790: 80 a6 e0 00 cmp %i3, 0 return RTEMS_INVALID_ADDRESS; if ( !count ) 4000e794: 02 80 00 24 be 4000e824 4000e798: 11 10 00 d0 sethi %hi(0x40034000), %o0 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 4000e79c: 92 10 00 18 mov %i0, %o1 4000e7a0: 90 12 23 00 or %o0, 0x300, %o0 4000e7a4: 40 00 18 b0 call 40014a64 <_Objects_Get> 4000e7a8: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4000e7ac: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000e7b0: 80 a0 60 00 cmp %g1, 0 4000e7b4: 02 80 00 07 be 4000e7d0 4000e7b8: 9a 10 00 1b mov %i3, %o5 4000e7bc: 80 a0 60 02 cmp %g1, 2 4000e7c0: 08 80 00 1a bleu 4000e828 4000e7c4: 90 10 20 04 mov 4, %o0 4000e7c8: 10 80 00 18 b 4000e828 <== NOT EXECUTED 4000e7cc: 90 10 20 19 mov 0x19, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: core_status = _CORE_message_queue_Broadcast( 4000e7d0: 92 10 00 19 mov %i1, %o1 4000e7d4: 94 10 00 1a mov %i2, %o2 4000e7d8: 96 10 00 18 mov %i0, %o3 4000e7dc: 98 10 20 00 clr %o4 4000e7e0: 40 00 13 3e call 400134d8 <_CORE_message_queue_Broadcast> 4000e7e4: 90 02 20 14 add %o0, 0x14, %o0 4000e7e8: b6 10 00 08 mov %o0, %i3 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000e7ec: 03 10 00 ce sethi %hi(0x40033800), %g1 4000e7f0: c4 00 61 10 ld [ %g1 + 0x110 ], %g2 ! 40033910 <_Thread_Dispatch_disable_level> 4000e7f4: 84 00 bf ff add %g2, -1, %g2 4000e7f8: c4 20 61 10 st %g2, [ %g1 + 0x110 ] 4000e7fc: c2 00 61 10 ld [ %g1 + 0x110 ], %g1 4000e800: 80 a0 60 00 cmp %g1, 0 4000e804: 12 80 00 04 bne 4000e814 4000e808: 01 00 00 00 nop _Thread_Dispatch(); 4000e80c: 40 00 1d 8a call 40015e34 <_Thread_Dispatch> 4000e810: 01 00 00 00 nop #endif count ); _Thread_Enable_dispatch(); return 4000e814: 40 00 01 2e call 4000eccc <_Message_queue_Translate_core_message_queue_return_code> 4000e818: 90 10 00 1b mov %i3, %o0 _Message_queue_Translate_core_message_queue_return_code( core_status ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000e81c: 81 c7 e0 08 ret 4000e820: 91 e8 00 08 restore %g0, %o0, %o0 #endif count ); _Thread_Enable_dispatch(); return 4000e824: 90 10 20 09 mov 9, %o0 <== NOT EXECUTED _Message_queue_Translate_core_message_queue_return_code( core_status ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000e828: b0 10 00 08 mov %o0, %i0 4000e82c: 81 c7 e0 08 ret 4000e830: 81 e8 00 00 restore 4000e868 : uint32_t count, uint32_t max_message_size, rtems_attribute attribute_set, Objects_Id *id ) { 4000e868: 9d e3 bf 90 save %sp, -112, %sp CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) boolean is_global; #endif if ( !rtems_is_name_valid( name ) ) 4000e86c: a2 96 20 00 orcc %i0, 0, %l1 4000e870: 02 80 00 17 be 4000e8cc 4000e874: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 4000e878: 80 a7 20 00 cmp %i4, 0 4000e87c: 02 80 00 14 be 4000e8cc 4000e880: b0 10 20 09 mov 9, %i0 if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 4000e884: 80 a6 60 00 cmp %i1, 0 4000e888: 02 80 00 11 be 4000e8cc 4000e88c: b0 10 20 0a mov 0xa, %i0 return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 4000e890: 80 a6 a0 00 cmp %i2, 0 4000e894: 02 80 00 0e be 4000e8cc 4000e898: b0 10 20 08 mov 8, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000e89c: 05 10 00 ce sethi %hi(0x40033800), %g2 4000e8a0: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 40033910 <_Thread_Dispatch_disable_level> 4000e8a4: 82 00 60 01 inc %g1 4000e8a8: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate( count, max_message_size ); 4000e8ac: 90 10 00 19 mov %i1, %o0 4000e8b0: 40 00 2c f2 call 40019c78 <_Message_queue_Allocate> 4000e8b4: 92 10 00 1a mov %i2, %o1 if ( !the_message_queue ) { 4000e8b8: a0 92 20 00 orcc %o0, 0, %l0 4000e8bc: 12 80 00 06 bne 4000e8d4 4000e8c0: 80 8e e0 04 btst 4, %i3 _Thread_Enable_dispatch(); 4000e8c4: 7f ff ff dc call 4000e834 <_Thread_Enable_dispatch> 4000e8c8: b0 10 20 05 mov 5, %i0 4000e8cc: 81 c7 e0 08 ret 4000e8d0: 81 e8 00 00 restore } #endif the_message_queue->attribute_set = attribute_set; if (_Attributes_Is_priority( attribute_set ) ) 4000e8d4: 02 80 00 05 be 4000e8e8 4000e8d8: f6 24 20 10 st %i3, [ %l0 + 0x10 ] the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 4000e8dc: 82 10 20 01 mov 1, %g1 4000e8e0: 10 80 00 03 b 4000e8ec 4000e8e4: c2 27 bf f4 st %g1, [ %fp + -12 ] else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; 4000e8e8: c0 27 bf f4 clr [ %fp + -12 ] if ( ! _CORE_message_queue_Initialize( 4000e8ec: 94 10 00 19 mov %i1, %o2 4000e8f0: 96 10 00 1a mov %i2, %o3 4000e8f4: 90 04 20 14 add %l0, 0x14, %o0 4000e8f8: 40 00 13 44 call 40013608 <_CORE_message_queue_Initialize> 4000e8fc: 92 07 bf f4 add %fp, -12, %o1 4000e900: 80 a2 20 00 cmp %o0, 0 4000e904: 12 80 00 0a bne 4000e92c 4000e908: 11 10 00 d0 sethi %hi(0x40034000), %o0 RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 4000e90c: 90 12 23 00 or %o0, 0x300, %o0 ! 40034300 <_Message_queue_Information> <== NOT EXECUTED 4000e910: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4000e914: 40 00 17 fe call 4001490c <_Objects_Free> <== NOT EXECUTED 4000e918: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 4000e91c: 7f ff ff c6 call 4000e834 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000e920: 01 00 00 00 nop <== NOT EXECUTED 4000e924: 81 c7 e0 08 ret <== NOT EXECUTED 4000e928: 81 e8 00 00 restore <== NOT EXECUTED Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000e92c: 90 12 23 00 or %o0, 0x300, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 4000e930: c2 04 20 08 ld [ %l0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000e934: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 4000e938: 05 00 00 3f sethi %hi(0xfc00), %g2 4000e93c: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 4000e940: 82 08 40 02 and %g1, %g2, %g1 4000e944: 80 a0 40 03 cmp %g1, %g3 4000e948: 38 80 00 06 bgu,a 4000e960 4000e94c: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED information->local_table[ index ] = the_object; 4000e950: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 4000e954: 83 28 60 02 sll %g1, 2, %g1 4000e958: e0 20 80 01 st %l0, [ %g2 + %g1 ] &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 4000e95c: c2 04 20 08 ld [ %l0 + 8 ], %g1 if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 4000e960: e2 24 20 0c st %l1, [ %l0 + 0xc ] 4000e964: c2 27 00 00 st %g1, [ %i4 ] name, 0 ); #endif _Thread_Enable_dispatch(); 4000e968: 7f ff ff b3 call 4000e834 <_Thread_Enable_dispatch> 4000e96c: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 4000e970: 81 c7 e0 08 ret 4000e974: 81 e8 00 00 restore 40012bb0 : */ rtems_status_code rtems_message_queue_delete( Objects_Id id ) { 40012bb0: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 40012bb4: 21 10 00 a5 sethi %hi(0x40029400), %l0 40012bb8: 92 10 00 18 mov %i0, %o1 40012bbc: 94 07 bf f4 add %fp, -12, %o2 40012bc0: 7f ff e5 06 call 4000bfd8 <_Objects_Get> 40012bc4: 90 14 23 1c or %l0, 0x31c, %o0 register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 40012bc8: c2 07 bf f4 ld [ %fp + -12 ], %g1 40012bcc: 80 a0 60 00 cmp %g1, 0 40012bd0: 02 80 00 07 be 40012bec 40012bd4: b0 10 00 08 mov %o0, %i0 40012bd8: 80 a0 60 02 cmp %g1, 2 40012bdc: 08 80 00 22 bleu 40012c64 40012be0: b0 10 20 04 mov 4, %i0 40012be4: 81 c7 e0 08 ret <== NOT EXECUTED 40012be8: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40012bec: a0 14 23 1c or %l0, 0x31c, %l0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40012bf0: c2 02 20 08 ld [ %o0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40012bf4: c6 14 20 10 lduh [ %l0 + 0x10 ], %g3 40012bf8: 05 00 00 3f sethi %hi(0xfc00), %g2 40012bfc: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40012c00: 82 08 40 02 and %g1, %g2, %g1 40012c04: 80 a0 40 03 cmp %g1, %g3 40012c08: 18 80 00 05 bgu 40012c1c 40012c0c: 94 10 20 05 mov 5, %o2 information->local_table[ index ] = the_object; 40012c10: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 40012c14: 83 28 60 02 sll %g1, 2, %g1 40012c18: c0 20 80 01 clr [ %g2 + %g1 ] case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, &the_message_queue->Object ); _CORE_message_queue_Close( 40012c1c: 90 06 20 14 add %i0, 0x14, %o0 uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 40012c20: c0 26 20 0c clr [ %i0 + 0xc ] 40012c24: 40 00 01 9e call 4001329c <_CORE_message_queue_Close> 40012c28: 92 10 20 00 clr %o1 RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 40012c2c: 90 10 00 10 mov %l0, %o0 40012c30: 7f ff e4 a8 call 4000bed0 <_Objects_Free> 40012c34: 92 10 00 18 mov %i0, %o1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40012c38: 03 10 00 a3 sethi %hi(0x40028c00), %g1 40012c3c: c4 00 60 b0 ld [ %g1 + 0xb0 ], %g2 ! 40028cb0 <_Thread_Dispatch_disable_level> 40012c40: b0 10 20 00 clr %i0 40012c44: 84 00 bf ff add %g2, -1, %g2 40012c48: c4 20 60 b0 st %g2, [ %g1 + 0xb0 ] 40012c4c: c2 00 60 b0 ld [ %g1 + 0xb0 ], %g1 40012c50: 80 a0 60 00 cmp %g1, 0 40012c54: 12 80 00 04 bne 40012c64 40012c58: 01 00 00 00 nop _Thread_Dispatch(); 40012c5c: 7f ff e9 d3 call 4000d3a8 <_Thread_Dispatch> 40012c60: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40012c64: 81 c7 e0 08 ret 40012c68: 81 e8 00 00 restore 4000ea34 : rtems_status_code rtems_message_queue_flush( Objects_Id id, uint32_t *count ) { 4000ea34: 9d e3 bf 90 save %sp, -112, %sp 4000ea38: 92 10 00 18 mov %i0, %o1 register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 4000ea3c: 80 a6 60 00 cmp %i1, 0 4000ea40: 02 80 00 1c be 4000eab0 4000ea44: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 4000ea48: 11 10 00 d0 sethi %hi(0x40034000), %o0 4000ea4c: 94 07 bf f4 add %fp, -12, %o2 4000ea50: 40 00 18 05 call 40014a64 <_Objects_Get> 4000ea54: 90 12 23 00 or %o0, 0x300, %o0 return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4000ea58: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000ea5c: 80 a0 60 00 cmp %g1, 0 4000ea60: 02 80 00 06 be 4000ea78 4000ea64: 80 a0 60 02 cmp %g1, 2 4000ea68: 08 80 00 12 bleu 4000eab0 4000ea6c: b0 10 20 04 mov 4, %i0 4000ea70: 81 c7 e0 08 ret <== NOT EXECUTED 4000ea74: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: *count = _CORE_message_queue_Flush( &the_message_queue->message_queue ); 4000ea78: 40 00 12 c5 call 4001358c <_CORE_message_queue_Flush> 4000ea7c: 90 02 20 14 add %o0, 0x14, %o0 4000ea80: d0 26 40 00 st %o0, [ %i1 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000ea84: 03 10 00 ce sethi %hi(0x40033800), %g1 4000ea88: c4 00 61 10 ld [ %g1 + 0x110 ], %g2 ! 40033910 <_Thread_Dispatch_disable_level> 4000ea8c: b0 10 20 00 clr %i0 4000ea90: 84 00 bf ff add %g2, -1, %g2 4000ea94: c4 20 61 10 st %g2, [ %g1 + 0x110 ] 4000ea98: c2 00 61 10 ld [ %g1 + 0x110 ], %g1 4000ea9c: 80 a0 60 00 cmp %g1, 0 4000eaa0: 12 80 00 04 bne 4000eab0 4000eaa4: 01 00 00 00 nop _Thread_Dispatch(); 4000eaa8: 40 00 1c e3 call 40015e34 <_Thread_Dispatch> 4000eaac: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000eab0: 81 c7 e0 08 ret 4000eab4: 81 e8 00 00 restore 4000eab8 : rtems_status_code rtems_message_queue_get_number_pending( Objects_Id id, uint32_t *count ) { 4000eab8: 9d e3 bf 90 save %sp, -112, %sp 4000eabc: 92 10 00 18 mov %i0, %o1 register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 4000eac0: 80 a6 60 00 cmp %i1, 0 4000eac4: 02 80 00 1b be 4000eb30 4000eac8: b0 10 20 09 mov 9, %i0 4000eacc: 11 10 00 d0 sethi %hi(0x40034000), %o0 4000ead0: 94 07 bf f4 add %fp, -12, %o2 4000ead4: 40 00 17 e4 call 40014a64 <_Objects_Get> 4000ead8: 90 12 23 00 or %o0, 0x300, %o0 return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4000eadc: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000eae0: 80 a0 60 00 cmp %g1, 0 4000eae4: 22 80 00 07 be,a 4000eb00 4000eae8: c2 02 20 5c ld [ %o0 + 0x5c ], %g1 4000eaec: 80 a0 60 02 cmp %g1, 2 4000eaf0: 08 80 00 10 bleu 4000eb30 4000eaf4: b0 10 20 04 mov 4, %i0 4000eaf8: 81 c7 e0 08 ret <== NOT EXECUTED 4000eafc: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: *count = the_message_queue->message_queue.number_of_pending_messages; 4000eb00: c2 26 40 00 st %g1, [ %i1 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000eb04: 05 10 00 ce sethi %hi(0x40033800), %g2 4000eb08: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 40033910 <_Thread_Dispatch_disable_level> 4000eb0c: b0 10 20 00 clr %i0 4000eb10: 82 00 7f ff add %g1, -1, %g1 4000eb14: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] 4000eb18: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 4000eb1c: 80 a0 60 00 cmp %g1, 0 4000eb20: 12 80 00 04 bne 4000eb30 4000eb24: 01 00 00 00 nop _Thread_Dispatch(); 4000eb28: 40 00 1c c3 call 40015e34 <_Thread_Dispatch> 4000eb2c: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000eb30: 81 c7 e0 08 ret 4000eb34: 81 e8 00 00 restore 40012ca0 : void *buffer, size_t *size, uint32_t option_set, rtems_interval timeout ) { 40012ca0: 9d e3 bf 90 save %sp, -112, %sp register Message_queue_Control *the_message_queue; Objects_Locations location; boolean wait; if ( !buffer ) 40012ca4: 80 a6 60 00 cmp %i1, 0 40012ca8: 02 80 00 28 be 40012d48 40012cac: 92 10 00 18 mov %i0, %o1 return RTEMS_INVALID_ADDRESS; if ( !size ) 40012cb0: 80 a6 a0 00 cmp %i2, 0 40012cb4: 02 80 00 25 be 40012d48 40012cb8: 11 10 00 a5 sethi %hi(0x40029400), %o0 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 40012cbc: 94 07 bf f4 add %fp, -12, %o2 40012cc0: 7f ff e4 c6 call 4000bfd8 <_Objects_Get> 40012cc4: 90 12 23 1c or %o0, 0x31c, %o0 return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 40012cc8: c2 07 bf f4 ld [ %fp + -12 ], %g1 40012ccc: 80 a0 60 00 cmp %g1, 0 40012cd0: 22 80 00 07 be,a 40012cec 40012cd4: d2 02 20 08 ld [ %o0 + 8 ], %o1 40012cd8: 80 a0 60 02 cmp %g1, 2 40012cdc: 08 80 00 1c bleu 40012d4c 40012ce0: 90 10 20 04 mov 4, %o0 40012ce4: 10 80 00 1a b 40012d4c <== NOT EXECUTED 40012ce8: 90 10 20 19 mov 0x19, %o0 <== NOT EXECUTED 40012cec: 98 0e e0 01 and %i3, 1, %o4 if ( _Options_Is_no_wait( option_set ) ) wait = FALSE; else wait = TRUE; _CORE_message_queue_Seize( 40012cf0: 94 10 00 19 mov %i1, %o2 40012cf4: 96 10 00 1a mov %i2, %o3 40012cf8: 98 1b 20 01 xor %o4, 1, %o4 40012cfc: 9a 10 00 1c mov %i4, %o5 40012d00: 40 00 01 94 call 40013350 <_CORE_message_queue_Seize> 40012d04: 90 02 20 14 add %o0, 0x14, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40012d08: 05 10 00 a3 sethi %hi(0x40028c00), %g2 40012d0c: c2 00 a0 b0 ld [ %g2 + 0xb0 ], %g1 ! 40028cb0 <_Thread_Dispatch_disable_level> 40012d10: 82 00 7f ff add %g1, -1, %g1 40012d14: c2 20 a0 b0 st %g1, [ %g2 + 0xb0 ] 40012d18: c2 00 a0 b0 ld [ %g2 + 0xb0 ], %g1 40012d1c: 80 a0 60 00 cmp %g1, 0 40012d20: 12 80 00 05 bne 40012d34 40012d24: 03 10 00 a3 sethi %hi(0x40028c00), %g1 _Thread_Dispatch(); 40012d28: 7f ff e9 a0 call 4000d3a8 <_Thread_Dispatch> 40012d2c: 01 00 00 00 nop size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( 40012d30: 03 10 00 a3 sethi %hi(0x40028c00), %g1 40012d34: c2 00 61 8c ld [ %g1 + 0x18c ], %g1 ! 40028d8c <_Thread_Executing> 40012d38: 40 00 00 32 call 40012e00 <_Message_queue_Translate_core_message_queue_return_code> 40012d3c: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40012d40: 81 c7 e0 08 ret 40012d44: 91 e8 00 08 restore %g0, %o0, %o0 size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( 40012d48: 90 10 20 09 mov 9, %o0 <== NOT EXECUTED ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40012d4c: b0 10 00 08 mov %o0, %i0 40012d50: 81 c7 e0 08 ret 40012d54: 81 e8 00 00 restore 40012d58 : rtems_status_code rtems_message_queue_send( Objects_Id id, void *buffer, size_t size ) { 40012d58: 9d e3 bf 88 save %sp, -120, %sp register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 40012d5c: 80 a6 60 00 cmp %i1, 0 40012d60: 02 80 00 26 be 40012df8 40012d64: 90 10 20 09 mov 9, %o0 40012d68: 11 10 00 a5 sethi %hi(0x40029400), %o0 40012d6c: 92 10 00 18 mov %i0, %o1 40012d70: 90 12 23 1c or %o0, 0x31c, %o0 40012d74: 7f ff e4 99 call 4000bfd8 <_Objects_Get> 40012d78: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) 40012d7c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40012d80: 80 a0 60 00 cmp %g1, 0 40012d84: 22 80 00 07 be,a 40012da0 40012d88: 94 10 00 1a mov %i2, %o2 40012d8c: 80 a0 60 02 cmp %g1, 2 40012d90: 08 80 00 1a bleu 40012df8 40012d94: 90 10 20 04 mov 4, %o0 40012d98: 10 80 00 18 b 40012df8 <== NOT EXECUTED 40012d9c: 90 10 20 19 mov 0x19, %o0 <== NOT EXECUTED CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, boolean wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 40012da0: c0 23 a0 5c clr [ %sp + 0x5c ] 40012da4: c0 23 a0 60 clr [ %sp + 0x60 ] 40012da8: 92 10 00 19 mov %i1, %o1 40012dac: 96 10 00 18 mov %i0, %o3 40012db0: 98 10 20 00 clr %o4 40012db4: 90 02 20 14 add %o0, 0x14, %o0 40012db8: 1b 1f ff ff sethi %hi(0x7ffffc00), %o5 40012dbc: 40 00 01 b2 call 40013484 <_CORE_message_queue_Submit> 40012dc0: 9a 13 63 ff or %o5, 0x3ff, %o5 ! 7fffffff 40012dc4: b4 10 00 08 mov %o0, %i2 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40012dc8: 05 10 00 a3 sethi %hi(0x40028c00), %g2 40012dcc: c2 00 a0 b0 ld [ %g2 + 0xb0 ], %g1 ! 40028cb0 <_Thread_Dispatch_disable_level> 40012dd0: 82 00 7f ff add %g1, -1, %g1 40012dd4: c2 20 a0 b0 st %g1, [ %g2 + 0xb0 ] 40012dd8: c2 00 a0 b0 ld [ %g2 + 0xb0 ], %g1 40012ddc: 80 a0 60 00 cmp %g1, 0 40012de0: 12 80 00 04 bne 40012df0 40012de4: 01 00 00 00 nop _Thread_Dispatch(); 40012de8: 7f ff e9 70 call 4000d3a8 <_Thread_Dispatch> 40012dec: 01 00 00 00 nop /* * Since this API does not allow for blocking sends, we can directly * return the returned status. */ return _Message_queue_Translate_core_message_queue_return_code(status); 40012df0: 40 00 00 04 call 40012e00 <_Message_queue_Translate_core_message_queue_return_code> 40012df4: 90 10 00 1a mov %i2, %o0 } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40012df8: 81 c7 e0 08 ret 40012dfc: 91 e8 00 08 restore %g0, %o0, %o0 400082cc : rtems_status_code rtems_message_queue_urgent( Objects_Id id, void *buffer, size_t size ) { 400082cc: 9d e3 bf 88 save %sp, -120, %sp register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 400082d0: 80 a6 60 00 cmp %i1, 0 400082d4: 02 80 00 25 be 40008368 400082d8: 90 10 20 09 mov 9, %o0 400082dc: 11 10 00 89 sethi %hi(0x40022400), %o0 400082e0: 92 10 00 18 mov %i0, %o1 400082e4: 90 12 23 08 or %o0, 0x308, %o0 400082e8: 40 00 0a 05 call 4000aafc <_Objects_Get> 400082ec: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) 400082f0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400082f4: 80 a0 60 00 cmp %g1, 0 400082f8: 22 80 00 07 be,a 40008314 400082fc: 94 10 00 1a mov %i2, %o2 40008300: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40008304: 08 80 00 19 bleu 40008368 <== NOT EXECUTED 40008308: 90 10 20 04 mov 4, %o0 <== NOT EXECUTED 4000830c: 10 80 00 17 b 40008368 <== NOT EXECUTED 40008310: 90 10 20 19 mov 0x19, %o0 <== NOT EXECUTED CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, boolean wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 40008314: c0 23 a0 5c clr [ %sp + 0x5c ] 40008318: c0 23 a0 60 clr [ %sp + 0x60 ] 4000831c: 92 10 00 19 mov %i1, %o1 40008320: 96 10 00 18 mov %i0, %o3 40008324: 98 10 20 00 clr %o4 40008328: 1b 20 00 00 sethi %hi(0x80000000), %o5 4000832c: 40 00 05 ef call 40009ae8 <_CORE_message_queue_Submit> 40008330: 90 02 20 14 add %o0, 0x14, %o0 40008334: b4 10 00 08 mov %o0, %i2 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008338: 03 10 00 87 sethi %hi(0x40021c00), %g1 4000833c: c4 00 61 20 ld [ %g1 + 0x120 ], %g2 ! 40021d20 <_Thread_Dispatch_disable_level> 40008340: 84 00 bf ff add %g2, -1, %g2 40008344: c4 20 61 20 st %g2, [ %g1 + 0x120 ] 40008348: c2 00 61 20 ld [ %g1 + 0x120 ], %g1 4000834c: 80 a0 60 00 cmp %g1, 0 40008350: 12 80 00 04 bne 40008360 40008354: 01 00 00 00 nop _Thread_Dispatch(); 40008358: 40 00 0e dd call 4000becc <_Thread_Dispatch> 4000835c: 01 00 00 00 nop /* * Since this API does not allow for blocking sends, we can directly * return the returned status. */ return _Message_queue_Translate_core_message_queue_return_code(status); 40008360: 7f ff ff d1 call 400082a4 <_Message_queue_Translate_core_message_queue_return_code> 40008364: 90 10 00 1a mov %i2, %o0 } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40008368: 81 c7 e0 08 ret 4000836c: 91 e8 00 08 restore %g0, %o0, %o0 4000615c : void rtems_panic( const char *printf_format, ... ) { 4000615c: 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); 40006160: 11 08 00 00 sethi %hi(0x20000000), %o0 <== NOT EXECUTED ... ) { va_list arglist; va_start(arglist, printf_format); 40006164: 94 07 a0 48 add %fp, 0x48, %o2 <== NOT EXECUTED void rtems_panic( const char *printf_format, ... ) { 40006168: f2 27 a0 48 st %i1, [ %fp + 0x48 ] <== NOT EXECUTED 4000616c: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 40006170: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 40006174: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 40006178: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 4000617c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40006180: 7f ff ff 8b call 40005fac <== NOT EXECUTED 40006184: d4 27 bf f4 st %o2, [ %fp + -12 ] <== NOT EXECUTED va_end(arglist); } 40006188: 81 c7 e0 08 ret <== NOT EXECUTED 4000618c: 81 e8 00 00 restore <== NOT EXECUTED 4000ed28 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, Objects_Id *id ) { 4000ed28: 9d e3 bf 98 save %sp, -104, %sp register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 4000ed2c: a6 96 20 00 orcc %i0, 0, %l3 4000ed30: 02 80 00 1e be 4000eda8 4000ed34: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !starting_address ) 4000ed38: 80 a6 60 00 cmp %i1, 0 4000ed3c: 02 80 00 3d be 4000ee30 4000ed40: 80 a7 60 00 cmp %i5, 0 return RTEMS_INVALID_ADDRESS; if ( !id ) 4000ed44: 02 80 00 3b be 4000ee30 4000ed48: 80 a6 a0 00 cmp %i2, 0 return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 4000ed4c: 22 80 00 17 be,a 4000eda8 4000ed50: b0 10 20 08 mov 8, %i0 4000ed54: 80 a6 e0 00 cmp %i3, 0 4000ed58: 22 80 00 14 be,a 4000eda8 4000ed5c: b0 10 20 08 mov 8, %i0 4000ed60: 80 a6 80 1b cmp %i2, %i3 4000ed64: 0a 80 00 35 bcs 4000ee38 4000ed68: 80 8e e0 07 btst 7, %i3 4000ed6c: 12 80 00 33 bne 4000ee38 4000ed70: 80 8e 60 07 btst 7, %i1 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 4000ed74: 12 80 00 2f bne 4000ee30 4000ed78: 05 10 00 ce sethi %hi(0x40033800), %g2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000ed7c: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 40033910 <_Thread_Dispatch_disable_level> 4000ed80: 82 00 60 01 inc %g1 4000ed84: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] * the inactive chain of free partition control blocks. */ RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void ) { return (Partition_Control *) _Objects_Allocate( &_Partition_Information ); 4000ed88: 25 10 00 cd sethi %hi(0x40033400), %l2 4000ed8c: 40 00 15 de call 40014504 <_Objects_Allocate> 4000ed90: 90 14 a2 90 or %l2, 0x290, %o0 ! 40033690 <_Partition_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 4000ed94: a2 92 20 00 orcc %o0, 0, %l1 4000ed98: 12 80 00 06 bne 4000edb0 4000ed9c: 92 10 00 1b mov %i3, %o1 _Thread_Enable_dispatch(); 4000eda0: 7f ff ff d5 call 4000ecf4 <_Thread_Enable_dispatch> 4000eda4: b0 10 20 05 mov 5, %i0 4000eda8: 81 c7 e0 08 ret 4000edac: 81 e8 00 00 restore #endif the_partition->starting_address = starting_address; the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; 4000edb0: f8 24 60 1c st %i4, [ %l1 + 0x1c ] _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 4000edb4: f2 24 60 10 st %i1, [ %l1 + 0x10 ] the_partition->length = length; 4000edb8: f4 24 60 14 st %i2, [ %l1 + 0x14 ] the_partition->buffer_size = buffer_size; 4000edbc: f6 24 60 18 st %i3, [ %l1 + 0x18 ] the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; 4000edc0: c0 24 60 20 clr [ %l1 + 0x20 ] _Chain_Initialize( &the_partition->Memory, starting_address, 4000edc4: 40 00 55 a0 call 40024444 <.udiv> 4000edc8: 90 10 00 1a mov %i2, %o0 4000edcc: a0 04 60 24 add %l1, 0x24, %l0 4000edd0: 94 10 00 08 mov %o0, %o2 4000edd4: 92 10 00 19 mov %i1, %o1 4000edd8: 90 10 00 10 mov %l0, %o0 4000eddc: 40 00 11 b1 call 400134a0 <_Chain_Initialize> 4000ede0: 96 10 00 1b mov %i3, %o3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000ede4: 90 14 a2 90 or %l2, 0x290, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 4000ede8: c4 04 60 08 ld [ %l1 + 8 ], %g2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000edec: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 4000edf0: 03 00 00 3f sethi %hi(0xfc00), %g1 4000edf4: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000edf8: 82 08 80 01 and %g2, %g1, %g1 4000edfc: 80 a0 40 03 cmp %g1, %g3 4000ee00: 38 80 00 06 bgu,a 4000ee18 4000ee04: c2 04 60 08 ld [ %l1 + 8 ], %g1 <== NOT EXECUTED information->local_table[ index ] = the_object; 4000ee08: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 4000ee0c: 83 28 60 02 sll %g1, 2, %g1 4000ee10: e2 20 80 01 st %l1, [ %g2 + %g1 ] &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 4000ee14: c2 04 60 08 ld [ %l1 + 8 ], %g1 if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 4000ee18: e6 24 60 0c st %l3, [ %l1 + 0xc ] 4000ee1c: c2 27 40 00 st %g1, [ %i5 ] name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 4000ee20: 7f ff ff b5 call 4000ecf4 <_Thread_Enable_dispatch> 4000ee24: b0 10 20 00 clr %i0 4000ee28: 81 c7 e0 08 ret 4000ee2c: 81 e8 00 00 restore return RTEMS_SUCCESSFUL; 4000ee30: 81 c7 e0 08 ret 4000ee34: 91 e8 20 09 restore %g0, 9, %o0 4000ee38: b0 10 20 08 mov 8, %i0 } 4000ee3c: 81 c7 e0 08 ret 4000ee40: 81 e8 00 00 restore 4000ee78 : */ rtems_status_code rtems_partition_delete( Objects_Id id ) { 4000ee78: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 4000ee7c: 92 10 00 18 mov %i0, %o1 4000ee80: 94 07 bf f4 add %fp, -12, %o2 4000ee84: 31 10 00 cd sethi %hi(0x40033400), %i0 4000ee88: 40 00 16 f7 call 40014a64 <_Objects_Get> 4000ee8c: 90 16 22 90 or %i0, 0x290, %o0 ! 40033690 <_Partition_Information> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 4000ee90: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000ee94: 80 a0 60 00 cmp %g1, 0 4000ee98: 02 80 00 07 be 4000eeb4 4000ee9c: 88 10 00 08 mov %o0, %g4 4000eea0: 80 a0 60 02 cmp %g1, 2 4000eea4: 08 80 00 18 bleu 4000ef04 4000eea8: b0 10 20 04 mov 4, %i0 4000eeac: 81 c7 e0 08 ret <== NOT EXECUTED 4000eeb0: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { 4000eeb4: c2 02 20 20 ld [ %o0 + 0x20 ], %g1 4000eeb8: 80 a0 60 00 cmp %g1, 0 4000eebc: 12 80 00 14 bne 4000ef0c 4000eec0: 90 16 22 90 or %i0, 0x290, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 4000eec4: c2 01 20 08 ld [ %g4 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000eec8: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 4000eecc: 05 00 00 3f sethi %hi(0xfc00), %g2 4000eed0: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 4000eed4: 82 08 40 02 and %g1, %g2, %g1 4000eed8: 80 a0 40 03 cmp %g1, %g3 4000eedc: 18 80 00 05 bgu 4000eef0 4000eee0: 92 10 00 04 mov %g4, %o1 information->local_table[ index ] = the_object; 4000eee4: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 4000eee8: 83 28 60 02 sll %g1, 2, %g1 4000eeec: c0 20 80 01 clr [ %g2 + %g1 ] uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 4000eef0: c0 21 20 0c clr [ %g4 + 0xc ] RTEMS_INLINE_ROUTINE void _Partition_Free ( Partition_Control *the_partition ) { _Objects_Free( &_Partition_Information, &the_partition->Object ); 4000eef4: 40 00 16 86 call 4001490c <_Objects_Free> 4000eef8: b0 10 20 00 clr %i0 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 4000eefc: 7f ff ff d2 call 4000ee44 <_Thread_Enable_dispatch> 4000ef00: 01 00 00 00 nop 4000ef04: 81 c7 e0 08 ret 4000ef08: 81 e8 00 00 restore return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 4000ef0c: 7f ff ff ce call 4000ee44 <_Thread_Enable_dispatch> 4000ef10: b0 10 20 0c mov 0xc, %i0 return RTEMS_RESOURCE_IN_USE; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000ef14: 81 c7 e0 08 ret 4000ef18: 81 e8 00 00 restore 4000ef50 : rtems_status_code rtems_partition_get_buffer( Objects_Id id, void **buffer ) { 4000ef50: 9d e3 bf 90 save %sp, -112, %sp 4000ef54: 92 10 00 18 mov %i0, %o1 register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 4000ef58: 80 a6 60 00 cmp %i1, 0 4000ef5c: 02 80 00 1a be 4000efc4 4000ef60: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 4000ef64: 11 10 00 cd sethi %hi(0x40033400), %o0 4000ef68: 94 07 bf f4 add %fp, -12, %o2 4000ef6c: 40 00 16 be call 40014a64 <_Objects_Get> 4000ef70: 90 12 22 90 or %o0, 0x290, %o0 return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 4000ef74: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000ef78: 80 a0 60 00 cmp %g1, 0 4000ef7c: 02 80 00 07 be 4000ef98 4000ef80: b0 10 00 08 mov %o0, %i0 4000ef84: 80 a0 60 02 cmp %g1, 2 4000ef88: 08 80 00 0f bleu 4000efc4 4000ef8c: b0 10 20 04 mov 4, %i0 4000ef90: 81 c7 e0 08 ret <== NOT EXECUTED 4000ef94: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 4000ef98: 40 00 11 32 call 40013460 <_Chain_Get> 4000ef9c: 90 02 20 24 add %o0, 0x24, %o0 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 4000efa0: a0 92 20 00 orcc %o0, 0, %l0 4000efa4: 02 80 00 0a be 4000efcc 4000efa8: 01 00 00 00 nop the_partition->number_of_used_blocks += 1; 4000efac: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 4000efb0: 82 00 60 01 inc %g1 4000efb4: c2 26 20 20 st %g1, [ %i0 + 0x20 ] _Thread_Enable_dispatch(); 4000efb8: 7f ff ff d9 call 4000ef1c <_Thread_Enable_dispatch> 4000efbc: b0 10 20 00 clr %i0 *buffer = the_buffer; 4000efc0: e0 26 40 00 st %l0, [ %i1 ] 4000efc4: 81 c7 e0 08 ret 4000efc8: 81 e8 00 00 restore return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 4000efcc: 7f ff ff d4 call 4000ef1c <_Thread_Enable_dispatch> 4000efd0: b0 10 20 0d mov 0xd, %i0 return RTEMS_UNSATISFIED; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000efd4: 81 c7 e0 08 ret 4000efd8: 81 e8 00 00 restore 4000f044 : rtems_status_code rtems_partition_return_buffer( Objects_Id id, void *buffer ) { 4000f044: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 4000f048: 11 10 00 cd sethi %hi(0x40033400), %o0 4000f04c: 92 10 00 18 mov %i0, %o1 4000f050: 90 12 22 90 or %o0, 0x290, %o0 4000f054: 40 00 16 84 call 40014a64 <_Objects_Get> 4000f058: 94 07 bf f4 add %fp, -12, %o2 register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 4000f05c: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000f060: 80 a0 60 00 cmp %g1, 0 4000f064: 02 80 00 07 be 4000f080 4000f068: b0 10 00 08 mov %o0, %i0 4000f06c: 80 a0 60 02 cmp %g1, 2 4000f070: 08 80 00 1a bleu 4000f0d8 4000f074: b0 10 20 04 mov 4, %i0 4000f078: 81 c7 e0 08 ret <== NOT EXECUTED 4000f07c: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED ) { void *starting; void *ending; starting = the_partition->starting_address; 4000f080: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 ending = _Addresses_Add_offset( starting, the_partition->length ); return ( 4000f084: 80 a6 40 02 cmp %i1, %g2 4000f088: 0a 80 00 16 bcs 4000f0e0 4000f08c: 01 00 00 00 nop 4000f090: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 4000f094: 82 00 80 01 add %g2, %g1, %g1 4000f098: 80 a6 40 01 cmp %i1, %g1 4000f09c: 18 80 00 11 bgu 4000f0e0 4000f0a0: 01 00 00 00 nop 4000f0a4: d2 02 20 18 ld [ %o0 + 0x18 ], %o1 4000f0a8: 40 00 55 93 call 400246f4 <.urem> 4000f0ac: 90 26 40 02 sub %i1, %g2, %o0 4000f0b0: 80 a2 20 00 cmp %o0, 0 4000f0b4: 12 80 00 0b bne 4000f0e0 4000f0b8: 90 06 20 24 add %i0, 0x24, %o0 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 4000f0bc: 40 00 10 dd call 40013430 <_Chain_Append> 4000f0c0: 92 10 00 19 mov %i1, %o1 return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; 4000f0c4: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 4000f0c8: 82 00 7f ff add %g1, -1, %g1 4000f0cc: c2 26 20 20 st %g1, [ %i0 + 0x20 ] _Thread_Enable_dispatch(); 4000f0d0: 7f ff ff d0 call 4000f010 <_Thread_Enable_dispatch> 4000f0d4: b0 10 20 00 clr %i0 4000f0d8: 81 c7 e0 08 ret 4000f0dc: 81 e8 00 00 restore return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 4000f0e0: 7f ff ff cc call 4000f010 <_Thread_Enable_dispatch> 4000f0e4: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000f0e8: 81 c7 e0 08 ret 4000f0ec: 81 e8 00 00 restore 4000deec : void *internal_start, void *external_start, uint32_t length, Objects_Id *id ) { 4000deec: 9d e3 bf 98 save %sp, -104, %sp register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name) ) 4000def0: a2 96 20 00 orcc %i0, 0, %l1 4000def4: 02 80 00 15 be 4000df48 4000def8: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 4000defc: 80 a7 20 00 cmp %i4, 0 4000df00: 02 80 00 29 be 4000dfa4 4000df04: 80 8e 60 07 btst 7, %i1 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 4000df08: 12 80 00 27 bne 4000dfa4 4000df0c: 80 8e a0 07 btst 7, %i2 4000df10: 32 80 00 0e bne,a 4000df48 4000df14: b0 10 20 09 mov 9, %i0 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000df18: 05 10 00 ce sethi %hi(0x40033800), %g2 4000df1c: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 40033910 <_Thread_Dispatch_disable_level> 4000df20: 82 00 60 01 inc %g1 4000df24: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) 4000df28: 21 10 00 cd sethi %hi(0x40033400), %l0 4000df2c: 40 00 19 76 call 40014504 <_Objects_Allocate> 4000df30: 90 14 22 44 or %l0, 0x244, %o0 ! 40033644 <_Dual_ported_memory_Information> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 4000df34: 80 a2 20 00 cmp %o0, 0 4000df38: 12 80 00 06 bne 4000df50 4000df3c: 88 14 22 44 or %l0, 0x244, %g4 _Thread_Enable_dispatch(); 4000df40: 7f ff ff de call 4000deb8 <_Thread_Enable_dispatch> 4000df44: b0 10 20 05 mov 5, %i0 4000df48: 81 c7 e0 08 ret 4000df4c: 81 e8 00 00 restore ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 4000df50: c4 02 20 08 ld [ %o0 + 8 ], %g2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000df54: c6 11 20 10 lduh [ %g4 + 0x10 ], %g3 return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; the_port->external_base = external_start; the_port->length = length - 1; 4000df58: 82 06 ff ff add %i3, -1, %g1 if ( !the_port ) { _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 4000df5c: f2 22 20 10 st %i1, [ %o0 + 0x10 ] the_port->external_base = external_start; the_port->length = length - 1; 4000df60: c2 22 20 18 st %g1, [ %o0 + 0x18 ] 4000df64: 03 00 00 3f sethi %hi(0xfc00), %g1 4000df68: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000df6c: 82 08 80 01 and %g2, %g1, %g1 4000df70: 80 a0 40 03 cmp %g1, %g3 4000df74: 18 80 00 05 bgu 4000df88 4000df78: f4 22 20 14 st %i2, [ %o0 + 0x14 ] information->local_table[ index ] = the_object; 4000df7c: c4 01 20 20 ld [ %g4 + 0x20 ], %g2 4000df80: 83 28 60 02 sll %g1, 2, %g1 4000df84: d0 20 80 01 st %o0, [ %g2 + %g1 ] &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 4000df88: c2 02 20 08 ld [ %o0 + 8 ], %g1 if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 4000df8c: e2 22 20 0c st %l1, [ %o0 + 0xc ] 4000df90: c2 27 00 00 st %g1, [ %i4 ] _Thread_Enable_dispatch(); 4000df94: 7f ff ff c9 call 4000deb8 <_Thread_Enable_dispatch> 4000df98: b0 10 20 00 clr %i0 4000df9c: 81 c7 e0 08 ret 4000dfa0: 81 e8 00 00 restore return RTEMS_SUCCESSFUL; 4000dfa4: b0 10 20 09 mov 9, %i0 } 4000dfa8: 81 c7 e0 08 ret 4000dfac: 81 e8 00 00 restore 400063f4 : rtems_status_code rtems_rate_monotonic_create( rtems_name name, Objects_Id *id ) { 400063f4: 9d e3 bf 98 save %sp, -104, %sp Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 400063f8: a4 96 20 00 orcc %i0, 0, %l2 400063fc: 02 80 00 11 be 40006440 40006400: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 40006404: 80 a6 60 00 cmp %i1, 0 40006408: 02 80 00 0e be 40006440 4000640c: b0 10 20 09 mov 9, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006410: 05 10 00 7b sethi %hi(0x4001ec00), %g2 40006414: c2 00 a0 00 ld [ %g2 ], %g1 40006418: 82 00 60 01 inc %g1 4000641c: c2 20 a0 00 st %g1, [ %g2 ] * the inactive chain of free period control blocks. */ RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void ) { return (Rate_monotonic_Control *) 40006420: 23 10 00 7a sethi %hi(0x4001e800), %l1 40006424: 40 00 09 df call 40008ba0 <_Objects_Allocate> 40006428: 90 14 62 68 or %l1, 0x268, %o0 ! 4001ea68 <_Rate_monotonic_Information> _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 4000642c: a0 92 20 00 orcc %o0, 0, %l0 40006430: 12 80 00 06 bne 40006448 40006434: 03 10 00 7b sethi %hi(0x4001ec00), %g1 _Thread_Enable_dispatch(); 40006438: 7f ff ff e2 call 400063c0 <_Thread_Enable_dispatch> 4000643c: b0 10 20 05 mov 5, %i0 40006440: 81 c7 e0 08 ret 40006444: 81 e8 00 00 restore return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; 40006448: c2 00 60 dc ld [ %g1 + 0xdc ], %g1 the_period->state = RATE_MONOTONIC_INACTIVE; 4000644c: c0 24 20 38 clr [ %l0 + 0x38 ] if ( !the_period ) { _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; 40006450: c2 24 20 50 st %g1, [ %l0 + 0x50 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40006454: c0 24 20 18 clr [ %l0 + 0x18 ] the_watchdog->routine = routine; 40006458: c0 24 20 2c clr [ %l0 + 0x2c ] the_watchdog->id = id; 4000645c: c0 24 20 30 clr [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 40006460: c0 24 20 34 clr [ %l0 + 0x34 ] the_period->state = RATE_MONOTONIC_INACTIVE; _Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL ); _Rate_monotonic_Reset_statistics( the_period ); 40006464: 90 04 20 54 add %l0, 0x54, %o0 40006468: 92 10 20 00 clr %o1 4000646c: 40 00 28 30 call 4001052c 40006470: 94 10 20 38 mov 0x38, %o2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006474: 90 14 62 68 or %l1, 0x268, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 40006478: c4 04 20 08 ld [ %l0 + 8 ], %g2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000647c: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 40006480: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 40006484: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 40006488: c2 24 20 78 st %g1, [ %l0 + 0x78 ] 4000648c: c2 24 20 5c st %g1, [ %l0 + 0x5c ] 40006490: c2 24 20 60 st %g1, [ %l0 + 0x60 ] 40006494: c2 24 20 74 st %g1, [ %l0 + 0x74 ] 40006498: 03 00 00 3f sethi %hi(0xfc00), %g1 4000649c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400064a0: 82 08 80 01 and %g2, %g1, %g1 400064a4: 80 a0 40 03 cmp %g1, %g3 400064a8: 38 80 00 06 bgu,a 400064c0 400064ac: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED information->local_table[ index ] = the_object; 400064b0: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 400064b4: 83 28 60 02 sll %g1, 2, %g1 400064b8: e0 20 80 01 st %l0, [ %g2 + %g1 ] &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 400064bc: c2 04 20 08 ld [ %l0 + 8 ], %g1 if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 400064c0: e4 24 20 0c st %l2, [ %l0 + 0xc ] 400064c4: c2 26 40 00 st %g1, [ %i1 ] _Thread_Enable_dispatch(); 400064c8: 7f ff ff be call 400063c0 <_Thread_Enable_dispatch> 400064cc: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 400064d0: 81 c7 e0 08 ret 400064d4: 81 e8 00 00 restore 4000f2c0 : */ rtems_status_code rtems_rate_monotonic_delete( Objects_Id id ) { 4000f2c0: 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 *) 4000f2c4: 21 10 00 cd sethi %hi(0x40033400), %l0 4000f2c8: 92 10 00 18 mov %i0, %o1 4000f2cc: 94 07 bf f4 add %fp, -12, %o2 4000f2d0: 40 00 15 e5 call 40014a64 <_Objects_Get> 4000f2d4: 90 14 22 dc or %l0, 0x2dc, %o0 Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 4000f2d8: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000f2dc: 80 a0 60 00 cmp %g1, 0 4000f2e0: 02 80 00 08 be 4000f300 4000f2e4: b0 10 00 08 mov %o0, %i0 4000f2e8: 82 18 60 02 xor %g1, 2, %g1 4000f2ec: 80 a0 00 01 cmp %g0, %g1 4000f2f0: 82 60 20 00 subx %g0, 0, %g1 4000f2f4: b0 08 60 15 and %g1, 0x15, %i0 4000f2f8: 81 c7 e0 08 ret 4000f2fc: 91 ee 20 04 restore %i0, 4, %o0 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000f300: a0 14 22 dc or %l0, 0x2dc, %l0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 4000f304: c2 02 20 08 ld [ %o0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000f308: c6 14 20 10 lduh [ %l0 + 0x10 ], %g3 4000f30c: 05 00 00 3f sethi %hi(0xfc00), %g2 4000f310: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 4000f314: 82 08 40 02 and %g1, %g2, %g1 4000f318: 80 a0 40 03 cmp %g1, %g3 4000f31c: 38 80 00 06 bgu,a 4000f334 4000f320: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 4000f324: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 4000f328: 83 28 60 02 sll %g1, 2, %g1 4000f32c: c0 20 80 01 clr [ %g2 + %g1 ] uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 4000f330: c0 26 20 0c clr [ %i0 + 0xc ] case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: _Objects_Close( &_Rate_monotonic_Information, &the_period->Object ); (void) _Watchdog_Remove( &the_period->Timer ); 4000f334: 40 00 21 12 call 4001777c <_Watchdog_Remove> 4000f338: 90 06 20 10 add %i0, 0x10, %o0 RTEMS_INLINE_ROUTINE void _Rate_monotonic_Free ( Rate_monotonic_Control *the_period ) { _Objects_Free( &_Rate_monotonic_Information, &the_period->Object ); 4000f33c: 90 10 00 10 mov %l0, %o0 the_period->state = RATE_MONOTONIC_INACTIVE; 4000f340: c0 26 20 38 clr [ %i0 + 0x38 ] 4000f344: 40 00 15 72 call 4001490c <_Objects_Free> 4000f348: 92 10 00 18 mov %i0, %o1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000f34c: 03 10 00 ce sethi %hi(0x40033800), %g1 4000f350: c4 00 61 10 ld [ %g1 + 0x110 ], %g2 ! 40033910 <_Thread_Dispatch_disable_level> 4000f354: b0 10 20 00 clr %i0 4000f358: 84 00 bf ff add %g2, -1, %g2 4000f35c: c4 20 61 10 st %g2, [ %g1 + 0x110 ] 4000f360: c2 00 61 10 ld [ %g1 + 0x110 ], %g1 4000f364: 80 a0 60 00 cmp %g1, 0 4000f368: 12 80 00 04 bne 4000f378 4000f36c: 01 00 00 00 nop _Thread_Dispatch(); 4000f370: 40 00 1a b1 call 40015e34 <_Thread_Dispatch> 4000f374: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000f378: 81 c7 e0 08 ret 4000f37c: 81 e8 00 00 restore 4000e1e4 : rtems_status_code rtems_rate_monotonic_get_status( Objects_Id id, rtems_rate_monotonic_period_status *status ) { 4000e1e4: 9d e3 bf 88 save %sp, -120, %sp 4000e1e8: 92 10 00 18 mov %i0, %o1 Objects_Locations location; Rate_monotonic_Control *the_period; if ( !status ) 4000e1ec: 80 a6 60 00 cmp %i1, 0 4000e1f0: 02 80 00 36 be 4000e2c8 4000e1f4: b0 10 20 09 mov 9, %i0 4000e1f8: 11 10 00 7a sethi %hi(0x4001e800), %o0 4000e1fc: 94 07 bf f4 add %fp, -12, %o2 4000e200: 7f ff eb f5 call 400091d4 <_Objects_Get> 4000e204: 90 12 22 68 or %o0, 0x268, %o0 return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 4000e208: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000e20c: 80 a0 60 00 cmp %g1, 0 4000e210: 02 80 00 08 be 4000e230 4000e214: b0 10 00 08 mov %o0, %i0 4000e218: 82 18 60 02 xor %g1, 2, %g1 <== NOT EXECUTED 4000e21c: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 4000e220: 82 60 20 00 subx %g0, 0, %g1 <== NOT EXECUTED 4000e224: b0 08 60 15 and %g1, 0x15, %i0 <== NOT EXECUTED 4000e228: 81 c7 e0 08 ret <== NOT EXECUTED 4000e22c: 91 ee 20 04 restore %i0, 4, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); 4000e230: c2 02 20 50 ld [ %o0 + 0x50 ], %g1 4000e234: 80 a0 60 00 cmp %g1, 0 4000e238: 02 80 00 03 be 4000e244 4000e23c: 84 10 20 00 clr %g2 4000e240: c4 00 60 08 ld [ %g1 + 8 ], %g2 status->state = the_period->state; 4000e244: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); 4000e248: c4 26 40 00 st %g2, [ %i1 ] status->state = the_period->state; if ( status->state == RATE_MONOTONIC_INACTIVE ) { 4000e24c: 80 a0 60 00 cmp %g1, 0 4000e250: 12 80 00 07 bne 4000e26c 4000e254: c2 26 60 04 st %g1, [ %i1 + 4 ] #else status->ticks_since_last_period = 0; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS status->executed_since_last_period.tv_sec = 0; status->executed_since_last_period.tv_nsec = 0; 4000e258: c0 26 60 14 clr [ %i1 + 0x14 ] <== NOT EXECUTED status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); status->state = the_period->state; if ( status->state == RATE_MONOTONIC_INACTIVE ) { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS status->since_last_period.tv_sec = 0; 4000e25c: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED status->since_last_period.tv_nsec = 0; 4000e260: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED #else status->ticks_since_last_period = 0; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS status->executed_since_last_period.tv_sec = 0; 4000e264: 10 80 00 0e b 4000e29c <== NOT EXECUTED 4000e268: c0 26 60 10 clr [ %i1 + 0x10 ] <== NOT EXECUTED * This lets them share one single invocation of _TOD_Get_uptime(). */ #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \ defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) struct timespec uptime; _TOD_Get_uptime( &uptime ); 4000e26c: a0 07 bf ec add %fp, -20, %l0 4000e270: 7f ff e8 aa call 40008518 <_TOD_Get_uptime> 4000e274: 90 10 00 10 mov %l0, %o0 #endif #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS _Timespec_Subtract( 4000e278: 90 06 20 44 add %i0, 0x44, %o0 4000e27c: 92 10 00 10 mov %l0, %o1 4000e280: 7f ff f5 4b call 4000b7ac <_Timespec_Subtract> 4000e284: 94 06 60 08 add %i1, 8, %o2 status->ticks_since_last_period = _Watchdog_Ticks_since_boot - the_period->time_at_period; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS _Timespec_Subtract( 4000e288: 11 10 00 7b sethi %hi(0x4001ec00), %o0 4000e28c: 92 10 00 10 mov %l0, %o1 4000e290: 94 06 60 10 add %i1, 0x10, %o2 4000e294: 7f ff f5 46 call 4000b7ac <_Timespec_Subtract> 4000e298: 90 12 20 e4 or %o0, 0xe4, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000e29c: 03 10 00 7b sethi %hi(0x4001ec00), %g1 4000e2a0: c4 00 60 00 ld [ %g1 ], %g2 4000e2a4: b0 10 20 00 clr %i0 4000e2a8: 84 00 bf ff add %g2, -1, %g2 4000e2ac: c4 20 60 00 st %g2, [ %g1 ] 4000e2b0: c2 00 60 00 ld [ %g1 ], %g1 4000e2b4: 80 a0 60 00 cmp %g1, 0 4000e2b8: 12 80 00 04 bne 4000e2c8 4000e2bc: 01 00 00 00 nop _Thread_Dispatch(); 4000e2c0: 7f ff f0 b9 call 4000a5a4 <_Thread_Dispatch> 4000e2c4: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000e2c8: 81 c7 e0 08 ret 4000e2cc: 81 e8 00 00 restore 400066e0 : rtems_status_code rtems_rate_monotonic_period( Objects_Id id, rtems_interval length ) { 400066e0: 9d e3 bf 80 save %sp, -128, %sp RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 400066e4: 11 10 00 7a sethi %hi(0x4001e800), %o0 400066e8: 92 10 00 18 mov %i0, %o1 400066ec: 90 12 22 68 or %o0, 0x268, %o0 400066f0: 40 00 0a b9 call 400091d4 <_Objects_Get> 400066f4: 94 07 bf f4 add %fp, -12, %o2 rtems_status_code return_value; rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 400066f8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400066fc: 80 a0 60 00 cmp %g1, 0 40006700: 02 80 00 07 be 4000671c 40006704: a2 10 00 08 mov %o0, %l1 40006708: 80 a0 60 02 cmp %g1, 2 4000670c: 02 80 00 0c be 4000673c 40006710: b0 10 20 04 mov 4, %i0 the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; 40006714: 81 c7 e0 08 ret <== NOT EXECUTED 40006718: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 4000671c: 27 10 00 7b sethi %hi(0x4001ec00), %l3 40006720: c4 02 20 50 ld [ %o0 + 0x50 ], %g2 40006724: c2 04 e0 dc ld [ %l3 + 0xdc ], %g1 40006728: 80 a0 80 01 cmp %g2, %g1 4000672c: 02 80 00 06 be 40006744 40006730: 80 a6 60 00 cmp %i1, 0 _Thread_Enable_dispatch(); 40006734: 7f ff ff 7f call 40006530 <_Thread_Enable_dispatch> 40006738: b0 10 20 17 mov 0x17, %i0 4000673c: 81 c7 e0 08 ret 40006740: 81 e8 00 00 restore return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 40006744: 12 80 00 11 bne 40006788 40006748: 01 00 00 00 nop switch ( the_period->state ) { 4000674c: d0 02 20 38 ld [ %o0 + 0x38 ], %o0 40006750: 80 a2 20 02 cmp %o0, 2 40006754: 02 80 00 09 be 40006778 40006758: b0 10 20 00 clr %i0 4000675c: 80 a2 20 04 cmp %o0, 4 40006760: 02 80 00 06 be 40006778 40006764: b0 10 20 06 mov 6, %i0 40006768: 80 a2 20 00 cmp %o0, 0 4000676c: 02 80 00 03 be 40006778 40006770: b0 10 20 0b mov 0xb, %i0 40006774: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED break; default: /* unreached -- only to remove warnings */ return_value = RTEMS_INTERNAL_ERROR; break; } _Thread_Enable_dispatch(); 40006778: 7f ff ff 6e call 40006530 <_Thread_Enable_dispatch> 4000677c: 01 00 00 00 nop 40006780: 81 c7 e0 08 ret 40006784: 81 e8 00 00 restore return( return_value ); } _ISR_Disable( level ); 40006788: 7f ff f0 56 call 400028e0 4000678c: 01 00 00 00 nop 40006790: a0 10 00 08 mov %o0, %l0 switch ( the_period->state ) { 40006794: e4 04 60 38 ld [ %l1 + 0x38 ], %l2 40006798: 80 a4 a0 02 cmp %l2, 2 4000679c: 02 80 00 29 be 40006840 400067a0: 80 a4 a0 04 cmp %l2, 4 400067a4: 02 80 00 43 be 400068b0 400067a8: 80 a4 a0 00 cmp %l2, 0 400067ac: 32 bf ff e4 bne,a 4000673c 400067b0: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED /* * No need to update statistics -- there are not a period active */ _ISR_Enable( level ); 400067b4: 7f ff f0 4f call 400028f0 400067b8: a0 07 bf ec add %fp, -20, %l0 #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \ defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) _TOD_Get_uptime( &uptime ); 400067bc: 40 00 07 57 call 40008518 <_TOD_Get_uptime> 400067c0: 90 10 00 10 mov %l0, %o0 #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS /* * Since the statistics didn't update the starting time, * we do it here. */ the_period->time_at_period = uptime; 400067c4: c2 07 bf ec ld [ %fp + -20 ], %g1 #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS { struct timespec ran; the_period->owner_executed_at_period = 400067c8: c4 04 e0 dc ld [ %l3 + 0xdc ], %g2 #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS /* * Since the statistics didn't update the starting time, * we do it here. */ the_period->time_at_period = uptime; 400067cc: c2 24 60 44 st %g1, [ %l1 + 0x44 ] 400067d0: c2 07 bf f0 ld [ %fp + -16 ], %g1 the_period->owner_executed_at_period = _Thread_Executing->cpu_time_used; /* How much time time since last context switch */ _Timespec_Subtract( 400067d4: 92 10 00 10 mov %l0, %o1 #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS /* * Since the statistics didn't update the starting time, * we do it here. */ the_period->time_at_period = uptime; 400067d8: c2 24 60 48 st %g1, [ %l1 + 0x48 ] #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS { struct timespec ran; the_period->owner_executed_at_period = 400067dc: c2 00 a0 90 ld [ %g2 + 0x90 ], %g1 _Thread_Executing->cpu_time_used; /* How much time time since last context switch */ _Timespec_Subtract( 400067e0: a0 07 bf e4 add %fp, -28, %l0 #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS { struct timespec ran; the_period->owner_executed_at_period = 400067e4: c2 24 60 3c st %g1, [ %l1 + 0x3c ] 400067e8: c2 00 a0 94 ld [ %g2 + 0x94 ], %g1 _Thread_Executing->cpu_time_used; /* How much time time since last context switch */ _Timespec_Subtract( 400067ec: 94 10 00 10 mov %l0, %o2 #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS { struct timespec ran; the_period->owner_executed_at_period = 400067f0: c2 24 60 40 st %g1, [ %l1 + 0x40 ] _Thread_Executing->cpu_time_used; /* How much time time since last context switch */ _Timespec_Subtract( 400067f4: 11 10 00 7b sethi %hi(0x4001ec00), %o0 400067f8: 40 00 13 ed call 4000b7ac <_Timespec_Subtract> 400067fc: 90 12 20 e4 or %o0, 0xe4, %o0 ! 4001ece4 <_Thread_Time_of_last_context_switch> /* The thread had executed before the last context switch also. * * the_period->owner_executed_at_period += ran */ _Timespec_Add_to( &the_period->owner_executed_at_period, &ran ); 40006800: 92 10 00 10 mov %l0, %o1 40006804: 40 00 13 89 call 4000b628 <_Timespec_Add_to> 40006808: 90 04 60 3c add %l1, 0x3c, %o0 #else the_period->owner_ticks_executed_at_period = _Thread_Executing->ticks_executed; #endif the_period->state = RATE_MONOTONIC_ACTIVE; 4000680c: 82 10 20 02 mov 2, %g1 40006810: c2 24 60 38 st %g1, [ %l1 + 0x38 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40006814: 03 10 00 1b sethi %hi(0x40006c00), %g1 40006818: 82 10 60 48 or %g1, 0x48, %g1 ! 40006c48 <_Rate_monotonic_Timeout> NULL ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); 4000681c: 90 04 60 10 add %l1, 0x10, %o0 40006820: 92 10 00 19 mov %i1, %o1 the_watchdog->id = id; 40006824: f0 24 60 30 st %i0, [ %l1 + 0x30 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40006828: c0 24 60 18 clr [ %l1 + 0x18 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 4000682c: c0 24 60 34 clr [ %l1 + 0x34 ] _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 40006830: f2 24 60 4c st %i1, [ %l1 + 0x4c ] _Watchdog_Insert_ticks( &the_period->Timer, length ); 40006834: 7f ff ff 37 call 40006510 <_Watchdog_Insert_ticks> 40006838: c2 24 60 2c st %g1, [ %l1 + 0x2c ] 4000683c: 30 80 00 19 b,a 400068a0 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 40006840: 7f ff ff 49 call 40006564 <_Rate_monotonic_Update_statistics> 40006844: 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; 40006848: 82 10 20 01 mov 1, %g1 the_period->next_length = length; 4000684c: 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; 40006850: c2 24 60 38 st %g1, [ %l1 + 0x38 ] the_period->next_length = length; _ISR_Enable( level ); 40006854: 7f ff f0 27 call 400028f0 40006858: 90 10 00 10 mov %l0, %o0 _Thread_Executing->Wait.id = the_period->Object.id; 4000685c: c2 04 e0 dc ld [ %l3 + 0xdc ], %g1 40006860: c4 04 60 08 ld [ %l1 + 8 ], %g2 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40006864: 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; 40006868: c4 20 60 20 st %g2, [ %g1 + 0x20 ] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 4000686c: 40 00 12 4a call 4000b194 <_Thread_Set_state> 40006870: 13 00 00 10 sethi %hi(0x4000), %o1 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 40006874: 7f ff f0 1b call 400028e0 40006878: 01 00 00 00 nop local_state = the_period->state; 4000687c: e0 04 60 38 ld [ %l1 + 0x38 ], %l0 the_period->state = RATE_MONOTONIC_ACTIVE; 40006880: e4 24 60 38 st %l2, [ %l1 + 0x38 ] _ISR_Enable( level ); 40006884: 7f ff f0 1b call 400028f0 40006888: 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 ) 4000688c: 80 a4 20 03 cmp %l0, 3 40006890: 12 80 00 04 bne 400068a0 40006894: d0 04 e0 dc ld [ %l3 + 0xdc ], %o0 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40006898: 40 00 0e 89 call 4000a2bc <_Thread_Clear_state> <== NOT EXECUTED 4000689c: 13 00 00 10 sethi %hi(0x4000), %o1 <== NOT EXECUTED _Thread_Enable_dispatch(); 400068a0: 7f ff ff 24 call 40006530 <_Thread_Enable_dispatch> 400068a4: b0 10 20 00 clr %i0 400068a8: 81 c7 e0 08 ret 400068ac: 81 e8 00 00 restore case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 400068b0: 7f ff ff 2d call 40006564 <_Rate_monotonic_Update_statistics> 400068b4: 90 10 00 11 mov %l1, %o0 _ISR_Enable( level ); 400068b8: 7f ff f0 0e call 400028f0 400068bc: 90 10 00 10 mov %l0, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 400068c0: 82 10 20 02 mov 2, %g1 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); 400068c4: 90 04 60 10 add %l1, 0x10, %o0 400068c8: 92 10 00 19 mov %i1, %o1 */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 400068cc: c2 24 60 38 st %g1, [ %l1 + 0x38 ] the_period->next_length = length; 400068d0: f2 24 60 4c st %i1, [ %l1 + 0x4c ] _Watchdog_Insert_ticks( &the_period->Timer, length ); 400068d4: 7f ff ff 0f call 40006510 <_Watchdog_Insert_ticks> 400068d8: b0 10 20 06 mov 6, %i0 _Thread_Enable_dispatch(); 400068dc: 7f ff ff 15 call 40006530 <_Thread_Enable_dispatch> 400068e0: 01 00 00 00 nop 400068e4: 81 c7 e0 08 ret 400068e8: 81 e8 00 00 restore break; } } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400068ec: 81 c7 e0 08 ret <== NOT EXECUTED 400068f0: 81 e8 00 00 restore <== NOT EXECUTED 400068f4 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 400068f4: 9d e3 bf 30 save %sp, -208, %sp rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 400068f8: 80 a6 60 00 cmp %i1, 0 400068fc: 02 80 00 7f be 40006af8 40006900: 90 10 00 18 mov %i0, %o0 return; (*print)( context, "Period information by period\n" ); 40006904: 13 10 00 70 sethi %hi(0x4001c000), %o1 40006908: 9f c6 40 00 call %i1 4000690c: 92 12 61 58 or %o1, 0x158, %o1 ! 4001c158 #if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) (*print)( context, "--- CPU times are in seconds ---\n" ); 40006910: 90 10 00 18 mov %i0, %o0 40006914: 13 10 00 70 sethi %hi(0x4001c000), %o1 40006918: 9f c6 40 00 call %i1 4000691c: 92 12 61 78 or %o1, 0x178, %o1 ! 4001c178 #endif #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) (*print)( context, "--- Wall times are in seconds ---\n" ); 40006920: 90 10 00 18 mov %i0, %o0 40006924: 13 10 00 70 sethi %hi(0x4001c000), %o1 40006928: 9f c6 40 00 call %i1 4000692c: 92 12 61 a0 or %o1, 0x1a0, %o1 ! 4001c1a0 Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 40006930: 90 10 00 18 mov %i0, %o0 40006934: 13 10 00 70 sethi %hi(0x4001c000), %o1 40006938: 9f c6 40 00 call %i1 4000693c: 92 12 61 c8 or %o1, 0x1c8, %o1 ! 4001c1c8 #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS " " #endif " WALL TIME\n" ); (*print)( context, " " 40006940: 90 10 00 18 mov %i0, %o0 40006944: 13 10 00 70 sethi %hi(0x4001c000), %o1 40006948: 9f c6 40 00 call %i1 4000694c: 92 12 62 18 or %o1, 0x218, %o1 ! 4001c218 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 40006950: 03 10 00 7a sethi %hi(0x4001e800), %g1 40006954: 82 10 62 68 or %g1, 0x268, %g1 ! 4001ea68 <_Rate_monotonic_Information> 40006958: e4 00 60 08 ld [ %g1 + 8 ], %l2 _Timespec_Divide_by_integer( &the_stats.total_cpu_time, the_stats.count, &cpu_average ); (*print)( context, 4000695c: 03 10 00 70 sethi %hi(0x4001c000), %g1 40006960: b4 10 62 80 or %g1, 0x280, %i2 ! 4001c280 _Timespec_Divide_by_integer( &the_stats.total_wall_time, the_stats.count, &wall_average ); (*print)( context, 40006964: 03 10 00 70 sethi %hi(0x4001c000), %g1 * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 40006968: ba 07 bf 98 add %fp, -104, %i5 _Timespec_Divide_by_integer( &the_stats.total_wall_time, the_stats.count, &wall_average ); (*print)( context, 4000696c: b6 10 62 a0 or %g1, 0x2a0, %i3 status = rtems_rate_monotonic_get_statistics( id, &the_stats ); if ( status != RTEMS_SUCCESSFUL ) continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 40006970: ae 07 bf d0 add %fp, -48, %l7 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 40006974: 03 10 00 70 sethi %hi(0x4001c000), %g1 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 40006978: a8 07 bf f3 add %fp, -13, %l4 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 4000697c: b8 10 61 98 or %g1, 0x198, %i4 */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 40006980: ac 07 bf b0 add %fp, -80, %l6 40006984: a6 07 bf e8 add %fp, -24, %l3 * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 40006988: 10 80 00 56 b 40006ae0 4000698c: aa 07 bf c8 add %fp, -56, %l5 * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 40006990: 40 00 1d f1 call 4000e154 40006994: 92 10 00 1d mov %i5, %o1 if ( status != RTEMS_SUCCESSFUL ) 40006998: 80 a2 20 00 cmp %o0, 0 4000699c: 32 80 00 51 bne,a 40006ae0 400069a0: a4 04 a0 01 inc %l2 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 400069a4: 92 10 00 17 mov %l7, %o1 400069a8: 40 00 1e 0f call 4000e1e4 400069ac: 90 10 00 12 mov %l2, %o0 if ( status != RTEMS_SUCCESSFUL ) 400069b0: 80 a2 20 00 cmp %o0, 0 400069b4: 32 80 00 4b bne,a 40006ae0 400069b8: a4 04 a0 01 inc %l2 <== NOT EXECUTED continue; name[ 0 ] = '\0'; if ( the_status.owner ) { 400069bc: d0 07 bf d0 ld [ %fp + -48 ], %o0 400069c0: 80 a2 20 00 cmp %o0, 0 400069c4: 02 80 00 05 be 400069d8 400069c8: c0 2f bf f3 clrb [ %fp + -13 ] rtems_object_get_name( the_status.owner, sizeof(name), name ); 400069cc: 94 10 00 14 mov %l4, %o2 400069d0: 40 00 00 c8 call 40006cf0 400069d4: 92 10 20 05 mov 5, %o1 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 400069d8: d8 1f bf 98 ldd [ %fp + -104 ], %o4 400069dc: 94 10 00 12 mov %l2, %o2 400069e0: 96 10 00 14 mov %l4, %o3 400069e4: 13 10 00 70 sethi %hi(0x4001c000), %o1 400069e8: 90 10 00 18 mov %i0, %o0 400069ec: 9f c6 40 00 call %i1 400069f0: 92 12 62 68 or %o1, 0x268, %o1 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 400069f4: c2 07 bf 98 ld [ %fp + -104 ], %g1 */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 400069f8: 94 10 00 13 mov %l3, %o2 400069fc: 90 10 00 16 mov %l6, %o0 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 40006a00: 80 a0 60 00 cmp %g1, 0 40006a04: 12 80 00 06 bne 40006a1c 40006a08: 92 10 00 1c mov %i4, %o1 (*print)( context, "\n" ); 40006a0c: 9f c6 40 00 call %i1 40006a10: 90 10 00 18 mov %i0, %o0 * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 40006a14: 10 80 00 33 b 40006ae0 40006a18: a4 04 a0 01 inc %l2 */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 40006a1c: 40 00 13 1b call 4000b688 <_Timespec_Divide_by_integer> 40006a20: 92 10 00 01 mov %g1, %o1 &the_stats.total_cpu_time, the_stats.count, &cpu_average ); (*print)( context, 40006a24: d0 07 bf a4 ld [ %fp + -92 ], %o0 40006a28: 40 00 47 a5 call 400188bc <.div> 40006a2c: 92 10 23 e8 mov 0x3e8, %o1 40006a30: a2 10 00 08 mov %o0, %l1 40006a34: d0 07 bf ac ld [ %fp + -84 ], %o0 40006a38: 40 00 47 a1 call 400188bc <.div> 40006a3c: 92 10 23 e8 mov 0x3e8, %o1 40006a40: c2 07 bf e8 ld [ %fp + -24 ], %g1 40006a44: a0 10 00 08 mov %o0, %l0 40006a48: d0 07 bf ec ld [ %fp + -20 ], %o0 40006a4c: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 40006a50: 40 00 47 9b call 400188bc <.div> 40006a54: 92 10 23 e8 mov 0x3e8, %o1 40006a58: d8 07 bf a8 ld [ %fp + -88 ], %o4 40006a5c: d4 07 bf a0 ld [ %fp + -96 ], %o2 40006a60: 96 10 00 11 mov %l1, %o3 40006a64: 9a 10 00 10 mov %l0, %o5 40006a68: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 40006a6c: 92 10 00 1a mov %i2, %o1 40006a70: 9f c6 40 00 call %i1 40006a74: 90 10 00 18 mov %i0, %o0 * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 40006a78: d2 07 bf 98 ld [ %fp + -104 ], %o1 40006a7c: 94 10 00 13 mov %l3, %o2 40006a80: 40 00 13 02 call 4000b688 <_Timespec_Divide_by_integer> 40006a84: 90 10 00 15 mov %l5, %o0 &the_stats.total_wall_time, the_stats.count, &wall_average ); (*print)( context, 40006a88: d0 07 bf bc ld [ %fp + -68 ], %o0 40006a8c: 40 00 47 8c call 400188bc <.div> 40006a90: 92 10 23 e8 mov 0x3e8, %o1 40006a94: a2 10 00 08 mov %o0, %l1 40006a98: d0 07 bf c4 ld [ %fp + -60 ], %o0 40006a9c: 40 00 47 88 call 400188bc <.div> 40006aa0: 92 10 23 e8 mov 0x3e8, %o1 40006aa4: c2 07 bf e8 ld [ %fp + -24 ], %g1 40006aa8: a0 10 00 08 mov %o0, %l0 40006aac: d0 07 bf ec ld [ %fp + -20 ], %o0 40006ab0: 92 10 23 e8 mov 0x3e8, %o1 40006ab4: 40 00 47 82 call 400188bc <.div> 40006ab8: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 40006abc: d4 07 bf b8 ld [ %fp + -72 ], %o2 40006ac0: d8 07 bf c0 ld [ %fp + -64 ], %o4 40006ac4: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 40006ac8: 96 10 00 11 mov %l1, %o3 40006acc: 9a 10 00 10 mov %l0, %o5 40006ad0: 90 10 00 18 mov %i0, %o0 40006ad4: 9f c6 40 00 call %i1 40006ad8: 92 10 00 1b mov %i3, %o1 * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 40006adc: a4 04 a0 01 inc %l2 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 40006ae0: 05 10 00 7a sethi %hi(0x4001e800), %g2 40006ae4: 84 10 a2 68 or %g2, 0x268, %g2 ! 4001ea68 <_Rate_monotonic_Information> 40006ae8: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 40006aec: 80 a4 80 01 cmp %l2, %g1 40006af0: 08 bf ff a8 bleu 40006990 40006af4: 90 10 00 12 mov %l2, %o0 40006af8: 81 c7 e0 08 ret 40006afc: 81 e8 00 00 restore 40006b1c : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 40006b1c: 9d e3 bf 98 save %sp, -104, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006b20: 03 10 00 7b sethi %hi(0x4001ec00), %g1 40006b24: c4 00 60 00 ld [ %g1 ], %g2 40006b28: 84 00 a0 01 inc %g2 40006b2c: c4 20 60 00 st %g2, [ %g1 ] /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 40006b30: 03 10 00 7a sethi %hi(0x4001e800), %g1 40006b34: 82 10 62 68 or %g1, 0x268, %g1 ! 4001ea68 <_Rate_monotonic_Information> 40006b38: e0 00 60 08 ld [ %g1 + 8 ], %l0 id <= _Rate_monotonic_Information.maximum_id ; 40006b3c: 10 80 00 04 b 40006b4c 40006b40: a2 10 00 01 mov %g1, %l1 id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 40006b44: 40 00 00 12 call 40006b8c 40006b48: a0 04 20 01 inc %l0 /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 40006b4c: c2 04 60 0c ld [ %l1 + 0xc ], %g1 40006b50: 80 a4 00 01 cmp %l0, %g1 40006b54: 08 bf ff fc bleu 40006b44 40006b58: 90 10 00 10 mov %l0, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006b5c: 03 10 00 7b sethi %hi(0x4001ec00), %g1 40006b60: c4 00 60 00 ld [ %g1 ], %g2 40006b64: 84 00 bf ff add %g2, -1, %g2 40006b68: c4 20 60 00 st %g2, [ %g1 ] 40006b6c: c2 00 60 00 ld [ %g1 ], %g1 40006b70: 80 a0 60 00 cmp %g1, 0 40006b74: 12 80 00 04 bne 40006b84 40006b78: 01 00 00 00 nop _Thread_Dispatch(); 40006b7c: 40 00 0e 8a call 4000a5a4 <_Thread_Dispatch> 40006b80: 81 e8 00 00 restore 40006b84: 81 c7 e0 08 ret <== NOT EXECUTED 40006b88: 81 e8 00 00 restore <== NOT EXECUTED 4000f898 : uint32_t length, uint32_t page_size, rtems_attribute attribute_set, Objects_Id *id ) { 4000f898: 9d e3 bf 98 save %sp, -104, %sp Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 4000f89c: a4 96 20 00 orcc %i0, 0, %l2 4000f8a0: 02 80 00 87 be 4000fabc 4000f8a4: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !starting_address ) 4000f8a8: 80 a6 60 00 cmp %i1, 0 4000f8ac: 02 80 00 c7 be 4000fbc8 4000f8b0: 80 a7 60 00 cmp %i5, 0 return RTEMS_INVALID_ADDRESS; if ( !id ) 4000f8b4: 02 80 00 c5 be 4000fbc8 4000f8b8: 80 8e 60 07 btst 7, %i1 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) 4000f8bc: 32 80 00 80 bne,a 4000fabc 4000f8c0: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 4000f8c4: 7f ff eb 9e call 4000a73c 4000f8c8: 01 00 00 00 nop 4000f8cc: a2 10 00 08 mov %o0, %l1 4000f8d0: 03 10 00 ce sethi %hi(0x40033800), %g1 4000f8d4: c2 00 61 10 ld [ %g1 + 0x110 ], %g1 ! 40033910 <_Thread_Dispatch_disable_level> 4000f8d8: 80 a0 60 00 cmp %g1, 0 4000f8dc: 02 80 00 0b be 4000f908 4000f8e0: 03 10 00 ce sethi %hi(0x40033800), %g1 4000f8e4: 03 10 00 ce sethi %hi(0x40033800), %g1 <== NOT EXECUTED 4000f8e8: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1 ! 40033af0 <_System_state_Current> <== NOT EXECUTED 4000f8ec: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4000f8f0: 08 80 00 05 bleu 4000f904 <== NOT EXECUTED 4000f8f4: 90 10 20 00 clr %o0 <== NOT EXECUTED 4000f8f8: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000f8fc: 40 00 12 d5 call 40014450 <_Internal_error_Occurred> <== NOT EXECUTED 4000f900: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 4000f904: 03 10 00 ce sethi %hi(0x40033800), %g1 <== NOT EXECUTED 4000f908: e0 00 61 e4 ld [ %g1 + 0x1e4 ], %l0 ! 400339e4 <_RTEMS_Allocator_Mutex> Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 4000f90c: 03 10 00 ce sethi %hi(0x40033800), %g1 4000f910: c4 00 61 ec ld [ %g1 + 0x1ec ], %g2 ! 400339ec <_Thread_Executing> executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4000f914: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4000f918: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 4000f91c: 80 a0 60 00 cmp %g1, 0 4000f920: 22 80 00 30 be,a 4000f9e0 4000f924: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 4000f928: c0 24 20 60 clr [ %l0 + 0x60 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000f92c: c2 00 a0 08 ld [ %g2 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 4000f930: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 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; the_mutex->nest_count = 1; 4000f934: 88 10 20 01 mov 1, %g4 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; 4000f938: c2 24 20 70 st %g1, [ %l0 + 0x70 ] 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; 4000f93c: c4 24 20 6c st %g2, [ %l0 + 0x6c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000f940: 80 a0 e0 02 cmp %g3, 2 4000f944: 02 80 00 05 be 4000f958 4000f948: c8 24 20 64 st %g4, [ %l0 + 0x64 ] 4000f94c: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 4000f950: 12 80 00 07 bne 4000f96c <== NOT EXECUTED 4000f954: 01 00 00 00 nop <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 4000f958: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000f95c: 80 a0 e0 03 cmp %g3, 3 the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 4000f960: 82 00 60 01 inc %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000f964: 02 80 00 03 be 4000f970 4000f968: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] _ISR_Enable( level ); 4000f96c: 30 80 00 2b b,a 4000fa18 */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4000f970: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED current = executing->current_priority; 4000f974: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 4000f978: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 4000f97c: 12 80 00 03 bne 4000f988 <== NOT EXECUTED 4000f980: 01 00 00 00 nop <== NOT EXECUTED _ISR_Enable( level ); 4000f984: 30 80 00 25 b,a 4000fa18 <== NOT EXECUTED return 0; } if ( current > ceiling ) { 4000f988: 08 80 00 0f bleu 4000f9c4 <== NOT EXECUTED 4000f98c: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000f990: 05 10 00 ce sethi %hi(0x40033800), %g2 <== NOT EXECUTED 4000f994: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 40033910 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000f998: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000f99c: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 4000f9a0: 7f ff eb 6b call 4000a74c <== NOT EXECUTED 4000f9a4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED _Thread_Change_priority( 4000f9a8: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 4000f9ac: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 4000f9b0: 40 00 17 f5 call 40015984 <_Thread_Change_priority> <== NOT EXECUTED 4000f9b4: 94 10 20 00 clr %o2 <== NOT EXECUTED the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 4000f9b8: 7f ff ff ab call 4000f864 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000f9bc: 23 10 00 cd sethi %hi(0x40033400), %l1 <== NOT EXECUTED 4000f9c0: 30 80 00 2f b,a 4000fa7c <== NOT EXECUTED return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4000f9c4: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 4000f9c8: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 4000f9cc: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 4000f9d0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4000f9d4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000f9d8: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 4000f9dc: 30 80 00 0f b,a 4000fa18 <== NOT EXECUTED /* * 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 ) ) { 4000f9e0: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 4000f9e4: 12 80 00 13 bne 4000fa30 <== NOT EXECUTED 4000f9e8: 03 10 00 ce sethi %hi(0x40033800), %g1 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4000f9ec: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 4000f9f0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000f9f4: 22 80 00 07 be,a 4000fa10 <== NOT EXECUTED 4000f9f8: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 4000f9fc: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4000fa00: 32 80 00 0c bne,a 4000fa30 <== NOT EXECUTED 4000fa04: 03 10 00 ce sethi %hi(0x40033800), %g1 <== NOT EXECUTED 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; 4000fa08: 10 80 00 08 b 4000fa28 <== NOT EXECUTED 4000fa0c: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED * 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++; 4000fa10: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000fa14: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 4000fa18: 7f ff eb 4d call 4000a74c 4000fa1c: 90 10 00 11 mov %l1, %o0 * the inactive chain of free region control blocks. */ RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void ) { return (Region_Control *) _Objects_Allocate( &_Region_Information ); 4000fa20: 10 80 00 17 b 4000fa7c 4000fa24: 23 10 00 cd sethi %hi(0x40033400), %l1 return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 4000fa28: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 4000fa2c: 30 bf ff fb b,a 4000fa18 <== NOT EXECUTED 4000fa30: c6 04 20 08 ld [ %l0 + 8 ], %g3 <== NOT EXECUTED 4000fa34: c8 00 61 ec ld [ %g1 + 0x1ec ], %g4 <== NOT EXECUTED 4000fa38: 05 10 00 ce sethi %hi(0x40033800), %g2 <== NOT EXECUTED 4000fa3c: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 40033910 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000fa40: c6 21 20 20 st %g3, [ %g4 + 0x20 ] <== NOT EXECUTED 4000fa44: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000fa48: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; 4000fa4c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 4000fa50: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED 4000fa54: 82 04 20 10 add %l0, 0x10, %g1 <== NOT EXECUTED 4000fa58: c2 21 20 44 st %g1, [ %g4 + 0x44 ] <== NOT EXECUTED 4000fa5c: 7f ff eb 3c call 4000a74c <== NOT EXECUTED 4000fa60: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000fa64: 03 10 00 ce sethi %hi(0x40033800), %g1 <== NOT EXECUTED 4000fa68: d0 00 61 e4 ld [ %g1 + 0x1e4 ], %o0 ! 400339e4 <_RTEMS_Allocator_Mutex> <== NOT EXECUTED 4000fa6c: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000fa70: 40 00 0f e6 call 40013a08 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 4000fa74: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED 4000fa78: 23 10 00 cd sethi %hi(0x40033400), %l1 <== NOT EXECUTED 4000fa7c: 40 00 12 a2 call 40014504 <_Objects_Allocate> 4000fa80: 90 14 63 28 or %l1, 0x328, %o0 ! 40033728 <_Region_Information> the_region = _Region_Allocate(); if ( !the_region ) { 4000fa84: a0 92 20 00 orcc %o0, 0, %l0 4000fa88: 12 80 00 0f bne 4000fac4 4000fa8c: 05 10 00 ce sethi %hi(0x40033800), %g2 4000fa90: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 40033910 <_Thread_Dispatch_disable_level> 4000fa94: 82 00 60 01 inc %g1 4000fa98: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] _RTEMS_Unlock_allocator(); 4000fa9c: 03 10 00 ce sethi %hi(0x40033800), %g1 4000faa0: d0 00 61 e4 ld [ %g1 + 0x1e4 ], %o0 ! 400339e4 <_RTEMS_Allocator_Mutex> 4000faa4: 94 10 20 00 clr %o2 4000faa8: d2 02 20 08 ld [ %o0 + 8 ], %o1 4000faac: 40 00 0f f9 call 40013a90 <_CORE_mutex_Surrender> 4000fab0: 90 02 20 10 add %o0, 0x10, %o0 4000fab4: 7f ff ff 6c call 4000f864 <_Thread_Enable_dispatch> 4000fab8: b0 10 20 05 mov 5, %i0 4000fabc: 81 c7 e0 08 ret 4000fac0: 81 e8 00 00 restore return RTEMS_TOO_MANY; } the_region->maximum_segment_size = 4000fac4: 90 04 20 68 add %l0, 0x68, %o0 4000fac8: 92 10 00 19 mov %i1, %o1 4000facc: 94 10 00 1a mov %i2, %o2 4000fad0: 40 00 12 16 call 40014328 <_Heap_Initialize> 4000fad4: 96 10 00 1b mov %i3, %o3 _Heap_Initialize(&the_region->Memory, starting_address, length, page_size); if ( !the_region->maximum_segment_size ) { 4000fad8: 80 a2 20 00 cmp %o0, 0 4000fadc: 12 80 00 13 bne 4000fb28 4000fae0: d0 24 20 5c st %o0, [ %l0 + 0x5c ] RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 4000fae4: 90 14 63 28 or %l1, 0x328, %o0 4000fae8: 40 00 13 89 call 4001490c <_Objects_Free> 4000faec: 92 10 00 10 mov %l0, %o1 4000faf0: 05 10 00 ce sethi %hi(0x40033800), %g2 4000faf4: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 40033910 <_Thread_Dispatch_disable_level> 4000faf8: 82 00 60 01 inc %g1 4000fafc: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] _Region_Free( the_region ); _RTEMS_Unlock_allocator(); 4000fb00: 03 10 00 ce sethi %hi(0x40033800), %g1 4000fb04: d0 00 61 e4 ld [ %g1 + 0x1e4 ], %o0 ! 400339e4 <_RTEMS_Allocator_Mutex> 4000fb08: 94 10 20 00 clr %o2 4000fb0c: d2 02 20 08 ld [ %o0 + 8 ], %o1 4000fb10: 40 00 0f e0 call 40013a90 <_CORE_mutex_Surrender> 4000fb14: 90 02 20 10 add %o0, 0x10, %o0 4000fb18: 7f ff ff 53 call 4000f864 <_Thread_Enable_dispatch> 4000fb1c: b0 10 20 08 mov 8, %i0 4000fb20: 81 c7 e0 08 ret 4000fb24: 81 e8 00 00 restore the_region->length = length; the_region->page_size = page_size; the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( 4000fb28: 90 04 20 10 add %l0, 0x10, %o0 _Region_Free( the_region ); _RTEMS_Unlock_allocator(); return RTEMS_INVALID_SIZE; } the_region->starting_address = starting_address; 4000fb2c: f2 24 20 50 st %i1, [ %l0 + 0x50 ] the_region->length = length; 4000fb30: f4 24 20 54 st %i2, [ %l0 + 0x54 ] the_region->page_size = page_size; 4000fb34: f6 24 20 58 st %i3, [ %l0 + 0x58 ] the_region->attribute_set = attribute_set; 4000fb38: f8 24 20 60 st %i4, [ %l0 + 0x60 ] the_region->number_of_used_blocks = 0; 4000fb3c: c0 24 20 64 clr [ %l0 + 0x64 ] _Thread_queue_Initialize( 4000fb40: 93 37 20 02 srl %i4, 2, %o1 4000fb44: 94 10 20 40 mov 0x40, %o2 4000fb48: 92 0a 60 01 and %o1, 1, %o1 4000fb4c: 40 00 1b 09 call 40016770 <_Thread_queue_Initialize> 4000fb50: 96 10 20 06 mov 6, %o3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000fb54: 90 14 63 28 or %l1, 0x328, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 4000fb58: c4 04 20 08 ld [ %l0 + 8 ], %g2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000fb5c: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 4000fb60: 03 00 00 3f sethi %hi(0xfc00), %g1 4000fb64: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000fb68: 82 08 80 01 and %g2, %g1, %g1 4000fb6c: 80 a0 40 03 cmp %g1, %g3 4000fb70: 38 80 00 06 bgu,a 4000fb88 4000fb74: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED information->local_table[ index ] = the_object; 4000fb78: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 4000fb7c: 83 28 60 02 sll %g1, 2, %g1 4000fb80: e0 20 80 01 st %l0, [ %g2 + %g1 ] &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 4000fb84: c2 04 20 08 ld [ %l0 + 8 ], %g1 4000fb88: 05 10 00 ce sethi %hi(0x40033800), %g2 4000fb8c: c2 27 40 00 st %g1, [ %i5 ] 4000fb90: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 4000fb94: e4 24 20 0c st %l2, [ %l0 + 0xc ] 4000fb98: 82 00 60 01 inc %g1 4000fb9c: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] _RTEMS_Unlock_allocator(); 4000fba0: 03 10 00 ce sethi %hi(0x40033800), %g1 4000fba4: d0 00 61 e4 ld [ %g1 + 0x1e4 ], %o0 ! 400339e4 <_RTEMS_Allocator_Mutex> 4000fba8: 94 10 20 00 clr %o2 4000fbac: d2 02 20 08 ld [ %o0 + 8 ], %o1 4000fbb0: 40 00 0f b8 call 40013a90 <_CORE_mutex_Surrender> 4000fbb4: 90 02 20 10 add %o0, 0x10, %o0 4000fbb8: 7f ff ff 2b call 4000f864 <_Thread_Enable_dispatch> 4000fbbc: b0 10 20 00 clr %i0 4000fbc0: 81 c7 e0 08 ret 4000fbc4: 81 e8 00 00 restore return RTEMS_SUCCESSFUL; 4000fbc8: b0 10 20 09 mov 9, %i0 <== NOT EXECUTED } 4000fbcc: 81 c7 e0 08 ret <== NOT EXECUTED 4000fbd0: 81 e8 00 00 restore <== NOT EXECUTED 4000fc08 : */ rtems_status_code rtems_region_delete( Objects_Id id ) { 4000fc08: 9d e3 bf 90 save %sp, -112, %sp register Region_Control *the_region; Objects_Locations location; _RTEMS_Lock_allocator(); 4000fc0c: 7f ff ea cc call 4000a73c 4000fc10: 01 00 00 00 nop 4000fc14: a2 10 00 08 mov %o0, %l1 4000fc18: 03 10 00 ce sethi %hi(0x40033800), %g1 4000fc1c: c2 00 61 10 ld [ %g1 + 0x110 ], %g1 ! 40033910 <_Thread_Dispatch_disable_level> 4000fc20: 80 a0 60 00 cmp %g1, 0 4000fc24: 02 80 00 0b be 4000fc50 4000fc28: 03 10 00 ce sethi %hi(0x40033800), %g1 4000fc2c: 03 10 00 ce sethi %hi(0x40033800), %g1 <== NOT EXECUTED 4000fc30: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1 ! 40033af0 <_System_state_Current> <== NOT EXECUTED 4000fc34: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4000fc38: 08 80 00 05 bleu 4000fc4c <== NOT EXECUTED 4000fc3c: 90 10 20 00 clr %o0 <== NOT EXECUTED 4000fc40: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000fc44: 40 00 12 03 call 40014450 <_Internal_error_Occurred> <== NOT EXECUTED 4000fc48: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 4000fc4c: 03 10 00 ce sethi %hi(0x40033800), %g1 <== NOT EXECUTED 4000fc50: e0 00 61 e4 ld [ %g1 + 0x1e4 ], %l0 ! 400339e4 <_RTEMS_Allocator_Mutex> Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 4000fc54: 03 10 00 ce sethi %hi(0x40033800), %g1 4000fc58: c4 00 61 ec ld [ %g1 + 0x1ec ], %g2 ! 400339ec <_Thread_Executing> executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4000fc5c: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4000fc60: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 4000fc64: 80 a0 60 00 cmp %g1, 0 4000fc68: 22 80 00 33 be,a 4000fd34 4000fc6c: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 4000fc70: c0 24 20 60 clr [ %l0 + 0x60 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000fc74: c2 00 a0 08 ld [ %g2 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 4000fc78: c6 04 20 58 ld [ %l0 + 0x58 ], %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; 4000fc7c: c2 24 20 70 st %g1, [ %l0 + 0x70 ] 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; 4000fc80: c4 24 20 6c st %g2, [ %l0 + 0x6c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4000fc84: 82 10 20 01 mov 1, %g1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000fc88: 80 a0 e0 02 cmp %g3, 2 4000fc8c: 02 80 00 05 be 4000fca0 4000fc90: c2 24 20 64 st %g1, [ %l0 + 0x64 ] 4000fc94: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 4000fc98: 32 80 00 06 bne,a 4000fcb0 <== NOT EXECUTED 4000fc9c: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 4000fca0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 4000fca4: 82 00 60 01 inc %g1 4000fca8: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000fcac: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 4000fcb0: 80 a0 60 03 cmp %g1, 3 4000fcb4: 22 80 00 03 be,a 4000fcc0 4000fcb8: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED _ISR_Enable( level ); 4000fcbc: 30 80 00 2c b,a 4000fd6c { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 4000fcc0: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 4000fcc4: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 4000fcc8: 12 80 00 03 bne 4000fcd4 <== NOT EXECUTED 4000fccc: 01 00 00 00 nop <== NOT EXECUTED _ISR_Enable( level ); 4000fcd0: 30 80 00 27 b,a 4000fd6c <== NOT EXECUTED return 0; } if ( current > ceiling ) { 4000fcd4: 08 80 00 10 bleu 4000fd14 <== NOT EXECUTED 4000fcd8: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000fcdc: 05 10 00 ce sethi %hi(0x40033800), %g2 <== NOT EXECUTED 4000fce0: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 40033910 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000fce4: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000fce8: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 4000fcec: 7f ff ea 98 call 4000a74c <== NOT EXECUTED 4000fcf0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED _Thread_Change_priority( 4000fcf4: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 4000fcf8: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 4000fcfc: 40 00 17 22 call 40015984 <_Thread_Change_priority> <== NOT EXECUTED 4000fd00: 94 10 20 00 clr %o2 <== NOT EXECUTED the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 4000fd04: 7f ff ff b4 call 4000fbd4 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000fd08: 01 00 00 00 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 4000fd0c: 10 80 00 32 b 4000fdd4 <== NOT EXECUTED 4000fd10: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4000fd14: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 4000fd18: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 4000fd1c: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 4000fd20: c2 24 20 60 st %g1, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 4000fd24: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4000fd28: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000fd2c: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 4000fd30: 30 80 00 0f b,a 4000fd6c <== NOT EXECUTED /* * 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 ) ) { 4000fd34: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 4000fd38: 32 80 00 13 bne,a 4000fd84 <== NOT EXECUTED 4000fd3c: 21 10 00 ce sethi %hi(0x40033800), %l0 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4000fd40: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 ! 40033850 <_Timer_Seconds_timer+0x24> <== NOT EXECUTED 4000fd44: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000fd48: 22 80 00 07 be,a 4000fd64 <== NOT EXECUTED 4000fd4c: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 4000fd50: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4000fd54: 12 80 00 0c bne 4000fd84 <== NOT EXECUTED 4000fd58: 21 10 00 ce sethi %hi(0x40033800), %l0 <== NOT EXECUTED 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; 4000fd5c: 10 80 00 08 b 4000fd7c <== NOT EXECUTED 4000fd60: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED * 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++; 4000fd64: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000fd68: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 4000fd6c: 7f ff ea 78 call 4000a74c 4000fd70: 90 10 00 11 mov %l1, %o0 4000fd74: 10 80 00 18 b 4000fdd4 4000fd78: 92 10 00 18 mov %i0, %o1 return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 4000fd7c: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 4000fd80: 30 bf ff fb b,a 4000fd6c <== NOT EXECUTED 4000fd84: c6 04 21 e4 ld [ %l0 + 0x1e4 ], %g3 <== NOT EXECUTED 4000fd88: 03 10 00 ce sethi %hi(0x40033800), %g1 <== NOT EXECUTED 4000fd8c: da 00 e0 08 ld [ %g3 + 8 ], %o5 <== NOT EXECUTED 4000fd90: c8 00 61 ec ld [ %g1 + 0x1ec ], %g4 <== NOT EXECUTED 4000fd94: 05 10 00 ce sethi %hi(0x40033800), %g2 <== NOT EXECUTED 4000fd98: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 40033910 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000fd9c: da 21 20 20 st %o5, [ %g4 + 0x20 ] <== NOT EXECUTED 4000fda0: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000fda4: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] <== NOT EXECUTED 4000fda8: 82 00 e0 10 add %g3, 0x10, %g1 <== NOT EXECUTED 4000fdac: c2 21 20 44 st %g1, [ %g4 + 0x44 ] <== NOT EXECUTED 4000fdb0: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 4000fdb4: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 4000fdb8: 7f ff ea 65 call 4000a74c <== NOT EXECUTED 4000fdbc: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000fdc0: d0 04 21 e4 ld [ %l0 + 0x1e4 ], %o0 <== NOT EXECUTED 4000fdc4: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000fdc8: 40 00 0f 10 call 40013a08 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 4000fdcc: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED 4000fdd0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000fdd4: 21 10 00 cd sethi %hi(0x40033400), %l0 4000fdd8: 94 07 bf f4 add %fp, -12, %o2 4000fddc: 40 00 13 0e call 40014a14 <_Objects_Get_no_protection> 4000fde0: 90 14 23 28 or %l0, 0x328, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 4000fde4: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000fde8: 80 a0 60 01 cmp %g1, 1 4000fdec: 02 80 00 0a be 4000fe14 4000fdf0: 92 10 00 08 mov %o0, %o1 4000fdf4: 80 a0 60 01 cmp %g1, 1 4000fdf8: 2a 80 00 22 bcs,a 4000fe80 4000fdfc: c2 02 20 64 ld [ %o0 + 0x64 ], %g1 4000fe00: 80 a0 60 02 cmp %g1, 2 4000fe04: 12 80 00 10 bne 4000fe44 4000fe08: b0 10 20 19 mov 0x19, %i0 4000fe0c: 10 80 00 10 b 4000fe4c 4000fe10: 05 10 00 ce sethi %hi(0x40033800), %g2 case OBJECTS_REMOTE: /* this error cannot be returned */ _RTEMS_Unlock_allocator(); 4000fe14: 05 10 00 ce sethi %hi(0x40033800), %g2 <== NOT EXECUTED 4000fe18: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 40033910 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000fe1c: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000fe20: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] <== NOT EXECUTED 4000fe24: 03 10 00 ce sethi %hi(0x40033800), %g1 <== NOT EXECUTED 4000fe28: d0 00 61 e4 ld [ %g1 + 0x1e4 ], %o0 ! 400339e4 <_RTEMS_Allocator_Mutex> <== NOT EXECUTED 4000fe2c: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000fe30: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 4000fe34: 40 00 0f 17 call 40013a90 <_CORE_mutex_Surrender> <== NOT EXECUTED 4000fe38: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED 4000fe3c: 7f ff ff 66 call 4000fbd4 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000fe40: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED 4000fe44: 81 c7 e0 08 ret <== NOT EXECUTED 4000fe48: 81 e8 00 00 restore <== NOT EXECUTED 4000fe4c: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 4000fe50: 82 00 60 01 inc %g1 4000fe54: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] return RTEMS_INTERNAL_ERROR; case OBJECTS_ERROR: _RTEMS_Unlock_allocator(); 4000fe58: 03 10 00 ce sethi %hi(0x40033800), %g1 4000fe5c: d0 00 61 e4 ld [ %g1 + 0x1e4 ], %o0 ! 400339e4 <_RTEMS_Allocator_Mutex> 4000fe60: 94 10 20 00 clr %o2 4000fe64: d2 02 20 08 ld [ %o0 + 8 ], %o1 4000fe68: 40 00 0f 0a call 40013a90 <_CORE_mutex_Surrender> 4000fe6c: 90 02 20 10 add %o0, 0x10, %o0 4000fe70: 7f ff ff 59 call 4000fbd4 <_Thread_Enable_dispatch> 4000fe74: b0 10 20 04 mov 4, %i0 4000fe78: 81 c7 e0 08 ret 4000fe7c: 81 e8 00 00 restore return RTEMS_INVALID_ID; case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks == 0 ) { 4000fe80: 80 a0 60 00 cmp %g1, 0 4000fe84: 12 80 00 1d bne 4000fef8 4000fe88: 05 10 00 ce sethi %hi(0x40033800), %g2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000fe8c: 90 14 23 28 or %l0, 0x328, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 4000fe90: c2 02 60 08 ld [ %o1 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000fe94: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 4000fe98: 05 00 00 3f sethi %hi(0xfc00), %g2 4000fe9c: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 4000fea0: 82 08 40 02 and %g1, %g2, %g1 4000fea4: 80 a0 40 03 cmp %g1, %g3 4000fea8: 18 80 00 04 bgu 4000feb8 4000feac: 83 28 60 02 sll %g1, 2, %g1 information->local_table[ index ] = the_object; 4000feb0: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 4000feb4: c0 20 80 01 clr [ %g2 + %g1 ] RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 4000feb8: 40 00 12 95 call 4001490c <_Objects_Free> 4000febc: c0 22 60 0c clr [ %o1 + 0xc ] 4000fec0: 05 10 00 ce sethi %hi(0x40033800), %g2 4000fec4: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 40033910 <_Thread_Dispatch_disable_level> 4000fec8: 82 00 60 01 inc %g1 4000fecc: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] _Objects_Close( &_Region_Information, &the_region->Object ); _Region_Free( the_region ); _RTEMS_Unlock_allocator(); 4000fed0: 03 10 00 ce sethi %hi(0x40033800), %g1 4000fed4: d0 00 61 e4 ld [ %g1 + 0x1e4 ], %o0 ! 400339e4 <_RTEMS_Allocator_Mutex> 4000fed8: 94 10 20 00 clr %o2 4000fedc: d2 02 20 08 ld [ %o0 + 8 ], %o1 4000fee0: 40 00 0e ec call 40013a90 <_CORE_mutex_Surrender> 4000fee4: 90 02 20 10 add %o0, 0x10, %o0 4000fee8: 7f ff ff 3b call 4000fbd4 <_Thread_Enable_dispatch> 4000feec: b0 10 20 00 clr %i0 4000fef0: 81 c7 e0 08 ret 4000fef4: 81 e8 00 00 restore 4000fef8: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 4000fefc: 82 00 60 01 inc %g1 4000ff00: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] return RTEMS_SUCCESSFUL; } _RTEMS_Unlock_allocator(); 4000ff04: 03 10 00 ce sethi %hi(0x40033800), %g1 4000ff08: d0 00 61 e4 ld [ %g1 + 0x1e4 ], %o0 ! 400339e4 <_RTEMS_Allocator_Mutex> 4000ff0c: 94 10 20 00 clr %o2 4000ff10: d2 02 20 08 ld [ %o0 + 8 ], %o1 4000ff14: 40 00 0e df call 40013a90 <_CORE_mutex_Surrender> 4000ff18: 90 02 20 10 add %o0, 0x10, %o0 4000ff1c: 7f ff ff 2e call 4000fbd4 <_Thread_Enable_dispatch> 4000ff20: b0 10 20 0c mov 0xc, %i0 return RTEMS_RESOURCE_IN_USE; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000ff24: 81 c7 e0 08 ret 4000ff28: 81 e8 00 00 restore 4000ff60 : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 4000ff60: 9d e3 bf 90 save %sp, -112, %sp 4000ff64: a4 10 00 18 mov %i0, %l2 Objects_Locations location; uint32_t amount_extended; Heap_Extend_status heap_status; rtems_status_code status; if ( !starting_address ) 4000ff68: 80 a6 60 00 cmp %i1, 0 4000ff6c: 02 80 00 90 be 400101ac 4000ff70: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; status = RTEMS_SUCCESSFUL; _RTEMS_Lock_allocator(); /* to prevent deletion */ 4000ff74: 7f ff e9 f2 call 4000a73c 4000ff78: 01 00 00 00 nop 4000ff7c: a2 10 00 08 mov %o0, %l1 4000ff80: 03 10 00 ce sethi %hi(0x40033800), %g1 4000ff84: c2 00 61 10 ld [ %g1 + 0x110 ], %g1 ! 40033910 <_Thread_Dispatch_disable_level> 4000ff88: 80 a0 60 00 cmp %g1, 0 4000ff8c: 02 80 00 0b be 4000ffb8 4000ff90: 03 10 00 ce sethi %hi(0x40033800), %g1 4000ff94: 03 10 00 ce sethi %hi(0x40033800), %g1 <== NOT EXECUTED 4000ff98: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1 ! 40033af0 <_System_state_Current> <== NOT EXECUTED 4000ff9c: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4000ffa0: 08 80 00 05 bleu 4000ffb4 <== NOT EXECUTED 4000ffa4: 90 10 20 00 clr %o0 <== NOT EXECUTED 4000ffa8: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000ffac: 40 00 11 29 call 40014450 <_Internal_error_Occurred> <== NOT EXECUTED 4000ffb0: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 4000ffb4: 03 10 00 ce sethi %hi(0x40033800), %g1 <== NOT EXECUTED 4000ffb8: e0 00 61 e4 ld [ %g1 + 0x1e4 ], %l0 ! 400339e4 <_RTEMS_Allocator_Mutex> Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 4000ffbc: 03 10 00 ce sethi %hi(0x40033800), %g1 4000ffc0: c4 00 61 ec ld [ %g1 + 0x1ec ], %g2 ! 400339ec <_Thread_Executing> executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4000ffc4: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4000ffc8: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 4000ffcc: 80 a0 60 00 cmp %g1, 0 4000ffd0: 22 80 00 33 be,a 4001009c 4000ffd4: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 4000ffd8: c0 24 20 60 clr [ %l0 + 0x60 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000ffdc: c2 00 a0 08 ld [ %g2 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 4000ffe0: c6 04 20 58 ld [ %l0 + 0x58 ], %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; 4000ffe4: c2 24 20 70 st %g1, [ %l0 + 0x70 ] 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; 4000ffe8: c4 24 20 6c st %g2, [ %l0 + 0x6c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4000ffec: 82 10 20 01 mov 1, %g1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000fff0: 80 a0 e0 02 cmp %g3, 2 4000fff4: 02 80 00 05 be 40010008 4000fff8: c2 24 20 64 st %g1, [ %l0 + 0x64 ] 4000fffc: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 40010000: 32 80 00 06 bne,a 40010018 <== NOT EXECUTED 40010004: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40010008: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 4001000c: 82 00 60 01 inc %g1 40010010: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40010014: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 40010018: 80 a0 60 03 cmp %g1, 3 4001001c: 22 80 00 03 be,a 40010028 40010020: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED _ISR_Enable( level ); 40010024: 30 80 00 2c b,a 400100d4 { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 40010028: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 4001002c: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40010030: 12 80 00 03 bne 4001003c <== NOT EXECUTED 40010034: 01 00 00 00 nop <== NOT EXECUTED _ISR_Enable( level ); 40010038: 30 80 00 27 b,a 400100d4 <== NOT EXECUTED return 0; } if ( current > ceiling ) { 4001003c: 08 80 00 10 bleu 4001007c <== NOT EXECUTED 40010040: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40010044: 05 10 00 ce sethi %hi(0x40033800), %g2 <== NOT EXECUTED 40010048: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 40033910 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4001004c: 82 00 60 01 inc %g1 <== NOT EXECUTED 40010050: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 40010054: 7f ff e9 be call 4000a74c <== NOT EXECUTED 40010058: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED _Thread_Change_priority( 4001005c: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 40010060: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 40010064: 40 00 16 48 call 40015984 <_Thread_Change_priority> <== NOT EXECUTED 40010068: 94 10 20 00 clr %o2 <== NOT EXECUTED the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 4001006c: 7f ff ff b0 call 4000ff2c <_Thread_Enable_dispatch> <== NOT EXECUTED 40010070: 01 00 00 00 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 40010074: 10 80 00 32 b 4001013c <== NOT EXECUTED 40010078: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4001007c: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 40010080: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40010084: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 40010088: c2 24 20 60 st %g1, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 4001008c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40010090: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40010094: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40010098: 30 80 00 0f b,a 400100d4 <== NOT EXECUTED /* * 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 ) ) { 4001009c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400100a0: 32 80 00 13 bne,a 400100ec <== NOT EXECUTED 400100a4: 21 10 00 ce sethi %hi(0x40033800), %l0 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 400100a8: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 ! 40033850 <_Timer_Seconds_timer+0x24> <== NOT EXECUTED 400100ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400100b0: 22 80 00 07 be,a 400100cc <== NOT EXECUTED 400100b4: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 400100b8: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 400100bc: 12 80 00 0c bne 400100ec <== NOT EXECUTED 400100c0: 21 10 00 ce sethi %hi(0x40033800), %l0 <== NOT EXECUTED 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; 400100c4: 10 80 00 08 b 400100e4 <== NOT EXECUTED 400100c8: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED * 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++; 400100cc: 82 00 60 01 inc %g1 <== NOT EXECUTED 400100d0: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 400100d4: 7f ff e9 9e call 4000a74c 400100d8: 90 10 00 11 mov %l1, %o0 400100dc: 10 80 00 18 b 4001013c 400100e0: 92 10 00 12 mov %l2, %o1 return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 400100e4: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 400100e8: 30 bf ff fb b,a 400100d4 <== NOT EXECUTED 400100ec: c6 04 21 e4 ld [ %l0 + 0x1e4 ], %g3 <== NOT EXECUTED 400100f0: 03 10 00 ce sethi %hi(0x40033800), %g1 <== NOT EXECUTED 400100f4: da 00 e0 08 ld [ %g3 + 8 ], %o5 <== NOT EXECUTED 400100f8: c8 00 61 ec ld [ %g1 + 0x1ec ], %g4 <== NOT EXECUTED 400100fc: 05 10 00 ce sethi %hi(0x40033800), %g2 <== NOT EXECUTED 40010100: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 40033910 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40010104: da 21 20 20 st %o5, [ %g4 + 0x20 ] <== NOT EXECUTED 40010108: 82 00 60 01 inc %g1 <== NOT EXECUTED 4001010c: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] <== NOT EXECUTED 40010110: 82 00 e0 10 add %g3, 0x10, %g1 <== NOT EXECUTED 40010114: c2 21 20 44 st %g1, [ %g4 + 0x44 ] <== NOT EXECUTED 40010118: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 4001011c: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 40010120: 7f ff e9 8b call 4000a74c <== NOT EXECUTED 40010124: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40010128: d0 04 21 e4 ld [ %l0 + 0x1e4 ], %o0 <== NOT EXECUTED 4001012c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40010130: 40 00 0e 36 call 40013a08 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 40010134: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED 40010138: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 4001013c: 11 10 00 cd sethi %hi(0x40033400), %o0 40010140: 94 07 bf f4 add %fp, -12, %o2 40010144: 40 00 12 34 call 40014a14 <_Objects_Get_no_protection> 40010148: 90 12 23 28 or %o0, 0x328, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 4001014c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40010150: 80 a0 60 01 cmp %g1, 1 40010154: 02 80 00 0a be 4001017c 40010158: a0 10 00 08 mov %o0, %l0 4001015c: 80 a0 60 01 cmp %g1, 1 40010160: 0a 80 00 22 bcs 400101e8 40010164: 92 10 00 19 mov %i1, %o1 40010168: 80 a0 60 02 cmp %g1, 2 4001016c: 12 80 00 10 bne 400101ac 40010170: b0 10 20 19 mov 0x19, %i0 40010174: 10 80 00 10 b 400101b4 40010178: 05 10 00 ce sethi %hi(0x40033800), %g2 case OBJECTS_REMOTE: /* this error cannot be returned */ _RTEMS_Unlock_allocator(); 4001017c: 05 10 00 ce sethi %hi(0x40033800), %g2 <== NOT EXECUTED 40010180: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 40033910 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40010184: 82 00 60 01 inc %g1 <== NOT EXECUTED 40010188: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] <== NOT EXECUTED 4001018c: 03 10 00 ce sethi %hi(0x40033800), %g1 <== NOT EXECUTED 40010190: d0 00 61 e4 ld [ %g1 + 0x1e4 ], %o0 ! 400339e4 <_RTEMS_Allocator_Mutex> <== NOT EXECUTED 40010194: 94 10 20 00 clr %o2 <== NOT EXECUTED 40010198: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 4001019c: 40 00 0e 3d call 40013a90 <_CORE_mutex_Surrender> <== NOT EXECUTED 400101a0: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED 400101a4: 7f ff ff 62 call 4000ff2c <_Thread_Enable_dispatch> <== NOT EXECUTED 400101a8: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED 400101ac: 81 c7 e0 08 ret <== NOT EXECUTED 400101b0: 81 e8 00 00 restore <== NOT EXECUTED 400101b4: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 400101b8: 82 00 60 01 inc %g1 400101bc: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] return RTEMS_INTERNAL_ERROR; case OBJECTS_ERROR: _RTEMS_Unlock_allocator(); 400101c0: 03 10 00 ce sethi %hi(0x40033800), %g1 400101c4: d0 00 61 e4 ld [ %g1 + 0x1e4 ], %o0 ! 400339e4 <_RTEMS_Allocator_Mutex> 400101c8: 94 10 20 00 clr %o2 400101cc: d2 02 20 08 ld [ %o0 + 8 ], %o1 400101d0: 40 00 0e 30 call 40013a90 <_CORE_mutex_Surrender> 400101d4: 90 02 20 10 add %o0, 0x10, %o0 400101d8: 7f ff ff 55 call 4000ff2c <_Thread_Enable_dispatch> 400101dc: b0 10 20 04 mov 4, %i0 400101e0: 81 c7 e0 08 ret 400101e4: 81 e8 00 00 restore return RTEMS_INVALID_ID; case OBJECTS_LOCAL: heap_status = _Heap_Extend( 400101e8: 94 10 00 1a mov %i2, %o2 400101ec: 90 02 20 68 add %o0, 0x68, %o0 400101f0: 96 07 bf f0 add %fp, -16, %o3 400101f4: 40 00 0f 62 call 40013f7c <_Heap_Extend> 400101f8: b0 10 20 09 mov 9, %i0 starting_address, length, &amount_extended ); switch ( heap_status ) { 400101fc: 80 a2 20 01 cmp %o0, 1 40010200: 02 80 00 12 be 40010248 40010204: 05 10 00 ce sethi %hi(0x40033800), %g2 40010208: 0a 80 00 08 bcs 40010228 4001020c: c6 07 bf f0 ld [ %fp + -16 ], %g3 40010210: 82 1a 20 02 xor %o0, 2, %g1 40010214: 80 a0 00 01 cmp %g0, %g1 40010218: 82 60 20 00 subx %g0, 0, %g1 4001021c: b0 08 7f e8 and %g1, -24, %i0 40010220: 10 80 00 0a b 40010248 40010224: b0 06 20 18 add %i0, 0x18, %i0 case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 40010228: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 the_region->maximum_segment_size += amount_extended; 4001022c: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 40010230: 84 00 80 03 add %g2, %g3, %g2 the_region->maximum_segment_size += amount_extended; 40010234: 82 00 40 03 add %g1, %g3, %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 40010238: c4 24 20 54 st %g2, [ %l0 + 0x54 ] the_region->maximum_segment_size += amount_extended; 4001023c: c2 24 20 5c st %g1, [ %l0 + 0x5c ] 40010240: b0 10 20 00 clr %i0 40010244: 05 10 00 ce sethi %hi(0x40033800), %g2 40010248: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 40033910 <_Thread_Dispatch_disable_level> 4001024c: 82 00 60 01 inc %g1 40010250: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] break; case HEAP_EXTEND_NOT_IMPLEMENTED: status = RTEMS_NOT_IMPLEMENTED; break; } _RTEMS_Unlock_allocator(); 40010254: 03 10 00 ce sethi %hi(0x40033800), %g1 40010258: d0 00 61 e4 ld [ %g1 + 0x1e4 ], %o0 ! 400339e4 <_RTEMS_Allocator_Mutex> 4001025c: 94 10 20 00 clr %o2 40010260: d2 02 20 08 ld [ %o0 + 8 ], %o1 40010264: 40 00 0e 0b call 40013a90 <_CORE_mutex_Surrender> 40010268: 90 02 20 10 add %o0, 0x10, %o0 4001026c: 7f ff ff 30 call 4000ff2c <_Thread_Enable_dispatch> 40010270: 01 00 00 00 nop return( status ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40010274: 81 c7 e0 08 ret 40010278: 81 e8 00 00 restore 400102b0 : uint32_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 400102b0: 9d e3 bf 90 save %sp, -112, %sp 400102b4: a4 10 00 18 mov %i0, %l2 register Region_Control *the_region; Objects_Locations location; Thread_Control *executing; void *the_segment; if ( !segment ) 400102b8: 80 a7 20 00 cmp %i4, 0 400102bc: 02 80 00 96 be 40010514 400102c0: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; *segment = NULL; 400102c4: c0 27 00 00 clr [ %i4 ] if ( size == 0 ) 400102c8: 80 a6 60 00 cmp %i1, 0 400102cc: 02 80 00 92 be 40010514 400102d0: b0 10 20 08 mov 8, %i0 return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 400102d4: 7f ff e9 1a call 4000a73c 400102d8: 01 00 00 00 nop 400102dc: a2 10 00 08 mov %o0, %l1 400102e0: 03 10 00 ce sethi %hi(0x40033800), %g1 400102e4: c2 00 61 10 ld [ %g1 + 0x110 ], %g1 ! 40033910 <_Thread_Dispatch_disable_level> 400102e8: 80 a0 60 00 cmp %g1, 0 400102ec: 02 80 00 0b be 40010318 400102f0: 03 10 00 ce sethi %hi(0x40033800), %g1 400102f4: 03 10 00 ce sethi %hi(0x40033800), %g1 <== NOT EXECUTED 400102f8: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1 ! 40033af0 <_System_state_Current> <== NOT EXECUTED 400102fc: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40010300: 08 80 00 05 bleu 40010314 <== NOT EXECUTED 40010304: 90 10 20 00 clr %o0 <== NOT EXECUTED 40010308: 92 10 20 00 clr %o1 <== NOT EXECUTED 4001030c: 40 00 10 51 call 40014450 <_Internal_error_Occurred> <== NOT EXECUTED 40010310: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 40010314: 03 10 00 ce sethi %hi(0x40033800), %g1 <== NOT EXECUTED 40010318: e0 00 61 e4 ld [ %g1 + 0x1e4 ], %l0 ! 400339e4 <_RTEMS_Allocator_Mutex> Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 4001031c: 03 10 00 ce sethi %hi(0x40033800), %g1 40010320: c4 00 61 ec ld [ %g1 + 0x1ec ], %g2 ! 400339ec <_Thread_Executing> executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40010324: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 40010328: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 4001032c: 80 a0 60 00 cmp %g1, 0 40010330: 22 80 00 33 be,a 400103fc 40010334: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 40010338: c0 24 20 60 clr [ %l0 + 0x60 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4001033c: c2 00 a0 08 ld [ %g2 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40010340: c6 04 20 58 ld [ %l0 + 0x58 ], %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; 40010344: c2 24 20 70 st %g1, [ %l0 + 0x70 ] 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; 40010348: c4 24 20 6c st %g2, [ %l0 + 0x6c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4001034c: 82 10 20 01 mov 1, %g1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40010350: 80 a0 e0 02 cmp %g3, 2 40010354: 02 80 00 05 be 40010368 40010358: c2 24 20 64 st %g1, [ %l0 + 0x64 ] 4001035c: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 40010360: 32 80 00 06 bne,a 40010378 <== NOT EXECUTED 40010364: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40010368: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 4001036c: 82 00 60 01 inc %g1 40010370: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40010374: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 40010378: 80 a0 60 03 cmp %g1, 3 4001037c: 22 80 00 03 be,a 40010388 40010380: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED _ISR_Enable( level ); 40010384: 30 80 00 2c b,a 40010434 { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 40010388: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 4001038c: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40010390: 12 80 00 03 bne 4001039c <== NOT EXECUTED 40010394: 01 00 00 00 nop <== NOT EXECUTED _ISR_Enable( level ); 40010398: 30 80 00 27 b,a 40010434 <== NOT EXECUTED return 0; } if ( current > ceiling ) { 4001039c: 28 80 00 10 bleu,a 400103dc <== NOT EXECUTED 400103a0: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400103a4: 05 10 00 ce sethi %hi(0x40033800), %g2 <== NOT EXECUTED 400103a8: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 40033910 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 400103ac: 82 00 60 01 inc %g1 <== NOT EXECUTED 400103b0: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 400103b4: 7f ff e8 e6 call 4000a74c <== NOT EXECUTED 400103b8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED _Thread_Change_priority( 400103bc: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 400103c0: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 400103c4: 40 00 15 70 call 40015984 <_Thread_Change_priority> <== NOT EXECUTED 400103c8: 94 10 20 00 clr %o2 <== NOT EXECUTED the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 400103cc: 7f ff ff ac call 4001027c <_Thread_Enable_dispatch> <== NOT EXECUTED 400103d0: 01 00 00 00 nop <== NOT EXECUTED executing = _Thread_Executing; 400103d4: 10 80 00 32 b 4001049c <== NOT EXECUTED 400103d8: 03 10 00 ce sethi %hi(0x40033800), %g1 <== NOT EXECUTED return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 400103dc: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 400103e0: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 400103e4: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 400103e8: c2 24 20 60 st %g1, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 400103ec: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 400103f0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400103f4: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 400103f8: 30 80 00 0f b,a 40010434 <== NOT EXECUTED /* * 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 ) ) { 400103fc: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40010400: 32 80 00 13 bne,a 4001044c <== NOT EXECUTED 40010404: 21 10 00 ce sethi %hi(0x40033800), %l0 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40010408: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 ! 40033850 <_Timer_Seconds_timer+0x24> <== NOT EXECUTED 4001040c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40010410: 22 80 00 07 be,a 4001042c <== NOT EXECUTED 40010414: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 40010418: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4001041c: 12 80 00 0c bne 4001044c <== NOT EXECUTED 40010420: 21 10 00 ce sethi %hi(0x40033800), %l0 <== NOT EXECUTED 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; 40010424: 10 80 00 08 b 40010444 <== NOT EXECUTED 40010428: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED * 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++; 4001042c: 82 00 60 01 inc %g1 <== NOT EXECUTED 40010430: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 40010434: 7f ff e8 c6 call 4000a74c 40010438: 90 10 00 11 mov %l1, %o0 4001043c: 10 80 00 18 b 4001049c 40010440: 03 10 00 ce sethi %hi(0x40033800), %g1 return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 40010444: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 40010448: 30 bf ff fb b,a 40010434 <== NOT EXECUTED *segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 4001044c: c6 04 21 e4 ld [ %l0 + 0x1e4 ], %g3 <== NOT EXECUTED 40010450: 03 10 00 ce sethi %hi(0x40033800), %g1 <== NOT EXECUTED 40010454: da 00 e0 08 ld [ %g3 + 8 ], %o5 <== NOT EXECUTED 40010458: c8 00 61 ec ld [ %g1 + 0x1ec ], %g4 <== NOT EXECUTED 4001045c: 05 10 00 ce sethi %hi(0x40033800), %g2 <== NOT EXECUTED 40010460: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 40033910 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40010464: da 21 20 20 st %o5, [ %g4 + 0x20 ] <== NOT EXECUTED 40010468: 82 00 60 01 inc %g1 <== NOT EXECUTED 4001046c: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] <== NOT EXECUTED 40010470: 82 00 e0 10 add %g3, 0x10, %g1 <== NOT EXECUTED 40010474: c2 21 20 44 st %g1, [ %g4 + 0x44 ] <== NOT EXECUTED 40010478: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 4001047c: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 40010480: 7f ff e8 b3 call 4000a74c <== NOT EXECUTED 40010484: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40010488: d0 04 21 e4 ld [ %l0 + 0x1e4 ], %o0 <== NOT EXECUTED 4001048c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40010490: 40 00 0d 5e call 40013a08 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 40010494: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED executing = _Thread_Executing; 40010498: 03 10 00 ce sethi %hi(0x40033800), %g1 <== NOT EXECUTED 4001049c: 11 10 00 cd sethi %hi(0x40033400), %o0 400104a0: f0 00 61 ec ld [ %g1 + 0x1ec ], %i0 400104a4: 90 12 23 28 or %o0, 0x328, %o0 400104a8: 92 10 00 12 mov %l2, %o1 400104ac: 40 00 11 5a call 40014a14 <_Objects_Get_no_protection> 400104b0: 94 07 bf f4 add %fp, -12, %o2 the_region = _Region_Get( id, &location ); switch ( location ) { 400104b4: c2 07 bf f4 ld [ %fp + -12 ], %g1 400104b8: 80 a0 60 01 cmp %g1, 1 400104bc: 02 80 00 0a be 400104e4 400104c0: a0 10 00 08 mov %o0, %l0 400104c4: 80 a0 60 01 cmp %g1, 1 400104c8: 2a 80 00 22 bcs,a 40010550 400104cc: c2 02 20 5c ld [ %o0 + 0x5c ], %g1 400104d0: 80 a0 60 02 cmp %g1, 2 400104d4: 12 80 00 10 bne 40010514 400104d8: b0 10 20 19 mov 0x19, %i0 400104dc: 10 80 00 10 b 4001051c 400104e0: 05 10 00 ce sethi %hi(0x40033800), %g2 case OBJECTS_REMOTE: /* this error cannot be returned */ _RTEMS_Unlock_allocator(); 400104e4: 05 10 00 ce sethi %hi(0x40033800), %g2 <== NOT EXECUTED 400104e8: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 40033910 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 400104ec: 82 00 60 01 inc %g1 <== NOT EXECUTED 400104f0: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] <== NOT EXECUTED 400104f4: 03 10 00 ce sethi %hi(0x40033800), %g1 <== NOT EXECUTED 400104f8: d0 00 61 e4 ld [ %g1 + 0x1e4 ], %o0 ! 400339e4 <_RTEMS_Allocator_Mutex> <== NOT EXECUTED 400104fc: 94 10 20 00 clr %o2 <== NOT EXECUTED 40010500: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 40010504: 40 00 0d 63 call 40013a90 <_CORE_mutex_Surrender> <== NOT EXECUTED 40010508: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED 4001050c: 7f ff ff 5c call 4001027c <_Thread_Enable_dispatch> <== NOT EXECUTED 40010510: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED 40010514: 81 c7 e0 08 ret <== NOT EXECUTED 40010518: 81 e8 00 00 restore <== NOT EXECUTED 4001051c: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 40010520: 82 00 60 01 inc %g1 40010524: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] return RTEMS_INTERNAL_ERROR; case OBJECTS_ERROR: _RTEMS_Unlock_allocator(); 40010528: 03 10 00 ce sethi %hi(0x40033800), %g1 4001052c: d0 00 61 e4 ld [ %g1 + 0x1e4 ], %o0 ! 400339e4 <_RTEMS_Allocator_Mutex> 40010530: 94 10 20 00 clr %o2 40010534: d2 02 20 08 ld [ %o0 + 8 ], %o1 40010538: 40 00 0d 56 call 40013a90 <_CORE_mutex_Surrender> 4001053c: 90 02 20 10 add %o0, 0x10, %o0 40010540: 7f ff ff 4f call 4001027c <_Thread_Enable_dispatch> 40010544: b0 10 20 04 mov 4, %i0 40010548: 81 c7 e0 08 ret 4001054c: 81 e8 00 00 restore return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) { 40010550: 80 a6 40 01 cmp %i1, %g1 40010554: 08 80 00 0f bleu 40010590 40010558: 05 10 00 ce sethi %hi(0x40033800), %g2 4001055c: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 40033910 <_Thread_Dispatch_disable_level> 40010560: 82 00 60 01 inc %g1 40010564: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] _RTEMS_Unlock_allocator(); 40010568: 03 10 00 ce sethi %hi(0x40033800), %g1 4001056c: d0 00 61 e4 ld [ %g1 + 0x1e4 ], %o0 ! 400339e4 <_RTEMS_Allocator_Mutex> 40010570: 94 10 20 00 clr %o2 40010574: d2 02 20 08 ld [ %o0 + 8 ], %o1 40010578: 40 00 0d 46 call 40013a90 <_CORE_mutex_Surrender> 4001057c: 90 02 20 10 add %o0, 0x10, %o0 40010580: 7f ff ff 3f call 4001027c <_Thread_Enable_dispatch> 40010584: b0 10 20 08 mov 8, %i0 40010588: 81 c7 e0 08 ret 4001058c: 81 e8 00 00 restore RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uint32_t size ) { return _Heap_Allocate( &the_region->Memory, size ); 40010590: 90 02 20 68 add %o0, 0x68, %o0 40010594: 40 00 0e 53 call 40013ee0 <_Heap_Allocate> 40010598: 92 10 00 19 mov %i1, %o1 the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 4001059c: a2 92 20 00 orcc %o0, 0, %l1 400105a0: 02 80 00 13 be 400105ec 400105a4: 07 10 00 ce sethi %hi(0x40033800), %g3 the_region->number_of_used_blocks += 1; 400105a8: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 400105ac: c4 00 e1 10 ld [ %g3 + 0x110 ], %g2 400105b0: 82 00 60 01 inc %g1 400105b4: c2 24 20 64 st %g1, [ %l0 + 0x64 ] 400105b8: 84 00 a0 01 inc %g2 400105bc: c4 20 e1 10 st %g2, [ %g3 + 0x110 ] _RTEMS_Unlock_allocator(); 400105c0: 03 10 00 ce sethi %hi(0x40033800), %g1 400105c4: d0 00 61 e4 ld [ %g1 + 0x1e4 ], %o0 ! 400339e4 <_RTEMS_Allocator_Mutex> 400105c8: 94 10 20 00 clr %o2 400105cc: d2 02 20 08 ld [ %o0 + 8 ], %o1 400105d0: 40 00 0d 30 call 40013a90 <_CORE_mutex_Surrender> 400105d4: 90 02 20 10 add %o0, 0x10, %o0 400105d8: 7f ff ff 29 call 4001027c <_Thread_Enable_dispatch> 400105dc: b0 10 20 00 clr %i0 *segment = the_segment; 400105e0: e2 27 00 00 st %l1, [ %i4 ] 400105e4: 81 c7 e0 08 ret 400105e8: 81 e8 00 00 restore return RTEMS_SUCCESSFUL; } if ( _Options_Is_no_wait( option_set ) ) { 400105ec: 80 8e a0 01 btst 1, %i2 400105f0: 05 10 00 ce sethi %hi(0x40033800), %g2 400105f4: 02 80 00 0e be 4001062c 400105f8: 07 10 00 ce sethi %hi(0x40033800), %g3 400105fc: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 40010600: 82 00 60 01 inc %g1 40010604: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] _RTEMS_Unlock_allocator(); 40010608: d0 00 e1 e4 ld [ %g3 + 0x1e4 ], %o0 4001060c: 94 10 20 00 clr %o2 40010610: d2 02 20 08 ld [ %o0 + 8 ], %o1 40010614: 40 00 0d 1f call 40013a90 <_CORE_mutex_Surrender> 40010618: 90 02 20 10 add %o0, 0x10, %o0 4001061c: 7f ff ff 18 call 4001027c <_Thread_Enable_dispatch> 40010620: b0 10 20 0d mov 0xd, %i0 40010624: 81 c7 e0 08 ret 40010628: 81 e8 00 00 restore 4001062c: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 40010630: 82 00 60 01 inc %g1 40010634: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] 40010638: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 4001063c: 82 00 60 01 inc %g1 40010640: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] * Switch from using the memory allocation mutex to using a * dispatching disabled critical section. We have to do this * because this thread is going to block. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); 40010644: d0 00 e1 e4 ld [ %g3 + 0x1e4 ], %o0 40010648: 94 10 20 00 clr %o2 4001064c: d2 02 20 08 ld [ %o0 + 8 ], %o1 40010650: 40 00 0d 10 call 40013a90 <_CORE_mutex_Surrender> 40010654: 90 02 20 10 add %o0, 0x10, %o0 40010658: 7f ff ff 09 call 4001027c <_Thread_Enable_dispatch> 4001065c: 01 00 00 00 nop executing->Wait.queue = &the_region->Wait_queue; 40010660: 82 04 20 10 add %l0, 0x10, %g1 executing->Wait.count = size; executing->Wait.return_argument = segment; _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); 40010664: 92 10 00 1b mov %i3, %o1 40010668: 90 10 00 01 mov %g1, %o0 * because this thread is going to block. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); executing->Wait.queue = &the_region->Wait_queue; 4001066c: c2 26 20 44 st %g1, [ %i0 + 0x44 ] executing->Wait.count = size; executing->Wait.return_argument = segment; _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); 40010670: 15 10 00 5a sethi %hi(0x40016800), %o2 40010674: 82 10 20 01 mov 1, %g1 40010678: 94 12 a0 6c or %o2, 0x6c, %o2 */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); executing->Wait.queue = &the_region->Wait_queue; executing->Wait.id = id; 4001067c: e4 26 20 20 st %l2, [ %i0 + 0x20 ] executing->Wait.count = size; 40010680: f2 26 20 24 st %i1, [ %i0 + 0x24 ] executing->Wait.return_argument = segment; 40010684: f8 26 20 28 st %i4, [ %i0 + 0x28 ] _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); 40010688: 40 00 17 53 call 400163d4 <_Thread_queue_Enqueue_with_handler> 4001068c: c2 24 20 40 st %g1, [ %l0 + 0x40 ] _Thread_Enable_dispatch(); 40010690: 7f ff fe fb call 4001027c <_Thread_Enable_dispatch> 40010694: 01 00 00 00 nop return (rtems_status_code) executing->Wait.return_code; 40010698: f0 06 20 34 ld [ %i0 + 0x34 ], %i0 } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4001069c: 81 c7 e0 08 ret 400106a0: 81 e8 00 00 restore 40010710 : rtems_status_code rtems_region_return_segment( Objects_Id id, void *segment ) { 40010710: 9d e3 bf 90 save %sp, -112, %sp #ifdef RTEMS_REGION_FREE_SHRED_PATTERN uint32_t size; #endif int status; _RTEMS_Lock_allocator(); 40010714: 7f ff e8 0a call 4000a73c 40010718: 01 00 00 00 nop 4001071c: a2 10 00 08 mov %o0, %l1 40010720: 03 10 00 ce sethi %hi(0x40033800), %g1 40010724: c2 00 61 10 ld [ %g1 + 0x110 ], %g1 ! 40033910 <_Thread_Dispatch_disable_level> 40010728: 80 a0 60 00 cmp %g1, 0 4001072c: 02 80 00 0b be 40010758 40010730: 03 10 00 ce sethi %hi(0x40033800), %g1 40010734: 03 10 00 ce sethi %hi(0x40033800), %g1 <== NOT EXECUTED 40010738: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1 ! 40033af0 <_System_state_Current> <== NOT EXECUTED 4001073c: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40010740: 08 80 00 05 bleu 40010754 <== NOT EXECUTED 40010744: 90 10 20 00 clr %o0 <== NOT EXECUTED 40010748: 92 10 20 00 clr %o1 <== NOT EXECUTED 4001074c: 40 00 0f 41 call 40014450 <_Internal_error_Occurred> <== NOT EXECUTED 40010750: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 40010754: 03 10 00 ce sethi %hi(0x40033800), %g1 <== NOT EXECUTED 40010758: e0 00 61 e4 ld [ %g1 + 0x1e4 ], %l0 ! 400339e4 <_RTEMS_Allocator_Mutex> Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 4001075c: 03 10 00 ce sethi %hi(0x40033800), %g1 40010760: c4 00 61 ec ld [ %g1 + 0x1ec ], %g2 ! 400339ec <_Thread_Executing> executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40010764: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 40010768: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 4001076c: 80 a0 60 00 cmp %g1, 0 40010770: 22 80 00 33 be,a 4001083c 40010774: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 40010778: c0 24 20 60 clr [ %l0 + 0x60 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4001077c: c2 00 a0 08 ld [ %g2 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40010780: c6 04 20 58 ld [ %l0 + 0x58 ], %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; 40010784: c2 24 20 70 st %g1, [ %l0 + 0x70 ] 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; 40010788: c4 24 20 6c st %g2, [ %l0 + 0x6c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4001078c: 82 10 20 01 mov 1, %g1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40010790: 80 a0 e0 02 cmp %g3, 2 40010794: 02 80 00 05 be 400107a8 40010798: c2 24 20 64 st %g1, [ %l0 + 0x64 ] 4001079c: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 400107a0: 32 80 00 06 bne,a 400107b8 <== NOT EXECUTED 400107a4: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 400107a8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 400107ac: 82 00 60 01 inc %g1 400107b0: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 400107b4: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 400107b8: 80 a0 60 03 cmp %g1, 3 400107bc: 22 80 00 03 be,a 400107c8 400107c0: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED _ISR_Enable( level ); 400107c4: 30 80 00 2c b,a 40010874 { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 400107c8: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 400107cc: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 400107d0: 12 80 00 03 bne 400107dc <== NOT EXECUTED 400107d4: 01 00 00 00 nop <== NOT EXECUTED _ISR_Enable( level ); 400107d8: 30 80 00 27 b,a 40010874 <== NOT EXECUTED return 0; } if ( current > ceiling ) { 400107dc: 08 80 00 10 bleu 4001081c <== NOT EXECUTED 400107e0: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400107e4: 05 10 00 ce sethi %hi(0x40033800), %g2 <== NOT EXECUTED 400107e8: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 40033910 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 400107ec: 82 00 60 01 inc %g1 <== NOT EXECUTED 400107f0: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 400107f4: 7f ff e7 d6 call 4000a74c <== NOT EXECUTED 400107f8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED _Thread_Change_priority( 400107fc: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 40010800: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 40010804: 40 00 14 60 call 40015984 <_Thread_Change_priority> <== NOT EXECUTED 40010808: 94 10 20 00 clr %o2 <== NOT EXECUTED the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 4001080c: 7f ff ff b4 call 400106dc <_Thread_Enable_dispatch> <== NOT EXECUTED 40010810: 01 00 00 00 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 40010814: 10 80 00 32 b 400108dc <== NOT EXECUTED 40010818: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4001081c: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 40010820: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40010824: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 40010828: c2 24 20 60 st %g1, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 4001082c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40010830: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40010834: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40010838: 30 80 00 0f b,a 40010874 <== NOT EXECUTED /* * 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 ) ) { 4001083c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40010840: 32 80 00 13 bne,a 4001088c <== NOT EXECUTED 40010844: 21 10 00 ce sethi %hi(0x40033800), %l0 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40010848: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 ! 40033850 <_Timer_Seconds_timer+0x24> <== NOT EXECUTED 4001084c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40010850: 22 80 00 07 be,a 4001086c <== NOT EXECUTED 40010854: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 40010858: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4001085c: 12 80 00 0c bne 4001088c <== NOT EXECUTED 40010860: 21 10 00 ce sethi %hi(0x40033800), %l0 <== NOT EXECUTED 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; 40010864: 10 80 00 08 b 40010884 <== NOT EXECUTED 40010868: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED * 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++; 4001086c: 82 00 60 01 inc %g1 <== NOT EXECUTED 40010870: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 40010874: 7f ff e7 b6 call 4000a74c 40010878: 90 10 00 11 mov %l1, %o0 4001087c: 10 80 00 18 b 400108dc 40010880: 92 10 00 18 mov %i0, %o1 return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 40010884: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 40010888: 30 bf ff fb b,a 40010874 <== NOT EXECUTED 4001088c: c6 04 21 e4 ld [ %l0 + 0x1e4 ], %g3 <== NOT EXECUTED 40010890: 03 10 00 ce sethi %hi(0x40033800), %g1 <== NOT EXECUTED 40010894: da 00 e0 08 ld [ %g3 + 8 ], %o5 <== NOT EXECUTED 40010898: c8 00 61 ec ld [ %g1 + 0x1ec ], %g4 <== NOT EXECUTED 4001089c: 05 10 00 ce sethi %hi(0x40033800), %g2 <== NOT EXECUTED 400108a0: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 40033910 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 400108a4: da 21 20 20 st %o5, [ %g4 + 0x20 ] <== NOT EXECUTED 400108a8: 82 00 60 01 inc %g1 <== NOT EXECUTED 400108ac: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] <== NOT EXECUTED 400108b0: 82 00 e0 10 add %g3, 0x10, %g1 <== NOT EXECUTED 400108b4: c2 21 20 44 st %g1, [ %g4 + 0x44 ] <== NOT EXECUTED 400108b8: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 400108bc: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 400108c0: 7f ff e7 a3 call 4000a74c <== NOT EXECUTED 400108c4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400108c8: d0 04 21 e4 ld [ %l0 + 0x1e4 ], %o0 <== NOT EXECUTED 400108cc: 92 10 20 00 clr %o1 <== NOT EXECUTED 400108d0: 40 00 0c 4e call 40013a08 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 400108d4: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED 400108d8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 400108dc: 11 10 00 cd sethi %hi(0x40033400), %o0 400108e0: 94 07 bf f4 add %fp, -12, %o2 400108e4: 40 00 10 4c call 40014a14 <_Objects_Get_no_protection> 400108e8: 90 12 23 28 or %o0, 0x328, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 400108ec: c2 07 bf f4 ld [ %fp + -12 ], %g1 400108f0: 80 a0 60 01 cmp %g1, 1 400108f4: 02 80 00 0a be 4001091c 400108f8: a0 10 00 08 mov %o0, %l0 400108fc: 80 a0 60 01 cmp %g1, 1 40010900: 0a 80 00 22 bcs 40010988 40010904: 92 10 00 19 mov %i1, %o1 40010908: 80 a0 60 02 cmp %g1, 2 4001090c: 12 80 00 10 bne 4001094c 40010910: b0 10 20 19 mov 0x19, %i0 40010914: 10 80 00 10 b 40010954 40010918: 05 10 00 ce sethi %hi(0x40033800), %g2 case OBJECTS_REMOTE: /* this error cannot be returned */ _RTEMS_Unlock_allocator(); 4001091c: 05 10 00 ce sethi %hi(0x40033800), %g2 <== NOT EXECUTED 40010920: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 40033910 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40010924: 82 00 60 01 inc %g1 <== NOT EXECUTED 40010928: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] <== NOT EXECUTED 4001092c: 03 10 00 ce sethi %hi(0x40033800), %g1 <== NOT EXECUTED 40010930: d0 00 61 e4 ld [ %g1 + 0x1e4 ], %o0 ! 400339e4 <_RTEMS_Allocator_Mutex> <== NOT EXECUTED 40010934: 94 10 20 00 clr %o2 <== NOT EXECUTED 40010938: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 4001093c: 40 00 0c 55 call 40013a90 <_CORE_mutex_Surrender> <== NOT EXECUTED 40010940: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED 40010944: 7f ff ff 66 call 400106dc <_Thread_Enable_dispatch> <== NOT EXECUTED 40010948: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED 4001094c: 81 c7 e0 08 ret <== NOT EXECUTED 40010950: 81 e8 00 00 restore <== NOT EXECUTED 40010954: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 40010958: 82 00 60 01 inc %g1 4001095c: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] return RTEMS_INTERNAL_ERROR; case OBJECTS_ERROR: _RTEMS_Unlock_allocator(); 40010960: 03 10 00 ce sethi %hi(0x40033800), %g1 40010964: d0 00 61 e4 ld [ %g1 + 0x1e4 ], %o0 ! 400339e4 <_RTEMS_Allocator_Mutex> 40010968: 94 10 20 00 clr %o2 4001096c: d2 02 20 08 ld [ %o0 + 8 ], %o1 40010970: 40 00 0c 48 call 40013a90 <_CORE_mutex_Surrender> 40010974: 90 02 20 10 add %o0, 0x10, %o0 40010978: 7f ff ff 59 call 400106dc <_Thread_Enable_dispatch> 4001097c: b0 10 20 04 mov 4, %i0 40010980: 81 c7 e0 08 ret 40010984: 81 e8 00 00 restore RTEMS_INLINE_ROUTINE boolean _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 40010988: 40 00 0d ae call 40014040 <_Heap_Free> 4001098c: 90 02 20 68 add %o0, 0x68, %o0 status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) { 40010990: 80 a2 20 00 cmp %o0, 0 40010994: 12 80 00 0f bne 400109d0 40010998: 05 10 00 ce sethi %hi(0x40033800), %g2 4001099c: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 40033910 <_Thread_Dispatch_disable_level> 400109a0: 82 00 60 01 inc %g1 400109a4: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] _RTEMS_Unlock_allocator(); 400109a8: 03 10 00 ce sethi %hi(0x40033800), %g1 400109ac: d0 00 61 e4 ld [ %g1 + 0x1e4 ], %o0 ! 400339e4 <_RTEMS_Allocator_Mutex> 400109b0: 94 10 20 00 clr %o2 400109b4: d2 02 20 08 ld [ %o0 + 8 ], %o1 400109b8: 40 00 0c 36 call 40013a90 <_CORE_mutex_Surrender> 400109bc: 90 02 20 10 add %o0, 0x10, %o0 400109c0: 7f ff ff 47 call 400106dc <_Thread_Enable_dispatch> 400109c4: b0 10 20 09 mov 9, %i0 400109c8: 81 c7 e0 08 ret 400109cc: 81 e8 00 00 restore return RTEMS_INVALID_ADDRESS; } the_region->number_of_used_blocks -= 1; 400109d0: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 _Region_Process_queue(the_region); /* unlocks allocator internally */ 400109d4: 90 10 00 10 mov %l0, %o0 if ( !status ) { _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ADDRESS; } the_region->number_of_used_blocks -= 1; 400109d8: 82 00 7f ff add %g1, -1, %g1 _Region_Process_queue(the_region); /* unlocks allocator internally */ 400109dc: b0 10 20 00 clr %i0 400109e0: 40 00 24 e0 call 40019d60 <_Region_Process_queue> 400109e4: c2 24 20 64 st %g1, [ %l0 + 0x64 ] return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400109e8: 81 c7 e0 08 ret 400109ec: 81 e8 00 00 restore 400055b8 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 400055b8: 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 ) ) 400055bc: a8 96 20 00 orcc %i0, 0, %l4 400055c0: 02 80 00 2c be 40005670 400055c4: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 400055c8: 80 a7 20 00 cmp %i4, 0 400055cc: 02 80 00 29 be 40005670 400055d0: b0 10 20 09 mov 9, %i0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 400055d4: a4 8e a0 40 andcc %i2, 0x40, %l2 400055d8: 12 80 00 06 bne 400055f0 400055dc: 82 0e a0 30 and %i2, 0x30, %g1 400055e0: 80 8e a0 80 btst 0x80, %i2 400055e4: 02 80 00 10 be 40005624 400055e8: a6 0e a0 30 and %i2, 0x30, %l3 RTEMS_INLINE_ROUTINE boolean _Attributes_Is_binary_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE); 400055ec: 82 0e a0 30 and %i2, 0x30, %g1 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 400055f0: 80 a0 60 10 cmp %g1, 0x10 400055f4: 02 80 00 05 be 40005608 400055f8: 80 8e a0 04 btst 4, %i2 400055fc: 80 a0 60 20 cmp %g1, 0x20 40005600: 12 80 00 71 bne 400057c4 40005604: 80 8e a0 04 btst 4, %i2 40005608: 02 80 00 6f be 400057c4 4000560c: 80 a4 a0 00 cmp %l2, 0 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 40005610: 02 80 00 04 be 40005620 40005614: 80 8e a0 80 btst 0x80, %i2 40005618: 32 80 00 16 bne,a 40005670 4000561c: b0 10 20 0b mov 0xb, %i0 RTEMS_INLINE_ROUTINE boolean _Attributes_Is_counting_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE); 40005620: a6 0e a0 30 and %i2, 0x30, %l3 40005624: 80 a0 00 13 cmp %g0, %l3 40005628: a2 60 3f ff subx %g0, -1, %l1 _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 4000562c: 80 a4 60 00 cmp %l1, 0 40005630: 12 80 00 04 bne 40005640 40005634: 80 a6 60 01 cmp %i1, 1 40005638: 18 80 00 0e bgu 40005670 4000563c: b0 10 20 0a mov 0xa, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40005640: 03 10 00 67 sethi %hi(0x40019c00), %g1 40005644: c4 00 62 20 ld [ %g1 + 0x220 ], %g2 ! 40019e20 <_Thread_Dispatch_disable_level> 40005648: 84 00 a0 01 inc %g2 4000564c: c4 20 62 20 st %g2, [ %g1 + 0x220 ] * the inactive chain of free semaphore control blocks. */ RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void ) { return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information ); 40005650: 11 10 00 67 sethi %hi(0x40019c00), %o0 40005654: 40 00 07 06 call 4000726c <_Objects_Allocate> 40005658: 90 12 20 d4 or %o0, 0xd4, %o0 ! 40019cd4 <_Semaphore_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 4000565c: a0 92 20 00 orcc %o0, 0, %l0 40005660: 12 80 00 06 bne 40005678 40005664: 80 a4 60 00 cmp %l1, 0 _Thread_Enable_dispatch(); 40005668: 7f ff ff c7 call 40005584 <_Thread_Enable_dispatch> 4000566c: b0 10 20 05 mov 5, %i0 40005670: 81 c7 e0 08 ret 40005674: 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 ) ) { 40005678: 12 80 00 32 bne 40005740 4000567c: f4 24 20 10 st %i2, [ %l0 + 0x10 ] CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 40005680: 80 a4 a0 00 cmp %l2, 0 40005684: 12 80 00 06 bne 4000569c 40005688: 82 10 20 02 mov 2, %g1 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 4000568c: 80 8e a0 80 btst 0x80, %i2 40005690: 02 80 00 05 be 400056a4 40005694: 80 8e a0 04 btst 4, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 40005698: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED 4000569c: 10 80 00 05 b 400056b0 400056a0: c2 27 bf e8 st %g1, [ %fp + -24 ] else if ( _Attributes_Is_priority( attribute_set ) ) 400056a4: 12 bf ff fe bne 4000569c 400056a8: 82 10 20 01 mov 1, %g1 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; 400056ac: c0 27 bf e8 clr [ %fp + -24 ] if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 400056b0: 80 a4 e0 10 cmp %l3, 0x10 400056b4: 12 80 00 0f bne 400056f0 400056b8: 82 10 20 02 mov 2, %g1 the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 400056bc: c2 07 bf e8 ld [ %fp + -24 ], %g1 400056c0: 80 a0 60 01 cmp %g1, 1 400056c4: 08 80 00 07 bleu 400056e0 400056c8: c0 27 bf e0 clr [ %fp + -32 ] 400056cc: 80 a0 60 03 cmp %g1, 3 400056d0: 38 80 00 0b bgu,a 400056fc 400056d4: 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; 400056d8: 10 80 00 04 b 400056e8 400056dc: 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; 400056e0: 10 80 00 06 b 400056f8 400056e4: c0 27 bf e4 clr [ %fp + -28 ] break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_mutex_attributes.only_owner_release = TRUE; 400056e8: 10 80 00 04 b 400056f8 400056ec: c2 27 bf e4 st %g1, [ %fp + -28 ] break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; the_mutex_attributes.only_owner_release = FALSE; 400056f0: c0 27 bf e4 clr [ %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; 400056f4: 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( 400056f8: 82 1e 60 01 xor %i1, 1, %g1 400056fc: 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; 40005700: f6 27 bf ec st %i3, [ %fp + -20 ] mutex_status = _CORE_mutex_Initialize( 40005704: 94 60 3f ff subx %g0, -1, %o2 40005708: 90 04 20 14 add %l0, 0x14, %o0 4000570c: 40 00 04 63 call 40006898 <_CORE_mutex_Initialize> 40005710: 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 ) { 40005714: 80 a2 20 06 cmp %o0, 6 40005718: 12 80 00 17 bne 40005774 4000571c: 92 10 00 10 mov %l0, %o1 RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 40005720: 11 10 00 67 sethi %hi(0x40019c00), %o0 <== NOT EXECUTED 40005724: 90 12 20 d4 or %o0, 0xd4, %o0 ! 40019cd4 <_Semaphore_Information> <== NOT EXECUTED 40005728: 40 00 07 d3 call 40007674 <_Objects_Free> <== NOT EXECUTED 4000572c: b0 10 20 13 mov 0x13, %i0 <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 40005730: 7f ff ff 95 call 40005584 <_Thread_Enable_dispatch> <== NOT EXECUTED 40005734: 01 00 00 00 nop <== NOT EXECUTED 40005738: 81 c7 e0 08 ret <== NOT EXECUTED 4000573c: 81 e8 00 00 restore <== NOT EXECUTED return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) 40005740: 80 8e a0 04 btst 4, %i2 40005744: 22 80 00 04 be,a 40005754 40005748: c0 27 bf f4 clr [ %fp + -12 ] the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 4000574c: 82 10 20 01 mov 1, %g1 40005750: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 40005754: 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; 40005758: c0 27 bf e0 clr [ %fp + -32 ] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; 4000575c: c0 27 bf ec clr [ %fp + -20 ] _CORE_semaphore_Initialize( 40005760: 94 10 00 19 mov %i1, %o2 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 40005764: 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( 40005768: 90 04 20 14 add %l0, 0x14, %o0 4000576c: 40 00 04 fa call 40006b54 <_CORE_semaphore_Initialize> 40005770: 92 07 bf f0 add %fp, -16, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40005774: 03 10 00 67 sethi %hi(0x40019c00), %g1 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 40005778: c6 04 20 08 ld [ %l0 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000577c: 88 10 60 d4 or %g1, 0xd4, %g4 40005780: c4 11 20 10 lduh [ %g4 + 0x10 ], %g2 40005784: 03 00 00 3f sethi %hi(0xfc00), %g1 40005788: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000578c: 82 08 c0 01 and %g3, %g1, %g1 40005790: 80 a0 40 02 cmp %g1, %g2 40005794: 38 80 00 06 bgu,a 400057ac 40005798: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED information->local_table[ index ] = the_object; 4000579c: c4 01 20 20 ld [ %g4 + 0x20 ], %g2 400057a0: 83 28 60 02 sll %g1, 2, %g1 400057a4: e0 20 80 01 st %l0, [ %g2 + %g1 ] &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 400057a8: c2 04 20 08 ld [ %l0 + 8 ], %g1 if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 400057ac: e8 24 20 0c st %l4, [ %l0 + 0xc ] 400057b0: c2 27 00 00 st %g1, [ %i4 ] the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 400057b4: 7f ff ff 74 call 40005584 <_Thread_Enable_dispatch> 400057b8: b0 10 20 00 clr %i0 400057bc: 81 c7 e0 08 ret 400057c0: 81 e8 00 00 restore return RTEMS_SUCCESSFUL; 400057c4: b0 10 20 0b mov 0xb, %i0 } 400057c8: 81 c7 e0 08 ret 400057cc: 81 e8 00 00 restore 40005804 : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 40005804: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 40005808: 11 10 00 67 sethi %hi(0x40019c00), %o0 4000580c: 92 10 00 18 mov %i0, %o1 40005810: 90 12 20 d4 or %o0, 0xd4, %o0 40005814: 40 00 07 da call 4000777c <_Objects_Get> 40005818: 94 07 bf f4 add %fp, -12, %o2 register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 4000581c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005820: 80 a0 60 00 cmp %g1, 0 40005824: 02 80 00 07 be 40005840 40005828: b0 10 00 08 mov %o0, %i0 4000582c: 80 a0 60 02 cmp %g1, 2 40005830: 08 80 00 10 bleu 40005870 40005834: b0 10 20 04 mov 4, %i0 40005838: 81 c7 e0 08 ret <== NOT EXECUTED 4000583c: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED 40005840: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 40005844: 84 88 60 30 andcc %g1, 0x30, %g2 40005848: 22 80 00 12 be,a 40005890 4000584c: 90 02 20 14 add %o0, 0x14, %o0 if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 40005850: c2 02 20 64 ld [ %o0 + 0x64 ], %g1 40005854: 80 a0 60 00 cmp %g1, 0 40005858: 12 80 00 08 bne 40005878 4000585c: 80 a0 a0 20 cmp %g2, 0x20 40005860: 02 80 00 07 be 4000587c 40005864: 90 06 20 14 add %i0, 0x14, %o0 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 40005868: 7f ff ff da call 400057d0 <_Thread_Enable_dispatch> 4000586c: b0 10 20 0c mov 0xc, %i0 40005870: 81 c7 e0 08 ret 40005874: 81 e8 00 00 restore return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 40005878: 90 06 20 14 add %i0, 0x14, %o0 4000587c: 92 10 20 00 clr %o1 40005880: 40 00 04 02 call 40006888 <_CORE_mutex_Flush> 40005884: 94 10 20 04 mov 4, %o2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40005888: 10 80 00 06 b 400058a0 4000588c: 03 10 00 67 sethi %hi(0x40019c00), %g1 &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 40005890: 92 10 20 00 clr %o1 40005894: 40 00 04 ac call 40006b44 <_CORE_semaphore_Flush> 40005898: 94 10 20 02 mov 2, %o2 4000589c: 03 10 00 67 sethi %hi(0x40019c00), %g1 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 400058a0: c6 06 20 08 ld [ %i0 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400058a4: 90 10 60 d4 or %g1, 0xd4, %o0 400058a8: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 400058ac: 03 00 00 3f sethi %hi(0xfc00), %g1 400058b0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400058b4: 82 08 c0 01 and %g3, %g1, %g1 400058b8: 80 a0 40 02 cmp %g1, %g2 400058bc: 18 80 00 05 bgu 400058d0 400058c0: 92 10 00 18 mov %i0, %o1 information->local_table[ index ] = the_object; 400058c4: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 400058c8: 83 28 60 02 sll %g1, 2, %g1 400058cc: c0 20 80 01 clr [ %g2 + %g1 ] uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 400058d0: c0 26 20 0c clr [ %i0 + 0xc ] RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 400058d4: 40 00 07 68 call 40007674 <_Objects_Free> 400058d8: b0 10 20 00 clr %i0 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 400058dc: 7f ff ff bd call 400057d0 <_Thread_Enable_dispatch> 400058e0: 01 00 00 00 nop return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400058e4: 81 c7 e0 08 ret 400058e8: 81 e8 00 00 restore 40005d48 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 40005d48: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 40005d4c: 11 10 00 6f sethi %hi(0x4001bc00), %o0 40005d50: 92 10 00 18 mov %i0, %o1 40005d54: 90 12 22 ac or %o0, 0x2ac, %o0 40005d58: 40 00 08 57 call 40007eb4 <_Objects_Get> 40005d5c: 94 07 bf f4 add %fp, -12, %o2 register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 40005d60: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005d64: 80 a0 60 00 cmp %g1, 0 40005d68: 22 80 00 07 be,a 40005d84 40005d6c: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40005d70: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40005d74: 08 80 00 19 bleu 40005dd8 <== NOT EXECUTED 40005d78: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED 40005d7c: 81 c7 e0 08 ret <== NOT EXECUTED 40005d80: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 40005d84: 80 88 60 30 btst 0x30, %g1 40005d88: 02 80 00 06 be 40005da0 40005d8c: 90 02 20 14 add %o0, 0x14, %o0 _CORE_mutex_Flush( 40005d90: 92 10 20 00 clr %o1 40005d94: 40 00 04 8b call 40006fc0 <_CORE_mutex_Flush> 40005d98: 94 10 20 01 mov 1, %o2 40005d9c: 30 80 00 04 b,a 40005dac &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 40005da0: 92 10 20 00 clr %o1 <== NOT EXECUTED 40005da4: 40 00 05 36 call 4000727c <_CORE_semaphore_Flush> <== NOT EXECUTED 40005da8: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40005dac: 03 10 00 70 sethi %hi(0x4001c000), %g1 40005db0: c4 00 60 00 ld [ %g1 ], %g2 40005db4: b0 10 20 00 clr %i0 40005db8: 84 00 bf ff add %g2, -1, %g2 40005dbc: c4 20 60 00 st %g2, [ %g1 ] 40005dc0: c2 00 60 00 ld [ %g1 ], %g1 40005dc4: 80 a0 60 00 cmp %g1, 0 40005dc8: 12 80 00 04 bne 40005dd8 40005dcc: 01 00 00 00 nop _Thread_Dispatch(); 40005dd0: 40 00 0c ee call 40009188 <_Thread_Dispatch> 40005dd4: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40005dd8: 81 c7 e0 08 ret 40005ddc: 81 e8 00 00 restore 40005920 : rtems_status_code rtems_semaphore_obtain( rtems_id id, uint32_t option_set, rtems_interval timeout ) { 40005920: 9d e3 bf 90 save %sp, -112, %sp Objects_Id id, Objects_Locations *location, ISR_Level *level ) { return (Semaphore_Control *) 40005924: 11 10 00 67 sethi %hi(0x40019c00), %o0 40005928: 92 10 00 18 mov %i0, %o1 4000592c: 90 12 20 d4 or %o0, 0xd4, %o0 40005930: 94 07 bf f4 add %fp, -12, %o2 40005934: 40 00 07 74 call 40007704 <_Objects_Get_isr_disable> 40005938: 96 07 bf f0 add %fp, -16, %o3 register Semaphore_Control *the_semaphore; Objects_Locations location; ISR_Level level; the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { 4000593c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005940: 80 a0 60 00 cmp %g1, 0 40005944: 02 80 00 07 be 40005960 40005948: a0 10 00 08 mov %o0, %l0 4000594c: 80 a0 60 02 cmp %g1, 2 40005950: 08 80 00 ab bleu 40005bfc 40005954: 90 10 20 04 mov 4, %o0 40005958: 10 80 00 a9 b 40005bfc <== NOT EXECUTED 4000595c: 90 10 20 19 mov 0x19, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 40005960: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40005964: 80 88 60 30 btst 0x30, %g1 40005968: 02 80 00 7c be 40005b58 4000596c: 03 10 00 67 sethi %hi(0x40019c00), %g1 _CORE_mutex_Seize( 40005970: 03 10 00 67 sethi %hi(0x40019c00), %g1 40005974: c2 00 62 20 ld [ %g1 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> 40005978: 80 a0 60 00 cmp %g1, 0 4000597c: 02 80 00 0e be 400059b4 40005980: 03 10 00 67 sethi %hi(0x40019c00), %g1 40005984: 80 8e 60 01 btst 1, %i1 40005988: 12 80 00 0c bne 400059b8 4000598c: c4 00 62 fc ld [ %g1 + 0x2fc ], %g2 40005990: 03 10 00 68 sethi %hi(0x4001a000), %g1 40005994: c2 00 60 00 ld [ %g1 ], %g1 40005998: 80 a0 60 01 cmp %g1, 1 4000599c: 08 80 00 05 bleu 400059b0 400059a0: 90 10 20 00 clr %o0 400059a4: 92 10 20 00 clr %o1 <== NOT EXECUTED 400059a8: 40 00 06 04 call 400071b8 <_Internal_error_Occurred> <== NOT EXECUTED 400059ac: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 400059b0: 03 10 00 67 sethi %hi(0x40019c00), %g1 400059b4: c4 00 62 fc ld [ %g1 + 0x2fc ], %g2 ! 40019efc <_Thread_Executing> CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 400059b8: d0 07 bf f0 ld [ %fp + -16 ], %o0 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 400059bc: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 400059c0: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 400059c4: 80 a0 60 00 cmp %g1, 0 400059c8: 22 80 00 33 be,a 40005a94 400059cc: c2 04 20 70 ld [ %l0 + 0x70 ], %g1 the_mutex->lock = CORE_MUTEX_LOCKED; 400059d0: c0 24 20 64 clr [ %l0 + 0x64 ] the_mutex->holder = executing; 400059d4: c4 24 20 70 st %g2, [ %l0 + 0x70 ] the_mutex->holder_id = executing->Object.id; 400059d8: c2 00 a0 08 ld [ %g2 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 400059dc: c6 04 20 5c ld [ %l0 + 0x5c ], %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; 400059e0: c2 24 20 74 st %g1, [ %l0 + 0x74 ] the_mutex->nest_count = 1; 400059e4: 82 10 20 01 mov 1, %g1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 400059e8: 80 a0 e0 02 cmp %g3, 2 400059ec: 02 80 00 05 be 40005a00 400059f0: c2 24 20 68 st %g1, [ %l0 + 0x68 ] 400059f4: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 400059f8: 32 80 00 06 bne,a 40005a10 <== NOT EXECUTED 400059fc: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40005a00: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 40005a04: 82 00 60 01 inc %g1 40005a08: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40005a0c: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 40005a10: 80 a0 60 03 cmp %g1, 3 40005a14: 22 80 00 03 be,a 40005a20 40005a18: c6 04 20 60 ld [ %l0 + 0x60 ], %g3 <== NOT EXECUTED _ISR_Enable( level ); 40005a1c: 30 80 00 2e b,a 40005ad4 { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 40005a20: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 40005a24: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40005a28: 12 80 00 03 bne 40005a34 <== NOT EXECUTED 40005a2c: 01 00 00 00 nop <== NOT EXECUTED _ISR_Enable( level ); 40005a30: 30 80 00 29 b,a 40005ad4 <== NOT EXECUTED return 0; } if ( current > ceiling ) { 40005a34: 28 80 00 10 bleu,a 40005a74 <== NOT EXECUTED 40005a38: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40005a3c: 05 10 00 67 sethi %hi(0x40019c00), %g2 <== NOT EXECUTED 40005a40: c2 00 a2 20 ld [ %g2 + 0x220 ], %g1 ! 40019e20 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40005a44: 82 00 60 01 inc %g1 <== NOT EXECUTED 40005a48: c2 20 a2 20 st %g1, [ %g2 + 0x220 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 40005a4c: 7f ff f0 c7 call 40001d68 <== NOT EXECUTED 40005a50: 01 00 00 00 nop <== NOT EXECUTED _Thread_Change_priority( 40005a54: d2 04 20 60 ld [ %l0 + 0x60 ], %o1 <== NOT EXECUTED 40005a58: d0 04 20 70 ld [ %l0 + 0x70 ], %o0 <== NOT EXECUTED 40005a5c: 40 00 0b 10 call 4000869c <_Thread_Change_priority> <== NOT EXECUTED 40005a60: 94 10 20 00 clr %o2 <== NOT EXECUTED the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 40005a64: 7f ff ff a2 call 400058ec <_Thread_Enable_dispatch> <== NOT EXECUTED 40005a68: 01 00 00 00 nop <== NOT EXECUTED id, ((_Options_Is_no_wait( option_set )) ? FALSE : TRUE), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 40005a6c: 10 80 00 36 b 40005b44 <== NOT EXECUTED 40005a70: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 40005a74: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 40005a78: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40005a7c: c0 24 20 68 clr [ %l0 + 0x68 ] <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 40005a80: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 40005a84: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40005a88: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40005a8c: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40005a90: 30 80 00 11 b,a 40005ad4 <== NOT EXECUTED /* * 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 ) ) { 40005a94: 80 a0 40 02 cmp %g1, %g2 40005a98: 12 80 00 13 bne 40005ae4 40005a9c: 80 8e 60 01 btst 1, %i1 switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40005aa0: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 40005aa4: 80 a0 60 00 cmp %g1, 0 40005aa8: 22 80 00 07 be,a 40005ac4 40005aac: c2 04 20 68 ld [ %l0 + 0x68 ], %g1 40005ab0: 80 a0 60 01 cmp %g1, 1 40005ab4: 12 80 00 0c bne 40005ae4 40005ab8: 80 8e 60 01 btst 1, %i1 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; 40005abc: 10 80 00 05 b 40005ad0 <== NOT EXECUTED 40005ac0: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED * 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++; 40005ac4: 82 00 60 01 inc %g1 40005ac8: c2 24 20 68 st %g1, [ %l0 + 0x68 ] _ISR_Enable( level ); 40005acc: 30 80 00 02 b,a 40005ad4 return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 40005ad0: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 40005ad4: 7f ff f0 a5 call 40001d68 40005ad8: 01 00 00 00 nop 40005adc: 10 80 00 1a b 40005b44 40005ae0: 03 10 00 67 sethi %hi(0x40019c00), %g1 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { _CORE_mutex_Seize( 40005ae4: 02 80 00 08 be 40005b04 40005ae8: 23 10 00 67 sethi %hi(0x40019c00), %l1 40005aec: 7f ff f0 9f call 40001d68 40005af0: d0 07 bf f0 ld [ %fp + -16 ], %o0 40005af4: c4 04 62 fc ld [ %l1 + 0x2fc ], %g2 40005af8: 82 10 20 01 mov 1, %g1 40005afc: 10 80 00 11 b 40005b40 40005b00: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] 40005b04: c6 04 62 fc ld [ %l1 + 0x2fc ], %g3 RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; 40005b08: 82 10 20 01 mov 1, %g1 40005b0c: 05 10 00 67 sethi %hi(0x40019c00), %g2 40005b10: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 40005b14: c2 00 a2 20 ld [ %g2 + 0x220 ], %g1 40005b18: f0 20 e0 20 st %i0, [ %g3 + 0x20 ] 40005b1c: 82 00 60 01 inc %g1 40005b20: a0 04 20 14 add %l0, 0x14, %l0 40005b24: c2 20 a2 20 st %g1, [ %g2 + 0x220 ] 40005b28: e0 20 e0 44 st %l0, [ %g3 + 0x44 ] 40005b2c: 7f ff f0 8f call 40001d68 40005b30: d0 07 bf f0 ld [ %fp + -16 ], %o0 40005b34: 90 10 00 10 mov %l0, %o0 40005b38: 40 00 03 86 call 40006950 <_CORE_mutex_Seize_interrupt_blocking> 40005b3c: 92 10 00 1a mov %i2, %o1 id, ((_Options_Is_no_wait( option_set )) ? FALSE : TRUE), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 40005b40: 03 10 00 67 sethi %hi(0x40019c00), %g1 40005b44: c2 00 62 fc ld [ %g1 + 0x2fc ], %g1 ! 40019efc <_Thread_Executing> 40005b48: 40 00 00 62 call 40005cd0 <_Semaphore_Translate_core_mutex_return_code> 40005b4c: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 return _Semaphore_Translate_core_semaphore_return_code( _Thread_Executing->Wait.return_code ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40005b50: 81 c7 e0 08 ret 40005b54: 91 e8 00 08 restore %g0, %o0, %o0 Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 40005b58: e2 00 62 fc ld [ %g1 + 0x2fc ], %l1 Watchdog_Interval timeout, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 40005b5c: d0 07 bf f0 ld [ %fp + -16 ], %o0 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 40005b60: c0 24 60 34 clr [ %l1 + 0x34 ] if ( the_semaphore->count != 0 ) { 40005b64: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 40005b68: 80 a0 60 00 cmp %g1, 0 40005b6c: 02 80 00 08 be 40005b8c 40005b70: 80 8e 60 01 btst 1, %i1 the_semaphore->count -= 1; 40005b74: 82 00 7f ff add %g1, -1, %g1 40005b78: c2 24 20 5c st %g1, [ %l0 + 0x5c ] _ISR_Enable( level ); 40005b7c: 7f ff f0 7b call 40001d68 40005b80: 01 00 00 00 nop id, ((_Options_Is_no_wait( option_set )) ? FALSE : TRUE), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 40005b84: 10 80 00 1b b 40005bf0 40005b88: 03 10 00 67 sethi %hi(0x40019c00), %g1 return; } if ( !wait ) { 40005b8c: 02 80 00 07 be 40005ba8 40005b90: 05 10 00 67 sethi %hi(0x40019c00), %g2 _ISR_Enable( level ); 40005b94: 7f ff f0 75 call 40001d68 40005b98: 01 00 00 00 nop executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 40005b9c: 82 10 20 01 mov 1, %g1 ! 1 40005ba0: 10 80 00 13 b 40005bec 40005ba4: c2 24 60 34 st %g1, [ %l1 + 0x34 ] 40005ba8: c2 00 a2 20 ld [ %g2 + 0x220 ], %g1 40005bac: 82 00 60 01 inc %g1 40005bb0: c2 20 a2 20 st %g1, [ %g2 + 0x220 ] 40005bb4: 82 10 20 01 mov 1, %g1 40005bb8: c2 24 20 44 st %g1, [ %l0 + 0x44 ] } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; executing->Wait.id = id; 40005bbc: f0 24 60 20 st %i0, [ %l1 + 0x20 ] return; } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 40005bc0: a0 04 20 14 add %l0, 0x14, %l0 40005bc4: e0 24 60 44 st %l0, [ %l1 + 0x44 ] executing->Wait.id = id; _ISR_Enable( level ); 40005bc8: 7f ff f0 68 call 40001d68 40005bcc: 01 00 00 00 nop _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 40005bd0: 90 10 00 10 mov %l0, %o0 40005bd4: 92 10 00 1a mov %i2, %o1 40005bd8: 15 10 00 25 sethi %hi(0x40009400), %o2 40005bdc: 40 00 0d 44 call 400090ec <_Thread_queue_Enqueue_with_handler> 40005be0: 94 12 a1 84 or %o2, 0x184, %o2 ! 40009584 <_Thread_queue_Timeout> _Thread_Enable_dispatch(); 40005be4: 7f ff ff 42 call 400058ec <_Thread_Enable_dispatch> 40005be8: 01 00 00 00 nop 40005bec: 03 10 00 67 sethi %hi(0x40019c00), %g1 40005bf0: c2 00 62 fc ld [ %g1 + 0x2fc ], %g1 ! 40019efc <_Thread_Executing> 40005bf4: 40 00 00 41 call 40005cf8 <_Semaphore_Translate_core_semaphore_return_code> 40005bf8: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 _Thread_Executing->Wait.return_code ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40005bfc: b0 10 00 08 mov %o0, %i0 40005c00: 81 c7 e0 08 ret 40005c04: 81 e8 00 00 restore 40005c3c : #endif rtems_status_code rtems_semaphore_release( rtems_id id ) { 40005c3c: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 40005c40: 11 10 00 67 sethi %hi(0x40019c00), %o0 40005c44: 92 10 00 18 mov %i0, %o1 40005c48: 90 12 20 d4 or %o0, 0xd4, %o0 40005c4c: 40 00 06 cc call 4000777c <_Objects_Get> 40005c50: 94 07 bf f4 add %fp, -12, %o2 Objects_Locations location; CORE_mutex_Status mutex_status; CORE_semaphore_Status semaphore_status; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 40005c54: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005c58: 80 a0 60 00 cmp %g1, 0 40005c5c: 22 80 00 07 be,a 40005c78 40005c60: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40005c64: 80 a0 60 02 cmp %g1, 2 40005c68: 08 80 00 17 bleu 40005cc4 40005c6c: 90 10 20 04 mov 4, %o0 40005c70: 10 80 00 15 b 40005cc4 <== NOT EXECUTED 40005c74: 90 10 20 19 mov 0x19, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 40005c78: 80 88 60 30 btst 0x30, %g1 40005c7c: 02 80 00 0b be 40005ca8 40005c80: 90 02 20 14 add %o0, 0x14, %o0 mutex_status = _CORE_mutex_Surrender( 40005c84: 92 10 00 18 mov %i0, %o1 40005c88: 40 00 03 54 call 400069d8 <_CORE_mutex_Surrender> 40005c8c: 94 10 20 00 clr %o2 &the_semaphore->Core_control.mutex, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 40005c90: 7f ff ff de call 40005c08 <_Thread_Enable_dispatch> 40005c94: a0 10 00 08 mov %o0, %l0 return _Semaphore_Translate_core_mutex_return_code( mutex_status ); 40005c98: 40 00 00 0e call 40005cd0 <_Semaphore_Translate_core_mutex_return_code> 40005c9c: 90 10 00 10 mov %l0, %o0 _Semaphore_Translate_core_semaphore_return_code( semaphore_status ); } } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40005ca0: 81 c7 e0 08 ret 40005ca4: 91 e8 00 08 restore %g0, %o0, %o0 MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return _Semaphore_Translate_core_mutex_return_code( mutex_status ); } else { semaphore_status = _CORE_semaphore_Surrender( 40005ca8: 92 10 00 18 mov %i0, %o1 40005cac: 40 00 03 b9 call 40006b90 <_CORE_semaphore_Surrender> 40005cb0: 94 10 20 00 clr %o2 &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 40005cb4: 7f ff ff d5 call 40005c08 <_Thread_Enable_dispatch> 40005cb8: a0 10 00 08 mov %o0, %l0 return 40005cbc: 40 00 00 0f call 40005cf8 <_Semaphore_Translate_core_semaphore_return_code> 40005cc0: 90 10 00 10 mov %l0, %o0 _Semaphore_Translate_core_semaphore_return_code( semaphore_status ); } } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40005cc4: b0 10 00 08 mov %o0, %i0 40005cc8: 81 c7 e0 08 ret 40005ccc: 81 e8 00 00 restore 400177b0 : */ void rtems_shutdown_executive( uint32_t result ) { 400177b0: 9d e3 bf 98 save %sp, -104, %sp if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 400177b4: 33 10 00 68 sethi %hi(0x4001a000), %i1 400177b8: c2 06 60 00 ld [ %i1 ], %g1 400177bc: 80 a0 60 04 cmp %g1, 4 400177c0: 02 80 00 0c be 400177f0 400177c4: 11 10 00 62 sethi %hi(0x40018800), %o0 #if defined(__USE_INIT_FINI__) extern void _fini( void ); atexit( _fini ); 400177c8: 7f ff da 4d call 4000e0fc 400177cc: 90 12 23 9c or %o0, 0x39c, %o0 ! 40018b9c <_fini> * routine which initialized the system. */ RTEMS_INLINE_ROUTINE void _Thread_Stop_multitasking( void ) { _Context_Switch( &_Thread_Executing->Registers, &_Thread_BSP_context ); 400177d0: 03 10 00 67 sethi %hi(0x40019c00), %g1 400177d4: f0 00 62 fc ld [ %g1 + 0x2fc ], %i0 ! 40019efc <_Thread_Executing> 400177d8: 82 10 20 04 mov 4, %g1 400177dc: b0 06 20 e0 add %i0, 0xe0, %i0 400177e0: c2 26 60 00 st %g1, [ %i1 ] 400177e4: 33 10 00 67 sethi %hi(0x40019c00), %i1 400177e8: 7f ff ca 92 call 4000a230 <_CPU_Context_switch> 400177ec: 93 ee 61 98 restore %i1, 0x198, %o1 400177f0: 81 c7 e0 08 ret <== NOT EXECUTED 400177f4: 81 e8 00 00 restore <== NOT EXECUTED 40011218 : rtems_status_code rtems_signal_send( Objects_Id id, rtems_signal_set signal_set ) { 40011218: 9d e3 bf 90 save %sp, -112, %sp 4001121c: 92 10 00 18 mov %i0, %o1 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 40011220: 80 a6 60 00 cmp %i1, 0 40011224: 02 80 00 47 be 40011340 40011228: b0 10 20 0a mov 0xa, %i0 uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 4001122c: 80 a2 60 00 cmp %o1, 0 40011230: 12 80 00 0a bne 40011258 40011234: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40011238: 03 10 00 ce sethi %hi(0x40033800), %g1 4001123c: c4 00 61 10 ld [ %g1 + 0x110 ], %g2 ! 40033910 <_Thread_Dispatch_disable_level> 40011240: 84 00 a0 01 inc %g2 40011244: c4 20 61 10 st %g2, [ %g1 + 0x110 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 40011248: 03 10 00 ce sethi %hi(0x40033800), %g1 4001124c: f0 00 61 ec ld [ %g1 + 0x1ec ], %i0 ! 400339ec <_Thread_Executing> 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; 40011250: 10 80 00 18 b 400112b0 40011254: c0 27 bf f4 clr [ %fp + -12 ] */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 40011258: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 4001125c: 80 a0 a0 04 cmp %g2, 4 40011260: 18 80 00 0e bgu 40011298 40011264: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40011268: 83 32 60 1b srl %o1, 0x1b, %g1 4001126c: 80 a0 60 01 cmp %g1, 1 40011270: 12 80 00 0a bne 40011298 40011274: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40011278: 83 28 a0 02 sll %g2, 2, %g1 4001127c: 05 10 00 ce sethi %hi(0x40033800), %g2 40011280: 84 10 a0 70 or %g2, 0x70, %g2 ! 40033870 <_Objects_Information_table> 40011284: c2 00 80 01 ld [ %g2 + %g1 ], %g1 40011288: d0 00 60 04 ld [ %g1 + 4 ], %o0 if ( !information ) { 4001128c: 80 a2 20 00 cmp %o0, 0 40011290: 12 80 00 05 bne 400112a4 40011294: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; 40011298: b0 10 20 00 clr %i0 4001129c: 10 80 00 05 b 400112b0 400112a0: c2 27 bf f4 st %g1, [ %fp + -12 ] goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 400112a4: 40 00 0d f0 call 40014a64 <_Objects_Get> 400112a8: 94 07 bf f4 add %fp, -12, %o2 400112ac: b0 10 00 08 mov %o0, %i0 return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); switch ( location ) { 400112b0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400112b4: 80 a0 60 00 cmp %g1, 0 400112b8: 22 80 00 07 be,a 400112d4 400112bc: d2 06 21 6c ld [ %i0 + 0x16c ], %o1 400112c0: 80 a0 60 02 cmp %g1, 2 400112c4: 08 80 00 1f bleu 40011340 400112c8: b0 10 20 04 mov 4, %i0 400112cc: 81 c7 e0 08 ret <== NOT EXECUTED 400112d0: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { 400112d4: c2 02 60 4c ld [ %o1 + 0x4c ], %g1 400112d8: 80 a0 60 00 cmp %g1, 0 400112dc: 02 80 00 1b be 40011348 400112e0: 01 00 00 00 nop if ( asr->is_enabled ) { 400112e4: c2 02 60 48 ld [ %o1 + 0x48 ], %g1 400112e8: 80 a0 60 00 cmp %g1, 0 400112ec: 02 80 00 11 be 40011330 400112f0: 90 10 00 19 mov %i1, %o0 _ASR_Post_signals( signal_set, &asr->signals_posted ); 400112f4: 7f ff ff b3 call 400111c0 <_ASR_Post_signals> 400112f8: 92 02 60 54 add %o1, 0x54, %o1 the_thread->do_post_task_switch_extension = TRUE; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 400112fc: 03 10 00 ce sethi %hi(0x40033800), %g1 40011300: c2 00 61 d4 ld [ %g1 + 0x1d4 ], %g1 ! 400339d4 <_ISR_Nest_level> if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = TRUE; 40011304: 84 10 20 01 mov 1, %g2 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 40011308: 80 a0 60 00 cmp %g1, 0 4001130c: 02 80 00 0b be 40011338 40011310: c4 26 20 78 st %g2, [ %i0 + 0x78 ] 40011314: 03 10 00 ce sethi %hi(0x40033800), %g1 <== NOT EXECUTED 40011318: c2 00 61 ec ld [ %g1 + 0x1ec ], %g1 ! 400339ec <_Thread_Executing> <== NOT EXECUTED 4001131c: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 40011320: 12 80 00 06 bne 40011338 <== NOT EXECUTED 40011324: 03 10 00 ce sethi %hi(0x40033800), %g1 <== NOT EXECUTED _ISR_Signals_to_thread_executing = TRUE; 40011328: 10 80 00 04 b 40011338 <== NOT EXECUTED 4001132c: c4 20 62 98 st %g2, [ %g1 + 0x298 ] ! 40033a98 <_ISR_Signals_to_thread_executing> <== NOT EXECUTED } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); 40011330: 7f ff ff a4 call 400111c0 <_ASR_Post_signals> 40011334: 92 02 60 58 add %o1, 0x58, %o1 } _Thread_Enable_dispatch(); 40011338: 7f ff ff ab call 400111e4 <_Thread_Enable_dispatch> 4001133c: b0 10 20 00 clr %i0 40011340: 81 c7 e0 08 ret 40011344: 81 e8 00 00 restore return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 40011348: 7f ff ff a7 call 400111e4 <_Thread_Enable_dispatch> 4001134c: b0 10 20 0b mov 0xb, %i0 return RTEMS_NOT_DEFINED; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40011350: 81 c7 e0 08 ret 40011354: 81 e8 00 00 restore 400028a4 : /* * Check if blown */ boolean rtems_stack_checker_is_blown( void ) { 400028a4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 400028a8: 03 10 00 79 sethi %hi(0x4001e400), %g1 <== NOT EXECUTED 400028ac: f0 00 61 0c ld [ %g1 + 0x10c ], %i0 ! 4001e50c <_Thread_Executing> <== NOT EXECUTED /* * Check for an out of bounds stack pointer */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); 400028b0: 7f ff ff d7 call 4000280c <== NOT EXECUTED 400028b4: 90 06 20 d0 add %i0, 0xd0, %o0 <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 400028b8: 03 10 00 78 sethi %hi(0x4001e000), %g1 <== NOT EXECUTED 400028bc: c2 00 60 84 ld [ %g1 + 0x84 ], %g1 ! 4001e084 <== NOT EXECUTED /* * Check for an out of bounds stack pointer */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); 400028c0: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 400028c4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400028c8: 02 80 00 0a be 400028f0 <== NOT EXECUTED 400028cc: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED pattern_ok = (!memcmp( 400028d0: d0 06 20 d4 ld [ %i0 + 0xd4 ], %o0 <== NOT EXECUTED 400028d4: 13 10 00 78 sethi %hi(0x4001e000), %o1 <== NOT EXECUTED 400028d8: 90 02 20 08 add %o0, 8, %o0 <== NOT EXECUTED 400028dc: 92 12 62 40 or %o1, 0x240, %o1 <== NOT EXECUTED 400028e0: 40 00 35 67 call 4000fe7c <== NOT EXECUTED 400028e4: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 400028e8: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 400028ec: 92 60 3f ff subx %g0, -1, %o1 <== NOT EXECUTED } /* * The Stack Pointer and the Pattern Area are OK so return FALSE. */ if ( sp_ok && pattern_ok ) 400028f0: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 400028f4: 02 80 00 06 be 4000290c <== NOT EXECUTED 400028f8: 03 10 00 79 sethi %hi(0x4001e400), %g1 <== NOT EXECUTED 400028fc: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 40002900: 12 80 00 06 bne 40002918 <== NOT EXECUTED 40002904: 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 ); 40002908: 03 10 00 79 sethi %hi(0x4001e400), %g1 <== NOT EXECUTED 4000290c: d0 00 61 0c ld [ %g1 + 0x10c ], %o0 ! 4001e50c <_Thread_Executing> <== NOT EXECUTED 40002910: 7f ff ff cb call 4000283c <== NOT EXECUTED 40002914: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return TRUE; } 40002918: 81 c7 e0 08 ret <== NOT EXECUTED 4000291c: 81 e8 00 00 restore <== NOT EXECUTED 400027f0 : } void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 400027f0: 13 10 00 0f sethi %hi(0x40003c00), %o1 <== NOT EXECUTED 400027f4: 90 10 20 00 clr %o0 <== NOT EXECUTED 400027f8: 92 12 63 60 or %o1, 0x360, %o1 <== NOT EXECUTED 400027fc: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40002800: 7f ff ff e2 call 40002788 <== NOT EXECUTED 40002804: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40002808: 01 00 00 00 nop 40002788 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 40002788: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (Stack_check_Initialized == 0) 4000278c: 03 10 00 78 sethi %hi(0x4001e000), %g1 <== NOT EXECUTED 40002790: c2 00 60 84 ld [ %g1 + 0x84 ], %g1 ! 4001e084 <== NOT EXECUTED 40002794: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002798: 02 80 00 14 be 400027e8 <== NOT EXECUTED 4000279c: 23 10 00 78 sethi %hi(0x4001e000), %l1 <== NOT EXECUTED return; print_context = context; print_handler = print; 400027a0: 21 10 00 78 sethi %hi(0x4001e000), %l0 <== NOT EXECUTED ) { if (Stack_check_Initialized == 0) return; print_context = context; 400027a4: f0 24 60 88 st %i0, [ %l1 + 0x88 ] <== NOT EXECUTED print_handler = print; 400027a8: f2 24 20 8c st %i1, [ %l0 + 0x8c ] <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 400027ac: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400027b0: 13 10 00 6d sethi %hi(0x4001b400), %o1 <== NOT EXECUTED 400027b4: 9f c6 40 00 call %i1 <== NOT EXECUTED 400027b8: 92 12 61 88 or %o1, 0x188, %o1 ! 4001b588 <== NOT EXECUTED (*print)( context, 400027bc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400027c0: 13 10 00 6d sethi %hi(0x4001b400), %o1 <== NOT EXECUTED 400027c4: 9f c6 40 00 call %i1 <== NOT EXECUTED 400027c8: 92 12 61 a0 or %o1, 0x1a0, %o1 ! 4001b5a0 <== NOT EXECUTED " ID NAME LOW HIGH AVAILABLE USED\n" ); /* iterate over all threads and dump the usage */ rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage ); 400027cc: 11 10 00 09 sethi %hi(0x40002400), %o0 <== NOT EXECUTED 400027d0: 40 00 17 6c call 40008580 <== NOT EXECUTED 400027d4: 90 12 22 80 or %o0, 0x280, %o0 ! 40002680 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 400027d8: 7f ff ff aa call 40002680 <== NOT EXECUTED 400027dc: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED print_context = NULL; 400027e0: c0 24 60 88 clr [ %l1 + 0x88 ] <== NOT EXECUTED print_handler = NULL; 400027e4: c0 24 20 8c clr [ %l0 + 0x8c ] <== NOT EXECUTED 400027e8: 81 c7 e0 08 ret <== NOT EXECUTED 400027ec: 81 e8 00 00 restore <== NOT EXECUTED 40002920 : */ void rtems_stack_checker_switch_extension( Thread_Control *running, Thread_Control *heir ) { 40002920: 9d e3 bf 98 save %sp, -104, %sp Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; boolean sp_ok; boolean pattern_ok = TRUE; pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern; 40002924: e0 06 20 d4 ld [ %i0 + 0xd4 ], %l0 /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); 40002928: 7f ff ff b9 call 4000280c 4000292c: 90 06 20 d0 add %i0, 0xd0, %o0 Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; boolean sp_ok; boolean pattern_ok = TRUE; pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern; 40002930: a0 04 20 08 add %l0, 8, %l0 /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); 40002934: a2 10 00 08 mov %o0, %l1 pattern_ok = (!memcmp( pattern, 40002938: 13 10 00 78 sethi %hi(0x4001e000), %o1 4000293c: 90 10 00 10 mov %l0, %o0 40002940: 92 12 62 40 or %o1, 0x240, %o1 40002944: 40 00 35 4e call 4000fe7c 40002948: 94 10 20 10 mov 0x10, %o2 4000294c: 80 a0 00 08 cmp %g0, %o0 40002950: b2 60 3f ff subx %g0, -1, %i1 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 40002954: 80 a4 60 00 cmp %l1, 0 40002958: 02 80 00 04 be 40002968 4000295c: 80 a6 60 00 cmp %i1, 0 40002960: 12 80 00 04 bne 40002970 40002964: 01 00 00 00 nop Stack_check_report_blown_task( running, pattern_ok ); 40002968: 7f ff ff b5 call 4000283c <== NOT EXECUTED 4000296c: 81 e8 00 00 restore <== NOT EXECUTED 40002970: 81 c7 e0 08 ret 40002974: 81 e8 00 00 restore 40005f90 : const char * rtems_status_text( rtems_status_code status ) { 40005f90: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED return rtems_assoc_name_by_local(rtems_status_assoc, status); 40005f94: 11 10 00 9a sethi %hi(0x40026800), %o0 <== NOT EXECUTED 40005f98: 90 12 22 e4 or %o0, 0x2e4, %o0 ! 40026ae4 <== NOT EXECUTED 40005f9c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40005fa0: 40 00 2e 5d call 40011914 <== NOT EXECUTED 40005fa4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40005fa8: 01 00 00 00 nop 40005ee0 : */ rtems_status_code rtems_task_delete( Objects_Id id ) { 40005ee0: 9d e3 bf 90 save %sp, -112, %sp uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 40005ee4: 92 96 20 00 orcc %i0, 0, %o1 40005ee8: 12 80 00 0a bne 40005f10 40005eec: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40005ef0: 03 10 00 67 sethi %hi(0x40019c00), %g1 40005ef4: c4 00 62 20 ld [ %g1 + 0x220 ], %g2 ! 40019e20 <_Thread_Dispatch_disable_level> 40005ef8: 84 00 a0 01 inc %g2 40005efc: c4 20 62 20 st %g2, [ %g1 + 0x220 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 40005f00: 03 10 00 67 sethi %hi(0x40019c00), %g1 40005f04: f0 00 62 fc ld [ %g1 + 0x2fc ], %i0 ! 40019efc <_Thread_Executing> 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; 40005f08: 10 80 00 18 b 40005f68 40005f0c: c0 27 bf f4 clr [ %fp + -12 ] */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 40005f10: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 40005f14: 80 a0 a0 04 cmp %g2, 4 40005f18: 18 80 00 0e bgu 40005f50 40005f1c: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40005f20: 83 32 60 1b srl %o1, 0x1b, %g1 40005f24: 80 a0 60 01 cmp %g1, 1 40005f28: 12 80 00 0a bne 40005f50 40005f2c: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40005f30: 83 28 a0 02 sll %g2, 2, %g1 40005f34: 05 10 00 67 sethi %hi(0x40019c00), %g2 40005f38: 84 10 a1 80 or %g2, 0x180, %g2 ! 40019d80 <_Objects_Information_table> 40005f3c: c2 00 80 01 ld [ %g2 + %g1 ], %g1 40005f40: d0 00 60 04 ld [ %g1 + 4 ], %o0 if ( !information ) { 40005f44: 80 a2 20 00 cmp %o0, 0 40005f48: 12 80 00 05 bne 40005f5c 40005f4c: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; 40005f50: b0 10 20 00 clr %i0 40005f54: 10 80 00 05 b 40005f68 40005f58: c2 27 bf f4 st %g1, [ %fp + -12 ] goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40005f5c: 40 00 06 08 call 4000777c <_Objects_Get> 40005f60: 94 07 bf f4 add %fp, -12, %o2 40005f64: b0 10 00 08 mov %o0, %i0 register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; the_thread = _Thread_Get( id, &location ); switch ( location ) { 40005f68: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005f6c: 80 a0 60 00 cmp %g1, 0 40005f70: 02 80 00 06 be 40005f88 40005f74: 80 a0 60 02 cmp %g1, 2 40005f78: 08 80 00 0b bleu 40005fa4 40005f7c: b0 10 20 04 mov 4, %i0 40005f80: 81 c7 e0 08 ret <== NOT EXECUTED 40005f84: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: the_information = _Objects_Get_information( the_thread->Object.id ); 40005f88: 7f ff ff c0 call 40005e88 <_Objects_Get_information> 40005f8c: d0 06 20 08 ld [ %i0 + 8 ], %o0 if ( !the_information ) { 40005f90: 80 a2 20 00 cmp %o0, 0 40005f94: 12 80 00 06 bne 40005fac 40005f98: 01 00 00 00 nop _Thread_Enable_dispatch(); 40005f9c: 7f ff ff c4 call 40005eac <_Thread_Enable_dispatch> <== NOT EXECUTED 40005fa0: b0 10 20 04 mov 4, %i0 ! 4 <== NOT EXECUTED 40005fa4: 81 c7 e0 08 ret 40005fa8: 81 e8 00 00 restore return RTEMS_INVALID_ID; /* This should never happen if _Thread_Get() works right */ } _Thread_Close( the_information, the_thread ); 40005fac: 40 00 0a 63 call 40008938 <_Thread_Close> 40005fb0: 92 10 00 18 mov %i0, %o1 40005fb4: 7f ff ff b5 call 40005e88 <_Objects_Get_information> 40005fb8: d0 06 20 08 ld [ %i0 + 8 ], %o0 40005fbc: 92 10 00 18 mov %i0, %o1 40005fc0: 40 00 05 ad call 40007674 <_Objects_Free> 40005fc4: b0 10 20 00 clr %i0 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 40005fc8: 7f ff ff b9 call 40005eac <_Thread_Enable_dispatch> 40005fcc: 01 00 00 00 nop return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40005fd0: 81 c7 e0 08 ret 40005fd4: 81 e8 00 00 restore 400077ec : rtems_status_code rtems_task_get_note( Objects_Id id, uint32_t notepad, uint32_t *note ) { 400077ec: 9d e3 bf 90 save %sp, -112, %sp 400077f0: 92 10 00 18 mov %i0, %o1 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !note ) 400077f4: 80 a6 a0 00 cmp %i2, 0 400077f8: 02 80 00 43 be 40007904 400077fc: b0 10 20 09 mov 9, %i0 /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 40007800: 80 a6 60 0f cmp %i1, 0xf 40007804: 18 80 00 40 bgu 40007904 40007808: b0 10 20 0a mov 0xa, %i0 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 4000780c: 80 a2 60 00 cmp %o1, 0 40007810: 02 80 00 08 be 40007830 40007814: 03 10 00 7e sethi %hi(0x4001f800), %g1 40007818: c2 00 60 8c ld [ %g1 + 0x8c ], %g1 ! 4001f88c <_Thread_Executing> 4000781c: c2 00 60 08 ld [ %g1 + 8 ], %g1 40007820: 80 a2 40 01 cmp %o1, %g1 40007824: 12 80 00 0a bne 4000784c 40007828: 83 32 60 18 srl %o1, 0x18, %g1 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 4000782c: 03 10 00 7e sethi %hi(0x4001f800), %g1 <== NOT EXECUTED 40007830: c2 00 60 8c ld [ %g1 + 0x8c ], %g1 ! 4001f88c <_Thread_Executing> 40007834: 85 2e 60 02 sll %i1, 2, %g2 40007838: c2 00 61 6c ld [ %g1 + 0x16c ], %g1 4000783c: c2 00 40 02 ld [ %g1 + %g2 ], %g1 40007840: c2 26 80 00 st %g1, [ %i2 ] 40007844: 81 c7 e0 08 ret 40007848: 91 e8 20 00 restore %g0, 0, %o0 4000784c: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 40007850: 80 a0 a0 04 cmp %g2, 4 40007854: 18 80 00 06 bgu 4000786c 40007858: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 4000785c: 83 32 60 1b srl %o1, 0x1b, %g1 40007860: 80 a0 60 01 cmp %g1, 1 40007864: 02 80 00 05 be 40007878 40007868: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; 4000786c: 90 10 20 00 clr %o0 40007870: 10 80 00 0e b 400078a8 40007874: c2 27 bf f4 st %g1, [ %fp + -12 ] goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40007878: 83 28 a0 02 sll %g2, 2, %g1 4000787c: 05 10 00 7d sethi %hi(0x4001f400), %g2 40007880: 84 10 a3 10 or %g2, 0x310, %g2 ! 4001f710 <_Objects_Information_table> 40007884: c2 00 80 01 ld [ %g2 + %g1 ], %g1 40007888: d0 00 60 04 ld [ %g1 + 4 ], %o0 if ( !information ) { 4000788c: 80 a2 20 00 cmp %o0, 0 40007890: 12 80 00 04 bne 400078a0 40007894: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; 40007898: 10 80 00 04 b 400078a8 <== NOT EXECUTED 4000789c: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 400078a0: 40 00 07 52 call 400095e8 <_Objects_Get> 400078a4: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 400078a8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400078ac: 80 a0 60 00 cmp %g1, 0 400078b0: 22 80 00 07 be,a 400078cc 400078b4: c4 02 21 6c ld [ %o0 + 0x16c ], %g2 400078b8: 80 a0 60 02 cmp %g1, 2 400078bc: 08 80 00 12 bleu 40007904 400078c0: b0 10 20 04 mov 4, %i0 400078c4: 81 c7 e0 08 ret <== NOT EXECUTED 400078c8: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 400078cc: 83 2e 60 02 sll %i1, 2, %g1 400078d0: c2 00 80 01 ld [ %g2 + %g1 ], %g1 400078d4: c2 26 80 00 st %g1, [ %i2 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400078d8: 05 10 00 7d sethi %hi(0x4001f400), %g2 400078dc: c2 00 a3 b0 ld [ %g2 + 0x3b0 ], %g1 ! 4001f7b0 <_Thread_Dispatch_disable_level> 400078e0: b0 10 20 00 clr %i0 400078e4: 82 00 7f ff add %g1, -1, %g1 400078e8: c2 20 a3 b0 st %g1, [ %g2 + 0x3b0 ] 400078ec: c2 00 a3 b0 ld [ %g2 + 0x3b0 ], %g1 400078f0: 80 a0 60 00 cmp %g1, 0 400078f4: 12 80 00 04 bne 40007904 400078f8: 01 00 00 00 nop _Thread_Dispatch(); 400078fc: 40 00 0b f0 call 4000a8bc <_Thread_Dispatch> 40007900: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40007904: 81 c7 e0 08 ret 40007908: 81 e8 00 00 restore 4000666c : */ rtems_status_code rtems_task_is_suspended( Objects_Id id ) { 4000666c: 9d e3 bf 90 save %sp, -112, %sp uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 40006670: 92 96 20 00 orcc %i0, 0, %o1 40006674: 12 80 00 0a bne 4000669c 40006678: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000667c: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 40006680: c4 00 61 d0 ld [ %g1 + 0x1d0 ], %g2 ! 4001d5d0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40006684: 84 00 a0 01 inc %g2 <== NOT EXECUTED 40006688: c4 20 61 d0 st %g2, [ %g1 + 0x1d0 ] <== NOT EXECUTED Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 4000668c: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 40006690: d0 00 62 ac ld [ %g1 + 0x2ac ], %o0 ! 4001d6ac <_Thread_Executing> <== NOT EXECUTED 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; 40006694: 10 80 00 19 b 400066f8 <== NOT EXECUTED 40006698: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED 4000669c: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 400066a0: 80 a0 a0 04 cmp %g2, 4 400066a4: 18 80 00 06 bgu 400066bc 400066a8: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 400066ac: 83 32 60 1b srl %o1, 0x1b, %g1 400066b0: 80 a0 60 01 cmp %g1, 1 400066b4: 02 80 00 05 be 400066c8 400066b8: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; 400066bc: 90 10 20 00 clr %o0 <== NOT EXECUTED 400066c0: 10 80 00 0e b 400066f8 <== NOT EXECUTED 400066c4: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 400066c8: 83 28 a0 02 sll %g2, 2, %g1 400066cc: 05 10 00 75 sethi %hi(0x4001d400), %g2 400066d0: 84 10 a1 30 or %g2, 0x130, %g2 ! 4001d530 <_Objects_Information_table> 400066d4: c2 00 80 01 ld [ %g2 + %g1 ], %g1 400066d8: d0 00 60 04 ld [ %g1 + 4 ], %o0 if ( !information ) { 400066dc: 80 a2 20 00 cmp %o0, 0 400066e0: 12 80 00 04 bne 400066f0 400066e4: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; 400066e8: 10 80 00 04 b 400066f8 <== NOT EXECUTED 400066ec: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 400066f0: 40 00 06 58 call 40008050 <_Objects_Get> 400066f4: 94 07 bf f4 add %fp, -12, %o2 register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 400066f8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400066fc: 80 a0 60 00 cmp %g1, 0 40006700: 22 80 00 07 be,a 4000671c 40006704: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40006708: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000670c: 08 80 00 09 bleu 40006730 <== NOT EXECUTED 40006710: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED 40006714: 81 c7 e0 08 ret <== NOT EXECUTED 40006718: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 4000671c: 80 88 60 02 btst 2, %g1 40006720: 12 80 00 06 bne 40006738 40006724: 01 00 00 00 nop _Thread_Enable_dispatch(); 40006728: 7f ff ff c4 call 40006638 <_Thread_Enable_dispatch> 4000672c: b0 10 20 00 clr %i0 ! 0 40006730: 81 c7 e0 08 ret 40006734: 81 e8 00 00 restore return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 40006738: 7f ff ff c0 call 40006638 <_Thread_Enable_dispatch> 4000673c: b0 10 20 0f mov 0xf, %i0 return RTEMS_ALREADY_SUSPENDED; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40006740: 81 c7 e0 08 ret 40006744: 81 e8 00 00 restore 40006cc0 : rtems_status_code rtems_task_restart( Objects_Id id, uint32_t argument ) { 40006cc0: 9d e3 bf 90 save %sp, -112, %sp uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 40006cc4: 92 96 20 00 orcc %i0, 0, %o1 40006cc8: 12 80 00 0a bne 40006cf0 40006ccc: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006cd0: 03 10 00 76 sethi %hi(0x4001d800), %g1 40006cd4: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 4001daf0 <_Thread_Dispatch_disable_level> 40006cd8: 84 00 a0 01 inc %g2 40006cdc: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 40006ce0: 03 10 00 76 sethi %hi(0x4001d800), %g1 40006ce4: d0 00 63 cc ld [ %g1 + 0x3cc ], %o0 ! 4001dbcc <_Thread_Executing> 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; 40006ce8: 10 80 00 19 b 40006d4c 40006cec: c0 27 bf f4 clr [ %fp + -12 ] 40006cf0: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 40006cf4: 80 a0 a0 04 cmp %g2, 4 40006cf8: 18 80 00 06 bgu 40006d10 40006cfc: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40006d00: 83 32 60 1b srl %o1, 0x1b, %g1 40006d04: 80 a0 60 01 cmp %g1, 1 40006d08: 02 80 00 05 be 40006d1c 40006d0c: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; 40006d10: 90 10 20 00 clr %o0 40006d14: 10 80 00 0e b 40006d4c 40006d18: c2 27 bf f4 st %g1, [ %fp + -12 ] goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40006d1c: 83 28 a0 02 sll %g2, 2, %g1 40006d20: 05 10 00 76 sethi %hi(0x4001d800), %g2 40006d24: 84 10 a2 50 or %g2, 0x250, %g2 ! 4001da50 <_Objects_Information_table> 40006d28: c2 00 80 01 ld [ %g2 + %g1 ], %g1 40006d2c: d0 00 60 04 ld [ %g1 + 4 ], %o0 if ( !information ) { 40006d30: 80 a2 20 00 cmp %o0, 0 40006d34: 12 80 00 04 bne 40006d44 40006d38: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; 40006d3c: 10 80 00 04 b 40006d4c <== NOT EXECUTED 40006d40: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40006d44: 40 00 06 1f call 400085c0 <_Objects_Get> 40006d48: 94 07 bf f4 add %fp, -12, %o2 register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 40006d4c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006d50: 80 a0 60 00 cmp %g1, 0 40006d54: 22 80 00 07 be,a 40006d70 40006d58: 94 10 00 19 mov %i1, %o2 40006d5c: 80 a0 60 02 cmp %g1, 2 40006d60: 08 80 00 0b bleu 40006d8c 40006d64: b0 10 20 04 mov 4, %i0 40006d68: 81 c7 e0 08 ret <== NOT EXECUTED 40006d6c: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { 40006d70: 40 00 0d 95 call 4000a3c4 <_Thread_Restart> 40006d74: 92 10 20 00 clr %o1 40006d78: 80 a2 20 00 cmp %o0, 0 40006d7c: 02 80 00 06 be 40006d94 40006d80: 01 00 00 00 nop _Thread_Enable_dispatch(); 40006d84: 7f ff ff c2 call 40006c8c <_Thread_Enable_dispatch> 40006d88: b0 10 20 00 clr %i0 ! 0 40006d8c: 81 c7 e0 08 ret 40006d90: 81 e8 00 00 restore return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 40006d94: 7f ff ff be call 40006c8c <_Thread_Enable_dispatch> 40006d98: b0 10 20 0e mov 0xe, %i0 return RTEMS_INCORRECT_STATE; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40006d9c: 81 c7 e0 08 ret 40006da0: 81 e8 00 00 restore 4000768c : */ rtems_status_code rtems_task_resume( Objects_Id id ) { 4000768c: 9d e3 bf 90 save %sp, -112, %sp uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 40007690: 92 96 20 00 orcc %i0, 0, %o1 40007694: 12 80 00 0a bne 400076bc 40007698: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000769c: 03 10 00 9a sethi %hi(0x40026800), %g1 400076a0: c4 00 62 50 ld [ %g1 + 0x250 ], %g2 ! 40026a50 <_Thread_Dispatch_disable_level> 400076a4: 84 00 a0 01 inc %g2 400076a8: c4 20 62 50 st %g2, [ %g1 + 0x250 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 400076ac: 03 10 00 9a sethi %hi(0x40026800), %g1 400076b0: d0 00 63 2c ld [ %g1 + 0x32c ], %o0 ! 40026b2c <_Thread_Executing> 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; 400076b4: 10 80 00 19 b 40007718 400076b8: c0 27 bf f4 clr [ %fp + -12 ] 400076bc: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 400076c0: 80 a0 a0 04 cmp %g2, 4 400076c4: 18 80 00 06 bgu 400076dc 400076c8: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 400076cc: 83 32 60 1b srl %o1, 0x1b, %g1 400076d0: 80 a0 60 01 cmp %g1, 1 400076d4: 02 80 00 05 be 400076e8 400076d8: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; 400076dc: 90 10 20 00 clr %o0 400076e0: 10 80 00 0e b 40007718 400076e4: c2 27 bf f4 st %g1, [ %fp + -12 ] goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 400076e8: 83 28 a0 02 sll %g2, 2, %g1 400076ec: 05 10 00 9a sethi %hi(0x40026800), %g2 400076f0: 84 10 a1 b0 or %g2, 0x1b0, %g2 ! 400269b0 <_Objects_Information_table> 400076f4: c2 00 80 01 ld [ %g2 + %g1 ], %g1 400076f8: d0 00 60 04 ld [ %g1 + 4 ], %o0 if ( !information ) { 400076fc: 80 a2 20 00 cmp %o0, 0 40007700: 12 80 00 04 bne 40007710 40007704: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; 40007708: 10 80 00 04 b 40007718 <== NOT EXECUTED 4000770c: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40007710: 40 00 06 f9 call 400092f4 <_Objects_Get> 40007714: 94 07 bf f4 add %fp, -12, %o2 register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 40007718: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000771c: 80 a0 60 00 cmp %g1, 0 40007720: 22 80 00 07 be,a 4000773c 40007724: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40007728: 80 a0 60 02 cmp %g1, 2 4000772c: 08 80 00 0b bleu 40007758 40007730: b0 10 20 04 mov 4, %i0 40007734: 81 c7 e0 08 ret <== NOT EXECUTED 40007738: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { 4000773c: 80 88 60 02 btst 2, %g1 40007740: 02 80 00 08 be 40007760 40007744: 92 10 20 01 mov 1, %o1 _Thread_Resume( the_thread, TRUE ); 40007748: 40 00 0e 82 call 4000b150 <_Thread_Resume> 4000774c: b0 10 20 00 clr %i0 _Thread_Enable_dispatch(); 40007750: 7f ff ff c2 call 40007658 <_Thread_Enable_dispatch> 40007754: 01 00 00 00 nop 40007758: 81 c7 e0 08 ret 4000775c: 81 e8 00 00 restore return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 40007760: 7f ff ff be call 40007658 <_Thread_Enable_dispatch> 40007764: b0 10 20 0e mov 0xe, %i0 return RTEMS_INCORRECT_STATE; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40007768: 81 c7 e0 08 ret 4000776c: 81 e8 00 00 restore 40007ad8 : rtems_status_code rtems_task_set_note( Objects_Id id, uint32_t notepad, uint32_t note ) { 40007ad8: 9d e3 bf 90 save %sp, -112, %sp 40007adc: 92 10 00 18 mov %i0, %o1 /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 40007ae0: 80 a6 60 0f cmp %i1, 0xf 40007ae4: 18 80 00 3e bgu 40007bdc 40007ae8: b0 10 20 0a mov 0xa, %i0 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 40007aec: 80 a2 60 00 cmp %o1, 0 40007af0: 02 80 00 08 be 40007b10 40007af4: 03 10 00 7e sethi %hi(0x4001f800), %g1 40007af8: c2 00 60 8c ld [ %g1 + 0x8c ], %g1 ! 4001f88c <_Thread_Executing> 40007afc: c2 00 60 08 ld [ %g1 + 8 ], %g1 40007b00: 80 a2 40 01 cmp %o1, %g1 40007b04: 12 80 00 09 bne 40007b28 40007b08: 83 32 60 18 srl %o1, 0x18, %g1 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 40007b0c: 03 10 00 7e sethi %hi(0x4001f800), %g1 <== NOT EXECUTED 40007b10: c2 00 60 8c ld [ %g1 + 0x8c ], %g1 ! 4001f88c <_Thread_Executing> <== NOT EXECUTED 40007b14: 85 2e 60 02 sll %i1, 2, %g2 <== NOT EXECUTED 40007b18: c2 00 61 6c ld [ %g1 + 0x16c ], %g1 <== NOT EXECUTED 40007b1c: f4 20 40 02 st %i2, [ %g1 + %g2 ] <== NOT EXECUTED 40007b20: 81 c7 e0 08 ret <== NOT EXECUTED 40007b24: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40007b28: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 40007b2c: 80 a0 a0 04 cmp %g2, 4 40007b30: 18 80 00 06 bgu 40007b48 40007b34: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40007b38: 83 32 60 1b srl %o1, 0x1b, %g1 40007b3c: 80 a0 60 01 cmp %g1, 1 40007b40: 02 80 00 05 be 40007b54 40007b44: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; 40007b48: 90 10 20 00 clr %o0 40007b4c: 10 80 00 0e b 40007b84 40007b50: c2 27 bf f4 st %g1, [ %fp + -12 ] goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40007b54: 83 28 a0 02 sll %g2, 2, %g1 40007b58: 05 10 00 7d sethi %hi(0x4001f400), %g2 40007b5c: 84 10 a3 10 or %g2, 0x310, %g2 ! 4001f710 <_Objects_Information_table> 40007b60: c2 00 80 01 ld [ %g2 + %g1 ], %g1 40007b64: d0 00 60 04 ld [ %g1 + 4 ], %o0 if ( !information ) { 40007b68: 80 a2 20 00 cmp %o0, 0 40007b6c: 12 80 00 04 bne 40007b7c 40007b70: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; 40007b74: 10 80 00 04 b 40007b84 <== NOT EXECUTED 40007b78: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40007b7c: 40 00 06 9b call 400095e8 <_Objects_Get> 40007b80: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 40007b84: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007b88: 80 a0 60 00 cmp %g1, 0 40007b8c: 22 80 00 07 be,a 40007ba8 40007b90: c4 02 21 6c ld [ %o0 + 0x16c ], %g2 40007b94: 80 a0 60 02 cmp %g1, 2 40007b98: 08 80 00 11 bleu 40007bdc 40007b9c: b0 10 20 04 mov 4, %i0 40007ba0: 81 c7 e0 08 ret <== NOT EXECUTED 40007ba4: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 40007ba8: 83 2e 60 02 sll %i1, 2, %g1 40007bac: f4 20 80 01 st %i2, [ %g2 + %g1 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007bb0: 05 10 00 7d sethi %hi(0x4001f400), %g2 40007bb4: c2 00 a3 b0 ld [ %g2 + 0x3b0 ], %g1 ! 4001f7b0 <_Thread_Dispatch_disable_level> 40007bb8: b0 10 20 00 clr %i0 40007bbc: 82 00 7f ff add %g1, -1, %g1 40007bc0: c2 20 a3 b0 st %g1, [ %g2 + 0x3b0 ] 40007bc4: c2 00 a3 b0 ld [ %g2 + 0x3b0 ], %g1 40007bc8: 80 a0 60 00 cmp %g1, 0 40007bcc: 12 80 00 04 bne 40007bdc 40007bd0: 01 00 00 00 nop _Thread_Dispatch(); 40007bd4: 40 00 0b 3a call 4000a8bc <_Thread_Dispatch> 40007bd8: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40007bdc: 81 c7 e0 08 ret 40007be0: 81 e8 00 00 restore 4000a638 : rtems_status_code rtems_task_set_priority( Objects_Id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 4000a638: 9d e3 bf 90 save %sp, -112, %sp register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 4000a63c: 80 a6 60 00 cmp %i1, 0 4000a640: 02 80 00 06 be 4000a658 4000a644: 92 10 00 18 mov %i0, %o1 4000a648: 82 06 7f ff add %i1, -1, %g1 4000a64c: 80 a0 60 fe cmp %g1, 0xfe 4000a650: 18 80 00 49 bgu 4000a774 4000a654: b0 10 20 13 mov 0x13, %i0 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 4000a658: 80 a6 a0 00 cmp %i2, 0 4000a65c: 02 80 00 46 be 4000a774 4000a660: b0 10 20 09 mov 9, %i0 uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 4000a664: 80 a2 60 00 cmp %o1, 0 4000a668: 12 80 00 0a bne 4000a690 4000a66c: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000a670: 03 10 00 a3 sethi %hi(0x40028c00), %g1 4000a674: c4 00 60 b0 ld [ %g1 + 0xb0 ], %g2 ! 40028cb0 <_Thread_Dispatch_disable_level> 4000a678: 84 00 a0 01 inc %g2 4000a67c: c4 20 60 b0 st %g2, [ %g1 + 0xb0 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 4000a680: 03 10 00 a3 sethi %hi(0x40028c00), %g1 4000a684: d0 00 61 8c ld [ %g1 + 0x18c ], %o0 ! 40028d8c <_Thread_Executing> 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; 4000a688: 10 80 00 19 b 4000a6ec 4000a68c: c0 27 bf f4 clr [ %fp + -12 ] 4000a690: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 4000a694: 80 a0 a0 04 cmp %g2, 4 4000a698: 18 80 00 06 bgu 4000a6b0 4000a69c: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 4000a6a0: 83 32 60 1b srl %o1, 0x1b, %g1 4000a6a4: 80 a0 60 01 cmp %g1, 1 4000a6a8: 02 80 00 05 be 4000a6bc 4000a6ac: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; 4000a6b0: 90 10 20 00 clr %o0 4000a6b4: 10 80 00 0e b 4000a6ec 4000a6b8: c2 27 bf f4 st %g1, [ %fp + -12 ] goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 4000a6bc: 83 28 a0 02 sll %g2, 2, %g1 4000a6c0: 05 10 00 a3 sethi %hi(0x40028c00), %g2 4000a6c4: 84 10 a0 10 or %g2, 0x10, %g2 ! 40028c10 <_Objects_Information_table> 4000a6c8: c2 00 80 01 ld [ %g2 + %g1 ], %g1 4000a6cc: d0 00 60 04 ld [ %g1 + 4 ], %o0 if ( !information ) { 4000a6d0: 80 a2 20 00 cmp %o0, 0 4000a6d4: 12 80 00 04 bne 4000a6e4 4000a6d8: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; 4000a6dc: 10 80 00 04 b 4000a6ec <== NOT EXECUTED 4000a6e0: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 4000a6e4: 40 00 06 3d call 4000bfd8 <_Objects_Get> 4000a6e8: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 4000a6ec: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000a6f0: 80 a0 60 00 cmp %g1, 0 4000a6f4: 22 80 00 07 be,a 4000a710 4000a6f8: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 4000a6fc: 80 a0 60 02 cmp %g1, 2 4000a700: 08 80 00 1d bleu 4000a774 4000a704: b0 10 20 04 mov 4, %i0 4000a708: 81 c7 e0 08 ret <== NOT EXECUTED 4000a70c: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED return RTEMS_INVALID_ID; case OBJECTS_LOCAL: /* XXX convert from core priority */ *old_priority = the_thread->current_priority; if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 4000a710: 80 a6 60 00 cmp %i1, 0 4000a714: 02 80 00 0d be 4000a748 4000a718: c2 26 80 00 st %g1, [ %i2 ] the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 4000a71c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 4000a720: 80 a0 60 00 cmp %g1, 0 4000a724: 02 80 00 06 be 4000a73c 4000a728: f2 22 20 18 st %i1, [ %o0 + 0x18 ] 4000a72c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 4000a730: 80 a0 40 19 cmp %g1, %i1 4000a734: 08 80 00 05 bleu 4000a748 4000a738: 01 00 00 00 nop the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, FALSE ); 4000a73c: 92 10 00 19 mov %i1, %o1 4000a740: 40 00 09 ee call 4000cef8 <_Thread_Change_priority> 4000a744: 94 10 20 00 clr %o2 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000a748: 03 10 00 a3 sethi %hi(0x40028c00), %g1 4000a74c: c4 00 60 b0 ld [ %g1 + 0xb0 ], %g2 ! 40028cb0 <_Thread_Dispatch_disable_level> 4000a750: b0 10 20 00 clr %i0 4000a754: 84 00 bf ff add %g2, -1, %g2 4000a758: c4 20 60 b0 st %g2, [ %g1 + 0xb0 ] 4000a75c: c2 00 60 b0 ld [ %g1 + 0xb0 ], %g1 4000a760: 80 a0 60 00 cmp %g1, 0 4000a764: 12 80 00 04 bne 4000a774 4000a768: 01 00 00 00 nop _Thread_Dispatch(); 4000a76c: 40 00 0b 0f call 4000d3a8 <_Thread_Dispatch> 4000a770: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000a774: 81 c7 e0 08 ret 4000a778: 81 e8 00 00 restore 40006120 : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 40006120: 9d e3 bf 90 save %sp, -112, %sp 40006124: 92 10 00 18 mov %i0, %o1 register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 40006128: 80 a6 60 00 cmp %i1, 0 4000612c: 02 80 00 36 be 40006204 40006130: b0 10 20 09 mov 9, %i0 uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 40006134: 80 a2 60 00 cmp %o1, 0 40006138: 12 80 00 0a bne 40006160 4000613c: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006140: 03 10 00 67 sethi %hi(0x40019c00), %g1 40006144: c4 00 62 20 ld [ %g1 + 0x220 ], %g2 ! 40019e20 <_Thread_Dispatch_disable_level> 40006148: 84 00 a0 01 inc %g2 4000614c: c4 20 62 20 st %g2, [ %g1 + 0x220 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 40006150: 03 10 00 67 sethi %hi(0x40019c00), %g1 40006154: d0 00 62 fc ld [ %g1 + 0x2fc ], %o0 ! 40019efc <_Thread_Executing> 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; 40006158: 10 80 00 19 b 400061bc 4000615c: c0 27 bf f4 clr [ %fp + -12 ] 40006160: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 40006164: 80 a0 a0 04 cmp %g2, 4 40006168: 18 80 00 06 bgu 40006180 4000616c: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40006170: 83 32 60 1b srl %o1, 0x1b, %g1 40006174: 80 a0 60 01 cmp %g1, 1 40006178: 02 80 00 05 be 4000618c 4000617c: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; 40006180: 90 10 20 00 clr %o0 40006184: 10 80 00 0e b 400061bc 40006188: c2 27 bf f4 st %g1, [ %fp + -12 ] goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 4000618c: 83 28 a0 02 sll %g2, 2, %g1 40006190: 05 10 00 67 sethi %hi(0x40019c00), %g2 40006194: 84 10 a1 80 or %g2, 0x180, %g2 ! 40019d80 <_Objects_Information_table> 40006198: c2 00 80 01 ld [ %g2 + %g1 ], %g1 4000619c: d0 00 60 04 ld [ %g1 + 4 ], %o0 if ( !information ) { 400061a0: 80 a2 20 00 cmp %o0, 0 400061a4: 12 80 00 04 bne 400061b4 400061a8: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; 400061ac: 10 80 00 04 b 400061bc <== NOT EXECUTED 400061b0: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 400061b4: 40 00 05 72 call 4000777c <_Objects_Get> 400061b8: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 400061bc: c2 07 bf f4 ld [ %fp + -12 ], %g1 400061c0: 80 a0 60 00 cmp %g1, 0 400061c4: 22 80 00 07 be,a 400061e0 400061c8: 94 10 00 19 mov %i1, %o2 400061cc: 80 a0 60 02 cmp %g1, 2 400061d0: 08 80 00 0d bleu 40006204 400061d4: b0 10 20 04 mov 4, %i0 400061d8: 81 c7 e0 08 ret <== NOT EXECUTED 400061dc: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( _Thread_Start( 400061e0: 98 10 00 1a mov %i2, %o4 400061e4: 92 10 20 00 clr %o1 400061e8: 40 00 0d ff call 400099e4 <_Thread_Start> 400061ec: 96 10 20 00 clr %o3 400061f0: 80 a2 20 00 cmp %o0, 0 400061f4: 02 80 00 06 be 4000620c 400061f8: 01 00 00 00 nop the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); 400061fc: 7f ff ff bc call 400060ec <_Thread_Enable_dispatch> 40006200: b0 10 20 00 clr %i0 ! 0 40006204: 81 c7 e0 08 ret 40006208: 81 e8 00 00 restore return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 4000620c: 7f ff ff b8 call 400060ec <_Thread_Enable_dispatch> 40006210: b0 10 20 0e mov 0xe, %i0 return RTEMS_INCORRECT_STATE; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40006214: 81 c7 e0 08 ret 40006218: 81 e8 00 00 restore 400078d4 : */ rtems_status_code rtems_task_suspend( Objects_Id id ) { 400078d4: 9d e3 bf 90 save %sp, -112, %sp uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 400078d8: 92 96 20 00 orcc %i0, 0, %o1 400078dc: 12 80 00 0a bne 40007904 400078e0: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400078e4: 03 10 00 9a sethi %hi(0x40026800), %g1 400078e8: c4 00 62 50 ld [ %g1 + 0x250 ], %g2 ! 40026a50 <_Thread_Dispatch_disable_level> 400078ec: 84 00 a0 01 inc %g2 400078f0: c4 20 62 50 st %g2, [ %g1 + 0x250 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 400078f4: 03 10 00 9a sethi %hi(0x40026800), %g1 400078f8: d0 00 63 2c ld [ %g1 + 0x32c ], %o0 ! 40026b2c <_Thread_Executing> 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; 400078fc: 10 80 00 19 b 40007960 40007900: c0 27 bf f4 clr [ %fp + -12 ] 40007904: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 40007908: 80 a0 a0 04 cmp %g2, 4 4000790c: 18 80 00 06 bgu 40007924 40007910: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40007914: 83 32 60 1b srl %o1, 0x1b, %g1 40007918: 80 a0 60 01 cmp %g1, 1 4000791c: 02 80 00 05 be 40007930 40007920: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; 40007924: 90 10 20 00 clr %o0 40007928: 10 80 00 0e b 40007960 4000792c: c2 27 bf f4 st %g1, [ %fp + -12 ] goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40007930: 83 28 a0 02 sll %g2, 2, %g1 40007934: 05 10 00 9a sethi %hi(0x40026800), %g2 40007938: 84 10 a1 b0 or %g2, 0x1b0, %g2 ! 400269b0 <_Objects_Information_table> 4000793c: c2 00 80 01 ld [ %g2 + %g1 ], %g1 40007940: d0 00 60 04 ld [ %g1 + 4 ], %o0 if ( !information ) { 40007944: 80 a2 20 00 cmp %o0, 0 40007948: 12 80 00 04 bne 40007958 4000794c: 82 10 20 02 mov 2, %g1 *location = OBJECTS_ERROR; 40007950: 10 80 00 04 b 40007960 <== NOT EXECUTED 40007954: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40007958: 40 00 06 67 call 400092f4 <_Objects_Get> 4000795c: 94 07 bf f4 add %fp, -12, %o2 register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 40007960: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007964: 80 a0 60 00 cmp %g1, 0 40007968: 22 80 00 07 be,a 40007984 4000796c: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40007970: 80 a0 60 02 cmp %g1, 2 40007974: 08 80 00 0b bleu 400079a0 40007978: b0 10 20 04 mov 4, %i0 4000797c: 81 c7 e0 08 ret <== NOT EXECUTED 40007980: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 40007984: 80 88 60 02 btst 2, %g1 40007988: 12 80 00 08 bne 400079a8 4000798c: 01 00 00 00 nop _Thread_Suspend( the_thread ); 40007990: 40 00 0f 1c call 4000b600 <_Thread_Suspend> 40007994: b0 10 20 00 clr %i0 ! 0 _Thread_Enable_dispatch(); 40007998: 7f ff ff c2 call 400078a0 <_Thread_Enable_dispatch> 4000799c: 01 00 00 00 nop 400079a0: 81 c7 e0 08 ret 400079a4: 81 e8 00 00 restore return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 400079a8: 7f ff ff be call 400078a0 <_Thread_Enable_dispatch> 400079ac: b0 10 20 0f mov 0xf, %i0 return RTEMS_ALREADY_SUSPENDED; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400079b0: 81 c7 e0 08 ret 400079b4: 81 e8 00 00 restore 40018864 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 40018864: 9d e3 bf 90 save %sp, -112, %sp 40018868: 92 10 00 18 mov %i0, %o1 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 4001886c: 80 a6 60 00 cmp %i1, 0 40018870: 02 80 00 32 be 40018938 40018874: b0 10 20 09 mov 9, %i0 uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 40018878: 80 a2 60 00 cmp %o1, 0 4001887c: 12 80 00 0a bne 400188a4 40018880: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40018884: 03 10 00 eb sethi %hi(0x4003ac00), %g1 40018888: c4 00 63 70 ld [ %g1 + 0x370 ], %g2 ! 4003af70 <_Thread_Dispatch_disable_level> 4001888c: 84 00 a0 01 inc %g2 40018890: c4 20 63 70 st %g2, [ %g1 + 0x370 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 40018894: 03 10 00 ec sethi %hi(0x4003b000), %g1 40018898: f0 00 60 4c ld [ %g1 + 0x4c ], %i0 ! 4003b04c <_Thread_Executing> 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; 4001889c: 10 80 00 18 b 400188fc 400188a0: c0 27 bf f4 clr [ %fp + -12 ] 400188a4: 84 08 60 07 and %g1, 7, %g2 <== NOT EXECUTED tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 400188a8: 80 a0 a0 04 cmp %g2, 4 <== NOT EXECUTED 400188ac: 18 80 00 0e bgu 400188e4 <== NOT EXECUTED 400188b0: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 400188b4: 83 32 60 1b srl %o1, 0x1b, %g1 <== NOT EXECUTED 400188b8: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 400188bc: 12 80 00 0a bne 400188e4 <== NOT EXECUTED 400188c0: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 400188c4: 83 28 a0 02 sll %g2, 2, %g1 <== NOT EXECUTED 400188c8: 05 10 00 eb sethi %hi(0x4003ac00), %g2 <== NOT EXECUTED 400188cc: 84 10 a2 d0 or %g2, 0x2d0, %g2 ! 4003aed0 <_Objects_Information_table> <== NOT EXECUTED 400188d0: c2 00 80 01 ld [ %g2 + %g1 ], %g1 <== NOT EXECUTED 400188d4: d0 00 60 04 ld [ %g1 + 4 ], %o0 <== NOT EXECUTED if ( !information ) { 400188d8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400188dc: 12 80 00 05 bne 400188f0 <== NOT EXECUTED 400188e0: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED *location = OBJECTS_ERROR; 400188e4: b0 10 20 00 clr %i0 <== NOT EXECUTED 400188e8: 10 80 00 05 b 400188fc <== NOT EXECUTED 400188ec: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 400188f0: 7f ff c9 42 call 4000adf8 <_Objects_Get> <== NOT EXECUTED 400188f4: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 400188f8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 400188fc: c2 07 bf f4 ld [ %fp + -12 ], %g1 40018900: 80 a0 60 00 cmp %g1, 0 40018904: 22 80 00 0f be,a 40018940 40018908: c4 06 21 7c ld [ %i0 + 0x17c ], %g2 4001890c: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40018910: 08 80 00 0a bleu 40018938 <== NOT EXECUTED 40018914: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED 40018918: 81 c7 e0 08 ret <== NOT EXECUTED 4001891c: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { 40018920: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED 40018924: 32 80 00 07 bne,a 40018940 <== NOT EXECUTED 40018928: c4 00 80 00 ld [ %g2 ], %g2 <== NOT EXECUTED tvp->dtor = dtor; 4001892c: f4 20 a0 10 st %i2, [ %g2 + 0x10 ] <== NOT EXECUTED _Thread_Enable_dispatch(); 40018930: 7f ff ff c0 call 40018830 <_Thread_Enable_dispatch> <== NOT EXECUTED 40018934: b0 10 20 00 clr %i0 <== NOT EXECUTED 40018938: 81 c7 e0 08 ret <== NOT EXECUTED 4001893c: 81 e8 00 00 restore <== NOT EXECUTED /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; while (tvp) { 40018940: 80 a0 a0 00 cmp %g2, 0 40018944: 32 bf ff f7 bne,a 40018920 40018948: c2 00 a0 04 ld [ %g2 + 4 ], %g1 <== NOT EXECUTED 4001894c: 11 10 00 eb sethi %hi(0x4003ac00), %o0 40018950: 92 10 20 14 mov 0x14, %o1 40018954: 7f ff c6 8d call 4000a388 <_Heap_Allocate> 40018958: 90 12 23 bc or %o0, 0x3bc, %o0 * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 4001895c: 80 a2 20 00 cmp %o0, 0 40018960: 32 80 00 06 bne,a 40018978 40018964: c4 06 21 7c ld [ %i0 + 0x17c ], %g2 _Thread_Enable_dispatch(); 40018968: 7f ff ff b2 call 40018830 <_Thread_Enable_dispatch> <== NOT EXECUTED 4001896c: b0 10 20 1a mov 0x1a, %i0 <== NOT EXECUTED 40018970: 81 c7 e0 08 ret <== NOT EXECUTED 40018974: 81 e8 00 00 restore <== NOT EXECUTED return RTEMS_NO_MEMORY; } new->gval = *ptr; 40018978: c2 06 40 00 ld [ %i1 ], %g1 new->ptr = ptr; new->dtor = dtor; new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; the_thread->task_variables = new; 4001897c: d0 26 21 7c st %o0, [ %i0 + 0x17c ] _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 40018980: c2 22 20 08 st %g1, [ %o0 + 8 ] new->ptr = ptr; 40018984: f2 22 20 04 st %i1, [ %o0 + 4 ] new->dtor = dtor; 40018988: f4 22 20 10 st %i2, [ %o0 + 0x10 ] new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 4001898c: c4 22 00 00 st %g2, [ %o0 ] the_thread->task_variables = new; _Thread_Enable_dispatch(); 40018990: 7f ff ff a8 call 40018830 <_Thread_Enable_dispatch> 40018994: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40018998: 81 c7 e0 08 ret 4001899c: 81 e8 00 00 restore 400189d4 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 400189d4: 9d e3 bf 90 save %sp, -112, %sp 400189d8: 92 10 00 18 mov %i0, %o1 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 400189dc: 80 a6 60 00 cmp %i1, 0 400189e0: 02 80 00 52 be 40018b28 400189e4: b0 10 20 09 mov 9, %i0 uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 400189e8: 80 a2 60 00 cmp %o1, 0 400189ec: 12 80 00 0a bne 40018a14 400189f0: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400189f4: 03 10 00 eb sethi %hi(0x4003ac00), %g1 400189f8: c4 00 63 70 ld [ %g1 + 0x370 ], %g2 ! 4003af70 <_Thread_Dispatch_disable_level> 400189fc: 84 00 a0 01 inc %g2 40018a00: c4 20 63 70 st %g2, [ %g1 + 0x370 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 40018a04: 03 10 00 ec sethi %hi(0x4003b000), %g1 40018a08: d0 00 60 4c ld [ %g1 + 0x4c ], %o0 ! 4003b04c <_Thread_Executing> 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; 40018a0c: 10 80 00 19 b 40018a70 40018a10: c0 27 bf f4 clr [ %fp + -12 ] 40018a14: 84 08 60 07 and %g1, 7, %g2 <== NOT EXECUTED tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 40018a18: 80 a0 a0 04 cmp %g2, 4 <== NOT EXECUTED 40018a1c: 18 80 00 06 bgu 40018a34 <== NOT EXECUTED 40018a20: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40018a24: 83 32 60 1b srl %o1, 0x1b, %g1 <== NOT EXECUTED 40018a28: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40018a2c: 02 80 00 05 be 40018a40 <== NOT EXECUTED 40018a30: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED *location = OBJECTS_ERROR; 40018a34: 90 10 20 00 clr %o0 <== NOT EXECUTED 40018a38: 10 80 00 0e b 40018a70 <== NOT EXECUTED 40018a3c: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40018a40: 83 28 a0 02 sll %g2, 2, %g1 <== NOT EXECUTED 40018a44: 05 10 00 eb sethi %hi(0x4003ac00), %g2 <== NOT EXECUTED 40018a48: 84 10 a2 d0 or %g2, 0x2d0, %g2 ! 4003aed0 <_Objects_Information_table> <== NOT EXECUTED 40018a4c: c2 00 80 01 ld [ %g2 + %g1 ], %g1 <== NOT EXECUTED 40018a50: d0 00 60 04 ld [ %g1 + 4 ], %o0 <== NOT EXECUTED if ( !information ) { 40018a54: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40018a58: 12 80 00 04 bne 40018a68 <== NOT EXECUTED 40018a5c: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED *location = OBJECTS_ERROR; 40018a60: 10 80 00 04 b 40018a70 <== NOT EXECUTED 40018a64: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40018a68: 7f ff c8 e4 call 4000adf8 <_Objects_Get> <== NOT EXECUTED 40018a6c: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); switch (location) { 40018a70: c2 07 bf f4 ld [ %fp + -12 ], %g1 40018a74: 80 a0 60 00 cmp %g1, 0 40018a78: 22 80 00 07 be,a 40018a94 40018a7c: f0 02 21 7c ld [ %o0 + 0x17c ], %i0 40018a80: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40018a84: 08 80 00 29 bleu 40018b28 <== NOT EXECUTED 40018a88: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED 40018a8c: 81 c7 e0 08 ret <== NOT EXECUTED 40018a90: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED default: return RTEMS_INTERNAL_ERROR; case OBJECTS_LOCAL: tvp = the_thread->task_variables; 40018a94: 10 80 00 28 b 40018b34 40018a98: 84 10 20 00 clr %g2 while (tvp) { if (tvp->ptr == ptr) { 40018a9c: 80 a0 40 19 cmp %g1, %i1 40018aa0: 32 80 00 24 bne,a 40018b30 40018aa4: 84 10 00 18 mov %i0, %g2 <== NOT EXECUTED if (prev) 40018aa8: 80 a0 a0 00 cmp %g2, 0 40018aac: 02 80 00 04 be 40018abc 40018ab0: c2 06 00 00 ld [ %i0 ], %g1 prev->next = tvp->next; 40018ab4: 10 80 00 03 b 40018ac0 <== NOT EXECUTED 40018ab8: c2 20 80 00 st %g1, [ %g2 ] <== NOT EXECUTED else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 40018abc: c2 22 21 7c st %g1, [ %o0 + 0x17c ] if (_Thread_Is_executing(the_thread)) { 40018ac0: 03 10 00 ec sethi %hi(0x4003b000), %g1 40018ac4: c2 00 60 4c ld [ %g1 + 0x4c ], %g1 ! 4003b04c <_Thread_Executing> 40018ac8: 80 a2 00 01 cmp %o0, %g1 40018acc: 12 80 00 0c bne 40018afc 40018ad0: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 if (tvp->dtor) 40018ad4: 80 a0 a0 00 cmp %g2, 0 40018ad8: 22 80 00 06 be,a 40018af0 40018adc: c4 06 20 04 ld [ %i0 + 4 ], %g2 (*tvp->dtor)(*tvp->ptr); 40018ae0: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 40018ae4: 9f c0 80 00 call %g2 <== NOT EXECUTED 40018ae8: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED *tvp->ptr = tvp->gval; 40018aec: c4 06 20 04 ld [ %i0 + 4 ], %g2 <== NOT EXECUTED 40018af0: c2 06 20 08 ld [ %i0 + 8 ], %g1 40018af4: 10 80 00 07 b 40018b10 40018af8: c2 20 80 00 st %g1, [ %g2 ] } else { if (tvp->dtor) 40018afc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40018b00: 02 80 00 05 be 40018b14 <== NOT EXECUTED 40018b04: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED (*tvp->dtor)(tvp->tval); 40018b08: 9f c0 80 00 call %g2 <== NOT EXECUTED 40018b0c: d0 06 20 0c ld [ %i0 + 0xc ], %o0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 40018b10: 92 10 00 18 mov %i0, %o1 40018b14: 11 10 00 eb sethi %hi(0x4003ac00), %o0 40018b18: 7f ff c6 43 call 4000a424 <_Heap_Free> 40018b1c: 90 12 23 bc or %o0, 0x3bc, %o0 ! 4003afbc <_Workspace_Area> } _Workspace_Free(tvp); _Thread_Enable_dispatch(); 40018b20: 7f ff ff a0 call 400189a0 <_Thread_Enable_dispatch> 40018b24: b0 10 20 00 clr %i0 40018b28: 81 c7 e0 08 ret 40018b2c: 81 e8 00 00 restore return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 40018b30: f0 06 00 00 ld [ %i0 ], %i0 <== NOT EXECUTED default: return RTEMS_INTERNAL_ERROR; case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 40018b34: 80 a6 20 00 cmp %i0, 0 40018b38: 32 bf ff d9 bne,a 40018a9c 40018b3c: c2 06 20 04 ld [ %i0 + 4 ], %g1 return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 40018b40: 7f ff ff 98 call 400189a0 <_Thread_Enable_dispatch> <== NOT EXECUTED 40018b44: b0 10 20 09 mov 9, %i0 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40018b48: 81 c7 e0 08 ret <== NOT EXECUTED 40018b4c: 81 e8 00 00 restore <== NOT EXECUTED 40018b84 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 40018b84: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 40018b88: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40018b8c: 02 80 00 3f be 40018c88 <== NOT EXECUTED 40018b90: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; if ( !result ) 40018b94: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 40018b98: 02 80 00 3c be 40018c88 <== NOT EXECUTED 40018b9c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 40018ba0: 12 80 00 0a bne 40018bc8 <== NOT EXECUTED 40018ba4: 83 36 20 18 srl %i0, 0x18, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40018ba8: 03 10 00 eb sethi %hi(0x4003ac00), %g1 <== NOT EXECUTED 40018bac: c4 00 63 70 ld [ %g1 + 0x370 ], %g2 ! 4003af70 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40018bb0: 84 00 a0 01 inc %g2 <== NOT EXECUTED 40018bb4: c4 20 63 70 st %g2, [ %g1 + 0x370 ] <== NOT EXECUTED Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 40018bb8: 03 10 00 ec sethi %hi(0x4003b000), %g1 <== NOT EXECUTED 40018bbc: d0 00 60 4c ld [ %g1 + 0x4c ], %o0 ! 4003b04c <_Thread_Executing> <== NOT EXECUTED 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; 40018bc0: 10 80 00 19 b 40018c24 <== NOT EXECUTED 40018bc4: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED 40018bc8: 84 08 60 07 and %g1, 7, %g2 <== NOT EXECUTED tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 40018bcc: 80 a0 a0 04 cmp %g2, 4 <== NOT EXECUTED 40018bd0: 18 80 00 06 bgu 40018be8 <== NOT EXECUTED 40018bd4: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40018bd8: 83 36 20 1b srl %i0, 0x1b, %g1 <== NOT EXECUTED 40018bdc: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40018be0: 02 80 00 05 be 40018bf4 <== NOT EXECUTED 40018be4: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED *location = OBJECTS_ERROR; 40018be8: 90 10 20 00 clr %o0 <== NOT EXECUTED 40018bec: 10 80 00 0e b 40018c24 <== NOT EXECUTED 40018bf0: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40018bf4: 83 28 a0 02 sll %g2, 2, %g1 <== NOT EXECUTED 40018bf8: 05 10 00 eb sethi %hi(0x4003ac00), %g2 <== NOT EXECUTED 40018bfc: 84 10 a2 d0 or %g2, 0x2d0, %g2 ! 4003aed0 <_Objects_Information_table> <== NOT EXECUTED 40018c00: c2 00 80 01 ld [ %g2 + %g1 ], %g1 <== NOT EXECUTED 40018c04: d0 00 60 04 ld [ %g1 + 4 ], %o0 <== NOT EXECUTED if ( !information ) { 40018c08: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40018c0c: 12 80 00 04 bne 40018c1c <== NOT EXECUTED 40018c10: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED *location = OBJECTS_ERROR; 40018c14: 10 80 00 04 b 40018c24 <== NOT EXECUTED 40018c18: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40018c1c: 7f ff c8 77 call 4000adf8 <_Objects_Get> <== NOT EXECUTED 40018c20: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 40018c24: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40018c28: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40018c2c: 22 80 00 10 be,a 40018c6c <== NOT EXECUTED 40018c30: d0 02 21 7c ld [ %o0 + 0x17c ], %o0 <== NOT EXECUTED 40018c34: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40018c38: 08 80 00 0b bleu 40018c64 <== NOT EXECUTED 40018c3c: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED 40018c40: 81 c7 e0 08 ret <== NOT EXECUTED 40018c44: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { 40018c48: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED 40018c4c: 32 80 00 08 bne,a 40018c6c <== NOT EXECUTED 40018c50: d0 02 00 00 ld [ %o0 ], %o0 <== NOT EXECUTED /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 40018c54: c2 02 20 0c ld [ %o0 + 0xc ], %g1 <== NOT EXECUTED _Thread_Enable_dispatch(); 40018c58: b0 10 20 00 clr %i0 <== NOT EXECUTED 40018c5c: 7f ff ff bd call 40018b50 <_Thread_Enable_dispatch> <== NOT EXECUTED 40018c60: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED 40018c64: 81 c7 e0 08 ret <== NOT EXECUTED 40018c68: 81 e8 00 00 restore <== NOT EXECUTED /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; while (tvp) { 40018c6c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40018c70: 32 bf ff f6 bne,a 40018c48 <== NOT EXECUTED 40018c74: c2 02 20 04 ld [ %o0 + 4 ], %g1 <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 40018c78: 7f ff ff b6 call 40018b50 <_Thread_Enable_dispatch> <== NOT EXECUTED 40018c7c: b0 10 20 09 mov 9, %i0 <== NOT EXECUTED 40018c80: 81 c7 e0 08 ret <== NOT EXECUTED 40018c84: 81 e8 00 00 restore <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; 40018c88: b0 10 20 09 mov 9, %i0 <== NOT EXECUTED } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40018c8c: 81 c7 e0 08 ret <== NOT EXECUTED 40018c90: 81 e8 00 00 restore <== NOT EXECUTED 40003024 : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 40003024: 03 10 00 64 sethi %hi(0x40019000), %g1 <== NOT EXECUTED 40003028: d0 20 60 c4 st %o0, [ %g1 + 0xc4 ] ! 400190c4 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 4000302c: 03 10 00 64 sethi %hi(0x40019000), %g1 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; return RTEMS_SUCCESSFUL; } 40003030: 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; 40003034: d2 20 60 c8 st %o1, [ %g1 + 0xc8 ] <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 40003038: 03 10 00 64 sethi %hi(0x40019000), %g1 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 4000303c: 81 c3 e0 08 retl <== NOT EXECUTED 40003040: d4 20 60 cc st %o2, [ %g1 + 0xcc ] ! 400190cc <== NOT EXECUTED 40004698 : } } rtems_status_code rtems_termios_close (void *arg) { 40004698: 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); 4000469c: 03 10 00 67 sethi %hi(0x40019c00), %g1 400046a0: d0 00 60 c8 ld [ %g1 + 0xc8 ], %o0 ! 40019cc8 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 400046a4: c2 06 00 00 ld [ %i0 ], %g1 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 400046a8: 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; 400046ac: e0 00 60 28 ld [ %g1 + 0x28 ], %l0 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 400046b0: 40 00 04 9c call 40005920 400046b4: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) 400046b8: 80 a2 20 00 cmp %o0, 0 400046bc: 22 80 00 05 be,a 400046d0 400046c0: c2 04 20 08 ld [ %l0 + 8 ], %g1 rtems_fatal_error_occurred (sc); 400046c4: 40 00 07 96 call 4000651c <== NOT EXECUTED 400046c8: 01 00 00 00 nop <== NOT EXECUTED if (--tty->refcount == 0) { 400046cc: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 400046d0: 82 00 7f ff add %g1, -1, %g1 400046d4: 80 a0 60 00 cmp %g1, 0 400046d8: 12 80 00 5b bne 40004844 400046dc: c2 24 20 08 st %g1, [ %l0 + 8 ] if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 400046e0: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 400046e4: 03 10 00 66 sethi %hi(0x40019800), %g1 400046e8: 82 10 62 c4 or %g1, 0x2c4, %g1 ! 40019ac4 400046ec: 85 28 a0 05 sll %g2, 5, %g2 400046f0: 84 00 80 01 add %g2, %g1, %g2 400046f4: c2 00 a0 04 ld [ %g2 + 4 ], %g1 400046f8: 80 a0 60 00 cmp %g1, 0 400046fc: 02 80 00 06 be 40004714 40004700: 01 00 00 00 nop /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 40004704: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004708: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED * default: just flush output buffer */ drainOutput (tty); } if (tty->device.outputUsesInterrupts 4000470c: 10 80 00 05 b 40004720 <== NOT EXECUTED 40004710: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 <== NOT EXECUTED } else { /* * default: just flush output buffer */ drainOutput (tty); 40004714: 7f ff fd c5 call 40003e28 40004718: 90 10 00 10 mov %l0, %o0 } if (tty->device.outputUsesInterrupts 4000471c: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 40004720: 80 a0 60 02 cmp %g1, 2 40004724: 32 80 00 13 bne,a 40004770 40004728: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 4000472c: d0 04 20 c4 ld [ %l0 + 0xc4 ], %o0 <== NOT EXECUTED 40004730: 40 00 02 ad call 400051e4 <== NOT EXECUTED 40004734: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 40004738: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000473c: 22 80 00 05 be,a 40004750 <== NOT EXECUTED 40004740: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40004744: 40 00 07 76 call 4000651c <== NOT EXECUTED 40004748: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_event_send( 4000474c: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0 <== NOT EXECUTED 40004750: 40 00 02 a5 call 400051e4 <== NOT EXECUTED 40004754: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 40004758: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000475c: 22 80 00 05 be,a 40004770 <== NOT EXECUTED 40004760: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40004764: 40 00 07 6e call 4000651c <== NOT EXECUTED 40004768: 01 00 00 00 nop <== NOT EXECUTED } if (tty->device.lastClose) 4000476c: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED 40004770: 80 a0 60 00 cmp %g1, 0 40004774: 22 80 00 07 be,a 40004790 40004778: c2 04 00 00 ld [ %l0 ], %g1 (*tty->device.lastClose)(tty->major, tty->minor, arg); 4000477c: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED 40004780: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 <== NOT EXECUTED 40004784: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004788: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED if (tty->forw == NULL) { 4000478c: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED 40004790: 80 a0 60 00 cmp %g1, 0 40004794: 12 80 00 08 bne 400047b4 40004798: c4 04 20 04 ld [ %l0 + 4 ], %g2 rtems_termios_ttyTail = tty->back; 4000479c: 03 10 00 67 sethi %hi(0x40019c00), %g1 if ( rtems_termios_ttyTail != NULL ) { 400047a0: 80 a0 a0 00 cmp %g2, 0 400047a4: 02 80 00 05 be 400047b8 400047a8: c4 20 60 cc st %g2, [ %g1 + 0xcc ] rtems_termios_ttyTail->forw = NULL; 400047ac: 10 80 00 03 b 400047b8 <== NOT EXECUTED 400047b0: c0 20 80 00 clr [ %g2 ] <== NOT EXECUTED } } else { tty->forw->back = tty->back; 400047b4: c4 20 60 04 st %g2, [ %g1 + 4 ] <== NOT EXECUTED } if (tty->back == NULL) { 400047b8: c2 04 20 04 ld [ %l0 + 4 ], %g1 400047bc: 80 a0 60 00 cmp %g1, 0 400047c0: 12 80 00 08 bne 400047e0 400047c4: c4 04 00 00 ld [ %l0 ], %g2 rtems_termios_ttyHead = tty->forw; 400047c8: 03 10 00 67 sethi %hi(0x40019c00), %g1 if ( rtems_termios_ttyHead != NULL ) { 400047cc: 80 a0 a0 00 cmp %g2, 0 400047d0: 02 80 00 05 be 400047e4 400047d4: c4 20 60 d0 st %g2, [ %g1 + 0xd0 ] rtems_termios_ttyHead->back = NULL; 400047d8: 10 80 00 03 b 400047e4 <== NOT EXECUTED 400047dc: c0 20 a0 04 clr [ %g2 + 4 ] <== NOT EXECUTED } } else { tty->back->forw = tty->forw; 400047e0: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 400047e4: 40 00 04 08 call 40005804 400047e8: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 rtems_semaphore_delete (tty->osem); 400047ec: 40 00 04 06 call 40005804 400047f0: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 400047f4: 40 00 04 04 call 40005804 400047f8: d0 04 20 8c ld [ %l0 + 0x8c ], %o0 if ((tty->device.pollRead == NULL) || 400047fc: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 40004800: 80 a0 60 00 cmp %g1, 0 40004804: 02 80 00 06 be 4000481c 40004808: 01 00 00 00 nop 4000480c: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 40004810: 80 a0 60 02 cmp %g1, 2 40004814: 12 80 00 04 bne 40004824 40004818: 01 00 00 00 nop (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); 4000481c: 40 00 03 fa call 40005804 <== NOT EXECUTED 40004820: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED free (tty->rawInBuf.theBuf); 40004824: 7f ff f6 62 call 400021ac 40004828: d0 04 20 58 ld [ %l0 + 0x58 ], %o0 free (tty->rawOutBuf.theBuf); 4000482c: 7f ff f6 60 call 400021ac 40004830: d0 04 20 7c ld [ %l0 + 0x7c ], %o0 free (tty->cbuf); 40004834: 7f ff f6 5e call 400021ac 40004838: d0 04 20 1c ld [ %l0 + 0x1c ], %o0 free (tty); 4000483c: 7f ff f6 5c call 400021ac 40004840: 90 10 00 10 mov %l0, %o0 } rtems_semaphore_release (rtems_termios_ttyMutex); 40004844: 03 10 00 67 sethi %hi(0x40019c00), %g1 40004848: d0 00 60 c8 ld [ %g1 + 0xc8 ], %o0 ! 40019cc8 4000484c: 40 00 04 fc call 40005c3c 40004850: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 40004854: 81 c7 e0 08 ret 40004858: 81 e8 00 00 restore 40003248 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 40003248: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 4000324c: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40003250: c4 06 20 b4 ld [ %i0 + 0xb4 ], %g2 <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 40003254: 82 00 40 19 add %g1, %i1, %g1 <== NOT EXECUTED 40003258: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 4000325c: 80 a0 a0 02 cmp %g2, 2 <== NOT EXECUTED 40003260: 12 80 00 0b bne 4000328c <== NOT EXECUTED 40003264: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 40003268: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 <== NOT EXECUTED 4000326c: 40 00 07 de call 400051e4 <== NOT EXECUTED 40003270: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 40003274: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003278: 02 80 00 12 be 400032c0 <== NOT EXECUTED 4000327c: b0 10 20 00 clr %i0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40003280: 40 00 0c a7 call 4000651c <== NOT EXECUTED 40003284: 01 00 00 00 nop <== NOT EXECUTED 40003288: 30 80 00 0e b,a 400032c0 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 4000328c: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 40003290: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 40003294: 12 80 00 09 bne 400032b8 <== NOT EXECUTED 40003298: 03 10 00 66 sethi %hi(0x40019800), %g1 <== NOT EXECUTED /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 4000329c: c2 00 63 78 ld [ %g1 + 0x378 ], %g1 ! 40019b78 <== NOT EXECUTED 400032a0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400032a4: 02 80 00 07 be 400032c0 <== NOT EXECUTED 400032a8: b0 10 20 00 clr %i0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 400032ac: 9f c0 40 00 call %g1 <== NOT EXECUTED 400032b0: 01 00 00 00 nop <== NOT EXECUTED 400032b4: 30 80 00 03 b,a 400032c0 <== NOT EXECUTED } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 400032b8: 7f ff ff 69 call 4000305c <== NOT EXECUTED 400032bc: 81 e8 00 00 restore <== NOT EXECUTED } } 400032c0: 81 c7 e0 08 ret <== NOT EXECUTED 400032c4: 81 e8 00 00 restore <== NOT EXECUTED 400032c8 : * 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) { 400032c8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED char c; int dropped = 0; boolean flow_rcv = FALSE; /* TRUE, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 400032cc: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 400032d0: 05 10 00 66 sethi %hi(0x40019800), %g2 <== NOT EXECUTED 400032d4: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 400032d8: 84 10 a2 c4 or %g2, 0x2c4, %g2 <== NOT EXECUTED 400032dc: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 400032e0: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED 400032e4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400032e8: 12 80 00 10 bne 40003328 <== NOT EXECUTED 400032ec: a0 10 00 02 mov %g2, %l0 <== NOT EXECUTED 400032f0: a6 10 20 00 clr %l3 <== NOT EXECUTED 400032f4: ac 10 20 00 clr %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); 400032f8: aa 06 20 30 add %i0, 0x30, %l5 <== 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, 400032fc: 10 80 00 ac b 400035ac <== NOT EXECUTED 40003300: a8 06 20 4a add %i0, 0x4a, %l4 <== NOT EXECUTED boolean 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++; 40003304: d0 0e 40 00 ldub [ %i1 ], %o0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_rint(c,tty); 40003308: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 4000330c: 82 00 40 10 add %g1, %l0, %g1 <== NOT EXECUTED 40003310: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED 40003314: 91 2a 20 18 sll %o0, 0x18, %o0 <== NOT EXECUTED boolean 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++; 40003318: b2 06 60 01 inc %i1 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_rint(c,tty); 4000331c: 91 3a 20 18 sra %o0, 0x18, %o0 <== NOT EXECUTED 40003320: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003324: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED int dropped = 0; boolean 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--) { 40003328: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED 4000332c: 80 a6 bf ff cmp %i2, -1 <== NOT EXECUTED 40003330: 32 bf ff f5 bne,a 40003304 <== NOT EXECUTED 40003334: 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 )) { 40003338: c2 06 20 e4 ld [ %i0 + 0xe4 ], %g1 <== NOT EXECUTED 4000333c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003340: 12 80 00 a6 bne 400035d8 <== NOT EXECUTED 40003344: a6 10 20 00 clr %l3 <== NOT EXECUTED 40003348: c2 06 20 dc ld [ %i0 + 0xdc ], %g1 <== NOT EXECUTED 4000334c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003350: 22 80 00 a3 be,a 400035dc <== NOT EXECUTED 40003354: b0 10 00 13 mov %l3, %i0 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 40003358: d2 06 20 e0 ld [ %i0 + 0xe0 ], %o1 <== NOT EXECUTED 4000335c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003360: 90 06 20 30 add %i0, 0x30, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 40003364: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40003368: a6 10 20 00 clr %l3 <== NOT EXECUTED 4000336c: 10 80 00 9b b 400035d8 <== NOT EXECUTED 40003370: 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) { 40003374: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40003378: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 4000337c: 02 80 00 1b be 400033e8 <== NOT EXECUTED 40003380: e4 0e 40 00 ldub [ %i1 ], %l2 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 40003384: c4 0e 20 4a ldub [ %i0 + 0x4a ], %g2 <== NOT EXECUTED 40003388: 83 2c a0 18 sll %l2, 0x18, %g1 <== NOT EXECUTED 4000338c: 87 38 60 18 sra %g1, 0x18, %g3 <== NOT EXECUTED 40003390: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 40003394: 12 80 00 0e bne 400033cc <== NOT EXECUTED 40003398: c2 0e 20 49 ldub [ %i0 + 0x49 ], %g1 <== NOT EXECUTED if (c == tty->termios.c_cc[VSTART]) { 4000339c: 82 08 60 ff and %g1, 0xff, %g1 <== NOT EXECUTED 400033a0: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 400033a4: 12 80 00 05 bne 400033b8 <== NOT EXECUTED 400033a8: 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; 400033ac: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400033b0: 10 80 00 04 b 400033c0 <== NOT EXECUTED 400033b4: 82 18 60 10 xor %g1, 0x10, %g1 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 400033b8: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400033bc: 82 10 60 10 or %g1, 0x10, %g1 <== NOT EXECUTED 400033c0: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 400033c4: 10 80 00 0c b 400033f4 <== NOT EXECUTED 400033c8: ac 10 20 01 mov 1, %l6 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = TRUE; } else if (c == tty->termios.c_cc[VSTART]) { 400033cc: 82 08 60 ff and %g1, 0xff, %g1 <== NOT EXECUTED 400033d0: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 400033d4: 12 80 00 06 bne 400033ec <== NOT EXECUTED 400033d8: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 400033dc: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400033e0: 10 bf ff f8 b 400033c0 <== NOT EXECUTED 400033e4: 82 08 7f ef and %g1, -17, %g1 <== NOT EXECUTED flow_rcv = TRUE; } } if (flow_rcv) { 400033e8: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED 400033ec: 02 80 00 1c be 4000345c <== NOT EXECUTED 400033f0: 01 00 00 00 nop <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 400033f4: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400033f8: 82 08 60 30 and %g1, 0x30, %g1 <== NOT EXECUTED 400033fc: 80 a0 60 20 cmp %g1, 0x20 <== NOT EXECUTED 40003400: 32 80 00 6b bne,a 400035ac <== NOT EXECUTED 40003404: b2 06 60 01 inc %i1 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 40003408: 7f ff fa 54 call 40001d58 <== NOT EXECUTED 4000340c: 01 00 00 00 nop <== NOT EXECUTED 40003410: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 40003414: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 40003418: 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; 4000341c: 82 08 7f df and %g1, -33, %g1 <== NOT EXECUTED 40003420: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 40003424: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40003428: 02 80 00 09 be 4000344c <== NOT EXECUTED 4000342c: 01 00 00 00 nop <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 40003430: d2 06 20 84 ld [ %i0 + 0x84 ], %o1 <== NOT EXECUTED 40003434: c2 06 20 7c ld [ %i0 + 0x7c ], %g1 <== NOT EXECUTED 40003438: c4 06 20 a4 ld [ %i0 + 0xa4 ], %g2 <== NOT EXECUTED 4000343c: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 40003440: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 40003444: 9f c0 80 00 call %g2 <== NOT EXECUTED 40003448: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 4000344c: 7f ff fa 47 call 40001d68 <== NOT EXECUTED 40003450: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 40003454: 10 80 00 56 b 400035ac <== NOT EXECUTED 40003458: b2 06 60 01 inc %i1 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 4000345c: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 <== NOT EXECUTED 40003460: d2 06 20 64 ld [ %i0 + 0x64 ], %o1 <== NOT EXECUTED 40003464: 40 00 48 03 call 40015470 <.urem> <== NOT EXECUTED 40003468: 90 02 20 01 inc %o0 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 4000346c: 7f ff fa 3b call 40001d58 <== NOT EXECUTED 40003470: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 40003474: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 40003478: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED 4000347c: d0 06 20 64 ld [ %i0 + 0x64 ], %o0 <== NOT EXECUTED 40003480: d2 06 20 64 ld [ %i0 + 0x64 ], %o1 <== NOT EXECUTED 40003484: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED 40003488: 40 00 47 fa call 40015470 <.urem> <== NOT EXECUTED 4000348c: 90 02 00 10 add %o0, %l0, %o0 <== NOT EXECUTED 40003490: c2 06 20 c0 ld [ %i0 + 0xc0 ], %g1 <== NOT EXECUTED 40003494: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 40003498: 08 80 00 2d bleu 4000354c <== NOT EXECUTED 4000349c: 01 00 00 00 nop <== NOT EXECUTED 400034a0: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400034a4: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 400034a8: 12 80 00 29 bne 4000354c <== NOT EXECUTED 400034ac: 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; 400034b0: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400034b4: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED 400034b8: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 400034bc: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400034c0: 82 08 64 02 and %g1, 0x402, %g1 <== NOT EXECUTED 400034c4: 80 a0 64 00 cmp %g1, 0x400 <== NOT EXECUTED 400034c8: 12 80 00 13 bne 40003514 <== NOT EXECUTED 400034cc: 01 00 00 00 nop <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 400034d0: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400034d4: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 400034d8: 12 80 00 06 bne 400034f0 <== NOT EXECUTED 400034dc: 01 00 00 00 nop <== NOT EXECUTED 400034e0: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED 400034e4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400034e8: 12 80 00 19 bne 4000354c <== NOT EXECUTED 400034ec: 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; 400034f0: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 400034f4: c4 06 20 a4 ld [ %i0 + 0xa4 ], %g2 <== NOT EXECUTED 400034f8: 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; 400034fc: 82 10 60 02 or %g1, 2, %g1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 40003500: 92 10 00 14 mov %l4, %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; 40003504: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED (*tty->device.write)(tty->minor, 40003508: 9f c0 80 00 call %g2 <== NOT EXECUTED 4000350c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 40003510: 30 80 00 0f b,a 4000354c <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 40003514: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40003518: 82 08 61 04 and %g1, 0x104, %g1 <== NOT EXECUTED 4000351c: 80 a0 61 00 cmp %g1, 0x100 <== NOT EXECUTED 40003520: 12 80 00 0b bne 4000354c <== NOT EXECUTED 40003524: 01 00 00 00 nop <== NOT EXECUTED == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 40003528: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 4000352c: 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; 40003530: 82 10 60 04 or %g1, 4, %g1 <== NOT EXECUTED 40003534: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 40003538: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000353c: 02 80 00 04 be 4000354c <== NOT EXECUTED 40003540: 01 00 00 00 nop <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 40003544: 9f c0 80 00 call %g2 <== NOT EXECUTED 40003548: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED } } } /* reenable interrupts */ rtems_interrupt_enable(level); 4000354c: 7f ff fa 07 call 40001d68 <== NOT EXECUTED 40003550: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 40003554: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED 40003558: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 4000355c: 32 80 00 04 bne,a 4000356c <== NOT EXECUTED 40003560: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 <== NOT EXECUTED dropped++; 40003564: 10 80 00 11 b 400035a8 <== NOT EXECUTED 40003568: a6 04 e0 01 inc %l3 <== NOT EXECUTED } else { tty->rawInBuf.theBuf[newTail] = c; 4000356c: e4 28 40 10 stb %l2, [ %g1 + %l0 ] <== NOT EXECUTED tty->rawInBuf.Tail = newTail; /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 40003570: 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; 40003574: 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 )) { 40003578: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000357c: 32 80 00 0c bne,a 400035ac <== NOT EXECUTED 40003580: b2 06 60 01 inc %i1 <== NOT EXECUTED 40003584: c2 06 20 dc ld [ %i0 + 0xdc ], %g1 <== NOT EXECUTED 40003588: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000358c: 22 80 00 08 be,a 400035ac <== NOT EXECUTED 40003590: b2 06 60 01 inc %i1 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 40003594: d2 06 20 e0 ld [ %i0 + 0xe0 ], %o1 <== NOT EXECUTED 40003598: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000359c: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 400035a0: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 400035a4: c2 26 20 e4 st %g1, [ %i0 + 0xe4 ] <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 400035a8: b2 06 60 01 inc %i1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 400035ac: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED 400035b0: 80 a6 bf ff cmp %i2, -1 <== NOT EXECUTED 400035b4: 12 bf ff 70 bne 40003374 <== NOT EXECUTED 400035b8: 01 00 00 00 nop <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 400035bc: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 400035c0: d0 06 20 68 ld [ %i0 + 0x68 ], %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 400035c4: 82 00 40 13 add %g1, %l3, %g1 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 400035c8: 40 00 09 9d call 40005c3c <== NOT EXECUTED 400035cc: c2 26 20 78 st %g1, [ %i0 + 0x78 ] <== NOT EXECUTED return dropped; } 400035d0: 81 c7 e0 08 ret <== NOT EXECUTED 400035d4: 91 e8 00 13 restore %g0, %l3, %o0 <== NOT EXECUTED 400035d8: b0 10 00 13 mov %l3, %i0 <== NOT EXECUTED 400035dc: 81 c7 e0 08 ret <== NOT EXECUTED 400035e0: 81 e8 00 00 restore <== NOT EXECUTED 40002fd8 : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 40002fd8: 9d e3 bf 98 save %sp, -104, %sp rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 40002fdc: 03 10 00 67 sethi %hi(0x40019c00), %g1 40002fe0: c4 00 60 c8 ld [ %g1 + 0xc8 ], %g2 ! 40019cc8 40002fe4: 80 a0 a0 00 cmp %g2, 0 40002fe8: 12 80 00 0d bne 4000301c 40002fec: 98 10 60 c8 or %g1, 0xc8, %o4 sc = rtems_semaphore_create ( 40002ff0: 11 15 14 9b sethi %hi(0x54526c00), %o0 40002ff4: 92 10 20 01 mov 1, %o1 40002ff8: 90 12 21 69 or %o0, 0x169, %o0 40002ffc: 94 10 20 54 mov 0x54, %o2 40003000: 40 00 09 6e call 400055b8 40003004: 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) 40003008: 80 a2 20 00 cmp %o0, 0 4000300c: 02 80 00 04 be 4000301c 40003010: 01 00 00 00 nop rtems_fatal_error_occurred (sc); 40003014: 40 00 0d 42 call 4000651c <== NOT EXECUTED 40003018: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000301c: 81 c7 e0 08 ret 40003020: 81 e8 00 00 restore 40004290 : } } rtems_status_code rtems_termios_ioctl (void *arg) { 40004290: 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; 40004294: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 40004298: 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; 4000429c: e2 00 60 28 ld [ %g1 + 0x28 ], %l1 <== NOT EXECUTED struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 400042a0: 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); 400042a4: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 <== NOT EXECUTED } } rtems_status_code rtems_termios_ioctl (void *arg) { 400042a8: 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); 400042ac: 92 10 20 00 clr %o1 <== NOT EXECUTED 400042b0: 40 00 05 9c call 40005920 <== NOT EXECUTED 400042b4: 94 10 20 00 clr %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) { 400042b8: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 400042bc: 22 80 00 05 be,a 400042d0 <== NOT EXECUTED 400042c0: c4 04 a0 04 ld [ %l2 + 4 ], %g2 <== NOT EXECUTED args->ioctl_return = sc; 400042c4: f0 24 a0 0c st %i0, [ %l2 + 0xc ] <== NOT EXECUTED 400042c8: 81 c7 e0 08 ret <== NOT EXECUTED 400042cc: 81 e8 00 00 restore <== NOT EXECUTED return sc; } switch (args->command) { 400042d0: 80 a0 a0 04 cmp %g2, 4 <== NOT EXECUTED 400042d4: 22 80 00 c0 be,a 400045d4 <== NOT EXECUTED 400042d8: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED 400042dc: 18 80 00 0b bgu 40004308 <== NOT EXECUTED 400042e0: 03 10 01 19 sethi %hi(0x40046400), %g1 <== NOT EXECUTED 400042e4: 80 a0 a0 02 cmp %g2, 2 <== NOT EXECUTED 400042e8: 22 80 00 2d be,a 4000439c <== NOT EXECUTED 400042ec: d2 04 a0 08 ld [ %l2 + 8 ], %o1 <== NOT EXECUTED 400042f0: 18 80 00 b2 bgu 400045b8 <== NOT EXECUTED 400042f4: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 400042f8: 32 80 00 18 bne,a 40004358 <== NOT EXECUTED 400042fc: 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; 40004300: 10 80 00 23 b 4000438c <== NOT EXECUTED 40004304: 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) { 40004308: 82 10 62 7f or %g1, 0x27f, %g1 <== NOT EXECUTED 4000430c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004310: 02 80 00 d0 be 40004650 <== NOT EXECUTED 40004314: 01 00 00 00 nop <== NOT EXECUTED 40004318: 38 80 00 07 bgu,a 40004334 <== NOT EXECUTED 4000431c: 03 10 01 1d sethi %hi(0x40047400), %g1 <== NOT EXECUTED 40004320: 80 a0 a0 05 cmp %g2, 5 <== NOT EXECUTED 40004324: 32 80 00 0d bne,a 40004358 <== NOT EXECUTED 40004328: 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; 4000432c: 10 80 00 a6 b 400045c4 <== NOT EXECUTED 40004330: 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) { 40004334: 82 10 60 1a or %g1, 0x1a, %g1 <== NOT EXECUTED 40004338: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4000433c: 02 80 00 c1 be 40004640 <== NOT EXECUTED 40004340: 03 20 01 1d sethi %hi(0x80047400), %g1 <== NOT EXECUTED 40004344: 82 10 60 1b or %g1, 0x1b, %g1 ! 8004741b <== NOT EXECUTED 40004348: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4000434c: 22 80 00 a6 be,a 400045e4 <== NOT EXECUTED 40004350: c2 04 60 cc ld [ %l1 + 0xcc ], %g1 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 40004354: c4 04 60 cc ld [ %l1 + 0xcc ], %g2 <== NOT EXECUTED 40004358: 03 10 00 66 sethi %hi(0x40019800), %g1 <== NOT EXECUTED 4000435c: 82 10 62 c4 or %g1, 0x2c4, %g1 ! 40019ac4 <== NOT EXECUTED 40004360: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 40004364: 84 00 80 01 add %g2, %g1, %g2 <== NOT EXECUTED 40004368: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 <== NOT EXECUTED 4000436c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004370: 02 80 00 c5 be 40004684 <== NOT EXECUTED 40004374: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 40004378: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000437c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004380: 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); 40004384: 10 80 00 c0 b 40004684 <== NOT EXECUTED 40004388: 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; 4000438c: 92 04 60 30 add %l1, 0x30, %o1 <== NOT EXECUTED 40004390: 40 00 29 38 call 4000e870 <== NOT EXECUTED 40004394: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED 40004398: 30 80 00 bb b,a 40004684 <== NOT EXECUTED break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 4000439c: 90 04 60 30 add %l1, 0x30, %o0 <== NOT EXECUTED 400043a0: 40 00 29 34 call 4000e870 <== NOT EXECUTED 400043a4: 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) && 400043a8: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 400043ac: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 400043b0: 02 80 00 20 be 40004430 <== NOT EXECUTED 400043b4: 01 00 00 00 nop <== NOT EXECUTED 400043b8: c2 04 60 30 ld [ %l1 + 0x30 ], %g1 <== NOT EXECUTED 400043bc: 80 88 64 00 btst 0x400, %g1 <== NOT EXECUTED 400043c0: 12 80 00 1c bne 40004430 <== NOT EXECUTED 400043c4: 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); 400043c8: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 400043cc: 82 08 7d ef and %g1, -529, %g1 <== NOT EXECUTED 400043d0: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 400043d4: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 400043d8: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 400043dc: 02 80 00 15 be 40004430 <== NOT EXECUTED 400043e0: 01 00 00 00 nop <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 400043e4: 7f ff f6 5d call 40001d58 <== NOT EXECUTED 400043e8: 01 00 00 00 nop <== NOT EXECUTED 400043ec: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 400043f0: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 400043f4: 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; 400043f8: 82 08 7f df and %g1, -33, %g1 <== NOT EXECUTED 400043fc: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 40004400: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40004404: 02 80 00 09 be 40004428 <== NOT EXECUTED 40004408: 01 00 00 00 nop <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 4000440c: d2 04 60 84 ld [ %l1 + 0x84 ], %o1 <== NOT EXECUTED 40004410: c2 04 60 7c ld [ %l1 + 0x7c ], %g1 <== NOT EXECUTED 40004414: c4 04 60 a4 ld [ %l1 + 0xa4 ], %g2 <== NOT EXECUTED 40004418: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED 4000441c: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 40004420: 9f c0 80 00 call %g2 <== NOT EXECUTED 40004424: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 40004428: 7f ff f6 50 call 40001d68 <== NOT EXECUTED 4000442c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 40004430: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40004434: 80 88 64 00 btst 0x400, %g1 <== NOT EXECUTED 40004438: 02 80 00 0c be 40004468 <== NOT EXECUTED 4000443c: 03 00 00 04 sethi %hi(0x1000), %g1 <== NOT EXECUTED 40004440: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED 40004444: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED 40004448: 12 80 00 08 bne 40004468 <== NOT EXECUTED 4000444c: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 40004450: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40004454: 82 08 7b ff and %g1, -1025, %g1 <== NOT EXECUTED 40004458: 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); 4000445c: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40004460: 82 08 7f fd and %g1, -3, %g1 <== NOT EXECUTED 40004464: 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) && 40004468: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 4000446c: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 40004470: 02 80 00 16 be 400044c8 <== NOT EXECUTED 40004474: c2 04 60 38 ld [ %l1 + 0x38 ], %g1 <== NOT EXECUTED 40004478: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000447c: 06 80 00 14 bl 400044cc <== NOT EXECUTED 40004480: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 40004484: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40004488: 82 08 7e ff and %g1, -257, %g1 <== NOT EXECUTED 4000448c: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 40004490: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40004494: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 40004498: 02 80 00 08 be 400044b8 <== NOT EXECUTED 4000449c: 01 00 00 00 nop <== NOT EXECUTED 400044a0: c2 04 60 b0 ld [ %l1 + 0xb0 ], %g1 <== NOT EXECUTED 400044a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400044a8: 02 80 00 04 be 400044b8 <== NOT EXECUTED 400044ac: 01 00 00 00 nop <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 400044b0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400044b4: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 400044b8: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 400044bc: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED 400044c0: 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) { 400044c4: c2 04 60 38 ld [ %l1 + 0x38 ], %g1 <== NOT EXECUTED 400044c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400044cc: 36 80 00 06 bge,a 400044e4 <== NOT EXECUTED 400044d0: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED tty->flow_ctrl |= FL_MDRTS; 400044d4: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 400044d8: 82 10 61 00 or %g1, 0x100, %g1 <== NOT EXECUTED 400044dc: 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) { 400044e0: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED 400044e4: 03 00 00 04 sethi %hi(0x1000), %g1 <== NOT EXECUTED 400044e8: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED 400044ec: 22 80 00 06 be,a 40004504 <== NOT EXECUTED 400044f0: c2 04 60 30 ld [ %l1 + 0x30 ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXOF; 400044f4: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 400044f8: 82 10 64 00 or %g1, 0x400, %g1 <== NOT EXECUTED 400044fc: 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) { 40004500: c2 04 60 30 ld [ %l1 + 0x30 ], %g1 <== NOT EXECUTED 40004504: 80 88 64 00 btst 0x400, %g1 <== NOT EXECUTED 40004508: 22 80 00 06 be,a 40004520 <== NOT EXECUTED 4000450c: c2 04 60 3c ld [ %l1 + 0x3c ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXON; 40004510: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40004514: 82 10 62 00 or %g1, 0x200, %g1 <== NOT EXECUTED 40004518: 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) { 4000451c: c2 04 60 3c ld [ %l1 + 0x3c ], %g1 <== NOT EXECUTED 40004520: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 40004524: 32 80 00 19 bne,a 40004588 <== NOT EXECUTED 40004528: 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); 4000452c: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED 40004530: 40 00 02 40 call 40004e30 <== NOT EXECUTED 40004534: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10; 40004538: d2 07 bf f4 ld [ %fp + -12 ], %o1 <== NOT EXECUTED 4000453c: e0 0c 60 46 ldub [ %l1 + 0x46 ], %l0 <== NOT EXECUTED 40004540: 40 00 42 e6 call 400150d8 <.umul> <== NOT EXECUTED 40004544: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40004548: 40 00 43 1e call 400151c0 <.udiv> <== NOT EXECUTED 4000454c: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 40004550: d0 24 60 54 st %o0, [ %l1 + 0x54 ] <== NOT EXECUTED if (tty->termios.c_cc[VTIME]) { 40004554: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40004558: 02 80 00 08 be 40004578 <== NOT EXECUTED 4000455c: c2 0c 60 47 ldub [ %l1 + 0x47 ], %g1 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 40004560: c0 24 60 6c clr [ %l1 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) 40004564: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004568: 12 80 00 09 bne 4000458c <== NOT EXECUTED 4000456c: d0 24 60 70 st %o0, [ %l1 + 0x70 ] <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 40004570: 10 80 00 0a b 40004598 <== NOT EXECUTED 40004574: d0 24 60 74 st %o0, [ %l1 + 0x74 ] <== NOT EXECUTED } else { if (tty->termios.c_cc[VMIN]) { 40004578: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000457c: 02 80 00 06 be 40004594 <== NOT EXECUTED 40004580: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 40004584: c0 24 60 6c clr [ %l1 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 40004588: c0 24 60 70 clr [ %l1 + 0x70 ] <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 4000458c: 10 80 00 03 b 40004598 <== NOT EXECUTED 40004590: c0 24 60 74 clr [ %l1 + 0x74 ] <== NOT EXECUTED } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 40004594: c2 24 60 6c st %g1, [ %l1 + 0x6c ] <== NOT EXECUTED } } } if (tty->device.setAttributes) 40004598: c2 04 60 a8 ld [ %l1 + 0xa8 ], %g1 <== NOT EXECUTED 4000459c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400045a0: 02 80 00 39 be 40004684 <== NOT EXECUTED 400045a4: 01 00 00 00 nop <== NOT EXECUTED (*tty->device.setAttributes)(tty->minor, &tty->termios); 400045a8: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED 400045ac: 9f c0 40 00 call %g1 <== NOT EXECUTED 400045b0: 92 04 60 30 add %l1, 0x30, %o1 <== NOT EXECUTED 400045b4: 30 80 00 34 b,a 40004684 <== NOT EXECUTED break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 400045b8: 7f ff fe 1c call 40003e28 <== NOT EXECUTED 400045bc: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400045c0: 30 80 00 31 b,a 40004684 <== NOT EXECUTED break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 400045c4: c2 24 60 d4 st %g1, [ %l1 + 0xd4 ] <== NOT EXECUTED 400045c8: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED 400045cc: 10 80 00 2e b 40004684 <== NOT EXECUTED 400045d0: c2 24 60 d8 st %g1, [ %l1 + 0xd8 ] <== NOT EXECUTED break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 400045d4: c2 24 60 dc st %g1, [ %l1 + 0xdc ] <== NOT EXECUTED 400045d8: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED 400045dc: 10 80 00 2a b 40004684 <== NOT EXECUTED 400045e0: 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) { 400045e4: 05 10 00 66 sethi %hi(0x40019800), %g2 <== NOT EXECUTED 400045e8: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 400045ec: a0 10 a2 c4 or %g2, 0x2c4, %l0 <== NOT EXECUTED 400045f0: 82 00 40 10 add %g1, %l0, %g1 <== NOT EXECUTED 400045f4: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 400045f8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400045fc: 22 80 00 06 be,a 40004614 <== NOT EXECUTED 40004600: c2 04 a0 08 ld [ %l2 + 8 ], %g1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 40004604: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004608: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000460c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 40004610: c2 04 a0 08 ld [ %l2 + 8 ], %g1 <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ 40004614: 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); 40004618: c4 00 40 00 ld [ %g1 ], %g2 <== 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) { 4000461c: 83 28 a0 05 sll %g2, 5, %g1 <== NOT EXECUTED 40004620: c2 04 00 01 ld [ %l0 + %g1 ], %g1 <== NOT EXECUTED 40004624: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004628: 02 80 00 17 be 40004684 <== NOT EXECUTED 4000462c: c4 24 60 cc st %g2, [ %l1 + 0xcc ] <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 40004630: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004634: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40004638: 10 80 00 13 b 40004684 <== NOT EXECUTED 4000463c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 40004640: c4 04 a0 08 ld [ %l2 + 8 ], %g2 <== NOT EXECUTED 40004644: c2 04 60 cc ld [ %l1 + 0xcc ], %g1 <== NOT EXECUTED 40004648: 10 80 00 0f b 40004684 <== NOT EXECUTED 4000464c: c2 20 80 00 st %g1, [ %g2 ] <== NOT EXECUTED break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 40004650: c4 04 60 60 ld [ %l1 + 0x60 ], %g2 <== NOT EXECUTED 40004654: c2 04 60 5c ld [ %l1 + 0x5c ], %g1 <== NOT EXECUTED if ( rawnc < 0 ) 40004658: 88 a0 80 01 subcc %g2, %g1, %g4 <== NOT EXECUTED 4000465c: 3c 80 00 05 bpos,a 40004670 <== NOT EXECUTED 40004660: c2 04 60 20 ld [ %l1 + 0x20 ], %g1 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 40004664: c2 04 60 64 ld [ %l1 + 0x64 ], %g1 <== NOT EXECUTED 40004668: 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; 4000466c: c2 04 60 20 ld [ %l1 + 0x20 ], %g1 <== NOT EXECUTED 40004670: c4 04 60 24 ld [ %l1 + 0x24 ], %g2 <== NOT EXECUTED 40004674: c6 04 a0 08 ld [ %l2 + 8 ], %g3 <== NOT EXECUTED 40004678: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 4000467c: 82 00 40 04 add %g1, %g4, %g1 <== NOT EXECUTED 40004680: c2 20 c0 00 st %g1, [ %g3 ] <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 40004684: 40 00 05 6e call 40005c3c <== NOT EXECUTED 40004688: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 <== NOT EXECUTED args->ioctl_return = sc; 4000468c: f0 24 a0 0c st %i0, [ %l2 + 0xc ] <== NOT EXECUTED return sc; } 40004690: 81 c7 e0 08 ret <== NOT EXECUTED 40004694: 81 e8 00 00 restore <== NOT EXECUTED 4000485c : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 4000485c: 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, 40004860: 03 10 00 67 sethi %hi(0x40019c00), %g1 40004864: d0 00 60 c8 ld [ %g1 + 0xc8 ], %o0 ! 40019cc8 40004868: 92 10 20 00 clr %o1 4000486c: 40 00 04 2d call 40005920 40004870: 94 10 20 00 clr %o2 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 40004874: a6 92 20 00 orcc %o0, 0, %l3 40004878: 12 80 01 1c bne 40004ce8 4000487c: 03 10 00 67 sethi %hi(0x40019c00), %g1 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 40004880: 10 80 00 0a b 400048a8 40004884: e0 00 60 d0 ld [ %g1 + 0xd0 ], %l0 ! 40019cd0 if ((tty->major == major) && (tty->minor == minor)) 40004888: 80 a0 40 18 cmp %g1, %i0 4000488c: 32 80 00 07 bne,a 400048a8 40004890: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED 40004894: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40004898: 80 a0 40 19 cmp %g1, %i1 4000489c: 22 80 00 ea be,a 40004c44 400048a0: c2 04 20 08 ld [ %l0 + 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) { 400048a4: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED 400048a8: 80 a4 20 00 cmp %l0, 0 400048ac: 32 bf ff f7 bne,a 40004888 400048b0: c2 04 20 0c ld [ %l0 + 0xc ], %g1 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 400048b4: 90 10 20 01 mov 1, %o0 400048b8: 7f ff f6 fb call 400024a4 400048bc: 92 10 20 e8 mov 0xe8, %o1 if (tty == NULL) { 400048c0: a2 92 20 00 orcc %o0, 0, %l1 400048c4: 02 80 00 0f be 40004900 400048c8: 03 10 00 67 sethi %hi(0x40019c00), %g1 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 400048cc: 03 10 00 64 sethi %hi(0x40019000), %g1 400048d0: c2 00 60 c8 ld [ %g1 + 0xc8 ], %g1 ! 400190c8 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 400048d4: a0 10 00 11 mov %l1, %l0 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 400048d8: c2 24 60 64 st %g1, [ %l1 + 0x64 ] tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 400048dc: d0 04 60 64 ld [ %l1 + 0x64 ], %o0 400048e0: 7f ff f6 5b call 4000224c 400048e4: 01 00 00 00 nop if (tty->rawInBuf.theBuf == NULL) { 400048e8: 80 a2 20 00 cmp %o0, 0 400048ec: 12 80 00 08 bne 4000490c 400048f0: d0 24 60 58 st %o0, [ %l1 + 0x58 ] free(tty); 400048f4: 7f ff f6 2e call 400021ac <== NOT EXECUTED 400048f8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 400048fc: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 40004900: d0 00 60 c8 ld [ %g1 + 0xc8 ], %o0 ! 40019cc8 <== NOT EXECUTED 40004904: 10 80 00 f7 b 40004ce0 <== NOT EXECUTED 40004908: a6 10 20 1a mov 0x1a, %l3 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 4000490c: 03 10 00 64 sethi %hi(0x40019000), %g1 40004910: c2 00 60 cc ld [ %g1 + 0xcc ], %g1 ! 400190cc 40004914: c2 24 60 88 st %g1, [ %l1 + 0x88 ] tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 40004918: d0 04 60 88 ld [ %l1 + 0x88 ], %o0 4000491c: 7f ff f6 4c call 4000224c 40004920: 01 00 00 00 nop if (tty->rawOutBuf.theBuf == NULL) { 40004924: 80 a2 20 00 cmp %o0, 0 40004928: 12 80 00 05 bne 4000493c 4000492c: d0 24 60 7c st %o0, [ %l1 + 0x7c ] free((void *)(tty->rawInBuf.theBuf)); 40004930: d0 04 60 58 ld [ %l1 + 0x58 ], %o0 <== NOT EXECUTED free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 40004934: 10 80 00 0c b 40004964 <== NOT EXECUTED 40004938: a6 10 20 1a mov 0x1a, %l3 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 4000493c: 03 10 00 64 sethi %hi(0x40019000), %g1 40004940: 7f ff f6 43 call 4000224c 40004944: d0 00 60 c4 ld [ %g1 + 0xc4 ], %o0 ! 400190c4 if (tty->cbuf == NULL) { 40004948: 80 a2 20 00 cmp %o0, 0 4000494c: 12 80 00 0c bne 4000497c 40004950: d0 24 60 1c st %o0, [ %l1 + 0x1c ] free((void *)(tty->rawOutBuf.theBuf)); 40004954: d0 04 60 7c ld [ %l1 + 0x7c ], %o0 <== NOT EXECUTED 40004958: 7f ff f6 15 call 400021ac <== NOT EXECUTED 4000495c: a6 10 20 1a mov 0x1a, %l3 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 40004960: d0 04 60 58 ld [ %l1 + 0x58 ], %o0 <== NOT EXECUTED 40004964: 7f ff f6 12 call 400021ac <== NOT EXECUTED 40004968: 01 00 00 00 nop <== NOT EXECUTED free(tty); 4000496c: 7f ff f6 10 call 400021ac <== NOT EXECUTED 40004970: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 40004974: 10 80 00 da b 40004cdc <== NOT EXECUTED 40004978: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 4000497c: 07 10 00 67 sethi %hi(0x40019c00), %g3 40004980: c2 00 e0 d0 ld [ %g3 + 0xd0 ], %g1 ! 40019cd0 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 40004984: c0 24 60 d4 clr [ %l1 + 0xd4 ] tty->tty_snd.sw_arg = NULL; 40004988: c0 24 60 d8 clr [ %l1 + 0xd8 ] tty->tty_rcv.sw_pfn = NULL; 4000498c: c0 24 60 dc clr [ %l1 + 0xdc ] tty->tty_rcv.sw_arg = NULL; 40004990: c0 24 60 e0 clr [ %l1 + 0xe0 ] tty->tty_rcvwakeup = 0; 40004994: c0 24 60 e4 clr [ %l1 + 0xe4 ] /* * link tty */ tty->forw = rtems_termios_ttyHead; 40004998: c2 24 40 00 st %g1, [ %l1 ] tty->back = NULL; if (rtems_termios_ttyHead != NULL) 4000499c: 80 a0 60 00 cmp %g1, 0 400049a0: 02 80 00 03 be 400049ac 400049a4: c0 24 60 04 clr [ %l1 + 4 ] rtems_termios_ttyHead->back = tty; 400049a8: e2 20 60 04 st %l1, [ %g1 + 4 ] <== NOT EXECUTED rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 400049ac: 05 10 00 67 sethi %hi(0x40019c00), %g2 400049b0: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1 ! 40019ccc 400049b4: 80 a0 60 00 cmp %g1, 0 400049b8: 12 80 00 03 bne 400049c4 400049bc: e0 20 e0 d0 st %l0, [ %g3 + 0xd0 ] rtems_termios_ttyTail = tty; 400049c0: e0 20 a0 cc st %l0, [ %g2 + 0xcc ] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 400049c4: 25 10 00 64 sethi %hi(0x40019000), %l2 400049c8: c2 4c a0 d0 ldsb [ %l2 + 0xd0 ], %g1 ! 400190d0 400049cc: 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; 400049d0: f2 24 20 10 st %i1, [ %l0 + 0x10 ] tty->major = major; 400049d4: f0 24 20 0c st %i0, [ %l0 + 0xc ] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 400049d8: 90 12 21 00 or %o0, 0x100, %o0 400049dc: 92 10 20 01 mov 1, %o1 400049e0: 90 10 40 08 or %g1, %o0, %o0 400049e4: 94 10 20 54 mov 0x54, %o2 400049e8: 96 10 20 00 clr %o3 400049ec: 40 00 02 f3 call 400055b8 400049f0: 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) 400049f4: 80 a2 20 00 cmp %o0, 0 400049f8: 02 80 00 05 be 40004a0c 400049fc: c2 4c a0 d0 ldsb [ %l2 + 0xd0 ], %g1 rtems_fatal_error_occurred (sc); 40004a00: 40 00 06 c7 call 4000651c <== NOT EXECUTED 40004a04: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_semaphore_create ( 40004a08: c2 4c a0 d0 ldsb [ %l2 + 0xd0 ], %g1 <== NOT EXECUTED 40004a0c: 11 15 14 9b sethi %hi(0x54526c00), %o0 40004a10: 92 10 20 01 mov 1, %o1 40004a14: 90 12 23 00 or %o0, 0x300, %o0 40004a18: 94 10 20 54 mov 0x54, %o2 40004a1c: 90 10 40 08 or %g1, %o0, %o0 40004a20: 96 10 20 00 clr %o3 40004a24: 40 00 02 e5 call 400055b8 40004a28: 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) 40004a2c: 80 a2 20 00 cmp %o0, 0 40004a30: 02 80 00 05 be 40004a44 40004a34: c2 4c a0 d0 ldsb [ %l2 + 0xd0 ], %g1 rtems_fatal_error_occurred (sc); 40004a38: 40 00 06 b9 call 4000651c <== NOT EXECUTED 40004a3c: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_semaphore_create ( 40004a40: c2 4c a0 d0 ldsb [ %l2 + 0xd0 ], %g1 <== NOT EXECUTED 40004a44: 11 15 14 9e sethi %hi(0x54527800), %o0 40004a48: 92 10 20 00 clr %o1 40004a4c: 90 10 40 08 or %g1, %o0, %o0 40004a50: 94 10 20 20 mov 0x20, %o2 40004a54: 96 10 20 00 clr %o3 40004a58: 40 00 02 d8 call 400055b8 40004a5c: 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) 40004a60: 80 a2 20 00 cmp %o0, 0 40004a64: 22 80 00 05 be,a 40004a78 40004a68: c0 24 20 94 clr [ %l0 + 0x94 ] rtems_fatal_error_occurred (sc); 40004a6c: 40 00 06 ac call 4000651c <== NOT EXECUTED 40004a70: 01 00 00 00 nop <== NOT EXECUTED tty->rawOutBufState = rob_idle; 40004a74: c0 24 20 94 clr [ %l0 + 0x94 ] <== NOT EXECUTED /* * Set callbacks */ tty->device = *callbacks; 40004a78: 92 10 00 1b mov %i3, %o1 40004a7c: 90 04 20 98 add %l0, 0x98, %o0 40004a80: 40 00 27 7c call 4000e870 40004a84: 94 10 20 20 mov 0x20, %o2 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40004a88: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 40004a8c: 80 a0 60 02 cmp %g1, 2 40004a90: 32 80 00 1f bne,a 40004b0c 40004a94: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 sc = rtems_task_create ( 40004a98: c2 4c a0 d0 ldsb [ %l2 + 0xd0 ], %g1 <== NOT EXECUTED 40004a9c: 11 15 1e 15 sethi %hi(0x54785400), %o0 <== NOT EXECUTED 40004aa0: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 40004aa4: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED 40004aa8: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED 40004aac: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED 40004ab0: 98 10 20 00 clr %o4 <== NOT EXECUTED 40004ab4: 40 00 04 a8 call 40005d54 <== NOT EXECUTED 40004ab8: 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) 40004abc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004ac0: 02 80 00 05 be 40004ad4 <== NOT EXECUTED 40004ac4: c2 4c a0 d0 ldsb [ %l2 + 0xd0 ], %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40004ac8: 40 00 06 95 call 4000651c <== NOT EXECUTED 40004acc: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_task_create ( 40004ad0: c2 4c a0 d0 ldsb [ %l2 + 0xd0 ], %g1 <== NOT EXECUTED 40004ad4: 11 14 9e 15 sethi %hi(0x52785400), %o0 <== NOT EXECUTED 40004ad8: 92 10 20 09 mov 9, %o1 <== NOT EXECUTED 40004adc: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED 40004ae0: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED 40004ae4: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED 40004ae8: 98 10 20 00 clr %o4 <== NOT EXECUTED 40004aec: 40 00 04 9a call 40005d54 <== NOT EXECUTED 40004af0: 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) 40004af4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004af8: 22 80 00 05 be,a 40004b0c <== NOT EXECUTED 40004afc: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40004b00: 40 00 06 87 call 4000651c <== NOT EXECUTED 40004b04: 01 00 00 00 nop <== NOT EXECUTED } if ((tty->device.pollRead == NULL) || 40004b08: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 <== NOT EXECUTED 40004b0c: 80 a0 60 00 cmp %g1, 0 40004b10: 02 80 00 06 be 40004b28 40004b14: 03 10 00 64 sethi %hi(0x40019000), %g1 40004b18: c2 04 60 b4 ld [ %l1 + 0xb4 ], %g1 40004b1c: 80 a0 60 02 cmp %g1, 2 40004b20: 12 80 00 10 bne 40004b60 40004b24: 03 10 00 64 sethi %hi(0x40019000), %g1 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 40004b28: c2 48 60 d0 ldsb [ %g1 + 0xd0 ], %g1 ! 400190d0 <== NOT EXECUTED 40004b2c: 11 15 14 9c sethi %hi(0x54527000), %o0 <== NOT EXECUTED 40004b30: 92 10 20 00 clr %o1 <== NOT EXECUTED 40004b34: 90 12 22 00 or %o0, 0x200, %o0 <== NOT EXECUTED 40004b38: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED 40004b3c: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED 40004b40: 96 10 20 00 clr %o3 <== NOT EXECUTED 40004b44: 40 00 02 9d call 400055b8 <== NOT EXECUTED 40004b48: 98 04 60 68 add %l1, 0x68, %o4 <== NOT EXECUTED rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 40004b4c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004b50: 02 80 00 04 be 40004b60 <== NOT EXECUTED 40004b54: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40004b58: 40 00 06 71 call 4000651c <== NOT EXECUTED 40004b5c: 01 00 00 00 nop <== NOT EXECUTED 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; 40004b60: c0 24 60 b8 clr [ %l1 + 0xb8 ] /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 40004b64: c2 04 60 64 ld [ %l1 + 0x64 ], %g1 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 40004b68: 09 10 00 64 sethi %hi(0x40019000), %g4 40004b6c: c4 09 20 d0 ldub [ %g4 + 0xd0 ], %g2 ! 400190d0 /* 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; 40004b70: 83 30 60 01 srl %g1, 1, %g1 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'; 40004b74: c0 2c 60 4c clrb [ %l1 + 0x4c ] /* 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; 40004b78: c2 24 60 bc st %g1, [ %l1 + 0xbc ] tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; 40004b7c: c0 2c 60 51 clrb [ %l1 + 0x51 ] 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; 40004b80: c6 04 60 64 ld [ %l1 + 0x64 ], %g3 /* * Bump name characer */ if (c++ == 'z') 40004b84: 84 00 a0 01 inc %g2 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 40004b88: 03 00 00 09 sethi %hi(0x2400), %g1 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 40004b8c: c4 29 20 d0 stb %g2, [ %g4 + 0xd0 ] } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 40004b90: 82 10 61 02 or %g1, 0x102, %g1 40004b94: c2 24 60 30 st %g1, [ %l1 + 0x30 ] tty->termios.c_oflag = OPOST | ONLCR | XTABS; 40004b98: 03 00 00 06 sethi %hi(0x1800), %g1 40004b9c: 82 10 60 05 or %g1, 5, %g1 ! 1805 40004ba0: c2 24 60 34 st %g1, [ %l1 + 0x34 ] tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 40004ba4: 82 10 28 bd mov 0x8bd, %g1 40004ba8: c2 24 60 38 st %g1, [ %l1 + 0x38 ] tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 40004bac: 03 00 00 20 sethi %hi(0x8000), %g1 40004bb0: 82 10 62 3b or %g1, 0x23b, %g1 ! 823b 40004bb4: c2 24 60 3c st %g1, [ %l1 + 0x3c ] tty->termios.c_cc[VINTR] = '\003'; 40004bb8: 82 10 20 03 mov 3, %g1 40004bbc: c2 2c 60 41 stb %g1, [ %l1 + 0x41 ] tty->termios.c_cc[VQUIT] = '\034'; 40004bc0: 82 10 20 1c mov 0x1c, %g1 40004bc4: c2 2c 60 42 stb %g1, [ %l1 + 0x42 ] tty->termios.c_cc[VERASE] = '\177'; 40004bc8: 82 10 20 7f mov 0x7f, %g1 40004bcc: c2 2c 60 43 stb %g1, [ %l1 + 0x43 ] tty->termios.c_cc[VKILL] = '\025'; 40004bd0: 82 10 20 15 mov 0x15, %g1 40004bd4: c2 2c 60 44 stb %g1, [ %l1 + 0x44 ] tty->termios.c_cc[VEOF] = '\004'; 40004bd8: 82 10 20 04 mov 4, %g1 40004bdc: c2 2c 60 45 stb %g1, [ %l1 + 0x45 ] tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 40004be0: 82 10 20 11 mov 0x11, %g1 40004be4: c2 2c 60 49 stb %g1, [ %l1 + 0x49 ] tty->termios.c_cc[VSTOP] = '\023'; 40004be8: 82 10 20 13 mov 0x13, %g1 40004bec: c2 2c 60 4a stb %g1, [ %l1 + 0x4a ] tty->termios.c_cc[VSUSP] = '\032'; 40004bf0: 82 10 20 1a mov 0x1a, %g1 40004bf4: c2 2c 60 4b stb %g1, [ %l1 + 0x4b ] tty->termios.c_cc[VREPRINT] = '\022'; 40004bf8: 82 10 20 12 mov 0x12, %g1 40004bfc: c2 2c 60 4d stb %g1, [ %l1 + 0x4d ] tty->termios.c_cc[VDISCARD] = '\017'; 40004c00: 82 10 20 0f mov 0xf, %g1 40004c04: c2 2c 60 4e stb %g1, [ %l1 + 0x4e ] tty->termios.c_cc[VWERASE] = '\027'; 40004c08: 82 10 20 17 mov 0x17, %g1 40004c0c: c2 2c 60 4f stb %g1, [ %l1 + 0x4f ] tty->termios.c_cc[VLNEXT] = '\026'; 40004c10: 82 10 20 16 mov 0x16, %g1 40004c14: c2 2c 60 50 stb %g1, [ %l1 + 0x50 ] tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 40004c18: 83 28 e0 01 sll %g3, 1, %g1 40004c1c: 82 00 40 03 add %g1, %g3, %g1 40004c20: 83 30 60 02 srl %g1, 2, %g1 /* * Bump name characer */ if (c++ == 'z') 40004c24: 85 28 a0 18 sll %g2, 0x18, %g2 40004c28: 85 38 a0 18 sra %g2, 0x18, %g2 40004c2c: 80 a0 a0 7b cmp %g2, 0x7b 40004c30: 12 80 00 04 bne 40004c40 40004c34: c2 24 60 c0 st %g1, [ %l1 + 0xc0 ] c = 'a'; 40004c38: 82 10 20 61 mov 0x61, %g1 <== NOT EXECUTED 40004c3c: c2 29 20 d0 stb %g1, [ %g4 + 0xd0 ] <== NOT EXECUTED } args->iop->data1 = tty; if (!tty->refcount++) { 40004c40: c2 04 20 08 ld [ %l0 + 8 ], %g1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 40004c44: c4 06 80 00 ld [ %i2 ], %g2 if (!tty->refcount++) { 40004c48: 82 00 60 01 inc %g1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 40004c4c: e0 20 a0 28 st %l0, [ %g2 + 0x28 ] if (!tty->refcount++) { 40004c50: 80 a0 60 01 cmp %g1, 1 40004c54: 12 80 00 21 bne 40004cd8 40004c58: c2 24 20 08 st %g1, [ %l0 + 8 ] if (tty->device.firstOpen) 40004c5c: c2 04 20 98 ld [ %l0 + 0x98 ], %g1 40004c60: 80 a0 60 00 cmp %g1, 0 40004c64: 02 80 00 05 be 40004c78 40004c68: 90 10 00 18 mov %i0, %o0 (*tty->device.firstOpen)(major, minor, arg); 40004c6c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40004c70: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004c74: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40004c78: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 40004c7c: 80 a0 60 02 cmp %g1, 2 40004c80: 12 80 00 17 bne 40004cdc 40004c84: 03 10 00 67 sethi %hi(0x40019c00), %g1 sc = rtems_task_start(tty->rxTaskId, 40004c88: d0 04 20 c4 ld [ %l0 + 0xc4 ], %o0 <== NOT EXECUTED 40004c8c: 13 10 00 13 sethi %hi(0x40004c00), %o1 <== NOT EXECUTED 40004c90: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 40004c94: 40 00 05 23 call 40006120 <== NOT EXECUTED 40004c98: 92 12 60 f0 or %o1, 0xf0, %o1 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 40004c9c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004ca0: 22 80 00 05 be,a 40004cb4 <== NOT EXECUTED 40004ca4: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40004ca8: 40 00 06 1d call 4000651c <== NOT EXECUTED 40004cac: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_task_start(tty->txTaskId, 40004cb0: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0 <== NOT EXECUTED 40004cb4: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 40004cb8: 13 10 00 13 sethi %hi(0x40004c00), %o1 <== NOT EXECUTED 40004cbc: 40 00 05 19 call 40006120 <== NOT EXECUTED 40004cc0: 92 12 61 60 or %o1, 0x160, %o1 ! 40004d60 <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 40004cc4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004cc8: 02 80 00 05 be 40004cdc <== NOT EXECUTED 40004ccc: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40004cd0: 40 00 06 13 call 4000651c <== NOT EXECUTED 40004cd4: 01 00 00 00 nop <== NOT EXECUTED } } rtems_semaphore_release (rtems_termios_ttyMutex); 40004cd8: 03 10 00 67 sethi %hi(0x40019c00), %g1 40004cdc: d0 00 60 c8 ld [ %g1 + 0xc8 ], %o0 ! 40019cc8 40004ce0: 40 00 03 d7 call 40005c3c 40004ce4: 01 00 00 00 nop return RTEMS_SUCCESSFUL; } 40004ce8: 81 c7 e0 08 ret 40004cec: 91 e8 00 13 restore %g0, %l3, %o0 400035e4 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 400035e4: 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) { 400035e8: c2 06 a0 b4 ld [ %i2 + 0xb4 ], %g1 400035ec: 80 a0 60 00 cmp %g1, 0 400035f0: 12 80 00 08 bne 40003610 400035f4: 92 10 00 18 mov %i0, %o1 (*tty->device.write)(tty->minor, (void *)buf, len); 400035f8: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 400035fc: c2 06 a0 a4 ld [ %i2 + 0xa4 ], %g1 40003600: 9f c0 40 00 call %g1 40003604: 94 10 00 19 mov %i1, %o2 40003608: 81 c7 e0 08 ret 4000360c: 81 e8 00 00 restore return; } newHead = tty->rawOutBuf.Head; 40003610: e2 06 a0 80 ld [ %i2 + 0x80 ], %l1 <== NOT EXECUTED while (len) { 40003614: 10 80 00 3c b 40003704 <== NOT EXECUTED 40003618: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 4000361c: d2 06 a0 88 ld [ %i2 + 0x88 ], %o1 <== NOT EXECUTED 40003620: 40 00 47 94 call 40015470 <.urem> <== NOT EXECUTED 40003624: 90 04 60 01 add %l1, 1, %o0 <== NOT EXECUTED rtems_interrupt_disable (level); 40003628: 7f ff f9 cc call 40001d58 <== NOT EXECUTED 4000362c: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED 40003630: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 40003634: 30 80 00 10 b,a 40003674 <== NOT EXECUTED while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; 40003638: c2 26 a0 94 st %g1, [ %i2 + 0x94 ] <== NOT EXECUTED rtems_interrupt_enable (level); 4000363c: 7f ff f9 cb call 40001d68 <== NOT EXECUTED 40003640: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 40003644: d0 06 a0 8c ld [ %i2 + 0x8c ], %o0 <== NOT EXECUTED 40003648: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000364c: 40 00 08 b5 call 40005920 <== NOT EXECUTED 40003650: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 40003654: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003658: 02 80 00 04 be 40003668 <== NOT EXECUTED 4000365c: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40003660: 40 00 0b af call 4000651c <== NOT EXECUTED 40003664: 01 00 00 00 nop <== NOT EXECUTED rtems_interrupt_disable (level); 40003668: 7f ff f9 bc call 40001d58 <== NOT EXECUTED 4000366c: 01 00 00 00 nop <== NOT EXECUTED 40003670: a0 10 00 08 mov %o0, %l0 <== 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) { 40003674: c2 06 a0 84 ld [ %i2 + 0x84 ], %g1 <== NOT EXECUTED 40003678: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 4000367c: 02 bf ff ef be 40003638 <== NOT EXECUTED 40003680: 82 10 20 02 mov 2, %g1 <== 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++; 40003684: c6 06 a0 80 ld [ %i2 + 0x80 ], %g3 <== NOT EXECUTED 40003688: c4 0e 00 00 ldub [ %i0 ], %g2 <== NOT EXECUTED 4000368c: c2 06 a0 7c ld [ %i2 + 0x7c ], %g1 <== NOT EXECUTED 40003690: c4 28 40 03 stb %g2, [ %g1 + %g3 ] <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 40003694: 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; 40003698: e2 26 a0 80 st %l1, [ %i2 + 0x80 ] <== NOT EXECUTED if (tty->rawOutBufState == rob_idle) { 4000369c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400036a0: 32 80 00 15 bne,a 400036f4 <== NOT EXECUTED 400036a4: b0 06 20 01 inc %i0 <== NOT EXECUTED /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 400036a8: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED 400036ac: 80 88 60 10 btst 0x10, %g1 <== NOT EXECUTED 400036b0: 12 80 00 0b bne 400036dc <== NOT EXECUTED 400036b4: 01 00 00 00 nop <== NOT EXECUTED (*tty->device.write)(tty->minor, 400036b8: d2 06 a0 84 ld [ %i2 + 0x84 ], %o1 <== NOT EXECUTED 400036bc: c2 06 a0 7c ld [ %i2 + 0x7c ], %g1 <== NOT EXECUTED 400036c0: c4 06 a0 a4 ld [ %i2 + 0xa4 ], %g2 <== NOT EXECUTED 400036c4: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 <== NOT EXECUTED 400036c8: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 400036cc: 9f c0 80 00 call %g2 <== NOT EXECUTED 400036d0: 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; 400036d4: 10 80 00 06 b 400036ec <== NOT EXECUTED 400036d8: 82 10 20 01 mov 1, %g1 <== 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; 400036dc: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED 400036e0: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED 400036e4: c2 26 a0 b8 st %g1, [ %i2 + 0xb8 ] <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 400036e8: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 400036ec: c2 26 a0 94 st %g1, [ %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++; 400036f0: b0 06 20 01 inc %i0 <== 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); 400036f4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400036f8: 7f ff f9 9c call 40001d68 <== NOT EXECUTED 400036fc: 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) { 40003700: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40003704: 12 bf ff c6 bne 4000361c <== NOT EXECUTED 40003708: 01 00 00 00 nop <== NOT EXECUTED 4000370c: 81 c7 e0 08 ret <== NOT EXECUTED 40003710: 81 e8 00 00 restore <== NOT EXECUTED 40003ea4 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 40003ea4: 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; 40003ea8: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED uint32_t count = args->count; 40003eac: e4 06 20 0c ld [ %i0 + 0xc ], %l2 <== NOT EXECUTED rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40003eb0: e0 00 60 28 ld [ %g1 + 0x28 ], %l0 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; 40003eb4: e6 06 20 08 ld [ %i0 + 8 ], %l3 <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40003eb8: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 40003ebc: a8 10 00 18 mov %i0, %l4 <== 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); 40003ec0: 92 10 20 00 clr %o1 <== NOT EXECUTED 40003ec4: 40 00 06 97 call 40005920 <== NOT EXECUTED 40003ec8: 94 10 20 00 clr %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 40003ecc: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40003ed0: 12 80 00 10 bne 40003f10 <== NOT EXECUTED 40003ed4: 03 10 00 66 sethi %hi(0x40019800), %g1 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 40003ed8: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED 40003edc: 82 10 62 c4 or %g1, 0x2c4, %g1 <== NOT EXECUTED 40003ee0: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 40003ee4: 84 00 80 01 add %g2, %g1, %g2 <== NOT EXECUTED 40003ee8: c2 00 a0 08 ld [ %g2 + 8 ], %g1 <== NOT EXECUTED 40003eec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003ef0: 02 80 00 0a be 40003f18 <== NOT EXECUTED 40003ef4: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 40003ef8: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003efc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40003f00: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 40003f04: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED 40003f08: 40 00 07 4d call 40005c3c <== NOT EXECUTED 40003f0c: c0 24 20 e4 clr [ %l0 + 0xe4 ] <== NOT EXECUTED 40003f10: 81 c7 e0 08 ret <== NOT EXECUTED 40003f14: 81 e8 00 00 restore <== NOT EXECUTED return sc; } if (tty->cindex == tty->ccount) { 40003f18: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED 40003f1c: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40003f20: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40003f24: 12 80 00 cc bne 40004254 <== NOT EXECUTED 40003f28: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; 40003f2c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED if (tty->device.pollRead != NULL 40003f30: 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; 40003f34: 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; 40003f38: c0 24 20 20 clr [ %l0 + 0x20 ] <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 40003f3c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40003f40: 02 80 00 5a be 400040a8 <== NOT EXECUTED 40003f44: c0 24 20 24 clr [ %l0 + 0x24 ] <== NOT EXECUTED 40003f48: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 <== NOT EXECUTED 40003f4c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003f50: 32 80 00 57 bne,a 400040ac <== NOT EXECUTED 40003f54: e2 04 20 74 ld [ %l0 + 0x74 ], %l1 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 40003f58: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 40003f5c: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 40003f60: 22 80 00 13 be,a 40003fac <== NOT EXECUTED 40003f64: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 40003f68: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 40003f6c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003f70: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 40003f74: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003f78: 16 80 00 06 bge 40003f90 <== NOT EXECUTED 40003f7c: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED rtems_task_wake_after (1); 40003f80: 40 00 08 a7 call 4000621c <== NOT EXECUTED 40003f84: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED { int n; if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); 40003f88: 10 bf ff f9 b 40003f6c <== NOT EXECUTED 40003f8c: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED if (n < 0) { rtems_task_wake_after (1); } else { if (siproc (n, tty)) 40003f90: 7f ff ff 64 call 40003d20 <== NOT EXECUTED 40003f94: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40003f98: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003f9c: 22 bf ff f4 be,a 40003f6c <== NOT EXECUTED 40003fa0: 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)) { 40003fa4: 10 80 00 ac b 40004254 <== NOT EXECUTED 40003fa8: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED } } } else { rtems_interval then, now; if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 40003fac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003fb0: 12 80 00 0a bne 40003fd8 <== NOT EXECUTED 40003fb4: aa 07 bf f4 add %fp, -12, %l5 <== NOT EXECUTED 40003fb8: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED 40003fbc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003fc0: 02 80 00 07 be 40003fdc <== NOT EXECUTED 40003fc4: a2 07 bf f0 add %fp, -16, %l1 <== NOT EXECUTED rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); 40003fc8: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED 40003fcc: 40 00 03 99 call 40004e30 <== NOT EXECUTED 40003fd0: 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); 40003fd4: aa 07 bf f4 add %fp, -12, %l5 <== NOT EXECUTED } } else { if (!tty->termios.c_cc[VTIME]) break; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); 40003fd8: 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); 40003fdc: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 40003fe0: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003fe4: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 40003fe8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003fec: 36 80 00 1d bge,a 40004060 <== NOT EXECUTED 40003ff0: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 40003ff4: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED 40003ff8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003ffc: 02 80 00 0a be 40004024 <== NOT EXECUTED 40004000: c4 0c 20 46 ldub [ %l0 + 0x46 ], %g2 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 40004004: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40004008: 02 80 00 12 be 40004050 <== NOT EXECUTED 4000400c: 01 00 00 00 nop <== NOT EXECUTED 40004010: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40004014: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004018: 02 80 00 0e be 40004050 <== NOT EXECUTED 4000401c: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED 40004020: 30 80 00 04 b,a 40004030 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 40004024: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40004028: 02 80 00 8a be 40004250 <== NOT EXECUTED 4000402c: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED break; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); 40004030: 40 00 03 80 call 40004e30 <== NOT EXECUTED 40004034: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 40004038: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 <== NOT EXECUTED 4000403c: c4 1f bf f0 ldd [ %fp + -16 ], %g2 <== NOT EXECUTED 40004040: 84 20 80 03 sub %g2, %g3, %g2 <== NOT EXECUTED 40004044: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004048: 18 80 00 83 bgu 40004254 <== NOT EXECUTED 4000404c: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED break; } } rtems_task_wake_after (1); 40004050: 40 00 08 73 call 4000621c <== NOT EXECUTED 40004054: 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); 40004058: 10 bf ff e2 b 40003fe0 <== NOT EXECUTED 4000405c: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED } } rtems_task_wake_after (1); } else { siproc (n, tty); 40004060: 7f ff ff 30 call 40003d20 <== NOT EXECUTED 40004064: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 40004068: c4 0c 20 47 ldub [ %l0 + 0x47 ], %g2 <== NOT EXECUTED 4000406c: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40004070: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40004074: 16 80 00 77 bge 40004250 <== NOT EXECUTED 40004078: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 4000407c: 22 bf ff d9 be,a 40003fe0 <== NOT EXECUTED 40004080: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 40004084: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED 40004088: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000408c: 22 bf ff d5 be,a 40003fe0 <== NOT EXECUTED 40004090: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); 40004094: 92 10 00 15 mov %l5, %o1 <== NOT EXECUTED 40004098: 40 00 03 66 call 40004e30 <== NOT EXECUTED 4000409c: 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); 400040a0: 10 bf ff d0 b 40003fe0 <== NOT EXECUTED 400040a4: c2 04 20 a0 ld [ %l0 + 0xa0 ], %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; 400040a8: e2 04 20 74 ld [ %l0 + 0x74 ], %l1 <== NOT EXECUTED 400040ac: ac 10 20 01 mov 1, %l6 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 400040b0: 2f 10 00 64 sethi %hi(0x40019000), %l7 <== 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, 400040b4: 10 80 00 4c b 400041e4 <== NOT EXECUTED 400040b8: aa 04 20 49 add %l0, 0x49, %l5 <== 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; 400040bc: d0 04 20 5c ld [ %l0 + 0x5c ], %o0 <== NOT EXECUTED 400040c0: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 400040c4: 40 00 44 eb call 40015470 <.urem> <== NOT EXECUTED 400040c8: 90 02 20 01 inc %o0 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 400040cc: 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; 400040d0: 84 10 00 08 mov %o0, %g2 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 400040d4: e2 08 40 08 ldub [ %g1 + %o0 ], %l1 <== NOT EXECUTED tty->rawInBuf.Head = newHead; 400040d8: d0 24 20 5c st %o0, [ %l0 + 0x5c ] <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 400040dc: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 400040e0: d0 04 20 64 ld [ %l0 + 0x64 ], %o0 <== NOT EXECUTED 400040e4: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 400040e8: 90 02 00 01 add %o0, %g1, %o0 <== NOT EXECUTED 400040ec: 40 00 44 e1 call 40015470 <.urem> <== NOT EXECUTED 400040f0: 90 22 00 02 sub %o0, %g2, %o0 <== NOT EXECUTED 400040f4: c2 04 20 bc ld [ %l0 + 0xbc ], %g1 <== NOT EXECUTED 400040f8: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 400040fc: 3a 80 00 27 bcc,a 40004198 <== NOT EXECUTED 40004100: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 40004104: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004108: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED 4000410c: 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)) 40004110: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004114: 82 08 62 02 and %g1, 0x202, %g1 <== NOT EXECUTED 40004118: 80 a0 62 02 cmp %g1, 0x202 <== NOT EXECUTED 4000411c: 12 80 00 11 bne 40004160 <== NOT EXECUTED 40004120: 01 00 00 00 nop <== NOT EXECUTED 40004124: c2 04 20 94 ld [ %l0 + 0x94 ], %g1 <== NOT EXECUTED 40004128: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000412c: 22 80 00 07 be,a 40004148 <== NOT EXECUTED 40004130: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 40004134: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004138: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 4000413c: 02 80 00 09 be 40004160 <== NOT EXECUTED 40004140: 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, 40004144: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 40004148: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 4000414c: 92 10 00 15 mov %l5, %o1 <== NOT EXECUTED 40004150: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004154: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 40004158: 10 80 00 10 b 40004198 <== NOT EXECUTED 4000415c: 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) { 40004160: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004164: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 40004168: 22 80 00 0c be,a 40004198 <== NOT EXECUTED 4000416c: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 40004170: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 40004174: 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; 40004178: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED 4000417c: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 40004180: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40004184: 22 80 00 05 be,a 40004198 <== NOT EXECUTED 40004188: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 4000418c: 9f c0 80 00 call %g2 <== NOT EXECUTED 40004190: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 40004194: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 40004198: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 4000419c: 02 80 00 09 be 400041c0 <== NOT EXECUTED 400041a0: 90 0c 60 ff and %l1, 0xff, %o0 <== NOT EXECUTED if (siproc (c, tty)) 400041a4: 7f ff fe df call 40003d20 <== NOT EXECUTED 400041a8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 400041ac: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400041b0: 32 80 00 0c bne,a 400041e0 <== NOT EXECUTED 400041b4: ac 10 20 00 clr %l6 <== NOT EXECUTED else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 400041b8: 10 80 00 0b b 400041e4 <== NOT EXECUTED 400041bc: e2 04 20 70 ld [ %l0 + 0x70 ], %l1 <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 400041c0: 7f ff fe d8 call 40003d20 <== NOT EXECUTED 400041c4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 400041c8: c4 0c 20 47 ldub [ %l0 + 0x47 ], %g2 <== NOT EXECUTED 400041cc: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 400041d0: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400041d4: 26 80 00 04 bl,a 400041e4 <== NOT EXECUTED 400041d8: e2 04 20 70 ld [ %l0 + 0x70 ], %l1 <== NOT EXECUTED 400041dc: ac 10 20 00 clr %l6 <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 400041e0: e2 04 20 70 ld [ %l0 + 0x70 ], %l1 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 400041e4: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 <== NOT EXECUTED 400041e8: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 400041ec: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400041f0: 02 80 00 07 be 4000420c <== NOT EXECUTED 400041f4: c2 05 e0 c4 ld [ %l7 + 0xc4 ], %g1 <== NOT EXECUTED 400041f8: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 400041fc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40004200: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004204: 06 bf ff ae bl 400040bc <== NOT EXECUTED 40004208: 01 00 00 00 nop <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 4000420c: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED 40004210: 02 80 00 11 be 40004254 <== NOT EXECUTED 40004214: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 40004218: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED 4000421c: d2 04 20 6c ld [ %l0 + 0x6c ], %o1 <== NOT EXECUTED 40004220: 40 00 05 c0 call 40005920 <== NOT EXECUTED 40004224: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 40004228: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000422c: 02 bf ff ee be 400041e4 <== NOT EXECUTED 40004230: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40004234: 30 80 00 08 b,a 40004254 <== 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++]; 40004238: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED count--; 4000423c: a4 04 bf ff add %l2, -1, %l2 <== 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++]; 40004240: c2 08 40 02 ldub [ %g1 + %g2 ], %g1 <== NOT EXECUTED 40004244: c2 2c c0 00 stb %g1, [ %l3 ] <== NOT EXECUTED 40004248: c6 24 20 24 st %g3, [ %l0 + 0x24 ] <== NOT EXECUTED 4000424c: a6 04 e0 01 inc %l3 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 40004250: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40004254: 22 80 00 08 be,a 40004274 <== NOT EXECUTED 40004258: c2 05 20 0c ld [ %l4 + 0xc ], %g1 <== NOT EXECUTED 4000425c: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED 40004260: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40004264: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004268: 06 bf ff f4 bl 40004238 <== NOT EXECUTED 4000426c: 86 00 a0 01 add %g2, 1, %g3 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 40004270: c2 05 20 0c ld [ %l4 + 0xc ], %g1 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 40004274: 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; 40004278: 82 20 40 12 sub %g1, %l2, %g1 <== NOT EXECUTED 4000427c: c2 25 20 14 st %g1, [ %l4 + 0x14 ] <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 40004280: 40 00 06 6f call 40005c3c <== NOT EXECUTED 40004284: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED return sc; } 40004288: 81 c7 e0 08 ret <== NOT EXECUTED 4000428c: 81 e8 00 00 restore <== NOT EXECUTED 4000305c : * 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) { 4000305c: 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)) 40003060: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40003064: 82 08 64 03 and %g1, 0x403, %g1 <== NOT EXECUTED 40003068: 80 a0 64 01 cmp %g1, 0x401 <== NOT EXECUTED 4000306c: 12 80 00 0f bne 400030a8 <== NOT EXECUTED 40003070: 92 06 20 4a add %i0, 0x4a, %o1 <== NOT EXECUTED == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 40003074: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED 40003078: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 4000307c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003080: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 40003084: 7f ff fb 35 call 40001d58 <== NOT EXECUTED 40003088: 01 00 00 00 nop <== NOT EXECUTED tty->t_dqlen--; 4000308c: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 40003090: 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--; 40003094: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 40003098: 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--; 4000309c: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 400030a0: c4 26 20 b8 st %g2, [ %i0 + 0xb8 ] <== NOT EXECUTED rtems_interrupt_enable(level); 400030a4: 30 80 00 12 b,a 400030ec <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 400030a8: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400030ac: 82 08 60 03 and %g1, 3, %g1 <== NOT EXECUTED 400030b0: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 400030b4: 12 80 00 12 bne 400030fc <== NOT EXECUTED 400030b8: 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, 400030bc: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED 400030c0: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 400030c4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400030c8: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 400030cc: 7f ff fb 23 call 40001d58 <== NOT EXECUTED 400030d0: 01 00 00 00 nop <== NOT EXECUTED tty->t_dqlen--; 400030d4: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 400030d8: 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--; 400030dc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 400030e0: 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--; 400030e4: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 400030e8: c4 26 20 b8 st %g2, [ %i0 + 0xb8 ] <== NOT EXECUTED rtems_interrupt_enable(level); 400030ec: 7f ff fb 1f call 40001d68 <== NOT EXECUTED 400030f0: a2 10 20 01 mov 1, %l1 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 400030f4: 81 c7 e0 08 ret <== NOT EXECUTED 400030f8: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 400030fc: c4 06 20 80 ld [ %i0 + 0x80 ], %g2 <== NOT EXECUTED 40003100: c2 06 20 84 ld [ %i0 + 0x84 ], %g1 <== NOT EXECUTED 40003104: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40003108: 12 80 00 0a bne 40003130 <== NOT EXECUTED 4000310c: 01 00 00 00 nop <== NOT EXECUTED /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 40003110: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED 40003114: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40003118: 12 80 00 49 bne 4000323c <== NOT EXECUTED 4000311c: a2 10 20 00 clr %l1 <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 40003120: 40 00 0a c7 call 40005c3c <== NOT EXECUTED 40003124: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 40003128: 81 c7 e0 08 ret <== NOT EXECUTED 4000312c: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; } rtems_interrupt_disable(level); 40003130: 7f ff fb 0a call 40001d58 <== NOT EXECUTED 40003134: 01 00 00 00 nop <== NOT EXECUTED len = tty->t_dqlen; 40003138: e0 06 20 90 ld [ %i0 + 0x90 ], %l0 <== NOT EXECUTED tty->t_dqlen = 0; 4000313c: c0 26 20 90 clr [ %i0 + 0x90 ] <== NOT EXECUTED rtems_interrupt_enable(level); 40003140: 7f ff fb 0a call 40001d68 <== NOT EXECUTED 40003144: 01 00 00 00 nop <== NOT EXECUTED newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 40003148: d0 06 20 84 ld [ %i0 + 0x84 ], %o0 <== NOT EXECUTED 4000314c: d2 06 20 88 ld [ %i0 + 0x88 ], %o1 <== NOT EXECUTED 40003150: 40 00 48 c8 call 40015470 <.urem> <== NOT EXECUTED 40003154: 90 04 00 08 add %l0, %o0, %o0 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 40003158: 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; 4000315c: d0 26 20 84 st %o0, [ %i0 + 0x84 ] <== NOT EXECUTED if (tty->rawOutBufState == rob_wait) { 40003160: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40003164: 12 80 00 04 bne 40003174 <== NOT EXECUTED 40003168: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 4000316c: 40 00 0a b4 call 40005c3c <== NOT EXECUTED 40003170: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { 40003174: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 40003178: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 4000317c: 12 80 00 0b bne 400031a8 <== NOT EXECUTED 40003180: 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) { 40003184: c2 06 20 d4 ld [ %i0 + 0xd4 ], %g1 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 40003188: c0 26 20 94 clr [ %i0 + 0x94 ] <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 4000318c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003190: 02 80 00 2a be 40003238 <== NOT EXECUTED 40003194: a2 10 20 00 clr %l1 <== NOT EXECUTED (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 40003198: d2 06 20 d8 ld [ %i0 + 0xd8 ], %o1 <== NOT EXECUTED 4000319c: 9f c0 40 00 call %g1 <== NOT EXECUTED 400031a0: 90 06 20 30 add %i0, 0x30, %o0 <== NOT EXECUTED 400031a4: 30 80 00 25 b,a 40003238 <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 400031a8: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400031ac: 82 08 62 10 and %g1, 0x210, %g1 <== NOT EXECUTED 400031b0: 80 a0 62 10 cmp %g1, 0x210 <== NOT EXECUTED 400031b4: 12 80 00 0c bne 400031e4 <== NOT EXECUTED 400031b8: 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); 400031bc: 7f ff fa e7 call 40001d58 <== NOT EXECUTED 400031c0: 01 00 00 00 nop <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 400031c4: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 400031c8: 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; 400031cc: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 400031d0: c4 26 20 94 st %g2, [ %i0 + 0x94 ] <== NOT EXECUTED else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); tty->flow_ctrl |= FL_OSTOP; 400031d4: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ rtems_interrupt_enable(level); 400031d8: 7f ff fa e4 call 40001d68 <== NOT EXECUTED 400031dc: a2 10 20 00 clr %l1 <== NOT EXECUTED 400031e0: 30 80 00 16 b,a 40003238 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 400031e4: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 400031e8: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 400031ec: 08 80 00 05 bleu 40003200 <== NOT EXECUTED 400031f0: 01 00 00 00 nop <== NOT EXECUTED nToSend = tty->rawOutBuf.Size - newTail; 400031f4: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; 400031f8: 10 80 00 04 b 40003208 <== NOT EXECUTED 400031fc: a2 20 40 10 sub %g1, %l0, %l1 <== NOT EXECUTED 40003200: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 40003204: a2 20 40 10 sub %g1, %l0, %l1 <== 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)) { 40003208: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 4000320c: 80 88 66 00 btst 0x600, %g1 <== NOT EXECUTED 40003210: 32 80 00 02 bne,a 40003218 <== NOT EXECUTED 40003214: a2 10 20 01 mov 1, %l1 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 40003218: d2 06 20 7c ld [ %i0 + 0x7c ], %o1 <== NOT EXECUTED 4000321c: c4 06 20 a4 ld [ %i0 + 0xa4 ], %g2 <== NOT EXECUTED 40003220: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 40003224: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 40003228: 92 04 00 09 add %l0, %o1, %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*/ 4000322c: c2 26 20 94 st %g1, [ %i0 + 0x94 ] <== NOT EXECUTED (*tty->device.write)(tty->minor, 40003230: 9f c0 80 00 call %g2 <== NOT EXECUTED 40003234: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 40003238: e0 26 20 84 st %l0, [ %i0 + 0x84 ] <== NOT EXECUTED } return nToSend; } 4000323c: b0 10 00 11 mov %l1, %i0 <== NOT EXECUTED 40003240: 81 c7 e0 08 ret <== NOT EXECUTED 40003244: 81 e8 00 00 restore <== NOT EXECUTED 40004cf0 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 40004cf0: 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 | 40004cf4: 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 ( 40004cf8: 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 | 40004cfc: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED 40004d00: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40004d04: 94 10 20 00 clr %o2 <== NOT EXECUTED 40004d08: 40 00 00 b3 call 40004fd4 <== NOT EXECUTED 40004d0c: 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) { 40004d10: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40004d14: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40004d18: 22 80 00 07 be,a 40004d34 <== NOT EXECUTED 40004d1c: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1 <== NOT EXECUTED tty->rxTaskId = 0; 40004d20: c0 26 20 c4 clr [ %i0 + 0xc4 ] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 40004d24: 40 00 04 6f call 40005ee0 <== NOT EXECUTED 40004d28: 90 10 20 00 clr %o0 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 40004d2c: 10 bf ff f5 b 40004d00 <== NOT EXECUTED 40004d30: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 40004d34: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004d38: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED if (c != EOF) { 40004d3c: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 40004d40: 02 bf ff ef be 40004cfc <== NOT EXECUTED 40004d44: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; 40004d48: d0 2f bf f7 stb %o0, [ %fp + -9 ] <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 40004d4c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40004d50: 7f ff f9 5e call 400032c8 <== NOT EXECUTED 40004d54: 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 | 40004d58: 10 bf ff ea b 40004d00 <== NOT EXECUTED 40004d5c: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED 40003044 : 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); 40003044: d0 02 20 c4 ld [ %o0 + 0xc4 ], %o0 <== NOT EXECUTED 40003048: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 4000304c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40003050: 40 00 08 65 call 400051e4 <== NOT EXECUTED 40003054: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40003058: 01 00 00 00 nop 40004d60 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 40004d60: 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) { 40004d64: 03 10 00 66 sethi %hi(0x40019800), %g1 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 40004d68: 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) { 40004d6c: a2 10 62 c4 or %g1, 0x2c4, %l1 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 40004d70: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40004d74: 94 10 20 00 clr %o2 <== NOT EXECUTED 40004d78: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40004d7c: 40 00 00 96 call 40004fd4 <== NOT EXECUTED 40004d80: 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) { 40004d84: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40004d88: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40004d8c: 02 80 00 07 be 40004da8 <== NOT EXECUTED 40004d90: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED tty->txTaskId = 0; 40004d94: c0 26 20 c8 clr [ %i0 + 0xc8 ] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 40004d98: 40 00 04 52 call 40005ee0 <== NOT EXECUTED 40004d9c: 90 10 20 00 clr %o0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 40004da0: 10 bf ff f5 b 40004d74 <== NOT EXECUTED 40004da4: 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) { 40004da8: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 40004dac: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40004db0: 82 00 40 11 add %g1, %l1, %g1 <== NOT EXECUTED 40004db4: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED 40004db8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004dbc: 02 80 00 04 be 40004dcc <== NOT EXECUTED 40004dc0: 01 00 00 00 nop <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 40004dc4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004dc8: 01 00 00 00 nop <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 40004dcc: 7f ff f8 a4 call 4000305c <== NOT EXECUTED 40004dd0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 40004dd4: 10 bf ff e8 b 40004d74 <== NOT EXECUTED 40004dd8: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40003d6c : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 40003d6c: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40003d70: c2 06 00 00 ld [ %i0 ], %g1 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40003d74: 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; 40003d78: e4 00 60 28 ld [ %g1 + 0x28 ], %l2 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40003d7c: 94 10 20 00 clr %o2 40003d80: 40 00 06 e8 call 40005920 40003d84: d0 04 a0 18 ld [ %l2 + 0x18 ], %o0 if (sc != RTEMS_SUCCESSFUL) 40003d88: a6 92 20 00 orcc %o0, 0, %l3 40003d8c: 12 80 00 25 bne 40003e20 40003d90: 03 10 00 66 sethi %hi(0x40019800), %g1 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 40003d94: c4 04 a0 cc ld [ %l2 + 0xcc ], %g2 40003d98: 82 10 62 c4 or %g1, 0x2c4, %g1 40003d9c: 85 28 a0 05 sll %g2, 5, %g2 40003da0: 84 00 80 01 add %g2, %g1, %g2 40003da4: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 40003da8: 80 a0 60 00 cmp %g1, 0 40003dac: 02 80 00 06 be 40003dc4 40003db0: 92 10 00 18 mov %i0, %o1 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 40003db4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003db8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40003dbc: 10 80 00 17 b 40003e18 <== NOT EXECUTED 40003dc0: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 40003dc4: c2 04 a0 34 ld [ %l2 + 0x34 ], %g1 40003dc8: d2 06 20 0c ld [ %i0 + 0xc ], %o1 40003dcc: 80 88 60 01 btst 1, %g1 40003dd0: 02 80 00 0e be 40003e08 40003dd4: d0 06 20 08 ld [ %i0 + 8 ], %o0 uint32_t count = args->count; 40003dd8: a2 10 00 09 mov %o1, %l1 char *buffer = args->buffer; 40003ddc: 10 80 00 05 b 40003df0 40003de0: a0 10 00 08 mov %o0, %l0 while (count--) oproc (*buffer++, tty); 40003de4: 92 10 00 12 mov %l2, %o1 40003de8: 7f ff fe 4b call 40003714 40003dec: a0 04 20 01 inc %l0 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 40003df0: a2 04 7f ff add %l1, -1, %l1 40003df4: 80 a4 7f ff cmp %l1, -1 40003df8: 32 bf ff fb bne,a 40003de4 40003dfc: 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; 40003e00: 10 80 00 05 b 40003e14 40003e04: 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); 40003e08: 7f ff fd f7 call 400035e4 <== NOT EXECUTED 40003e0c: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED args->bytes_moved = args->count; 40003e10: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED 40003e14: c2 26 20 14 st %g1, [ %i0 + 0x14 ] } rtems_semaphore_release (tty->osem); 40003e18: 40 00 07 89 call 40005c3c 40003e1c: d0 04 a0 18 ld [ %l2 + 0x18 ], %o0 return sc; } 40003e20: 81 c7 e0 08 ret 40003e24: 91 e8 00 13 restore %g0, %l3, %o0 40012208 : */ rtems_status_code rtems_timer_delete( Objects_Id id ) { 40012208: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 4001220c: 21 10 00 d0 sethi %hi(0x40034000), %l0 40012210: 92 10 00 18 mov %i0, %o1 40012214: 94 07 bf f4 add %fp, -12, %o2 40012218: 40 00 0a 13 call 40014a64 <_Objects_Get> 4001221c: 90 14 23 4c or %l0, 0x34c, %o0 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40012220: c2 07 bf f4 ld [ %fp + -12 ], %g1 40012224: 80 a0 60 00 cmp %g1, 0 40012228: 02 80 00 08 be 40012248 4001222c: b0 10 00 08 mov %o0, %i0 40012230: 82 18 60 02 xor %g1, 2, %g1 40012234: 80 a0 00 01 cmp %g0, %g1 40012238: 82 60 20 00 subx %g0, 0, %g1 4001223c: b0 08 60 15 and %g1, 0x15, %i0 40012240: 81 c7 e0 08 ret 40012244: 91 ee 20 04 restore %i0, 4, %o0 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40012248: a0 14 23 4c or %l0, 0x34c, %l0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 4001224c: c2 02 20 08 ld [ %o0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40012250: c6 14 20 10 lduh [ %l0 + 0x10 ], %g3 40012254: 05 00 00 3f sethi %hi(0xfc00), %g2 40012258: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 4001225c: 82 08 40 02 and %g1, %g2, %g1 40012260: 80 a0 40 03 cmp %g1, %g3 40012264: 38 80 00 06 bgu,a 4001227c 40012268: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 4001226c: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 40012270: 83 28 60 02 sll %g1, 2, %g1 40012274: c0 20 80 01 clr [ %g2 + %g1 ] uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 40012278: c0 26 20 0c clr [ %i0 + 0xc ] case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); (void) _Watchdog_Remove( &the_timer->Ticker ); 4001227c: 40 00 15 40 call 4001777c <_Watchdog_Remove> 40012280: 90 06 20 10 add %i0, 0x10, %o0 RTEMS_INLINE_ROUTINE void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object ); 40012284: 90 10 00 10 mov %l0, %o0 40012288: 40 00 09 a1 call 4001490c <_Objects_Free> 4001228c: 92 10 00 18 mov %i0, %o1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40012290: 03 10 00 ce sethi %hi(0x40033800), %g1 40012294: c4 00 61 10 ld [ %g1 + 0x110 ], %g2 ! 40033910 <_Thread_Dispatch_disable_level> 40012298: b0 10 20 00 clr %i0 4001229c: 84 00 bf ff add %g2, -1, %g2 400122a0: c4 20 61 10 st %g2, [ %g1 + 0x110 ] 400122a4: c2 00 61 10 ld [ %g1 + 0x110 ], %g1 400122a8: 80 a0 60 00 cmp %g1, 0 400122ac: 12 80 00 04 bne 400122bc 400122b0: 01 00 00 00 nop _Thread_Dispatch(); 400122b4: 40 00 0e e0 call 40015e34 <_Thread_Dispatch> 400122b8: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400122bc: 81 c7 e0 08 ret 400122c0: 81 e8 00 00 restore 400122f8 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 400122f8: 9d e3 bf 90 save %sp, -112, %sp 400122fc: a4 10 00 18 mov %i0, %l2 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 40012300: 80 a6 60 00 cmp %i1, 0 40012304: 02 80 00 21 be 40012388 40012308: b0 10 20 0a mov 0xa, %i0 return RTEMS_INVALID_NUMBER; if ( !routine ) 4001230c: 80 a6 a0 00 cmp %i2, 0 40012310: 02 80 00 1e be 40012388 40012314: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 40012318: 11 10 00 d0 sethi %hi(0x40034000), %o0 4001231c: 92 10 00 12 mov %l2, %o1 40012320: 90 12 23 4c or %o0, 0x34c, %o0 40012324: 40 00 09 d0 call 40014a64 <_Objects_Get> 40012328: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 4001232c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40012330: 80 a0 60 00 cmp %g1, 0 40012334: 02 80 00 08 be 40012354 40012338: a0 10 00 08 mov %o0, %l0 4001233c: 82 18 60 02 xor %g1, 2, %g1 40012340: 80 a0 00 01 cmp %g0, %g1 40012344: 82 60 20 00 subx %g0, 0, %g1 40012348: b0 08 60 15 and %g1, 0x15, %i0 4001234c: 81 c7 e0 08 ret 40012350: 91 ee 20 04 restore %i0, 4, %o0 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 40012354: a2 02 20 10 add %o0, 0x10, %l1 40012358: 40 00 15 09 call 4001777c <_Watchdog_Remove> 4001235c: 90 10 00 11 mov %l1, %o0 _ISR_Disable( level ); 40012360: 7f ff e0 f7 call 4000a73c 40012364: 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 ) { 40012368: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4001236c: 80 a0 60 00 cmp %g1, 0 40012370: 22 80 00 08 be,a 40012390 40012374: f4 24 20 2c st %i2, [ %l0 + 0x2c ] _ISR_Enable( level ); 40012378: 7f ff e0 f5 call 4000a74c <== NOT EXECUTED 4001237c: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 40012380: 7f ff ff d1 call 400122c4 <_Thread_Enable_dispatch> <== NOT EXECUTED 40012384: 01 00 00 00 nop <== NOT EXECUTED 40012388: 81 c7 e0 08 ret 4001238c: 81 e8 00 00 restore 40012390: e4 24 20 30 st %l2, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 40012394: 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; 40012398: c0 24 20 38 clr [ %l0 + 0x38 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4001239c: c0 24 20 18 clr [ %l0 + 0x18 ] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 400123a0: 7f ff e0 eb call 4000a74c 400123a4: b0 10 20 00 clr %i0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400123a8: 92 10 00 11 mov %l1, %o1 400123ac: 11 10 00 ce sethi %hi(0x40033800), %o0 400123b0: 90 12 22 0c or %o0, 0x20c, %o0 ! 40033a0c <_Watchdog_Ticks_chain> 400123b4: 40 00 14 9a call 4001761c <_Watchdog_Insert> 400123b8: f2 24 20 1c st %i1, [ %l0 + 0x1c ] _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 400123bc: 7f ff ff c2 call 400122c4 <_Thread_Enable_dispatch> 400123c0: 01 00 00 00 nop return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400123c4: 81 c7 e0 08 ret 400123c8: 81 e8 00 00 restore 40008060 : rtems_status_code rtems_timer_get_information( Objects_Id id, rtems_timer_information *the_info ) { 40008060: 9d e3 bf 90 save %sp, -112, %sp 40008064: 92 10 00 18 mov %i0, %o1 Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) 40008068: 80 a6 60 00 cmp %i1, 0 4000806c: 02 80 00 22 be 400080f4 40008070: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 40008074: 11 10 00 7f sethi %hi(0x4001fc00), %o0 40008078: 94 07 bf f4 add %fp, -12, %o2 4000807c: 40 00 07 66 call 40009e14 <_Objects_Get> 40008080: 90 12 20 64 or %o0, 0x64, %o0 return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40008084: c2 07 bf f4 ld [ %fp + -12 ], %g1 40008088: 80 a0 60 00 cmp %g1, 0 4000808c: 22 80 00 08 be,a 400080ac 40008090: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 40008094: 82 18 60 02 xor %g1, 2, %g1 <== NOT EXECUTED 40008098: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 4000809c: 82 60 20 00 subx %g0, 0, %g1 <== NOT EXECUTED 400080a0: b0 08 60 15 and %g1, 0x15, %i0 <== NOT EXECUTED 400080a4: 81 c7 e0 08 ret <== NOT EXECUTED 400080a8: 91 ee 20 04 restore %i0, 4, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; 400080ac: c4 02 20 38 ld [ %o0 + 0x38 ], %g2 the_info->initial = the_timer->Ticker.initial; 400080b0: c2 26 60 04 st %g1, [ %i1 + 4 ] the_info->start_time = the_timer->Ticker.start_time; 400080b4: c2 02 20 24 ld [ %o0 + 0x24 ], %g1 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; 400080b8: c4 26 40 00 st %g2, [ %i1 ] the_info->initial = the_timer->Ticker.initial; the_info->start_time = the_timer->Ticker.start_time; 400080bc: c2 26 60 08 st %g1, [ %i1 + 8 ] the_info->stop_time = the_timer->Ticker.stop_time; 400080c0: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 400080c4: c2 26 60 0c st %g1, [ %i1 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400080c8: 05 10 00 7f sethi %hi(0x4001fc00), %g2 400080cc: c2 00 a2 50 ld [ %g2 + 0x250 ], %g1 ! 4001fe50 <_Thread_Dispatch_disable_level> 400080d0: b0 10 20 00 clr %i0 400080d4: 82 00 7f ff add %g1, -1, %g1 400080d8: c2 20 a2 50 st %g1, [ %g2 + 0x250 ] 400080dc: c2 00 a2 50 ld [ %g2 + 0x250 ], %g1 400080e0: 80 a0 60 00 cmp %g1, 0 400080e4: 12 80 00 04 bne 400080f4 400080e8: 01 00 00 00 nop _Thread_Dispatch(); 400080ec: 40 00 0c 3e call 4000b1e4 <_Thread_Dispatch> 400080f0: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400080f4: 81 c7 e0 08 ret 400080f8: 81 e8 00 00 restore 40012ae8 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 40012ae8: 9d e3 bf 90 save %sp, -112, %sp /* * Make sure the requested priority is valid. */ _priority = priority; if ( priority == RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 40012aec: 92 10 20 00 clr %o1 40012af0: 80 a6 3f ff cmp %i0, -1 40012af4: 02 80 00 07 be 40012b10 40012af8: 94 10 00 19 mov %i1, %o2 _priority = 0; else if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) 40012afc: 82 06 3f ff add %i0, -1, %g1 40012b00: 80 a0 60 fe cmp %g1, 0xfe 40012b04: 18 80 00 48 bgu 40012c24 40012b08: a0 10 20 13 mov 0x13, %l0 40012b0c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40012b10: 05 10 00 ce sethi %hi(0x40033800), %g2 40012b14: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 40033910 <_Thread_Dispatch_disable_level> 40012b18: 82 00 60 01 inc %g1 40012b1c: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] * Just to make sure the test versus create/start operation are atomic. */ _Thread_Disable_dispatch(); if ( _Timer_Server ) { 40012b20: 03 10 00 d0 sethi %hi(0x40034000), %g1 40012b24: c2 00 63 98 ld [ %g1 + 0x398 ], %g1 ! 40034398 <_Timer_Server> 40012b28: 80 a0 60 00 cmp %g1, 0 40012b2c: 02 80 00 06 be 40012b44 40012b30: 19 00 00 20 sethi %hi(0x8000), %o4 _Thread_Enable_dispatch(); 40012b34: 7f ff ff a0 call 400129b4 <_Thread_Enable_dispatch> <== NOT EXECUTED 40012b38: a0 10 20 0e mov 0xe, %l0 <== NOT EXECUTED _Watchdog_Initialize( &_Timer_Server->Timer, _Thread_Delay_ended, id, NULL ); _Watchdog_Initialize( &_Timer_Seconds_timer, _Thread_Delay_ended, id, NULL ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 40012b3c: 81 c7 e0 08 ret <== NOT EXECUTED 40012b40: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED * 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( 40012b44: 11 15 12 53 sethi %hi(0x54494c00), %o0 40012b48: 98 16 80 0c or %i2, %o4, %o4 40012b4c: 90 12 21 45 or %o0, 0x145, %o0 40012b50: 96 10 21 00 mov 0x100, %o3 40012b54: 7f ff fa 0e call 4001138c 40012b58: 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) { 40012b5c: a0 92 20 00 orcc %o0, 0, %l0 40012b60: 12 80 00 2f bne 40012c1c 40012b64: d0 07 bf f4 ld [ %fp + -12 ], %o0 _Thread_Enable_dispatch(); return status; } status = rtems_task_start( 40012b68: 13 10 00 4a sethi %hi(0x40012800), %o1 40012b6c: 94 10 20 00 clr %o2 40012b70: 7f ff fc 62 call 40011cf8 40012b74: 92 12 61 e8 or %o1, 0x1e8, %o1 id, /* the id from create */ (rtems_task_entry) _Timer_Server_body, /* the timer server entry point */ 0 /* there is no argument */ ); if (status) { 40012b78: a0 92 20 00 orcc %o0, 0, %l0 40012b7c: 12 80 00 28 bne 40012c1c 40012b80: 03 10 00 cd sethi %hi(0x40033400), %g1 * * 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( 40012b84: c8 07 bf f4 ld [ %fp + -12 ], %g4 RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object( Objects_Information *information, uint16_t index ) { if ( index > information->maximum ) 40012b88: 9a 10 63 c0 or %g1, 0x3c0, %o5 40012b8c: c4 13 60 10 lduh [ %o5 + 0x10 ], %g2 40012b90: 03 00 00 3f sethi %hi(0xfc00), %g1 40012b94: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40012b98: 82 09 00 01 and %g4, %g1, %g1 40012b9c: 80 a0 40 02 cmp %g1, %g2 40012ba0: 18 80 00 05 bgu 40012bb4 40012ba4: 86 10 20 00 clr %g3 return NULL; return information->local_table[ index ]; 40012ba8: c4 03 60 20 ld [ %o5 + 0x20 ], %g2 40012bac: 83 28 60 02 sll %g1, 2, %g1 40012bb0: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40012bb4: 03 10 00 d0 sethi %hi(0x40034000), %g1 40012bb8: c6 20 63 98 st %g3, [ %g1 + 0x398 ] ! 40034398 <_Timer_Server> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40012bbc: 03 10 00 ce sethi %hi(0x40033800), %g1 40012bc0: 82 10 60 10 or %g1, 0x10, %g1 ! 40033810 <_Timer_Ticks_chain+0x4> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40012bc4: c2 20 7f fc st %g1, [ %g1 + -4 ] 40012bc8: 82 00 7f fc add %g1, -4, %g1 ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 40012bcc: c0 20 e0 6c clr [ %g3 + 0x6c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40012bd0: c0 20 e0 50 clr [ %g3 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; 40012bd4: c8 20 e0 68 st %g4, [ %g3 + 0x68 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40012bd8: 05 10 00 57 sethi %hi(0x40015c00), %g2 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40012bdc: c2 20 60 08 st %g1, [ %g1 + 8 ] 40012be0: 84 10 a1 78 or %g2, 0x178, %g2 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 40012be4: c0 20 60 04 clr [ %g1 + 4 ] 40012be8: c4 20 e0 64 st %g2, [ %g3 + 0x64 ] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40012bec: 03 10 00 ce sethi %hi(0x40033800), %g1 40012bf0: 82 10 60 24 or %g1, 0x24, %g1 ! 40033824 <_Timer_Seconds_chain+0x4> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40012bf4: c2 20 7f fc st %g1, [ %g1 + -4 ] 40012bf8: 82 00 7f fc add %g1, -4, %g1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40012bfc: 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; 40012c00: c0 20 60 04 clr [ %g1 + 4 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40012c04: 03 10 00 ce sethi %hi(0x40033800), %g1 40012c08: 82 10 60 2c or %g1, 0x2c, %g1 ! 4003382c <_Timer_Seconds_timer> the_watchdog->routine = routine; 40012c0c: c4 20 60 1c st %g2, [ %g1 + 0x1c ] the_watchdog->id = id; 40012c10: c8 20 60 20 st %g4, [ %g1 + 0x20 ] the_watchdog->user_data = user_data; 40012c14: c0 20 60 24 clr [ %g1 + 0x24 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40012c18: c0 20 60 08 clr [ %g1 + 8 ] */ _Watchdog_Initialize( &_Timer_Server->Timer, _Thread_Delay_ended, id, NULL ); _Watchdog_Initialize( &_Timer_Seconds_timer, _Thread_Delay_ended, id, NULL ); _Thread_Enable_dispatch(); 40012c1c: 7f ff ff 66 call 400129b4 <_Thread_Enable_dispatch> 40012c20: 01 00 00 00 nop return RTEMS_SUCCESSFUL; } 40012c24: b0 10 00 10 mov %l0, %i0 40012c28: 81 c7 e0 08 ret 40012c2c: 81 e8 00 00 restore 40012678 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 40012678: 9d e3 bf 90 save %sp, -112, %sp Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 4001267c: 25 10 00 d0 sethi %hi(0x40034000), %l2 40012680: c2 04 a3 98 ld [ %l2 + 0x398 ], %g1 ! 40034398 <_Timer_Server> Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 40012684: a6 10 00 18 mov %i0, %l3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 40012688: 80 a0 60 00 cmp %g1, 0 4001268c: 02 80 00 24 be 4001271c 40012690: b0 10 20 0e mov 0xe, %i0 return RTEMS_INCORRECT_STATE; if ( !routine ) 40012694: 80 a6 a0 00 cmp %i2, 0 40012698: 02 80 00 21 be 4001271c 4001269c: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 400126a0: 80 a6 60 00 cmp %i1, 0 400126a4: 02 80 00 1e be 4001271c 400126a8: b0 10 20 0a mov 0xa, %i0 400126ac: 11 10 00 d0 sethi %hi(0x40034000), %o0 400126b0: 92 10 00 13 mov %l3, %o1 400126b4: 90 12 23 4c or %o0, 0x34c, %o0 400126b8: 40 00 08 eb call 40014a64 <_Objects_Get> 400126bc: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 400126c0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400126c4: 80 a0 60 00 cmp %g1, 0 400126c8: 02 80 00 08 be 400126e8 400126cc: a0 10 00 08 mov %o0, %l0 400126d0: 82 18 60 02 xor %g1, 2, %g1 400126d4: 80 a0 00 01 cmp %g0, %g1 400126d8: 82 60 20 00 subx %g0, 0, %g1 400126dc: b0 08 60 15 and %g1, 0x15, %i0 400126e0: 81 c7 e0 08 ret 400126e4: 91 ee 20 04 restore %i0, 4, %o0 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 400126e8: a2 02 20 10 add %o0, 0x10, %l1 400126ec: 40 00 14 24 call 4001777c <_Watchdog_Remove> 400126f0: 90 10 00 11 mov %l1, %o0 _ISR_Disable( level ); 400126f4: 7f ff e0 12 call 4000a73c 400126f8: 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 ) { 400126fc: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 40012700: 80 a0 60 00 cmp %g1, 0 40012704: 02 80 00 08 be 40012724 40012708: 82 10 20 01 mov 1, %g1 _ISR_Enable( level ); 4001270c: 7f ff e0 10 call 4000a74c <== NOT EXECUTED 40012710: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 40012714: 7f ff ff cc call 40012644 <_Thread_Enable_dispatch> <== NOT EXECUTED 40012718: 01 00 00 00 nop <== NOT EXECUTED 4001271c: 81 c7 e0 08 ret 40012720: 81 e8 00 00 restore * 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; 40012724: f2 24 20 1c st %i1, [ %l0 + 0x1c ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40012728: f4 24 20 2c st %i2, [ %l0 + 0x2c ] the_watchdog->id = id; 4001272c: e6 24 20 30 st %l3, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 40012730: f6 24 20 34 st %i3, [ %l0 + 0x34 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40012734: 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; 40012738: 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 ); 4001273c: 7f ff e0 04 call 4000a74c 40012740: 21 10 00 ce sethi %hi(0x40033800), %l0 _Timer_Server_stop_ticks_timer(); 40012744: d0 04 a3 98 ld [ %l2 + 0x398 ], %o0 40012748: 40 00 14 0d call 4001777c <_Watchdog_Remove> 4001274c: 90 02 20 48 add %o0, 0x48, %o0 _Timer_Server_process_ticks_chain(); 40012750: 40 00 00 87 call 4001296c <_Timer_Server_process_ticks_chain> 40012754: 01 00 00 00 nop _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); 40012758: 90 14 20 0c or %l0, 0xc, %o0 4001275c: 40 00 13 b0 call 4001761c <_Watchdog_Insert> 40012760: 92 10 00 11 mov %l1, %o1 */ RTEMS_INLINE_ROUTINE boolean _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 40012764: c4 04 20 0c ld [ %l0 + 0xc ], %g2 40012768: a0 14 20 0c or %l0, 0xc, %l0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4001276c: a0 04 20 04 add %l0, 4, %l0 _Timer_Server_reset_ticks_timer(); 40012770: 80 a0 80 10 cmp %g2, %l0 40012774: 02 80 00 08 be 40012794 40012778: c2 04 a3 98 ld [ %l2 + 0x398 ], %g1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4001277c: c4 00 a0 10 ld [ %g2 + 0x10 ], %g2 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40012780: 11 10 00 ce sethi %hi(0x40033800), %o0 40012784: 92 00 60 48 add %g1, 0x48, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40012788: c4 20 60 54 st %g2, [ %g1 + 0x54 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4001278c: 40 00 13 a4 call 4001761c <_Watchdog_Insert> 40012790: 90 12 22 0c or %o0, 0x20c, %o0 _Thread_Enable_dispatch(); 40012794: 7f ff ff ac call 40012644 <_Thread_Enable_dispatch> 40012798: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4001279c: 81 c7 e0 08 ret 400127a0: 81 e8 00 00 restore 40005fac : static int rtems_verror( uint32_t error_flag, const char *printf_format, va_list arglist ) { 40005fac: 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) 40005fb0: 03 08 00 00 sethi %hi(0x20000000), %g1 <== NOT EXECUTED 40005fb4: a8 8e 00 01 andcc %i0, %g1, %l4 <== NOT EXECUTED 40005fb8: 02 80 00 10 be 40005ff8 <== NOT EXECUTED 40005fbc: a6 10 00 18 mov %i0, %l3 <== NOT EXECUTED { if (rtems_panic_in_progress++) 40005fc0: 07 10 00 a2 sethi %hi(0x40028800), %g3 <== NOT EXECUTED 40005fc4: c2 00 e2 e4 ld [ %g3 + 0x2e4 ], %g1 ! 40028ae4 <== NOT EXECUTED 40005fc8: 82 00 60 01 inc %g1 <== NOT EXECUTED 40005fcc: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40005fd0: 02 80 00 06 be 40005fe8 <== NOT EXECUTED 40005fd4: c2 20 e2 e4 st %g1, [ %g3 + 0x2e4 ] <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40005fd8: 05 10 00 a3 sethi %hi(0x40028c00), %g2 <== NOT EXECUTED 40005fdc: c2 00 a0 b0 ld [ %g2 + 0xb0 ], %g1 ! 40028cb0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40005fe0: 82 00 60 01 inc %g1 <== NOT EXECUTED 40005fe4: c2 20 a0 b0 st %g1, [ %g2 + 0xb0 ] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 40005fe8: c2 00 e2 e4 ld [ %g3 + 0x2e4 ], %g1 <== NOT EXECUTED 40005fec: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40005ff0: 34 80 00 59 bg,a 40006154 <== NOT EXECUTED 40005ff4: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 40005ff8: 03 10 00 9f sethi %hi(0x40027c00), %g1 <== NOT EXECUTED 40005ffc: c2 00 60 98 ld [ %g1 + 0x98 ], %g1 ! 40027c98 <_impure_ptr> <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 40006000: 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 */ 40006004: 40 00 42 6e call 400169bc <== NOT EXECUTED 40006008: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 4000600c: 03 1c 00 00 sethi %hi(0x70000000), %g1 <== NOT EXECUTED 40006010: a0 2c c0 01 andn %l3, %g1, %l0 <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 40006014: 03 10 00 00 sethi %hi(0x40000000), %g1 <== NOT EXECUTED 40006018: 80 8c c0 01 btst %l3, %g1 <== NOT EXECUTED 4000601c: 02 80 00 05 be 40006030 <== NOT EXECUTED 40006020: 23 10 00 9f sethi %hi(0x40027c00), %l1 <== NOT EXECUTED local_errno = errno; 40006024: 40 00 42 09 call 40016848 <__errno> <== NOT EXECUTED 40006028: 01 00 00 00 nop <== NOT EXECUTED 4000602c: 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); 40006030: c2 04 60 98 ld [ %l1 + 0x98 ], %g1 <== NOT EXECUTED 40006034: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40006038: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 4000603c: 40 00 5a f0 call 4001cbfc <== NOT EXECUTED 40006040: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (status) 40006044: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40006048: 02 80 00 0c be 40006078 <== NOT EXECUTED 4000604c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 40006050: c2 04 60 98 ld [ %l1 + 0x98 ], %g1 <== NOT EXECUTED 40006054: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40006058: 7f ff ff ce call 40005f90 <== NOT EXECUTED 4000605c: e0 00 60 0c ld [ %g1 + 0xc ], %l0 <== NOT EXECUTED 40006060: 13 10 00 8f sethi %hi(0x40023c00), %o1 <== NOT EXECUTED 40006064: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 40006068: 92 12 61 60 or %o1, 0x160, %o1 <== NOT EXECUTED 4000606c: 40 00 44 15 call 400170c0 <== NOT EXECUTED 40006070: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40006074: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED if (local_errno) 40006078: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 4000607c: 22 80 00 1c be,a 400060ec <== NOT EXECUTED 40006080: 23 10 00 9f sethi %hi(0x40027c00), %l1 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 40006084: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40006088: 04 80 00 11 ble 400060cc <== NOT EXECUTED 4000608c: 03 10 00 9f sethi %hi(0x40027c00), %g1 <== NOT EXECUTED 40006090: 40 00 4f f0 call 4001a050 <== NOT EXECUTED 40006094: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40006098: c2 4a 00 00 ldsb [ %o0 ], %g1 <== NOT EXECUTED 4000609c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400060a0: 02 80 00 0b be 400060cc <== NOT EXECUTED 400060a4: 03 10 00 9f sethi %hi(0x40027c00), %g1 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 400060a8: c2 04 60 98 ld [ %l1 + 0x98 ], %g1 <== NOT EXECUTED 400060ac: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400060b0: 40 00 4f e8 call 4001a050 <== NOT EXECUTED 400060b4: e0 00 60 0c ld [ %g1 + 0xc ], %l0 <== NOT EXECUTED 400060b8: 13 10 00 8f sethi %hi(0x40023c00), %o1 <== NOT EXECUTED 400060bc: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 400060c0: 92 12 61 70 or %o1, 0x170, %o1 <== NOT EXECUTED 400060c4: 10 80 00 07 b 400060e0 <== NOT EXECUTED 400060c8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 400060cc: c2 00 60 98 ld [ %g1 + 0x98 ], %g1 <== NOT EXECUTED 400060d0: 13 10 00 8f sethi %hi(0x40023c00), %o1 <== NOT EXECUTED 400060d4: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 400060d8: 92 12 61 80 or %o1, 0x180, %o1 <== NOT EXECUTED 400060dc: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED 400060e0: 40 00 43 f8 call 400170c0 <== NOT EXECUTED 400060e4: 23 10 00 9f sethi %hi(0x40027c00), %l1 <== NOT EXECUTED 400060e8: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 400060ec: c2 04 60 98 ld [ %l1 + 0x98 ], %g1 <== NOT EXECUTED 400060f0: 13 10 00 91 sethi %hi(0x40024400), %o1 <== NOT EXECUTED 400060f4: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 400060f8: 40 00 43 f2 call 400170c0 <== NOT EXECUTED 400060fc: 92 12 60 08 or %o1, 8, %o1 <== NOT EXECUTED (void) fflush(stderr); 40006100: c2 04 60 98 ld [ %l1 + 0x98 ], %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"); 40006104: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED (void) fflush(stderr); 40006108: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 4000610c: 40 00 42 2c call 400169bc <== NOT EXECUTED 40006110: b0 04 00 18 add %l0, %i0, %i0 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 40006114: 03 0c 00 00 sethi %hi(0x30000000), %g1 <== NOT EXECUTED 40006118: 80 8c c0 01 btst %l3, %g1 <== NOT EXECUTED 4000611c: 02 80 00 0e be 40006154 <== NOT EXECUTED 40006120: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 40006124: 02 80 00 07 be 40006140 <== NOT EXECUTED 40006128: 90 10 20 00 clr %o0 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 4000612c: 13 10 00 8f sethi %hi(0x40023c00), %o1 <== NOT EXECUTED 40006130: 40 00 00 18 call 40006190 <== NOT EXECUTED 40006134: 92 12 61 98 or %o1, 0x198, %o1 ! 40023d98 <== NOT EXECUTED _exit(local_errno); 40006138: 40 00 02 43 call 40006a44 <_exit> <== NOT EXECUTED 4000613c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); 40006140: 13 10 00 8f sethi %hi(0x40023c00), %o1 <== NOT EXECUTED 40006144: 40 00 00 13 call 40006190 <== NOT EXECUTED 40006148: 92 12 61 b0 or %o1, 0x1b0, %o1 ! 40023db0 <== NOT EXECUTED abort(); 4000614c: 40 00 41 b1 call 40016810 <== NOT EXECUTED 40006150: 01 00 00 00 nop <== NOT EXECUTED } } return chars_written; } 40006154: 81 c7 e0 08 ret <== NOT EXECUTED 40006158: 81 e8 00 00 restore <== NOT EXECUTED 40016928 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 40016928: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED 4001692c: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 <== NOT EXECUTED 40016930: a2 10 20 00 clr %l1 <== NOT EXECUTED 40016934: a6 10 63 ff or %g1, 0x3ff, %l3 <== NOT EXECUTED 40016938: a4 10 20 00 clr %l2 <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 4001693c: 2b 10 00 e7 sethi %hi(0x40039c00), %l5 <== NOT EXECUTED limit++; continue; } sign = 1; } if (!isdigit(c)) 40016940: 29 10 00 e7 sethi %hi(0x40039c00), %l4 <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 40016944: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 40016948: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4001694c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40016950: 16 80 00 07 bge 4001696c <== NOT EXECUTED 40016954: c2 26 20 04 st %g1, [ %i0 + 4 ] <== NOT EXECUTED 40016958: d0 05 61 10 ld [ %l5 + 0x110 ], %o0 <== NOT EXECUTED 4001695c: 40 00 3d b0 call 4002601c <__srget_r> <== NOT EXECUTED 40016960: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40016964: 10 80 00 06 b 4001697c <== NOT EXECUTED 40016968: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 4001696c: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED 40016970: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 40016974: e0 08 40 00 ldub [ %g1 ], %l0 <== NOT EXECUTED 40016978: c4 26 00 00 st %g2, [ %i0 ] <== NOT EXECUTED if (c == ':') 4001697c: 80 a4 20 3a cmp %l0, 0x3a <== NOT EXECUTED 40016980: 02 80 00 20 be 40016a00 <== NOT EXECUTED 40016984: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED break; if (sign == 0) { 40016988: 12 80 00 08 bne 400169a8 <== NOT EXECUTED 4001698c: c2 05 21 08 ld [ %l4 + 0x108 ], %g1 <== NOT EXECUTED if (c == '-') { 40016990: 80 a4 20 2d cmp %l0, 0x2d <== NOT EXECUTED 40016994: 12 80 00 05 bne 400169a8 <== NOT EXECUTED 40016998: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED sign = -1; limit++; 4001699c: a6 04 e0 01 inc %l3 <== NOT EXECUTED 400169a0: 10 bf ff e9 b 40016944 <== NOT EXECUTED 400169a4: a4 10 3f ff mov -1, %l2 <== NOT EXECUTED continue; } sign = 1; } if (!isdigit(c)) 400169a8: c2 08 40 10 ldub [ %g1 + %l0 ], %g1 <== NOT EXECUTED 400169ac: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 400169b0: 02 80 00 1c be 40016a20 <== NOT EXECUTED 400169b4: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED return 0; d = c - '0'; if ((i > (limit / 10)) 400169b8: 40 00 6d 2a call 40031e60 <.udiv> <== NOT EXECUTED 400169bc: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 400169c0: 80 a4 40 08 cmp %l1, %o0 <== NOT EXECUTED 400169c4: 18 80 00 17 bgu 40016a20 <== NOT EXECUTED 400169c8: 01 00 00 00 nop <== NOT EXECUTED 400169cc: 12 80 00 08 bne 400169ec <== NOT EXECUTED 400169d0: a0 04 3f d0 add %l0, -48, %l0 <== NOT EXECUTED 400169d4: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 400169d8: 40 00 6d ce call 40032110 <.urem> <== NOT EXECUTED 400169dc: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 400169e0: 80 a4 00 08 cmp %l0, %o0 <== NOT EXECUTED 400169e4: 18 80 00 0f bgu 40016a20 <== NOT EXECUTED 400169e8: 01 00 00 00 nop <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 400169ec: 85 2c 60 03 sll %l1, 3, %g2 <== NOT EXECUTED 400169f0: 83 2c 60 01 sll %l1, 1, %g1 <== NOT EXECUTED 400169f4: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 400169f8: 10 bf ff d3 b 40016944 <== NOT EXECUTED 400169fc: a2 04 00 01 add %l0, %g1, %l1 <== NOT EXECUTED } if (sign == 0) 40016a00: 02 80 00 08 be 40016a20 <== NOT EXECUTED 40016a04: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED return 0; *val = i * sign; 40016a08: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40016a0c: 7f ff b1 7b call 40002ff8 <.umul> <== NOT EXECUTED 40016a10: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 40016a14: d0 26 40 00 st %o0, [ %i1 ] <== NOT EXECUTED 40016a18: 81 c7 e0 08 ret <== NOT EXECUTED 40016a1c: 81 e8 00 00 restore <== NOT EXECUTED return 1; } 40016a20: 81 c7 e0 08 ret <== NOT EXECUTED 40016a24: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40016a28 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 40016a28: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int c; *name = *bufp; 40016a2c: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 40016a30: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED for (;;) { c = getc(fp); 40016a34: 33 10 00 e7 sethi %hi(0x40039c00), %i1 <== NOT EXECUTED 40016a38: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 40016a3c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40016a40: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40016a44: 16 80 00 07 bge 40016a60 <== NOT EXECUTED 40016a48: c2 26 20 04 st %g1, [ %i0 + 4 ] <== NOT EXECUTED 40016a4c: d0 06 61 10 ld [ %i1 + 0x110 ], %o0 <== NOT EXECUTED 40016a50: 40 00 3d 73 call 4002601c <__srget_r> <== NOT EXECUTED 40016a54: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED if (c == ':') { 40016a58: 10 80 00 07 b 40016a74 <== NOT EXECUTED 40016a5c: 80 a2 20 3a cmp %o0, 0x3a <== NOT EXECUTED { int c; *name = *bufp; for (;;) { c = getc(fp); 40016a60: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED 40016a64: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 40016a68: d0 08 40 00 ldub [ %g1 ], %o0 <== NOT EXECUTED 40016a6c: c4 26 00 00 st %g2, [ %i0 ] <== NOT EXECUTED if (c == ':') { 40016a70: 80 a2 20 3a cmp %o0, 0x3a <== NOT EXECUTED 40016a74: 12 80 00 07 bne 40016a90 <== NOT EXECUTED 40016a78: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED if (nlFlag) 40016a7c: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 40016a80: 22 80 00 1a be,a 40016ae8 <== NOT EXECUTED 40016a84: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 40016a88: 81 c7 e0 08 ret <== NOT EXECUTED 40016a8c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (c == ':') { if (nlFlag) return 0; break; } if (c == '\n') { 40016a90: 12 80 00 07 bne 40016aac <== NOT EXECUTED 40016a94: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED if (!nlFlag) 40016a98: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 40016a9c: 32 80 00 13 bne,a 40016ae8 <== NOT EXECUTED 40016aa0: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 40016aa4: 81 c7 e0 08 ret <== NOT EXECUTED 40016aa8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (c == '\n') { if (!nlFlag) return 0; break; } if (c == EOF) 40016aac: 22 80 00 17 be,a 40016b08 <== NOT EXECUTED 40016ab0: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; if (*nleft < 2) 40016ab4: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED 40016ab8: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40016abc: 28 80 00 13 bleu,a 40016b08 <== NOT EXECUTED 40016ac0: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; **bufp = c; 40016ac4: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 40016ac8: d0 28 40 00 stb %o0, [ %g1 ] <== NOT EXECUTED ++(*bufp); 40016acc: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED --(*nleft); 40016ad0: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 40016ad4: 82 00 60 01 inc %g1 <== NOT EXECUTED --(*nleft); 40016ad8: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 40016adc: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED --(*nleft); 40016ae0: 10 bf ff d6 b 40016a38 <== NOT EXECUTED 40016ae4: c4 26 c0 00 st %g2, [ %i3 ] <== NOT EXECUTED } **bufp = '\0'; 40016ae8: c0 28 40 00 clrb [ %g1 ] <== NOT EXECUTED ++(*bufp); 40016aec: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED --(*nleft); 40016af0: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 40016af4: 82 00 60 01 inc %g1 <== NOT EXECUTED --(*nleft); 40016af8: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 40016afc: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED --(*nleft); 40016b00: c4 26 c0 00 st %g2, [ %i3 ] <== NOT EXECUTED 40016b04: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return 1; } 40016b08: 81 c7 e0 08 ret <== NOT EXECUTED 40016b0c: 81 e8 00 00 restore <== NOT EXECUTED 400051cc : scandir(dirname, namelist, select, dcomp) const char *dirname; struct dirent ***namelist; int (*select)(struct dirent *); int (*dcomp)(const struct dirent **, const struct dirent **); { 400051cc: 9d e3 bf 48 save %sp, -184, %sp struct stat stb; long arraysz; DIR *dirp = NULL; int i; if ((dirp = opendir(dirname)) == NULL) 400051d0: 7f ff fd c4 call 400048e0 400051d4: 90 10 00 18 mov %i0, %o0 400051d8: a8 92 20 00 orcc %o0, 0, %l4 400051dc: 02 80 00 69 be 40005380 400051e0: 92 10 3f ff mov -1, %o1 return(-1); if (fstat(dirp->dd_fd, &stb) < 0) 400051e4: d0 05 00 00 ld [ %l4 ], %o0 400051e8: a0 07 bf a8 add %fp, -88, %l0 400051ec: 40 00 21 c3 call 4000d8f8 400051f0: 92 10 00 10 mov %l0, %o1 400051f4: 80 a2 20 00 cmp %o0, 0 400051f8: 06 80 00 50 bl 40005338 400051fc: 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); 40005200: 40 00 3f d9 call 40015164 <.div> 40005204: 92 10 20 18 mov 0x18, %o1 names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *)); if (names == NULL) 40005208: 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); 4000520c: a6 10 00 08 mov %o0, %l3 names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *)); 40005210: 7f ff fb 19 call 40003e74 40005214: 91 2a 20 02 sll %o0, 2, %o0 if (names == NULL) 40005218: a2 92 20 00 orcc %o0, 0, %l1 4000521c: 02 80 00 49 be 40005340 40005220: aa 10 00 10 mov %l0, %l5 40005224: 30 80 00 31 b,a 400052e8 goto cleanup_and_bail; while ((d = readdir(dirp)) != NULL) { if (select != NULL && !(*select)(d)) 40005228: 22 80 00 08 be,a 40005248 4000522c: d0 14 20 0a lduh [ %l0 + 0xa ], %o0 <== NOT EXECUTED 40005230: 9f c6 80 00 call %i2 40005234: 01 00 00 00 nop 40005238: 80 a2 20 00 cmp %o0, 0 4000523c: 02 80 00 2b be 400052e8 40005240: 01 00 00 00 nop continue; /* just selected names */ /* * Make a minimum size copy of the data */ p = (struct dirent *)malloc(DIRSIZ(d)); 40005244: d0 14 20 0a lduh [ %l0 + 0xa ], %o0 40005248: 90 02 20 04 add %o0, 4, %o0 4000524c: 90 0a 3f fc and %o0, -4, %o0 40005250: 7f ff fb 09 call 40003e74 40005254: 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); 40005258: 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)); 4000525c: a4 10 00 08 mov %o0, %l2 if (p == NULL) 40005260: 80 a4 a0 00 cmp %l2, 0 40005264: 02 80 00 37 be 40005340 40005268: 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; 4000526c: 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; 40005270: c2 04 00 00 ld [ %l0 ], %g1 p->d_reclen = d->d_reclen; 40005274: 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); 40005278: 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; 4000527c: c2 24 80 00 st %g1, [ %l2 ] p->d_reclen = d->d_reclen; 40005280: c4 34 a0 08 sth %g2, [ %l2 + 8 ] p->d_namlen = d->d_namlen; 40005284: c6 34 a0 0a sth %g3, [ %l2 + 0xa ] strncpy(p->d_name, d->d_name, p->d_namlen + 1); 40005288: 95 32 a0 10 srl %o2, 0x10, %o2 4000528c: 40 00 36 17 call 40012ae8 40005290: 94 02 a0 01 inc %o2 /* * Check to make sure the array has space left and * realloc the maximum size. */ if (++nitems >= arraysz) { 40005294: b0 06 20 01 inc %i0 40005298: 80 a6 00 13 cmp %i0, %l3 4000529c: 0a 80 00 11 bcs 400052e0 400052a0: 83 2e 20 02 sll %i0, 2, %g1 if (fstat(dirp->dd_fd, &stb) < 0) 400052a4: d0 05 00 00 ld [ %l4 ], %o0 <== NOT EXECUTED 400052a8: 40 00 21 94 call 4000d8f8 <== NOT EXECUTED 400052ac: 92 10 00 15 mov %l5, %o1 <== NOT EXECUTED 400052b0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400052b4: 06 80 00 23 bl 40005340 <== NOT EXECUTED 400052b8: 92 10 20 0c mov 0xc, %o1 <== NOT EXECUTED goto cleanup_and_bail; /* just might have grown */ arraysz = stb.st_size / 12; 400052bc: 40 00 3f aa call 40015164 <.div> <== NOT EXECUTED 400052c0: d0 07 bf c8 ld [ %fp + -56 ], %o0 <== NOT EXECUTED 400052c4: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED names = (struct dirent **)realloc((char *)names, 400052c8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400052cc: 7f ff fb 35 call 40003fa0 <== NOT EXECUTED 400052d0: 93 2c e0 02 sll %l3, 2, %o1 <== NOT EXECUTED arraysz * sizeof(struct dirent *)); if (names == NULL) 400052d4: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 400052d8: 02 80 00 1a be 40005340 <== NOT EXECUTED 400052dc: 83 2e 20 02 sll %i0, 2, %g1 <== NOT EXECUTED goto cleanup_and_bail; } names[nitems-1] = p; 400052e0: 82 00 40 11 add %g1, %l1, %g1 400052e4: e4 20 7f fc st %l2, [ %g1 + -4 ] 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) { 400052e8: 7f ff ff 21 call 40004f6c 400052ec: 90 10 00 14 mov %l4, %o0 400052f0: a0 92 20 00 orcc %o0, 0, %l0 400052f4: 12 bf ff cd bne 40005228 400052f8: 80 a6 a0 00 cmp %i2, 0 if (names == NULL) goto cleanup_and_bail; } names[nitems-1] = p; } closedir(dirp); 400052fc: 7f ff f8 14 call 4000334c 40005300: 90 10 00 14 mov %l4, %o0 if (nitems && dcomp != NULL){ 40005304: 80 a6 20 00 cmp %i0, 0 40005308: 22 80 00 0a be,a 40005330 4000530c: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 40005310: 80 a6 e0 00 cmp %i3, 0 40005314: 02 80 00 06 be 4000532c 40005318: 96 10 00 1b mov %i3, %o3 qsort(names, nitems, sizeof(struct dirent *), dcomp); 4000531c: 90 10 00 11 mov %l1, %o0 40005320: 92 10 00 18 mov %i0, %o1 40005324: 40 00 32 c2 call 40011e2c 40005328: 94 10 20 04 mov 4, %o2 } *namelist = names; 4000532c: e2 26 40 00 st %l1, [ %i1 ] return(nitems); 40005330: 10 80 00 14 b 40005380 40005334: 92 10 00 18 mov %i0, %o1 40005338: a2 10 20 00 clr %l1 <== NOT EXECUTED 4000533c: b0 10 20 00 clr %i0 <== NOT EXECUTED cleanup_and_bail: if ( dirp ) closedir( dirp ); 40005340: 7f ff f8 03 call 4000334c 40005344: 90 10 00 14 mov %l4, %o0 if ( names ) { 40005348: 80 a4 60 00 cmp %l1, 0 4000534c: 12 80 00 07 bne 40005368 40005350: a0 10 20 00 clr %l0 for (i=0; i < nitems; i++ ) free( names[i] ); free( names ); 40005354: 10 80 00 0b b 40005380 40005358: 92 10 3f ff mov -1, %o1 if ( dirp ) closedir( dirp ); if ( names ) { for (i=0; i < nitems; i++ ) free( names[i] ); 4000535c: d0 00 40 11 ld [ %g1 + %l1 ], %o0 <== NOT EXECUTED 40005360: 7f ff fa 9d call 40003dd4 <== NOT EXECUTED 40005364: a0 04 20 01 inc %l0 <== NOT EXECUTED if ( dirp ) closedir( dirp ); if ( names ) { for (i=0; i < nitems; i++ ) 40005368: 80 a4 00 18 cmp %l0, %i0 <== NOT EXECUTED 4000536c: 12 bf ff fc bne 4000535c <== NOT EXECUTED 40005370: 83 2c 20 02 sll %l0, 2, %g1 <== NOT EXECUTED free( names[i] ); free( names ); 40005374: 7f ff fa 98 call 40003dd4 <== NOT EXECUTED 40005378: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000537c: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED } return(-1); } 40005380: 81 c7 e0 08 ret 40005384: 91 e8 00 09 restore %g0, %o1, %o0 40016b10 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 40016b10: 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) 40016b14: 98 10 20 00 clr %o4 <== NOT EXECUTED FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 40016b18: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 40016b1c: 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) 40016b20: b4 07 a0 50 add %fp, 0x50, %i2 <== NOT EXECUTED 40016b24: b6 07 a0 4c add %fp, 0x4c, %i3 <== NOT EXECUTED 40016b28: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40016b2c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40016b30: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40016b34: 7f ff ff bd call 40016a28 <== NOT EXECUTED 40016b38: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40016b3c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40016b40: 02 80 00 42 be 40016c48 <== NOT EXECUTED 40016b44: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40016b48: 92 06 60 04 add %i1, 4, %o1 <== NOT EXECUTED 40016b4c: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40016b50: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40016b54: 7f ff ff b5 call 40016a28 <== NOT EXECUTED 40016b58: 98 10 20 00 clr %o4 <== NOT EXECUTED 40016b5c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40016b60: 02 80 00 3a be 40016c48 <== NOT EXECUTED 40016b64: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40016b68: 7f ff ff 70 call 40016928 <== NOT EXECUTED 40016b6c: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED 40016b70: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40016b74: 02 80 00 35 be 40016c48 <== NOT EXECUTED 40016b78: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40016b7c: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40016b80: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40016b84: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED 40016b88: 7f ff ff a8 call 40016a28 <== NOT EXECUTED 40016b8c: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED 40016b90: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40016b94: 02 80 00 2d be 40016c48 <== NOT EXECUTED 40016b98: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40016b9c: c4 07 bf f0 ld [ %fp + -16 ], %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; 40016ba0: c2 36 60 08 sth %g1, [ %i1 + 8 ] <== NOT EXECUTED /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40016ba4: 10 80 00 05 b 40016bb8 <== NOT EXECUTED 40016ba8: 86 10 20 01 mov 1, %g3 <== NOT EXECUTED if(*cp == ',') memcount++; 40016bac: 82 18 60 2c xor %g1, 0x2c, %g1 <== NOT EXECUTED 40016bb0: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 40016bb4: 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++) { 40016bb8: c2 48 80 00 ldsb [ %g2 ], %g1 <== NOT EXECUTED 40016bbc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40016bc0: 12 bf ff fb bne 40016bac <== NOT EXECUTED 40016bc4: 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)) 40016bc8: c4 07 a0 50 ld [ %fp + 0x50 ], %g2 <== NOT EXECUTED 40016bcc: 83 28 e0 02 sll %g3, 2, %g1 <== NOT EXECUTED 40016bd0: 82 00 60 13 add %g1, 0x13, %g1 <== NOT EXECUTED 40016bd4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40016bd8: 0a 80 00 1c bcs 40016c48 <== NOT EXECUTED 40016bdc: 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; 40016be0: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== NOT EXECUTED /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 40016be4: 82 00 60 0f add %g1, 0xf, %g1 <== NOT EXECUTED 40016be8: 82 08 7f f0 and %g1, -16, %g1 <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 40016bec: c4 20 40 00 st %g2, [ %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); 40016bf0: c2 26 60 0c st %g1, [ %i1 + 0xc ] <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 40016bf4: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40016bf8: 88 10 20 01 mov 1, %g4 <== NOT EXECUTED 40016bfc: 10 80 00 0a b 40016c24 <== NOT EXECUTED 40016c00: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { 40016c04: 32 80 00 08 bne,a 40016c24 <== NOT EXECUTED 40016c08: 86 00 e0 01 inc %g3 <== NOT EXECUTED *cp = '\0'; 40016c0c: c0 28 ff ff clrb [ %g3 + -1 ] <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 40016c10: c4 06 60 0c ld [ %i1 + 0xc ], %g2 <== NOT EXECUTED 40016c14: 83 29 20 02 sll %g4, 2, %g1 <== NOT EXECUTED 40016c18: 88 01 20 01 inc %g4 <== NOT EXECUTED 40016c1c: c6 20 80 01 st %g3, [ %g2 + %g1 ] <== NOT EXECUTED 40016c20: 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++) { 40016c24: c2 48 ff ff ldsb [ %g3 + -1 ], %g1 <== NOT EXECUTED 40016c28: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40016c2c: 32 bf ff f6 bne,a 40016c04 <== NOT EXECUTED 40016c30: 80 a0 60 2c cmp %g1, 0x2c <== NOT EXECUTED if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 40016c34: c4 06 60 0c ld [ %i1 + 0xc ], %g2 <== NOT EXECUTED 40016c38: 83 29 20 02 sll %g4, 2, %g1 <== NOT EXECUTED 40016c3c: c0 20 80 01 clr [ %g2 + %g1 ] <== NOT EXECUTED 40016c40: 81 c7 e0 08 ret <== NOT EXECUTED 40016c44: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED return 1; } 40016c48: 81 c7 e0 08 ret <== NOT EXECUTED 40016c4c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40016c98 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 40016c98: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40016c9c: 98 10 20 00 clr %o4 <== NOT EXECUTED FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 40016ca0: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 40016ca4: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40016ca8: b4 07 a0 50 add %fp, 0x50, %i2 <== NOT EXECUTED 40016cac: b6 07 a0 4c add %fp, 0x4c, %i3 <== NOT EXECUTED 40016cb0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40016cb4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40016cb8: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40016cbc: 7f ff ff 5b call 40016a28 <== NOT EXECUTED 40016cc0: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40016cc4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40016cc8: 02 80 00 39 be 40016dac <== NOT EXECUTED 40016ccc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40016cd0: 92 06 60 04 add %i1, 4, %o1 <== NOT EXECUTED 40016cd4: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40016cd8: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40016cdc: 7f ff ff 53 call 40016a28 <== NOT EXECUTED 40016ce0: 98 10 20 00 clr %o4 <== NOT EXECUTED 40016ce4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40016ce8: 02 80 00 31 be 40016dac <== NOT EXECUTED 40016cec: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40016cf0: 7f ff ff 0e call 40016928 <== NOT EXECUTED 40016cf4: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED 40016cf8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40016cfc: 02 80 00 2c be 40016dac <== NOT EXECUTED 40016d00: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40016d04: 7f ff ff 09 call 40016928 <== NOT EXECUTED 40016d08: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED 40016d0c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40016d10: 02 80 00 27 be 40016dac <== NOT EXECUTED 40016d14: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40016d18: 92 06 60 0c add %i1, 0xc, %o1 <== NOT EXECUTED 40016d1c: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40016d20: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40016d24: 7f ff ff 41 call 40016a28 <== NOT EXECUTED 40016d28: 98 10 20 00 clr %o4 <== NOT EXECUTED 40016d2c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40016d30: 02 80 00 1f be 40016dac <== NOT EXECUTED 40016d34: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40016d38: 92 06 60 10 add %i1, 0x10, %o1 <== NOT EXECUTED 40016d3c: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40016d40: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40016d44: 7f ff ff 39 call 40016a28 <== NOT EXECUTED 40016d48: 98 10 20 00 clr %o4 <== NOT EXECUTED 40016d4c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40016d50: 02 80 00 17 be 40016dac <== NOT EXECUTED 40016d54: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40016d58: 92 06 60 14 add %i1, 0x14, %o1 <== NOT EXECUTED 40016d5c: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40016d60: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40016d64: 7f ff ff 31 call 40016a28 <== NOT EXECUTED 40016d68: 98 10 20 00 clr %o4 <== NOT EXECUTED 40016d6c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40016d70: 02 80 00 0f be 40016dac <== NOT EXECUTED 40016d74: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40016d78: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40016d7c: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40016d80: 92 06 60 18 add %i1, 0x18, %o1 <== NOT EXECUTED 40016d84: 7f ff ff 29 call 40016a28 <== NOT EXECUTED 40016d88: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED 40016d8c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40016d90: 02 80 00 07 be 40016dac <== NOT EXECUTED 40016d94: 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; 40016d98: c2 36 60 08 sth %g1, [ %i1 + 8 ] <== NOT EXECUTED pwd->pw_gid = pwgid; 40016d9c: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40016da0: c2 36 60 0a sth %g1, [ %i1 + 0xa ] <== NOT EXECUTED 40016da4: 81 c7 e0 08 ret <== NOT EXECUTED 40016da8: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED return 1; } 40016dac: 81 c7 e0 08 ret <== NOT EXECUTED 40016db0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 400068b0 : */ int sched_get_priority_max( int policy ) { 400068b0: 9d e3 bf 98 save %sp, -104, %sp switch ( policy ) { 400068b4: 80 a6 20 03 cmp %i0, 3 400068b8: 08 80 00 06 bleu 400068d0 400068bc: b0 10 20 fe mov 0xfe, %i0 case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 400068c0: 40 00 24 8e call 4000faf8 <__errno> <== NOT EXECUTED 400068c4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400068c8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400068cc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; } 400068d0: 81 c7 e0 08 ret 400068d4: 81 e8 00 00 restore 40006910 : int sched_getparam( pid_t pid, const struct sched_param *param ) { 40006910: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSYS ); 40006914: 40 00 24 79 call 4000faf8 <__errno> <== NOT EXECUTED 40006918: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000691c: 82 10 20 58 mov 0x58, %g1 <== NOT EXECUTED 40006920: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } 40006924: 81 c7 e0 08 ret <== NOT EXECUTED 40006928: 81 e8 00 00 restore <== NOT EXECUTED 400068d8 : */ int sched_getscheduler( pid_t pid ) { 400068d8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSYS ); 400068dc: 40 00 24 87 call 4000faf8 <__errno> <== NOT EXECUTED 400068e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400068e4: 82 10 20 58 mov 0x58, %g1 <== NOT EXECUTED 400068e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } 400068ec: 81 c7 e0 08 ret <== NOT EXECUTED 400068f0: 81 e8 00 00 restore <== NOT EXECUTED 40006948 : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { 40006948: 9d e3 bf 98 save %sp, -104, %sp /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 4000694c: 80 a6 20 00 cmp %i0, 0 40006950: 02 80 00 0b be 4000697c 40006954: 80 a6 60 00 cmp %i1, 0 40006958: 7f ff f1 7c call 40002f48 4000695c: 01 00 00 00 nop 40006960: 80 a6 00 08 cmp %i0, %o0 40006964: 02 80 00 06 be 4000697c 40006968: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); 4000696c: 40 00 24 63 call 4000faf8 <__errno> <== NOT EXECUTED 40006970: 01 00 00 00 nop <== NOT EXECUTED 40006974: 10 80 00 07 b 40006990 <== NOT EXECUTED 40006978: 82 10 20 03 mov 3, %g1 ! 3 <== NOT EXECUTED if ( !interval ) 4000697c: 12 80 00 08 bne 4000699c 40006980: 03 10 00 76 sethi %hi(0x4001d800), %g1 rtems_set_errno_and_return_minus_one( EINVAL ); 40006984: 40 00 24 5d call 4000faf8 <__errno> <== NOT EXECUTED 40006988: 01 00 00 00 nop <== NOT EXECUTED 4000698c: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 40006990: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40006994: 81 c7 e0 08 ret <== NOT EXECUTED 40006998: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 4000699c: d0 00 62 88 ld [ %g1 + 0x288 ], %o0 400069a0: 92 10 00 19 mov %i1, %o1 400069a4: 40 00 13 de call 4000b91c <_Timespec_From_ticks> 400069a8: b0 10 20 00 clr %i0 return 0; } 400069ac: 81 c7 e0 08 ret 400069b0: 81 e8 00 00 restore 4000692c : int sched_setparam( pid_t pid, const struct sched_param *param ) { 4000692c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSYS ); 40006930: 40 00 24 72 call 4000faf8 <__errno> <== NOT EXECUTED 40006934: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40006938: 82 10 20 58 mov 0x58, %g1 <== NOT EXECUTED 4000693c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } 40006940: 81 c7 e0 08 ret <== NOT EXECUTED 40006944: 81 e8 00 00 restore <== NOT EXECUTED 400068f4 : int sched_setscheduler( pid_t pid, int policy, const struct sched_param *param ) { 400068f4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSYS ); 400068f8: 40 00 24 80 call 4000faf8 <__errno> <== NOT EXECUTED 400068fc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40006900: 82 10 20 58 mov 0x58, %g1 <== NOT EXECUTED 40006904: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } 40006908: 81 c7 e0 08 ret <== NOT EXECUTED 4000690c: 81 e8 00 00 restore <== NOT EXECUTED 400067cc : */ int sem_close( sem_t *sem ) { 400067cc: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get ( sem_t *id, Objects_Locations *location ) { return (POSIX_Semaphore_Control *) 400067d0: d2 06 00 00 ld [ %i0 ], %o1 400067d4: 11 10 00 7d sethi %hi(0x4001f400), %o0 400067d8: 94 07 bf f4 add %fp, -12, %o2 400067dc: 40 00 0b b8 call 400096bc <_Objects_Get> 400067e0: 90 12 22 00 or %o0, 0x200, %o0 register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 400067e4: c2 07 bf f4 ld [ %fp + -12 ], %g1 400067e8: 80 a0 60 01 cmp %g1, 1 400067ec: 02 80 00 0d be 40006820 400067f0: 01 00 00 00 nop 400067f4: 2a 80 00 11 bcs,a 40006838 400067f8: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 400067fc: 80 a0 60 02 cmp %g1, 2 40006800: 12 80 00 1e bne 40006878 40006804: 01 00 00 00 nop case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); 40006808: 40 00 28 13 call 40010854 <__errno> 4000680c: 01 00 00 00 nop 40006810: 82 10 20 16 mov 0x16, %g1 ! 16 40006814: c2 22 00 00 st %g1, [ %o0 ] 40006818: 10 80 00 1a b 40006880 4000681c: 90 10 3f ff mov -1, %o0 case OBJECTS_REMOTE: _Thread_Dispatch(); 40006820: 40 00 10 5c call 4000a990 <_Thread_Dispatch> <== NOT EXECUTED 40006824: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 40006828: 40 00 01 78 call 40006e08 <== NOT EXECUTED 4000682c: 01 00 00 00 nop <== NOT EXECUTED _POSIX_Semaphore_Delete( the_semaphore ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40006830: 81 c7 e0 08 ret <== NOT EXECUTED 40006834: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: _Thread_Dispatch(); return POSIX_MP_NOT_IMPLEMENTED(); rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: the_semaphore->open_count -= 1; 40006838: 82 00 7f ff add %g1, -1, %g1 _POSIX_Semaphore_Delete( the_semaphore ); 4000683c: 40 00 1f b5 call 4000e710 <_POSIX_Semaphore_Delete> 40006840: c2 22 20 1c st %g1, [ %o0 + 0x1c ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006844: 05 10 00 7c sethi %hi(0x4001f000), %g2 40006848: c2 00 a2 80 ld [ %g2 + 0x280 ], %g1 ! 4001f280 <_Thread_Dispatch_disable_level> 4000684c: 90 10 20 00 clr %o0 40006850: 82 00 7f ff add %g1, -1, %g1 40006854: c2 20 a2 80 st %g1, [ %g2 + 0x280 ] 40006858: c2 00 a2 80 ld [ %g2 + 0x280 ], %g1 4000685c: 80 a0 60 00 cmp %g1, 0 40006860: 32 80 00 09 bne,a 40006884 40006864: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED _Thread_Dispatch(); 40006868: 40 00 10 4a call 4000a990 <_Thread_Dispatch> 4000686c: 01 00 00 00 nop 40006870: 10 80 00 04 b 40006880 40006874: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40006878: 40 00 01 5a call 40006de0 <== NOT EXECUTED 4000687c: 01 00 00 00 nop <== NOT EXECUTED } 40006880: b0 10 00 08 mov %o0, %i0 40006884: 81 c7 e0 08 ret 40006888: 81 e8 00 00 restore 400068c0 : */ int sem_destroy( sem_t *sem ) { 400068c0: 9d e3 bf 90 save %sp, -112, %sp 400068c4: d2 06 00 00 ld [ %i0 ], %o1 400068c8: 11 10 00 7d sethi %hi(0x4001f400), %o0 400068cc: 94 07 bf f4 add %fp, -12, %o2 400068d0: 40 00 0b 7b call 400096bc <_Objects_Get> 400068d4: 90 12 22 00 or %o0, 0x200, %o0 register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 400068d8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400068dc: 80 a0 60 01 cmp %g1, 1 400068e0: 02 80 00 08 be 40006900 400068e4: 01 00 00 00 nop 400068e8: 2a 80 00 0c bcs,a 40006918 400068ec: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 400068f0: 80 a0 60 02 cmp %g1, 2 400068f4: 12 80 00 1a bne 4000695c 400068f8: 01 00 00 00 nop 400068fc: 30 80 00 0c b,a 4000692c case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_REMOTE: _Thread_Dispatch(); 40006900: 40 00 10 24 call 4000a990 <_Thread_Dispatch> <== NOT EXECUTED 40006904: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 40006908: 40 00 01 40 call 40006e08 <== NOT EXECUTED 4000690c: 01 00 00 00 nop <== NOT EXECUTED _POSIX_Semaphore_Delete( the_semaphore ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40006910: 81 c7 e0 08 ret <== NOT EXECUTED 40006914: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { 40006918: 80 a0 60 01 cmp %g1, 1 4000691c: 12 80 00 0a bne 40006944 40006920: 01 00 00 00 nop _Thread_Enable_dispatch(); 40006924: 7f ff ff da call 4000688c <_Thread_Enable_dispatch> <== NOT EXECUTED 40006928: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 4000692c: 40 00 27 ca call 40010854 <__errno> 40006930: 01 00 00 00 nop 40006934: 82 10 20 16 mov 0x16, %g1 ! 16 40006938: c2 22 00 00 st %g1, [ %o0 ] 4000693c: 10 80 00 0a b 40006964 40006940: 90 10 3f ff mov -1, %o0 } _POSIX_Semaphore_Delete( the_semaphore ); 40006944: 40 00 1f 73 call 4000e710 <_POSIX_Semaphore_Delete> 40006948: 01 00 00 00 nop _Thread_Enable_dispatch(); 4000694c: 7f ff ff d0 call 4000688c <_Thread_Enable_dispatch> 40006950: 01 00 00 00 nop 40006954: 10 80 00 04 b 40006964 40006958: 90 10 20 00 clr %o0 ! 0 return 0; } return POSIX_BOTTOM_REACHED(); 4000695c: 40 00 01 21 call 40006de0 <== NOT EXECUTED 40006960: 01 00 00 00 nop <== NOT EXECUTED } 40006964: b0 10 00 08 mov %o0, %i0 40006968: 81 c7 e0 08 ret 4000696c: 81 e8 00 00 restore 40006970 : int sem_getvalue( sem_t *sem, int *sval ) { 40006970: 9d e3 bf 90 save %sp, -112, %sp 40006974: d2 06 00 00 ld [ %i0 ], %o1 40006978: 11 10 00 7d sethi %hi(0x4001f400), %o0 4000697c: 94 07 bf f4 add %fp, -12, %o2 40006980: 40 00 0b 4f call 400096bc <_Objects_Get> 40006984: 90 12 22 00 or %o0, 0x200, %o0 register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 40006988: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000698c: 80 a0 60 01 cmp %g1, 1 40006990: 02 80 00 0d be 400069c4 40006994: 01 00 00 00 nop 40006998: 2a 80 00 11 bcs,a 400069dc 4000699c: c2 02 20 68 ld [ %o0 + 0x68 ], %g1 400069a0: 80 a0 60 02 cmp %g1, 2 400069a4: 12 80 00 1c bne 40006a14 400069a8: 01 00 00 00 nop case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); 400069ac: 40 00 27 aa call 40010854 <__errno> 400069b0: 01 00 00 00 nop 400069b4: 82 10 20 16 mov 0x16, %g1 ! 16 400069b8: c2 22 00 00 st %g1, [ %o0 ] 400069bc: 10 80 00 18 b 40006a1c 400069c0: 90 10 3f ff mov -1, %o0 case OBJECTS_REMOTE: _Thread_Dispatch(); 400069c4: 40 00 0f f3 call 4000a990 <_Thread_Dispatch> <== NOT EXECUTED 400069c8: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 400069cc: 40 00 01 0f call 40006e08 <== NOT EXECUTED 400069d0: 01 00 00 00 nop <== NOT EXECUTED *sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 400069d4: 81 c7 e0 08 ret <== NOT EXECUTED 400069d8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: _Thread_Dispatch(); return POSIX_MP_NOT_IMPLEMENTED(); rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: *sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore ); 400069dc: c2 26 40 00 st %g1, [ %i1 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400069e0: 05 10 00 7c sethi %hi(0x4001f000), %g2 400069e4: c2 00 a2 80 ld [ %g2 + 0x280 ], %g1 ! 4001f280 <_Thread_Dispatch_disable_level> 400069e8: 90 10 20 00 clr %o0 400069ec: 82 00 7f ff add %g1, -1, %g1 400069f0: c2 20 a2 80 st %g1, [ %g2 + 0x280 ] 400069f4: c2 00 a2 80 ld [ %g2 + 0x280 ], %g1 400069f8: 80 a0 60 00 cmp %g1, 0 400069fc: 32 80 00 09 bne,a 40006a20 40006a00: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED _Thread_Dispatch(); 40006a04: 40 00 0f e3 call 4000a990 <_Thread_Dispatch> 40006a08: 01 00 00 00 nop 40006a0c: 10 80 00 04 b 40006a1c 40006a10: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40006a14: 40 00 00 f3 call 40006de0 <== NOT EXECUTED 40006a18: 01 00 00 00 nop <== NOT EXECUTED } 40006a1c: b0 10 00 08 mov %o0, %i0 40006a20: 81 c7 e0 08 ret 40006a24: 81 e8 00 00 restore 40006a28 : int sem_init( sem_t *sem, int pshared, unsigned int value ) { 40006a28: 9d e3 bf 90 save %sp, -112, %sp 40006a2c: 92 10 00 19 mov %i1, %o1 int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 40006a30: 80 a6 20 00 cmp %i0, 0 40006a34: 12 80 00 08 bne 40006a54 40006a38: 94 10 00 1a mov %i2, %o2 rtems_set_errno_and_return_minus_one( EINVAL ); 40006a3c: 40 00 27 86 call 40010854 <__errno> <== NOT EXECUTED 40006a40: 01 00 00 00 nop <== NOT EXECUTED 40006a44: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 40006a48: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40006a4c: 10 80 00 0a b 40006a74 <== NOT EXECUTED 40006a50: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED status = _POSIX_Semaphore_Create_support( 40006a54: 90 10 20 00 clr %o0 40006a58: 40 00 1e e2 call 4000e5e0 <_POSIX_Semaphore_Create_support> 40006a5c: 96 07 bf f4 add %fp, -12, %o3 pshared, value, &the_semaphore ); if ( status != -1 ) 40006a60: 80 a2 3f ff cmp %o0, -1 40006a64: 02 80 00 04 be 40006a74 40006a68: c2 07 bf f4 ld [ %fp + -12 ], %g1 *sem = the_semaphore->Object.id; 40006a6c: c2 00 60 08 ld [ %g1 + 8 ], %g1 40006a70: c2 26 00 00 st %g1, [ %i0 ] return status; } 40006a74: 81 c7 e0 08 ret 40006a78: 91 e8 00 08 restore %g0, %o0, %o0 40006bcc : */ int sem_post( sem_t *sem ) { 40006bcc: 9d e3 bf 90 save %sp, -112, %sp 40006bd0: d2 06 00 00 ld [ %i0 ], %o1 40006bd4: 11 10 00 7d sethi %hi(0x4001f400), %o0 40006bd8: 94 07 bf f4 add %fp, -12, %o2 40006bdc: 40 00 0a b8 call 400096bc <_Objects_Get> 40006be0: 90 12 22 00 or %o0, 0x200, %o0 register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 40006be4: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006be8: 80 a0 60 01 cmp %g1, 1 40006bec: 02 80 00 0d be 40006c20 40006bf0: 01 00 00 00 nop 40006bf4: 2a 80 00 11 bcs,a 40006c38 40006bf8: d2 02 20 08 ld [ %o0 + 8 ], %o1 40006bfc: 80 a0 60 02 cmp %g1, 2 40006c00: 12 80 00 1e bne 40006c78 40006c04: 01 00 00 00 nop case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); 40006c08: 40 00 27 13 call 40010854 <__errno> 40006c0c: 01 00 00 00 nop 40006c10: 82 10 20 16 mov 0x16, %g1 ! 16 40006c14: c2 22 00 00 st %g1, [ %o0 ] 40006c18: 10 80 00 1a b 40006c80 40006c1c: 90 10 3f ff mov -1, %o0 case OBJECTS_REMOTE: _Thread_Dispatch(); 40006c20: 40 00 0f 5c call 4000a990 <_Thread_Dispatch> <== NOT EXECUTED 40006c24: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 40006c28: 40 00 00 78 call 40006e08 <== NOT EXECUTED 40006c2c: 01 00 00 00 nop <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40006c30: 81 c7 e0 08 ret <== NOT EXECUTED 40006c34: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: _Thread_Dispatch(); return POSIX_MP_NOT_IMPLEMENTED(); rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: _CORE_semaphore_Surrender( 40006c38: 94 10 20 00 clr %o2 40006c3c: 40 00 07 a5 call 40008ad0 <_CORE_semaphore_Surrender> 40006c40: 90 02 20 20 add %o0, 0x20, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006c44: 03 10 00 7c sethi %hi(0x4001f000), %g1 40006c48: c4 00 62 80 ld [ %g1 + 0x280 ], %g2 ! 4001f280 <_Thread_Dispatch_disable_level> 40006c4c: 90 10 20 00 clr %o0 40006c50: 84 00 bf ff add %g2, -1, %g2 40006c54: c4 20 62 80 st %g2, [ %g1 + 0x280 ] 40006c58: c2 00 62 80 ld [ %g1 + 0x280 ], %g1 40006c5c: 80 a0 60 00 cmp %g1, 0 40006c60: 32 80 00 09 bne,a 40006c84 40006c64: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED _Thread_Dispatch(); 40006c68: 40 00 0f 4a call 4000a990 <_Thread_Dispatch> 40006c6c: 01 00 00 00 nop 40006c70: 10 80 00 04 b 40006c80 40006c74: 90 10 20 00 clr %o0 ! 0 #endif ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40006c78: 40 00 00 5a call 40006de0 <== NOT EXECUTED 40006c7c: 01 00 00 00 nop <== NOT EXECUTED } 40006c80: b0 10 00 08 mov %o0, %i0 40006c84: 81 c7 e0 08 ret 40006c88: 81 e8 00 00 restore 400168c4 : int setgid( gid_t gid ) { _POSIX_types_Gid = gid; 400168c4: 03 10 00 e3 sethi %hi(0x40038c00), %g1 <== NOT EXECUTED 400168c8: c2 00 60 60 ld [ %g1 + 0x60 ], %g1 ! 40038c60 <== NOT EXECUTED 400168cc: d0 30 60 2a sth %o0, [ %g1 + 0x2a ] <== NOT EXECUTED return 0; } 400168d0: 81 c3 e0 08 retl <== NOT EXECUTED 400168d4: 90 10 20 00 clr %o0 <== NOT EXECUTED 40016ed8 : return NULL; return &grent; } void setgrent(void) { 40016ed8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED init_etc_passwd_group(); 40016edc: 7f ff ff c8 call 40016dfc <== NOT EXECUTED 40016ee0: 21 10 00 e9 sethi %hi(0x4003a400), %l0 <== NOT EXECUTED if (group_fp != NULL) 40016ee4: d0 04 21 d4 ld [ %l0 + 0x1d4 ], %o0 ! 4003a5d4 <== NOT EXECUTED 40016ee8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40016eec: 22 80 00 05 be,a 40016f00 <== NOT EXECUTED 40016ef0: 11 10 00 d6 sethi %hi(0x40035800), %o0 <== NOT EXECUTED fclose(group_fp); 40016ef4: 40 00 2f 54 call 40022c44 <== NOT EXECUTED 40016ef8: 01 00 00 00 nop <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 40016efc: 11 10 00 d6 sethi %hi(0x40035800), %o0 <== NOT EXECUTED 40016f00: 13 10 00 df sethi %hi(0x40037c00), %o1 <== NOT EXECUTED 40016f04: 90 12 23 30 or %o0, 0x330, %o0 <== NOT EXECUTED 40016f08: 40 00 31 4d call 4002343c <== NOT EXECUTED 40016f0c: 92 12 62 d8 or %o1, 0x2d8, %o1 <== NOT EXECUTED 40016f10: d0 24 21 d4 st %o0, [ %l0 + 0x1d4 ] <== NOT EXECUTED } 40016f14: 81 c7 e0 08 ret <== NOT EXECUTED 40016f18: 81 e8 00 00 restore <== NOT EXECUTED 400170c8 : return NULL; return &pwent; } void setpwent(void) { 400170c8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED init_etc_passwd_group(); 400170cc: 7f ff ff 4c call 40016dfc <== NOT EXECUTED 400170d0: 21 10 00 e9 sethi %hi(0x4003a400), %l0 <== NOT EXECUTED if (passwd_fp != NULL) 400170d4: d0 04 20 ec ld [ %l0 + 0xec ], %o0 ! 4003a4ec <== NOT EXECUTED 400170d8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400170dc: 22 80 00 05 be,a 400170f0 <== NOT EXECUTED 400170e0: 11 10 00 d6 sethi %hi(0x40035800), %o0 <== NOT EXECUTED fclose(passwd_fp); 400170e4: 40 00 2e d8 call 40022c44 <== NOT EXECUTED 400170e8: 01 00 00 00 nop <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 400170ec: 11 10 00 d6 sethi %hi(0x40035800), %o0 <== NOT EXECUTED 400170f0: 13 10 00 df sethi %hi(0x40037c00), %o1 <== NOT EXECUTED 400170f4: 90 12 22 b8 or %o0, 0x2b8, %o0 <== NOT EXECUTED 400170f8: 40 00 30 d1 call 4002343c <== NOT EXECUTED 400170fc: 92 12 62 d8 or %o1, 0x2d8, %o1 <== NOT EXECUTED 40017100: d0 24 20 ec st %o0, [ %l0 + 0xec ] <== NOT EXECUTED } 40017104: 81 c7 e0 08 ret <== NOT EXECUTED 40017108: 81 e8 00 00 restore <== NOT EXECUTED 400172c8 : int setuid( uid_t uid ) { _POSIX_types_Uid = uid; 400172c8: 03 10 00 e3 sethi %hi(0x40038c00), %g1 <== NOT EXECUTED 400172cc: c2 00 60 60 ld [ %g1 + 0x60 ], %g1 ! 40038c60 <== NOT EXECUTED 400172d0: d0 30 60 28 sth %o0, [ %g1 + 0x28 ] <== NOT EXECUTED return 0; } 400172d4: 81 c3 e0 08 retl <== NOT EXECUTED 400172d8: 90 10 20 00 clr %o0 <== NOT EXECUTED 40005e78 : int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 40005e78: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; if ( oact ) 40005e7c: 90 96 a0 00 orcc %i2, 0, %o0 40005e80: 02 80 00 09 be 40005ea4 40005e84: 85 2e 20 02 sll %i0, 2, %g2 *oact = _POSIX_signals_Vectors[ sig ]; 40005e88: 83 2e 20 04 sll %i0, 4, %g1 <== NOT EXECUTED 40005e8c: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 40005e90: 13 10 00 75 sethi %hi(0x4001d400), %o1 <== NOT EXECUTED 40005e94: 94 10 20 0c mov 0xc, %o2 <== NOT EXECUTED 40005e98: 92 12 60 14 or %o1, 0x14, %o1 <== NOT EXECUTED 40005e9c: 40 00 27 1d call 4000fb10 <== NOT EXECUTED 40005ea0: 92 00 40 09 add %g1, %o1, %o1 <== NOT EXECUTED if ( !sig ) 40005ea4: 80 a6 20 00 cmp %i0, 0 40005ea8: 02 80 00 08 be 40005ec8 40005eac: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 40005eb0: a0 06 3f ff add %i0, -1, %l0 40005eb4: 80 a4 20 1f cmp %l0, 0x1f 40005eb8: 18 80 00 04 bgu 40005ec8 40005ebc: 80 a6 20 09 cmp %i0, 9 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 40005ec0: 12 80 00 08 bne 40005ee0 40005ec4: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( EINVAL ); 40005ec8: 40 00 25 2c call 4000f378 <__errno> 40005ecc: 01 00 00 00 nop 40005ed0: 82 10 20 16 mov 0x16, %g1 ! 16 40005ed4: c2 22 00 00 st %g1, [ %o0 ] 40005ed8: 10 80 00 1f b 40005f54 40005edc: 82 10 3f ff mov -1, %g1 /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 40005ee0: 02 80 00 1d be 40005f54 40005ee4: 82 10 20 00 clr %g1 /* * Unless the user is installing the default signal actions, then * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); 40005ee8: 7f ff f1 11 call 4000232c 40005eec: 01 00 00 00 nop 40005ef0: a4 10 00 08 mov %o0, %l2 if ( act->sa_handler == SIG_DFL ) { 40005ef4: c2 06 60 08 ld [ %i1 + 8 ], %g1 40005ef8: b5 2e 20 04 sll %i0, 4, %i2 40005efc: 80 a0 60 00 cmp %g1, 0 40005f00: b1 2e 20 02 sll %i0, 2, %i0 40005f04: 03 10 00 75 sethi %hi(0x4001d400), %g1 40005f08: 12 80 00 08 bne 40005f28 40005f0c: a2 10 60 14 or %g1, 0x14, %l1 ! 4001d414 <_POSIX_signals_Vectors> _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; 40005f10: 82 26 80 18 sub %i2, %i0, %g1 <== NOT EXECUTED 40005f14: 13 10 00 70 sethi %hi(0x4001c000), %o1 <== NOT EXECUTED 40005f18: 90 00 40 11 add %g1, %l1, %o0 <== NOT EXECUTED 40005f1c: 92 12 62 0c or %o1, 0x20c, %o1 <== NOT EXECUTED 40005f20: 10 80 00 08 b 40005f40 <== NOT EXECUTED 40005f24: 92 00 40 09 add %g1, %o1, %o1 <== NOT EXECUTED } else { _POSIX_signals_Clear_process_signals( signo_to_mask(sig) ); 40005f28: 90 10 20 01 mov 1, %o0 40005f2c: 40 00 1d 11 call 4000d370 <_POSIX_signals_Clear_process_signals> 40005f30: 91 2a 00 10 sll %o0, %l0, %o0 _POSIX_signals_Vectors[ sig ] = *act; 40005f34: 90 26 80 18 sub %i2, %i0, %o0 40005f38: 92 10 00 19 mov %i1, %o1 40005f3c: 90 02 00 11 add %o0, %l1, %o0 40005f40: 40 00 26 f4 call 4000fb10 40005f44: 94 10 20 0c mov 0xc, %o2 } _ISR_Enable( level ); 40005f48: 7f ff f0 fd call 4000233c 40005f4c: 90 10 00 12 mov %l2, %o0 40005f50: 82 10 20 00 clr %g1 * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } 40005f54: 81 c7 e0 08 ret 40005f58: 91 e8 00 01 restore %g0, %g1, %o0 400062d4 : int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { 400062d4: 9d e3 bf 88 save %sp, -120, %sp * NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; if ( timeout ) { 400062d8: 80 a6 a0 00 cmp %i2, 0 400062dc: 02 80 00 12 be 40006324 400062e0: a6 10 20 00 clr %l3 if ( !_Timespec_Is_valid( timeout ) ) 400062e4: 40 00 13 ce call 4000b21c <_Timespec_Is_valid> 400062e8: 90 10 00 1a mov %i2, %o0 400062ec: 80 a2 20 00 cmp %o0, 0 400062f0: 02 80 00 07 be 4000630c 400062f4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); 400062f8: 40 00 13 ee call 4000b2b0 <_Timespec_To_ticks> 400062fc: 90 10 00 1a mov %i2, %o0 if ( !interval ) 40006300: a6 92 20 00 orcc %o0, 0, %l3 40006304: 12 80 00 09 bne 40006328 40006308: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( EINVAL ); 4000630c: 40 00 25 d4 call 4000fa5c <__errno> 40006310: b0 10 3f ff mov -1, %i0 40006314: 82 10 20 16 mov 0x16, %g1 40006318: c2 22 00 00 st %g1, [ %o0 ] 4000631c: 81 c7 e0 08 ret 40006320: 81 e8 00 00 restore /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 40006324: 80 a6 60 00 cmp %i1, 0 40006328: 02 80 00 03 be 40006334 4000632c: a4 07 bf ec add %fp, -20, %l2 40006330: a4 10 00 19 mov %i1, %l2 the_thread = _Thread_Executing; 40006334: 29 10 00 75 sethi %hi(0x4001d400), %l4 40006338: f4 05 22 bc ld [ %l4 + 0x2bc ], %i2 ! 4001d6bc <_Thread_Executing> * What if they are already pending? */ /* API signals pending? */ _ISR_Disable( level ); 4000633c: 7f ff f0 bd call 40002630 40006340: f2 06 a1 70 ld [ %i2 + 0x170 ], %i1 40006344: a0 10 00 08 mov %o0, %l0 if ( *set & api->signals_pending ) { 40006348: c4 06 00 00 ld [ %i0 ], %g2 4000634c: c2 06 60 c8 ld [ %i1 + 0xc8 ], %g1 40006350: 80 88 80 01 btst %g2, %g1 40006354: 22 80 00 10 be,a 40006394 40006358: 03 10 00 77 sethi %hi(0x4001dc00), %g1 /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending ); 4000635c: 7f ff ff c4 call 4000626c <_POSIX_signals_Get_highest> 40006360: 90 10 00 01 mov %g1, %o0 _POSIX_signals_Clear_signals( 40006364: 94 10 00 12 mov %l2, %o2 /* API signals pending? */ _ISR_Disable( level ); if ( *set & api->signals_pending ) { /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending ); 40006368: 92 10 00 08 mov %o0, %o1 _POSIX_signals_Clear_signals( 4000636c: 96 10 20 00 clr %o3 40006370: 90 10 00 19 mov %i1, %o0 /* API signals pending? */ _ISR_Disable( level ); if ( *set & api->signals_pending ) { /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending ); 40006374: d2 24 80 00 st %o1, [ %l2 ] _POSIX_signals_Clear_signals( 40006378: 40 00 1d e3 call 4000db04 <_POSIX_signals_Clear_signals> 4000637c: 98 10 20 00 clr %o4 the_info->si_signo, the_info, FALSE, FALSE ); _ISR_Enable( level ); 40006380: 7f ff f0 b0 call 40002640 40006384: 90 10 00 10 mov %l0, %o0 the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; return the_info->si_signo; 40006388: f0 04 80 00 ld [ %l2 ], %i0 FALSE ); _ISR_Enable( level ); the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; 4000638c: 10 80 00 13 b 400063d8 40006390: c0 24 a0 08 clr [ %l2 + 8 ] return the_info->si_signo; } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { 40006394: c2 00 62 40 ld [ %g1 + 0x240 ], %g1 40006398: 80 88 80 01 btst %g2, %g1 4000639c: 02 80 00 13 be 400063e8 400063a0: 23 10 00 75 sethi %hi(0x4001d400), %l1 signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); 400063a4: 7f ff ff b2 call 4000626c <_POSIX_signals_Get_highest> 400063a8: 90 10 00 01 mov %g1, %o0 _POSIX_signals_Clear_signals( api, signo, the_info, TRUE, FALSE ); 400063ac: 94 10 00 12 mov %l2, %o2 } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); 400063b0: b0 10 00 08 mov %o0, %i0 _POSIX_signals_Clear_signals( api, signo, the_info, TRUE, FALSE ); 400063b4: 96 10 20 01 mov 1, %o3 400063b8: 90 10 00 19 mov %i1, %o0 400063bc: 92 10 00 18 mov %i0, %o1 400063c0: 40 00 1d d1 call 4000db04 <_POSIX_signals_Clear_signals> 400063c4: 98 10 20 00 clr %o4 _ISR_Enable( level ); 400063c8: 7f ff f0 9e call 40002640 400063cc: 90 10 00 10 mov %l0, %o0 the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; 400063d0: c0 24 a0 08 clr [ %l2 + 8 ] if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); _POSIX_signals_Clear_signals( api, signo, the_info, TRUE, FALSE ); _ISR_Enable( level ); the_info->si_signo = signo; 400063d4: f0 24 80 00 st %i0, [ %l2 ] the_info->si_code = SI_USER; 400063d8: 82 10 20 01 mov 1, %g1 400063dc: c2 24 a0 04 st %g1, [ %l2 + 4 ] 400063e0: 81 c7 e0 08 ret 400063e4: 81 e8 00 00 restore rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400063e8: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 the_info->si_value.sival_int = 0; return signo; } the_info->si_signo = -1; 400063ec: 84 10 3f ff mov -1, %g2 400063f0: 82 00 60 01 inc %g1 400063f4: c4 24 80 00 st %g2, [ %l2 ] 400063f8: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; the_thread->Wait.return_code = EINTR; 400063fc: 82 10 20 04 mov 4, %g1 40006400: c2 26 a0 34 st %g1, [ %i2 + 0x34 ] the_thread->Wait.option = *set; 40006404: c2 06 00 00 ld [ %i0 ], %g1 the_thread->Wait.return_argument = the_info; 40006408: e4 26 a0 28 st %l2, [ %i2 + 0x28 ] the_info->si_signo = -1; _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; the_thread->Wait.return_code = EINTR; the_thread->Wait.option = *set; 4000640c: c2 26 a0 30 st %g1, [ %i2 + 0x30 ] } the_info->si_signo = -1; _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; 40006410: 21 10 00 77 sethi %hi(0x4001dc00), %l0 RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; 40006414: 82 10 20 01 mov 1, %g1 40006418: a0 14 22 00 or %l0, 0x200, %l0 4000641c: e0 26 a0 44 st %l0, [ %i2 + 0x44 ] 40006420: c2 24 20 30 st %g1, [ %l0 + 0x30 ] the_thread->Wait.return_code = EINTR; the_thread->Wait.option = *set; the_thread->Wait.return_argument = the_info; _Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue ); _ISR_Enable( level ); 40006424: 7f ff f0 87 call 40002640 40006428: 01 00 00 00 nop _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); 4000642c: 90 10 00 10 mov %l0, %o0 40006430: 92 10 00 13 mov %l3, %o1 40006434: 15 10 00 2a sethi %hi(0x4000a800), %o2 40006438: 40 00 10 be call 4000a730 <_Thread_queue_Enqueue_with_handler> 4000643c: 94 12 a3 c8 or %o2, 0x3c8, %o2 ! 4000abc8 <_Thread_queue_Timeout> #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006440: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 40006444: 82 00 7f ff add %g1, -1, %g1 40006448: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] 4000644c: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 40006450: 80 a0 60 00 cmp %g1, 0 40006454: 32 80 00 05 bne,a 40006468 40006458: d2 04 80 00 ld [ %l2 ], %o1 <== NOT EXECUTED _Thread_Dispatch(); 4000645c: 40 00 0f 4d call 4000a190 <_Thread_Dispatch> 40006460: 01 00 00 00 nop /* * When the thread is set free by a signal, it is need to eliminate * the signal. */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, FALSE, FALSE ); 40006464: d2 04 80 00 ld [ %l2 ], %o1 40006468: 94 10 00 12 mov %l2, %o2 4000646c: 96 10 20 00 clr %o3 40006470: 98 10 20 00 clr %o4 40006474: 40 00 1d a4 call 4000db04 <_POSIX_signals_Clear_signals> 40006478: 90 10 00 19 mov %i1, %o0 errno = _Thread_Executing->Wait.return_code; 4000647c: 40 00 25 78 call 4000fa5c <__errno> 40006480: 01 00 00 00 nop 40006484: c2 05 22 bc ld [ %l4 + 0x2bc ], %g1 40006488: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 4000648c: c2 22 00 00 st %g1, [ %o0 ] return the_info->si_signo; 40006490: f0 04 80 00 ld [ %l2 ], %i0 } 40006494: 81 c7 e0 08 ret 40006498: 81 e8 00 00 restore 40008088 : int sigwait( const sigset_t *set, int *sig ) { 40008088: 9d e3 bf 98 save %sp, -104, %sp int status; status = sigtimedwait( set, NULL, NULL ); 4000808c: 92 10 20 00 clr %o1 40008090: 90 10 00 18 mov %i0, %o0 40008094: 7f ff ff 86 call 40007eac 40008098: 94 10 20 00 clr %o2 if ( status != -1 ) { 4000809c: 80 a2 3f ff cmp %o0, -1 400080a0: 02 80 00 07 be 400080bc 400080a4: 80 a6 60 00 cmp %i1, 0 if ( sig ) 400080a8: 02 80 00 03 be 400080b4 400080ac: b0 10 20 00 clr %i0 *sig = status; 400080b0: d0 26 40 00 st %o0, [ %i1 ] 400080b4: 81 c7 e0 08 ret 400080b8: 81 e8 00 00 restore return 0; } return errno; 400080bc: 40 00 25 af call 40011778 <__errno> <== NOT EXECUTED 400080c0: 01 00 00 00 nop <== NOT EXECUTED 400080c4: f0 02 00 00 ld [ %o0 ], %i0 <== NOT EXECUTED } 400080c8: 81 c7 e0 08 ret <== NOT EXECUTED 400080cc: 81 e8 00 00 restore <== NOT EXECUTED 40003d20 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 40003d20: 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)) { 40003d24: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 40003d28: 80 88 6e 78 btst 0xe78, %g1 <== NOT EXECUTED 40003d2c: 12 80 00 04 bne 40003d3c <== NOT EXECUTED 40003d30: b0 0e 20 ff and %i0, 0xff, %i0 <== 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); 40003d34: 7f ff ff 89 call 40003b58 <== NOT EXECUTED 40003d38: 81 e8 00 00 restore <== NOT EXECUTED /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40003d3c: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== NOT EXECUTED 40003d40: 94 10 20 00 clr %o2 <== NOT EXECUTED 40003d44: 40 00 06 f7 call 40005920 <== NOT EXECUTED 40003d48: 92 10 20 00 clr %o1 <== NOT EXECUTED i = iproc (c, tty); 40003d4c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40003d50: 7f ff ff 82 call 40003b58 <== NOT EXECUTED 40003d54: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40003d58: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 40003d5c: 40 00 07 b8 call 40005c3c <== NOT EXECUTED 40003d60: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 40003d64: 81 c7 e0 08 ret <== NOT EXECUTED 40003d68: 81 e8 00 00 restore <== NOT EXECUTED 400063c8 : int _STAT_NAME( const char *path, struct stat *buf ) { 400063c8: 9d e3 bf 88 save %sp, -120, %sp /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 400063cc: 80 a6 60 00 cmp %i1, 0 400063d0: 12 80 00 06 bne 400063e8 400063d4: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( EFAULT ); 400063d8: 40 00 71 c5 call 40022aec <__errno> 400063dc: b0 10 3f ff mov -1, %i0 400063e0: 10 80 00 1c b 40006450 400063e4: 82 10 20 0e mov 0xe, %g1 status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); 400063e8: a0 07 bf e8 add %fp, -24, %l0 400063ec: 92 10 20 00 clr %o1 400063f0: 94 10 00 10 mov %l0, %o2 400063f4: 96 10 20 01 mov 1, %o3 400063f8: 7f ff fa 21 call 40004c7c 400063fc: b0 10 3f ff mov -1, %i0 if ( status != 0 ) 40006400: 80 a2 20 00 cmp %o0, 0 40006404: 12 80 00 14 bne 40006454 40006408: c2 07 bf ec ld [ %fp + -20 ], %g1 return -1; if ( !loc.handlers->fstat_h ){ 4000640c: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 40006410: 80 a0 60 00 cmp %g1, 0 40006414: 12 80 00 12 bne 4000645c 40006418: 92 10 20 00 clr %o1 rtems_filesystem_freenode( &loc ); 4000641c: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40006420: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006424: 02 80 00 08 be 40006444 <== NOT EXECUTED 40006428: 01 00 00 00 nop <== NOT EXECUTED 4000642c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40006430: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006434: 02 80 00 04 be 40006444 <== NOT EXECUTED 40006438: 01 00 00 00 nop <== NOT EXECUTED 4000643c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40006440: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40006444: 40 00 71 aa call 40022aec <__errno> <== NOT EXECUTED 40006448: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000644c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40006450: c2 22 00 00 st %g1, [ %o0 ] 40006454: 81 c7 e0 08 ret 40006458: 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) ); 4000645c: 94 10 20 50 mov 0x50, %o2 40006460: 40 00 78 c7 call 4002477c 40006464: 90 10 00 19 mov %i1, %o0 status = (*loc.handlers->fstat_h)( &loc, buf ); 40006468: c2 07 bf ec ld [ %fp + -20 ], %g1 4000646c: 92 10 00 19 mov %i1, %o1 40006470: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 40006474: 9f c0 40 00 call %g1 40006478: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 4000647c: c2 07 bf f0 ld [ %fp + -16 ], %g1 40006480: 80 a0 60 00 cmp %g1, 0 40006484: 02 bf ff f4 be 40006454 40006488: b0 10 00 08 mov %o0, %i0 4000648c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40006490: 80 a0 60 00 cmp %g1, 0 40006494: 02 80 00 04 be 400064a4 40006498: 01 00 00 00 nop 4000649c: 9f c0 40 00 call %g1 400064a0: 90 10 00 10 mov %l0, %o0 return status; } 400064a4: 81 c7 e0 08 ret 400064a8: 81 e8 00 00 restore 40004d54 : int symlink( const char *actualpath, const char *sympath ) { 40004d54: 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 ); 40004d58: c2 4e 40 00 ldsb [ %i1 ], %g1 40004d5c: 80 a0 60 2f cmp %g1, 0x2f 40004d60: 02 80 00 07 be 40004d7c 40004d64: a0 10 00 18 mov %i0, %l0 40004d68: 80 a0 60 5c cmp %g1, 0x5c 40004d6c: 02 80 00 04 be 40004d7c 40004d70: 80 a0 60 00 cmp %g1, 0 40004d74: 32 80 00 0a bne,a 40004d9c 40004d78: 03 10 00 63 sethi %hi(0x40018c00), %g1 40004d7c: 03 10 00 63 sethi %hi(0x40018c00), %g1 40004d80: d2 00 61 f0 ld [ %g1 + 0x1f0 ], %o1 ! 40018df0 40004d84: 90 07 bf e4 add %fp, -28, %o0 40004d88: 92 02 60 14 add %o1, 0x14, %o1 40004d8c: 40 00 30 f0 call 4001114c 40004d90: 94 10 20 10 mov 0x10, %o2 40004d94: 10 80 00 08 b 40004db4 40004d98: 82 10 20 01 mov 1, %g1 40004d9c: d2 00 61 f0 ld [ %g1 + 0x1f0 ], %o1 40004da0: 90 07 bf e4 add %fp, -28, %o0 40004da4: 92 02 60 04 add %o1, 4, %o1 40004da8: 40 00 30 e9 call 4001114c 40004dac: 94 10 20 10 mov 0x10, %o2 40004db0: 82 10 20 00 clr %g1 result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 40004db4: 90 06 40 01 add %i1, %g1, %o0 40004db8: c2 07 bf ec ld [ %fp + -20 ], %g1 40004dbc: b2 07 bf e4 add %fp, -28, %i1 40004dc0: c2 00 60 04 ld [ %g1 + 4 ], %g1 40004dc4: 94 07 bf f4 add %fp, -12, %o2 40004dc8: 92 10 00 19 mov %i1, %o1 40004dcc: 9f c0 40 00 call %g1 40004dd0: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 40004dd4: 80 a2 20 00 cmp %o0, 0 40004dd8: 12 80 00 10 bne 40004e18 40004ddc: c2 07 bf ec ld [ %fp + -20 ], %g1 return -1; if ( !loc.ops->symlink_h ) { 40004de0: c4 00 60 38 ld [ %g1 + 0x38 ], %g2 40004de4: 80 a0 a0 00 cmp %g2, 0 40004de8: 12 80 00 0e bne 40004e20 40004dec: d4 07 bf f4 ld [ %fp + -12 ], %o2 rtems_filesystem_freenode( &loc ); 40004df0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40004df4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004df8: 02 80 00 04 be 40004e08 <== NOT EXECUTED 40004dfc: 01 00 00 00 nop <== NOT EXECUTED 40004e00: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004e04: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40004e08: 40 00 2e f0 call 400109c8 <__errno> <== NOT EXECUTED 40004e0c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004e10: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40004e14: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004e18: 81 c7 e0 08 ret 40004e1c: 81 e8 00 00 restore } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 40004e20: 92 10 00 10 mov %l0, %o1 40004e24: 9f c0 80 00 call %g2 40004e28: 90 10 00 19 mov %i1, %o0 rtems_filesystem_freenode( &loc ); 40004e2c: c2 07 bf ec ld [ %fp + -20 ], %g1 40004e30: 80 a0 60 00 cmp %g1, 0 40004e34: 02 bf ff f9 be 40004e18 40004e38: b0 10 00 08 mov %o0, %i0 40004e3c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40004e40: 80 a0 60 00 cmp %g1, 0 40004e44: 02 80 00 04 be 40004e54 40004e48: 01 00 00 00 nop 40004e4c: 9f c0 40 00 call %g1 40004e50: 90 10 00 19 mov %i1, %o0 return result; } 40004e54: 81 c7 e0 08 ret 40004e58: 81 e8 00 00 restore 400122a4 : int tcgetattr( int fd, struct termios *tp ) { 400122a4: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED return ioctl( fd, RTEMS_IO_GET_ATTRIBUTES, tp ); 400122a8: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 400122ac: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400122b0: 40 00 0e f4 call 40015e80 <== NOT EXECUTED 400122b4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400122b8: 01 00 00 00 nop 400122bc : int tcsetattr( int fd, int opt, struct termios *tp ) { 400122bc: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED switch (opt) { 400122c0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 400122c4: 02 80 00 10 be 40012304 <== NOT EXECUTED 400122c8: 80 a6 60 01 cmp %i1, 1 <== NOT EXECUTED 400122cc: 02 80 00 08 be 400122ec <== NOT EXECUTED 400122d0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 400122d4: 40 00 11 5d call 40016848 <__errno> <== NOT EXECUTED 400122d8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400122dc: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400122e0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400122e4: 81 c7 e0 08 ret <== NOT EXECUTED 400122e8: 81 e8 00 00 restore <== NOT EXECUTED case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 400122ec: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 400122f0: 40 00 0e e4 call 40015e80 <== NOT EXECUTED 400122f4: 94 10 20 00 clr %o2 <== NOT EXECUTED 400122f8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400122fc: 26 80 00 04 bl,a 4001230c <== NOT EXECUTED 40012300: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 40012304: 40 00 0e df call 40015e80 <== NOT EXECUTED 40012308: 93 e8 20 02 restore %g0, 2, %o1 <== NOT EXECUTED } } 4001230c: 81 c7 e0 08 ret <== NOT EXECUTED 40012310: 81 e8 00 00 restore <== NOT EXECUTED 400054b4 : #include long telldir( DIR *dirp ) { 400054b4: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_t *iop; if ( !dirp ) 400054b8: 80 a6 20 00 cmp %i0, 0 400054bc: 32 80 00 08 bne,a 400054dc 400054c0: f0 06 00 00 ld [ %i0 ], %i0 rtems_set_errno_and_return_minus_one( EBADF ); 400054c4: 40 00 2e 45 call 40010dd8 <__errno> <== NOT EXECUTED 400054c8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400054cc: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 400054d0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400054d4: 81 c7 e0 08 ret 400054d8: 81 e8 00 00 restore /* * Get the file control block structure associated with the * file descriptor */ iop = rtems_libio_iop( dirp->dd_fd ); 400054dc: 03 10 00 60 sethi %hi(0x40018000), %g1 400054e0: c2 00 61 2c ld [ %g1 + 0x12c ], %g1 ! 4001812c 400054e4: 80 a6 00 01 cmp %i0, %g1 400054e8: 1a 80 00 0b bcc 40005514 400054ec: 03 10 00 64 sethi %hi(0x40019000), %g1 400054f0: c6 00 62 c4 ld [ %g1 + 0x2c4 ], %g3 ! 400192c4 400054f4: 85 2e 20 02 sll %i0, 2, %g2 400054f8: 83 2e 20 04 sll %i0, 4, %g1 400054fc: 82 20 40 02 sub %g1, %g2, %g1 40005500: 82 00 40 18 add %g1, %i0, %g1 40005504: 83 28 60 02 sll %g1, 2, %g1 if (iop == NULL) 40005508: 82 80 40 03 addcc %g1, %g3, %g1 4000550c: 32 bf ff f2 bne,a 400054d4 40005510: f0 00 60 08 ld [ %g1 + 8 ], %i0 assert(0); 40005514: 11 10 00 5d sethi %hi(0x40017400), %o0 <== NOT EXECUTED 40005518: 92 10 20 2c mov 0x2c, %o1 <== NOT EXECUTED 4000551c: 90 12 22 68 or %o0, 0x268, %o0 <== NOT EXECUTED 40005520: 15 10 00 5c sethi %hi(0x40017000), %o2 <== NOT EXECUTED 40005524: 7f ff f7 3d call 40003218 <__assert> <== NOT EXECUTED 40005528: 94 12 a3 48 or %o2, 0x348, %o2 ! 40017348 <== NOT EXECUTED 4000552c: 82 10 20 00 clr %g1 <== NOT EXECUTED return (long)( iop->offset ); 40005530: f0 00 60 08 ld [ %g1 + 8 ], %i0 <== NOT EXECUTED } 40005534: 81 c7 e0 08 ret <== NOT EXECUTED 40005538: 81 e8 00 00 restore <== NOT EXECUTED 4000b19c : int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 4000b19c: 9d e3 bf 98 save %sp, -104, %sp POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 4000b1a0: 80 a6 20 01 cmp %i0, 1 4000b1a4: 12 80 00 11 bne 4000b1e8 4000b1a8: 80 a6 60 00 cmp %i1, 0 /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { 4000b1ac: 02 80 00 13 be 4000b1f8 4000b1b0: 05 10 00 93 sethi %hi(0x40024c00), %g2 /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && 4000b1b4: c2 06 40 00 ld [ %i1 ], %g1 4000b1b8: 82 00 7f ff add %g1, -1, %g1 4000b1bc: 80 a0 60 01 cmp %g1, 1 4000b1c0: 18 80 00 0a bgu 4000b1e8 4000b1c4: 01 00 00 00 nop ( evp->sigev_notify != SIGEV_SIGNAL ) ) { /* The value of the field sigev_notify is not valid */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !evp->sigev_signo ) 4000b1c8: c2 06 60 04 ld [ %i1 + 4 ], %g1 4000b1cc: 80 a0 60 00 cmp %g1, 0 4000b1d0: 02 80 00 06 be 4000b1e8 4000b1d4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) 4000b1d8: 82 00 7f ff add %g1, -1, %g1 4000b1dc: 80 a0 60 1f cmp %g1, 0x1f 4000b1e0: 08 80 00 06 bleu 4000b1f8 4000b1e4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); 4000b1e8: 40 00 28 3a call 400152d0 <__errno> <== NOT EXECUTED 4000b1ec: 01 00 00 00 nop <== NOT EXECUTED 4000b1f0: 10 80 00 10 b 4000b230 <== NOT EXECUTED 4000b1f4: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000b1f8: c2 00 a0 80 ld [ %g2 + 0x80 ], %g1 4000b1fc: 82 00 60 01 inc %g1 4000b200: c2 20 a0 80 st %g1, [ %g2 + 0x80 ] * the inactive chain of free timer control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Allocate( void ) { return (POSIX_Timer_Control *) _Objects_Allocate( &_POSIX_Timer_Information ); 4000b204: 21 10 00 94 sethi %hi(0x40025000), %l0 4000b208: 40 00 0a b7 call 4000dce4 <_Objects_Allocate> 4000b20c: 90 14 20 4c or %l0, 0x4c, %o0 ! 4002504c <_POSIX_Timer_Information> /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 4000b210: b0 92 20 00 orcc %o0, 0, %i0 4000b214: 12 80 00 0a bne 4000b23c 4000b218: 82 10 20 02 mov 2, %g1 _Thread_Enable_dispatch(); 4000b21c: 7f ff fe d1 call 4000ad60 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000b220: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EAGAIN ); 4000b224: 40 00 28 2b call 400152d0 <__errno> <== NOT EXECUTED 4000b228: 01 00 00 00 nop <== NOT EXECUTED 4000b22c: 82 10 20 0b mov 0xb, %g1 ! b <== NOT EXECUTED 4000b230: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000b234: 81 c7 e0 08 ret <== NOT EXECUTED 4000b238: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; 4000b23c: c2 2e 20 3c stb %g1, [ %i0 + 0x3c ] ptimer->thread_id = _Thread_Executing->Object.id; 4000b240: 03 10 00 93 sethi %hi(0x40024c00), %g1 4000b244: c2 00 61 5c ld [ %g1 + 0x15c ], %g1 ! 40024d5c <_Thread_Executing> if ( evp != NULL ) { 4000b248: 80 a6 60 00 cmp %i1, 0 } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; ptimer->thread_id = _Thread_Executing->Object.id; 4000b24c: c2 00 60 08 ld [ %g1 + 8 ], %g1 if ( evp != NULL ) { 4000b250: 02 80 00 08 be 4000b270 4000b254: c2 26 20 38 st %g1, [ %i0 + 0x38 ] ptimer->inf.sigev_notify = evp->sigev_notify; ptimer->inf.sigev_signo = evp->sigev_signo; ptimer->inf.sigev_value = evp->sigev_value; 4000b258: c2 06 60 08 ld [ %i1 + 8 ], %g1 ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; ptimer->thread_id = _Thread_Executing->Object.id; if ( evp != NULL ) { ptimer->inf.sigev_notify = evp->sigev_notify; 4000b25c: c4 06 40 00 ld [ %i1 ], %g2 ptimer->inf.sigev_signo = evp->sigev_signo; 4000b260: c6 06 60 04 ld [ %i1 + 4 ], %g3 ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; ptimer->thread_id = _Thread_Executing->Object.id; if ( evp != NULL ) { ptimer->inf.sigev_notify = evp->sigev_notify; 4000b264: c4 26 20 40 st %g2, [ %i0 + 0x40 ] ptimer->inf.sigev_signo = evp->sigev_signo; 4000b268: c6 26 20 44 st %g3, [ %i0 + 0x44 ] ptimer->inf.sigev_value = evp->sigev_value; 4000b26c: c2 26 20 48 st %g1, [ %i0 + 0x48 ] ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 4000b270: c2 06 20 08 ld [ %i0 + 8 ], %g1 4000b274: 94 10 00 18 mov %i0, %o2 4000b278: 90 14 20 4c or %l0, 0x4c, %o0 } ptimer->overrun = 0; 4000b27c: c0 26 20 68 clr [ %i0 + 0x68 ] ptimer->timer_data.it_value.tv_sec = 0; 4000b280: c0 26 20 5c clr [ %i0 + 0x5c ] ptimer->timer_data.it_value.tv_nsec = 0; 4000b284: c0 26 20 60 clr [ %i0 + 0x60 ] ptimer->timer_data.it_interval.tv_sec = 0; 4000b288: c0 26 20 54 clr [ %i0 + 0x54 ] ptimer->timer_data.it_interval.tv_nsec = 0; 4000b28c: c0 26 20 58 clr [ %i0 + 0x58 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4000b290: c0 26 20 18 clr [ %i0 + 0x18 ] the_watchdog->routine = routine; 4000b294: c0 26 20 2c clr [ %i0 + 0x2c ] the_watchdog->id = id; 4000b298: c0 26 20 30 clr [ %i0 + 0x30 ] the_watchdog->user_data = user_data; 4000b29c: c0 26 20 34 clr [ %i0 + 0x34 ] 4000b2a0: 13 00 00 3f sethi %hi(0xfc00), %o1 4000b2a4: 92 12 63 ff or %o1, 0x3ff, %o1 ! ffff 4000b2a8: 7f ff fe 9c call 4000ad18 <_Objects_Set_local_object> 4000b2ac: 92 08 40 09 and %g1, %o1, %o1 _Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL ); _Objects_Open(&_POSIX_Timer_Information, &ptimer->Object, (Objects_Name) 0); *timerid = ptimer->Object.id; 4000b2b0: c2 06 20 08 ld [ %i0 + 8 ], %g1 if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 4000b2b4: c0 26 20 0c clr [ %i0 + 0xc ] 4000b2b8: c2 26 80 00 st %g1, [ %i2 ] _Thread_Enable_dispatch(); 4000b2bc: 7f ff fe a9 call 4000ad60 <_Thread_Enable_dispatch> 4000b2c0: b0 10 20 00 clr %i0 return 0; } 4000b2c4: 81 c7 e0 08 ret 4000b2c8: 81 e8 00 00 restore 4000ae68 : */ int timer_delete( timer_t timerid ) { 4000ae68: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED * because rtems_timer_delete stops the timer before deleting it. */ POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); 4000ae6c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000ae70: 7f ff ff b4 call 4000ad40 <_POSIX_Timer_Get> <== NOT EXECUTED 4000ae74: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED switch ( location ) { 4000ae78: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4000ae7c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ae80: 02 80 00 0b be 4000aeac <== NOT EXECUTED 4000ae84: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4000ae88: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000ae8c: 18 80 00 06 bgu 4000aea4 <== NOT EXECUTED 4000ae90: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED _Thread_Dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); #endif case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); 4000ae94: 40 00 29 0f call 400152d0 <__errno> <== NOT EXECUTED 4000ae98: 01 00 00 00 nop <== NOT EXECUTED 4000ae9c: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4000aea0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000aea4: 81 c7 e0 08 ret <== NOT EXECUTED 4000aea8: 81 e8 00 00 restore <== NOT EXECUTED ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 4000aeac: c2 02 20 08 ld [ %o0 + 8 ], %g1 <== NOT EXECUTED 4000aeb0: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000aeb4: 21 10 00 94 sethi %hi(0x40025000), %l0 <== NOT EXECUTED 4000aeb8: 13 00 00 3f sethi %hi(0xfc00), %o1 <== NOT EXECUTED 4000aebc: 90 14 20 4c or %l0, 0x4c, %o0 <== NOT EXECUTED 4000aec0: 92 12 63 ff or %o1, 0x3ff, %o1 <== NOT EXECUTED 4000aec4: 7f ff ff 95 call 4000ad18 <_Objects_Set_local_object> <== NOT EXECUTED 4000aec8: 92 08 40 09 and %g1, %o1, %o1 <== NOT EXECUTED case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Timer_Information, &ptimer->Object ); ptimer->state = POSIX_TIMER_STATE_FREE; 4000aecc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 4000aed0: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED 4000aed4: c2 2e 20 3c stb %g1, [ %i0 + 0x3c ] <== NOT EXECUTED (void) _Watchdog_Remove( &ptimer->Timer ); 4000aed8: 40 00 16 fe call 40010ad0 <_Watchdog_Remove> <== NOT EXECUTED 4000aedc: 90 06 20 10 add %i0, 0x10, %o0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _POSIX_Timer_Free ( POSIX_Timer_Control *the_timer ) { _Objects_Free( &_POSIX_Timer_Information, &the_timer->Object ); 4000aee0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000aee4: 90 14 20 4c or %l0, 0x4c, %o0 <== NOT EXECUTED 4000aee8: 40 00 0c 81 call 4000e0ec <_Objects_Free> <== NOT EXECUTED 4000aeec: b0 10 20 00 clr %i0 <== NOT EXECUTED _POSIX_Timer_Free( ptimer ); _Thread_Enable_dispatch(); 4000aef0: 7f ff ff 9c call 4000ad60 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000aef4: 01 00 00 00 nop <== NOT EXECUTED return 0; } return -1; /* unreached - only to remove warnings */ } 4000aef8: 81 c7 e0 08 ret <== NOT EXECUTED 4000aefc: 81 e8 00 00 restore <== NOT EXECUTED 4000ad94 : */ int timer_getoverrun( timer_t timerid ) { 4000ad94: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED int overrun; POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); 4000ad98: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000ad9c: 7f ff ff e9 call 4000ad40 <_POSIX_Timer_Get> <== NOT EXECUTED 4000ada0: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED switch ( location ) { 4000ada4: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4000ada8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000adac: 22 80 00 0b be,a 4000add8 <== NOT EXECUTED 4000adb0: f0 02 20 68 ld [ %o0 + 0x68 ], %i0 <== NOT EXECUTED 4000adb4: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000adb8: 18 80 00 06 bgu 4000add0 <== NOT EXECUTED 4000adbc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED _Thread_Dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); #endif case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); 4000adc0: 40 00 29 44 call 400152d0 <__errno> <== NOT EXECUTED 4000adc4: 01 00 00 00 nop <== NOT EXECUTED 4000adc8: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4000adcc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000add0: 81 c7 e0 08 ret <== NOT EXECUTED 4000add4: 81 e8 00 00 restore <== NOT EXECUTED case OBJECTS_LOCAL: overrun = ptimer->overrun; ptimer->overrun = 0; _Thread_Enable_dispatch(); 4000add8: 7f ff ff e2 call 4000ad60 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000addc: c0 22 20 68 clr [ %o0 + 0x68 ] <== NOT EXECUTED return overrun; } return -1; /* unreached - only to remove warnings */ } 4000ade0: 81 c7 e0 08 ret <== NOT EXECUTED 4000ade4: 81 e8 00 00 restore <== NOT EXECUTED 4000ade8 : int timer_gettime( timer_t timerid, struct itimerspec *value ) { 4000ade8: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED POSIX_Timer_Control *ptimer; Objects_Locations location; struct timespec current_time; /* Reads the current time */ _TOD_Get( ¤t_time ); 4000adec: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED 4000adf0: 40 00 0a 02 call 4000d5f8 <_TOD_Get> <== NOT EXECUTED 4000adf4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED ptimer = _POSIX_Timer_Get( timerid, &location ); 4000adf8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000adfc: 7f ff ff d1 call 4000ad40 <_POSIX_Timer_Get> <== NOT EXECUTED 4000ae00: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED switch ( location ) { 4000ae04: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4000ae08: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ae0c: 02 80 00 0b be 4000ae38 <== NOT EXECUTED 4000ae10: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4000ae14: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000ae18: 18 80 00 06 bgu 4000ae30 <== NOT EXECUTED 4000ae1c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED _Thread_Dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); #endif case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); 4000ae20: 40 00 29 2c call 400152d0 <__errno> <== NOT EXECUTED 4000ae24: 01 00 00 00 nop <== NOT EXECUTED 4000ae28: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4000ae2c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000ae30: 81 c7 e0 08 ret <== NOT EXECUTED 4000ae34: 81 e8 00 00 restore <== NOT EXECUTED case OBJECTS_LOCAL: /* Calculates the time left before the timer finishes */ _Timespec_Subtract( 4000ae38: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4000ae3c: 90 02 20 5c add %o0, 0x5c, %o0 <== NOT EXECUTED 4000ae40: 40 00 15 e7 call 400105dc <_Timespec_Subtract> <== NOT EXECUTED 4000ae44: 94 06 60 08 add %i1, 8, %o2 <== NOT EXECUTED &ptimer->timer_data.it_value, ¤t_time, &value->it_value ); value->it_interval = ptimer->timer_data.it_interval; 4000ae48: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 <== NOT EXECUTED 4000ae4c: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED 4000ae50: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 <== NOT EXECUTED _Thread_Enable_dispatch(); 4000ae54: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000ae58: 7f ff ff c2 call 4000ad60 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000ae5c: c2 26 60 04 st %g1, [ %i1 + 4 ] <== NOT EXECUTED return 0; } return -1; /* unreached - only to remove warnings */ } 4000ae60: 81 c7 e0 08 ret <== NOT EXECUTED 4000ae64: 81 e8 00 00 restore <== NOT EXECUTED 4000af6c : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 4000af6c: 9d e3 bf 90 save %sp, -112, %sp POSIX_Timer_Control *ptimer; Objects_Locations location; boolean activated; if ( value == NULL ) { 4000af70: 80 a6 a0 00 cmp %i2, 0 4000af74: 02 80 00 0c be 4000afa4 4000af78: 90 10 00 18 mov %i0, %o0 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 ) || 4000af7c: c4 06 a0 0c ld [ %i2 + 0xc ], %g2 4000af80: 03 0e e6 b2 sethi %hi(0x3b9ac800), %g1 4000af84: 82 10 62 00 or %g1, 0x200, %g1 ! 3b9aca00 4000af88: 80 a0 80 01 cmp %g2, %g1 4000af8c: 18 80 00 06 bgu 4000afa4 4000af90: 80 a6 60 04 cmp %i1, 4 rtems_set_errno_and_return_minus_one( EINVAL ); } /* XXX check for seconds in the past */ if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { 4000af94: 02 80 00 0a be 4000afbc 4000af98: 80 a6 60 00 cmp %i1, 0 4000af9c: 02 80 00 08 be 4000afbc 4000afa0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); 4000afa4: 40 00 28 cb call 400152d0 <__errno> <== NOT EXECUTED 4000afa8: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4000afac: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000afb0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000afb4: 81 c7 e0 08 ret <== NOT EXECUTED 4000afb8: 81 e8 00 00 restore <== NOT EXECUTED /* If the function reaches this point, then it will be necessary to do * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); 4000afbc: 7f ff ff 61 call 4000ad40 <_POSIX_Timer_Get> 4000afc0: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 4000afc4: c2 07 bf f4 ld [ %fp + -12 ], %g1 /* If the function reaches this point, then it will be necessary to do * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); 4000afc8: a0 10 00 08 mov %o0, %l0 switch ( location ) { 4000afcc: 80 a0 60 00 cmp %g1, 0 4000afd0: 12 bf ff f9 bne 4000afb4 4000afd4: b0 10 3f ff mov -1, %i0 case OBJECTS_ERROR: return -1; case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( value->it_value.tv_sec == 0 && value->it_value.tv_nsec == 0 ) { 4000afd8: c2 06 a0 08 ld [ %i2 + 8 ], %g1 4000afdc: 80 a0 60 00 cmp %g1, 0 4000afe0: 12 80 00 15 bne 4000b034 4000afe4: 80 a6 60 00 cmp %i1, 0 4000afe8: c2 06 a0 0c ld [ %i2 + 0xc ], %g1 <== NOT EXECUTED 4000afec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000aff0: 12 80 00 11 bne 4000b034 <== NOT EXECUTED 4000aff4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 4000aff8: 40 00 16 b6 call 40010ad0 <_Watchdog_Remove> <== NOT EXECUTED 4000affc: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED /* The old data of the timer are returned */ if ( ovalue ) 4000b000: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 4000b004: 02 80 00 05 be 4000b018 <== NOT EXECUTED 4000b008: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED *ovalue = ptimer->timer_data; 4000b00c: 92 04 20 54 add %l0, 0x54, %o1 <== NOT EXECUTED 4000b010: 40 00 2a 96 call 40015a68 <== NOT EXECUTED 4000b014: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED /* The new data are set */ ptimer->timer_data = *value; 4000b018: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 4000b01c: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 4000b020: 40 00 2a 92 call 40015a68 <== NOT EXECUTED 4000b024: 90 04 20 54 add %l0, 0x54, %o0 <== NOT EXECUTED /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 4000b028: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED 4000b02c: 10 80 00 31 b 4000b0f0 <== NOT EXECUTED 4000b030: c2 2c 20 3c stb %g1, [ %l0 + 0x3c ] <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } /* absolute or relative? */ switch (flags) { 4000b034: 02 80 00 15 be 4000b088 4000b038: 80 a6 60 04 cmp %i1, 4 4000b03c: 12 80 00 31 bne 4000b100 <== NOT EXECUTED 4000b040: 11 10 00 93 sethi %hi(0x40024c00), %o0 <== NOT EXECUTED case TIMER_ABSTIME: /* The fire time is absolute: use "rtems_time_fire_when" */ /* First, it converts from struct itimerspec to rtems_time_of_day */ _Watchdog_Initialize( 4000b044: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4000b048: c0 24 20 18 clr [ %l0 + 0x18 ] <== NOT EXECUTED the_watchdog->routine = routine; the_watchdog->id = id; 4000b04c: c2 24 20 30 st %g1, [ %l0 + 0x30 ] <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000b050: 03 10 00 93 sethi %hi(0x40024c00), %g1 <== NOT EXECUTED 4000b054: c4 00 61 38 ld [ %g1 + 0x138 ], %g2 ! 40024d38 <_TOD_Now> <== NOT EXECUTED 4000b058: c2 06 a0 08 ld [ %i2 + 8 ], %g1 <== NOT EXECUTED ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 4000b05c: e0 24 20 34 st %l0, [ %l0 + 0x34 ] <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000b060: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 4000b064: c2 24 20 1c st %g1, [ %l0 + 0x1c ] <== NOT EXECUTED Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4000b068: 03 10 00 2c sethi %hi(0x4000b000), %g1 <== NOT EXECUTED 4000b06c: 82 10 61 20 or %g1, 0x120, %g1 ! 4000b120 <_POSIX_Timer_TSR> <== NOT EXECUTED 4000b070: c2 24 20 2c st %g1, [ %l0 + 0x2c ] <== NOT EXECUTED ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 4000b074: 90 12 21 70 or %o0, 0x170, %o0 <== NOT EXECUTED 4000b078: 40 00 16 3e call 40010970 <_Watchdog_Insert> <== NOT EXECUTED 4000b07c: 92 04 20 10 add %l0, 0x10, %o1 <== NOT EXECUTED return 0; } /* The timer has been started and is running */ /* return the old ones in "ovalue" */ if ( ovalue ) 4000b080: 10 80 00 0f b 4000b0bc <== NOT EXECUTED 4000b084: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED break; /* The fire time is relative: use "rtems_time_fire_after" */ case POSIX_TIMER_RELATIVE: /* First, convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_value ); 4000b088: 40 00 15 69 call 4001062c <_Timespec_To_ticks> 4000b08c: 90 06 a0 08 add %i2, 8, %o0 activated = _Watchdog_Insert_ticks_helper( 4000b090: d4 04 20 08 ld [ %l0 + 8 ], %o2 break; /* The fire time is relative: use "rtems_time_fire_after" */ case POSIX_TIMER_RELATIVE: /* First, convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_value ); 4000b094: 92 10 00 08 mov %o0, %o1 4000b098: d0 24 20 64 st %o0, [ %l0 + 0x64 ] activated = _Watchdog_Insert_ticks_helper( 4000b09c: 17 10 00 2c sethi %hi(0x4000b000), %o3 4000b0a0: 90 04 20 10 add %l0, 0x10, %o0 4000b0a4: 96 12 e1 20 or %o3, 0x120, %o3 4000b0a8: 7f ff ff 96 call 4000af00 <_Watchdog_Insert_ticks_helper> 4000b0ac: 98 10 00 10 mov %l0, %o4 ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 4000b0b0: 80 a2 20 00 cmp %o0, 0 4000b0b4: 02 80 00 0f be 4000b0f0 4000b0b8: 80 a6 e0 00 cmp %i3, 0 return 0; } /* The timer has been started and is running */ /* return the old ones in "ovalue" */ if ( ovalue ) 4000b0bc: 02 80 00 05 be 4000b0d0 4000b0c0: 90 10 00 1b mov %i3, %o0 *ovalue = ptimer->timer_data; 4000b0c4: 92 04 20 54 add %l0, 0x54, %o1 <== NOT EXECUTED 4000b0c8: 40 00 2a 68 call 40015a68 <== NOT EXECUTED 4000b0cc: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED ptimer->timer_data = *value; 4000b0d0: 92 10 00 1a mov %i2, %o1 4000b0d4: 94 10 20 10 mov 0x10, %o2 4000b0d8: 40 00 2a 64 call 40015a68 4000b0dc: 90 04 20 54 add %l0, 0x54, %o0 /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 4000b0e0: 82 10 20 03 mov 3, %g1 _TOD_Get( &ptimer->time ); 4000b0e4: 90 04 20 6c add %l0, 0x6c, %o0 4000b0e8: 40 00 09 44 call 4000d5f8 <_TOD_Get> 4000b0ec: c2 2c 20 3c stb %g1, [ %l0 + 0x3c ] _Thread_Enable_dispatch(); 4000b0f0: 7f ff ff 1c call 4000ad60 <_Thread_Enable_dispatch> 4000b0f4: b0 10 20 00 clr %i0 4000b0f8: 81 c7 e0 08 ret 4000b0fc: 81 e8 00 00 restore return 0; } _Thread_Enable_dispatch(); 4000b100: 7f ff ff 18 call 4000ad60 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000b104: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 4000b108: 40 00 28 72 call 400152d0 <__errno> <== NOT EXECUTED 4000b10c: 01 00 00 00 nop <== NOT EXECUTED 4000b110: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4000b114: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return -1; /* unreached - only to remove warnings */ } 4000b118: 81 c7 e0 08 ret <== NOT EXECUTED 4000b11c: 81 e8 00 00 restore <== NOT EXECUTED 400179fc : */ char *ttyname( int fd ) { 400179fc: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if ( !ttyname_r( fd, ttyname_buf, sizeof(ttyname_buf) ) ) 40017a00: 21 10 00 e3 sethi %hi(0x40038c00), %l0 <== NOT EXECUTED 40017a04: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40017a08: 94 10 24 06 mov 0x406, %o2 <== NOT EXECUTED 40017a0c: 92 14 21 d0 or %l0, 0x1d0, %o1 <== NOT EXECUTED 40017a10: 7f ff ff ba call 400178f8 <== NOT EXECUTED 40017a14: b0 14 21 d0 or %l0, 0x1d0, %i0 <== NOT EXECUTED 40017a18: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40017a1c: 32 80 00 02 bne,a 40017a24 <== NOT EXECUTED 40017a20: b0 10 20 00 clr %i0 <== NOT EXECUTED return ttyname_buf; return NULL; } 40017a24: 81 c7 e0 08 ret <== NOT EXECUTED 40017a28: 81 e8 00 00 restore <== NOT EXECUTED 400178f8 : int ttyname_r( int fd, char *name, int namesize ) { 400178f8: 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) 400178fc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40017900: 7f ff ff e2 call 40017888 <== NOT EXECUTED 40017904: 92 07 bf d4 add %fp, -44, %o1 <== NOT EXECUTED 40017908: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001790c: 06 80 00 14 bl 4001795c <== NOT EXECUTED 40017910: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); /* Must be a character device. */ if (fstat (fd, &sb) || !S_ISCHR (sb.st_mode)) 40017914: 40 00 23 67 call 400206b0 <== NOT EXECUTED 40017918: 92 07 bf 80 add %fp, -128, %o1 <== NOT EXECUTED 4001791c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40017920: 12 80 00 0f bne 4001795c <== NOT EXECUTED 40017924: c2 17 bf 8c lduh [ %fp + -116 ], %g1 <== NOT EXECUTED 40017928: 05 00 00 3c sethi %hi(0xf000), %g2 <== NOT EXECUTED 4001792c: 82 08 40 02 and %g1, %g2, %g1 <== NOT EXECUTED 40017930: 05 00 00 08 sethi %hi(0x2000), %g2 <== NOT EXECUTED 40017934: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40017938: 12 80 00 09 bne 4001795c <== NOT EXECUTED 4001793c: 11 10 00 d6 sethi %hi(0x40035800), %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); 40017940: 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) 40017944: 90 12 23 70 or %o0, 0x370, %o0 <== NOT EXECUTED 40017948: 7f ff fe 90 call 40017388 <== NOT EXECUTED 4001794c: a2 07 bf 30 add %fp, -208, %l1 <== NOT EXECUTED 40017950: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40017954: 12 80 00 20 bne 400179d4 <== NOT EXECUTED 40017958: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); 4001795c: 40 00 2c 64 call 40022aec <__errno> <== NOT EXECUTED 40017960: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40017964: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 40017968: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001796c: 81 c7 e0 08 ret <== NOT EXECUTED 40017970: 81 e8 00 00 restore <== NOT EXECUTED for (rval = NULL; (dirp = readdir (dp)) != NULL ;) { if (dirp->d_ino != sb.st_ino) 40017974: c2 07 bf 88 ld [ %fp + -120 ], %g1 <== NOT EXECUTED 40017978: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4001797c: 12 80 00 16 bne 400179d4 <== NOT EXECUTED 40017980: 92 02 20 0c add %o0, 0xc, %o1 <== NOT EXECUTED continue; strcpy (name + sizeof (_PATH_DEV) - 1, dirp->d_name); 40017984: 40 00 3b 60 call 40026704 <== NOT EXECUTED 40017988: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if (stat (name, &dsb) || sb.st_dev != dsb.st_dev || 4001798c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40017990: 7f ff ba 8e call 400063c8 <== NOT EXECUTED 40017994: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40017998: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001799c: 12 80 00 0e bne 400179d4 <== NOT EXECUTED 400179a0: c4 07 bf 80 ld [ %fp + -128 ], %g2 <== NOT EXECUTED 400179a4: c2 07 bf 30 ld [ %fp + -208 ], %g1 <== NOT EXECUTED 400179a8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400179ac: 12 80 00 0a bne 400179d4 <== NOT EXECUTED 400179b0: c4 07 bf 84 ld [ %fp + -124 ], %g2 <== NOT EXECUTED 400179b4: c2 07 bf 34 ld [ %fp + -204 ], %g1 <== NOT EXECUTED 400179b8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400179bc: 12 80 00 06 bne 400179d4 <== NOT EXECUTED 400179c0: c4 07 bf 88 ld [ %fp + -120 ], %g2 <== NOT EXECUTED 400179c4: c2 07 bf 38 ld [ %fp + -200 ], %g1 <== NOT EXECUTED 400179c8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400179cc: 02 80 00 08 be 400179ec <== NOT EXECUTED 400179d0: 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 ;) 400179d4: 7f ff ff 23 call 40017660 <== NOT EXECUTED 400179d8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400179dc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400179e0: 32 bf ff e5 bne,a 40017974 <== NOT EXECUTED 400179e4: c4 02 00 00 ld [ %o0 ], %g2 <== NOT EXECUTED sb.st_ino != dsb.st_ino) continue; rval = name; break; } (void) closedir (dp); 400179e8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400179ec: 7f ff f9 d1 call 40016130 <== NOT EXECUTED 400179f0: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 400179f4: 81 c7 e0 08 ret <== NOT EXECUTED 400179f8: 81 e8 00 00 restore <== NOT EXECUTED 40017a48 : #include int unlink( const char *path ) { 40017a48: 9d e3 bf 88 save %sp, -120, %sp /* * Get the node to be unlinked. */ result = rtems_filesystem_evaluate_path( path, 0, &loc, FALSE ); 40017a4c: 92 10 20 00 clr %o1 40017a50: 90 10 00 18 mov %i0, %o0 40017a54: a0 07 bf e8 add %fp, -24, %l0 40017a58: 96 10 20 00 clr %o3 40017a5c: 7f ff b4 88 call 40004c7c 40017a60: 94 10 00 10 mov %l0, %o2 if ( result != 0 ) 40017a64: 80 a2 20 00 cmp %o0, 0 40017a68: 32 80 00 17 bne,a 40017ac4 40017a6c: b0 10 3f ff mov -1, %i0 return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); 40017a70: 90 10 20 02 mov 2, %o0 40017a74: 7f ff b4 55 call 40004bc8 40017a78: 92 10 00 10 mov %l0, %o1 if (result != 0 && errno != ENOTSUP) { 40017a7c: 80 a2 20 00 cmp %o0, 0 40017a80: 02 80 00 13 be 40017acc 40017a84: c2 07 bf f0 ld [ %fp + -16 ], %g1 40017a88: 40 00 2c 19 call 40022aec <__errno> <== NOT EXECUTED 40017a8c: 01 00 00 00 nop <== NOT EXECUTED 40017a90: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40017a94: 80 a0 60 86 cmp %g1, 0x86 <== NOT EXECUTED 40017a98: 02 80 00 0d be 40017acc <== NOT EXECUTED 40017a9c: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40017aa0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40017aa4: 02 80 00 08 be 40017ac4 <== NOT EXECUTED 40017aa8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40017aac: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40017ab0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40017ab4: 02 80 00 04 be 40017ac4 <== NOT EXECUTED 40017ab8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40017abc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40017ac0: 01 00 00 00 nop <== NOT EXECUTED 40017ac4: 81 c7 e0 08 ret 40017ac8: 81 e8 00 00 restore return -1; } if ( !loc.ops->node_type_h ) { 40017acc: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 40017ad0: 80 a0 a0 00 cmp %g2, 0 40017ad4: 12 80 00 07 bne 40017af0 40017ad8: a0 07 bf e8 add %fp, -24, %l0 rtems_filesystem_freenode( &loc ); 40017adc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40017ae0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40017ae4: 12 80 00 1d bne 40017b58 <== NOT EXECUTED 40017ae8: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED 40017aec: 30 80 00 1d b,a 40017b60 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { 40017af0: 9f c0 80 00 call %g2 40017af4: 90 10 00 10 mov %l0, %o0 40017af8: 80 a2 20 01 cmp %o0, 1 40017afc: 12 80 00 0f bne 40017b38 40017b00: c2 07 bf f0 ld [ %fp + -16 ], %g1 rtems_filesystem_freenode( &loc ); 40017b04: 80 a0 60 00 cmp %g1, 0 40017b08: 02 80 00 08 be 40017b28 40017b0c: 01 00 00 00 nop 40017b10: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40017b14: 80 a0 60 00 cmp %g1, 0 40017b18: 02 80 00 04 be 40017b28 40017b1c: 01 00 00 00 nop 40017b20: 9f c0 40 00 call %g1 40017b24: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EISDIR ); 40017b28: 40 00 2b f1 call 40022aec <__errno> 40017b2c: b0 10 3f ff mov -1, %i0 40017b30: 10 80 00 0f b 40017b6c 40017b34: 82 10 20 15 mov 0x15, %g1 } if ( !loc.ops->unlink_h ) { 40017b38: c4 00 60 0c ld [ %g1 + 0xc ], %g2 40017b3c: 80 a0 a0 00 cmp %g2, 0 40017b40: 12 80 00 0e bne 40017b78 40017b44: 01 00 00 00 nop rtems_filesystem_freenode( &loc ); 40017b48: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40017b4c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40017b50: 02 80 00 04 be 40017b60 <== NOT EXECUTED 40017b54: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40017b58: 9f c0 40 00 call %g1 <== NOT EXECUTED 40017b5c: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40017b60: 40 00 2b e3 call 40022aec <__errno> <== NOT EXECUTED 40017b64: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40017b68: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40017b6c: c2 22 00 00 st %g1, [ %o0 ] 40017b70: 81 c7 e0 08 ret 40017b74: 81 e8 00 00 restore } result = (*loc.ops->unlink_h)( &loc ); 40017b78: 9f c0 80 00 call %g2 40017b7c: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40017b80: c2 07 bf f0 ld [ %fp + -16 ], %g1 40017b84: 80 a0 60 00 cmp %g1, 0 40017b88: 02 bf ff cf be 40017ac4 40017b8c: b0 10 00 08 mov %o0, %i0 40017b90: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40017b94: 80 a0 60 00 cmp %g1, 0 40017b98: 02 80 00 06 be 40017bb0 40017b9c: 01 00 00 00 nop 40017ba0: 9f c0 40 00 call %g1 40017ba4: 90 10 00 10 mov %l0, %o0 40017ba8: 81 c7 e0 08 ret 40017bac: 81 e8 00 00 restore return result; } 40017bb0: 81 c7 e0 08 ret <== NOT EXECUTED 40017bb4: 81 e8 00 00 restore <== NOT EXECUTED 40006cb8 : */ int unmount( const char *path ) { 40006cb8: 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 ) ) 40006cbc: 92 10 20 00 clr %o1 40006cc0: a2 07 bf e8 add %fp, -24, %l1 40006cc4: 90 10 00 18 mov %i0, %o0 40006cc8: 94 10 00 11 mov %l1, %o2 40006ccc: 7f ff f1 88 call 400032ec 40006cd0: 96 10 20 01 mov 1, %o3 40006cd4: 80 a2 20 00 cmp %o0, 0 40006cd8: 12 80 00 6a bne 40006e80 40006cdc: e0 07 bf f4 ld [ %fp + -12 ], %l0 /* * Verify this is the root node for the file system to be unmounted. */ if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){ 40006ce0: c2 07 bf e8 ld [ %fp + -24 ], %g1 40006ce4: c4 04 20 18 ld [ %l0 + 0x18 ], %g2 40006ce8: 80 a0 80 01 cmp %g2, %g1 40006cec: 02 80 00 0f be 40006d28 40006cf0: c6 07 bf f0 ld [ %fp + -16 ], %g3 rtems_filesystem_freenode( &loc ); 40006cf4: 80 a0 e0 00 cmp %g3, 0 40006cf8: 02 80 00 08 be 40006d18 40006cfc: 01 00 00 00 nop 40006d00: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 40006d04: 80 a0 60 00 cmp %g1, 0 40006d08: 02 80 00 04 be 40006d18 40006d0c: 01 00 00 00 nop 40006d10: 9f c0 40 00 call %g1 40006d14: 90 10 00 11 mov %l1, %o0 rtems_set_errno_and_return_minus_one( EACCES ); 40006d18: 40 00 27 2c call 400109c8 <__errno> 40006d1c: 01 00 00 00 nop 40006d20: 10 80 00 21 b 40006da4 40006d24: 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 ); 40006d28: 80 a0 e0 00 cmp %g3, 0 40006d2c: 22 80 00 09 be,a 40006d50 40006d30: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 40006d34: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 40006d38: 80 a0 60 00 cmp %g1, 0 40006d3c: 22 80 00 05 be,a 40006d50 40006d40: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 40006d44: 9f c0 40 00 call %g1 40006d48: 90 10 00 11 mov %l1, %o0 /* * Verify Unmount is supported by both filesystems. */ if ( !fs_mount_loc->ops->unmount_h ) 40006d4c: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40006d50: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 40006d54: 80 a0 60 00 cmp %g1, 0 40006d58: 02 80 00 07 be 40006d74 40006d5c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) 40006d60: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 40006d64: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 40006d68: 80 a0 60 00 cmp %g1, 0 40006d6c: 32 80 00 06 bne,a 40006d84 40006d70: 03 10 00 63 sethi %hi(0x40018c00), %g1 rtems_set_errno_and_return_minus_one( ENOTSUP ); 40006d74: 40 00 27 15 call 400109c8 <__errno> <== NOT EXECUTED 40006d78: 01 00 00 00 nop <== NOT EXECUTED 40006d7c: 10 80 00 0a b 40006da4 <== NOT EXECUTED 40006d80: 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 ) 40006d84: c2 00 61 f0 ld [ %g1 + 0x1f0 ], %g1 40006d88: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 40006d8c: 80 a0 40 10 cmp %g1, %l0 40006d90: 12 80 00 08 bne 40006db0 40006d94: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( EBUSY ); 40006d98: 40 00 27 0c call 400109c8 <__errno> 40006d9c: 01 00 00 00 nop 40006da0: 82 10 20 10 mov 0x10, %g1 ! 10 40006da4: c2 22 00 00 st %g1, [ %o0 ] 40006da8: 81 c7 e0 08 ret 40006dac: 91 e8 3f ff restore %g0, -1, %o0 /* * Verify there are no file systems below the path specified */ if ( file_systems_below_this_mountpoint( path, fs_root_loc, mt_entry ) != 0 ) 40006db0: 92 04 20 18 add %l0, 0x18, %o1 40006db4: 7f ff ff b1 call 40006c78 40006db8: 94 10 00 10 mov %l0, %o2 40006dbc: 80 a2 20 00 cmp %o0, 0 40006dc0: 12 bf ff f6 bne 40006d98 40006dc4: 01 00 00 00 nop * 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 ) 40006dc8: 7f ff f2 23 call 40003654 40006dcc: 90 10 00 10 mov %l0, %o0 40006dd0: 80 a2 20 01 cmp %o0, 1 40006dd4: 02 bf ff f1 be 40006d98 40006dd8: 01 00 00 00 nop * Allow the file system being unmounted on to do its cleanup. * If it fails it will set the errno to the approprate value * and the fileystem will not be modified. */ if (( fs_mount_loc->ops->unmount_h )( mt_entry ) != 0 ) 40006ddc: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40006de0: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 40006de4: 9f c0 40 00 call %g1 40006de8: 90 10 00 10 mov %l0, %o0 40006dec: 80 a2 20 00 cmp %o0, 0 40006df0: 12 80 00 24 bne 40006e80 40006df4: 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){ 40006df8: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 40006dfc: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 40006e00: 9f c0 40 00 call %g1 40006e04: 90 10 00 10 mov %l0, %o0 40006e08: 80 a2 20 00 cmp %o0, 0 40006e0c: 02 80 00 0c be 40006e3c 40006e10: 01 00 00 00 nop if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 40006e14: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 40006e18: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 <== NOT EXECUTED 40006e1c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40006e20: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40006e24: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40006e28: 02 80 00 16 be 40006e80 <== NOT EXECUTED 40006e2c: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 40006e30: 40 00 05 b1 call 400084f4 <== NOT EXECUTED 40006e34: 90 10 20 00 clr %o0 ! 0 <== NOT EXECUTED 40006e38: 30 bf ff dc b,a 40006da8 <== NOT EXECUTED /* * Extract the mount table entry from the chain */ Chain_Extract( ( Chain_Node * ) mt_entry ); 40006e3c: 40 00 06 79 call 40008820 <_Chain_Extract> 40006e40: 90 10 00 10 mov %l0, %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 ); 40006e44: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40006e48: 80 a0 60 00 cmp %g1, 0 40006e4c: 02 80 00 09 be 40006e70 40006e50: 90 10 00 10 mov %l0, %o0 40006e54: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40006e58: 80 a0 60 00 cmp %g1, 0 40006e5c: 02 80 00 05 be 40006e70 40006e60: 01 00 00 00 nop 40006e64: 9f c0 40 00 call %g1 40006e68: 90 04 20 08 add %l0, 8, %o0 free( mt_entry ); 40006e6c: 90 10 00 10 mov %l0, %o0 40006e70: 7f ff f3 14 call 40003ac0 40006e74: b0 10 20 00 clr %i0 40006e78: 81 c7 e0 08 ret 40006e7c: 81 e8 00 00 restore return 0; } 40006e80: 81 c7 e0 08 ret 40006e84: 91 e8 3f ff restore %g0, -1, %o0 40009140 : int usleep( useconds_t useconds ) { 40009140: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED struct timespec tp; struct timespec tm; unsigned remaining; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 40009144: 21 00 03 d0 sethi %hi(0xf4000), %l0 <== NOT EXECUTED 40009148: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000914c: 7f ff e1 8b call 40001778 <.udiv> <== NOT EXECUTED 40009150: 92 14 22 40 or %l0, 0x240, %o1 <== NOT EXECUTED tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 40009154: 92 14 22 40 or %l0, 0x240, %o1 <== NOT EXECUTED { struct timespec tp; struct timespec tm; unsigned remaining; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 40009158: d0 27 bf f0 st %o0, [ %fp + -16 ] <== NOT EXECUTED tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 4000915c: 40 00 5b 6b call 4001ff08 <.urem> <== NOT EXECUTED 40009160: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40009164: 85 2a 20 02 sll %o0, 2, %g2 <== NOT EXECUTED 40009168: 83 2a 20 07 sll %o0, 7, %g1 <== NOT EXECUTED 4000916c: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 40009170: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED 40009174: 83 28 60 03 sll %g1, 3, %g1 <== NOT EXECUTED nanosleep( &tp, &tm ); 40009178: 92 07 bf e8 add %fp, -24, %o1 <== NOT EXECUTED struct timespec tp; struct timespec tm; unsigned remaining; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 4000917c: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED nanosleep( &tp, &tm ); 40009180: 40 00 24 ac call 40012430 <== NOT EXECUTED 40009184: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED remaining = tm.tv_sec * TOD_MICROSECONDS_PER_SECOND; 40009188: c4 07 bf e8 ld [ %fp + -24 ], %g2 <== NOT EXECUTED 4000918c: d0 07 bf ec ld [ %fp + -20 ], %o0 <== NOT EXECUTED 40009190: 87 28 a0 03 sll %g2, 3, %g3 <== NOT EXECUTED 40009194: 83 28 a0 08 sll %g2, 8, %g1 <== NOT EXECUTED 40009198: 82 20 40 03 sub %g1, %g3, %g1 <== NOT EXECUTED 4000919c: 92 10 23 e8 mov 0x3e8, %o1 <== NOT EXECUTED 400091a0: b1 28 60 06 sll %g1, 6, %i0 <== NOT EXECUTED 400091a4: b0 26 00 01 sub %i0, %g1, %i0 <== NOT EXECUTED 400091a8: 7f ff e1 76 call 40001780 <.div> <== NOT EXECUTED 400091ac: b0 06 00 02 add %i0, %g2, %i0 <== NOT EXECUTED 400091b0: b1 2e 20 06 sll %i0, 6, %i0 <== NOT EXECUTED remaining += tm.tv_nsec / 1000; return remaining; /* seconds remaining */ } 400091b4: 81 c7 e0 08 ret <== NOT EXECUTED 400091b8: 91 ea 00 18 restore %o0, %i0, %o0 <== NOT EXECUTED 400068b8 : int utime( const char *path, const struct utimbuf *times ) { 400068b8: 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 ) ) 400068bc: 92 10 20 00 clr %o1 400068c0: 90 10 00 18 mov %i0, %o0 400068c4: a0 07 bf e8 add %fp, -24, %l0 400068c8: 96 10 20 01 mov 1, %o3 400068cc: 94 10 00 10 mov %l0, %o2 400068d0: 7f ff f1 55 call 40002e24 400068d4: b0 10 3f ff mov -1, %i0 400068d8: 80 a2 20 00 cmp %o0, 0 400068dc: 12 80 00 10 bne 4000691c 400068e0: c2 07 bf f0 ld [ %fp + -16 ], %g1 return -1; if ( !temp_loc.ops->utime_h ){ 400068e4: c4 00 60 30 ld [ %g1 + 0x30 ], %g2 400068e8: 80 a0 a0 00 cmp %g2, 0 400068ec: 32 80 00 0e bne,a 40006924 400068f0: d4 06 60 04 ld [ %i1 + 4 ], %o2 rtems_filesystem_freenode( &temp_loc ); 400068f4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400068f8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400068fc: 02 80 00 04 be 4000690c <== NOT EXECUTED 40006900: 01 00 00 00 nop <== NOT EXECUTED 40006904: 9f c0 40 00 call %g1 <== NOT EXECUTED 40006908: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000690c: 40 00 27 e7 call 400108a8 <__errno> <== NOT EXECUTED 40006910: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40006914: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40006918: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000691c: 81 c7 e0 08 ret 40006920: 81 e8 00 00 restore } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 40006924: d2 06 40 00 ld [ %i1 ], %o1 40006928: 9f c0 80 00 call %g2 4000692c: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &temp_loc ); 40006930: c2 07 bf f0 ld [ %fp + -16 ], %g1 40006934: 80 a0 60 00 cmp %g1, 0 40006938: 02 bf ff f9 be 4000691c 4000693c: b0 10 00 08 mov %o0, %i0 40006940: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40006944: 80 a0 60 00 cmp %g1, 0 40006948: 02 80 00 04 be 40006958 4000694c: 01 00 00 00 nop 40006950: 9f c0 40 00 call %g1 40006954: 90 10 00 10 mov %l0, %o0 return result; } 40006958: 81 c7 e0 08 ret 4000695c: 81 e8 00 00 restore 40002cf4 : | Arguments: as in printf: fmt - format string, ... - unnamed arguments. | Returns: Nothing. +--------------------------------------------------------------------------*/ void vprintk(const char *fmt, va_list ap) { 40002cf4: 9d e3 bf 80 save %sp, -128, %sp 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)])]); 40002cf8: 03 10 00 60 sethi %hi(0x40018000), %g1 printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), base, sign, width, lead); } else { BSP_output_char(*fmt); 40002cfc: 2d 10 00 63 sethi %hi(0x40018c00), %l6 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)])]); 40002d00: b4 10 60 08 or %g1, 8, %i2 if (maxwidth) maxwidth--; } count = 0; while ((n = num / base) > 0) { toPrint[count++] = (num - (n*base)); 40002d04: ba 07 bf e4 add %fp, -28, %i5 num = n ; } toPrint[count++] = num; 40002d08: b6 07 bf f8 add %fp, -8, %i3 for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++){ 40002d0c: 10 80 00 9f b 40002f88 40002d10: b8 07 bf e2 add %fp, -30, %i4 lflag = 0; base = 0; sign = 0; width = 0; lead = ' '; if (*fmt == '%') 40002d14: 12 80 00 9b bne 40002f80 40002d18: c2 05 a0 b4 ld [ %l6 + 0xb4 ], %g1 { fmt++; 40002d1c: b0 06 20 01 inc %i0 if (*fmt == '0' ) { 40002d20: c2 4e 00 00 ldsb [ %i0 ], %g1 40002d24: 80 a0 60 30 cmp %g1, 0x30 40002d28: 12 80 00 04 bne 40002d38 40002d2c: ae 10 20 20 mov 0x20, %l7 lead = '0'; fmt++; 40002d30: b0 06 20 01 inc %i0 40002d34: ae 10 20 30 mov 0x30, %l7 40002d38: 10 80 00 08 b 40002d58 40002d3c: a0 10 20 00 clr %l0 } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; width += (*fmt - '0'); 40002d40: 85 38 60 18 sra %g1, 0x18, %g2 fmt++; 40002d44: b0 06 20 01 inc %i0 if (*fmt == '0' ) { lead = '0'; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; 40002d48: 83 2c 20 01 sll %l0, 1, %g1 width += (*fmt - '0'); 40002d4c: 84 00 bf d0 add %g2, -48, %g2 if (*fmt == '0' ) { lead = '0'; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; 40002d50: 82 00 40 03 add %g1, %g3, %g1 width += (*fmt - '0'); 40002d54: a0 00 80 01 add %g2, %g1, %l0 fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 40002d58: d0 0e 00 00 ldub [ %i0 ], %o0 width *= 10; 40002d5c: 87 2c 20 03 sll %l0, 3, %g3 fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 40002d60: 82 02 3f d0 add %o0, -48, %g1 40002d64: 82 08 60 ff and %g1, 0xff, %g1 40002d68: 80 a0 60 09 cmp %g1, 9 40002d6c: 08 bf ff f5 bleu 40002d40 40002d70: 83 2a 20 18 sll %o0, 0x18, %g1 width *= 10; width += (*fmt - '0'); fmt++; } if ((c = *fmt) == 'l') 40002d74: 83 38 60 18 sra %g1, 0x18, %g1 40002d78: 80 a0 60 6c cmp %g1, 0x6c 40002d7c: 12 80 00 04 bne 40002d8c 40002d80: aa 10 00 10 mov %l0, %l5 { lflag = 1; c = *++fmt; 40002d84: b0 06 20 01 inc %i0 40002d88: d0 0e 00 00 ldub [ %i0 ], %o0 } switch (c) 40002d8c: 83 2a 20 18 sll %o0, 0x18, %g1 40002d90: 83 38 60 18 sra %g1, 0x18, %g1 40002d94: 80 a0 60 64 cmp %g1, 0x64 40002d98: 02 80 00 2c be 40002e48 40002d9c: a8 10 20 0a mov 0xa, %l4 40002da0: 14 80 00 16 bg 40002df8 40002da4: 80 a0 60 70 cmp %g1, 0x70 40002da8: 80 a0 60 4f cmp %g1, 0x4f <== NOT EXECUTED 40002dac: 02 80 00 3e be 40002ea4 <== NOT EXECUTED 40002db0: a8 10 20 08 mov 8, %l4 <== NOT EXECUTED 40002db4: 14 80 00 09 bg 40002dd8 <== NOT EXECUTED 40002db8: 80 a0 60 58 cmp %g1, 0x58 <== NOT EXECUTED 40002dbc: 80 a0 60 44 cmp %g1, 0x44 <== NOT EXECUTED 40002dc0: 02 80 00 21 be 40002e44 <== NOT EXECUTED 40002dc4: 80 a0 60 49 cmp %g1, 0x49 <== NOT EXECUTED 40002dc8: 12 80 00 33 bne 40002e94 <== NOT EXECUTED 40002dcc: c2 05 a0 b4 ld [ %l6 + 0xb4 ], %g1 <== NOT EXECUTED { case 'o': case 'O': base = 8; sign = 0; break; 40002dd0: 10 80 00 1e b 40002e48 <== NOT EXECUTED 40002dd4: a8 10 20 0a mov 0xa, %l4 <== NOT EXECUTED if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) 40002dd8: 02 80 00 32 be 40002ea0 <== NOT EXECUTED 40002ddc: 80 a0 60 63 cmp %g1, 0x63 <== NOT EXECUTED 40002de0: 02 80 00 29 be 40002e84 <== NOT EXECUTED 40002de4: 80 a0 60 55 cmp %g1, 0x55 <== NOT EXECUTED 40002de8: 12 80 00 2b bne 40002e94 <== NOT EXECUTED 40002dec: c2 05 a0 b4 ld [ %l6 + 0xb4 ], %g1 <== NOT EXECUTED { case 'o': case 'O': base = 8; sign = 0; break; case 'i': case 'I': case 'd': case 'D': base = 10; sign = 1; break; 40002df0: 10 80 00 2d b 40002ea4 <== NOT EXECUTED 40002df4: a8 10 20 0a mov 0xa, %l4 <== NOT EXECUTED if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) 40002df8: 02 80 00 2a be 40002ea0 40002dfc: 80 a0 60 70 cmp %g1, 0x70 40002e00: 14 80 00 09 bg 40002e24 40002e04: 80 a0 60 75 cmp %g1, 0x75 40002e08: 80 a0 60 69 cmp %g1, 0x69 <== NOT EXECUTED 40002e0c: 02 80 00 0e be 40002e44 <== NOT EXECUTED 40002e10: 80 a0 60 6f cmp %g1, 0x6f <== NOT EXECUTED 40002e14: 12 80 00 20 bne 40002e94 <== NOT EXECUTED 40002e18: c2 05 a0 b4 ld [ %l6 + 0xb4 ], %g1 <== NOT EXECUTED 40002e1c: 10 80 00 22 b 40002ea4 <== NOT EXECUTED 40002e20: a8 10 20 08 mov 8, %l4 <== NOT EXECUTED 40002e24: 02 80 00 0b be 40002e50 40002e28: 80 a0 60 78 cmp %g1, 0x78 40002e2c: 02 80 00 1d be 40002ea0 40002e30: 80 a0 60 73 cmp %g1, 0x73 40002e34: 32 80 00 18 bne,a 40002e94 40002e38: c2 05 a0 b4 ld [ %l6 + 0xb4 ], %g1 <== NOT EXECUTED case 'd': case 'D': base = 10; sign = 1; break; case 'u': case 'U': base = 10; sign = 0; break; case 'x': case 'X': base = 16; sign = 0; break; case 'p': base = 16; sign = 0; break; case 's': for (str = va_arg(ap, char *); *str; str++) 40002e3c: 10 80 00 07 b 40002e58 40002e40: e0 06 40 00 ld [ %i1 ], %l0 lflag = 1; c = *++fmt; } switch (c) { case 'o': case 'O': base = 8; sign = 0; break; 40002e44: a8 10 20 0a mov 0xa, %l4 <== NOT EXECUTED 40002e48: 10 80 00 18 b 40002ea8 40002e4c: 84 10 20 01 mov 1, %g2 case 'i': case 'I': case 'd': case 'D': base = 10; sign = 1; break; 40002e50: 10 80 00 15 b 40002ea4 <== NOT EXECUTED 40002e54: a8 10 20 0a mov 0xa, %l4 <== NOT EXECUTED case 'u': case 'U': base = 10; sign = 0; break; case 'x': case 'X': base = 16; sign = 0; break; case 'p': base = 16; sign = 0; break; case 's': for (str = va_arg(ap, char *); *str; str++) 40002e58: 10 80 00 06 b 40002e70 40002e5c: d0 4c 00 00 ldsb [ %l0 ], %o0 BSP_output_char(*str); 40002e60: c2 05 a0 b4 ld [ %l6 + 0xb4 ], %g1 40002e64: 9f c0 40 00 call %g1 40002e68: 01 00 00 00 nop case 'd': case 'D': base = 10; sign = 1; break; case 'u': case 'U': base = 10; sign = 0; break; case 'x': case 'X': base = 16; sign = 0; break; case 'p': base = 16; sign = 0; break; case 's': for (str = va_arg(ap, char *); *str; str++) 40002e6c: d0 4c 00 00 ldsb [ %l0 ], %o0 40002e70: 80 a2 20 00 cmp %o0, 0 40002e74: 12 bf ff fb bne 40002e60 40002e78: a0 04 20 01 inc %l0 40002e7c: 10 80 00 49 b 40002fa0 40002e80: b2 06 60 04 add %i1, 4, %i1 BSP_output_char(*str); break; case 'c': BSP_output_char(va_arg(ap, int)); 40002e84: d0 4e 60 03 ldsb [ %i1 + 3 ], %o0 <== NOT EXECUTED 40002e88: c2 05 a0 b4 ld [ %l6 + 0xb4 ], %g1 <== NOT EXECUTED 40002e8c: 10 80 00 3d b 40002f80 <== NOT EXECUTED 40002e90: b2 06 60 04 add %i1, 4, %i1 <== NOT EXECUTED break; default: BSP_output_char(c); 40002e94: 91 2a 20 18 sll %o0, 0x18, %o0 <== NOT EXECUTED 40002e98: 10 80 00 3a b 40002f80 <== NOT EXECUTED 40002e9c: 91 3a 20 18 sra %o0, 0x18, %o0 <== NOT EXECUTED 40002ea0: a8 10 20 10 mov 0x10, %l4 40002ea4: 84 10 20 00 clr %g2 40002ea8: 82 06 60 04 add %i1, 4, %g1 break; } /* switch*/ if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), 40002eac: e2 06 40 00 ld [ %i1 ], %l1 { long unsigned int n; int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { 40002eb0: 80 a0 a0 01 cmp %g2, 1 40002eb4: 12 80 00 05 bne 40002ec8 40002eb8: b2 10 00 01 mov %g1, %i1 40002ebc: 80 a4 60 00 cmp %l1, 0 40002ec0: 06 80 00 04 bl 40002ed0 40002ec4: c2 05 a0 b4 ld [ %l6 + 0xb4 ], %g1 40002ec8: 10 80 00 08 b 40002ee8 40002ecc: aa 10 00 10 mov %l0, %l5 BSP_output_char('-'); 40002ed0: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002ed4: 90 10 20 2d mov 0x2d, %o0 <== NOT EXECUTED num = -num; if (maxwidth) maxwidth--; 40002ed8: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40002edc: 02 80 00 03 be 40002ee8 <== NOT EXECUTED 40002ee0: a2 20 00 11 neg %l1 <== NOT EXECUTED 40002ee4: aa 04 3f ff add %l0, -1, %l5 <== NOT EXECUTED 40002ee8: 10 80 00 08 b 40002f08 40002eec: a6 10 20 00 clr %l3 } count = 0; while ((n = num / base) > 0) { toPrint[count++] = (num - (n*base)); 40002ef0: 40 00 48 7a call 400150d8 <.umul> 40002ef4: 92 10 00 14 mov %l4, %o1 40002ef8: 90 24 40 08 sub %l1, %o0, %o0 40002efc: a2 10 00 10 mov %l0, %l1 40002f00: d0 2c c0 1d stb %o0, [ %l3 + %i5 ] 40002f04: a6 10 00 12 mov %l2, %l3 num = -num; if (maxwidth) maxwidth--; } count = 0; while ((n = num / base) > 0) { 40002f08: 90 10 00 11 mov %l1, %o0 40002f0c: 92 10 00 14 mov %l4, %o1 40002f10: 40 00 48 ac call 400151c0 <.udiv> 40002f14: a4 04 e0 01 add %l3, 1, %l2 40002f18: a0 92 20 00 orcc %o0, 0, %l0 40002f1c: 32 bf ff f5 bne,a 40002ef0 40002f20: 90 10 00 10 mov %l0, %o0 toPrint[count++] = (num - (n*base)); num = n ; } toPrint[count++] = num; 40002f24: 82 06 c0 13 add %i3, %l3, %g1 for (n=maxwidth ; n > count; n-- ) 40002f28: a0 10 00 15 mov %l5, %l0 count = 0; while ((n = num / base) > 0) { toPrint[count++] = (num - (n*base)); num = n ; } toPrint[count++] = num; 40002f2c: e2 28 7f ec stb %l1, [ %g1 + -20 ] for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); 40002f30: 10 80 00 05 b 40002f44 40002f34: a2 10 00 17 mov %l7, %l1 toPrint[count++] = (num - (n*base)); num = n ; } toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) 40002f38: a0 04 3f ff add %l0, -1, %l0 BSP_output_char(lead); 40002f3c: 9f c0 40 00 call %g1 40002f40: 90 10 00 11 mov %l1, %o0 toPrint[count++] = (num - (n*base)); num = n ; } toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) 40002f44: 80 a4 00 12 cmp %l0, %l2 40002f48: 18 bf ff fc bgu 40002f38 40002f4c: c2 05 a0 b4 ld [ %l6 + 0xb4 ], %g1 40002f50: 82 04 bf ff add %l2, -1, %g1 40002f54: 10 80 00 05 b 40002f68 40002f58: a0 07 40 01 add %i5, %g1, %l0 BSP_output_char(lead); for (n = 0; n < count; n++){ BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 40002f5c: c4 05 a0 b4 ld [ %l6 + 0xb4 ], %g2 40002f60: 9f c0 80 00 call %g2 40002f64: d0 4e 80 01 ldsb [ %i2 + %g1 ], %o0 40002f68: a0 04 3f ff add %l0, -1, %l0 toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++){ 40002f6c: 80 a4 00 1c cmp %l0, %i4 40002f70: 32 bf ff fb bne,a 40002f5c 40002f74: c2 4c 20 01 ldsb [ %l0 + 1 ], %g1 vprintk(const char *fmt, va_list ap) { char c, *str; int lflag, base, sign, width, lead; for (; *fmt != '\0'; fmt++) 40002f78: 10 80 00 04 b 40002f88 40002f7c: b0 06 20 01 inc %i0 printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), base, sign, width, lead); } else { BSP_output_char(*fmt); 40002f80: 9f c0 40 00 call %g1 40002f84: b0 06 20 01 inc %i0 vprintk(const char *fmt, va_list ap) { char c, *str; int lflag, base, sign, width, lead; for (; *fmt != '\0'; fmt++) 40002f88: d0 4e 00 00 ldsb [ %i0 ], %o0 40002f8c: 80 a2 20 00 cmp %o0, 0 40002f90: 12 bf ff 61 bne 40002d14 40002f94: 80 a2 20 25 cmp %o0, 0x25 40002f98: 81 c7 e0 08 ret 40002f9c: 81 e8 00 00 restore 40002fa0: 10 bf ff fa b 40002f88 40002fa4: b0 06 20 01 inc %i0 400177f8 : ssize_t write( int fd, const void *buffer, size_t count ) { 400177f8: 9d e3 bf 98 save %sp, -104, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 400177fc: 03 10 00 62 sethi %hi(0x40018800), %g1 40017800: c2 00 63 bc ld [ %g1 + 0x3bc ], %g1 ! 40018bbc ssize_t write( int fd, const void *buffer, size_t count ) { 40017804: 92 10 00 19 mov %i1, %o1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40017808: 80 a6 00 01 cmp %i0, %g1 4001780c: 1a 80 00 0e bcc 40017844 40017810: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 40017814: 03 10 00 67 sethi %hi(0x40019c00), %g1 40017818: c6 00 60 54 ld [ %g1 + 0x54 ], %g3 ! 40019c54 4001781c: 85 2e 20 02 sll %i0, 2, %g2 40017820: 83 2e 20 04 sll %i0, 4, %g1 40017824: 82 20 40 02 sub %g1, %g2, %g1 40017828: 82 00 40 18 add %g1, %i0, %g1 4001782c: 83 28 60 02 sll %g1, 2, %g1 40017830: b0 00 40 03 add %g1, %g3, %i0 rtems_libio_check_is_open(iop); 40017834: c2 06 20 0c ld [ %i0 + 0xc ], %g1 40017838: 80 88 61 00 btst 0x100, %g1 4001783c: 12 80 00 06 bne 40017854 40017840: 80 a6 60 00 cmp %i1, 0 40017844: 7f ff da 36 call 4000e11c <__errno> <== NOT EXECUTED 40017848: 01 00 00 00 nop <== NOT EXECUTED 4001784c: 10 80 00 14 b 4001789c <== NOT EXECUTED 40017850: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 40017854: 02 80 00 07 be 40017870 40017858: 80 a6 a0 00 cmp %i2, 0 rtems_libio_check_count( count ); 4001785c: 02 80 00 1b be 400178c8 40017860: 90 10 20 00 clr %o0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 40017864: 80 88 60 04 btst 4, %g1 40017868: 32 80 00 06 bne,a 40017880 4001786c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40017870: 7f ff da 2b call 4000e11c <__errno> <== NOT EXECUTED 40017874: 01 00 00 00 nop <== NOT EXECUTED 40017878: 10 80 00 09 b 4001789c <== NOT EXECUTED 4001787c: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 40017880: c2 00 60 0c ld [ %g1 + 0xc ], %g1 40017884: 80 a0 60 00 cmp %g1, 0 40017888: 12 80 00 08 bne 400178a8 4001788c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 40017890: 7f ff da 23 call 4000e11c <__errno> <== NOT EXECUTED 40017894: 01 00 00 00 nop <== NOT EXECUTED 40017898: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4001789c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400178a0: 10 80 00 0a b 400178c8 <== NOT EXECUTED 400178a4: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rc = (*iop->handlers->write_h)( iop, buffer, count ); 400178a8: 9f c0 40 00 call %g1 400178ac: 90 10 00 18 mov %i0, %o0 if ( rc > 0 ) 400178b0: 80 a2 20 00 cmp %o0, 0 400178b4: 04 80 00 05 ble 400178c8 400178b8: 01 00 00 00 nop iop->offset += rc; 400178bc: c2 06 20 08 ld [ %i0 + 8 ], %g1 400178c0: 82 00 40 08 add %g1, %o0, %g1 400178c4: c2 26 20 08 st %g1, [ %i0 + 8 ] return rc; } 400178c8: 81 c7 e0 08 ret 400178cc: 91 e8 00 08 restore %g0, %o0, %o0