40016f7c : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 40016f7c: 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(); 40016f80: 40 00 06 f4 call 40018b50 40016f84: f0 06 00 00 ld [ %i0 ], %i0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 40016f88: c2 16 20 38 lduh [ %i0 + 0x38 ], %g1 40016f8c: 91 2a 20 10 sll %o0, 0x10, %o0 40016f90: 91 32 20 10 srl %o0, 0x10, %o0 40016f94: 80 a2 00 01 cmp %o0, %g1 40016f98: 02 80 00 04 be 40016fa8 40016f9c: 80 a2 20 00 cmp %o0, 0 40016fa0: 12 80 00 0c bne 40016fd0 <== NOT EXECUTED 40016fa4: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; 40016fa8: f2 36 20 38 sth %i1, [ %i0 + 0x38 ] jnode->st_gid = group; 40016fac: f4 36 20 3a sth %i2, [ %i0 + 0x3a ] IMFS_update_ctime( jnode ); 40016fb0: 90 07 bf f0 add %fp, -16, %o0 40016fb4: 7f ff b8 25 call 40005048 40016fb8: 92 10 20 00 clr %o1 40016fbc: c2 07 bf f0 ld [ %fp + -16 ], %g1 40016fc0: 84 10 20 00 clr %g2 40016fc4: c2 26 20 44 st %g1, [ %i0 + 0x44 ] return 0; } 40016fc8: 81 c7 e0 08 ret 40016fcc: 91 e8 00 02 restore %g0, %g2, %o0 #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); 40016fd0: 40 00 3d 4a call 400264f8 <__errno> <== NOT EXECUTED 40016fd4: 01 00 00 00 nop <== NOT EXECUTED 40016fd8: 82 10 20 01 mov 1, %g1 ! 1 <== NOT EXECUTED 40016fdc: 84 10 3f ff mov -1, %g2 <== NOT EXECUTED 40016fe0: 10 bf ff fa b 40016fc8 <== NOT EXECUTED 40016fe4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000e050 : IMFS_jnode_types_t type, char *name, mode_t mode, IMFS_types_union *info ) { 4000e050: 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 ) 4000e054: a6 96 20 00 orcc %i0, 0, %l3 4000e058: 02 80 00 03 be 4000e064 4000e05c: a4 10 20 00 clr %l2 parent = parent_loc->node_access; 4000e060: e4 04 c0 00 ld [ %l3 ], %l2 /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 4000e064: 90 10 20 01 mov 1, %o0 4000e068: 92 10 20 5c mov 0x5c, %o1 4000e06c: 7f ff d1 53 call 400025b8 4000e070: b0 10 20 00 clr %i0 if ( !node ) 4000e074: a2 92 20 00 orcc %o0, 0, %l1 4000e078: 02 80 00 24 be 4000e108 4000e07c: 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 ); 4000e080: 92 10 00 1a mov %i2, %o1 4000e084: 94 10 20 20 mov 0x20, %o2 /* * Fill in the basic information */ node->st_nlink = 1; 4000e088: c2 34 60 30 sth %g1, [ %l1 + 0x30 ] node->type = type; 4000e08c: f2 24 60 48 st %i1, [ %l1 + 0x48 ] strncpy( node->name, name, IMFS_NAME_MAX ); 4000e090: 40 00 08 9f call 4001030c 4000e094: 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; 4000e098: 05 10 00 67 sethi %hi(0x40019c00), %g2 4000e09c: c6 00 a3 20 ld [ %g2 + 0x320 ], %g3 ! 40019f20 /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 4000e0a0: 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; 4000e0a4: c2 10 e0 24 lduh [ %g3 + 0x24 ], %g1 4000e0a8: 82 2e c0 01 andn %i3, %g1, %g1 #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); 4000e0ac: 7f ff f8 22 call 4000c134 4000e0b0: c2 34 60 2e sth %g1, [ %l1 + 0x2e ] node->st_gid = getegid(); 4000e0b4: 7f ff f8 1c call 4000c124 4000e0b8: d0 34 60 38 sth %o0, [ %l1 + 0x38 ] /* * Now set all the times. */ gettimeofday( &tv, 0 ); 4000e0bc: 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(); 4000e0c0: d0 34 60 3a sth %o0, [ %l1 + 0x3a ] /* * Now set all the times. */ gettimeofday( &tv, 0 ); 4000e0c4: 7f ff f8 20 call 4000c144 4000e0c8: 90 07 bf f0 add %fp, -16, %o0 node->stat_atime = (time_t) tv.tv_sec; 4000e0cc: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* * Set the type specific information */ switch (type) { 4000e0d0: 80 a6 60 06 cmp %i1, 6 gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; node->stat_mtime = (time_t) tv.tv_sec; node->stat_ctime = (time_t) tv.tv_sec; 4000e0d4: c2 24 60 44 st %g1, [ %l1 + 0x44 ] * Now set all the times. */ gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; 4000e0d8: c2 24 60 3c st %g1, [ %l1 + 0x3c ] /* * Set the type specific information */ switch (type) { 4000e0dc: 08 80 00 0d bleu 4000e110 4000e0e0: c2 24 60 40 st %g1, [ %l1 + 0x40 ] node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; break; default: assert(0); 4000e0e4: 11 10 00 64 sethi %hi(0x40019000), %o0 <== NOT EXECUTED 4000e0e8: 15 10 00 62 sethi %hi(0x40018800), %o2 <== NOT EXECUTED 4000e0ec: 90 12 20 90 or %o0, 0x90, %o0 <== NOT EXECUTED 4000e0f0: 94 12 a2 90 or %o2, 0x290, %o2 <== NOT EXECUTED 4000e0f4: 7f ff cf 97 call 40001f50 <__assert> <== NOT EXECUTED 4000e0f8: 92 10 20 77 mov 0x77, %o1 <== NOT EXECUTED /* * If this node has a parent, then put it in that directory list. */ if ( parent ) { 4000e0fc: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 4000e100: 12 80 00 13 bne 4000e14c <== NOT EXECUTED 4000e104: 90 04 a0 4c add %l2, 0x4c, %o0 <== NOT EXECUTED node->st_ino = ++fs_info->ino_count; } return node; } 4000e108: 81 c7 e0 08 ret 4000e10c: 81 e8 00 00 restore /* * Set the type specific information */ switch (type) { 4000e110: 83 2e 60 02 sll %i1, 2, %g1 4000e114: 05 10 00 38 sethi %hi(0x4000e000), %g2 4000e118: 84 10 a0 34 or %g2, 0x34, %g2 ! 4000e034 4000e11c: c6 00 80 01 ld [ %g2 + %g1 ], %g3 4000e120: 81 c0 c0 00 jmp %g3 4000e124: 01 00 00 00 nop node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 4000e128: c0 24 60 4c clr [ %l1 + 0x4c ] <== NOT EXECUTED node->info.linearfile.direct = 0; 4000e12c: c0 24 60 50 clr [ %l1 + 0x50 ] <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; 4000e130: c0 24 60 4c clr [ %l1 + 0x4c ] node->info.file.indirect = 0; 4000e134: c0 24 60 50 clr [ %l1 + 0x50 ] node->info.file.doubly_indirect = 0; 4000e138: c0 24 60 54 clr [ %l1 + 0x54 ] node->info.file.triply_indirect = 0; 4000e13c: c0 24 60 58 clr [ %l1 + 0x58 ] /* * If this node has a parent, then put it in that directory list. */ if ( parent ) { 4000e140: 80 a4 a0 00 cmp %l2, 0 4000e144: 02 bf ff f1 be 4000e108 4000e148: 90 04 a0 4c add %l2, 0x4c, %o0 Chain_Append( &parent->info.directory.Entries, &node->Node ); 4000e14c: 7f ff e3 09 call 40006d70 <_Chain_Append> 4000e150: 92 10 00 11 mov %l1, %o1 node->Parent = parent; fs_info = parent_loc->mt_entry->fs_info; 4000e154: 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; 4000e158: e4 24 60 08 st %l2, [ %l1 + 8 ] fs_info = parent_loc->mt_entry->fs_info; 4000e15c: c6 00 60 2c ld [ %g1 + 0x2c ], %g3 node->st_ino = ++fs_info->ino_count; 4000e160: c4 00 c0 00 ld [ %g3 ], %g2 4000e164: 84 00 a0 01 inc %g2 4000e168: c4 20 c0 00 st %g2, [ %g3 ] 4000e16c: c4 24 60 34 st %g2, [ %l1 + 0x34 ] } return node; } 4000e170: 81 c7 e0 08 ret 4000e174: 81 e8 00 00 restore case IMFS_HARD_LINK: node->info.hard_link.link_node = info->hard_link.link_node; break; case IMFS_SYM_LINK: sym_name = calloc( 1, strlen( info->sym_link.name ) + 1 ); 4000e178: 40 00 07 fb call 40010164 4000e17c: d0 07 00 00 ld [ %i4 ], %o0 4000e180: 92 02 20 01 add %o0, 1, %o1 4000e184: 7f ff d1 0d call 400025b8 4000e188: 90 10 20 01 mov 1, %o0 strcpy( sym_name, info->sym_link.name ); 4000e18c: d2 07 00 00 ld [ %i4 ], %o1 4000e190: 40 00 07 d5 call 400100e4 4000e194: a0 10 00 08 mov %o0, %l0 node->info.sym_link.name = sym_name; 4000e198: 10 bf ff ea b 4000e140 4000e19c: e0 24 60 4c st %l0, [ %l1 + 0x4c ] 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; 4000e1a0: c2 07 00 00 ld [ %i4 ], %g1 4000e1a4: 10 bf ff e7 b 4000e140 4000e1a8: c2 24 60 4c st %g1, [ %l1 + 0x4c ] node->info.sym_link.name = sym_name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; 4000e1ac: 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; 4000e1b0: c4 07 00 00 ld [ %i4 ], %g2 node->info.device.minor = info->device.minor; 4000e1b4: 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; 4000e1b8: 10 bf ff e2 b 4000e140 4000e1bc: c4 24 60 4c st %g2, [ %l1 + 0x4c ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000e1c0: 82 04 60 50 add %l1, 0x50, %g1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000e1c4: 84 04 60 4c add %l1, 0x4c, %g2 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 4000e1c8: 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); 4000e1cc: c2 24 60 4c st %g1, [ %l1 + 0x4c ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000e1d0: 10 bf ff dc b 4000e140 4000e1d4: c4 24 60 54 st %g2, [ %l1 + 0x54 ] 40003a98 : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 40003a98: 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 ); 40003a9c: 80 a6 20 00 cmp %i0, 0 40003aa0: 02 80 00 3a be 40003b88 40003aa4: 11 10 00 7f sethi %hi(0x4001fc00), %o0 assert( level >= 0 ); 40003aa8: 80 a6 60 00 cmp %i1, 0 40003aac: 06 80 00 30 bl 40003b6c 40003ab0: 11 10 00 7f sethi %hi(0x4001fc00), %o0 assert( the_directory->type == IMFS_DIRECTORY ); 40003ab4: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40003ab8: 80 a0 60 01 cmp %g1, 1 40003abc: 02 80 00 07 be 40003ad8 40003ac0: 11 10 00 7f sethi %hi(0x4001fc00), %o0 40003ac4: 15 10 00 7f sethi %hi(0x4001fc00), %o2 <== NOT EXECUTED 40003ac8: 90 12 23 00 or %o0, 0x300, %o0 <== NOT EXECUTED 40003acc: 94 12 a3 e0 or %o2, 0x3e0, %o2 <== NOT EXECUTED 40003ad0: 40 00 01 e0 call 40004250 <__assert> <== NOT EXECUTED 40003ad4: 92 10 20 83 mov 0x83, %o1 <== NOT EXECUTED the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 40003ad8: e2 06 20 4c ld [ %i0 + 0x4c ], %l1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40003adc: b0 06 20 50 add %i0, 0x50, %i0 !_Chain_Is_tail( the_chain, the_node ); 40003ae0: 80 a4 40 18 cmp %l1, %i0 40003ae4: 02 80 00 1c be 40003b54 40003ae8: 03 10 00 80 sethi %hi(0x40020000), %g1 40003aec: 25 10 00 88 sethi %hi(0x40022000), %l2 40003af0: a6 10 60 08 or %g1, 8, %l3 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 40003af4: a8 06 60 01 add %i1, 1, %l4 !_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++ ) 40003af8: 80 a6 60 00 cmp %i1, 0 40003afc: 06 80 00 0c bl 40003b2c 40003b00: c2 04 a0 f8 ld [ %l2 + 0xf8 ], %g1 40003b04: a0 10 20 00 clr %l0 fprintf(stdout, "...." ); 40003b08: 90 10 00 13 mov %l3, %o0 40003b0c: d6 00 60 08 ld [ %g1 + 8 ], %o3 40003b10: 92 10 20 01 mov 1, %o1 40003b14: 40 00 42 73 call 400144e0 40003b18: 94 10 20 04 mov 4, %o2 !_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++ ) 40003b1c: a0 04 20 01 inc %l0 40003b20: 80 a6 40 10 cmp %i1, %l0 40003b24: 16 bf ff f9 bge 40003b08 40003b28: c2 04 a0 f8 ld [ %l2 + 0xf8 ], %g1 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 40003b2c: 7f ff ff 7e call 40003924 40003b30: 90 10 00 11 mov %l1, %o0 if ( the_jnode->type == IMFS_DIRECTORY ) 40003b34: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 40003b38: 80 a0 60 01 cmp %g1, 1 40003b3c: 22 80 00 08 be,a 40003b5c 40003b40: 90 10 00 11 mov %l1, %o0 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 ) { 40003b44: e2 04 40 00 ld [ %l1 ], %l1 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !_Chain_Is_tail( the_chain, the_node ); 40003b48: 80 a4 40 18 cmp %l1, %i0 40003b4c: 12 bf ff ec bne 40003afc 40003b50: 80 a6 60 00 cmp %i1, 0 40003b54: 81 c7 e0 08 ret 40003b58: 81 e8 00 00 restore for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 40003b5c: 7f ff ff cf call 40003a98 40003b60: 92 10 00 14 mov %l4, %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 ) { 40003b64: 10 bf ff f9 b 40003b48 40003b68: e2 04 40 00 ld [ %l1 ], %l1 IMFS_jnode_t *the_jnode; int i; assert( the_directory ); assert( level >= 0 ); 40003b6c: 15 10 00 7f sethi %hi(0x4001fc00), %o2 <== NOT EXECUTED 40003b70: 90 12 23 00 or %o0, 0x300, %o0 <== NOT EXECUTED 40003b74: 94 12 a3 d0 or %o2, 0x3d0, %o2 <== NOT EXECUTED 40003b78: 40 00 01 b6 call 40004250 <__assert> <== NOT EXECUTED 40003b7c: 92 10 20 81 mov 0x81, %o1 <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); 40003b80: 10 bf ff ce b 40003ab8 <== NOT EXECUTED 40003b84: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 <== NOT EXECUTED Chain_Node *the_node; Chain_Control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 40003b88: 15 10 00 7f sethi %hi(0x4001fc00), %o2 <== NOT EXECUTED 40003b8c: 90 12 23 00 or %o0, 0x300, %o0 <== NOT EXECUTED 40003b90: 94 12 a3 c0 or %o2, 0x3c0, %o2 <== NOT EXECUTED 40003b94: 40 00 01 af call 40004250 <__assert> <== NOT EXECUTED 40003b98: 92 10 20 7f mov 0x7f, %o1 <== NOT EXECUTED assert( level >= 0 ); 40003b9c: 10 bf ff c4 b 40003aac <== NOT EXECUTED 40003ba0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 4000b19c : int IMFS_eval_path( const char *pathname, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4000b19c: 9d e3 bf 70 save %sp, -144, %sp /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 4000b1a0: e2 06 80 00 ld [ %i2 ], %l1 int IMFS_eval_path( const char *pathname, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4000b1a4: 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; 4000b1a8: a4 10 20 00 clr %l2 4000b1ac: a8 07 bf d3 add %fp, -45, %l4 4000b1b0: aa 07 bf f4 add %fp, -12, %l5 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4000b1b4: 2d 10 00 67 sethi %hi(0x40019c00), %l6 * 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 ); 4000b1b8: 90 04 c0 12 add %l3, %l2, %o0 4000b1bc: 92 10 00 14 mov %l4, %o1 4000b1c0: 40 00 01 f4 call 4000b990 4000b1c4: 94 10 00 15 mov %l5, %o2 i += len; if ( !pathloc->node_access ) 4000b1c8: c6 06 80 00 ld [ %i2 ], %g3 * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], token, &len ); 4000b1cc: a0 10 00 08 mov %o0, %l0 i += len; if ( !pathloc->node_access ) 4000b1d0: 80 a0 e0 00 cmp %g3, 0 4000b1d4: 02 80 00 4c be 4000b304 4000b1d8: c2 07 bf f4 ld [ %fp + -12 ], %g1 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 4000b1dc: 80 a2 20 00 cmp %o0, 0 4000b1e0: 12 80 00 11 bne 4000b224 4000b1e4: a4 04 80 01 add %l2, %g1, %l2 * new fs root node and let let the mounted filesystem set the handlers. * * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { 4000b1e8: c2 00 e0 48 ld [ %g3 + 0x48 ], %g1 4000b1ec: 80 a0 60 01 cmp %g1, 1 4000b1f0: 22 80 00 52 be,a 4000b338 4000b1f4: c6 00 e0 58 ld [ %g3 + 0x58 ], %g3 return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 4000b1f8: 7f ff ff 92 call 4000b040 4000b1fc: 90 10 00 1a mov %i2, %o0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 4000b200: 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 ); 4000b204: b0 10 00 08 mov %o0, %i0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 4000b208: 7f ff ff ac call 4000b0b8 4000b20c: 90 10 00 1a mov %i2, %o0 4000b210: 80 a2 20 00 cmp %o0, 0 4000b214: 02 80 00 6b be 4000b3c0 4000b218: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4000b21c: 81 c7 e0 08 ret 4000b220: 81 e8 00 00 restore /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 4000b224: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 4000b228: 80 a0 60 01 cmp %g1, 1 4000b22c: 02 80 00 3c be 4000b31c 4000b230: 90 10 00 1a mov %i2, %o0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 4000b234: 80 a4 20 03 cmp %l0, 3 4000b238: 02 80 00 21 be 4000b2bc 4000b23c: a2 10 00 03 mov %g3, %l1 4000b240: 80 a4 20 04 cmp %l0, 4 4000b244: 02 80 00 18 be 4000b2a4 4000b248: 80 a4 20 02 cmp %l0, 2 4000b24c: 02 80 00 06 be 4000b264 4000b250: 80 a4 20 04 cmp %l0, 4 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 4000b254: 12 bf ff da bne 4000b1bc 4000b258: 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 ) { 4000b25c: 10 bf ff e4 b 4000b1ec <== NOT EXECUTED 4000b260: c2 00 e0 48 ld [ %g3 + 0x48 ], %g1 <== NOT EXECUTED case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4000b264: c2 05 a3 20 ld [ %l6 + 0x320 ], %g1 4000b268: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 4000b26c: 80 a0 80 03 cmp %g2, %g3 4000b270: 02 bf ff d3 be 4000b1bc 4000b274: 90 04 c0 12 add %l3, %l2, %o0 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 4000b278: d8 06 a0 0c ld [ %i2 + 0xc ], %o4 4000b27c: c2 03 20 18 ld [ %o4 + 0x18 ], %g1 4000b280: 80 a0 40 03 cmp %g1, %g3 4000b284: 22 80 00 5b be,a 4000b3f0 4000b288: c8 03 20 10 ld [ %o4 + 0x10 ], %g4 *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),flags,pathloc); } } else { if ( !node->Parent ) 4000b28c: e2 00 e0 08 ld [ %g3 + 8 ], %l1 4000b290: 80 a4 60 00 cmp %l1, 0 4000b294: 02 80 00 46 be 4000b3ac 4000b298: 01 00 00 00 nop /* * Set the node access to the point we have found. */ pathloc->node_access = node; 4000b29c: 10 bf ff c8 b 4000b1bc 4000b2a0: e2 26 80 00 st %l1, [ %i2 ] case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4000b2a4: 40 00 0e d2 call 4000edec <__errno> 4000b2a8: b0 10 3f ff mov -1, %i0 4000b2ac: 82 10 20 5b mov 0x5b, %g1 4000b2b0: c2 22 00 00 st %g1, [ %o0 ] 4000b2b4: 81 c7 e0 08 ret 4000b2b8: 81 e8 00 00 restore case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 4000b2bc: c2 00 e0 48 ld [ %g3 + 0x48 ], %g1 4000b2c0: 80 a0 60 03 cmp %g1, 3 4000b2c4: 02 80 00 31 be 4000b388 4000b2c8: 80 a0 60 04 cmp %g1, 4 node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 4000b2cc: 02 80 00 54 be 4000b41c 4000b2d0: 90 10 00 1a mov %i2, %o0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 4000b2d4: 80 a0 60 01 cmp %g1, 1 4000b2d8: 12 80 00 40 bne 4000b3d8 4000b2dc: 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 ) { 4000b2e0: c6 04 60 58 ld [ %l1 + 0x58 ], %g3 4000b2e4: 80 a0 e0 00 cmp %g3, 0 4000b2e8: 12 80 00 17 bne 4000b344 4000b2ec: 90 10 00 11 mov %l1, %o0 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4000b2f0: 40 00 01 76 call 4000b8c8 4000b2f4: 92 10 00 14 mov %l4, %o1 if ( !node ) 4000b2f8: a2 92 20 00 orcc %o0, 0, %l1 4000b2fc: 32 bf ff af bne,a 4000b1b8 4000b300: e2 26 80 00 st %l1, [ %i2 ] rtems_set_errno_and_return_minus_one( ENOENT ); 4000b304: 40 00 0e ba call 4000edec <__errno> 4000b308: b0 10 3f ff mov -1, %i0 4000b30c: 82 10 20 02 mov 2, %g1 4000b310: c2 22 00 00 st %g1, [ %o0 ] 4000b314: 81 c7 e0 08 ret 4000b318: 81 e8 00 00 restore /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 4000b31c: 7f ff ff 67 call 4000b0b8 4000b320: 92 10 20 01 mov 1, %o1 4000b324: 80 a2 20 00 cmp %o0, 0 4000b328: 02 80 00 37 be 4000b404 4000b32c: 01 00 00 00 nop 4000b330: 10 bf ff c1 b 4000b234 4000b334: c6 06 80 00 ld [ %i2 ], %g3 * * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { 4000b338: 80 a0 e0 00 cmp %g3, 0 4000b33c: 02 bf ff af be 4000b1f8 4000b340: 01 00 00 00 nop newloc = node->info.directory.mt_fs->mt_fs_root; 4000b344: c8 00 e0 20 ld [ %g3 + 0x20 ], %g4 *pathloc = newloc; 4000b348: c2 00 e0 24 ld [ %g3 + 0x24 ], %g1 * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 4000b34c: c4 00 e0 1c ld [ %g3 + 0x1c ], %g2 *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 4000b350: da 01 00 00 ld [ %g4 ], %o5 * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 4000b354: c6 00 e0 18 ld [ %g3 + 0x18 ], %g3 *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 4000b358: d0 07 bf f4 ld [ %fp + -12 ], %o0 */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 4000b35c: c2 26 a0 0c st %g1, [ %i2 + 0xc ] return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 4000b360: 90 24 80 08 sub %l2, %o0, %o0 */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 4000b364: c4 26 a0 04 st %g2, [ %i2 + 4 ] 4000b368: c6 26 80 00 st %g3, [ %i2 ] return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 4000b36c: 90 02 00 13 add %o0, %l3, %o0 */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 4000b370: c8 26 a0 08 st %g4, [ %i2 + 8 ] return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 4000b374: 92 10 00 19 mov %i1, %o1 4000b378: 9f c3 40 00 call %o5 4000b37c: 94 10 00 1a mov %i2, %o2 4000b380: 81 c7 e0 08 ret 4000b384: 91 e8 00 08 restore %g0, %o0, %o0 * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 4000b388: 90 10 00 1a mov %i2, %o0 4000b38c: 7f ff ff 69 call 4000b130 4000b390: 92 10 20 00 clr %o1 node = pathloc->node_access; 4000b394: d0 06 80 00 ld [ %i2 ], %o0 if ( !node ) 4000b398: 80 a2 20 00 cmp %o0, 0 4000b39c: 02 80 00 0f be 4000b3d8 4000b3a0: a2 10 00 08 mov %o0, %l1 } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 4000b3a4: 10 bf ff cc b 4000b2d4 4000b3a8: c2 02 20 48 ld [ %o0 + 0x48 ], %g1 return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),flags,pathloc); } } else { if ( !node->Parent ) rtems_set_errno_and_return_minus_one( ENOENT ); 4000b3ac: 40 00 0e 90 call 4000edec <__errno> 4000b3b0: b0 10 3f ff mov -1, %i0 4000b3b4: e0 22 00 00 st %l0, [ %o0 ] 4000b3b8: 81 c7 e0 08 ret 4000b3bc: 81 e8 00 00 restore /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4000b3c0: 40 00 0e 8b call 4000edec <__errno> 4000b3c4: b0 10 3f ff mov -1, %i0 4000b3c8: 82 10 20 0d mov 0xd, %g1 4000b3cc: c2 22 00 00 st %g1, [ %o0 ] return result; } 4000b3d0: 81 c7 e0 08 ret 4000b3d4: 81 e8 00 00 restore /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 4000b3d8: 40 00 0e 85 call 4000edec <__errno> 4000b3dc: b0 10 3f ff mov -1, %i0 4000b3e0: 82 10 20 14 mov 0x14, %g1 4000b3e4: c2 22 00 00 st %g1, [ %o0 ] 4000b3e8: 81 c7 e0 08 ret 4000b3ec: 81 e8 00 00 restore if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; 4000b3f0: c2 03 20 14 ld [ %o4 + 0x14 ], %g1 return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),flags,pathloc); 4000b3f4: da 01 00 00 ld [ %g4 ], %o5 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 4000b3f8: c4 03 20 0c ld [ %o4 + 0xc ], %g2 4000b3fc: 10 bf ff d7 b 4000b358 4000b400: c6 03 20 08 ld [ %o4 + 8 ], %g3 * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4000b404: 40 00 0e 7a call 4000edec <__errno> 4000b408: b0 10 3f ff mov -1, %i0 4000b40c: 82 10 20 0d mov 0xd, %g1 4000b410: c2 22 00 00 st %g1, [ %o0 ] 4000b414: 81 c7 e0 08 ret 4000b418: 81 e8 00 00 restore if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 4000b41c: 40 00 00 09 call 4000b440 4000b420: 92 10 20 00 clr %o1 4000b424: b0 10 00 08 mov %o0, %i0 node = pathloc->node_access; if ( result == -1 ) 4000b428: 80 a2 3f ff cmp %o0, -1 4000b42c: 02 bf ff 7c be 4000b21c 4000b430: 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; 4000b434: c2 02 20 48 ld [ %o0 + 0x48 ], %g1 4000b438: 10 bf ff a7 b 4000b2d4 4000b43c: a2 10 00 08 mov %o0, %l1 4000b130 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4000b130: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *jnode = node->node_access; 4000b134: e0 06 00 00 ld [ %i0 ], %l0 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 4000b138: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000b13c: 80 a0 60 03 cmp %g1, 3 4000b140: 22 80 00 05 be,a 4000b154 4000b144: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 rtems_fatal_error_occurred (0xABCD0000); 4000b148: 7f ff ee 34 call 40006a18 <== NOT EXECUTED 4000b14c: 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; 4000b150: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 <== NOT EXECUTED IMFS_Set_handlers( node ); 4000b154: 90 10 00 18 mov %i0, %o0 4000b158: 7f ff ff ba call 4000b040 4000b15c: c2 26 00 00 st %g1, [ %i0 ] /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 4000b160: 90 10 00 18 mov %i0, %o0 4000b164: 92 10 00 19 mov %i1, %o1 4000b168: 7f ff ff d4 call 4000b0b8 4000b16c: b0 10 20 00 clr %i0 4000b170: 80 a2 20 00 cmp %o0, 0 4000b174: 02 80 00 04 be 4000b184 4000b178: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4000b17c: 81 c7 e0 08 ret 4000b180: 81 e8 00 00 restore /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4000b184: 40 00 0f 1a call 4000edec <__errno> <== NOT EXECUTED 4000b188: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000b18c: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 4000b190: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return result; } 4000b194: 81 c7 e0 08 ret <== NOT EXECUTED 4000b198: 81 e8 00 00 restore <== NOT EXECUTED 4000b52c : int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4000b52c: 9d e3 bf 98 save %sp, -104, %sp 4000b530: 10 80 00 07 b 4000b54c 4000b534: 23 10 00 67 sethi %hi(0x40019c00), %l1 */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 4000b538: 02 80 00 23 be 4000b5c4 4000b53c: 82 00 7f fd add %g1, -3, %g1 result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 4000b540: 80 a0 60 01 cmp %g1, 1 4000b544: 18 80 00 1c bgu 4000b5b4 4000b548: 90 10 20 00 clr %o0 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 4000b54c: c4 04 63 20 ld [ %l1 + 0x320 ], %g2 { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 4000b550: e0 06 00 00 ld [ %i0 ], %l0 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 4000b554: c2 10 a0 26 lduh [ %g2 + 0x26 ], %g1 4000b558: 82 00 60 01 inc %g1 4000b55c: c2 30 a0 26 sth %g1, [ %g2 + 0x26 ] if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 4000b560: 83 28 60 10 sll %g1, 0x10, %g1 4000b564: 83 30 60 10 srl %g1, 0x10, %g1 4000b568: 80 a0 60 05 cmp %g1, 5 4000b56c: 18 80 00 1b bgu 4000b5d8 4000b570: 01 00 00 00 nop /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 4000b574: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000b578: 80 a0 60 03 cmp %g1, 3 4000b57c: 12 bf ff ef bne 4000b538 4000b580: 80 a0 60 04 cmp %g1, 4 result = IMFS_evaluate_hard_link( node, flags ); 4000b584: 90 10 00 18 mov %i0, %o0 4000b588: 7f ff fe ea call 4000b130 4000b58c: 92 10 00 19 mov %i1, %o1 else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 4000b590: 80 a2 20 00 cmp %o0, 0 4000b594: 12 80 00 09 bne 4000b5b8 4000b598: c2 04 63 20 ld [ %l1 + 0x320 ], %g1 4000b59c: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000b5a0: 82 00 7f fd add %g1, -3, %g1 4000b5a4: 80 a0 60 01 cmp %g1, 1 4000b5a8: 08 bf ff ea bleu 4000b550 4000b5ac: c4 04 63 20 ld [ %l1 + 0x320 ], %g2 4000b5b0: 90 10 20 00 clr %o0 <== NOT EXECUTED /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 4000b5b4: c2 04 63 20 ld [ %l1 + 0x320 ], %g1 4000b5b8: c0 30 60 26 clrh [ %g1 + 0x26 ] return result; } 4000b5bc: 81 c7 e0 08 ret 4000b5c0: 91 e8 00 08 restore %g0, %o0, %o0 if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); 4000b5c4: 90 10 00 18 mov %i0, %o0 4000b5c8: 7f ff ff 9e call 4000b440 4000b5cc: 92 10 00 19 mov %i1, %o1 } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 4000b5d0: 10 bf ff f1 b 4000b594 4000b5d4: 80 a2 20 00 cmp %o0, 0 */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; rtems_set_errno_and_return_minus_one( ELOOP ); 4000b5d8: 40 00 0e 05 call 4000edec <__errno> 4000b5dc: c0 30 a0 26 clrh [ %g2 + 0x26 ] 4000b5e0: 82 10 20 5c mov 0x5c, %g1 4000b5e4: c2 22 00 00 st %g1, [ %o0 ] 4000b5e8: 90 10 3f ff mov -1, %o0 */ rtems_filesystem_link_counts = 0; return result; } 4000b5ec: 81 c7 e0 08 ret 4000b5f0: 91 e8 00 08 restore %g0, %o0, %o0 4000b440 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4000b440: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *jnode = node->node_access; 4000b444: e0 06 00 00 ld [ %i0 ], %l0 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 4000b448: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000b44c: 80 a0 60 04 cmp %g1, 4 4000b450: 22 80 00 05 be,a 4000b464 4000b454: c2 04 20 08 ld [ %l0 + 8 ], %g1 rtems_fatal_error_occurred (0xABCD0000); 4000b458: 7f ff ed 70 call 40006a18 <== NOT EXECUTED 4000b45c: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED if ( !jnode->Parent ) 4000b460: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 4000b464: 80 a0 60 00 cmp %g1, 0 4000b468: 02 80 00 28 be 4000b508 4000b46c: 01 00 00 00 nop /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 4000b470: c2 26 00 00 st %g1, [ %i0 ] rtems_filesystem_get_sym_start_loc( 4000b474: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 4000b478: c2 48 80 00 ldsb [ %g2 ], %g1 4000b47c: 80 a0 60 2f cmp %g1, 0x2f 4000b480: 02 80 00 15 be 4000b4d4 4000b484: 80 a0 60 5c cmp %g1, 0x5c 4000b488: 02 80 00 13 be 4000b4d4 4000b48c: 80 a0 60 00 cmp %g1, 0 4000b490: 02 80 00 11 be 4000b4d4 4000b494: 90 10 20 00 clr %o0 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 4000b498: 90 02 00 02 add %o0, %g2, %o0 4000b49c: 94 10 00 18 mov %i0, %o2 4000b4a0: 7f ff ff 3f call 4000b19c 4000b4a4: 92 10 00 19 mov %i1, %o1 4000b4a8: a0 10 00 08 mov %o0, %l0 &jnode->info.sym_link.name[i], flags, node ); IMFS_Set_handlers( node ); 4000b4ac: 7f ff fe e5 call 4000b040 4000b4b0: 90 10 00 18 mov %i0, %o0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 4000b4b4: 90 10 00 18 mov %i0, %o0 4000b4b8: 7f ff ff 00 call 4000b0b8 4000b4bc: 92 10 00 19 mov %i1, %o1 4000b4c0: 80 a2 20 00 cmp %o0, 0 4000b4c4: 02 80 00 15 be 4000b518 4000b4c8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4000b4cc: 81 c7 e0 08 ret 4000b4d0: 91 e8 00 10 restore %g0, %l0, %o0 * root depending on the symbolic links path. */ node->node_access = jnode->Parent; rtems_filesystem_get_sym_start_loc( 4000b4d4: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000b4d8: c6 00 63 20 ld [ %g1 + 0x320 ], %g3 ! 40019f20 4000b4dc: 90 10 20 01 mov 1, %o0 4000b4e0: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 4000b4e4: c2 26 00 00 st %g1, [ %i0 ] 4000b4e8: c4 00 e0 18 ld [ %g3 + 0x18 ], %g2 4000b4ec: c4 26 20 04 st %g2, [ %i0 + 4 ] 4000b4f0: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 4000b4f4: c2 26 20 08 st %g1, [ %i0 + 8 ] 4000b4f8: c4 00 e0 20 ld [ %g3 + 0x20 ], %g2 4000b4fc: c4 26 20 0c st %g2, [ %i0 + 0xc ] 4000b500: 10 bf ff e6 b 4000b498 4000b504: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 ); 4000b508: 7f ff ed 44 call 40006a18 <== NOT EXECUTED 4000b50c: 11 2e b4 00 sethi %hi(0xbad00000), %o0 <== NOT EXECUTED 4000b510: 10 bf ff d8 b 4000b470 <== NOT EXECUTED 4000b514: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4000b518: 40 00 0e 35 call 4000edec <__errno> <== NOT EXECUTED 4000b51c: a0 10 3f ff mov -1, %l0 <== NOT EXECUTED 4000b520: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 4000b524: 10 bf ff ea b 4000b4cc <== NOT EXECUTED 4000b528: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000e1d8 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 4000e1d8: 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(); 4000e1dc: 7f ff f7 d6 call 4000c134 4000e1e0: f0 06 00 00 ld [ %i0 ], %i0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4000e1e4: c2 16 20 38 lduh [ %i0 + 0x38 ], %g1 4000e1e8: 91 2a 20 10 sll %o0, 0x10, %o0 4000e1ec: 91 32 20 10 srl %o0, 0x10, %o0 4000e1f0: 80 a2 00 01 cmp %o0, %g1 4000e1f4: 02 80 00 04 be 4000e204 4000e1f8: 80 a2 20 00 cmp %o0, 0 4000e1fc: 12 80 00 13 bne 4000e248 <== NOT EXECUTED 4000e200: 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 ) ) ) 4000e204: 83 2e 60 10 sll %i1, 0x10, %g1 4000e208: 83 30 60 10 srl %g1, 0x10, %g1 4000e20c: 82 08 7e 00 and %g1, -512, %g1 4000e210: 80 a0 60 00 cmp %g1, 0 4000e214: 12 80 00 0d bne 4000e248 4000e218: 90 07 bf f0 add %fp, -16, %o0 rtems_set_errno_and_return_minus_one( EPERM ); jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO); 4000e21c: c2 16 20 2e lduh [ %i0 + 0x2e ], %g1 jnode->st_mode |= mode; 4000e220: 82 08 7e 00 and %g1, -512, %g1 4000e224: 82 10 40 19 or %g1, %i1, %g1 IMFS_update_ctime( jnode ); 4000e228: 92 10 20 00 clr %o1 4000e22c: 7f ff f7 c6 call 4000c144 4000e230: c2 36 20 2e sth %g1, [ %i0 + 0x2e ] 4000e234: c2 07 bf f0 ld [ %fp + -16 ], %g1 4000e238: 84 10 20 00 clr %g2 4000e23c: c2 26 20 44 st %g1, [ %i0 + 0x44 ] return 0; } 4000e240: 81 c7 e0 08 ret 4000e244: 91 e8 00 02 restore %g0, %g2, %o0 /* * Change only the RWX permissions on the jnode to mode. */ if ( mode & (~ (S_IRWXU | S_IRWXG | S_IRWXO ) ) ) rtems_set_errno_and_return_minus_one( EPERM ); 4000e248: 40 00 02 e9 call 4000edec <__errno> 4000e24c: 01 00 00 00 nop 4000e250: 82 10 20 01 mov 1, %g1 ! 1 4000e254: 84 10 3f ff mov -1, %g2 4000e258: 10 bf ff fa b 4000e240 4000e25c: c2 22 00 00 st %g1, [ %o0 ] 4000b8c8 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 4000b8c8: 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 ); 4000b8cc: 80 a6 20 00 cmp %i0, 0 4000b8d0: 02 80 00 18 be 4000b930 4000b8d4: 11 10 00 63 sethi %hi(0x40018c00), %o0 if ( !name ) 4000b8d8: 80 a6 60 00 cmp %i1, 0 4000b8dc: 12 80 00 04 bne 4000b8ec 4000b8e0: 80 a6 20 00 cmp %i0, 0 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 4000b8e4: 81 c7 e0 08 ret 4000b8e8: 91 e8 20 00 restore %g0, 0, %o0 assert( directory ); if ( !name ) return 0; assert( name ); if ( !directory ) 4000b8ec: 02 80 00 0f be 4000b928 4000b8f0: 90 10 00 19 mov %i1, %o0 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 4000b8f4: 13 10 00 67 sethi %hi(0x40019c00), %o1 4000b8f8: 40 00 11 cb call 40010024 4000b8fc: 92 12 62 a0 or %o1, 0x2a0, %o1 ! 40019ea0 4000b900: 80 a2 20 00 cmp %o0, 0 4000b904: 02 80 00 09 be 4000b928 4000b908: 90 10 00 19 mov %i1, %o0 return directory; if ( !strcmp( name, dotdotname ) ) 4000b90c: 13 10 00 67 sethi %hi(0x40019c00), %o1 4000b910: 40 00 11 c5 call 40010024 4000b914: 92 12 62 a8 or %o1, 0x2a8, %o1 ! 40019ea8 4000b918: 80 a2 20 00 cmp %o0, 0 4000b91c: 32 80 00 0c bne,a 4000b94c 4000b920: e0 06 20 4c ld [ %i0 + 0x4c ], %l0 return directory->Parent; 4000b924: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 4000b928: 81 c7 e0 08 ret <== NOT EXECUTED 4000b92c: 81 e8 00 00 restore <== NOT EXECUTED /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 4000b930: 15 10 00 63 sethi %hi(0x40018c00), %o2 <== NOT EXECUTED 4000b934: 90 12 23 10 or %o0, 0x310, %o0 <== NOT EXECUTED 4000b938: 94 12 a3 60 or %o2, 0x360, %o2 <== NOT EXECUTED 4000b93c: 7f ff d9 85 call 40001f50 <__assert> <== NOT EXECUTED 4000b940: 92 10 20 2a mov 0x2a, %o1 <== NOT EXECUTED if ( !name ) 4000b944: 10 bf ff e6 b 4000b8dc <== NOT EXECUTED 4000b948: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000b94c: b0 06 20 50 add %i0, 0x50, %i0 return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; !_Chain_Is_tail( the_chain, the_node ); 4000b950: 80 a4 00 18 cmp %l0, %i0 4000b954: 12 80 00 07 bne 4000b970 4000b958: 92 04 20 0c add %l0, 0xc, %o1 4000b95c: 81 c7 e0 08 ret 4000b960: 91 e8 20 00 restore %g0, 0, %o0 4000b964: 80 a6 00 10 cmp %i0, %l0 4000b968: 02 bf ff df be 4000b8e4 4000b96c: 92 04 20 0c add %l0, 0xc, %o1 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; if ( !strcmp( name, the_jnode->name ) ) 4000b970: 40 00 11 ad call 40010024 4000b974: 90 10 00 19 mov %i1, %o0 4000b978: 80 a2 20 00 cmp %o0, 0 4000b97c: 32 bf ff fa bne,a 4000b964 4000b980: e0 04 00 00 ld [ %l0 ], %l0 4000b984: b0 10 00 10 mov %l0, %i0 4000b988: 81 c7 e0 08 ret 4000b98c: 81 e8 00 00 restore 40017a38 : ((IMFS_jnode_t *)( Chain_Head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 40017a38: 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; 40017a3c: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 40017a40: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 40017a44: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; 40017a48: e0 06 20 18 ld [ %i0 + 0x18 ], %l0 loc = temp_mt_entry->mt_fs_root; 40017a4c: c2 27 bf ec st %g1, [ %fp + -20 ] 40017a50: c4 3f bf f0 std %g2, [ %fp + -16 ] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 40017a54: c0 26 20 18 clr [ %i0 + 0x18 ] * 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; 40017a58: e0 27 bf e8 st %l0, [ %fp + -24 ] 40017a5c: a2 07 bf e8 add %fp, -24, %l1 temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; 40017a60: e0 27 bf e8 st %l0, [ %fp + -24 ] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 40017a64: f0 04 20 08 ld [ %l0 + 8 ], %i0 loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 40017a68: 7f ff fd d0 call 400171a8 40017a6c: 90 10 00 11 mov %l1, %o0 if ( jnode->type != IMFS_DIRECTORY ) { 40017a70: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40017a74: 80 a0 60 01 cmp %g1, 1 40017a78: 12 80 00 1c bne 40017ae8 40017a7c: 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 ) ) { 40017a80: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 40017a84: 80 a0 40 02 cmp %g1, %g2 40017a88: 02 80 00 18 be 40017ae8 40017a8c: 80 a4 20 00 cmp %l0, 0 result = IMFS_unlink( &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 40017a90: 02 80 00 1e be 40017b08 40017a94: 01 00 00 00 nop if ( jnode->type == IMFS_DIRECTORY ) { 40017a98: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40017a9c: 80 a0 60 01 cmp %g1, 1 40017aa0: 32 bf ff f1 bne,a 40017a64 40017aa4: e0 27 bf e8 st %l0, [ %fp + -24 ] <== NOT EXECUTED if ( jnode_has_children( jnode ) ) 40017aa8: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 40017aac: 82 04 20 50 add %l0, 0x50, %g1 40017ab0: 80 a0 80 01 cmp %g2, %g1 40017ab4: 22 bf ff ec be,a 40017a64 40017ab8: e0 27 bf e8 st %l0, [ %fp + -24 ] jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 40017abc: 80 a0 a0 00 cmp %g2, 0 40017ac0: 02 80 00 12 be 40017b08 40017ac4: 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; IMFS_Set_handlers( &loc ); 40017ac8: 90 10 00 11 mov %l1, %o0 temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; 40017acc: e0 27 bf e8 st %l0, [ %fp + -24 ] IMFS_Set_handlers( &loc ); 40017ad0: 7f ff fd b6 call 400171a8 40017ad4: f0 04 20 08 ld [ %l0 + 8 ], %i0 if ( jnode->type != IMFS_DIRECTORY ) { 40017ad8: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40017adc: 80 a0 60 01 cmp %g1, 1 40017ae0: 02 bf ff e8 be 40017a80 40017ae4: 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 ) ) { result = IMFS_unlink( &loc ); 40017ae8: 7f ff b3 ed call 40004a9c 40017aec: 90 10 00 11 mov %l1, %o0 if (result != 0) 40017af0: 80 a2 20 00 cmp %o0, 0 40017af4: 12 80 00 07 bne 40017b10 40017af8: a0 10 00 18 mov %i0, %l0 return -1; jnode = next; } if ( jnode != NULL ) { 40017afc: 80 a4 20 00 cmp %l0, 0 40017b00: 32 bf ff e7 bne,a 40017a9c 40017b04: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 } } } while (jnode != NULL); return 0; } 40017b08: 81 c7 e0 08 ret 40017b0c: 91 e8 20 00 restore %g0, 0, %o0 jnode = next; } if ( jnode != NULL ) { if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); 40017b10: 81 c7 e0 08 ret <== NOT EXECUTED 40017b14: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 4000b990 : IMFS_token_types IMFS_get_token( const char *path, char *token, int *token_len ) { 4000b990: 9d e3 bf 98 save %sp, -104, %sp register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 4000b994: c4 0e 00 00 ldub [ %i0 ], %g2 while ( (!IMFS_is_separator(c)) && (i <= IMFS_NAME_MAX) ) { 4000b998: 87 28 a0 18 sll %g2, 0x18, %g3 4000b99c: 83 38 e0 18 sra %g3, 0x18, %g1 4000b9a0: 80 a0 60 2f cmp %g1, 0x2f 4000b9a4: 02 80 00 28 be 4000ba44 4000b9a8: 80 a0 60 5c cmp %g1, 0x5c 4000b9ac: 02 80 00 26 be 4000ba44 4000b9b0: 80 a0 60 00 cmp %g1, 0 4000b9b4: 02 80 00 41 be 4000bab8 4000b9b8: 86 10 20 00 clr %g3 token[i] = c; 4000b9bc: c4 2e 40 00 stb %g2, [ %i1 ] return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 4000b9c0: 86 00 e0 01 inc %g3 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i <= IMFS_NAME_MAX) ) { 4000b9c4: c2 48 c0 18 ldsb [ %g3 + %i0 ], %g1 4000b9c8: 80 a0 60 2f cmp %g1, 0x2f 4000b9cc: 02 80 00 07 be 4000b9e8 4000b9d0: c4 08 c0 18 ldub [ %g3 + %i0 ], %g2 4000b9d4: 80 a0 60 5c cmp %g1, 0x5c 4000b9d8: 02 80 00 04 be 4000b9e8 4000b9dc: 80 a0 60 00 cmp %g1, 0 4000b9e0: 12 80 00 12 bne 4000ba28 4000b9e4: 80 a0 e0 20 cmp %g3, 0x20 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 4000b9e8: 82 00 c0 19 add %g3, %i1, %g1 4000b9ec: c4 48 7f ff ldsb [ %g1 + -1 ], %g2 4000b9f0: 80 a0 a0 00 cmp %g2, 0 4000b9f4: 32 80 00 1c bne,a 4000ba64 4000b9f8: c0 2e 40 03 clrb [ %i1 + %g3 ] /* * Set token_len to the number of characters copied. */ *token_len = i; 4000b9fc: c6 26 80 00 st %g3, [ %i2 ] <== NOT EXECUTED * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 4000ba00: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4000ba04: 13 10 00 63 sethi %hi(0x40018c00), %o1 <== NOT EXECUTED 4000ba08: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED 4000ba0c: 40 00 11 86 call 40010024 <== NOT EXECUTED 4000ba10: 92 12 61 10 or %o1, 0x110, %o1 <== NOT EXECUTED 4000ba14: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000ba18: 12 80 00 1c bne 4000ba88 <== NOT EXECUTED 4000ba1c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 4000ba20: 81 c7 e0 08 ret 4000ba24: 81 e8 00 00 restore /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i <= IMFS_NAME_MAX) ) { 4000ba28: 14 bf ff f1 bg 4000b9ec 4000ba2c: 82 00 c0 19 add %g3, %i1, %g1 token[i] = c; if ( i == IMFS_NAME_MAX ) 4000ba30: 80 a0 e0 20 cmp %g3, 0x20 4000ba34: 12 bf ff e3 bne 4000b9c0 4000ba38: c4 28 c0 19 stb %g2, [ %g3 + %i1 ] 4000ba3c: 81 c7 e0 08 ret 4000ba40: 91 e8 20 04 restore %g0, 4, %o0 /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; 4000ba44: c4 2e 40 00 stb %g2, [ %i1 ] if ( token[i] != '\0' ) { 4000ba48: 80 a0 e0 00 cmp %g3, 0 4000ba4c: 82 10 20 01 mov 1, %g1 4000ba50: 02 80 00 16 be 4000baa8 4000ba54: b0 10 20 01 mov 1, %i0 /* * Set token_len to the number of characters copied. */ *token_len = i; 4000ba58: c2 26 80 00 st %g1, [ %i2 ] 4000ba5c: 81 c7 e0 08 ret 4000ba60: 81 e8 00 00 restore 4000ba64: c6 26 80 00 st %g3, [ %i2 ] * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 4000ba68: 90 10 00 19 mov %i1, %o0 4000ba6c: 13 10 00 63 sethi %hi(0x40018c00), %o1 4000ba70: b0 10 20 02 mov 2, %i0 4000ba74: 40 00 11 6c call 40010024 4000ba78: 92 12 61 10 or %o1, 0x110, %o1 4000ba7c: 80 a2 20 00 cmp %o0, 0 4000ba80: 02 bf ff e8 be 4000ba20 4000ba84: 90 10 00 19 mov %i1, %o0 type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 4000ba88: 13 10 00 63 sethi %hi(0x40018c00), %o1 4000ba8c: 40 00 11 66 call 40010024 4000ba90: 92 12 63 70 or %o1, 0x370, %o1 ! 40018f70 <_CPU_Trap_slot_template+0x70> 4000ba94: 80 a0 00 08 cmp %g0, %o0 4000ba98: 82 60 20 00 subx %g0, 0, %g1 4000ba9c: b0 08 60 02 and %g1, 2, %i0 4000baa0: 81 c7 e0 08 ret 4000baa4: 91 ee 20 01 restore %i0, 1, %o0 type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { token[i] = '\0'; 4000baa8: 82 10 20 00 clr %g1 <== NOT EXECUTED /* * Set token_len to the number of characters copied. */ *token_len = i; 4000baac: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { token[i] = '\0'; 4000bab0: 81 c7 e0 08 ret <== NOT EXECUTED 4000bab4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; 4000bab8: c4 2e 40 00 stb %g2, [ %i1 ] 4000babc: 82 10 20 00 clr %g1 4000bac0: 10 bf ff e6 b 4000ba58 4000bac4: b0 10 20 00 clr %i0 4000bac8 : 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 ) { 4000bac8: 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, 4000bacc: 03 10 00 66 sethi %hi(0x40019800), %g1 4000bad0: 84 10 20 00 clr %g2 4000bad4: c6 00 61 00 ld [ %g1 + 0x100 ], %g3 4000bad8: 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) { 4000badc: 80 a0 40 03 cmp %g1, %g3 4000bae0: 02 80 00 06 be 4000baf8 4000bae4: 84 00 a0 01 inc %g2 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); 4000bae8: 80 a0 a0 06 cmp %g2, 6 4000baec: 12 bf ff fc bne 4000badc 4000baf0: 83 28 60 01 sll %g1, 1, %g1 4000baf4: 86 10 20 80 mov 0x80, %g3 <== NOT EXECUTED bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { is_valid = TRUE; } } *dest_bytes_per_block = ((is_valid) 4000baf8: 03 10 00 6a sethi %hi(0x4001a800), %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( 4000bafc: 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) 4000bb00: c6 20 61 40 st %g3, [ %g1 + 0x140 ] * 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( 4000bb04: 92 10 20 01 mov 1, %o1 4000bb08: 90 10 20 00 clr %o0 4000bb0c: 15 10 00 62 sethi %hi(0x40018800), %o2 4000bb10: 17 00 00 10 sethi %hi(0x4000), %o3 4000bb14: 94 12 a3 e8 or %o2, 0x3e8, %o2 4000bb18: 40 00 09 4e call 4000e050 4000bb1c: 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; 4000bb20: 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( 4000bb24: 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; 4000bb28: f2 26 20 20 st %i1, [ %i0 + 0x20 ] "", ( S_IFDIR | 0755 ), NULL ); temp_mt_entry->mt_fs_root.handlers = directory_handlers; 4000bb2c: 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; 4000bb30: 13 10 00 68 sethi %hi(0x4001a000), %o1 4000bb34: 90 06 20 30 add %i0, 0x30, %o0 4000bb38: 40 00 0e 82 call 4000f540 4000bb3c: 92 12 62 18 or %o1, 0x218, %o1 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 4000bb40: 90 10 20 01 mov 1, %o0 4000bb44: 7f ff da 9d call 400025b8 4000bb48: 92 10 20 0c mov 0xc, %o1 if ( !fs_info ){ 4000bb4c: 80 a2 20 00 cmp %o0, 0 4000bb50: 02 80 00 0a be 4000bb78 4000bb54: 82 10 20 01 mov 1, %g1 fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 4000bb58: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 4000bb5c: 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; 4000bb60: 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; 4000bb64: f6 22 20 08 st %i3, [ %o0 + 8 ] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 4000bb68: 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; 4000bb6c: 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; } 4000bb70: 81 c7 e0 08 ret 4000bb74: 91 e8 20 00 restore %g0, 0, %o0 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ){ free(temp_mt_entry->mt_fs_root.node_access); 4000bb78: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 <== NOT EXECUTED 4000bb7c: 7f ff d9 c8 call 4000229c <== NOT EXECUTED 4000bb80: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 4000bb84: 40 00 0c 9a call 4000edec <__errno> <== NOT EXECUTED 4000bb88: 01 00 00 00 nop <== NOT EXECUTED 4000bb8c: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 4000bb90: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000bb94: 81 c7 e0 08 ret <== NOT EXECUTED 4000bb98: 81 e8 00 00 restore <== NOT EXECUTED 400047e4 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 400047e4: 9d e3 bf 58 save %sp, -168, %sp /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 400047e8: c2 06 00 00 ld [ %i0 ], %g1 400047ec: c2 27 bf dc st %g1, [ %fp + -36 ] if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 400047f0: c4 10 60 30 lduh [ %g1 + 0x30 ], %g2 400047f4: 80 a0 a0 07 cmp %g2, 7 400047f8: 18 80 00 1b bgu 40004864 400047fc: 90 10 00 1a mov %i2, %o0 /* * Remove any separators at the end of the string. */ IMFS_get_token( token, new_name, &i ); 40004800: a0 07 bf bb add %fp, -69, %l0 40004804: 94 07 bf f4 add %fp, -12, %o2 40004808: 7f ff ff 6a call 400045b0 4000480c: 92 10 00 10 mov %l0, %o1 /* * Create a new link node. */ new_node = IMFS_create_node( 40004810: 90 10 00 19 mov %i1, %o0 40004814: 94 10 00 10 mov %l0, %o2 40004818: 92 10 20 03 mov 3, %o1 4000481c: 17 00 00 28 sethi %hi(0xa000), %o3 40004820: 98 07 bf dc add %fp, -36, %o4 40004824: 40 00 49 f8 call 40017004 40004828: 96 12 e1 ff or %o3, 0x1ff, %o3 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 4000482c: 80 a2 20 00 cmp %o0, 0 40004830: 02 80 00 13 be 4000487c 40004834: c4 07 bf dc ld [ %fp + -36 ], %g2 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); 40004838: 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++; 4000483c: c2 10 a0 30 lduh [ %g2 + 0x30 ], %g1 IMFS_update_ctime( info.hard_link.link_node ); 40004840: 92 10 20 00 clr %o1 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 40004844: 82 00 60 01 inc %g1 IMFS_update_ctime( info.hard_link.link_node ); 40004848: 40 00 02 00 call 40005048 4000484c: c2 30 a0 30 sth %g1, [ %g2 + 0x30 ] 40004850: c4 07 bf ec ld [ %fp + -20 ], %g2 40004854: c2 07 bf dc ld [ %fp + -36 ], %g1 40004858: c4 20 60 44 st %g2, [ %g1 + 0x44 ] return 0; } 4000485c: 81 c7 e0 08 ret 40004860: 91 e8 20 00 restore %g0, 0, %o0 * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) rtems_set_errno_and_return_minus_one( EMLINK ); 40004864: 40 00 87 25 call 400264f8 <__errno> 40004868: b0 10 3f ff mov -1, %i0 4000486c: 82 10 20 1f mov 0x1f, %g1 40004870: c2 22 00 00 st %g1, [ %o0 ] 40004874: 81 c7 e0 08 ret 40004878: 81 e8 00 00 restore ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 4000487c: 40 00 87 1f call 400264f8 <__errno> <== NOT EXECUTED 40004880: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004884: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40004888: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000488c: 81 c7 e0 08 ret <== NOT EXECUTED 40004890: 81 e8 00 00 restore <== NOT EXECUTED 4001c4f8 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 4001c4f8: 9d e3 bf 98 save %sp, -104, %sp block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 4001c4fc: 80 a6 20 00 cmp %i0, 0 4001c500: 02 80 00 26 be 4001c598 4001c504: 92 10 21 69 mov 0x169, %o1 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4001c508: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4001c50c: 80 a0 60 05 cmp %g1, 5 4001c510: 02 80 00 0b be 4001c53c 4001c514: 11 10 00 e5 sethi %hi(0x40039400), %o0 4001c518: 92 10 21 6d mov 0x16d, %o1 <== NOT EXECUTED 4001c51c: 90 12 22 10 or %o0, 0x210, %o0 <== NOT EXECUTED 4001c520: 15 10 00 e5 sethi %hi(0x40039400), %o2 <== NOT EXECUTED 4001c524: 7f ff a1 ff call 40004d20 <__assert> <== NOT EXECUTED 4001c528: 94 12 a2 70 or %o2, 0x270, %o2 ! 40039670 <_POSIX_Threads_Default_attributes+0x98> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) 4001c52c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 4001c530: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 4001c534: 12 80 00 13 bne 4001c580 <== NOT EXECUTED 4001c538: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 4001c53c: 90 10 00 18 mov %i0, %o0 4001c540: 92 10 00 19 mov %i1, %o1 4001c544: 7f ff fe 54 call 4001be94 4001c548: 94 10 20 01 mov 1, %o2 if ( *block_entry_ptr ) 4001c54c: 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 ); 4001c550: b2 10 00 08 mov %o0, %i1 if ( *block_entry_ptr ) 4001c554: 80 a0 60 00 cmp %g1, 0 4001c558: 12 80 00 0e bne 4001c590 4001c55c: b0 10 20 00 clr %i0 #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 4001c560: 7f ff fe 40 call 4001be60 4001c564: b0 10 20 01 mov 1, %i0 if ( !memory ) 4001c568: 80 a2 20 00 cmp %o0, 0 4001c56c: 02 80 00 14 be 4001c5bc 4001c570: 01 00 00 00 nop return 1; *block_entry_ptr = memory; 4001c574: d0 26 40 00 st %o0, [ %i1 ] return 0; } 4001c578: 81 c7 e0 08 ret 4001c57c: 91 e8 20 00 restore %g0, 0, %o0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); 4001c580: 40 00 27 de call 400264f8 <__errno> <== NOT EXECUTED 4001c584: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001c588: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 4001c58c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001c590: 81 c7 e0 08 ret 4001c594: 81 e8 00 00 restore ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 4001c598: 11 10 00 e5 sethi %hi(0x40039400), %o0 <== NOT EXECUTED 4001c59c: 15 10 00 e5 sethi %hi(0x40039400), %o2 <== NOT EXECUTED 4001c5a0: 90 12 22 10 or %o0, 0x210, %o0 <== NOT EXECUTED 4001c5a4: 7f ff a1 df call 40004d20 <__assert> <== NOT EXECUTED 4001c5a8: 94 12 a2 60 or %o2, 0x260, %o2 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); 4001c5ac: 40 00 27 d3 call 400264f8 <__errno> <== NOT EXECUTED 4001c5b0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001c5b4: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 4001c5b8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001c5bc: 81 c7 e0 08 ret <== NOT EXECUTED 4001c5c0: 81 e8 00 00 restore <== NOT EXECUTED 4001c5c4 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 4001c5c4: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 4001c5c8: 80 a6 20 00 cmp %i0, 0 4001c5cc: 02 80 00 56 be 4001c724 4001c5d0: 92 10 21 31 mov 0x131, %o1 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4001c5d4: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4001c5d8: 80 a0 60 05 cmp %g1, 5 4001c5dc: 02 80 00 0b be 4001c608 4001c5e0: 92 10 21 35 mov 0x135, %o1 4001c5e4: 11 10 00 e5 sethi %hi(0x40039400), %o0 <== NOT EXECUTED 4001c5e8: 90 12 22 10 or %o0, 0x210, %o0 ! 40039610 <_POSIX_Threads_Default_attributes+0x38> <== NOT EXECUTED 4001c5ec: 15 10 00 e5 sethi %hi(0x40039400), %o2 <== NOT EXECUTED 4001c5f0: 7f ff a1 cc call 40004d20 <__assert> <== NOT EXECUTED 4001c5f4: 94 12 a2 70 or %o2, 0x270, %o2 ! 40039670 <_POSIX_Threads_Default_attributes+0x98> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) 4001c5f8: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 4001c5fc: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 4001c600: 12 80 00 3d bne 4001c6f4 <== NOT EXECUTED 4001c604: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 4001c608: 03 10 00 f7 sethi %hi(0x4003dc00), %g1 4001c60c: e2 00 61 54 ld [ %g1 + 0x154 ], %l1 ! 4003dd54 4001c610: a1 34 60 02 srl %l1, 2, %l0 4001c614: 92 10 00 10 mov %l0, %o1 4001c618: 7f ff 9a 93 call 40003064 <.umul> 4001c61c: 90 04 20 01 add %l0, 1, %o0 4001c620: 92 10 00 10 mov %l0, %o1 4001c624: 7f ff 9a 90 call 40003064 <.umul> 4001c628: 90 02 20 01 inc %o0 4001c62c: 92 10 00 11 mov %l1, %o1 4001c630: 7f ff 9a 8d call 40003064 <.umul> 4001c634: 90 02 3f ff add %o0, -1, %o0 4001c638: 80 a6 40 08 cmp %i1, %o0 4001c63c: 1a 80 00 34 bcc 4001c70c 4001c640: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 4001c644: e0 06 20 4c ld [ %i0 + 0x4c ], %l0 4001c648: 80 a6 40 10 cmp %i1, %l0 4001c64c: 04 80 00 24 ble 4001c6dc 4001c650: 82 10 20 00 clr %g1 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 4001c654: 92 10 00 11 mov %l1, %o1 4001c658: 40 00 64 87 call 40035874 <.div> 4001c65c: 90 10 00 19 mov %i1, %o0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 4001c660: 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; 4001c664: a4 10 00 08 mov %o0, %l2 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 4001c668: 40 00 64 83 call 40035874 <.div> 4001c66c: 90 10 00 10 mov %l0, %o0 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4001c670: 80 a4 80 08 cmp %l2, %o0 4001c674: 0a 80 00 1c bcs 4001c6e4 4001c678: a2 10 00 08 mov %o0, %l1 4001c67c: 10 80 00 05 b 4001c690 4001c680: a0 10 00 08 mov %o0, %l0 4001c684: 80 a4 80 10 cmp %l2, %l0 4001c688: 2a 80 00 18 bcs,a 4001c6e8 4001c68c: f2 26 20 4c st %i1, [ %i0 + 0x4c ] if ( IMFS_memfile_addblock( the_jnode, block ) ) { 4001c690: 92 10 00 10 mov %l0, %o1 4001c694: 7f ff ff 99 call 4001c4f8 4001c698: 90 10 00 18 mov %i0, %o0 4001c69c: 80 a2 20 00 cmp %o0, 0 4001c6a0: 22 bf ff f9 be,a 4001c684 4001c6a4: a0 04 20 01 inc %l0 for ( ; block>=old_blocks ; block-- ) { 4001c6a8: 10 80 00 06 b 4001c6c0 <== NOT EXECUTED 4001c6ac: 80 a4 40 10 cmp %l1, %l0 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 4001c6b0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001c6b4: 7f ff fe ac call 4001c164 <== NOT EXECUTED 4001c6b8: 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-- ) { 4001c6bc: 80 a4 40 10 cmp %l1, %l0 <== NOT EXECUTED 4001c6c0: 08 bf ff fc bleu 4001c6b0 <== NOT EXECUTED 4001c6c4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 4001c6c8: 40 00 27 8c call 400264f8 <__errno> <== NOT EXECUTED 4001c6cc: 01 00 00 00 nop <== NOT EXECUTED 4001c6d0: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 4001c6d4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001c6d8: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 4001c6dc: 81 c7 e0 08 ret 4001c6e0: 91 e8 00 01 restore %g0, %g1, %o0 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 4001c6e4: f2 26 20 4c st %i1, [ %i0 + 0x4c ] <== NOT EXECUTED 4001c6e8: 82 10 20 00 clr %g1 return 0; } 4001c6ec: 81 c7 e0 08 ret 4001c6f0: 91 e8 00 01 restore %g0, %g1, %o0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); 4001c6f4: 40 00 27 81 call 400264f8 <__errno> <== NOT EXECUTED 4001c6f8: 01 00 00 00 nop <== NOT EXECUTED 4001c6fc: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 4001c700: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001c704: 10 bf ff f6 b 4001c6dc <== NOT EXECUTED 4001c708: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); 4001c70c: 40 00 27 7b call 400264f8 <__errno> <== NOT EXECUTED 4001c710: 01 00 00 00 nop <== NOT EXECUTED 4001c714: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4001c718: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001c71c: 10 bf ff f0 b 4001c6dc <== NOT EXECUTED 4001c720: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 4001c724: 11 10 00 e5 sethi %hi(0x40039400), %o0 <== NOT EXECUTED 4001c728: 15 10 00 e5 sethi %hi(0x40039400), %o2 <== NOT EXECUTED 4001c72c: 90 12 22 10 or %o0, 0x210, %o0 <== NOT EXECUTED 4001c730: 7f ff a1 7c call 40004d20 <__assert> <== NOT EXECUTED 4001c734: 94 12 a2 60 or %o2, 0x260, %o2 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); 4001c738: 40 00 27 70 call 400264f8 <__errno> <== NOT EXECUTED 4001c73c: 01 00 00 00 nop <== NOT EXECUTED 4001c740: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 4001c744: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001c748: 10 bf ff e5 b 4001c6dc <== NOT EXECUTED 4001c74c: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED 4001be94 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 4001be94: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 4001be98: 80 a6 20 00 cmp %i0, 0 4001be9c: 02 80 00 76 be 4001c074 4001bea0: 11 10 00 e5 sethi %hi(0x40039400), %o0 if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 4001bea4: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4001bea8: 80 a0 60 05 cmp %g1, 5 4001beac: 12 80 00 2f bne 4001bf68 4001beb0: 92 10 23 8a mov 0x38a, %o1 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 4001beb4: 03 10 00 f7 sethi %hi(0x4003dc00), %g1 4001beb8: c4 00 61 54 ld [ %g1 + 0x154 ], %g2 ! 4003dd54 4001bebc: a3 30 a0 02 srl %g2, 2, %l1 4001bec0: 82 04 7f ff add %l1, -1, %g1 4001bec4: 80 a6 40 01 cmp %i1, %g1 4001bec8: 08 80 00 20 bleu 4001bf48 4001becc: 80 a6 a0 00 cmp %i2, 0 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 4001bed0: 90 04 60 01 add %l1, 1, %o0 <== NOT EXECUTED 4001bed4: 7f ff 9c 64 call 40003064 <.umul> <== NOT EXECUTED 4001bed8: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 4001bedc: 82 02 3f ff add %o0, -1, %g1 <== NOT EXECUTED 4001bee0: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 4001bee4: 18 80 00 31 bgu 4001bfa8 <== NOT EXECUTED 4001bee8: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 4001beec: a0 26 40 11 sub %i1, %l1, %l0 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4001bef0: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 4001bef4: 40 00 67 0a call 40035b1c <.urem> <== NOT EXECUTED 4001bef8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 4001befc: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4001bf00: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 4001bf04: 40 00 66 5a call 4003586c <.udiv> <== NOT EXECUTED 4001bf08: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 4001bf0c: 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; 4001bf10: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 4001bf14: 02 80 00 4e be 4001c04c <== NOT EXECUTED 4001bf18: e0 06 20 54 ld [ %i0 + 0x54 ], %l0 <== NOT EXECUTED if ( !p ) { 4001bf1c: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 4001bf20: 02 80 00 63 be 4001c0ac <== NOT EXECUTED 4001bf24: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 4001bf28: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED 4001bf2c: c2 04 40 10 ld [ %l1 + %l0 ], %g1 <== NOT EXECUTED if ( !p1 ) { 4001bf30: 90 90 60 00 orcc %g1, 0, %o0 <== NOT EXECUTED 4001bf34: 02 80 00 65 be 4001c0c8 <== NOT EXECUTED 4001bf38: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) return 0; p[ doubly ] = (block_p) p1; } return (block_p *)&p1[ singly ]; 4001bf3c: 83 2c a0 02 sll %l2, 2, %g1 <== NOT EXECUTED 4001bf40: 81 c7 e0 08 ret <== NOT EXECUTED 4001bf44: 91 e8 40 08 restore %g1, %o0, %o0 <== NOT EXECUTED fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { 4001bf48: 02 80 00 12 be 4001bf90 4001bf4c: d0 06 20 50 ld [ %i0 + 0x50 ], %o0 if ( !p ) { 4001bf50: 80 a2 20 00 cmp %o0, 0 4001bf54: 02 80 00 4f be 4001c090 4001bf58: 01 00 00 00 nop p = memfile_alloc_block(); if ( !p ) return 0; info->indirect = p; } return &info->indirect[ my_block ]; 4001bf5c: 83 2e 60 02 sll %i1, 2, %g1 4001bf60: 81 c7 e0 08 ret 4001bf64: 91 e8 40 08 restore %g1, %o0, %o0 assert( the_jnode ); if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 4001bf68: 90 12 22 10 or %o0, 0x210, %o0 <== NOT EXECUTED 4001bf6c: 15 10 00 e5 sethi %hi(0x40039400), %o2 <== NOT EXECUTED 4001bf70: 7f ff a3 6c call 40004d20 <__assert> <== NOT EXECUTED 4001bf74: 94 12 a2 70 or %o2, 0x270, %o2 ! 40039670 <_POSIX_Threads_Default_attributes+0x98> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) 4001bf78: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 4001bf7c: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 4001bf80: 02 bf ff ce be 4001beb8 <== NOT EXECUTED 4001bf84: 03 10 00 f7 sethi %hi(0x4003dc00), %g1 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 4001bf88: 81 c7 e0 08 ret <== NOT EXECUTED 4001bf8c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED } if ( !p ) return 0; return &info->indirect[ my_block ]; 4001bf90: 83 2e 60 02 sll %i1, 2, %g1 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 4001bf94: 80 a2 20 00 cmp %o0, 0 4001bf98: 02 bf ff fc be 4001bf88 4001bf9c: b0 02 00 01 add %o0, %g1, %i0 /* * This means the requested block number is out of range. */ return 0; } 4001bfa0: 81 c7 e0 08 ret 4001bfa4: 81 e8 00 00 restore #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 4001bfa8: 90 02 20 01 inc %o0 <== NOT EXECUTED 4001bfac: 7f ff 9c 2e call 40003064 <.umul> <== NOT EXECUTED 4001bfb0: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 4001bfb4: 90 02 3f ff add %o0, -1, %o0 <== NOT EXECUTED 4001bfb8: 80 a6 40 08 cmp %i1, %o0 <== NOT EXECUTED 4001bfbc: 18 bf ff f3 bgu 4001bf88 <== NOT EXECUTED 4001bfc0: a0 26 40 10 sub %i1, %l0, %l0 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4001bfc4: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 4001bfc8: 40 00 66 d5 call 40035b1c <.urem> <== NOT EXECUTED 4001bfcc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 4001bfd0: 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; 4001bfd4: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 4001bfd8: 40 00 66 25 call 4003586c <.udiv> <== NOT EXECUTED 4001bfdc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 4001bfe0: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 4001bfe4: 40 00 66 22 call 4003586c <.udiv> <== NOT EXECUTED 4001bfe8: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 4001bfec: 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; 4001bff0: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 4001bff4: 40 00 66 ca call 40035b1c <.urem> <== NOT EXECUTED 4001bff8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 4001bffc: 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; 4001c000: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 4001c004: 02 80 00 38 be 4001c0e4 <== NOT EXECUTED 4001c008: e0 06 20 58 ld [ %i0 + 0x58 ], %l0 <== NOT EXECUTED if ( !p ) { 4001c00c: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 4001c010: 02 80 00 40 be 4001c110 <== NOT EXECUTED 4001c014: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 4001c018: a5 2c a0 02 sll %l2, 2, %l2 <== NOT EXECUTED 4001c01c: c2 04 80 10 ld [ %l2 + %l0 ], %g1 <== NOT EXECUTED if ( !p1 ) { 4001c020: a2 90 60 00 orcc %g1, 0, %l1 <== NOT EXECUTED 4001c024: 02 80 00 49 be 4001c148 <== NOT EXECUTED 4001c028: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 4001c02c: a1 2e 60 02 sll %i1, 2, %l0 <== NOT EXECUTED 4001c030: c2 04 00 11 ld [ %l0 + %l1 ], %g1 <== NOT EXECUTED if ( !p2 ) { 4001c034: 90 90 60 00 orcc %g1, 0, %o0 <== NOT EXECUTED 4001c038: 02 80 00 3d be 4001c12c <== NOT EXECUTED 4001c03c: 01 00 00 00 nop <== NOT EXECUTED p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; 4001c040: 83 2c e0 02 sll %l3, 2, %g1 <== NOT EXECUTED 4001c044: 81 c7 e0 08 ret <== NOT EXECUTED 4001c048: 91 e8 40 08 restore %g1, %o0, %o0 <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 4001c04c: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 4001c050: 02 bf ff ce be 4001bf88 <== NOT EXECUTED 4001c054: 83 2a 20 02 sll %o0, 2, %g1 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 4001c058: c4 04 00 01 ld [ %l0 + %g1 ], %g2 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly, singly, p, &p[singly] ); fflush(stdout); #endif return (block_p *)&p[ singly ]; 4001c05c: 87 2c a0 02 sll %l2, 2, %g3 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 4001c060: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4001c064: 02 bf ff c9 be 4001bf88 <== NOT EXECUTED 4001c068: b0 00 c0 02 add %g3, %g2, %i0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 4001c06c: 81 c7 e0 08 ret <== NOT EXECUTED 4001c070: 81 e8 00 00 restore <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 4001c074: 92 10 23 86 mov 0x386, %o1 <== NOT EXECUTED 4001c078: 90 12 22 10 or %o0, 0x210, %o0 <== NOT EXECUTED 4001c07c: 15 10 00 e5 sethi %hi(0x40039400), %o2 <== NOT EXECUTED 4001c080: 7f ff a3 28 call 40004d20 <__assert> <== NOT EXECUTED 4001c084: 94 12 a2 60 or %o2, 0x260, %o2 ! 40039660 <_POSIX_Threads_Default_attributes+0x88> <== NOT EXECUTED 4001c088: 81 c7 e0 08 ret <== NOT EXECUTED 4001c08c: 81 e8 00 00 restore <== NOT EXECUTED p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 4001c090: 7f ff ff 74 call 4001be60 4001c094: 01 00 00 00 nop if ( !p ) 4001c098: 80 a2 20 00 cmp %o0, 0 4001c09c: 02 bf ff bb be 4001bf88 4001c0a0: 01 00 00 00 nop return 0; info->indirect = p; 4001c0a4: 10 bf ff ae b 4001bf5c 4001c0a8: d0 26 20 50 st %o0, [ %i0 + 0x50 ] p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 4001c0ac: 7f ff ff 6d call 4001be60 <== NOT EXECUTED 4001c0b0: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 4001c0b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001c0b8: 02 bf ff b4 be 4001bf88 <== NOT EXECUTED 4001c0bc: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED return 0; info->doubly_indirect = p; 4001c0c0: 10 bf ff 9a b 4001bf28 <== NOT EXECUTED 4001c0c4: d0 26 20 54 st %o0, [ %i0 + 0x54 ] <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); 4001c0c8: 7f ff ff 66 call 4001be60 <== NOT EXECUTED 4001c0cc: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 4001c0d0: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 4001c0d4: 02 bf ff ad be 4001bf88 <== NOT EXECUTED 4001c0d8: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 4001c0dc: 10 bf ff 98 b 4001bf3c <== NOT EXECUTED 4001c0e0: c2 24 40 10 st %g1, [ %l1 + %l0 ] <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 4001c0e4: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 4001c0e8: 02 bf ff a8 be 4001bf88 <== NOT EXECUTED 4001c0ec: 83 2c a0 02 sll %l2, 2, %g1 <== NOT EXECUTED #if 0 fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly ); fflush(stdout); #endif p1 = (block_p *) p[ triply ]; 4001c0f0: d0 04 00 01 ld [ %l0 + %g1 ], %o0 <== NOT EXECUTED if ( !p1 ) 4001c0f4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001c0f8: 02 bf ff a4 be 4001bf88 <== NOT EXECUTED 4001c0fc: 83 2e 60 02 sll %i1, 2, %g1 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 4001c100: c6 02 00 01 ld [ %o0 + %g1 ], %g3 <== NOT EXECUTED 4001c104: 85 2c e0 02 sll %l3, 2, %g2 <== NOT EXECUTED 4001c108: 81 c7 e0 08 ret <== NOT EXECUTED 4001c10c: 91 e8 80 03 restore %g2, %g3, %o0 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 4001c110: 7f ff ff 54 call 4001be60 <== NOT EXECUTED 4001c114: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 4001c118: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001c11c: 02 bf ff 9b be 4001bf88 <== NOT EXECUTED 4001c120: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED return 0; info->triply_indirect = p; 4001c124: 10 bf ff bd b 4001c018 <== NOT EXECUTED 4001c128: d0 26 20 58 st %o0, [ %i0 + 0x58 ] <== NOT EXECUTED p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); 4001c12c: 7f ff ff 4d call 4001be60 <== NOT EXECUTED 4001c130: 01 00 00 00 nop <== NOT EXECUTED if ( !p2 ) 4001c134: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 4001c138: 02 bf ff 94 be 4001bf88 <== NOT EXECUTED 4001c13c: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 4001c140: 10 bf ff c0 b 4001c040 <== NOT EXECUTED 4001c144: c2 24 00 11 st %g1, [ %l0 + %l1 ] <== NOT EXECUTED info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 4001c148: 7f ff ff 46 call 4001be60 <== NOT EXECUTED 4001c14c: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 4001c150: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 4001c154: 02 bf ff 8d be 4001bf88 <== NOT EXECUTED 4001c158: a2 10 00 01 mov %g1, %l1 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 4001c15c: 10 bf ff b4 b 4001c02c <== NOT EXECUTED 4001c160: c2 24 80 10 st %g1, [ %l2 + %l0 ] <== NOT EXECUTED 4001cbb8 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 4001cbb8: 9d e3 bf 90 save %sp, -112, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 4001cbbc: a4 96 20 00 orcc %i0, 0, %l2 4001cbc0: 02 80 00 ac be 4001ce70 4001cbc4: 92 10 22 4a mov 0x24a, %o1 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 4001cbc8: c4 04 a0 48 ld [ %l2 + 0x48 ], %g2 4001cbcc: 82 00 bf fb add %g2, -5, %g1 4001cbd0: 80 a0 60 01 cmp %g1, 1 4001cbd4: 08 80 00 0c bleu 4001cc04 4001cbd8: 11 10 00 e5 sethi %hi(0x40039400), %o0 4001cbdc: 92 10 22 4f mov 0x24f, %o1 <== NOT EXECUTED 4001cbe0: 90 12 22 10 or %o0, 0x210, %o0 <== NOT EXECUTED 4001cbe4: 15 10 00 e5 sethi %hi(0x40039400), %o2 <== NOT EXECUTED 4001cbe8: 7f ff a0 4e call 40004d20 <__assert> <== NOT EXECUTED 4001cbec: 94 12 a2 c0 or %o2, 0x2c0, %o2 ! 400396c0 <_POSIX_Threads_Default_attributes+0xe8> <== NOT EXECUTED the_jnode->type == IMFS_LINEAR_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE && 4001cbf0: c4 04 a0 48 ld [ %l2 + 0x48 ], %g2 <== NOT EXECUTED 4001cbf4: 82 00 bf fb add %g2, -5, %g1 <== NOT EXECUTED 4001cbf8: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4001cbfc: 18 80 00 82 bgu 4001ce04 <== NOT EXECUTED 4001cc00: 01 00 00 00 nop <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 4001cc04: 80 a6 a0 00 cmp %i2, 0 4001cc08: 02 80 00 a5 be 4001ce9c 4001cc0c: 80 a6 e0 00 cmp %i3, 0 /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 4001cc10: 02 80 00 92 be 4001ce58 4001cc14: 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) { 4001cc18: 02 80 00 4e be 4001cd50 4001cc1c: 82 06 c0 19 add %i3, %i1, %g1 * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) 4001cc20: c4 04 a0 4c ld [ %l2 + 0x4c ], %g2 4001cc24: 80 a0 40 02 cmp %g1, %g2 4001cc28: 18 80 00 31 bgu 4001ccec 4001cc2c: a2 10 00 1b mov %i3, %l1 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4001cc30: 27 10 00 f7 sethi %hi(0x4003dc00), %l3 4001cc34: f6 04 e1 54 ld [ %l3 + 0x154 ], %i3 ! 4003dd54 4001cc38: 90 10 00 19 mov %i1, %o0 4001cc3c: 40 00 63 ba call 40035b24 <.rem> 4001cc40: 92 10 00 1b mov %i3, %o1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4001cc44: 92 10 00 1b mov %i3, %o1 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4001cc48: a8 10 00 08 mov %o0, %l4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4001cc4c: 40 00 63 0a call 40035874 <.div> 4001cc50: 90 10 00 19 mov %i1, %o0 if ( start_offset ) { 4001cc54: 80 a5 20 00 cmp %l4, 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; 4001cc58: b2 10 00 08 mov %o0, %i1 if ( start_offset ) { 4001cc5c: a0 10 00 1a mov %i2, %l0 4001cc60: 12 80 00 4d bne 4001cd94 4001cc64: b0 10 20 00 clr %i0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4001cc68: f4 04 e1 54 ld [ %l3 + 0x154 ], %i2 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4001cc6c: 80 a4 40 1a cmp %l1, %i2 4001cc70: 1a 80 00 0e bcc 4001cca8 4001cc74: 92 10 00 19 mov %i1, %o1 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 4001cc78: 10 80 00 20 b 4001ccf8 4001cc7c: 80 a4 60 00 cmp %l1, 0 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 ); 4001cc80: d2 02 40 00 ld [ %o1 ], %o1 4001cc84: 40 00 2c d1 call 40027fc8 4001cc88: a2 24 40 1a sub %l1, %i2, %l1 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4001cc8c: c2 04 e1 54 ld [ %l3 + 0x154 ], %g1 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 ); 4001cc90: a0 04 00 1a add %l0, %i2, %l0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4001cc94: 80 a0 40 11 cmp %g1, %l1 assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; 4001cc98: b2 06 60 01 inc %i1 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4001cc9c: 18 80 00 16 bgu 4001ccf4 4001cca0: b0 06 00 1a add %i0, %i2, %i0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4001cca4: 92 10 00 19 mov %i1, %o1 4001cca8: 94 10 20 00 clr %o2 4001ccac: 7f ff fc 7a call 4001be94 4001ccb0: 90 10 00 12 mov %l2, %o0 assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4001ccb4: 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 ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4001ccb8: 92 10 00 08 mov %o0, %o1 assert( block_ptr ); 4001ccbc: 80 a2 60 00 cmp %o1, 0 4001ccc0: 12 bf ff f0 bne 4001cc80 4001ccc4: 90 10 00 10 mov %l0, %o0 4001ccc8: 11 10 00 e5 sethi %hi(0x40039400), %o0 <== NOT EXECUTED 4001cccc: 92 10 22 a5 mov 0x2a5, %o1 <== NOT EXECUTED 4001ccd0: 90 12 22 10 or %o0, 0x210, %o0 <== NOT EXECUTED 4001ccd4: 15 10 00 e5 sethi %hi(0x40039400), %o2 <== NOT EXECUTED 4001ccd8: 7f ff a0 12 call 40004d20 <__assert> <== NOT EXECUTED 4001ccdc: 94 12 a2 b0 or %o2, 0x2b0, %o2 ! 400396b0 <_POSIX_Threads_Default_attributes+0xd8> <== NOT EXECUTED if ( !block_ptr ) return copied; 4001cce0: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 4001cce4: 81 c7 e0 08 ret <== NOT EXECUTED 4001cce8: 91 e8 00 0a restore %g0, %o2, %o0 <== NOT EXECUTED * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) my_length = the_jnode->info.file.size - start; 4001ccec: 10 bf ff d1 b 4001cc30 4001ccf0: a2 20 80 19 sub %g2, %i1, %l1 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 4001ccf4: 80 a4 60 00 cmp %l1, 0 4001ccf8: 02 80 00 0f be 4001cd34 4001ccfc: 90 07 bf f0 add %fp, -16, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4001cd00: 92 10 00 19 mov %i1, %o1 4001cd04: 90 10 00 12 mov %l2, %o0 4001cd08: 7f ff fc 63 call 4001be94 4001cd0c: 94 10 20 00 clr %o2 assert( block_ptr ); 4001cd10: 80 a2 20 00 cmp %o0, 0 4001cd14: 22 80 00 4a be,a 4001ce3c 4001cd18: 11 10 00 e5 sethi %hi(0x40039400), %o0 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 4001cd1c: d2 02 00 00 ld [ %o0 ], %o1 copied += my_length; 4001cd20: b0 06 00 11 add %i0, %l1, %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 ); 4001cd24: 90 10 00 10 mov %l0, %o0 4001cd28: 40 00 2c a8 call 40027fc8 4001cd2c: 94 10 00 11 mov %l1, %o2 copied += my_length; } IMFS_update_atime( the_jnode ); 4001cd30: 90 07 bf f0 add %fp, -16, %o0 4001cd34: 7f ff a0 c5 call 40005048 4001cd38: 92 10 20 00 clr %o1 4001cd3c: c2 07 bf f0 ld [ %fp + -16 ], %g1 return copied; 4001cd40: 94 10 00 18 mov %i0, %o2 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); 4001cd44: c2 24 a0 3c st %g1, [ %l2 + 0x3c ] return copied; } 4001cd48: 81 c7 e0 08 ret 4001cd4c: 91 e8 00 0a restore %g0, %o2, %o0 if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 4001cd50: c2 04 a0 4c ld [ %l2 + 0x4c ], %g1 <== NOT EXECUTED 4001cd54: b0 10 00 1b mov %i3, %i0 <== NOT EXECUTED 4001cd58: 82 20 40 19 sub %g1, %i1, %g1 <== NOT EXECUTED 4001cd5c: 80 a6 c0 01 cmp %i3, %g1 <== NOT EXECUTED 4001cd60: 18 80 00 22 bgu 4001cde8 <== NOT EXECUTED 4001cd64: d2 04 a0 50 ld [ %l2 + 0x50 ], %o1 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 4001cd68: 92 02 40 19 add %o1, %i1, %o1 <== NOT EXECUTED 4001cd6c: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED 4001cd70: 40 00 2c 96 call 40027fc8 <== NOT EXECUTED 4001cd74: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); 4001cd78: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED 4001cd7c: 7f ff a0 b3 call 40005048 <== NOT EXECUTED 4001cd80: 92 10 20 00 clr %o1 <== NOT EXECUTED 4001cd84: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED return copied; 4001cd88: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); 4001cd8c: 10 bf ff ef b 4001cd48 <== NOT EXECUTED 4001cd90: c2 24 a0 3c st %g1, [ %l2 + 0x3c ] <== NOT EXECUTED block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4001cd94: 90 10 00 12 mov %l2, %o0 4001cd98: 92 10 00 19 mov %i1, %o1 4001cd9c: 7f ff fc 3e call 4001be94 4001cda0: 94 10 20 00 clr %o2 assert( block_ptr ); 4001cda4: 80 a2 20 00 cmp %o0, 0 4001cda8: 02 80 00 1d be 4001ce1c 4001cdac: 92 26 c0 14 sub %i3, %l4, %o1 */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 4001cdb0: 80 a4 40 09 cmp %l1, %o1 4001cdb4: 08 80 00 03 bleu 4001cdc0 4001cdb8: 94 10 00 11 mov %l1, %o2 4001cdbc: 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 ); 4001cdc0: d2 02 00 00 ld [ %o0 ], %o1 dest += to_copy; 4001cdc4: a0 06 80 0a add %i2, %o2, %l0 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 4001cdc8: 92 05 00 09 add %l4, %o1, %o1 dest += to_copy; block++; 4001cdcc: b2 06 60 01 inc %i1 my_length -= to_copy; 4001cdd0: a2 24 40 0a sub %l1, %o2, %l1 4001cdd4: 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 ); 4001cdd8: 40 00 2c 7c call 40027fc8 4001cddc: 90 10 00 1a mov %i2, %o0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4001cde0: 10 bf ff a3 b 4001cc6c 4001cde4: f4 04 e1 54 ld [ %l3 + 0x154 ], %i2 unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) my_length = the_jnode->info.linearfile.size - start; 4001cde8: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 4001cdec: 92 02 40 19 add %o1, %i1, %o1 <== NOT EXECUTED 4001cdf0: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED 4001cdf4: 40 00 2c 75 call 40027fc8 <== NOT EXECUTED 4001cdf8: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); 4001cdfc: 10 bf ff e0 b 4001cd7c <== NOT EXECUTED 4001ce00: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED assert( the_jnode->type == IMFS_MEMORY_FILE || the_jnode->type == IMFS_LINEAR_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE && the_jnode->type != IMFS_LINEAR_FILE ) rtems_set_errno_and_return_minus_one( EIO ); 4001ce04: 40 00 25 bd call 400264f8 <__errno> <== NOT EXECUTED 4001ce08: 01 00 00 00 nop <== NOT EXECUTED 4001ce0c: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 4001ce10: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 4001ce14: 10 bf ff b4 b 4001cce4 <== NOT EXECUTED 4001ce18: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 4001ce1c: 11 10 00 e5 sethi %hi(0x40039400), %o0 <== NOT EXECUTED 4001ce20: 92 10 22 94 mov 0x294, %o1 <== NOT EXECUTED 4001ce24: 90 12 22 10 or %o0, 0x210, %o0 <== NOT EXECUTED 4001ce28: 15 10 00 e5 sethi %hi(0x40039400), %o2 <== NOT EXECUTED 4001ce2c: 7f ff 9f bd call 40004d20 <__assert> <== NOT EXECUTED 4001ce30: 94 12 a2 b0 or %o2, 0x2b0, %o2 ! 400396b0 <_POSIX_Threads_Default_attributes+0xd8> <== NOT EXECUTED 4001ce34: 10 bf ff ac b 4001cce4 <== NOT EXECUTED 4001ce38: 94 10 20 00 clr %o2 <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 4001ce3c: 92 10 22 b7 mov 0x2b7, %o1 <== NOT EXECUTED 4001ce40: 90 12 22 10 or %o0, 0x210, %o0 <== NOT EXECUTED 4001ce44: 15 10 00 e5 sethi %hi(0x40039400), %o2 <== NOT EXECUTED 4001ce48: 7f ff 9f b6 call 40004d20 <__assert> <== NOT EXECUTED 4001ce4c: 94 12 a2 b0 or %o2, 0x2b0, %o2 ! 400396b0 <_POSIX_Threads_Default_attributes+0xd8> <== NOT EXECUTED if ( !block_ptr ) return copied; 4001ce50: 10 bf ff a5 b 4001cce4 <== NOT EXECUTED 4001ce54: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 4001ce58: 40 00 25 a8 call 400264f8 <__errno> <== NOT EXECUTED 4001ce5c: 01 00 00 00 nop <== NOT EXECUTED 4001ce60: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4001ce64: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 4001ce68: 10 bf ff 9f b 4001cce4 <== NOT EXECUTED 4001ce6c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 4001ce70: 11 10 00 e5 sethi %hi(0x40039400), %o0 <== NOT EXECUTED 4001ce74: 15 10 00 e5 sethi %hi(0x40039400), %o2 <== NOT EXECUTED 4001ce78: 90 12 22 10 or %o0, 0x210, %o0 <== NOT EXECUTED 4001ce7c: 7f ff 9f a9 call 40004d20 <__assert> <== NOT EXECUTED 4001ce80: 94 12 a2 60 or %o2, 0x260, %o2 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); 4001ce84: 40 00 25 9d call 400264f8 <__errno> <== NOT EXECUTED 4001ce88: 01 00 00 00 nop <== NOT EXECUTED 4001ce8c: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 4001ce90: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 4001ce94: 10 bf ff 94 b 4001cce4 <== NOT EXECUTED 4001ce98: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 4001ce9c: 92 10 22 58 mov 0x258, %o1 <== NOT EXECUTED 4001cea0: 11 10 00 e5 sethi %hi(0x40039400), %o0 <== NOT EXECUTED 4001cea4: 15 10 00 e5 sethi %hi(0x40039400), %o2 <== NOT EXECUTED 4001cea8: 90 12 22 10 or %o0, 0x210, %o0 <== NOT EXECUTED 4001ceac: 7f ff 9f 9d call 40004d20 <__assert> <== NOT EXECUTED 4001ceb0: 94 12 a3 10 or %o2, 0x310, %o2 <== NOT EXECUTED if ( !dest ) rtems_set_errno_and_return_minus_one( EINVAL ); 4001ceb4: 40 00 25 91 call 400264f8 <__errno> <== NOT EXECUTED 4001ceb8: 01 00 00 00 nop <== NOT EXECUTED 4001cebc: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4001cec0: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 4001cec4: 10 bf ff 88 b 4001cce4 <== NOT EXECUTED 4001cec8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001c210 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 4001c210: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 4001c214: 80 a6 20 00 cmp %i0, 0 4001c218: 02 80 00 74 be 4001c3e8 4001c21c: 92 10 21 ec mov 0x1ec, %o1 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4001c220: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4001c224: 80 a0 60 05 cmp %g1, 5 4001c228: 02 80 00 0b be 4001c254 4001c22c: 11 10 00 e5 sethi %hi(0x40039400), %o0 4001c230: 92 10 21 f0 mov 0x1f0, %o1 <== NOT EXECUTED 4001c234: 90 12 22 10 or %o0, 0x210, %o0 <== NOT EXECUTED 4001c238: 15 10 00 e5 sethi %hi(0x40039400), %o2 <== NOT EXECUTED 4001c23c: 7f ff a2 b9 call 40004d20 <__assert> <== NOT EXECUTED 4001c240: 94 12 a2 70 or %o2, 0x270, %o2 ! 40039670 <_POSIX_Threads_Default_attributes+0x98> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) 4001c244: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 4001c248: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 4001c24c: 12 80 00 5a bne 4001c3b4 <== NOT EXECUTED 4001c250: 01 00 00 00 nop <== NOT EXECUTED /* * 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; 4001c254: 25 10 00 f7 sethi %hi(0x4003dc00), %l2 * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 4001c258: 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; 4001c25c: c4 04 a1 54 ld [ %l2 + 0x154 ], %g2 * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 4001c260: 80 a0 60 00 cmp %g1, 0 4001c264: 02 80 00 05 be 4001c278 4001c268: a7 30 a0 02 srl %g2, 2, %l3 memfile_free_blocks_in_table( &info->indirect, to_free ); 4001c26c: 90 06 20 50 add %i0, 0x50, %o0 4001c270: 7f ff ff c9 call 4001c194 4001c274: 92 10 00 13 mov %l3, %o1 } if ( info->doubly_indirect ) { 4001c278: d0 06 20 54 ld [ %i0 + 0x54 ], %o0 4001c27c: 80 a2 20 00 cmp %o0, 0 4001c280: 02 80 00 19 be 4001c2e4 4001c284: c2 04 a1 54 ld [ %l2 + 0x154 ], %g1 for ( i=0 ; i <== NOT EXECUTED 4001c294: 84 10 20 00 clr %g2 <== NOT EXECUTED 4001c298: 10 80 00 03 b 4001c2a4 <== NOT EXECUTED 4001c29c: a0 10 20 00 clr %l0 <== NOT EXECUTED 4001c2a0: d0 06 20 54 ld [ %i0 + 0x54 ], %o0 <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 4001c2a4: 83 28 a0 02 sll %g2, 2, %g1 <== NOT EXECUTED 4001c2a8: c4 00 40 08 ld [ %g1 + %o0 ], %g2 <== NOT EXECUTED 4001c2ac: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4001c2b0: 02 80 00 04 be 4001c2c0 <== NOT EXECUTED 4001c2b4: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( 4001c2b8: 7f ff ff b7 call 4001c194 <== NOT EXECUTED 4001c2bc: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i <== NOT EXECUTED 4001c2d4: a0 10 00 02 mov %g2, %l0 <== 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 ); 4001c2d8: 90 06 20 54 add %i0, 0x54, %o0 <== NOT EXECUTED 4001c2dc: 7f ff ff ae call 4001c194 <== NOT EXECUTED 4001c2e0: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED } if ( info->triply_indirect ) { 4001c2e4: c4 06 20 58 ld [ %i0 + 0x58 ], %g2 4001c2e8: 80 a0 a0 00 cmp %g2, 0 4001c2ec: 02 80 00 37 be 4001c3c8 4001c2f0: 82 10 20 00 clr %g1 for ( i=0 ; i <== NOT EXECUTED 4001c304: 90 06 20 58 add %i0, 0x58, %o0 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 4001c308: c2 00 80 00 ld [ %g2 ], %g1 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 4001c30c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001c310: 02 80 00 31 be 4001c3d4 <== NOT EXECUTED 4001c314: a0 10 00 01 mov %g1, %l0 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4001c318: a8 10 20 00 clr %l4 <== NOT EXECUTED 4001c31c: aa 10 20 00 clr %l5 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j <== NOT EXECUTED 4001c330: 90 05 40 02 add %l5, %g2, %o0 <== NOT EXECUTED 4001c334: a2 10 20 00 clr %l1 <== NOT EXECUTED 4001c338: 84 10 20 00 clr %g2 <== NOT EXECUTED if ( p[j] ) { 4001c33c: 83 28 a0 02 sll %g2, 2, %g1 <== NOT EXECUTED 4001c340: c4 00 40 10 ld [ %g1 + %l0 ], %g2 <== NOT EXECUTED 4001c344: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4001c348: 02 80 00 04 be 4001c358 <== NOT EXECUTED 4001c34c: 90 00 40 10 add %g1, %l0, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 4001c350: 7f ff ff 91 call 4001c194 <== NOT EXECUTED 4001c354: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j <== NOT EXECUTED 4001c36c: a2 10 00 02 mov %g2, %l1 <== NOT EXECUTED 4001c370: c4 06 20 58 ld [ %i0 + 0x58 ], %g2 <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 4001c374: 90 05 40 02 add %l5, %g2, %o0 <== NOT EXECUTED 4001c378: 7f ff ff 87 call 4001c194 <== NOT EXECUTED 4001c37c: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED 4001c394: ab 2d 20 02 sll %l4, 2, %l5 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 4001c398: c4 06 20 58 ld [ %i0 + 0x58 ], %g2 <== NOT EXECUTED 4001c39c: c2 00 80 15 ld [ %g2 + %l5 ], %g1 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 4001c3a0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001c3a4: 02 80 00 0b be 4001c3d0 <== NOT EXECUTED 4001c3a8: a0 10 00 01 mov %g1, %l0 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED 4001c3b0: c2 04 a1 54 ld [ %l2 + 0x154 ], %g1 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); 4001c3b4: 40 00 28 51 call 400264f8 <__errno> <== NOT EXECUTED 4001c3b8: 01 00 00 00 nop <== NOT EXECUTED 4001c3bc: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 4001c3c0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001c3c4: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&info->triply_indirect, to_free ); } return 0; } 4001c3c8: 81 c7 e0 08 ret 4001c3cc: 91 e8 00 01 restore %g0, %g1, %o0 } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 4001c3d0: 90 06 20 58 add %i0, 0x58, %o0 <== NOT EXECUTED 4001c3d4: 7f ff ff 70 call 4001c194 <== NOT EXECUTED 4001c3d8: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED 4001c3dc: 82 10 20 00 clr %g1 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 4001c3e0: 81 c7 e0 08 ret <== NOT EXECUTED 4001c3e4: 91 e8 00 01 restore %g0, %g1, %o0 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 4001c3e8: 11 10 00 e5 sethi %hi(0x40039400), %o0 <== NOT EXECUTED 4001c3ec: 15 10 00 e5 sethi %hi(0x40039400), %o2 <== NOT EXECUTED 4001c3f0: 90 12 22 10 or %o0, 0x210, %o0 <== NOT EXECUTED 4001c3f4: 7f ff a2 4b call 40004d20 <__assert> <== NOT EXECUTED 4001c3f8: 94 12 a2 60 or %o2, 0x260, %o2 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); 4001c3fc: 40 00 28 3f call 400264f8 <__errno> <== NOT EXECUTED 4001c400: 01 00 00 00 nop <== NOT EXECUTED 4001c404: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 4001c408: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001c40c: 10 bf ff ef b 4001c3c8 <== NOT EXECUTED 4001c410: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED 4001c164 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 4001c164: 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 ); 4001c168: 94 10 20 00 clr %o2 <== NOT EXECUTED 4001c16c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4001c170: 7f ff ff 49 call 4001be94 <== NOT EXECUTED 4001c174: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED ptr = *block_entry_ptr; 4001c178: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED *block_entry_ptr = 0; memfile_free_block( ptr ); return 1; } 4001c17c: 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; 4001c180: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED memfile_free_block( ptr ); 4001c184: 7f ff ff 2e call 4001be3c <== NOT EXECUTED 4001c188: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED return 1; } 4001c18c: 81 c7 e0 08 ret <== NOT EXECUTED 4001c190: 81 e8 00 00 restore <== NOT EXECUTED 4001c81c : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 4001c81c: 9d e3 bf 90 save %sp, -112, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 4001c820: 80 a6 20 00 cmp %i0, 0 4001c824: 02 80 00 99 be 4001ca88 4001c828: 92 10 22 e1 mov 0x2e1, %o1 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4001c82c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4001c830: 80 a0 60 05 cmp %g1, 5 4001c834: 02 80 00 0b be 4001c860 4001c838: 11 10 00 e5 sethi %hi(0x40039400), %o0 4001c83c: 92 10 22 e5 mov 0x2e5, %o1 <== NOT EXECUTED 4001c840: 90 12 22 10 or %o0, 0x210, %o0 <== NOT EXECUTED 4001c844: 15 10 00 e5 sethi %hi(0x40039400), %o2 <== NOT EXECUTED 4001c848: 7f ff a1 36 call 40004d20 <__assert> <== NOT EXECUTED 4001c84c: 94 12 a2 70 or %o2, 0x270, %o2 ! 40039670 <_POSIX_Threads_Default_attributes+0x98> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) 4001c850: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 4001c854: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 4001c858: 12 80 00 82 bne 4001ca60 <== NOT EXECUTED 4001c85c: 01 00 00 00 nop <== NOT EXECUTED /* * Error check arguments */ assert( source ); 4001c860: 80 a6 a0 00 cmp %i2, 0 4001c864: 02 80 00 93 be 4001cab0 4001c868: 80 a6 e0 00 cmp %i3, 0 /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 4001c86c: 02 80 00 82 be 4001ca74 4001c870: 92 06 c0 19 add %i3, %i1, %o1 * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { 4001c874: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 4001c878: 80 a2 40 01 cmp %o1, %g1 4001c87c: 18 80 00 43 bgu 4001c988 4001c880: 25 10 00 f7 sethi %hi(0x4003dc00), %l2 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4001c884: e0 04 a1 54 ld [ %l2 + 0x154 ], %l0 ! 4003dd54 4001c888: 90 10 00 19 mov %i1, %o0 4001c88c: 40 00 64 a6 call 40035b24 <.rem> 4001c890: 92 10 00 10 mov %l0, %o1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4001c894: 92 10 00 10 mov %l0, %o1 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4001c898: a2 10 00 08 mov %o0, %l1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4001c89c: 40 00 63 f6 call 40035874 <.div> 4001c8a0: 90 10 00 19 mov %i1, %o0 if ( start_offset ) { 4001c8a4: 80 a4 60 00 cmp %l1, 0 4001c8a8: 12 80 00 42 bne 4001c9b0 4001c8ac: b2 10 00 08 mov %o0, %i1 4001c8b0: a0 10 00 1a mov %i2, %l0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4001c8b4: f4 04 a1 54 ld [ %l2 + 0x154 ], %i2 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4001c8b8: 80 a6 c0 1a cmp %i3, %i2 4001c8bc: 1a 80 00 0e bcc 4001c8f4 4001c8c0: 92 10 00 19 mov %i1, %o1 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 4001c8c4: 10 80 00 1c b 4001c934 4001c8c8: 80 a6 e0 00 cmp %i3, 0 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 ); 4001c8cc: d0 02 00 00 ld [ %o0 ], %o0 4001c8d0: 40 00 2d be call 40027fc8 4001c8d4: b6 26 c0 1a sub %i3, %i2, %i3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4001c8d8: c2 04 a1 54 ld [ %l2 + 0x154 ], %g1 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 ); 4001c8dc: a0 04 00 1a add %l0, %i2, %l0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4001c8e0: 80 a0 40 1b cmp %g1, %i3 #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); src += to_copy; block++; 4001c8e4: b2 06 60 01 inc %i1 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4001c8e8: 18 80 00 12 bgu 4001c930 4001c8ec: a2 04 40 1a add %l1, %i2, %l1 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4001c8f0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4001c8f4: 94 10 20 00 clr %o2 4001c8f8: 7f ff fd 67 call 4001be94 4001c8fc: 90 10 00 18 mov %i0, %o0 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 ); 4001c900: 92 10 00 10 mov %l0, %o1 */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 4001c904: 80 a2 20 00 cmp %o0, 0 4001c908: 12 bf ff f1 bne 4001c8cc 4001c90c: 94 10 00 1a mov %i2, %o2 4001c910: 11 10 00 e5 sethi %hi(0x40039400), %o0 <== NOT EXECUTED 4001c914: 15 10 00 e5 sethi %hi(0x40039400), %o2 <== NOT EXECUTED 4001c918: 90 12 22 10 or %o0, 0x210, %o0 <== NOT EXECUTED 4001c91c: 94 12 a2 b0 or %o2, 0x2b0, %o2 <== NOT EXECUTED 4001c920: 7f ff a1 00 call 40004d20 <__assert> <== NOT EXECUTED 4001c924: 92 10 23 2e mov 0x32e, %o1 <== NOT EXECUTED } IMFS_atime_mtime_update( the_jnode ); return copied; } 4001c928: 81 c7 e0 08 ret <== NOT EXECUTED 4001c92c: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 4001c930: 80 a6 e0 00 cmp %i3, 0 4001c934: 02 80 00 0e be 4001c96c 4001c938: 90 07 bf f0 add %fp, -16, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4001c93c: 92 10 00 19 mov %i1, %o1 4001c940: 90 10 00 18 mov %i0, %o0 4001c944: 7f ff fd 54 call 4001be94 4001c948: 94 10 20 00 clr %o2 assert( block_ptr ); 4001c94c: 80 a2 20 00 cmp %o0, 0 4001c950: 02 80 00 3d be 4001ca44 4001c954: 92 10 00 10 mov %l0, %o1 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, my_length ); 4001c958: d0 02 00 00 ld [ %o0 ], %o0 my_length = 0; copied += to_copy; 4001c95c: a2 04 40 1b add %l1, %i3, %l1 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 ); 4001c960: 40 00 2d 9a call 40027fc8 4001c964: 94 10 00 1b mov %i3, %o2 my_length = 0; copied += to_copy; } IMFS_atime_mtime_update( the_jnode ); 4001c968: 90 07 bf f0 add %fp, -16, %o0 4001c96c: 7f ff a1 b7 call 40005048 4001c970: 92 10 20 00 clr %o1 4001c974: c2 07 bf f0 ld [ %fp + -16 ], %g1 4001c978: c2 26 20 3c st %g1, [ %i0 + 0x3c ] 4001c97c: c2 26 20 40 st %g1, [ %i0 + 0x40 ] return copied; } 4001c980: 81 c7 e0 08 ret 4001c984: 91 e8 00 11 restore %g0, %l1, %o0 * in memory file, then extend the length. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { status = IMFS_memfile_extend( the_jnode, last_byte ); 4001c988: 7f ff ff 0f call 4001c5c4 4001c98c: 90 10 00 18 mov %i0, %o0 if ( status ) 4001c990: 80 a2 20 00 cmp %o0, 0 4001c994: 02 bf ff bc be 4001c884 4001c998: 25 10 00 f7 sethi %hi(0x4003dc00), %l2 rtems_set_errno_and_return_minus_one( ENOSPC ); 4001c99c: 40 00 26 d7 call 400264f8 <__errno> <== NOT EXECUTED 4001c9a0: a2 10 3f ff mov -1, %l1 <== NOT EXECUTED 4001c9a4: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 4001c9a8: 10 bf ff e0 b 4001c928 <== NOT EXECUTED 4001c9ac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4001c9b0: 90 10 00 18 mov %i0, %o0 4001c9b4: 92 10 00 19 mov %i1, %o1 4001c9b8: 7f ff fd 37 call 4001be94 4001c9bc: 94 10 20 00 clr %o2 assert( block_ptr ); 4001c9c0: 80 a2 20 00 cmp %o0, 0 4001c9c4: 22 80 00 19 be,a 4001ca28 4001c9c8: 11 10 00 e5 sethi %hi(0x40039400), %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; 4001c9cc: 94 24 00 11 sub %l0, %l1, %o2 4001c9d0: 80 a2 80 1b cmp %o2, %i3 4001c9d4: 18 80 00 0b bgu 4001ca00 4001c9d8: d0 02 00 00 ld [ %o0 ], %o0 return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; 4001c9dc: a0 06 80 0a add %i2, %o2, %l0 <== NOT EXECUTED if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4001c9e0: 90 04 40 08 add %l1, %o0, %o0 <== NOT EXECUTED src += to_copy; block++; 4001c9e4: b2 06 60 01 inc %i1 <== NOT EXECUTED my_length -= to_copy; 4001c9e8: b6 26 c0 0a sub %i3, %o2, %i3 <== NOT EXECUTED copied += to_copy; 4001c9ec: a2 10 00 0a mov %o2, %l1 <== NOT EXECUTED if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4001c9f0: 40 00 2d 76 call 40027fc8 <== NOT EXECUTED 4001c9f4: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4001c9f8: 10 bf ff b0 b 4001c8b8 <== NOT EXECUTED 4001c9fc: f4 04 a1 54 ld [ %l2 + 0x154 ], %i2 <== 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; 4001ca00: 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 ); 4001ca04: 90 04 40 08 add %l1, %o0, %o0 src += to_copy; 4001ca08: a0 06 80 0a add %i2, %o2, %l0 block++; 4001ca0c: b2 06 60 01 inc %i1 my_length -= to_copy; 4001ca10: b6 26 c0 0a sub %i3, %o2, %i3 copied += to_copy; 4001ca14: a2 10 00 0a mov %o2, %l1 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 ); 4001ca18: 40 00 2d 6c call 40027fc8 4001ca1c: 92 10 00 1a mov %i2, %o1 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4001ca20: 10 bf ff a6 b 4001c8b8 4001ca24: f4 04 a1 54 ld [ %l2 + 0x154 ], %i2 if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 4001ca28: 92 10 23 1a mov 0x31a, %o1 <== NOT EXECUTED 4001ca2c: 90 12 22 10 or %o0, 0x210, %o0 <== NOT EXECUTED 4001ca30: 15 10 00 e5 sethi %hi(0x40039400), %o2 <== NOT EXECUTED 4001ca34: a2 10 20 00 clr %l1 <== NOT EXECUTED 4001ca38: 7f ff a0 ba call 40004d20 <__assert> <== NOT EXECUTED 4001ca3c: 94 12 a2 b0 or %o2, 0x2b0, %o2 <== NOT EXECUTED 4001ca40: 30 bf ff ba b,a 4001c928 <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 4001ca44: 11 10 00 e5 sethi %hi(0x40039400), %o0 <== NOT EXECUTED 4001ca48: 15 10 00 e5 sethi %hi(0x40039400), %o2 <== NOT EXECUTED 4001ca4c: 90 12 22 10 or %o0, 0x210, %o0 <== NOT EXECUTED 4001ca50: 94 12 a2 b0 or %o2, 0x2b0, %o2 <== NOT EXECUTED 4001ca54: 7f ff a0 b3 call 40004d20 <__assert> <== NOT EXECUTED 4001ca58: 92 10 23 44 mov 0x344, %o1 <== NOT EXECUTED 4001ca5c: 30 bf ff b3 b,a 4001c928 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); 4001ca60: 40 00 26 a6 call 400264f8 <__errno> <== NOT EXECUTED 4001ca64: a2 10 3f ff mov -1, %l1 <== NOT EXECUTED 4001ca68: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 4001ca6c: 10 bf ff af b 4001c928 <== NOT EXECUTED 4001ca70: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 4001ca74: 40 00 26 a1 call 400264f8 <__errno> <== NOT EXECUTED 4001ca78: a2 10 3f ff mov -1, %l1 <== NOT EXECUTED 4001ca7c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4001ca80: 10 bf ff aa b 4001c928 <== NOT EXECUTED 4001ca84: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 4001ca88: 11 10 00 e5 sethi %hi(0x40039400), %o0 <== NOT EXECUTED 4001ca8c: 15 10 00 e5 sethi %hi(0x40039400), %o2 <== NOT EXECUTED 4001ca90: 90 12 22 10 or %o0, 0x210, %o0 <== NOT EXECUTED 4001ca94: 7f ff a0 a3 call 40004d20 <__assert> <== NOT EXECUTED 4001ca98: 94 12 a2 60 or %o2, 0x260, %o2 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); 4001ca9c: 40 00 26 97 call 400264f8 <__errno> <== NOT EXECUTED 4001caa0: a2 10 3f ff mov -1, %l1 <== NOT EXECUTED 4001caa4: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 4001caa8: 10 bf ff a0 b 4001c928 <== NOT EXECUTED 4001caac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED /* * Error check arguments */ assert( source ); 4001cab0: 92 10 22 ed mov 0x2ed, %o1 <== NOT EXECUTED 4001cab4: 11 10 00 e5 sethi %hi(0x40039400), %o0 <== NOT EXECUTED 4001cab8: 15 10 00 e5 sethi %hi(0x40039400), %o2 <== NOT EXECUTED 4001cabc: 90 12 22 10 or %o0, 0x210, %o0 <== NOT EXECUTED 4001cac0: 7f ff a0 98 call 40004d20 <__assert> <== NOT EXECUTED 4001cac4: 94 12 a2 a8 or %o2, 0x2a8, %o2 <== NOT EXECUTED if ( !source ) rtems_set_errno_and_return_minus_one( EINVAL ); 4001cac8: 40 00 26 8c call 400264f8 <__errno> <== NOT EXECUTED 4001cacc: a2 10 3f ff mov -1, %l1 <== NOT EXECUTED 4001cad0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4001cad4: 10 bf ff 95 b 4001c928 <== NOT EXECUTED 4001cad8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000bb9c : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4000bb9c: 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 ); 4000bba0: 90 10 00 18 mov %i0, %o0 4000bba4: 94 07 bf f4 add %fp, -12, %o2 4000bba8: b0 07 bf c3 add %fp, -61, %i0 4000bbac: 7f ff ff 79 call 4000b990 4000bbb0: 92 10 00 18 mov %i0, %o1 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 4000bbb4: b3 2e 60 10 sll %i1, 0x10, %i1 4000bbb8: 03 00 00 3c sethi %hi(0xf000), %g1 4000bbbc: 97 36 60 10 srl %i1, 0x10, %o3 4000bbc0: 05 00 00 10 sethi %hi(0x4000), %g2 4000bbc4: 86 0a c0 01 and %o3, %g1, %g3 4000bbc8: 80 a0 c0 02 cmp %g3, %g2 4000bbcc: 02 80 00 1f be 4000bc48 4000bbd0: 90 10 00 1c mov %i4, %o0 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 4000bbd4: 03 00 00 20 sethi %hi(0x8000), %g1 4000bbd8: 80 a0 c0 01 cmp %g3, %g1 4000bbdc: 02 80 00 12 be 4000bc24 4000bbe0: 92 10 20 05 mov 5, %o1 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 4000bbe4: 03 00 00 18 sethi %hi(0x6000), %g1 4000bbe8: 80 a0 c0 01 cmp %g3, %g1 4000bbec: 02 80 00 0b be 4000bc18 4000bbf0: 03 00 00 08 sethi %hi(0x2000), %g1 4000bbf4: 80 a0 c0 01 cmp %g3, %g1 4000bbf8: 22 80 00 09 be,a 4000bc1c 4000bbfc: f6 27 bf e8 st %i3, [ %fp + -24 ] type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else { rtems_set_errno_and_return_minus_one( EINVAL ); 4000bc00: 40 00 0c 7b call 4000edec <__errno> <== NOT EXECUTED 4000bc04: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000bc08: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000bc0c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000bc10: 81 c7 e0 08 ret <== NOT EXECUTED 4000bc14: 81 e8 00 00 restore <== NOT EXECUTED type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 4000bc18: f6 27 bf e8 st %i3, [ %fp + -24 ] <== NOT EXECUTED 4000bc1c: f4 27 bf e4 st %i2, [ %fp + -28 ] 4000bc20: 92 10 20 02 mov 2, %o1 /* * Allocate and fill in an IMFS jnode */ new_node = IMFS_create_node( 4000bc24: 94 10 00 18 mov %i0, %o2 4000bc28: 98 07 bf e4 add %fp, -28, %o4 4000bc2c: 40 00 09 09 call 4000e050 4000bc30: b0 10 20 00 clr %i0 new_name, mode, &info ); if ( !new_node ) 4000bc34: 80 a2 20 00 cmp %o0, 0 4000bc38: 02 80 00 06 be 4000bc50 4000bc3c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 4000bc40: 81 c7 e0 08 ret 4000bc44: 81 e8 00 00 restore type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else { rtems_set_errno_and_return_minus_one( EINVAL ); 4000bc48: 10 bf ff f7 b 4000bc24 4000bc4c: 92 10 20 01 mov 1, %o1 mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 4000bc50: 40 00 0c 67 call 4000edec <__errno> <== NOT EXECUTED 4000bc54: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000bc58: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 4000bc5c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; } 4000bc60: 81 c7 e0 08 ret <== NOT EXECUTED 4000bc64: 81 e8 00 00 restore <== NOT EXECUTED 40004960 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 40004960: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 40004964: c4 06 20 08 ld [ %i0 + 8 ], %g2 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 40004968: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1 4000496c: 80 a0 60 01 cmp %g1, 1 40004970: 12 80 00 05 bne 40004984 40004974: 01 00 00 00 nop /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 40004978: f0 20 a0 58 st %i0, [ %g2 + 0x58 ] return 0; } 4000497c: 81 c7 e0 08 ret 40004980: 91 e8 20 00 restore %g0, 0, %o0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 40004984: 40 00 86 dd call 400264f8 <__errno> <== NOT EXECUTED 40004988: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000498c: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 40004990: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004994: 81 c7 e0 08 ret <== NOT EXECUTED 40004998: 81 e8 00 00 restore <== NOT EXECUTED 40003924 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 40003924: 9d e3 bf 98 save %sp, -104, %sp assert( the_jnode ); 40003928: 80 a6 20 00 cmp %i0, 0 4000392c: 02 80 00 54 be 40003a7c 40003930: 11 10 00 7f sethi %hi(0x4001fc00), %o0 fprintf(stdout, "%s", the_jnode->name ); 40003934: 21 10 00 88 sethi %hi(0x40022000), %l0 40003938: c2 04 20 f8 ld [ %l0 + 0xf8 ], %g1 ! 400220f8 <_impure_ptr> 4000393c: 90 06 20 0c add %i0, 0xc, %o0 40003940: 40 00 40 39 call 40013a24 40003944: d2 00 60 08 ld [ %g1 + 8 ], %o1 switch( the_jnode->type ) { 40003948: d4 06 20 48 ld [ %i0 + 0x48 ], %o2 4000394c: 80 a2 a0 06 cmp %o2, 6 40003950: 08 80 00 10 bleu 40003990 40003954: 83 2a a0 02 sll %o2, 2, %g1 fprintf(stdout, " links not printed\n" ); assert(0); break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 40003958: c2 04 20 f8 ld [ %l0 + 0xf8 ], %g1 <== NOT EXECUTED 4000395c: 13 10 00 7f sethi %hi(0x4001fc00), %o1 <== NOT EXECUTED 40003960: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 40003964: 40 00 3f e3 call 400138f0 <== NOT EXECUTED 40003968: 92 12 63 b0 or %o1, 0x3b0, %o1 <== NOT EXECUTED assert(0); 4000396c: 92 10 20 67 mov 0x67, %o1 <== NOT EXECUTED 40003970: 11 10 00 7f sethi %hi(0x4001fc00), %o0 <== NOT EXECUTED 40003974: 15 10 00 7f sethi %hi(0x4001fc00), %o2 <== NOT EXECUTED 40003978: 90 12 23 00 or %o0, 0x300, %o0 <== NOT EXECUTED 4000397c: 94 12 a0 b0 or %o2, 0xb0, %o2 <== NOT EXECUTED 40003980: 40 00 02 34 call 40004250 <__assert> <== NOT EXECUTED 40003984: 31 10 00 7f sethi %hi(0x4001fc00), %i0 <== NOT EXECUTED break; } puts(""); 40003988: 40 00 46 a7 call 40015424 <== NOT EXECUTED 4000398c: 91 ee 22 08 restore %i0, 0x208, %o0 <== NOT EXECUTED ) { assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { 40003990: 05 10 00 0e sethi %hi(0x40003800), %g2 40003994: 84 10 a0 cc or %g2, 0xcc, %g2 ! 400038cc 40003998: c6 00 80 01 ld [ %g2 + %g1 ], %g3 4000399c: 81 c0 c0 00 jmp %g3 400039a0: 01 00 00 00 nop fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 400039a4: c2 04 20 f8 ld [ %l0 + 0xf8 ], %g1 <== NOT EXECUTED 400039a8: d6 06 20 50 ld [ %i0 + 0x50 ], %o3 <== NOT EXECUTED 400039ac: d4 06 20 4c ld [ %i0 + 0x4c ], %o2 <== NOT EXECUTED 400039b0: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 400039b4: 13 10 00 7f sethi %hi(0x4001fc00), %o1 <== NOT EXECUTED 400039b8: 40 00 3f ce call 400138f0 <== NOT EXECUTED 400039bc: 92 12 63 78 or %o1, 0x378, %o1 ! 4001ff78 <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 400039c0: 31 10 00 7f sethi %hi(0x4001fc00), %i0 <== NOT EXECUTED 400039c4: 40 00 46 98 call 40015424 <== NOT EXECUTED 400039c8: 91 ee 22 08 restore %i0, 0x208, %o0 <== NOT EXECUTED assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 400039cc: c2 04 20 f8 ld [ %l0 + 0xf8 ], %g1 400039d0: 90 10 20 2f mov 0x2f, %o0 400039d4: d2 00 60 08 ld [ %g1 + 8 ], %o1 400039d8: 40 00 3f d2 call 40013920 400039dc: 31 10 00 7f sethi %hi(0x4001fc00), %i0 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 400039e0: 40 00 46 91 call 40015424 400039e4: 91 ee 22 08 restore %i0, 0x208, %o0 case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 400039e8: c2 04 20 f8 ld [ %l0 + 0xf8 ], %g1 400039ec: d6 06 20 50 ld [ %i0 + 0x50 ], %o3 400039f0: d4 06 20 4c ld [ %i0 + 0x4c ], %o2 400039f4: d0 00 60 08 ld [ %g1 + 8 ], %o0 400039f8: 13 10 00 7f sethi %hi(0x4001fc00), %o1 400039fc: 40 00 3f bd call 400138f0 40003a00: 92 12 63 60 or %o1, 0x360, %o1 ! 4001ff60 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 40003a04: 31 10 00 7f sethi %hi(0x4001fc00), %i0 40003a08: 40 00 46 87 call 40015424 40003a0c: 91 ee 22 08 restore %i0, 0x208, %o0 (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 40003a10: c2 04 20 f8 ld [ %l0 + 0xf8 ], %g1 <== NOT EXECUTED 40003a14: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40003a18: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED 40003a1c: 11 10 00 7f sethi %hi(0x4001fc00), %o0 <== NOT EXECUTED 40003a20: 94 10 20 13 mov 0x13, %o2 <== NOT EXECUTED 40003a24: 40 00 42 af call 400144e0 <== NOT EXECUTED 40003a28: 90 12 23 98 or %o0, 0x398, %o0 <== NOT EXECUTED assert(0); 40003a2c: 10 bf ff d1 b 40003970 <== NOT EXECUTED 40003a30: 92 10 20 5d mov 0x5d, %o1 <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 40003a34: c2 04 20 f8 ld [ %l0 + 0xf8 ], %g1 <== NOT EXECUTED 40003a38: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40003a3c: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED 40003a40: 11 10 00 7f sethi %hi(0x4001fc00), %o0 <== NOT EXECUTED 40003a44: 94 10 20 13 mov 0x13, %o2 <== NOT EXECUTED 40003a48: 40 00 42 a6 call 400144e0 <== NOT EXECUTED 40003a4c: 90 12 23 98 or %o0, 0x398, %o0 <== NOT EXECUTED assert(0); 40003a50: 10 bf ff c8 b 40003970 <== NOT EXECUTED 40003a54: 92 10 20 62 mov 0x62, %o1 <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 40003a58: c2 04 20 f8 ld [ %l0 + 0xf8 ], %g1 40003a5c: d4 06 20 4c ld [ %i0 + 0x4c ], %o2 40003a60: d0 00 60 08 ld [ %g1 + 8 ], %o0 40003a64: 13 10 00 7f sethi %hi(0x4001fc00), %o1 40003a68: 40 00 3f a2 call 400138f0 40003a6c: 92 12 63 88 or %o1, 0x388, %o1 ! 4001ff88 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 40003a70: 31 10 00 7f sethi %hi(0x4001fc00), %i0 40003a74: 40 00 46 6c call 40015424 40003a78: 91 ee 22 08 restore %i0, 0x208, %o0 void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { assert( the_jnode ); 40003a7c: 15 10 00 7f sethi %hi(0x4001fc00), %o2 <== NOT EXECUTED 40003a80: 90 12 23 00 or %o0, 0x300, %o0 <== NOT EXECUTED 40003a84: 94 12 a3 50 or %o2, 0x350, %o2 <== NOT EXECUTED 40003a88: 40 00 01 f2 call 40004250 <__assert> <== NOT EXECUTED 40003a8c: 92 10 20 38 mov 0x38, %o1 <== NOT EXECUTED fprintf(stdout, "%s", the_jnode->name ); 40003a90: 10 bf ff aa b 40003938 <== NOT EXECUTED 40003a94: 21 10 00 88 sethi %hi(0x40022000), %l0 <== NOT EXECUTED 400049a8 : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 400049a8: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *node; int i; node = loc->node_access; 400049ac: c6 06 00 00 ld [ %i0 ], %g3 if ( node->type != IMFS_SYM_LINK ) 400049b0: c2 00 e0 48 ld [ %g3 + 0x48 ], %g1 400049b4: 80 a0 60 04 cmp %g1, 4 400049b8: 12 80 00 19 bne 40004a1c 400049bc: 80 a6 a0 00 cmp %i2, 0 rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 400049c0: 02 80 00 15 be 40004a14 400049c4: 88 10 20 00 clr %g4 400049c8: c2 00 e0 4c ld [ %g3 + 0x4c ], %g1 int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 400049cc: b0 10 20 00 clr %i0 for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 400049d0: c4 48 40 00 ldsb [ %g1 ], %g2 400049d4: 80 a0 a0 00 cmp %g2, 0 400049d8: 12 80 00 08 bne 400049f8 400049dc: c2 08 40 00 ldub [ %g1 ], %g1 400049e0: 30 80 00 13 b,a 40004a2c <== NOT EXECUTED 400049e4: c2 00 e0 4c ld [ %g3 + 0x4c ], %g1 400049e8: c4 48 40 18 ldsb [ %g1 + %i0 ], %g2 400049ec: 80 a0 a0 00 cmp %g2, 0 400049f0: 02 80 00 07 be 40004a0c 400049f4: c2 08 40 18 ldub [ %g1 + %i0 ], %g1 buf[i] = node->info.sym_link.name[i]; 400049f8: c2 2e 40 04 stb %g1, [ %i1 + %g4 ] 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++ ) 400049fc: b0 06 20 01 inc %i0 40004a00: 80 a6 00 1a cmp %i0, %i2 40004a04: 12 bf ff f8 bne 400049e4 40004a08: 88 10 00 18 mov %i0, %g4 buf[i] = node->info.sym_link.name[i]; return i; } 40004a0c: 81 c7 e0 08 ret 40004a10: 81 e8 00 00 restore 40004a14: 81 c7 e0 08 ret <== NOT EXECUTED 40004a18: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 40004a1c: 40 00 86 b7 call 400264f8 <__errno> <== NOT EXECUTED 40004a20: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004a24: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40004a28: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004a2c: 81 c7 e0 08 ret <== NOT EXECUTED 40004a30: 81 e8 00 00 restore <== NOT EXECUTED 4000bc74 : */ int IMFS_rmnod( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4000bc74: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4000bc78: 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 ) { 4000bc7c: c2 04 20 08 ld [ %l0 + 8 ], %g1 4000bc80: 80 a0 60 00 cmp %g1, 0 4000bc84: 22 80 00 06 be,a 4000bc9c 4000bc88: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 <== NOT EXECUTED Chain_Extract( (Chain_Node *) the_jnode ); 4000bc8c: 40 00 05 c2 call 4000d394 <_Chain_Extract> 4000bc90: 90 10 00 10 mov %l0, %o0 the_jnode->Parent = NULL; 4000bc94: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4000bc98: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 4000bc9c: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4000bca0: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 4000bca4: 90 07 bf f0 add %fp, -16, %o0 4000bca8: 40 00 01 27 call 4000c144 4000bcac: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 4000bcb0: 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) ) { 4000bcb4: 90 10 00 10 mov %l0, %o0 4000bcb8: 40 00 01 5d call 4000c22c 4000bcbc: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 4000bcc0: 80 a2 20 00 cmp %o0, 0 4000bcc4: 12 80 00 12 bne 4000bd0c 4000bcc8: 01 00 00 00 nop 4000bccc: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 4000bcd0: 80 a0 60 00 cmp %g1, 0 4000bcd4: 12 80 00 0e bne 4000bd0c 4000bcd8: 03 10 00 67 sethi %hi(0x40019c00), %g1 /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 4000bcdc: c6 00 63 20 ld [ %g1 + 0x320 ], %g3 ! 40019f20 4000bce0: c4 06 00 00 ld [ %i0 ], %g2 4000bce4: c2 00 e0 04 ld [ %g3 + 4 ], %g1 4000bce8: 80 a0 40 02 cmp %g1, %g2 4000bcec: 22 80 00 02 be,a 4000bcf4 4000bcf0: c0 20 e0 04 clr [ %g3 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 4000bcf4: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000bcf8: 80 a0 60 04 cmp %g1, 4 4000bcfc: 22 80 00 06 be,a 4000bd14 4000bd00: d0 04 20 4c ld [ %l0 + 0x4c ], %o0 if ( the_jnode->info.sym_link.name ) free( the_jnode->info.sym_link.name ); } free( the_jnode ); 4000bd04: 7f ff d9 66 call 4000229c 4000bd08: 90 10 00 10 mov %l0, %o0 } return 0; } 4000bd0c: 81 c7 e0 08 ret 4000bd10: 91 e8 20 00 restore %g0, 0, %o0 /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { if ( the_jnode->info.sym_link.name ) 4000bd14: 80 a2 20 00 cmp %o0, 0 4000bd18: 02 bf ff fb be 4000bd04 4000bd1c: 01 00 00 00 nop free( the_jnode->info.sym_link.name ); 4000bd20: 7f ff d9 5f call 4000229c 4000bd24: 01 00 00 00 nop 4000bd28: 30 bf ff f7 b,a 4000bd04 4000bd2c : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 4000bd2c: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 4000bd30: f0 06 00 00 ld [ %i0 ], %i0 switch ( the_jnode->type ) { 4000bd34: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4000bd38: 80 a0 60 04 cmp %g1, 4 4000bd3c: 22 80 00 11 be,a 4000bd80 4000bd40: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED 4000bd44: 14 80 00 0b bg 4000bd70 4000bd48: 80 a0 60 06 cmp %g1, 6 4000bd4c: 80 a0 60 02 cmp %g1, 2 4000bd50: 22 80 00 1e be,a 4000bdc8 4000bd54: c4 06 20 4c ld [ %i0 + 0x4c ], %g2 case IMFS_SYM_LINK: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000bd58: 40 00 0c 25 call 4000edec <__errno> <== NOT EXECUTED 4000bd5c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000bd60: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000bd64: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000bd68: 81 c7 e0 08 ret <== NOT EXECUTED 4000bd6c: 81 e8 00 00 restore <== NOT EXECUTED IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 4000bd70: 14 bf ff fa bg 4000bd58 4000bd74: 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; 4000bd78: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 4000bd7c: c2 26 60 20 st %g1, [ %i1 + 0x20 ] default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 4000bd80: c2 16 20 2e lduh [ %i0 + 0x2e ], %g1 buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4000bd84: 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; 4000bd88: c2 36 60 0c sth %g1, [ %i1 + 0xc ] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4000bd8c: 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; 4000bd90: 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; 4000bd94: 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; 4000bd98: 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; 4000bd9c: 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; 4000bda0: 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; 4000bda4: 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; 4000bda8: 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; 4000bdac: 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; 4000bdb0: 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; 4000bdb4: 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; 4000bdb8: 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; 4000bdbc: c2 26 60 34 st %g1, [ %i1 + 0x34 ] return 0; } 4000bdc0: 81 c7 e0 08 ret 4000bdc4: 91 e8 20 00 restore %g0, 0, %o0 4000bdc8: 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 ); 4000bdcc: 10 bf ff ed b 4000bd80 4000bdd0: c4 3e 40 00 std %g2, [ %i1 ] 40004a34 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 40004a34: 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 ); 40004a38: a0 07 bf c3 add %fp, -61, %l0 40004a3c: 94 07 bf f4 add %fp, -12, %o2 40004a40: 92 10 00 10 mov %l0, %o1 40004a44: 7f ff fe db call 400045b0 40004a48: 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 ) { 40004a4c: 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; 40004a50: f2 27 bf e4 st %i1, [ %fp + -28 ] /* * Create a new link node. */ new_node = IMFS_create_node( 40004a54: 94 10 00 10 mov %l0, %o2 40004a58: 92 10 20 04 mov 4, %o1 40004a5c: 17 00 00 28 sethi %hi(0xa000), %o3 40004a60: 98 07 bf e4 add %fp, -28, %o4 40004a64: 96 12 e1 ff or %o3, 0x1ff, %o3 40004a68: 40 00 49 67 call 40017004 40004a6c: b0 10 20 00 clr %i0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 40004a70: 80 a2 20 00 cmp %o0, 0 40004a74: 02 80 00 04 be 40004a84 40004a78: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 40004a7c: 81 c7 e0 08 ret 40004a80: 81 e8 00 00 restore ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 40004a84: 40 00 86 9d call 400264f8 <__errno> <== NOT EXECUTED 40004a88: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004a8c: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40004a90: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; } 40004a94: 81 c7 e0 08 ret <== NOT EXECUTED 40004a98: 81 e8 00 00 restore <== NOT EXECUTED 40004a9c : #include int IMFS_unlink( rtems_filesystem_location_info_t *loc /* IN */ ) { 40004a9c: 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; 40004aa0: 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 ) { 40004aa4: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40004aa8: 80 a0 60 03 cmp %g1, 3 40004aac: 22 80 00 08 be,a 40004acc 40004ab0: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( loc ); 40004ab4: c4 06 20 04 ld [ %i0 + 4 ], %g2 40004ab8: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1 40004abc: 9f c0 40 00 call %g1 40004ac0: 90 10 00 18 mov %i0, %o0 return result; } 40004ac4: 81 c7 e0 08 ret 40004ac8: 91 e8 00 08 restore %g0, %o0, %o0 * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 40004acc: 80 a0 60 00 cmp %g1, 0 40004ad0: 02 80 00 21 be 40004b54 40004ad4: a2 07 bf e0 add %fp, -32, %l1 rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 40004ad8: c2 06 20 04 ld [ %i0 + 4 ], %g1 40004adc: c4 06 20 08 ld [ %i0 + 8 ], %g2 40004ae0: c6 06 20 0c ld [ %i0 + 0xc ], %g3 40004ae4: e0 27 bf e0 st %l0, [ %fp + -32 ] 40004ae8: c4 3f bf e8 std %g2, [ %fp + -24 ] 40004aec: c2 27 bf e4 st %g1, [ %fp + -28 ] the_link.node_access = node->info.hard_link.link_node; 40004af0: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 40004af4: c2 27 bf e0 st %g1, [ %fp + -32 ] IMFS_Set_handlers( &the_link ); 40004af8: 40 00 49 ac call 400171a8 40004afc: 90 10 00 11 mov %l1, %o0 /* * If removing the last hard link to a node, then we need * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) 40004b00: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 40004b04: c2 10 a0 30 lduh [ %g2 + 0x30 ], %g1 40004b08: 80 a0 60 01 cmp %g1, 1 40004b0c: 02 80 00 0a be 40004b34 40004b10: 82 00 7f ff add %g1, -1, %g1 return -1; } else { node->info.hard_link.link_node->st_nlink --; IMFS_update_ctime( node->info.hard_link.link_node ); 40004b14: 90 07 bf f0 add %fp, -16, %o0 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 40004b18: c2 30 a0 30 sth %g1, [ %g2 + 0x30 ] IMFS_update_ctime( node->info.hard_link.link_node ); 40004b1c: 40 00 01 4b call 40005048 40004b20: 92 10 20 00 clr %o1 40004b24: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 40004b28: c2 07 bf f0 ld [ %fp + -16 ], %g1 40004b2c: 10 bf ff e2 b 40004ab4 40004b30: c2 20 a0 44 st %g1, [ %g2 + 0x44 ] * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( &the_link ); 40004b34: c2 07 bf e4 ld [ %fp + -28 ], %g1 40004b38: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 40004b3c: 9f c0 80 00 call %g2 40004b40: 90 10 00 11 mov %l1, %o0 if ( result != 0 ) 40004b44: 80 a2 20 00 cmp %o0, 0 40004b48: 02 bf ff db be 40004ab4 40004b4c: 90 10 3f ff mov -1, %o0 40004b50: 30 bf ff dd b,a 40004ac4 */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 40004b54: 40 00 86 69 call 400264f8 <__errno> <== NOT EXECUTED 40004b58: 01 00 00 00 nop <== NOT EXECUTED 40004b5c: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 40004b60: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004b64: 10 bf ff d8 b 40004ac4 <== NOT EXECUTED 40004b68: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 40004b6c : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 40004b6c: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 40004b70: c4 06 20 08 ld [ %i0 + 8 ], %g2 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 40004b74: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1 40004b78: 80 a0 60 01 cmp %g1, 1 40004b7c: 12 80 00 09 bne 40004ba0 40004b80: 01 00 00 00 nop /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 40004b84: c2 00 a0 58 ld [ %g2 + 0x58 ], %g1 40004b88: 80 a0 60 00 cmp %g1, 0 40004b8c: 02 80 00 0b be 40004bb8 40004b90: 01 00 00 00 nop /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; 40004b94: c0 20 a0 58 clr [ %g2 + 0x58 ] return 0; } 40004b98: 81 c7 e0 08 ret 40004b9c: 91 e8 20 00 restore %g0, 0, %o0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 40004ba0: 40 00 86 56 call 400264f8 <__errno> <== NOT EXECUTED 40004ba4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004ba8: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 40004bac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004bb0: 81 c7 e0 08 ret <== NOT EXECUTED 40004bb4: 81 e8 00 00 restore <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 40004bb8: 40 00 86 50 call 400264f8 <__errno> <== NOT EXECUTED 40004bbc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004bc0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40004bc4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004bc8: 81 c7 e0 08 ret <== NOT EXECUTED 40004bcc: 81 e8 00 00 restore <== NOT EXECUTED 40026518 : assert( 0 ); return 0; } int POSIX_BOTTOM_REACHED() { 40026518: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED assert( 0 ); 4002651c: 92 10 20 22 mov 0x22, %o1 <== NOT EXECUTED 40026520: 11 10 00 a8 sethi %hi(0x4002a000), %o0 <== NOT EXECUTED 40026524: 15 10 00 9a sethi %hi(0x40026800), %o2 <== NOT EXECUTED 40026528: 90 12 23 98 or %o0, 0x398, %o0 <== NOT EXECUTED 4002652c: 94 12 a1 80 or %o2, 0x180, %o2 <== NOT EXECUTED 40026530: 7f ff 89 20 call 400089b0 <__assert> <== NOT EXECUTED 40026534: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 40026538: 81 c7 e0 08 ret <== NOT EXECUTED 4002653c: 81 e8 00 00 restore <== NOT EXECUTED 40026540 : */ #include int POSIX_MP_NOT_IMPLEMENTED() { 40026540: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED assert( 0 ); 40026544: 92 10 20 1c mov 0x1c, %o1 <== NOT EXECUTED 40026548: 11 10 00 a8 sethi %hi(0x4002a000), %o0 <== NOT EXECUTED 4002654c: 15 10 00 9a sethi %hi(0x40026800), %o2 <== NOT EXECUTED 40026550: 90 12 23 98 or %o0, 0x398, %o0 <== NOT EXECUTED 40026554: 94 12 a1 80 or %o2, 0x180, %o2 <== NOT EXECUTED 40026558: 7f ff 89 16 call 400089b0 <__assert> <== NOT EXECUTED 4002655c: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 40026560: 81 c7 e0 08 ret <== NOT EXECUTED 40026564: 81 e8 00 00 restore <== NOT EXECUTED 400264f0 : assert( 0 ); return 0; } int POSIX_NOT_IMPLEMENTED() { 400264f0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED assert( 0 ); 400264f4: 92 10 20 28 mov 0x28, %o1 <== NOT EXECUTED 400264f8: 11 10 00 a8 sethi %hi(0x4002a000), %o0 <== NOT EXECUTED 400264fc: 15 10 00 9a sethi %hi(0x40026800), %o2 <== NOT EXECUTED 40026500: 90 12 23 98 or %o0, 0x398, %o0 <== NOT EXECUTED 40026504: 94 12 a1 80 or %o2, 0x180, %o2 <== NOT EXECUTED 40026508: 7f ff 89 2a call 400089b0 <__assert> <== NOT EXECUTED 4002650c: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 40026510: 81 c7 e0 08 ret <== NOT EXECUTED 40026514: 81 e8 00 00 restore <== NOT EXECUTED 40002604 : void RTEMS_Malloc_Initialize( void *start, size_t length, size_t sbrk_amount ) { 40002604: 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; 40002608: 03 10 00 6a sethi %hi(0x4001a800), %g1 * 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; 4000260c: 05 10 00 6a sethi %hi(0x4001a800), %g2 40002610: 82 10 62 00 or %g1, 0x200, %g1 40002614: f4 20 a1 f8 st %i2, [ %g2 + 0x1f8 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40002618: c2 20 7f fc st %g1, [ %g1 + -4 ] 4000261c: 82 00 7f fc add %g1, -4, %g1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40002620: c2 20 60 08 st %g1, [ %g1 + 8 ] if (!starting_address) { 40002624: 80 a6 20 00 cmp %i0, 0 40002628: 02 80 00 19 be 4000268c 4000262c: c0 20 60 04 clr [ %g1 + 4 ] * 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() ) 40002630: 03 10 00 6a sethi %hi(0x4001a800), %g1 40002634: c4 00 63 84 ld [ %g1 + 0x384 ], %g2 ! 4001ab84 <_CPU_Table+0x10> 40002638: 80 a0 a0 00 cmp %g2, 0 4000263c: 32 80 00 0f bne,a 40002678 40002640: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED void *starting_address, size_t size, uint32_t page_size ) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); 40002644: 92 10 00 18 mov %i0, %o1 40002648: 94 10 00 19 mov %i1, %o2 4000264c: 11 10 00 6a sethi %hi(0x4001a800), %o0 40002650: 96 10 20 08 mov 8, %o3 40002654: 40 00 13 fd call 40007648 <_Heap_Initialize> 40002658: 90 12 21 a0 or %o0, 0x1a0, %o0 &RTEMS_Malloc_Heap, starting_address, length, CPU_HEAP_ALIGNMENT ); if ( !status ) 4000265c: 80 a2 20 00 cmp %o0, 0 40002660: 02 80 00 04 be 40002670 40002664: 01 00 00 00 nop 40002668: 81 c7 e0 08 ret 4000266c: 81 e8 00 00 restore rtems_fatal_error_occurred( status ); 40002670: 40 00 10 ea call 40006a18 <== NOT EXECUTED 40002674: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED * 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() ) memset( starting_address, 0, length ); 40002678: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000267c: 40 00 33 de call 4000f5f4 <== NOT EXECUTED 40002680: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED 40002684: 10 bf ff f1 b 40002648 <== NOT EXECUTED 40002688: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED starting_address = start; RTEMS_Malloc_Sbrk_amount = sbrk_amount; if (!starting_address) { uaddress = (uintptr_t)sbrk(length); 4000268c: 7f ff fc fe call 40001a84 <== NOT EXECUTED 40002690: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if (uaddress == (uintptr_t) -1) { 40002694: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 40002698: 02 80 00 0b be 400026c4 <== NOT EXECUTED 4000269c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); /* DOES NOT RETURN!!! */ } if (uaddress & (CPU_HEAP_ALIGNMENT-1)) { 400026a0: 80 8a 20 07 btst 7, %o0 <== NOT EXECUTED 400026a4: 02 bf ff e4 be 40002634 <== NOT EXECUTED 400026a8: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED old_address = uaddress; uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1); 400026ac: 82 06 20 08 add %i0, 8, %g1 <== NOT EXECUTED 400026b0: 82 08 7f f8 and %g1, -8, %g1 <== NOT EXECUTED /* * adjust the length by whatever we aligned by */ length -= uaddress - old_address; 400026b4: 84 20 40 18 sub %g1, %i0, %g2 <== NOT EXECUTED 400026b8: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED 400026bc: 10 bf ff dd b 40002630 <== NOT EXECUTED 400026c0: b2 26 40 02 sub %i1, %g2, %i1 <== NOT EXECUTED if (!starting_address) { uaddress = (uintptr_t)sbrk(length); if (uaddress == (uintptr_t) -1) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 400026c4: 40 00 10 d5 call 40006a18 <== NOT EXECUTED 400026c8: 90 10 20 1a mov 0x1a, %o0 <== NOT EXECUTED /* DOES NOT RETURN!!! */ } if (uaddress & (CPU_HEAP_ALIGNMENT-1)) { old_address = uaddress; uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1); 400026cc: 10 bf ff f9 b 400026b0 <== NOT EXECUTED 400026d0: 82 06 20 08 add %i0, 8, %g1 <== NOT EXECUTED 4000276c : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 4000276c: 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 ) 40002770: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40002774: 02 80 00 2a be 4000281c <== NOT EXECUTED 40002778: 2b 10 00 7b sethi %hi(0x4001ec00), %l5 <== NOT EXECUTED return; if ( !print_handler ) 4000277c: e6 05 62 fc ld [ %l5 + 0x2fc ], %l3 ! 4001eefc <== NOT EXECUTED 40002780: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 40002784: 02 80 00 26 be 4000281c <== NOT EXECUTED 40002788: 80 a6 3f ff cmp %i0, -1 <== NOT EXECUTED /* * XXX HACK to get to interrupt stack */ if (the_thread == (Thread_Control *) -1) { 4000278c: 02 80 00 33 be 40002858 <== NOT EXECUTED 40002790: a2 06 20 d0 add %i0, 0xd0, %l1 <== NOT EXECUTED else return; } else stack = &the_thread->Start.Initial_stack; low = Stack_check_usable_stack_start(stack); 40002794: c2 04 60 04 ld [ %l1 + 4 ], %g1 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 40002798: 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); 4000279c: a0 00 60 10 add %g1, 0x10, %l0 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 400027a0: a4 00 bf f0 add %g2, -16, %l2 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 400027a4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400027a8: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 400027ac: 7f ff ff d7 call 40002708 <== NOT EXECUTED 400027b0: a8 10 20 00 clr %l4 <== NOT EXECUTED if ( high_water_mark ) 400027b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400027b8: 02 80 00 03 be 400027c4 <== NOT EXECUTED 400027bc: 82 04 00 12 add %l0, %l2, %g1 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 400027c0: a8 20 40 08 sub %g1, %o0, %l4 <== NOT EXECUTED else used = 0; if ( the_thread ) { 400027c4: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 400027c8: 02 80 00 17 be 40002824 <== NOT EXECUTED 400027cc: 03 10 00 7b sethi %hi(0x4001ec00), %g1 <== NOT EXECUTED rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 400027d0: d0 06 20 08 ld [ %i0 + 8 ], %o0 <== NOT EXECUTED 400027d4: a0 07 bf f3 add %fp, -13, %l0 <== NOT EXECUTED 400027d8: 92 10 20 05 mov 5, %o1 <== NOT EXECUTED 400027dc: 40 00 11 3d call 40006cd0 <== NOT EXECUTED 400027e0: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED name[ 2 ] = 'T'; name[ 3 ] = 'R'; name[ 4 ] = '\0'; } (*print_handler)( 400027e4: 03 10 00 7b sethi %hi(0x4001ec00), %g1 <== NOT EXECUTED 400027e8: e6 05 62 fc ld [ %l5 + 0x2fc ], %l3 <== NOT EXECUTED 400027ec: d4 06 20 08 ld [ %i0 + 8 ], %o2 <== NOT EXECUTED 400027f0: d0 00 62 f8 ld [ %g1 + 0x2f8 ], %o0 <== NOT EXECUTED 400027f4: da 04 40 00 ld [ %l1 ], %o5 <== NOT EXECUTED 400027f8: d8 04 60 04 ld [ %l1 + 4 ], %o4 <== NOT EXECUTED 400027fc: 13 10 00 70 sethi %hi(0x4001c000), %o1 <== NOT EXECUTED 40002800: 9a 03 00 0d add %o4, %o5, %o5 <== NOT EXECUTED 40002804: e4 23 a0 5c st %l2, [ %sp + 0x5c ] <== NOT EXECUTED 40002808: e8 23 a0 60 st %l4, [ %sp + 0x60 ] <== NOT EXECUTED 4000280c: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40002810: 9a 03 7f ff add %o5, -1, %o5 <== NOT EXECUTED 40002814: 9f c4 c0 00 call %l3 <== NOT EXECUTED 40002818: 92 12 63 d8 or %o1, 0x3d8, %o1 <== NOT EXECUTED 4000281c: 81 c7 e0 08 ret <== NOT EXECUTED 40002820: 81 e8 00 00 restore <== NOT EXECUTED 40002824: d0 00 62 f8 ld [ %g1 + 0x2f8 ], %o0 <== NOT EXECUTED if ( the_thread ) { rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); } else { name[ 0 ] = 'I'; name[ 1 ] = 'N'; 40002828: 84 10 20 4e mov 0x4e, %g2 <== NOT EXECUTED used = 0; if ( the_thread ) { rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); } else { name[ 0 ] = 'I'; 4000282c: 82 10 20 49 mov 0x49, %g1 <== NOT EXECUTED name[ 1 ] = 'N'; 40002830: c4 2f bf f4 stb %g2, [ %fp + -12 ] <== NOT EXECUTED used = 0; if ( the_thread ) { rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); } else { name[ 0 ] = 'I'; 40002834: c2 2f bf f3 stb %g1, [ %fp + -13 ] <== NOT EXECUTED name[ 1 ] = 'N'; name[ 2 ] = 'T'; name[ 3 ] = 'R'; 40002838: 84 10 20 52 mov 0x52, %g2 <== 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'; 4000283c: 82 10 20 54 mov 0x54, %g1 <== NOT EXECUTED name[ 3 ] = 'R'; name[ 4 ] = '\0'; 40002840: 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'; 40002844: c2 2f bf f5 stb %g1, [ %fp + -11 ] <== NOT EXECUTED name[ 3 ] = 'R'; 40002848: c4 2f bf f6 stb %g2, [ %fp + -10 ] <== NOT EXECUTED name[ 4 ] = '\0'; } (*print_handler)( 4000284c: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 40002850: 10 bf ff e9 b 400027f4 <== NOT EXECUTED 40002854: a0 07 bf f3 add %fp, -13, %l0 <== NOT EXECUTED /* * XXX HACK to get to interrupt stack */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 40002858: 03 10 00 7c sethi %hi(0x4001f000), %g1 <== NOT EXECUTED 4000285c: 82 10 60 c0 or %g1, 0xc0, %g1 ! 4001f0c0 <== NOT EXECUTED 40002860: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED stack = &Stack_check_Interrupt_stack; the_thread = 0; } else return; 40002864: 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) { 40002868: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000286c: 12 bf ff ca bne 40002794 <== NOT EXECUTED 40002870: b0 10 20 00 clr %i0 <== NOT EXECUTED 40002874: 81 c7 e0 08 ret <== NOT EXECUTED 40002878: 81 e8 00 00 restore <== NOT EXECUTED 40002708 : */ void *Stack_check_find_high_water_mark( const void *s, size_t n ) { 40002708: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 4000270c: 92 0a 7f fc and %o1, -4, %o1 <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 40002710: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 40002714: 92 02 40 08 add %o1, %o0, %o1 <== NOT EXECUTED 40002718: 80 a2 00 09 cmp %o0, %o1 <== NOT EXECUTED 4000271c: 3a 80 00 12 bcc,a 40002764 <== NOT EXECUTED 40002720: 90 10 20 00 clr %o0 <== NOT EXECUTED if (*base != U32_PATTERN) 40002724: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED 40002728: 03 29 69 69 sethi %hi(0xa5a5a400), %g1 <== NOT EXECUTED 4000272c: 82 10 61 a5 or %g1, 0x1a5, %g1 ! a5a5a5a5 <== NOT EXECUTED 40002730: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40002734: 22 80 00 07 be,a 40002750 <== NOT EXECUTED 40002738: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED 4000273c: 30 80 00 0a b,a 40002764 <== NOT EXECUTED 40002740: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40002744: 12 80 00 08 bne 40002764 <== NOT EXECUTED 40002748: 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++) 4000274c: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED 40002750: 80 a2 40 08 cmp %o1, %o0 <== NOT EXECUTED 40002754: 38 bf ff fb bgu,a 40002740 <== NOT EXECUTED 40002758: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 4000275c: 81 c3 e0 08 retl <== NOT EXECUTED 40002760: 90 10 20 00 clr %o0 <== NOT EXECUTED 40002764: 81 c3 e0 08 retl <== NOT EXECUTED 40002768: 01 00 00 00 nop 40002900 : */ void Stack_check_report_blown_task( Thread_Control *running, boolean pattern_ok ) { 40002900: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; printk( 40002904: d4 1e 20 08 ldd [ %i0 + 8 ], %o2 <== NOT EXECUTED 40002908: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000290c: 11 10 00 71 sethi %hi(0x4001c400), %o0 <== NOT EXECUTED 40002910: 40 00 06 47 call 4000422c <== NOT EXECUTED 40002914: 90 12 20 60 or %o0, 0x60, %o0 ! 4001c460 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif printk( 40002918: d4 06 20 d4 ld [ %i0 + 0xd4 ], %o2 <== NOT EXECUTED 4000291c: c2 06 20 d0 ld [ %i0 + 0xd0 ], %g1 <== NOT EXECUTED 40002920: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40002924: 96 10 00 01 mov %g1, %o3 <== NOT EXECUTED 40002928: 94 02 80 01 add %o2, %g1, %o2 <== NOT EXECUTED 4000292c: 11 10 00 71 sethi %hi(0x4001c400), %o0 <== NOT EXECUTED 40002930: 94 02 bf ff add %o2, -1, %o2 <== NOT EXECUTED 40002934: 40 00 06 3e call 4000422c <== NOT EXECUTED 40002938: 90 12 20 a0 or %o0, 0xa0, %o0 <== NOT EXECUTED stack->area, stack->area + stack->size - 1, stack->size ); if ( !pattern_ok ) { 4000293c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40002940: 12 80 00 07 bne 4000295c <== NOT EXECUTED 40002944: 11 10 00 71 sethi %hi(0x4001c400), %o0 <== NOT EXECUTED printk( 40002948: d2 06 20 d4 ld [ %i0 + 0xd4 ], %o1 <== NOT EXECUTED 4000294c: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED 40002950: 90 12 20 d0 or %o0, 0xd0, %o0 <== NOT EXECUTED 40002954: 40 00 06 36 call 4000422c <== NOT EXECUTED 40002958: 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 ); 4000295c: 40 00 14 e7 call 40007cf8 <== NOT EXECUTED 40002960: 91 e8 20 81 restore %g0, 0x81, %o0 <== NOT EXECUTED 40002964: 01 00 00 00 nop 40006c64 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 40006c64: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40006c68: 03 10 00 6b sethi %hi(0x4001ac00), %g1 40006c6c: e0 00 61 f0 ld [ %g1 + 0x1f0 ], %l0 ! 4001adf0 <_API_extensions_List> 40006c70: 82 10 61 f0 or %g1, 0x1f0, %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40006c74: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40006c78: 80 a4 00 11 cmp %l0, %l1 40006c7c: 02 80 00 0c be 40006cac <_API_extensions_Run_postdriver+0x48> 40006c80: 01 00 00 00 nop the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postdriver_hook ) 40006c84: c2 04 20 0c ld [ %l0 + 0xc ], %g1 40006c88: 80 a0 60 00 cmp %g1, 0 40006c8c: 22 80 00 05 be,a 40006ca0 <_API_extensions_Run_postdriver+0x3c> 40006c90: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postdriver_hook)(); 40006c94: 9f c0 40 00 call %g1 40006c98: 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 ) { 40006c9c: 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 ) ; 40006ca0: 80 a4 00 11 cmp %l0, %l1 40006ca4: 32 bf ff f9 bne,a 40006c88 <_API_extensions_Run_postdriver+0x24> 40006ca8: c2 04 20 0c ld [ %l0 + 0xc ], %g1 40006cac: 81 c7 e0 08 ret 40006cb0: 81 e8 00 00 restore 40006d20 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 40006d20: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40006d24: 03 10 00 6b sethi %hi(0x4001ac00), %g1 40006d28: e0 00 61 f0 ld [ %g1 + 0x1f0 ], %l0 ! 4001adf0 <_API_extensions_List> 40006d2c: 82 10 61 f0 or %g1, 0x1f0, %g1 40006d30: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40006d34: 80 a4 00 11 cmp %l0, %l1 40006d38: 02 80 00 0c be 40006d68 <_API_extensions_Run_postswitch+0x48> 40006d3c: 25 10 00 6b sethi %hi(0x4001ac00), %l2 the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postswitch_hook ) 40006d40: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40006d44: 80 a0 60 00 cmp %g1, 0 40006d48: 22 80 00 05 be,a 40006d5c <_API_extensions_Run_postswitch+0x3c> 40006d4c: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postswitch_hook)( _Thread_Executing ); 40006d50: 9f c0 40 00 call %g1 40006d54: d0 04 a0 3c ld [ %l2 + 0x3c ], %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 ) { 40006d58: 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 ) ; 40006d5c: 80 a4 00 11 cmp %l0, %l1 40006d60: 32 bf ff f9 bne,a 40006d44 <_API_extensions_Run_postswitch+0x24> 40006d64: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40006d68: 81 c7 e0 08 ret 40006d6c: 81 e8 00 00 restore 40006cd0 <_API_extensions_Run_predriver>: * * _API_extensions_Run_predriver */ void _API_extensions_Run_predriver( void ) { 40006cd0: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40006cd4: 03 10 00 6b sethi %hi(0x4001ac00), %g1 40006cd8: e0 00 61 f0 ld [ %g1 + 0x1f0 ], %l0 ! 4001adf0 <_API_extensions_List> 40006cdc: 82 10 61 f0 or %g1, 0x1f0, %g1 40006ce0: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40006ce4: 80 a4 00 11 cmp %l0, %l1 40006ce8: 02 80 00 0c be 40006d18 <_API_extensions_Run_predriver+0x48> 40006cec: 01 00 00 00 nop the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->predriver_hook ) 40006cf0: c2 04 20 08 ld [ %l0 + 8 ], %g1 40006cf4: 80 a0 60 00 cmp %g1, 0 40006cf8: 22 80 00 05 be,a 40006d0c <_API_extensions_Run_predriver+0x3c> 40006cfc: e0 04 00 00 ld [ %l0 ], %l0 (*the_extension->predriver_hook)(); 40006d00: 9f c0 40 00 call %g1 <== NOT EXECUTED 40006d04: 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 ) { 40006d08: 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 ) ; 40006d0c: 80 a4 00 11 cmp %l0, %l1 40006d10: 32 bf ff f9 bne,a 40006cf4 <_API_extensions_Run_predriver+0x24> 40006d14: c2 04 20 08 ld [ %l0 + 8 ], %g1 40006d18: 81 c7 e0 08 ret 40006d1c: 81 e8 00 00 restore 400091f4 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 400091f4: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing = _Thread_Executing; 400091f8: 03 10 00 76 sethi %hi(0x4001d800), %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 ); 400091fc: 7f ff e6 dd call 40002d70 40009200: e0 00 60 ac ld [ %g1 + 0xac ], %l0 ! 4001d8ac <_Thread_Executing> 40009204: 84 10 00 08 mov %o0, %g2 switch ( the_rwlock->current_state ) { 40009208: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 4000920c: 80 a0 60 01 cmp %g1, 1 40009210: 22 80 00 2d be,a 400092c4 <_CORE_RWLock_Release+0xd0> 40009214: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40009218: 0a 80 00 24 bcs 400092a8 <_CORE_RWLock_Release+0xb4> 4000921c: 80 a0 60 02 cmp %g1, 2 40009220: 22 80 00 02 be,a 40009228 <_CORE_RWLock_Release+0x34> 40009224: 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; 40009228: c0 26 20 44 clr [ %i0 + 0x44 ] _ISR_Enable( level ); 4000922c: 7f ff e6 d5 call 40002d80 40009230: 90 10 00 02 mov %g2, %o0 next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 40009234: 40 00 09 93 call 4000b880 <_Thread_queue_Dequeue> 40009238: 90 10 00 18 mov %i0, %o0 if ( next ) { 4000923c: 80 a2 20 00 cmp %o0, 0 40009240: 22 80 00 1f be,a 400092bc <_CORE_RWLock_Release+0xc8> 40009244: b0 10 20 00 clr %i0 if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 40009248: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 4000924c: 80 a0 60 01 cmp %g1, 1 40009250: 02 80 00 26 be 400092e8 <_CORE_RWLock_Release+0xf4> 40009254: 84 10 20 01 mov 1, %g2 } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 40009258: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4000925c: 82 00 60 01 inc %g1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 40009260: c4 26 20 44 st %g2, [ %i0 + 0x44 ] } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 40009264: 10 80 00 0a b 4000928c <_CORE_RWLock_Release+0x98> 40009268: c2 26 20 48 st %g1, [ %i0 + 0x48 ] /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || 4000926c: 80 a0 60 01 cmp %g1, 1 40009270: 02 80 00 12 be 400092b8 <_CORE_RWLock_Release+0xc4> 40009274: 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; 40009278: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 4000927c: 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; 40009280: 82 00 60 01 inc %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 40009284: 40 00 0a cd call 4000bdb8 <_Thread_queue_Extract> 40009288: 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 ); 4000928c: 40 00 0b 3b call 4000bf78 <_Thread_queue_First> 40009290: 90 10 00 18 mov %i0, %o0 if ( !next || 40009294: 80 a2 20 00 cmp %o0, 0 40009298: 32 bf ff f5 bne,a 4000926c <_CORE_RWLock_Release+0x78> 4000929c: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 } } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 400092a0: 81 c7 e0 08 ret 400092a4: 91 e8 20 00 restore %g0, 0, %o0 */ _ISR_Disable( level ); switch ( the_rwlock->current_state ) { case CORE_RWLOCK_UNLOCKED: _ISR_Enable( level ); 400092a8: 7f ff e6 b6 call 40002d80 <== NOT EXECUTED 400092ac: 01 00 00 00 nop <== NOT EXECUTED executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 400092b0: 82 10 20 02 mov 2, %g1 ! 2 <== NOT EXECUTED 400092b4: c2 24 20 34 st %g1, [ %l0 + 0x34 ] <== NOT EXECUTED } } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 400092b8: b0 10 20 00 clr %i0 <== NOT EXECUTED 400092bc: 81 c7 e0 08 ret 400092c0: 81 e8 00 00 restore _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; case CORE_RWLOCK_LOCKED_FOR_READING: the_rwlock->number_of_readers -= 1; 400092c4: 82 00 7f ff add %g1, -1, %g1 if ( the_rwlock->number_of_readers != 0 ) { 400092c8: 80 a0 60 00 cmp %g1, 0 400092cc: 12 80 00 04 bne 400092dc <_CORE_RWLock_Release+0xe8> 400092d0: c2 26 20 48 st %g1, [ %i0 + 0x48 ] 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; 400092d4: 10 bf ff d5 b 40009228 <_CORE_RWLock_Release+0x34> 400092d8: c0 24 20 34 clr [ %l0 + 0x34 ] case CORE_RWLOCK_LOCKED_FOR_READING: the_rwlock->number_of_readers -= 1; if ( the_rwlock->number_of_readers != 0 ) { /* must be unlocked again */ _ISR_Enable( level ); 400092dc: 7f ff e6 a9 call 40002d80 400092e0: b0 10 20 00 clr %i0 400092e4: 30 bf ff f6 b,a 400092bc <_CORE_RWLock_Release+0xc8> next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); if ( next ) { if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 400092e8: 82 10 20 02 mov 2, %g1 400092ec: c2 26 20 44 st %g1, [ %i0 + 0x44 ] } } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 400092f0: 81 c7 e0 08 ret 400092f4: 91 e8 20 00 restore %g0, 0, %o0 400092f8 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 400092f8: 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 ) ) { 400092fc: 92 96 20 00 orcc %i0, 0, %o1 40009300: 12 80 00 1a bne 40009368 <_CORE_RWLock_Timeout+0x70> 40009304: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40009308: 31 10 00 75 sethi %hi(0x4001d400), %i0 <== NOT EXECUTED 4000930c: c2 06 23 d0 ld [ %i0 + 0x3d0 ], %g1 ! 4001d7d0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40009310: 82 00 60 01 inc %g1 <== NOT EXECUTED 40009314: c2 26 23 d0 st %g1, [ %i0 + 0x3d0 ] <== 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; 40009318: 03 10 00 76 sethi %hi(0x4001d800), %g1 <== NOT EXECUTED 4000931c: d2 00 60 ac ld [ %g1 + 0xac ], %o1 ! 4001d8ac <_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; 40009320: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED */ static inline void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 40009324: d0 02 60 44 ld [ %o1 + 0x44 ], %o0 * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_QUEUE_SYNCHRONIZED && 40009328: c6 02 20 30 ld [ %o0 + 0x30 ], %g3 4000932c: 80 a0 e0 00 cmp %g3, 0 40009330: 02 80 00 06 be 40009348 <_CORE_RWLock_Timeout+0x50> 40009334: 03 10 00 76 sethi %hi(0x4001d800), %g1 40009338: c4 00 60 ac ld [ %g1 + 0xac ], %g2 ! 4001d8ac <_Thread_Executing> <== NOT EXECUTED 4000933c: 80 a2 40 02 cmp %o1, %g2 <== NOT EXECUTED 40009340: 02 80 00 20 be 400093c0 <_CORE_RWLock_Timeout+0xc8> <== NOT EXECUTED 40009344: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_QUEUE_SATISFIED ) the_thread_queue->sync_state = THREAD_QUEUE_TIMEOUT; } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 40009348: c2 02 20 3c ld [ %o0 + 0x3c ], %g1 _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4000934c: 40 00 0a 9b call 4000bdb8 <_Thread_queue_Extract> 40009350: 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; 40009354: c2 06 23 d0 ld [ %i0 + 0x3d0 ], %g1 40009358: 82 00 7f ff add %g1, -1, %g1 4000935c: c2 26 23 d0 st %g1, [ %i0 + 0x3d0 ] 40009360: 81 c7 e0 08 ret 40009364: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 40009368: 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 ) { 4000936c: 80 a0 a0 04 cmp %g2, 4 40009370: 18 bf ff fc bgu 40009360 <_CORE_RWLock_Timeout+0x68> 40009374: 83 32 60 1b srl %o1, 0x1b, %g1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40009378: 80 a0 60 01 cmp %g1, 1 4000937c: 12 bf ff f9 bne 40009360 <_CORE_RWLock_Timeout+0x68> 40009380: 83 28 a0 02 sll %g2, 2, %g1 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40009384: 05 10 00 75 sethi %hi(0x4001d400), %g2 40009388: 84 10 a3 30 or %g2, 0x330, %g2 ! 4001d730 <_Objects_Information_table> 4000938c: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40009390: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 40009394: 80 a2 20 00 cmp %o0, 0 40009398: 02 bf ff f2 be 40009360 <_CORE_RWLock_Timeout+0x68> 4000939c: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 400093a0: 40 00 03 4a call 4000a0c8 <_Objects_Get> 400093a4: 94 07 bf f4 add %fp, -12, %o2 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 400093a8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400093ac: 80 a0 60 00 cmp %g1, 0 400093b0: 12 bf ff ec bne 40009360 <_CORE_RWLock_Timeout+0x68> 400093b4: 92 10 00 08 mov %o0, %o1 400093b8: 10 bf ff db b 40009324 <_CORE_RWLock_Timeout+0x2c> 400093bc: 31 10 00 75 sethi %hi(0x4001d400), %i0 * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_QUEUE_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_QUEUE_SATISFIED ) 400093c0: 02 bf ff e5 be 40009354 <_CORE_RWLock_Timeout+0x5c> <== NOT EXECUTED 400093c4: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED the_thread_queue->sync_state = THREAD_QUEUE_TIMEOUT; 400093c8: 10 bf ff e3 b 40009354 <_CORE_RWLock_Timeout+0x5c> <== NOT EXECUTED 400093cc: c2 22 20 30 st %g1, [ %o0 + 0x30 ] <== NOT EXECUTED 40013fcc <_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 ) { 40013fcc: 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 ) { 40013fd0: 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 ) { 40013fd4: 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 ) { 40013fd8: 80 a0 40 1a cmp %g1, %i2 40013fdc: 0a 80 00 17 bcs 40014038 <_CORE_message_queue_Broadcast+0x6c> 40013fe0: 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 ) { 40013fe4: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 40013fe8: 80 a0 60 00 cmp %g1, 0 40013fec: 02 80 00 0a be 40014014 <_CORE_message_queue_Broadcast+0x48> 40013ff0: a2 10 20 00 clr %l1 *count = 0; 40013ff4: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED 40013ff8: 81 c7 e0 08 ret <== NOT EXECUTED 40013ffc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40014000: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 40014004: 40 00 24 ab call 4001d2b0 40014008: a2 04 60 01 inc %l1 buffer, waitp->return_argument, size ); *(uint32_t *)the_thread->Wait.return_argument_1 = size; 4001400c: c2 04 20 2c ld [ %l0 + 0x2c ], %g1 40014010: 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))) { 40014014: 40 00 0b 94 call 40016e64 <_Thread_queue_Dequeue> 40014018: 90 10 00 12 mov %l2, %o0 4001401c: 92 10 00 19 mov %i1, %o1 40014020: a0 10 00 08 mov %o0, %l0 40014024: 80 a2 20 00 cmp %o0, 0 40014028: 12 bf ff f6 bne 40014000 <_CORE_message_queue_Broadcast+0x34> 4001402c: 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; 40014030: e2 27 40 00 st %l1, [ %i5 ] 40014034: b0 10 20 00 clr %i0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 40014038: 81 c7 e0 08 ret 4001403c: 81 e8 00 00 restore 40014934 <_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 ) { 40014934: 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; 40014938: 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; 4001493c: 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; 40014940: 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; 40014944: c0 26 20 60 clr [ %i0 + 0x60 ] the_message_queue->notify_argument = the_argument; 40014948: 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)) { 4001494c: 80 8e e0 03 btst 3, %i3 40014950: 02 80 00 07 be 4001496c <_CORE_message_queue_Initialize+0x38> 40014954: a0 10 00 1b mov %i3, %l0 allocated_message_size += sizeof(uint32_t); 40014958: 82 06 e0 04 add %i3, 4, %g1 allocated_message_size &= ~(sizeof(uint32_t) - 1); 4001495c: a0 08 7f fc and %g1, -4, %l0 } if (allocated_message_size < maximum_message_size) 40014960: 80 a6 c0 10 cmp %i3, %l0 40014964: 18 80 00 09 bgu 40014988 <_CORE_message_queue_Initialize+0x54> 40014968: 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 * 4001496c: b6 04 20 14 add %l0, 0x14, %i3 40014970: 92 10 00 1a mov %i2, %o1 40014974: 40 00 2a d1 call 4001f4b8 <.umul> 40014978: 90 10 00 1b mov %i3, %o0 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 4001497c: 80 a2 00 10 cmp %o0, %l0 40014980: 1a 80 00 04 bcc 40014990 <_CORE_message_queue_Initialize+0x5c> 40014984: 92 10 00 08 mov %o0, %o1 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return TRUE; } 40014988: 81 c7 e0 08 ret <== NOT EXECUTED 4001498c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40014990: 11 10 00 98 sethi %hi(0x40026000), %o0 40014994: 7f ff e6 5b call 4000e300 <_Heap_Allocate> 40014998: 90 12 20 4c or %o0, 0x4c, %o0 ! 4002604c <_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) 4001499c: 80 a2 20 00 cmp %o0, 0 400149a0: 02 bf ff fa be 40014988 <_CORE_message_queue_Initialize+0x54> 400149a4: d0 26 20 5c st %o0, [ %i0 + 0x5c ] /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 400149a8: 92 10 00 08 mov %o0, %o1 400149ac: 94 10 00 1a mov %i2, %o2 400149b0: 90 06 20 68 add %i0, 0x68, %o0 400149b4: 7f ff ff 73 call 40014780 <_Chain_Initialize> 400149b8: 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( 400149bc: c2 06 40 00 ld [ %i1 ], %g1 Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 400149c0: 84 06 20 50 add %i0, 0x50, %g2 400149c4: 82 18 60 01 xor %g1, 1, %g1 400149c8: 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); 400149cc: 82 06 20 54 add %i0, 0x54, %g1 the_chain->permanent_null = NULL; 400149d0: c0 26 20 54 clr [ %i0 + 0x54 ] 400149d4: 90 10 00 18 mov %i0, %o0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 400149d8: c2 26 20 50 st %g1, [ %i0 + 0x50 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 400149dc: c4 26 20 58 st %g2, [ %i0 + 0x58 ] 400149e0: 92 60 3f ff subx %g0, -1, %o1 400149e4: 94 10 20 80 mov 0x80, %o2 400149e8: 96 10 20 06 mov 6, %o3 400149ec: 7f ff f0 5f call 40010b68 <_Thread_queue_Initialize> 400149f0: b0 10 20 01 mov 1, %i0 400149f4: 81 c7 e0 08 ret 400149f8: 81 e8 00 00 restore 40016bcc <_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 ) { 40016bcc: 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 ) { 40016bd0: 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 ) { 40016bd4: 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 ) { 40016bd8: 80 a0 40 1a cmp %g1, %i2 40016bdc: 0a 80 00 22 bcs 40016c64 <_CORE_message_queue_Submit+0x98> 40016be0: 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 ) { 40016be4: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 40016be8: 80 a0 a0 00 cmp %g2, 0 40016bec: 02 80 00 22 be 40016c74 <_CORE_message_queue_Submit+0xa8> 40016bf0: 01 00 00 00 nop /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < 40016bf4: c2 04 60 44 ld [ %l1 + 0x44 ], %g1 40016bf8: 80 a0 40 02 cmp %g1, %g2 40016bfc: 18 80 00 2b bgu 40016ca8 <_CORE_message_queue_Submit+0xdc> 40016c00: c2 07 a0 5c ld [ %fp + 0x5c ], %g1 * 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 ) { 40016c04: 80 a0 60 00 cmp %g1, 0 40016c08: 02 80 00 17 be 40016c64 <_CORE_message_queue_Submit+0x98> 40016c0c: 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() ) { 40016c10: 03 10 00 b2 sethi %hi(0x4002c800), %g1 40016c14: c4 00 61 64 ld [ %g1 + 0x164 ], %g2 ! 4002c964 <_ISR_Nest_level> 40016c18: 80 a0 a0 00 cmp %g2, 0 40016c1c: 12 80 00 14 bne 40016c6c <_CORE_message_queue_Submit+0xa0> 40016c20: 03 10 00 b2 sethi %hi(0x4002c800), %g1 */ { Thread_Control *executing = _Thread_Executing; _ISR_Disable( level ); 40016c24: 7f ff ae 7d call 40002618 40016c28: e0 00 61 7c ld [ %g1 + 0x17c ], %l0 ! 4002c97c <_Thread_Executing> 40016c2c: 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; 40016c30: 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; 40016c34: f6 24 20 20 st %i3, [ %l0 + 0x20 ] executing->Wait.return_argument = buffer; 40016c38: f2 24 20 28 st %i1, [ %l0 + 0x28 ] executing->Wait.option = size; 40016c3c: 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; 40016c40: e2 24 20 44 st %l1, [ %l0 + 0x44 ] 40016c44: 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 ); 40016c48: 7f ff ae 78 call 40002628 40016c4c: b0 10 20 07 mov 7, %i0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 40016c50: d2 07 a0 60 ld [ %fp + 0x60 ], %o1 40016c54: 90 10 00 11 mov %l1, %o0 40016c58: 15 10 00 43 sethi %hi(0x40010c00), %o2 40016c5c: 7f ff e7 89 call 40010a80 <_Thread_queue_Enqueue_with_handler> 40016c60: 94 12 a3 c0 or %o2, 0x3c0, %o2 ! 40010fc0 <_Thread_queue_Timeout> 40016c64: 81 c7 e0 08 ret 40016c68: 81 e8 00 00 restore } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; } 40016c6c: 81 c7 e0 08 ret <== NOT EXECUTED 40016c70: 91 e8 20 03 restore %g0, 3, %o0 <== NOT EXECUTED /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 40016c74: 7f ff e7 15 call 400108c8 <_Thread_queue_Dequeue> 40016c78: 90 10 00 11 mov %l1, %o0 if ( the_thread ) { 40016c7c: a0 92 20 00 orcc %o0, 0, %l0 40016c80: 02 80 00 1b be 40016cec <_CORE_message_queue_Submit+0x120> 40016c84: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40016c88: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 40016c8c: 40 00 13 b0 call 4001bb4c 40016c90: 94 10 00 1a mov %i2, %o2 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument, size ); *(size_t *)the_thread->Wait.return_argument_1 = size; 40016c94: c2 04 20 2c ld [ %l0 + 0x2c ], %g1 the_thread->Wait.count = submit_type; 40016c98: 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; 40016c9c: f4 20 40 00 st %i2, [ %g1 ] the_thread->Wait.count = submit_type; 40016ca0: 81 c7 e0 08 ret 40016ca4: 91 e8 20 00 restore %g0, 0, %o0 RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) 40016ca8: 7f ff dc d3 call 4000dff4 <_Chain_Get> 40016cac: 90 04 60 68 add %l1, 0x68, %o0 /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 40016cb0: a0 92 20 00 orcc %o0, 0, %l0 40016cb4: 02 bf ff ee be 40016c6c <_CORE_message_queue_Submit+0xa0> 40016cb8: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40016cbc: 94 10 00 1a mov %i2, %o2 40016cc0: 40 00 13 a3 call 4001bb4c 40016cc4: 90 04 20 10 add %l0, 0x10, %o0 size ); the_message->Contents.size = size; the_message->priority = submit_type; _CORE_message_queue_Insert_message( 40016cc8: 90 10 00 11 mov %l1, %o0 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 40016ccc: f4 24 20 0c st %i2, [ %l0 + 0xc ] the_message->priority = submit_type; 40016cd0: fa 24 20 08 st %i5, [ %l0 + 8 ] _CORE_message_queue_Insert_message( 40016cd4: 92 10 00 10 mov %l0, %o1 40016cd8: 94 10 00 1d mov %i5, %o2 40016cdc: 40 00 0c 60 call 40019e5c <_CORE_message_queue_Insert_message> 40016ce0: b0 10 20 00 clr %i0 40016ce4: 81 c7 e0 08 ret 40016ce8: 81 e8 00 00 restore * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); if ( the_thread ) { 40016cec: 10 bf ff c2 b 40016bf4 <_CORE_message_queue_Submit+0x28> 40016cf0: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 40006dfc <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 40006dfc: 9d e3 bf 98 save %sp, -104, %sp /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 40006e00: c2 06 40 00 ld [ %i1 ], %g1 CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 40006e04: 90 10 00 18 mov %i0, %o0 /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 40006e08: c2 26 20 40 st %g1, [ %i0 + 0x40 ] 40006e0c: c4 06 60 04 ld [ %i1 + 4 ], %g2 the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { 40006e10: 80 a6 a0 00 cmp %i2, 0 /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 40006e14: c4 26 20 44 st %g2, [ %i0 + 0x44 ] 40006e18: c8 06 60 08 ld [ %i1 + 8 ], %g4 40006e1c: c8 26 20 48 st %g4, [ %i0 + 0x48 ] 40006e20: da 06 60 0c ld [ %i1 + 0xc ], %o5 the_mutex->lock = initial_lock; 40006e24: f4 26 20 50 st %i2, [ %i0 + 0x50 ] /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 40006e28: da 26 20 4c st %o5, [ %i0 + 0x4c ] the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { 40006e2c: 12 80 00 1c bne 40006e9c <_CORE_mutex_Initialize+0xa0> 40006e30: c0 26 20 58 clr [ %i0 + 0x58 ] the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; 40006e34: 19 10 00 6b sethi %hi(0x4001ac00), %o4 40006e38: c6 03 20 3c ld [ %o4 + 0x3c ], %g3 ! 4001ac3c <_Thread_Executing> the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; 40006e3c: 82 10 20 01 mov 1, %g1 40006e40: c2 26 20 54 st %g1, [ %i0 + 0x54 ] the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; 40006e44: c4 00 e0 08 ld [ %g3 + 8 ], %g2 the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; 40006e48: c6 26 20 5c st %g3, [ %i0 + 0x5c ] the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40006e4c: 80 a1 20 02 cmp %g4, 2 40006e50: 12 80 00 1f bne 40006ecc <_CORE_mutex_Initialize+0xd0> 40006e54: c4 26 20 60 st %g2, [ %i0 + 0x60 ] _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) if ( _Thread_Executing->current_priority < 40006e58: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 40006e5c: 80 a0 40 0d cmp %g1, %o5 40006e60: 0a 80 00 0d bcs 40006e94 <_CORE_mutex_Initialize+0x98> 40006e64: b0 10 20 06 mov 6, %i0 the_mutex->Attributes.priority_ceiling ) return CORE_MUTEX_STATUS_CEILING_VIOLATED; _Thread_Executing->resource_count++; 40006e68: c4 03 20 3c ld [ %o4 + 0x3c ], %g2 the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 40006e6c: 94 10 24 00 mov 0x400, %o2 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) return CORE_MUTEX_STATUS_CEILING_VIOLATED; _Thread_Executing->resource_count++; 40006e70: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 40006e74: 96 10 20 05 mov 5, %o3 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) return CORE_MUTEX_STATUS_CEILING_VIOLATED; _Thread_Executing->resource_count++; 40006e78: 82 00 60 01 inc %g1 40006e7c: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 40006e80: c2 06 60 08 ld [ %i1 + 8 ], %g1 40006e84: b0 10 20 00 clr %i0 40006e88: 80 a0 00 01 cmp %g0, %g1 40006e8c: 40 00 0b 60 call 40009c0c <_Thread_queue_Initialize> 40006e90: 92 40 20 00 addx %g0, 0, %o1 STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 40006e94: 81 c7 e0 08 ret 40006e98: 81 e8 00 00 restore the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 40006e9c: c2 06 60 08 ld [ %i1 + 8 ], %g1 if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) return CORE_MUTEX_STATUS_CEILING_VIOLATED; _Thread_Executing->resource_count++; } else { the_mutex->nest_count = 0; 40006ea0: c0 26 20 54 clr [ %i0 + 0x54 ] the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 40006ea4: 80 a0 00 01 cmp %g0, %g1 the_mutex->Attributes.priority_ceiling ) return CORE_MUTEX_STATUS_CEILING_VIOLATED; _Thread_Executing->resource_count++; } else { the_mutex->nest_count = 0; the_mutex->holder = NULL; 40006ea8: c0 26 20 5c clr [ %i0 + 0x5c ] the_mutex->holder_id = 0; 40006eac: c0 26 20 60 clr [ %i0 + 0x60 ] } _Thread_queue_Initialize( 40006eb0: 92 40 20 00 addx %g0, 0, %o1 40006eb4: 94 10 24 00 mov 0x400, %o2 40006eb8: 96 10 20 05 mov 5, %o3 40006ebc: 40 00 0b 54 call 40009c0c <_Thread_queue_Initialize> 40006ec0: b0 10 20 00 clr %i0 STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 40006ec4: 81 c7 e0 08 ret 40006ec8: 81 e8 00 00 restore if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40006ecc: 80 a1 20 03 cmp %g4, 3 40006ed0: 32 bf ff e7 bne,a 40006e6c <_CORE_mutex_Initialize+0x70> 40006ed4: c4 03 20 3c ld [ %o4 + 0x3c ], %g2 _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) if ( _Thread_Executing->current_priority < 40006ed8: 10 bf ff e1 b 40006e5c <_CORE_mutex_Initialize+0x60> <== NOT EXECUTED 40006edc: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 <== NOT EXECUTED 40006ee0 <_CORE_mutex_Seize_interrupt_blocking>: void _CORE_mutex_Seize_interrupt_blocking( CORE_mutex_Control *the_mutex, Watchdog_Interval timeout ) { 40006ee0: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; executing = _Thread_Executing; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { 40006ee4: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 Watchdog_Interval timeout ) { Thread_Control *executing; executing = _Thread_Executing; 40006ee8: 03 10 00 6b sethi %hi(0x4001ac00), %g1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { 40006eec: 80 a0 a0 02 cmp %g2, 2 40006ef0: 12 80 00 08 bne 40006f10 <_CORE_mutex_Seize_interrupt_blocking+0x30> 40006ef4: d2 00 60 3c ld [ %g1 + 0x3c ], %o1 if ( the_mutex->holder->current_priority > executing->current_priority ) { 40006ef8: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 40006efc: d2 02 60 14 ld [ %o1 + 0x14 ], %o1 40006f00: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 40006f04: 80 a0 40 09 cmp %g1, %o1 40006f08: 18 80 00 16 bgu 40006f60 <_CORE_mutex_Seize_interrupt_blocking+0x80> 40006f0c: 01 00 00 00 nop FALSE ); } } the_mutex->blocked_count++; 40006f10: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); 40006f14: 90 10 00 18 mov %i0, %o0 FALSE ); } } the_mutex->blocked_count++; 40006f18: 82 00 60 01 inc %g1 _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); 40006f1c: 92 10 00 19 mov %i1, %o1 FALSE ); } } the_mutex->blocked_count++; 40006f20: c2 26 20 58 st %g1, [ %i0 + 0x58 ] _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); 40006f24: 15 10 00 27 sethi %hi(0x40009c00), %o2 40006f28: 40 00 0a 2b call 400097d4 <_Thread_queue_Enqueue_with_handler> 40006f2c: 94 12 a1 14 or %o2, 0x114, %o2 ! 40009d14 <_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 ) 40006f30: 05 10 00 6a sethi %hi(0x4001a800), %g2 40006f34: c2 00 a3 60 ld [ %g2 + 0x360 ], %g1 ! 4001ab60 <_Thread_Dispatch_disable_level> 40006f38: 82 00 7f ff add %g1, -1, %g1 40006f3c: c2 20 a3 60 st %g1, [ %g2 + 0x360 ] 40006f40: c6 00 a3 60 ld [ %g2 + 0x360 ], %g3 40006f44: 80 a0 e0 00 cmp %g3, 0 40006f48: 02 80 00 04 be 40006f58 <_CORE_mutex_Seize_interrupt_blocking+0x78> 40006f4c: 01 00 00 00 nop 40006f50: 81 c7 e0 08 ret <== NOT EXECUTED 40006f54: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 40006f58: 40 00 08 af call 40009214 <_Thread_Dispatch> 40006f5c: 81 e8 00 00 restore Thread_Control *executing; executing = _Thread_Executing; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { if ( the_mutex->holder->current_priority > executing->current_priority ) { _Thread_Change_priority( 40006f60: 40 00 07 89 call 40008d84 <_Thread_Change_priority> 40006f64: 94 10 20 00 clr %o2 FALSE ); } } the_mutex->blocked_count++; 40006f68: 10 bf ff eb b 40006f14 <_CORE_mutex_Seize_interrupt_blocking+0x34> 40006f6c: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 40006f70 <_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 ) { 40006f70: 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 ) { 40006f74: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 CORE_mutex_Status _CORE_mutex_Surrender( CORE_mutex_Control *the_mutex, Objects_Id id, CORE_mutex_API_mp_support_callout api_mutex_mp_support ) { 40006f78: a0 10 00 18 mov %i0, %l0 * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 40006f7c: 80 a0 60 00 cmp %g1, 0 40006f80: 02 80 00 07 be 40006f9c <_CORE_mutex_Surrender+0x2c> 40006f84: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !_Thread_Is_executing( holder ) ) 40006f88: 03 10 00 6b sethi %hi(0x4001ac00), %g1 40006f8c: c4 00 60 3c ld [ %g1 + 0x3c ], %g2 ! 4001ac3c <_Thread_Executing> 40006f90: 80 a2 00 02 cmp %o0, %g2 40006f94: 12 80 00 49 bne 400070b8 <_CORE_mutex_Surrender+0x148> 40006f98: b0 10 20 03 mov 3, %i0 return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 40006f9c: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 40006fa0: 80 a0 60 00 cmp %g1, 0 40006fa4: 22 80 00 45 be,a 400070b8 <_CORE_mutex_Surrender+0x148> 40006fa8: b0 10 20 00 clr %i0 return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 40006fac: 82 00 7f ff add %g1, -1, %g1 if ( the_mutex->nest_count != 0 ) { 40006fb0: 80 a0 60 00 cmp %g1, 0 40006fb4: 02 80 00 09 be 40006fd8 <_CORE_mutex_Surrender+0x68> 40006fb8: c2 24 20 54 st %g1, [ %l0 + 0x54 ] switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40006fbc: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 40006fc0: 80 a0 60 00 cmp %g1, 0 40006fc4: 02 80 00 3d be 400070b8 <_CORE_mutex_Surrender+0x148> 40006fc8: b0 10 20 00 clr %i0 40006fcc: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40006fd0: 02 80 00 3a be 400070b8 <_CORE_mutex_Surrender+0x148> <== NOT EXECUTED 40006fd4: b0 10 20 02 mov 2, %i0 <== 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; 40006fd8: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40006fdc: 80 a0 a0 02 cmp %g2, 2 40006fe0: 22 80 00 2a be,a 40007088 <_CORE_mutex_Surrender+0x118> 40006fe4: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 40006fe8: 80 a0 a0 03 cmp %g2, 3 40006fec: 22 80 00 27 be,a 40007088 <_CORE_mutex_Surrender+0x118> 40006ff0: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) holder->resource_count--; the_mutex->holder = NULL; 40006ff4: c0 24 20 5c clr [ %l0 + 0x5c ] /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40006ff8: 80 a0 a0 02 cmp %g2, 2 40006ffc: 02 80 00 17 be 40007058 <_CORE_mutex_Surrender+0xe8> 40007000: c0 24 20 60 clr [ %l0 + 0x60 ] 40007004: 80 a0 a0 03 cmp %g2, 3 40007008: 22 80 00 15 be,a 4000705c <_CORE_mutex_Surrender+0xec> 4000700c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { 40007010: 40 00 09 83 call 4000961c <_Thread_queue_Dequeue> 40007014: 90 10 00 10 mov %l0, %o0 40007018: 86 92 20 00 orcc %o0, 0, %g3 4000701c: 02 80 00 2e be 400070d4 <_CORE_mutex_Surrender+0x164> 40007020: 82 10 20 01 mov 1, %g1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 40007024: c2 00 e0 08 ld [ %g3 + 8 ], %g1 the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 40007028: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 4000702c: c2 24 20 60 st %g1, [ %l0 + 0x60 ] } else #endif { the_mutex->holder = the_thread; 40007030: c6 24 20 5c st %g3, [ %l0 + 0x5c ] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 40007034: 82 10 20 01 mov 1, %g1 switch ( the_mutex->Attributes.discipline ) { 40007038: 80 a0 a0 02 cmp %g2, 2 4000703c: 02 80 00 21 be 400070c0 <_CORE_mutex_Surrender+0x150> 40007040: c2 24 20 54 st %g1, [ %l0 + 0x54 ] 40007044: 80 a0 a0 03 cmp %g2, 3 40007048: 22 80 00 13 be,a 40007094 <_CORE_mutex_Surrender+0x124> 4000704c: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 40007050: 81 c7 e0 08 ret 40007054: 91 e8 20 00 restore %g0, 0, %o0 * 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 ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( holder->resource_count == 0 && 40007058: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 4000705c: 80 a0 60 00 cmp %g1, 0 40007060: 12 bf ff ec bne 40007010 <_CORE_mutex_Surrender+0xa0> 40007064: 01 00 00 00 nop 40007068: d2 02 20 18 ld [ %o0 + 0x18 ], %o1 4000706c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 40007070: 80 a2 40 01 cmp %o1, %g1 40007074: 02 bf ff e7 be 40007010 <_CORE_mutex_Surrender+0xa0> 40007078: 01 00 00 00 nop holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 4000707c: 40 00 07 42 call 40008d84 <_Thread_Change_priority> 40007080: 94 10 20 01 mov 1, %o2 ! 1 40007084: 30 bf ff e3 b,a 40007010 <_CORE_mutex_Surrender+0xa0> * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) holder->resource_count--; 40007088: 82 00 7f ff add %g1, -1, %g1 4000708c: 10 bf ff da b 40006ff4 <_CORE_mutex_Surrender+0x84> 40007090: c2 22 20 1c st %g1, [ %o0 + 0x1c ] case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_thread->resource_count++; break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: the_thread->resource_count++; if (the_mutex->Attributes.priority_ceiling < 40007094: 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++; 40007098: 82 00 60 01 inc %g1 4000709c: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] if (the_mutex->Attributes.priority_ceiling < 400070a0: d2 04 20 4c ld [ %l0 + 0x4c ], %o1 400070a4: 80 a2 40 02 cmp %o1, %g2 400070a8: 1a 80 00 04 bcc 400070b8 <_CORE_mutex_Surrender+0x148> 400070ac: b0 10 20 00 clr %i0 the_thread->current_priority){ _Thread_Change_priority( 400070b0: 40 00 07 35 call 40008d84 <_Thread_Change_priority> 400070b4: 94 10 20 00 clr %o2 400070b8: 81 c7 e0 08 ret 400070bc: 81 e8 00 00 restore 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++; 400070c0: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 400070c4: 82 00 60 01 inc %g1 400070c8: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] 400070cc: 81 c7 e0 08 ret 400070d0: 91 e8 20 00 restore %g0, 0, %o0 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 400070d4: c2 24 20 50 st %g1, [ %l0 + 0x50 ] 400070d8: 81 c7 e0 08 ret 400070dc: 91 e8 20 00 restore %g0, 0, %o0 40007c7c <_CORE_spinlock_Release>: */ CORE_spinlock_Status _CORE_spinlock_Release( CORE_spinlock_Control *the_spinlock ) { 40007c7c: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 40007c80: 7f ff ea 0c call 400024b0 40007c84: 01 00 00 00 nop /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 40007c88: c2 06 20 04 ld [ %i0 + 4 ], %g1 40007c8c: 80 a0 60 00 cmp %g1, 0 40007c90: 12 80 00 06 bne 40007ca8 <_CORE_spinlock_Release+0x2c> 40007c94: 03 10 00 54 sethi %hi(0x40015000), %g1 _ISR_Enable( level ); 40007c98: 7f ff ea 0a call 400024c0 40007c9c: b0 10 20 06 mov 6, %i0 40007ca0: 81 c7 e0 08 ret 40007ca4: 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 ) { 40007ca8: c4 00 60 8c ld [ %g1 + 0x8c ], %g2 40007cac: c6 06 20 0c ld [ %i0 + 0xc ], %g3 40007cb0: c2 00 a0 08 ld [ %g2 + 8 ], %g1 40007cb4: 80 a0 c0 01 cmp %g3, %g1 40007cb8: 02 80 00 06 be 40007cd0 <_CORE_spinlock_Release+0x54> 40007cbc: 01 00 00 00 nop _ISR_Enable( level ); 40007cc0: 7f ff ea 00 call 400024c0 <== NOT EXECUTED 40007cc4: b0 10 20 02 mov 2, %i0 ! 2 <== NOT EXECUTED 40007cc8: 81 c7 e0 08 ret <== NOT EXECUTED 40007ccc: 81 e8 00 00 restore <== NOT EXECUTED } /* * Let it be unlocked. */ the_spinlock->users -= 1; 40007cd0: c2 06 20 08 ld [ %i0 + 8 ], %g1 40007cd4: 82 00 7f ff add %g1, -1, %g1 40007cd8: c2 26 20 08 st %g1, [ %i0 + 8 ] the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 40007cdc: c0 26 20 04 clr [ %i0 + 4 ] the_spinlock->holder = 0; 40007ce0: c0 26 20 0c clr [ %i0 + 0xc ] _ISR_Enable( level ); 40007ce4: 7f ff e9 f7 call 400024c0 40007ce8: b0 10 20 00 clr %i0 return CORE_SPINLOCK_SUCCESSFUL; } 40007cec: 81 c7 e0 08 ret 40007cf0: 81 e8 00 00 restore 40007cf4 <_CORE_spinlock_Wait>: CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, boolean wait, Watchdog_Interval timeout ) { 40007cf4: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; 40007cf8: 23 10 00 54 sethi %hi(0x40015000), %l1 40007cfc: c2 04 61 34 ld [ %l1 + 0x134 ], %g1 ! 40015134 <_Watchdog_Ticks_since_boot> _ISR_Disable( level ); 40007d00: 7f ff e9 ec call 400024b0 40007d04: a0 06 80 01 add %i2, %g1, %l0 40007d08: 88 10 00 08 mov %o0, %g4 if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 40007d0c: c2 06 20 04 ld [ %i0 + 4 ], %g1 40007d10: 80 a0 60 01 cmp %g1, 1 40007d14: 02 80 00 45 be 40007e28 <_CORE_spinlock_Wait+0x134> 40007d18: 03 10 00 54 sethi %hi(0x40015000), %g1 (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 40007d1c: c2 06 20 08 ld [ %i0 + 8 ], %g1 40007d20: 82 00 60 01 inc %g1 40007d24: c2 26 20 08 st %g1, [ %i0 + 8 ] for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 40007d28: c4 06 20 04 ld [ %i0 + 4 ], %g2 40007d2c: 80 a0 a0 00 cmp %g2, 0 40007d30: 02 80 00 2b be 40007ddc <_CORE_spinlock_Wait+0xe8> 40007d34: 80 a6 60 00 cmp %i1, 0 } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 40007d38: 12 80 00 0d bne 40007d6c <_CORE_spinlock_Wait+0x78> 40007d3c: 33 10 00 53 sethi %hi(0x40014c00), %i1 40007d40: 30 80 00 32 b,a 40007e08 <_CORE_spinlock_Wait+0x114> <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007d44: c2 06 63 b0 ld [ %i1 + 0x3b0 ], %g1 ! 40014fb0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40007d48: 82 00 60 01 inc %g1 <== NOT EXECUTED 40007d4c: c2 26 63 b0 st %g1, [ %i1 + 0x3b0 ] <== NOT EXECUTED /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 40007d50: 7f ff e9 d8 call 400024b0 <== NOT EXECUTED 40007d54: 01 00 00 00 nop <== NOT EXECUTED 40007d58: 88 10 00 08 mov %o0, %g4 <== NOT EXECUTED _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 40007d5c: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 40007d60: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40007d64: 02 80 00 1f be 40007de0 <_CORE_spinlock_Wait+0xec> <== NOT EXECUTED 40007d68: 03 10 00 54 sethi %hi(0x40015000), %g1 <== NOT EXECUTED } /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { 40007d6c: 80 a6 a0 00 cmp %i2, 0 40007d70: 02 80 00 06 be 40007d88 <_CORE_spinlock_Wait+0x94> 40007d74: 01 00 00 00 nop 40007d78: c2 04 61 34 ld [ %l1 + 0x134 ], %g1 <== NOT EXECUTED 40007d7c: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 40007d80: 08 80 00 34 bleu 40007e50 <_CORE_spinlock_Wait+0x15c> <== NOT EXECUTED 40007d84: 01 00 00 00 nop <== NOT EXECUTED * * A spinlock cannot be deleted while it is being used so we are * safe from deletion. */ _ISR_Enable( level ); 40007d88: 7f ff e9 ce call 400024c0 40007d8c: 90 10 00 04 mov %g4, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007d90: c2 06 63 b0 ld [ %i1 + 0x3b0 ], %g1 40007d94: 82 00 7f ff add %g1, -1, %g1 40007d98: c2 26 63 b0 st %g1, [ %i1 + 0x3b0 ] 40007d9c: c4 06 63 b0 ld [ %i1 + 0x3b0 ], %g2 40007da0: 80 a0 a0 00 cmp %g2, 0 40007da4: 12 bf ff e8 bne 40007d44 <_CORE_spinlock_Wait+0x50> 40007da8: 01 00 00 00 nop _Thread_Dispatch(); 40007dac: 40 00 08 17 call 40009e08 <_Thread_Dispatch> 40007db0: 01 00 00 00 nop rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007db4: c2 06 63 b0 ld [ %i1 + 0x3b0 ], %g1 40007db8: 82 00 60 01 inc %g1 40007dbc: c2 26 63 b0 st %g1, [ %i1 + 0x3b0 ] /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 40007dc0: 7f ff e9 bc call 400024b0 40007dc4: 01 00 00 00 nop 40007dc8: 88 10 00 08 mov %o0, %g4 _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 40007dcc: c2 06 20 04 ld [ %i0 + 4 ], %g1 40007dd0: 80 a0 60 00 cmp %g1, 0 40007dd4: 12 bf ff e7 bne 40007d70 <_CORE_spinlock_Wait+0x7c> 40007dd8: 80 a6 a0 00 cmp %i2, 0 the_spinlock->lock = CORE_SPINLOCK_LOCKED; the_spinlock->holder = _Thread_Executing->Object.id; 40007ddc: 03 10 00 54 sethi %hi(0x40015000), %g1 40007de0: c6 00 60 8c ld [ %g1 + 0x8c ], %g3 ! 4001508c <_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; 40007de4: 84 10 20 01 mov 1, %g2 40007de8: c4 26 20 04 st %g2, [ %i0 + 4 ] the_spinlock->holder = _Thread_Executing->Object.id; 40007dec: c2 00 e0 08 ld [ %g3 + 8 ], %g1 40007df0: c2 26 20 0c st %g1, [ %i0 + 0xc ] _ISR_Enable( level ); 40007df4: b0 10 20 00 clr %i0 40007df8: 7f ff e9 b2 call 400024c0 40007dfc: 90 10 00 04 mov %g4, %o0 40007e00: 81 c7 e0 08 ret 40007e04: 81 e8 00 00 restore /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { the_spinlock->users -= 1; 40007e08: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 40007e0c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40007e10: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED _ISR_Enable( level ); 40007e14: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED 40007e18: 7f ff e9 aa call 400024c0 <== NOT EXECUTED 40007e1c: 90 10 00 04 mov %g4, %o0 <== NOT EXECUTED 40007e20: 81 c7 e0 08 ret <== NOT EXECUTED 40007e24: 81 e8 00 00 restore <== NOT EXECUTED { ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; _ISR_Disable( level ); if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 40007e28: c4 00 60 8c ld [ %g1 + 0x8c ], %g2 40007e2c: c6 06 20 0c ld [ %i0 + 0xc ], %g3 40007e30: c2 00 a0 08 ld [ %g2 + 8 ], %g1 40007e34: 80 a0 c0 01 cmp %g3, %g1 40007e38: 12 bf ff b9 bne 40007d1c <_CORE_spinlock_Wait+0x28> 40007e3c: 01 00 00 00 nop (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); 40007e40: 7f ff e9 a0 call 400024c0 40007e44: b0 10 20 01 mov 1, %i0 ! 1 40007e48: 81 c7 e0 08 ret 40007e4c: 81 e8 00 00 restore /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { the_spinlock->users -= 1; 40007e50: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 40007e54: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40007e58: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED _ISR_Enable( level ); 40007e5c: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED 40007e60: 7f ff e9 98 call 400024c0 <== NOT EXECUTED 40007e64: 90 10 00 04 mov %g4, %o0 <== NOT EXECUTED 40007e68: 81 c7 e0 08 ret <== NOT EXECUTED 40007e6c: 81 e8 00 00 restore <== NOT EXECUTED 4000d328 <_Debug_Is_enabled>: */ boolean _Debug_Is_enabled( rtems_debug_control level ) { 4000d328: 03 10 00 6b sethi %hi(0x4001ac00), %g1 <== NOT EXECUTED 4000d32c: c4 00 60 40 ld [ %g1 + 0x40 ], %g2 ! 4001ac40 <_Debug_Level> <== NOT EXECUTED 4000d330: 90 0a 00 02 and %o0, %g2, %o0 <== NOT EXECUTED return (_Debug_Level & level) ? TRUE : FALSE; } 4000d334: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 4000d338: 81 c3 e0 08 retl <== NOT EXECUTED 4000d33c: 90 40 20 00 addx %g0, 0, %o0 <== NOT EXECUTED 40005508 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 40005508: 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; 4000550c: 03 10 00 6b sethi %hi(0x4001ac00), %g1 40005510: e0 00 60 3c ld [ %g1 + 0x3c ], %l0 ! 4001ac3c <_Thread_Executing> executing->Wait.return_code = RTEMS_SUCCESSFUL; 40005514: c0 24 20 34 clr [ %l0 + 0x34 ] api = executing->API_Extensions[ THREAD_API_RTEMS ]; _ISR_Disable( level ); 40005518: 7f ff f2 37 call 40001df4 4000551c: e4 04 21 6c ld [ %l0 + 0x16c ], %l2 40005520: 84 10 00 08 mov %o0, %g2 pending_events = api->pending_events; 40005524: c2 04 a0 40 ld [ %l2 + 0x40 ], %g1 seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 40005528: a2 8e 00 01 andcc %i0, %g1, %l1 4000552c: 02 80 00 0e be 40005564 <_Event_Seize+0x5c> 40005530: 80 8e 60 01 btst 1, %i1 40005534: 80 a6 00 11 cmp %i0, %l1 40005538: 02 80 00 04 be 40005548 <_Event_Seize+0x40> 4000553c: 80 8e 60 02 btst 2, %i1 40005540: 02 80 00 09 be 40005564 <_Event_Seize+0x5c> 40005544: 80 8e 60 01 btst 1, %i1 (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 40005548: 82 28 40 11 andn %g1, %l1, %g1 4000554c: c2 24 a0 40 st %g1, [ %l2 + 0x40 ] _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 40005550: 7f ff f2 2d call 40001e04 40005554: 01 00 00 00 nop *event_out = seized_events; 40005558: e2 26 c0 00 st %l1, [ %i3 ] 4000555c: 81 c7 e0 08 ret 40005560: 81 e8 00 00 restore return; } if ( _Options_Is_no_wait( option_set ) ) { 40005564: 12 80 00 1e bne 400055dc <_Event_Seize+0xd4> 40005568: 82 10 20 01 mov 1, %g1 executing->Wait.return_code = RTEMS_UNSATISFIED; *event_out = seized_events; return; } _Event_Sync_state = EVENT_SYNC_NOTHING_HAPPENED; 4000556c: 23 10 00 6d sethi %hi(0x4001b400), %l1 executing->Wait.option = (uint32_t ) option_set; 40005570: f2 24 20 30 st %i1, [ %l0 + 0x30 ] executing->Wait.count = (uint32_t ) event_in; 40005574: f0 24 20 24 st %i0, [ %l0 + 0x24 ] executing->Wait.return_argument = event_out; 40005578: 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; 4000557c: c2 24 61 44 st %g1, [ %l1 + 0x144 ] executing->Wait.option = (uint32_t ) option_set; executing->Wait.count = (uint32_t ) event_in; executing->Wait.return_argument = event_out; _ISR_Enable( level ); 40005580: 7f ff f2 21 call 40001e04 40005584: 90 10 00 02 mov %g2, %o0 if ( ticks ) { 40005588: 80 a6 a0 00 cmp %i2, 0 4000558c: 32 80 00 24 bne,a 4000561c <_Event_Seize+0x114> 40005590: c2 04 20 08 ld [ %l0 + 8 ], %g1 NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 40005594: 90 10 00 10 mov %l0, %o0 40005598: 40 00 12 2f call 40009e54 <_Thread_Set_state> 4000559c: 92 10 21 00 mov 0x100, %o1 _ISR_Disable( level ); 400055a0: 7f ff f2 15 call 40001df4 400055a4: 01 00 00 00 nop 400055a8: b0 10 00 08 mov %o0, %i0 sync_state = _Event_Sync_state; 400055ac: c4 04 61 44 ld [ %l1 + 0x144 ], %g2 _Event_Sync_state = EVENT_SYNC_SYNCHRONIZED; 400055b0: c0 24 61 44 clr [ %l1 + 0x144 ] switch ( sync_state ) { 400055b4: 80 a0 a0 02 cmp %g2, 2 400055b8: 02 80 00 30 be 40005678 <_Event_Seize+0x170> 400055bc: 82 10 20 06 mov 6, %g1 400055c0: 80 a0 a0 03 cmp %g2, 3 400055c4: 02 80 00 0d be 400055f8 <_Event_Seize+0xf0> 400055c8: 80 a0 a0 01 cmp %g2, 1 400055cc: 02 80 00 31 be 40005690 <_Event_Seize+0x188> 400055d0: 01 00 00 00 nop 400055d4: 81 c7 e0 08 ret <== NOT EXECUTED 400055d8: 81 e8 00 00 restore <== NOT EXECUTED *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 400055dc: 7f ff f2 0a call 40001e04 400055e0: 90 10 00 02 mov %g2, %o0 executing->Wait.return_code = RTEMS_UNSATISFIED; 400055e4: 82 10 20 0d mov 0xd, %g1 400055e8: c2 24 20 34 st %g1, [ %l0 + 0x34 ] *event_out = seized_events; 400055ec: e2 26 c0 00 st %l1, [ %i3 ] 400055f0: 81 c7 e0 08 ret 400055f4: 81 e8 00 00 restore _ISR_Enable( level ); _Thread_Unblock( executing ); return; case EVENT_SYNC_SATISFIED: if ( _Watchdog_Is_active( &executing->Timer ) ) { 400055f8: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 400055fc: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40005600: 22 80 00 26 be,a 40005698 <_Event_Seize+0x190> <== NOT EXECUTED 40005604: c4 24 20 50 st %g2, [ %l0 + 0x50 ] <== NOT EXECUTED _Watchdog_Deactivate( &executing->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &executing->Timer ); } else _ISR_Enable( level ); 40005608: 7f ff f1 ff call 40001e04 <== NOT EXECUTED 4000560c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 40005610: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <== NOT EXECUTED 40005614: 40 00 0e 4b call 40008f40 <_Thread_Clear_state> <== NOT EXECUTED 40005618: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4000561c: 92 04 20 48 add %l0, 0x48, %o1 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 40005620: c2 24 20 68 st %g1, [ %l0 + 0x68 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40005624: 03 10 00 16 sethi %hi(0x40005800), %g1 40005628: 82 10 60 cc or %g1, 0xcc, %g1 ! 400058cc <_Event_Timeout> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000562c: f4 24 20 54 st %i2, [ %l0 + 0x54 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40005630: c2 24 20 64 st %g1, [ %l0 + 0x64 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40005634: c0 24 20 50 clr [ %l0 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 40005638: c0 24 20 6c clr [ %l0 + 0x6c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4000563c: 11 10 00 6b sethi %hi(0x4001ac00), %o0 40005640: 40 00 14 1c call 4000a6b0 <_Watchdog_Insert> 40005644: 90 12 20 5c or %o0, 0x5c, %o0 ! 4001ac5c <_Watchdog_Ticks_chain> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 40005648: 90 10 00 10 mov %l0, %o0 4000564c: 40 00 12 02 call 40009e54 <_Thread_Set_state> 40005650: 92 10 21 00 mov 0x100, %o1 _ISR_Disable( level ); 40005654: 7f ff f1 e8 call 40001df4 40005658: 01 00 00 00 nop 4000565c: b0 10 00 08 mov %o0, %i0 sync_state = _Event_Sync_state; 40005660: c4 04 61 44 ld [ %l1 + 0x144 ], %g2 _Event_Sync_state = EVENT_SYNC_SYNCHRONIZED; 40005664: c0 24 61 44 clr [ %l1 + 0x144 ] switch ( sync_state ) { 40005668: 80 a0 a0 02 cmp %g2, 2 4000566c: 12 bf ff d6 bne 400055c4 <_Event_Seize+0xbc> 40005670: 80 a0 a0 03 cmp %g2, 3 case EVENT_SYNC_NOTHING_HAPPENED: _ISR_Enable( level ); return; case EVENT_SYNC_TIMEOUT: executing->Wait.return_code = RTEMS_TIMEOUT; 40005674: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED 40005678: c2 24 20 34 st %g1, [ %l0 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 4000567c: 7f ff f1 e2 call 40001e04 <== NOT EXECUTED 40005680: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED 40005684: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <== NOT EXECUTED 40005688: 40 00 0e 2e call 40008f40 <_Thread_Clear_state> <== NOT EXECUTED 4000568c: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED * enter the synchronization states above. */ return; case EVENT_SYNC_NOTHING_HAPPENED: _ISR_Enable( level ); 40005690: 7f ff f1 dd call 40001e04 40005694: 81 e8 00 00 restore return; case EVENT_SYNC_SATISFIED: if ( _Watchdog_Is_active( &executing->Timer ) ) { _Watchdog_Deactivate( &executing->Timer ); _ISR_Enable( level ); 40005698: 7f ff f1 db call 40001e04 <== NOT EXECUTED 4000569c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED (void) _Watchdog_Remove( &executing->Timer ); 400056a0: 40 00 14 6e call 4000a858 <_Watchdog_Remove> <== NOT EXECUTED 400056a4: 90 04 20 48 add %l0, 0x48, %o0 <== NOT EXECUTED 400056a8: 10 bf ff db b 40005614 <_Event_Seize+0x10c> <== NOT EXECUTED 400056ac: b2 16 63 f8 or %i1, 0x3f8, %i1 <== NOT EXECUTED 400057ac <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 400057ac: 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 ]; 400057b0: e0 06 21 6c ld [ %i0 + 0x16c ], %l0 option_set = (rtems_option) the_thread->Wait.option; 400057b4: e4 06 20 30 ld [ %i0 + 0x30 ], %l2 _ISR_Disable( level ); 400057b8: 7f ff f1 8f call 40001df4 400057bc: b2 10 00 18 mov %i0, %i1 400057c0: a2 10 00 08 mov %o0, %l1 pending_events = api->pending_events; 400057c4: c8 04 20 40 ld [ %l0 + 0x40 ], %g4 event_condition = (rtems_event_set) the_thread->Wait.count; 400057c8: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 seized_events = _Event_sets_Get( pending_events, event_condition ); if ( !_Event_sets_Is_empty( seized_events ) ) { 400057cc: 9a 88 c0 04 andcc %g3, %g4, %o5 400057d0: 02 80 00 20 be 40005850 <_Event_Surrender+0xa4> 400057d4: 01 00 00 00 nop if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 400057d8: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 400057dc: 80 88 61 00 btst 0x100, %g1 400057e0: 02 80 00 08 be 40005800 <_Event_Surrender+0x54> 400057e4: 19 10 00 6d sethi %hi(0x4001b400), %o4 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 400057e8: 80 a0 c0 0d cmp %g3, %o5 400057ec: 02 80 00 1b be 40005858 <_Event_Surrender+0xac> 400057f0: 80 8c a0 02 btst 2, %l2 400057f4: 12 80 00 1a bne 4000585c <_Event_Surrender+0xb0> 400057f8: 82 29 00 0d andn %g4, %o5, %g1 } return; } } switch ( _Event_Sync_state ) { 400057fc: 19 10 00 6d sethi %hi(0x4001b400), %o4 <== NOT EXECUTED 40005800: c2 03 21 44 ld [ %o4 + 0x144 ], %g1 ! 4001b544 <_Event_Sync_state> <== NOT EXECUTED 40005804: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40005808: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4000580c: 18 80 00 11 bgu 40005850 <_Event_Surrender+0xa4> <== NOT EXECUTED 40005810: 03 10 00 6b sethi %hi(0x4001ac00), %g1 <== NOT EXECUTED case EVENT_SYNC_SATISFIED: break; case EVENT_SYNC_NOTHING_HAPPENED: case EVENT_SYNC_TIMEOUT: if ( !_Thread_Is_executing( the_thread ) ) 40005814: c4 00 60 3c ld [ %g1 + 0x3c ], %g2 ! 4001ac3c <_Thread_Executing> <== NOT EXECUTED 40005818: 80 a6 40 02 cmp %i1, %g2 <== NOT EXECUTED 4000581c: 12 80 00 0d bne 40005850 <_Event_Surrender+0xa4> <== NOT EXECUTED 40005820: 80 a0 c0 0d cmp %g3, %o5 <== NOT EXECUTED break; if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 40005824: 02 80 00 04 be 40005834 <_Event_Surrender+0x88> <== NOT EXECUTED 40005828: 80 8c a0 02 btst 2, %l2 <== NOT EXECUTED 4000582c: 02 80 00 09 be 40005850 <_Event_Surrender+0xa4> <== NOT EXECUTED 40005830: 01 00 00 00 nop <== NOT EXECUTED api->pending_events = 40005834: 82 29 00 0d andn %g4, %o5, %g1 <== NOT EXECUTED _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40005838: c4 06 60 28 ld [ %i1 + 0x28 ], %g2 <== NOT EXECUTED case EVENT_SYNC_TIMEOUT: if ( !_Thread_Is_executing( the_thread ) ) break; if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = 4000583c: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 40005840: c0 26 60 24 clr [ %i1 + 0x24 ] <== NOT EXECUTED *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = EVENT_SYNC_SATISFIED; 40005844: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40005848: da 20 80 00 st %o5, [ %g2 ] <== NOT EXECUTED _Event_Sync_state = EVENT_SYNC_SATISFIED; 4000584c: c2 23 21 44 st %g1, [ %o4 + 0x144 ] <== NOT EXECUTED } break; } } _ISR_Enable( level ); 40005850: 7f ff f1 6d call 40001e04 40005854: 91 e8 00 11 restore %g0, %l1, %o0 seized_events = _Event_sets_Get( pending_events, event_condition ); 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 = 40005858: 82 29 00 0d andn %g4, %o5, %g1 _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 4000585c: c4 06 60 28 ld [ %i1 + 0x28 ], %g2 seized_events = _Event_sets_Get( pending_events, event_condition ); 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 = 40005860: c2 24 20 40 st %g1, [ %l0 + 0x40 ] _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 40005864: c0 26 60 24 clr [ %i1 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40005868: da 20 80 00 st %o5, [ %g2 ] _ISR_Flash( level ); 4000586c: 7f ff f1 66 call 40001e04 40005870: 01 00 00 00 nop 40005874: 7f ff f1 60 call 40001df4 40005878: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4000587c: c2 06 60 50 ld [ %i1 + 0x50 ], %g1 40005880: 80 a0 60 02 cmp %g1, 2 40005884: 02 80 00 08 be 400058a4 <_Event_Surrender+0xf8> 40005888: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 4000588c: 90 10 00 11 mov %l1, %o0 40005890: 7f ff f1 5d call 40001e04 40005894: 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 ); 40005898: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000589c: 40 00 0d a9 call 40008f40 <_Thread_Clear_state> 400058a0: 81 e8 00 00 restore RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 400058a4: c2 26 60 50 st %g1, [ %i1 + 0x50 ] _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 400058a8: 7f ff f1 57 call 40001e04 400058ac: 90 10 00 11 mov %l1, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 400058b0: 40 00 13 ea call 4000a858 <_Watchdog_Remove> 400058b4: 90 06 60 48 add %i1, 0x48, %o0 400058b8: 33 04 00 ff sethi %hi(0x1003fc00), %i1 400058bc: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 400058c0: 40 00 0d a0 call 40008f40 <_Thread_Clear_state> 400058c4: 81 e8 00 00 restore 400058c8: 01 00 00 00 nop 400058cc <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 400058cc: 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 ) ) { 400058d0: 92 96 20 00 orcc %i0, 0, %o1 400058d4: 12 80 00 25 bne 40005968 <_Event_Timeout+0x9c> 400058d8: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400058dc: 21 10 00 6a sethi %hi(0x4001a800), %l0 <== NOT EXECUTED 400058e0: c2 04 23 60 ld [ %l0 + 0x360 ], %g1 ! 4001ab60 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 400058e4: 82 00 60 01 inc %g1 <== NOT EXECUTED 400058e8: c2 24 23 60 st %g1, [ %l0 + 0x360 ] <== 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; 400058ec: 03 10 00 6b sethi %hi(0x4001ac00), %g1 <== NOT EXECUTED 400058f0: f0 00 60 3c ld [ %g1 + 0x3c ], %i0 ! 4001ac3c <_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; 400058f4: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED * 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 ); 400058f8: 7f ff f1 3f call 40001df4 400058fc: 01 00 00 00 nop 40005900: 88 10 00 08 mov %o0, %g4 if ( the_thread->Wait.count ) { /* verify thread is waiting */ 40005904: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 40005908: 80 a0 60 00 cmp %g1, 0 4000590c: 02 80 00 3a be 400059f4 <_Event_Timeout+0x128> 40005910: 07 10 00 6d sethi %hi(0x4001b400), %g3 the_thread->Wait.count = 0; if ( _Event_Sync_state != EVENT_SYNC_SYNCHRONIZED && 40005914: c2 00 e1 44 ld [ %g3 + 0x144 ], %g1 ! 4001b544 <_Event_Sync_state> 40005918: 80 a0 60 00 cmp %g1, 0 4000591c: 02 80 00 29 be 400059c0 <_Event_Timeout+0xf4> 40005920: c0 26 20 24 clr [ %i0 + 0x24 ] 40005924: 03 10 00 6b sethi %hi(0x4001ac00), %g1 <== NOT EXECUTED 40005928: c4 00 60 3c ld [ %g1 + 0x3c ], %g2 ! 4001ac3c <_Thread_Executing> <== NOT EXECUTED 4000592c: 80 a6 00 02 cmp %i0, %g2 <== NOT EXECUTED 40005930: 12 80 00 25 bne 400059c4 <_Event_Timeout+0xf8> <== NOT EXECUTED 40005934: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state != EVENT_SYNC_SATISFIED ) { 40005938: c2 00 e1 44 ld [ %g3 + 0x144 ], %g1 <== NOT EXECUTED 4000593c: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 40005940: 02 80 00 03 be 4000594c <_Event_Timeout+0x80> <== NOT EXECUTED 40005944: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED _Event_Sync_state = EVENT_SYNC_TIMEOUT; 40005948: c2 20 e1 44 st %g1, [ %g3 + 0x144 ] <== NOT EXECUTED } _ISR_Enable( level ); 4000594c: 7f ff f1 2e call 40001e04 <== NOT EXECUTED 40005950: 01 00 00 00 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 40005954: c2 04 23 60 ld [ %l0 + 0x360 ], %g1 <== NOT EXECUTED 40005958: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000595c: c2 24 23 60 st %g1, [ %l0 + 0x360 ] <== NOT EXECUTED 40005960: 81 c7 e0 08 ret <== NOT EXECUTED 40005964: 81 e8 00 00 restore <== NOT EXECUTED 40005968: 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 ) { 4000596c: 80 a0 a0 04 cmp %g2, 4 40005970: 18 bf ff fc bgu 40005960 <_Event_Timeout+0x94> 40005974: 83 32 60 1b srl %o1, 0x1b, %g1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40005978: 80 a0 60 01 cmp %g1, 1 4000597c: 12 bf ff f9 bne 40005960 <_Event_Timeout+0x94> 40005980: 83 28 a0 02 sll %g2, 2, %g1 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40005984: 05 10 00 6a sethi %hi(0x4001a800), %g2 40005988: 84 10 a2 c0 or %g2, 0x2c0, %g2 ! 4001aac0 <_Objects_Information_table> 4000598c: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40005990: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 40005994: 80 a2 20 00 cmp %o0, 0 40005998: 02 80 00 15 be 400059ec <_Event_Timeout+0x120> 4000599c: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 400059a0: 40 00 08 f5 call 40007d74 <_Objects_Get> 400059a4: 94 07 bf f4 add %fp, -12, %o2 Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); switch ( location ) { 400059a8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400059ac: 80 a0 60 00 cmp %g1, 0 400059b0: 12 bf ff ec bne 40005960 <_Event_Timeout+0x94> 400059b4: b0 10 00 08 mov %o0, %i0 400059b8: 10 bf ff d0 b 400058f8 <_Event_Timeout+0x2c> 400059bc: 21 10 00 6a sethi %hi(0x4001a800), %l0 if ( _Event_Sync_state != EVENT_SYNC_SATISFIED ) { _Event_Sync_state = EVENT_SYNC_TIMEOUT; } _ISR_Enable( level ); } else { the_thread->Wait.return_code = RTEMS_TIMEOUT; 400059c0: 82 10 20 06 mov 6, %g1 400059c4: c2 26 20 34 st %g1, [ %i0 + 0x34 ] _ISR_Enable( level ); 400059c8: 7f ff f1 0f call 40001e04 400059cc: 90 10 00 04 mov %g4, %o0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 400059d0: 13 04 00 ff sethi %hi(0x1003fc00), %o1 400059d4: 90 10 00 18 mov %i0, %o0 400059d8: 40 00 0d 5a call 40008f40 <_Thread_Clear_state> 400059dc: 92 12 63 f8 or %o1, 0x3f8, %o1 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 400059e0: c2 04 23 60 ld [ %l0 + 0x360 ], %g1 400059e4: 82 00 7f ff add %g1, -1, %g1 400059e8: c2 24 23 60 st %g1, [ %l0 + 0x360 ] 400059ec: 81 c7 e0 08 ret 400059f0: 81 e8 00 00 restore _Thread_Unblock( the_thread ); } } else { _ISR_Enable( level ); 400059f4: 7f ff f1 04 call 40001e04 <== NOT EXECUTED 400059f8: 01 00 00 00 nop <== NOT EXECUTED 400059fc: 30 bf ff f9 b,a 400059e0 <_Event_Timeout+0x114> <== NOT EXECUTED 400072b4 <_Heap_Allocate>: void *_Heap_Allocate( Heap_Control *the_heap, size_t size ) { 400072b4: 9d e3 bf 98 save %sp, -104, %sp Heap_Block *the_block; void *ptr = NULL; Heap_Statistics *const stats = &the_heap->stats; Heap_Block *const tail = _Heap_Tail(the_heap); the_size = 400072b8: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 400072bc: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 400072c0: 90 10 00 19 mov %i1, %o0 400072c4: 40 00 00 cd call 400075f8 <_Heap_Calc_block_size> 400072c8: a0 10 00 18 mov %i0, %l0 _Heap_Calc_block_size(size, the_heap->page_size, the_heap->min_block_size); if(the_size == 0) 400072cc: 80 a2 20 00 cmp %o0, 0 400072d0: 22 80 00 1a be,a 40007338 <_Heap_Allocate+0x84> 400072d4: b0 10 20 00 clr %i0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 400072d8: f0 06 20 08 ld [ %i0 + 8 ], %i0 return NULL; /* Find large enough free block. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 400072dc: 80 a4 00 18 cmp %l0, %i0 400072e0: 22 80 00 16 be,a 40007338 <_Heap_Allocate+0x84> 400072e4: b0 10 20 00 clr %i0 /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); /* Don't bother to mask out the HEAP_PREV_USED bit as it won't change the result of the comparison. */ if(the_block->size >= the_size) { 400072e8: c2 06 20 04 ld [ %i0 + 4 ], %g1 400072ec: 80 a2 00 01 cmp %o0, %g1 400072f0: 08 80 00 16 bleu 40007348 <_Heap_Allocate+0x94> 400072f4: b2 10 20 00 clr %i1 return NULL; /* Find large enough free block. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; the_block = the_block->next, ++search_count) 400072f8: 10 80 00 07 b 40007314 <_Heap_Allocate+0x60> 400072fc: f0 06 20 08 ld [ %i0 + 8 ], %i0 /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); /* Don't bother to mask out the HEAP_PREV_USED bit as it won't change the result of the comparison. */ if(the_block->size >= the_size) { 40007300: c2 06 20 04 ld [ %i0 + 4 ], %g1 40007304: 80 a2 00 01 cmp %o0, %g1 40007308: 08 80 00 11 bleu 4000734c <_Heap_Allocate+0x98> 4000730c: 94 10 00 08 mov %o0, %o2 return NULL; /* Find large enough free block. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; the_block = the_block->next, ++search_count) 40007310: f0 06 20 08 ld [ %i0 + 8 ], %i0 if(the_size == 0) return NULL; /* Find large enough free block. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 40007314: 80 a4 00 18 cmp %l0, %i0 40007318: 12 bf ff fa bne 40007300 <_Heap_Allocate+0x4c> 4000731c: b2 06 60 01 inc %i1 40007320: b0 10 20 00 clr %i0 _HAssert(_Heap_Is_aligned_ptr(ptr, the_heap->page_size)); break; } } if(stats->max_search < search_count) 40007324: c2 04 20 44 ld [ %l0 + 0x44 ], %g1 40007328: 80 a6 40 01 cmp %i1, %g1 4000732c: 08 80 00 05 bleu 40007340 <_Heap_Allocate+0x8c> 40007330: 01 00 00 00 nop stats->max_search = search_count; 40007334: f2 24 20 44 st %i1, [ %l0 + 0x44 ] 40007338: 81 c7 e0 08 ret 4000733c: 81 e8 00 00 restore return ptr; } 40007340: 81 c7 e0 08 ret 40007344: 81 e8 00 00 restore _HAssert(_Heap_Is_prev_used(the_block)); /* Don't bother to mask out the HEAP_PREV_USED bit as it won't change the result of the comparison. */ if(the_block->size >= the_size) { (void)_Heap_Block_allocate(the_heap, the_block, the_size ); 40007348: 94 10 00 08 mov %o0, %o2 4000734c: 92 10 00 18 mov %i0, %o1 40007350: 40 00 00 7e call 40007548 <_Heap_Block_allocate> 40007354: 90 10 00 10 mov %l0, %o0 ptr = _Heap_User_area(the_block); stats->allocs += 1; 40007358: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 stats->searches += search_count + 1; 4000735c: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 if(the_block->size >= the_size) { (void)_Heap_Block_allocate(the_heap, the_block, the_size ); ptr = _Heap_User_area(the_block); stats->allocs += 1; 40007360: 82 00 60 01 inc %g1 stats->searches += search_count + 1; 40007364: 84 00 a0 01 inc %g2 if(the_block->size >= the_size) { (void)_Heap_Block_allocate(the_heap, the_block, the_size ); ptr = _Heap_User_area(the_block); stats->allocs += 1; 40007368: c2 24 20 48 st %g1, [ %l0 + 0x48 ] stats->searches += search_count + 1; 4000736c: 84 00 80 19 add %g2, %i1, %g2 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( void *base, uint32_t offset ) { return (void *)((char *)base + offset); 40007370: b0 06 20 08 add %i0, 8, %i0 40007374: 10 bf ff ec b 40007324 <_Heap_Allocate+0x70> 40007378: c4 24 20 4c st %g2, [ %l0 + 0x4c ] 4001b3c4 <_Heap_Get_free_information>: */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 4001b3c4: 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; 4001b3c8: c0 22 40 00 clr [ %o1 ] <== NOT EXECUTED info->largest = 0; 4001b3cc: c0 22 60 04 clr [ %o1 + 4 ] <== NOT EXECUTED info->total = 0; 4001b3d0: c0 22 60 08 clr [ %o1 + 8 ] <== NOT EXECUTED for(the_block = _Heap_First(the_heap); the_block != tail; 4001b3d4: 80 a2 00 0d cmp %o0, %o5 <== NOT EXECUTED 4001b3d8: 02 80 00 12 be 4001b420 <_Heap_Get_free_information+0x5c> <== NOT EXECUTED 4001b3dc: 98 10 20 00 clr %o4 <== NOT EXECUTED 4001b3e0: 84 10 00 0c mov %o4, %g2 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 4001b3e4: c2 03 60 04 ld [ %o5 + 4 ], %g1 <== NOT EXECUTED /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; info->total += the_size; if ( info->largest < the_size ) 4001b3e8: c6 02 60 04 ld [ %o1 + 4 ], %g3 <== NOT EXECUTED 4001b3ec: 88 08 7f fe and %g1, -2, %g4 <== 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++; 4001b3f0: 84 00 a0 01 inc %g2 <== NOT EXECUTED info->total += the_size; 4001b3f4: 82 03 00 04 add %o4, %g4, %g1 <== 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++; 4001b3f8: c4 22 40 00 st %g2, [ %o1 ] <== NOT EXECUTED info->total += the_size; 4001b3fc: c2 22 60 08 st %g1, [ %o1 + 8 ] <== NOT EXECUTED if ( info->largest < the_size ) 4001b400: 80 a1 00 03 cmp %g4, %g3 <== NOT EXECUTED 4001b404: 08 80 00 03 bleu 4001b410 <_Heap_Get_free_information+0x4c> <== NOT EXECUTED 4001b408: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED info->largest = the_size; 4001b40c: c8 22 60 04 st %g4, [ %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) 4001b410: 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; 4001b414: 80 a2 00 0d cmp %o0, %o5 <== NOT EXECUTED 4001b418: 32 bf ff f4 bne,a 4001b3e8 <_Heap_Get_free_information+0x24> <== NOT EXECUTED 4001b41c: c2 03 60 04 ld [ %o5 + 4 ], %g1 <== NOT EXECUTED 4001b420: 81 c3 e0 08 retl <== NOT EXECUTED 4001b424: 01 00 00 00 nop 40007648 <_Heap_Initialize>: Heap_Control *the_heap, void *starting_address, size_t size, uint32_t page_size ) { 40007648: 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) 4000764c: 80 a6 e0 00 cmp %i3, 0 40007650: 12 80 00 43 bne 4000775c <_Heap_Initialize+0x114> 40007654: 84 8e e0 07 andcc %i3, 7, %g2 40007658: b6 10 20 08 mov 8, %i3 <== NOT EXECUTED 4000765c: a4 10 20 00 clr %l2 <== NOT EXECUTED /* 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; 40007660: a0 06 60 08 add %i1, 8, %l0 uint32_t alignment ) { _H_uptr_t v = *value; uint32_t a = alignment; _H_uptr_t r = v % a; 40007664: 92 10 00 1b mov %i3, %o1 40007668: 40 00 3a b6 call 40016140 <.urem> 4000766c: 90 10 00 10 mov %l0, %o0 *value = r ? v - r + a : v; 40007670: 80 a2 20 00 cmp %o0, 0 40007674: 02 80 00 05 be 40007688 <_Heap_Initialize+0x40> 40007678: a2 04 3f f8 add %l0, -8, %l1 4000767c: 82 06 c0 10 add %i3, %l0, %g1 40007680: a0 20 40 08 sub %g1, %o0, %l0 _Heap_Align_up_uptr ( &aligned_start, page_size ); aligned_start -= HEAP_BLOCK_USER_OFFSET; 40007684: a2 04 3f f8 add %l0, -8, %l1 ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; *value = r ? v - r + a : v; 40007688: 80 a4 a0 00 cmp %l2, 0 4000768c: 02 80 00 04 be 4000769c <_Heap_Initialize+0x54> 40007690: 82 10 20 10 mov 0x10, %g1 40007694: 82 06 e0 10 add %i3, 0x10, %g1 40007698: 82 20 40 12 sub %g1, %l2, %g1 4000769c: c2 26 20 14 st %g1, [ %i0 + 0x14 ] /* 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); 400076a0: 82 24 40 19 sub %l1, %i1, %g1 400076a4: 82 00 60 08 add %g1, 8, %g1 if ( size < overhead ) 400076a8: 80 a0 40 1a cmp %g1, %i2 400076ac: 18 80 00 2a bgu 40007754 <_Heap_Initialize+0x10c> 400076b0: a0 26 80 01 sub %i2, %g1, %l0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 400076b4: 92 10 00 1b mov %i3, %o1 400076b8: 40 00 3a a2 call 40016140 <.urem> 400076bc: 90 10 00 10 mov %l0, %o0 return 0; /* Too small area for the heap */ the_size = size - overhead; _Heap_Align_down ( &the_size, page_size ); if ( the_size == 0 ) 400076c0: a0 a4 00 08 subcc %l0, %o0, %l0 400076c4: 02 80 00 24 be 40007754 <_Heap_Initialize+0x10c> 400076c8: 09 10 00 6a sethi %hi(0x4001a800), %g4 return 0; /* Too small area for the heap */ the_heap->page_size = page_size; 400076cc: f6 26 20 10 st %i3, [ %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; 400076d0: f6 24 40 00 st %i3, [ %l1 ] the_block->size = the_size | HEAP_PREV_USED; 400076d4: 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++; 400076d8: c6 01 21 38 ld [ %g4 + 0x138 ], %g3 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; 400076dc: c2 24 60 04 st %g1, [ %l1 + 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 */ 400076e0: e0 24 40 10 st %l0, [ %l1 + %l0 ] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 400076e4: 9a 04 40 10 add %l1, %l0, %o5 the_block->size = page_size; 400076e8: f6 23 60 04 st %i3, [ %o5 + 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 ); 400076ec: f0 24 60 08 st %i0, [ %l1 + 8 ] the_block->prev = _Heap_Head( the_heap ); 400076f0: f0 24 60 0c st %i0, [ %l1 + 0xc ] stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 400076f4: c6 26 20 28 st %g3, [ %i0 + 0x28 ] 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; 400076f8: f4 26 20 2c st %i2, [ %i0 + 0x2c ] stats->free_size = the_size; 400076fc: e0 26 20 30 st %l0, [ %i0 + 0x30 ] stats->min_free_size = the_size; 40007700: e0 26 20 34 st %l0, [ %i0 + 0x34 ] stats->free_blocks = 1; stats->max_free_blocks = 1; stats->used_blocks = 0; 40007704: c0 26 20 40 clr [ %i0 + 0x40 ] stats->max_search = 0; 40007708: c0 26 20 44 clr [ %i0 + 0x44 ] stats->allocs = 0; 4000770c: c0 26 20 48 clr [ %i0 + 0x48 ] stats->searches = 0; 40007710: c0 26 20 4c clr [ %i0 + 0x4c ] stats->frees = 0; 40007714: c0 26 20 50 clr [ %i0 + 0x50 ] stats->resizes = 0; 40007718: c0 26 20 54 clr [ %i0 + 0x54 ] the_block->size = page_size; stats->size = size; stats->free_size = the_size; stats->min_free_size = the_size; stats->free_blocks = 1; 4000771c: 84 10 20 01 mov 1, %g2 stats->max_free_blocks = 1; 40007720: c4 26 20 3c st %g2, [ %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; 40007724: c4 26 20 38 st %g2, [ %i0 + 0x38 ] 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; 40007728: 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++; 4000772c: 86 00 e0 01 inc %g3 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; 40007730: 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; 40007734: 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; 40007738: e2 26 20 08 st %l1, [ %i0 + 8 ] _Heap_Tail(the_heap)->prev = the_block; 4000773c: e2 26 20 0c st %l1, [ %i0 + 0xc ] the_heap->start = the_block; 40007740: e2 26 20 20 st %l1, [ %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 */ 40007744: da 26 20 24 st %o5, [ %i0 + 0x24 ] stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 40007748: c6 21 21 38 st %g3, [ %g4 + 0x138 ] return ( the_size - HEAP_BLOCK_USED_OVERHEAD ); 4000774c: 81 c7 e0 08 ret 40007750: 91 ec 3f fc restore %l0, -4, %o0 } 40007754: 81 c7 e0 08 ret 40007758: 91 e8 20 00 restore %g0, 0, %o0 ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; *value = r ? v - r + a : v; 4000775c: 02 80 00 04 be 4000776c <_Heap_Initialize+0x124> 40007760: 90 10 20 10 mov 0x10, %o0 40007764: 82 06 e0 08 add %i3, 8, %g1 40007768: b6 20 40 02 sub %g1, %g2, %i3 4000776c: 40 00 3a 75 call 40016140 <.urem> 40007770: 92 10 00 1b mov %i3, %o1 40007774: 10 bf ff bb b 40007660 <_Heap_Initialize+0x18> 40007778: a4 10 00 08 mov %o0, %l2 4000d54c <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 4000d54c: 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; 4000d550: 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; 4000d554: ee 06 20 14 ld [ %i0 + 0x14 ], %l7 <== NOT EXECUTED uint32_t const page_size = the_heap->page_size; *old_mem_size = 0; 4000d558: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED *avail_mem_size = 0; 4000d55c: 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); 4000d560: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4000d564: 40 00 22 f7 call 40016140 <.urem> <== NOT EXECUTED 4000d568: 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 ); 4000d56c: 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); 4000d570: 90 26 40 08 sub %i1, %o0, %o0 <== NOT EXECUTED 4000d574: 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)) 4000d578: 80 a4 80 01 cmp %l2, %g1 <== NOT EXECUTED 4000d57c: 1a 80 00 05 bcc 4000d590 <_Heap_Resize_block+0x44> <== NOT EXECUTED 4000d580: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 <== NOT EXECUTED } } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; 4000d584: 84 10 20 02 mov 2, %g2 <== NOT EXECUTED } 4000d588: 81 c7 e0 08 ret <== NOT EXECUTED 4000d58c: 91 e8 00 02 restore %g0, %g2, %o0 <== NOT EXECUTED *old_mem_size = 0; *avail_mem_size = 0; _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)) 4000d590: 80 a4 80 02 cmp %l2, %g2 <== NOT EXECUTED 4000d594: 38 bf ff fd bgu,a 4000d588 <_Heap_Resize_block+0x3c> <== NOT EXECUTED 4000d598: 84 10 20 02 mov 2, %g2 <== NOT EXECUTED return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 4000d59c: 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); 4000d5a0: a8 08 ff fe and %g3, -2, %l4 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 4000d5a4: a2 04 80 14 add %l2, %l4, %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) || 4000d5a8: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 4000d5ac: 2a bf ff f7 bcs,a 4000d588 <_Heap_Resize_block+0x3c> <== NOT EXECUTED 4000d5b0: 84 10 20 02 mov 2, %g2 <== NOT EXECUTED 4000d5b4: 80 a4 40 02 cmp %l1, %g2 <== NOT EXECUTED 4000d5b8: 38 bf ff f4 bgu,a 4000d588 <_Heap_Resize_block+0x3c> <== NOT EXECUTED 4000d5bc: 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); 4000d5c0: c2 04 60 04 ld [ %l1 + 4 ], %g1 <== NOT EXECUTED 4000d5c4: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000d5c8: 02 bf ff ef be 4000d584 <_Heap_Resize_block+0x38> <== NOT EXECUTED 4000d5cc: aa 08 7f fe and %g1, -2, %l5 <== 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) || 4000d5d0: 80 a0 80 11 cmp %g2, %l1 <== NOT EXECUTED 4000d5d4: ac 10 20 01 mov 1, %l6 <== NOT EXECUTED 4000d5d8: 02 80 00 04 be 4000d5e8 <_Heap_Resize_block+0x9c> <== NOT EXECUTED 4000d5dc: ba 04 40 15 add %l1, %l5, %i5 <== NOT EXECUTED 4000d5e0: c2 07 60 04 ld [ %i5 + 4 ], %g1 <== NOT EXECUTED 4000d5e4: 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) 4000d5e8: 82 24 40 19 sub %l1, %i1, %g1 <== NOT EXECUTED 4000d5ec: 82 00 60 04 add %g1, 4, %g1 <== NOT EXECUTED + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; 4000d5f0: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED if (size > old_user_size) { 4000d5f4: 80 a0 40 1a cmp %g1, %i2 <== NOT EXECUTED 4000d5f8: 1a 80 00 16 bcc 4000d650 <_Heap_Resize_block+0x104> <== NOT EXECUTED 4000d5fc: 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 */ 4000d600: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED 4000d604: 12 80 00 10 bne 4000d644 <_Heap_Resize_block+0xf8> <== NOT EXECUTED 4000d608: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED return HEAP_RESIZE_UNSATISFIED; else { uint32_t add_block_size = size - old_user_size; 4000d60c: 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; 4000d610: 40 00 22 cc call 40016140 <.urem> <== NOT EXECUTED 4000d614: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED *value = r ? v - r + a : v; 4000d618: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000d61c: 02 80 00 05 be 4000d630 <_Heap_Resize_block+0xe4> <== NOT EXECUTED 4000d620: 80 a4 00 17 cmp %l0, %l7 <== NOT EXECUTED 4000d624: 82 04 00 13 add %l0, %l3, %g1 <== NOT EXECUTED 4000d628: a0 20 40 08 sub %g1, %o0, %l0 <== NOT EXECUTED 4000d62c: 80 a4 00 17 cmp %l0, %l7 <== NOT EXECUTED 4000d630: 0a 80 00 1d bcs 4000d6a4 <_Heap_Resize_block+0x158> <== NOT EXECUTED 4000d634: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED _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) 4000d638: 80 a5 40 08 cmp %l5, %o0 <== NOT EXECUTED 4000d63c: 1a 80 00 1f bcc 4000d6b8 <_Heap_Resize_block+0x16c> <== NOT EXECUTED 4000d640: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED } } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; 4000d644: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED } 4000d648: 81 c7 e0 08 ret <== NOT EXECUTED 4000d64c: 91 e8 00 02 restore %g0, %g2, %o0 <== NOT EXECUTED --stats->used_blocks; } } else { /* Calculate how much memory we could free */ uint32_t free_block_size = old_user_size - size; 4000d650: a0 20 40 1a sub %g1, %i2, %l0 <== NOT EXECUTED uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 4000d654: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED 4000d658: 40 00 22 ba call 40016140 <.urem> <== NOT EXECUTED 4000d65c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 4000d660: a0 a4 00 08 subcc %l0, %o0, %l0 <== NOT EXECUTED 4000d664: 22 80 00 0b be,a 4000d690 <_Heap_Resize_block+0x144> <== NOT EXECUTED 4000d668: 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; 4000d66c: 86 25 00 10 sub %l4, %l0, %g3 <== NOT EXECUTED if (new_block_size < min_block_size) { 4000d670: 80 a5 c0 03 cmp %l7, %g3 <== NOT EXECUTED 4000d674: 08 80 00 1c bleu 4000d6e4 <_Heap_Resize_block+0x198> <== NOT EXECUTED 4000d678: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED uint32_t delta = min_block_size - new_block_size; 4000d67c: 82 25 c0 03 sub %l7, %g3, %g1 <== NOT EXECUTED _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 4000d680: a0 a4 00 01 subcc %l0, %g1, %l0 <== NOT EXECUTED 4000d684: 32 80 00 17 bne,a 4000d6e0 <_Heap_Resize_block+0x194> <== NOT EXECUTED 4000d688: 86 00 c0 01 add %g3, %g1, %g3 <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; } } } ++stats->resizes; 4000d68c: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 <== NOT EXECUTED 4000d690: 84 10 20 00 clr %g2 <== NOT EXECUTED 4000d694: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000d698: c2 26 20 54 st %g1, [ %i0 + 0x54 ] <== NOT EXECUTED return HEAP_RESIZE_SUCCESSFUL; } 4000d69c: 81 c7 e0 08 ret <== NOT EXECUTED 4000d6a0: 91 e8 00 02 restore %g0, %g2, %o0 <== NOT EXECUTED ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; *value = r ? v - r + a : v; 4000d6a4: 90 10 00 17 mov %l7, %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) 4000d6a8: 80 a5 40 08 cmp %l5, %o0 <== NOT EXECUTED 4000d6ac: 0a bf ff e7 bcs 4000d648 <_Heap_Resize_block+0xfc> <== NOT EXECUTED 4000d6b0: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */ add_block_size = 4000d6b4: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 4000d6b8: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 4000d6bc: 7f ff e7 a3 call 40007548 <_Heap_Block_allocate> <== NOT EXECUTED 4000d6c0: 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; 4000d6c4: 90 02 00 14 add %o0, %l4, %o0 <== NOT EXECUTED 4000d6c8: 90 12 00 1b or %o0, %i3, %o0 <== NOT EXECUTED 4000d6cc: d0 24 a0 04 st %o0, [ %l2 + 4 ] <== NOT EXECUTED --stats->used_blocks; 4000d6d0: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 <== NOT EXECUTED 4000d6d4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000d6d8: 10 bf ff ed b 4000d68c <_Heap_Resize_block+0x140> <== NOT EXECUTED 4000d6dc: c2 26 20 40 st %g1, [ %i0 + 0x40 ] <== 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) { 4000d6e0: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED 4000d6e4: 12 80 00 15 bne 4000d738 <_Heap_Resize_block+0x1ec> <== NOT EXECUTED 4000d6e8: 80 a4 00 17 cmp %l0, %l7 <== 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; 4000d6ec: 82 10 c0 1b or %g3, %i3, %g1 <== NOT EXECUTED 4000d6f0: c2 24 a0 04 st %g1, [ %l2 + 4 ] <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 4000d6f4: 86 04 80 03 add %l2, %g3, %g3 <== 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; 4000d6f8: 88 04 00 15 add %l0, %l5, %g4 <== NOT EXECUTED Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 4000d6fc: d8 04 60 0c ld [ %l1 + 0xc ], %o4 <== NOT EXECUTED _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; new_next_block->size = new_next_block_size | HEAP_PREV_USED; next_next_block->prev_size = new_next_block_size; 4000d700: c8 27 40 00 st %g4, [ %i5 ] <== NOT EXECUTED Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; 4000d704: da 04 60 08 ld [ %l1 + 8 ], %o5 <== 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; 4000d708: 84 11 20 01 or %g4, 1, %g2 <== NOT EXECUTED 4000d70c: c4 20 e0 04 st %g2, [ %g3 + 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; 4000d710: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 <== NOT EXECUTED Heap_Block *prev = block->prev; block = new_block; block->next = next; 4000d714: da 20 e0 08 st %o5, [ %g3 + 8 ] <== NOT EXECUTED 4000d718: 82 00 40 10 add %g1, %l0, %g1 <== NOT EXECUTED block->prev = prev; 4000d71c: d8 20 e0 0c st %o4, [ %g3 + 0xc ] <== NOT EXECUTED 4000d720: c2 26 20 30 st %g1, [ %i0 + 0x30 ] <== NOT EXECUTED *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 4000d724: 88 01 3f fc add %g4, -4, %g4 <== NOT EXECUTED next->prev = prev->next = block; 4000d728: c6 23 60 0c st %g3, [ %o5 + 0xc ] <== NOT EXECUTED 4000d72c: c6 23 20 08 st %g3, [ %o4 + 8 ] <== NOT EXECUTED 4000d730: 10 bf ff d7 b 4000d68c <_Heap_Resize_block+0x140> <== NOT EXECUTED 4000d734: c8 27 00 00 st %g4, [ %i4 ] <== NOT EXECUTED } else if (free_block_size >= min_block_size) { 4000d738: 2a bf ff d6 bcs,a 4000d690 <_Heap_Resize_block+0x144> <== NOT EXECUTED 4000d73c: 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; 4000d740: 82 10 c0 1b or %g3, %i3, %g1 <== NOT EXECUTED next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; 4000d744: 84 14 20 01 or %l0, 1, %g2 <== NOT EXECUTED the_heap->stats.free_size += free_block_size; *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; } else if (free_block_size >= min_block_size) { /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; 4000d748: c2 24 a0 04 st %g1, [ %l2 + 4 ] <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 4000d74c: 92 04 80 03 add %l2, %g3, %o1 <== NOT EXECUTED next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; 4000d750: c4 22 60 04 st %g2, [ %o1 + 4 ] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 4000d754: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 4000d758: 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 */ 4000d75c: 82 00 60 01 inc %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 4000d760: 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 */ 4000d764: c2 26 20 40 st %g1, [ %i0 + 0x40 ] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 4000d768: c4 26 20 50 st %g2, [ %i0 + 0x50 ] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 4000d76c: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED 4000d770: 7f ff e7 03 call 4000737c <_Heap_Free> <== NOT EXECUTED 4000d774: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 4000d778: 82 04 3f fc add %l0, -4, %g1 <== NOT EXECUTED 4000d77c: 10 bf ff c4 b 4000d68c <_Heap_Resize_block+0x140> <== NOT EXECUTED 4000d780: c2 27 00 00 st %g1, [ %i4 ] <== NOT EXECUTED 4000d784 <_Heap_Size_of_user_area>: boolean _Heap_Size_of_user_area( Heap_Control *the_heap, void *starting_address, size_t *size ) { 4000d784: 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( 4000d788: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 <== NOT EXECUTED 4000d78c: 80 a6 40 10 cmp %i1, %l0 <== NOT EXECUTED 4000d790: 0a 80 00 05 bcs 4000d7a4 <_Heap_Size_of_user_area+0x20> <== NOT EXECUTED 4000d794: e2 06 20 24 ld [ %i0 + 0x24 ], %l1 <== NOT EXECUTED 4000d798: 80 a6 40 11 cmp %i1, %l1 <== NOT EXECUTED 4000d79c: 28 80 00 04 bleu,a 4000d7ac <_Heap_Size_of_user_area+0x28> <== NOT EXECUTED 4000d7a0: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 <== NOT EXECUTED *size = _Addresses_Subtract ( next_block, starting_address ) + HEAP_BLOCK_HEADER_OFFSET; return( TRUE ); } 4000d7a4: 81 c7 e0 08 ret <== NOT EXECUTED 4000d7a8: 91 e8 20 00 restore %g0, 0, %o0 <== 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); 4000d7ac: 40 00 22 65 call 40016140 <.urem> <== NOT EXECUTED 4000d7b0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4000d7b4: 90 26 40 08 sub %i1, %o0, %o0 <== NOT EXECUTED 4000d7b8: 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 ) ) 4000d7bc: 80 a2 00 10 cmp %o0, %l0 <== NOT EXECUTED 4000d7c0: 0a bf ff f9 bcs 4000d7a4 <_Heap_Size_of_user_area+0x20> <== NOT EXECUTED 4000d7c4: 80 a2 00 11 cmp %o0, %l1 <== NOT EXECUTED 4000d7c8: 18 bf ff f7 bgu 4000d7a4 <_Heap_Size_of_user_area+0x20> <== NOT EXECUTED 4000d7cc: 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 ); 4000d7d0: c2 02 20 04 ld [ %o0 + 4 ], %g1 <== NOT EXECUTED 4000d7d4: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED 4000d7d8: 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 ( 4000d7dc: 80 a2 00 10 cmp %o0, %l0 <== NOT EXECUTED 4000d7e0: 0a bf ff f1 bcs 4000d7a4 <_Heap_Size_of_user_area+0x20> <== NOT EXECUTED 4000d7e4: 80 a2 00 11 cmp %o0, %l1 <== NOT EXECUTED 4000d7e8: 18 bf ff ef bgu 4000d7a4 <_Heap_Size_of_user_area+0x20> <== NOT EXECUTED 4000d7ec: 01 00 00 00 nop <== NOT EXECUTED 4000d7f0: c2 02 20 04 ld [ %o0 + 4 ], %g1 <== NOT EXECUTED 4000d7f4: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000d7f8: 02 bf ff eb be 4000d7a4 <_Heap_Size_of_user_area+0x20> <== NOT EXECUTED 4000d7fc: 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 ) 4000d800: 82 00 60 04 add %g1, 4, %g1 <== NOT EXECUTED 4000d804: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED 4000d808: 81 c7 e0 08 ret <== NOT EXECUTED 4000d80c: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED 40006a84 <_IO_Manager_initialization>: void _IO_Manager_initialization( rtems_driver_address_table *driver_table, uint32_t drivers_in_table, uint32_t number_of_drivers ) { 40006a84: 9d e3 bf 98 save %sp, -104, %sp /* * 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 ) 40006a88: 80 a6 80 19 cmp %i2, %i1 40006a8c: 08 80 00 27 bleu 40006b28 <_IO_Manager_initialization+0xa4> 40006a90: 03 10 00 6d sethi %hi(0x4001b400), %g1 /* * 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 *) 40006a94: 83 2e a0 03 sll %i2, 3, %g1 <== NOT EXECUTED 40006a98: a1 2e a0 05 sll %i2, 5, %l0 <== NOT EXECUTED 40006a9c: a0 24 00 01 sub %l0, %g1, %l0 <== NOT EXECUTED 40006aa0: 40 00 0f cf call 4000a9dc <_Workspace_Allocate_or_fatal_error> <== NOT EXECUTED 40006aa4: 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; 40006aa8: 03 10 00 6d sethi %hi(0x4001b400), %g1 <== NOT EXECUTED memset( 40006aac: 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; 40006ab0: f4 20 61 94 st %i2, [ %g1 + 0x194 ] <== 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 *) 40006ab4: 21 10 00 6d sethi %hi(0x4001b400), %l0 <== NOT EXECUTED _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 40006ab8: 92 10 20 00 clr %o1 <== NOT EXECUTED 40006abc: 40 00 22 ce call 4000f5f4 <== NOT EXECUTED 40006ac0: d0 24 21 98 st %o0, [ %l0 + 0x198 ] <== NOT EXECUTED _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 40006ac4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40006ac8: 02 80 00 16 be 40006b20 <_IO_Manager_initialization+0x9c> <== NOT EXECUTED 40006acc: d4 04 21 98 ld [ %l0 + 0x198 ], %o2 <== NOT EXECUTED _IO_Driver_address_table[index] = driver_table[index]; 40006ad0: 96 10 20 00 clr %o3 <== NOT EXECUTED 40006ad4: 98 10 20 00 clr %o4 <== NOT EXECUTED 40006ad8: c2 03 00 18 ld [ %o4 + %i0 ], %g1 <== NOT EXECUTED 40006adc: 9a 03 00 18 add %o4, %i0, %o5 <== NOT EXECUTED 40006ae0: c2 23 00 0a st %g1, [ %o4 + %o2 ] <== NOT EXECUTED 40006ae4: c4 03 60 04 ld [ %o5 + 4 ], %g2 <== NOT EXECUTED 40006ae8: 86 03 00 0a add %o4, %o2, %g3 <== NOT EXECUTED 40006aec: c4 20 e0 04 st %g2, [ %g3 + 4 ] <== NOT EXECUTED 40006af0: c2 03 60 08 ld [ %o5 + 8 ], %g1 <== NOT EXECUTED memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 40006af4: 96 02 e0 01 inc %o3 <== NOT EXECUTED _IO_Driver_address_table[index] = driver_table[index]; 40006af8: c2 20 e0 08 st %g1, [ %g3 + 8 ] <== NOT EXECUTED 40006afc: c4 03 60 0c ld [ %o5 + 0xc ], %g2 <== NOT EXECUTED memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 40006b00: 98 03 20 18 add %o4, 0x18, %o4 <== NOT EXECUTED _IO_Driver_address_table[index] = driver_table[index]; 40006b04: c4 20 e0 0c st %g2, [ %g3 + 0xc ] <== NOT EXECUTED 40006b08: c8 03 60 10 ld [ %o5 + 0x10 ], %g4 <== NOT EXECUTED memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 40006b0c: 80 a2 c0 19 cmp %o3, %i1 <== NOT EXECUTED _IO_Driver_address_table[index] = driver_table[index]; 40006b10: c8 20 e0 10 st %g4, [ %g3 + 0x10 ] <== NOT EXECUTED 40006b14: c2 03 60 14 ld [ %o5 + 0x14 ], %g1 <== NOT EXECUTED memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 40006b18: 12 bf ff f0 bne 40006ad8 <_IO_Manager_initialization+0x54> <== NOT EXECUTED 40006b1c: c2 20 e0 14 st %g1, [ %g3 + 0x14 ] <== NOT EXECUTED 40006b20: 81 c7 e0 08 ret <== NOT EXECUTED 40006b24: 81 e8 00 00 restore <== NOT EXECUTED * 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; _IO_Number_of_drivers = number_of_drivers; 40006b28: 05 10 00 6d sethi %hi(0x4001b400), %g2 * 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; 40006b2c: f0 20 61 98 st %i0, [ %g1 + 0x198 ] _IO_Number_of_drivers = number_of_drivers; 40006b30: f2 20 a1 94 st %i1, [ %g2 + 0x194 ] 40006b34: 81 c7 e0 08 ret 40006b38: 81 e8 00 00 restore 400077bc <_ISR_Handler_initialization>: * * Output parameters: NONE */ void _ISR_Handler_initialization( void ) { 400077bc: 9d e3 bf 98 save %sp, -104, %sp _ISR_Signals_to_thread_executing = FALSE; 400077c0: 03 10 00 6b sethi %hi(0x4001ac00), %g1 _ISR_Nest_level = 0; 400077c4: 05 10 00 6b sethi %hi(0x4001ac00), %g2 * Output parameters: NONE */ void _ISR_Handler_initialization( void ) { _ISR_Signals_to_thread_executing = FALSE; 400077c8: c0 20 60 e8 clr [ %g1 + 0xe8 ] _ISR_Nest_level = 0; 400077cc: c0 20 a0 24 clr [ %g2 + 0x24 ] _ISR_Vector_table = _Workspace_Allocate_or_fatal_error( 400077d0: 40 00 0c 83 call 4000a9dc <_Workspace_Allocate_or_fatal_error> 400077d4: 90 10 24 00 mov 0x400, %o0 _CPU_Initialize_vectors(); #if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE ) if ( _CPU_Table.interrupt_stack_size < STACK_MINIMUM_SIZE ) 400077d8: 03 10 00 6a sethi %hi(0x4001a800), %g1 400077dc: a0 10 63 74 or %g1, 0x374, %l0 ! 4001ab74 <_CPU_Table> 400077e0: 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( 400077e4: 03 10 00 6b sethi %hi(0x4001ac00), %g1 _CPU_Initialize_vectors(); #if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE ) if ( _CPU_Table.interrupt_stack_size < STACK_MINIMUM_SIZE ) 400077e8: 80 a0 af ff cmp %g2, 0xfff 400077ec: 18 80 00 07 bgu 40007808 <_ISR_Handler_initialization+0x4c> 400077f0: d0 20 60 04 st %o0, [ %g1 + 4 ] _Internal_error_Occurred( 400077f4: 90 10 20 00 clr %o0 <== NOT EXECUTED 400077f8: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 400077fc: 7f ff ff e0 call 4000777c <_Internal_error_Occurred> <== NOT EXECUTED 40007800: 94 10 20 05 mov 5, %o2 <== NOT EXECUTED 40007804: c4 04 20 18 ld [ %l0 + 0x18 ], %g2 <== NOT EXECUTED INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL ); _CPU_Interrupt_stack_low = 40007808: 40 00 0c 75 call 4000a9dc <_Workspace_Allocate_or_fatal_error> 4000780c: 90 10 00 02 mov %g2, %o0 _Workspace_Allocate_or_fatal_error( _CPU_Table.interrupt_stack_size ); _CPU_Interrupt_stack_high = _Addresses_Add_offset( 40007810: c6 04 20 18 ld [ %l0 + 0x18 ], %g3 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL ); _CPU_Interrupt_stack_low = 40007814: 03 10 00 6a sethi %hi(0x4001a800), %g1 _Workspace_Allocate_or_fatal_error( _CPU_Table.interrupt_stack_size ); _CPU_Interrupt_stack_high = _Addresses_Add_offset( 40007818: 86 02 00 03 add %o0, %g3, %g3 4000781c: 05 10 00 6a sethi %hi(0x4001a800), %g2 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL ); _CPU_Interrupt_stack_low = 40007820: d0 20 63 70 st %o0, [ %g1 + 0x370 ] _Workspace_Allocate_or_fatal_error( _CPU_Table.interrupt_stack_size ); _CPU_Interrupt_stack_high = _Addresses_Add_offset( 40007824: c6 20 a2 bc st %g3, [ %g2 + 0x2bc ] #if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE ) _CPU_Install_interrupt_stack(); #endif } 40007828: 81 c7 e0 08 ret 4000782c: 81 e8 00 00 restore 40019fb0 <_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; 40019fb0: 95 32 a0 02 srl %o2, 2, %o2 <== NOT EXECUTED while ( tmp_length-- ) 40019fb4: 80 a2 a0 00 cmp %o2, 0 <== NOT EXECUTED 40019fb8: 02 80 00 09 be 40019fdc <_Objects_Copy_name_raw+0x2c> <== NOT EXECUTED 40019fbc: 86 10 20 00 clr %g3 <== NOT EXECUTED 40019fc0: 84 10 20 00 clr %g2 <== NOT EXECUTED *destination_p++ = *source_p++; 40019fc4: c2 00 80 08 ld [ %g2 + %o0 ], %g1 <== NOT EXECUTED 40019fc8: 86 00 e0 01 inc %g3 <== NOT EXECUTED 40019fcc: c2 20 80 09 st %g1, [ %g2 + %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-- ) 40019fd0: 80 a0 c0 0a cmp %g3, %o2 <== NOT EXECUTED 40019fd4: 12 bf ff fc bne 40019fc4 <_Objects_Copy_name_raw+0x14> <== NOT EXECUTED 40019fd8: 84 00 a0 04 add %g2, 4, %g2 <== NOT EXECUTED 40019fdc: 81 c3 e0 08 retl <== NOT EXECUTED 40019fe0: 01 00 00 00 nop 400078e4 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 400078e4: 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; 400078e8: 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 ) 400078ec: e4 16 20 10 lduh [ %i0 + 0x10 ], %l2 400078f0: 03 00 00 3f sethi %hi(0xfc00), %g1 400078f4: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400078f8: a2 08 80 01 and %g2, %g1, %l1 400078fc: 80 a4 40 12 cmp %l1, %l2 40007900: 08 80 00 8c bleu 40007b30 <_Objects_Extend_information+0x24c> 40007904: e0 06 20 18 ld [ %i0 + 0x18 ], %l0 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 40007908: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 4000790c: a8 10 00 11 mov %l1, %l4 40007910: ac 10 20 00 clr %l6 40007914: a6 10 20 01 mov 1, %l3 40007918: 90 10 20 03 mov 3, %o0 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 4000791c: 80 a0 60 00 cmp %g1, 0 40007920: 12 80 00 a4 bne 40007bb0 <_Objects_Extend_information+0x2cc> 40007924: ba 04 00 12 add %l0, %l2, %i5 if ( !object_blocks ) return; } else { object_blocks = (void**) 40007928: 90 02 00 11 add %o0, %l1, %o0 4000792c: 90 02 00 1d add %o0, %i5, %o0 40007930: 40 00 0c 2b call 4000a9dc <_Workspace_Allocate_or_fatal_error> 40007934: 91 2a 20 02 sll %o0, 2, %o0 40007938: ae 10 00 08 mov %o0, %l7 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 4000793c: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 40007940: 83 2c e0 02 sll %l3, 2, %g1 /* * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; 40007944: 86 04 ff ff add %l3, -1, %g3 if ( information->maximum > minimum_index ) { 40007948: 80 a4 40 02 cmp %l1, %g2 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 4000794c: a6 05 c0 01 add %l7, %g1, %l3 object_blocks, block_count * sizeof(void*) ); name_table = (Objects_Name *) _Addresses_Add_offset( 40007950: aa 00 40 13 add %g1, %l3, %l5 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 40007954: 0a 80 00 ac bcs 40007c04 <_Objects_Extend_information+0x320> 40007958: a4 00 40 15 add %g1, %l5, %l2 else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 4000795c: 80 a4 60 00 cmp %l1, 0 40007960: 02 80 00 09 be 40007984 <_Objects_Extend_information+0xa0> 40007964: a1 28 e0 02 sll %g3, 2, %l0 information->inactive_per_block, block_count * sizeof(uint32_t ) ); memcpy( name_table, information->name_table, block_count * sizeof(Objects_Name *) ); memcpy( local_table, 40007968: 84 10 20 00 clr %g2 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 4000796c: 83 28 a0 02 sll %g2, 2, %g1 else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 40007970: 84 00 a0 01 inc %g2 40007974: 80 a0 80 11 cmp %g2, %l1 40007978: 12 bf ff fd bne 4000796c <_Objects_Extend_information+0x88> 4000797c: c0 20 40 12 clr [ %g1 + %l2 ] 40007980: a1 28 e0 02 sll %g3, 2, %l0 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 40007984: c0 24 00 17 clr [ %l0 + %l7 ] inactive_per_block[block_count] = 0; 40007988: c0 24 00 13 clr [ %l0 + %l3 ] name_table[block_count] = NULL; for ( index=index_base ; index < ( information->allocation_size + index_base ); 4000798c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 40007990: 86 05 00 01 add %l4, %g1, %g3 40007994: 80 a0 c0 14 cmp %g3, %l4 40007998: 08 80 00 0a bleu 400079c0 <_Objects_Extend_information+0xdc> 4000799c: c0 25 40 10 clr [ %l5 + %l0 ] 400079a0: 83 2d 20 02 sll %l4, 2, %g1 400079a4: 84 04 80 01 add %l2, %g1, %g2 400079a8: 82 10 00 14 mov %l4, %g1 index++ ) { local_table[ index ] = NULL; 400079ac: c0 20 80 00 clr [ %g2 ] inactive_per_block[block_count] = 0; name_table[block_count] = NULL; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 400079b0: 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 ); 400079b4: 80 a0 40 03 cmp %g1, %g3 400079b8: 12 bf ff fd bne 400079ac <_Objects_Extend_information+0xc8> 400079bc: 84 00 a0 04 add %g2, 4, %g2 index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 400079c0: 7f ff e9 0d call 40001df4 400079c4: 01 00 00 00 nop 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( 400079c8: c4 06 00 00 ld [ %i0 ], %g2 400079cc: c8 16 20 04 lduh [ %i0 + 4 ], %g4 400079d0: 87 2f 60 10 sll %i5, 0x10, %g3 400079d4: 89 29 20 1b sll %g4, 0x1b, %g4 400079d8: 87 30 e0 10 srl %g3, 0x10, %g3 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 400079dc: e0 06 20 3c ld [ %i0 + 0x3c ], %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( 400079e0: 03 00 00 40 sethi %hi(0x10000), %g1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 400079e4: e6 26 20 38 st %l3, [ %i0 + 0x38 ] information->name_table = name_table; 400079e8: ea 26 20 24 st %l5, [ %i0 + 0x24 ] information->local_table = local_table; 400079ec: e4 26 20 20 st %l2, [ %i0 + 0x20 ] information->maximum = maximum; information->maximum_id = _Objects_Build_id( 400079f0: 85 28 a0 18 sll %g2, 0x18, %g2 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; 400079f4: fa 36 20 10 sth %i5, [ %i0 + 0x10 ] information->maximum_id = _Objects_Build_id( 400079f8: 84 10 80 01 or %g2, %g1, %g2 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 400079fc: ee 26 20 3c st %l7, [ %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( 40007a00: 84 10 80 04 or %g2, %g4, %g2 40007a04: 84 10 80 03 or %g2, %g3, %g2 40007a08: c4 26 20 0c st %g2, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 40007a0c: 7f ff e8 fe call 40001e04 40007a10: 01 00 00 00 nop if ( old_tables ) 40007a14: 80 a4 20 00 cmp %l0, 0 40007a18: 02 80 00 05 be 40007a2c <_Objects_Extend_information+0x148> 40007a1c: 92 10 00 10 mov %l0, %o1 RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 40007a20: 11 10 00 6a sethi %hi(0x4001a800), %o0 40007a24: 7f ff fe 56 call 4000737c <_Heap_Free> 40007a28: 90 12 23 ac or %o0, 0x3ac, %o0 ! 4001abac <_Workspace_Area> /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 40007a2c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40007a30: 80 a0 60 00 cmp %g1, 0 40007a34: 02 80 00 6a be 40007bdc <_Objects_Extend_information+0x2f8> 40007a38: c2 16 20 44 lduh [ %i0 + 0x44 ], %g1 RTEMS_INLINE_ROUTINE void *_Workspace_Allocate( size_t size ) { return _Heap_Allocate( &_Workspace_Area, size ); 40007a3c: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 40007a40: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 information->object_blocks[ block ] = 40007a44: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 40007a48: 40 00 38 d8 call 40015da8 <.umul> 40007a4c: 90 00 40 08 add %g1, %o0, %o0 40007a50: 92 10 00 08 mov %o0, %o1 40007a54: 11 10 00 6a sethi %hi(0x4001a800), %o0 40007a58: 7f ff fe 17 call 400072b4 <_Heap_Allocate> 40007a5c: 90 12 23 ac or %o0, 0x3ac, %o0 ! 4001abac <_Workspace_Area> _Workspace_Allocate( (information->allocation_size * information->name_length) + (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 40007a60: e4 06 20 3c ld [ %i0 + 0x3c ], %l2 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 40007a64: a7 2d a0 02 sll %l6, 2, %l3 40007a68: d0 24 c0 10 st %o0, [ %l3 + %l0 ] _Workspace_Allocate( (information->allocation_size * information->name_length) + (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 40007a6c: c2 04 c0 12 ld [ %l3 + %l2 ], %g1 40007a70: 80 a0 60 00 cmp %g1, 0 40007a74: 02 80 00 7b be 40007c60 <_Objects_Extend_information+0x37c> 40007a78: 01 00 00 00 nop 40007a7c: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 40007a80: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 40007a84: 40 00 38 c9 call 40015da8 <.umul> 40007a88: a2 10 00 14 mov %l4, %l1 40007a8c: c2 04 80 13 ld [ %l2 + %l3 ], %g1 name_area = (Objects_Name *) _Addresses_Add_offset( information->object_blocks[ block ], (information->allocation_size * information->size) ); information->name_table[ block ] = name_area; 40007a90: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 40007a94: a0 02 00 01 add %o0, %g1, %l0 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40007a98: d4 06 20 18 ld [ %i0 + 0x18 ], %o2 name_area = (Objects_Name *) _Addresses_Add_offset( information->object_blocks[ block ], (information->allocation_size * information->size) ); information->name_table[ block ] = name_area; 40007a9c: e0 20 80 13 st %l0, [ %g2 + %l3 ] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40007aa0: d6 06 20 1c ld [ %i0 + 0x1c ], %o3 40007aa4: d2 04 80 13 ld [ %l2 + %l3 ], %o1 40007aa8: a8 07 bf ec add %fp, -20, %l4 index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 40007aac: 2b 00 00 40 sethi %hi(0x10000), %l5 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40007ab0: 90 10 00 14 mov %l4, %o0 40007ab4: 40 00 16 42 call 4000d3bc <_Chain_Initialize> 40007ab8: a4 06 20 28 add %i0, 0x28, %l2 40007abc: 30 80 00 0f b,a 40007af8 <_Objects_Extend_information+0x214> index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 40007ac0: c4 16 20 04 lduh [ %i0 + 4 ], %g2 40007ac4: c6 16 20 44 lduh [ %i0 + 0x44 ], %g3 40007ac8: 83 28 60 18 sll %g1, 0x18, %g1 40007acc: 85 28 a0 1b sll %g2, 0x1b, %g2 40007ad0: 82 10 40 15 or %g1, %l5, %g1 40007ad4: 82 10 40 02 or %g1, %g2, %g1 40007ad8: 82 10 40 11 or %g1, %l1, %g1 information->the_class, _Objects_Local_node, index ); the_object->name = (void *) name_area; 40007adc: e0 22 20 0c st %l0, [ %o0 + 0xc ] index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 40007ae0: c2 22 20 08 st %g1, [ %o0 + 8 ] the_object->name = (void *) name_area; name_area = _Addresses_Add_offset( name_area, information->name_length ); _Chain_Append( &information->Inactive, &the_object->Node ); 40007ae4: 92 10 00 08 mov %o0, %o1 40007ae8: a0 04 00 03 add %l0, %g3, %l0 index++; 40007aec: a2 04 60 01 inc %l1 the_object->name = (void *) name_area; name_area = _Addresses_Add_offset( name_area, information->name_length ); _Chain_Append( &information->Inactive, &the_object->Node ); 40007af0: 7f ff fc a0 call 40006d70 <_Chain_Append> 40007af4: 90 10 00 12 mov %l2, %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 ) { 40007af8: 7f ff fc aa call 40006da0 <_Chain_Get> 40007afc: 90 10 00 14 mov %l4, %o0 40007b00: 80 a2 20 00 cmp %o0, 0 40007b04: 32 bf ff ef bne,a 40007ac0 <_Objects_Extend_information+0x1dc> 40007b08: c2 06 00 00 ld [ %i0 ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 40007b0c: c6 06 20 38 ld [ %i0 + 0x38 ], %g3 40007b10: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 information->inactive += information->allocation_size; 40007b14: c8 16 20 34 lduh [ %i0 + 0x34 ], %g4 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 40007b18: c4 20 c0 13 st %g2, [ %g3 + %l3 ] information->inactive += information->allocation_size; 40007b1c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 40007b20: 82 00 40 04 add %g1, %g4, %g1 40007b24: c2 36 20 34 sth %g1, [ %i0 + 0x34 ] 40007b28: 81 c7 e0 08 ret 40007b2c: 81 e8 00 00 restore block = 0; if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; 40007b30: 90 10 00 12 mov %l2, %o0 40007b34: 40 00 38 d7 call 40015e90 <.udiv> 40007b38: 92 10 00 10 mov %l0, %o1 for ( ; block < block_count; block++ ) { 40007b3c: 80 a2 20 00 cmp %o0, 0 40007b40: 02 80 00 46 be 40007c58 <_Objects_Extend_information+0x374> 40007b44: a8 10 00 11 mov %l1, %l4 if ( information->object_blocks[ block ] == NULL ) 40007b48: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 40007b4c: c2 00 80 00 ld [ %g2 ], %g1 40007b50: 80 a0 60 00 cmp %g1, 0 40007b54: 12 80 00 08 bne 40007b74 <_Objects_Extend_information+0x290> 40007b58: ac 10 20 00 clr %l6 /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 40007b5c: 10 80 00 0c b 40007b8c <_Objects_Extend_information+0x2a8> <== NOT EXECUTED 40007b60: 80 a5 00 12 cmp %l4, %l2 <== NOT EXECUTED block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 40007b64: c2 00 40 02 ld [ %g1 + %g2 ], %g1 40007b68: 80 a0 60 00 cmp %g1, 0 40007b6c: 02 80 00 08 be 40007b8c <_Objects_Extend_information+0x2a8> 40007b70: 80 a5 00 12 cmp %l4, %l2 if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 40007b74: ac 05 a0 01 inc %l6 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 40007b78: a8 05 00 10 add %l4, %l0, %l4 if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 40007b7c: 80 a5 80 08 cmp %l6, %o0 40007b80: 12 bf ff f9 bne 40007b64 <_Objects_Extend_information+0x280> 40007b84: 83 2d a0 02 sll %l6, 2, %g1 /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 40007b88: 80 a5 00 12 cmp %l4, %l2 40007b8c: 2a bf ff a9 bcs,a 40007a30 <_Objects_Extend_information+0x14c> 40007b90: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40007b94: a6 02 20 01 add %o0, 1, %l3 40007b98: 83 2c e0 01 sll %l3, 1, %g1 40007b9c: 90 00 40 13 add %g1, %l3, %o0 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 40007ba0: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40007ba4: 80 a0 60 00 cmp %g1, 0 40007ba8: 02 bf ff 60 be 40007928 <_Objects_Extend_information+0x44> 40007bac: ba 04 00 12 add %l0, %l2, %i5 40007bb0: 92 02 00 11 add %o0, %l1, %o1 40007bb4: 11 10 00 6a sethi %hi(0x4001a800), %o0 40007bb8: 92 02 40 1d add %o1, %i5, %o1 40007bbc: 90 12 23 ac or %o0, 0x3ac, %o0 40007bc0: 7f ff fd bd call 400072b4 <_Heap_Allocate> 40007bc4: 93 2a 60 02 sll %o1, 2, %o1 block_count * (sizeof(void *) + sizeof(uint32_t ) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)) ); if ( !object_blocks ) 40007bc8: ae 92 20 00 orcc %o0, 0, %l7 40007bcc: 32 bf ff 5d bne,a 40007940 <_Objects_Extend_information+0x5c> 40007bd0: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 40007bd4: 81 c7 e0 08 ret <== NOT EXECUTED 40007bd8: 81 e8 00 00 restore <== NOT EXECUTED if ( !information->object_blocks[ block ] ) return; } else { information->object_blocks[ block ] = 40007bdc: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 40007be0: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 40007be4: 40 00 38 71 call 40015da8 <.umul> 40007be8: 90 00 40 08 add %g1, %o0, %o0 40007bec: 40 00 0b 7c call 4000a9dc <_Workspace_Allocate_or_fatal_error> 40007bf0: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 40007bf4: e4 06 20 3c ld [ %i0 + 0x3c ], %l2 40007bf8: a7 2d a0 02 sll %l6, 2, %l3 40007bfc: 10 bf ff a0 b 40007a7c <_Objects_Extend_information+0x198> 40007c00: d0 24 c0 10 st %o0, [ %l3 + %l0 ] /* * 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, 40007c04: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 40007c08: a1 28 e0 02 sll %g3, 2, %l0 40007c0c: 90 10 00 17 mov %l7, %o0 40007c10: 40 00 1e 4c call 4000f540 40007c14: 94 10 00 10 mov %l0, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 40007c18: d2 06 20 38 ld [ %i0 + 0x38 ], %o1 40007c1c: 94 10 00 10 mov %l0, %o2 40007c20: 40 00 1e 48 call 4000f540 40007c24: 90 10 00 13 mov %l3, %o0 information->inactive_per_block, block_count * sizeof(uint32_t ) ); memcpy( name_table, 40007c28: d2 06 20 24 ld [ %i0 + 0x24 ], %o1 40007c2c: 94 10 00 10 mov %l0, %o2 40007c30: 40 00 1e 44 call 4000f540 40007c34: 90 10 00 15 mov %l5, %o0 information->name_table, block_count * sizeof(Objects_Name *) ); memcpy( local_table, 40007c38: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 40007c3c: d2 06 20 20 ld [ %i0 + 0x20 ], %o1 40007c40: 94 02 80 11 add %o2, %l1, %o2 40007c44: 90 10 00 12 mov %l2, %o0 40007c48: 40 00 1e 3e call 4000f540 40007c4c: 95 2a a0 02 sll %o2, 2, %o2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 40007c50: 10 bf ff 4e b 40007988 <_Objects_Extend_information+0xa4> 40007c54: c0 24 00 17 clr [ %l0 + %l7 ] if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 40007c58: 10 bf ff cc b 40007b88 <_Objects_Extend_information+0x2a4> <== NOT EXECUTED 40007c5c: ac 10 20 00 clr %l6 <== NOT EXECUTED 40007c60: 81 c7 e0 08 ret <== NOT EXECUTED 40007c64: 81 e8 00 00 restore <== NOT EXECUTED 40009810 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 40009810: 9d e3 bf 88 save %sp, -120, %sp 40009814: 92 10 00 18 mov %i0, %o1 uint32_t i; char lname[5]; Objects_Control *the_object; Objects_Locations location; if ( length == 0 ) 40009818: 80 a6 60 00 cmp %i1, 0 4000981c: 12 80 00 04 bne 4000982c <_Objects_Get_name_as_string+0x1c> 40009820: b0 10 00 1a mov %i2, %i0 _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } 40009824: 81 c7 e0 08 ret <== NOT EXECUTED 40009828: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED Objects_Locations location; if ( length == 0 ) return NULL; if ( name == NULL ) 4000982c: 80 a6 a0 00 cmp %i2, 0 40009830: 02 80 00 40 be 40009930 <_Objects_Get_name_as_string+0x120> 40009834: 87 32 60 16 srl %o1, 0x16, %g3 if ( !_Objects_Is_class_valid( the_class ) ) return NULL; the_api = _Objects_Get_API( id ); return _Objects_Information_table[ the_api ][ the_class ]; 40009838: 03 10 00 9d sethi %hi(0x40027400), %g1 4000983c: 86 08 e0 1c and %g3, 0x1c, %g3 40009840: 82 10 63 f0 or %g1, 0x3f0, %g1 40009844: c8 00 40 03 ld [ %g1 + %g3 ], %g4 40009848: 85 32 60 1b srl %o1, 0x1b, %g2 4000984c: 85 28 a0 02 sll %g2, 2, %g2 40009850: f4 01 00 02 ld [ %g4 + %g2 ], %i2 return NULL; information = _Objects_Get_information( id ); if ( !information ) 40009854: 80 a6 a0 00 cmp %i2, 0 40009858: 22 80 00 36 be,a 40009930 <_Objects_Get_name_as_string+0x120> 4000985c: b0 10 20 00 clr %i0 <== NOT EXECUTED return NULL; the_object = _Objects_Get( information, id, &location ); 40009860: 90 10 00 1a mov %i2, %o0 40009864: 40 00 00 3f call 40009960 <_Objects_Get> 40009868: 94 07 bf f4 add %fp, -12, %o2 switch ( location ) { 4000986c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40009870: 80 a0 60 00 cmp %g1, 0 40009874: 32 80 00 2f bne,a 40009930 <_Objects_Get_name_as_string+0x120> 40009878: b0 10 20 00 clr %i0 <== NOT EXECUTED case OBJECTS_ERROR: return NULL; case OBJECTS_LOCAL: if ( information->is_string ) { 4000987c: c2 06 a0 40 ld [ %i2 + 0x40 ], %g1 40009880: 80 a0 60 00 cmp %g1, 0 40009884: 22 80 00 2d be,a 40009938 <_Objects_Get_name_as_string+0x128> 40009888: c2 02 20 0c ld [ %o0 + 0xc ], %g1 s = the_object->name; 4000988c: d0 02 20 0c ld [ %o0 + 0xc ], %o0 lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; s = lname; } for ( i=0, d=name ; i<(length-1) && *s ; i++, s++, d++ ) { 40009890: 80 a6 60 01 cmp %i1, 1 40009894: 02 80 00 1c be 40009904 <_Objects_Get_name_as_string+0xf4> 40009898: 9a 10 00 18 mov %i0, %o5 4000989c: c8 0a 00 00 ldub [ %o0 ], %g4 400098a0: 85 29 20 18 sll %g4, 0x18, %g2 400098a4: 80 a0 a0 00 cmp %g2, 0 400098a8: 22 80 00 18 be,a 40009908 <_Objects_Get_name_as_string+0xf8> 400098ac: c0 2b 40 00 clrb [ %o5 ] <== NOT EXECUTED 400098b0: b2 06 7f ff add %i1, -1, %i1 400098b4: 98 10 20 00 clr %o4 400098b8: 10 80 00 07 b 400098d4 <_Objects_Get_name_as_string+0xc4> 400098bc: 17 10 00 7c sethi %hi(0x4001f000), %o3 400098c0: c8 0a 00 00 ldub [ %o0 ], %g4 400098c4: 85 29 20 18 sll %g4, 0x18, %g2 400098c8: 80 a0 a0 00 cmp %g2, 0 400098cc: 22 80 00 0f be,a 40009908 <_Objects_Get_name_as_string+0xf8> 400098d0: c0 2b 40 00 clrb [ %o5 ] <== NOT EXECUTED *d = (!isprint(*s)) ? '*' : *s; 400098d4: c2 02 e2 10 ld [ %o3 + 0x210 ], %g1 400098d8: 85 38 a0 18 sra %g2, 0x18, %g2 400098dc: c6 48 80 01 ldsb [ %g2 + %g1 ], %g3 400098e0: 80 88 e0 97 btst 0x97, %g3 400098e4: 12 80 00 03 bne 400098f0 <_Objects_Get_name_as_string+0xe0> 400098e8: 90 02 20 01 inc %o0 400098ec: 88 10 20 2a mov 0x2a, %g4 <== NOT EXECUTED 400098f0: c8 2b 40 00 stb %g4, [ %o5 ] lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; s = lname; } for ( i=0, d=name ; i<(length-1) && *s ; i++, s++, d++ ) { 400098f4: 98 03 20 01 inc %o4 400098f8: 80 a3 00 19 cmp %o4, %i1 400098fc: 12 bf ff f1 bne 400098c0 <_Objects_Get_name_as_string+0xb0> 40009900: 9a 03 60 01 inc %o5 *d = (!isprint(*s)) ? '*' : *s; } *d = '\0'; 40009904: c0 2b 40 00 clrb [ %o5 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40009908: 03 10 00 9e sethi %hi(0x40027800), %g1 4000990c: c4 00 60 90 ld [ %g1 + 0x90 ], %g2 ! 40027890 <_Thread_Dispatch_disable_level> 40009910: 84 00 bf ff add %g2, -1, %g2 40009914: c4 20 60 90 st %g2, [ %g1 + 0x90 ] 40009918: c6 00 60 90 ld [ %g1 + 0x90 ], %g3 4000991c: 80 a0 e0 00 cmp %g3, 0 40009920: 12 80 00 04 bne 40009930 <_Objects_Get_name_as_string+0x120> 40009924: 01 00 00 00 nop _Thread_Dispatch(); 40009928: 40 00 04 fa call 4000ad10 <_Thread_Dispatch> 4000992c: 01 00 00 00 nop 40009930: 81 c7 e0 08 ret 40009934: 81 e8 00 00 restore lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 40009938: c0 2f bf f3 clrb [ %fp + -13 ] if ( information->is_string ) { s = the_object->name; } else { uint32_t u32_name = (uint32_t) the_object->name; lname[ 0 ] = (u32_name >> 24) & 0xff; 4000993c: 85 30 60 18 srl %g1, 0x18, %g2 lname[ 1 ] = (u32_name >> 16) & 0xff; 40009940: 87 30 60 10 srl %g1, 0x10, %g3 lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; 40009944: c2 2f bf f2 stb %g1, [ %fp + -14 ] if ( information->is_string ) { s = the_object->name; } else { uint32_t u32_name = (uint32_t) the_object->name; lname[ 0 ] = (u32_name >> 24) & 0xff; 40009948: c4 2f bf ef stb %g2, [ %fp + -17 ] lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 4000994c: 83 30 60 08 srl %g1, 8, %g1 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; 40009950: c6 2f bf f0 stb %g3, [ %fp + -16 ] lname[ 2 ] = (u32_name >> 8) & 0xff; 40009954: c2 2f bf f1 stb %g1, [ %fp + -15 ] lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 40009958: 10 bf ff ce b 40009890 <_Objects_Get_name_as_string+0x80> 4000995c: 90 07 bf ef add %fp, -17, %o0 40019fe4 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 40019fe4: 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) 40019fe8: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 40019fec: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <== NOT EXECUTED 40019ff0: 80 8e 40 01 btst %i1, %g1 <== NOT EXECUTED 40019ff4: 22 80 00 02 be,a 40019ffc <_Objects_Get_next+0x18> <== NOT EXECUTED 40019ff8: 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) 40019ffc: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 4001a000: a0 10 63 ff or %g1, 0x3ff, %l0 ! ffff <== NOT EXECUTED 4001a004: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED 4001a008: 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); 4001a00c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4001a010: 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) 4001a014: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 4001a018: 18 80 00 0b bgu 4001a044 <_Objects_Get_next+0x60> <== NOT EXECUTED 4001a01c: 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); 4001a020: 7f ff d3 ea call 4000efc8 <_Objects_Get> <== NOT EXECUTED 4001a024: b2 06 60 01 inc %i1 <== NOT EXECUTED next_id++; } while (*location_p != OBJECTS_LOCAL); 4001a028: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 4001a02c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001a030: 32 bf ff f6 bne,a 4001a008 <_Objects_Get_next+0x24> <== NOT EXECUTED 4001a034: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED *next_id_p = next_id; 4001a038: f2 26 c0 00 st %i1, [ %i3 ] <== NOT EXECUTED return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 4001a03c: 81 c7 e0 08 ret <== NOT EXECUTED 4001a040: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 4001a044: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 4001a048: 84 10 3f ff mov -1, %g2 <== NOT EXECUTED 4001a04c: 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; 4001a050: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 4001a054: c4 26 c0 00 st %g2, [ %i3 ] <== NOT EXECUTED return 0; } 4001a058: 81 c7 e0 08 ret <== NOT EXECUTED 4001a05c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4001556c <_Objects_Get_no_protection>: ) { Objects_Control *the_object; uint32_t index; index = id - information->minimum_id + 1; 4001556c: c2 02 20 08 ld [ %o0 + 8 ], %g1 if ( information->maximum >= index ) { 40015570: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 ) { Objects_Control *the_object; uint32_t index; index = id - information->minimum_id + 1; 40015574: 92 22 40 01 sub %o1, %g1, %o1 40015578: 82 02 60 01 add %o1, 1, %g1 if ( information->maximum >= index ) { 4001557c: 80 a0 40 02 cmp %g1, %g2 40015580: 18 80 00 09 bgu 400155a4 <_Objects_Get_no_protection+0x38> 40015584: 83 28 60 02 sll %g1, 2, %g1 if ( (the_object = information->local_table[ index ]) != NULL ) { 40015588: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 4001558c: d0 00 80 01 ld [ %g2 + %g1 ], %o0 40015590: 80 a2 20 00 cmp %o0, 0 40015594: 02 80 00 08 be 400155b4 <_Objects_Get_no_protection+0x48> 40015598: 82 10 20 02 mov 2, %g1 *location = OBJECTS_LOCAL; 4001559c: 81 c3 e0 08 retl 400155a0: c0 22 80 00 clr [ %o2 ] return the_object; } *location = OBJECTS_ERROR; return NULL; } *location = OBJECTS_ERROR; 400155a4: 82 10 20 02 mov 2, %g1 400155a8: 90 10 20 00 clr %o0 /* * Not supported for multiprocessing */ return NULL; } 400155ac: 81 c3 e0 08 retl 400155b0: c2 22 80 00 st %g1, [ %o2 ] if ( information->maximum >= index ) { if ( (the_object = information->local_table[ index ]) != NULL ) { *location = OBJECTS_LOCAL; return the_object; } *location = OBJECTS_ERROR; 400155b4: 81 c3 e0 08 retl <== NOT EXECUTED 400155b8: c2 22 80 00 st %g1, [ %o2 ] <== NOT EXECUTED 40007fd8 <_Objects_Handler_initialization>: uint32_t node, uint32_t maximum_nodes, uint32_t maximum_global_objects ) { if ( node < 1 || node > maximum_nodes ) 40007fd8: 80 a2 20 00 cmp %o0, 0 40007fdc: 22 80 00 07 be,a 40007ff8 <_Objects_Handler_initialization+0x20> 40007fe0: 90 10 20 00 clr %o0 <== NOT EXECUTED 40007fe4: 80 a2 00 09 cmp %o0, %o1 40007fe8: 18 80 00 04 bgu 40007ff8 <_Objects_Handler_initialization+0x20> 40007fec: 90 10 20 00 clr %o0 40007ff0: 81 c3 e0 08 retl 40007ff4: 01 00 00 00 nop _Internal_error_Occurred( 40007ff8: 92 10 20 01 mov 1, %o1 ! 1 <== NOT EXECUTED 40007ffc: 94 10 20 08 mov 8, %o2 <== NOT EXECUTED 40008000: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40008004: 7f ff fd de call 4000777c <_Internal_error_Occurred> <== NOT EXECUTED 40008008: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000800c: 01 00 00 00 nop 4000930c <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 4000930c: 9d e3 bf 90 save %sp, -112, %sp 40009310: 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 ) 40009314: 80 a6 60 00 cmp %i1, 0 40009318: 02 80 00 24 be 400093a8 <_Objects_Id_to_name+0x9c> 4000931c: 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); 40009320: 83 32 60 18 srl %o1, 0x18, %g1 40009324: 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 ) 40009328: 80 a0 60 04 cmp %g1, 4 4000932c: 18 80 00 25 bgu 400093c0 <_Objects_Id_to_name+0xb4> 40009330: 87 28 60 02 sll %g1, 2, %g3 return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( id ); information = _Objects_Information_table[ the_api ][ the_class ]; 40009334: 03 10 00 7d sethi %hi(0x4001f400), %g1 40009338: 82 10 61 50 or %g1, 0x150, %g1 ! 4001f550 <_Objects_Information_table> 4000933c: c8 00 40 03 ld [ %g1 + %g3 ], %g4 40009340: 85 32 60 1b srl %o1, 0x1b, %g2 40009344: 85 28 a0 02 sll %g2, 2, %g2 40009348: d0 01 00 02 ld [ %g4 + %g2 ], %o0 if ( !information ) 4000934c: 80 a2 20 00 cmp %o0, 0 40009350: 02 80 00 1c be 400093c0 <_Objects_Id_to_name+0xb4> 40009354: 01 00 00 00 nop return OBJECTS_INVALID_ID; if ( information->is_string ) 40009358: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 4000935c: 80 a0 60 00 cmp %g1, 0 40009360: 12 80 00 18 bne 400093c0 <_Objects_Id_to_name+0xb4> 40009364: 01 00 00 00 nop return OBJECTS_INVALID_ID; the_object = _Objects_Get( information, id, &ignored_location ); 40009368: 7f ff ff c2 call 40009270 <_Objects_Get> 4000936c: 94 07 bf f4 add %fp, -12, %o2 if ( !the_object ) 40009370: 80 a2 20 00 cmp %o0, 0 40009374: 02 80 00 13 be 400093c0 <_Objects_Id_to_name+0xb4> 40009378: 01 00 00 00 nop return OBJECTS_INVALID_ID; *name = the_object->name; 4000937c: c2 02 20 0c ld [ %o0 + 0xc ], %g1 40009380: 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 ) 40009384: 07 10 00 7d sethi %hi(0x4001f400), %g3 40009388: c2 00 e1 f0 ld [ %g3 + 0x1f0 ], %g1 ! 4001f5f0 <_Thread_Dispatch_disable_level> 4000938c: b0 10 20 00 clr %i0 40009390: 82 00 7f ff add %g1, -1, %g1 40009394: c2 20 e1 f0 st %g1, [ %g3 + 0x1f0 ] 40009398: c4 00 e1 f0 ld [ %g3 + 0x1f0 ], %g2 4000939c: 80 a0 a0 00 cmp %g2, 0 400093a0: 02 80 00 04 be 400093b0 <_Objects_Id_to_name+0xa4> 400093a4: 01 00 00 00 nop _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 400093a8: 81 c7 e0 08 ret <== NOT EXECUTED 400093ac: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 400093b0: 40 00 05 07 call 4000a7cc <_Thread_Dispatch> 400093b4: 01 00 00 00 nop 400093b8: 81 c7 e0 08 ret 400093bc: 81 e8 00 00 restore 400093c0: 81 c7 e0 08 ret <== NOT EXECUTED 400093c4: 91 e8 20 03 restore %g0, 3, %o0 <== NOT EXECUTED 40007ee8 <_Objects_Name_to_id>: Objects_Information *information, Objects_Name name, uint32_t node, Objects_Id *id ) { 40007ee8: 9d e3 bf 98 save %sp, -104, %sp 40007eec: 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 ) 40007ef0: 80 a6 e0 00 cmp %i3, 0 40007ef4: 02 80 00 2d be 40007fa8 <_Objects_Name_to_id+0xc0> 40007ef8: b0 10 20 02 mov 2, %i0 return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 40007efc: 80 a6 60 00 cmp %i1, 0 40007f00: 02 80 00 28 be 40007fa0 <_Objects_Name_to_id+0xb8> 40007f04: 01 00 00 00 nop return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 40007f08: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 40007f0c: 86 90 60 00 orcc %g1, 0, %g3 40007f10: 02 80 00 24 be 40007fa0 <_Objects_Name_to_id+0xb8> 40007f14: 80 a6 a0 00 cmp %i2, 0 40007f18: 12 80 00 26 bne 40007fb0 <_Objects_Name_to_id+0xc8> 40007f1c: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 search_local_node = TRUE; if ( search_local_node ) { name_length = information->name_length; if ( information->is_string ) compare_them = _Objects_Compare_name_string; 40007f20: c2 04 60 40 ld [ %l1 + 0x40 ], %g1 40007f24: 05 10 00 36 sethi %hi(0x4000d800), %g2 40007f28: 80 a0 60 00 cmp %g1, 0 40007f2c: a4 10 a0 10 or %g2, 0x10, %l2 40007f30: 02 80 00 04 be 40007f40 <_Objects_Name_to_id+0x58> 40007f34: c8 14 60 44 lduh [ %l1 + 0x44 ], %g4 if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 40007f38: 03 10 00 36 sethi %hi(0x4000d800), %g1 40007f3c: a4 10 60 20 or %g1, 0x20, %l2 ! 4000d820 <_Objects_Compare_name_string> 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 ) ) { 40007f40: 83 29 20 10 sll %g4, 0x10, %g1 if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 40007f44: 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 ) ) { 40007f48: 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 ]; 40007f4c: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 40007f50: 83 2c 20 02 sll %l0, 2, %g1 40007f54: f4 00 80 01 ld [ %g2 + %g1 ], %i2 if ( !the_object || !the_object->name ) 40007f58: 80 a6 a0 00 cmp %i2, 0 40007f5c: 02 80 00 0c be 40007f8c <_Objects_Name_to_id+0xa4> 40007f60: a0 04 20 01 inc %l0 40007f64: d2 06 a0 0c ld [ %i2 + 0xc ], %o1 40007f68: 80 a2 60 00 cmp %o1, 0 40007f6c: 02 80 00 08 be 40007f8c <_Objects_Name_to_id+0xa4> 40007f70: 90 10 00 19 mov %i1, %o0 continue; if ( (*compare_them)( name, the_object->name, name_length ) ) { 40007f74: 9f c4 80 00 call %l2 40007f78: 94 10 00 18 mov %i0, %o2 40007f7c: 80 a2 20 00 cmp %o0, 0 40007f80: 32 80 00 13 bne,a 40007fcc <_Objects_Name_to_id+0xe4> 40007f84: c2 06 a0 08 ld [ %i2 + 8 ], %g1 40007f88: c6 14 60 10 lduh [ %l1 + 0x10 ], %g3 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++ ) { 40007f8c: 83 28 e0 10 sll %g3, 0x10, %g1 40007f90: 83 30 60 10 srl %g1, 0x10, %g1 40007f94: 80 a0 40 10 cmp %g1, %l0 40007f98: 3a bf ff ee bcc,a 40007f50 <_Objects_Name_to_id+0x68> 40007f9c: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 40007fa0: 81 c7 e0 08 ret 40007fa4: 91 e8 20 01 restore %g0, 1, %o0 return ( _Objects_MP_Global_name_search( information, name, node, id ) ); #else return OBJECTS_INVALID_NAME; #endif } 40007fa8: 81 c7 e0 08 ret <== NOT EXECUTED 40007fac: 81 e8 00 00 restore <== NOT EXECUTED if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 40007fb0: 82 10 63 ff or %g1, 0x3ff, %g1 40007fb4: 80 a6 80 01 cmp %i2, %g1 40007fb8: 02 bf ff da be 40007f20 <_Objects_Name_to_id+0x38> 40007fbc: 80 a6 a0 01 cmp %i2, 1 40007fc0: 22 bf ff d9 be,a 40007f24 <_Objects_Name_to_id+0x3c> 40007fc4: c2 04 60 40 ld [ %l1 + 0x40 ], %g1 40007fc8: 30 bf ff f6 b,a 40007fa0 <_Objects_Name_to_id+0xb8> the_object = information->local_table[ index ]; if ( !the_object || !the_object->name ) continue; if ( (*compare_them)( name, the_object->name, name_length ) ) { *id = the_object->id; 40007fcc: c2 26 c0 00 st %g1, [ %i3 ] 40007fd0: 81 c7 e0 08 ret 40007fd4: 91 e8 20 00 restore %g0, 0, %o0 40008010 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 40008010: 9d e3 bf 98 save %sp, -104, %sp 40008014: 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; 40008018: e0 06 20 18 ld [ %i0 + 0x18 ], %l0 4000801c: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 40008020: 03 00 00 3f sethi %hi(0xfc00), %g1 40008024: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40008028: 92 10 00 10 mov %l0, %o1 4000802c: a2 08 80 01 and %g2, %g1, %l1 40008030: 40 00 37 98 call 40015e90 <.udiv> 40008034: 90 22 00 11 sub %o0, %l1, %o0 for ( block = 0; block < block_count; block++ ) { 40008038: 80 a2 20 00 cmp %o0, 0 4000803c: 02 80 00 15 be 40008090 <_Objects_Shrink_information+0x80> 40008040: 86 10 20 00 clr %g3 if ( information->inactive_per_block[ block ] == information->allocation_size ) { 40008044: c8 06 20 38 ld [ %i0 + 0x38 ], %g4 40008048: c2 01 00 00 ld [ %g4 ], %g1 4000804c: 84 10 20 04 mov 4, %g2 40008050: 80 a4 00 01 cmp %l0, %g1 40008054: a8 10 20 00 clr %l4 40008058: 12 80 00 0a bne 40008080 <_Objects_Shrink_information+0x70> 4000805c: a4 10 20 00 clr %l2 /* * 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; 40008060: 10 80 00 10 b 400080a0 <_Objects_Shrink_information+0x90> <== NOT EXECUTED 40008064: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 <== NOT EXECUTED information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 40008068: 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++ ) { if ( information->inactive_per_block[ block ] == information->allocation_size ) { 4000806c: 80 a4 00 01 cmp %l0, %g1 information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 40008070: a4 10 00 02 mov %g2, %l2 index_base = _Objects_Get_index( information->minimum_id ); block_count = ( information->maximum - index_base ) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == information->allocation_size ) { 40008074: 02 80 00 09 be 40008098 <_Objects_Shrink_information+0x88> 40008078: 82 00 a0 04 add %g2, 4, %g1 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 4000807c: 84 10 00 01 mov %g1, %g2 */ index_base = _Objects_Get_index( information->minimum_id ); block_count = ( information->maximum - index_base ) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 40008080: 86 00 e0 01 inc %g3 40008084: 80 a0 c0 08 cmp %g3, %o0 40008088: 32 bf ff f8 bne,a 40008068 <_Objects_Shrink_information+0x58> 4000808c: c2 00 80 04 ld [ %g2 + %g4 ], %g1 40008090: 81 c7 e0 08 ret 40008094: 81 e8 00 00 restore if ( information->inactive_per_block[ block ] == information->allocation_size ) { 40008098: a8 10 00 02 mov %g2, %l4 /* * 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; 4000809c: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 400080a0: 03 00 00 3f sethi %hi(0xfc00), %g1 400080a4: e0 02 00 00 ld [ %o0 ], %l0 400080a8: 10 80 00 10 b 400080e8 <_Objects_Shrink_information+0xd8> 400080ac: a6 10 63 ff or %g1, 0x3ff, %l3 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 400080b0: 82 04 40 01 add %l1, %g1, %g1 400080b4: 80 a0 80 01 cmp %g2, %g1 400080b8: 3a 80 00 12 bcc,a 40008100 <_Objects_Shrink_information+0xf0> 400080bc: 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 ); 400080c0: 40 00 14 b5 call 4000d394 <_Chain_Extract> 400080c4: 01 00 00 00 nop 400080c8: 90 10 00 10 mov %l0, %o0 } else { the_object = (Objects_Control *) the_object->Node.next; } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 400080cc: 80 a2 20 00 cmp %o0, 0 400080d0: 22 80 00 10 be,a 40008110 <_Objects_Shrink_information+0x100> 400080d4: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE boolean _Chain_Is_last( const Chain_Node *the_node ) { return (the_node->next == NULL); 400080d8: e0 02 00 00 ld [ %o0 ], %l0 400080dc: 80 a4 20 00 cmp %l0, 0 400080e0: 22 80 00 0c be,a 40008110 <_Objects_Shrink_information+0x100> 400080e4: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 400080e8: c2 02 20 08 ld [ %o0 + 8 ], %g1 400080ec: 84 08 40 13 and %g1, %l3, %g2 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 400080f0: 80 a4 40 02 cmp %l1, %g2 400080f4: 28 bf ff ef bleu,a 400080b0 <_Objects_Shrink_information+0xa0> 400080f8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 the_object = NULL; _Chain_Extract( &extract_me->Node ); } else { the_object = (Objects_Control *) the_object->Node.next; 400080fc: 90 10 00 10 mov %l0, %o0 } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 40008100: 80 a2 20 00 cmp %o0, 0 40008104: 32 bf ff f6 bne,a 400080dc <_Objects_Shrink_information+0xcc> 40008108: e0 02 00 00 ld [ %o0 ], %l0 RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 4000810c: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 40008110: 11 10 00 6a sethi %hi(0x4001a800), %o0 40008114: d2 00 40 14 ld [ %g1 + %l4 ], %o1 40008118: 7f ff fc 99 call 4000737c <_Heap_Free> 4000811c: 90 12 23 ac or %o0, 0x3ac, %o0 */ _Workspace_Free( information->object_blocks[ block ] ); information->name_table[ block ] = NULL; information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 40008120: c4 06 20 38 ld [ %i0 + 0x38 ], %g2 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->name_table[ block ] = NULL; 40008124: c8 06 20 24 ld [ %i0 + 0x24 ], %g4 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 40008128: c0 24 80 02 clr [ %l2 + %g2 ] information->inactive -= information->allocation_size; 4000812c: c2 16 20 34 lduh [ %i0 + 0x34 ], %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; 40008130: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 40008134: c6 06 20 18 ld [ %i0 + 0x18 ], %g3 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->name_table[ block ] = NULL; 40008138: c0 25 00 04 clr [ %l4 + %g4 ] information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 4000813c: 82 20 40 03 sub %g1, %g3, %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; 40008140: c0 25 00 02 clr [ %l4 + %g2 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 40008144: c2 36 20 34 sth %g1, [ %i0 + 0x34 ] 40008148: 81 c7 e0 08 ret 4000814c: 81 e8 00 00 restore 40006b3c <_POSIX_API_Initialize>: void _POSIX_API_Initialize( rtems_configuration_table *configuration_table ) { 40006b3c: 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; 40006b40: f0 06 20 30 ld [ %i0 + 0x30 ], %i0 if ( !api_configuration ) 40006b44: 80 a6 20 00 cmp %i0, 0 40006b48: 02 80 00 1f be 40006bc4 <_POSIX_API_Initialize+0x88> 40006b4c: 03 10 00 6a sethi %hi(0x4001a800), %g1 api_configuration = &_POSIX_Default_configuration; _Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects; _POSIX_signals_Manager_Initialization( 40006b50: d0 06 20 14 ld [ %i0 + 0x14 ], %o0 api_configuration = configuration_table->POSIX_api_configuration; if ( !api_configuration ) api_configuration = &_POSIX_Default_configuration; _Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects; 40006b54: 05 10 00 6a sethi %hi(0x4001a800), %g2 40006b58: 03 10 00 6c sethi %hi(0x4001b000), %g1 40006b5c: 82 10 60 f8 or %g1, 0xf8, %g1 ! 4001b0f8 <_POSIX_Objects> _POSIX_signals_Manager_Initialization( 40006b60: 40 00 17 69 call 4000c904 <_POSIX_signals_Manager_Initialization> 40006b64: c2 20 a2 cc st %g1, [ %g2 + 0x2cc ] api_configuration->maximum_queued_signals ); _POSIX_Threads_Manager_initialization( 40006b68: d2 06 20 2c ld [ %i0 + 0x2c ], %o1 40006b6c: d4 06 20 30 ld [ %i0 + 0x30 ], %o2 40006b70: 40 00 17 da call 4000cad8 <_POSIX_Threads_Manager_initialization> 40006b74: 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( 40006b78: 40 00 17 11 call 4000c7bc <_POSIX_Condition_variables_Manager_initialization> 40006b7c: d0 06 20 08 ld [ %i0 + 8 ], %o0 api_configuration->maximum_condition_variables ); _POSIX_Key_Manager_initialization( api_configuration->maximum_keys ); 40006b80: 40 00 17 1b call 4000c7ec <_POSIX_Key_Manager_initialization> 40006b84: d0 06 20 0c ld [ %i0 + 0xc ], %o0 _POSIX_Mutex_Manager_initialization( 40006b88: 40 00 17 3b call 4000c874 <_POSIX_Mutex_Manager_initialization> 40006b8c: d0 06 20 04 ld [ %i0 + 4 ], %o0 api_configuration->maximum_mutexes ); _POSIX_Message_queue_Manager_initialization( 40006b90: 40 00 17 23 call 4000c81c <_POSIX_Message_queue_Manager_initialization> 40006b94: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 api_configuration->maximum_message_queues ); _POSIX_Semaphore_Manager_initialization( 40006b98: 40 00 18 a5 call 4000ce2c <_POSIX_Semaphore_Manager_initialization> 40006b9c: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 api_configuration->maximum_semaphores ); _POSIX_Timer_Manager_initialization( api_configuration->maximum_timers ); 40006ba0: 40 00 18 96 call 4000cdf8 <_POSIX_Timer_Manager_initialization> 40006ba4: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 _POSIX_Barrier_Manager_initialization( api_configuration->maximum_barriers ); 40006ba8: 40 00 17 3f call 4000c8a4 <_POSIX_Barrier_Manager_initialization> 40006bac: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 _POSIX_RWLock_Manager_initialization( api_configuration->maximum_rwlocks ); 40006bb0: 40 00 17 49 call 4000c8d4 <_POSIX_RWLock_Manager_initialization> 40006bb4: d0 06 20 24 ld [ %i0 + 0x24 ], %o0 _POSIX_Spinlock_Manager_initialization(api_configuration->maximum_spinlocks); 40006bb8: f0 06 20 28 ld [ %i0 + 0x28 ], %i0 40006bbc: 40 00 17 b1 call 4000ca80 <_POSIX_Spinlock_Manager_initialization> 40006bc0: 81 e8 00 00 restore /* XXX need to assert here based on size assumptions */ assert( sizeof(pthread_t) == sizeof(Objects_Id) ); api_configuration = configuration_table->POSIX_api_configuration; if ( !api_configuration ) 40006bc4: 10 bf ff e3 b 40006b50 <_POSIX_API_Initialize+0x14> <== NOT EXECUTED 40006bc8: b0 10 61 04 or %g1, 0x104, %i0 <== NOT EXECUTED 4000df5c <_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 ) 4000df5c: 80 a2 20 03 cmp %o0, 3 4000df60: 18 80 00 06 bgu 4000df78 <_POSIX_Barrier_Translate_core_barrier_return_code+0x1c> 4000df64: 85 2a 20 02 sll %o0, 2, %g2 return _POSIX_Barrier_Return_codes[the_barrier_status]; return POSIX_BOTTOM_REACHED(); } 4000df68: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000df6c: 82 10 60 98 or %g1, 0x98, %g1 ! 4001a898 <_POSIX_Barrier_Return_codes> 4000df70: 81 c3 e0 08 retl 4000df74: d0 00 40 02 ld [ %g1 + %g2 ], %o0 CORE_barrier_Status the_barrier_status ) { if ( the_barrier_status <= CORE_BARRIER_TIMEOUT ) return _POSIX_Barrier_Return_codes[the_barrier_status]; return POSIX_BOTTOM_REACHED(); 4000df78: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000df7c: 7f ff e1 9e call 400065f4 <== NOT EXECUTED 4000df80: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000df84: 01 00 00 00 nop 40006870 <_POSIX_Condition_variables_Signal_support>: int _POSIX_Condition_variables_Signal_support( pthread_cond_t *cond, boolean is_broadcast ) { 40006870: 9d e3 bf 90 save %sp, -112, %sp ) { Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 40006874: 80 a6 20 00 cmp %i0, 0 40006878: 32 80 00 05 bne,a 4000688c <_POSIX_Condition_variables_Signal_support+0x1c> 4000687c: d2 06 00 00 ld [ %i0 ], %o1 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40006880: 90 10 20 16 mov 0x16, %o0 } 40006884: 81 c7 e0 08 ret 40006888: 91 e8 00 08 restore %g0, %o0, %o0 *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *id == PTHREAD_COND_INITIALIZER ) { 4000688c: 80 a2 7f ff cmp %o1, -1 40006890: 22 80 00 27 be,a 4000692c <_POSIX_Condition_variables_Signal_support+0xbc> 40006894: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 40006898: 11 10 00 65 sethi %hi(0x40019400), %o0 4000689c: 94 07 bf f4 add %fp, -12, %o2 400068a0: 40 00 0f 68 call 4000a640 <_Objects_Get> 400068a4: 90 12 23 2c or %o0, 0x32c, %o0 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; Thread_Control *the_thread; the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { 400068a8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400068ac: a0 10 00 08 mov %o0, %l0 400068b0: 80 a0 60 00 cmp %g1, 0 400068b4: 02 80 00 08 be 400068d4 <_POSIX_Condition_variables_Signal_support+0x64> 400068b8: b0 02 20 18 add %o0, 0x18, %i0 400068bc: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 400068c0: 28 bf ff f1 bleu,a 40006884 <_POSIX_Condition_variables_Signal_support+0x14> <== NOT EXECUTED 400068c4: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 400068c8: 40 00 04 b6 call 40007ba0 <== NOT EXECUTED 400068cc: 01 00 00 00 nop <== NOT EXECUTED 400068d0: 30 bf ff ed b,a 40006884 <_POSIX_Condition_variables_Signal_support+0x14> <== NOT EXECUTED case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: do { the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue ); 400068d4: 40 00 15 49 call 4000bdf8 <_Thread_queue_Dequeue> 400068d8: 90 10 00 18 mov %i0, %o0 if ( !the_thread ) 400068dc: 80 a2 20 00 cmp %o0, 0 400068e0: 02 80 00 11 be 40006924 <_POSIX_Condition_variables_Signal_support+0xb4> 400068e4: 80 a6 60 00 cmp %i1, 0 the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; } while ( is_broadcast && the_thread ); 400068e8: 12 bf ff fb bne 400068d4 <_POSIX_Condition_variables_Signal_support+0x64> 400068ec: 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 ) 400068f0: 03 10 00 64 sethi %hi(0x40019000), %g1 400068f4: c4 00 61 e0 ld [ %g1 + 0x1e0 ], %g2 ! 400191e0 <_Thread_Dispatch_disable_level> 400068f8: 90 10 20 00 clr %o0 400068fc: 84 00 bf ff add %g2, -1, %g2 40006900: c4 20 61 e0 st %g2, [ %g1 + 0x1e0 ] 40006904: c6 00 61 e0 ld [ %g1 + 0x1e0 ], %g3 40006908: 80 a0 e0 00 cmp %g3, 0 4000690c: 12 bf ff de bne 40006884 <_POSIX_Condition_variables_Signal_support+0x14> 40006910: 01 00 00 00 nop _Thread_Dispatch(); 40006914: 40 00 14 37 call 4000b9f0 <_Thread_Dispatch> 40006918: 01 00 00 00 nop 4000691c: 10 bf ff da b 40006884 <_POSIX_Condition_variables_Signal_support+0x14> 40006920: 90 10 20 00 clr %o0 ! 0 case OBJECTS_LOCAL: do { the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue ); if ( !the_thread ) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 40006924: 10 bf ff f3 b 400068f0 <_POSIX_Condition_variables_Signal_support+0x80> 40006928: c0 24 20 14 clr [ %l0 + 0x14 ] if ( *id == PTHREAD_COND_INITIALIZER ) { /* * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); 4000692c: 7f ff ff 83 call 40006738 <== NOT EXECUTED 40006930: 92 10 20 00 clr %o1 <== NOT EXECUTED if ( status ) { 40006934: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40006938: 32 bf ff d3 bne,a 40006884 <_POSIX_Condition_variables_Signal_support+0x14> <== NOT EXECUTED 4000693c: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 40006940: 10 bf ff d6 b 40006898 <_POSIX_Condition_variables_Signal_support+0x28> <== NOT EXECUTED 40006944: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED 400069c0 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, boolean already_timedout ) { 400069c0: 9d e3 bf 90 save %sp, -112, %sp Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 400069c4: 80 a6 60 00 cmp %i1, 0 400069c8: 32 80 00 04 bne,a 400069d8 <_POSIX_Condition_variables_Wait_support+0x18> 400069cc: d2 06 40 00 ld [ %i1 ], %o1 return EINVAL; return status; } return POSIX_BOTTOM_REACHED(); } 400069d0: 81 c7 e0 08 ret 400069d4: 91 e8 20 16 restore %g0, 0x16, %o0 400069d8: 80 a2 7f ff cmp %o1, -1 400069dc: 22 80 00 37 be,a 40006ab8 <_POSIX_Condition_variables_Wait_support+0xf8> 400069e0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED return (POSIX_Mutex_Control *) 400069e4: a2 07 bf f4 add %fp, -12, %l1 400069e8: 11 10 00 65 sethi %hi(0x40019400), %o0 400069ec: 94 10 00 11 mov %l1, %o2 400069f0: 40 00 0f 14 call 4000a640 <_Objects_Get> 400069f4: 90 12 22 44 or %o0, 0x244, %o0 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 400069f8: 80 a2 20 00 cmp %o0, 0 400069fc: 02 bf ff f5 be 400069d0 <_POSIX_Condition_variables_Wait_support+0x10> 40006a00: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 40006a04: 21 10 00 64 sethi %hi(0x40019000), %l0 40006a08: c2 04 21 e0 ld [ %l0 + 0x1e0 ], %g1 ! 400191e0 <_Thread_Dispatch_disable_level> ) { Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 40006a0c: 80 a6 20 00 cmp %i0, 0 40006a10: 82 00 7f ff add %g1, -1, %g1 40006a14: c2 24 21 e0 st %g1, [ %l0 + 0x1e0 ] 40006a18: 02 bf ff ee be 400069d0 <_POSIX_Condition_variables_Wait_support+0x10> 40006a1c: 01 00 00 00 nop *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *id == PTHREAD_COND_INITIALIZER ) { 40006a20: d2 06 00 00 ld [ %i0 ], %o1 40006a24: 80 a2 7f ff cmp %o1, -1 40006a28: 22 80 00 42 be,a 40006b30 <_POSIX_Condition_variables_Wait_support+0x170> 40006a2c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 40006a30: 94 10 00 11 mov %l1, %o2 40006a34: 11 10 00 65 sethi %hi(0x40019400), %o0 40006a38: 40 00 0f 02 call 4000a640 <_Objects_Get> 40006a3c: 90 12 23 2c or %o0, 0x32c, %o0 ! 4001972c <_POSIX_Condition_variables_Information> } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { 40006a40: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006a44: 80 a0 60 00 cmp %g1, 0 40006a48: 12 80 00 15 bne 40006a9c <_POSIX_Condition_variables_Wait_support+0xdc> 40006a4c: a2 10 00 08 mov %o0, %l1 #endif case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 40006a50: c4 02 20 14 ld [ %o0 + 0x14 ], %g2 40006a54: 80 a0 a0 00 cmp %g2, 0 40006a58: 02 80 00 1f be 40006ad4 <_POSIX_Condition_variables_Wait_support+0x114> 40006a5c: 01 00 00 00 nop 40006a60: c2 06 40 00 ld [ %i1 ], %g1 40006a64: 80 a0 80 01 cmp %g2, %g1 40006a68: 02 80 00 1b be 40006ad4 <_POSIX_Condition_variables_Wait_support+0x114> 40006a6c: 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 ) 40006a70: c2 04 21 e0 ld [ %l0 + 0x1e0 ], %g1 <== NOT EXECUTED 40006a74: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40006a78: c2 24 21 e0 st %g1, [ %l0 + 0x1e0 ] <== NOT EXECUTED 40006a7c: c4 04 21 e0 ld [ %l0 + 0x1e0 ], %g2 <== NOT EXECUTED 40006a80: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40006a84: 12 bf ff d3 bne 400069d0 <_POSIX_Condition_variables_Wait_support+0x10> <== NOT EXECUTED 40006a88: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 40006a8c: 40 00 13 d9 call 4000b9f0 <_Thread_Dispatch> <== NOT EXECUTED 40006a90: b0 10 20 16 mov 0x16, %i0 ! 16 <== NOT EXECUTED 40006a94: 81 c7 e0 08 ret <== NOT EXECUTED 40006a98: 81 e8 00 00 restore <== NOT EXECUTED } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { 40006a9c: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40006aa0: 08 bf ff cc bleu 400069d0 <_POSIX_Condition_variables_Wait_support+0x10> <== NOT EXECUTED 40006aa4: 01 00 00 00 nop <== NOT EXECUTED if ( mutex_status ) return EINVAL; return status; } return POSIX_BOTTOM_REACHED(); 40006aa8: 40 00 04 3e call 40007ba0 <== NOT EXECUTED 40006aac: 01 00 00 00 nop <== NOT EXECUTED 40006ab0: 81 c7 e0 08 ret <== NOT EXECUTED 40006ab4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40006ab8: 40 00 00 94 call 40006d08 <== NOT EXECUTED 40006abc: 92 10 20 00 clr %o1 <== NOT EXECUTED 40006ac0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40006ac4: 12 bf ff c3 bne 400069d0 <_POSIX_Condition_variables_Wait_support+0x10> <== NOT EXECUTED 40006ac8: 01 00 00 00 nop <== NOT EXECUTED 40006acc: 10 bf ff c6 b 400069e4 <_POSIX_Condition_variables_Wait_support+0x24> <== NOT EXECUTED 40006ad0: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { _Thread_Enable_dispatch(); return EINVAL; } (void) pthread_mutex_unlock( mutex ); 40006ad4: 40 00 01 a2 call 4000715c 40006ad8: 90 10 00 19 mov %i1, %o0 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 40006adc: 80 a6 e0 00 cmp %i3, 0 40006ae0: 22 80 00 1b be,a 40006b4c <_POSIX_Condition_variables_Wait_support+0x18c> 40006ae4: c2 06 40 00 ld [ %i1 ], %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006ae8: c2 04 21 e0 ld [ %l0 + 0x1e0 ], %g1 40006aec: b0 10 20 74 mov 0x74, %i0 40006af0: 82 00 7f ff add %g1, -1, %g1 40006af4: c2 24 21 e0 st %g1, [ %l0 + 0x1e0 ] 40006af8: c4 04 21 e0 ld [ %l0 + 0x1e0 ], %g2 40006afc: 80 a0 a0 00 cmp %g2, 0 40006b00: 02 80 00 09 be 40006b24 <_POSIX_Condition_variables_Wait_support+0x164> 40006b04: 01 00 00 00 nop /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 40006b08: 40 00 00 e8 call 40006ea8 40006b0c: 90 10 00 19 mov %i1, %o0 if ( mutex_status ) 40006b10: 80 a2 20 00 cmp %o0, 0 40006b14: 12 bf ff af bne 400069d0 <_POSIX_Condition_variables_Wait_support+0x10> 40006b18: 01 00 00 00 nop return EINVAL; return status; } return POSIX_BOTTOM_REACHED(); } 40006b1c: 81 c7 e0 08 ret 40006b20: 81 e8 00 00 restore _Thread_Dispatch(); 40006b24: 40 00 13 b3 call 4000b9f0 <_Thread_Dispatch> 40006b28: 01 00 00 00 nop 40006b2c: 30 bf ff f7 b,a 40006b08 <_POSIX_Condition_variables_Wait_support+0x148> if ( *id == PTHREAD_COND_INITIALIZER ) { /* * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); 40006b30: 7f ff ff 02 call 40006738 <== NOT EXECUTED 40006b34: 92 10 20 00 clr %o1 <== NOT EXECUTED if ( status ) { 40006b38: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40006b3c: 12 bf ff a5 bne 400069d0 <_POSIX_Condition_variables_Wait_support+0x10> <== NOT EXECUTED 40006b40: 01 00 00 00 nop <== NOT EXECUTED 40006b44: 10 bf ff bb b 40006a30 <_POSIX_Condition_variables_Wait_support+0x70> <== NOT EXECUTED 40006b48: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 40006b4c: 37 10 00 64 sethi %hi(0x40019000), %i3 return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 40006b50: c2 24 60 14 st %g1, [ %l1 + 0x14 ] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 40006b54: c2 06 e2 bc ld [ %i3 + 0x2bc ], %g1 _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 40006b58: c4 06 00 00 ld [ %i0 ], %g2 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; 40006b5c: 90 04 60 18 add %l1, 0x18, %o0 _Thread_Executing->Wait.id = *cond; 40006b60: c4 20 60 20 st %g2, [ %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; 40006b64: d0 20 60 44 st %o0, [ %g1 + 0x44 ] if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 40006b68: c0 20 60 34 clr [ %g1 + 0x34 ] RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; 40006b6c: 82 10 20 01 mov 1, %g1 _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 40006b70: 92 10 00 1a mov %i2, %o1 40006b74: c2 24 60 48 st %g1, [ %l1 + 0x48 ] 40006b78: 15 10 00 31 sethi %hi(0x4000c400), %o2 40006b7c: 40 00 15 0d call 4000bfb0 <_Thread_queue_Enqueue_with_handler> 40006b80: 94 12 a1 78 or %o2, 0x178, %o2 ! 4000c578 <_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 ) 40006b84: c2 04 21 e0 ld [ %l0 + 0x1e0 ], %g1 40006b88: 82 00 7f ff add %g1, -1, %g1 40006b8c: c2 24 21 e0 st %g1, [ %l0 + 0x1e0 ] 40006b90: c4 04 21 e0 ld [ %l0 + 0x1e0 ], %g2 40006b94: 80 a0 a0 00 cmp %g2, 0 40006b98: 12 80 00 05 bne 40006bac <_POSIX_Condition_variables_Wait_support+0x1ec> 40006b9c: c2 06 e2 bc ld [ %i3 + 0x2bc ], %g1 _Thread_Dispatch(); 40006ba0: 40 00 13 94 call 4000b9f0 <_Thread_Dispatch> 40006ba4: 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; 40006ba8: c2 06 e2 bc ld [ %i3 + 0x2bc ], %g1 40006bac: f0 00 60 34 ld [ %g1 + 0x34 ], %i0 if ( status && status != ETIMEDOUT ) 40006bb0: 80 a6 20 00 cmp %i0, 0 40006bb4: 02 bf ff d5 be 40006b08 <_POSIX_Condition_variables_Wait_support+0x148> 40006bb8: 80 a6 20 74 cmp %i0, 0x74 40006bbc: 02 bf ff d3 be 40006b08 <_POSIX_Condition_variables_Wait_support+0x148> 40006bc0: 01 00 00 00 nop return EINVAL; return status; } return POSIX_BOTTOM_REACHED(); } 40006bc4: 81 c7 e0 08 ret <== NOT EXECUTED 40006bc8: 81 e8 00 00 restore <== NOT EXECUTED 4000e394 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 4000e394: 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 ); 4000e398: 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 ]; 4000e39c: 05 00 00 3f sethi %hi(0xfc00), %g2 4000e3a0: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 4000e3a4: 84 08 40 02 and %g1, %g2, %g2 4000e3a8: aa 10 20 00 clr %l5 4000e3ac: a9 28 a0 02 sll %g2, 2, %l4 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 4000e3b0: 83 30 60 16 srl %g1, 0x16, %g1 4000e3b4: 05 10 00 6c sethi %hi(0x4001b000), %g2 4000e3b8: a6 08 60 1c and %g1, 0x1c, %l3 4000e3bc: a2 10 a0 60 or %g2, 0x60, %l1 for ( ; ; ) { are_all_null = TRUE; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 4000e3c0: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 4000e3c4: 80 a0 60 00 cmp %g1, 0 4000e3c8: 02 80 00 27 be 4000e464 <_POSIX_Keys_Run_destructors+0xd0> 4000e3cc: b0 10 20 01 mov 1, %i0 4000e3d0: a4 10 20 01 mov 1, %l2 the_key = (POSIX_Keys_Control *) 4000e3d4: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 4000e3d8: 83 2e 20 02 sll %i0, 2, %g1 4000e3dc: c4 00 80 01 ld [ %g2 + %g1 ], %g2 _POSIX_Keys_Information.local_table[ index ]; if ( the_key && the_key->is_active && the_key->destructor ) { 4000e3e0: 80 a0 a0 00 cmp %g2, 0 4000e3e4: 02 80 00 16 be 4000e43c <_POSIX_Keys_Run_destructors+0xa8> 4000e3e8: b0 06 20 01 inc %i0 4000e3ec: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4000e3f0: 80 a0 60 00 cmp %g1, 0 4000e3f4: 02 80 00 12 be 4000e43c <_POSIX_Keys_Run_destructors+0xa8> 4000e3f8: a0 04 c0 02 add %l3, %g2, %l0 4000e3fc: c6 00 a0 14 ld [ %g2 + 0x14 ], %g3 4000e400: 80 a0 e0 00 cmp %g3, 0 4000e404: 22 80 00 0f be,a 4000e440 <_POSIX_Keys_Run_destructors+0xac> 4000e408: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 <== NOT EXECUTED value = the_key->Values[ thread_api ][ thread_index ]; 4000e40c: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4000e410: c4 00 40 14 ld [ %g1 + %l4 ], %g2 if ( value ) { 4000e414: 90 90 a0 00 orcc %g2, 0, %o0 4000e418: 22 80 00 0a be,a 4000e440 <_POSIX_Keys_Run_destructors+0xac> 4000e41c: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 <== NOT EXECUTED (*the_key->destructor)( value ); 4000e420: 9f c0 c0 00 call %g3 4000e424: 01 00 00 00 nop if ( the_key->Values[ thread_api ][ thread_index ] ) 4000e428: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4000e42c: c4 05 00 01 ld [ %l4 + %g1 ], %g2 4000e430: 80 a0 00 02 cmp %g0, %g2 4000e434: 82 40 3f ff addx %g0, -1, %g1 4000e438: a4 0c 80 01 and %l2, %g1, %l2 for ( ; ; ) { are_all_null = TRUE; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 4000e43c: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 4000e440: 80 a0 40 18 cmp %g1, %i0 4000e444: 3a bf ff e5 bcc,a 4000e3d8 <_POSIX_Keys_Run_destructors+0x44> 4000e448: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 are_all_null = FALSE; } } } if ( are_all_null == TRUE ) 4000e44c: 80 a4 a0 01 cmp %l2, 1 4000e450: 02 80 00 05 be 4000e464 <_POSIX_Keys_Run_destructors+0xd0> 4000e454: aa 05 60 01 inc %l5 * 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 ) 4000e458: 80 a5 60 04 cmp %l5, 4 4000e45c: 32 bf ff da bne,a 4000e3c4 <_POSIX_Keys_Run_destructors+0x30> 4000e460: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 4000e464: 81 c7 e0 08 ret 4000e468: 81 e8 00 00 restore 40013944 <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 40013944: 9d e3 bf 98 save %sp, -104, %sp CORE_message_queue_Attributes *the_mq_attr; struct mq_attr attr; char *name; size_t n; n = strnlen( name_arg, NAME_MAX ); 40013948: 92 10 20 ff mov 0xff, %o1 4001394c: 90 10 00 18 mov %i0, %o0 40013950: 40 00 12 6f call 4001830c 40013954: aa 10 00 18 mov %i0, %l5 if ( n > NAME_MAX ) 40013958: b0 10 20 5b mov 0x5b, %i0 4001395c: 80 a2 20 ff cmp %o0, 0xff 40013960: 18 80 00 42 bgu 40013a68 <_POSIX_Message_queue_Create_support+0x124> 40013964: a4 10 00 08 mov %o0, %l2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40013968: 27 10 00 98 sethi %hi(0x40026000), %l3 4001396c: c2 04 e0 00 ld [ %l3 ], %g1 40013970: 82 00 60 01 inc %g1 40013974: c2 24 e0 00 st %g1, [ %l3 ] * 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 ) { 40013978: 80 a6 a0 00 cmp %i2, 0 4001397c: 22 80 00 41 be,a 40013a80 <_POSIX_Message_queue_Create_support+0x13c> 40013980: b4 10 20 10 mov 0x10, %i2 attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 40013984: e2 06 a0 04 ld [ %i2 + 4 ], %l1 40013988: 80 a4 60 00 cmp %l1, 0 4001398c: 04 80 00 4c ble 40013abc <_POSIX_Message_queue_Create_support+0x178> 40013990: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 40013994: f4 06 a0 08 ld [ %i2 + 8 ], %i2 40013998: 80 a6 a0 00 cmp %i2, 0 4001399c: 04 80 00 48 ble 40013abc <_POSIX_Message_queue_Create_support+0x178> 400139a0: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ) { return (POSIX_Message_queue_Control *) 400139a4: 29 10 00 99 sethi %hi(0x40026400), %l4 400139a8: 7f ff eb b5 call 4000e87c <_Objects_Allocate> 400139ac: 90 15 20 18 or %l4, 0x18, %o0 ! 40026418 <_POSIX_Message_queue_Information> rtems_set_errno_and_return_minus_one( ENFILE ); } #endif the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 400139b0: a0 92 20 00 orcc %o0, 0, %l0 400139b4: 02 80 00 35 be 40013a88 <_POSIX_Message_queue_Create_support+0x144> 400139b8: 82 10 20 01 mov 1, %g1 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; 400139bc: f2 24 20 10 st %i1, [ %l0 + 0x10 ] 400139c0: 92 10 00 12 mov %l2, %o1 the_mq->named = TRUE; the_mq->open_count = 1; the_mq->linked = TRUE; 400139c4: c2 24 20 18 st %g1, [ %l0 + 0x18 ] _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; the_mq->named = TRUE; 400139c8: c2 24 20 14 st %g1, [ %l0 + 0x14 ] the_mq->open_count = 1; 400139cc: c2 24 20 1c st %g1, [ %l0 + 0x1c ] 400139d0: 25 10 00 98 sethi %hi(0x40026000), %l2 400139d4: 7f ff ea 4b call 4000e300 <_Heap_Allocate> 400139d8: 90 14 a0 4c or %l2, 0x4c, %o0 ! 4002604c <_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) { 400139dc: b2 92 20 00 orcc %o0, 0, %i1 400139e0: 22 80 00 56 be,a 40013b38 <_POSIX_Message_queue_Create_support+0x1f4> 400139e4: 90 15 20 18 or %l4, 0x18, %o0 <== NOT EXECUTED _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOMEM ); } strcpy( name, name_arg ); 400139e8: 40 00 0f e4 call 40017978 400139ec: 92 10 00 15 mov %l5, %o1 */ the_mq_attr = &the_mq->Message_queue.Attributes; the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 400139f0: 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; 400139f4: c0 24 20 60 clr [ %l0 + 0x60 ] if ( ! _CORE_message_queue_Initialize( 400139f8: 96 10 00 1a mov %i2, %o3 400139fc: 90 04 20 20 add %l0, 0x20, %o0 40013a00: 40 00 03 cd call 40014934 <_CORE_message_queue_Initialize> 40013a04: 92 04 20 60 add %l0, 0x60, %o1 40013a08: 80 a2 20 00 cmp %o0, 0 40013a0c: 02 80 00 39 be 40013af0 <_POSIX_Message_queue_Create_support+0x1ac> 40013a10: 90 15 20 18 or %l4, 0x18, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 40013a14: c2 04 20 08 ld [ %l0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40013a18: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 40013a1c: 05 00 00 3f sethi %hi(0xfc00), %g2 40013a20: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40013a24: 82 08 40 02 and %g1, %g2, %g1 40013a28: 80 a0 40 03 cmp %g1, %g3 40013a2c: 38 80 00 06 bgu,a 40013a44 <_POSIX_Message_queue_Create_support+0x100> 40013a30: e0 26 c0 00 st %l0, [ %i3 ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40013a34: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40013a38: 83 28 60 02 sll %g1, 2, %g1 40013a3c: e0 20 80 01 st %l0, [ %g2 + %g1 ] &_POSIX_Message_queue_Information, &the_mq->Object, (char *) name ); *message_queue = the_mq; 40013a40: e0 26 c0 00 st %l0, [ %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; 40013a44: f2 24 20 0c st %i1, [ %l0 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40013a48: c2 04 e0 00 ld [ %l3 ], %g1 40013a4c: b0 10 20 00 clr %i0 40013a50: 82 00 7f ff add %g1, -1, %g1 40013a54: c2 24 e0 00 st %g1, [ %l3 ] 40013a58: c4 04 e0 00 ld [ %l3 ], %g2 40013a5c: 80 a0 a0 00 cmp %g2, 0 40013a60: 02 80 00 04 be 40013a70 <_POSIX_Message_queue_Create_support+0x12c> 40013a64: 01 00 00 00 nop ); #endif _Thread_Enable_dispatch(); return 0; } 40013a68: 81 c7 e0 08 ret 40013a6c: 81 e8 00 00 restore _Thread_Dispatch(); 40013a70: 7f ff f1 c0 call 40010170 <_Thread_Dispatch> <== NOT EXECUTED 40013a74: 01 00 00 00 nop <== NOT EXECUTED 40013a78: 81 c7 e0 08 ret <== NOT EXECUTED 40013a7c: 81 e8 00 00 restore <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); 40013a80: 10 bf ff c9 b 400139a4 <_POSIX_Message_queue_Create_support+0x60> 40013a84: a2 10 20 0a mov 0xa, %l1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40013a88: c2 04 e0 00 ld [ %l3 ], %g1 <== NOT EXECUTED 40013a8c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40013a90: c2 24 e0 00 st %g1, [ %l3 ] <== NOT EXECUTED 40013a94: c4 04 e0 00 ld [ %l3 ], %g2 <== NOT EXECUTED 40013a98: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40013a9c: 02 80 00 36 be 40013b74 <_POSIX_Message_queue_Create_support+0x230> <== NOT EXECUTED 40013aa0: 01 00 00 00 nop <== NOT EXECUTED #endif the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); 40013aa4: 40 00 0a d1 call 400165e8 <__errno> <== NOT EXECUTED 40013aa8: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40013aac: 82 10 20 17 mov 0x17, %g1 <== NOT EXECUTED 40013ab0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40013ab4: 81 c7 e0 08 ret <== NOT EXECUTED 40013ab8: 81 e8 00 00 restore <== NOT EXECUTED 40013abc: c2 04 e0 00 ld [ %l3 ], %g1 40013ac0: 82 00 7f ff add %g1, -1, %g1 40013ac4: c2 24 e0 00 st %g1, [ %l3 ] 40013ac8: c4 04 e0 00 ld [ %l3 ], %g2 40013acc: 80 a0 a0 00 cmp %g2, 0 40013ad0: 02 80 00 2c be 40013b80 <_POSIX_Message_queue_Create_support+0x23c> 40013ad4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); 40013ad8: 40 00 0a c4 call 400165e8 <__errno> 40013adc: b0 10 3f ff mov -1, %i0 ! ffffffff 40013ae0: 82 10 20 16 mov 0x16, %g1 40013ae4: c2 22 00 00 st %g1, [ %o0 ] 40013ae8: 81 c7 e0 08 ret 40013aec: 81 e8 00 00 restore RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 40013af0: 7f ff ec 71 call 4000ecb4 <_Objects_Free> <== NOT EXECUTED 40013af4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 40013af8: 90 14 a0 4c or %l2, 0x4c, %o0 <== NOT EXECUTED 40013afc: 7f ff ea 33 call 4000e3c8 <_Heap_Free> <== NOT EXECUTED 40013b00: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40013b04: c2 04 e0 00 ld [ %l3 ], %g1 <== NOT EXECUTED 40013b08: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40013b0c: c2 24 e0 00 st %g1, [ %l3 ] <== NOT EXECUTED 40013b10: c4 04 e0 00 ld [ %l3 ], %g2 <== NOT EXECUTED 40013b14: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40013b18: 02 80 00 1d be 40013b8c <_POSIX_Message_queue_Create_support+0x248> <== NOT EXECUTED 40013b1c: 01 00 00 00 nop <== NOT EXECUTED #endif _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); 40013b20: 40 00 0a b2 call 400165e8 <__errno> <== NOT EXECUTED 40013b24: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40013b28: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 40013b2c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40013b30: 81 c7 e0 08 ret <== NOT EXECUTED 40013b34: 81 e8 00 00 restore <== NOT EXECUTED 40013b38: 7f ff ec 5f call 4000ecb4 <_Objects_Free> <== NOT EXECUTED 40013b3c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40013b40: c2 04 e0 00 ld [ %l3 ], %g1 <== NOT EXECUTED 40013b44: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40013b48: c2 24 e0 00 st %g1, [ %l3 ] <== NOT EXECUTED 40013b4c: c4 04 e0 00 ld [ %l3 ], %g2 <== NOT EXECUTED 40013b50: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40013b54: 02 80 00 11 be 40013b98 <_POSIX_Message_queue_Create_support+0x254> <== NOT EXECUTED 40013b58: 01 00 00 00 nop <== NOT EXECUTED name = _Workspace_Allocate(n); if (!name) { _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOMEM ); 40013b5c: 40 00 0a a3 call 400165e8 <__errno> <== NOT EXECUTED 40013b60: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40013b64: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40013b68: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40013b6c: 81 c7 e0 08 ret <== NOT EXECUTED 40013b70: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 40013b74: 7f ff f1 7f call 40010170 <_Thread_Dispatch> <== NOT EXECUTED 40013b78: 01 00 00 00 nop <== NOT EXECUTED 40013b7c: 30 bf ff ca b,a 40013aa4 <_POSIX_Message_queue_Create_support+0x160> <== NOT EXECUTED 40013b80: 7f ff f1 7c call 40010170 <_Thread_Dispatch> <== NOT EXECUTED 40013b84: 01 00 00 00 nop <== NOT EXECUTED 40013b88: 30 bf ff d4 b,a 40013ad8 <_POSIX_Message_queue_Create_support+0x194> <== NOT EXECUTED 40013b8c: 7f ff f1 79 call 40010170 <_Thread_Dispatch> <== NOT EXECUTED 40013b90: 01 00 00 00 nop <== NOT EXECUTED 40013b94: 30 bf ff e3 b,a 40013b20 <_POSIX_Message_queue_Create_support+0x1dc> <== NOT EXECUTED 40013b98: 7f ff f1 76 call 40010170 <_Thread_Dispatch> <== NOT EXECUTED 40013b9c: 01 00 00 00 nop <== NOT EXECUTED 40013ba0: 30 bf ff ef b,a 40013b5c <_POSIX_Message_queue_Create_support+0x218> <== NOT EXECUTED 40009f10 <_POSIX_Message_queue_Delete>: */ void _POSIX_Message_queue_Delete( POSIX_Message_queue_Control *the_mq ) { 40009f10: 9d e3 bf 98 save %sp, -104, %sp if ( !the_mq->linked && !the_mq->open_count ) { 40009f14: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 40009f18: 80 a0 60 00 cmp %g1, 0 40009f1c: 12 80 00 1f bne 40009f98 <_POSIX_Message_queue_Delete+0x88> 40009f20: b2 10 00 18 mov %i0, %i1 40009f24: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 40009f28: 80 a0 60 00 cmp %g1, 0 40009f2c: 12 80 00 1b bne 40009f98 <_POSIX_Message_queue_Delete+0x88> 40009f30: 01 00 00 00 nop /* the name memory may have been freed by unlink. */ if ( the_mq->Object.name ) 40009f34: d2 06 20 0c ld [ %i0 + 0xc ], %o1 40009f38: 80 a2 60 00 cmp %o1, 0 40009f3c: 02 80 00 04 be 40009f4c <_POSIX_Message_queue_Delete+0x3c> 40009f40: 11 10 00 98 sethi %hi(0x40026000), %o0 RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 40009f44: 40 00 11 21 call 4000e3c8 <_Heap_Free> <== NOT EXECUTED 40009f48: 90 12 20 4c or %o0, 0x4c, %o0 ! 4002604c <_Workspace_Area> <== NOT EXECUTED Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40009f4c: 03 10 00 99 sethi %hi(0x40026400), %g1 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40009f50: c6 06 60 08 ld [ %i1 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40009f54: b0 10 60 18 or %g1, 0x18, %i0 40009f58: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 40009f5c: 03 00 00 3f sethi %hi(0xfc00), %g1 40009f60: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40009f64: 82 08 c0 01 and %g3, %g1, %g1 40009f68: 80 a0 40 02 cmp %g1, %g2 40009f6c: 18 80 00 05 bgu 40009f80 <_POSIX_Message_queue_Delete+0x70> 40009f70: 90 06 60 20 add %i1, 0x20, %o0 information->local_table[ index ] = the_object; 40009f74: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 40009f78: 83 28 60 02 sll %g1, 2, %g1 40009f7c: 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( 40009f80: 92 10 20 00 clr %o1 40009f84: 94 10 20 05 mov 5, %o2 40009f88: 40 00 0e dc call 4000daf8 <_CORE_message_queue_Close> 40009f8c: 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 ); 40009f90: 40 00 13 49 call 4000ecb4 <_Objects_Free> 40009f94: 81 e8 00 00 restore 40009f98: 81 c7 e0 08 ret 40009f9c: 81 e8 00 00 restore 4000a530 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, boolean wait, Watchdog_Interval timeout ) { 4000a530: 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 *) 4000a534: 11 10 00 99 sethi %hi(0x40026400), %o0 4000a538: 94 07 bf f4 add %fp, -12, %o2 4000a53c: 90 12 21 d0 or %o0, 0x1d0, %o0 4000a540: 40 00 12 20 call 4000edc0 <_Objects_Get> 4000a544: 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 ) { 4000a548: c2 07 bf f4 ld [ %fp + -12 ], %g1 size_t msg_len, unsigned int *msg_prio, boolean wait, Watchdog_Interval timeout ) { 4000a54c: 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 ) { 4000a550: 80 a0 60 01 cmp %g1, 1 4000a554: 02 80 00 43 be 4000a660 <_POSIX_Message_queue_Receive_support+0x130> 4000a558: 9a 10 00 1d mov %i5, %o5 4000a55c: 80 a0 60 01 cmp %g1, 1 4000a560: 1a 80 00 29 bcc 4000a604 <_POSIX_Message_queue_Receive_support+0xd4> 4000a564: 80 a0 60 02 cmp %g1, 2 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 ) { 4000a568: c4 02 20 14 ld [ %o0 + 0x14 ], %g2 4000a56c: 82 08 a0 03 and %g2, 3, %g1 4000a570: 80 a0 60 01 cmp %g1, 1 4000a574: 02 80 00 2a be 4000a61c <_POSIX_Message_queue_Receive_support+0xec> 4000a578: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 4000a57c: d0 02 20 10 ld [ %o0 + 0x10 ], %o0 if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 4000a580: c2 02 20 6c ld [ %o0 + 0x6c ], %g1 4000a584: 80 a0 40 1a cmp %g1, %i2 4000a588: 18 80 00 44 bgu 4000a698 <_POSIX_Message_queue_Receive_support+0x168> 4000a58c: 80 a7 20 00 cmp %i4, 0 length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4000a590: 12 80 00 3a bne 4000a678 <_POSIX_Message_queue_Receive_support+0x148> 4000a594: 98 10 20 00 clr %o4 /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 4000a598: 82 10 3f ff mov -1, %g1 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4000a59c: 90 02 20 20 add %o0, 0x20, %o0 4000a5a0: 92 10 00 18 mov %i0, %o1 /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 4000a5a4: c2 27 bf f0 st %g1, [ %fp + -16 ] do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4000a5a8: 40 00 0d 7a call 4000db90 <_CORE_message_queue_Seize> 4000a5ac: 96 07 bf f0 add %fp, -16, %o3 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000a5b0: 05 10 00 98 sethi %hi(0x40026000), %g2 4000a5b4: c2 00 a0 00 ld [ %g2 ], %g1 4000a5b8: 82 00 7f ff add %g1, -1, %g1 4000a5bc: c2 20 a0 00 st %g1, [ %g2 ] 4000a5c0: c6 00 a0 00 ld [ %g2 ], %g3 4000a5c4: 80 a0 e0 00 cmp %g3, 0 4000a5c8: 02 80 00 30 be 4000a688 <_POSIX_Message_queue_Receive_support+0x158> 4000a5cc: 01 00 00 00 nop do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 4000a5d0: 3b 10 00 98 sethi %hi(0x40026000), %i5 <== NOT EXECUTED 4000a5d4: c4 07 60 dc ld [ %i5 + 0xdc ], %g2 ! 400260dc <_Thread_Executing> <== NOT EXECUTED 4000a5d8: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1 _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 4000a5dc: c8 00 a0 34 ld [ %g2 + 0x34 ], %g4 do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 4000a5e0: 87 38 60 1f sra %g1, 0x1f, %g3 4000a5e4: 82 18 c0 01 xor %g3, %g1, %g1 4000a5e8: 82 20 40 03 sub %g1, %g3, %g1 _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 4000a5ec: 80 a1 20 00 cmp %g4, 0 4000a5f0: 12 80 00 38 bne 4000a6d0 <_POSIX_Message_queue_Receive_support+0x1a0> 4000a5f4: c2 26 c0 00 st %g1, [ %i3 ] return length_out; 4000a5f8: d0 07 bf f0 ld [ %fp + -16 ], %o0 _Thread_Executing->Wait.return_code ) ); } return POSIX_BOTTOM_REACHED(); } 4000a5fc: 81 c7 e0 08 ret 4000a600: 91 e8 00 08 restore %g0, %o0, %o0 Objects_Locations location; size_t length_out; boolean do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4000a604: 02 80 00 10 be 4000a644 <_POSIX_Message_queue_Receive_support+0x114> 4000a608: 01 00 00 00 nop _POSIX_Message_queue_Translate_core_message_queue_return_code( _Thread_Executing->Wait.return_code ) ); } return POSIX_BOTTOM_REACHED(); 4000a60c: 40 00 06 8e call 4000c044 <== NOT EXECUTED 4000a610: 01 00 00 00 nop <== NOT EXECUTED } 4000a614: 81 c7 e0 08 ret 4000a618: 91 e8 00 08 restore %g0, %o0, %o0 4000a61c: 03 10 00 98 sethi %hi(0x40026000), %g1 4000a620: c4 00 60 00 ld [ %g1 ], %g2 4000a624: 84 00 bf ff add %g2, -1, %g2 4000a628: c4 20 60 00 st %g2, [ %g1 ] 4000a62c: c6 00 60 00 ld [ %g1 ], %g3 4000a630: 80 a0 e0 00 cmp %g3, 0 4000a634: 12 80 00 04 bne 4000a644 <_POSIX_Message_queue_Receive_support+0x114> 4000a638: 01 00 00 00 nop _Thread_Dispatch(); 4000a63c: 40 00 16 cd call 40010170 <_Thread_Dispatch> 4000a640: 01 00 00 00 nop 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 ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); 4000a644: 40 00 2f e9 call 400165e8 <__errno> 4000a648: 01 00 00 00 nop 4000a64c: 82 10 20 09 mov 9, %g1 ! 9 4000a650: c2 22 00 00 st %g1, [ %o0 ] 4000a654: 90 10 3f ff mov -1, %o0 _Thread_Executing->Wait.return_code ) ); } return POSIX_BOTTOM_REACHED(); } 4000a658: 81 c7 e0 08 ret 4000a65c: 91 e8 00 08 restore %g0, %o0, %o0 the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); case OBJECTS_REMOTE: _Thread_Dispatch(); 4000a660: 40 00 16 c4 call 40010170 <_Thread_Dispatch> <== NOT EXECUTED 4000a664: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 4000a668: 40 00 06 81 call 4000c06c <== NOT EXECUTED 4000a66c: 01 00 00 00 nop <== NOT EXECUTED _Thread_Executing->Wait.return_code ) ); } return POSIX_BOTTOM_REACHED(); } 4000a670: 81 c7 e0 08 ret <== NOT EXECUTED 4000a674: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? FALSE : TRUE; 4000a678: 83 30 a0 0e srl %g2, 0xe, %g1 4000a67c: 82 18 60 01 xor %g1, 1, %g1 4000a680: 10 bf ff c6 b 4000a598 <_POSIX_Message_queue_Receive_support+0x68> 4000a684: 98 08 60 01 and %g1, 1, %o4 4000a688: 40 00 16 ba call 40010170 <_Thread_Dispatch> 4000a68c: 3b 10 00 98 sethi %hi(0x40026000), %i5 do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 4000a690: 10 bf ff d2 b 4000a5d8 <_POSIX_Message_queue_Receive_support+0xa8> 4000a694: c4 07 60 dc ld [ %i5 + 0xdc ], %g2 ! 400260dc <_Thread_Executing> #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000a698: 03 10 00 98 sethi %hi(0x40026000), %g1 4000a69c: c4 00 60 00 ld [ %g1 ], %g2 4000a6a0: 84 00 bf ff add %g2, -1, %g2 4000a6a4: c4 20 60 00 st %g2, [ %g1 ] 4000a6a8: c6 00 60 00 ld [ %g1 ], %g3 4000a6ac: 80 a0 e0 00 cmp %g3, 0 4000a6b0: 02 80 00 11 be 4000a6f4 <_POSIX_Message_queue_Receive_support+0x1c4> 4000a6b4: 01 00 00 00 nop the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EMSGSIZE ); 4000a6b8: 40 00 2f cc call 400165e8 <__errno> 4000a6bc: 01 00 00 00 nop 4000a6c0: 82 10 20 7a mov 0x7a, %g1 ! 7a 4000a6c4: c2 22 00 00 st %g1, [ %o0 ] 4000a6c8: 10 bf ff d3 b 4000a614 <_POSIX_Message_queue_Receive_support+0xe4> 4000a6cc: 90 10 3f ff mov -1, %o0 _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) return length_out; rtems_set_errno_and_return_minus_one( 4000a6d0: 40 00 2f c6 call 400165e8 <__errno> 4000a6d4: 01 00 00 00 nop 4000a6d8: c2 07 60 dc ld [ %i5 + 0xdc ], %g1 4000a6dc: a0 10 00 08 mov %o0, %l0 4000a6e0: 40 00 00 e5 call 4000aa74 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4000a6e4: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 4000a6e8: d0 24 00 00 st %o0, [ %l0 ] 4000a6ec: 10 bf ff ca b 4000a614 <_POSIX_Message_queue_Receive_support+0xe4> 4000a6f0: 90 10 3f ff mov -1, %o0 _Thread_Dispatch(); 4000a6f4: 40 00 16 9f call 40010170 <_Thread_Dispatch> 4000a6f8: 01 00 00 00 nop 4000a6fc: 30 bf ff ef b,a 4000a6b8 <_POSIX_Message_queue_Receive_support+0x188> 4000a718 <_POSIX_Message_queue_Send_support>: size_t msg_len, uint32_t msg_prio, boolean wait, Watchdog_Interval timeout ) { 4000a718: 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 ) 4000a71c: 80 a6 e0 20 cmp %i3, 0x20 4000a720: 18 80 00 5b bgu 4000a88c <_POSIX_Message_queue_Send_support+0x174> 4000a724: 92 10 00 18 mov %i0, %o1 4000a728: 11 10 00 99 sethi %hi(0x40026400), %o0 4000a72c: 90 12 21 d0 or %o0, 0x1d0, %o0 ! 400265d0 <_POSIX_Message_queue_Information_fds> 4000a730: 40 00 11 a4 call 4000edc0 <_Objects_Get> 4000a734: 94 07 bf f4 add %fp, -12, %o2 rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4000a738: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000a73c: 80 a0 60 01 cmp %g1, 1 4000a740: 02 80 00 42 be 4000a848 <_POSIX_Message_queue_Send_support+0x130> 4000a744: 01 00 00 00 nop 4000a748: 2a 80 00 09 bcs,a 4000a76c <_POSIX_Message_queue_Send_support+0x54> 4000a74c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 4000a750: 80 a0 60 02 cmp %g1, 2 4000a754: 02 80 00 36 be 4000a82c <_POSIX_Message_queue_Send_support+0x114> 4000a758: 01 00 00 00 nop _POSIX_Message_queue_Translate_core_message_queue_return_code( msg_status ) ); } return POSIX_BOTTOM_REACHED(); 4000a75c: 40 00 06 3a call 4000c044 <== NOT EXECUTED 4000a760: 01 00 00 00 nop <== NOT EXECUTED } 4000a764: 81 c7 e0 08 ret 4000a768: 91 e8 00 08 restore %g0, %o0, %o0 _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 ) { 4000a76c: 80 88 60 03 btst 3, %g1 4000a770: 02 80 00 25 be 4000a804 <_POSIX_Message_queue_Send_support+0xec> 4000a774: 80 a7 20 00 cmp %i4, 0 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 4000a778: d0 02 20 10 ld [ %o0 + 0x10 ], %o0 /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4000a77c: 12 80 00 39 bne 4000a860 <_POSIX_Message_queue_Send_support+0x148> 4000a780: 84 10 20 00 clr %g2 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4000a784: fa 23 a0 60 st %i5, [ %sp + 0x60 ] 4000a788: c4 23 a0 5c st %g2, [ %sp + 0x5c ] 4000a78c: 92 10 00 19 mov %i1, %o1 4000a790: 94 10 00 1a mov %i2, %o2 4000a794: 96 10 00 18 mov %i0, %o3 4000a798: 9a 20 00 1b neg %i3, %o5 4000a79c: 98 10 20 00 clr %o4 4000a7a0: 40 00 0d 43 call 4000dcac <_CORE_message_queue_Submit> 4000a7a4: 90 02 20 20 add %o0, 0x20, %o0 4000a7a8: ba 10 00 08 mov %o0, %i5 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000a7ac: 03 10 00 98 sethi %hi(0x40026000), %g1 4000a7b0: c4 00 60 00 ld [ %g1 ], %g2 4000a7b4: 84 00 bf ff add %g2, -1, %g2 4000a7b8: c4 20 60 00 st %g2, [ %g1 ] 4000a7bc: c6 00 60 00 ld [ %g1 ], %g3 4000a7c0: 80 a0 e0 00 cmp %g3, 0 4000a7c4: 02 80 00 2b be 4000a870 <_POSIX_Message_queue_Send_support+0x158> 4000a7c8: 01 00 00 00 nop * 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 ) 4000a7cc: 80 a7 60 07 cmp %i5, 7 <== NOT EXECUTED 4000a7d0: 02 80 00 2c be 4000a880 <_POSIX_Message_queue_Send_support+0x168> 4000a7d4: 03 10 00 98 sethi %hi(0x40026000), %g1 msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) 4000a7d8: 80 a7 60 00 cmp %i5, 0 4000a7dc: 02 bf ff e2 be 4000a764 <_POSIX_Message_queue_Send_support+0x4c> 4000a7e0: 90 10 20 00 clr %o0 return msg_status; rtems_set_errno_and_return_minus_one( 4000a7e4: 40 00 2f 81 call 400165e8 <__errno> 4000a7e8: 01 00 00 00 nop 4000a7ec: a0 10 00 08 mov %o0, %l0 4000a7f0: 40 00 00 a1 call 4000aa74 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4000a7f4: 90 10 00 1d mov %i5, %o0 4000a7f8: d0 24 00 00 st %o0, [ %l0 ] 4000a7fc: 10 bf ff da b 4000a764 <_POSIX_Message_queue_Send_support+0x4c> 4000a800: 90 10 3f ff mov -1, %o0 4000a804: 03 10 00 98 sethi %hi(0x40026000), %g1 4000a808: c4 00 60 00 ld [ %g1 ], %g2 4000a80c: 84 00 bf ff add %g2, -1, %g2 4000a810: c4 20 60 00 st %g2, [ %g1 ] 4000a814: c6 00 60 00 ld [ %g1 ], %g3 4000a818: 80 a0 e0 00 cmp %g3, 0 4000a81c: 12 80 00 04 bne 4000a82c <_POSIX_Message_queue_Send_support+0x114> 4000a820: 01 00 00 00 nop _Thread_Dispatch(); 4000a824: 40 00 16 53 call 40010170 <_Thread_Dispatch> 4000a828: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); 4000a82c: 40 00 2f 6f call 400165e8 <__errno> 4000a830: 01 00 00 00 nop 4000a834: 82 10 20 09 mov 9, %g1 ! 9 4000a838: c2 22 00 00 st %g1, [ %o0 ] 4000a83c: 90 10 3f ff mov -1, %o0 msg_status ) ); } return POSIX_BOTTOM_REACHED(); } 4000a840: 81 c7 e0 08 ret 4000a844: 91 e8 00 08 restore %g0, %o0, %o0 switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); case OBJECTS_REMOTE: _Thread_Dispatch(); 4000a848: 40 00 16 4a call 40010170 <_Thread_Dispatch> <== NOT EXECUTED 4000a84c: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 4000a850: 40 00 06 07 call 4000c06c <== NOT EXECUTED 4000a854: 01 00 00 00 nop <== NOT EXECUTED msg_status ) ); } return POSIX_BOTTOM_REACHED(); } 4000a858: 81 c7 e0 08 ret <== NOT EXECUTED 4000a85c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? FALSE : TRUE; 4000a860: 83 30 60 0e srl %g1, 0xe, %g1 4000a864: 82 18 60 01 xor %g1, 1, %g1 4000a868: 10 bf ff c7 b 4000a784 <_POSIX_Message_queue_Send_support+0x6c> 4000a86c: 84 08 60 01 and %g1, 1, %g2 4000a870: 40 00 16 40 call 40010170 <_Thread_Dispatch> 4000a874: 01 00 00 00 nop * 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 ) 4000a878: 10 bf ff d6 b 4000a7d0 <_POSIX_Message_queue_Send_support+0xb8> 4000a87c: 80 a7 60 07 cmp %i5, 7 msg_status = _Thread_Executing->Wait.return_code; 4000a880: c4 00 60 dc ld [ %g1 + 0xdc ], %g2 4000a884: 10 bf ff d5 b 4000a7d8 <_POSIX_Message_queue_Send_support+0xc0> 4000a888: fa 00 a0 34 ld [ %g2 + 0x34 ], %i5 * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); 4000a88c: 40 00 2f 57 call 400165e8 <__errno> 4000a890: 01 00 00 00 nop 4000a894: 82 10 20 16 mov 0x16, %g1 ! 16 4000a898: c2 22 00 00 st %g1, [ %o0 ] 4000a89c: 10 bf ff b2 b 4000a764 <_POSIX_Message_queue_Send_support+0x4c> 4000a8a0: 90 10 3f ff mov -1, %o0 4000aa74 <_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 ) { 4000aa74: 9d e3 bf 98 save %sp, -104, %sp switch ( the_message_queue_status ) { 4000aa78: 80 a6 20 03 cmp %i0, 3 4000aa7c: 02 80 00 21 be 4000ab00 <_POSIX_Message_queue_Translate_core_message_queue_return_code+0x8c> 4000aa80: 94 10 00 18 mov %i0, %o2 4000aa84: 80 a6 20 03 cmp %i0, 3 4000aa88: 08 80 00 12 bleu 4000aad0 <_POSIX_Message_queue_Translate_core_message_queue_return_code+0x5c> 4000aa8c: 80 a6 20 01 cmp %i0, 1 4000aa90: 80 a6 20 05 cmp %i0, 5 4000aa94: 02 80 00 19 be 4000aaf8 <_POSIX_Message_queue_Translate_core_message_queue_return_code+0x84> 4000aa98: 01 00 00 00 nop 4000aa9c: 2a 80 00 13 bcs,a 4000aae8 <_POSIX_Message_queue_Translate_core_message_queue_return_code+0x74> 4000aaa0: b0 10 20 0b mov 0xb, %i0 ! b 4000aaa4: 80 a6 20 06 cmp %i0, 6 4000aaa8: 02 80 00 1a be 4000ab10 <_POSIX_Message_queue_Translate_core_message_queue_return_code+0x9c> 4000aaac: 03 00 44 44 sethi %hi(0x1111000), %g1 4000aab0: 82 10 61 11 or %g1, 0x111, %g1 ! 1111111 <== NOT EXECUTED 4000aab4: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 4000aab8: 02 80 00 14 be 4000ab08 <_POSIX_Message_queue_Translate_core_message_queue_return_code+0x94> <== NOT EXECUTED 4000aabc: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED * RTEMS POSIX API implementation does not support multiprocessing. */ case THREAD_STATUS_PROXY_BLOCKING: return ENOSYS; } _Internal_error_Occurred( 4000aac0: 40 00 0f 42 call 4000e7c8 <_Internal_error_Occurred> <== NOT EXECUTED 4000aac4: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED INTERNAL_ERROR_POSIX_API, TRUE, the_message_queue_status ); return POSIX_BOTTOM_REACHED(); 4000aac8: 40 00 05 5f call 4000c044 <== NOT EXECUTED 4000aacc: 81 e8 00 00 restore <== NOT EXECUTED int _POSIX_Message_queue_Translate_core_message_queue_return_code( uint32_t the_message_queue_status ) { switch ( the_message_queue_status ) { 4000aad0: 02 80 00 06 be 4000aae8 <_POSIX_Message_queue_Translate_core_message_queue_return_code+0x74> 4000aad4: b0 10 20 7a mov 0x7a, %i0 4000aad8: 80 a2 a0 01 cmp %o2, 1 4000aadc: 08 80 00 05 bleu 4000aaf0 <_POSIX_Message_queue_Translate_core_message_queue_return_code+0x7c> 4000aae0: 01 00 00 00 nop _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, TRUE, the_message_queue_status ); return POSIX_BOTTOM_REACHED(); 4000aae4: b0 10 20 0b mov 0xb, %i0 ! b } 4000aae8: 81 c7 e0 08 ret 4000aaec: 81 e8 00 00 restore int _POSIX_Message_queue_Translate_core_message_queue_return_code( uint32_t the_message_queue_status ) { switch ( the_message_queue_status ) { 4000aaf0: 81 c7 e0 08 ret <== NOT EXECUTED 4000aaf4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED /* * Out of message buffers to queue pending message */ case CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED: return ENOMEM; 4000aaf8: 81 c7 e0 08 ret 4000aafc: 91 e8 20 09 restore %g0, 9, %o0 /* * Bad message size */ case CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE: return EMSGSIZE; 4000ab00: 81 c7 e0 08 ret <== NOT EXECUTED 4000ab04: 91 e8 20 0c restore %g0, 0xc, %o0 <== NOT EXECUTED int _POSIX_Message_queue_Translate_core_message_queue_return_code( uint32_t the_message_queue_status ) { switch ( the_message_queue_status ) { 4000ab08: 81 c7 e0 08 ret <== NOT EXECUTED 4000ab0c: 91 e8 20 58 restore %g0, 0x58, %o0 <== NOT EXECUTED 4000ab10: 81 c7 e0 08 ret 4000ab14: 91 e8 20 74 restore %g0, 0x74, %o0 40010258 <_POSIX_Mutex_From_core_mutex_status>: */ int _POSIX_Mutex_From_core_mutex_status( CORE_mutex_Status status ) { 40010258: 9d e3 bf 98 save %sp, -104, %sp switch ( status ) { 4001025c: 80 a6 20 06 cmp %i0, 6 40010260: 08 80 00 0b bleu 4001028c <_POSIX_Mutex_From_core_mutex_status+0x34> 40010264: 83 2e 20 02 sll %i0, 2, %g1 case CORE_MUTEX_STATUS_CEILING_VIOLATED: return EINVAL; default: break; } assert( 0 ); 40010268: 92 10 20 32 mov 0x32, %o1 <== NOT EXECUTED 4001026c: 11 10 00 65 sethi %hi(0x40019400), %o0 <== NOT EXECUTED 40010270: 15 10 00 5f sethi %hi(0x40017c00), %o2 <== NOT EXECUTED 40010274: 90 12 22 f8 or %o0, 0x2f8, %o0 <== NOT EXECUTED 40010278: 94 12 a1 40 or %o2, 0x140, %o2 <== NOT EXECUTED 4001027c: 7f ff cf 64 call 4000400c <__assert> <== NOT EXECUTED 40010280: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 40010284: 81 c7 e0 08 ret <== NOT EXECUTED 40010288: 81 e8 00 00 restore <== NOT EXECUTED int _POSIX_Mutex_From_core_mutex_status( CORE_mutex_Status status ) { switch ( status ) { 4001028c: 05 10 00 40 sethi %hi(0x40010000), %g2 40010290: 84 10 a2 3c or %g2, 0x23c, %g2 ! 4001023c <_POSIX_Message_queue_Manager_initialization+0x58> 40010294: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40010298: 81 c0 c0 00 jmp %g3 4001029c: 01 00 00 00 nop 400102a0: 81 c7 e0 08 ret 400102a4: 91 e8 20 74 restore %g0, 0x74, %o0 400102a8: 81 c7 e0 08 ret 400102ac: 91 e8 20 00 restore %g0, 0, %o0 case CORE_MUTEX_STATUS_SUCCESSFUL: return 0; 400102b0: 81 c7 e0 08 ret 400102b4: 91 e8 20 10 restore %g0, 0x10, %o0 case CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT: return EBUSY; 400102b8: 81 c7 e0 08 ret 400102bc: 91 e8 20 2d restore %g0, 0x2d, %o0 case CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED: return EDEADLK; 400102c0: 81 c7 e0 08 ret 400102c4: 91 e8 20 01 restore %g0, 1, %o0 int _POSIX_Mutex_From_core_mutex_status( CORE_mutex_Status status ) { switch ( status ) { 400102c8: 81 c7 e0 08 ret 400102cc: 91 e8 20 16 restore %g0, 0x16, %o0 400079d4 <_POSIX_Mutex_Lock_support>: int _POSIX_Mutex_Lock_support( pthread_mutex_t *mutex, boolean blocking, Watchdog_Interval timeout ) { 400079d4: 9d e3 bf 90 save %sp, -112, %sp ISR_Level *level ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 400079d8: 80 a6 20 00 cmp %i0, 0 400079dc: 32 80 00 05 bne,a 400079f0 <_POSIX_Mutex_Lock_support+0x1c> 400079e0: d2 06 00 00 ld [ %i0 ], %o1 ); return _POSIX_Mutex_From_core_mutex_status( (CORE_mutex_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 400079e4: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED } 400079e8: 81 c7 e0 08 ret 400079ec: 91 e8 00 08 restore %g0, %o0, %o0 400079f0: 80 a2 7f ff cmp %o1, -1 400079f4: 02 80 00 94 be 40007c44 <_POSIX_Mutex_Lock_support+0x270> 400079f8: 90 10 00 18 mov %i0, %o0 return (POSIX_Mutex_Control *) 400079fc: 11 10 00 6d sethi %hi(0x4001b400), %o0 40007a00: 94 07 bf f4 add %fp, -12, %o2 40007a04: 90 12 21 54 or %o0, 0x154, %o0 40007a08: 40 00 0e d8 call 4000b568 <_Objects_Get_isr_disable> 40007a0c: 96 07 bf f0 add %fp, -16, %o3 register POSIX_Mutex_Control *the_mutex; Objects_Locations location; ISR_Level level; the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &location, &level ); switch ( location ) { 40007a10: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007a14: 80 a0 60 00 cmp %g1, 0 40007a18: 12 80 00 21 bne 40007a9c <_POSIX_Mutex_Lock_support+0xc8> 40007a1c: a0 10 00 08 mov %o0, %l0 ); #endif case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_mutex_Seize( 40007a20: 31 10 00 6c sethi %hi(0x4001b000), %i0 40007a24: c2 06 20 f0 ld [ %i0 + 0xf0 ], %g1 ! 4001b0f0 <_Thread_Dispatch_disable_level> 40007a28: 80 a0 60 00 cmp %g1, 0 40007a2c: 12 80 00 22 bne 40007ab4 <_POSIX_Mutex_Lock_support+0xe0> 40007a30: 80 a6 60 00 cmp %i1, 0 Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 40007a34: 23 10 00 6c sethi %hi(0x4001b000), %l1 40007a38: c4 04 61 cc ld [ %l1 + 0x1cc ], %g2 ! 4001b1cc <_Thread_Executing> CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 40007a3c: d0 07 bf f0 ld [ %fp + -16 ], %o0 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40007a40: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 40007a44: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 40007a48: 80 a0 60 00 cmp %g1, 0 40007a4c: 22 80 00 26 be,a 40007ae4 <_POSIX_Mutex_Lock_support+0x110> 40007a50: c2 04 20 70 ld [ %l0 + 0x70 ], %g1 the_mutex->lock = CORE_MUTEX_LOCKED; 40007a54: c0 24 20 64 clr [ %l0 + 0x64 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40007a58: 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; 40007a5c: c6 04 20 5c ld [ %l0 + 0x5c ], %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; 40007a60: 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; 40007a64: c2 24 20 74 st %g1, [ %l0 + 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; 40007a68: c4 24 20 70 st %g2, [ %l0 + 0x70 ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40007a6c: 80 a0 e0 02 cmp %g3, 2 40007a70: 02 80 00 2b be 40007b1c <_POSIX_Mutex_Lock_support+0x148> 40007a74: c8 24 20 68 st %g4, [ %l0 + 0x68 ] 40007a78: 80 a0 e0 03 cmp %g3, 3 40007a7c: 22 80 00 2a be,a 40007b24 <_POSIX_Mutex_Lock_support+0x150> 40007a80: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( level ); 40007a84: 7f ff f1 0f call 40003ec0 40007a88: 01 00 00 00 nop the_mutex->Object.id, blocking, timeout, level ); return _POSIX_Mutex_From_core_mutex_status( 40007a8c: c2 04 61 cc ld [ %l1 + 0x1cc ], %g1 40007a90: 40 00 21 f2 call 40010258 <_POSIX_Mutex_From_core_mutex_status> 40007a94: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 40007a98: 30 bf ff d4 b,a 400079e8 <_POSIX_Mutex_Lock_support+0x14> register POSIX_Mutex_Control *the_mutex; Objects_Locations location; ISR_Level level; the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &location, &level ); switch ( location ) { 40007a9c: 80 a0 60 02 cmp %g1, 2 40007aa0: 28 bf ff d2 bleu,a 400079e8 <_POSIX_Mutex_Lock_support+0x14> 40007aa4: 90 10 20 16 mov 0x16, %o0 ); return _POSIX_Mutex_From_core_mutex_status( (CORE_mutex_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40007aa8: 40 00 04 15 call 40008afc <== NOT EXECUTED 40007aac: 01 00 00 00 nop <== NOT EXECUTED 40007ab0: 30 bf ff ce b,a 400079e8 <_POSIX_Mutex_Lock_support+0x14> <== NOT EXECUTED ); #endif case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_mutex_Seize( 40007ab4: 02 bf ff e1 be 40007a38 <_POSIX_Mutex_Lock_support+0x64> <== NOT EXECUTED 40007ab8: 23 10 00 6c sethi %hi(0x4001b000), %l1 <== NOT EXECUTED 40007abc: 03 10 00 6c sethi %hi(0x4001b000), %g1 <== NOT EXECUTED 40007ac0: c4 00 62 d0 ld [ %g1 + 0x2d0 ], %g2 ! 4001b2d0 <_System_state_Current> <== NOT EXECUTED 40007ac4: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 40007ac8: 08 bf ff dc bleu 40007a38 <_POSIX_Mutex_Lock_support+0x64> <== NOT EXECUTED 40007acc: 90 10 20 00 clr %o0 <== NOT EXECUTED 40007ad0: 92 10 20 00 clr %o1 <== NOT EXECUTED 40007ad4: 40 00 0d 45 call 4000afe8 <_Internal_error_Occurred> <== NOT EXECUTED 40007ad8: 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; 40007adc: 10 bf ff d7 b 40007a38 <_POSIX_Mutex_Lock_support+0x64> <== NOT EXECUTED 40007ae0: 23 10 00 6c sethi %hi(0x4001b000), %l1 <== 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 ) ) { 40007ae4: 80 a0 40 02 cmp %g1, %g2 40007ae8: 12 80 00 2d bne 40007b9c <_POSIX_Mutex_Lock_support+0x1c8> 40007aec: 80 a6 60 00 cmp %i1, 0 switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40007af0: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 40007af4: 80 a0 60 00 cmp %g1, 0 40007af8: 12 80 00 41 bne 40007bfc <_POSIX_Mutex_Lock_support+0x228> 40007afc: 80 a0 60 01 cmp %g1, 1 case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 40007b00: c2 04 20 68 ld [ %l0 + 0x68 ], %g1 <== NOT EXECUTED 40007b04: 82 00 60 01 inc %g1 <== NOT EXECUTED 40007b08: c2 24 20 68 st %g1, [ %l0 + 0x68 ] <== NOT EXECUTED _ISR_Enable( level ); 40007b0c: 7f ff f0 ed call 40003ec0 <== NOT EXECUTED 40007b10: 01 00 00 00 nop <== NOT EXECUTED the_mutex->Object.id, blocking, timeout, level ); return _POSIX_Mutex_From_core_mutex_status( 40007b14: 10 bf ff df b 40007a90 <_POSIX_Mutex_Lock_support+0xbc> <== NOT EXECUTED 40007b18: c2 04 61 cc ld [ %l1 + 0x1cc ], %g1 <== NOT EXECUTED 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++; 40007b1c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40007b20: 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++; 40007b24: 82 00 60 01 inc %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40007b28: 12 bf ff d7 bne 40007a84 <_POSIX_Mutex_Lock_support+0xb0> 40007b2c: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 40007b30: c6 04 20 60 ld [ %l0 + 0x60 ], %g3 current = executing->current_priority; 40007b34: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 if ( current == ceiling ) { 40007b38: 80 a0 40 03 cmp %g1, %g3 40007b3c: 02 80 00 49 be 40007c60 <_POSIX_Mutex_Lock_support+0x28c> 40007b40: 80 a0 c0 01 cmp %g3, %g1 _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 40007b44: 1a 80 00 36 bcc 40007c1c <_POSIX_Mutex_Lock_support+0x248> 40007b48: 82 10 20 06 mov 6, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007b4c: c2 06 20 f0 ld [ %i0 + 0xf0 ], %g1 40007b50: 82 00 60 01 inc %g1 40007b54: c2 26 20 f0 st %g1, [ %i0 + 0xf0 ] _Thread_Disable_dispatch(); _ISR_Enable( level ); 40007b58: 7f ff f0 da call 40003ec0 40007b5c: 01 00 00 00 nop _Thread_Change_priority( 40007b60: d2 04 20 60 ld [ %l0 + 0x60 ], %o1 40007b64: d0 04 20 70 ld [ %l0 + 0x70 ], %o0 40007b68: 40 00 12 66 call 4000c500 <_Thread_Change_priority> 40007b6c: 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 ) 40007b70: c2 06 20 f0 ld [ %i0 + 0xf0 ], %g1 40007b74: 82 00 7f ff add %g1, -1, %g1 40007b78: c2 26 20 f0 st %g1, [ %i0 + 0xf0 ] 40007b7c: c4 06 20 f0 ld [ %i0 + 0xf0 ], %g2 40007b80: 80 a0 a0 00 cmp %g2, 0 40007b84: 32 bf ff c3 bne,a 40007a90 <_POSIX_Mutex_Lock_support+0xbc> 40007b88: c2 04 61 cc ld [ %l1 + 0x1cc ], %g1 <== NOT EXECUTED _Thread_Dispatch(); 40007b8c: 40 00 13 81 call 4000c990 <_Thread_Dispatch> 40007b90: 01 00 00 00 nop 40007b94: 10 bf ff bf b 40007a90 <_POSIX_Mutex_Lock_support+0xbc> 40007b98: c2 04 61 cc ld [ %l1 + 0x1cc ], %g1 ); #endif case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_mutex_Seize( 40007b9c: 32 80 00 08 bne,a 40007bbc <_POSIX_Mutex_Lock_support+0x1e8> 40007ba0: c4 04 20 08 ld [ %l0 + 8 ], %g2 40007ba4: 7f ff f0 c7 call 40003ec0 40007ba8: d0 07 bf f0 ld [ %fp + -16 ], %o0 40007bac: c4 04 61 cc ld [ %l1 + 0x1cc ], %g2 40007bb0: 82 10 20 01 mov 1, %g1 40007bb4: 10 bf ff b6 b 40007a8c <_POSIX_Mutex_Lock_support+0xb8> 40007bb8: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] 40007bbc: c6 04 61 cc ld [ %l1 + 0x1cc ], %g3 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007bc0: c2 06 20 f0 ld [ %i0 + 0xf0 ], %g1 40007bc4: c4 20 e0 20 st %g2, [ %g3 + 0x20 ] 40007bc8: 82 00 60 01 inc %g1 RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; 40007bcc: 84 10 20 01 mov 1, %g2 40007bd0: c2 26 20 f0 st %g1, [ %i0 + 0xf0 ] 40007bd4: c4 24 20 44 st %g2, [ %l0 + 0x44 ] 40007bd8: a0 04 20 14 add %l0, 0x14, %l0 40007bdc: e0 20 e0 44 st %l0, [ %g3 + 0x44 ] 40007be0: 7f ff f0 b8 call 40003ec0 40007be4: d0 07 bf f0 ld [ %fp + -16 ], %o0 40007be8: 90 10 00 10 mov %l0, %o0 40007bec: 40 00 0a ae call 4000a6a4 <_CORE_mutex_Seize_interrupt_blocking> 40007bf0: 92 10 00 1a mov %i2, %o1 the_mutex->Object.id, blocking, timeout, level ); return _POSIX_Mutex_From_core_mutex_status( 40007bf4: 10 bf ff a7 b 40007a90 <_POSIX_Mutex_Lock_support+0xbc> 40007bf8: c2 04 61 cc ld [ %l1 + 0x1cc ], %g1 * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40007bfc: 12 bf ff e8 bne 40007b9c <_POSIX_Mutex_Lock_support+0x1c8> 40007c00: 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; 40007c04: 82 10 20 02 mov 2, %g1 40007c08: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] _ISR_Enable( level ); 40007c0c: 7f ff f0 ad call 40003ec0 40007c10: 01 00 00 00 nop 40007c14: 10 bf ff 9f b 40007a90 <_POSIX_Mutex_Lock_support+0xbc> 40007c18: c2 04 61 cc ld [ %l1 + 0x1cc ], %g1 ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 40007c1c: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] the_mutex->lock = CORE_MUTEX_UNLOCKED; 40007c20: c8 24 20 64 st %g4, [ %l0 + 0x64 ] the_mutex->nest_count = 0; /* undo locking above */ 40007c24: c0 24 20 68 clr [ %l0 + 0x68 ] executing->resource_count--; /* undo locking above */ 40007c28: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 40007c2c: 82 00 7f ff add %g1, -1, %g1 40007c30: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] _ISR_Enable( level ); 40007c34: 7f ff f0 a3 call 40003ec0 40007c38: 01 00 00 00 nop 40007c3c: 10 bf ff 95 b 40007a90 <_POSIX_Mutex_Lock_support+0xbc> 40007c40: c2 04 61 cc ld [ %l1 + 0x1cc ], %g1 ISR_Level *level ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40007c44: 7f ff fe f6 call 4000781c <== NOT EXECUTED 40007c48: 92 10 20 00 clr %o1 <== NOT EXECUTED 40007c4c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40007c50: 12 bf ff 66 bne 400079e8 <_POSIX_Mutex_Lock_support+0x14> <== NOT EXECUTED 40007c54: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 40007c58: 10 bf ff 69 b 400079fc <_POSIX_Mutex_Lock_support+0x28> <== NOT EXECUTED 40007c5c: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 40007c60: 7f ff f0 98 call 40003ec0 <== NOT EXECUTED 40007c64: 01 00 00 00 nop <== NOT EXECUTED 40007c68: 10 bf ff 8a b 40007a90 <_POSIX_Mutex_Lock_support+0xbc> <== NOT EXECUTED 40007c6c: c2 04 61 cc ld [ %l1 + 0x1cc ], %g1 <== NOT EXECUTED 40006774 <_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 ) 40006774: 80 a2 20 03 cmp %o0, 3 40006778: 18 80 00 06 bgu 40006790 <_POSIX_RWLock_Translate_core_RWLock_return_code+0x1c> 4000677c: 85 2a 20 02 sll %o0, 2, %g2 return _POSIX_RWLock_Return_codes[the_rwlock_status]; return POSIX_BOTTOM_REACHED(); } 40006780: 03 10 00 6e sethi %hi(0x4001b800), %g1 40006784: 82 10 61 9c or %g1, 0x19c, %g1 ! 4001b99c <_POSIX_RWLock_Return_codes> 40006788: 81 c3 e0 08 retl 4000678c: d0 00 40 02 ld [ %g1 + %g2 ], %o0 CORE_RWLock_Status the_rwlock_status ) { if ( the_rwlock_status <= CORE_RWLOCK_STATUS_LAST ) return _POSIX_RWLock_Return_codes[the_rwlock_status]; return POSIX_BOTTOM_REACHED(); 40006790: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40006794: 40 00 02 95 call 400071e8 <== NOT EXECUTED 40006798: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000679c: 01 00 00 00 nop 4000f3ec <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 4000f3ec: 9d e3 bf 98 save %sp, -104, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000f3f0: 21 10 00 80 sethi %hi(0x40020000), %l0 4000f3f4: c2 04 23 b0 ld [ %l0 + 0x3b0 ], %g1 ! 400203b0 <_Thread_Dispatch_disable_level> 4000f3f8: 82 00 60 01 inc %g1 4000f3fc: c2 24 23 b0 st %g1, [ %l0 + 0x3b0 ] char *name_p = (char *)name; _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { 4000f400: 80 a6 60 00 cmp %i1, 0 4000f404: 12 80 00 3b bne 4000f4f0 <_POSIX_Semaphore_Create_support+0x104> 4000f408: 80 a6 20 00 cmp %i0, 0 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSYS ); } if ( name ) { 4000f40c: 02 80 00 07 be 4000f428 <_POSIX_Semaphore_Create_support+0x3c> 4000f410: 23 10 00 81 sethi %hi(0x40020400), %l1 if( strlen(name) > PATH_MAX ) { 4000f414: 40 00 0f b9 call 400132f8 4000f418: 90 10 00 18 mov %i0, %o0 4000f41c: 80 a2 20 ff cmp %o0, 0xff 4000f420: 18 80 00 41 bgu 4000f524 <_POSIX_Semaphore_Create_support+0x138> 4000f424: 23 10 00 81 sethi %hi(0x40020400), %l1 * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) 4000f428: 7f ff e9 91 call 40009a6c <_Objects_Allocate> 4000f42c: 90 14 63 30 or %l1, 0x330, %o0 ! 40020730 <_POSIX_Semaphore_Information> } } the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 4000f430: b2 92 20 00 orcc %o0, 0, %i1 4000f434: 02 80 00 4f be 4000f570 <_POSIX_Semaphore_Create_support+0x184> 4000f438: 80 a6 20 00 cmp %i0, 0 } #endif the_semaphore->process_shared = pshared; if ( name ) { 4000f43c: 02 80 00 29 be 4000f4e0 <_POSIX_Semaphore_Create_support+0xf4> 4000f440: c0 26 60 10 clr [ %i1 + 0x10 ] the_semaphore->named = TRUE; 4000f444: 82 10 20 01 mov 1, %g1 the_semaphore->open_count = 1; the_semaphore->linked = TRUE; 4000f448: c2 26 60 18 st %g1, [ %i1 + 0x18 ] #endif the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; 4000f44c: c2 26 60 14 st %g1, [ %i1 + 0x14 ] the_semaphore->open_count = 1; 4000f450: c2 26 60 1c st %g1, [ %i1 + 0x1c ] /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 4000f454: 82 10 3f ff mov -1, %g1 _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 4000f458: 90 06 60 20 add %i1, 0x20, %o0 /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 4000f45c: c2 26 60 60 st %g1, [ %i1 + 0x60 ] * 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; 4000f460: c0 26 60 64 clr [ %i1 + 0x64 ] * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 4000f464: 94 10 00 1a mov %i2, %o2 4000f468: 7f ff e7 b1 call 4000932c <_CORE_semaphore_Initialize> 4000f46c: 92 06 60 60 add %i1, 0x60, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000f470: 90 14 63 30 or %l1, 0x330, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 4000f474: c4 06 60 08 ld [ %i1 + 8 ], %g2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000f478: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 4000f47c: 03 00 00 3f sethi %hi(0xfc00), %g1 4000f480: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000f484: 82 08 80 01 and %g2, %g1, %g1 4000f488: 80 a0 40 03 cmp %g1, %g3 4000f48c: 38 80 00 06 bgu,a 4000f4a4 <_POSIX_Semaphore_Create_support+0xb8> 4000f490: f2 26 c0 00 st %i1, [ %i3 ] <== NOT EXECUTED information->local_table[ index ] = the_object; 4000f494: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 4000f498: 83 28 60 02 sll %g1, 2, %g1 4000f49c: f2 20 80 01 st %i1, [ %g2 + %g1 ] * Make the semaphore available for use. */ _Objects_Open(&_POSIX_Semaphore_Information, &the_semaphore->Object, name_p); *the_sem = the_semaphore; 4000f4a0: f2 26 c0 00 st %i1, [ %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; 4000f4a4: f0 26 60 0c st %i0, [ %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 ) 4000f4a8: c2 04 23 b0 ld [ %l0 + 0x3b0 ], %g1 4000f4ac: b0 10 20 00 clr %i0 4000f4b0: 82 00 7f ff add %g1, -1, %g1 4000f4b4: c2 24 23 b0 st %g1, [ %l0 + 0x3b0 ] 4000f4b8: c4 04 23 b0 ld [ %l0 + 0x3b0 ], %g2 4000f4bc: 80 a0 a0 00 cmp %g2, 0 4000f4c0: 02 80 00 04 be 4000f4d0 <_POSIX_Semaphore_Create_support+0xe4> 4000f4c4: 01 00 00 00 nop ); #endif _Thread_Enable_dispatch(); return 0; } 4000f4c8: 81 c7 e0 08 ret 4000f4cc: 81 e8 00 00 restore _Thread_Dispatch(); 4000f4d0: 7f ff ef a4 call 4000b360 <_Thread_Dispatch> 4000f4d4: 01 00 00 00 nop 4000f4d8: 81 c7 e0 08 ret 4000f4dc: 81 e8 00 00 restore if ( name ) { the_semaphore->named = TRUE; the_semaphore->open_count = 1; the_semaphore->linked = TRUE; } else { the_semaphore->named = FALSE; 4000f4e0: c0 26 60 14 clr [ %i1 + 0x14 ] the_semaphore->open_count = 0; 4000f4e4: c0 26 60 1c clr [ %i1 + 0x1c ] the_semaphore->linked = FALSE; 4000f4e8: 10 bf ff db b 4000f454 <_POSIX_Semaphore_Create_support+0x68> 4000f4ec: c0 26 60 18 clr [ %i1 + 0x18 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000f4f0: c2 04 23 b0 ld [ %l0 + 0x3b0 ], %g1 4000f4f4: 82 00 7f ff add %g1, -1, %g1 4000f4f8: c2 24 23 b0 st %g1, [ %l0 + 0x3b0 ] 4000f4fc: c4 04 23 b0 ld [ %l0 + 0x3b0 ], %g2 4000f500: 80 a0 a0 00 cmp %g2, 0 4000f504: 02 80 00 15 be 4000f558 <_POSIX_Semaphore_Create_support+0x16c> 4000f508: 01 00 00 00 nop _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSYS ); 4000f50c: 40 00 09 03 call 40011918 <__errno> 4000f510: b0 10 3f ff mov -1, %i0 ! ffffffff 4000f514: 82 10 20 58 mov 0x58, %g1 4000f518: c2 22 00 00 st %g1, [ %o0 ] 4000f51c: 81 c7 e0 08 ret 4000f520: 81 e8 00 00 restore 4000f524: c2 04 23 b0 ld [ %l0 + 0x3b0 ], %g1 <== NOT EXECUTED 4000f528: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000f52c: c2 24 23 b0 st %g1, [ %l0 + 0x3b0 ] <== NOT EXECUTED 4000f530: c4 04 23 b0 ld [ %l0 + 0x3b0 ], %g2 <== NOT EXECUTED 4000f534: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000f538: 02 80 00 0b be 4000f564 <_POSIX_Semaphore_Create_support+0x178> <== NOT EXECUTED 4000f53c: 01 00 00 00 nop <== NOT EXECUTED } if ( name ) { if( strlen(name) > PATH_MAX ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4000f540: 40 00 08 f6 call 40011918 <__errno> <== NOT EXECUTED 4000f544: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4000f548: 82 10 20 5b mov 0x5b, %g1 <== NOT EXECUTED 4000f54c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000f550: 81 c7 e0 08 ret <== NOT EXECUTED 4000f554: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 4000f558: 7f ff ef 82 call 4000b360 <_Thread_Dispatch> 4000f55c: 01 00 00 00 nop 4000f560: 30 bf ff eb b,a 4000f50c <_POSIX_Semaphore_Create_support+0x120> 4000f564: 7f ff ef 7f call 4000b360 <_Thread_Dispatch> <== NOT EXECUTED 4000f568: 01 00 00 00 nop <== NOT EXECUTED 4000f56c: 30 bf ff f5 b,a 4000f540 <_POSIX_Semaphore_Create_support+0x154> <== 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 ) 4000f570: c2 04 23 b0 ld [ %l0 + 0x3b0 ], %g1 4000f574: 82 00 7f ff add %g1, -1, %g1 4000f578: c2 24 23 b0 st %g1, [ %l0 + 0x3b0 ] 4000f57c: c4 04 23 b0 ld [ %l0 + 0x3b0 ], %g2 4000f580: 80 a0 a0 00 cmp %g2, 0 4000f584: 02 80 00 08 be 4000f5a4 <_POSIX_Semaphore_Create_support+0x1b8> 4000f588: 01 00 00 00 nop the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); 4000f58c: 40 00 08 e3 call 40011918 <__errno> 4000f590: b0 10 3f ff mov -1, %i0 ! ffffffff 4000f594: 82 10 20 1c mov 0x1c, %g1 4000f598: c2 22 00 00 st %g1, [ %o0 ] 4000f59c: 81 c7 e0 08 ret 4000f5a0: 81 e8 00 00 restore _Thread_Dispatch(); 4000f5a4: 7f ff ef 6f call 4000b360 <_Thread_Dispatch> 4000f5a8: 01 00 00 00 nop 4000f5ac: 30 bf ff f8 b,a 4000f58c <_POSIX_Semaphore_Create_support+0x1a0> 4000f6a0 <_POSIX_Semaphore_Wait_support>: int _POSIX_Semaphore_Wait_support( sem_t *sem, boolean blocking, Watchdog_Interval timeout ) { 4000f6a0: 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 *) 4000f6a4: d2 06 00 00 ld [ %i0 ], %o1 4000f6a8: 94 07 bf f4 add %fp, -12, %o2 4000f6ac: 11 10 00 81 sethi %hi(0x40020400), %o0 4000f6b0: 7f ff ea 40 call 40009fb0 <_Objects_Get> 4000f6b4: 90 12 23 30 or %o0, 0x330, %o0 ! 40020730 <_POSIX_Semaphore_Information> POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 4000f6b8: c2 07 bf f4 ld [ %fp + -12 ], %g1 int _POSIX_Semaphore_Wait_support( sem_t *sem, boolean blocking, Watchdog_Interval timeout ) { 4000f6bc: 94 10 00 19 mov %i1, %o2 POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 4000f6c0: 80 a0 60 01 cmp %g1, 1 4000f6c4: 02 80 00 24 be 4000f754 <_POSIX_Semaphore_Wait_support+0xb4> 4000f6c8: 96 10 00 1a mov %i2, %o3 4000f6cc: 80 a0 60 01 cmp %g1, 1 4000f6d0: 2a 80 00 07 bcs,a 4000f6ec <_POSIX_Semaphore_Wait_support+0x4c> 4000f6d4: d2 02 20 08 ld [ %o0 + 8 ], %o1 4000f6d8: 80 a0 60 02 cmp %g1, 2 4000f6dc: 02 80 00 20 be 4000f75c <_POSIX_Semaphore_Wait_support+0xbc> 4000f6e0: 01 00 00 00 nop */ break; } } return 0; } 4000f6e4: 81 c7 e0 08 ret 4000f6e8: 91 e8 20 00 restore %g0, 0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_REMOTE: _Thread_Dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: _CORE_semaphore_Seize( 4000f6ec: 40 00 01 9b call 4000fd58 <_CORE_semaphore_Seize> 4000f6f0: 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 ) 4000f6f4: 03 10 00 80 sethi %hi(0x40020000), %g1 4000f6f8: c4 00 63 b0 ld [ %g1 + 0x3b0 ], %g2 ! 400203b0 <_Thread_Dispatch_disable_level> 4000f6fc: 84 00 bf ff add %g2, -1, %g2 4000f700: c4 20 63 b0 st %g2, [ %g1 + 0x3b0 ] 4000f704: c6 00 63 b0 ld [ %g1 + 0x3b0 ], %g3 4000f708: 80 a0 e0 00 cmp %g3, 0 4000f70c: 02 80 00 1a be 4000f774 <_POSIX_Semaphore_Wait_support+0xd4> 4000f710: 01 00 00 00 nop the_semaphore->Object.id, blocking, timeout ); _Thread_Enable_dispatch(); switch ( _Thread_Executing->Wait.return_code ) { 4000f714: 03 10 00 81 sethi %hi(0x40020400), %g1 <== NOT EXECUTED 4000f718: c4 00 60 8c ld [ %g1 + 0x8c ], %g2 ! 4002048c <_Thread_Executing> 4000f71c: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1 4000f720: 80 a0 60 02 cmp %g1, 2 4000f724: 02 80 00 06 be 4000f73c <_POSIX_Semaphore_Wait_support+0x9c> 4000f728: 80 a0 60 03 cmp %g1, 3 4000f72c: 02 80 00 16 be 4000f784 <_POSIX_Semaphore_Wait_support+0xe4> 4000f730: 80 a0 60 01 cmp %g1, 1 4000f734: 12 bf ff ec bne 4000f6e4 <_POSIX_Semaphore_Wait_support+0x44> 4000f738: 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 ); 4000f73c: 40 00 08 77 call 40011918 <__errno> 4000f740: b0 10 3f ff mov -1, %i0 ! ffffffff 4000f744: 82 10 20 0b mov 0xb, %g1 4000f748: c2 22 00 00 st %g1, [ %o0 ] 4000f74c: 81 c7 e0 08 ret 4000f750: 81 e8 00 00 restore the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_REMOTE: _Thread_Dispatch(); 4000f754: 7f ff ef 03 call 4000b360 <_Thread_Dispatch> <== NOT EXECUTED 4000f758: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 4000f75c: 40 00 08 6f call 40011918 <__errno> 4000f760: b0 10 3f ff mov -1, %i0 ! ffffffff 4000f764: 82 10 20 16 mov 0x16, %g1 4000f768: c2 22 00 00 st %g1, [ %o0 ] 4000f76c: 81 c7 e0 08 ret 4000f770: 81 e8 00 00 restore _Thread_Dispatch(); 4000f774: 7f ff ee fb call 4000b360 <_Thread_Dispatch> 4000f778: 01 00 00 00 nop the_semaphore->Object.id, blocking, timeout ); _Thread_Enable_dispatch(); switch ( _Thread_Executing->Wait.return_code ) { 4000f77c: 10 bf ff e7 b 4000f718 <_POSIX_Semaphore_Wait_support+0x78> 4000f780: 03 10 00 81 sethi %hi(0x40020400), %g1 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 ); case CORE_SEMAPHORE_TIMEOUT: rtems_set_errno_and_return_minus_one( ETIMEDOUT ); 4000f784: 40 00 08 65 call 40011918 <__errno> 4000f788: b0 10 3f ff mov -1, %i0 4000f78c: 82 10 20 74 mov 0x74, %g1 4000f790: c2 22 00 00 st %g1, [ %o0 ] 4000f794: 81 c7 e0 08 ret 4000f798: 81 e8 00 00 restore 40005b78 <_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 ) 40005b78: 80 a2 20 06 cmp %o0, 6 40005b7c: 18 80 00 06 bgu 40005b94 <_POSIX_Spinlock_Translate_core_spinlock_return_code+0x1c> 40005b80: 85 2a 20 02 sll %o0, 2, %g2 return _POSIX_Spinlock_Return_codes[the_spinlock_status]; return POSIX_BOTTOM_REACHED(); } 40005b84: 03 10 00 4d sethi %hi(0x40013400), %g1 40005b88: 82 10 61 2c or %g1, 0x12c, %g1 ! 4001352c <_POSIX_Spinlock_Return_codes> 40005b8c: 81 c3 e0 08 retl 40005b90: d0 00 40 02 ld [ %g1 + %g2 ], %o0 CORE_spinlock_Status the_spinlock_status ) { if ( the_spinlock_status <= CORE_SPINLOCK_STATUS_LAST ) return _POSIX_Spinlock_Return_codes[the_spinlock_status]; return POSIX_BOTTOM_REACHED(); 40005b94: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40005b98: 40 00 00 66 call 40005d30 <== NOT EXECUTED 40005b9c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40005ba0: 01 00 00 00 nop 400069b8 <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body( void ) { 400069b8: 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; 400069bc: 03 10 00 7b sethi %hi(0x4001ec00), %g1 400069c0: e4 00 63 5c ld [ %g1 + 0x35c ], %l2 ! 4001ef5c <_POSIX_Threads_User_initialization_threads> maximum = _POSIX_Threads_Number_of_initialization_threads; 400069c4: 03 10 00 7c sethi %hi(0x4001f000), %g1 if ( !user_threads || maximum == 0 ) 400069c8: 80 a4 a0 00 cmp %l2, 0 400069cc: 02 80 00 54 be 40006b1c <_POSIX_Threads_Initialize_user_threads_body+0x164> 400069d0: ec 00 60 2c ld [ %g1 + 0x2c ], %l6 400069d4: 80 a5 a0 00 cmp %l6, 0 400069d8: 02 80 00 51 be 40006b1c <_POSIX_Threads_Initialize_user_threads_body+0x164> 400069dc: 03 10 00 72 sethi %hi(0x4001c800), %g1 * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { status = pthread_attr_init( &attr ); assert( !status ); 400069e0: 05 10 00 6f sethi %hi(0x4001bc00), %g2 400069e4: aa 10 63 88 or %g1, 0x388, %l5 400069e8: a8 10 a3 68 or %g2, 0x368, %l4 * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 400069ec: a6 10 20 00 clr %l3 400069f0: a2 10 20 00 clr %l1 400069f4: a0 07 bf bc add %fp, -68, %l0 400069f8: 10 80 00 1a b 40006a60 <_POSIX_Threads_Initialize_user_threads_body+0xa8> 400069fc: ae 07 bf f4 add %fp, -12, %l7 status = pthread_attr_init( &attr ); assert( !status ); status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 40006a00: 40 00 20 db call 4000ed6c 40006a04: 90 10 00 10 mov %l0, %o0 assert( !status ); 40006a08: 80 a2 20 00 cmp %o0, 0 40006a0c: 12 80 00 26 bne 40006aa4 <_POSIX_Threads_Initialize_user_threads_body+0xec> 40006a10: 94 10 00 14 mov %l4, %o2 status = pthread_attr_setstacksize( &attr, user_threads[ index ].stack_size); 40006a14: 82 04 80 11 add %l2, %l1, %g1 40006a18: d2 00 60 04 ld [ %g1 + 4 ], %o1 40006a1c: 40 00 20 e4 call 4000edac 40006a20: 90 10 00 10 mov %l0, %o0 assert( !status ); 40006a24: 80 a2 20 00 cmp %o0, 0 40006a28: 12 80 00 2a bne 40006ad0 <_POSIX_Threads_Initialize_user_threads_body+0x118> 40006a2c: 90 10 00 15 mov %l5, %o0 status = pthread_create( 40006a30: d4 04 40 12 ld [ %l1 + %l2 ], %o2 40006a34: 92 10 00 10 mov %l0, %o1 40006a38: 96 10 20 00 clr %o3 40006a3c: 90 10 00 17 mov %l7, %o0 40006a40: 7f ff fe dd call 400065b4 40006a44: a2 04 60 08 add %l1, 8, %l1 &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); assert( !status ); 40006a48: 80 a2 20 00 cmp %o0, 0 40006a4c: 12 80 00 2e bne 40006b04 <_POSIX_Threads_Initialize_user_threads_body+0x14c> 40006a50: 90 10 00 15 mov %l5, %o0 * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 40006a54: 80 a4 c0 16 cmp %l3, %l6 40006a58: 02 80 00 31 be 40006b1c <_POSIX_Threads_Initialize_user_threads_body+0x164> 40006a5c: 01 00 00 00 nop status = pthread_attr_init( &attr ); 40006a60: 90 10 00 10 mov %l0, %o0 40006a64: 40 00 20 b7 call 4000ed40 40006a68: a6 04 e0 01 inc %l3 assert( !status ); 40006a6c: 80 a2 20 00 cmp %o0, 0 40006a70: 02 bf ff e4 be 40006a00 <_POSIX_Threads_Initialize_user_threads_body+0x48> 40006a74: 92 10 20 02 mov 2, %o1 40006a78: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED 40006a7c: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 40006a80: 7f ff f0 ff call 40002e7c <__assert> <== NOT EXECUTED 40006a84: 92 10 20 47 mov 0x47, %o1 <== NOT EXECUTED status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 40006a88: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40006a8c: 40 00 20 b8 call 4000ed6c <== NOT EXECUTED 40006a90: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED assert( !status ); 40006a94: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40006a98: 02 bf ff e0 be 40006a18 <_POSIX_Threads_Initialize_user_threads_body+0x60> <== NOT EXECUTED 40006a9c: 82 04 80 11 add %l2, %l1, %g1 <== NOT EXECUTED 40006aa0: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED 40006aa4: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 40006aa8: 7f ff f0 f5 call 40002e7c <__assert> <== NOT EXECUTED 40006aac: 92 10 20 4a mov 0x4a, %o1 <== NOT EXECUTED status = pthread_attr_setstacksize( &attr, user_threads[ index ].stack_size); 40006ab0: 82 04 80 11 add %l2, %l1, %g1 <== NOT EXECUTED 40006ab4: d2 00 60 04 ld [ %g1 + 4 ], %o1 <== NOT EXECUTED 40006ab8: 40 00 20 bd call 4000edac <== NOT EXECUTED 40006abc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED assert( !status ); 40006ac0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40006ac4: 22 bf ff dc be,a 40006a34 <_POSIX_Threads_Initialize_user_threads_body+0x7c> <== NOT EXECUTED 40006ac8: d4 04 40 12 ld [ %l1 + %l2 ], %o2 <== NOT EXECUTED 40006acc: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 40006ad0: 92 10 20 4d mov 0x4d, %o1 <== NOT EXECUTED 40006ad4: 7f ff f0 ea call 40002e7c <__assert> <== NOT EXECUTED 40006ad8: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED status = pthread_create( 40006adc: d4 04 40 12 ld [ %l1 + %l2 ], %o2 <== NOT EXECUTED 40006ae0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40006ae4: 96 10 20 00 clr %o3 <== NOT EXECUTED 40006ae8: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 40006aec: 7f ff fe b2 call 400065b4 <== NOT EXECUTED 40006af0: a2 04 60 08 add %l1, 8, %l1 <== NOT EXECUTED &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); assert( !status ); 40006af4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40006af8: 02 bf ff d8 be 40006a58 <_POSIX_Threads_Initialize_user_threads_body+0xa0> <== NOT EXECUTED 40006afc: 80 a4 c0 16 cmp %l3, %l6 <== NOT EXECUTED 40006b00: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 40006b04: 92 10 20 55 mov 0x55, %o1 <== NOT EXECUTED 40006b08: 7f ff f0 dd call 40002e7c <__assert> <== NOT EXECUTED 40006b0c: 94 10 00 14 mov %l4, %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++ ) { 40006b10: 80 a4 c0 16 cmp %l3, %l6 <== NOT EXECUTED 40006b14: 12 bf ff d4 bne 40006a64 <_POSIX_Threads_Initialize_user_threads_body+0xac> <== NOT EXECUTED 40006b18: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40006b1c: 81 c7 e0 08 ret 40006b20: 81 e8 00 00 restore 4000cd1c <_POSIX_Threads_Sporadic_budget_TSR>: void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id, void *argument ) { 4000cd1c: 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 ]; 4000cd20: f0 06 61 70 ld [ %i1 + 0x170 ], %i0 ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget ); 4000cd24: 40 00 04 09 call 4000dd48 <_Timespec_To_ticks> 4000cd28: 90 06 20 90 add %i0, 0x90, %o0 if ( !ticks ) 4000cd2c: 80 a2 20 00 cmp %o0, 0 4000cd30: 22 80 00 02 be,a 4000cd38 <_POSIX_Threads_Sporadic_budget_TSR+0x1c> 4000cd34: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000cd38: 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 || 4000cd3c: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 4000cd40: 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; 4000cd44: d0 26 60 84 st %o0, [ %i1 + 0x84 ] 4000cd48: 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 || 4000cd4c: 80 a0 e0 00 cmp %g3, 0 4000cd50: 02 80 00 10 be 4000cd90 <_POSIX_Threads_Sporadic_budget_TSR+0x74> 4000cd54: d2 26 60 18 st %o1, [ %i1 + 0x18 ] 4000cd58: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 4000cd5c: 80 a2 40 01 cmp %o1, %g1 4000cd60: 0a 80 00 0d bcs 4000cd94 <_POSIX_Threads_Sporadic_budget_TSR+0x78> 4000cd64: 90 10 00 19 mov %i1, %o0 the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); ticks = _Timespec_To_ticks( &api->schedparam.ss_replenish_period ); 4000cd68: 40 00 03 f8 call 4000dd48 <_Timespec_To_ticks> <== NOT EXECUTED 4000cd6c: 90 06 20 88 add %i0, 0x88, %o0 <== NOT EXECUTED if ( !ticks ) 4000cd70: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000cd74: 22 80 00 10 be,a 4000cdb4 <_POSIX_Threads_Sporadic_budget_TSR+0x98> <== NOT EXECUTED 4000cd78: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000cd7c: d0 26 20 a8 st %o0, [ %i0 + 0xa8 ] <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4000cd80: b2 06 20 9c add %i0, 0x9c, %i1 4000cd84: 31 10 00 6b sethi %hi(0x4001ac00), %i0 4000cd88: 7f ff f6 4a call 4000a6b0 <_Watchdog_Insert> 4000cd8c: 91 ee 20 5c restore %i0, 0x5c, %o0 new_priority = _POSIX_Priority_To_core( api->ss_high_priority ); the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); 4000cd90: 90 10 00 19 mov %i1, %o0 4000cd94: 7f ff ef fc call 40008d84 <_Thread_Change_priority> 4000cd98: 94 10 20 01 mov 1, %o2 ticks = _Timespec_To_ticks( &api->schedparam.ss_replenish_period ); 4000cd9c: 40 00 03 eb call 4000dd48 <_Timespec_To_ticks> 4000cda0: 90 06 20 88 add %i0, 0x88, %o0 if ( !ticks ) 4000cda4: 80 a2 20 00 cmp %o0, 0 4000cda8: 32 bf ff f6 bne,a 4000cd80 <_POSIX_Threads_Sporadic_budget_TSR+0x64> 4000cdac: d0 26 20 a8 st %o0, [ %i0 + 0xa8 ] 4000cdb0: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000cdb4: b2 06 20 9c add %i0, 0x9c, %i1 <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000cdb8: d0 26 20 a8 st %o0, [ %i0 + 0xa8 ] <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4000cdbc: 31 10 00 6b sethi %hi(0x4001ac00), %i0 <== NOT EXECUTED 4000cdc0: 7f ff f6 3c call 4000a6b0 <_Watchdog_Insert> <== NOT EXECUTED 4000cdc4: 91 ee 20 5c restore %i0, 0x5c, %o0 <== NOT EXECUTED 4000cdc8: 01 00 00 00 nop 4000cccc <_POSIX_Threads_Sporadic_budget_callout>: ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4000cccc: c4 02 21 70 ld [ %o0 + 0x170 ], %g2 the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ new_priority = _POSIX_Priority_To_core( api->schedparam.ss_low_priority ); the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 4000ccd0: c8 02 20 1c ld [ %o0 + 0x1c ], %g4 RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (255 - priority); 4000ccd4: c6 00 a0 84 ld [ %g2 + 0x84 ], %g3 * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 4000ccd8: 82 10 3f ff mov -1, %g1 4000ccdc: 84 10 20 ff mov 0xff, %g2 4000cce0: c2 22 20 84 st %g1, [ %o0 + 0x84 ] 4000cce4: 92 20 80 03 sub %g2, %g3, %o1 new_priority = _POSIX_Priority_To_core( api->schedparam.ss_low_priority ); the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 4000cce8: 80 a1 20 00 cmp %g4, 0 4000ccec: 02 80 00 06 be 4000cd04 <_POSIX_Threads_Sporadic_budget_callout+0x38> 4000ccf0: d2 22 20 18 st %o1, [ %o0 + 0x18 ] 4000ccf4: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 <== NOT EXECUTED 4000ccf8: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED 4000ccfc: 1a 80 00 06 bcc 4000cd14 <_POSIX_Threads_Sporadic_budget_callout+0x48> <== NOT EXECUTED 4000cd00: 01 00 00 00 nop <== NOT EXECUTED the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); 4000cd04: 94 10 20 01 mov 1, %o2 ! 1 4000cd08: 82 13 c0 00 mov %o7, %g1 4000cd0c: 7f ff f0 1e call 40008d84 <_Thread_Change_priority> 4000cd10: 9e 10 40 00 mov %g1, %o7 4000cd14: 81 c3 e0 08 retl <== NOT EXECUTED 4000cd18: 01 00 00 00 nop 4000541c <_POSIX_Threads_cancel_run>: */ void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 4000541c: 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 ]; 40005420: e2 06 21 70 ld [ %i0 + 0x170 ], %l1 handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 40005424: 82 10 20 01 mov 1, %g1 while ( !_Chain_Is_empty( handler_stack ) ) { 40005428: c4 04 60 d8 ld [ %l1 + 0xd8 ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000542c: b2 04 60 dc add %l1, 0xdc, %i1 40005430: 80 a0 80 19 cmp %g2, %i1 40005434: 02 80 00 17 be 40005490 <_POSIX_Threads_cancel_run+0x74> 40005438: c2 24 60 cc st %g1, [ %l1 + 0xcc ] 4000543c: 03 10 00 5f sethi %hi(0x40017c00), %g1 <== NOT EXECUTED 40005440: a4 10 60 9c or %g1, 0x9c, %l2 ! 40017c9c <_Workspace_Area> <== NOT EXECUTED _ISR_Disable( level ); 40005444: 7f ff f2 aa call 40001eec <== NOT EXECUTED 40005448: 01 00 00 00 nop <== NOT EXECUTED handler = (POSIX_Cancel_Handler_control *) 4000544c: e0 06 60 04 ld [ %i1 + 4 ], %l0 <== NOT EXECUTED ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 40005450: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED previous = the_node->previous; 40005454: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED next->previous = previous; previous->next = next; 40005458: 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; 4000545c: c2 20 a0 04 st %g1, [ %g2 + 4 ] <== NOT EXECUTED _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 40005460: 7f ff f2 a7 call 40001efc <== NOT EXECUTED 40005464: 01 00 00 00 nop <== NOT EXECUTED (*handler->routine)( handler->arg ); 40005468: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 4000546c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005470: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 40005474: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40005478: 40 00 0a e8 call 40008018 <_Heap_Free> <== NOT EXECUTED 4000547c: 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 ) ) { 40005480: c2 04 60 d8 ld [ %l1 + 0xd8 ], %g1 <== NOT EXECUTED 40005484: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED 40005488: 12 bf ff ef bne 40005444 <_POSIX_Threads_cancel_run+0x28> <== NOT EXECUTED 4000548c: 01 00 00 00 nop <== NOT EXECUTED } /* Now we can delete the thread */ the_thread->Wait.return_argument = PTHREAD_CANCELED; _Thread_Close( 40005490: c6 06 20 08 ld [ %i0 + 8 ], %g3 40005494: 03 10 00 5e sethi %hi(0x40017800), %g1 40005498: 85 30 e0 16 srl %g3, 0x16, %g2 4000549c: 82 10 63 b0 or %g1, 0x3b0, %g1 400054a0: 84 08 a0 1c and %g2, 0x1c, %g2 400054a4: c8 00 40 02 ld [ %g1 + %g2 ], %g4 400054a8: 87 30 e0 1b srl %g3, 0x1b, %g3 400054ac: 87 28 e0 02 sll %g3, 2, %g3 400054b0: d0 01 00 03 ld [ %g4 + %g3 ], %o0 400054b4: 92 10 00 18 mov %i0, %o1 _Workspace_Free( handler ); } /* Now we can delete the thread */ the_thread->Wait.return_argument = PTHREAD_CANCELED; 400054b8: 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 ); 400054bc: b2 10 00 18 mov %i0, %i1 400054c0: c2 26 20 28 st %g1, [ %i0 + 0x28 ] _Thread_Close( 400054c4: 40 00 11 c1 call 40009bc8 <_Thread_Close> 400054c8: 31 10 00 5f sethi %hi(0x40017c00), %i0 400054cc: 40 00 0d 0e call 40008904 <_Objects_Free> 400054d0: 91 ee 23 38 restore %i0, 0x338, %o0 400054d4: 01 00 00 00 nop 4000b694 <_POSIX_Timer_TSR>: * Description: This is the operation that is ran when a timer expires * ***************************************************************************/ void _POSIX_Timer_TSR(Objects_Id timer, void *data) { 4000b694: 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; 4000b698: c2 06 60 68 ld [ %i1 + 0x68 ], %g1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 4000b69c: 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; 4000b6a0: 82 00 60 01 inc %g1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 4000b6a4: 80 a0 a0 00 cmp %g2, 0 4000b6a8: 12 80 00 0e bne 4000b6e0 <_POSIX_Timer_TSR+0x4c> 4000b6ac: c2 26 60 68 st %g1, [ %i1 + 0x68 ] 4000b6b0: c2 06 60 58 ld [ %i1 + 0x58 ], %g1 <== NOT EXECUTED 4000b6b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000b6b8: 32 80 00 0b bne,a 4000b6e4 <_POSIX_Timer_TSR+0x50> <== NOT EXECUTED 4000b6bc: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 <== NOT EXECUTED /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 4000b6c0: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED 4000b6c4: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] <== NOT EXECUTED /* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) { 4000b6c8: d0 06 60 38 ld [ %i1 + 0x38 ], %o0 4000b6cc: 40 00 22 7b call 400140b8 4000b6d0: d2 06 60 44 ld [ %i1 + 0x44 ], %o1 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 4000b6d4: c0 26 60 68 clr [ %i1 + 0x68 ] 4000b6d8: 81 c7 e0 08 ret 4000b6dc: 81 e8 00 00 restore ( 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( 4000b6e0: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 4000b6e4: d4 06 60 08 ld [ %i1 + 8 ], %o2 4000b6e8: 90 06 60 10 add %i1, 0x10, %o0 4000b6ec: 17 10 00 2d sethi %hi(0x4000b400), %o3 4000b6f0: 98 10 00 19 mov %i1, %o4 4000b6f4: 7f ff ff cd call 4000b628 <_Watchdog_Insert_ticks_helper> 4000b6f8: 96 12 e2 94 or %o3, 0x294, %o3 ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 4000b6fc: 80 a2 20 00 cmp %o0, 0 4000b700: 02 bf ff f6 be 4000b6d8 <_POSIX_Timer_TSR+0x44> 4000b704: 01 00 00 00 nop return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 4000b708: 40 00 0a 9b call 4000e174 <_TOD_Get> 4000b70c: 90 06 60 6c add %i1, 0x6c, %o0 /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 4000b710: 82 10 20 03 mov 3, %g1 4000b714: 10 bf ff ed b 4000b6c8 <_POSIX_Timer_TSR+0x34> 4000b718: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] 4000ca70 <_POSIX_signals_Abnormal_termination_handler>: /*** PROCESS WIDE STUFF ****/ sigset_t _POSIX_signals_Pending; void _POSIX_signals_Abnormal_termination_handler( int signo ) { 4000ca70: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED exit( 1 ); 4000ca74: 40 00 08 e1 call 4000edf8 <== NOT EXECUTED 4000ca78: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000ca7c: 01 00 00 00 nop 4000e46c <_POSIX_signals_Check_signal>: boolean _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, boolean is_global ) { 4000e46c: 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, 4000e470: 98 10 20 01 mov 1, %o4 4000e474: 96 10 00 1a mov %i2, %o3 4000e478: a6 07 bf ec add %fp, -20, %l3 4000e47c: 90 10 00 18 mov %i0, %o0 4000e480: 92 10 00 19 mov %i1, %o1 4000e484: 40 00 00 2f call 4000e540 <_POSIX_signals_Clear_signals> 4000e488: 94 10 00 13 mov %l3, %o2 4000e48c: 80 a2 20 00 cmp %o0, 0 4000e490: 02 80 00 23 be 4000e51c <_POSIX_signals_Check_signal+0xb0> 4000e494: 03 10 00 6c sethi %hi(0x4001b000), %g1 /* * Since we made a union of these, only one test is necessary but this is * safer. */ assert( _POSIX_signals_Vectors[ signo ].sa_handler || 4000e498: a4 10 61 f4 or %g1, 0x1f4, %l2 ! 4001b1f4 <_POSIX_signals_Vectors> 4000e49c: 83 2e 60 04 sll %i1, 4, %g1 4000e4a0: 85 2e 60 02 sll %i1, 2, %g2 4000e4a4: a0 20 40 02 sub %g1, %g2, %l0 4000e4a8: b4 04 00 12 add %l0, %l2, %i2 4000e4ac: c2 06 a0 08 ld [ %i2 + 8 ], %g1 4000e4b0: 80 a0 60 00 cmp %g1, 0 4000e4b4: 02 80 00 1c be 4000e524 <_POSIX_signals_Check_signal+0xb8> 4000e4b8: 11 10 00 64 sethi %hi(0x40019000), %o0 /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 4000e4bc: 80 a0 60 01 cmp %g1, 1 4000e4c0: 02 80 00 17 be 4000e51c <_POSIX_signals_Check_signal+0xb0> 4000e4c4: 01 00 00 00 nop /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 4000e4c8: e2 06 20 c4 ld [ %i0 + 0xc4 ], %l1 api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 4000e4cc: c2 06 a0 04 ld [ %i2 + 4 ], %g1 /* Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 4000e4d0: c4 04 80 10 ld [ %l2 + %l0 ], %g2 /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 4000e4d4: 82 10 40 11 or %g1, %l1, %g1 /* Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 4000e4d8: 80 a0 a0 02 cmp %g2, 2 4000e4dc: 02 80 00 08 be 4000e4fc <_POSIX_signals_Check_signal+0x90> 4000e4e0: c2 26 20 c4 st %g1, [ %i0 + 0xc4 ] &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 4000e4e4: c2 06 a0 08 ld [ %i2 + 8 ], %g1 4000e4e8: 9f c0 40 00 call %g1 4000e4ec: 90 10 00 19 mov %i1, %o0 /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 4000e4f0: e2 26 20 c4 st %l1, [ %i0 + 0xc4 ] 4000e4f4: 81 c7 e0 08 ret 4000e4f8: 91 e8 20 01 restore %g0, 1, %o0 case SA_SIGINFO: /* * * assert( is_global ); */ (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 4000e4fc: c2 06 a0 08 ld [ %i2 + 8 ], %g1 4000e500: 90 10 00 19 mov %i1, %o0 4000e504: 92 10 00 13 mov %l3, %o1 4000e508: 9f c0 40 00 call %g1 4000e50c: 94 10 20 00 clr %o2 /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 4000e510: e2 26 20 c4 st %l1, [ %i0 + 0xc4 ] 4000e514: 81 c7 e0 08 ret 4000e518: 91 e8 20 01 restore %g0, 1, %o0 return TRUE; } 4000e51c: 81 c7 e0 08 ret 4000e520: 91 e8 20 00 restore %g0, 0, %o0 /* * Since we made a union of these, only one test is necessary but this is * safer. */ assert( _POSIX_signals_Vectors[ signo ].sa_handler || 4000e524: 92 10 20 33 mov 0x33, %o1 <== NOT EXECUTED 4000e528: 90 12 20 f0 or %o0, 0xf0, %o0 <== NOT EXECUTED 4000e52c: 15 10 00 64 sethi %hi(0x40019000), %o2 <== NOT EXECUTED 4000e530: 7f ff ce 88 call 40001f50 <__assert> <== NOT EXECUTED 4000e534: 94 12 a1 40 or %o2, 0x140, %o2 ! 40019140 <_POSIX_Threads_Default_attributes+0x178> <== NOT EXECUTED 4000e538: 10 bf ff e1 b 4000e4bc <_POSIX_signals_Check_signal+0x50> <== NOT EXECUTED 4000e53c: c2 06 a0 08 ld [ %i2 + 8 ], %g1 <== NOT EXECUTED 4000e540 <_POSIX_signals_Clear_signals>: int signo, siginfo_t *info, boolean is_global, boolean check_blocked ) { 4000e540: 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 ); 4000e544: 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 ) 4000e548: 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 ); 4000e54c: 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 ) 4000e550: b8 10 3f ff mov -1, %i4 4000e554: 02 80 00 04 be 4000e564 <_POSIX_signals_Clear_signals+0x24> 4000e558: a1 28 40 02 sll %g1, %g2, %l0 signals_blocked = ~api->signals_blocked; 4000e55c: c2 06 20 c4 ld [ %i0 + 0xc4 ], %g1 4000e560: 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 ); 4000e564: 7f ff ce 24 call 40001df4 4000e568: 01 00 00 00 nop 4000e56c: a2 10 00 08 mov %o0, %l1 if ( is_global ) { 4000e570: 80 a6 e0 00 cmp %i3, 0 4000e574: 22 80 00 16 be,a 4000e5cc <_POSIX_signals_Clear_signals+0x8c> 4000e578: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { 4000e57c: 05 10 00 6c sethi %hi(0x4001b000), %g2 4000e580: c2 00 a3 c0 ld [ %g2 + 0x3c0 ], %g1 ! 4001b3c0 <_POSIX_signals_Pending> 4000e584: 82 0c 00 01 and %l0, %g1, %g1 4000e588: 80 88 40 1c btst %g1, %i4 4000e58c: 02 80 00 1a be 4000e5f4 <_POSIX_signals_Clear_signals+0xb4> 4000e590: 85 2e 60 02 sll %i1, 2, %g2 if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 4000e594: 87 2e 60 04 sll %i1, 4, %g3 4000e598: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000e59c: 86 20 c0 02 sub %g3, %g2, %g3 4000e5a0: 82 10 61 f4 or %g1, 0x1f4, %g1 4000e5a4: c4 00 40 03 ld [ %g1 + %g3 ], %g2 4000e5a8: 80 a0 a0 02 cmp %g2, 2 4000e5ac: 02 80 00 17 be 4000e608 <_POSIX_signals_Clear_signals+0xc8> 4000e5b0: 90 10 00 10 mov %l0, %o0 &psiginfo->Node ); } else do_callout = FALSE; } else _POSIX_signals_Clear_process_signals( mask ); 4000e5b4: 40 00 01 f6 call 4000ed8c <_POSIX_signals_Clear_process_signals> 4000e5b8: b0 10 20 01 mov 1, %i0 if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; do_callout = TRUE; } } _ISR_Enable( level ); 4000e5bc: 7f ff ce 12 call 40001e04 4000e5c0: 90 10 00 11 mov %l1, %o0 return do_callout; } 4000e5c4: 81 c7 e0 08 ret 4000e5c8: 81 e8 00 00 restore } else _POSIX_signals_Clear_process_signals( mask ); do_callout = TRUE; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { 4000e5cc: 82 0c 00 08 and %l0, %o0, %g1 4000e5d0: 80 88 40 1c btst %g1, %i4 4000e5d4: 02 80 00 08 be 4000e5f4 <_POSIX_signals_Clear_signals+0xb4> 4000e5d8: 82 2a 00 10 andn %o0, %l0, %g1 api->signals_pending &= ~mask; 4000e5dc: c2 26 20 c8 st %g1, [ %i0 + 0xc8 ] 4000e5e0: b0 10 20 01 mov 1, %i0 do_callout = TRUE; } } _ISR_Enable( level ); 4000e5e4: 7f ff ce 08 call 40001e04 4000e5e8: 90 10 00 11 mov %l1, %o0 return do_callout; } 4000e5ec: 81 c7 e0 08 ret 4000e5f0: 81 e8 00 00 restore _POSIX_signals_Clear_process_signals( mask ); do_callout = TRUE; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; 4000e5f4: b0 10 20 00 clr %i0 do_callout = TRUE; } } _ISR_Enable( level ); 4000e5f8: 7f ff ce 03 call 40001e04 4000e5fc: 90 10 00 11 mov %l1, %o0 return do_callout; } 4000e600: 81 c7 e0 08 ret 4000e604: 81 e8 00 00 restore _ISR_Disable( level ); if ( is_global ) { if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 4000e608: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000e60c: 82 10 63 c4 or %g1, 0x3c4, %g1 ! 4001b3c4 <_POSIX_signals_Siginfo> */ RTEMS_INLINE_ROUTINE boolean _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000e610: f8 00 c0 01 ld [ %g3 + %g1 ], %i4 4000e614: 88 00 c0 01 add %g3, %g1, %g4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000e618: 9a 01 20 04 add %g4, 4, %o5 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 4000e61c: 80 a7 00 0d cmp %i4, %o5 4000e620: 32 80 00 1b bne,a 4000e68c <_POSIX_signals_Clear_signals+0x14c> 4000e624: c4 07 00 00 ld [ %i4 ], %g2 4000e628: b8 10 20 00 clr %i4 <== NOT EXECUTED 4000e62c: b6 10 20 00 clr %i3 <== NOT EXECUTED _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); if ( _Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) _POSIX_signals_Clear_process_signals( mask ); 4000e630: 40 00 01 d7 call 4000ed8c <_POSIX_signals_Clear_process_signals> 4000e634: 90 10 00 10 mov %l0, %o0 if ( psiginfo ) { 4000e638: 80 a7 20 00 cmp %i4, 0 4000e63c: 02 bf ff ea be 4000e5e4 <_POSIX_signals_Clear_signals+0xa4> 4000e640: b0 10 20 01 mov 1, %i0 *info = psiginfo->Info; 4000e644: c2 06 e0 08 ld [ %i3 + 8 ], %g1 4000e648: c2 26 80 00 st %g1, [ %i2 ] 4000e64c: c4 06 e0 0c ld [ %i3 + 0xc ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000e650: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000e654: c4 26 a0 04 st %g2, [ %i2 + 4 ] 4000e658: 82 10 63 78 or %g1, 0x378, %g1 4000e65c: c6 06 e0 10 ld [ %i3 + 0x10 ], %g3 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000e660: c2 26 c0 00 st %g1, [ %i3 ] old_last_node = the_chain->last; 4000e664: 82 00 7f fc add %g1, -4, %g1 4000e668: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_chain->last = the_node; 4000e66c: f6 20 60 08 st %i3, [ %g1 + 8 ] 4000e670: c6 26 a0 08 st %g3, [ %i2 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000e674: c4 26 e0 04 st %g2, [ %i3 + 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; 4000e678: f6 20 80 00 st %i3, [ %g2 ] if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; do_callout = TRUE; } } _ISR_Enable( level ); 4000e67c: 7f ff cd e2 call 40001e04 4000e680: 90 10 00 11 mov %l1, %o0 return do_callout; } 4000e684: 81 c7 e0 08 ret 4000e688: 81 e8 00 00 restore Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 4000e68c: c4 20 c0 01 st %g2, [ %g3 + %g1 ] new_first->previous = _Chain_Head(the_chain); 4000e690: c8 20 a0 04 st %g4, [ %g2 + 4 ] if ( is_global ) { if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); if ( _Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 4000e694: c2 00 c0 01 ld [ %g3 + %g1 ], %g1 4000e698: 80 a3 40 01 cmp %o5, %g1 4000e69c: 12 bf ff e7 bne 4000e638 <_POSIX_signals_Clear_signals+0xf8> 4000e6a0: b6 10 00 1c mov %i4, %i3 4000e6a4: 30 bf ff e3 b,a 4000e630 <_POSIX_signals_Clear_signals+0xf0> 400068ac <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 400068ac: 86 10 00 08 mov %o0, %g3 400068b0: 90 10 20 1b mov 0x1b, %o0 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 400068b4: 84 02 3f ff add %o0, -1, %g2 400068b8: 82 10 20 01 mov 1, %g1 400068bc: 83 28 40 02 sll %g1, %g2, %g1 400068c0: 80 88 40 03 btst %g1, %g3 400068c4: 12 80 00 11 bne 40006908 <_POSIX_signals_Get_highest+0x5c> 400068c8: 01 00 00 00 nop sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 400068cc: 90 02 20 01 inc %o0 400068d0: 80 a2 20 20 cmp %o0, 0x20 400068d4: 12 bf ff f9 bne 400068b8 <_POSIX_signals_Get_highest+0xc> 400068d8: 84 02 3f ff add %o0, -1, %g2 400068dc: 10 80 00 05 b 400068f0 <_POSIX_signals_Get_highest+0x44> 400068e0: 90 10 20 01 mov 1, %o0 return signo; } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 400068e4: 80 a2 20 1b cmp %o0, 0x1b 400068e8: 02 80 00 0a be 40006910 <_POSIX_signals_Get_highest+0x64> 400068ec: 01 00 00 00 nop if ( set & signo_to_mask( signo ) ) 400068f0: 84 02 3f ff add %o0, -1, %g2 400068f4: 82 10 20 01 mov 1, %g1 400068f8: 83 28 40 02 sll %g1, %g2, %g1 400068fc: 80 88 40 03 btst %g1, %g3 40006900: 22 bf ff f9 be,a 400068e4 <_POSIX_signals_Get_highest+0x38> 40006904: 90 02 20 01 inc %o0 return signo; } return 0; } 40006908: 81 c3 e0 08 retl 4000690c: 01 00 00 00 nop 40006910: 81 c3 e0 08 retl <== NOT EXECUTED 40006914: 90 10 20 00 clr %o0 ! 0 <== NOT EXECUTED 4000c99c <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 4000c99c: 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 ]; 4000c9a0: e0 06 21 70 ld [ %i0 + 0x170 ], %l0 4000c9a4: 23 10 00 6c sethi %hi(0x4001b000), %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 ); 4000c9a8: 7f ff d5 13 call 40001df4 4000c9ac: 01 00 00 00 nop 4000c9b0: b0 10 00 08 mov %o0, %i0 if ( !(~api->signals_blocked & 4000c9b4: c2 04 63 c0 ld [ %l1 + 0x3c0 ], %g1 4000c9b8: c4 04 20 c8 ld [ %l0 + 0xc8 ], %g2 4000c9bc: c6 04 20 c4 ld [ %l0 + 0xc4 ], %g3 4000c9c0: 82 10 40 02 or %g1, %g2, %g1 4000c9c4: 80 a8 40 03 andncc %g1, %g3, %g0 4000c9c8: 02 80 00 27 be 4000ca64 <_POSIX_signals_Post_switch_extension+0xc8> 4000c9cc: 01 00 00 00 nop (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); return; } _ISR_Enable( level ); 4000c9d0: 7f ff d5 0d call 40001e04 4000c9d4: b0 10 20 1b mov 0x1b, %i0 ! 1b for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, FALSE ) ) 4000c9d8: 92 10 00 18 mov %i0, %o1 4000c9dc: 94 10 20 00 clr %o2 4000c9e0: 40 00 06 a3 call 4000e46c <_POSIX_signals_Check_signal> 4000c9e4: 90 10 00 10 mov %l0, %o0 4000c9e8: 80 a2 20 00 cmp %o0, 0 4000c9ec: 12 bf ff ef bne 4000c9a8 <_POSIX_signals_Post_switch_extension+0xc> 4000c9f0: 92 10 00 18 mov %i0, %o1 goto restart; if ( _POSIX_signals_Check_signal( api, signo, TRUE ) ) 4000c9f4: 90 10 00 10 mov %l0, %o0 4000c9f8: 94 10 20 01 mov 1, %o2 4000c9fc: 40 00 06 9c call 4000e46c <_POSIX_signals_Check_signal> 4000ca00: b0 06 20 01 inc %i0 4000ca04: 80 a2 20 00 cmp %o0, 0 4000ca08: 12 bf ff e8 bne 4000c9a8 <_POSIX_signals_Post_switch_extension+0xc> 4000ca0c: 80 a6 20 20 cmp %i0, 0x20 _ISR_Enable( level ); return; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4000ca10: 12 bf ff f3 bne 4000c9dc <_POSIX_signals_Post_switch_extension+0x40> 4000ca14: 92 10 00 18 mov %i0, %o1 4000ca18: 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 ) ) 4000ca1c: 92 10 00 18 mov %i0, %o1 4000ca20: 94 10 20 00 clr %o2 4000ca24: 40 00 06 92 call 4000e46c <_POSIX_signals_Check_signal> 4000ca28: 90 10 00 10 mov %l0, %o0 4000ca2c: 80 a2 20 00 cmp %o0, 0 4000ca30: 12 bf ff de bne 4000c9a8 <_POSIX_signals_Post_switch_extension+0xc> 4000ca34: 92 10 00 18 mov %i0, %o1 goto restart; if ( _POSIX_signals_Check_signal( api, signo, TRUE ) ) 4000ca38: 90 10 00 10 mov %l0, %o0 4000ca3c: 94 10 20 01 mov 1, %o2 4000ca40: 40 00 06 8b call 4000e46c <_POSIX_signals_Check_signal> 4000ca44: b0 06 20 01 inc %i0 4000ca48: 80 a2 20 00 cmp %o0, 0 4000ca4c: 12 bf ff d7 bne 4000c9a8 <_POSIX_signals_Post_switch_extension+0xc> 4000ca50: 80 a6 20 1b cmp %i0, 0x1b } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 4000ca54: 12 bf ff f3 bne 4000ca20 <_POSIX_signals_Post_switch_extension+0x84> 4000ca58: 92 10 00 18 mov %i0, %o1 if ( _POSIX_signals_Check_signal( api, signo, TRUE ) ) goto restart; } } 4000ca5c: 81 c7 e0 08 ret <== NOT EXECUTED 4000ca60: 81 e8 00 00 restore <== NOT EXECUTED restart: _ISR_Disable( level ); if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 4000ca64: 7f ff d4 e8 call 40001e04 4000ca68: 81 e8 00 00 restore 4000ca6c: 01 00 00 00 nop 4002627c <_POSIX_signals_Unblock_thread>: boolean _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 4002627c: 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 ) ) { 40026280: c8 06 20 10 ld [ %i0 + 0x10 ], %g4 40026284: 07 04 00 20 sethi %hi(0x10008000), %g3 sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; mask = signo_to_mask( signo ); 40026288: 84 06 7f ff add %i1, -1, %g2 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 4002628c: 82 09 00 03 and %g4, %g3, %g1 sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; mask = signo_to_mask( signo ); 40026290: 9a 10 20 01 mov 1, %o5 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 40026294: 80 a0 40 03 cmp %g1, %g3 sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; mask = signo_to_mask( signo ); 40026298: 85 2b 40 02 sll %o5, %g2, %g2 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 4002629c: 02 80 00 1d be 40026310 <_POSIX_signals_Unblock_thread+0x94> 400262a0: c6 06 21 70 ld [ %i0 + 0x170 ], %g3 */ return FALSE; } if ( ~api->signals_blocked & mask ) { 400262a4: c2 00 e0 c4 ld [ %g3 + 0xc4 ], %g1 400262a8: 80 a8 80 01 andncc %g2, %g1, %g0 400262ac: 02 80 00 21 be 40026330 <_POSIX_signals_Unblock_thread+0xb4> 400262b0: 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 ) { 400262b4: 80 89 00 01 btst %g4, %g1 400262b8: 02 80 00 1e be 40026330 <_POSIX_signals_Unblock_thread+0xb4> 400262bc: da 26 20 78 st %o5, [ %i0 + 0x78 ] the_thread->Wait.return_code = EINTR; 400262c0: 84 10 20 04 mov 4, %g2 if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) 400262c4: 03 00 00 ef sethi %hi(0x3bc00), %g1 400262c8: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 400262cc: 80 89 00 01 btst %g4, %g1 400262d0: 12 80 00 29 bne 40026374 <_POSIX_signals_Unblock_thread+0xf8> 400262d4: c4 26 20 34 st %g2, [ %i0 + 0x34 ] _Thread_queue_Extract_with_proxy( the_thread ); else if ( _States_Is_delaying(the_thread->current_state)){ 400262d8: 80 89 20 08 btst 8, %g4 400262dc: 02 80 00 15 be 40026330 <_POSIX_signals_Unblock_thread+0xb4> 400262e0: 01 00 00 00 nop if ( _Watchdog_Is_active( &the_thread->Timer ) ) 400262e4: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 400262e8: 80 a0 60 02 cmp %g1, 2 400262ec: 02 80 00 2b be 40026398 <_POSIX_signals_Unblock_thread+0x11c> 400262f0: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 400262f4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400262f8: 13 04 00 ff sethi %hi(0x1003fc00), %o1 400262fc: b0 10 20 00 clr %i0 40026300: 7f ff a7 a5 call 40010194 <_Thread_Clear_state> 40026304: 92 12 63 f8 or %o1, 0x3f8, %o1 40026308: 81 c7 e0 08 ret 4002630c: 81 e8 00 00 restore * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 40026310: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40026314: 80 88 80 01 btst %g2, %g1 40026318: 12 80 00 08 bne 40026338 <_POSIX_signals_Unblock_thread+0xbc> 4002631c: 82 10 20 04 mov 4, %g1 40026320: c2 00 e0 c4 ld [ %g3 + 0xc4 ], %g1 40026324: 80 a8 80 01 andncc %g2, %g1, %g0 40026328: 12 80 00 04 bne 40026338 <_POSIX_signals_Unblock_thread+0xbc> 4002632c: 82 10 20 04 mov 4, %g1 } } } return FALSE; } 40026330: 81 c7 e0 08 ret 40026334: 91 e8 20 00 restore %g0, 0, %o0 */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { the_thread->Wait.return_code = EINTR; 40026338: c2 26 20 34 st %g1, [ %i0 + 0x34 ] the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 4002633c: 80 a6 a0 00 cmp %i2, 0 40026340: 02 80 00 12 be 40026388 <_POSIX_signals_Unblock_thread+0x10c> 40026344: c6 06 20 28 ld [ %i0 + 0x28 ], %g3 the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; 40026348: c2 06 80 00 ld [ %i2 ], %g1 4002634c: c2 20 c0 00 st %g1, [ %g3 ] 40026350: c4 06 a0 04 ld [ %i2 + 4 ], %g2 40026354: c4 20 e0 04 st %g2, [ %g3 + 4 ] 40026358: c2 06 a0 08 ld [ %i2 + 8 ], %g1 4002635c: c2 20 e0 08 st %g1, [ %g3 + 8 ] } _Thread_queue_Extract_with_proxy( the_thread ); 40026360: 90 10 00 18 mov %i0, %o0 40026364: 7f ff aa a7 call 40010e00 <_Thread_queue_Extract_with_proxy> 40026368: b0 10 20 01 mov 1, %i0 4002636c: 81 c7 e0 08 ret 40026370: 81 e8 00 00 restore the_thread->do_post_task_switch_extension = TRUE; if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { the_thread->Wait.return_code = EINTR; if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); 40026374: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40026378: 7f ff aa a2 call 40010e00 <_Thread_queue_Extract_with_proxy> <== NOT EXECUTED 4002637c: b0 10 20 00 clr %i0 <== NOT EXECUTED 40026380: 81 c7 e0 08 ret <== NOT EXECUTED 40026384: 81 e8 00 00 restore <== NOT EXECUTED the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; 40026388: f2 20 c0 00 st %i1, [ %g3 ] the_info->si_code = SI_USER; 4002638c: da 20 e0 04 st %o5, [ %g3 + 4 ] the_info->si_value.sival_int = 0; 40026390: 10 bf ff f4 b 40026360 <_POSIX_signals_Unblock_thread+0xe4> 40026394: c0 20 e0 08 clr [ %g3 + 8 ] the_thread->Wait.return_code = EINTR; if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); else if ( _States_Is_delaying(the_thread->current_state)){ if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 40026398: 7f ff ad f9 call 40011b7c <_Watchdog_Remove> 4002639c: 90 06 20 48 add %i0, 0x48, %o0 400263a0: 10 bf ff d6 b 400262f8 <_POSIX_signals_Unblock_thread+0x7c> 400263a4: 90 10 00 18 mov %i0, %o0 40008150 <_Protected_heap_Allocate>: void *_Protected_heap_Allocate( Heap_Control *the_heap, size_t size ) { 40008150: 9d e3 bf 98 save %sp, -104, %sp void *p; _RTEMS_Lock_allocator(); 40008154: 7f ff e7 28 call 40001df4 40008158: 01 00 00 00 nop 4000815c: a4 10 00 08 mov %o0, %l2 40008160: 23 10 00 6a sethi %hi(0x4001a800), %l1 40008164: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 ! 4001ab60 <_Thread_Dispatch_disable_level> 40008168: 80 a0 60 00 cmp %g1, 0 4000816c: 02 80 00 0b be 40008198 <_Protected_heap_Allocate+0x48> 40008170: 27 10 00 6b sethi %hi(0x4001ac00), %l3 40008174: 03 10 00 6b sethi %hi(0x4001ac00), %g1 40008178: c4 00 61 40 ld [ %g1 + 0x140 ], %g2 ! 4001ad40 <_System_state_Current> 4000817c: 80 a0 a0 01 cmp %g2, 1 40008180: 08 80 00 06 bleu 40008198 <_Protected_heap_Allocate+0x48> 40008184: 90 10 20 00 clr %o0 40008188: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000818c: 7f ff fd 7c call 4000777c <_Internal_error_Occurred> <== NOT EXECUTED 40008190: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 40008194: 27 10 00 6b sethi %hi(0x4001ac00), %l3 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 40008198: 09 10 00 6b sethi %hi(0x4001ac00), %g4 4000819c: e0 04 e0 34 ld [ %l3 + 0x34 ], %l0 400081a0: c4 01 20 3c ld [ %g4 + 0x3c ], %g2 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 400081a4: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 400081a8: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 400081ac: 80 a0 60 00 cmp %g1, 0 400081b0: 22 80 00 27 be,a 4000824c <_Protected_heap_Allocate+0xfc> 400081b4: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 400081b8: c0 24 20 60 clr [ %l0 + 0x60 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 400081bc: 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; 400081c0: 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; 400081c4: 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; 400081c8: 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; 400081cc: 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 ) || 400081d0: 80 a0 e0 02 cmp %g3, 2 400081d4: 12 80 00 2d bne 40008288 <_Protected_heap_Allocate+0x138> 400081d8: c8 24 20 64 st %g4, [ %l0 + 0x64 ] _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 400081dc: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 400081e0: 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++; 400081e4: 82 00 60 01 inc %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 400081e8: 02 80 00 46 be 40008300 <_Protected_heap_Allocate+0x1b0> 400081ec: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] _ISR_Enable( level ); 400081f0: 7f ff e7 05 call 40001e04 400081f4: 90 10 00 12 mov %l2, %o0 p = _Heap_Allocate( the_heap, size ); 400081f8: 90 10 00 18 mov %i0, %o0 400081fc: 7f ff fc 2e call 400072b4 <_Heap_Allocate> 40008200: 92 10 00 19 mov %i1, %o1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008204: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 40008208: b0 10 00 08 mov %o0, %i0 4000820c: 82 00 60 01 inc %g1 40008210: c2 24 63 60 st %g1, [ %l1 + 0x360 ] _RTEMS_Unlock_allocator(); 40008214: d0 04 e0 34 ld [ %l3 + 0x34 ], %o0 40008218: 94 10 20 00 clr %o2 4000821c: d2 02 20 08 ld [ %o0 + 8 ], %o1 40008220: 7f ff fb 54 call 40006f70 <_CORE_mutex_Surrender> 40008224: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008228: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 4000822c: 82 00 7f ff add %g1, -1, %g1 40008230: c2 24 63 60 st %g1, [ %l1 + 0x360 ] 40008234: c4 04 63 60 ld [ %l1 + 0x360 ], %g2 40008238: 80 a0 a0 00 cmp %g2, 0 4000823c: 02 80 00 2d be 400082f0 <_Protected_heap_Allocate+0x1a0> 40008240: 01 00 00 00 nop return p; } 40008244: 81 c7 e0 08 ret 40008248: 81 e8 00 00 restore /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 4000824c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40008250: 12 80 00 16 bne 400082a8 <_Protected_heap_Allocate+0x158> <== NOT EXECUTED 40008254: c6 04 e0 34 ld [ %l3 + 0x34 ], %g3 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40008258: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 4000825c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008260: 22 80 00 43 be,a 4000836c <_Protected_heap_Allocate+0x21c> <== NOT EXECUTED 40008264: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 40008268: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4000826c: 12 80 00 0f bne 400082a8 <_Protected_heap_Allocate+0x158> <== NOT EXECUTED 40008270: 82 10 20 02 mov 2, %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; 40008274: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 40008278: 7f ff e6 e3 call 40001e04 <== NOT EXECUTED 4000827c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED ) { void *p; _RTEMS_Lock_allocator(); p = _Heap_Allocate( the_heap, size ); 40008280: 10 bf ff df b 400081fc <_Protected_heap_Allocate+0xac> <== NOT EXECUTED 40008284: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 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; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40008288: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 4000828c: 12 bf ff d9 bne 400081f0 <_Protected_heap_Allocate+0xa0> <== NOT EXECUTED 40008290: 01 00 00 00 nop <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40008294: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40008298: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000829c: 02 80 00 19 be 40008300 <_Protected_heap_Allocate+0x1b0> <== NOT EXECUTED 400082a0: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED 400082a4: 30 bf ff d3 b,a 400081f0 <_Protected_heap_Allocate+0xa0> <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400082a8: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 <== NOT EXECUTED size_t size ) { void *p; _RTEMS_Lock_allocator(); 400082ac: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 400082b0: c8 01 20 3c ld [ %g4 + 0x3c ], %g4 <== NOT EXECUTED 400082b4: 82 00 60 01 inc %g1 <== NOT EXECUTED 400082b8: c4 21 20 20 st %g2, [ %g4 + 0x20 ] <== NOT EXECUTED 400082bc: c2 24 63 60 st %g1, [ %l1 + 0x360 ] <== NOT EXECUTED 400082c0: 84 00 e0 10 add %g3, 0x10, %g2 <== 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; 400082c4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 400082c8: c4 21 20 44 st %g2, [ %g4 + 0x44 ] <== NOT EXECUTED 400082cc: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 400082d0: 7f ff e6 cd call 40001e04 <== NOT EXECUTED 400082d4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400082d8: d0 04 e0 34 ld [ %l3 + 0x34 ], %o0 <== NOT EXECUTED 400082dc: 92 10 20 00 clr %o1 <== NOT EXECUTED 400082e0: 7f ff fb 00 call 40006ee0 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 400082e4: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED p = _Heap_Allocate( the_heap, size ); 400082e8: 10 bf ff c5 b 400081fc <_Protected_heap_Allocate+0xac> <== NOT EXECUTED 400082ec: 90 10 00 18 mov %i0, %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 ) _Thread_Dispatch(); 400082f0: 40 00 03 c9 call 40009214 <_Thread_Dispatch> 400082f4: 01 00 00 00 nop 400082f8: 81 c7 e0 08 ret 400082fc: 81 e8 00 00 restore */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 40008300: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED current = executing->current_priority; 40008304: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 40008308: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 4000830c: 02 80 00 28 be 400083ac <_Protected_heap_Allocate+0x25c> <== NOT EXECUTED 40008310: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 40008314: 1a 80 00 1c bcc 40008384 <_Protected_heap_Allocate+0x234> <== NOT EXECUTED 40008318: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000831c: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 <== NOT EXECUTED 40008320: 82 00 60 01 inc %g1 <== NOT EXECUTED 40008324: c2 24 63 60 st %g1, [ %l1 + 0x360 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 40008328: 7f ff e6 b7 call 40001e04 <== NOT EXECUTED 4000832c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED _Thread_Change_priority( 40008330: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 40008334: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 40008338: 40 00 02 93 call 40008d84 <_Thread_Change_priority> <== NOT EXECUTED 4000833c: 94 10 20 00 clr %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 ) 40008340: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 <== NOT EXECUTED 40008344: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40008348: c2 24 63 60 st %g1, [ %l1 + 0x360 ] <== NOT EXECUTED 4000834c: c4 04 63 60 ld [ %l1 + 0x360 ], %g2 <== NOT EXECUTED 40008350: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40008354: 32 bf ff aa bne,a 400081fc <_Protected_heap_Allocate+0xac> <== NOT EXECUTED 40008358: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 4000835c: 40 00 03 ae call 40009214 <_Thread_Dispatch> <== NOT EXECUTED 40008360: 01 00 00 00 nop <== NOT EXECUTED 40008364: 10 bf ff a6 b 400081fc <_Protected_heap_Allocate+0xac> <== NOT EXECUTED 40008368: 90 10 00 18 mov %i0, %o0 <== 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++; 4000836c: 82 00 60 01 inc %g1 <== NOT EXECUTED 40008370: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 40008374: 7f ff e6 a4 call 40001e04 <== NOT EXECUTED 40008378: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4000837c: 10 bf ff a0 b 400081fc <_Protected_heap_Allocate+0xac> <== NOT EXECUTED 40008380: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 40008384: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 40008388: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 4000838c: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 40008390: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40008394: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40008398: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 4000839c: 7f ff e6 9a call 40001e04 <== NOT EXECUTED 400083a0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400083a4: 10 bf ff 96 b 400081fc <_Protected_heap_Allocate+0xac> <== NOT EXECUTED 400083a8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 400083ac: 7f ff e6 96 call 40001e04 <== NOT EXECUTED 400083b0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400083b4: 10 bf ff 92 b 400081fc <_Protected_heap_Allocate+0xac> <== NOT EXECUTED 400083b8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400083bc <_Protected_heap_Extend>: boolean _Protected_heap_Extend( Heap_Control *the_heap, void *starting_address, size_t size ) { 400083bc: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED Heap_Extend_status status; uint32_t amount_extended; _RTEMS_Lock_allocator(); 400083c0: 7f ff e6 8d call 40001df4 <== NOT EXECUTED 400083c4: 01 00 00 00 nop <== NOT EXECUTED 400083c8: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED 400083cc: 23 10 00 6a sethi %hi(0x4001a800), %l1 <== NOT EXECUTED 400083d0: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 ! 4001ab60 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 400083d4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400083d8: 02 80 00 0b be 40008404 <_Protected_heap_Extend+0x48> <== NOT EXECUTED 400083dc: 27 10 00 6b sethi %hi(0x4001ac00), %l3 <== NOT EXECUTED 400083e0: 03 10 00 6b sethi %hi(0x4001ac00), %g1 <== NOT EXECUTED 400083e4: c4 00 61 40 ld [ %g1 + 0x140 ], %g2 ! 4001ad40 <_System_state_Current> <== NOT EXECUTED 400083e8: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 400083ec: 08 80 00 06 bleu 40008404 <_Protected_heap_Extend+0x48> <== NOT EXECUTED 400083f0: 90 10 20 00 clr %o0 <== NOT EXECUTED 400083f4: 92 10 20 00 clr %o1 <== NOT EXECUTED 400083f8: 7f ff fc e1 call 4000777c <_Internal_error_Occurred> <== NOT EXECUTED 400083fc: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 40008400: 27 10 00 6b sethi %hi(0x4001ac00), %l3 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 40008404: 09 10 00 6b sethi %hi(0x4001ac00), %g4 <== NOT EXECUTED 40008408: e0 04 e0 34 ld [ %l3 + 0x34 ], %l0 <== NOT EXECUTED 4000840c: c4 01 20 3c ld [ %g4 + 0x3c ], %g2 <== NOT EXECUTED executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40008410: c0 20 a0 34 clr [ %g2 + 0x34 ] <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 40008414: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 40008418: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000841c: 22 80 00 2d be,a 400084d0 <_Protected_heap_Extend+0x114> <== NOT EXECUTED 40008420: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 40008424: c0 24 20 60 clr [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40008428: 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; 4000842c: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 <== NOT EXECUTED 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; 40008430: 88 10 20 01 mov 1, %g4 <== 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; 40008434: 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; 40008438: c4 24 20 6c st %g2, [ %l0 + 0x6c ] <== NOT EXECUTED the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000843c: 80 a0 e0 02 cmp %g3, 2 <== NOT EXECUTED 40008440: 12 80 00 33 bne 4000850c <_Protected_heap_Extend+0x150> <== NOT EXECUTED 40008444: c8 24 20 64 st %g4, [ %l0 + 0x64 ] <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40008448: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000844c: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 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++; 40008450: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40008454: 02 80 00 48 be 40008574 <_Protected_heap_Extend+0x1b8> <== NOT EXECUTED 40008458: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 4000845c: 7f ff e6 6a call 40001e04 <== NOT EXECUTED 40008460: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED status = _Heap_Extend(the_heap, starting_address, size, &amount_extended); 40008464: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40008468: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000846c: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 40008470: 40 00 14 04 call 4000d480 <_Heap_Extend> <== NOT EXECUTED 40008474: 96 07 bf f4 add %fp, -12, %o3 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008478: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 <== NOT EXECUTED 4000847c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 40008480: 82 00 60 01 inc %g1 <== NOT EXECUTED 40008484: c2 24 63 60 st %g1, [ %l1 + 0x360 ] <== NOT EXECUTED _RTEMS_Unlock_allocator(); 40008488: d0 04 e0 34 ld [ %l3 + 0x34 ], %o0 <== NOT EXECUTED 4000848c: 94 10 20 00 clr %o2 <== NOT EXECUTED 40008490: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 40008494: 7f ff fa b7 call 40006f70 <_CORE_mutex_Surrender> <== NOT EXECUTED 40008498: 90 02 20 10 add %o0, 0x10, %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 ) 4000849c: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 <== NOT EXECUTED 400084a0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400084a4: c2 24 63 60 st %g1, [ %l1 + 0x360 ] <== NOT EXECUTED 400084a8: c4 04 63 60 ld [ %l1 + 0x360 ], %g2 <== NOT EXECUTED 400084ac: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400084b0: 12 80 00 05 bne 400084c4 <_Protected_heap_Extend+0x108> <== NOT EXECUTED 400084b4: 80 a0 00 10 cmp %g0, %l0 <== NOT EXECUTED _Thread_Dispatch(); 400084b8: 40 00 03 57 call 40009214 <_Thread_Dispatch> <== NOT EXECUTED 400084bc: 01 00 00 00 nop <== NOT EXECUTED return (status == HEAP_EXTEND_SUCCESSFUL); } 400084c0: 80 a0 00 10 cmp %g0, %l0 <== NOT EXECUTED 400084c4: b0 60 3f ff subx %g0, -1, %i0 <== NOT EXECUTED 400084c8: 81 c7 e0 08 ret <== NOT EXECUTED 400084cc: 81 e8 00 00 restore <== 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 ) ) { 400084d0: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400084d4: 12 80 00 16 bne 4000852c <_Protected_heap_Extend+0x170> <== NOT EXECUTED 400084d8: c6 04 e0 34 ld [ %l3 + 0x34 ], %g3 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 400084dc: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 400084e0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400084e4: 22 80 00 3f be,a 400085e0 <_Protected_heap_Extend+0x224> <== NOT EXECUTED 400084e8: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 400084ec: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 400084f0: 12 80 00 0f bne 4000852c <_Protected_heap_Extend+0x170> <== NOT EXECUTED 400084f4: 82 10 20 02 mov 2, %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; 400084f8: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 400084fc: 7f ff e6 42 call 40001e04 <== NOT EXECUTED 40008500: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED { Heap_Extend_status status; uint32_t amount_extended; _RTEMS_Lock_allocator(); status = _Heap_Extend(the_heap, starting_address, size, &amount_extended); 40008504: 10 bf ff d9 b 40008468 <_Protected_heap_Extend+0xac> <== NOT EXECUTED 40008508: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 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; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000850c: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 40008510: 12 bf ff d3 bne 4000845c <_Protected_heap_Extend+0xa0> <== NOT EXECUTED 40008514: 01 00 00 00 nop <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40008518: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4000851c: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40008520: 02 80 00 15 be 40008574 <_Protected_heap_Extend+0x1b8> <== NOT EXECUTED 40008524: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED 40008528: 30 bf ff cd b,a 4000845c <_Protected_heap_Extend+0xa0> <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000852c: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 <== NOT EXECUTED ) { Heap_Extend_status status; uint32_t amount_extended; _RTEMS_Lock_allocator(); 40008530: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 40008534: c8 01 20 3c ld [ %g4 + 0x3c ], %g4 <== NOT EXECUTED 40008538: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000853c: c4 21 20 20 st %g2, [ %g4 + 0x20 ] <== NOT EXECUTED 40008540: c2 24 63 60 st %g1, [ %l1 + 0x360 ] <== NOT EXECUTED 40008544: 84 00 e0 10 add %g3, 0x10, %g2 <== NOT EXECUTED 40008548: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 4000854c: c4 21 20 44 st %g2, [ %g4 + 0x44 ] <== NOT EXECUTED 40008550: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 40008554: 7f ff e6 2c call 40001e04 <== NOT EXECUTED 40008558: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4000855c: d0 04 e0 34 ld [ %l3 + 0x34 ], %o0 <== NOT EXECUTED 40008560: 92 10 20 00 clr %o1 <== NOT EXECUTED 40008564: 7f ff fa 5f call 40006ee0 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 40008568: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED status = _Heap_Extend(the_heap, starting_address, size, &amount_extended); 4000856c: 10 bf ff bf b 40008468 <_Protected_heap_Extend+0xac> <== NOT EXECUTED 40008570: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 40008574: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED current = executing->current_priority; 40008578: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 4000857c: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40008580: 02 80 00 28 be 40008620 <_Protected_heap_Extend+0x264> <== NOT EXECUTED 40008584: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 40008588: 1a 80 00 1c bcc 400085f8 <_Protected_heap_Extend+0x23c> <== NOT EXECUTED 4000858c: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED 40008590: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 <== NOT EXECUTED 40008594: 82 00 60 01 inc %g1 <== NOT EXECUTED 40008598: c2 24 63 60 st %g1, [ %l1 + 0x360 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 4000859c: 7f ff e6 1a call 40001e04 <== NOT EXECUTED 400085a0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED _Thread_Change_priority( 400085a4: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 400085a8: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 400085ac: 40 00 01 f6 call 40008d84 <_Thread_Change_priority> <== NOT EXECUTED 400085b0: 94 10 20 00 clr %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 ) 400085b4: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 <== NOT EXECUTED 400085b8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400085bc: c2 24 63 60 st %g1, [ %l1 + 0x360 ] <== NOT EXECUTED 400085c0: c4 04 63 60 ld [ %l1 + 0x360 ], %g2 <== NOT EXECUTED 400085c4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400085c8: 32 bf ff a8 bne,a 40008468 <_Protected_heap_Extend+0xac> <== NOT EXECUTED 400085cc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 400085d0: 40 00 03 11 call 40009214 <_Thread_Dispatch> <== NOT EXECUTED 400085d4: 01 00 00 00 nop <== NOT EXECUTED 400085d8: 10 bf ff a4 b 40008468 <_Protected_heap_Extend+0xac> <== NOT EXECUTED 400085dc: 90 10 00 18 mov %i0, %o0 <== 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++; 400085e0: 82 00 60 01 inc %g1 <== NOT EXECUTED 400085e4: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 400085e8: 7f ff e6 07 call 40001e04 <== NOT EXECUTED 400085ec: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400085f0: 10 bf ff 9e b 40008468 <_Protected_heap_Extend+0xac> <== NOT EXECUTED 400085f4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 400085f8: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 400085fc: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40008600: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 40008604: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40008608: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000860c: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40008610: 7f ff e5 fd call 40001e04 <== NOT EXECUTED 40008614: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40008618: 10 bf ff 94 b 40008468 <_Protected_heap_Extend+0xac> <== NOT EXECUTED 4000861c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 40008620: 7f ff e5 f9 call 40001e04 <== NOT EXECUTED 40008624: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40008628: 10 bf ff 90 b 40008468 <_Protected_heap_Extend+0xac> <== NOT EXECUTED 4000862c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40008630 <_Protected_heap_Free>: boolean _Protected_heap_Free( Heap_Control *the_heap, void *start_address ) { 40008630: 9d e3 bf 98 save %sp, -104, %sp boolean status; _RTEMS_Lock_allocator(); 40008634: 7f ff e5 f0 call 40001df4 40008638: 01 00 00 00 nop 4000863c: a4 10 00 08 mov %o0, %l2 40008640: 23 10 00 6a sethi %hi(0x4001a800), %l1 40008644: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 ! 4001ab60 <_Thread_Dispatch_disable_level> 40008648: 80 a0 60 00 cmp %g1, 0 4000864c: 02 80 00 0b be 40008678 <_Protected_heap_Free+0x48> 40008650: 27 10 00 6b sethi %hi(0x4001ac00), %l3 40008654: 03 10 00 6b sethi %hi(0x4001ac00), %g1 <== NOT EXECUTED 40008658: c4 00 61 40 ld [ %g1 + 0x140 ], %g2 ! 4001ad40 <_System_state_Current> <== NOT EXECUTED 4000865c: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 40008660: 08 80 00 06 bleu 40008678 <_Protected_heap_Free+0x48> <== NOT EXECUTED 40008664: 90 10 20 00 clr %o0 <== NOT EXECUTED 40008668: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000866c: 7f ff fc 44 call 4000777c <_Internal_error_Occurred> <== NOT EXECUTED 40008670: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 40008674: 27 10 00 6b sethi %hi(0x4001ac00), %l3 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 40008678: 09 10 00 6b sethi %hi(0x4001ac00), %g4 4000867c: e0 04 e0 34 ld [ %l3 + 0x34 ], %l0 40008680: c4 01 20 3c ld [ %g4 + 0x3c ], %g2 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40008684: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 40008688: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 4000868c: 80 a0 60 00 cmp %g1, 0 40008690: 22 80 00 27 be,a 4000872c <_Protected_heap_Free+0xfc> 40008694: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 40008698: c0 24 20 60 clr [ %l0 + 0x60 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000869c: 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; 400086a0: 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; 400086a4: 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; 400086a8: 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; 400086ac: 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 ) || 400086b0: 80 a0 e0 02 cmp %g3, 2 400086b4: 12 80 00 2d bne 40008768 <_Protected_heap_Free+0x138> 400086b8: c8 24 20 64 st %g4, [ %l0 + 0x64 ] _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 400086bc: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 400086c0: 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++; 400086c4: 82 00 60 01 inc %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 400086c8: 02 80 00 46 be 400087e0 <_Protected_heap_Free+0x1b0> 400086cc: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] _ISR_Enable( level ); 400086d0: 7f ff e5 cd call 40001e04 400086d4: 90 10 00 12 mov %l2, %o0 status = _Heap_Free( the_heap, start_address ); 400086d8: 90 10 00 18 mov %i0, %o0 400086dc: 7f ff fb 28 call 4000737c <_Heap_Free> 400086e0: 92 10 00 19 mov %i1, %o1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400086e4: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 400086e8: b0 10 00 08 mov %o0, %i0 400086ec: 82 00 60 01 inc %g1 400086f0: c2 24 63 60 st %g1, [ %l1 + 0x360 ] _RTEMS_Unlock_allocator(); 400086f4: d0 04 e0 34 ld [ %l3 + 0x34 ], %o0 400086f8: 94 10 20 00 clr %o2 400086fc: d2 02 20 08 ld [ %o0 + 8 ], %o1 40008700: 7f ff fa 1c call 40006f70 <_CORE_mutex_Surrender> 40008704: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008708: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 4000870c: 82 00 7f ff add %g1, -1, %g1 40008710: c2 24 63 60 st %g1, [ %l1 + 0x360 ] 40008714: c4 04 63 60 ld [ %l1 + 0x360 ], %g2 40008718: 80 a0 a0 00 cmp %g2, 0 4000871c: 02 80 00 2d be 400087d0 <_Protected_heap_Free+0x1a0> 40008720: 01 00 00 00 nop return status; } 40008724: 81 c7 e0 08 ret <== NOT EXECUTED 40008728: 81 e8 00 00 restore <== 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 ) ) { 4000872c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40008730: 12 80 00 16 bne 40008788 <_Protected_heap_Free+0x158> <== NOT EXECUTED 40008734: c6 04 e0 34 ld [ %l3 + 0x34 ], %g3 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40008738: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 4000873c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008740: 22 80 00 43 be,a 4000884c <_Protected_heap_Free+0x21c> <== NOT EXECUTED 40008744: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 40008748: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4000874c: 12 80 00 0f bne 40008788 <_Protected_heap_Free+0x158> <== NOT EXECUTED 40008750: 82 10 20 02 mov 2, %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; 40008754: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 40008758: 7f ff e5 ab call 40001e04 <== NOT EXECUTED 4000875c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED ) { boolean status; _RTEMS_Lock_allocator(); status = _Heap_Free( the_heap, start_address ); 40008760: 10 bf ff df b 400086dc <_Protected_heap_Free+0xac> <== NOT EXECUTED 40008764: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 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; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40008768: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 4000876c: 12 bf ff d9 bne 400086d0 <_Protected_heap_Free+0xa0> <== NOT EXECUTED 40008770: 01 00 00 00 nop <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40008774: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40008778: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000877c: 02 80 00 19 be 400087e0 <_Protected_heap_Free+0x1b0> <== NOT EXECUTED 40008780: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED 40008784: 30 bf ff d3 b,a 400086d0 <_Protected_heap_Free+0xa0> <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008788: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 <== NOT EXECUTED void *start_address ) { boolean status; _RTEMS_Lock_allocator(); 4000878c: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 40008790: c8 01 20 3c ld [ %g4 + 0x3c ], %g4 <== NOT EXECUTED 40008794: 82 00 60 01 inc %g1 <== NOT EXECUTED 40008798: c4 21 20 20 st %g2, [ %g4 + 0x20 ] <== NOT EXECUTED 4000879c: c2 24 63 60 st %g1, [ %l1 + 0x360 ] <== NOT EXECUTED 400087a0: 84 00 e0 10 add %g3, 0x10, %g2 <== NOT EXECUTED 400087a4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 400087a8: c4 21 20 44 st %g2, [ %g4 + 0x44 ] <== NOT EXECUTED 400087ac: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 400087b0: 7f ff e5 95 call 40001e04 <== NOT EXECUTED 400087b4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400087b8: d0 04 e0 34 ld [ %l3 + 0x34 ], %o0 <== NOT EXECUTED 400087bc: 92 10 20 00 clr %o1 <== NOT EXECUTED 400087c0: 7f ff f9 c8 call 40006ee0 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 400087c4: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED status = _Heap_Free( the_heap, start_address ); 400087c8: 10 bf ff c5 b 400086dc <_Protected_heap_Free+0xac> <== NOT EXECUTED 400087cc: 90 10 00 18 mov %i0, %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 ) _Thread_Dispatch(); 400087d0: 40 00 02 91 call 40009214 <_Thread_Dispatch> 400087d4: 01 00 00 00 nop 400087d8: 81 c7 e0 08 ret 400087dc: 81 e8 00 00 restore */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 400087e0: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED current = executing->current_priority; 400087e4: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 400087e8: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 400087ec: 02 80 00 28 be 4000888c <_Protected_heap_Free+0x25c> <== NOT EXECUTED 400087f0: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 400087f4: 1a 80 00 1c bcc 40008864 <_Protected_heap_Free+0x234> <== NOT EXECUTED 400087f8: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400087fc: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 <== NOT EXECUTED 40008800: 82 00 60 01 inc %g1 <== NOT EXECUTED 40008804: c2 24 63 60 st %g1, [ %l1 + 0x360 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 40008808: 7f ff e5 7f call 40001e04 <== NOT EXECUTED 4000880c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED _Thread_Change_priority( 40008810: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 40008814: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 40008818: 40 00 01 5b call 40008d84 <_Thread_Change_priority> <== NOT EXECUTED 4000881c: 94 10 20 00 clr %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 ) 40008820: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 <== NOT EXECUTED 40008824: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40008828: c2 24 63 60 st %g1, [ %l1 + 0x360 ] <== NOT EXECUTED 4000882c: c4 04 63 60 ld [ %l1 + 0x360 ], %g2 <== NOT EXECUTED 40008830: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40008834: 32 bf ff aa bne,a 400086dc <_Protected_heap_Free+0xac> <== NOT EXECUTED 40008838: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 4000883c: 40 00 02 76 call 40009214 <_Thread_Dispatch> <== NOT EXECUTED 40008840: 01 00 00 00 nop <== NOT EXECUTED 40008844: 10 bf ff a6 b 400086dc <_Protected_heap_Free+0xac> <== NOT EXECUTED 40008848: 90 10 00 18 mov %i0, %o0 <== 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++; 4000884c: 82 00 60 01 inc %g1 <== NOT EXECUTED 40008850: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 40008854: 7f ff e5 6c call 40001e04 <== NOT EXECUTED 40008858: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4000885c: 10 bf ff a0 b 400086dc <_Protected_heap_Free+0xac> <== NOT EXECUTED 40008860: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 40008864: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 40008868: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 4000886c: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 40008870: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40008874: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40008878: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 4000887c: 7f ff e5 62 call 40001e04 <== NOT EXECUTED 40008880: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40008884: 10 bf ff 96 b 400086dc <_Protected_heap_Free+0xac> <== NOT EXECUTED 40008888: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 4000888c: 7f ff e5 5e call 40001e04 <== NOT EXECUTED 40008890: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40008894: 10 bf ff 92 b 400086dc <_Protected_heap_Free+0xac> <== NOT EXECUTED 40008898: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000889c <_Protected_heap_Get_block_size>: boolean _Protected_heap_Get_block_size( Heap_Control *the_heap, void *starting_address, size_t *size ) { 4000889c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED boolean status; _RTEMS_Lock_allocator(); 400088a0: 7f ff e5 55 call 40001df4 <== NOT EXECUTED 400088a4: 01 00 00 00 nop <== NOT EXECUTED 400088a8: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED 400088ac: 23 10 00 6a sethi %hi(0x4001a800), %l1 <== NOT EXECUTED 400088b0: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 ! 4001ab60 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 400088b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400088b8: 02 80 00 0b be 400088e4 <_Protected_heap_Get_block_size+0x48> <== NOT EXECUTED 400088bc: 27 10 00 6b sethi %hi(0x4001ac00), %l3 <== NOT EXECUTED 400088c0: 03 10 00 6b sethi %hi(0x4001ac00), %g1 <== NOT EXECUTED 400088c4: c4 00 61 40 ld [ %g1 + 0x140 ], %g2 ! 4001ad40 <_System_state_Current> <== NOT EXECUTED 400088c8: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 400088cc: 08 80 00 06 bleu 400088e4 <_Protected_heap_Get_block_size+0x48> <== NOT EXECUTED 400088d0: 90 10 20 00 clr %o0 <== NOT EXECUTED 400088d4: 92 10 20 00 clr %o1 <== NOT EXECUTED 400088d8: 7f ff fb a9 call 4000777c <_Internal_error_Occurred> <== NOT EXECUTED 400088dc: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 400088e0: 27 10 00 6b sethi %hi(0x4001ac00), %l3 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 400088e4: 09 10 00 6b sethi %hi(0x4001ac00), %g4 <== NOT EXECUTED 400088e8: e0 04 e0 34 ld [ %l3 + 0x34 ], %l0 <== NOT EXECUTED 400088ec: c4 01 20 3c ld [ %g4 + 0x3c ], %g2 <== NOT EXECUTED executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 400088f0: c0 20 a0 34 clr [ %g2 + 0x34 ] <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 400088f4: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 400088f8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400088fc: 22 80 00 28 be,a 4000899c <_Protected_heap_Get_block_size+0x100> <== NOT EXECUTED 40008900: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 40008904: c0 24 20 60 clr [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40008908: 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; 4000890c: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 <== NOT EXECUTED 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; 40008910: 88 10 20 01 mov 1, %g4 <== 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; 40008914: 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; 40008918: c4 24 20 6c st %g2, [ %l0 + 0x6c ] <== NOT EXECUTED the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000891c: 80 a0 e0 02 cmp %g3, 2 <== NOT EXECUTED 40008920: 12 80 00 2e bne 400089d8 <_Protected_heap_Get_block_size+0x13c> <== NOT EXECUTED 40008924: c8 24 20 64 st %g4, [ %l0 + 0x64 ] <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40008928: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000892c: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 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++; 40008930: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40008934: 02 80 00 47 be 40008a50 <_Protected_heap_Get_block_size+0x1b4> <== NOT EXECUTED 40008938: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 4000893c: 7f ff e5 32 call 40001e04 <== NOT EXECUTED 40008940: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED status = _Heap_Size_of_user_area( the_heap, starting_address, size ); 40008944: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40008948: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000894c: 40 00 13 8e call 4000d784 <_Heap_Size_of_user_area> <== NOT EXECUTED 40008950: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008954: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 <== NOT EXECUTED 40008958: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4000895c: 82 00 60 01 inc %g1 <== NOT EXECUTED 40008960: c2 24 63 60 st %g1, [ %l1 + 0x360 ] <== NOT EXECUTED _RTEMS_Unlock_allocator(); 40008964: d0 04 e0 34 ld [ %l3 + 0x34 ], %o0 <== NOT EXECUTED 40008968: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000896c: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 40008970: 7f ff f9 80 call 40006f70 <_CORE_mutex_Surrender> <== NOT EXECUTED 40008974: 90 02 20 10 add %o0, 0x10, %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 ) 40008978: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 <== NOT EXECUTED 4000897c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40008980: c2 24 63 60 st %g1, [ %l1 + 0x360 ] <== NOT EXECUTED 40008984: c4 04 63 60 ld [ %l1 + 0x360 ], %g2 <== NOT EXECUTED 40008988: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000898c: 02 80 00 2d be 40008a40 <_Protected_heap_Get_block_size+0x1a4> <== NOT EXECUTED 40008990: 01 00 00 00 nop <== NOT EXECUTED return status; } 40008994: 81 c7 e0 08 ret <== NOT EXECUTED 40008998: 81 e8 00 00 restore <== 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 ) ) { 4000899c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400089a0: 12 80 00 16 bne 400089f8 <_Protected_heap_Get_block_size+0x15c> <== NOT EXECUTED 400089a4: c6 04 e0 34 ld [ %l3 + 0x34 ], %g3 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 400089a8: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 400089ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400089b0: 22 80 00 43 be,a 40008abc <_Protected_heap_Get_block_size+0x220> <== NOT EXECUTED 400089b4: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 400089b8: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 400089bc: 12 80 00 0f bne 400089f8 <_Protected_heap_Get_block_size+0x15c> <== NOT EXECUTED 400089c0: 82 10 20 02 mov 2, %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; 400089c4: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 400089c8: 7f ff e5 0f call 40001e04 <== NOT EXECUTED 400089cc: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED ) { boolean status; _RTEMS_Lock_allocator(); status = _Heap_Size_of_user_area( the_heap, starting_address, size ); 400089d0: 10 bf ff de b 40008948 <_Protected_heap_Get_block_size+0xac> <== NOT EXECUTED 400089d4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 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; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 400089d8: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 400089dc: 12 bf ff d8 bne 4000893c <_Protected_heap_Get_block_size+0xa0> <== NOT EXECUTED 400089e0: 01 00 00 00 nop <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 400089e4: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 400089e8: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 400089ec: 02 80 00 19 be 40008a50 <_Protected_heap_Get_block_size+0x1b4> <== NOT EXECUTED 400089f0: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED 400089f4: 30 bf ff d2 b,a 4000893c <_Protected_heap_Get_block_size+0xa0> <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400089f8: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 <== NOT EXECUTED size_t *size ) { boolean status; _RTEMS_Lock_allocator(); 400089fc: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 40008a00: c8 01 20 3c ld [ %g4 + 0x3c ], %g4 <== NOT EXECUTED 40008a04: 82 00 60 01 inc %g1 <== NOT EXECUTED 40008a08: c4 21 20 20 st %g2, [ %g4 + 0x20 ] <== NOT EXECUTED 40008a0c: c2 24 63 60 st %g1, [ %l1 + 0x360 ] <== NOT EXECUTED 40008a10: 84 00 e0 10 add %g3, 0x10, %g2 <== NOT EXECUTED 40008a14: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40008a18: c4 21 20 44 st %g2, [ %g4 + 0x44 ] <== NOT EXECUTED 40008a1c: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 40008a20: 7f ff e4 f9 call 40001e04 <== NOT EXECUTED 40008a24: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40008a28: d0 04 e0 34 ld [ %l3 + 0x34 ], %o0 <== NOT EXECUTED 40008a2c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40008a30: 7f ff f9 2c call 40006ee0 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 40008a34: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED status = _Heap_Size_of_user_area( the_heap, starting_address, size ); 40008a38: 10 bf ff c4 b 40008948 <_Protected_heap_Get_block_size+0xac> <== NOT EXECUTED 40008a3c: 90 10 00 18 mov %i0, %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 ) _Thread_Dispatch(); 40008a40: 40 00 01 f5 call 40009214 <_Thread_Dispatch> <== NOT EXECUTED 40008a44: 01 00 00 00 nop <== NOT EXECUTED 40008a48: 81 c7 e0 08 ret <== NOT EXECUTED 40008a4c: 81 e8 00 00 restore <== NOT EXECUTED */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 40008a50: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED current = executing->current_priority; 40008a54: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 40008a58: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40008a5c: 02 80 00 28 be 40008afc <_Protected_heap_Get_block_size+0x260> <== NOT EXECUTED 40008a60: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 40008a64: 1a 80 00 1c bcc 40008ad4 <_Protected_heap_Get_block_size+0x238> <== NOT EXECUTED 40008a68: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008a6c: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 <== NOT EXECUTED 40008a70: 82 00 60 01 inc %g1 <== NOT EXECUTED 40008a74: c2 24 63 60 st %g1, [ %l1 + 0x360 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 40008a78: 7f ff e4 e3 call 40001e04 <== NOT EXECUTED 40008a7c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED _Thread_Change_priority( 40008a80: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 40008a84: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 40008a88: 40 00 00 bf call 40008d84 <_Thread_Change_priority> <== NOT EXECUTED 40008a8c: 94 10 20 00 clr %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 ) 40008a90: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 <== NOT EXECUTED 40008a94: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40008a98: c2 24 63 60 st %g1, [ %l1 + 0x360 ] <== NOT EXECUTED 40008a9c: c4 04 63 60 ld [ %l1 + 0x360 ], %g2 <== NOT EXECUTED 40008aa0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40008aa4: 32 bf ff a9 bne,a 40008948 <_Protected_heap_Get_block_size+0xac> <== NOT EXECUTED 40008aa8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 40008aac: 40 00 01 da call 40009214 <_Thread_Dispatch> <== NOT EXECUTED 40008ab0: 01 00 00 00 nop <== NOT EXECUTED 40008ab4: 10 bf ff a5 b 40008948 <_Protected_heap_Get_block_size+0xac> <== NOT EXECUTED 40008ab8: 90 10 00 18 mov %i0, %o0 <== 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++; 40008abc: 82 00 60 01 inc %g1 <== NOT EXECUTED 40008ac0: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 40008ac4: 7f ff e4 d0 call 40001e04 <== NOT EXECUTED 40008ac8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40008acc: 10 bf ff 9f b 40008948 <_Protected_heap_Get_block_size+0xac> <== NOT EXECUTED 40008ad0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 40008ad4: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 40008ad8: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40008adc: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 40008ae0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40008ae4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40008ae8: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40008aec: 7f ff e4 c6 call 40001e04 <== NOT EXECUTED 40008af0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40008af4: 10 bf ff 95 b 40008948 <_Protected_heap_Get_block_size+0xac> <== NOT EXECUTED 40008af8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 40008afc: 7f ff e4 c2 call 40001e04 <== NOT EXECUTED 40008b00: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40008b04: 10 bf ff 91 b 40008948 <_Protected_heap_Get_block_size+0xac> <== NOT EXECUTED 40008b08: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000c2e8 <_Protected_heap_Get_free_information>: void _Protected_heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 4000c2e8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED _RTEMS_Lock_allocator(); 4000c2ec: 7f ff de 75 call 40003cc0 <== NOT EXECUTED 4000c2f0: 01 00 00 00 nop <== NOT EXECUTED 4000c2f4: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED 4000c2f8: 23 10 00 fa sethi %hi(0x4003e800), %l1 <== NOT EXECUTED 4000c2fc: c2 04 61 d0 ld [ %l1 + 0x1d0 ], %g1 ! 4003e9d0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000c300: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c304: 02 80 00 0b be 4000c330 <_Protected_heap_Get_free_information+0x48> <== NOT EXECUTED 4000c308: 27 10 00 fa sethi %hi(0x4003e800), %l3 <== NOT EXECUTED 4000c30c: 03 10 00 fa sethi %hi(0x4003e800), %g1 <== NOT EXECUTED 4000c310: c4 00 63 b0 ld [ %g1 + 0x3b0 ], %g2 ! 4003ebb0 <_System_state_Current> <== NOT EXECUTED 4000c314: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 4000c318: 08 80 00 06 bleu 4000c330 <_Protected_heap_Get_free_information+0x48> <== NOT EXECUTED 4000c31c: 90 10 20 00 clr %o0 <== NOT EXECUTED 4000c320: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000c324: 7f ff fb 49 call 4000b048 <_Internal_error_Occurred> <== NOT EXECUTED 4000c328: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 4000c32c: 27 10 00 fa sethi %hi(0x4003e800), %l3 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 4000c330: 09 10 00 fa sethi %hi(0x4003e800), %g4 <== NOT EXECUTED 4000c334: e0 04 e2 a4 ld [ %l3 + 0x2a4 ], %l0 <== NOT EXECUTED 4000c338: c4 01 22 ac ld [ %g4 + 0x2ac ], %g2 <== NOT EXECUTED executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4000c33c: c0 20 a0 34 clr [ %g2 + 0x34 ] <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4000c340: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 4000c344: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c348: 22 80 00 26 be,a 4000c3e0 <_Protected_heap_Get_free_information+0xf8> <== NOT EXECUTED 4000c34c: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 4000c350: c0 24 20 60 clr [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000c354: 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; 4000c358: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 <== NOT EXECUTED 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; 4000c35c: 88 10 20 01 mov 1, %g4 <== 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; 4000c360: 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; 4000c364: c4 24 20 6c st %g2, [ %l0 + 0x6c ] <== NOT EXECUTED the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000c368: 80 a0 e0 02 cmp %g3, 2 <== NOT EXECUTED 4000c36c: 12 80 00 2c bne 4000c41c <_Protected_heap_Get_free_information+0x134> <== NOT EXECUTED 4000c370: c8 24 20 64 st %g4, [ %l0 + 0x64 ] <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 4000c374: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000c378: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 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++; 4000c37c: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000c380: 02 80 00 43 be 4000c48c <_Protected_heap_Get_free_information+0x1a4> <== NOT EXECUTED 4000c384: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 4000c388: 7f ff de 52 call 40003cd0 <== NOT EXECUTED 4000c38c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED _Heap_Get_free_information( the_heap, info ); 4000c390: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000c394: 40 00 3c 0c call 4001b3c4 <_Heap_Get_free_information> <== NOT EXECUTED 4000c398: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000c39c: c2 04 61 d0 ld [ %l1 + 0x1d0 ], %g1 <== NOT EXECUTED 4000c3a0: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000c3a4: c2 24 61 d0 st %g1, [ %l1 + 0x1d0 ] <== NOT EXECUTED _RTEMS_Unlock_allocator(); 4000c3a8: d0 04 e2 a4 ld [ %l3 + 0x2a4 ], %o0 <== NOT EXECUTED 4000c3ac: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000c3b0: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 4000c3b4: 7f ff f9 22 call 4000a83c <_CORE_mutex_Surrender> <== NOT EXECUTED 4000c3b8: 90 02 20 10 add %o0, 0x10, %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 ) 4000c3bc: c2 04 61 d0 ld [ %l1 + 0x1d0 ], %g1 <== NOT EXECUTED 4000c3c0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000c3c4: c2 24 61 d0 st %g1, [ %l1 + 0x1d0 ] <== NOT EXECUTED 4000c3c8: c4 04 61 d0 ld [ %l1 + 0x1d0 ], %g2 <== NOT EXECUTED 4000c3cc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000c3d0: 02 80 00 2d be 4000c484 <_Protected_heap_Get_free_information+0x19c> <== NOT EXECUTED 4000c3d4: 01 00 00 00 nop <== NOT EXECUTED 4000c3d8: 81 c7 e0 08 ret <== NOT EXECUTED 4000c3dc: 81 e8 00 00 restore <== 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 ) ) { 4000c3e0: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 4000c3e4: 12 80 00 16 bne 4000c43c <_Protected_heap_Get_free_information+0x154> <== NOT EXECUTED 4000c3e8: c6 04 e2 a4 ld [ %l3 + 0x2a4 ], %g3 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4000c3ec: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 4000c3f0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c3f4: 22 80 00 41 be,a 4000c4f8 <_Protected_heap_Get_free_information+0x210> <== NOT EXECUTED 4000c3f8: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 4000c3fc: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4000c400: 12 80 00 0f bne 4000c43c <_Protected_heap_Get_free_information+0x154> <== NOT EXECUTED 4000c404: 82 10 20 02 mov 2, %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; 4000c408: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 4000c40c: 7f ff de 31 call 40003cd0 <== NOT EXECUTED 4000c410: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED Heap_Control *the_heap, Heap_Information *info ) { _RTEMS_Lock_allocator(); _Heap_Get_free_information( the_heap, info ); 4000c414: 10 bf ff e0 b 4000c394 <_Protected_heap_Get_free_information+0xac> <== NOT EXECUTED 4000c418: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 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; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000c41c: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 4000c420: 12 bf ff da bne 4000c388 <_Protected_heap_Get_free_information+0xa0> <== NOT EXECUTED 4000c424: 01 00 00 00 nop <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 4000c428: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4000c42c: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000c430: 02 80 00 17 be 4000c48c <_Protected_heap_Get_free_information+0x1a4> <== NOT EXECUTED 4000c434: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED 4000c438: 30 bf ff d4 b,a 4000c388 <_Protected_heap_Get_free_information+0xa0> <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000c43c: c2 04 61 d0 ld [ %l1 + 0x1d0 ], %g1 <== NOT EXECUTED void _Protected_heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { _RTEMS_Lock_allocator(); 4000c440: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 4000c444: c8 01 22 ac ld [ %g4 + 0x2ac ], %g4 <== NOT EXECUTED 4000c448: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000c44c: c4 21 20 20 st %g2, [ %g4 + 0x20 ] <== NOT EXECUTED 4000c450: c2 24 61 d0 st %g1, [ %l1 + 0x1d0 ] <== NOT EXECUTED 4000c454: 84 00 e0 10 add %g3, 0x10, %g2 <== NOT EXECUTED 4000c458: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 4000c45c: c4 21 20 44 st %g2, [ %g4 + 0x44 ] <== NOT EXECUTED 4000c460: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 4000c464: 7f ff de 1b call 40003cd0 <== NOT EXECUTED 4000c468: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4000c46c: d0 04 e2 a4 ld [ %l3 + 0x2a4 ], %o0 <== NOT EXECUTED 4000c470: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000c474: 7f ff f8 ce call 4000a7ac <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 4000c478: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED _Heap_Get_free_information( the_heap, info ); 4000c47c: 10 bf ff c6 b 4000c394 <_Protected_heap_Get_free_information+0xac> <== NOT EXECUTED 4000c480: 90 10 00 18 mov %i0, %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 ) _Thread_Dispatch(); 4000c484: 40 00 01 f3 call 4000cc50 <_Thread_Dispatch> <== NOT EXECUTED 4000c488: 81 e8 00 00 restore <== NOT EXECUTED */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4000c48c: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED current = executing->current_priority; 4000c490: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 4000c494: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 4000c498: 02 80 00 28 be 4000c538 <_Protected_heap_Get_free_information+0x250> <== NOT EXECUTED 4000c49c: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 4000c4a0: 1a 80 00 1c bcc 4000c510 <_Protected_heap_Get_free_information+0x228> <== NOT EXECUTED 4000c4a4: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000c4a8: c2 04 61 d0 ld [ %l1 + 0x1d0 ], %g1 <== NOT EXECUTED 4000c4ac: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000c4b0: c2 24 61 d0 st %g1, [ %l1 + 0x1d0 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 4000c4b4: 7f ff de 07 call 40003cd0 <== NOT EXECUTED 4000c4b8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED _Thread_Change_priority( 4000c4bc: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 4000c4c0: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 4000c4c4: 40 00 00 bf call 4000c7c0 <_Thread_Change_priority> <== NOT EXECUTED 4000c4c8: 94 10 20 00 clr %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 ) 4000c4cc: c2 04 61 d0 ld [ %l1 + 0x1d0 ], %g1 <== NOT EXECUTED 4000c4d0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000c4d4: c2 24 61 d0 st %g1, [ %l1 + 0x1d0 ] <== NOT EXECUTED 4000c4d8: c4 04 61 d0 ld [ %l1 + 0x1d0 ], %g2 <== NOT EXECUTED 4000c4dc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000c4e0: 32 bf ff ad bne,a 4000c394 <_Protected_heap_Get_free_information+0xac> <== NOT EXECUTED 4000c4e4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 4000c4e8: 40 00 01 da call 4000cc50 <_Thread_Dispatch> <== NOT EXECUTED 4000c4ec: 01 00 00 00 nop <== NOT EXECUTED 4000c4f0: 10 bf ff a9 b 4000c394 <_Protected_heap_Get_free_information+0xac> <== NOT EXECUTED 4000c4f4: 90 10 00 18 mov %i0, %o0 <== 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++; 4000c4f8: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000c4fc: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 4000c500: 7f ff dd f4 call 40003cd0 <== NOT EXECUTED 4000c504: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4000c508: 10 bf ff a3 b 4000c394 <_Protected_heap_Get_free_information+0xac> <== NOT EXECUTED 4000c50c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4000c510: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 4000c514: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 4000c518: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 4000c51c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4000c520: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000c524: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 4000c528: 7f ff dd ea call 40003cd0 <== NOT EXECUTED 4000c52c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4000c530: 10 bf ff 99 b 4000c394 <_Protected_heap_Get_free_information+0xac> <== NOT EXECUTED 4000c534: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 4000c538: 7f ff dd e6 call 40003cd0 <== NOT EXECUTED 4000c53c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4000c540: 10 bf ff 95 b 4000c394 <_Protected_heap_Get_free_information+0xac> <== NOT EXECUTED 4000c544: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40008b0c <_Protected_heap_Resize_block>: boolean _Protected_heap_Resize_block( Heap_Control *the_heap, void *starting_address, size_t size ) { 40008b0c: 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(); 40008b10: 7f ff e4 b9 call 40001df4 <== NOT EXECUTED 40008b14: 01 00 00 00 nop <== NOT EXECUTED 40008b18: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED 40008b1c: 23 10 00 6a sethi %hi(0x4001a800), %l1 <== NOT EXECUTED 40008b20: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 ! 4001ab60 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40008b24: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008b28: 02 80 00 0b be 40008b54 <_Protected_heap_Resize_block+0x48> <== NOT EXECUTED 40008b2c: 27 10 00 6b sethi %hi(0x4001ac00), %l3 <== NOT EXECUTED 40008b30: 03 10 00 6b sethi %hi(0x4001ac00), %g1 <== NOT EXECUTED 40008b34: c4 00 61 40 ld [ %g1 + 0x140 ], %g2 ! 4001ad40 <_System_state_Current> <== NOT EXECUTED 40008b38: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 40008b3c: 08 80 00 06 bleu 40008b54 <_Protected_heap_Resize_block+0x48> <== NOT EXECUTED 40008b40: 90 10 20 00 clr %o0 <== NOT EXECUTED 40008b44: 92 10 20 00 clr %o1 <== NOT EXECUTED 40008b48: 7f ff fb 0d call 4000777c <_Internal_error_Occurred> <== NOT EXECUTED 40008b4c: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 40008b50: 27 10 00 6b sethi %hi(0x4001ac00), %l3 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 40008b54: 09 10 00 6b sethi %hi(0x4001ac00), %g4 <== NOT EXECUTED 40008b58: e0 04 e0 34 ld [ %l3 + 0x34 ], %l0 <== NOT EXECUTED 40008b5c: c4 01 20 3c ld [ %g4 + 0x3c ], %g2 <== NOT EXECUTED executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40008b60: c0 20 a0 34 clr [ %g2 + 0x34 ] <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 40008b64: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 40008b68: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008b6c: 22 80 00 2e be,a 40008c24 <_Protected_heap_Resize_block+0x118> <== NOT EXECUTED 40008b70: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 40008b74: c0 24 20 60 clr [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40008b78: 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; 40008b7c: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 <== NOT EXECUTED 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; 40008b80: 88 10 20 01 mov 1, %g4 <== 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; 40008b84: 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; 40008b88: c4 24 20 6c st %g2, [ %l0 + 0x6c ] <== NOT EXECUTED the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40008b8c: 80 a0 e0 02 cmp %g3, 2 <== NOT EXECUTED 40008b90: 12 80 00 34 bne 40008c60 <_Protected_heap_Resize_block+0x154> <== NOT EXECUTED 40008b94: c8 24 20 64 st %g4, [ %l0 + 0x64 ] <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40008b98: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40008b9c: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 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++; 40008ba0: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40008ba4: 02 80 00 49 be 40008cc8 <_Protected_heap_Resize_block+0x1bc> <== NOT EXECUTED 40008ba8: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40008bac: 7f ff e4 96 call 40001e04 <== NOT EXECUTED 40008bb0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED status = _Heap_Resize_block( 40008bb4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40008bb8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40008bbc: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 40008bc0: 96 07 bf f4 add %fp, -12, %o3 <== NOT EXECUTED 40008bc4: 40 00 12 62 call 4000d54c <_Heap_Resize_block> <== NOT EXECUTED 40008bc8: 98 07 bf f0 add %fp, -16, %o4 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008bcc: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 <== NOT EXECUTED 40008bd0: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 40008bd4: 82 00 60 01 inc %g1 <== NOT EXECUTED 40008bd8: c2 24 63 60 st %g1, [ %l1 + 0x360 ] <== NOT EXECUTED the_heap, starting_address, size, &old_mem_size, &avail_mem_size ); _RTEMS_Unlock_allocator(); 40008bdc: d0 04 e0 34 ld [ %l3 + 0x34 ], %o0 <== NOT EXECUTED 40008be0: 94 10 20 00 clr %o2 <== NOT EXECUTED 40008be4: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 40008be8: 7f ff f8 e2 call 40006f70 <_CORE_mutex_Surrender> <== NOT EXECUTED 40008bec: 90 02 20 10 add %o0, 0x10, %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 ) 40008bf0: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 <== NOT EXECUTED 40008bf4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40008bf8: c2 24 63 60 st %g1, [ %l1 + 0x360 ] <== NOT EXECUTED 40008bfc: c4 04 63 60 ld [ %l1 + 0x360 ], %g2 <== NOT EXECUTED 40008c00: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40008c04: 12 80 00 05 bne 40008c18 <_Protected_heap_Resize_block+0x10c> <== NOT EXECUTED 40008c08: 80 a0 00 10 cmp %g0, %l0 <== NOT EXECUTED _Thread_Dispatch(); 40008c0c: 40 00 01 82 call 40009214 <_Thread_Dispatch> <== NOT EXECUTED 40008c10: 01 00 00 00 nop <== NOT EXECUTED return (status == HEAP_RESIZE_SUCCESSFUL); } 40008c14: 80 a0 00 10 cmp %g0, %l0 <== NOT EXECUTED 40008c18: b0 60 3f ff subx %g0, -1, %i0 <== NOT EXECUTED 40008c1c: 81 c7 e0 08 ret <== NOT EXECUTED 40008c20: 81 e8 00 00 restore <== 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 ) ) { 40008c24: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40008c28: 12 80 00 16 bne 40008c80 <_Protected_heap_Resize_block+0x174> <== NOT EXECUTED 40008c2c: c6 04 e0 34 ld [ %l3 + 0x34 ], %g3 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40008c30: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 40008c34: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008c38: 22 80 00 3f be,a 40008d34 <_Protected_heap_Resize_block+0x228> <== NOT EXECUTED 40008c3c: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 40008c40: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40008c44: 12 80 00 0f bne 40008c80 <_Protected_heap_Resize_block+0x174> <== NOT EXECUTED 40008c48: 82 10 20 02 mov 2, %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; 40008c4c: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 40008c50: 7f ff e4 6d call 40001e04 <== NOT EXECUTED 40008c54: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED Heap_Resize_status status; uint32_t old_mem_size; uint32_t avail_mem_size; _RTEMS_Lock_allocator(); status = _Heap_Resize_block( 40008c58: 10 bf ff d8 b 40008bb8 <_Protected_heap_Resize_block+0xac> <== NOT EXECUTED 40008c5c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 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; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40008c60: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 40008c64: 12 bf ff d2 bne 40008bac <_Protected_heap_Resize_block+0xa0> <== NOT EXECUTED 40008c68: 01 00 00 00 nop <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40008c6c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40008c70: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40008c74: 02 80 00 15 be 40008cc8 <_Protected_heap_Resize_block+0x1bc> <== NOT EXECUTED 40008c78: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED 40008c7c: 30 bf ff cc b,a 40008bac <_Protected_heap_Resize_block+0xa0> <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008c80: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 <== NOT EXECUTED { Heap_Resize_status status; uint32_t old_mem_size; uint32_t avail_mem_size; _RTEMS_Lock_allocator(); 40008c84: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 40008c88: c8 01 20 3c ld [ %g4 + 0x3c ], %g4 <== NOT EXECUTED 40008c8c: 82 00 60 01 inc %g1 <== NOT EXECUTED 40008c90: c4 21 20 20 st %g2, [ %g4 + 0x20 ] <== NOT EXECUTED 40008c94: c2 24 63 60 st %g1, [ %l1 + 0x360 ] <== NOT EXECUTED 40008c98: 84 00 e0 10 add %g3, 0x10, %g2 <== NOT EXECUTED 40008c9c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40008ca0: c4 21 20 44 st %g2, [ %g4 + 0x44 ] <== NOT EXECUTED 40008ca4: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 40008ca8: 7f ff e4 57 call 40001e04 <== NOT EXECUTED 40008cac: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40008cb0: d0 04 e0 34 ld [ %l3 + 0x34 ], %o0 <== NOT EXECUTED 40008cb4: 92 10 20 00 clr %o1 <== NOT EXECUTED 40008cb8: 7f ff f8 8a call 40006ee0 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 40008cbc: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED status = _Heap_Resize_block( 40008cc0: 10 bf ff be b 40008bb8 <_Protected_heap_Resize_block+0xac> <== NOT EXECUTED 40008cc4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 40008cc8: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED current = executing->current_priority; 40008ccc: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 40008cd0: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40008cd4: 02 80 00 28 be 40008d74 <_Protected_heap_Resize_block+0x268> <== NOT EXECUTED 40008cd8: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 40008cdc: 1a 80 00 1c bcc 40008d4c <_Protected_heap_Resize_block+0x240> <== NOT EXECUTED 40008ce0: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED 40008ce4: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 <== NOT EXECUTED 40008ce8: 82 00 60 01 inc %g1 <== NOT EXECUTED 40008cec: c2 24 63 60 st %g1, [ %l1 + 0x360 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 40008cf0: 7f ff e4 45 call 40001e04 <== NOT EXECUTED 40008cf4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED _Thread_Change_priority( 40008cf8: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 40008cfc: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 40008d00: 40 00 00 21 call 40008d84 <_Thread_Change_priority> <== NOT EXECUTED 40008d04: 94 10 20 00 clr %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 ) 40008d08: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 <== NOT EXECUTED 40008d0c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40008d10: c2 24 63 60 st %g1, [ %l1 + 0x360 ] <== NOT EXECUTED 40008d14: c4 04 63 60 ld [ %l1 + 0x360 ], %g2 <== NOT EXECUTED 40008d18: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40008d1c: 32 bf ff a7 bne,a 40008bb8 <_Protected_heap_Resize_block+0xac> <== NOT EXECUTED 40008d20: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 40008d24: 40 00 01 3c call 40009214 <_Thread_Dispatch> <== NOT EXECUTED 40008d28: 01 00 00 00 nop <== NOT EXECUTED 40008d2c: 10 bf ff a3 b 40008bb8 <_Protected_heap_Resize_block+0xac> <== NOT EXECUTED 40008d30: 90 10 00 18 mov %i0, %o0 <== 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++; 40008d34: 82 00 60 01 inc %g1 <== NOT EXECUTED 40008d38: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 40008d3c: 7f ff e4 32 call 40001e04 <== NOT EXECUTED 40008d40: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40008d44: 10 bf ff 9d b 40008bb8 <_Protected_heap_Resize_block+0xac> <== NOT EXECUTED 40008d48: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 40008d4c: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 40008d50: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40008d54: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 40008d58: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40008d5c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40008d60: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40008d64: 7f ff e4 28 call 40001e04 <== NOT EXECUTED 40008d68: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40008d6c: 10 bf ff 93 b 40008bb8 <_Protected_heap_Resize_block+0xac> <== NOT EXECUTED 40008d70: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 40008d74: 7f ff e4 24 call 40001e04 <== NOT EXECUTED 40008d78: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40008d7c: 10 bf ff 8f b 40008bb8 <_Protected_heap_Resize_block+0xac> <== NOT EXECUTED 40008d80: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000d230 <_RTEMS_tasks_Delete_extension>: User_extensions_routine _RTEMS_tasks_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { 4000d230: 9d e3 bf 98 save %sp, -104, %sp /* * Free per task variable memory */ tvp = deleted->task_variables; 4000d234: e0 06 61 7c ld [ %i1 + 0x17c ], %l0 deleted->task_variables = NULL; 4000d238: c0 26 61 7c clr [ %i1 + 0x17c ] while (tvp) { 4000d23c: 80 a4 20 00 cmp %l0, 0 4000d240: 02 80 00 25 be 4000d2d4 <_RTEMS_tasks_Delete_extension+0xa4> 4000d244: 29 10 00 6a sethi %hi(0x4001a800), %l4 4000d248: 27 10 00 6b sethi %hi(0x4001ac00), %l3 <== NOT EXECUTED 4000d24c: 10 80 00 12 b 4000d294 <_RTEMS_tasks_Delete_extension+0x64> <== NOT EXECUTED 4000d250: a4 15 23 ac or %l4, 0x3ac, %l2 <== NOT EXECUTED next = (rtems_task_variable_t *)tvp->next; if (_Thread_Is_executing(deleted)) { if (tvp->dtor) 4000d254: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 <== NOT EXECUTED 4000d258: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000d25c: 22 80 00 06 be,a 4000d274 <_RTEMS_tasks_Delete_extension+0x44> <== NOT EXECUTED 4000d260: c4 04 20 04 ld [ %l0 + 4 ], %g2 <== NOT EXECUTED (*tvp->dtor)(*tvp->ptr); 4000d264: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED 4000d268: 9f c0 80 00 call %g2 <== NOT EXECUTED 4000d26c: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED *tvp->ptr = tvp->gval; 4000d270: c4 04 20 04 ld [ %l0 + 4 ], %g2 <== NOT EXECUTED 4000d274: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 4000d278: c2 20 80 00 st %g1, [ %g2 ] <== NOT EXECUTED RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 4000d27c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4000d280: 7f ff e8 3f call 4000737c <_Heap_Free> <== NOT EXECUTED 4000d284: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 4000d288: a0 94 60 00 orcc %l1, 0, %l0 <== NOT EXECUTED 4000d28c: 22 80 00 13 be,a 4000d2d8 <_RTEMS_tasks_Delete_extension+0xa8> <== NOT EXECUTED 4000d290: d2 06 61 6c ld [ %i1 + 0x16c ], %o1 <== NOT EXECUTED next = (rtems_task_variable_t *)tvp->next; if (_Thread_Is_executing(deleted)) { 4000d294: c2 04 e0 3c ld [ %l3 + 0x3c ], %g1 <== NOT EXECUTED 4000d298: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 4000d29c: 02 bf ff ee be 4000d254 <_RTEMS_tasks_Delete_extension+0x24> <== NOT EXECUTED 4000d2a0: e2 04 00 00 ld [ %l0 ], %l1 <== NOT EXECUTED if (tvp->dtor) (*tvp->dtor)(*tvp->ptr); *tvp->ptr = tvp->gval; } else { if (tvp->dtor) 4000d2a4: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000d2a8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d2ac: 02 bf ff f5 be 4000d280 <_RTEMS_tasks_Delete_extension+0x50> <== NOT EXECUTED 4000d2b0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED (*tvp->dtor)(tvp->tval); 4000d2b4: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000d2b8: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED 4000d2bc: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4000d2c0: 7f ff e8 2f call 4000737c <_Heap_Free> <== NOT EXECUTED 4000d2c4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 4000d2c8: a0 94 60 00 orcc %l1, 0, %l0 <== NOT EXECUTED 4000d2cc: 12 bf ff f3 bne 4000d298 <_RTEMS_tasks_Delete_extension+0x68> <== NOT EXECUTED 4000d2d0: c2 04 e0 3c ld [ %l3 + 0x3c ], %g1 <== NOT EXECUTED 4000d2d4: d2 06 61 6c ld [ %i1 + 0x16c ], %o1 4000d2d8: 7f ff e8 29 call 4000737c <_Heap_Free> 4000d2dc: 90 15 23 ac or %l4, 0x3ac, %o0 /* * Free API specific memory */ (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] ); deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL; 4000d2e0: c0 26 61 6c clr [ %i1 + 0x16c ] } 4000d2e4: 81 c7 e0 08 ret 4000d2e8: 81 e8 00 00 restore 40006538 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 40006538: 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; 4000653c: 03 10 00 6b sethi %hi(0x4001ac00), %g1 40006540: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 ! 4001ac20 <_Configuration_Table> 40006544: c6 00 a0 2c ld [ %g2 + 0x2c ], %g3 /* * NOTE: This is slightly different from the Ada implementation. */ user_tasks = api_configuration->User_initialization_tasks_table; 40006548: d0 00 e0 28 ld [ %g3 + 0x28 ], %o0 maximum = api_configuration->number_of_initialization_tasks; if ( !user_tasks || maximum == 0 ) 4000654c: 80 a2 20 00 cmp %o0, 0 40006550: 02 80 00 2f be 4000660c <_RTEMS_tasks_Initialize_user_tasks_body+0xd4> 40006554: e4 00 e0 24 ld [ %g3 + 0x24 ], %l2 40006558: 80 a4 a0 00 cmp %l2, 0 4000655c: 02 80 00 2c be 4000660c <_RTEMS_tasks_Initialize_user_tasks_body+0xd4> 40006560: a0 10 00 08 mov %o0, %l0 return; for ( index=0 ; index < maximum ; index++ ) { 40006564: a2 10 20 00 clr %l1 40006568: 10 80 00 0c b 40006598 <_RTEMS_tasks_Initialize_user_tasks_body+0x60> 4000656c: a6 07 bf f4 add %fp, -12, %l3 ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); return_value = rtems_task_start( 40006570: d4 04 20 18 ld [ %l0 + 0x18 ], %o2 40006574: d0 07 bf f4 ld [ %fp + -12 ], %o0 40006578: 40 00 00 27 call 40006614 4000657c: a2 04 60 01 inc %l1 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 40006580: 80 a2 20 00 cmp %o0, 0 40006584: 12 80 00 1c bne 400065f4 <_RTEMS_tasks_Initialize_user_tasks_body+0xbc> 40006588: 94 10 00 08 mov %o0, %o2 maximum = api_configuration->number_of_initialization_tasks; if ( !user_tasks || maximum == 0 ) return; for ( index=0 ; index < maximum ; index++ ) { 4000658c: 80 a4 40 12 cmp %l1, %l2 40006590: 02 80 00 1f be 4000660c <_RTEMS_tasks_Initialize_user_tasks_body+0xd4> 40006594: a0 04 20 1c add %l0, 0x1c, %l0 return_value = rtems_task_create( 40006598: d6 04 20 14 ld [ %l0 + 0x14 ], %o3 4000659c: d8 04 20 0c ld [ %l0 + 0xc ], %o4 400065a0: d2 04 20 08 ld [ %l0 + 8 ], %o1 400065a4: d4 04 20 04 ld [ %l0 + 4 ], %o2 400065a8: d0 04 00 00 ld [ %l0 ], %o0 400065ac: 7f ff ff 1a call 40006214 400065b0: 9a 10 00 13 mov %l3, %o5 user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 400065b4: 80 a2 20 00 cmp %o0, 0 400065b8: 22 bf ff ee be,a 40006570 <_RTEMS_tasks_Initialize_user_tasks_body+0x38> 400065bc: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); 400065c0: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 400065c4: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 400065c8: 40 00 04 6d call 4000777c <_Internal_error_Occurred> <== NOT EXECUTED 400065cc: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED return_value = rtems_task_start( 400065d0: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 <== NOT EXECUTED 400065d4: d4 04 20 18 ld [ %l0 + 0x18 ], %o2 <== NOT EXECUTED 400065d8: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED 400065dc: 40 00 00 0e call 40006614 <== NOT EXECUTED 400065e0: a2 04 60 01 inc %l1 <== NOT EXECUTED id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 400065e4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400065e8: 02 bf ff ea be 40006590 <_RTEMS_tasks_Initialize_user_tasks_body+0x58> <== NOT EXECUTED 400065ec: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); 400065f0: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 400065f4: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 400065f8: 40 00 04 61 call 4000777c <_Internal_error_Occurred> <== NOT EXECUTED 400065fc: 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++ ) { 40006600: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED 40006604: 12 bf ff e5 bne 40006598 <_RTEMS_tasks_Initialize_user_tasks_body+0x60> <== NOT EXECUTED 40006608: a0 04 20 1c add %l0, 0x1c, %l0 <== NOT EXECUTED 4000660c: 81 c7 e0 08 ret 40006610: 81 e8 00 00 restore 400071f8 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 400071f8: 9d e3 bf 90 save %sp, -112, %sp 400071fc: 11 10 00 7e sethi %hi(0x4001f800), %o0 40007200: 92 10 00 18 mov %i0, %o1 40007204: 90 12 21 48 or %o0, 0x148, %o0 40007208: 40 00 09 cd call 4000993c <_Objects_Get> 4000720c: 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 ) { 40007210: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007214: 80 a0 60 00 cmp %g1, 0 40007218: 12 80 00 11 bne 4000725c <_Rate_monotonic_Timeout+0x64> 4000721c: b0 10 00 08 mov %o0, %i0 case OBJECTS_REMOTE: /* impossible */ case OBJECTS_ERROR: break; case OBJECTS_LOCAL: the_thread = the_period->owner; 40007220: d0 02 20 50 ld [ %o0 + 0x50 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 40007224: 03 00 00 10 sethi %hi(0x4000), %g1 40007228: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 4000722c: 80 88 80 01 btst %g2, %g1 40007230: 32 80 00 0d bne,a 40007264 <_Rate_monotonic_Timeout+0x6c> 40007234: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 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 ) { 40007238: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 4000723c: 80 a0 60 01 cmp %g1, 1 40007240: 02 80 00 17 be 4000729c <_Rate_monotonic_Timeout+0xa4> 40007244: 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 ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 40007248: 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; 4000724c: 05 10 00 7e sethi %hi(0x4001f800), %g2 40007250: c2 00 a2 e0 ld [ %g2 + 0x2e0 ], %g1 ! 4001fae0 <_Thread_Dispatch_disable_level> 40007254: 82 00 7f ff add %g1, -1, %g1 40007258: c2 20 a2 e0 st %g1, [ %g2 + 0x2e0 ] 4000725c: 81 c7 e0 08 ret 40007260: 81 e8 00 00 restore case OBJECTS_ERROR: break; case OBJECTS_LOCAL: the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && 40007264: c2 06 20 08 ld [ %i0 + 8 ], %g1 40007268: 80 a0 80 01 cmp %g2, %g1 4000726c: 32 bf ff f4 bne,a 4000723c <_Rate_monotonic_Timeout+0x44> 40007270: 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 ); 40007274: 13 04 00 ff sethi %hi(0x1003fc00), %o1 40007278: 40 00 0e 24 call 4000ab08 <_Thread_Clear_state> 4000727c: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40007280: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007284: 92 06 20 10 add %i0, 0x10, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40007288: c2 26 20 1c st %g1, [ %i0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4000728c: 11 10 00 7e sethi %hi(0x4001f800), %o0 40007290: 40 00 14 59 call 4000c3f4 <_Watchdog_Insert> 40007294: 90 12 23 dc or %o0, 0x3dc, %o0 ! 4001fbdc <_Watchdog_Ticks_chain> 40007298: 30 bf ff ed b,a 4000724c <_Rate_monotonic_Timeout+0x54> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000729c: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 <== 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; 400072a0: 84 10 20 03 mov 3, %g2 <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400072a4: 92 06 20 10 add %i0, 0x10, %o1 <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 400072a8: c2 26 20 1c st %g1, [ %i0 + 0x1c ] <== NOT EXECUTED 400072ac: c4 26 20 38 st %g2, [ %i0 + 0x38 ] <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400072b0: 11 10 00 7e sethi %hi(0x4001f800), %o0 <== NOT EXECUTED 400072b4: 40 00 14 50 call 4000c3f4 <_Watchdog_Insert> <== NOT EXECUTED 400072b8: 90 12 23 dc or %o0, 0x3dc, %o0 ! 4001fbdc <_Watchdog_Ticks_chain> <== NOT EXECUTED 400072bc: 30 bf ff e4 b,a 4000724c <_Rate_monotonic_Timeout+0x54> <== NOT EXECUTED 4001ade0 <_Region_Process_queue>: */ void _Region_Process_queue( Region_Control *the_region ) { 4001ade0: 9d e3 bf 98 save %sp, -104, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4001ade4: 27 10 00 d3 sethi %hi(0x40034c00), %l3 4001ade8: c2 04 e0 80 ld [ %l3 + 0x80 ], %g1 ! 40034c80 <_Thread_Dispatch_disable_level> 4001adec: 82 00 60 01 inc %g1 4001adf0: c2 24 e0 80 st %g1, [ %l3 + 0x80 ] 4001adf4: c2 04 e0 80 ld [ %l3 + 0x80 ], %g1 4001adf8: 82 00 60 01 inc %g1 4001adfc: c2 24 e0 80 st %g1, [ %l3 + 0x80 ] * NOTE: Be sure to disable dispatching before unlocking the mutex * since we do not want to open a window where a context * switch could occur. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); 4001ae00: 03 10 00 d3 sethi %hi(0x40034c00), %g1 4001ae04: d0 00 61 54 ld [ %g1 + 0x154 ], %o0 ! 40034d54 <_RTEMS_Allocator_Mutex> 4001ae08: 94 10 20 00 clr %o2 4001ae0c: d2 02 20 08 ld [ %o0 + 8 ], %o1 4001ae10: 7f ff e5 e0 call 40014590 <_CORE_mutex_Surrender> 4001ae14: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001ae18: c2 04 e0 80 ld [ %l3 + 0x80 ], %g1 4001ae1c: a2 06 20 10 add %i0, 0x10, %l1 4001ae20: 82 00 7f ff add %g1, -1, %g1 4001ae24: c2 24 e0 80 st %g1, [ %l3 + 0x80 ] 4001ae28: c4 04 e0 80 ld [ %l3 + 0x80 ], %g2 4001ae2c: 80 a0 a0 00 cmp %g2, 0 4001ae30: 02 80 00 21 be 4001aeb4 <_Region_Process_queue+0xd4> 4001ae34: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uint32_t size ) { return _Heap_Allocate( &the_region->Memory, size ); 4001ae38: 10 80 00 10 b 4001ae78 <_Region_Process_queue+0x98> 4001ae3c: a4 06 20 68 add %i0, 0x68, %l2 the_segment = (void **) _Region_Allocate_segment( the_region, the_thread->Wait.count ); if ( the_segment == NULL ) 4001ae40: 7f ff e6 e8 call 400149e0 <_Heap_Allocate> 4001ae44: d2 04 20 24 ld [ %l0 + 0x24 ], %o1 4001ae48: 80 a2 20 00 cmp %o0, 0 4001ae4c: 02 80 00 11 be 4001ae90 <_Region_Process_queue+0xb0> 4001ae50: 01 00 00 00 nop break; *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; 4001ae54: c2 06 20 64 ld [ %i0 + 0x64 ], %g1 ); if ( the_segment == NULL ) break; *(void **)the_thread->Wait.return_argument = the_segment; 4001ae58: c4 04 20 28 ld [ %l0 + 0x28 ], %g2 the_region->number_of_used_blocks += 1; 4001ae5c: 82 00 60 01 inc %g1 ); if ( the_segment == NULL ) break; *(void **)the_thread->Wait.return_argument = the_segment; 4001ae60: d0 20 80 00 st %o0, [ %g2 ] the_region->number_of_used_blocks += 1; 4001ae64: c2 26 20 64 st %g1, [ %i0 + 0x64 ] _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); 4001ae68: 90 10 00 11 mov %l1, %o0 4001ae6c: 40 00 02 79 call 4001b850 <_Thread_queue_Extract> 4001ae70: 92 10 00 10 mov %l0, %o1 the_thread->Wait.return_code = RTEMS_SUCCESSFUL; 4001ae74: c0 24 20 34 clr [ %l0 + 0x34 ] /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); 4001ae78: 40 00 02 c0 call 4001b978 <_Thread_queue_First> 4001ae7c: 90 10 00 11 mov %l1, %o0 4001ae80: a0 10 00 08 mov %o0, %l0 if ( the_thread == NULL ) 4001ae84: 80 a4 20 00 cmp %l0, 0 4001ae88: 12 bf ff ee bne 4001ae40 <_Region_Process_queue+0x60> 4001ae8c: 90 10 00 12 mov %l2, %o0 4001ae90: c2 04 e0 80 ld [ %l3 + 0x80 ], %g1 4001ae94: 82 00 7f ff add %g1, -1, %g1 4001ae98: c2 24 e0 80 st %g1, [ %l3 + 0x80 ] 4001ae9c: c4 04 e0 80 ld [ %l3 + 0x80 ], %g2 4001aea0: 80 a0 a0 00 cmp %g2, 0 4001aea4: 02 80 00 07 be 4001aec0 <_Region_Process_queue+0xe0> 4001aea8: 01 00 00 00 nop 4001aeac: 81 c7 e0 08 ret <== NOT EXECUTED 4001aeb0: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 4001aeb4: 7f ff ee ea call 40016a5c <_Thread_Dispatch> <== NOT EXECUTED 4001aeb8: a4 06 20 68 add %i0, 0x68, %l2 <== NOT EXECUTED 4001aebc: 30 bf ff ef b,a 4001ae78 <_Region_Process_queue+0x98> <== NOT EXECUTED 4001aec0: 7f ff ee e7 call 40016a5c <_Thread_Dispatch> 4001aec4: 81 e8 00 00 restore 4001aec8: 01 00 00 00 nop 40008b84 <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 40008b84: 9d e3 bf 98 save %sp, -104, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008b88: 23 10 00 9e sethi %hi(0x40027800), %l1 40008b8c: c2 04 60 90 ld [ %l1 + 0x90 ], %g1 ! 40027890 <_Thread_Dispatch_disable_level> 40008b90: 82 00 60 01 inc %g1 40008b94: c2 24 60 90 st %g1, [ %l1 + 0x90 ] _Thread_Disable_dispatch(); _TOD_Deactivate(); if ( time->tv_sec < _TOD_Seconds_since_epoch ) 40008b98: 21 10 00 9e sethi %hi(0x40027800), %l0 40008b9c: c2 06 00 00 ld [ %i0 ], %g1 40008ba0: d4 04 21 48 ld [ %l0 + 0x148 ], %o2 40008ba4: 80 a0 40 0a cmp %g1, %o2 40008ba8: 36 80 00 18 bge,a 40008c08 <_TOD_Set+0x84> 40008bac: 94 20 40 0a sub %g1, %o2, %o2 Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 40008bb0: 11 10 00 9e sethi %hi(0x40027800), %o0 40008bb4: 94 22 80 01 sub %o2, %g1, %o2 40008bb8: 90 12 21 80 or %o0, 0x180, %o0 40008bbc: 40 00 0e ea call 4000c764 <_Watchdog_Adjust> 40008bc0: 92 10 20 01 mov 1, %o1 else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - _TOD_Seconds_since_epoch ); /* POSIX format TOD (timespec) */ _TOD_Now = *time; 40008bc4: c4 06 00 00 ld [ %i0 ], %g2 40008bc8: 86 14 21 48 or %l0, 0x148, %g3 40008bcc: c4 24 21 48 st %g2, [ %l0 + 0x148 ] 40008bd0: c2 06 20 04 ld [ %i0 + 4 ], %g1 _TOD_Is_set = TRUE; 40008bd4: 84 10 20 01 mov 1, %g2 else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - _TOD_Seconds_since_epoch ); /* POSIX format TOD (timespec) */ _TOD_Now = *time; 40008bd8: c2 20 e0 04 st %g1, [ %g3 + 4 ] _TOD_Is_set = TRUE; 40008bdc: 03 10 00 9e sethi %hi(0x40027800), %g1 40008be0: c4 20 60 cc st %g2, [ %g1 + 0xcc ] ! 400278cc <_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 ) 40008be4: c2 04 60 90 ld [ %l1 + 0x90 ], %g1 40008be8: 82 00 7f ff add %g1, -1, %g1 40008bec: c2 24 60 90 st %g1, [ %l1 + 0x90 ] 40008bf0: c4 04 60 90 ld [ %l1 + 0x90 ], %g2 40008bf4: 80 a0 a0 00 cmp %g2, 0 40008bf8: 02 80 00 0a be 40008c20 <_TOD_Set+0x9c> 40008bfc: 01 00 00 00 nop 40008c00: 81 c7 e0 08 ret 40008c04: 81 e8 00 00 restore 40008c08: 11 10 00 9e sethi %hi(0x40027800), %o0 40008c0c: 92 10 20 00 clr %o1 40008c10: 40 00 0e d5 call 4000c764 <_Watchdog_Adjust> 40008c14: 90 12 21 80 or %o0, 0x180, %o0 else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - _TOD_Seconds_since_epoch ); /* POSIX format TOD (timespec) */ _TOD_Now = *time; 40008c18: 10 bf ff ec b 40008bc8 <_TOD_Set+0x44> 40008c1c: c4 06 00 00 ld [ %i0 ], %g2 _Thread_Dispatch(); 40008c20: 40 00 08 3c call 4000ad10 <_Thread_Dispatch> <== NOT EXECUTED 40008c24: 81 e8 00 00 restore <== NOT EXECUTED 40008c28: 01 00 00 00 nop 400090c4 <_Thread_Create_idle>: */ const char *_Thread_Idle_name = "IDLE"; void _Thread_Create_idle( void ) { 400090c4: 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 ); 400090c8: 39 10 00 6b sethi %hi(0x4001ac00), %i4 400090cc: 7f ff f9 d9 call 40007830 <_Objects_Allocate> 400090d0: 90 17 20 f0 or %i4, 0xf0, %o0 ! 4001acf0 <_Thread_Internal_information> idle = (void *) _CPU_Thread_Idle_body; #else idle = (void *) _Thread_Idle_body; #endif if ( _CPU_Table.idle_task ) 400090d4: 03 10 00 6a sethi %hi(0x4001a800), %g1 400090d8: 96 10 63 74 or %g1, 0x374, %o3 ! 4001ab74 <_CPU_Table> 400090dc: c4 02 e0 0c ld [ %o3 + 0xc ], %g2 * 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(); 400090e0: 37 10 00 6b sethi %hi(0x4001ac00), %i3 400090e4: d0 26 e1 48 st %o0, [ %i3 + 0x148 ] ! 4001ad48 <_Thread_Idle> idle = (void *) _CPU_Thread_Idle_body; #else idle = (void *) _Thread_Idle_body; #endif if ( _CPU_Table.idle_task ) 400090e8: 03 10 00 24 sethi %hi(0x40009000), %g1 400090ec: 92 10 00 08 mov %o0, %o1 400090f0: 80 a0 a0 00 cmp %g2, 0 400090f4: 02 80 00 03 be 40009100 <_Thread_Create_idle+0x3c> 400090f8: b4 10 63 70 or %g1, 0x370, %i2 idle = _CPU_Table.idle_task; 400090fc: b4 10 00 02 mov %g2, %i2 <== NOT EXECUTED idle_task_stack_size = _CPU_Table.idle_task_stack_size; 40009100: d6 02 e0 14 ld [ %o3 + 0x14 ], %o3 if ( idle_task_stack_size < STACK_MINIMUM_SIZE ) 40009104: 80 a2 ef ff cmp %o3, 0xfff 40009108: 28 80 00 02 bleu,a 40009110 <_Thread_Create_idle+0x4c> 4000910c: 17 00 00 04 sethi %hi(0x1000), %o3 idle_task_stack_size = STACK_MINIMUM_SIZE; _Thread_Initialize( 40009110: 03 10 00 67 sethi %hi(0x40019c00), %g1 40009114: c4 00 62 58 ld [ %g1 + 0x258 ], %g2 ! 40019e58 <_Thread_Idle_name> 40009118: 82 10 20 01 mov 1, %g1 4000911c: c4 23 a0 6c st %g2, [ %sp + 0x6c ] 40009120: 90 17 20 f0 or %i4, 0xf0, %o0 40009124: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 40009128: c0 23 a0 60 clr [ %sp + 0x60 ] 4000912c: c0 23 a0 64 clr [ %sp + 0x64 ] 40009130: c0 23 a0 68 clr [ %sp + 0x68 ] 40009134: 94 10 20 00 clr %o2 40009138: 98 10 20 00 clr %o4 4000913c: 40 00 00 8e call 40009374 <_Thread_Initialize> 40009140: 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 = 40009144: c6 06 e1 48 ld [ %i3 + 0x148 ], %g3 40009148: 03 10 00 6b sethi %hi(0x4001ac00), %g1 4000914c: 05 10 00 6b sethi %hi(0x4001ac00), %g2 _Thread_Executing = _Thread_Idle; _Thread_Start( 40009150: b0 10 00 03 mov %g3, %i0 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 40009154: c6 20 60 3c st %g3, [ %g1 + 0x3c ] 40009158: c6 20 a0 14 st %g3, [ %g2 + 0x14 ] _Thread_Executing = _Thread_Idle; _Thread_Start( 4000915c: b2 10 20 00 clr %i1 40009160: b6 10 20 00 clr %i3 40009164: 40 00 04 07 call 4000a180 <_Thread_Start> 40009168: 99 e8 20 00 restore %g0, 0, %o4 4000916c: 01 00 00 00 nop 40009170 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored ) { 40009170: 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 ) ) { 40009174: 92 96 20 00 orcc %i0, 0, %o1 40009178: 12 80 00 11 bne 400091bc <_Thread_Delay_ended+0x4c> 4000917c: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40009180: 31 10 00 6a sethi %hi(0x4001a800), %i0 <== NOT EXECUTED 40009184: c2 06 23 60 ld [ %i0 + 0x360 ], %g1 ! 4001ab60 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40009188: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000918c: c2 26 23 60 st %g1, [ %i0 + 0x360 ] <== 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; 40009190: 03 10 00 6b sethi %hi(0x4001ac00), %g1 <== NOT EXECUTED 40009194: d0 00 60 3c ld [ %g1 + 0x3c ], %o0 ! 4001ac3c <_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; 40009198: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4000919c: 13 04 00 ff sethi %hi(0x1003fc00), %o1 <== NOT EXECUTED 400091a0: 7f ff ff 68 call 40008f40 <_Thread_Clear_state> 400091a4: 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; 400091a8: c2 06 23 60 ld [ %i0 + 0x360 ], %g1 400091ac: 82 00 7f ff add %g1, -1, %g1 400091b0: c2 26 23 60 st %g1, [ %i0 + 0x360 ] 400091b4: 81 c7 e0 08 ret 400091b8: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 400091bc: 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 ) { 400091c0: 80 a0 a0 04 cmp %g2, 4 400091c4: 18 bf ff fc bgu 400091b4 <_Thread_Delay_ended+0x44> 400091c8: 83 32 60 1b srl %o1, 0x1b, %g1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 400091cc: 80 a0 60 01 cmp %g1, 1 400091d0: 12 bf ff f9 bne 400091b4 <_Thread_Delay_ended+0x44> 400091d4: 83 28 a0 02 sll %g2, 2, %g1 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 400091d8: 05 10 00 6a sethi %hi(0x4001a800), %g2 400091dc: 84 10 a2 c0 or %g2, 0x2c0, %g2 ! 4001aac0 <_Objects_Information_table> 400091e0: c6 00 80 01 ld [ %g2 + %g1 ], %g3 400091e4: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 400091e8: 80 a2 20 00 cmp %o0, 0 400091ec: 02 bf ff f2 be 400091b4 <_Thread_Delay_ended+0x44> 400091f0: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 400091f4: 7f ff fa e0 call 40007d74 <_Objects_Get> 400091f8: 94 07 bf f4 add %fp, -12, %o2 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 400091fc: c2 07 bf f4 ld [ %fp + -12 ], %g1 40009200: 80 a0 60 00 cmp %g1, 0 40009204: 12 bf ff ec bne 400091b4 <_Thread_Delay_ended+0x44> 40009208: 31 10 00 6a sethi %hi(0x4001a800), %i0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4000920c: 10 bf ff e5 b 400091a0 <_Thread_Delay_ended+0x30> 40009210: 13 04 00 ff sethi %hi(0x1003fc00), %o1 4000eb10 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4000eb10: 9d e3 bf 98 save %sp, -104, %sp #endif #if defined(__USE__MAIN__) extern void _main(void); #endif executing = _Thread_Executing; 4000eb14: 03 10 00 6b sethi %hi(0x4001ac00), %g1 4000eb18: f4 00 60 3c ld [ %g1 + 0x3c ], %i2 ! 4001ac3c <_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(); 4000eb1c: 3f 10 00 3a sethi %hi(0x4000e800), %i7 4000eb20: be 17 e3 10 or %i7, 0x310, %i7 ! 4000eb10 <_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); 4000eb24: d0 06 a0 c4 ld [ %i2 + 0xc4 ], %o0 4000eb28: 7f ff cc b7 call 40001e04 4000eb2c: 91 2a 20 08 sll %o0, 8, %o0 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 4000eb30: 05 10 00 6a sethi %hi(0x4001a800), %g2 doneConstructors = 1; 4000eb34: 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; 4000eb38: f2 08 a1 7c ldub [ %g2 + 0x17c ], %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 ); 4000eb3c: 90 10 00 1a mov %i2, %o0 4000eb40: 7f ff ee 4e call 4000a478 <_User_extensions_Thread_begin> 4000eb44: c2 28 a1 7c stb %g1, [ %g2 + 0x17c ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000eb48: 05 10 00 6a sethi %hi(0x4001a800), %g2 4000eb4c: c2 00 a3 60 ld [ %g2 + 0x360 ], %g1 ! 4001ab60 <_Thread_Dispatch_disable_level> 4000eb50: 82 00 7f ff add %g1, -1, %g1 4000eb54: c2 20 a3 60 st %g1, [ %g2 + 0x360 ] 4000eb58: c6 00 a3 60 ld [ %g2 + 0x360 ], %g3 4000eb5c: 80 a0 e0 00 cmp %g3, 0 4000eb60: 02 80 00 36 be 4000ec38 <_Thread_Handler+0x128> 4000eb64: 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) */ 4000eb68: 83 2e 60 18 sll %i1, 0x18, %g1 <== NOT EXECUTED 4000eb6c: 80 a0 60 00 cmp %g1, 0 4000eb70: 02 80 00 22 be 4000ebf8 <_Thread_Handler+0xe8> 4000eb74: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 4000eb78: c2 06 a0 ac ld [ %i2 + 0xac ], %g1 4000eb7c: 80 a0 60 01 cmp %g1, 1 4000eb80: 22 80 00 25 be,a 4000ec14 <_Thread_Handler+0x104> 4000eb84: c2 06 a0 a8 ld [ %i2 + 0xa8 ], %g1 4000eb88: 80 a0 60 01 cmp %g1, 1 4000eb8c: 1a 80 00 0c bcc 4000ebbc <_Thread_Handler+0xac> 4000eb90: 80 a0 60 02 cmp %g1, 2 case THREAD_START_NUMERIC: executing->Wait.return_argument = 4000eb94: c2 06 a0 a8 ld [ %i2 + 0xa8 ], %g1 4000eb98: 9f c0 40 00 call %g1 4000eb9c: d0 06 a0 b4 ld [ %i2 + 0xb4 ], %o0 4000eba0: d0 26 a0 28 st %o0, [ %i2 + 0x28 ] * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 4000eba4: 90 10 00 1a mov %i2, %o0 4000eba8: 7f ff ee 5c call 4000a518 <_User_extensions_Thread_exitted> 4000ebac: b0 10 20 00 clr %i0 _Internal_error_Occurred( 4000ebb0: b2 10 20 01 mov 1, %i1 4000ebb4: 7f ff e2 f2 call 4000777c <_Internal_error_Occurred> 4000ebb8: 95 e8 20 06 restore %g0, 6, %o2 #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 4000ebbc: 02 80 00 23 be 4000ec48 <_Thread_Handler+0x138> <== NOT EXECUTED 4000ebc0: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 4000ebc4: 12 bf ff f9 bne 4000eba8 <_Thread_Handler+0x98> <== NOT EXECUTED 4000ebc8: 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 = 4000ebcc: c2 06 a0 a8 ld [ %i2 + 0xa8 ], %g1 <== NOT EXECUTED 4000ebd0: d2 06 a0 b0 ld [ %i2 + 0xb0 ], %o1 <== NOT EXECUTED 4000ebd4: d0 06 a0 b4 ld [ %i2 + 0xb4 ], %o0 <== NOT EXECUTED 4000ebd8: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000ebdc: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000ebe0: 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 ); 4000ebe4: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED 4000ebe8: 7f ff ee 4c call 4000a518 <_User_extensions_Thread_exitted> <== NOT EXECUTED 4000ebec: b2 10 20 01 mov 1, %i1 <== NOT EXECUTED _Internal_error_Occurred( 4000ebf0: 7f ff e2 e3 call 4000777c <_Internal_error_Occurred> <== NOT EXECUTED 4000ebf4: 95 e8 20 06 restore %g0, 6, %o2 <== NOT EXECUTED * _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) */ _init (); 4000ebf8: 40 00 2b 32 call 400198c0 <_init> 4000ebfc: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 4000ec00: c2 06 a0 ac ld [ %i2 + 0xac ], %g1 4000ec04: 80 a0 60 01 cmp %g1, 1 4000ec08: 12 bf ff e1 bne 4000eb8c <_Thread_Handler+0x7c> 4000ec0c: 01 00 00 00 nop (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); break; case THREAD_START_POINTER: executing->Wait.return_argument = 4000ec10: c2 06 a0 a8 ld [ %i2 + 0xa8 ], %g1 4000ec14: d0 06 a0 b0 ld [ %i2 + 0xb0 ], %o0 4000ec18: 9f c0 40 00 call %g1 4000ec1c: b0 10 20 00 clr %i0 4000ec20: d0 26 a0 28 st %o0, [ %i2 + 0x28 ] * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 4000ec24: 90 10 00 1a mov %i2, %o0 4000ec28: 7f ff ee 3c call 4000a518 <_User_extensions_Thread_exitted> 4000ec2c: b2 10 20 01 mov 1, %i1 _Internal_error_Occurred( 4000ec30: 7f ff e2 d3 call 4000777c <_Internal_error_Occurred> <== NOT EXECUTED 4000ec34: 95 e8 20 06 restore %g0, 6, %o2 <== NOT EXECUTED _Thread_Dispatch(); 4000ec38: 7f ff e9 77 call 40009214 <_Thread_Dispatch> 4000ec3c: 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) */ 4000ec40: 10 bf ff cb b 4000eb6c <_Thread_Handler+0x5c> 4000ec44: 83 2e 60 18 sll %i1, 0x18, %g1 (*(Thread_Entry_pointer) executing->Start.entry_point)( executing->Start.pointer_argument ); break; case THREAD_START_BOTH_POINTER_FIRST: executing->Wait.return_argument = 4000ec48: c2 06 a0 a8 ld [ %i2 + 0xa8 ], %g1 <== NOT EXECUTED 4000ec4c: d0 1e a0 b0 ldd [ %i2 + 0xb0 ], %o0 <== NOT EXECUTED 4000ec50: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000ec54: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000ec58: 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 ); 4000ec5c: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED 4000ec60: 7f ff ee 2e call 4000a518 <_User_extensions_Thread_exitted> <== NOT EXECUTED 4000ec64: b2 10 20 01 mov 1, %i1 <== NOT EXECUTED _Internal_error_Occurred( 4000ec68: 7f ff e2 c5 call 4000777c <_Internal_error_Occurred> <== NOT EXECUTED 4000ec6c: 95 e8 20 06 restore %g0, 6, %o2 <== NOT EXECUTED 4000ec70: 01 00 00 00 nop 40009530 <_Thread_Handler_initialization>: void _Thread_Handler_initialization( uint32_t ticks_per_timeslice, uint32_t maximum_extensions, uint32_t maximum_proxies ) { 40009530: 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 ) 40009534: 03 10 00 6a sethi %hi(0x4001a800), %g1 40009538: 82 10 63 74 or %g1, 0x374, %g1 ! 4001ab74 <_CPU_Table> 4000953c: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 40009540: c6 00 60 24 ld [ %g1 + 0x24 ], %g3 40009544: 80 a0 00 02 cmp %g0, %g2 40009548: 88 60 3f ff subx %g0, -1, %g4 4000954c: 80 a0 00 03 cmp %g0, %g3 40009550: 82 60 3f ff subx %g0, -1, %g1 40009554: 80 a1 00 01 cmp %g4, %g1 40009558: 12 80 00 2c bne 40009608 <_Thread_Handler_initialization+0xd8> 4000955c: 90 10 20 00 clr %o0 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = FALSE; 40009560: 03 10 00 6b sethi %hi(0x4001ac00), %g1 _Thread_Executing = NULL; 40009564: 05 10 00 6b sethi %hi(0x4001ac00), %g2 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = FALSE; 40009568: c0 20 60 4c clr [ %g1 + 0x4c ] _Thread_Executing = NULL; 4000956c: c0 20 a0 3c clr [ %g2 + 0x3c ] _Thread_Heir = NULL; 40009570: 03 10 00 6b sethi %hi(0x4001ac00), %g1 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; 40009574: 05 10 00 6b sethi %hi(0x4001ac00), %g2 INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = FALSE; _Thread_Executing = NULL; _Thread_Heir = NULL; 40009578: c0 20 60 14 clr [ %g1 + 0x14 ] #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; 4000957c: c0 20 a0 2c clr [ %g2 + 0x2c ] _Thread_Maximum_extensions = maximum_extensions; 40009580: 03 10 00 6b sethi %hi(0x4001ac00), %g1 _Thread_Ticks_per_timeslice = ticks_per_timeslice; 40009584: 05 10 00 6a sethi %hi(0x4001a800), %g2 _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; 40009588: f2 20 60 28 st %i1, [ %g1 + 0x28 ] _Thread_Ticks_per_timeslice = ticks_per_timeslice; 4000958c: f0 20 a2 b8 st %i0, [ %g2 + 0x2b8 ] _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 40009590: 40 00 05 13 call 4000a9dc <_Workspace_Allocate_or_fatal_error> 40009594: 90 10 2c 00 mov 0xc00, %o0 40009598: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000959c: 84 10 00 08 mov %o0, %g2 400095a0: d0 20 62 b4 st %o0, [ %g1 + 0x2b4 ] 400095a4: 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); 400095a8: 82 00 a0 04 add %g2, 4, %g1 the_chain->permanent_null = NULL; 400095ac: c0 20 a0 04 clr [ %g2 + 4 ] the_chain->last = _Chain_Head(the_chain); 400095b0: 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); 400095b4: c2 20 80 00 st %g1, [ %g2 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 400095b8: 84 00 a0 0c add %g2, 0xc, %g2 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 400095bc: 80 a0 80 03 cmp %g2, %g3 400095c0: 12 bf ff fb bne 400095ac <_Thread_Handler_initialization+0x7c> 400095c4: 82 00 a0 04 add %g2, 4, %g1 /* * Initialize this class of objects. */ _Objects_Initialize_information( 400095c8: 03 10 00 6b sethi %hi(0x4001ac00), %g1 400095cc: c4 00 60 68 ld [ %g1 + 0x68 ], %g2 ! 4001ac68 <_System_state_Is_multiprocessing> 400095d0: 82 10 20 08 mov 8, %g1 400095d4: 80 a0 00 02 cmp %g0, %g2 400095d8: 96 10 20 02 mov 2, %o3 400095dc: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 400095e0: 96 42 ff ff addx %o3, -1, %o3 400095e4: 11 10 00 6b sethi %hi(0x4001ac00), %o0 400095e8: 92 10 20 01 mov 1, %o1 400095ec: 90 12 20 f0 or %o0, 0xf0, %o0 400095f0: 94 10 20 01 mov 1, %o2 400095f4: 98 10 21 80 mov 0x180, %o4 400095f8: 7f ff fa 06 call 40007e10 <_Objects_Initialize_information> 400095fc: 9a 10 20 01 mov 1, %o5 FALSE, /* TRUE if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 40009600: 81 c7 e0 08 ret 40009604: 81 e8 00 00 restore * Do not allow mixture. */ if ( !( ( _CPU_Table.stack_allocate_hook == 0 ) == ( _CPU_Table.stack_free_hook == 0 ) ) ) _Internal_error_Occurred( 40009608: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000960c: 7f ff f8 5c call 4000777c <_Internal_error_Occurred> <== NOT EXECUTED 40009610: 94 10 20 0f mov 0xf, %o2 <== NOT EXECUTED INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = FALSE; 40009614: 10 bf ff d4 b 40009564 <_Thread_Handler_initialization+0x34> <== NOT EXECUTED 40009618: 03 10 00 6b sethi %hi(0x4001ac00), %g1 <== NOT EXECUTED 40009374 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 40009374: 9d e3 bf 98 save %sp, -104, %sp /* * Initialize the Ada self pointer */ the_thread->rtems_ada_self = NULL; 40009378: c0 26 60 80 clr [ %i1 + 0x80 ] /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 4000937c: 80 a6 a0 00 cmp %i2, 0 40009380: 02 80 00 59 be 400094e4 <_Thread_Initialize+0x170> 40009384: e2 07 a0 60 ld [ %fp + 0x60 ], %l1 stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = FALSE; 40009388: c0 26 60 cc clr [ %i1 + 0xcc ] <== NOT EXECUTED 4000938c: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 40009390: 21 10 00 6b sethi %hi(0x4001ac00), %l0 40009394: d2 04 20 28 ld [ %l0 + 0x28 ], %o1 ! 4001ac28 <_Thread_Maximum_extensions> Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 40009398: f4 26 60 d4 st %i2, [ %i1 + 0xd4 ] the_stack->size = size; 4000939c: d0 26 60 d0 st %o0, [ %i1 + 0xd0 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400093a0: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 400093a4: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 400093a8: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 400093ac: c0 26 60 6c clr [ %i1 + 0x6c ] 400093b0: 80 a2 60 00 cmp %o1, 0 400093b4: 12 80 00 38 bne 40009494 <_Thread_Initialize+0x120> 400093b8: c0 26 61 68 clr [ %i1 + 0x168 ] return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 400093bc: c0 26 61 78 clr [ %i1 + 0x178 ] 400093c0: b6 10 20 00 clr %i3 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 400093c4: c2 07 a0 5c ld [ %fp + 0x5c ], %g1 the_thread->Start.budget_algorithm = budget_algorithm; 400093c8: e2 26 60 bc st %l1, [ %i1 + 0xbc ] /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 400093cc: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ] the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 400093d0: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 switch ( budget_algorithm ) { 400093d4: 80 a4 60 02 cmp %l1, 2 400093d8: 12 80 00 05 bne 400093ec <_Thread_Initialize+0x78> 400093dc: 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; 400093e0: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED 400093e4: c4 00 62 b8 ld [ %g1 + 0x2b8 ], %g2 ! 4001aab8 <_Thread_Ticks_per_timeslice> <== NOT EXECUTED 400093e8: c4 26 60 84 st %g2, [ %i1 + 0x84 ] <== NOT EXECUTED break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 400093ec: c2 07 a0 68 ld [ %fp + 0x68 ], %g1 the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; 400093f0: c0 26 60 44 clr [ %i1 + 0x44 ] break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 400093f4: c2 26 60 c4 st %g1, [ %i1 + 0xc4 ] the_thread->current_state = STATES_DORMANT; 400093f8: 82 10 20 01 mov 1, %g1 the_thread->Wait.queue = NULL; the_thread->resource_count = 0; 400093fc: c0 26 60 1c clr [ %i1 + 0x1c ] break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 40009400: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->suspend_count = 0; 40009404: c0 26 60 70 clr [ %i1 + 0x70 ] the_thread->real_priority = priority; 40009408: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; 4000940c: fa 26 60 c8 st %i5, [ %i1 + 0xc8 ] _Thread_Set_priority( the_thread, priority ); 40009410: 92 10 00 1d mov %i5, %o1 40009414: 40 00 02 76 call 40009dec <_Thread_Set_priority> 40009418: 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 ); 4000941c: c4 06 60 08 ld [ %i1 + 8 ], %g2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40009420: 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; 40009424: c0 26 60 90 clr [ %i1 + 0x90 ] 40009428: 03 00 00 3f sethi %hi(0xfc00), %g1 4000942c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40009430: 82 08 80 01 and %g2, %g1, %g1 40009434: 80 a0 40 03 cmp %g1, %g3 40009438: 08 80 00 13 bleu 40009484 <_Thread_Initialize+0x110> 4000943c: c0 26 60 94 clr [ %i1 + 0x94 ] 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; 40009440: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 /* * Invoke create extensions */ if ( !_User_extensions_Thread_create( the_thread ) ) { 40009444: 90 10 00 19 mov %i1, %o0 40009448: c2 26 60 0c st %g1, [ %i1 + 0xc ] 4000944c: 40 00 04 46 call 4000a564 <_User_extensions_Thread_create> 40009450: b0 10 20 01 mov 1, %i0 40009454: 80 a2 20 00 cmp %o0, 0 40009458: 12 80 00 34 bne 40009528 <_Thread_Initialize+0x1b4> 4000945c: 80 a6 e0 00 cmp %i3, 0 if ( extensions_area ) 40009460: 02 80 00 05 be 40009474 <_Thread_Initialize+0x100> <== NOT EXECUTED 40009464: 11 10 00 6a sethi %hi(0x4001a800), %o0 <== NOT EXECUTED 40009468: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 4000946c: 7f ff f7 c4 call 4000737c <_Heap_Free> <== NOT EXECUTED 40009470: 90 12 23 ac or %o0, 0x3ac, %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 ); 40009474: 40 00 03 22 call 4000a0fc <_Thread_Stack_Free> <== NOT EXECUTED 40009478: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4000947c: 81 c7 e0 08 ret 40009480: 91 e8 20 00 restore %g0, 0, %o0 uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) information->local_table[ index ] = the_object; 40009484: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 40009488: 83 28 60 02 sll %g1, 2, %g1 4000948c: 10 bf ff ed b 40009440 <_Thread_Initialize+0xcc> 40009490: f2 20 80 01 st %i1, [ %g2 + %g1 ] RTEMS_INLINE_ROUTINE void *_Workspace_Allocate( size_t size ) { return _Heap_Allocate( &_Workspace_Area, size ); 40009494: 92 02 60 01 inc %o1 40009498: 11 10 00 6a sethi %hi(0x4001a800), %o0 4000949c: 93 2a 60 02 sll %o1, 2, %o1 400094a0: 7f ff f7 85 call 400072b4 <_Heap_Allocate> 400094a4: 90 12 23 ac or %o0, 0x3ac, %o0 if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 400094a8: b6 92 20 00 orcc %o0, 0, %i3 400094ac: 02 80 00 1c be 4000951c <_Thread_Initialize+0x1a8> 400094b0: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 * call. */ if ( the_thread->extensions ) { int i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 400094b4: 80 a0 7f ff cmp %g1, -1 400094b8: 02 bf ff c3 be 400093c4 <_Thread_Initialize+0x50> 400094bc: f6 26 61 78 st %i3, [ %i1 + 0x178 ] 400094c0: 86 00 60 01 add %g1, 1, %g3 400094c4: 84 10 20 00 clr %g2 the_thread->extensions[i] = NULL; 400094c8: 83 28 a0 02 sll %g2, 2, %g1 * call. */ if ( the_thread->extensions ) { int i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 400094cc: 84 00 a0 01 inc %g2 400094d0: 80 a0 80 03 cmp %g2, %g3 400094d4: 12 bf ff fd bne 400094c8 <_Thread_Initialize+0x154> 400094d8: c0 26 c0 01 clr [ %i3 + %g1 ] /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 400094dc: 10 bf ff bb b 400093c8 <_Thread_Initialize+0x54> 400094e0: c2 07 a0 5c ld [ %fp + 0x5c ], %g1 * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { if ( !_Stack_Is_enough( stack_size ) ) 400094e4: 80 a6 ef ff cmp %i3, 0xfff 400094e8: 08 80 00 03 bleu 400094f4 <_Thread_Initialize+0x180> 400094ec: 13 00 00 04 sethi %hi(0x1000), %o1 400094f0: 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 ); 400094f4: 40 00 02 e7 call 4000a090 <_Thread_Stack_Allocate> 400094f8: 90 10 00 19 mov %i1, %o0 if ( !actual_stack_size || actual_stack_size < stack_size ) 400094fc: 80 a2 20 00 cmp %o0, 0 40009500: 02 bf ff df be 4000947c <_Thread_Initialize+0x108> 40009504: 80 a6 c0 08 cmp %i3, %o0 40009508: 18 bf ff dd bgu 4000947c <_Thread_Initialize+0x108> 4000950c: 82 10 20 01 mov 1, %g1 return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; 40009510: f4 06 60 d8 ld [ %i1 + 0xd8 ], %i2 the_thread->Start.core_allocated_stack = TRUE; 40009514: 10 bf ff 9f b 40009390 <_Thread_Initialize+0x1c> 40009518: c2 26 60 cc st %g1, [ %i1 + 0xcc ] #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 4000951c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40009520: 40 00 02 f7 call 4000a0fc <_Thread_Stack_Free> <== NOT EXECUTED 40009524: b0 10 20 00 clr %i0 <== NOT EXECUTED 40009528: 81 c7 e0 08 ret 4000952c: 81 e8 00 00 restore 4000eaa4 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, uint32_t numeric_argument ) { 4000eaa4: 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; 4000eaa8: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 4000eaac: c4 06 20 bc ld [ %i0 + 0xbc ], %g2 the_thread->budget_callout = the_thread->Start.budget_callout; 4000eab0: 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; 4000eab4: 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; 4000eab8: c4 3e 20 88 std %g2, [ %i0 + 0x88 ] the_thread->Start.pointer_argument = pointer_argument; 4000eabc: f2 26 20 b0 st %i1, [ %i0 + 0xb0 ] the_thread->Start.numeric_argument = numeric_argument; 4000eac0: f4 26 20 b4 st %i2, [ %i0 + 0xb4 ] Thread_Control *the_thread, void *pointer_argument, uint32_t numeric_argument ) { the_thread->resource_count = 0; 4000eac4: c0 26 20 1c clr [ %i0 + 0x1c ] the_thread->suspend_count = 0; 4000eac8: 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 ) ) { 4000eacc: 7f ff ef 4f call 4000a808 <_Thread_queue_Extract_with_proxy> 4000ead0: 90 10 00 18 mov %i0, %o0 4000ead4: 80 a2 20 00 cmp %o0, 0 4000ead8: 32 80 00 07 bne,a 4000eaf4 <_Thread_Reset+0x50> 4000eadc: f2 06 20 c8 ld [ %i0 + 0xc8 ], %i1 if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4000eae0: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000eae4: 80 a0 60 02 cmp %g1, 2 4000eae8: 02 80 00 0c be 4000eb18 <_Thread_Reset+0x74> 4000eaec: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4000eaf0: f2 06 20 c8 ld [ %i0 + 0xc8 ], %i1 4000eaf4: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 4000eaf8: 80 a0 40 19 cmp %g1, %i1 4000eafc: 02 80 00 05 be 4000eb10 <_Thread_Reset+0x6c> 4000eb00: 01 00 00 00 nop the_thread->real_priority = the_thread->Start.initial_priority; 4000eb04: f2 26 20 18 st %i1, [ %i0 + 0x18 ] _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4000eb08: 7f ff f0 01 call 4000ab0c <_Thread_Set_priority> 4000eb0c: 81 e8 00 00 restore 4000eb10: 81 c7 e0 08 ret 4000eb14: 81 e8 00 00 restore the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 4000eb18: 7f ff f2 ac call 4000b5c8 <_Watchdog_Remove> <== NOT EXECUTED 4000eb1c: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4000eb20: 10 bf ff f5 b 4000eaf4 <_Thread_Reset+0x50> <== NOT EXECUTED 4000eb24: f2 06 20 c8 ld [ %i0 + 0xc8 ], %i1 <== NOT EXECUTED 4000dcac <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4000dcac: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4000dcb0: 03 10 00 6b sethi %hi(0x4001ac00), %g1 4000dcb4: e0 00 60 3c ld [ %g1 + 0x3c ], %l0 ! 4001ac3c <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 4000dcb8: 7f ff d0 4f call 40001df4 4000dcbc: e2 04 20 98 ld [ %l0 + 0x98 ], %l1 4000dcc0: b0 10 00 08 mov %o0, %i0 if ( _Chain_Has_only_one_node( ready ) ) { 4000dcc4: c4 04 40 00 ld [ %l1 ], %g2 4000dcc8: c2 04 60 08 ld [ %l1 + 8 ], %g1 4000dccc: 80 a0 80 01 cmp %g2, %g1 4000dcd0: 32 80 00 04 bne,a 4000dce0 <_Thread_Reset_timeslice+0x34> 4000dcd4: c6 04 00 00 ld [ %l0 ], %g3 _ISR_Enable( level ); 4000dcd8: 7f ff d0 4b call 40001e04 4000dcdc: 81 e8 00 00 restore { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4000dce0: c4 04 20 04 ld [ %l0 + 4 ], %g2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000dce4: 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; 4000dce8: c6 20 80 00 st %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000dcec: c2 24 00 00 st %g1, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000dcf0: 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; 4000dcf4: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 4000dcf8: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000dcfc: 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; 4000dd00: e0 20 40 00 st %l0, [ %g1 ] return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4000dd04: 7f ff d0 40 call 40001e04 4000dd08: 01 00 00 00 nop 4000dd0c: 7f ff d0 3a call 40001df4 4000dd10: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 4000dd14: 05 10 00 6b sethi %hi(0x4001ac00), %g2 4000dd18: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 ! 4001ac14 <_Thread_Heir> 4000dd1c: 80 a4 00 01 cmp %l0, %g1 4000dd20: 32 80 00 05 bne,a 4000dd34 <_Thread_Reset_timeslice+0x88> 4000dd24: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED _Thread_Heir = (Thread_Control *) ready->first; 4000dd28: c2 04 40 00 ld [ %l1 ], %g1 4000dd2c: c2 20 a0 14 st %g1, [ %g2 + 0x14 ] _Context_Switch_necessary = TRUE; 4000dd30: 84 10 20 01 mov 1, %g2 4000dd34: 03 10 00 6b sethi %hi(0x4001ac00), %g1 4000dd38: c4 20 60 4c st %g2, [ %g1 + 0x4c ] ! 4001ac4c <_Context_Switch_necessary> _ISR_Enable( level ); 4000dd3c: 7f ff d0 32 call 40001e04 4000dd40: 81 e8 00 00 restore 4000dd44: 01 00 00 00 nop 4000b940 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, boolean force ) { 4000b940: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4000b944: 7f ff dc 74 call 40002b14 4000b948: 01 00 00 00 nop 4000b94c: a0 10 00 08 mov %o0, %l0 if ( force == TRUE ) 4000b950: 80 a6 60 01 cmp %i1, 1 4000b954: 22 80 00 13 be,a 4000b9a0 <_Thread_Resume+0x60> 4000b958: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 the_thread->suspend_count = 0; else the_thread->suspend_count--; 4000b95c: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 <== NOT EXECUTED 4000b960: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 4000b964: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000b968: 12 80 00 0c bne 4000b998 <_Thread_Resume+0x58> <== NOT EXECUTED 4000b96c: c2 26 20 70 st %g1, [ %i0 + 0x70 ] <== NOT EXECUTED _ISR_Enable( level ); return; } current_state = the_thread->current_state; 4000b970: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED if ( current_state & STATES_SUSPENDED ) { 4000b974: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 4000b978: 02 80 00 06 be 4000b990 <_Thread_Resume+0x50> <== NOT EXECUTED 4000b97c: 01 00 00 00 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 4000b980: 82 08 7f fd and %g1, -3, %g1 <== NOT EXECUTED current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 4000b984: 80 a0 60 00 cmp %g1, 0 4000b988: 02 80 00 0b be 4000b9b4 <_Thread_Resume+0x74> 4000b98c: c2 26 20 10 st %g1, [ %i0 + 0x10 ] _Context_Switch_necessary = TRUE; } } } _ISR_Enable( level ); 4000b990: 7f ff dc 65 call 40002b24 4000b994: 91 e8 00 10 restore %g0, %l0, %o0 the_thread->suspend_count = 0; else the_thread->suspend_count--; if ( the_thread->suspend_count > 0 ) { _ISR_Enable( level ); 4000b998: 7f ff dc 63 call 40002b24 <== NOT EXECUTED 4000b99c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return; } current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { 4000b9a0: 80 88 60 02 btst 2, %g1 4000b9a4: 02 bf ff fb be 4000b990 <_Thread_Resume+0x50> 4000b9a8: c0 26 20 70 clr [ %i0 + 0x70 ] 4000b9ac: 10 bf ff f6 b 4000b984 <_Thread_Resume+0x44> 4000b9b0: 82 08 7f fd and %g1, -3, %g1 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4000b9b4: c8 06 20 9c ld [ %i0 + 0x9c ], %g4 4000b9b8: c4 16 20 a2 lduh [ %i0 + 0xa2 ], %g2 4000b9bc: c2 11 00 00 lduh [ %g4 ], %g1 if ( _States_Is_ready( current_state ) ) { _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 4000b9c0: c6 06 20 98 ld [ %i0 + 0x98 ], %g3 4000b9c4: 82 10 40 02 or %g1, %g2, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 4000b9c8: 1b 10 00 9e sethi %hi(0x40027800), %o5 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4000b9cc: c2 31 00 00 sth %g1, [ %g4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000b9d0: 82 00 e0 04 add %g3, 4, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 4000b9d4: d8 16 20 a0 lduh [ %i0 + 0xa0 ], %o4 4000b9d8: c2 26 00 00 st %g1, [ %i0 ] 4000b9dc: c4 13 61 60 lduh [ %o5 + 0x160 ], %g2 old_last_node = the_chain->last; 4000b9e0: c8 00 e0 08 ld [ %g3 + 8 ], %g4 the_chain->last = the_node; 4000b9e4: f0 20 e0 08 st %i0, [ %g3 + 8 ] 4000b9e8: 84 10 80 0c or %g2, %o4, %g2 old_last_node->next = the_node; the_node->previous = old_last_node; 4000b9ec: c8 26 20 04 st %g4, [ %i0 + 4 ] 4000b9f0: c4 33 61 60 sth %g2, [ %o5 + 0x160 ] 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; 4000b9f4: f0 21 00 00 st %i0, [ %g4 ] _ISR_Flash( level ); 4000b9f8: 7f ff dc 4b call 40002b24 4000b9fc: 90 10 00 10 mov %l0, %o0 4000ba00: 7f ff dc 45 call 40002b14 4000ba04: 01 00 00 00 nop if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 4000ba08: 09 10 00 9e sethi %hi(0x40027800), %g4 4000ba0c: c4 01 21 44 ld [ %g4 + 0x144 ], %g2 ! 40027944 <_Thread_Heir> 4000ba10: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 4000ba14: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 4000ba18: 80 a0 c0 01 cmp %g3, %g1 4000ba1c: 1a bf ff dd bcc 4000b990 <_Thread_Resume+0x50> 4000ba20: 01 00 00 00 nop _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4000ba24: 03 10 00 9e sethi %hi(0x40027800), %g1 4000ba28: c4 00 61 6c ld [ %g1 + 0x16c ], %g2 ! 4002796c <_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; 4000ba2c: f0 21 21 44 st %i0, [ %g4 + 0x144 ] if ( _Thread_Executing->is_preemptible || 4000ba30: c2 00 a0 7c ld [ %g2 + 0x7c ], %g1 4000ba34: 80 a0 60 00 cmp %g1, 0 4000ba38: 02 80 00 06 be 4000ba50 <_Thread_Resume+0x110> 4000ba3c: 80 a0 e0 00 cmp %g3, 0 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 4000ba40: 84 10 20 01 mov 1, %g2 4000ba44: 03 10 00 9e sethi %hi(0x40027800), %g1 4000ba48: c4 20 61 7c st %g2, [ %g1 + 0x17c ] ! 4002797c <_Context_Switch_necessary> 4000ba4c: 30 bf ff d1 b,a 4000b990 <_Thread_Resume+0x50> _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4000ba50: 12 bf ff d0 bne 4000b990 <_Thread_Resume+0x50> 4000ba54: 84 10 20 01 mov 1, %g2 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 4000ba58: 10 bf ff fc b 4000ba48 <_Thread_Resume+0x108> <== NOT EXECUTED 4000ba5c: 03 10 00 9e sethi %hi(0x40027800), %g1 <== NOT EXECUTED 4000a090 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 4000a090: 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 ) ) 4000a094: 80 a6 6f ff cmp %i1, 0xfff 4000a098: 28 80 00 02 bleu,a 4000a0a0 <_Thread_Stack_Allocate+0x10> 4000a09c: 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 ) { 4000a0a0: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000a0a4: c2 00 63 94 ld [ %g1 + 0x394 ], %g1 ! 4001ab94 <_CPU_Table+0x20> 4000a0a8: 80 a0 60 00 cmp %g1, 0 4000a0ac: 02 80 00 0a be 4000a0d4 <_Thread_Stack_Allocate+0x44> 4000a0b0: 92 06 60 10 add %i1, 0x10, %o1 stack_addr = (*_CPU_Table.stack_allocate_hook)( the_stack_size ); 4000a0b4: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000a0b8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 4000a0bc: d0 26 20 d8 st %o0, [ %i0 + 0xd8 ] <== NOT EXECUTED the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 4000a0c0: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 4000a0c4: b0 60 20 00 subx %g0, 0, %i0 <== NOT EXECUTED the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 4000a0c8: b0 0e 40 18 and %i1, %i0, %i0 <== NOT EXECUTED 4000a0cc: 81 c7 e0 08 ret <== NOT EXECUTED 4000a0d0: 81 e8 00 00 restore <== NOT EXECUTED 4000a0d4: 11 10 00 6a sethi %hi(0x4001a800), %o0 4000a0d8: b2 10 00 09 mov %o1, %i1 4000a0dc: 7f ff f4 76 call 400072b4 <_Heap_Allocate> 4000a0e0: 90 12 23 ac or %o0, 0x3ac, %o0 } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 4000a0e4: 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 ) 4000a0e8: 80 a0 00 08 cmp %g0, %o0 4000a0ec: b0 60 20 00 subx %g0, 0, %i0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 4000a0f0: b0 0e 40 18 and %i1, %i0, %i0 4000a0f4: 81 c7 e0 08 ret 4000a0f8: 81 e8 00 00 restore 4000a0fc <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 4000a0fc: 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 ) 4000a100: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 4000a104: 80 a0 60 00 cmp %g1, 0 4000a108: 02 80 00 08 be 4000a128 <_Thread_Stack_Free+0x2c> 4000a10c: 03 10 00 6a sethi %hi(0x4001a800), %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 ) 4000a110: c2 00 63 98 ld [ %g1 + 0x398 ], %g1 ! 4001ab98 <_CPU_Table+0x24> 4000a114: 80 a0 60 00 cmp %g1, 0 4000a118: 22 80 00 06 be,a 4000a130 <_Thread_Stack_Free+0x34> 4000a11c: f2 06 20 d4 ld [ %i0 + 0xd4 ], %i1 (*_CPU_Table.stack_free_hook)( the_thread->Start.Initial_stack.area ); 4000a120: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000a124: d0 06 20 d4 ld [ %i0 + 0xd4 ], %o0 <== NOT EXECUTED 4000a128: 81 c7 e0 08 ret <== NOT EXECUTED 4000a12c: 81 e8 00 00 restore <== NOT EXECUTED RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 4000a130: 31 10 00 6a sethi %hi(0x4001a800), %i0 4000a134: 7f ff f4 92 call 4000737c <_Heap_Free> 4000a138: 91 ee 23 ac restore %i0, 0x3ac, %o0 4000a13c: 01 00 00 00 nop 4000a274 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 4000a274: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4000a278: 03 10 00 6b sethi %hi(0x4001ac00), %g1 4000a27c: e0 00 60 3c ld [ %g1 + 0x3c ], %l0 ! 4001ac3c <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 4000a280: 7f ff de dd call 40001df4 4000a284: e2 04 20 98 ld [ %l0 + 0x98 ], %l1 4000a288: b0 10 00 08 mov %o0, %i0 if ( !_Chain_Has_only_one_node( ready ) ) { 4000a28c: c4 04 40 00 ld [ %l1 ], %g2 4000a290: c2 04 60 08 ld [ %l1 + 8 ], %g1 4000a294: 80 a0 80 01 cmp %g2, %g1 4000a298: 12 80 00 0b bne 4000a2c4 <_Thread_Yield_processor+0x50> 4000a29c: 03 10 00 6b sethi %hi(0x4001ac00), %g1 if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = TRUE; } else if ( !_Thread_Is_heir( executing ) ) 4000a2a0: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 ! 4001ac14 <_Thread_Heir> 4000a2a4: 80 a4 00 02 cmp %l0, %g2 4000a2a8: 02 80 00 05 be 4000a2bc <_Thread_Yield_processor+0x48> 4000a2ac: 01 00 00 00 nop _Context_Switch_necessary = TRUE; 4000a2b0: 84 10 20 01 mov 1, %g2 ! 1 4000a2b4: 03 10 00 6b sethi %hi(0x4001ac00), %g1 4000a2b8: c4 20 60 4c st %g2, [ %g1 + 0x4c ] ! 4001ac4c <_Context_Switch_necessary> _ISR_Enable( level ); 4000a2bc: 7f ff de d2 call 40001e04 4000a2c0: 81 e8 00 00 restore ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4000a2c4: c6 04 00 00 ld [ %l0 ], %g3 previous = the_node->previous; 4000a2c8: c4 04 20 04 ld [ %l0 + 4 ], %g2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000a2cc: 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; 4000a2d0: c6 20 80 00 st %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000a2d4: c2 24 00 00 st %g1, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000a2d8: 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; 4000a2dc: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 4000a2e0: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000a2e4: 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; 4000a2e8: e0 20 40 00 st %l0, [ %g1 ] _ISR_Disable( level ); if ( !_Chain_Has_only_one_node( ready ) ) { _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4000a2ec: 7f ff de c6 call 40001e04 4000a2f0: 01 00 00 00 nop 4000a2f4: 7f ff de c0 call 40001df4 4000a2f8: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 4000a2fc: 05 10 00 6b sethi %hi(0x4001ac00), %g2 4000a300: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 ! 4001ac14 <_Thread_Heir> 4000a304: 80 a4 00 01 cmp %l0, %g1 4000a308: 32 bf ff eb bne,a 4000a2b4 <_Thread_Yield_processor+0x40> 4000a30c: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED _Thread_Heir = (Thread_Control *) ready->first; 4000a310: c2 04 40 00 ld [ %l1 ], %g1 4000a314: 10 bf ff e7 b 4000a2b0 <_Thread_Yield_processor+0x3c> 4000a318: c2 20 a0 14 st %g1, [ %g2 + 0x14 ] 4000961c <_Thread_queue_Dequeue>: Thread_queue_Control *the_thread_queue ) { Thread_Control *the_thread; switch ( the_thread_queue->discipline ) { 4000961c: c2 02 20 34 ld [ %o0 + 0x34 ], %g1 40009620: 80 a0 60 00 cmp %g1, 0 40009624: 12 80 00 05 bne 40009638 <_Thread_queue_Dequeue+0x1c> 40009628: 80 a0 60 01 cmp %g1, 1 case THREAD_QUEUE_DISCIPLINE_FIFO: the_thread = _Thread_queue_Dequeue_fifo( the_thread_queue ); 4000962c: 82 13 c0 00 mov %o7, %g1 40009630: 40 00 10 97 call 4000d88c <_Thread_queue_Dequeue_fifo> 40009634: 9e 10 40 00 mov %g1, %o7 Thread_queue_Control *the_thread_queue ) { Thread_Control *the_thread; switch ( the_thread_queue->discipline ) { 40009638: 02 80 00 04 be 40009648 <_Thread_queue_Dequeue+0x2c> 4000963c: 01 00 00 00 nop the_thread = NULL; break; } return( the_thread ); } 40009640: 81 c3 e0 08 retl <== NOT EXECUTED 40009644: 90 10 20 00 clr %o0 ! 0 <== NOT EXECUTED switch ( the_thread_queue->discipline ) { case THREAD_QUEUE_DISCIPLINE_FIFO: the_thread = _Thread_queue_Dequeue_fifo( the_thread_queue ); break; case THREAD_QUEUE_DISCIPLINE_PRIORITY: the_thread = _Thread_queue_Dequeue_priority( the_thread_queue ); 40009648: 82 13 c0 00 mov %o7, %g1 4000964c: 40 00 00 03 call 40009658 <_Thread_queue_Dequeue_priority> 40009650: 9e 10 40 00 mov %g1, %o7 40009654: 01 00 00 00 nop 4000d88c <_Thread_queue_Dequeue_fifo>: */ Thread_Control *_Thread_queue_Dequeue_fifo( Thread_queue_Control *the_thread_queue ) { 4000d88c: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *the_thread; _ISR_Disable( level ); 4000d890: 7f ff d1 59 call 40001df4 4000d894: a0 10 00 18 mov %i0, %l0 4000d898: 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)); 4000d89c: f0 06 00 00 ld [ %i0 ], %i0 if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) { 4000d8a0: 82 04 20 04 add %l0, 4, %g1 4000d8a4: 80 a6 00 01 cmp %i0, %g1 4000d8a8: 22 80 00 1d be,a 4000d91c <_Thread_queue_Dequeue_fifo+0x90> 4000d8ac: 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; 4000d8b0: c2 06 00 00 ld [ %i0 ], %g1 the_chain->first = new_first; 4000d8b4: 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 ) ) { 4000d8b8: c4 06 20 50 ld [ %i0 + 0x50 ], %g2 new_first->previous = _Chain_Head(the_chain); 4000d8bc: e0 20 60 04 st %l0, [ %g1 + 4 ] 4000d8c0: 80 a0 a0 02 cmp %g2, 2 4000d8c4: 02 80 00 0a be 4000d8ec <_Thread_queue_Dequeue_fifo+0x60> 4000d8c8: c0 26 20 44 clr [ %i0 + 0x44 ] _ISR_Enable( level ); 4000d8cc: 7f ff d1 4e call 40001e04 4000d8d0: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4000d8d4: 90 10 00 18 mov %i0, %o0 4000d8d8: 13 04 00 ff sethi %hi(0x1003fc00), %o1 4000d8dc: 7f ff ed 99 call 40008f40 <_Thread_Clear_state> 4000d8e0: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 4000d8e4: 81 c7 e0 08 ret 4000d8e8: 81 e8 00 00 restore RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 4000d8ec: 82 10 20 03 mov 3, %g1 4000d8f0: c2 26 20 50 st %g1, [ %i0 + 0x50 ] _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000d8f4: 7f ff d1 44 call 40001e04 4000d8f8: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); 4000d8fc: 7f ff f3 d7 call 4000a858 <_Watchdog_Remove> 4000d900: 90 06 20 48 add %i0, 0x48, %o0 4000d904: 90 10 00 18 mov %i0, %o0 4000d908: 13 04 00 ff sethi %hi(0x1003fc00), %o1 4000d90c: 7f ff ed 8d call 40008f40 <_Thread_Clear_state> 4000d910: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 4000d914: 81 c7 e0 08 ret 4000d918: 81 e8 00 00 restore #endif return the_thread; } switch ( the_thread_queue->sync_state ) { 4000d91c: 80 a0 60 02 cmp %g1, 2 4000d920: 18 80 00 0c bgu 4000d950 <_Thread_queue_Dequeue_fifo+0xc4> 4000d924: 80 a0 60 03 cmp %g1, 3 4000d928: 80 a0 60 01 cmp %g1, 1 4000d92c: 0a 80 00 0b bcs 4000d958 <_Thread_queue_Dequeue_fifo+0xcc> 4000d930: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); return NULL; case THREAD_QUEUE_NOTHING_HAPPENED: case THREAD_QUEUE_TIMEOUT: the_thread_queue->sync_state = THREAD_QUEUE_SATISFIED; 4000d934: c2 24 20 30 st %g1, [ %l0 + 0x30 ] <== NOT EXECUTED _ISR_Enable( level ); 4000d938: 7f ff d1 33 call 40001e04 <== NOT EXECUTED 4000d93c: 01 00 00 00 nop <== NOT EXECUTED return _Thread_Executing; 4000d940: 03 10 00 6b sethi %hi(0x4001ac00), %g1 <== NOT EXECUTED 4000d944: f0 00 60 3c ld [ %g1 + 0x3c ], %i0 ! 4001ac3c <_Thread_Executing> <== NOT EXECUTED } return NULL; /* this is only to prevent warnings */ } 4000d948: 81 c7 e0 08 ret <== NOT EXECUTED 4000d94c: 81 e8 00 00 restore <== NOT EXECUTED #endif return the_thread; } switch ( the_thread_queue->sync_state ) { 4000d950: 12 bf ff e5 bne 4000d8e4 <_Thread_queue_Dequeue_fifo+0x58> <== NOT EXECUTED 4000d954: b0 10 20 00 clr %i0 <== NOT EXECUTED case THREAD_QUEUE_SYNCHRONIZED: case THREAD_QUEUE_SATISFIED: _ISR_Enable( level ); 4000d958: b0 10 20 00 clr %i0 4000d95c: 7f ff d1 2a call 40001e04 4000d960: 90 10 00 02 mov %g2, %o0 4000d964: 81 c7 e0 08 ret 4000d968: 81 e8 00 00 restore 40009658 <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 40009658: 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 ); 4000965c: 7f ff e1 e6 call 40001df4 40009660: 01 00 00 00 nop 40009664: 9a 10 00 08 mov %o0, %o5 40009668: 86 10 20 00 clr %g3 4000966c: 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)); 40009670: 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 ] ) ) { 40009674: 85 28 e0 02 sll %g3, 2, %g2 40009678: 83 28 e0 04 sll %g3, 4, %g1 4000967c: 82 20 40 02 sub %g1, %g2, %g1 40009680: 82 06 00 01 add %i0, %g1, %g1 40009684: 82 00 60 04 add %g1, 4, %g1 40009688: 80 a2 00 01 cmp %o0, %g1 4000968c: 12 80 00 50 bne 400097cc <_Thread_queue_Dequeue_priority+0x174> 40009690: 88 01 20 0c add %g4, 0xc, %g4 Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 40009694: 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 ; 40009698: 80 a0 e0 04 cmp %g3, 4 4000969c: 32 bf ff f6 bne,a 40009674 <_Thread_queue_Dequeue_priority+0x1c> 400096a0: d0 01 00 18 ld [ %g4 + %i0 ], %o0 the_thread_queue->Queues.Priority[ index ].first; goto dequeue; } } switch ( the_thread_queue->sync_state ) { 400096a4: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 400096a8: 80 a0 60 02 cmp %g1, 2 400096ac: 08 80 00 23 bleu 40009738 <_Thread_queue_Dequeue_priority+0xe0> 400096b0: 80 a0 60 01 cmp %g1, 1 400096b4: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 400096b8: 02 80 00 29 be 4000975c <_Thread_queue_Dequeue_priority+0x104> <== NOT EXECUTED 400096bc: b0 10 20 00 clr %i0 <== NOT EXECUTED return _Thread_Executing; } dequeue: the_thread->Wait.queue = NULL; new_first_node = the_thread->Wait.Block2n.first; 400096c0: 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 ) ) { 400096c4: 82 06 20 3c add %i0, 0x3c, %g1 _ISR_Enable( level ); return _Thread_Executing; } dequeue: the_thread->Wait.queue = NULL; 400096c8: 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 ) ) { 400096cc: 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; 400096d0: c4 06 00 00 ld [ %i0 ], %g2 previous_node = the_thread->Object.Node.previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 400096d4: 02 80 00 27 be 40009770 <_Thread_queue_Dequeue_priority+0x118> 400096d8: c2 06 20 04 ld [ %i0 + 4 ], %g1 last_node = the_thread->Wait.Block2n.last; 400096dc: d8 06 20 40 ld [ %i0 + 0x40 ], %o4 new_second_node = new_first_node->next; 400096e0: c8 00 c0 00 ld [ %g3 ], %g4 previous_node->next = new_first_node; next_node->previous = new_first_node; 400096e4: 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; 400096e8: c6 20 40 00 st %g3, [ %g1 ] next_node->previous = new_first_node; new_first_node->next = next_node; 400096ec: c4 20 c0 00 st %g2, [ %g3 ] new_first_node->previous = previous_node; 400096f0: c2 20 e0 04 st %g1, [ %g3 + 4 ] if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 400096f4: c4 06 20 38 ld [ %i0 + 0x38 ], %g2 400096f8: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 400096fc: 80 a0 80 01 cmp %g2, %g1 40009700: 12 80 00 2d bne 400097b4 <_Thread_queue_Dequeue_priority+0x15c> 40009704: 82 00 e0 38 add %g3, 0x38, %g1 } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 40009708: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000970c: 80 a0 60 02 cmp %g1, 2 40009710: 02 80 00 1e be 40009788 <_Thread_queue_Dequeue_priority+0x130> 40009714: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 40009718: 7f ff e1 bb call 40001e04 4000971c: 90 10 00 0d mov %o5, %o0 40009720: 90 10 00 18 mov %i0, %o0 40009724: 13 04 00 ff sethi %hi(0x1003fc00), %o1 40009728: 7f ff fe 06 call 40008f40 <_Thread_Clear_state> 4000972c: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 40009730: 81 c7 e0 08 ret 40009734: 81 e8 00 00 restore the_thread_queue->Queues.Priority[ index ].first; goto dequeue; } } switch ( the_thread_queue->sync_state ) { 40009738: 0a 80 00 09 bcs 4000975c <_Thread_queue_Dequeue_priority+0x104> 4000973c: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); return NULL; case THREAD_QUEUE_NOTHING_HAPPENED: case THREAD_QUEUE_TIMEOUT: the_thread_queue->sync_state = THREAD_QUEUE_SATISFIED; 40009740: c2 26 20 30 st %g1, [ %i0 + 0x30 ] <== NOT EXECUTED _ISR_Enable( level ); 40009744: 7f ff e1 b0 call 40001e04 <== NOT EXECUTED 40009748: 90 10 00 0d mov %o5, %o0 <== NOT EXECUTED return _Thread_Executing; 4000974c: 03 10 00 6b sethi %hi(0x4001ac00), %g1 <== NOT EXECUTED 40009750: f0 00 60 3c ld [ %g1 + 0x3c ], %i0 ! 4001ac3c <_Thread_Executing> <== NOT EXECUTED 40009754: 81 c7 e0 08 ret <== NOT EXECUTED 40009758: 81 e8 00 00 restore <== NOT EXECUTED } switch ( the_thread_queue->sync_state ) { case THREAD_QUEUE_SYNCHRONIZED: case THREAD_QUEUE_SATISFIED: _ISR_Enable( level ); 4000975c: b0 10 20 00 clr %i0 40009760: 7f ff e1 a9 call 40001e04 40009764: 90 10 00 0d mov %o5, %o0 40009768: 81 c7 e0 08 ret 4000976c: 81 e8 00 00 restore last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; next_node->previous = previous_node; 40009770: 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; 40009774: c4 20 40 00 st %g2, [ %g1 ] next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 40009778: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000977c: 80 a0 60 02 cmp %g1, 2 40009780: 12 bf ff e6 bne 40009718 <_Thread_queue_Dequeue_priority+0xc0> 40009784: 82 10 20 03 mov 3, %g1 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 40009788: c2 26 20 50 st %g1, [ %i0 + 0x50 ] _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000978c: 7f ff e1 9e call 40001e04 40009790: 90 10 00 0d mov %o5, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 40009794: 40 00 04 31 call 4000a858 <_Watchdog_Remove> 40009798: 90 06 20 48 add %i0, 0x48, %o0 4000979c: 90 10 00 18 mov %i0, %o0 400097a0: 13 04 00 ff sethi %hi(0x1003fc00), %o1 400097a4: 7f ff fd e7 call 40008f40 <_Thread_Clear_state> 400097a8: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 400097ac: 81 c7 e0 08 ret 400097b0: 81 e8 00 00 restore new_first_node->next = next_node; new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ new_second_node->previous = 400097b4: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 400097b8: c8 20 e0 38 st %g4, [ %g3 + 0x38 ] new_first_thread->Wait.Block2n.last = last_node; 400097bc: d8 20 e0 40 st %o4, [ %g3 + 0x40 ] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 400097c0: 82 00 e0 3c add %g3, 0x3c, %g1 400097c4: 10 bf ff d1 b 40009708 <_Thread_queue_Dequeue_priority+0xb0> 400097c8: c2 23 00 00 st %g1, [ %o4 ] _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { the_thread = (Thread_Control *) 400097cc: 10 bf ff bd b 400096c0 <_Thread_queue_Dequeue_priority+0x68> 400097d0: b0 10 00 08 mov %o0, %i0 4000d96c <_Thread_queue_Enqueue_fifo>: void _Thread_queue_Enqueue_fifo ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4000d96c: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_queue_States sync_state; _ISR_Disable( level ); 4000d970: 7f ff d1 21 call 40001df4 4000d974: 01 00 00 00 nop sync_state = the_thread_queue->sync_state; 4000d978: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 the_thread_queue->sync_state = THREAD_QUEUE_SYNCHRONIZED; switch ( sync_state ) { 4000d97c: 80 a0 a0 02 cmp %g2, 2 4000d980: 02 80 00 22 be 4000da08 <_Thread_queue_Enqueue_fifo+0x9c> 4000d984: c0 26 20 30 clr [ %i0 + 0x30 ] 4000d988: 80 a0 a0 03 cmp %g2, 3 4000d98c: 02 80 00 11 be 4000d9d0 <_Thread_queue_Enqueue_fifo+0x64> 4000d990: 80 a0 a0 01 cmp %g2, 1 4000d994: 02 80 00 07 be 4000d9b0 <_Thread_queue_Enqueue_fifo+0x44> 4000d998: 82 06 20 04 add %i0, 4, %g1 4000d99c: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED 4000d9a0: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED 4000d9a4: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <== NOT EXECUTED 4000d9a8: 7f ff ed 66 call 40008f40 <_Thread_Clear_state> <== NOT EXECUTED 4000d9ac: 81 e8 00 00 restore <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000d9b0: c2 26 40 00 st %g1, [ %i1 ] old_last_node = the_chain->last; 4000d9b4: c4 06 20 08 ld [ %i0 + 8 ], %g2 the_chain->last = the_node; 4000d9b8: f2 26 20 08 st %i1, [ %i0 + 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; 4000d9bc: f0 26 60 44 st %i0, [ %i1 + 0x44 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000d9c0: c4 26 60 04 st %g2, [ %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; 4000d9c4: f2 20 80 00 st %i1, [ %g2 ] _ISR_Enable( level ); 4000d9c8: 7f ff d1 0f call 40001e04 4000d9cc: 91 e8 00 08 restore %g0, %o0, %o0 the_thread->Wait.queue = NULL; _ISR_Enable( level ); break; case THREAD_QUEUE_SATISFIED: if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 4000d9d0: c2 06 60 50 ld [ %i1 + 0x50 ], %g1 <== NOT EXECUTED 4000d9d4: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000d9d8: 12 80 00 16 bne 4000da30 <_Thread_queue_Enqueue_fifo+0xc4> <== NOT EXECUTED 4000d9dc: 01 00 00 00 nop <== NOT EXECUTED 4000d9e0: c4 26 60 50 st %g2, [ %i1 + 0x50 ] <== NOT EXECUTED _Watchdog_Deactivate( &the_thread->Timer ); the_thread->Wait.queue = NULL; 4000d9e4: c0 26 60 44 clr [ %i1 + 0x44 ] <== NOT EXECUTED _ISR_Enable( level ); 4000d9e8: 7f ff d1 07 call 40001e04 <== NOT EXECUTED 4000d9ec: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 4000d9f0: 7f ff f3 9a call 4000a858 <_Watchdog_Remove> <== NOT EXECUTED 4000d9f4: 90 06 60 48 add %i1, 0x48, %o0 <== NOT EXECUTED 4000d9f8: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED 4000d9fc: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <== NOT EXECUTED 4000da00: 7f ff ed 50 call 40008f40 <_Thread_Clear_state> <== NOT EXECUTED 4000da04: 81 e8 00 00 restore <== 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; 4000da08: c4 06 60 44 ld [ %i1 + 0x44 ], %g2 <== NOT EXECUTED the_thread->Wait.queue = NULL; 4000da0c: 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; 4000da10: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 <== NOT EXECUTED 4000da14: c2 26 60 34 st %g1, [ %i1 + 0x34 ] <== NOT EXECUTED the_thread->Wait.queue = NULL; _ISR_Enable( level ); 4000da18: 7f ff d0 fb call 40001e04 <== NOT EXECUTED 4000da1c: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED 4000da20: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED 4000da24: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <== NOT EXECUTED 4000da28: 7f ff ed 46 call 40008f40 <_Thread_Clear_state> <== NOT EXECUTED 4000da2c: 81 e8 00 00 restore <== NOT EXECUTED _Watchdog_Deactivate( &the_thread->Timer ); the_thread->Wait.queue = NULL; _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 4000da30: 7f ff d0 f5 call 40001e04 <== NOT EXECUTED 4000da34: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED 4000da38: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED 4000da3c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <== NOT EXECUTED 4000da40: 7f ff ed 40 call 40008f40 <_Thread_Clear_state> <== NOT EXECUTED 4000da44: 81 e8 00 00 restore <== NOT EXECUTED 4000da48: 01 00 00 00 nop 40009858 <_Thread_queue_Enqueue_priority>: void _Thread_queue_Enqueue_priority( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 40009858: 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; 4000985c: 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); 40009860: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40009864: 84 06 60 38 add %i1, 0x38, %g2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40009868: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; 4000986c: c0 26 60 3c clr [ %i1 + 0x3c ] the_chain->last = _Chain_Head(the_chain); 40009870: c4 26 60 40 st %g2, [ %i1 + 0x40 ] void _Thread_queue_Enqueue_priority( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 40009874: aa 10 00 18 mov %i0, %l5 priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 40009878: 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); 4000987c: 83 34 a0 06 srl %l2, 6, %g1 40009880: 12 80 00 40 bne 40009980 <_Thread_queue_Enqueue_priority+0x128> 40009884: e8 06 20 38 ld [ %i0 + 0x38 ], %l4 40009888: 85 28 60 04 sll %g1, 4, %g2 4000988c: 83 28 60 02 sll %g1, 2, %g1 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 40009890: ac 20 80 01 sub %g2, %g1, %l6 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40009894: 82 06 00 16 add %i0, %l6, %g1 40009898: a6 00 60 04 add %g1, 4, %l3 if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 4000989c: 7f ff e1 56 call 40001df4 400098a0: 01 00 00 00 nop 400098a4: b0 10 00 08 mov %o0, %i0 search_thread = (Thread_Control *) header->first; 400098a8: e0 05 40 16 ld [ %l5 + %l6 ], %l0 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 400098ac: 80 a4 00 13 cmp %l0, %l3 400098b0: 02 80 00 24 be 40009940 <_Thread_queue_Enqueue_priority+0xe8> 400098b4: a2 10 3f ff mov -1, %l1 search_priority = search_thread->current_priority; 400098b8: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 400098bc: 80 a4 80 11 cmp %l2, %l1 400098c0: 28 80 00 21 bleu,a 40009944 <_Thread_queue_Enqueue_priority+0xec> 400098c4: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.next; 400098c8: e0 04 00 00 ld [ %l0 ], %l0 if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) ) 400098cc: 80 a4 c0 10 cmp %l3, %l0 400098d0: 32 80 00 19 bne,a 40009934 <_Thread_queue_Enqueue_priority+0xdc> 400098d4: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != THREAD_QUEUE_NOTHING_HAPPENED ) 400098d8: 10 80 00 1b b 40009944 <_Thread_queue_Enqueue_priority+0xec> 400098dc: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 400098e0: 7f ff e1 49 call 40001e04 400098e4: 90 10 00 18 mov %i0, %o0 400098e8: 7f ff e1 43 call 40001df4 400098ec: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 400098f0: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 400098f4: 80 8d 00 01 btst %l4, %g1 400098f8: 02 80 00 91 be 40009b3c <_Thread_queue_Enqueue_priority+0x2e4> 400098fc: 01 00 00 00 nop _ISR_Enable( level ); goto restart_forward_search; } search_thread = 40009900: e0 04 00 00 ld [ %l0 ], %l0 restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 40009904: 80 a4 00 13 cmp %l0, %l3 40009908: 22 80 00 0f be,a 40009944 <_Thread_queue_Enqueue_priority+0xec> 4000990c: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 search_priority = search_thread->current_priority; 40009910: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 40009914: 80 a4 80 11 cmp %l2, %l1 40009918: 28 80 00 0b bleu,a 40009944 <_Thread_queue_Enqueue_priority+0xec> 4000991c: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.next; 40009920: e0 04 00 00 ld [ %l0 ], %l0 if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) ) 40009924: 80 a4 00 13 cmp %l0, %l3 40009928: 22 80 00 07 be,a 40009944 <_Thread_queue_Enqueue_priority+0xec> 4000992c: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; 40009930: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 40009934: 80 a4 80 11 cmp %l2, %l1 40009938: 18 bf ff ea bgu 400098e0 <_Thread_queue_Enqueue_priority+0x88> 4000993c: 01 00 00 00 nop } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != THREAD_QUEUE_NOTHING_HAPPENED ) 40009940: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 40009944: 80 a0 60 01 cmp %g1, 1 40009948: 02 80 00 63 be 40009ad4 <_Thread_queue_Enqueue_priority+0x27c> 4000994c: 80 a4 80 11 cmp %l2, %l1 return; synchronize: sync_state = the_thread_queue->sync_state; the_thread_queue->sync_state = THREAD_QUEUE_SYNCHRONIZED; 40009950: c0 25 60 30 clr [ %l5 + 0x30 ] <== NOT EXECUTED switch ( sync_state ) { 40009954: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40009958: 02 80 00 54 be 40009aa8 <_Thread_queue_Enqueue_priority+0x250> <== NOT EXECUTED 4000995c: 84 10 00 01 mov %g1, %g2 <== NOT EXECUTED 40009960: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 40009964: 22 80 00 43 be,a 40009a70 <_Thread_queue_Enqueue_priority+0x218> <== NOT EXECUTED 40009968: c2 06 60 50 ld [ %i1 + 0x50 ], %g1 <== NOT EXECUTED 4000996c: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED 40009970: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED 40009974: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <== NOT EXECUTED 40009978: 7f ff fd 72 call 40008f40 <_Thread_Clear_state> <== NOT EXECUTED 4000997c: 81 e8 00 00 restore <== NOT EXECUTED 40009980: 85 28 60 04 sll %g1, 4, %g2 40009984: 83 28 60 02 sll %g1, 2, %g1 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 40009988: 82 20 80 01 sub %g2, %g1, %g1 4000998c: a6 00 40 18 add %g1, %i0, %l3 return; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 40009990: 7f ff e1 19 call 40001df4 40009994: 01 00 00 00 nop 40009998: b0 10 00 08 mov %o0, %i0 search_thread = (Thread_Control *) header->last; 4000999c: e0 04 e0 08 ld [ %l3 + 8 ], %l0 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 400099a0: 80 a4 00 13 cmp %l0, %l3 400099a4: 02 80 00 24 be 40009a34 <_Thread_queue_Enqueue_priority+0x1dc> 400099a8: a2 10 21 00 mov 0x100, %l1 search_priority = search_thread->current_priority; 400099ac: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority >= search_priority ) 400099b0: 80 a4 80 11 cmp %l2, %l1 400099b4: 3a 80 00 21 bcc,a 40009a38 <_Thread_queue_Enqueue_priority+0x1e0> 400099b8: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 400099bc: e0 04 20 04 ld [ %l0 + 4 ], %l0 if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 400099c0: 80 a4 c0 10 cmp %l3, %l0 400099c4: 32 80 00 19 bne,a 40009a28 <_Thread_queue_Enqueue_priority+0x1d0> 400099c8: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != THREAD_QUEUE_NOTHING_HAPPENED ) 400099cc: 10 80 00 1b b 40009a38 <_Thread_queue_Enqueue_priority+0x1e0> 400099d0: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 400099d4: 7f ff e1 0c call 40001e04 400099d8: 90 10 00 18 mov %i0, %o0 400099dc: 7f ff e1 06 call 40001df4 400099e0: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 400099e4: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 400099e8: 80 8d 00 01 btst %l4, %g1 400099ec: 02 80 00 57 be 40009b48 <_Thread_queue_Enqueue_priority+0x2f0> 400099f0: 01 00 00 00 nop _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 400099f4: e0 04 20 04 ld [ %l0 + 4 ], %l0 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 400099f8: 80 a4 00 13 cmp %l0, %l3 400099fc: 22 80 00 0f be,a 40009a38 <_Thread_queue_Enqueue_priority+0x1e0> 40009a00: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 search_priority = search_thread->current_priority; 40009a04: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 <== NOT EXECUTED if ( priority >= search_priority ) 40009a08: 80 a4 80 11 cmp %l2, %l1 <== NOT EXECUTED 40009a0c: 3a 80 00 0b bcc,a 40009a38 <_Thread_queue_Enqueue_priority+0x1e0> <== NOT EXECUTED 40009a10: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 <== NOT EXECUTED break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 40009a14: e0 04 20 04 ld [ %l0 + 4 ], %l0 <== NOT EXECUTED if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 40009a18: 80 a4 00 13 cmp %l0, %l3 <== NOT EXECUTED 40009a1c: 22 80 00 07 be,a 40009a38 <_Thread_queue_Enqueue_priority+0x1e0> <== NOT EXECUTED 40009a20: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 <== NOT EXECUTED break; search_priority = search_thread->current_priority; 40009a24: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 <== NOT EXECUTED if ( priority >= search_priority ) 40009a28: 80 a4 80 11 cmp %l2, %l1 40009a2c: 0a bf ff ea bcs 400099d4 <_Thread_queue_Enqueue_priority+0x17c> 40009a30: 01 00 00 00 nop } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != THREAD_QUEUE_NOTHING_HAPPENED ) 40009a34: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 40009a38: 80 a0 60 01 cmp %g1, 1 40009a3c: 12 bf ff c6 bne 40009954 <_Thread_queue_Enqueue_priority+0xfc> 40009a40: c0 25 60 30 clr [ %l5 + 0x30 ] goto synchronize; the_thread_queue->sync_state = THREAD_QUEUE_SYNCHRONIZED; if ( priority == search_priority ) 40009a44: 80 a4 80 11 cmp %l2, %l1 40009a48: 22 80 00 35 be,a 40009b1c <_Thread_queue_Enqueue_priority+0x2c4> 40009a4c: 82 04 20 3c add %l0, 0x3c, %g1 goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 40009a50: c2 04 00 00 ld [ %l0 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 40009a54: 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; 40009a58: 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; 40009a5c: ea 26 60 44 st %l5, [ %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; 40009a60: f2 24 00 00 st %i1, [ %l0 ] next_node->previous = the_node; 40009a64: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40009a68: 7f ff e0 e7 call 40001e04 40009a6c: 81 e8 00 00 restore the_thread->Wait.queue = NULL; _ISR_Enable( level ); break; case THREAD_QUEUE_SATISFIED: if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 40009a70: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40009a74: 12 80 00 22 bne 40009afc <_Thread_queue_Enqueue_priority+0x2a4> <== NOT EXECUTED 40009a78: 01 00 00 00 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 40009a7c: c4 26 60 50 st %g2, [ %i1 + 0x50 ] <== NOT EXECUTED _Watchdog_Deactivate( &the_thread->Timer ); the_thread->Wait.queue = NULL; 40009a80: c0 26 60 44 clr [ %i1 + 0x44 ] <== NOT EXECUTED _ISR_Enable( level ); 40009a84: 7f ff e0 e0 call 40001e04 <== NOT EXECUTED 40009a88: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 40009a8c: 40 00 03 73 call 4000a858 <_Watchdog_Remove> <== NOT EXECUTED 40009a90: 90 06 60 48 add %i1, 0x48, %o0 <== NOT EXECUTED 40009a94: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED 40009a98: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED 40009a9c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <== NOT EXECUTED 40009aa0: 7f ff fd 28 call 40008f40 <_Thread_Clear_state> <== NOT EXECUTED 40009aa4: 81 e8 00 00 restore <== 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; 40009aa8: c4 06 60 44 ld [ %i1 + 0x44 ], %g2 <== NOT EXECUTED the_thread->Wait.queue = NULL; 40009aac: 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; 40009ab0: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 <== NOT EXECUTED 40009ab4: c2 26 60 34 st %g1, [ %i1 + 0x34 ] <== NOT EXECUTED the_thread->Wait.queue = NULL; _ISR_Enable( level ); 40009ab8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40009abc: 7f ff e0 d2 call 40001e04 <== NOT EXECUTED 40009ac0: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED 40009ac4: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED 40009ac8: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <== NOT EXECUTED 40009acc: 7f ff fd 1d call 40008f40 <_Thread_Clear_state> <== NOT EXECUTED 40009ad0: 81 e8 00 00 restore <== NOT EXECUTED if ( the_thread_queue->sync_state != THREAD_QUEUE_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_QUEUE_SYNCHRONIZED; if ( priority == search_priority ) 40009ad4: 02 80 00 11 be 40009b18 <_Thread_queue_Enqueue_priority+0x2c0> 40009ad8: c0 25 60 30 clr [ %l5 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 40009adc: c2 04 20 04 ld [ %l0 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40009ae0: e0 26 40 00 st %l0, [ %i1 ] the_node->previous = previous_node; 40009ae4: 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; 40009ae8: ea 26 60 44 st %l5, [ %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; 40009aec: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 40009af0: f2 24 20 04 st %i1, [ %l0 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40009af4: 7f ff e0 c4 call 40001e04 40009af8: 81 e8 00 00 restore _Watchdog_Deactivate( &the_thread->Timer ); the_thread->Wait.queue = NULL; _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 40009afc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40009b00: 7f ff e0 c1 call 40001e04 <== NOT EXECUTED 40009b04: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED 40009b08: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED 40009b0c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <== NOT EXECUTED 40009b10: 7f ff fd 0c call 40008f40 <_Thread_Clear_state> <== NOT EXECUTED 40009b14: 81 e8 00 00 restore <== NOT EXECUTED 40009b18: 82 04 20 3c add %l0, 0x3c, %g1 _ISR_Enable( level ); return; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 40009b1c: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40009b20: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 40009b24: 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; 40009b28: ea 26 60 44 st %l5, [ %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; 40009b2c: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 40009b30: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40009b34: 7f ff e0 b4 call 40001e04 40009b38: 81 e8 00 00 restore if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 40009b3c: 7f ff e0 b2 call 40001e04 <== NOT EXECUTED 40009b40: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40009b44: 30 bf ff 56 b,a 4000989c <_Thread_queue_Enqueue_priority+0x44> <== NOT EXECUTED if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 40009b48: 7f ff e0 af call 40001e04 <== NOT EXECUTED 40009b4c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40009b50: 30 bf ff 90 b,a 40009990 <_Thread_queue_Enqueue_priority+0x138> <== NOT EXECUTED 400097d4 <_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 ) { 400097d4: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; the_thread = _Thread_Executing; 400097d8: 03 10 00 6b sethi %hi(0x4001ac00), %g1 else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 400097dc: d2 06 20 38 ld [ %i0 + 0x38 ], %o1 Thread_queue_Timeout_callout handler ) { Thread_Control *the_thread; the_thread = _Thread_Executing; 400097e0: e0 00 60 3c ld [ %g1 + 0x3c ], %l0 void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { 400097e4: 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 ); 400097e8: 40 00 01 9b call 40009e54 <_Thread_Set_state> 400097ec: 90 10 00 10 mov %l0, %o0 /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { 400097f0: 80 a6 60 00 cmp %i1, 0 400097f4: 32 80 00 0e bne,a 4000982c <_Thread_queue_Enqueue_with_handler+0x58> 400097f8: c2 04 20 08 ld [ %l0 + 8 ], %g1 } /* * Now enqueue the thread per the discipline for this thread queue. */ switch( the_thread_queue->discipline ) { 400097fc: c2 04 60 34 ld [ %l1 + 0x34 ], %g1 40009800: 80 a0 60 00 cmp %g1, 0 40009804: 12 80 00 04 bne 40009814 <_Thread_queue_Enqueue_with_handler+0x40> 40009808: 80 a0 60 01 cmp %g1, 1 case THREAD_QUEUE_DISCIPLINE_FIFO: _Thread_queue_Enqueue_fifo( the_thread_queue, the_thread ); 4000980c: 40 00 10 58 call 4000d96c <_Thread_queue_Enqueue_fifo> 40009810: 93 e8 00 10 restore %g0, %l0, %o1 } /* * Now enqueue the thread per the discipline for this thread queue. */ switch( the_thread_queue->discipline ) { 40009814: 02 80 00 04 be 40009824 <_Thread_queue_Enqueue_with_handler+0x50> 40009818: 01 00 00 00 nop 4000981c: 81 c7 e0 08 ret <== NOT EXECUTED 40009820: 81 e8 00 00 restore <== NOT EXECUTED case THREAD_QUEUE_DISCIPLINE_FIFO: _Thread_queue_Enqueue_fifo( the_thread_queue, the_thread ); break; case THREAD_QUEUE_DISCIPLINE_PRIORITY: _Thread_queue_Enqueue_priority( the_thread_queue, the_thread ); 40009824: 40 00 00 0d call 40009858 <_Thread_queue_Enqueue_priority> 40009828: 93 e8 00 10 restore %g0, %l0, %o1 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4000982c: f4 24 20 64 st %i2, [ %l0 + 0x64 ] the_watchdog->id = id; 40009830: c2 24 20 68 st %g1, [ %l0 + 0x68 ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40009834: f2 24 20 54 st %i1, [ %l0 + 0x54 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40009838: c0 24 20 50 clr [ %l0 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 4000983c: c0 24 20 6c clr [ %l0 + 0x6c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40009840: 11 10 00 6b sethi %hi(0x4001ac00), %o0 40009844: 92 04 20 48 add %l0, 0x48, %o1 40009848: 40 00 03 9a call 4000a6b0 <_Watchdog_Insert> 4000984c: 90 12 20 5c or %o0, 0x5c, %o0 } /* * Now enqueue the thread per the discipline for this thread queue. */ switch( the_thread_queue->discipline ) { 40009850: 10 bf ff ec b 40009800 <_Thread_queue_Enqueue_with_handler+0x2c> 40009854: c2 04 60 34 ld [ %l1 + 0x34 ], %g1 4000da4c <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { switch ( the_thread_queue->discipline ) { 4000da4c: c2 02 20 34 ld [ %o0 + 0x34 ], %g1 4000da50: 80 a0 60 00 cmp %g1, 0 4000da54: 12 80 00 05 bne 4000da68 <_Thread_queue_Extract+0x1c> 4000da58: 80 a0 60 01 cmp %g1, 1 case THREAD_QUEUE_DISCIPLINE_FIFO: _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); 4000da5c: 82 13 c0 00 mov %o7, %g1 4000da60: 40 00 04 85 call 4000ec74 <_Thread_queue_Extract_fifo> 4000da64: 9e 10 40 00 mov %g1, %o7 void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { switch ( the_thread_queue->discipline ) { 4000da68: 02 80 00 04 be 4000da78 <_Thread_queue_Extract+0x2c> 4000da6c: 94 10 20 00 clr %o2 4000da70: 81 c3 e0 08 retl <== NOT EXECUTED 4000da74: 01 00 00 00 nop <== NOT EXECUTED case THREAD_QUEUE_DISCIPLINE_FIFO: _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); break; case THREAD_QUEUE_DISCIPLINE_PRIORITY: _Thread_queue_Extract_priority( the_thread_queue, the_thread ); 4000da78: 82 13 c0 00 mov %o7, %g1 4000da7c: 40 00 00 03 call 4000da88 <_Thread_queue_Extract_priority_helper> 4000da80: 9e 10 40 00 mov %g1, %o7 4000da84: 01 00 00 00 nop 4000ec74 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4000ec74: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 4000ec78: 7f ff cc 5f call 40001df4 4000ec7c: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4000ec80: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000ec84: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000ec88: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000ec8c: 80 88 80 01 btst %g2, %g1 4000ec90: 02 80 00 19 be 4000ecf4 <_Thread_queue_Extract_fifo+0x80> 4000ec94: 01 00 00 00 nop ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4000ec98: c2 06 40 00 ld [ %i1 ], %g1 previous = the_node->previous; 4000ec9c: 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 ) ) { 4000eca0: c6 06 60 50 ld [ %i1 + 0x50 ], %g3 next->previous = previous; previous->next = next; 4000eca4: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000eca8: c4 20 60 04 st %g2, [ %g1 + 4 ] 4000ecac: 80 a0 e0 02 cmp %g3, 2 4000ecb0: 12 80 00 0c bne 4000ece0 <_Thread_queue_Extract_fifo+0x6c> 4000ecb4: c0 26 60 44 clr [ %i1 + 0x44 ] 4000ecb8: 82 10 20 03 mov 3, %g1 4000ecbc: c2 26 60 50 st %g1, [ %i1 + 0x50 ] _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000ecc0: 7f ff cc 51 call 40001e04 4000ecc4: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); 4000ecc8: 7f ff ee e4 call 4000a858 <_Watchdog_Remove> 4000eccc: 90 06 60 48 add %i1, 0x48, %o0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4000ecd0: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000ecd4: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000ecd8: 7f ff e8 9a call 40008f40 <_Thread_Clear_state> 4000ecdc: 81 e8 00 00 restore _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); 4000ece0: 7f ff cc 49 call 40001e04 4000ece4: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000ece8: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000ecec: 7f ff e8 95 call 40008f40 <_Thread_Clear_state> 4000ecf0: 81 e8 00 00 restore ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 4000ecf4: 7f ff cc 44 call 40001e04 <== NOT EXECUTED 4000ecf8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000ecfc: 01 00 00 00 nop 4000da88 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, boolean requeuing ) { 4000da88: 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 ); 4000da8c: 7f ff d0 da call 40001df4 4000da90: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4000da94: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000da98: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000da9c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000daa0: 80 88 80 01 btst %g2, %g1 4000daa4: 02 80 00 29 be 4000db48 <_Thread_queue_Extract_priority_helper+0xc0> 4000daa8: 82 06 60 3c add %i1, 0x3c, %g1 */ RTEMS_INLINE_ROUTINE boolean _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000daac: c6 06 60 38 ld [ %i1 + 0x38 ], %g3 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 4000dab0: c4 06 40 00 ld [ %i1 ], %g2 previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4000dab4: 80 a0 c0 01 cmp %g3, %g1 4000dab8: 12 80 00 10 bne 4000daf8 <_Thread_queue_Extract_priority_helper+0x70> 4000dabc: c2 06 60 04 ld [ %i1 + 4 ], %g1 new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; next_node->previous = previous_node; 4000dac0: 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; 4000dac4: c4 20 40 00 st %g2, [ %g1 ] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4000dac8: 80 a6 a0 00 cmp %i2, 0 4000dacc: 12 80 00 1d bne 4000db40 <_Thread_queue_Extract_priority_helper+0xb8> 4000dad0: 01 00 00 00 nop _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4000dad4: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000dad8: 80 a0 60 02 cmp %g1, 2 4000dadc: 02 80 00 1d be 4000db50 <_Thread_queue_Extract_priority_helper+0xc8> 4000dae0: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 4000dae4: 7f ff d0 c8 call 40001e04 4000dae8: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000daec: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000daf0: 7f ff ed 14 call 40008f40 <_Thread_Clear_state> 4000daf4: 81 e8 00 00 restore previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 4000daf8: da 06 60 40 ld [ %i1 + 0x40 ], %o5 new_second_node = new_first_node->next; 4000dafc: c8 00 c0 00 ld [ %g3 ], %g4 previous_node->next = new_first_node; next_node->previous = new_first_node; 4000db00: 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; 4000db04: c6 20 40 00 st %g3, [ %g1 ] next_node->previous = new_first_node; new_first_node->next = next_node; 4000db08: c4 20 c0 00 st %g2, [ %g3 ] new_first_node->previous = previous_node; 4000db0c: c2 20 e0 04 st %g1, [ %g3 + 4 ] if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4000db10: c4 06 60 38 ld [ %i1 + 0x38 ], %g2 4000db14: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 4000db18: 80 a0 80 01 cmp %g2, %g1 4000db1c: 02 bf ff ec be 4000dacc <_Thread_queue_Extract_priority_helper+0x44> 4000db20: 80 a6 a0 00 cmp %i2, 0 /* > two threads on 2-n */ new_second_node->previous = 4000db24: 82 00 e0 38 add %g3, 0x38, %g1 <== NOT EXECUTED 4000db28: 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; 4000db2c: c8 20 e0 38 st %g4, [ %g3 + 0x38 ] <== NOT EXECUTED new_first_thread->Wait.Block2n.last = last_node; 4000db30: da 20 e0 40 st %o5, [ %g3 + 0x40 ] <== NOT EXECUTED last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4000db34: 82 00 e0 3c add %g3, 0x3c, %g1 <== NOT EXECUTED /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4000db38: 02 bf ff e7 be 4000dad4 <_Thread_queue_Extract_priority_helper+0x4c> <== NOT EXECUTED 4000db3c: c2 23 40 00 st %g1, [ %o5 ] <== NOT EXECUTED _ISR_Enable( level ); 4000db40: 7f ff d0 b1 call 40001e04 4000db44: 91 e8 00 08 restore %g0, %o0, %o0 Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 4000db48: 7f ff d0 af call 40001e04 <== NOT EXECUTED 4000db4c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000db50: c2 26 20 50 st %g1, [ %i0 + 0x50 ] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000db54: 7f ff d0 ac call 40001e04 4000db58: 33 04 00 ff sethi %hi(0x1003fc00), %i1 (void) _Watchdog_Remove( &the_thread->Timer ); 4000db5c: 7f ff f3 3f call 4000a858 <_Watchdog_Remove> 4000db60: 90 06 20 48 add %i0, 0x48, %o0 4000db64: b2 16 63 f8 or %i1, 0x3f8, %i1 4000db68: 7f ff ec f6 call 40008f40 <_Thread_Clear_state> 4000db6c: 81 e8 00 00 restore 4000db70: 01 00 00 00 nop 40009b54 <_Thread_queue_Extract_with_proxy>: */ boolean _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { 40009b54: 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; 40009b58: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 */ boolean _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { 40009b5c: 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 ) ) { 40009b60: 03 00 00 ef sethi %hi(0x3bc00), %g1 40009b64: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 40009b68: 80 88 80 01 btst %g2, %g1 40009b6c: 02 80 00 1e be 40009be4 <_Thread_queue_Extract_with_proxy+0x90> 40009b70: b0 10 20 00 clr %i0 if ( _States_Is_waiting_for_rpc_reply( state ) && 40009b74: 03 00 00 08 sethi %hi(0x2000), %g1 40009b78: 80 88 80 01 btst %g2, %g1 40009b7c: 22 80 00 17 be,a 40009bd8 <_Thread_queue_Extract_with_proxy+0x84> 40009b80: d0 04 20 44 ld [ %l0 + 0x44 ], %o0 40009b84: 03 00 00 e7 sethi %hi(0x39c00), %g1 <== NOT EXECUTED 40009b88: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 39ee0 <== NOT EXECUTED 40009b8c: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED 40009b90: 22 80 00 12 be,a 40009bd8 <_Thread_queue_Extract_with_proxy+0x84> <== NOT EXECUTED 40009b94: d0 04 20 44 ld [ %l0 + 0x44 ], %o0 <== NOT EXECUTED _States_Is_locally_blocked( state ) ) { the_information = _Objects_Get_information( the_thread->Wait.id ); 40009b98: c6 04 20 20 ld [ %l0 + 0x20 ], %g3 <== NOT EXECUTED proxy_extract_callout = 40009b9c: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED 40009ba0: 85 30 e0 16 srl %g3, 0x16, %g2 <== NOT EXECUTED 40009ba4: 82 10 62 c0 or %g1, 0x2c0, %g1 <== NOT EXECUTED 40009ba8: 84 08 a0 1c and %g2, 0x1c, %g2 <== NOT EXECUTED 40009bac: c8 00 40 02 ld [ %g1 + %g2 ], %g4 <== NOT EXECUTED 40009bb0: 87 30 e0 1b srl %g3, 0x1b, %g3 <== NOT EXECUTED 40009bb4: 87 28 e0 02 sll %g3, 2, %g3 <== NOT EXECUTED 40009bb8: c2 01 00 03 ld [ %g4 + %g3 ], %g1 <== NOT EXECUTED 40009bbc: c2 00 60 48 ld [ %g1 + 0x48 ], %g1 <== NOT EXECUTED (Objects_Thread_queue_Extract_callout) the_information->extract; if ( proxy_extract_callout ) 40009bc0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009bc4: 22 80 00 05 be,a 40009bd8 <_Thread_queue_Extract_with_proxy+0x84> <== NOT EXECUTED 40009bc8: d0 04 20 44 ld [ %l0 + 0x44 ], %o0 <== NOT EXECUTED (*proxy_extract_callout)( the_thread ); 40009bcc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40009bd0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED } _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 40009bd4: d0 04 20 44 ld [ %l0 + 0x44 ], %o0 <== NOT EXECUTED 40009bd8: 92 10 00 10 mov %l0, %o1 40009bdc: 40 00 0f 9c call 4000da4c <_Thread_queue_Extract> 40009be0: b0 10 20 01 mov 1, %i0 return TRUE; } return FALSE; } 40009be4: 81 c7 e0 08 ret 40009be8: 81 e8 00 00 restore 4000c3c8 <_Thread_queue_First>: Thread_queue_Control *the_thread_queue ) { Thread_Control *the_thread; switch ( the_thread_queue->discipline ) { 4000c3c8: c2 02 20 34 ld [ %o0 + 0x34 ], %g1 4000c3cc: 80 a0 60 00 cmp %g1, 0 4000c3d0: 12 80 00 05 bne 4000c3e4 <_Thread_queue_First+0x1c> 4000c3d4: 80 a0 60 01 cmp %g1, 1 case THREAD_QUEUE_DISCIPLINE_FIFO: the_thread = _Thread_queue_First_fifo( the_thread_queue ); 4000c3d8: 82 13 c0 00 mov %o7, %g1 4000c3dc: 40 00 10 43 call 400104e8 <_Thread_queue_First_fifo> 4000c3e0: 9e 10 40 00 mov %g1, %o7 Thread_queue_Control *the_thread_queue ) { Thread_Control *the_thread; switch ( the_thread_queue->discipline ) { 4000c3e4: 02 80 00 04 be 4000c3f4 <_Thread_queue_First+0x2c> 4000c3e8: 01 00 00 00 nop the_thread = NULL; break; } return the_thread; } 4000c3ec: 81 c3 e0 08 retl <== NOT EXECUTED 4000c3f0: 90 10 20 00 clr %o0 ! 0 <== NOT EXECUTED switch ( the_thread_queue->discipline ) { case THREAD_QUEUE_DISCIPLINE_FIFO: the_thread = _Thread_queue_First_fifo( the_thread_queue ); break; case THREAD_QUEUE_DISCIPLINE_PRIORITY: the_thread = _Thread_queue_First_priority( the_thread_queue ); 4000c3f4: 82 13 c0 00 mov %o7, %g1 4000c3f8: 40 00 00 03 call 4000c404 <_Thread_queue_First_priority> 4000c3fc: 9e 10 40 00 mov %g1, %o7 4000c400: 01 00 00 00 nop 40009c0c <_Thread_queue_Initialize>: uint32_t timeout_status ) { uint32_t index; the_thread_queue->state = state; 40009c0c: d4 22 20 38 st %o2, [ %o0 + 0x38 ] the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; 40009c10: d6 22 20 3c st %o3, [ %o0 + 0x3c ] the_thread_queue->sync_state = THREAD_QUEUE_SYNCHRONIZED; 40009c14: c0 22 20 30 clr [ %o0 + 0x30 ] switch ( the_discipline ) { 40009c18: 80 a2 60 00 cmp %o1, 0 40009c1c: 12 80 00 07 bne 40009c38 <_Thread_queue_Initialize+0x2c> 40009c20: d2 22 20 34 st %o1, [ %o0 + 0x34 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40009c24: 82 02 20 04 add %o0, 4, %g1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40009c28: d0 22 20 08 st %o0, [ %o0 + 8 ] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 40009c2c: c0 22 20 04 clr [ %o0 + 4 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40009c30: 81 c3 e0 08 retl 40009c34: c2 22 00 00 st %g1, [ %o0 ] 40009c38: 80 a2 60 01 cmp %o1, 1 40009c3c: 02 80 00 04 be 40009c4c <_Thread_queue_Initialize+0x40> 40009c40: 82 02 20 04 add %o0, 4, %g1 40009c44: 81 c3 e0 08 retl <== NOT EXECUTED 40009c48: 01 00 00 00 nop <== NOT EXECUTED 40009c4c: 84 02 20 10 add %o0, 0x10, %g2 40009c50: c2 22 00 00 st %g1, [ %o0 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40009c54: 82 02 20 0c add %o0, 0xc, %g1 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40009c58: c4 22 20 0c st %g2, [ %o0 + 0xc ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40009c5c: c2 22 20 14 st %g1, [ %o0 + 0x14 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40009c60: 84 02 20 1c add %o0, 0x1c, %g2 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40009c64: 82 02 20 18 add %o0, 0x18, %g1 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40009c68: c4 22 20 18 st %g2, [ %o0 + 0x18 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40009c6c: c2 22 20 20 st %g1, [ %o0 + 0x20 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40009c70: 84 02 20 28 add %o0, 0x28, %g2 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40009c74: 82 02 20 24 add %o0, 0x24, %g1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 40009c78: c0 22 20 04 clr [ %o0 + 4 ] the_chain->last = _Chain_Head(the_chain); 40009c7c: d0 22 20 08 st %o0, [ %o0 + 8 ] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 40009c80: c0 22 20 10 clr [ %o0 + 0x10 ] 40009c84: c0 22 20 1c clr [ %o0 + 0x1c ] 40009c88: c0 22 20 28 clr [ %o0 + 0x28 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40009c8c: c4 22 20 24 st %g2, [ %o0 + 0x24 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40009c90: 81 c3 e0 08 retl 40009c94: c2 22 20 2c st %g1, [ %o0 + 0x2c ] 40009c98 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 40009c98: 9d e3 bf 98 save %sp, -104, %sp /* just in case the thread really wasn't blocked here */ if ( !the_thread_queue ) { 40009c9c: 80 a6 20 00 cmp %i0, 0 40009ca0: 02 80 00 06 be 40009cb8 <_Thread_queue_Requeue+0x20> 40009ca4: 01 00 00 00 nop return; } switch ( the_thread_queue->discipline ) { 40009ca8: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 40009cac: 80 a4 20 01 cmp %l0, 1 40009cb0: 02 80 00 04 be 40009cc0 <_Thread_queue_Requeue+0x28> 40009cb4: 01 00 00 00 nop 40009cb8: 81 c7 e0 08 ret <== NOT EXECUTED 40009cbc: 81 e8 00 00 restore <== NOT EXECUTED break; case THREAD_QUEUE_DISCIPLINE_PRIORITY: { Thread_queue_Control *tq = the_thread_queue; ISR_Level level; _ISR_Disable( level ); 40009cc0: 7f ff e0 4d call 40001df4 40009cc4: 01 00 00 00 nop 40009cc8: a2 10 00 08 mov %o0, %l1 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 40009ccc: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 40009cd0: 03 00 00 ef sethi %hi(0x3bc00), %g1 40009cd4: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 40009cd8: 80 88 80 01 btst %g2, %g1 40009cdc: 12 80 00 04 bne 40009cec <_Thread_queue_Requeue+0x54> 40009ce0: 94 10 20 01 mov 1, %o2 _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, TRUE ); _Thread_queue_Enqueue_priority( tq, the_thread ); } _ISR_Enable( level ); 40009ce4: 7f ff e0 48 call 40001e04 <== NOT EXECUTED 40009ce8: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED ISR_Level level; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, TRUE ); 40009cec: 90 10 00 18 mov %i0, %o0 40009cf0: 92 10 00 19 mov %i1, %o1 40009cf4: 40 00 0f 65 call 4000da88 <_Thread_queue_Extract_priority_helper> 40009cf8: e0 26 20 30 st %l0, [ %i0 + 0x30 ] _Thread_queue_Enqueue_priority( tq, the_thread ); 40009cfc: 90 10 00 18 mov %i0, %o0 40009d00: 7f ff fe d6 call 40009858 <_Thread_queue_Enqueue_priority> 40009d04: 92 10 00 19 mov %i1, %o1 } _ISR_Enable( level ); 40009d08: 7f ff e0 3f call 40001e04 40009d0c: 91 e8 00 11 restore %g0, %l1, %o0 40009d10: 01 00 00 00 nop 40009d14 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored ) { 40009d14: 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 ) ) { 40009d18: 92 96 20 00 orcc %i0, 0, %o1 40009d1c: 12 80 00 1a bne 40009d84 <_Thread_queue_Timeout+0x70> 40009d20: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40009d24: 31 10 00 6a sethi %hi(0x4001a800), %i0 <== NOT EXECUTED 40009d28: c2 06 23 60 ld [ %i0 + 0x360 ], %g1 ! 4001ab60 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40009d2c: 82 00 60 01 inc %g1 <== NOT EXECUTED 40009d30: c2 26 23 60 st %g1, [ %i0 + 0x360 ] <== 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; 40009d34: 03 10 00 6b sethi %hi(0x4001ac00), %g1 <== NOT EXECUTED 40009d38: d2 00 60 3c ld [ %g1 + 0x3c ], %o1 ! 4001ac3c <_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; 40009d3c: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED */ static inline void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 40009d40: d0 02 60 44 ld [ %o1 + 0x44 ], %o0 * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_QUEUE_SYNCHRONIZED && 40009d44: c6 02 20 30 ld [ %o0 + 0x30 ], %g3 40009d48: 80 a0 e0 00 cmp %g3, 0 40009d4c: 02 80 00 06 be 40009d64 <_Thread_queue_Timeout+0x50> 40009d50: 03 10 00 6b sethi %hi(0x4001ac00), %g1 40009d54: c4 00 60 3c ld [ %g1 + 0x3c ], %g2 ! 4001ac3c <_Thread_Executing> <== NOT EXECUTED 40009d58: 80 a2 40 02 cmp %o1, %g2 <== NOT EXECUTED 40009d5c: 02 80 00 20 be 40009ddc <_Thread_queue_Timeout+0xc8> <== NOT EXECUTED 40009d60: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_QUEUE_SATISFIED ) the_thread_queue->sync_state = THREAD_QUEUE_TIMEOUT; } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 40009d64: c2 02 20 3c ld [ %o0 + 0x3c ], %g1 _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 40009d68: 40 00 0f 39 call 4000da4c <_Thread_queue_Extract> 40009d6c: 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; 40009d70: c2 06 23 60 ld [ %i0 + 0x360 ], %g1 40009d74: 82 00 7f ff add %g1, -1, %g1 40009d78: c2 26 23 60 st %g1, [ %i0 + 0x360 ] 40009d7c: 81 c7 e0 08 ret 40009d80: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 40009d84: 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 ) { 40009d88: 80 a0 a0 04 cmp %g2, 4 40009d8c: 18 bf ff fc bgu 40009d7c <_Thread_queue_Timeout+0x68> 40009d90: 83 32 60 1b srl %o1, 0x1b, %g1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40009d94: 80 a0 60 01 cmp %g1, 1 40009d98: 12 bf ff f9 bne 40009d7c <_Thread_queue_Timeout+0x68> 40009d9c: 83 28 a0 02 sll %g2, 2, %g1 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40009da0: 05 10 00 6a sethi %hi(0x4001a800), %g2 40009da4: 84 10 a2 c0 or %g2, 0x2c0, %g2 ! 4001aac0 <_Objects_Information_table> 40009da8: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40009dac: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 40009db0: 80 a2 20 00 cmp %o0, 0 40009db4: 02 bf ff f2 be 40009d7c <_Thread_queue_Timeout+0x68> 40009db8: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40009dbc: 7f ff f7 ee call 40007d74 <_Objects_Get> 40009dc0: 94 07 bf f4 add %fp, -12, %o2 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 40009dc4: c2 07 bf f4 ld [ %fp + -12 ], %g1 40009dc8: 80 a0 60 00 cmp %g1, 0 40009dcc: 12 bf ff ec bne 40009d7c <_Thread_queue_Timeout+0x68> 40009dd0: 92 10 00 08 mov %o0, %o1 40009dd4: 10 bf ff db b 40009d40 <_Thread_queue_Timeout+0x2c> 40009dd8: 31 10 00 6a sethi %hi(0x4001a800), %i0 * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_QUEUE_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_QUEUE_SATISFIED ) 40009ddc: 02 bf ff e5 be 40009d70 <_Thread_queue_Timeout+0x5c> <== NOT EXECUTED 40009de0: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED the_thread_queue->sync_state = THREAD_QUEUE_TIMEOUT; 40009de4: 10 bf ff e3 b 40009d70 <_Thread_queue_Timeout+0x5c> <== NOT EXECUTED 40009de8: c2 22 20 30 st %g1, [ %o0 + 0x30 ] <== NOT EXECUTED 400133dc <_Timer_Server_body>: */ Thread _Timer_Server_body( uint32_t ignored ) { 400133dc: 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; 400133e0: 03 10 00 d3 sethi %hi(0x40034c00), %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400133e4: 21 10 00 d3 sethi %hi(0x40034c00), %l0 400133e8: c6 00 62 04 ld [ %g1 + 0x204 ], %g3 _Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch; 400133ec: 05 10 00 d3 sethi %hi(0x40034c00), %g2 400133f0: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 400133f4: c8 00 a1 38 ld [ %g2 + 0x138 ], %g4 /* * Initialize the "last time" markers to indicate the timer that * the server was initiated. */ _Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot; 400133f8: 05 10 00 d2 sethi %hi(0x40034800), %g2 400133fc: 82 00 60 01 inc %g1 40013400: c6 20 a3 8c st %g3, [ %g2 + 0x38c ] 40013404: c2 24 20 80 st %g1, [ %l0 + 0x80 ] _Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch; 40013408: 05 10 00 d2 sethi %hi(0x40034800), %g2 4001340c: c8 20 a3 88 st %g4, [ %g2 + 0x388 ] ! 40034b88 <_Timer_Server_seconds_last_time> RTEMS_COMPILER_MEMORY_BARRIER(); 40013410: 03 10 00 d2 sethi %hi(0x40034800), %g1 40013414: 05 10 00 d3 sethi %hi(0x40034c00), %g2 40013418: ba 10 63 80 or %g1, 0x380, %i5 4001341c: 03 10 00 d2 sethi %hi(0x40034800), %g1 40013420: 39 10 00 d5 sethi %hi(0x40035400), %i4 /* * Block until there is something to do. */ _Thread_Set_state( _Timer_Server, STATES_DELAYING ); 40013424: b4 10 a1 7c or %g2, 0x17c, %i2 40013428: ae 10 63 94 or %g1, 0x394, %l7 4001342c: 05 10 00 d2 sethi %hi(0x40034800), %g2 40013430: 03 10 00 d3 sethi %hi(0x40034c00), %g1 40013434: a6 10 a3 9c or %g2, 0x39c, %l3 40013438: b6 10 61 70 or %g1, 0x170, %i3 4001343c: 2d 10 00 d2 sethi %hi(0x40034800), %l6 40013440: 2b 10 00 d2 sethi %hi(0x40034800), %l5 40013444: a4 10 00 1c mov %i4, %l2 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40013448: a2 10 00 10 mov %l0, %l1 4001344c: 10 80 00 18 b 400134ac <_Timer_Server_body+0xd0> 40013450: a8 10 00 13 mov %l3, %l4 _Timer_Server_reset_ticks_timer(); _Timer_Server_reset_seconds_timer(); 40013454: 80 a0 40 17 cmp %g1, %l7 40013458: 32 80 00 27 bne,a 400134f4 <_Timer_Server_body+0x118> 4001345c: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED 40013460: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 40013464: 82 00 7f ff add %g1, -1, %g1 40013468: c2 24 20 80 st %g1, [ %l0 + 0x80 ] 4001346c: c4 04 20 80 ld [ %l0 + 0x80 ], %g2 40013470: 80 a0 a0 00 cmp %g2, 0 40013474: 02 80 00 2b be 40013520 <_Timer_Server_body+0x144> 40013478: 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(); 4001347c: d0 04 a3 08 ld [ %l2 + 0x308 ], %o0 <== NOT EXECUTED 40013480: 40 00 14 3f call 4001857c <_Watchdog_Remove> 40013484: 90 02 20 48 add %o0, 0x48, %o0 _Timer_Server_stop_seconds_timer(); 40013488: 40 00 14 3d call 4001857c <_Watchdog_Remove> 4001348c: 90 10 00 14 mov %l4, %o0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40013490: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 40013494: 82 00 60 01 inc %g1 40013498: c2 24 60 80 st %g1, [ %l1 + 0x80 ] * 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(); 4001349c: 7f ff ff bf call 40013398 <_Timer_Server_process_ticks_chain> 400134a0: 01 00 00 00 nop _Timer_Server_process_seconds_chain(); 400134a4: 7f ff ff a2 call 4001332c <_Timer_Server_process_seconds_chain> 400134a8: 01 00 00 00 nop /* * Block until there is something to do. */ _Thread_Set_state( _Timer_Server, STATES_DELAYING ); 400134ac: d0 07 23 08 ld [ %i4 + 0x308 ], %o0 400134b0: 40 00 10 de call 40017828 <_Thread_Set_state> 400134b4: 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)); 400134b8: c2 05 a3 7c ld [ %l6 + 0x37c ], %g1 _Timer_Server_reset_ticks_timer(); 400134bc: 80 a0 40 1d cmp %g1, %i5 400134c0: 22 bf ff e5 be,a 40013454 <_Timer_Server_body+0x78> 400134c4: c2 05 63 90 ld [ %l5 + 0x390 ], %g1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 400134c8: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 400134cc: d2 04 a3 08 ld [ %l2 + 0x308 ], %o1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400134d0: 90 10 00 1a mov %i2, %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 400134d4: c2 22 60 54 st %g1, [ %o1 + 0x54 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400134d8: 40 00 13 bf call 400183d4 <_Watchdog_Insert> 400134dc: 92 02 60 48 add %o1, 0x48, %o1 400134e0: c2 05 63 90 ld [ %l5 + 0x390 ], %g1 _Timer_Server_reset_seconds_timer(); 400134e4: 80 a0 40 17 cmp %g1, %l7 400134e8: 02 bf ff de be 40013460 <_Timer_Server_body+0x84> 400134ec: 01 00 00 00 nop Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 400134f0: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 400134f4: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 400134f8: c2 24 e0 0c st %g1, [ %l3 + 0xc ] <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 400134fc: 40 00 13 b6 call 400183d4 <_Watchdog_Insert> <== NOT EXECUTED 40013500: 92 10 00 13 mov %l3, %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 ) 40013504: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 <== NOT EXECUTED 40013508: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4001350c: c2 24 20 80 st %g1, [ %l0 + 0x80 ] <== NOT EXECUTED 40013510: c4 04 20 80 ld [ %l0 + 0x80 ], %g2 <== NOT EXECUTED 40013514: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40013518: 32 bf ff da bne,a 40013480 <_Timer_Server_body+0xa4> <== NOT EXECUTED 4001351c: d0 04 a3 08 ld [ %l2 + 0x308 ], %o0 <== NOT EXECUTED _Thread_Dispatch(); 40013520: 40 00 0d 4f call 40016a5c <_Thread_Dispatch> 40013524: 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(); 40013528: 10 bf ff d6 b 40013480 <_Timer_Server_body+0xa4> 4001352c: d0 04 a3 08 ld [ %l2 + 0x308 ], %o0 40013398 <_Timer_Server_process_ticks_chain>: void _Timer_Server_process_ticks_chain(void) { Watchdog_Interval snapshot; Watchdog_Interval ticks; snapshot = _Watchdog_Ticks_since_boot; 40013398: 03 10 00 d3 sethi %hi(0x40034c00), %g1 if ( snapshot >= _Timer_Server_ticks_last_time ) 4001339c: 07 10 00 d2 sethi %hi(0x40034800), %g3 void _Timer_Server_process_ticks_chain(void) { Watchdog_Interval snapshot; Watchdog_Interval ticks; snapshot = _Watchdog_Ticks_since_boot; 400133a0: c4 00 62 04 ld [ %g1 + 0x204 ], %g2 if ( snapshot >= _Timer_Server_ticks_last_time ) 400133a4: c2 00 e3 8c ld [ %g3 + 0x38c ], %g1 400133a8: 80 a0 80 01 cmp %g2, %g1 400133ac: 1a 80 00 04 bcc 400133bc <_Timer_Server_process_ticks_chain+0x24> 400133b0: 94 20 80 01 sub %g2, %g1, %o2 ticks = snapshot - _Timer_Server_ticks_last_time; else ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot; 400133b4: 82 38 00 01 xnor %g0, %g1, %g1 <== NOT EXECUTED 400133b8: 94 00 40 02 add %g1, %g2, %o2 <== NOT EXECUTED _Timer_Server_ticks_last_time = snapshot; _Watchdog_Adjust( &_Timer_Ticks_chain, WATCHDOG_FORWARD, ticks ); 400133bc: 11 10 00 d2 sethi %hi(0x40034800), %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; 400133c0: c4 20 e3 8c st %g2, [ %g3 + 0x38c ] _Watchdog_Adjust( &_Timer_Ticks_chain, WATCHDOG_FORWARD, ticks ); 400133c4: 90 12 23 7c or %o0, 0x37c, %o0 400133c8: 92 10 20 00 clr %o1 400133cc: 82 13 c0 00 mov %o7, %g1 400133d0: 40 00 13 d0 call 40018310 <_Watchdog_Adjust> 400133d4: 9e 10 40 00 mov %g1, %o7 400133d8: 01 00 00 00 nop 4000c1ac <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 4000c1ac: 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; 4000c1b0: 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; 4000c1b4: de 06 20 04 ld [ %i0 + 4 ], %o7 right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4000c1b8: 96 10 00 01 mov %g1, %o3 4000c1bc: 95 38 60 1f sra %g1, 0x1f, %o2 4000c1c0: 83 30 60 1d srl %g1, 0x1d, %g1 4000c1c4: 9b 2a e0 03 sll %o3, 3, %o5 4000c1c8: 99 2a a0 03 sll %o2, 3, %o4 4000c1cc: 98 10 40 0c or %g1, %o4, %o4 4000c1d0: 83 33 60 1b srl %o5, 0x1b, %g1 4000c1d4: 85 2b 20 05 sll %o4, 5, %g2 4000c1d8: 87 2b 60 05 sll %o5, 5, %g3 4000c1dc: 84 10 40 02 or %g1, %g2, %g2 4000c1e0: 86 a0 c0 0d subcc %g3, %o5, %g3 4000c1e4: 83 30 e0 1a srl %g3, 0x1a, %g1 4000c1e8: 84 60 80 0c subx %g2, %o4, %g2 4000c1ec: 9b 28 e0 06 sll %g3, 6, %o5 4000c1f0: 99 28 a0 06 sll %g2, 6, %o4 4000c1f4: 9a a3 40 03 subcc %o5, %g3, %o5 4000c1f8: 98 10 40 0c or %g1, %o4, %o4 4000c1fc: 98 63 00 02 subx %o4, %g2, %o4 4000c200: 9a 83 40 0b addcc %o5, %o3, %o5 4000c204: 83 33 60 1e srl %o5, 0x1e, %g1 4000c208: 98 43 00 0a addx %o4, %o2, %o4 4000c20c: 87 2b 60 02 sll %o5, 2, %g3 4000c210: 85 2b 20 02 sll %o4, 2, %g2 4000c214: 9a 83 40 03 addcc %o5, %g3, %o5 4000c218: 84 10 40 02 or %g1, %g2, %g2 4000c21c: 83 33 60 1e srl %o5, 0x1e, %g1 4000c220: 98 43 00 02 addx %o4, %g2, %o4 4000c224: 87 2b 60 02 sll %o5, 2, %g3 4000c228: 85 2b 20 02 sll %o4, 2, %g2 4000c22c: 9a 83 40 03 addcc %o5, %g3, %o5 4000c230: 84 10 40 02 or %g1, %g2, %g2 4000c234: 83 33 60 1e srl %o5, 0x1e, %g1 4000c238: 98 43 00 02 addx %o4, %g2, %o4 4000c23c: 85 2b 20 02 sll %o4, 2, %g2 4000c240: 84 10 40 02 or %g1, %g2, %g2 right += rhs->tv_nsec; 4000c244: 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; 4000c248: 87 2b 60 02 sll %o5, 2, %g3 4000c24c: 9a 83 40 03 addcc %o5, %g3, %o5 right += rhs->tv_nsec; 4000c250: 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; 4000c254: 98 43 00 02 addx %o4, %g2, %o4 4000c258: 89 33 60 17 srl %o5, 0x17, %g4 4000c25c: 85 2b 20 09 sll %o4, 9, %g2 4000c260: 87 2b 60 09 sll %o5, 9, %g3 4000c264: 84 11 00 02 or %g4, %g2, %g2 right += rhs->tv_nsec; 4000c268: 96 80 c0 01 addcc %g3, %g1, %o3 4000c26c: 94 40 80 0a addx %g2, %o2, %o2 if ( right == 0 ) { 4000c270: 80 92 80 0b orcc %o2, %o3, %g0 4000c274: 12 80 00 06 bne 4000c28c <_Timespec_Divide+0xe0> 4000c278: f0 06 00 00 ld [ %i0 ], %i0 *ival_percentage = 0; 4000c27c: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED *fval_percentage = 0; 4000c280: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED 4000c284: 81 c7 e0 08 ret <== NOT EXECUTED 4000c288: 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; 4000c28c: 83 36 20 1d srl %i0, 0x1d, %g1 4000c290: 9b 2e 20 03 sll %i0, 3, %o5 4000c294: 91 3e 20 1f sra %i0, 0x1f, %o0 4000c298: 99 2a 20 03 sll %o0, 3, %o4 4000c29c: 98 10 40 0c or %g1, %o4, %o4 4000c2a0: 83 33 60 1b srl %o5, 0x1b, %g1 4000c2a4: 85 2b 20 05 sll %o4, 5, %g2 4000c2a8: 87 2b 60 05 sll %o5, 5, %g3 4000c2ac: 84 10 40 02 or %g1, %g2, %g2 4000c2b0: 86 a0 c0 0d subcc %g3, %o5, %g3 4000c2b4: 83 30 e0 1a srl %g3, 0x1a, %g1 4000c2b8: 84 60 80 0c subx %g2, %o4, %g2 4000c2bc: 9b 28 e0 06 sll %g3, 6, %o5 4000c2c0: 99 28 a0 06 sll %g2, 6, %o4 4000c2c4: 9a a3 40 03 subcc %o5, %g3, %o5 4000c2c8: 98 10 40 0c or %g1, %o4, %o4 4000c2cc: 98 63 00 02 subx %o4, %g2, %o4 4000c2d0: 9a 83 40 18 addcc %o5, %i0, %o5 4000c2d4: 83 33 60 1e srl %o5, 0x1e, %g1 4000c2d8: 98 43 00 08 addx %o4, %o0, %o4 4000c2dc: 87 2b 60 02 sll %o5, 2, %g3 4000c2e0: 85 2b 20 02 sll %o4, 2, %g2 4000c2e4: 9a 83 40 03 addcc %o5, %g3, %o5 4000c2e8: 84 10 40 02 or %g1, %g2, %g2 4000c2ec: 83 33 60 1e srl %o5, 0x1e, %g1 4000c2f0: 98 43 00 02 addx %o4, %g2, %o4 4000c2f4: 87 2b 60 02 sll %o5, 2, %g3 4000c2f8: 85 2b 20 02 sll %o4, 2, %g2 4000c2fc: 9a 83 40 03 addcc %o5, %g3, %o5 4000c300: 84 10 40 02 or %g1, %g2, %g2 4000c304: 83 33 60 1e srl %o5, 0x1e, %g1 4000c308: 98 43 00 02 addx %o4, %g2, %o4 4000c30c: 87 2b 60 02 sll %o5, 2, %g3 4000c310: 85 2b 20 02 sll %o4, 2, %g2 4000c314: 9a 83 40 03 addcc %o5, %g3, %o5 4000c318: 84 10 40 02 or %g1, %g2, %g2 4000c31c: 83 33 60 17 srl %o5, 0x17, %g1 4000c320: 98 43 00 02 addx %o4, %g2, %o4 4000c324: 93 2b 60 09 sll %o5, 9, %o1 4000c328: 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; 4000c32c: 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; 4000c330: 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; 4000c334: 83 32 60 1e srl %o1, 0x1e, %g1 4000c338: a1 3b e0 1f sra %o7, 0x1f, %l0 4000c33c: 87 2a 60 02 sll %o1, 2, %g3 4000c340: 90 42 00 10 addx %o0, %l0, %o0 4000c344: 85 2a 20 02 sll %o0, 2, %g2 4000c348: 84 10 40 02 or %g1, %g2, %g2 4000c34c: 83 30 e0 1b srl %g3, 0x1b, %g1 4000c350: 99 28 a0 05 sll %g2, 5, %o4 4000c354: 9b 28 e0 05 sll %g3, 5, %o5 4000c358: 98 10 40 0c or %g1, %o4, %o4 4000c35c: 9a a3 40 03 subcc %o5, %g3, %o5 4000c360: 98 63 00 02 subx %o4, %g2, %o4 4000c364: 9a 83 40 09 addcc %o5, %o1, %o5 4000c368: 83 33 60 1e srl %o5, 0x1e, %g1 4000c36c: 98 43 00 08 addx %o4, %o0, %o4 4000c370: 87 2b 60 02 sll %o5, 2, %g3 4000c374: 85 2b 20 02 sll %o4, 2, %g2 4000c378: 9a 83 40 03 addcc %o5, %g3, %o5 4000c37c: 84 10 40 02 or %g1, %g2, %g2 4000c380: 83 33 60 1e srl %o5, 0x1e, %g1 4000c384: 87 2b 60 02 sll %o5, 2, %g3 4000c388: 98 43 00 02 addx %o4, %g2, %o4 4000c38c: 9a 83 40 03 addcc %o5, %g3, %o5 4000c390: 85 2b 20 02 sll %o4, 2, %g2 4000c394: 84 10 40 02 or %g1, %g2, %g2 4000c398: 83 33 60 1b srl %o5, 0x1b, %g1 4000c39c: 98 43 00 02 addx %o4, %g2, %o4 4000c3a0: 93 2b 60 05 sll %o5, 5, %o1 4000c3a4: 91 2b 20 05 sll %o4, 5, %o0 4000c3a8: 40 00 36 56 call 40019d00 <__udivdi3> 4000c3ac: 90 10 40 08 or %g1, %o0, %o0 *ival_percentage = answer / 1000; 4000c3b0: 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; 4000c3b4: a0 10 00 08 mov %o0, %l0 4000c3b8: a2 10 00 09 mov %o1, %l1 *ival_percentage = answer / 1000; 4000c3bc: 96 10 23 e8 mov 0x3e8, %o3 4000c3c0: 40 00 36 50 call 40019d00 <__udivdi3> 4000c3c4: 90 10 00 10 mov %l0, %o0 *fval_percentage = answer % 1000; 4000c3c8: 90 10 00 10 mov %l0, %o0 * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; *ival_percentage = answer / 1000; 4000c3cc: d2 26 80 00 st %o1, [ %i2 ] *fval_percentage = answer % 1000; 4000c3d0: 94 10 20 00 clr %o2 4000c3d4: 92 10 00 11 mov %l1, %o1 4000c3d8: 40 00 37 29 call 4001a07c <__umoddi3> 4000c3dc: 96 10 23 e8 mov 0x3e8, %o3 4000c3e0: d2 26 c0 00 st %o1, [ %i3 ] 4000c3e4: 81 c7 e0 08 ret 4000c3e8: 81 e8 00 00 restore 4000a4c8 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, boolean is_internal, uint32_t the_error ) { 4000a4c8: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 4000a4cc: 03 10 00 6b sethi %hi(0x4001ac00), %g1 4000a4d0: 82 10 61 e4 or %g1, 0x1e4, %g1 ! 4001ade4 <_User_extensions_List> 4000a4d4: e0 00 60 08 ld [ %g1 + 8 ], %l0 !_Chain_Is_head( &_User_extensions_List, the_node ) ; 4000a4d8: 80 a4 00 01 cmp %l0, %g1 4000a4dc: 02 80 00 0d be 4000a510 <_User_extensions_Fatal+0x48> 4000a4e0: a2 10 00 01 mov %g1, %l1 the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) 4000a4e4: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 4000a4e8: 80 a0 60 00 cmp %g1, 0 4000a4ec: 02 80 00 05 be 4000a500 <_User_extensions_Fatal+0x38> 4000a4f0: 90 10 00 18 mov %i0, %o0 (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 4000a4f4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000a4f8: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000a4fc: 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 ) { 4000a500: 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 ) ; 4000a504: 80 a4 00 11 cmp %l0, %l1 4000a508: 32 bf ff f8 bne,a 4000a4e8 <_User_extensions_Fatal+0x20> 4000a50c: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 4000a510: 81 c7 e0 08 ret 4000a514: 81 e8 00 00 restore 40011770 <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 40011770: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED _Chain_Extract( &the_extension->Node ); 40011774: 40 00 14 87 call 40016990 <_Chain_Extract> <== NOT EXECUTED 40011778: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 4001177c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 40011780: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40011784: 02 80 00 04 be 40011794 <_User_extensions_Remove_set+0x24> <== NOT EXECUTED 40011788: 01 00 00 00 nop <== NOT EXECUTED _Chain_Extract( &the_extension->Switch.Node ); 4001178c: 40 00 14 81 call 40016990 <_Chain_Extract> <== NOT EXECUTED 40011790: 91 ee 20 08 restore %i0, 8, %o0 <== NOT EXECUTED 40011794: 81 c7 e0 08 ret <== NOT EXECUTED 40011798: 81 e8 00 00 restore <== NOT EXECUTED 4000a564 <_User_extensions_Thread_create>: */ boolean _User_extensions_Thread_create ( Thread_Control *the_thread ) { 4000a564: 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 ; 4000a568: 03 10 00 6b sethi %hi(0x4001ac00), %g1 4000a56c: e0 00 61 e4 ld [ %g1 + 0x1e4 ], %l0 ! 4001ade4 <_User_extensions_List> 4000a570: 82 10 61 e4 or %g1, 0x1e4, %g1 4000a574: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 4000a578: 80 a4 00 11 cmp %l0, %l1 4000a57c: 02 80 00 0f be 4000a5b8 <_User_extensions_Thread_create+0x54> 4000a580: 25 10 00 6b sethi %hi(0x4001ac00), %l2 the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { 4000a584: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 4000a588: 80 a0 60 00 cmp %g1, 0 4000a58c: 02 80 00 07 be 4000a5a8 <_User_extensions_Thread_create+0x44> 4000a590: 92 10 00 18 mov %i0, %o1 status = (*the_extension->Callouts.thread_create)( 4000a594: 9f c0 40 00 call %g1 4000a598: d0 04 a0 3c ld [ %l2 + 0x3c ], %o0 _Thread_Executing, the_thread ); if ( !status ) 4000a59c: 80 a2 20 00 cmp %o0, 0 4000a5a0: 02 80 00 08 be 4000a5c0 <_User_extensions_Thread_create+0x5c> 4000a5a4: 01 00 00 00 nop 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 ) { 4000a5a8: 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 ) ; 4000a5ac: 80 a4 00 11 cmp %l0, %l1 4000a5b0: 32 bf ff f6 bne,a 4000a588 <_User_extensions_Thread_create+0x24> 4000a5b4: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 return FALSE; } } return TRUE; } 4000a5b8: 81 c7 e0 08 ret 4000a5bc: 91 e8 20 01 restore %g0, 1, %o0 if ( the_extension->Callouts.thread_create != NULL ) { status = (*the_extension->Callouts.thread_create)( _Thread_Executing, the_thread ); if ( !status ) 4000a5c0: 81 c7 e0 08 ret <== NOT EXECUTED 4000a5c4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000a6b0 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 4000a6b0: 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; 4000a6b4: 03 10 00 6b sethi %hi(0x4001ac00), %g1 void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 4000a6b8: ac 10 00 18 mov %i0, %l6 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 4000a6bc: e6 00 60 24 ld [ %g1 + 0x24 ], %l3 _ISR_Disable( level ); 4000a6c0: 7f ff dd cd call 40001df4 4000a6c4: 01 00 00 00 nop 4000a6c8: 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 ) { 4000a6cc: c2 06 60 08 ld [ %i1 + 8 ], %g1 4000a6d0: 80 a0 60 00 cmp %g1, 0 4000a6d4: 12 80 00 49 bne 4000a7f8 <_Watchdog_Insert+0x148> 4000a6d8: 01 00 00 00 nop _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 4000a6dc: 2b 10 00 6b sethi %hi(0x4001ac00), %l5 4000a6e0: c2 05 60 e0 ld [ %l5 + 0xe0 ], %g1 ! 4001ace0 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 4000a6e4: 84 10 20 01 mov 1, %g2 _Watchdog_Sync_count++; 4000a6e8: 82 00 60 01 inc %g1 4000a6ec: 29 10 00 6b sethi %hi(0x4001ac00), %l4 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 4000a6f0: c4 26 60 08 st %g2, [ %i1 + 8 ] _Watchdog_Sync_count++; 4000a6f4: c2 25 60 e0 st %g1, [ %l5 + 0xe0 ] if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 4000a6f8: ae 10 00 14 mov %l4, %l7 the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 4000a6fc: 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 ; 4000a700: e2 05 80 00 ld [ %l6 ], %l1 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 4000a704: 80 a4 a0 00 cmp %l2, 0 4000a708: 02 80 00 2b be 4000a7b4 <_Watchdog_Insert+0x104> 4000a70c: 03 10 00 6b sethi %hi(0x4001ac00), %g1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 4000a710: c2 04 40 00 ld [ %l1 ], %g1 4000a714: 80 a0 60 00 cmp %g1, 0 4000a718: 02 80 00 27 be 4000a7b4 <_Watchdog_Insert+0x104> 4000a71c: 03 10 00 6b sethi %hi(0x4001ac00), %g1 break; if ( delta_interval < after->delta_interval ) { 4000a720: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 4000a724: 80 a4 80 10 cmp %l2, %l0 4000a728: 1a 80 00 13 bcc 4000a774 <_Watchdog_Insert+0xc4> 4000a72c: 01 00 00 00 nop after->delta_interval -= delta_interval; 4000a730: 10 80 00 1f b 4000a7ac <_Watchdog_Insert+0xfc> 4000a734: a0 24 00 12 sub %l0, %l2, %l0 if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 4000a738: c2 05 20 38 ld [ %l4 + 0x38 ], %g1 4000a73c: 80 a4 c0 01 cmp %l3, %g1 4000a740: 0a 80 00 30 bcs 4000a800 <_Watchdog_Insert+0x150> 4000a744: 01 00 00 00 nop */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 4000a748: a4 a4 80 10 subcc %l2, %l0, %l2 4000a74c: 02 80 00 19 be 4000a7b0 <_Watchdog_Insert+0x100> 4000a750: e2 04 40 00 ld [ %l1 ], %l1 4000a754: c2 04 40 00 ld [ %l1 ], %g1 4000a758: 80 a0 60 00 cmp %g1, 0 4000a75c: 02 80 00 16 be 4000a7b4 <_Watchdog_Insert+0x104> 4000a760: 03 10 00 6b sethi %hi(0x4001ac00), %g1 break; if ( delta_interval < after->delta_interval ) { 4000a764: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 4000a768: 80 a4 00 12 cmp %l0, %l2 4000a76c: 38 80 00 10 bgu,a 4000a7ac <_Watchdog_Insert+0xfc> 4000a770: a0 24 00 12 sub %l0, %l2, %l0 * 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 ); 4000a774: 7f ff dd a4 call 40001e04 4000a778: 90 10 00 18 mov %i0, %o0 4000a77c: 7f ff dd 9e call 40001df4 4000a780: 01 00 00 00 nop if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 4000a784: c2 06 60 08 ld [ %i1 + 8 ], %g1 4000a788: 80 a0 60 01 cmp %g1, 1 4000a78c: 02 bf ff eb be 4000a738 <_Watchdog_Insert+0x88> 4000a790: 01 00 00 00 nop _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 4000a794: e6 25 20 38 st %l3, [ %l4 + 0x38 ] <== NOT EXECUTED _Watchdog_Sync_count--; 4000a798: c2 05 60 e0 ld [ %l5 + 0xe0 ], %g1 <== NOT EXECUTED 4000a79c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000a7a0: c2 25 60 e0 st %g1, [ %l5 + 0xe0 ] <== NOT EXECUTED _ISR_Enable( level ); 4000a7a4: 7f ff dd 98 call 40001e04 <== NOT EXECUTED 4000a7a8: 81 e8 00 00 restore <== NOT EXECUTED if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 4000a7ac: e0 24 60 10 st %l0, [ %l1 + 0x10 ] the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; 4000a7b0: 03 10 00 6b sethi %hi(0x4001ac00), %g1 4000a7b4: c6 00 60 e4 ld [ %g1 + 0xe4 ], %g3 ! 4001ace4 <_Watchdog_Ticks_since_boot> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 4000a7b8: c4 04 60 04 ld [ %l1 + 4 ], %g2 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 4000a7bc: c6 26 60 14 st %g3, [ %i1 + 0x14 ] } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 4000a7c0: e4 26 60 10 st %l2, [ %i1 + 0x10 ] RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 4000a7c4: 82 10 20 02 mov 2, %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 4000a7c8: c8 00 80 00 ld [ %g2 ], %g4 _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 4000a7cc: e6 25 20 38 st %l3, [ %l4 + 0x38 ] 4000a7d0: c2 26 60 08 st %g1, [ %i1 + 8 ] _Watchdog_Sync_count--; 4000a7d4: c2 05 60 e0 ld [ %l5 + 0xe0 ], %g1 after_node->next = the_node; 4000a7d8: f2 20 80 00 st %i1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 4000a7dc: c4 26 60 04 st %g2, [ %i1 + 4 ] 4000a7e0: 82 00 7f ff add %g1, -1, %g1 before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; 4000a7e4: f2 21 20 04 st %i1, [ %g4 + 4 ] Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 4000a7e8: c8 26 40 00 st %g4, [ %i1 ] 4000a7ec: c2 25 60 e0 st %g1, [ %l5 + 0xe0 ] _ISR_Enable( level ); 4000a7f0: 7f ff dd 85 call 40001e04 4000a7f4: 81 e8 00 00 restore * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 4000a7f8: 7f ff dd 83 call 40001e04 <== NOT EXECUTED 4000a7fc: 81 e8 00 00 restore <== NOT EXECUTED if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; 4000a800: e6 25 e0 38 st %l3, [ %l7 + 0x38 ] the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 4000a804: 10 bf ff bf b 4000a700 <_Watchdog_Insert+0x50> 4000a808: e4 06 60 0c ld [ %i1 + 0xc ], %l2 4000b628 <_Watchdog_Insert_ticks_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { 4000b628: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; (void) _Watchdog_Remove( timer ); 4000b62c: 40 00 18 b1 call 400118f0 <_Watchdog_Remove> 4000b630: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 4000b634: 7f ff ec 96 call 4000688c 4000b638: 01 00 00 00 nop 4000b63c: 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 ) { 4000b640: c2 06 20 08 ld [ %i0 + 8 ], %g1 4000b644: 80 a0 60 00 cmp %g1, 0 4000b648: 22 80 00 06 be,a 4000b660 <_Watchdog_Insert_ticks_helper+0x38> 4000b64c: f6 26 20 1c st %i3, [ %i0 + 0x1c ] _ISR_Enable( level ); 4000b650: 7f ff ec 93 call 4000689c <== NOT EXECUTED 4000b654: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000b658: 81 c7 e0 08 ret <== NOT EXECUTED 4000b65c: 81 e8 00 00 restore <== NOT EXECUTED void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 4000b660: f4 26 20 20 st %i2, [ %i0 + 0x20 ] the_watchdog->user_data = user_data; 4000b664: f8 26 20 24 st %i4, [ %i0 + 0x24 ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000b668: f2 26 20 0c st %i1, [ %i0 + 0xc ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4000b66c: c0 26 20 08 clr [ %i0 + 8 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4000b670: 92 10 00 18 mov %i0, %o1 4000b674: 11 10 00 98 sethi %hi(0x40026000), %o0 4000b678: 40 00 18 34 call 40011748 <_Watchdog_Insert> 4000b67c: 90 12 20 fc or %o0, 0xfc, %o0 ! 400260fc <_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 ); 4000b680: b0 10 20 01 mov 1, %i0 4000b684: 7f ff ec 86 call 4000689c 4000b688: 90 10 00 10 mov %l0, %o0 return TRUE; } 4000b68c: 81 c7 e0 08 ret 4000b690: 81 e8 00 00 restore 4000a858 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 4000a858: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 4000a85c: 7f ff dd 66 call 40001df4 4000a860: a0 10 00 18 mov %i0, %l0 previous_state = the_watchdog->state; 4000a864: f0 06 20 08 ld [ %i0 + 8 ], %i0 switch ( previous_state ) { 4000a868: 80 a6 20 01 cmp %i0, 1 4000a86c: 02 80 00 2a be 4000a914 <_Watchdog_Remove+0xbc> 4000a870: 03 10 00 6b sethi %hi(0x4001ac00), %g1 4000a874: 1a 80 00 09 bcc 4000a898 <_Watchdog_Remove+0x40> 4000a878: 80 a6 20 03 cmp %i0, 3 _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4000a87c: 03 10 00 6b sethi %hi(0x4001ac00), %g1 4000a880: c4 00 60 e4 ld [ %g1 + 0xe4 ], %g2 ! 4001ace4 <_Watchdog_Ticks_since_boot> 4000a884: c4 24 20 18 st %g2, [ %l0 + 0x18 ] _ISR_Enable( level ); 4000a888: 7f ff dd 5f call 40001e04 4000a88c: 01 00 00 00 nop return( previous_state ); } 4000a890: 81 c7 e0 08 ret 4000a894: 81 e8 00 00 restore Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 4000a898: 18 bf ff fa bgu 4000a880 <_Watchdog_Remove+0x28> 4000a89c: 03 10 00 6b sethi %hi(0x4001ac00), %g1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 4000a8a0: c8 04 00 00 ld [ %l0 ], %g4 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 4000a8a4: c0 24 20 08 clr [ %l0 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 4000a8a8: c2 01 00 00 ld [ %g4 ], %g1 4000a8ac: 80 a0 60 00 cmp %g1, 0 4000a8b0: 02 80 00 07 be 4000a8cc <_Watchdog_Remove+0x74> 4000a8b4: 03 10 00 6b sethi %hi(0x4001ac00), %g1 next_watchdog->delta_interval += the_watchdog->delta_interval; 4000a8b8: c2 01 20 10 ld [ %g4 + 0x10 ], %g1 4000a8bc: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 4000a8c0: 82 00 40 02 add %g1, %g2, %g1 4000a8c4: c2 21 20 10 st %g1, [ %g4 + 0x10 ] if ( _Watchdog_Sync_count ) 4000a8c8: 03 10 00 6b sethi %hi(0x4001ac00), %g1 4000a8cc: c4 00 60 e0 ld [ %g1 + 0xe0 ], %g2 ! 4001ace0 <_Watchdog_Sync_count> 4000a8d0: 80 a0 a0 00 cmp %g2, 0 4000a8d4: 22 80 00 07 be,a 4000a8f0 <_Watchdog_Remove+0x98> 4000a8d8: c2 04 20 04 ld [ %l0 + 4 ], %g1 _Watchdog_Sync_level = _ISR_Nest_level; 4000a8dc: 03 10 00 6b sethi %hi(0x4001ac00), %g1 <== NOT EXECUTED 4000a8e0: c6 00 60 24 ld [ %g1 + 0x24 ], %g3 ! 4001ac24 <_ISR_Nest_level> <== NOT EXECUTED 4000a8e4: 05 10 00 6b sethi %hi(0x4001ac00), %g2 <== NOT EXECUTED 4000a8e8: c6 20 a0 38 st %g3, [ %g2 + 0x38 ] ! 4001ac38 <_Watchdog_Sync_level> <== NOT EXECUTED { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4000a8ec: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED next->previous = previous; previous->next = next; 4000a8f0: c8 20 40 00 st %g4, [ %g1 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000a8f4: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4000a8f8: 03 10 00 6b sethi %hi(0x4001ac00), %g1 4000a8fc: c4 00 60 e4 ld [ %g1 + 0xe4 ], %g2 ! 4001ace4 <_Watchdog_Ticks_since_boot> 4000a900: c4 24 20 18 st %g2, [ %l0 + 0x18 ] _ISR_Enable( level ); 4000a904: 7f ff dd 40 call 40001e04 4000a908: 01 00 00 00 nop return( previous_state ); } 4000a90c: 81 c7 e0 08 ret 4000a910: 81 e8 00 00 restore _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4000a914: c4 00 60 e4 ld [ %g1 + 0xe4 ], %g2 <== NOT EXECUTED /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; 4000a918: c0 24 20 08 clr [ %l0 + 8 ] <== NOT EXECUTED _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4000a91c: c4 24 20 18 st %g2, [ %l0 + 0x18 ] <== NOT EXECUTED _ISR_Enable( level ); 4000a920: 7f ff dd 39 call 40001e04 <== NOT EXECUTED 4000a924: 01 00 00 00 nop <== NOT EXECUTED return( previous_state ); } 4000a928: 81 c7 e0 08 ret <== NOT EXECUTED 4000a92c: 81 e8 00 00 restore <== NOT EXECUTED 4000a9dc <_Workspace_Allocate_or_fatal_error>: */ void *_Workspace_Allocate_or_fatal_error( size_t size ) { 4000a9dc: 9d e3 bf 98 save %sp, -104, %sp RTEMS_INLINE_ROUTINE void *_Workspace_Allocate( size_t size ) { return _Heap_Allocate( &_Workspace_Area, size ); 4000a9e0: 11 10 00 6a sethi %hi(0x4001a800), %o0 4000a9e4: 92 10 00 18 mov %i0, %o1 4000a9e8: 7f ff f2 33 call 400072b4 <_Heap_Allocate> 4000a9ec: 90 12 23 ac or %o0, 0x3ac, %o0 void *memory; memory = _Workspace_Allocate( size ); if ( memory == NULL ) 4000a9f0: b0 92 20 00 orcc %o0, 0, %i0 4000a9f4: 12 80 00 04 bne 4000aa04 <_Workspace_Allocate_or_fatal_error+0x28> 4000a9f8: 92 10 20 01 mov 1, %o1 _Internal_error_Occurred( 4000a9fc: 7f ff f3 60 call 4000777c <_Internal_error_Occurred> <== NOT EXECUTED 4000aa00: 94 10 20 04 mov 4, %o2 <== NOT EXECUTED TRUE, INTERNAL_ERROR_WORKSPACE_ALLOCATION ); return memory; } 4000aa04: 81 c7 e0 08 ret 4000aa08: 81 e8 00 00 restore 4000aa0c <_Workspace_Handler_initialization>: void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 4000aa0c: 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 ) ) 4000aa10: 80 a6 20 00 cmp %i0, 0 4000aa14: 02 80 00 1d be 4000aa88 <_Workspace_Handler_initialization+0x7c> 4000aa18: 80 8e 20 07 btst 7, %i0 4000aa1c: 12 80 00 1c bne 4000aa8c <_Workspace_Handler_initialization+0x80> 4000aa20: 90 10 20 00 clr %o0 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _CPU_Table.do_zero_of_workspace ) { 4000aa24: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000aa28: c4 00 63 84 ld [ %g1 + 0x384 ], %g2 ! 4001ab84 <_CPU_Table+0x10> 4000aa2c: 80 a0 a0 00 cmp %g2, 0 4000aa30: 02 80 00 0c be 4000aa60 <_Workspace_Handler_initialization+0x54> 4000aa34: 92 10 00 18 mov %i0, %o1 for( zero_out_array = (uint32_t *) starting_address, index = 0 ; index < size / sizeof( uint32_t ) ; 4000aa38: 87 36 60 02 srl %i1, 2, %g3 <== NOT EXECUTED 4000aa3c: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 4000aa40: 02 80 00 08 be 4000aa60 <_Workspace_Handler_initialization+0x54> <== NOT EXECUTED 4000aa44: 84 10 20 00 clr %g2 <== NOT EXECUTED index++ ) zero_out_array[ index ] = 0; 4000aa48: 83 28 a0 02 sll %g2, 2, %g1 <== NOT EXECUTED ); if ( _CPU_Table.do_zero_of_workspace ) { for( zero_out_array = (uint32_t *) starting_address, index = 0 ; index < size / sizeof( uint32_t ) ; index++ ) 4000aa4c: 84 00 a0 01 inc %g2 <== 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 ) ; 4000aa50: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED 4000aa54: 12 bf ff fd bne 4000aa48 <_Workspace_Handler_initialization+0x3c> <== NOT EXECUTED 4000aa58: c0 20 40 18 clr [ %g1 + %i0 ] <== NOT EXECUTED index++ ) zero_out_array[ index ] = 0; } memory_available = _Heap_Initialize( 4000aa5c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000aa60: 94 10 00 19 mov %i1, %o2 4000aa64: 11 10 00 6a sethi %hi(0x4001a800), %o0 4000aa68: 96 10 20 08 mov 8, %o3 4000aa6c: 7f ff f2 f7 call 40007648 <_Heap_Initialize> 4000aa70: 90 12 23 ac or %o0, 0x3ac, %o0 starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 4000aa74: 80 a2 20 00 cmp %o0, 0 4000aa78: 02 80 00 0a be 4000aaa0 <_Workspace_Handler_initialization+0x94> 4000aa7c: b0 10 20 00 clr %i0 4000aa80: 81 c7 e0 08 ret 4000aa84: 81 e8 00 00 restore uint32_t *zero_out_array; uint32_t index; uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) _Internal_error_Occurred( 4000aa88: 90 10 20 00 clr %o0 <== NOT EXECUTED 4000aa8c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000aa90: 7f ff f3 3b call 4000777c <_Internal_error_Occurred> <== NOT EXECUTED 4000aa94: 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 ) { 4000aa98: 10 bf ff e4 b 4000aa28 <_Workspace_Handler_initialization+0x1c> <== NOT EXECUTED 4000aa9c: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 4000aaa0: b2 10 20 01 mov 1, %i1 <== NOT EXECUTED 4000aaa4: 7f ff f3 36 call 4000777c <_Internal_error_Occurred> <== NOT EXECUTED 4000aaa8: 95 e8 20 03 restore %g0, 3, %o2 <== NOT EXECUTED 4000aaac: 01 00 00 00 nop 400183b4 <_exit>: #include #if !defined(RTEMS_UNIX) void _exit(int status) { 400183b4: 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(); 400183b8: 7f ff ff e4 call 40018348 400183bc: 01 00 00 00 nop rtems_shutdown_executive(status); 400183c0: 40 00 00 4c call 400184f0 400183c4: 90 10 00 18 mov %i0, %o0 400183c8: 30 80 00 00 b,a 400183c8 <_exit+0x14> <== NOT EXECUTED 40023e5c <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 40023e5c: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40023e60: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40023e64: 94 10 00 0b mov %o3, %o2 <== NOT EXECUTED 40023e68: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40023e6c: 7f ff ff 6f call 40023c28 <== NOT EXECUTED 40023e70: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40023e74: 01 00 00 00 nop 40025af0 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr ) { return getpid(); 40025af0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40025af4: 7f ff ff fd call 40025ae8 <== NOT EXECUTED 40025af8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40025afc: 01 00 00 00 nop 4000c1a8 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 4000c1a8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000c1ac: 7f ff ff e6 call 4000c144 <== NOT EXECUTED 4000c1b0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000c1b4: 01 00 00 00 nop 40025d9c <_kill_r>: struct _reent *ptr, pid_t pid, int sig ) { return kill( pid, sig ); 40025d9c: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40025da0: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40025da4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40025da8: 7f ff ff f8 call 40025d88 <== NOT EXECUTED 40025dac: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40025db0: 01 00 00 00 nop 40003d28 <_link_r>: struct _reent *ptr, const char *existing, const char *new ) { return link( existing, new ); 40003d28: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40003d2c: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40003d30: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40003d34: 7f ff ff 59 call 40003a98 <== NOT EXECUTED 40003d38: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40003d3c: 01 00 00 00 nop 40002e80 <_open_r>: const char *buf, int flags, int mode ) { return open( buf, flags, mode ); 40002e80: 90 10 00 09 mov %o1, %o0 40002e84: 92 10 00 0a mov %o2, %o1 40002e88: 94 10 00 0b mov %o3, %o2 40002e8c: 82 13 c0 00 mov %o7, %g1 40002e90: 7f ff ff 36 call 40002b68 40002e94: 9e 10 40 00 mov %g1, %o7 40002e98: 01 00 00 00 nop <== NOT EXECUTED 400025a0 <_realloc_r>: struct _reent *ignored, void *ptr, size_t size ) { return realloc( ptr, size ); 400025a0: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 400025a4: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 400025a8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400025ac: 7f ff ff b6 call 40002484 <== NOT EXECUTED 400025b0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400025b4: 01 00 00 00 nop 400069a4 <_stat_r>: struct _reent *ptr, const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 400069a4: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 400069a8: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 400069ac: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400069b0: 7f ff ff b3 call 4000687c <== NOT EXECUTED 400069b4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400069b8: 01 00 00 00 nop 40019f34 <_unlink_r>: int _unlink_r( struct _reent *ptr, const char *path ) { return unlink( path ); 40019f34: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40019f38: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40019f3c: 7f ff ff a5 call 40019dd0 <== NOT EXECUTED 40019f40: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40019f44: 01 00 00 00 nop 400055e8 : int alphasort(d1, d2) const void *d1; const void *d2; { return(strcmp((*(struct dirent **)d1)->d_name, 400055e8: d0 02 00 00 ld [ %o0 ], %o0 <== NOT EXECUTED 400055ec: d2 02 40 00 ld [ %o1 ], %o1 <== NOT EXECUTED 400055f0: 90 02 20 0c add %o0, 0xc, %o0 <== NOT EXECUTED 400055f4: 92 02 60 0c add %o1, 0xc, %o1 <== NOT EXECUTED 400055f8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400055fc: 40 00 39 16 call 40013a54 <== NOT EXECUTED 40005600: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40005604: 01 00 00 00 nop 40017fbc : #include int chdir( const char *pathname ) { 40017fbc: 9d e3 bf 88 save %sp, -120, %sp /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 40017fc0: 92 10 20 01 mov 1, %o1 40017fc4: 90 10 00 18 mov %i0, %o0 40017fc8: a0 07 bf e8 add %fp, -24, %l0 40017fcc: 96 10 20 01 mov 1, %o3 40017fd0: 94 10 00 10 mov %l0, %o2 40017fd4: 7f ff b3 bf call 40004ed0 40017fd8: b0 10 3f ff mov -1, %i0 pathname, RTEMS_LIBIO_PERMS_SEARCH, &loc, TRUE ); if ( result != 0 ) 40017fdc: 80 a2 20 00 cmp %o0, 0 40017fe0: 12 80 00 2f bne 4001809c 40017fe4: c4 07 bf f0 ld [ %fp + -16 ], %g2 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 40017fe8: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40017fec: 80 a0 60 00 cmp %g1, 0 40017ff0: 22 80 00 2d be,a 400180a4 40017ff4: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 40017ff8: 9f c0 40 00 call %g1 40017ffc: 90 10 00 10 mov %l0, %o0 40018000: 80 a2 20 01 cmp %o0, 1 40018004: 12 80 00 19 bne 40018068 40018008: c2 07 bf f0 ld [ %fp + -16 ], %g1 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); 4001800c: 21 10 00 f1 sethi %hi(0x4003c400), %l0 40018010: d0 04 22 c0 ld [ %l0 + 0x2c0 ], %o0 ! 4003c6c0 40018014: c2 02 20 0c ld [ %o0 + 0xc ], %g1 40018018: 80 a0 60 00 cmp %g1, 0 4001801c: 22 80 00 09 be,a 40018040 40018020: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED 40018024: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40018028: 80 a0 60 00 cmp %g1, 0 4001802c: 22 80 00 05 be,a 40018040 40018030: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED 40018034: 9f c0 40 00 call %g1 40018038: 90 02 20 04 add %o0, 4, %o0 rtems_filesystem_current = loc; 4001803c: c2 07 bf e8 ld [ %fp + -24 ], %g1 40018040: c6 04 22 c0 ld [ %l0 + 0x2c0 ], %g3 40018044: c2 20 e0 04 st %g1, [ %g3 + 4 ] 40018048: c4 07 bf ec ld [ %fp + -20 ], %g2 4001804c: c4 20 e0 08 st %g2, [ %g3 + 8 ] 40018050: c2 07 bf f0 ld [ %fp + -16 ], %g1 40018054: c2 20 e0 0c st %g1, [ %g3 + 0xc ] 40018058: c4 07 bf f4 ld [ %fp + -12 ], %g2 4001805c: c4 20 e0 10 st %g2, [ %g3 + 0x10 ] return 0; } 40018060: 81 c7 e0 08 ret 40018064: 91 e8 20 00 restore %g0, 0, %o0 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 40018068: 80 a0 60 00 cmp %g1, 0 4001806c: 02 80 00 08 be 4001808c 40018070: 01 00 00 00 nop 40018074: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40018078: 80 a0 60 00 cmp %g1, 0 4001807c: 02 80 00 04 be 4001808c 40018080: 01 00 00 00 nop 40018084: 9f c0 40 00 call %g1 40018088: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 4001808c: 40 00 39 1b call 400264f8 <__errno> 40018090: b0 10 3f ff mov -1, %i0 40018094: 82 10 20 14 mov 0x14, %g1 40018098: c2 22 00 00 st %g1, [ %o0 ] 4001809c: 81 c7 e0 08 ret 400180a0: 81 e8 00 00 restore /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 400180a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400180a8: 02 80 00 04 be 400180b8 <== NOT EXECUTED 400180ac: 01 00 00 00 nop <== NOT EXECUTED 400180b0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400180b4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400180b8: 40 00 39 10 call 400264f8 <__errno> <== NOT EXECUTED 400180bc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400180c0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400180c4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400180c8: 81 c7 e0 08 ret <== NOT EXECUTED 400180cc: 81 e8 00 00 restore <== NOT EXECUTED 400180d0 : int chmod( const char *path, mode_t mode ) { 400180d0: 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 ); 400180d4: 92 10 20 00 clr %o1 400180d8: 90 10 00 18 mov %i0, %o0 400180dc: a0 07 bf e8 add %fp, -24, %l0 400180e0: 96 10 20 01 mov 1, %o3 400180e4: 94 10 00 10 mov %l0, %o2 400180e8: 7f ff b3 7a call 40004ed0 400180ec: b0 10 3f ff mov -1, %i0 if ( status != 0 ) 400180f0: 80 a2 20 00 cmp %o0, 0 400180f4: 12 80 00 16 bne 4001814c 400180f8: c2 07 bf ec ld [ %fp + -20 ], %g1 return -1; if ( !loc.handlers ){ 400180fc: 80 a0 60 00 cmp %g1, 0 40018100: 22 80 00 25 be,a 40018194 40018104: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ 40018108: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4001810c: 80 a0 60 00 cmp %g1, 0 40018110: 02 80 00 11 be 40018154 40018114: 93 2e 60 10 sll %i1, 0x10, %o1 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 40018118: 90 10 00 10 mov %l0, %o0 4001811c: 9f c0 40 00 call %g1 40018120: 93 32 60 10 srl %o1, 0x10, %o1 rtems_filesystem_freenode( &loc ); 40018124: c2 07 bf f0 ld [ %fp + -16 ], %g1 40018128: 80 a0 60 00 cmp %g1, 0 4001812c: 02 80 00 08 be 4001814c 40018130: b0 10 00 08 mov %o0, %i0 40018134: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40018138: 80 a0 60 00 cmp %g1, 0 4001813c: 02 80 00 23 be 400181c8 40018140: 01 00 00 00 nop 40018144: 9f c0 40 00 call %g1 40018148: 90 10 00 10 mov %l0, %o0 return result; } 4001814c: 81 c7 e0 08 ret 40018150: 81 e8 00 00 restore rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); 40018154: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40018158: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001815c: 02 80 00 08 be 4001817c <== NOT EXECUTED 40018160: 01 00 00 00 nop <== NOT EXECUTED 40018164: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40018168: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001816c: 02 80 00 04 be 4001817c <== NOT EXECUTED 40018170: 01 00 00 00 nop <== NOT EXECUTED 40018174: 9f c0 40 00 call %g1 <== NOT EXECUTED 40018178: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001817c: 40 00 38 df call 400264f8 <__errno> <== NOT EXECUTED 40018180: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40018184: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40018188: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001818c: 81 c7 e0 08 ret <== NOT EXECUTED 40018190: 81 e8 00 00 restore <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, 0, &loc, TRUE ); if ( status != 0 ) return -1; if ( !loc.handlers ){ rtems_filesystem_freenode( &loc ); 40018194: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40018198: 02 80 00 08 be 400181b8 <== NOT EXECUTED 4001819c: 01 00 00 00 nop <== NOT EXECUTED 400181a0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400181a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400181a8: 02 80 00 04 be 400181b8 <== NOT EXECUTED 400181ac: 01 00 00 00 nop <== NOT EXECUTED 400181b0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400181b4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 400181b8: 40 00 38 d0 call 400264f8 <__errno> <== NOT EXECUTED 400181bc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400181c0: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 400181c4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400181c8: 81 c7 e0 08 ret <== NOT EXECUTED 400181cc: 81 e8 00 00 restore <== NOT EXECUTED 400181d0 : int chown( const char *path, uid_t owner, gid_t group ) { 400181d0: 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 ) ) 400181d4: 92 10 20 00 clr %o1 400181d8: 90 10 00 18 mov %i0, %o0 400181dc: a0 07 bf e8 add %fp, -24, %l0 400181e0: 96 10 20 01 mov 1, %o3 400181e4: 94 10 00 10 mov %l0, %o2 400181e8: 7f ff b3 3a call 40004ed0 400181ec: b0 10 3f ff mov -1, %i0 400181f0: 80 a2 20 00 cmp %o0, 0 400181f4: 12 80 00 15 bne 40018248 400181f8: c2 07 bf f0 ld [ %fp + -16 ], %g1 return -1; if ( !loc.ops->chown_h ) { 400181fc: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 40018200: 80 a0 a0 00 cmp %g2, 0 40018204: 02 80 00 13 be 40018250 40018208: 93 2e 60 10 sll %i1, 0x10, %o1 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); 4001820c: 95 2e a0 10 sll %i2, 0x10, %o2 40018210: 93 32 60 10 srl %o1, 0x10, %o1 40018214: 95 32 a0 10 srl %o2, 0x10, %o2 40018218: 9f c0 80 00 call %g2 4001821c: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40018220: c2 07 bf f0 ld [ %fp + -16 ], %g1 40018224: 80 a0 60 00 cmp %g1, 0 40018228: 02 80 00 08 be 40018248 4001822c: b0 10 00 08 mov %o0, %i0 40018230: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40018234: 80 a0 60 00 cmp %g1, 0 40018238: 02 80 00 10 be 40018278 4001823c: 01 00 00 00 nop 40018240: 9f c0 40 00 call %g1 40018244: 90 10 00 10 mov %l0, %o0 return result; } 40018248: 81 c7 e0 08 ret 4001824c: 81 e8 00 00 restore if ( rtems_filesystem_evaluate_path( path, 0x00, &loc, TRUE ) ) return -1; if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc ); 40018250: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40018254: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40018258: 02 80 00 04 be 40018268 <== NOT EXECUTED 4001825c: 01 00 00 00 nop <== NOT EXECUTED 40018260: 9f c0 40 00 call %g1 <== NOT EXECUTED 40018264: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40018268: 40 00 38 a4 call 400264f8 <__errno> <== NOT EXECUTED 4001826c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40018270: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40018274: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40018278: 81 c7 e0 08 ret <== NOT EXECUTED 4001827c: 81 e8 00 00 restore <== NOT EXECUTED 40018280 : #include int chroot( const char *pathname ) { 40018280: 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) { 40018284: 23 10 00 f1 sethi %hi(0x4003c400), %l1 40018288: e0 04 62 c0 ld [ %l1 + 0x2c0 ], %l0 ! 4003c6c0 4001828c: 03 10 00 fc sethi %hi(0x4003f000), %g1 40018290: 82 10 60 54 or %g1, 0x54, %g1 ! 4003f054 40018294: 80 a4 00 01 cmp %l0, %g1 40018298: 02 80 00 24 be 40018328 4001829c: 01 00 00 00 nop rtems_libio_set_private_env(); /* try to set a new private env*/ if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ rtems_set_errno_and_return_minus_one( ENOTSUP ); }; result = chdir(pathname); 400182a0: 7f ff ff 47 call 40017fbc 400182a4: 90 10 00 18 mov %i0, %o0 if (result) { 400182a8: 80 a2 20 00 cmp %o0, 0 400182ac: 12 80 00 2b bne 40018358 400182b0: 11 10 00 e3 sethi %hi(0x40038c00), %o0 rtems_set_errno_and_return_minus_one( errno ); }; /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 400182b4: 92 10 20 00 clr %o1 400182b8: 90 12 22 e0 or %o0, 0x2e0, %o0 400182bc: 94 07 bf e8 add %fp, -24, %o2 400182c0: 7f ff b3 04 call 40004ed0 400182c4: 96 10 20 00 clr %o3 400182c8: 80 a2 20 00 cmp %o0, 0 400182cc: 12 80 00 23 bne 40018358 400182d0: d0 04 62 c0 ld [ %l1 + 0x2c0 ], %o0 /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); } rtems_filesystem_freenode(&rtems_filesystem_root); 400182d4: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 400182d8: 80 a0 60 00 cmp %g1, 0 400182dc: 22 80 00 09 be,a 40018300 400182e0: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED 400182e4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400182e8: 80 a0 60 00 cmp %g1, 0 400182ec: 22 80 00 05 be,a 40018300 400182f0: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED 400182f4: 9f c0 40 00 call %g1 400182f8: 90 02 20 14 add %o0, 0x14, %o0 rtems_filesystem_root = loc; 400182fc: c2 07 bf e8 ld [ %fp + -24 ], %g1 40018300: c6 04 62 c0 ld [ %l1 + 0x2c0 ], %g3 40018304: c2 20 e0 14 st %g1, [ %g3 + 0x14 ] 40018308: c4 07 bf ec ld [ %fp + -20 ], %g2 4001830c: c4 20 e0 18 st %g2, [ %g3 + 0x18 ] 40018310: c2 07 bf f0 ld [ %fp + -16 ], %g1 40018314: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] 40018318: c4 07 bf f4 ld [ %fp + -12 ], %g2 4001831c: c4 20 e0 20 st %g2, [ %g3 + 0x20 ] return 0; } 40018320: 81 c7 e0 08 ret 40018324: 91 e8 20 00 restore %g0, 0, %o0 int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { rtems_libio_set_private_env(); /* try to set a new private env*/ 40018328: 40 00 05 59 call 4001988c 4001832c: 01 00 00 00 nop if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 40018330: c2 04 62 c0 ld [ %l1 + 0x2c0 ], %g1 40018334: 80 a0 40 10 cmp %g1, %l0 40018338: 12 bf ff da bne 400182a0 4001833c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 40018340: 40 00 38 6e call 400264f8 <__errno> <== NOT EXECUTED 40018344: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40018348: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4001834c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40018350: 81 c7 e0 08 ret <== NOT EXECUTED 40018354: 81 e8 00 00 restore <== NOT EXECUTED rtems_set_errno_and_return_minus_one( errno ); }; /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 40018358: 40 00 38 68 call 400264f8 <__errno> <== NOT EXECUTED 4001835c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40018360: 40 00 38 66 call 400264f8 <__errno> <== NOT EXECUTED 40018364: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 40018368: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 4001836c: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED 40018370: 81 c7 e0 08 ret <== NOT EXECUTED 40018374: 81 e8 00 00 restore <== NOT EXECUTED 400062d4 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 400062d4: 9d e3 bf 98 save %sp, -104, %sp if ( !tp ) 400062d8: 90 96 60 00 orcc %i1, 0, %o0 400062dc: 02 80 00 1d be 40006350 400062e0: 80 a6 20 02 cmp %i0, 2 rtems_set_errno_and_return_minus_one( EINVAL ); switch ( clock_id ) { 400062e4: 02 80 00 09 be 40006308 400062e8: 01 00 00 00 nop 400062ec: 08 80 00 0b bleu 40006318 400062f0: 80 a6 20 01 cmp %i0, 1 400062f4: 80 a6 20 03 cmp %i0, 3 <== NOT EXECUTED 400062f8: 02 80 00 14 be 40006348 <== NOT EXECUTED 400062fc: 80 a6 20 04 cmp %i0, 4 <== NOT EXECUTED 40006300: 12 80 00 08 bne 40006320 <== NOT EXECUTED 40006304: 01 00 00 00 nop <== NOT EXECUTED break; #endif #ifdef _POSIX_CPUTIME case CLOCK_PROCESS_CPUTIME: _TOD_Get_uptime(tp); 40006308: 40 00 0b 87 call 40009124 <_TOD_Get_uptime> <== NOT EXECUTED 4000630c: b0 10 20 00 clr %i0 ! 0 <== NOT EXECUTED 40006310: 81 c7 e0 08 ret <== NOT EXECUTED 40006314: 81 e8 00 00 restore <== NOT EXECUTED ) { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); switch ( clock_id ) { 40006318: 02 80 00 08 be 40006338 4000631c: 01 00 00 00 nop case CLOCK_THREAD_CPUTIME: return POSIX_NOT_IMPLEMENTED(); break; #endif default: rtems_set_errno_and_return_minus_one( EINVAL ); 40006320: 40 00 29 a7 call 400109bc <__errno> <== NOT EXECUTED 40006324: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40006328: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000632c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return 0; } 40006330: 81 c7 e0 08 ret <== NOT EXECUTED 40006334: 81 e8 00 00 restore <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); switch ( clock_id ) { case CLOCK_REALTIME: _TOD_Get(tp); 40006338: 40 00 0b 62 call 400090c0 <_TOD_Get> 4000633c: b0 10 20 00 clr %i0 40006340: 81 c7 e0 08 ret 40006344: 81 e8 00 00 restore break; #endif #ifdef _POSIX_THREAD_CPUTIME case CLOCK_THREAD_CPUTIME: return POSIX_NOT_IMPLEMENTED(); 40006348: 40 00 03 56 call 400070a0 <== NOT EXECUTED 4000634c: 81 e8 00 00 restore <== NOT EXECUTED clockid_t clock_id, struct timespec *tp ) { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); 40006350: 40 00 29 9b call 400109bc <__errno> <== NOT EXECUTED 40006354: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40006358: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000635c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40006360: 81 c7 e0 08 ret <== NOT EXECUTED 40006364: 81 e8 00 00 restore <== NOT EXECUTED 40006368 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 40006368: 9d e3 bf 98 save %sp, -104, %sp if ( !tp ) 4000636c: 90 96 60 00 orcc %i1, 0, %o0 40006370: 02 80 00 26 be 40006408 40006374: 80 a6 20 02 cmp %i0, 2 rtems_set_errno_and_return_minus_one( EINVAL ); switch ( clock_id ) { 40006378: 02 80 00 22 be 40006400 4000637c: 80 a6 20 03 cmp %i0, 3 40006380: 02 80 00 20 be 40006400 40006384: 80 a6 20 01 cmp %i0, 1 40006388: 22 80 00 08 be,a 400063a8 4000638c: c4 02 00 00 ld [ %o0 ], %g2 case CLOCK_THREAD_CPUTIME: return POSIX_NOT_IMPLEMENTED(); break; #endif default: rtems_set_errno_and_return_minus_one( EINVAL ); 40006390: 40 00 29 8b call 400109bc <__errno> 40006394: b0 10 3f ff mov -1, %i0 40006398: 82 10 20 16 mov 0x16, %g1 4000639c: c2 22 00 00 st %g1, [ %o0 ] } return 0; } 400063a0: 81 c7 e0 08 ret 400063a4: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( EINVAL ); switch ( clock_id ) { case CLOCK_REALTIME: if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 400063a8: 03 08 76 b9 sethi %hi(0x21dae400), %g1 400063ac: 82 10 60 ff or %g1, 0xff, %g1 ! 21dae4ff 400063b0: 80 a0 80 01 cmp %g2, %g1 400063b4: 08 80 00 15 bleu 40006408 400063b8: 21 10 00 7a sethi %hi(0x4001e800), %l0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400063bc: c2 04 22 60 ld [ %l0 + 0x260 ], %g1 ! 4001ea60 <_Thread_Dispatch_disable_level> 400063c0: 82 00 60 01 inc %g1 400063c4: c2 24 22 60 st %g1, [ %l0 + 0x260 ] rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); 400063c8: 40 00 0b 7f call 400091c4 <_TOD_Set> 400063cc: 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 ) 400063d0: c2 04 22 60 ld [ %l0 + 0x260 ], %g1 400063d4: b0 10 20 00 clr %i0 400063d8: 82 00 7f ff add %g1, -1, %g1 400063dc: c2 24 22 60 st %g1, [ %l0 + 0x260 ] 400063e0: c4 04 22 60 ld [ %l0 + 0x260 ], %g2 400063e4: 80 a0 a0 00 cmp %g2, 0 400063e8: 12 80 00 0c bne 40006418 400063ec: 01 00 00 00 nop _Thread_Dispatch(); 400063f0: 40 00 13 5d call 4000b164 <_Thread_Dispatch> 400063f4: 01 00 00 00 nop 400063f8: 81 c7 e0 08 ret 400063fc: 81 e8 00 00 restore break; #endif #ifdef _POSIX_THREAD_CPUTIME case CLOCK_THREAD_CPUTIME: return POSIX_NOT_IMPLEMENTED(); 40006400: 40 00 03 28 call 400070a0 <== NOT EXECUTED 40006404: 81 e8 00 00 restore <== NOT EXECUTED switch ( clock_id ) { case CLOCK_REALTIME: if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) rtems_set_errno_and_return_minus_one( EINVAL ); 40006408: 40 00 29 6d call 400109bc <__errno> <== NOT EXECUTED 4000640c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40006410: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40006414: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40006418: 81 c7 e0 08 ret <== NOT EXECUTED 4000641c: 81 e8 00 00 restore <== NOT EXECUTED 40018378 : * close a directory. */ int closedir(dirp) register DIR *dirp; { 40018378: 9d e3 bf 98 save %sp, -104, %sp int fd; if ( !dirp ) 4001837c: a0 96 20 00 orcc %i0, 0, %l0 40018380: 02 80 00 0b be 400183ac 40018384: 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); 40018388: d0 04 20 0c ld [ %l0 + 0xc ], %o0 int fd; if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); fd = dirp->dd_fd; 4001838c: f0 04 00 00 ld [ %l0 ], %i0 dirp->dd_fd = -1; dirp->dd_loc = 0; 40018390: c0 24 20 04 clr [ %l0 + 4 ] (void)free((void *)dirp->dd_buf); 40018394: 7f ff b4 4d call 400054c8 40018398: c2 24 00 00 st %g1, [ %l0 ] (void)free((void *)dirp); 4001839c: 7f ff b4 4b call 400054c8 400183a0: 90 10 00 10 mov %l0, %o0 return(close(fd)); 400183a4: 7f ff b2 6a call 40004d4c 400183a8: 81 e8 00 00 restore register DIR *dirp; { int fd; if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); 400183ac: 40 00 38 53 call 400264f8 <__errno> <== NOT EXECUTED 400183b0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400183b4: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 400183b8: 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)); } 400183bc: 81 c7 e0 08 ret <== NOT EXECUTED 400183c0: 81 e8 00 00 restore <== NOT EXECUTED 4000df98 : */ int device_close( rtems_libio_t *iop ) { 4000df98: 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; 4000df9c: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 args.iop = iop; 4000dfa0: f0 27 bf ec st %i0, [ %fp + -20 ] args.flags = 0; 4000dfa4: c0 27 bf f0 clr [ %fp + -16 ] args.mode = 0; 4000dfa8: c0 27 bf f4 clr [ %fp + -12 ] status = rtems_io_close( 4000dfac: d2 00 60 50 ld [ %g1 + 0x50 ], %o1 4000dfb0: d0 00 60 4c ld [ %g1 + 0x4c ], %o0 4000dfb4: 94 07 bf ec add %fp, -20, %o2 4000dfb8: 40 00 02 52 call 4000e900 4000dfbc: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 4000dfc0: 80 a2 20 00 cmp %o0, 0 4000dfc4: 12 80 00 04 bne 4000dfd4 4000dfc8: 01 00 00 00 nop return rtems_deviceio_errno(status); } return 0; } 4000dfcc: 81 c7 e0 08 ret 4000dfd0: 81 e8 00 00 restore the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 4000dfd4: 7f ff ff a1 call 4000de58 <== NOT EXECUTED 4000dfd8: 01 00 00 00 nop <== NOT EXECUTED } return 0; } 4000dfdc: 81 c7 e0 08 ret <== NOT EXECUTED 4000dfe0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000de8c : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4000de8c: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED args.iop = iop; args.command = command; args.buffer = buffer; the_jnode = iop->file_info; 4000de90: 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; 4000de94: f2 27 bf ec st %i1, [ %fp + -20 ] <== NOT EXECUTED args.buffer = buffer; 4000de98: 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; 4000de9c: 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( 4000dea0: d2 00 60 50 ld [ %g1 + 0x50 ], %o1 <== NOT EXECUTED 4000dea4: d0 00 60 4c ld [ %g1 + 0x4c ], %o0 <== NOT EXECUTED 4000dea8: 40 00 02 ac call 4000e958 <== NOT EXECUTED 4000deac: 94 07 bf e8 add %fp, -24, %o2 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000deb0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000deb4: 12 80 00 05 bne 4000dec8 <== NOT EXECUTED 4000deb8: 01 00 00 00 nop <== NOT EXECUTED return rtems_deviceio_errno(status); return args.ioctl_return; 4000debc: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED } 4000dec0: 81 c7 e0 08 ret <== NOT EXECUTED 4000dec4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4000dec8: 7f ff ff e4 call 4000de58 <== NOT EXECUTED 4000decc: 01 00 00 00 nop <== NOT EXECUTED return args.ioctl_return; } 4000ded0: 81 c7 e0 08 ret <== NOT EXECUTED 4000ded4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000dfe4 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4000dfe4: 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; 4000dfe8: 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; 4000dfec: c4 06 20 2c ld [ %i0 + 0x2c ], %g2 args.iop = iop; 4000dff0: f0 27 bf ec st %i0, [ %fp + -20 ] args.flags = iop->flags; 4000dff4: c2 27 bf f0 st %g1, [ %fp + -16 ] args.mode = mode; 4000dff8: f6 27 bf f4 st %i3, [ %fp + -12 ] status = rtems_io_open( 4000dffc: d2 00 a0 50 ld [ %g2 + 0x50 ], %o1 4000e000: d0 00 a0 4c ld [ %g2 + 0x4c ], %o0 4000e004: 94 07 bf ec add %fp, -20, %o2 4000e008: 40 00 02 6a call 4000e9b0 4000e00c: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000e010: 80 a2 20 00 cmp %o0, 0 4000e014: 12 80 00 04 bne 4000e024 4000e018: 01 00 00 00 nop return rtems_deviceio_errno(status); return 0; } 4000e01c: 81 c7 e0 08 ret 4000e020: 81 e8 00 00 restore the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4000e024: 7f ff ff 8d call 4000de58 <== NOT EXECUTED 4000e028: 01 00 00 00 nop <== NOT EXECUTED return 0; } 4000e02c: 81 c7 e0 08 ret <== NOT EXECUTED 4000e030: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000df38 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4000df38: 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; 4000df3c: 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; 4000df40: 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; 4000df44: c6 06 20 2c ld [ %i0 + 0x2c ], %g3 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; 4000df48: 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; 4000df4c: c2 27 bf e4 st %g1, [ %fp + -28 ] <== NOT EXECUTED args.buffer = buffer; args.count = count; 4000df50: f4 27 bf ec st %i2, [ %fp + -20 ] <== NOT EXECUTED args.flags = iop->flags; 4000df54: 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; 4000df58: 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; 4000df5c: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED status = rtems_io_read( 4000df60: d2 00 e0 50 ld [ %g3 + 0x50 ], %o1 <== NOT EXECUTED 4000df64: d0 00 e0 4c ld [ %g3 + 0x4c ], %o0 <== NOT EXECUTED 4000df68: 40 00 02 a8 call 4000ea08 <== NOT EXECUTED 4000df6c: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000df70: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000df74: 12 80 00 05 bne 4000df88 <== NOT EXECUTED 4000df78: 01 00 00 00 nop <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 4000df7c: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED } 4000df80: 81 c7 e0 08 ret <== NOT EXECUTED 4000df84: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4000df88: 7f ff ff b4 call 4000de58 <== NOT EXECUTED 4000df8c: 01 00 00 00 nop <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4000df90: 81 c7 e0 08 ret <== NOT EXECUTED 4000df94: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000ded8 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4000ded8: 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; 4000dedc: 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; 4000dee0: 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; 4000dee4: c6 06 20 2c ld [ %i0 + 0x2c ], %g3 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 4000dee8: 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; 4000deec: c2 27 bf e4 st %g1, [ %fp + -28 ] args.buffer = (void *) buffer; args.count = count; 4000def0: f4 27 bf ec st %i2, [ %fp + -20 ] args.flags = iop->flags; 4000def4: 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; 4000def8: 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; 4000defc: c0 27 bf f4 clr [ %fp + -12 ] status = rtems_io_write( 4000df00: d2 00 e0 50 ld [ %g3 + 0x50 ], %o1 4000df04: d0 00 e0 4c ld [ %g3 + 0x4c ], %o0 4000df08: 40 00 02 d6 call 4000ea60 4000df0c: 94 07 bf e0 add %fp, -32, %o2 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000df10: 80 a2 20 00 cmp %o0, 0 4000df14: 12 80 00 05 bne 4000df28 4000df18: 01 00 00 00 nop return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 4000df1c: d0 07 bf f4 ld [ %fp + -12 ], %o0 } 4000df20: 81 c7 e0 08 ret 4000df24: 91 e8 00 08 restore %g0, %o0, %o0 the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4000df28: 7f ff ff cc call 4000de58 <== NOT EXECUTED 4000df2c: 01 00 00 00 nop <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4000df30: 81 c7 e0 08 ret <== NOT EXECUTED 4000df34: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000418c : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 4000418c: 9d e3 bf 98 save %sp, -104, %sp rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 40004190: c2 06 20 b4 ld [ %i0 + 0xb4 ], %g1 40004194: 80 a0 60 00 cmp %g1, 0 40004198: 12 80 00 04 bne 400041a8 4000419c: 01 00 00 00 nop 400041a0: 81 c7 e0 08 ret 400041a4: 81 e8 00 00 restore rtems_interrupt_disable (level); 400041a8: 7f ff f7 13 call 40001df4 <== NOT EXECUTED 400041ac: 01 00 00 00 nop <== NOT EXECUTED while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 400041b0: c4 06 20 84 ld [ %i0 + 0x84 ], %g2 <== NOT EXECUTED 400041b4: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 400041b8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400041bc: 12 80 00 0a bne 400041e4 <== NOT EXECUTED 400041c0: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 400041c4: 30 80 00 1b b,a 40004230 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 400041c8: 7f ff f7 0b call 40001df4 <== NOT EXECUTED 400041cc: 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) { 400041d0: c4 06 20 84 ld [ %i0 + 0x84 ], %g2 <== NOT EXECUTED 400041d4: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 400041d8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400041dc: 02 80 00 15 be 40004230 <== NOT EXECUTED 400041e0: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED tty->rawOutBufState = rob_wait; 400041e4: c2 26 20 94 st %g1, [ %i0 + 0x94 ] <== NOT EXECUTED rtems_interrupt_enable (level); 400041e8: 7f ff f7 07 call 40001e04 <== NOT EXECUTED 400041ec: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 400041f0: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 400041f4: 92 10 20 00 clr %o1 <== NOT EXECUTED 400041f8: 40 00 06 eb call 40005da4 <== NOT EXECUTED 400041fc: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 40004200: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004204: 02 bf ff f1 be 400041c8 <== NOT EXECUTED 40004208: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 4000420c: 40 00 0a 03 call 40006a18 <== NOT EXECUTED 40004210: 01 00 00 00 nop <== NOT EXECUTED rtems_interrupt_disable (level); 40004214: 7f ff f6 f8 call 40001df4 <== NOT EXECUTED 40004218: 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) { 4000421c: c4 06 20 84 ld [ %i0 + 0x84 ], %g2 <== NOT EXECUTED 40004220: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 40004224: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004228: 12 bf ff ef bne 400041e4 <== NOT EXECUTED 4000422c: 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); 40004230: 7f ff f6 f5 call 40001e04 <== NOT EXECUTED 40004234: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40004238: 01 00 00 00 nop 40002eb0 : int dup2( int fildes, int fildes2 ) { 40002eb0: 9d e3 bf 48 save %sp, -184, %sp /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 40002eb4: a0 07 bf a8 add %fp, -88, %l0 40002eb8: 90 10 00 18 mov %i0, %o0 40002ebc: 40 00 01 ce call 400035f4 40002ec0: 92 10 00 10 mov %l0, %o1 if ( status == -1 ) 40002ec4: 80 a2 3f ff cmp %o0, -1 40002ec8: 32 80 00 05 bne,a 40002edc 40002ecc: 92 10 00 10 mov %l0, %o1 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 40002ed0: 90 10 3f ff mov -1, %o0 } 40002ed4: 81 c7 e0 08 ret 40002ed8: 91 e8 00 08 restore %g0, %o0, %o0 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 40002edc: 40 00 01 c6 call 400035f4 40002ee0: 90 10 00 19 mov %i1, %o0 if ( status == -1 ) 40002ee4: 80 a2 3f ff cmp %o0, -1 40002ee8: 02 bf ff fa be 40002ed0 40002eec: 90 10 00 18 mov %i0, %o0 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 40002ef0: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED 40002ef4: 40 00 00 a1 call 40003178 <== NOT EXECUTED 40002ef8: 92 10 20 00 clr %o1 <== NOT EXECUTED 40002efc: 30 bf ff f6 b,a 40002ed4 <== NOT EXECUTED 40003b9c : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 40003b9c: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 40003ba0: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 40003ba4: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 40003ba8: 02 80 00 18 be 40003c08 <== NOT EXECUTED 40003bac: 03 10 00 68 sethi %hi(0x4001a000), %g1 <== NOT EXECUTED 40003bb0: c4 00 62 48 ld [ %g1 + 0x248 ], %g2 ! 4001a248 <__ctype_ptr> <== NOT EXECUTED 40003bb4: 90 0e 20 ff and %i0, 0xff, %o0 <== NOT EXECUTED 40003bb8: c2 0a 00 02 ldub [ %o0 + %g2 ], %g1 <== NOT EXECUTED 40003bbc: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40003bc0: 02 80 00 13 be 40003c0c <== NOT EXECUTED 40003bc4: 80 a2 20 09 cmp %o0, 9 <== NOT EXECUTED 40003bc8: 02 80 00 11 be 40003c0c <== NOT EXECUTED 40003bcc: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED 40003bd0: 02 80 00 0f be 40003c0c <== NOT EXECUTED 40003bd4: 82 1e 20 40 xor %i0, 0x40, %g1 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; 40003bd8: 84 10 20 5e mov 0x5e, %g2 <== NOT EXECUTED echobuf[1] = c ^ 0x40; 40003bdc: 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] = '^'; 40003be0: c4 2f bf f6 stb %g2, [ %fp + -10 ] <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 40003be4: 90 07 bf f6 add %fp, -10, %o0 <== NOT EXECUTED 40003be8: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40003bec: 7f ff ff 36 call 400038c4 <== NOT EXECUTED 40003bf0: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED tty->column += 2; 40003bf4: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 40003bf8: 82 00 60 02 add %g1, 2, %g1 <== NOT EXECUTED 40003bfc: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED 40003c00: 81 c7 e0 08 ret <== NOT EXECUTED 40003c04: 81 e8 00 00 restore <== NOT EXECUTED 40003c08: 90 0e 20 ff and %i0, 0xff, %o0 <== NOT EXECUTED } else { oproc (c, tty); 40003c0c: 7f ff ff 83 call 40003a18 <== NOT EXECUTED 40003c10: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40003c14: 81 c7 e0 08 ret <== NOT EXECUTED 40003c18: 81 e8 00 00 restore <== NOT EXECUTED 40018b84 : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 40018b84: 03 10 00 f8 sethi %hi(0x4003e000), %g1 <== NOT EXECUTED 40018b88: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 ! 4003e034 <== NOT EXECUTED 40018b8c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40018b90: 02 80 00 05 be 40018ba4 <== NOT EXECUTED 40018b94: 01 00 00 00 nop <== NOT EXECUTED fclose(group_fp); 40018b98: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40018b9c: 40 00 36 ad call 40026650 <== NOT EXECUTED 40018ba0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40018ba4: 81 c3 e0 08 retl <== NOT EXECUTED 40018ba8: 01 00 00 00 nop 40018bac : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 40018bac: 03 10 00 f7 sethi %hi(0x4003dc00), %g1 <== NOT EXECUTED 40018bb0: d0 00 63 4c ld [ %g1 + 0x34c ], %o0 ! 4003df4c <== NOT EXECUTED 40018bb4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40018bb8: 02 80 00 05 be 40018bcc <== NOT EXECUTED 40018bbc: 01 00 00 00 nop <== NOT EXECUTED fclose(passwd_fp); 40018bc0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40018bc4: 40 00 36 a3 call 40026650 <== NOT EXECUTED 40018bc8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40018bcc: 81 c3 e0 08 retl <== NOT EXECUTED 40018bd0: 01 00 00 00 nop 40003c1c : * 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) { 40003c1c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (tty->ccount == 0) 40003c20: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 <== NOT EXECUTED 40003c24: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40003c28: 02 80 00 36 be 40003d00 <== NOT EXECUTED 40003c2c: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED return; if (lineFlag) { 40003c30: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40003c34: 12 80 00 35 bne 40003d08 <== NOT EXECUTED 40003c38: c6 06 20 3c ld [ %i0 + 0x3c ], %g3 <== NOT EXECUTED 40003c3c: 27 10 00 63 sethi %hi(0x40018c00), %l3 <== NOT EXECUTED 40003c40: 03 10 00 63 sethi %hi(0x40018c00), %g1 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 40003c44: 25 10 00 68 sethi %hi(0x4001a000), %l2 <== NOT EXECUTED 40003c48: a2 10 61 88 or %g1, 0x188, %l1 <== NOT EXECUTED 40003c4c: 10 80 00 0d b 40003c80 <== NOT EXECUTED 40003c50: a8 14 e1 90 or %l3, 0x190, %l4 <== NOT EXECUTED 40003c54: 80 88 e2 00 btst 0x200, %g3 <== NOT EXECUTED 40003c58: 12 80 00 6a bne 40003e00 <== NOT EXECUTED 40003c5c: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 40003c60: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40003c64: 02 80 00 65 be 40003df8 <== NOT EXECUTED 40003c68: 01 00 00 00 nop <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 40003c6c: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 40003c70: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40003c74: 02 80 00 61 be 40003df8 <== NOT EXECUTED 40003c78: 01 00 00 00 nop <== NOT EXECUTED 40003c7c: c6 04 20 3c ld [ %l0 + 0x3c ], %g3 <== NOT EXECUTED unsigned char c = tty->cbuf[--tty->ccount]; 40003c80: da 04 20 1c ld [ %l0 + 0x1c ], %o5 <== NOT EXECUTED 40003c84: 88 00 bf ff add %g2, -1, %g4 <== NOT EXECUTED 40003c88: c8 24 20 20 st %g4, [ %l0 + 0x20 ] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 40003c8c: 80 88 e0 08 btst 8, %g3 <== NOT EXECUTED 40003c90: 02 bf ff f4 be 40003c60 <== NOT EXECUTED 40003c94: c4 0b 40 04 ldub [ %o5 + %g4 ], %g2 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 40003c98: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40003c9c: 12 80 00 05 bne 40003cb0 <== NOT EXECUTED 40003ca0: 83 28 a0 18 sll %g2, 0x18, %g1 <== NOT EXECUTED 40003ca4: 80 88 e0 10 btst 0x10, %g3 <== NOT EXECUTED 40003ca8: 22 80 00 6a be,a 40003e50 <== NOT EXECUTED 40003cac: f0 0c 20 43 ldub [ %l0 + 0x43 ], %i0 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 40003cb0: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED 40003cb4: 80 a0 60 09 cmp %g1, 9 <== NOT EXECUTED 40003cb8: 02 80 00 24 be 40003d48 <== NOT EXECUTED 40003cbc: c2 04 a2 48 ld [ %l2 + 0x248 ], %g1 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 40003cc0: b0 08 a0 ff and %g2, 0xff, %i0 <== NOT EXECUTED 40003cc4: c4 0e 00 01 ldub [ %i0 + %g1 ], %g2 <== NOT EXECUTED 40003cc8: 80 88 a0 20 btst 0x20, %g2 <== NOT EXECUTED 40003ccc: 12 bf ff e2 bne 40003c54 <== NOT EXECUTED 40003cd0: 90 10 00 13 mov %l3, %o0 <== 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); 40003cd4: 90 12 21 90 or %o0, 0x190, %o0 <== NOT EXECUTED 40003cd8: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 40003cdc: 7f ff fe fa call 400038c4 <== NOT EXECUTED 40003ce0: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) 40003ce4: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40003ce8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003cec: 02 bf ff de be 40003c64 <== NOT EXECUTED 40003cf0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED tty->column--; 40003cf4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED } } } if (!lineFlag) 40003cf8: 12 bf ff dd bne 40003c6c <== NOT EXECUTED 40003cfc: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED 40003d00: 81 c7 e0 08 ret <== NOT EXECUTED 40003d04: 81 e8 00 00 restore <== NOT EXECUTED erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 40003d08: 80 88 e0 08 btst 8, %g3 <== NOT EXECUTED 40003d0c: 22 bf ff fd be,a 40003d00 <== NOT EXECUTED 40003d10: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 40003d14: 80 88 e0 10 btst 0x10, %g3 <== NOT EXECUTED 40003d18: 12 bf ff ca bne 40003c40 <== NOT EXECUTED 40003d1c: 27 10 00 63 sethi %hi(0x40018c00), %l3 <== NOT EXECUTED tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 40003d20: 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; 40003d24: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 40003d28: 7f ff ff 9d call 40003b9c <== NOT EXECUTED 40003d2c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 40003d30: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 40003d34: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40003d38: 02 bf ff f2 be 40003d00 <== NOT EXECUTED 40003d3c: b2 10 00 18 mov %i0, %i1 <== NOT EXECUTED echo ('\n', tty); 40003d40: 7f ff ff 97 call 40003b9c <== NOT EXECUTED 40003d44: 91 e8 20 0a restore %g0, 0xa, %o0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 40003d48: 80 a1 20 00 cmp %g4, 0 <== NOT EXECUTED 40003d4c: 02 80 00 19 be 40003db0 <== NOT EXECUTED 40003d50: f0 04 20 2c ld [ %l0 + 0x2c ], %i0 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 40003d54: d8 04 a2 48 ld [ %l2 + 0x248 ], %o4 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 40003d58: 96 08 e2 00 and %g3, 0x200, %o3 <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 40003d5c: 10 80 00 07 b 40003d78 <== NOT EXECUTED 40003d60: 86 10 20 00 clr %g3 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 40003d64: 32 80 00 02 bne,a 40003d6c <== NOT EXECUTED 40003d68: b0 06 20 02 add %i0, 2, %i0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 40003d6c: 80 a0 c0 04 cmp %g3, %g4 <== NOT EXECUTED 40003d70: 22 80 00 11 be,a 40003db4 <== NOT EXECUTED 40003d74: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED c = tty->cbuf[i++]; 40003d78: c2 08 c0 0d ldub [ %g3 + %o5 ], %g1 <== NOT EXECUTED if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 40003d7c: 84 08 60 ff and %g1, 0xff, %g2 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 40003d80: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 40003d84: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED 40003d88: 80 a0 60 09 cmp %g1, 9 <== NOT EXECUTED 40003d8c: 02 80 00 18 be 40003dec <== NOT EXECUTED 40003d90: 86 00 e0 01 inc %g3 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 40003d94: c2 08 80 0c ldub [ %g2 + %o4 ], %g1 <== NOT EXECUTED 40003d98: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40003d9c: 12 bf ff f2 bne 40003d64 <== NOT EXECUTED 40003da0: 80 a2 e0 00 cmp %o3, 0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 40003da4: 80 a0 c0 04 cmp %g3, %g4 <== NOT EXECUTED 40003da8: 12 bf ff f4 bne 40003d78 <== NOT EXECUTED 40003dac: b0 06 20 01 inc %i0 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 40003db0: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40003db4: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 40003db8: 16 bf ff ab bge 40003c64 <== NOT EXECUTED 40003dbc: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 40003dc0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40003dc4: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40003dc8: 7f ff fe bf call 400038c4 <== NOT EXECUTED 40003dcc: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED tty->column--; 40003dd0: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40003dd4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 40003dd8: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED 40003ddc: 14 bf ff f9 bg 40003dc0 <== NOT EXECUTED 40003de0: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 40003de4: 10 bf ff a0 b 40003c64 <== NOT EXECUTED 40003de8: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; 40003dec: 82 16 20 07 or %i0, 7, %g1 <== NOT EXECUTED 40003df0: 10 bf ff df b 40003d6c <== NOT EXECUTED 40003df4: b0 00 60 01 add %g1, 1, %i0 <== NOT EXECUTED 40003df8: 81 c7 e0 08 ret <== NOT EXECUTED 40003dfc: 81 e8 00 00 restore <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 40003e00: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 40003e04: 7f ff fe b0 call 400038c4 <== NOT EXECUTED 40003e08: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) 40003e0c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40003e10: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003e14: 02 80 00 04 be 40003e24 <== NOT EXECUTED 40003e18: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED tty->column--; 40003e1c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40003e20: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 40003e24: c2 04 a2 48 ld [ %l2 + 0x248 ], %g1 <== NOT EXECUTED 40003e28: c4 0e 00 01 ldub [ %i0 + %g1 ], %g2 <== NOT EXECUTED 40003e2c: 80 88 a0 20 btst 0x20, %g2 <== NOT EXECUTED 40003e30: 22 bf ff aa be,a 40003cd8 <== NOT EXECUTED 40003e34: 90 12 21 90 or %o0, 0x190, %o0 <== NOT EXECUTED 40003e38: c6 04 20 3c ld [ %l0 + 0x3c ], %g3 <== NOT EXECUTED 40003e3c: 80 88 e2 00 btst 0x200, %g3 <== NOT EXECUTED 40003e40: 32 bf ff a6 bne,a 40003cd8 <== NOT EXECUTED 40003e44: 90 12 21 90 or %o0, 0x190, %o0 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 40003e48: 10 bf ff 87 b 40003c64 <== NOT EXECUTED 40003e4c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 40003e50: 7f ff ff 53 call 40003b9c <== NOT EXECUTED 40003e54: 93 e8 00 10 restore %g0, %l0, %o1 <== NOT EXECUTED 40003e58: 01 00 00 00 nop 40023c28 : int fcntl( int fd, int cmd, ... ) { 40023c28: 9d e3 bf 90 save %sp, -112, %sp int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 40023c2c: 03 10 00 ef sethi %hi(0x4003bc00), %g1 40023c30: d8 00 62 ac ld [ %g1 + 0x2ac ], %o4 ! 4003beac ... ) { int ret; va_list ap; va_start( ap, cmd ); 40023c34: 88 07 a0 4c add %fp, 0x4c, %g4 int fcntl( int fd, int cmd, ... ) { 40023c38: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 40023c3c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 40023c40: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 40023c44: fa 27 a0 58 st %i5, [ %fp + 0x58 ] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 40023c48: 80 a6 00 0c cmp %i0, %o4 40023c4c: 1a 80 00 78 bcc 40023e2c 40023c50: c8 27 bf f4 st %g4, [ %fp + -12 ] iop = rtems_libio_iop( fd ); 40023c54: 3b 10 00 f9 sethi %hi(0x4003e400), %i5 40023c58: da 07 63 f4 ld [ %i5 + 0x3f4 ], %o5 ! 4003e7f4 40023c5c: 85 2e 20 02 sll %i0, 2, %g2 40023c60: 83 2e 20 04 sll %i0, 4, %g1 40023c64: 82 20 40 02 sub %g1, %g2, %g1 40023c68: 82 00 40 18 add %g1, %i0, %g1 40023c6c: 83 28 60 02 sll %g1, 2, %g1 40023c70: b0 00 40 0d add %g1, %o5, %i0 rtems_libio_check_is_open(iop); 40023c74: d0 06 20 0c ld [ %i0 + 0xc ], %o0 40023c78: 80 8a 21 00 btst 0x100, %o0 40023c7c: 02 80 00 6c be 40023e2c 40023c80: 80 a6 60 09 cmp %i1, 9 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 40023c84: 08 80 00 09 bleu 40023ca8 40023c88: 83 2e 60 02 sll %i1, 2, %g1 errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 40023c8c: 40 00 0a 1b call 400264f8 <__errno> 40023c90: 01 00 00 00 nop 40023c94: 82 10 20 16 mov 0x16, %g1 ! 16 40023c98: c2 22 00 00 st %g1, [ %o0 ] { int ret; va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); 40023c9c: b8 10 3f ff mov -1, %i4 return ret; } 40023ca0: 81 c7 e0 08 ret 40023ca4: 91 e8 00 1c restore %g0, %i4, %o0 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 40023ca8: 05 10 00 8f sethi %hi(0x40023c00), %g2 40023cac: 84 10 a0 00 mov %g2, %g2 ! 40023c00 40023cb0: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40023cb4: 81 c0 c0 00 jmp %g3 40023cb8: 01 00 00 00 nop errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 40023cbc: 40 00 0a 0f call 400264f8 <__errno> 40023cc0: b8 10 3f ff mov -1, %i4 ! ffffffff 40023cc4: 82 10 20 86 mov 0x86, %g1 40023cc8: 10 bf ff f6 b 40023ca0 40023ccc: c2 22 00 00 st %g1, [ %o0 ] case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 40023cd0: d0 01 00 00 ld [ %g4 ], %o0 40023cd4: 7f ff 85 e4 call 40005464 40023cd8: 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); 40023cdc: c2 06 20 0c ld [ %i0 + 0xc ], %g1 40023ce0: 90 0a 22 01 and %o0, 0x201, %o0 40023ce4: 82 08 7d fe and %g1, -514, %g1 40023ce8: 90 12 00 01 or %o0, %g1, %o0 40023cec: d0 26 20 0c st %o0, [ %i0 + 0xc ] * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { if (iop->handlers->fcntl_h) { 40023cf0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40023cf4: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 40023cf8: 80 a0 60 00 cmp %g1, 0 40023cfc: 02 bf ff e9 be 40023ca0 40023d00: 90 10 00 19 mov %i1, %o0 int err = (*iop->handlers->fcntl_h)( cmd, iop ); 40023d04: 9f c0 40 00 call %g1 40023d08: 92 10 00 18 mov %i0, %o1 if (err) { 40023d0c: ba 92 20 00 orcc %o0, 0, %i5 40023d10: 02 bf ff e4 be 40023ca0 40023d14: 01 00 00 00 nop errno = err; 40023d18: 40 00 09 f8 call 400264f8 <__errno> <== NOT EXECUTED 40023d1c: b8 10 3f ff mov -1, %i4 ! ffffffff <== NOT EXECUTED 40023d20: 10 bf ff e0 b 40023ca0 <== NOT EXECUTED 40023d24: fa 22 00 00 st %i5, [ %o0 ] <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 40023d28: 7f ff 85 21 call 400051ac 40023d2c: 01 00 00 00 nop 40023d30: b8 10 00 08 mov %o0, %i4 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 40023d34: 80 a7 20 00 cmp %i4, 0 40023d38: 36 bf ff ef bge,a 40023cf4 40023d3c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40023d40: 30 bf ff d8 b,a 40023ca0 <== NOT EXECUTED * if a new process is exec()'ed. Since RTEMS does not support * processes, then we can ignore this one except to make * F_GETFD work. */ if ( va_arg( ap, int ) ) 40023d44: c2 01 00 00 ld [ %g4 ], %g1 40023d48: 80 a0 60 00 cmp %g1, 0 40023d4c: 22 80 00 2d be,a 40023e00 40023d50: 90 0a 37 ff and %o0, -2049, %o0 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 40023d54: 90 12 28 00 or %o0, 0x800, %o0 40023d58: b8 10 20 00 clr %i4 40023d5c: 10 bf ff e5 b 40023cf0 40023d60: d0 26 20 0c st %o0, [ %i0 + 0xc ] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 40023d64: 83 32 20 0b srl %o0, 0xb, %g1 40023d68: 10 bf ff e2 b 40023cf0 40023d6c: b8 08 60 01 and %g1, 1, %i4 * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 40023d70: c6 01 00 00 ld [ %g4 ], %g3 if ( fd2 ) 40023d74: 80 a0 e0 00 cmp %g3, 0 40023d78: 02 80 00 32 be 40023e40 40023d7c: 80 a3 00 03 cmp %o4, %g3 diop = rtems_libio_iop( fd2 ); 40023d80: 96 10 20 00 clr %o3 <== NOT EXECUTED 40023d84: 18 80 00 22 bgu 40023e0c <== NOT EXECUTED 40023d88: 98 10 20 00 clr %o4 <== NOT EXECUTED } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 40023d8c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 40023d90: c6 06 20 2c ld [ %i0 + 0x2c ], %g3 diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 40023d94: c2 23 20 10 st %g1, [ %o4 + 0x10 ] 40023d98: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 ret = (int) (diop - rtems_libio_iops); 40023d9c: c8 07 63 f4 ld [ %i5 + 0x3f4 ], %g4 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 40023da0: c4 23 20 14 st %g2, [ %o4 + 0x14 ] 40023da4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 ret = -1; break; } } diop->handlers = iop->handlers; 40023da8: da 06 20 30 ld [ %i0 + 0x30 ], %o5 diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 40023dac: c2 23 20 18 st %g1, [ %o4 + 0x18 ] 40023db0: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 ret = (int) (diop - rtems_libio_iops); 40023db4: 88 22 c0 04 sub %o3, %g4, %g4 break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 40023db8: c6 23 20 2c st %g3, [ %o4 + 0x2c ] diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 40023dbc: 89 39 20 02 sra %g4, 2, %g4 40023dc0: 87 29 20 02 sll %g4, 2, %g3 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 40023dc4: c4 23 20 1c st %g2, [ %o4 + 0x1c ] ret = -1; break; } } diop->handlers = iop->handlers; 40023dc8: da 23 20 30 st %o5, [ %o4 + 0x30 ] diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 40023dcc: 85 29 20 06 sll %g4, 6, %g2 } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; 40023dd0: d0 23 20 0c st %o0, [ %o4 + 0xc ] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 40023dd4: 84 20 80 03 sub %g2, %g3, %g2 40023dd8: 83 28 a0 06 sll %g2, 6, %g1 40023ddc: 82 20 40 02 sub %g1, %g2, %g1 40023de0: 87 28 60 0c sll %g1, 0xc, %g3 40023de4: 82 00 40 03 add %g1, %g3, %g1 40023de8: 82 00 40 04 add %g1, %g4, %g1 40023dec: 83 28 60 04 sll %g1, 4, %g1 40023df0: 82 20 40 04 sub %g1, %g4, %g1 40023df4: 83 28 60 02 sll %g1, 2, %g1 40023df8: 10 bf ff cf b 40023d34 40023dfc: b8 21 00 01 sub %g4, %g1, %i4 */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 40023e00: b8 10 20 00 clr %i4 <== NOT EXECUTED 40023e04: 10 bf ff bb b 40023cf0 <== NOT EXECUTED 40023e08: d0 26 20 0c st %o0, [ %i0 + 0xc ] <== NOT EXECUTED switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 40023e0c: 85 28 e0 02 sll %g3, 2, %g2 <== NOT EXECUTED 40023e10: 83 28 e0 04 sll %g3, 4, %g1 <== NOT EXECUTED 40023e14: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 40023e18: 82 00 40 03 add %g1, %g3, %g1 <== NOT EXECUTED 40023e1c: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 40023e20: 96 03 40 01 add %o5, %g1, %o3 <== NOT EXECUTED 40023e24: 10 bf ff da b 40023d8c <== NOT EXECUTED 40023e28: 98 10 00 0b mov %o3, %o4 <== NOT EXECUTED int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 40023e2c: 40 00 09 b3 call 400264f8 <__errno> <== NOT EXECUTED 40023e30: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED 40023e34: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 40023e38: 10 bf ff 9a b 40023ca0 <== NOT EXECUTED 40023e3c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); 40023e40: 7f ff 85 4b call 4000536c 40023e44: 01 00 00 00 nop if ( diop == 0 ) { 40023e48: 98 92 20 00 orcc %o0, 0, %o4 40023e4c: 02 bf ff 94 be 40023c9c 40023e50: 96 10 00 0c mov %o4, %o3 40023e54: 10 bf ff ce b 40023d8c 40023e58: d0 06 20 0c ld [ %i0 + 0xc ], %o0 40007314 : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 40007314: 03 10 00 6a sethi %hi(0x4001a800), %g1 40007318: c4 00 61 c8 ld [ %g1 + 0x1c8 ], %g2 ! 4001a9c8 4000731c: 82 10 61 c8 or %g1, 0x1c8, %g1 40007320: 86 00 60 04 add %g1, 4, %g3 !Chain_Is_tail( &rtems_filesystem_mount_table_control, the_node ); 40007324: 80 a0 80 03 cmp %g2, %g3 40007328: 02 80 00 10 be 40007368 4000732c: 01 00 00 00 nop the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { 40007330: d2 02 60 0c ld [ %o1 + 0xc ], %o1 40007334: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 40007338: 80 a0 40 09 cmp %g1, %o1 4000733c: 32 80 00 08 bne,a 4000735c 40007340: c4 00 80 00 ld [ %g2 ], %g2 * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !Chain_Is_tail( &rtems_filesystem_mount_table_control, the_node ); 40007344: 81 c3 e0 08 retl <== NOT EXECUTED 40007348: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { 4000734c: 80 a0 40 09 cmp %g1, %o1 40007350: 02 80 00 08 be 40007370 40007354: 90 10 20 01 mov 1, %o0 * mount 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 ) { 40007358: c4 00 80 00 ld [ %g2 ], %g2 * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !Chain_Is_tail( &rtems_filesystem_mount_table_control, the_node ); 4000735c: 80 a0 80 03 cmp %g2, %g3 40007360: 32 bf ff fb bne,a 4000734c 40007364: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 return TRUE; } } return FALSE; } 40007368: 81 c3 e0 08 retl 4000736c: 90 10 20 00 clr %o0 40007370: 81 c3 e0 08 retl 40007374: 01 00 00 00 nop 400034b0 : long fpathconf( int fd, int name ) { 400034b0: 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); 400034b4: 03 10 00 61 sethi %hi(0x40018400), %g1 400034b8: c4 00 60 cc ld [ %g1 + 0xcc ], %g2 ! 400184cc 400034bc: 80 a6 00 02 cmp %i0, %g2 400034c0: 1a 80 00 41 bcc 400035c4 400034c4: 03 10 00 65 sethi %hi(0x40019400), %g1 iop = rtems_libio_iop(fd); 400034c8: c6 00 61 a0 ld [ %g1 + 0x1a0 ], %g3 ! 400195a0 400034cc: 85 2e 20 02 sll %i0, 2, %g2 400034d0: 83 2e 20 04 sll %i0, 4, %g1 400034d4: 82 20 40 02 sub %g1, %g2, %g1 400034d8: 82 00 40 18 add %g1, %i0, %g1 400034dc: 83 28 60 02 sll %g1, 2, %g1 400034e0: 82 00 40 03 add %g1, %g3, %g1 rtems_libio_check_is_open(iop); 400034e4: c6 00 60 0c ld [ %g1 + 0xc ], %g3 400034e8: 80 88 e1 00 btst 0x100, %g3 400034ec: 02 80 00 36 be 400035c4 400034f0: 80 88 e0 02 btst 2, %g3 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 400034f4: 02 80 00 3a be 400035dc 400034f8: 80 a6 60 0b cmp %i1, 0xb * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 400034fc: 08 80 00 08 bleu 4000351c 40003500: f0 00 60 1c ld [ %g1 + 0x1c ], %i0 break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 40003504: 40 00 39 39 call 400119e8 <__errno> 40003508: b0 10 3f ff mov -1, %i0 4000350c: 82 10 20 16 mov 0x16, %g1 40003510: c2 22 00 00 st %g1, [ %o0 ] break; } return return_value; } 40003514: 81 c7 e0 08 ret 40003518: 81 e8 00 00 restore * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 4000351c: 83 2e 60 02 sll %i1, 2, %g1 40003520: 05 10 00 0d sethi %hi(0x40003400), %g2 40003524: 84 10 a0 80 or %g2, 0x80, %g2 ! 40003480 40003528: c6 00 80 01 ld [ %g2 + %g1 ], %g3 4000352c: 81 c0 c0 00 jmp %g3 40003530: 01 00 00 00 nop break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 40003534: f0 06 20 58 ld [ %i0 + 0x58 ], %i0 40003538: 81 c7 e0 08 ret 4000353c: 81 e8 00 00 restore break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 40003540: f0 06 20 54 ld [ %i0 + 0x54 ], %i0 40003544: 81 c7 e0 08 ret 40003548: 81 e8 00 00 restore break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 4000354c: f0 06 20 48 ld [ %i0 + 0x48 ], %i0 40003550: 81 c7 e0 08 ret 40003554: 81 e8 00 00 restore break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 40003558: f0 06 20 5c ld [ %i0 + 0x5c ], %i0 4000355c: 81 c7 e0 08 ret 40003560: 81 e8 00 00 restore break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 40003564: f0 06 20 50 ld [ %i0 + 0x50 ], %i0 40003568: 81 c7 e0 08 ret 4000356c: 81 e8 00 00 restore break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 40003570: f0 06 20 4c ld [ %i0 + 0x4c ], %i0 40003574: 81 c7 e0 08 ret 40003578: 81 e8 00 00 restore break; case _PC_PATH_MAX: return_value = the_limits->path_max; break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 4000357c: f0 06 20 44 ld [ %i0 + 0x44 ], %i0 40003580: 81 c7 e0 08 ret 40003584: 81 e8 00 00 restore break; case _PC_NAME_MAX: return_value = the_limits->name_max; break; case _PC_PATH_MAX: return_value = the_limits->path_max; 40003588: f0 06 20 40 ld [ %i0 + 0x40 ], %i0 4000358c: 81 c7 e0 08 ret 40003590: 81 e8 00 00 restore break; case _PC_MAX_INPUT: return_value = the_limits->max_input; break; case _PC_NAME_MAX: return_value = the_limits->name_max; 40003594: f0 06 20 3c ld [ %i0 + 0x3c ], %i0 40003598: 81 c7 e0 08 ret 4000359c: 81 e8 00 00 restore break; case _PC_MAX_CANON: return_value = the_limits->max_canon; break; case _PC_MAX_INPUT: return_value = the_limits->max_input; 400035a0: f0 06 20 38 ld [ %i0 + 0x38 ], %i0 400035a4: 81 c7 e0 08 ret 400035a8: 81 e8 00 00 restore switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; break; case _PC_MAX_CANON: return_value = the_limits->max_canon; 400035ac: f0 06 20 34 ld [ %i0 + 0x34 ], %i0 400035b0: 81 c7 e0 08 ret 400035b4: 81 e8 00 00 restore the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; 400035b8: f0 06 20 30 ld [ %i0 + 0x30 ], %i0 400035bc: 81 c7 e0 08 ret 400035c0: 81 e8 00 00 restore rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 400035c4: 40 00 39 09 call 400119e8 <__errno> 400035c8: b0 10 3f ff mov -1, %i0 400035cc: 82 10 20 09 mov 9, %g1 400035d0: c2 22 00 00 st %g1, [ %o0 ] 400035d4: 81 c7 e0 08 ret 400035d8: 81 e8 00 00 restore rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 400035dc: 40 00 39 03 call 400119e8 <__errno> <== NOT EXECUTED 400035e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400035e4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400035e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400035ec: 81 c7 e0 08 ret <== NOT EXECUTED 400035f0: 81 e8 00 00 restore <== NOT EXECUTED 4000229c : } void free( void *ptr ) { 4000229c: 9d e3 bf 98 save %sp, -104, %sp MSBUMP(free_calls, 1); if ( !ptr ) 400022a0: 80 a6 20 00 cmp %i0, 0 400022a4: 02 80 00 19 be 40002308 400022a8: 03 10 00 6b sethi %hi(0x4001ac00), %g1 /* * Do not attempt to free memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 400022ac: c4 00 61 40 ld [ %g1 + 0x140 ], %g2 ! 4001ad40 <_System_state_Current> 400022b0: 80 a0 a0 03 cmp %g2, 3 400022b4: 12 80 00 0e bne 400022ec 400022b8: 03 10 00 6a sethi %hi(0x4001a800), %g1 if ((_Thread_Dispatch_disable_level > 0) || (_ISR_Nest_level > 0)) { 400022bc: c4 00 63 60 ld [ %g1 + 0x360 ], %g2 ! 4001ab60 <_Thread_Dispatch_disable_level> 400022c0: 80 a0 a0 00 cmp %g2, 0 400022c4: 12 80 00 06 bne 400022dc 400022c8: 03 10 00 6b sethi %hi(0x4001ac00), %g1 400022cc: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 ! 4001ac24 <_ISR_Nest_level> 400022d0: 80 a0 a0 00 cmp %g2, 0 400022d4: 02 80 00 07 be 400022f0 400022d8: 37 10 00 6a sethi %hi(0x4001a800), %i3 Chain_Append(&RTEMS_Malloc_GC_list, (Chain_Node *)ptr); 400022dc: b2 10 00 18 mov %i0, %i1 400022e0: 31 10 00 6a sethi %hi(0x4001a800), %i0 400022e4: 40 00 12 a3 call 40006d70 <_Chain_Append> 400022e8: 91 ee 21 fc restore %i0, 0x1fc, %o0 MSBUMP(lifetime_freed, size); } } #endif if ( !_Protected_heap_Free( &RTEMS_Malloc_Heap, ptr ) ) { 400022ec: 37 10 00 6a sethi %hi(0x4001a800), %i3 <== NOT EXECUTED 400022f0: 92 10 00 18 mov %i0, %o1 400022f4: 40 00 18 cf call 40008630 <_Protected_heap_Free> 400022f8: 90 16 e1 a0 or %i3, 0x1a0, %o0 400022fc: 80 a2 20 00 cmp %o0, 0 40002300: 02 80 00 04 be 40002310 40002304: 82 16 e1 a0 or %i3, 0x1a0, %g1 40002308: 81 c7 e0 08 ret 4000230c: 81 e8 00 00 restore printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 40002310: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 <== NOT EXECUTED 40002314: f4 00 60 18 ld [ %g1 + 0x18 ], %i2 <== NOT EXECUTED 40002318: b2 10 00 18 mov %i0, %i1 <== NOT EXECUTED 4000231c: 31 10 00 63 sethi %hi(0x40018c00), %i0 <== NOT EXECUTED 40002320: 40 00 03 c8 call 40003240 <== NOT EXECUTED 40002324: 91 ee 21 18 restore %i0, 0x118, %o0 <== NOT EXECUTED 40002328: 01 00 00 00 nop 40019760 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 40019760: 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 40019764: 03 10 00 fc sethi %hi(0x4003f000), %g1 <== NOT EXECUTED 40019768: 82 10 60 54 or %g1, 0x54, %g1 ! 4003f054 <== NOT EXECUTED 4001976c: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 40019770: 02 80 00 18 be 400197d0 <== NOT EXECUTED 40019774: 01 00 00 00 nop <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 40019778: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED 4001977c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40019780: 22 80 00 09 be,a 400197a4 <== NOT EXECUTED 40019784: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED 40019788: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4001978c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40019790: 22 80 00 05 be,a 400197a4 <== NOT EXECUTED 40019794: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED 40019798: 9f c0 40 00 call %g1 <== NOT EXECUTED 4001979c: 90 06 20 04 add %i0, 4, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 400197a0: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED 400197a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400197a8: 02 80 00 08 be 400197c8 <== NOT EXECUTED 400197ac: 01 00 00 00 nop <== NOT EXECUTED 400197b0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400197b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400197b8: 02 80 00 04 be 400197c8 <== NOT EXECUTED 400197bc: 01 00 00 00 nop <== NOT EXECUTED 400197c0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400197c4: 90 06 20 14 add %i0, 0x14, %o0 <== NOT EXECUTED free(env); 400197c8: 7f ff af 40 call 400054c8 <== NOT EXECUTED 400197cc: 81 e8 00 00 restore <== NOT EXECUTED 400197d0: 81 c7 e0 08 ret <== NOT EXECUTED 400197d4: 81 e8 00 00 restore <== NOT EXECUTED 400180b0 : int fstat( int fd, struct stat *sbuf ) { 400180b0: 9d e3 bf 98 save %sp, -104, %sp /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 400180b4: 92 96 60 00 orcc %i1, 0, %o1 400180b8: 02 80 00 3f be 400181b4 400180bc: 03 10 00 66 sethi %hi(0x40019800), %g1 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 400180c0: c4 00 60 fc ld [ %g1 + 0xfc ], %g2 ! 400198fc 400180c4: 80 a6 00 02 cmp %i0, %g2 400180c8: 1a 80 00 2f bcc 40018184 400180cc: 03 10 00 6a sethi %hi(0x4001a800), %g1 400180d0: c6 00 61 94 ld [ %g1 + 0x194 ], %g3 ! 4001a994 400180d4: 85 2e 20 02 sll %i0, 2, %g2 400180d8: 83 2e 20 04 sll %i0, 4, %g1 400180dc: 82 20 40 02 sub %g1, %g2, %g1 400180e0: 82 00 40 18 add %g1, %i0, %g1 400180e4: 83 28 60 02 sll %g1, 2, %g1 400180e8: 90 00 40 03 add %g1, %g3, %o0 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 400180ec: c4 02 20 0c ld [ %o0 + 0xc ], %g2 400180f0: 80 88 a1 00 btst 0x100, %g2 400180f4: 02 80 00 24 be 40018184 400180f8: 01 00 00 00 nop if ( !iop->handlers ) 400180fc: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 40018100: 80 a0 60 00 cmp %g1, 0 40018104: 02 80 00 20 be 40018184 40018108: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 4001810c: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 40018110: 80 a0 60 00 cmp %g1, 0 40018114: 02 80 00 22 be 4001819c 40018118: 01 00 00 00 nop /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 4001811c: c0 22 40 00 clr [ %o1 ] 40018120: c0 22 60 04 clr [ %o1 + 4 ] 40018124: c0 22 60 08 clr [ %o1 + 8 ] 40018128: c0 22 60 0c clr [ %o1 + 0xc ] 4001812c: c0 22 60 10 clr [ %o1 + 0x10 ] 40018130: c0 22 60 14 clr [ %o1 + 0x14 ] 40018134: c0 22 60 18 clr [ %o1 + 0x18 ] 40018138: c0 22 60 1c clr [ %o1 + 0x1c ] 4001813c: c0 22 60 20 clr [ %o1 + 0x20 ] 40018140: c0 22 60 24 clr [ %o1 + 0x24 ] 40018144: c0 22 60 28 clr [ %o1 + 0x28 ] 40018148: c0 22 60 2c clr [ %o1 + 0x2c ] 4001814c: c0 22 60 30 clr [ %o1 + 0x30 ] 40018150: c0 22 60 34 clr [ %o1 + 0x34 ] 40018154: c0 22 60 38 clr [ %o1 + 0x38 ] 40018158: c0 22 60 3c clr [ %o1 + 0x3c ] 4001815c: c0 22 60 40 clr [ %o1 + 0x40 ] 40018160: c0 22 60 44 clr [ %o1 + 0x44 ] 40018164: c0 22 60 48 clr [ %o1 + 0x48 ] 40018168: c0 22 60 4c clr [ %o1 + 0x4c ] return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 4001816c: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 40018170: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 40018174: 9f c0 80 00 call %g2 40018178: 90 02 20 10 add %o0, 0x10, %o0 } 4001817c: 81 c7 e0 08 ret 40018180: 91 e8 00 08 restore %g0, %o0, %o0 iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 40018184: 7f ff db 1a call 4000edec <__errno> 40018188: 01 00 00 00 nop 4001818c: 82 10 20 09 mov 9, %g1 ! 9 40018190: c2 22 00 00 st %g1, [ %o0 ] 40018194: 10 bf ff fa b 4001817c 40018198: 90 10 3f ff mov -1, %o0 if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001819c: 7f ff db 14 call 4000edec <__errno> <== NOT EXECUTED 400181a0: 01 00 00 00 nop <== NOT EXECUTED 400181a4: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 400181a8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400181ac: 10 bf ff f4 b 4001817c <== NOT EXECUTED 400181b0: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 400181b4: 7f ff db 0e call 4000edec <__errno> 400181b8: 01 00 00 00 nop 400181bc: 82 10 20 0e mov 0xe, %g1 ! e 400181c0: c2 22 00 00 st %g1, [ %o0 ] 400181c4: 10 bf ff ee b 4001817c 400181c8: 90 10 3f ff mov -1, %o0 40003728 : #include int fsync( int fd ) { 40003728: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_t *iop; rtems_libio_check_fd( fd ); 4000372c: 03 10 00 61 sethi %hi(0x40018400), %g1 40003730: c4 00 60 cc ld [ %g1 + 0xcc ], %g2 ! 400184cc 40003734: 80 a6 00 02 cmp %i0, %g2 40003738: 1a 80 00 1b bcc 400037a4 4000373c: 03 10 00 65 sethi %hi(0x40019400), %g1 iop = rtems_libio_iop( fd ); 40003740: c6 00 61 a0 ld [ %g1 + 0x1a0 ], %g3 ! 400195a0 40003744: 85 2e 20 02 sll %i0, 2, %g2 40003748: 83 2e 20 04 sll %i0, 4, %g1 4000374c: 82 20 40 02 sub %g1, %g2, %g1 40003750: 82 00 40 18 add %g1, %i0, %g1 40003754: 83 28 60 02 sll %g1, 2, %g1 40003758: 90 00 40 03 add %g1, %g3, %o0 rtems_libio_check_is_open(iop); 4000375c: c6 02 20 0c ld [ %o0 + 0xc ], %g3 40003760: 80 88 e1 00 btst 0x100, %g3 40003764: 02 80 00 10 be 400037a4 40003768: 80 88 e0 04 btst 4, %g3 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4000376c: 02 80 00 14 be 400037bc 40003770: 01 00 00 00 nop /* * Now process the fsync(). */ if ( !iop->handlers ) 40003774: c6 02 20 30 ld [ %o0 + 0x30 ], %g3 40003778: 80 a0 e0 00 cmp %g3, 0 4000377c: 02 80 00 0a be 400037a4 40003780: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) 40003784: c2 00 e0 28 ld [ %g3 + 0x28 ], %g1 40003788: 80 a0 60 00 cmp %g1, 0 4000378c: 02 80 00 12 be 400037d4 40003790: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 40003794: 9f c0 40 00 call %g1 40003798: 01 00 00 00 nop } 4000379c: 81 c7 e0 08 ret 400037a0: 91 e8 00 08 restore %g0, %o0, %o0 /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 400037a4: 40 00 38 91 call 400119e8 <__errno> <== NOT EXECUTED 400037a8: 01 00 00 00 nop <== NOT EXECUTED 400037ac: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 400037b0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400037b4: 10 bf ff fa b 4000379c <== NOT EXECUTED 400037b8: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 400037bc: 40 00 38 8b call 400119e8 <__errno> 400037c0: 01 00 00 00 nop 400037c4: 82 10 20 16 mov 0x16, %g1 ! 16 400037c8: c2 22 00 00 st %g1, [ %o0 ] 400037cc: 10 bf ff f4 b 4000379c 400037d0: 90 10 3f ff mov -1, %o0 if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 400037d4: 40 00 38 85 call 400119e8 <__errno> 400037d8: 01 00 00 00 nop 400037dc: 82 10 20 86 mov 0x86, %g1 ! 86 400037e0: c2 22 00 00 st %g1, [ %o0 ] 400037e4: 10 bf ff ee b 4000379c 400037e8: 90 10 3f ff mov -1, %o0 4000c008 : int ftruncate( int fd, off_t length ) { 4000c008: 9d e3 bf 88 save %sp, -120, %sp rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 4000c00c: 03 10 00 66 sethi %hi(0x40019800), %g1 4000c010: c4 00 60 fc ld [ %g1 + 0xfc ], %g2 ! 400198fc 4000c014: 80 a6 00 02 cmp %i0, %g2 4000c018: 1a 80 00 2b bcc 4000c0c4 4000c01c: 03 10 00 6a sethi %hi(0x4001a800), %g1 iop = rtems_libio_iop( fd ); 4000c020: c6 00 61 94 ld [ %g1 + 0x194 ], %g3 ! 4001a994 4000c024: 85 2e 20 02 sll %i0, 2, %g2 4000c028: 83 2e 20 04 sll %i0, 4, %g1 4000c02c: 82 20 40 02 sub %g1, %g2, %g1 4000c030: 82 00 40 18 add %g1, %i0, %g1 4000c034: 83 28 60 02 sll %g1, 2, %g1 4000c038: b0 00 40 03 add %g1, %g3, %i0 rtems_libio_check_is_open(iop); 4000c03c: c4 06 20 0c ld [ %i0 + 0xc ], %g2 4000c040: 80 88 a1 00 btst 0x100, %g2 4000c044: 02 80 00 20 be 4000c0c4 4000c048: 01 00 00 00 nop /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 4000c04c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 4000c050: c2 27 bf e8 st %g1, [ %fp + -24 ] 4000c054: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 4000c058: c4 27 bf ec st %g2, [ %fp + -20 ] 4000c05c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 4000c060: c2 27 bf f0 st %g1, [ %fp + -16 ] 4000c064: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 if ( !loc.ops->node_type_h ) 4000c068: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 4000c06c: 80 a0 60 00 cmp %g1, 0 4000c070: 02 80 00 1b be 4000c0dc 4000c074: c4 27 bf f4 st %g2, [ %fp + -12 ] rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 4000c078: 9f c0 40 00 call %g1 4000c07c: 90 07 bf e8 add %fp, -24, %o0 4000c080: 80 a2 20 01 cmp %o0, 1 4000c084: 02 80 00 22 be 4000c10c 4000c088: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4000c08c: c2 06 20 0c ld [ %i0 + 0xc ], %g1 4000c090: 80 88 60 04 btst 4, %g1 4000c094: 02 80 00 18 be 4000c0f4 4000c098: 01 00 00 00 nop if ( !iop->handlers->ftruncate_h ) 4000c09c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 4000c0a0: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 4000c0a4: 80 a0 60 00 cmp %g1, 0 4000c0a8: 02 80 00 0d be 4000c0dc 4000c0ac: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); 4000c0b0: 90 10 00 18 mov %i0, %o0 4000c0b4: 9f c0 40 00 call %g1 4000c0b8: 92 10 00 19 mov %i1, %o1 } 4000c0bc: 81 c7 e0 08 ret 4000c0c0: 91 e8 00 08 restore %g0, %o0, %o0 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 4000c0c4: 40 00 0b 4a call 4000edec <__errno> <== NOT EXECUTED 4000c0c8: 01 00 00 00 nop <== NOT EXECUTED 4000c0cc: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 4000c0d0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000c0d4: 10 bf ff fa b 4000c0bc <== NOT EXECUTED 4000c0d8: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000c0dc: 40 00 0b 44 call 4000edec <__errno> <== NOT EXECUTED 4000c0e0: 01 00 00 00 nop <== NOT EXECUTED 4000c0e4: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4000c0e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000c0ec: 10 bf ff f4 b 4000c0bc <== NOT EXECUTED 4000c0f0: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4000c0f4: 40 00 0b 3e call 4000edec <__errno> <== NOT EXECUTED 4000c0f8: 01 00 00 00 nop <== NOT EXECUTED 4000c0fc: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4000c100: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000c104: 10 bf ff ee b 4000c0bc <== NOT EXECUTED 4000c108: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); 4000c10c: 40 00 0b 38 call 4000edec <__errno> <== NOT EXECUTED 4000c110: 01 00 00 00 nop <== NOT EXECUTED 4000c114: 82 10 20 15 mov 0x15, %g1 ! 15 <== NOT EXECUTED 4000c118: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000c11c: 10 bf ff e8 b 4000c0bc <== NOT EXECUTED 4000c120: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 4001871c : char * getcwd (pt, size) char *pt; size_t size; { 4001871c: 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) 40018720: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40018724: 02 80 00 fa be 40018b0c <== NOT EXECUTED 40018728: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED if (!size) { errno = EINVAL; return (char *) NULL; } ept = pt + size; 4001872c: b6 10 20 00 clr %i3 <== NOT EXECUTED */ if (pt) { ptsize = 0; if (!size) 40018730: 02 80 00 f1 be 40018af4 <== NOT EXECUTED 40018734: b2 06 00 19 add %i0, %i1, %i1 <== NOT EXECUTED return (char *) NULL; } ept = pt + ptsize; } bpt = ept - 1; *bpt = '\0'; 40018738: 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))) 4001873c: 90 10 23 fc mov 0x3fc, %o0 <== NOT EXECUTED 40018740: 7f ff b3 8b call 4000556c <== NOT EXECUTED 40018744: b8 06 7f ff add %i1, -1, %i4 <== NOT EXECUTED 40018748: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 4001874c: 02 80 00 0c be 4001877c <== NOT EXECUTED 40018750: 82 10 20 2e mov 0x2e, %g1 <== NOT EXECUTED goto err; } eup = up + MAXPATHLEN; bup = up; up[0] = '.'; up[1] = '\0'; 40018754: c0 2c 60 01 clrb [ %l1 + 1 ] <== NOT EXECUTED { goto err; } eup = up + MAXPATHLEN; bup = up; up[0] = '.'; 40018758: c2 2c 40 00 stb %g1, [ %l1 ] <== NOT EXECUTED up[1] = '\0'; /* Save root values, so know when to stop. */ if (stat ("/", &s)) 4001875c: ae 07 bf a8 add %fp, -88, %l7 <== NOT EXECUTED 40018760: 11 10 00 e2 sethi %hi(0x40038800), %o0 <== NOT EXECUTED 40018764: 92 10 00 17 mov %l7, %o1 <== NOT EXECUTED 40018768: 7f ff b8 45 call 4000687c <== NOT EXECUTED 4001876c: 90 12 22 58 or %o0, 0x258, %o0 <== NOT EXECUTED 40018770: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40018774: 02 80 00 10 be 400187b4 <== NOT EXECUTED 40018778: c4 1f bf a8 ldd [ %fp + -88 ], %g2 <== NOT EXECUTED /* FALLTHROUGH */ err: if(dir) (void) _closedir (dir); if (ptsize) 4001877c: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 40018780: 12 80 00 06 bne 40018798 <== NOT EXECUTED 40018784: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED free (pt); free (up); 40018788: 7f ff b3 50 call 400054c8 <== NOT EXECUTED 4001878c: b0 10 20 00 clr %i0 <== NOT EXECUTED 40018790: 81 c7 e0 08 ret <== NOT EXECUTED 40018794: 81 e8 00 00 restore <== NOT EXECUTED err: if(dir) (void) _closedir (dir); if (ptsize) free (pt); 40018798: 7f ff b3 4c call 400054c8 <== NOT EXECUTED 4001879c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED free (up); 400187a0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400187a4: 7f ff b3 49 call 400054c8 <== NOT EXECUTED 400187a8: b0 10 20 00 clr %i0 <== NOT EXECUTED 400187ac: 81 c7 e0 08 ret <== NOT EXECUTED 400187b0: 81 e8 00 00 restore <== NOT EXECUTED if (!(up = (char *) malloc (upsize = 1024 - 4))) { goto err; } eup = up + MAXPATHLEN; 400187b4: 82 04 64 00 add %l1, 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; 400187b8: c4 3f bf 98 std %g2, [ %fp + -104 ] <== NOT EXECUTED root_ino = s.st_ino; 400187bc: c6 07 bf b0 ld [ %fp + -80 ], %g3 <== NOT EXECUTED if (!(up = (char *) malloc (upsize = 1024 - 4))) { goto err; } eup = up + MAXPATHLEN; 400187c0: 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. */ 400187c4: 40 00 37 4d call 400264f8 <__errno> <== NOT EXECUTED 400187c8: c6 27 bf a0 st %g3, [ %fp + -96 ] <== NOT EXECUTED 400187cc: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED 400187d0: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED 400187d4: a8 10 00 11 mov %l1, %l4 <== NOT EXECUTED 400187d8: c4 27 bf 94 st %g2, [ %fp + -108 ] <== NOT EXECUTED 400187dc: b4 10 23 fc mov 0x3fc, %i2 <== NOT EXECUTED for (first = 1;; first = 0) { /* Stat the current level. */ if (_stat (up, &s)) 400187e0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400187e4: 7f ff b8 26 call 4000687c <== NOT EXECUTED 400187e8: 92 10 00 17 mov %l7, %o1 <== NOT EXECUTED 400187ec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400187f0: 12 bf ff e3 bne 4001877c <== NOT EXECUTED 400187f4: e4 1f bf a8 ldd [ %fp + -88 ], %l2 <== 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) 400187f8: c6 07 bf 98 ld [ %fp + -104 ], %g3 <== NOT EXECUTED 400187fc: 80 a0 c0 12 cmp %g3, %l2 <== NOT EXECUTED 40018800: 02 80 00 a9 be 40018aa4 <== NOT EXECUTED 40018804: fa 07 bf b0 ld [ %fp + -80 ], %i5 <== 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) 40018808: c6 07 bf a4 ld [ %fp + -92 ], %g3 <== NOT EXECUTED 4001880c: 82 05 24 04 add %l4, 0x404, %g1 <== NOT EXECUTED 40018810: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 40018814: 08 80 00 5a bleu 4001897c <== NOT EXECUTED 40018818: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED goto err; } bup = up; eup = up + upsize; } *bup++ = '.'; 4001881c: 82 10 20 2e mov 0x2e, %g1 <== NOT EXECUTED *bup++ = '.'; *bup = '\0'; 40018820: c0 2d 20 02 clrb [ %l4 + 2 ] <== NOT EXECUTED } bup = up; eup = up + upsize; } *bup++ = '.'; *bup++ = '.'; 40018824: c2 2d 20 01 stb %g1, [ %l4 + 1 ] <== NOT EXECUTED goto err; } bup = up; eup = up + upsize; } *bup++ = '.'; 40018828: c2 2d 00 00 stb %g1, [ %l4 ] <== NOT EXECUTED *bup++ = '.'; *bup = '\0'; /* Open and stat parent directory. */ if (!(dir = _opendir (up)) || _fstat (__dirfd (dir), &s)) 4001882c: 40 00 03 a8 call 400196cc <== NOT EXECUTED 40018830: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40018834: aa 92 20 00 orcc %o0, 0, %l5 <== NOT EXECUTED 40018838: 02 bf ff d2 be 40018780 <== NOT EXECUTED 4001883c: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 40018840: d0 05 40 00 ld [ %l5 ], %o0 <== NOT EXECUTED 40018844: 40 00 2d 8d call 40023e78 <== NOT EXECUTED 40018848: 92 10 00 17 mov %l7, %o1 <== NOT EXECUTED 4001884c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40018850: 12 80 00 39 bne 40018934 <== NOT EXECUTED 40018854: 82 10 20 2f mov 0x2f, %g1 <== NOT EXECUTED goto err; /* Add trailing slash for next directory. */ *bup++ = '/'; 40018858: c2 2d 20 02 stb %g1, [ %l4 + 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) 4001885c: c2 07 bf a8 ld [ %fp + -88 ], %g1 <== NOT EXECUTED 40018860: 80 a0 40 12 cmp %g1, %l2 <== NOT EXECUTED 40018864: 02 80 00 4f be 400189a0 <== NOT EXECUTED 40018868: a8 05 20 03 add %l4, 3, %l4 <== NOT EXECUTED 4001886c: ac 10 20 00 clr %l6 <== NOT EXECUTED } } else for (;;) { if (!(dp = _readdir (dir))) 40018870: 40 00 04 59 call 400199d4 <== NOT EXECUTED 40018874: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 40018878: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001887c: 02 80 00 28 be 4001891c <== NOT EXECUTED 40018880: 01 00 00 00 nop <== NOT EXECUTED goto notfound; if (ISDOT (dp)) 40018884: c2 4a 20 0c ldsb [ %o0 + 0xc ], %g1 <== NOT EXECUTED 40018888: 80 a0 60 2e cmp %g1, 0x2e <== NOT EXECUTED 4001888c: 12 80 00 0d bne 400188c0 <== NOT EXECUTED 40018890: a0 02 20 0c add %o0, 0xc, %l0 <== NOT EXECUTED 40018894: c2 4a 20 0d ldsb [ %o0 + 0xd ], %g1 <== NOT EXECUTED 40018898: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001889c: 02 bf ff f5 be 40018870 <== NOT EXECUTED 400188a0: 05 00 3f ff sethi %hi(0xfffc00), %g2 <== NOT EXECUTED 400188a4: c2 02 20 0c ld [ %o0 + 0xc ], %g1 <== NOT EXECUTED 400188a8: 07 00 0b 80 sethi %hi(0x2e0000), %g3 <== NOT EXECUTED 400188ac: 84 10 a3 00 or %g2, 0x300, %g2 <== NOT EXECUTED 400188b0: 82 08 40 02 and %g1, %g2, %g1 <== NOT EXECUTED 400188b4: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 400188b8: 02 bf ff ee be 40018870 <== NOT EXECUTED 400188bc: 01 00 00 00 nop <== NOT EXECUTED continue; bcopy (dp->d_name, bup, strlen (dp->d_name) + 1); 400188c0: 40 00 4c 05 call 4002b8d4 <== NOT EXECUTED 400188c4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400188c8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 400188cc: 94 02 20 01 add %o0, 1, %o2 <== NOT EXECUTED 400188d0: 40 00 3d eb call 4002807c <== NOT EXECUTED 400188d4: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED /* Save the first error for later. */ if (stat (up, &s)) 400188d8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400188dc: 7f ff b7 e8 call 4000687c <== NOT EXECUTED 400188e0: 92 10 00 17 mov %l7, %o1 <== NOT EXECUTED 400188e4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400188e8: 02 80 00 17 be 40018944 <== NOT EXECUTED 400188ec: c2 07 bf a8 ld [ %fp + -88 ], %g1 <== NOT EXECUTED { if (!save_errno) 400188f0: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED 400188f4: 02 80 00 1e be 4001896c <== NOT EXECUTED 400188f8: 01 00 00 00 nop <== NOT EXECUTED save_errno = errno; errno = 0; 400188fc: 40 00 36 ff call 400264f8 <__errno> <== NOT EXECUTED 40018900: 01 00 00 00 nop <== NOT EXECUTED 40018904: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED } } else for (;;) { if (!(dp = _readdir (dir))) 40018908: 40 00 04 33 call 400199d4 <== NOT EXECUTED 4001890c: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 40018910: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40018914: 32 bf ff dd bne,a 40018888 <== NOT EXECUTED 40018918: c2 4a 20 0c ldsb [ %o0 + 0xc ], %g1 <== NOT EXECUTED * If readdir set errno, use it, not any saved error; otherwise, * didn't find the current directory in its parent directory, set * errno to ENOENT. */ if (!errno) 4001891c: 40 00 36 f7 call 400264f8 <__errno> <== NOT EXECUTED 40018920: 01 00 00 00 nop <== NOT EXECUTED 40018924: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40018928: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001892c: 02 80 00 57 be 40018a88 <== NOT EXECUTED 40018930: 01 00 00 00 nop <== NOT EXECUTED errno = save_errno ? save_errno : ENOENT; /* FALLTHROUGH */ err: if(dir) (void) _closedir (dir); 40018934: 7f ff fe 91 call 40018378 <== NOT EXECUTED 40018938: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED if (ptsize) 4001893c: 10 bf ff 91 b 40018780 <== NOT EXECUTED 40018940: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED if (!save_errno) save_errno = errno; errno = 0; continue; } if (s.st_dev == dev && s.st_ino == ino) 40018944: 80 a0 40 12 cmp %g1, %l2 <== NOT EXECUTED 40018948: 12 bf ff ca bne 40018870 <== NOT EXECUTED 4001894c: c2 07 bf ac ld [ %fp + -84 ], %g1 <== NOT EXECUTED 40018950: 80 a0 40 13 cmp %g1, %l3 <== NOT EXECUTED 40018954: 12 bf ff c7 bne 40018870 <== NOT EXECUTED 40018958: c2 07 bf b0 ld [ %fp + -80 ], %g1 <== NOT EXECUTED 4001895c: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED 40018960: 12 bf ff c4 bne 40018870 <== NOT EXECUTED 40018964: 01 00 00 00 nop <== NOT EXECUTED 40018968: 30 80 00 1b b,a 400189d4 <== NOT EXECUTED /* Save the first error for later. */ if (stat (up, &s)) { if (!save_errno) save_errno = errno; 4001896c: 40 00 36 e3 call 400264f8 <__errno> <== NOT EXECUTED 40018970: 01 00 00 00 nop <== NOT EXECUTED 40018974: 10 bf ff e2 b 400188fc <== NOT EXECUTED 40018978: ec 02 00 00 ld [ %o0 ], %l6 <== NOT EXECUTED * possible component name, plus a trailing NULL. */ if (bup + 3 + MAXNAMLEN + 1 >= eup) { if (!(up = (char *) realloc (up, upsize *= 2))) 4001897c: b5 2e a0 01 sll %i2, 1, %i2 <== NOT EXECUTED 40018980: 7f ff b3 4c call 400056b0 <== NOT EXECUTED 40018984: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 40018988: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 4001898c: 02 bf ff 7c be 4001877c <== NOT EXECUTED 40018990: 82 04 40 1a add %l1, %i2, %g1 <== NOT EXECUTED { goto err; } bup = up; eup = up + upsize; 40018994: a8 10 00 11 mov %l1, %l4 <== NOT EXECUTED 40018998: 10 bf ff a1 b 4001881c <== NOT EXECUTED 4001899c: c2 27 bf a4 st %g1, [ %fp + -92 ] <== NOT EXECUTED * the inode number in the directory is for the entry in the * parent directory, not the inode number of the mounted file. */ save_errno = 0; if (s.st_dev == dev) 400189a0: c2 07 bf ac ld [ %fp + -84 ], %g1 <== NOT EXECUTED 400189a4: 80 a0 40 13 cmp %g1, %l3 <== NOT EXECUTED 400189a8: 12 bf ff b2 bne 40018870 <== NOT EXECUTED 400189ac: ac 10 20 00 clr %l6 <== NOT EXECUTED { for (;;) { if (!(dp = _readdir (dir))) 400189b0: 40 00 04 09 call 400199d4 <== NOT EXECUTED 400189b4: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 400189b8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400189bc: 02 bf ff d8 be 4001891c <== NOT EXECUTED 400189c0: ac 10 20 00 clr %l6 <== NOT EXECUTED goto notfound; if (dp->d_ino == ino) 400189c4: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 400189c8: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED 400189cc: 12 bf ff f9 bne 400189b0 <== NOT EXECUTED 400189d0: a0 02 20 0c add %o0, 0xc, %l0 <== NOT EXECUTED /* * Check for length of the current name, preceding slash, * leading slash. */ if (bpt - pt <= strlen (dp->d_name) + (first ? 1 : 2)) 400189d4: 40 00 4b c0 call 4002b8d4 <== NOT EXECUTED 400189d8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400189dc: c2 07 bf 94 ld [ %fp + -108 ], %g1 <== NOT EXECUTED 400189e0: a4 27 00 18 sub %i4, %i0, %l2 <== NOT EXECUTED 400189e4: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 400189e8: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED 400189ec: 82 00 60 01 inc %g1 <== NOT EXECUTED 400189f0: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED 400189f4: 80 a4 80 01 cmp %l2, %g1 <== NOT EXECUTED 400189f8: 18 80 00 13 bgu 40018a44 <== NOT EXECUTED 400189fc: c4 07 bf 94 ld [ %fp + -108 ], %g2 <== NOT EXECUTED { size_t len, off; if (!ptsize) 40018a00: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 40018a04: 02 80 00 4a be 40018b2c <== NOT EXECUTED 40018a08: 01 00 00 00 nop <== NOT EXECUTED errno = ERANGE; goto err; } off = bpt - pt; len = ept - bpt; if (!(pt = (char *) realloc (pt, ptsize *= 2))) 40018a0c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40018a10: b7 2e e0 01 sll %i3, 1, %i3 <== NOT EXECUTED 40018a14: 7f ff b3 27 call 400056b0 <== NOT EXECUTED 40018a18: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 40018a1c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40018a20: 02 bf ff c5 be 40018934 <== NOT EXECUTED 40018a24: 82 26 40 1c sub %i1, %i4, %g1 <== NOT EXECUTED { goto err; } bpt = pt + off; ept = pt + ptsize; (void) bcopy (bpt, ept - len, len); 40018a28: 92 06 00 12 add %i0, %l2, %o1 <== NOT EXECUTED if (!(pt = (char *) realloc (pt, ptsize *= 2))) { goto err; } bpt = pt + off; ept = pt + ptsize; 40018a2c: b2 06 00 1b add %i0, %i3, %i1 <== NOT EXECUTED (void) bcopy (bpt, ept - len, len); 40018a30: 94 10 00 01 mov %g1, %o2 <== NOT EXECUTED 40018a34: b8 26 40 01 sub %i1, %g1, %i4 <== NOT EXECUTED 40018a38: 40 00 3d 91 call 4002807c <== NOT EXECUTED 40018a3c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED bpt = ept - len; } if (!first) 40018a40: c4 07 bf 94 ld [ %fp + -108 ], %g2 <== NOT EXECUTED 40018a44: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40018a48: 12 80 00 04 bne 40018a58 <== NOT EXECUTED 40018a4c: 82 10 20 2f mov 0x2f, %g1 <== NOT EXECUTED *--bpt = '/'; 40018a50: b8 07 3f ff add %i4, -1, %i4 <== NOT EXECUTED 40018a54: c2 2f 00 00 stb %g1, [ %i4 ] <== NOT EXECUTED bpt -= strlen (dp->d_name); 40018a58: 40 00 4b 9f call 4002b8d4 <== NOT EXECUTED 40018a5c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED bcopy (dp->d_name, bpt, strlen (dp->d_name)); 40018a60: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40018a64: 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); 40018a68: b8 27 00 08 sub %i4, %o0, %i4 <== NOT EXECUTED bcopy (dp->d_name, bpt, strlen (dp->d_name)); (void) _closedir (dir); dir = 0; /* Truncate any file name. */ *bup = '\0'; 40018a6c: 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)); 40018a70: 40 00 3d 83 call 4002807c <== NOT EXECUTED 40018a74: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED (void) _closedir (dir); 40018a78: 7f ff fe 40 call 40018378 <== NOT EXECUTED 40018a7c: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED dir = 0; /* Truncate any file name. */ *bup = '\0'; 40018a80: 10 bf ff 58 b 400187e0 <== NOT EXECUTED 40018a84: c0 2d 00 00 clrb [ %l4 ] <== NOT EXECUTED * didn't find the current directory in its parent directory, set * errno to ENOENT. */ if (!errno) errno = save_errno ? save_errno : ENOENT; 40018a88: 40 00 36 9c call 400264f8 <__errno> <== NOT EXECUTED 40018a8c: 01 00 00 00 nop <== NOT EXECUTED 40018a90: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED 40018a94: 22 80 00 16 be,a 40018aec <== NOT EXECUTED 40018a98: ac 10 20 02 mov 2, %l6 <== NOT EXECUTED 40018a9c: 10 bf ff a6 b 40018934 <== NOT EXECUTED 40018aa0: ec 22 00 00 st %l6, [ %o0 ] <== NOT EXECUTED /* Save current node values. */ ino = s.st_ino; dev = s.st_dev; /* Check for reaching root. */ if (root_dev == dev && root_ino == ino) 40018aa4: c2 07 bf 9c ld [ %fp + -100 ], %g1 <== NOT EXECUTED 40018aa8: 80 a0 40 13 cmp %g1, %l3 <== NOT EXECUTED 40018aac: 12 bf ff 58 bne 4001880c <== NOT EXECUTED 40018ab0: c6 07 bf a4 ld [ %fp + -92 ], %g3 <== NOT EXECUTED 40018ab4: c4 07 bf a0 ld [ %fp + -96 ], %g2 <== NOT EXECUTED 40018ab8: 80 a0 80 1d cmp %g2, %i5 <== NOT EXECUTED 40018abc: 12 bf ff 55 bne 40018810 <== NOT EXECUTED 40018ac0: 82 05 24 04 add %l4, 0x404, %g1 <== NOT EXECUTED { *--bpt = '/'; 40018ac4: 82 10 20 2f mov 0x2f, %g1 <== NOT EXECUTED 40018ac8: 92 07 3f ff add %i4, -1, %o1 <== NOT EXECUTED 40018acc: c2 2f 3f ff stb %g1, [ %i4 + -1 ] <== NOT EXECUTED /* * It's unclear that it's a requirement to copy the * path to the beginning of the buffer, but it's always * been that way and stuff would probably break. */ (void) bcopy (bpt, pt, ept - bpt); 40018ad0: 94 26 40 09 sub %i1, %o1, %o2 <== NOT EXECUTED 40018ad4: 40 00 3d 6a call 4002807c <== NOT EXECUTED 40018ad8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED free (up); 40018adc: 7f ff b2 7b call 400054c8 <== NOT EXECUTED 40018ae0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40018ae4: 81 c7 e0 08 ret <== NOT EXECUTED 40018ae8: 81 e8 00 00 restore <== NOT EXECUTED * didn't find the current directory in its parent directory, set * errno to ENOENT. */ if (!errno) errno = save_errno ? save_errno : ENOENT; 40018aec: 10 bf ff 92 b 40018934 <== NOT EXECUTED 40018af0: ec 22 00 00 st %l6, [ %o0 ] <== NOT EXECUTED if (pt) { ptsize = 0; if (!size) { errno = EINVAL; 40018af4: 40 00 36 81 call 400264f8 <__errno> <== NOT EXECUTED 40018af8: b0 10 20 00 clr %i0 <== NOT EXECUTED 40018afc: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40018b00: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40018b04: 81 c7 e0 08 ret <== NOT EXECUTED 40018b08: 81 e8 00 00 restore <== NOT EXECUTED } ept = pt + size; } else { if (!(pt = (char *) malloc (ptsize = 1024 - 4))) 40018b0c: 7f ff b2 98 call 4000556c <== NOT EXECUTED 40018b10: 90 10 23 fc mov 0x3fc, %o0 <== NOT EXECUTED 40018b14: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40018b18: 02 bf ff 1e be 40018790 <== NOT EXECUTED 40018b1c: b6 10 23 fc mov 0x3fc, %i3 <== NOT EXECUTED 40018b20: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED { return (char *) NULL; } ept = pt + ptsize; 40018b24: 10 bf ff 05 b 40018738 <== NOT EXECUTED 40018b28: b2 02 23 fc add %o0, 0x3fc, %i1 <== NOT EXECUTED { size_t len, off; if (!ptsize) { errno = ERANGE; 40018b2c: 40 00 36 73 call 400264f8 <__errno> <== NOT EXECUTED 40018b30: 01 00 00 00 nop <== NOT EXECUTED 40018b34: 82 10 20 22 mov 0x22, %g1 ! 22 <== NOT EXECUTED 40018b38: 10 bf ff 7f b 40018934 <== NOT EXECUTED 40018b3c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40023fac : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 40023fac: 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 ); 40023fb0: 03 10 00 ef sethi %hi(0x4003bc00), %g1 40023fb4: c4 00 62 ac ld [ %g1 + 0x2ac ], %g2 ! 4003beac int getdents( int dd_fd, char *dd_buf, int dd_len ) { 40023fb8: 88 10 00 18 mov %i0, %g4 /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 40023fbc: 80 a6 00 02 cmp %i0, %g2 40023fc0: 1a 80 00 0a bcc 40023fe8 40023fc4: b0 10 20 00 clr %i0 40023fc8: 03 10 00 f9 sethi %hi(0x4003e400), %g1 40023fcc: c6 00 63 f4 ld [ %g1 + 0x3f4 ], %g3 ! 4003e7f4 40023fd0: 85 29 20 02 sll %g4, 2, %g2 40023fd4: 83 29 20 04 sll %g4, 4, %g1 40023fd8: 82 20 40 02 sub %g1, %g2, %g1 40023fdc: 82 00 40 04 add %g1, %g4, %g1 40023fe0: 83 28 60 02 sll %g1, 2, %g1 40023fe4: b0 00 40 03 add %g1, %g3, %i0 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 40023fe8: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40023fec: c2 27 bf e8 st %g1, [ %fp + -24 ] 40023ff0: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 40023ff4: c4 27 bf ec st %g2, [ %fp + -20 ] 40023ff8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 40023ffc: c2 27 bf f0 st %g1, [ %fp + -16 ] 40024000: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 if ( !loc.ops->node_type_h ) 40024004: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 40024008: 80 a0 60 00 cmp %g1, 0 4002400c: 02 80 00 17 be 40024068 40024010: c4 27 bf f4 st %g2, [ %fp + -12 ] rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 40024014: 9f c0 40 00 call %g1 40024018: 90 07 bf e8 add %fp, -24, %o0 4002401c: 80 a2 20 01 cmp %o0, 1 40024020: 12 80 00 0c bne 40024050 40024024: 01 00 00 00 nop /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 40024028: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 4002402c: c2 00 60 08 ld [ %g1 + 8 ], %g1 40024030: 80 a0 60 00 cmp %g1, 0 40024034: 02 80 00 0d be 40024068 40024038: 92 10 00 19 mov %i1, %o1 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 4002403c: 90 10 00 18 mov %i0, %o0 40024040: 9f c0 40 00 call %g1 40024044: 94 10 00 1a mov %i2, %o2 } 40024048: 81 c7 e0 08 ret 4002404c: 91 e8 00 08 restore %g0, %o0, %o0 loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 40024050: 40 00 09 2a call 400264f8 <__errno> 40024054: 01 00 00 00 nop 40024058: 82 10 20 14 mov 0x14, %g1 ! 14 4002405c: c2 22 00 00 st %g1, [ %o0 ] 40024060: 10 bf ff fa b 40024048 40024064: 90 10 3f ff mov -1, %o0 * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 40024068: 40 00 09 24 call 400264f8 <__errno> <== NOT EXECUTED 4002406c: 01 00 00 00 nop <== NOT EXECUTED 40024070: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40024074: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40024078: 10 bf ff f4 b 40024048 <== NOT EXECUTED 4002407c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 40018b60 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 40018b60: 03 10 00 f1 sethi %hi(0x4003c400), %g1 <== NOT EXECUTED 40018b64: c4 00 62 c0 ld [ %g1 + 0x2c0 ], %g2 ! 4003c6c0 <== NOT EXECUTED return _POSIX_types_Gid; } 40018b68: 81 c3 e0 08 retl <== NOT EXECUTED 40018b6c: d0 10 a0 2a lduh [ %g2 + 0x2a ], %o0 <== NOT EXECUTED 40019238 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 40019238: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED FILE *fp; int match; init_etc_passwd_group(); 4001923c: 7f ff ff b3 call 40019108 <== NOT EXECUTED 40019240: 01 00 00 00 nop <== NOT EXECUTED if ((fp = fopen("/etc/group", "r")) == NULL) { 40019244: 11 10 00 e5 sethi %hi(0x40039400), %o0 <== NOT EXECUTED 40019248: 13 10 00 ee sethi %hi(0x4003b800), %o1 <== NOT EXECUTED 4001924c: 90 12 21 90 or %o0, 0x190, %o0 <== NOT EXECUTED 40019250: 40 00 36 fe call 40026e48 <== NOT EXECUTED 40019254: 92 12 61 38 or %o1, 0x138, %o1 <== NOT EXECUTED 40019258: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 4001925c: 12 80 00 0b bne 40019288 <== NOT EXECUTED 40019260: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 40019264: 30 80 00 27 b,a 40019300 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 40019268: 40 00 43 7a call 4002a050 <== NOT EXECUTED 4001926c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40019270: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 40019274: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } else { match = (grp->gr_gid == gid); } if (match) { 40019278: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001927c: 12 80 00 14 bne 400192cc <== NOT EXECUTED 40019280: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 40019284: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 40019288: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 4001928c: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED 40019290: 7f ff fe d2 call 40018dd8 <== NOT EXECUTED 40019294: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40019298: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001929c: 02 80 00 11 be 400192e0 <== NOT EXECUTED 400192a0: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { 400192a4: 32 bf ff f1 bne,a 40019268 <== NOT EXECUTED 400192a8: d0 06 80 00 ld [ %i2 ], %o0 <== NOT EXECUTED match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 400192ac: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED 400192b0: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 400192b4: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 400192b8: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } if (match) { 400192bc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400192c0: 02 bf ff f2 be 40019288 <== NOT EXECUTED 400192c4: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED fclose(fp); 400192c8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400192cc: 40 00 34 e1 call 40026650 <== NOT EXECUTED 400192d0: b0 10 20 00 clr %i0 <== NOT EXECUTED *result = grp; 400192d4: f4 27 40 00 st %i2, [ %i5 ] <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 400192d8: 81 c7 e0 08 ret <== NOT EXECUTED 400192dc: 81 e8 00 00 restore <== NOT EXECUTED errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; 400192e0: 40 00 34 86 call 400264f8 <__errno> <== NOT EXECUTED 400192e4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400192e8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400192ec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 400192f0: 40 00 34 d8 call 40026650 <== NOT EXECUTED 400192f4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400192f8: 81 c7 e0 08 ret <== NOT EXECUTED 400192fc: 81 e8 00 00 restore <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; 40019300: 40 00 34 7e call 400264f8 <__errno> <== NOT EXECUTED 40019304: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40019308: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4001930c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40019310: 81 c7 e0 08 ret <== NOT EXECUTED 40019314: 81 e8 00 00 restore <== NOT EXECUTED 40018f54 : return NULL; return p; } struct group *getgrent() { 40018f54: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (group_fp == NULL) 40018f58: 03 10 00 f8 sethi %hi(0x4003e000), %g1 <== NOT EXECUTED 40018f5c: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 ! 4003e034 <== NOT EXECUTED 40018f60: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40018f64: 02 80 00 0d be 40018f98 <== NOT EXECUTED 40018f68: 21 10 00 f8 sethi %hi(0x4003e000), %l0 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 40018f6c: 15 10 00 f8 sethi %hi(0x4003e000), %o2 <== NOT EXECUTED 40018f70: 92 14 21 00 or %l0, 0x100, %o1 <== NOT EXECUTED 40018f74: 94 12 a0 38 or %o2, 0x38, %o2 <== NOT EXECUTED 40018f78: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 40018f7c: 7f ff ff 97 call 40018dd8 <== NOT EXECUTED 40018f80: b0 14 21 00 or %l0, 0x100, %i0 <== NOT EXECUTED 40018f84: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40018f88: 02 80 00 04 be 40018f98 <== NOT EXECUTED 40018f8c: 01 00 00 00 nop <== NOT EXECUTED return NULL; return &grent; } 40018f90: 81 c7 e0 08 ret <== NOT EXECUTED 40018f94: 81 e8 00 00 restore <== NOT EXECUTED 40018f98: 81 c7 e0 08 ret <== NOT EXECUTED 40018f9c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40019350 : } struct group *getgrgid( gid_t gid ) { 40019350: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 40019354: 13 10 00 f8 sethi %hi(0x4003e000), %o1 <== NOT EXECUTED 40019358: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 4001935c: 92 12 61 00 or %o1, 0x100, %o1 <== NOT EXECUTED 40019360: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 40019364: 15 10 00 f8 sethi %hi(0x4003e000), %o2 <== NOT EXECUTED 40019368: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4001936c: 94 12 a0 38 or %o2, 0x38, %o2 <== NOT EXECUTED 40019370: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 40019374: 7f ff ff e9 call 40019318 <== NOT EXECUTED 40019378: b0 10 20 00 clr %i0 <== NOT EXECUTED 4001937c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40019380: 22 80 00 02 be,a 40019388 <== NOT EXECUTED 40019384: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 40019388: 81 c7 e0 08 ret <== NOT EXECUTED 4001938c: 81 e8 00 00 restore <== NOT EXECUTED 40019318 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 40019318: 82 10 00 09 mov %o1, %g1 <== NOT EXECUTED 4001931c: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 40019320: 86 10 00 0b mov %o3, %g3 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 40019324: 93 2a 20 10 sll %o0, 0x10, %o1 <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 40019328: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 4001932c: 94 10 00 01 mov %g1, %o2 <== NOT EXECUTED 40019330: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 40019334: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 40019338: 98 10 00 03 mov %g3, %o4 <== NOT EXECUTED 4001933c: 90 10 20 00 clr %o0 <== NOT EXECUTED 40019340: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40019344: 7f ff ff bd call 40019238 <== NOT EXECUTED 40019348: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4001934c: 01 00 00 00 nop 400193bc : } struct group *getgrnam( const char *name ) { 400193bc: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 400193c0: 13 10 00 f8 sethi %hi(0x4003e000), %o1 <== NOT EXECUTED 400193c4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400193c8: 92 12 61 00 or %o1, 0x100, %o1 <== NOT EXECUTED 400193cc: 15 10 00 f8 sethi %hi(0x4003e000), %o2 <== NOT EXECUTED 400193d0: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 400193d4: 94 12 a0 38 or %o2, 0x38, %o2 <== NOT EXECUTED 400193d8: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 400193dc: 7f ff ff ed call 40019390 <== NOT EXECUTED 400193e0: b0 10 20 00 clr %i0 <== NOT EXECUTED 400193e4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400193e8: 22 80 00 02 be,a 400193f0 <== NOT EXECUTED 400193ec: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 400193f0: 81 c7 e0 08 ret <== NOT EXECUTED 400193f4: 81 e8 00 00 restore <== NOT EXECUTED 40019390 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 40019390: 82 10 00 0a mov %o2, %g1 <== NOT EXECUTED 40019394: 84 10 00 0b mov %o3, %g2 <== NOT EXECUTED 40019398: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getgr_r(name, 0, grp, buffer, bufsize, result); 4001939c: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 400193a0: 96 10 00 01 mov %g1, %o3 <== NOT EXECUTED 400193a4: 98 10 00 02 mov %g2, %o4 <== NOT EXECUTED 400193a8: 92 10 20 00 clr %o1 <== NOT EXECUTED 400193ac: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400193b0: 7f ff ff a2 call 40019238 <== NOT EXECUTED 400193b4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400193b8: 01 00 00 00 nop 4001943c : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 4001943c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED FILE *fp; int match; init_etc_passwd_group(); 40019440: 7f ff ff 32 call 40019108 <== NOT EXECUTED 40019444: 01 00 00 00 nop <== NOT EXECUTED if ((fp = fopen("/etc/passwd", "r")) == NULL) { 40019448: 11 10 00 e5 sethi %hi(0x40039400), %o0 <== NOT EXECUTED 4001944c: 13 10 00 ee sethi %hi(0x4003b800), %o1 <== NOT EXECUTED 40019450: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40019454: 40 00 36 7d call 40026e48 <== NOT EXECUTED 40019458: 92 12 61 38 or %o1, 0x138, %o1 <== NOT EXECUTED 4001945c: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 40019460: 12 80 00 0b bne 4001948c <== NOT EXECUTED 40019464: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 40019468: 30 80 00 27 b,a 40019504 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 4001946c: 40 00 42 f9 call 4002a050 <== NOT EXECUTED 40019470: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40019474: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 40019478: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } else { match = (pwd->pw_uid == uid); } if (match) { 4001947c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40019480: 12 80 00 14 bne 400194d0 <== NOT EXECUTED 40019484: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 40019488: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 4001948c: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40019490: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED 40019494: 7f ff fe c3 call 40018fa0 <== NOT EXECUTED 40019498: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4001949c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400194a0: 02 80 00 11 be 400194e4 <== NOT EXECUTED 400194a4: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { 400194a8: 32 bf ff f1 bne,a 4001946c <== NOT EXECUTED 400194ac: d0 06 80 00 ld [ %i2 ], %o0 <== NOT EXECUTED match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 400194b0: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED 400194b4: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 400194b8: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 400194bc: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } if (match) { 400194c0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400194c4: 02 bf ff f2 be 4001948c <== NOT EXECUTED 400194c8: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED fclose(fp); 400194cc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400194d0: 40 00 34 60 call 40026650 <== NOT EXECUTED 400194d4: b0 10 20 00 clr %i0 <== NOT EXECUTED *result = pwd; 400194d8: f4 27 40 00 st %i2, [ %i5 ] <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 400194dc: 81 c7 e0 08 ret <== NOT EXECUTED 400194e0: 81 e8 00 00 restore <== NOT EXECUTED errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; 400194e4: 40 00 34 05 call 400264f8 <__errno> <== NOT EXECUTED 400194e8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400194ec: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400194f0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 400194f4: 40 00 34 57 call 40026650 <== NOT EXECUTED 400194f8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400194fc: 81 c7 e0 08 ret <== NOT EXECUTED 40019500: 81 e8 00 00 restore <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; 40019504: 40 00 33 fd call 400264f8 <__errno> <== NOT EXECUTED 40019508: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001950c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40019510: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40019514: 81 c7 e0 08 ret <== NOT EXECUTED 40019518: 81 e8 00 00 restore <== NOT EXECUTED 400190bc : return NULL; return p; } struct passwd *getpwent() { 400190bc: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (passwd_fp == NULL) 400190c0: 03 10 00 f7 sethi %hi(0x4003dc00), %g1 <== NOT EXECUTED 400190c4: d0 00 63 4c ld [ %g1 + 0x34c ], %o0 ! 4003df4c <== NOT EXECUTED 400190c8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400190cc: 02 80 00 0d be 40019100 <== NOT EXECUTED 400190d0: 21 10 00 f8 sethi %hi(0x4003e000), %l0 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 400190d4: 15 10 00 f7 sethi %hi(0x4003dc00), %o2 <== NOT EXECUTED 400190d8: 92 14 20 18 or %l0, 0x18, %o1 <== NOT EXECUTED 400190dc: 94 12 a3 50 or %o2, 0x350, %o2 <== NOT EXECUTED 400190e0: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 400190e4: 7f ff ff af call 40018fa0 <== NOT EXECUTED 400190e8: b0 14 20 18 or %l0, 0x18, %i0 <== NOT EXECUTED 400190ec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400190f0: 02 80 00 04 be 40019100 <== NOT EXECUTED 400190f4: 01 00 00 00 nop <== NOT EXECUTED return NULL; return &pwent; } 400190f8: 81 c7 e0 08 ret <== NOT EXECUTED 400190fc: 81 e8 00 00 restore <== NOT EXECUTED 40019100: 81 c7 e0 08 ret <== NOT EXECUTED 40019104: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 400195c0 : } struct passwd *getpwnam( const char *name ) { 400195c0: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 400195c4: 13 10 00 f8 sethi %hi(0x4003e000), %o1 <== NOT EXECUTED 400195c8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400195cc: 92 12 60 18 or %o1, 0x18, %o1 <== NOT EXECUTED 400195d0: 15 10 00 f7 sethi %hi(0x4003dc00), %o2 <== NOT EXECUTED 400195d4: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 400195d8: 94 12 a3 50 or %o2, 0x350, %o2 <== NOT EXECUTED 400195dc: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 400195e0: 7f ff ff ed call 40019594 <== NOT EXECUTED 400195e4: b0 10 20 00 clr %i0 <== NOT EXECUTED 400195e8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400195ec: 22 80 00 02 be,a 400195f4 <== NOT EXECUTED 400195f0: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 400195f4: 81 c7 e0 08 ret <== NOT EXECUTED 400195f8: 81 e8 00 00 restore <== NOT EXECUTED 40019594 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 40019594: 82 10 00 0a mov %o2, %g1 <== NOT EXECUTED 40019598: 84 10 00 0b mov %o3, %g2 <== NOT EXECUTED 4001959c: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getpw_r(name, 0, pwd, buffer, bufsize, result); 400195a0: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 400195a4: 96 10 00 01 mov %g1, %o3 <== NOT EXECUTED 400195a8: 98 10 00 02 mov %g2, %o4 <== NOT EXECUTED 400195ac: 92 10 20 00 clr %o1 <== NOT EXECUTED 400195b0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400195b4: 7f ff ff a2 call 4001943c <== NOT EXECUTED 400195b8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400195bc: 01 00 00 00 nop 40019554 : } struct passwd *getpwuid( uid_t uid ) { 40019554: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 40019558: 13 10 00 f8 sethi %hi(0x4003e000), %o1 <== NOT EXECUTED 4001955c: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 40019560: 92 12 60 18 or %o1, 0x18, %o1 <== NOT EXECUTED 40019564: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 40019568: 15 10 00 f7 sethi %hi(0x4003dc00), %o2 <== NOT EXECUTED 4001956c: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 40019570: 94 12 a3 50 or %o2, 0x350, %o2 <== NOT EXECUTED 40019574: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 40019578: 7f ff ff e9 call 4001951c <== NOT EXECUTED 4001957c: b0 10 20 00 clr %i0 <== NOT EXECUTED 40019580: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40019584: 22 80 00 02 be,a 4001958c <== NOT EXECUTED 40019588: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 4001958c: 81 c7 e0 08 ret <== NOT EXECUTED 40019590: 81 e8 00 00 restore <== NOT EXECUTED 4001951c : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 4001951c: 82 10 00 09 mov %o1, %g1 <== NOT EXECUTED 40019520: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 40019524: 86 10 00 0b mov %o3, %g3 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 40019528: 93 2a 20 10 sll %o0, 0x10, %o1 <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 4001952c: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 40019530: 94 10 00 01 mov %g1, %o2 <== NOT EXECUTED 40019534: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 40019538: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 4001953c: 98 10 00 03 mov %g3, %o4 <== NOT EXECUTED 40019540: 90 10 20 00 clr %o0 <== NOT EXECUTED 40019544: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40019548: 7f ff ff bd call 4001943c <== NOT EXECUTED 4001954c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40019550: 01 00 00 00 nop 4000c144 : int gettimeofday( struct timeval *tp, void * __tz ) { 4000c144: 9d e3 bf 90 save %sp, -112, %sp /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 4000c148: 80 a6 20 00 cmp %i0, 0 4000c14c: 02 80 00 11 be 4000c190 4000c150: 01 00 00 00 nop ) { ISR_Level level; struct timespec now; _ISR_Disable(level); 4000c154: 7f ff d7 28 call 40001df4 4000c158: 01 00 00 00 nop 4000c15c: a0 10 00 08 mov %o0, %l0 _TOD_Get( &now ); 4000c160: 7f ff ec 0b call 4000718c <_TOD_Get> 4000c164: 90 07 bf f0 add %fp, -16, %o0 _ISR_Enable(level); 4000c168: 7f ff d7 27 call 40001e04 4000c16c: 90 10 00 10 mov %l0, %o0 time->tv_sec = now.tv_sec; time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 4000c170: d0 07 bf f4 ld [ %fp + -12 ], %o0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); time->tv_sec = now.tv_sec; 4000c174: c2 07 bf f0 ld [ %fp + -16 ], %g1 time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 4000c178: 92 10 23 e8 mov 0x3e8, %o1 4000c17c: 40 00 27 45 call 40015e90 <.udiv> 4000c180: c2 26 00 00 st %g1, [ %i0 ] 4000c184: 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; } 4000c188: 81 c7 e0 08 ret 4000c18c: 91 e8 20 00 restore %g0, 0, %o0 void * __tz ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; 4000c190: 40 00 0b 17 call 4000edec <__errno> <== NOT EXECUTED 4000c194: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000c198: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 4000c19c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000c1a0: 81 c7 e0 08 ret <== NOT EXECUTED 4000c1a4: 81 e8 00 00 restore <== NOT EXECUTED 400195fc : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 400195fc: 03 10 00 f1 sethi %hi(0x4003c400), %g1 <== NOT EXECUTED 40019600: c4 00 62 c0 ld [ %g1 + 0x2c0 ], %g2 ! 4003c6c0 <== NOT EXECUTED return _POSIX_types_Uid; } 40019604: 81 c3 e0 08 retl <== NOT EXECUTED 40019608: d0 10 a0 28 lduh [ %g2 + 0x28 ], %o0 <== NOT EXECUTED 40023768 : IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; if ( the_jnode->type != IMFS_DIRECTORY ) 40023768: c4 02 20 2c ld [ %o0 + 0x2c ], %g2 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4002376c: 86 10 00 08 mov %o0, %g3 IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; if ( the_jnode->type != IMFS_DIRECTORY ) 40023770: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1 40023774: 80 a0 60 01 cmp %g1, 1 40023778: 02 80 00 04 be 40023788 4002377c: 90 10 3f ff mov -1, %o0 return -1; /* It wasn't a directory --> return error */ iop->offset = 0; return 0; } 40023780: 81 c3 e0 08 retl <== NOT EXECUTED 40023784: 01 00 00 00 nop <== NOT EXECUTED the_jnode = (IMFS_jnode_t *) iop->file_info; if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 40023788: c0 20 e0 08 clr [ %g3 + 8 ] return 0; } 4002378c: 81 c3 e0 08 retl 40023790: 90 10 20 00 clr %o0 40023884 : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 40023884: 9d e3 be 88 save %sp, -376, %sp int current_entry; int first_entry; int last_entry; struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->file_info; 40023888: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4002388c: 90 10 00 1a mov %i2, %o0 */ RTEMS_INLINE_ROUTINE boolean _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 40023890: e2 00 60 4c ld [ %g1 + 0x4c ], %l1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40023894: a4 00 60 50 add %g1, 0x50, %l2 struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->file_info; the_chain = &the_jnode->info.directory.Entries; if ( Chain_Is_empty( the_chain ) ) 40023898: 80 a4 40 12 cmp %l1, %l2 4002389c: 02 80 00 34 be 4002396c 400238a0: aa 10 20 00 clr %l5 /* Move to the first of the desired directory entries */ the_node = the_chain->first; bytes_transferred = 0; first_entry = iop->offset; 400238a4: e8 06 20 08 ld [ %i0 + 8 ], %l4 /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); 400238a8: 40 00 47 f1 call 4003586c <.udiv> 400238ac: 92 10 21 0c mov 0x10c, %o1 400238b0: 83 2a 20 02 sll %o0, 2, %g1 400238b4: 85 2a 20 06 sll %o0, 6, %g2 400238b8: 82 00 40 02 add %g1, %g2, %g1 400238bc: 82 20 40 08 sub %g1, %o0, %g1 400238c0: 83 28 60 02 sll %g1, 2, %g1 400238c4: a6 00 40 14 add %g1, %l4, %l3 /* The directory was not empty so try to move to the desired entry in chain*/ for ( current_entry = 0; current_entry < last_entry; 400238c8: 80 a4 e0 00 cmp %l3, 0 400238cc: 04 80 00 2a ble 40023974 400238d0: 80 a4 80 11 cmp %l2, %l1 current_entry = current_entry + sizeof(struct dirent) ){ if ( Chain_Is_tail( the_chain, the_node ) ){ 400238d4: 02 80 00 28 be 40023974 400238d8: b4 10 20 00 clr %i2 tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); 400238dc: ae 07 be ec add %fp, -276, %l7 400238e0: 10 80 00 08 b 40023900 400238e4: ac 07 be f8 add %fp, -264, %l6 last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( current_entry = 0; current_entry < last_entry; 400238e8: 80 a4 c0 1a cmp %l3, %i2 400238ec: 04 80 00 20 ble 4002396c 400238f0: e2 04 40 00 ld [ %l1 ], %l1 current_entry = current_entry + sizeof(struct dirent) ){ if ( Chain_Is_tail( the_chain, the_node ) ){ 400238f4: 80 a4 80 11 cmp %l2, %l1 400238f8: 02 80 00 1d be 4002396c 400238fc: 01 00 00 00 nop /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { 40023900: 80 a5 00 1a cmp %l4, %i2 40023904: 34 bf ff f9 bg,a 400238e8 40023908: b4 06 a1 0c add %i2, 0x10c, %i2 /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 4002390c: f4 27 be f0 st %i2, [ %fp + -272 ] tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 40023910: c4 04 60 34 ld [ %l1 + 0x34 ], %g2 } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); 40023914: 82 10 21 0c mov 0x10c, %g1 the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 40023918: a0 04 60 0c add %l1, 0xc, %l0 } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); 4002391c: c2 37 be f4 sth %g1, [ %fp + -268 ] the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 40023920: c4 27 be ec st %g2, [ %fp + -276 ] tmp_dirent.d_namlen = strlen( the_jnode->name ); 40023924: 40 00 1f ec call 4002b8d4 40023928: 90 10 00 10 mov %l0, %o0 strcpy( tmp_dirent.d_name, the_jnode->name ); 4002392c: 92 10 00 10 mov %l0, %o1 /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 40023930: d0 37 be f6 sth %o0, [ %fp + -266 ] strcpy( tmp_dirent.d_name, the_jnode->name ); 40023934: 40 00 19 f7 call 4002a110 40023938: 90 10 00 16 mov %l6, %o0 memcpy( 4002393c: 90 06 40 15 add %i1, %l5, %o0 40023940: 92 10 00 17 mov %l7, %o1 40023944: 40 00 11 a1 call 40027fc8 40023948: 94 10 21 0c mov 0x10c, %o2 buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 4002394c: c2 06 20 08 ld [ %i0 + 8 ], %g1 bytes_transferred = bytes_transferred + sizeof( struct dirent ); } the_node = the_node->next; 40023950: b4 06 a1 0c add %i2, 0x10c, %i2 memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 40023954: 82 00 61 0c add %g1, 0x10c, %g1 40023958: c2 26 20 08 st %g1, [ %i0 + 8 ] bytes_transferred = bytes_transferred + sizeof( struct dirent ); 4002395c: aa 05 61 0c add %l5, 0x10c, %l5 last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( current_entry = 0; current_entry < last_entry; 40023960: 80 a4 c0 1a cmp %l3, %i2 40023964: 14 bf ff e4 bg 400238f4 40023968: e2 04 40 00 ld [ %l1 ], %l1 the_node = the_node->next; } /* Success */ return bytes_transferred; } 4002396c: 81 c7 e0 08 ret 40023970: 91 e8 00 15 restore %g0, %l5, %o0 last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( current_entry = 0; current_entry < last_entry; 40023974: 10 bf ff fe b 4002396c <== NOT EXECUTED 40023978: aa 10 20 00 clr %l5 <== NOT EXECUTED 4002397c : */ int imfs_dir_rmnod( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4002397c: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 40023980: 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 ) ) 40023984: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 40023988: 82 04 20 50 add %l0, 0x50, %g1 4002398c: 80 a0 80 01 cmp %g2, %g1 40023990: 12 80 00 36 bne 40023a68 40023994: 01 00 00 00 nop /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 40023998: c2 06 20 0c ld [ %i0 + 0xc ], %g1 4002399c: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 400239a0: 80 a4 00 02 cmp %l0, %g2 400239a4: 02 80 00 2b be 40023a50 400239a8: 01 00 00 00 nop /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 400239ac: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 400239b0: 80 a0 60 00 cmp %g1, 0 400239b4: 12 80 00 27 bne 40023a50 400239b8: 01 00 00 00 nop /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 400239bc: c2 04 20 08 ld [ %l0 + 8 ], %g1 400239c0: 80 a0 60 00 cmp %g1, 0 400239c4: 22 80 00 06 be,a 400239dc 400239c8: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 Chain_Extract( (Chain_Node *) the_jnode ); 400239cc: 7f ff de 10 call 4001b20c <_Chain_Extract> 400239d0: 90 10 00 10 mov %l0, %o0 the_jnode->Parent = NULL; 400239d4: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 400239d8: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 400239dc: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 400239e0: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 400239e4: 90 07 bf f0 add %fp, -16, %o0 400239e8: 7f ff 85 98 call 40005048 400239ec: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 400239f0: 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) ) { 400239f4: 90 10 00 10 mov %l0, %o0 400239f8: 7f ff 86 04 call 40005208 400239fc: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 40023a00: 80 a2 20 00 cmp %o0, 0 40023a04: 12 80 00 11 bne 40023a48 40023a08: 01 00 00 00 nop 40023a0c: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 40023a10: 80 a0 60 00 cmp %g1, 0 40023a14: 12 80 00 0d bne 40023a48 40023a18: 03 10 00 f1 sethi %hi(0x4003c400), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 40023a1c: c6 00 62 c0 ld [ %g1 + 0x2c0 ], %g3 ! 4003c6c0 40023a20: c4 06 00 00 ld [ %i0 ], %g2 40023a24: c2 00 e0 04 ld [ %g3 + 4 ], %g1 40023a28: 80 a0 40 02 cmp %g1, %g2 40023a2c: 22 80 00 02 be,a 40023a34 40023a30: c0 20 e0 04 clr [ %g3 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 40023a34: 90 10 00 10 mov %l0, %o0 40023a38: 7f ff 86 a4 call 400054c8 40023a3c: b0 10 20 00 clr %i0 40023a40: 81 c7 e0 08 ret 40023a44: 81 e8 00 00 restore } return 0; } 40023a48: 81 c7 e0 08 ret 40023a4c: 91 e8 20 00 restore %g0, 0, %o0 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 40023a50: 40 00 0a aa call 400264f8 <__errno> 40023a54: b0 10 3f ff mov -1, %i0 40023a58: 82 10 20 10 mov 0x10, %g1 40023a5c: c2 22 00 00 st %g1, [ %o0 ] 40023a60: 81 c7 e0 08 ret 40023a64: 81 e8 00 00 restore /* * You cannot remove a node that still has children */ if ( ! Chain_Is_empty( &the_jnode->info.directory.Entries ) ) rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 40023a68: 40 00 0a a4 call 400264f8 <__errno> 40023a6c: b0 10 3f ff mov -1, %i0 40023a70: 82 10 20 5a mov 0x5a, %g1 40023a74: c2 22 00 00 st %g1, [ %o0 ] 40023a78: 81 c7 e0 08 ret 40023a7c: 81 e8 00 00 restore 40019108 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 40019108: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 4001910c: 05 10 00 f7 sethi %hi(0x4003dc00), %g2 <== NOT EXECUTED 40019110: c2 48 a3 48 ldsb [ %g2 + 0x348 ], %g1 ! 4003df48 <== NOT EXECUTED 40019114: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40019118: 02 80 00 04 be 40019128 <== NOT EXECUTED 4001911c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40019120: 81 c7 e0 08 ret <== NOT EXECUTED 40019124: 81 e8 00 00 restore <== NOT EXECUTED return; etc_passwd_initted = 1; mkdir("/etc", 0777); 40019128: 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; 4001912c: c2 28 a3 48 stb %g1, [ %g2 + 0x348 ] <== NOT EXECUTED mkdir("/etc", 0777); 40019130: 11 10 00 e5 sethi %hi(0x40039400), %o0 <== NOT EXECUTED 40019134: 40 00 01 3b call 40019620 <== NOT EXECUTED 40019138: 90 12 21 10 or %o0, 0x110, %o0 ! 40039510 <_CPU_Trap_slot_template+0xe70> <== NOT EXECUTED /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 4001913c: 31 10 00 e5 sethi %hi(0x40039400), %i0 <== NOT EXECUTED 40019140: 21 10 00 ee sethi %hi(0x4003b800), %l0 <== NOT EXECUTED 40019144: 90 16 21 18 or %i0, 0x118, %o0 <== NOT EXECUTED 40019148: 40 00 37 40 call 40026e48 <== NOT EXECUTED 4001914c: 92 14 21 38 or %l0, 0x138, %o1 <== NOT EXECUTED 40019150: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40019154: 22 80 00 0d be,a 40019188 <== NOT EXECUTED 40019158: 90 16 21 18 or %i0, 0x118, %o0 <== NOT EXECUTED } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 4001915c: 40 00 35 3d call 40026650 <== NOT EXECUTED 40019160: 01 00 00 00 nop <== NOT EXECUTED } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 40019164: 92 14 21 38 or %l0, 0x138, %o1 <== NOT EXECUTED 40019168: 31 10 00 e5 sethi %hi(0x40039400), %i0 <== NOT EXECUTED 4001916c: 40 00 37 37 call 40026e48 <== NOT EXECUTED 40019170: 90 16 21 90 or %i0, 0x190, %o0 ! 40039590 <_CPU_Trap_slot_template+0xef0> <== NOT EXECUTED 40019174: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40019178: 22 80 00 11 be,a 400191bc <== NOT EXECUTED 4001917c: 90 16 21 90 or %i0, 0x190, %o0 <== NOT EXECUTED fclose(fp); 40019180: 40 00 35 34 call 40026650 <== NOT EXECUTED 40019184: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 40019188: 13 10 00 e1 sethi %hi(0x40038400), %o1 <== NOT EXECUTED 4001918c: 40 00 37 2f call 40026e48 <== NOT EXECUTED 40019190: 92 12 62 b0 or %o1, 0x2b0, %o1 ! 400386b0 <_CPU_Trap_slot_template+0x10> <== NOT EXECUTED 40019194: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40019198: 02 bf ff f3 be 40019164 <== NOT EXECUTED 4001919c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 400191a0: 94 10 20 66 mov 0x66, %o2 <== NOT EXECUTED 400191a4: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED 400191a8: 11 10 00 e5 sethi %hi(0x40039400), %o0 <== NOT EXECUTED 400191ac: 40 00 3a 6d call 40027b60 <== NOT EXECUTED 400191b0: 90 12 21 28 or %o0, 0x128, %o0 ! 40039528 <_CPU_Trap_slot_template+0xe88> <== NOT EXECUTED "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 400191b4: 10 bf ff ea b 4001915c <== NOT EXECUTED 400191b8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 400191bc: 13 10 00 e1 sethi %hi(0x40038400), %o1 <== NOT EXECUTED 400191c0: 40 00 37 22 call 40026e48 <== NOT EXECUTED 400191c4: 92 12 62 b0 or %o1, 0x2b0, %o1 ! 400386b0 <_CPU_Trap_slot_template+0x10> <== NOT EXECUTED 400191c8: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 400191cc: 02 bf ff d5 be 40019120 <== NOT EXECUTED 400191d0: 11 10 00 e5 sethi %hi(0x40039400), %o0 <== NOT EXECUTED fprintf( fp, "root:x:0:root\n" 400191d4: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 400191d8: 94 10 20 2a mov 0x2a, %o2 <== NOT EXECUTED 400191dc: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED 400191e0: 40 00 3a 60 call 40027b60 <== NOT EXECUTED 400191e4: 90 12 21 a0 or %o0, 0x1a0, %o0 <== NOT EXECUTED "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 400191e8: 40 00 35 1a call 40026650 <== NOT EXECUTED 400191ec: 81 e8 00 00 restore <== NOT EXECUTED 400191f0: 01 00 00 00 nop 40019820 : int ioctl( int fd, ioctl_command_t command, ... ) { 40019820: 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 ); 40019824: 03 10 00 a9 sethi %hi(0x4002a400), %g1 40019828: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 ! 4002a41c int ioctl( int fd, ioctl_command_t command, ... ) { 4001982c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 40019830: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 40019834: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 40019838: 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 ); 4001983c: 80 a6 00 02 cmp %i0, %g2 40019840: 1a 80 00 1b bcc 400198ac 40019844: 92 10 00 19 mov %i1, %o1 iop = rtems_libio_iop( fd ); 40019848: 03 10 00 b1 sethi %hi(0x4002c400), %g1 4001984c: c6 00 62 d8 ld [ %g1 + 0x2d8 ], %g3 ! 4002c6d8 40019850: 85 2e 20 02 sll %i0, 2, %g2 40019854: 83 2e 20 04 sll %i0, 4, %g1 40019858: 82 20 40 02 sub %g1, %g2, %g1 4001985c: 82 00 40 18 add %g1, %i0, %g1 40019860: 83 28 60 02 sll %g1, 2, %g1 40019864: 90 00 40 03 add %g1, %g3, %o0 rtems_libio_check_is_open(iop); 40019868: c4 02 20 0c ld [ %o0 + 0xc ], %g2 4001986c: 80 88 a1 00 btst 0x100, %g2 40019870: 02 80 00 0f be 400198ac 40019874: 82 07 a0 50 add %fp, 0x50, %g1 /* * Now process the ioctl(). */ if ( !iop->handlers ) 40019878: 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 *); 4001987c: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * Now process the ioctl(). */ if ( !iop->handlers ) 40019880: 80 a0 a0 00 cmp %g2, 0 40019884: 02 80 00 0a be 400198ac 40019888: 94 10 00 1a mov %i2, %o2 rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) 4001988c: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40019890: 80 a0 60 00 cmp %g1, 0 40019894: 02 80 00 0c be 400198c4 40019898: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 4001989c: 9f c0 40 00 call %g1 400198a0: 01 00 00 00 nop return rc; } 400198a4: 81 c7 e0 08 ret 400198a8: 91 e8 00 08 restore %g0, %o0, %o0 /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 400198ac: 40 00 02 87 call 4001a2c8 <__errno> <== NOT EXECUTED 400198b0: 01 00 00 00 nop <== NOT EXECUTED 400198b4: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 400198b8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400198bc: 10 bf ff fa b 400198a4 <== NOT EXECUTED 400198c0: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 400198c4: 40 00 02 81 call 4001a2c8 <__errno> <== NOT EXECUTED 400198c8: 01 00 00 00 nop <== NOT EXECUTED 400198cc: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 400198d0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400198d4: 10 bf ff f4 b 400198a4 <== NOT EXECUTED 400198d8: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 40003e5c : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 40003e5c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 40003e60: c6 06 60 30 ld [ %i1 + 0x30 ], %g3 <== NOT EXECUTED 40003e64: 80 88 e0 20 btst 0x20, %g3 <== NOT EXECUTED 40003e68: 02 80 00 03 be 40003e74 <== NOT EXECUTED 40003e6c: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED c &= 0x7f; 40003e70: a0 0e 20 7f and %i0, 0x7f, %l0 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 40003e74: 80 88 e2 00 btst 0x200, %g3 <== NOT EXECUTED 40003e78: 02 80 00 0b be 40003ea4 <== NOT EXECUTED 40003e7c: 82 0c 20 ff and %l0, 0xff, %g1 <== NOT EXECUTED c = tolower (c); 40003e80: 03 10 00 68 sethi %hi(0x4001a000), %g1 <== NOT EXECUTED 40003e84: c4 00 62 48 ld [ %g1 + 0x248 ], %g2 ! 4001a248 <__ctype_ptr> <== NOT EXECUTED 40003e88: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 40003e8c: c2 08 80 08 ldub [ %g2 + %o0 ], %g1 <== NOT EXECUTED 40003e90: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40003e94: 32 80 00 02 bne,a 40003e9c <== NOT EXECUTED 40003e98: 90 02 20 20 add %o0, 0x20, %o0 <== NOT EXECUTED 40003e9c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED if (c == '\r') { 40003ea0: 82 0c 20 ff and %l0, 0xff, %g1 <== NOT EXECUTED 40003ea4: 80 a0 60 0d cmp %g1, 0xd <== NOT EXECUTED 40003ea8: 02 80 00 32 be 40003f70 <== NOT EXECUTED 40003eac: 80 a0 60 0a cmp %g1, 0xa <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 40003eb0: 02 80 00 35 be 40003f84 <== NOT EXECUTED 40003eb4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 40003eb8: 02 80 00 1f be 40003f34 <== NOT EXECUTED 40003ebc: 05 10 00 67 sethi %hi(0x40019c00), %g2 <== NOT EXECUTED 40003ec0: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== NOT EXECUTED 40003ec4: 80 88 a0 02 btst 2, %g2 <== NOT EXECUTED 40003ec8: 22 80 00 1b be,a 40003f34 <== NOT EXECUTED 40003ecc: 05 10 00 67 sethi %hi(0x40019c00), %g2 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 40003ed0: c2 0e 60 43 ldub [ %i1 + 0x43 ], %g1 <== NOT EXECUTED 40003ed4: a2 0c 20 ff and %l0, 0xff, %l1 <== NOT EXECUTED 40003ed8: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED 40003edc: 02 80 00 5a be 40004044 <== NOT EXECUTED 40003ee0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 40003ee4: c2 0e 60 44 ldub [ %i1 + 0x44 ], %g1 <== NOT EXECUTED 40003ee8: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED 40003eec: 02 80 00 5b be 40004058 <== NOT EXECUTED 40003ef0: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 40003ef4: c2 0e 60 45 ldub [ %i1 + 0x45 ], %g1 <== NOT EXECUTED 40003ef8: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED 40003efc: 02 80 00 55 be 40004050 <== NOT EXECUTED 40003f00: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return 1; } else if (c == '\n') { 40003f04: 80 a4 60 0a cmp %l1, 0xa <== NOT EXECUTED 40003f08: 02 80 00 3e be 40004000 <== NOT EXECUTED 40003f0c: 80 88 a0 48 btst 0x48, %g2 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) 40003f10: c2 0e 60 4c ldub [ %i1 + 0x4c ], %g1 <== NOT EXECUTED 40003f14: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED 40003f18: 02 80 00 27 be 40003fb4 <== NOT EXECUTED 40003f1c: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED 40003f20: c2 0e 60 51 ldub [ %i1 + 0x51 ], %g1 <== NOT EXECUTED 40003f24: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED 40003f28: 02 80 00 23 be 40003fb4 <== NOT EXECUTED 40003f2c: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 40003f30: 05 10 00 67 sethi %hi(0x40019c00), %g2 <== NOT EXECUTED 40003f34: c6 06 60 20 ld [ %i1 + 0x20 ], %g3 <== NOT EXECUTED 40003f38: c2 00 a2 04 ld [ %g2 + 0x204 ], %g1 <== NOT EXECUTED 40003f3c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40003f40: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 40003f44: 16 80 00 0e bge 40003f7c <== NOT EXECUTED 40003f48: 01 00 00 00 nop <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 40003f4c: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 40003f50: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 40003f54: 12 80 00 21 bne 40003fd8 <== NOT EXECUTED 40003f58: 84 00 e0 01 add %g3, 1, %g2 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 40003f5c: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED 40003f60: e0 28 40 03 stb %l0, [ %g1 + %g3 ] <== NOT EXECUTED 40003f64: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED 40003f68: 81 c7 e0 08 ret <== NOT EXECUTED 40003f6c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) 40003f70: 80 88 e0 80 btst 0x80, %g3 <== NOT EXECUTED 40003f74: 02 80 00 0c be 40003fa4 <== NOT EXECUTED 40003f78: 80 88 e1 00 btst 0x100, %g3 <== NOT EXECUTED * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; 40003f7c: 81 c7 e0 08 ret <== NOT EXECUTED 40003f80: 91 e8 20 00 restore %g0, 0, %o0 <== 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)) { 40003f84: 80 88 e0 40 btst 0x40, %g3 <== NOT EXECUTED 40003f88: 02 bf ff cf be 40003ec4 <== NOT EXECUTED 40003f8c: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 40003f90: 80 88 a0 02 btst 2, %g2 <== NOT EXECUTED 40003f94: 02 bf ff e7 be 40003f30 <== NOT EXECUTED 40003f98: a0 10 20 0d mov 0xd, %l0 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 40003f9c: 10 bf ff ce b 40003ed4 <== NOT EXECUTED 40003fa0: c2 0e 60 43 ldub [ %i1 + 0x43 ], %g1 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) 40003fa4: 32 bf ff c7 bne,a 40003ec0 <== NOT EXECUTED 40003fa8: a0 10 20 0a mov 0xa, %l0 <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 40003fac: 10 bf ff c6 b 40003ec4 <== NOT EXECUTED 40003fb0: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 40003fb4: 12 80 00 1c bne 40004024 <== NOT EXECUTED 40003fb8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 40003fbc: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 40003fc0: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED 40003fc4: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED 40003fc8: e0 28 80 01 stb %l0, [ %g2 + %g1 ] <== NOT EXECUTED 40003fcc: c6 26 60 20 st %g3, [ %i1 + 0x20 ] <== NOT EXECUTED 40003fd0: 81 c7 e0 08 ret <== NOT EXECUTED 40003fd4: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 40003fd8: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 40003fdc: 7f ff fe f0 call 40003b9c <== NOT EXECUTED 40003fe0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40003fe4: c6 06 60 20 ld [ %i1 + 0x20 ], %g3 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 40003fe8: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED 40003fec: 84 00 e0 01 add %g3, 1, %g2 <== NOT EXECUTED 40003ff0: e0 28 40 03 stb %l0, [ %g1 + %g3 ] <== NOT EXECUTED 40003ff4: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED 40003ff8: 81 c7 e0 08 ret <== NOT EXECUTED 40003ffc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) 40004000: 12 80 00 0d bne 40004034 <== NOT EXECUTED 40004004: 90 10 20 0a mov 0xa, %o0 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 40004008: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 4000400c: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED 40004010: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED 40004014: e2 28 80 01 stb %l1, [ %g2 + %g1 ] <== NOT EXECUTED 40004018: c6 26 60 20 st %g3, [ %i1 + 0x20 ] <== NOT EXECUTED 4000401c: 81 c7 e0 08 ret <== NOT EXECUTED 40004020: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 40004024: 7f ff fe de call 40003b9c <== NOT EXECUTED 40004028: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 4000402c: 10 bf ff e5 b 40003fc0 <== NOT EXECUTED 40004030: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); 40004034: 7f ff fe da call 40003b9c <== NOT EXECUTED 40004038: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 4000403c: 10 bf ff f4 b 4000400c <== NOT EXECUTED 40004040: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); 40004044: 92 10 20 00 clr %o1 <== NOT EXECUTED 40004048: 7f ff fe f5 call 40003c1c <== NOT EXECUTED 4000404c: b0 10 20 00 clr %i0 <== NOT EXECUTED 40004050: 81 c7 e0 08 ret <== NOT EXECUTED 40004054: 81 e8 00 00 restore <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); 40004058: 7f ff fe f1 call 40003c1c <== NOT EXECUTED 4000405c: b0 10 20 00 clr %i0 <== NOT EXECUTED 40004060: 81 c7 e0 08 ret <== NOT EXECUTED 40004064: 81 e8 00 00 restore <== NOT EXECUTED 40025ea0 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 40025ea0: 9d e3 bf 88 save %sp, -120, %sp /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 40025ea4: 7f ff ff 11 call 40025ae8 40025ea8: 01 00 00 00 nop 40025eac: 80 a2 00 18 cmp %o0, %i0 40025eb0: 12 80 00 ca bne 400261d8 40025eb4: 80 a6 60 00 cmp %i1, 0 /* * Validate the signal passed. */ if ( !sig ) 40025eb8: 02 80 00 ce be 400261f0 40025ebc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 40025ec0: 90 06 7f ff add %i1, -1, %o0 40025ec4: 80 a2 20 1f cmp %o0, 0x1f 40025ec8: 18 80 00 ca bgu 400261f0 40025ecc: 03 10 00 b3 sethi %hi(0x4002cc00), %g1 /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 40025ed0: a5 2e 60 02 sll %i1, 2, %l2 40025ed4: ac 10 63 b8 or %g1, 0x3b8, %l6 40025ed8: a7 2e 60 04 sll %i1, 4, %l3 40025edc: 82 24 c0 12 sub %l3, %l2, %g1 40025ee0: 82 00 40 16 add %g1, %l6, %g1 40025ee4: c4 00 60 08 ld [ %g1 + 8 ], %g2 40025ee8: 80 a0 a0 01 cmp %g2, 1 40025eec: 02 80 00 4f be 40026028 40025ef0: 80 a6 60 0b cmp %i1, 0xb * 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 ) { 40025ef4: 18 80 00 0c bgu 40025f24 40025ef8: 82 10 20 01 mov 1, %g1 40025efc: 83 28 40 19 sll %g1, %i1, %g1 <== NOT EXECUTED 40025f00: 80 88 69 10 btst 0x910, %g1 <== NOT EXECUTED 40025f04: 02 80 00 08 be 40025f24 <== NOT EXECUTED 40025f08: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED case SIGFPE: case SIGILL: case SIGSEGV: return pthread_kill( pthread_self(), sig ); 40025f0c: 40 00 01 75 call 400264e0 <== NOT EXECUTED 40025f10: 01 00 00 00 nop <== NOT EXECUTED 40025f14: 40 00 01 25 call 400263a8 <== NOT EXECUTED 40025f18: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } _Thread_Enable_dispatch(); return 0; } 40025f1c: 81 c7 e0 08 ret 40025f20: 91 e8 00 08 restore %g0, %o0, %o0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 40025f24: f2 27 bf ec st %i1, [ %fp + -20 ] siginfo->si_code = SI_USER; 40025f28: c2 27 bf f0 st %g1, [ %fp + -16 ] if ( !value ) { 40025f2c: 80 a6 a0 00 cmp %i2, 0 40025f30: 02 80 00 46 be 40026048 40025f34: b1 28 40 08 sll %g1, %o0, %i0 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 40025f38: c2 06 80 00 ld [ %i2 ], %g1 40025f3c: c2 27 bf f4 st %g1, [ %fp + -12 ] 40025f40: 35 10 00 b2 sethi %hi(0x4002c800), %i2 40025f44: c2 06 a0 a0 ld [ %i2 + 0xa0 ], %g1 ! 4002c8a0 <_Thread_Dispatch_disable_level> 40025f48: 82 00 60 01 inc %g1 40025f4c: c2 26 a0 a0 st %g1, [ %i2 + 0xa0 ] /* * 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; 40025f50: 03 10 00 b2 sethi %hi(0x4002c800), %g1 40025f54: c6 00 61 7c ld [ %g1 + 0x17c ], %g3 ! 4002c97c <_Thread_Executing> api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 40025f58: c4 00 e1 70 ld [ %g3 + 0x170 ], %g2 40025f5c: c2 00 a0 c4 ld [ %g2 + 0xc4 ], %g1 40025f60: 80 ae 00 01 andncc %i0, %g1, %g0 40025f64: 12 80 00 1a bne 40025fcc 40025f68: 03 10 00 b4 sethi %hi(0x4002d000), %g1 goto process_it; 40025f6c: 98 10 61 44 or %g1, 0x144, %o4 ! 4002d144 <_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 ; 40025f70: 96 03 20 30 add %o4, 0x30, %o3 index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; 40025f74: c8 03 00 00 ld [ %o4 ], %g4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40025f78: 9a 03 20 04 add %o4, 4, %o5 !_Chain_Is_tail( the_chain, the_node ) ; 40025f7c: 80 a1 00 0d cmp %g4, %o5 40025f80: 02 80 00 34 be 40026050 40025f84: 86 10 00 04 mov %g4, %g3 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)) { 40025f88: c2 01 20 30 ld [ %g4 + 0x30 ], %g1 40025f8c: 80 8e 00 01 btst %i0, %g1 40025f90: 02 80 00 0b be 40025fbc 40025f94: c4 01 21 70 ld [ %g4 + 0x170 ], %g2 * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = TRUE; 40025f98: 10 80 00 0e b 40025fd0 40025f9c: 82 10 20 01 mov 1, %g1 index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; 40025fa0: 80 a1 00 0d cmp %g4, %o5 <== NOT EXECUTED 40025fa4: 02 80 00 2b be 40026050 <== NOT EXECUTED 40025fa8: 86 10 00 04 mov %g4, %g3 <== NOT EXECUTED 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)) { 40025fac: c2 00 e0 30 ld [ %g3 + 0x30 ], %g1 <== NOT EXECUTED 40025fb0: 80 8e 00 01 btst %i0, %g1 <== NOT EXECUTED 40025fb4: 12 80 00 06 bne 40025fcc <== NOT EXECUTED 40025fb8: c4 00 e1 70 ld [ %g3 + 0x170 ], %g2 <== NOT EXECUTED 40025fbc: c2 00 a0 c4 ld [ %g2 + 0xc4 ], %g1 <== NOT EXECUTED 40025fc0: 80 ae 00 01 andncc %i0, %g1, %g0 <== NOT EXECUTED 40025fc4: 22 bf ff f7 be,a 40025fa0 <== NOT EXECUTED 40025fc8: c8 01 00 00 ld [ %g4 ], %g4 <== NOT EXECUTED * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = TRUE; 40025fcc: 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 ) ) { 40025fd0: 90 10 00 03 mov %g3, %o0 40025fd4: 92 10 00 19 mov %i1, %o1 * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = TRUE; 40025fd8: c2 20 e0 78 st %g1, [ %g3 + 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 ) ) { 40025fdc: 40 00 00 a8 call 4002627c <_POSIX_signals_Unblock_thread> 40025fe0: 94 07 bf ec add %fp, -20, %o2 40025fe4: 80 a2 20 00 cmp %o0, 0 40025fe8: 12 80 00 09 bne 4002600c 40025fec: 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 ); 40025ff0: 40 00 00 93 call 4002623c <_POSIX_signals_Set_process_signals> 40025ff4: 90 10 00 18 mov %i0, %o0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 40025ff8: b2 24 c0 12 sub %l3, %l2, %i1 40025ffc: c2 05 80 19 ld [ %l6 + %i1 ], %g1 40026000: 80 a0 60 02 cmp %g1, 2 40026004: 02 80 00 65 be 40026198 40026008: 11 10 00 b4 sethi %hi(0x4002d000), %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4002600c: c2 06 a0 a0 ld [ %i2 + 0xa0 ], %g1 40026010: 82 00 7f ff add %g1, -1, %g1 40026014: c2 26 a0 a0 st %g1, [ %i2 + 0xa0 ] 40026018: c4 06 a0 a0 ld [ %i2 + 0xa0 ], %g2 4002601c: 80 a0 a0 00 cmp %g2, 0 40026020: 02 80 00 05 be 40026034 40026024: 01 00 00 00 nop _Thread_Dispatch(); 40026028: 90 10 20 00 clr %o0 ! 0 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } _Thread_Enable_dispatch(); return 0; } 4002602c: 81 c7 e0 08 ret 40026030: 91 e8 00 08 restore %g0, %o0, %o0 40026034: 7f ff a9 0d call 40010468 <_Thread_Dispatch> 40026038: 01 00 00 00 nop 4002603c: 90 10 20 00 clr %o0 ! 0 40026040: 81 c7 e0 08 ret 40026044: 91 e8 00 08 restore %g0, %o0, %o0 siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 40026048: 10 bf ff be b 40025f40 4002604c: c0 27 bf f4 clr [ %fp + -12 ] index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; 40026050: 98 03 20 0c add %o4, 0xc, %o4 */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 40026054: 80 a3 00 0b cmp %o4, %o3 40026058: 32 bf ff c8 bne,a 40025f78 4002605c: c8 03 00 00 ld [ %o4 ], %g4 40026060: 03 10 00 b2 sethi %hi(0x4002c800), %g1 continue; maximum = the_info->maximum; object_table = the_info->local_table; assert( object_table ); /* always at least 1 entry */ 40026064: 05 10 00 a8 sethi %hi(0x4002a000), %g2 40026068: ba 10 60 00 mov %g1, %i5 4002606c: b6 10 a3 40 or %g2, 0x340, %i3 */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 40026070: a8 10 21 00 mov 0x100, %l4 40026074: ae 10 20 00 clr %l7 40026078: aa 10 20 02 mov 2, %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 ) 4002607c: 39 04 00 00 sethi %hi(0x10000000), %i4 the_api++ ) { if ( the_api == OBJECTS_INTERNAL_THREADS ) continue; if ( !_Objects_Information_table[ the_api ] ) /* API not installed */ 40026080: 83 2d 60 02 sll %l5, 2, %g1 40026084: c2 07 40 01 ld [ %i5 + %g1 ], %g1 40026088: 80 a0 60 00 cmp %g1, 0 4002608c: 22 80 00 35 be,a 40026160 40026090: aa 05 60 01 inc %l5 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 40026094: c2 00 60 04 ld [ %g1 + 4 ], %g1 if ( !the_info ) /* manager not installed */ 40026098: 80 a0 60 00 cmp %g1, 0 4002609c: 22 80 00 31 be,a 40026160 400260a0: aa 05 60 01 inc %l5 <== NOT EXECUTED continue; maximum = the_info->maximum; object_table = the_info->local_table; 400260a4: e2 00 60 20 ld [ %g1 + 0x20 ], %l1 assert( object_table ); /* always at least 1 entry */ 400260a8: 80 a4 60 00 cmp %l1, 0 400260ac: 02 80 00 57 be 40026208 400260b0: e0 10 60 10 lduh [ %g1 + 0x10 ], %l0 for ( index = 1 ; index <= maximum ; index++ ) { 400260b4: 80 a4 20 00 cmp %l0, 0 400260b8: 22 80 00 2a be,a 40026160 400260bc: aa 05 60 01 inc %l5 400260c0: 88 10 20 01 mov 1, %g4 the_thread = (Thread_Control *) object_table[ index ]; 400260c4: 83 29 20 02 sll %g4, 2, %g1 400260c8: c4 00 40 11 ld [ %g1 + %l1 ], %g2 if ( !the_thread ) 400260cc: 80 a0 a0 00 cmp %g2, 0 400260d0: 22 80 00 20 be,a 40026150 400260d4: 88 01 20 01 inc %g4 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 400260d8: c6 00 a0 14 ld [ %g2 + 0x14 ], %g3 400260dc: 80 a0 c0 14 cmp %g3, %l4 400260e0: 38 80 00 1c bgu,a 40026150 400260e4: 88 01 20 01 inc %g4 <== NOT EXECUTED /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 400260e8: c2 00 a1 70 ld [ %g2 + 0x170 ], %g1 if ( !api || !_POSIX_signals_Is_interested( api, mask ) ) 400260ec: 80 a0 60 00 cmp %g1, 0 400260f0: 22 80 00 18 be,a 40026150 400260f4: 88 01 20 01 inc %g4 <== NOT EXECUTED 400260f8: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 400260fc: 80 ae 00 01 andncc %i0, %g1, %g0 40026100: 22 80 00 14 be,a 40026150 40026104: 88 01 20 01 inc %g4 * Now we know the thread under connsideration is interested. * If the thread under consideration is of higher priority, then * it becomes the interested thread. */ if ( the_thread->current_priority < interested_priority ) { 40026108: 80 a0 c0 14 cmp %g3, %l4 4002610c: 2a 80 00 1c bcs,a 4002617c 40026110: ae 10 00 02 mov %g2, %l7 * 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 ) ) 40026114: c2 05 e0 10 ld [ %l7 + 0x10 ], %g1 <== NOT EXECUTED 40026118: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002611c: 22 80 00 0d be,a 40026150 <== NOT EXECUTED 40026120: 88 01 20 01 inc %g4 <== NOT EXECUTED * Now the interested thread is blocked. * If the thread we are considering is not, the it becomes the * interested thread. */ if ( _States_Is_ready( the_thread->current_state ) ) { 40026124: da 00 a0 10 ld [ %g2 + 0x10 ], %o5 <== NOT EXECUTED 40026128: 80 a3 60 00 cmp %o5, 0 <== NOT EXECUTED 4002612c: 22 80 00 14 be,a 4002617c <== NOT EXECUTED 40026130: ae 10 00 02 mov %g2, %l7 <== 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 ) 40026134: 80 88 40 1c btst %g1, %i4 <== NOT EXECUTED 40026138: 32 80 00 06 bne,a 40026150 <== NOT EXECUTED 4002613c: 88 01 20 01 inc %g4 <== NOT EXECUTED * If the thread under consideration is interruptible by a signal, * then it becomes the interested thread. */ /* XXX need a new states macro */ if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 40026140: 80 8b 40 1c btst %o5, %i4 <== NOT EXECUTED 40026144: 32 80 00 0e bne,a 4002617c <== NOT EXECUTED 40026148: ae 10 00 02 mov %g2, %l7 <== NOT EXECUTED maximum = the_info->maximum; object_table = the_info->local_table; assert( object_table ); /* always at least 1 entry */ for ( index = 1 ; index <= maximum ; index++ ) { 4002614c: 88 01 20 01 inc %g4 40026150: 80 a4 00 04 cmp %l0, %g4 40026154: 1a bf ff dd bcc 400260c8 40026158: 83 29 20 02 sll %g4, 2, %g1 interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for ( the_api = 2; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 4002615c: aa 05 60 01 inc %l5 interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for ( the_api = 2; the_api <= OBJECTS_APIS_LAST; 40026160: 80 a5 60 04 cmp %l5, 4 40026164: 18 80 00 08 bgu 40026184 40026168: 80 a5 60 01 cmp %l5, 1 the_api++ ) { if ( the_api == OBJECTS_INTERNAL_THREADS ) 4002616c: 22 bf ff c5 be,a 40026080 40026170: aa 10 20 02 mov 2, %l5 <== NOT EXECUTED continue; if ( !_Objects_Information_table[ the_api ] ) /* API not installed */ 40026174: 10 bf ff c4 b 40026084 40026178: 83 2d 60 02 sll %l5, 2, %g1 * 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 ) { 4002617c: 10 bf ff f4 b 4002614c 40026180: a8 10 00 03 mov %g3, %l4 interested_priority = the_thread->current_priority; } } } if ( interested_thread ) { 40026184: 80 a5 e0 00 cmp %l7, 0 40026188: 02 bf ff 9a be 40025ff0 4002618c: 86 10 00 17 mov %l7, %g3 * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = TRUE; 40026190: 10 bf ff 90 b 40025fd0 40026194: 82 10 20 01 mov 1, %g1 _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 40026198: 7f ff 9f 97 call 4000dff4 <_Chain_Get> 4002619c: 90 12 21 38 or %o0, 0x138, %o0 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 400261a0: 80 a2 20 00 cmp %o0, 0 400261a4: 02 80 00 20 be 40026224 400261a8: c2 07 bf ec ld [ %fp + -20 ], %g1 rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 400261ac: 92 10 00 08 mov %o0, %o1 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 400261b0: c2 22 20 08 st %g1, [ %o0 + 8 ] 400261b4: c4 07 bf f0 ld [ %fp + -16 ], %g2 400261b8: c4 22 20 0c st %g2, [ %o0 + 0xc ] 400261bc: c2 07 bf f4 ld [ %fp + -12 ], %g1 400261c0: c2 22 20 10 st %g1, [ %o0 + 0x10 ] _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 400261c4: 11 10 00 b4 sethi %hi(0x4002d000), %o0 400261c8: 90 12 21 88 or %o0, 0x188, %o0 ! 4002d188 <_POSIX_signals_Siginfo> 400261cc: 7f ff 9f 7e call 4000dfc4 <_Chain_Append> 400261d0: 90 06 40 08 add %i1, %o0, %o0 400261d4: 30 bf ff 8e b,a 4002600c /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 400261d8: 7f ff d0 3c call 4001a2c8 <__errno> 400261dc: 01 00 00 00 nop 400261e0: 82 10 20 03 mov 3, %g1 ! 3 400261e4: c2 22 00 00 st %g1, [ %o0 ] 400261e8: 10 bf ff 4d b 40025f1c 400261ec: 90 10 3f ff mov -1, %o0 if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 400261f0: 7f ff d0 36 call 4001a2c8 <__errno> 400261f4: 01 00 00 00 nop 400261f8: 82 10 20 16 mov 0x16, %g1 ! 16 400261fc: c2 22 00 00 st %g1, [ %o0 ] 40026200: 10 bf ff 47 b 40025f1c 40026204: 90 10 3f ff mov -1, %o0 continue; maximum = the_info->maximum; object_table = the_info->local_table; assert( object_table ); /* always at least 1 entry */ 40026208: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 4002620c: 92 10 20 c1 mov 0xc1, %o1 <== NOT EXECUTED 40026210: 15 10 00 a8 sethi %hi(0x4002a000), %o2 <== NOT EXECUTED 40026214: 7f ff 89 e7 call 400089b0 <__assert> <== NOT EXECUTED 40026218: 94 12 a3 88 or %o2, 0x388, %o2 ! 4002a388 <_RTEMS_version+0x70> <== NOT EXECUTED for ( index = 1 ; index <= maximum ; index++ ) { 4002621c: 10 bf ff a7 b 400260b8 <== NOT EXECUTED 40026220: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { rtems_set_errno_and_return_minus_one( EAGAIN ); 40026224: 7f ff d0 29 call 4001a2c8 <__errno> <== NOT EXECUTED 40026228: 01 00 00 00 nop <== NOT EXECUTED 4002622c: 82 10 20 0b mov 0xb, %g1 ! b <== NOT EXECUTED 40026230: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40026234: 10 bf ff 3a b 40025f1c <== NOT EXECUTED 40026238: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 40018348 : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 40018348: 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())) 4001834c: 03 10 00 6b sethi %hi(0x4001ac00), %g1 40018350: c4 00 61 40 ld [ %g1 + 0x140 ], %g2 ! 4001ad40 <_System_state_Current> 40018354: 80 a0 a0 03 cmp %g2, 3 40018358: 12 80 00 15 bne 400183ac 4001835c: 21 10 00 68 sethi %hi(0x4001a000), %l0 /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != &libc_global_reent) { 40018360: c4 04 22 50 ld [ %l0 + 0x250 ], %g2 ! 4001a250 <_impure_ptr> 40018364: 03 10 00 66 sethi %hi(0x40019800), %g1 40018368: b0 10 62 00 or %g1, 0x200, %i0 ! 40019a00 4001836c: 80 a0 80 18 cmp %g2, %i0 40018370: 02 80 00 06 be 40018388 40018374: c2 04 22 50 ld [ %l0 + 0x250 ], %g1 _wrapup_reent(&libc_global_reent); 40018378: 40 00 00 ab call 40018624 <_wrapup_reent> 4001837c: 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; 40018380: f0 24 22 50 st %i0, [ %l0 + 0x250 ] * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 40018384: c2 04 22 50 ld [ %l0 + 0x250 ], %g1 40018388: 7f ff da ef call 4000ef44 4001838c: d0 00 60 04 ld [ %g1 + 4 ], %o0 fclose (stdout); 40018390: c2 04 22 50 ld [ %l0 + 0x250 ], %g1 40018394: 7f ff da ec call 4000ef44 40018398: d0 00 60 08 ld [ %g1 + 8 ], %o0 fclose (stderr); 4001839c: c2 04 22 50 ld [ %l0 + 0x250 ], %g1 400183a0: f0 00 60 0c ld [ %g1 + 0xc ], %i0 400183a4: 7f ff da e8 call 4000ef44 400183a8: 81 e8 00 00 restore 400183ac: 81 c7 e0 08 ret <== NOT EXECUTED 400183b0: 81 e8 00 00 restore <== NOT EXECUTED 40003a98 : int link( const char *existing, const char *new ) { 40003a98: 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 ); 40003a9c: 92 10 20 00 clr %o1 40003aa0: 90 10 00 18 mov %i0, %o0 40003aa4: a0 07 bf e4 add %fp, -28, %l0 40003aa8: 96 10 20 01 mov 1, %o3 40003aac: 94 10 00 10 mov %l0, %o2 40003ab0: 7f ff fe 88 call 400034d0 40003ab4: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 40003ab8: 80 a2 20 00 cmp %o0, 0 40003abc: 12 80 00 84 bne 40003ccc 40003ac0: 01 00 00 00 nop /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 40003ac4: c2 4e 40 00 ldsb [ %i1 ], %g1 40003ac8: 80 a0 60 2f cmp %g1, 0x2f 40003acc: 02 80 00 06 be 40003ae4 40003ad0: 80 a0 60 5c cmp %g1, 0x5c 40003ad4: 02 80 00 04 be 40003ae4 40003ad8: 80 a0 60 00 cmp %g1, 0 40003adc: 12 80 00 3a bne 40003bc4 40003ae0: 03 10 00 67 sethi %hi(0x40019c00), %g1 40003ae4: 03 10 00 67 sethi %hi(0x40019c00), %g1 40003ae8: c6 00 63 a0 ld [ %g1 + 0x3a0 ], %g3 ! 40019fa0 40003aec: 88 10 20 01 mov 1, %g4 40003af0: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 40003af4: c2 27 bf d4 st %g1, [ %fp + -44 ] 40003af8: c4 00 e0 18 ld [ %g3 + 0x18 ], %g2 40003afc: c4 27 bf d8 st %g2, [ %fp + -40 ] 40003b00: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 40003b04: c2 27 bf dc st %g1, [ %fp + -36 ] 40003b08: c4 00 e0 20 ld [ %g3 + 0x20 ], %g2 40003b0c: c4 27 bf e0 st %g2, [ %fp + -32 ] if ( !parent_loc.ops->evalformake_h ) { 40003b10: c2 07 bf dc ld [ %fp + -36 ], %g1 40003b14: c2 00 60 04 ld [ %g1 + 4 ], %g1 40003b18: 80 a0 60 00 cmp %g1, 0 40003b1c: 02 80 00 5e be 40003c94 40003b20: 90 06 40 04 add %i1, %g4, %o0 rtems_filesystem_freenode( &existing_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 40003b24: a2 07 bf d4 add %fp, -44, %l1 40003b28: 94 07 bf f4 add %fp, -12, %o2 40003b2c: 9f c0 40 00 call %g1 40003b30: 92 10 00 11 mov %l1, %o1 if ( result != 0 ) { 40003b34: b2 92 20 00 orcc %o0, 0, %i1 40003b38: 12 80 00 48 bne 40003c58 40003b3c: c4 07 bf e0 ld [ %fp + -32 ], %g2 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 40003b40: c2 07 bf f0 ld [ %fp + -16 ], %g1 40003b44: 80 a0 80 01 cmp %g2, %g1 40003b48: 12 80 00 2a bne 40003bf0 40003b4c: c4 07 bf dc ld [ %fp + -36 ], %g2 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { 40003b50: c2 00 a0 08 ld [ %g2 + 8 ], %g1 40003b54: 80 a0 60 00 cmp %g1, 0 40003b58: 02 80 00 5f be 40003cd4 40003b5c: d4 07 bf f4 ld [ %fp + -12 ], %o2 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 40003b60: 90 10 00 10 mov %l0, %o0 40003b64: 9f c0 40 00 call %g1 40003b68: 92 10 00 11 mov %l1, %o1 rtems_filesystem_freenode( &existing_loc ); 40003b6c: c2 07 bf ec ld [ %fp + -20 ], %g1 40003b70: 80 a0 60 00 cmp %g1, 0 40003b74: 02 80 00 08 be 40003b94 40003b78: b0 10 00 08 mov %o0, %i0 40003b7c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40003b80: 80 a0 60 00 cmp %g1, 0 40003b84: 22 80 00 05 be,a 40003b98 40003b88: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 40003b8c: 9f c0 40 00 call %g1 40003b90: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &parent_loc ); 40003b94: c2 07 bf dc ld [ %fp + -36 ], %g1 40003b98: 80 a0 60 00 cmp %g1, 0 40003b9c: 02 80 00 4c be 40003ccc 40003ba0: 01 00 00 00 nop 40003ba4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40003ba8: 80 a0 60 00 cmp %g1, 0 40003bac: 02 80 00 48 be 40003ccc 40003bb0: 01 00 00 00 nop 40003bb4: 9f c0 40 00 call %g1 40003bb8: 90 10 00 11 mov %l1, %o0 return result; } 40003bbc: 81 c7 e0 08 ret 40003bc0: 81 e8 00 00 restore /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 40003bc4: c6 00 63 a0 ld [ %g1 + 0x3a0 ], %g3 40003bc8: 88 10 20 00 clr %g4 40003bcc: c2 00 e0 04 ld [ %g3 + 4 ], %g1 40003bd0: c2 27 bf d4 st %g1, [ %fp + -44 ] 40003bd4: c4 00 e0 08 ld [ %g3 + 8 ], %g2 40003bd8: c4 27 bf d8 st %g2, [ %fp + -40 ] 40003bdc: c2 00 e0 0c ld [ %g3 + 0xc ], %g1 40003be0: c2 27 bf dc st %g1, [ %fp + -36 ] 40003be4: c4 00 e0 10 ld [ %g3 + 0x10 ], %g2 40003be8: 10 bf ff ca b 40003b10 40003bec: c4 27 bf e0 st %g2, [ %fp + -32 ] * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { rtems_filesystem_freenode( &existing_loc ); 40003bf0: c2 07 bf ec ld [ %fp + -20 ], %g1 40003bf4: 80 a0 60 00 cmp %g1, 0 40003bf8: 22 80 00 09 be,a 40003c1c 40003bfc: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 40003c00: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40003c04: 80 a0 60 00 cmp %g1, 0 40003c08: 22 80 00 05 be,a 40003c1c 40003c0c: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 40003c10: 9f c0 40 00 call %g1 40003c14: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &parent_loc ); 40003c18: c2 07 bf dc ld [ %fp + -36 ], %g1 40003c1c: 80 a0 60 00 cmp %g1, 0 40003c20: 02 80 00 08 be 40003c40 40003c24: 01 00 00 00 nop 40003c28: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40003c2c: 80 a0 60 00 cmp %g1, 0 40003c30: 02 80 00 04 be 40003c40 40003c34: 01 00 00 00 nop 40003c38: 9f c0 40 00 call %g1 40003c3c: 90 10 00 11 mov %l1, %o0 rtems_set_errno_and_return_minus_one( EXDEV ); 40003c40: 40 00 37 b1 call 40011b04 <__errno> 40003c44: b0 10 3f ff mov -1, %i0 40003c48: 82 10 20 12 mov 0x12, %g1 40003c4c: c2 22 00 00 st %g1, [ %o0 ] 40003c50: 81 c7 e0 08 ret 40003c54: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); if ( result != 0 ) { rtems_filesystem_freenode( &existing_loc ); 40003c58: c2 07 bf ec ld [ %fp + -20 ], %g1 40003c5c: 80 a0 60 00 cmp %g1, 0 40003c60: 02 80 00 08 be 40003c80 40003c64: 01 00 00 00 nop 40003c68: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40003c6c: 80 a0 60 00 cmp %g1, 0 40003c70: 02 80 00 04 be 40003c80 40003c74: 01 00 00 00 nop 40003c78: 9f c0 40 00 call %g1 40003c7c: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( result ); 40003c80: 40 00 37 a1 call 40011b04 <__errno> 40003c84: b0 10 3f ff mov -1, %i0 40003c88: f2 22 00 00 st %i1, [ %o0 ] 40003c8c: 81 c7 e0 08 ret 40003c90: 81 e8 00 00 restore */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); 40003c94: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 40003c98: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003c9c: 02 80 00 08 be 40003cbc <== NOT EXECUTED 40003ca0: 01 00 00 00 nop <== NOT EXECUTED 40003ca4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40003ca8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003cac: 02 80 00 04 be 40003cbc <== NOT EXECUTED 40003cb0: 01 00 00 00 nop <== NOT EXECUTED 40003cb4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003cb8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 40003cbc: 40 00 37 92 call 40011b04 <__errno> <== NOT EXECUTED 40003cc0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40003cc4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40003cc8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40003ccc: 81 c7 e0 08 ret 40003cd0: 81 e8 00 00 restore rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); 40003cd4: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 40003cd8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003cdc: 02 80 00 0a be 40003d04 <== NOT EXECUTED 40003ce0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40003ce4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40003ce8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003cec: 02 80 00 06 be 40003d04 <== NOT EXECUTED 40003cf0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40003cf4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003cf8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40003cfc: c4 07 bf dc ld [ %fp + -36 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 40003d00: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40003d04: 02 bf ff ee be 40003cbc <== NOT EXECUTED 40003d08: 01 00 00 00 nop <== NOT EXECUTED 40003d0c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40003d10: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003d14: 02 bf ff ea be 40003cbc <== NOT EXECUTED 40003d18: 01 00 00 00 nop <== NOT EXECUTED 40003d1c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003d20: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40003d24: 30 bf ff e6 b,a 40003cbc <== NOT EXECUTED 40018224 : off_t lseek( int fd, off_t offset, int whence ) { 40018224: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 40018228: 03 10 00 66 sethi %hi(0x40019800), %g1 4001822c: c4 00 60 fc ld [ %g1 + 0xfc ], %g2 ! 400198fc off_t lseek( int fd, off_t offset, int whence ) { 40018230: 92 10 00 19 mov %i1, %o1 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 40018234: 80 a6 00 02 cmp %i0, %g2 40018238: 1a 80 00 31 bcc 400182fc 4001823c: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 40018240: 03 10 00 6a sethi %hi(0x4001a800), %g1 40018244: c6 00 61 94 ld [ %g1 + 0x194 ], %g3 ! 4001a994 40018248: 85 2e 20 02 sll %i0, 2, %g2 4001824c: 83 2e 20 04 sll %i0, 4, %g1 40018250: 82 20 40 02 sub %g1, %g2, %g1 40018254: 82 00 40 18 add %g1, %i0, %g1 40018258: 83 28 60 02 sll %g1, 2, %g1 4001825c: b0 00 40 03 add %g1, %g3, %i0 rtems_libio_check_is_open(iop); 40018260: c4 06 20 0c ld [ %i0 + 0xc ], %g2 40018264: 80 88 a1 00 btst 0x100, %g2 40018268: 02 80 00 25 be 400182fc 4001826c: 01 00 00 00 nop /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 40018270: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 40018274: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 40018278: 80 a0 60 00 cmp %g1, 0 4001827c: 02 80 00 26 be 40018314 40018280: 80 a6 a0 01 cmp %i2, 1 /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 40018284: 02 80 00 14 be 400182d4 40018288: f4 06 20 08 ld [ %i0 + 8 ], %i2 4001828c: 80 a2 a0 02 cmp %o2, 2 40018290: 02 80 00 0d be 400182c4 40018294: 80 a2 a0 00 cmp %o2, 0 40018298: 12 80 00 12 bne 400182e0 4001829c: 01 00 00 00 nop case SEEK_SET: iop->offset = offset; 400182a0: f2 26 20 08 st %i1, [ %i0 + 8 ] /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 400182a4: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 400182a8: 9f c0 40 00 call %g1 400182ac: 90 10 00 18 mov %i0, %o0 if ( status == (off_t) -1 ) 400182b0: 80 a2 3f ff cmp %o0, -1 400182b4: 22 80 00 02 be,a 400182bc 400182b8: f4 26 20 08 st %i2, [ %i0 + 8 ] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 400182bc: 81 c7 e0 08 ret 400182c0: 91 e8 00 08 restore %g0, %o0, %o0 case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 400182c4: c2 06 20 04 ld [ %i0 + 4 ], %g1 400182c8: 82 06 40 01 add %i1, %g1, %g1 400182cc: 10 bf ff f6 b 400182a4 400182d0: c2 26 20 08 st %g1, [ %i0 + 8 ] case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 400182d4: 82 06 40 1a add %i1, %i2, %g1 400182d8: 10 bf ff f3 b 400182a4 400182dc: c2 26 20 08 st %g1, [ %i0 + 8 ] case SEEK_END: iop->offset = iop->size + offset; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 400182e0: 7f ff da c3 call 4000edec <__errno> 400182e4: 01 00 00 00 nop 400182e8: 82 10 20 16 mov 0x16, %g1 ! 16 400182ec: c2 22 00 00 st %g1, [ %o0 ] 400182f0: 90 10 3f ff mov -1, %o0 /* * So if the operation failed, we have to restore iop->offset. */ return status; } 400182f4: 81 c7 e0 08 ret 400182f8: 91 e8 00 08 restore %g0, %o0, %o0 off_t old_offset; off_t status; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 400182fc: 7f ff da bc call 4000edec <__errno> <== NOT EXECUTED 40018300: 01 00 00 00 nop <== NOT EXECUTED 40018304: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 40018308: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001830c: 10 bf ff ec b 400182bc <== NOT EXECUTED 40018310: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 40018314: 7f ff da b6 call 4000edec <__errno> <== NOT EXECUTED 40018318: 01 00 00 00 nop <== NOT EXECUTED 4001831c: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40018320: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40018324: 10 bf ff e6 b 400182bc <== NOT EXECUTED 40018328: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 40002340 : #ifdef RTEMS_NEWLIB void *malloc( size_t size ) { 40002340: 9d e3 bf 98 save %sp, -104, %sp uint32_t sbrk_amount; Chain_Node *to_be_freed; MSBUMP(malloc_calls, 1); if ( !size ) 40002344: a2 96 20 00 orcc %i0, 0, %l1 40002348: 02 80 00 1c be 400023b8 4000234c: 03 10 00 6b sethi %hi(0x4001ac00), %g1 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 40002350: c4 00 61 40 ld [ %g1 + 0x140 ], %g2 ! 4001ad40 <_System_state_Current> 40002354: 80 a0 a0 03 cmp %g2, 3 40002358: 02 80 00 13 be 400023a4 4000235c: 11 10 00 6a sethi %hi(0x4001a800), %o0 40002360: 10 80 00 04 b 40002370 40002364: a0 12 21 fc or %o0, 0x1fc, %l0 ! 4001a9fc /* * 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); 40002368: 7f ff ff cd call 4000229c 4000236c: 01 00 00 00 nop } /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = Chain_Get(&RTEMS_Malloc_GC_list)) != NULL) 40002370: 40 00 12 8c call 40006da0 <_Chain_Get> 40002374: 90 10 00 10 mov %l0, %o0 40002378: 80 a2 20 00 cmp %o0, 0 4000237c: 12 bf ff fb bne 40002368 40002380: 92 10 00 11 mov %l1, %o1 */ #ifdef MALLOC_ARENA_CHECK size += sizeof(struct mallocNode) + SENTINELSIZE; #endif return_this = _Protected_heap_Allocate( &RTEMS_Malloc_Heap, size ); 40002384: 21 10 00 6a sethi %hi(0x4001a800), %l0 40002388: 40 00 17 72 call 40008150 <_Protected_heap_Allocate> 4000238c: 90 14 21 a0 or %l0, 0x1a0, %o0 ! 4001a9a0 if ( !return_this ) { 40002390: b0 92 20 00 orcc %o0, 0, %i0 40002394: 02 80 00 11 be 400023d8 40002398: 03 10 00 6a sethi %hi(0x4001a800), %g1 mallocNodeHead.forw = mp; rtems_interrupt_enable(key); } #endif return return_this; } 4000239c: 81 c7 e0 08 ret 400023a0: 81 e8 00 00 restore /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) 400023a4: 03 10 00 6a sethi %hi(0x4001a800), %g1 400023a8: c4 00 63 60 ld [ %g1 + 0x360 ], %g2 ! 4001ab60 <_Thread_Dispatch_disable_level> 400023ac: 80 a0 a0 00 cmp %g2, 0 400023b0: 02 80 00 04 be 400023c0 400023b4: 03 10 00 6b sethi %hi(0x4001ac00), %g1 mallocNodeHead.forw = mp; rtems_interrupt_enable(key); } #endif return return_this; } 400023b8: 81 c7 e0 08 ret 400023bc: 91 e8 20 00 restore %g0, 0, %o0 if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) return (void *) 0; if (_ISR_Nest_level > 0) 400023c0: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 400023c4: 80 a0 a0 00 cmp %g2, 0 400023c8: 02 bf ff ea be 40002370 400023cc: a0 12 21 fc or %o0, 0x1fc, %l0 MSBUMP(space_available, the_size); return_this = _Protected_heap_Allocate( &RTEMS_Malloc_Heap, size ); if ( !return_this ) { errno = ENOMEM; return (void *) 0; 400023d0: 81 c7 e0 08 ret <== NOT EXECUTED 400023d4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED * 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; 400023d8: e4 00 61 f8 ld [ %g1 + 0x1f8 ], %l2 <== NOT EXECUTED if ( sbrk_amount == 0 ) 400023dc: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 400023e0: 02 bf ff ef be 4000239c <== NOT EXECUTED 400023e4: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); 400023e8: 40 00 4e aa call 40015e90 <.udiv> <== NOT EXECUTED 400023ec: 90 04 40 12 add %l1, %l2, %o0 <== NOT EXECUTED 400023f0: 40 00 4e 6e call 40015da8 <.umul> <== NOT EXECUTED 400023f4: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED if ((starting_address = (void *)sbrk(the_size)) 400023f8: 7f ff fd a3 call 40001a84 <== NOT EXECUTED 400023fc: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED 40002400: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 40002404: 02 bf ff e6 be 4000239c <== NOT EXECUTED 40002408: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED == (void*) -1) return (void *) 0; if ( !_Protected_heap_Extend( 4000240c: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED 40002410: 40 00 17 eb call 400083bc <_Protected_heap_Extend> <== NOT EXECUTED 40002414: 90 14 21 a0 or %l0, 0x1a0, %o0 <== NOT EXECUTED 40002418: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000241c: 02 80 00 0d be 40002450 <== NOT EXECUTED 40002420: 90 14 21 a0 or %l0, 0x1a0, %o0 <== NOT EXECUTED return (void *) 0; } MSBUMP(space_available, the_size); return_this = _Protected_heap_Allocate( &RTEMS_Malloc_Heap, size ); 40002424: 40 00 17 4b call 40008150 <_Protected_heap_Allocate> <== NOT EXECUTED 40002428: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED if ( !return_this ) { 4000242c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40002430: 12 80 00 0e bne 40002468 <== NOT EXECUTED 40002434: 01 00 00 00 nop <== NOT EXECUTED errno = ENOMEM; 40002438: 40 00 32 6d call 4000edec <__errno> <== NOT EXECUTED 4000243c: 01 00 00 00 nop <== NOT EXECUTED 40002440: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 40002444: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40002448: 81 c7 e0 08 ret <== NOT EXECUTED 4000244c: 81 e8 00 00 restore <== NOT EXECUTED == (void*) -1) return (void *) 0; if ( !_Protected_heap_Extend( &RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); 40002450: 7f ff fd 8d call 40001a84 <== NOT EXECUTED 40002454: 90 20 00 12 neg %l2, %o0 <== NOT EXECUTED errno = ENOMEM; 40002458: 40 00 32 65 call 4000edec <__errno> <== NOT EXECUTED 4000245c: 01 00 00 00 nop <== NOT EXECUTED 40002460: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 40002464: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40002468: 81 c7 e0 08 ret <== NOT EXECUTED 4000246c: 81 e8 00 00 restore <== NOT EXECUTED 40005498 : /* * Find amount of free heap remaining */ size_t malloc_free_space( void ) { 40005498: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED Heap_Information info; _Protected_heap_Get_free_information( &RTEMS_Malloc_Heap, &info ); 4000549c: 11 10 00 fa sethi %hi(0x4003e800), %o0 <== NOT EXECUTED 400054a0: 92 07 bf ec add %fp, -20, %o1 <== NOT EXECUTED 400054a4: 40 00 1b 91 call 4000c2e8 <_Protected_heap_Get_free_information> <== NOT EXECUTED 400054a8: 90 12 20 00 mov %o0, %o0 <== NOT EXECUTED return (size_t) info.largest; } 400054ac: f0 07 bf f0 ld [ %fp + -16 ], %i0 <== NOT EXECUTED 400054b0: 81 c7 e0 08 ret <== NOT EXECUTED 400054b4: 81 e8 00 00 restore <== NOT EXECUTED 4001c414 : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 4001c414: 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) ) { 4001c418: 7f ff a3 7c call 40005208 4001c41c: 90 10 00 18 mov %i0, %o0 4001c420: 80 a2 20 00 cmp %o0, 0 4001c424: 12 80 00 13 bne 4001c470 4001c428: 01 00 00 00 nop 4001c42c: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 4001c430: 80 a0 60 00 cmp %g1, 0 4001c434: 12 80 00 0f bne 4001c470 4001c438: 03 10 00 f1 sethi %hi(0x4003c400), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 4001c43c: c2 00 62 c0 ld [ %g1 + 0x2c0 ], %g1 ! 4003c6c0 4001c440: c4 00 60 04 ld [ %g1 + 4 ], %g2 4001c444: 80 a0 80 18 cmp %g2, %i0 4001c448: 22 80 00 02 be,a 4001c450 4001c44c: c0 20 60 04 clr [ %g1 + 4 ] <== NOT EXECUTED rtems_filesystem_current.node_access = NULL; /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 4001c450: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4001c454: 80 a0 60 06 cmp %g1, 6 4001c458: 02 80 00 04 be 4001c468 4001c45c: 01 00 00 00 nop IMFS_memfile_remove( the_jnode ); 4001c460: 7f ff ff 6c call 4001c210 4001c464: 90 10 00 18 mov %i0, %o0 free( the_jnode ); 4001c468: 7f ff a4 18 call 400054c8 4001c46c: 90 10 00 18 mov %i0, %o0 } return 0; } 4001c470: 81 c7 e0 08 ret 4001c474: 91 e8 20 00 restore %g0, 0, %o0 4001c194 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 4001c194: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( block_table ); 4001c198: 80 a6 20 00 cmp %i0, 0 4001c19c: 02 80 00 16 be 4001c1f4 4001c1a0: 80 a6 60 00 cmp %i1, 0 * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 4001c1a8: e0 06 00 00 ld [ %i0 ], %l0 4001c1ac: a2 10 20 00 clr %l1 4001c1b0: b4 10 20 00 clr %i2 if ( b[i] ) { 4001c1b4: d0 06 80 10 ld [ %i2 + %l0 ], %o0 4001c1b8: 80 a2 20 00 cmp %o0, 0 4001c1bc: 02 80 00 05 be 4001c1d0 4001c1c0: a2 04 60 01 inc %l1 memfile_free_block( b[i] ); 4001c1c4: 7f ff ff 1e call 4001be3c 4001c1c8: 01 00 00 00 nop b[i] = 0; 4001c1cc: c0 26 80 10 clr [ %i2 + %l0 ] * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 4001c1d8: b4 06 a0 04 add %i2, 4, %i2 4001c1dc: e0 06 00 00 ld [ %i0 ], %l0 /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 4001c1e0: 7f ff ff 17 call 4001be3c 4001c1e4: 90 10 00 10 mov %l0, %o0 *block_table = 0; 4001c1e8: c0 26 00 00 clr [ %i0 ] } 4001c1ec: 81 c7 e0 08 ret 4001c1f0: 81 e8 00 00 restore /* * Perform internal consistency checks */ assert( block_table ); 4001c1f4: 31 10 00 e5 sethi %hi(0x40039400), %i0 <== NOT EXECUTED 4001c1f8: 35 10 00 e5 sethi %hi(0x40039400), %i2 <== NOT EXECUTED 4001c1fc: b0 16 22 10 or %i0, 0x210, %i0 <== NOT EXECUTED 4001c200: b4 16 a2 98 or %i2, 0x298, %i2 <== NOT EXECUTED 4001c204: 7f ff a2 c7 call 40004d20 <__assert> <== NOT EXECUTED 4001c208: 93 e8 21 b1 restore %g0, 0x1b1, %o1 <== NOT EXECUTED 4001c20c: 01 00 00 00 nop 4001c750 : int memfile_ftruncate( rtems_libio_t *iop, off_t length ) { 4001c750: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4001c754: 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 ) 4001c758: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 4001c75c: 80 a0 40 19 cmp %g1, %i1 4001c760: 16 80 00 06 bge 4001c778 4001c764: 92 10 00 19 mov %i1, %o1 return IMFS_memfile_extend( the_jnode, length ); 4001c768: 7f ff ff 97 call 4001c5c4 <== NOT EXECUTED 4001c76c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } 4001c770: 81 c7 e0 08 ret <== NOT EXECUTED 4001c774: 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; 4001c778: f2 24 20 4c st %i1, [ %l0 + 0x4c ] iop->size = the_jnode->info.file.size; 4001c77c: f2 26 20 04 st %i1, [ %i0 + 4 ] IMFS_update_atime( the_jnode ); 4001c780: 90 07 bf f0 add %fp, -16, %o0 4001c784: 7f ff a2 31 call 40005048 4001c788: 92 10 20 00 clr %o1 4001c78c: c2 07 bf f0 ld [ %fp + -16 ], %g1 4001c790: 90 10 20 00 clr %o0 4001c794: c2 24 20 3c st %g1, [ %l0 + 0x3c ] return 0; } 4001c798: 81 c7 e0 08 ret 4001c79c: 91 e8 00 08 restore %g0, %o0, %o0 4001c7a0 : off_t memfile_lseek( rtems_libio_t *iop, off_t offset, int whence ) { 4001c7a0: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4001c7a4: e0 06 20 2c ld [ %i0 + 0x2c ], %l0 if (the_jnode->type == IMFS_LINEAR_FILE) { 4001c7a8: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4001c7ac: 80 a0 60 06 cmp %g1, 6 4001c7b0: 02 80 00 0d be 4001c7e4 4001c7b4: a2 10 00 18 mov %i0, %l1 if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 4001c7b8: d2 06 20 08 ld [ %i0 + 8 ], %o1 4001c7bc: 7f ff ff 82 call 4001c5c4 4001c7c0: 90 10 00 10 mov %l0, %o0 4001c7c4: 80 a2 20 00 cmp %o0, 0 4001c7c8: 12 80 00 0f bne 4001c804 4001c7cc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 4001c7d0: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 4001c7d4: f0 06 20 08 ld [ %i0 + 8 ], %i0 4001c7d8: c2 24 60 04 st %g1, [ %l1 + 4 ] } return iop->offset; } 4001c7dc: 81 c7 e0 08 ret 4001c7e0: 81 e8 00 00 restore IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) 4001c7e4: d0 04 20 4c ld [ %l0 + 0x4c ], %o0 <== NOT EXECUTED 4001c7e8: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 4001c7ec: 80 a6 00 08 cmp %i0, %o0 <== NOT EXECUTED 4001c7f0: 04 80 00 09 ble 4001c814 <== NOT EXECUTED 4001c7f4: 01 00 00 00 nop <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 4001c7f8: d0 24 60 08 st %o0, [ %l1 + 8 ] <== NOT EXECUTED 4001c7fc: 81 c7 e0 08 ret <== NOT EXECUTED 4001c800: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) rtems_set_errno_and_return_minus_one( ENOSPC ); 4001c804: 40 00 27 3d call 400264f8 <__errno> <== NOT EXECUTED 4001c808: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001c80c: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 4001c810: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001c814: 81 c7 e0 08 ret <== NOT EXECUTED 4001c818: 81 e8 00 00 restore <== NOT EXECUTED 4001cb0c : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4001cb0c: 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)) 4001cb10: c4 06 20 0c ld [ %i0 + 0xc ], %g2 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4001cb14: 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)) 4001cb18: 80 88 a2 04 btst 0x204, %g2 4001cb1c: 02 80 00 06 be 4001cb34 4001cb20: e0 06 20 2c ld [ %i0 + 0x2c ], %l0 4001cb24: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4001cb28: 80 a0 60 06 cmp %g1, 6 4001cb2c: 22 80 00 0b be,a 4001cb58 4001cb30: d6 04 20 4c ld [ %l0 + 0x4c ], %o3 <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 4001cb34: 80 88 a2 00 btst 0x200, %g2 4001cb38: 02 80 00 04 be 4001cb48 4001cb3c: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 iop->offset = the_jnode->info.file.size; 4001cb40: c2 24 60 08 st %g1, [ %l1 + 8 ] iop->size = the_jnode->info.file.size; 4001cb44: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 4001cb48: b0 10 20 00 clr %i0 4001cb4c: c2 24 60 04 st %g1, [ %l1 + 4 ] return 0; } 4001cb50: 81 c7 e0 08 ret 4001cb54: 81 e8 00 00 restore * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; 4001cb58: d4 04 20 50 ld [ %l0 + 0x50 ], %o2 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 4001cb5c: 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; 4001cb60: 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; 4001cb64: 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; 4001cb68: 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; 4001cb6c: 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) 4001cb70: 80 a2 e0 00 cmp %o3, 0 <== NOT EXECUTED 4001cb74: 12 80 00 08 bne 4001cb94 <== NOT EXECUTED 4001cb78: c2 24 20 48 st %g1, [ %l0 + 0x48 ] <== NOT EXECUTED 4001cb7c: c4 04 60 0c ld [ %l1 + 0xc ], %g2 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 4001cb80: 80 88 a2 00 btst 0x200, %g2 <== NOT EXECUTED 4001cb84: 02 bf ff f1 be 4001cb48 <== NOT EXECUTED 4001cb88: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 <== NOT EXECUTED iop->offset = the_jnode->info.file.size; 4001cb8c: 10 bf ff ee b 4001cb44 <== NOT EXECUTED 4001cb90: c2 24 60 08 st %g1, [ %l1 + 8 ] <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) 4001cb94: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4001cb98: 92 10 20 00 clr %o1 <== NOT EXECUTED 4001cb9c: 7f ff ff 20 call 4001c81c <== NOT EXECUTED 4001cba0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001cba4: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 4001cba8: 02 bf ff ea be 4001cb50 <== NOT EXECUTED 4001cbac: 01 00 00 00 nop <== NOT EXECUTED 4001cbb0: 10 bf ff f4 b 4001cb80 <== NOT EXECUTED 4001cbb4: c4 04 60 0c ld [ %l1 + 0xc ], %g2 <== NOT EXECUTED 4001cecc : ssize_t memfile_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4001cecc: 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 ); 4001ced0: d2 02 20 08 ld [ %o0 + 8 ], %o1 4001ced4: d0 02 20 2c ld [ %o0 + 0x2c ], %o0 ssize_t memfile_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4001ced8: 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 ); 4001cedc: 94 10 00 01 mov %g1, %o2 4001cee0: 82 13 c0 00 mov %o7, %g1 4001cee4: 7f ff ff 35 call 4001cbb8 4001cee8: 9e 10 40 00 mov %g1, %o7 4001ceec: 01 00 00 00 nop <== NOT EXECUTED 4001c478 : */ int memfile_rmnod( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4001c478: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4001c47c: 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 ) { 4001c480: c2 06 20 08 ld [ %i0 + 8 ], %g1 4001c484: 80 a0 60 00 cmp %g1, 0 4001c488: 22 80 00 06 be,a 4001c4a0 4001c48c: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 <== NOT EXECUTED Chain_Extract( (Chain_Node *) the_jnode ); 4001c490: 7f ff fb 5f call 4001b20c <_Chain_Extract> 4001c494: 90 10 00 18 mov %i0, %o0 the_jnode->Parent = NULL; 4001c498: c0 26 20 08 clr [ %i0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4001c49c: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 4001c4a0: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4001c4a4: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 4001c4a8: 90 07 bf f0 add %fp, -16, %o0 4001c4ac: 7f ff a2 e7 call 40005048 4001c4b0: c2 36 20 30 sth %g1, [ %i0 + 0x30 ] 4001c4b4: c2 07 bf f0 ld [ %fp + -16 ], %g1 return memfile_check_rmnod( the_jnode ); 4001c4b8: 90 10 00 18 mov %i0, %o0 4001c4bc: 7f ff ff d6 call 4001c414 4001c4c0: c2 26 20 44 st %g1, [ %i0 + 0x44 ] } 4001c4c4: 81 c7 e0 08 ret 4001c4c8: 91 e8 00 08 restore %g0, %o0, %o0 4000b000 : int miniIMFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { return IMFS_initialize_support( 4000b000: 13 10 00 67 sethi %hi(0x40019c00), %o1 4000b004: 15 10 00 6a sethi %hi(0x4001a800), %o2 4000b008: 92 12 62 5c or %o1, 0x25c, %o1 4000b00c: 94 12 a1 44 or %o2, 0x144, %o2 4000b010: 96 10 00 0a mov %o2, %o3 4000b014: 82 13 c0 00 mov %o7, %g1 4000b018: 40 00 02 ac call 4000bac8 4000b01c: 9e 10 40 00 mov %g1, %o7 4000b020: 01 00 00 00 nop <== NOT EXECUTED 400026d4 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 400026d4: 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) ) ) 400026d8: 03 00 00 3c sethi %hi(0xf000), %g1 400026dc: b3 2e 60 10 sll %i1, 0x10, %i1 400026e0: b3 36 60 10 srl %i1, 0x10, %i1 400026e4: 84 8e 40 01 andcc %i1, %g1, %g2 400026e8: 02 80 00 4e be 40002820 400026ec: 03 00 00 04 sethi %hi(0x1000), %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( S_ISFIFO(mode) ) 400026f0: 80 a0 80 01 cmp %g2, %g1 400026f4: 02 80 00 18 be 40002754 400026f8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 400026fc: c2 4e 00 00 ldsb [ %i0 ], %g1 40002700: 80 a0 60 2f cmp %g1, 0x2f 40002704: 02 80 00 1a be 4000276c 40002708: 80 a0 60 5c cmp %g1, 0x5c 4000270c: 02 80 00 18 be 4000276c 40002710: 80 a0 60 00 cmp %g1, 0 40002714: 02 80 00 17 be 40002770 40002718: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000271c: c6 00 63 20 ld [ %g1 + 0x320 ], %g3 ! 40019f20 40002720: 88 10 20 00 clr %g4 40002724: c2 00 e0 04 ld [ %g3 + 4 ], %g1 40002728: c2 27 bf e4 st %g1, [ %fp + -28 ] 4000272c: c4 00 e0 08 ld [ %g3 + 8 ], %g2 40002730: c4 27 bf e8 st %g2, [ %fp + -24 ] 40002734: c2 00 e0 0c ld [ %g3 + 0xc ], %g1 40002738: c2 27 bf ec st %g1, [ %fp + -20 ] if ( !temp_loc.ops->evalformake_h ) { 4000273c: c2 07 bf ec ld [ %fp + -20 ], %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( S_ISFIFO(mode) ) rtems_set_errno_and_return_minus_one( ENOTSUP ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 40002740: c4 00 e0 10 ld [ %g3 + 0x10 ], %g2 if ( !temp_loc.ops->evalformake_h ) { 40002744: c2 00 60 04 ld [ %g1 + 4 ], %g1 40002748: 80 a0 60 00 cmp %g1, 0 4000274c: 12 80 00 17 bne 400027a8 40002750: c4 27 bf f0 st %g2, [ %fp + -16 ] if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 40002754: 40 00 31 a6 call 4000edec <__errno> 40002758: b0 10 3f ff mov -1, %i0 4000275c: 82 10 20 86 mov 0x86, %g1 40002760: c2 22 00 00 st %g1, [ %o0 ] 40002764: 81 c7 e0 08 ret 40002768: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( EINVAL ); if ( S_ISFIFO(mode) ) rtems_set_errno_and_return_minus_one( ENOTSUP ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 4000276c: 03 10 00 67 sethi %hi(0x40019c00), %g1 40002770: c6 00 63 20 ld [ %g1 + 0x320 ], %g3 ! 40019f20 40002774: 88 10 20 01 mov 1, %g4 40002778: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 4000277c: c2 27 bf e4 st %g1, [ %fp + -28 ] 40002780: c4 00 e0 18 ld [ %g3 + 0x18 ], %g2 40002784: c4 27 bf e8 st %g2, [ %fp + -24 ] 40002788: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 4000278c: c2 27 bf ec st %g1, [ %fp + -20 ] if ( !temp_loc.ops->evalformake_h ) { 40002790: c2 07 bf ec ld [ %fp + -20 ], %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( S_ISFIFO(mode) ) rtems_set_errno_and_return_minus_one( ENOTSUP ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 40002794: c4 00 e0 20 ld [ %g3 + 0x20 ], %g2 if ( !temp_loc.ops->evalformake_h ) { 40002798: c2 00 60 04 ld [ %g1 + 4 ], %g1 4000279c: 80 a0 60 00 cmp %g1, 0 400027a0: 02 bf ff ed be 40002754 400027a4: c4 27 bf f0 st %g2, [ %fp + -16 ] rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 400027a8: 90 06 00 04 add %i0, %g4, %o0 400027ac: a0 07 bf e4 add %fp, -28, %l0 400027b0: 94 07 bf f4 add %fp, -12, %o2 400027b4: 92 10 00 10 mov %l0, %o1 400027b8: 9f c0 40 00 call %g1 400027bc: b0 10 3f ff mov -1, %i0 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 400027c0: 80 a2 20 00 cmp %o0, 0 400027c4: 12 bf ff e8 bne 40002764 400027c8: c2 07 bf ec ld [ %fp + -20 ], %g1 return -1; if ( !temp_loc.ops->mknod_h ) { 400027cc: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 400027d0: 80 a0 a0 00 cmp %g2, 0 400027d4: 02 80 00 19 be 40002838 400027d8: d0 07 bf f4 ld [ %fp + -12 ], %o0 rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 400027dc: 92 10 00 19 mov %i1, %o1 400027e0: 94 10 00 1a mov %i2, %o2 400027e4: 96 10 00 1b mov %i3, %o3 400027e8: 9f c0 80 00 call %g2 400027ec: 98 10 00 10 mov %l0, %o4 rtems_filesystem_freenode( &temp_loc ); 400027f0: c2 07 bf ec ld [ %fp + -20 ], %g1 400027f4: 80 a0 60 00 cmp %g1, 0 400027f8: 02 bf ff db be 40002764 400027fc: b0 10 00 08 mov %o0, %i0 40002800: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40002804: 80 a0 60 00 cmp %g1, 0 40002808: 02 80 00 0a be 40002830 4000280c: 01 00 00 00 nop 40002810: 9f c0 40 00 call %g1 40002814: 90 10 00 10 mov %l0, %o0 return result; } 40002818: 81 c7 e0 08 ret 4000281c: 81 e8 00 00 restore int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); 40002820: 40 00 31 73 call 4000edec <__errno> <== NOT EXECUTED 40002824: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002828: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000282c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40002830: 81 c7 e0 08 ret 40002834: 81 e8 00 00 restore ); if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); 40002838: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4000283c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002840: 02 bf ff c5 be 40002754 <== NOT EXECUTED 40002844: 01 00 00 00 nop <== NOT EXECUTED 40002848: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000284c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40002850: 30 bf ff c1 b,a 40002754 <== NOT EXECUTED 4000c504 : rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, char *device, char *mount_point ) { 4000c504: 9d e3 bf 88 save %sp, -120, %sp /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 4000c508: 80 a6 60 00 cmp %i1, 0 4000c50c: 02 80 00 8c be 4000c73c 4000c510: a4 10 00 18 mov %i0, %l2 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 4000c514: 80 a6 a0 01 cmp %i2, 1 4000c518: 18 80 00 89 bgu 4000c73c 4000c51c: 01 00 00 00 nop errno = EINVAL; return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 4000c520: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 4000c524: 80 a0 60 00 cmp %g1, 0 4000c528: 02 80 00 4c be 4000c658 4000c52c: 80 a6 e0 00 cmp %i3, 0 /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 4000c530: 02 80 00 05 be 4000c544 4000c534: 90 10 20 64 mov 0x64, %o0 size += strlen( device ) + 1; 4000c538: 40 00 0f 0b call 40010164 <== NOT EXECUTED 4000c53c: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 4000c540: 90 02 20 65 add %o0, 0x65, %o0 <== NOT EXECUTED temp_mt_entry = malloc( size ); 4000c544: 7f ff d7 7f call 40002340 4000c548: 01 00 00 00 nop if ( !temp_mt_entry ) { 4000c54c: a2 92 20 00 orcc %o0, 0, %l1 4000c550: 02 80 00 95 be 4000c7a4 4000c554: a0 10 00 11 mov %l1, %l0 errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; 4000c558: f4 24 60 28 st %i2, [ %l1 + 0x28 ] if ( device ) { 4000c55c: 80 a6 e0 00 cmp %i3, 0 4000c560: 02 80 00 47 be 4000c67c 4000c564: e2 24 20 24 st %l1, [ %l0 + 0x24 ] temp_mt_entry->dev = 4000c568: 90 04 60 64 add %l1, 0x64, %o0 <== NOT EXECUTED (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 4000c56c: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 4000c570: 40 00 0e dd call 400100e4 <== NOT EXECUTED 4000c574: d0 24 60 60 st %o0, [ %l1 + 0x60 ] <== NOT EXECUTED /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 4000c578: 80 a7 20 00 cmp %i4, 0 4000c57c: 02 80 00 20 be 4000c5fc 4000c580: 90 10 00 1c mov %i4, %o0 if ( rtems_filesystem_evaluate_path( 4000c584: 92 10 20 07 mov 7, %o1 4000c588: b8 07 bf e8 add %fp, -24, %i4 4000c58c: 96 10 20 01 mov 1, %o3 4000c590: 7f ff d6 ab call 4000203c 4000c594: 94 10 00 1c mov %i4, %o2 4000c598: 80 a2 3f ff cmp %o0, -1 4000c59c: 02 80 00 33 be 4000c668 4000c5a0: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 4000c5a4: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 4000c5a8: 80 a0 60 00 cmp %g1, 0 4000c5ac: 02 80 00 5a be 4000c714 4000c5b0: 01 00 00 00 nop /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 4000c5b4: 9f c0 40 00 call %g1 4000c5b8: 90 10 00 1c mov %i4, %o0 4000c5bc: 80 a2 20 01 cmp %o0, 1 4000c5c0: 02 80 00 31 be 4000c684 4000c5c4: 03 10 00 6c sethi %hi(0x4001b000), %g1 errno = ENOTDIR; 4000c5c8: 40 00 0a 09 call 4000edec <__errno> 4000c5cc: 01 00 00 00 nop 4000c5d0: 82 10 20 14 mov 0x14, %g1 ! 14 4000c5d4: c2 22 00 00 st %g1, [ %o0 ] return 0; cleanup_and_bail: free( temp_mt_entry ); 4000c5d8: 90 10 00 11 mov %l1, %o0 4000c5dc: 7f ff d7 30 call 4000229c 4000c5e0: a0 10 00 1c mov %i4, %l0 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 4000c5e4: c2 04 20 08 ld [ %l0 + 8 ], %g1 4000c5e8: 80 a0 60 00 cmp %g1, 0 4000c5ec: 32 80 00 5a bne,a 4000c754 4000c5f0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000c5f4: 81 c7 e0 08 ret <== NOT EXECUTED 4000c5f8: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED * This is a mount of the base file system --> The * mt_point_node.node_access will be set to null to indicate that this * is the root of the entire file system. */ temp_mt_entry->mt_fs_root.node_access = NULL; 4000c5fc: c0 24 60 18 clr [ %l1 + 0x18 ] temp_mt_entry->mt_fs_root.handlers = NULL; 4000c600: c0 24 60 1c clr [ %l1 + 0x1c ] temp_mt_entry->mt_fs_root.ops = NULL; 4000c604: c0 24 60 20 clr [ %l1 + 0x20 ] temp_mt_entry->mt_point_node.node_access = NULL; 4000c608: c0 24 60 08 clr [ %l1 + 8 ] temp_mt_entry->mt_point_node.handlers = NULL; 4000c60c: c0 24 60 0c clr [ %l1 + 0xc ] temp_mt_entry->mt_point_node.ops = NULL; 4000c610: c0 24 60 10 clr [ %l1 + 0x10 ] temp_mt_entry->mt_point_node.mt_entry = NULL; 4000c614: c0 24 60 14 clr [ %l1 + 0x14 ] 4000c618: a0 10 20 00 clr %l0 } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 4000c61c: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 4000c620: 9f c0 40 00 call %g1 4000c624: 90 10 00 11 mov %l1, %o0 4000c628: 80 a2 20 00 cmp %o0, 0 4000c62c: 12 80 00 51 bne 4000c770 4000c630: 11 10 00 6c sethi %hi(0x4001b000), %o0 /* * Add the mount table entry to the mount table chain */ Chain_Append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); 4000c634: 92 10 00 11 mov %l1, %o1 4000c638: 7f ff e9 ce call 40006d70 <_Chain_Append> 4000c63c: 90 12 21 e8 or %o0, 0x1e8, %o0 if ( mt_entry ) 4000c640: 80 a4 a0 00 cmp %l2, 0 4000c644: 02 80 00 03 be 4000c650 4000c648: b0 10 20 00 clr %i0 *mt_entry = temp_mt_entry; 4000c64c: e2 24 80 00 st %l1, [ %l2 ] 4000c650: 81 c7 e0 08 ret 4000c654: 81 e8 00 00 restore return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { errno = ENOTSUP; 4000c658: 40 00 09 e5 call 4000edec <__errno> <== NOT EXECUTED 4000c65c: a0 10 20 00 clr %l0 <== NOT EXECUTED 4000c660: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000c664: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 4000c668: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000c66c: 7f ff d7 0c call 4000229c <== NOT EXECUTED 4000c670: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 4000c674: 81 c7 e0 08 ret <== NOT EXECUTED 4000c678: 81 e8 00 00 restore <== 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; 4000c67c: 10 bf ff bf b 4000c578 4000c680: c0 24 60 60 clr [ %l1 + 0x60 ] /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 4000c684: c4 00 61 e8 ld [ %g1 + 0x1e8 ], %g2 4000c688: 82 10 61 e8 or %g1, 0x1e8, %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000c68c: 88 00 60 04 add %g1, 4, %g4 !Chain_Is_tail( &rtems_filesystem_mount_table_control, the_node ); 4000c690: 80 a0 80 04 cmp %g2, %g4 4000c694: 02 80 00 0e be 4000c6cc 4000c698: c6 07 bf e8 ld [ %fp + -24 ], %g3 the_node = the_node->next ) { the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node; if ( the_mount_entry->mt_fs_root.node_access == loc->node_access ) 4000c69c: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 4000c6a0: 80 a0 40 03 cmp %g1, %g3 4000c6a4: 32 80 00 07 bne,a 4000c6c0 4000c6a8: c4 00 80 00 ld [ %g2 ], %g2 4000c6ac: 30 80 00 1f b,a 4000c728 <== NOT EXECUTED 4000c6b0: 80 a0 40 03 cmp %g1, %g3 4000c6b4: 02 80 00 1d be 4000c728 4000c6b8: 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 ) { 4000c6bc: 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 ); 4000c6c0: 80 a0 80 04 cmp %g2, %g4 4000c6c4: 32 bf ff fb bne,a 4000c6b0 4000c6c8: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; 4000c6cc: c2 07 bf f0 ld [ %fp + -16 ], %g1 * may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; 4000c6d0: c6 24 60 08 st %g3, [ %l1 + 8 ] temp_mt_entry->mt_point_node.handlers = loc.handlers; 4000c6d4: c4 07 bf ec ld [ %fp + -20 ], %g2 temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 4000c6d8: c6 07 bf f4 ld [ %fp + -12 ], %g3 /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 4000c6dc: c8 00 60 20 ld [ %g1 + 0x20 ], %g4 * until the system is unmounted. It may be needed to correctly * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; 4000c6e0: c4 24 60 0c st %g2, [ %l1 + 0xc ] temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 4000c6e4: c6 24 60 14 st %g3, [ %l1 + 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 ){ 4000c6e8: 80 a1 20 00 cmp %g4, 0 4000c6ec: 02 80 00 0a be 4000c714 4000c6f0: c2 24 60 10 st %g1, [ %l1 + 0x10 ] errno = ENOTSUP; goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 4000c6f4: 90 10 00 11 mov %l1, %o0 4000c6f8: 9f c1 00 00 call %g4 4000c6fc: a0 10 00 1c mov %i4, %l0 4000c700: 80 a2 20 00 cmp %o0, 0 4000c704: 22 bf ff c7 be,a 4000c620 4000c708: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 return 0; cleanup_and_bail: free( temp_mt_entry ); 4000c70c: 10 bf ff b4 b 4000c5dc <== NOT EXECUTED 4000c710: 90 10 00 11 mov %l1, %o0 <== 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; 4000c714: 40 00 09 b6 call 4000edec <__errno> <== NOT EXECUTED 4000c718: 01 00 00 00 nop <== NOT EXECUTED 4000c71c: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4000c720: 10 bf ff ae b 4000c5d8 <== NOT EXECUTED 4000c724: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 4000c728: 40 00 09 b1 call 4000edec <__errno> 4000c72c: 01 00 00 00 nop 4000c730: 82 10 20 10 mov 0x10, %g1 ! 10 4000c734: 10 bf ff a9 b 4000c5d8 4000c738: c2 22 00 00 st %g1, [ %o0 ] * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 4000c73c: 40 00 09 ac call 4000edec <__errno> 4000c740: b0 10 3f ff mov -1, %i0 4000c744: 82 10 20 16 mov 0x16, %g1 4000c748: c2 22 00 00 st %g1, [ %o0 ] 4000c74c: 81 c7 e0 08 ret 4000c750: 81 e8 00 00 restore cleanup_and_bail: free( temp_mt_entry ); if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 4000c754: 80 a0 60 00 cmp %g1, 0 4000c758: 02 bf ff a7 be 4000c5f4 4000c75c: 90 10 00 10 mov %l0, %o0 4000c760: 9f c0 40 00 call %g1 4000c764: b0 10 3f ff mov -1, %i0 4000c768: 81 c7 e0 08 ret 4000c76c: 81 e8 00 00 restore temp_mt_entry->mt_point_node.mt_entry = NULL; } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 4000c770: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 4000c774: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 <== NOT EXECUTED 4000c778: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c77c: 02 80 00 04 be 4000c78c <== NOT EXECUTED 4000c780: 01 00 00 00 nop <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 4000c784: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000c788: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 4000c78c: 7f ff d6 c4 call 4000229c <== NOT EXECUTED 4000c790: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED if ( loc_to_free ) 4000c794: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 4000c798: 32 bf ff 94 bne,a 4000c5e8 <== NOT EXECUTED 4000c79c: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 4000c7a0: 30 bf ff 95 b,a 4000c5f4 <== NOT EXECUTED if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); if ( !temp_mt_entry ) { errno = ENOMEM; 4000c7a4: 40 00 09 92 call 4000edec <__errno> <== NOT EXECUTED 4000c7a8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000c7ac: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 4000c7b0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000c7b4: 81 c7 e0 08 ret <== NOT EXECUTED 4000c7b8: 81 e8 00 00 restore <== NOT EXECUTED 40009e04 : */ int mq_close( mqd_t mqdes ) { 40009e04: 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 *) 40009e08: 21 10 00 99 sethi %hi(0x40026400), %l0 40009e0c: 92 10 00 18 mov %i0, %o1 40009e10: 94 07 bf f4 add %fp, -12, %o2 40009e14: 40 00 13 eb call 4000edc0 <_Objects_Get> 40009e18: 90 14 21 d0 or %l0, 0x1d0, %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 ) { 40009e1c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40009e20: 80 a0 60 01 cmp %g1, 1 40009e24: 02 80 00 2e be 40009edc 40009e28: b0 10 00 08 mov %o0, %i0 40009e2c: 80 a0 60 01 cmp %g1, 1 40009e30: 2a 80 00 09 bcs,a 40009e54 40009e34: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 40009e38: 80 a0 60 02 cmp %g1, 2 40009e3c: 02 80 00 2e be 40009ef4 40009e40: 01 00 00 00 nop _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40009e44: 40 00 08 80 call 4000c044 <== NOT EXECUTED 40009e48: 01 00 00 00 nop <== NOT EXECUTED } 40009e4c: 81 c7 e0 08 ret <== NOT EXECUTED 40009e50: 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; 40009e54: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 _POSIX_Message_queue_Delete( the_mq ); 40009e58: 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; 40009e5c: 82 00 7f ff add %g1, -1, %g1 _POSIX_Message_queue_Delete( the_mq ); 40009e60: 40 00 00 2c call 40009f10 <_POSIX_Message_queue_Delete> 40009e64: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40009e68: 90 14 21 d0 or %l0, 0x1d0, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40009e6c: c4 06 20 08 ld [ %i0 + 8 ], %g2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40009e70: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 40009e74: 03 00 00 3f sethi %hi(0xfc00), %g1 40009e78: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40009e7c: 82 08 80 01 and %g2, %g1, %g1 40009e80: 80 a0 40 03 cmp %g1, %g3 40009e84: 38 80 00 06 bgu,a 40009e9c 40009e88: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40009e8c: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40009e90: 83 28 60 02 sll %g1, 2, %g1 40009e94: 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; 40009e98: 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 ); 40009e9c: 40 00 13 86 call 4000ecb4 <_Objects_Free> 40009ea0: 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 ) 40009ea4: 03 10 00 98 sethi %hi(0x40026000), %g1 40009ea8: c4 00 60 00 ld [ %g1 ], %g2 40009eac: 90 10 20 00 clr %o0 40009eb0: 84 00 bf ff add %g2, -1, %g2 40009eb4: c4 20 60 00 st %g2, [ %g1 ] 40009eb8: c6 00 60 00 ld [ %g1 ], %g3 40009ebc: 80 a0 e0 00 cmp %g3, 0 40009ec0: 12 bf ff e3 bne 40009e4c 40009ec4: 01 00 00 00 nop _Thread_Dispatch(); 40009ec8: 40 00 18 aa call 40010170 <_Thread_Dispatch> 40009ecc: 01 00 00 00 nop 40009ed0: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40009ed4: 81 c7 e0 08 ret 40009ed8: 91 e8 00 08 restore %g0, %o0, %o0 the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); case OBJECTS_REMOTE: _Thread_Dispatch(); 40009edc: 40 00 18 a5 call 40010170 <_Thread_Dispatch> <== NOT EXECUTED 40009ee0: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 40009ee4: 40 00 08 62 call 4000c06c <== NOT EXECUTED 40009ee8: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40009eec: 81 c7 e0 08 ret <== NOT EXECUTED 40009ef0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED Objects_Locations location; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); 40009ef4: 40 00 31 bd call 400165e8 <__errno> 40009ef8: 01 00 00 00 nop 40009efc: 82 10 20 09 mov 9, %g1 ! 9 40009f00: c2 22 00 00 st %g1, [ %o0 ] 40009f04: 90 10 3f ff mov -1, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40009f08: 81 c7 e0 08 ret 40009f0c: 91 e8 00 08 restore %g0, %o0, %o0 40009fa0 : int mq_getattr( mqd_t mqdes, struct mq_attr *mqstat ) { 40009fa0: 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 ) 40009fa4: 80 a6 60 00 cmp %i1, 0 40009fa8: 02 80 00 36 be 4000a080 40009fac: 92 10 00 18 mov %i0, %o1 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 *) 40009fb0: 11 10 00 99 sethi %hi(0x40026400), %o0 40009fb4: 94 07 bf f4 add %fp, -12, %o2 40009fb8: 40 00 13 82 call 4000edc0 <_Objects_Get> 40009fbc: 90 12 21 d0 or %o0, 0x1d0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 40009fc0: c2 07 bf f4 ld [ %fp + -12 ], %g1 40009fc4: 80 a0 60 01 cmp %g1, 1 40009fc8: 02 80 00 28 be 4000a068 40009fcc: 01 00 00 00 nop 40009fd0: 2a 80 00 09 bcs,a 40009ff4 40009fd4: c6 02 20 10 ld [ %o0 + 0x10 ], %g3 40009fd8: 80 a0 60 02 cmp %g1, 2 40009fdc: 02 80 00 1c be 4000a04c 40009fe0: 01 00 00 00 nop mqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages; _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40009fe4: 40 00 08 18 call 4000c044 <== NOT EXECUTED 40009fe8: 01 00 00 00 nop <== NOT EXECUTED } 40009fec: 81 c7 e0 08 ret 40009ff0: 91 e8 00 08 restore %g0, %o0, %o0 * Return the old values. */ the_mq_attr = &the_mq->Message_queue.Attributes; mqstat->mq_flags = the_mq_fd->oflag; 40009ff4: c4 02 20 14 ld [ %o0 + 0x14 ], %g2 40009ff8: c4 26 40 00 st %g2, [ %i1 ] mqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size; 40009ffc: c2 00 e0 6c ld [ %g3 + 0x6c ], %g1 4000a000: c2 26 60 08 st %g1, [ %i1 + 8 ] mqstat->mq_maxmsg = the_mq->Message_queue.maximum_pending_messages; 4000a004: c4 00 e0 64 ld [ %g3 + 0x64 ], %g2 4000a008: c4 26 60 04 st %g2, [ %i1 + 4 ] mqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages; 4000a00c: c2 00 e0 68 ld [ %g3 + 0x68 ], %g1 4000a010: 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 ) 4000a014: 07 10 00 98 sethi %hi(0x40026000), %g3 4000a018: c2 00 e0 00 ld [ %g3 ], %g1 4000a01c: 90 10 20 00 clr %o0 4000a020: 82 00 7f ff add %g1, -1, %g1 4000a024: c2 20 e0 00 st %g1, [ %g3 ] 4000a028: c4 00 e0 00 ld [ %g3 ], %g2 4000a02c: 80 a0 a0 00 cmp %g2, 0 4000a030: 12 bf ff ef bne 40009fec 4000a034: 01 00 00 00 nop _Thread_Dispatch(); 4000a038: 40 00 18 4e call 40010170 <_Thread_Dispatch> 4000a03c: 01 00 00 00 nop 4000a040: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000a044: 81 c7 e0 08 ret 4000a048: 91 e8 00 08 restore %g0, %o0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); 4000a04c: 40 00 31 67 call 400165e8 <__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: 90 10 3f ff mov -1, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000a060: 81 c7 e0 08 ret 4000a064: 91 e8 00 08 restore %g0, %o0, %o0 the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); case OBJECTS_REMOTE: _Thread_Dispatch(); 4000a068: 40 00 18 42 call 40010170 <_Thread_Dispatch> <== NOT EXECUTED 4000a06c: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 4000a070: 40 00 07 ff call 4000c06c <== NOT EXECUTED 4000a074: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000a078: 81 c7 e0 08 ret <== NOT EXECUTED 4000a07c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; CORE_message_queue_Attributes *the_mq_attr; if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL ); 4000a080: 40 00 31 5a call 400165e8 <__errno> 4000a084: 01 00 00 00 nop 4000a088: 82 10 20 16 mov 0x16, %g1 ! 16 4000a08c: c2 22 00 00 st %g1, [ %o0 ] 4000a090: 10 bf ff d7 b 40009fec 4000a094: 90 10 3f ff mov -1, %o0 4000a0bc : int mq_notify( mqd_t mqdes, const struct sigevent *notification ) { 4000a0bc: 9d e3 bf 90 save %sp, -112, %sp 4000a0c0: 11 10 00 99 sethi %hi(0x40026400), %o0 4000a0c4: 92 10 00 18 mov %i0, %o1 4000a0c8: 90 12 21 d0 or %o0, 0x1d0, %o0 4000a0cc: 40 00 13 3d call 4000edc0 <_Objects_Get> 4000a0d0: 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 ) { 4000a0d4: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000a0d8: 80 a0 60 01 cmp %g1, 1 4000a0dc: 02 80 00 2e be 4000a194 4000a0e0: 01 00 00 00 nop 4000a0e4: 0a 80 00 09 bcs 4000a108 4000a0e8: 80 a6 60 00 cmp %i1, 0 4000a0ec: 80 a0 60 02 cmp %g1, 2 4000a0f0: 02 80 00 2f be 4000a1ac 4000a0f4: 01 00 00 00 nop } _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 4000a0f8: 40 00 07 d3 call 4000c044 <== NOT EXECUTED 4000a0fc: 01 00 00 00 nop <== NOT EXECUTED } 4000a100: 81 c7 e0 08 ret 4000a104: 91 e8 00 08 restore %g0, %o0, %o0 return POSIX_MP_NOT_IMPLEMENTED(); rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: the_mq = the_mq_fd->Queue; if ( notification ) { 4000a108: 02 80 00 3e be 4000a200 4000a10c: d0 02 20 10 ld [ %o0 + 0x10 ], %o0 if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) { 4000a110: c2 02 20 80 ld [ %o0 + 0x80 ], %g1 4000a114: 80 a0 60 00 cmp %g1, 0 4000a118: 12 80 00 2c bne 4000a1c8 4000a11c: 01 00 00 00 nop the_message_queue->notify_argument = the_argument; 4000a120: c0 22 20 84 clr [ %o0 + 0x84 ] rtems_set_errno_and_return_minus_one( EBUSY ); } _CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL ); the_mq->notification = *notification; 4000a124: c2 06 40 00 ld [ %i1 ], %g1 4000a128: c2 22 20 94 st %g1, [ %o0 + 0x94 ] 4000a12c: c4 06 60 04 ld [ %i1 + 4 ], %g2 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 4000a130: 03 10 00 28 sethi %hi(0x4000a000), %g1 4000a134: c4 22 20 98 st %g2, [ %o0 + 0x98 ] 4000a138: c6 06 60 08 ld [ %i1 + 8 ], %g3 4000a13c: 82 10 60 98 or %g1, 0x98, %g1 4000a140: c6 22 20 9c st %g3, [ %o0 + 0x9c ] 4000a144: c2 22 20 80 st %g1, [ %o0 + 0x80 ] 4000a148: c2 06 60 0c ld [ %i1 + 0xc ], %g1 4000a14c: c2 22 20 a0 st %g1, [ %o0 + 0xa0 ] 4000a150: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 the_message_queue->notify_argument = the_argument; 4000a154: d0 22 20 84 st %o0, [ %o0 + 0x84 ] 4000a158: c4 22 20 a4 st %g2, [ %o0 + 0xa4 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000a15c: 03 10 00 98 sethi %hi(0x40026000), %g1 4000a160: c4 00 60 00 ld [ %g1 ], %g2 4000a164: 90 10 20 00 clr %o0 4000a168: 84 00 bf ff add %g2, -1, %g2 4000a16c: c4 20 60 00 st %g2, [ %g1 ] 4000a170: c6 00 60 00 ld [ %g1 ], %g3 4000a174: 80 a0 e0 00 cmp %g3, 0 4000a178: 12 bf ff e2 bne 4000a100 4000a17c: 01 00 00 00 nop _Thread_Dispatch(); 4000a180: 40 00 17 fc call 40010170 <_Thread_Dispatch> 4000a184: 01 00 00 00 nop 4000a188: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000a18c: 81 c7 e0 08 ret 4000a190: 91 e8 00 08 restore %g0, %o0, %o0 the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); case OBJECTS_REMOTE: _Thread_Dispatch(); 4000a194: 40 00 17 f7 call 40010170 <_Thread_Dispatch> <== NOT EXECUTED 4000a198: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 4000a19c: 40 00 07 b4 call 4000c06c <== NOT EXECUTED 4000a1a0: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000a1a4: 81 c7 e0 08 ret <== NOT EXECUTED 4000a1a8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED Objects_Locations location; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); 4000a1ac: 40 00 31 0f call 400165e8 <__errno> 4000a1b0: 01 00 00 00 nop 4000a1b4: 82 10 20 09 mov 9, %g1 ! 9 4000a1b8: c2 22 00 00 st %g1, [ %o0 ] 4000a1bc: 90 10 3f ff mov -1, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000a1c0: 81 c7 e0 08 ret 4000a1c4: 91 e8 00 08 restore %g0, %o0, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000a1c8: 03 10 00 98 sethi %hi(0x40026000), %g1 4000a1cc: c4 00 60 00 ld [ %g1 ], %g2 4000a1d0: 84 00 bf ff add %g2, -1, %g2 4000a1d4: c4 20 60 00 st %g2, [ %g1 ] 4000a1d8: c6 00 60 00 ld [ %g1 ], %g3 4000a1dc: 80 a0 e0 00 cmp %g3, 0 4000a1e0: 02 80 00 0b be 4000a20c 4000a1e4: 01 00 00 00 nop the_mq = the_mq_fd->Queue; if ( notification ) { if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBUSY ); 4000a1e8: 40 00 31 00 call 400165e8 <__errno> 4000a1ec: 01 00 00 00 nop 4000a1f0: 82 10 20 10 mov 0x10, %g1 ! 10 4000a1f4: c2 22 00 00 st %g1, [ %o0 ] 4000a1f8: 10 bf ff c2 b 4000a100 4000a1fc: 90 10 3f ff mov -1, %o0 4000a200: c0 22 20 84 clr [ %o0 + 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; 4000a204: 10 bf ff d6 b 4000a15c 4000a208: c0 22 20 80 clr [ %o0 + 0x80 ] _Thread_Dispatch(); 4000a20c: 40 00 17 d9 call 40010170 <_Thread_Dispatch> 4000a210: 01 00 00 00 nop 4000a214: 30 bf ff f5 b,a 4000a1e8 4000a218 : int oflag, ... /* mode_t mode, */ /* struct mq_attr attr */ ) { 4000a218: 9d e3 bf 88 save %sp, -120, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000a21c: 21 10 00 98 sethi %hi(0x40026000), %l0 4000a220: c2 04 20 00 ld [ %l0 ], %g1 4000a224: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 4000a228: 82 00 60 01 inc %g1 4000a22c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 4000a230: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 4000a234: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 4000a238: c2 24 20 00 st %g1, [ %l0 ] 4000a23c: a2 10 00 18 mov %i0, %l1 POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 4000a240: ba 8e 62 00 andcc %i1, 0x200, %i5 4000a244: 12 80 00 16 bne 4000a29c 4000a248: f4 07 a0 50 ld [ %fp + 0x50 ], %i2 4000a24c: b4 10 20 00 clr %i2 */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *) 4000a250: 39 10 00 99 sethi %hi(0x40026400), %i4 4000a254: 40 00 11 8a call 4000e87c <_Objects_Allocate> 4000a258: 90 17 21 d0 or %i4, 0x1d0, %o0 ! 400265d0 <_POSIX_Message_queue_Information_fds> attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { 4000a25c: b0 92 20 00 orcc %o0, 0, %i0 4000a260: 32 80 00 1a bne,a 4000a2c8 4000a264: f2 26 20 14 st %i1, [ %i0 + 0x14 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000a268: c2 04 20 00 ld [ %l0 ], %g1 4000a26c: 82 00 7f ff add %g1, -1, %g1 4000a270: c2 24 20 00 st %g1, [ %l0 ] 4000a274: c4 04 20 00 ld [ %l0 ], %g2 4000a278: 80 a0 a0 00 cmp %g2, 0 4000a27c: 02 80 00 0b be 4000a2a8 4000a280: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); 4000a284: 40 00 30 d9 call 400165e8 <__errno> <== NOT EXECUTED 4000a288: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4000a28c: 82 10 20 17 mov 0x17, %g1 <== NOT EXECUTED 4000a290: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000a294: 81 c7 e0 08 ret <== NOT EXECUTED 4000a298: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); 4000a29c: 82 07 a0 54 add %fp, 0x54, %g1 4000a2a0: 10 bf ff ec b 4000a250 4000a2a4: c2 27 bf f4 st %g1, [ %fp + -12 ] _Thread_Dispatch(); 4000a2a8: 40 00 17 b2 call 40010170 <_Thread_Dispatch> 4000a2ac: b0 10 3f ff mov -1, %i0 } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); 4000a2b0: 40 00 30 ce call 400165e8 <__errno> 4000a2b4: 01 00 00 00 nop 4000a2b8: 82 10 20 17 mov 0x17, %g1 ! 17 4000a2bc: c2 22 00 00 st %g1, [ %o0 ] 4000a2c0: 81 c7 e0 08 ret 4000a2c4: 81 e8 00 00 restore } the_mq_fd->oflag = oflag; status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 4000a2c8: 90 10 00 11 mov %l1, %o0 4000a2cc: 40 00 26 36 call 40013ba4 <_POSIX_Message_queue_Name_to_id> 4000a2d0: 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 ) { 4000a2d4: b6 92 20 00 orcc %o0, 0, %i3 4000a2d8: 02 80 00 14 be 4000a328 4000a2dc: 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) ) ) { 4000a2e0: 80 a6 e0 02 cmp %i3, 2 4000a2e4: 02 80 00 51 be 4000a428 4000a2e8: 80 a7 60 00 cmp %i5, 0 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 ); 4000a2ec: 90 17 21 d0 or %i4, 0x1d0, %o0 4000a2f0: 40 00 12 71 call 4000ecb4 <_Objects_Free> 4000a2f4: 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 ) 4000a2f8: c2 04 20 00 ld [ %l0 ], %g1 4000a2fc: 82 00 7f ff add %g1, -1, %g1 4000a300: c2 24 20 00 st %g1, [ %l0 ] 4000a304: c4 04 20 00 ld [ %l0 ], %g2 4000a308: 80 a0 a0 00 cmp %g2, 0 4000a30c: 02 80 00 1a be 4000a374 4000a310: 01 00 00 00 nop _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); 4000a314: 40 00 30 b5 call 400165e8 <__errno> 4000a318: b0 10 3f ff mov -1, %i0 ! ffffffff 4000a31c: f6 22 00 00 st %i3, [ %o0 ] 4000a320: 81 c7 e0 08 ret 4000a324: 81 e8 00 00 restore /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 4000a328: 80 a0 6a 00 cmp %g1, 0xa00 4000a32c: 12 80 00 18 bne 4000a38c 4000a330: d2 07 bf f0 ld [ %fp + -16 ], %o1 4000a334: 90 17 21 d0 or %i4, 0x1d0, %o0 4000a338: 40 00 12 5f call 4000ecb4 <_Objects_Free> 4000a33c: 92 10 00 18 mov %i0, %o1 4000a340: c2 04 20 00 ld [ %l0 ], %g1 4000a344: 82 00 7f ff add %g1, -1, %g1 4000a348: c2 24 20 00 st %g1, [ %l0 ] 4000a34c: c4 04 20 00 ld [ %l0 ], %g2 4000a350: 80 a0 a0 00 cmp %g2, 0 4000a354: 02 80 00 0b be 4000a380 4000a358: 01 00 00 00 nop _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); 4000a35c: 40 00 30 a3 call 400165e8 <__errno> 4000a360: b0 10 3f ff mov -1, %i0 ! ffffffff 4000a364: 82 10 20 11 mov 0x11, %g1 4000a368: c2 22 00 00 st %g1, [ %o0 ] 4000a36c: 81 c7 e0 08 ret 4000a370: 81 e8 00 00 restore _Thread_Dispatch(); 4000a374: 40 00 17 7f call 40010170 <_Thread_Dispatch> 4000a378: 01 00 00 00 nop 4000a37c: 30 bf ff e6 b,a 4000a314 4000a380: 40 00 17 7c call 40010170 <_Thread_Dispatch> 4000a384: 01 00 00 00 nop 4000a388: 30 bf ff f5 b,a 4000a35c RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control *) 4000a38c: 11 10 00 99 sethi %hi(0x40026400), %o0 <== NOT EXECUTED 4000a390: 94 07 bf e8 add %fp, -24, %o2 <== NOT EXECUTED 4000a394: 40 00 12 8b call 4000edc0 <_Objects_Get> <== NOT EXECUTED 4000a398: 90 12 20 18 or %o0, 0x18, %o0 <== 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; 4000a39c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 <== 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 ); 4000a3a0: d0 27 bf ec st %o0, [ %fp + -20 ] <== NOT EXECUTED the_mq->open_count += 1; 4000a3a4: 82 00 60 01 inc %g1 <== NOT EXECUTED Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000a3a8: 88 17 21 d0 or %i4, 0x1d0, %g4 <== NOT EXECUTED 4000a3ac: c2 22 20 1c st %g1, [ %o0 + 0x1c ] <== NOT EXECUTED 4000a3b0: c6 11 20 10 lduh [ %g4 + 0x10 ], %g3 <== NOT EXECUTED ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 4000a3b4: c4 06 20 08 ld [ %i0 + 8 ], %g2 <== NOT EXECUTED Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000a3b8: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 4000a3bc: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <== NOT EXECUTED 4000a3c0: 82 08 80 01 and %g2, %g1, %g1 <== NOT EXECUTED 4000a3c4: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 4000a3c8: 18 80 00 05 bgu 4000a3dc <== NOT EXECUTED 4000a3cc: d0 26 20 10 st %o0, [ %i0 + 0x10 ] <== NOT EXECUTED information->local_table[ index ] = the_object; 4000a3d0: c4 01 20 20 ld [ %g4 + 0x20 ], %g2 <== NOT EXECUTED 4000a3d4: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 4000a3d8: f0 20 80 01 st %i0, [ %g2 + %g1 ] <== NOT EXECUTED 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; 4000a3dc: c0 26 20 0c clr [ %i0 + 0xc ] <== 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 ) 4000a3e0: c2 04 20 00 ld [ %l0 ], %g1 <== NOT EXECUTED 4000a3e4: 23 10 00 98 sethi %hi(0x40026000), %l1 <== NOT EXECUTED 4000a3e8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000a3ec: c2 24 20 00 st %g1, [ %l0 ] <== NOT EXECUTED 4000a3f0: c4 04 20 00 ld [ %l0 ], %g2 <== NOT EXECUTED 4000a3f4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000a3f8: 02 80 00 28 be 4000a498 <== NOT EXECUTED 4000a3fc: 01 00 00 00 nop <== NOT EXECUTED 4000a400: c2 04 60 00 ld [ %l1 ], %g1 <== NOT EXECUTED 4000a404: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000a408: c2 24 60 00 st %g1, [ %l1 ] <== NOT EXECUTED 4000a40c: c4 04 60 00 ld [ %l1 ], %g2 <== NOT EXECUTED 4000a410: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000a414: 02 80 00 1c be 4000a484 <== NOT EXECUTED 4000a418: 01 00 00 00 nop <== NOT EXECUTED &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); _Thread_Enable_dispatch(); return (mqd_t)the_mq_fd->Object.id; 4000a41c: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 4000a420: 81 c7 e0 08 ret <== NOT EXECUTED 4000a424: 81 e8 00 00 restore <== NOT EXECUTED /* * 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) ) ) { 4000a428: 02 bf ff b2 be 4000a2f0 4000a42c: 90 17 21 d0 or %i4, 0x1d0, %o0 /* * 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( 4000a430: 90 10 00 11 mov %l1, %o0 4000a434: 94 10 00 1a mov %i2, %o2 4000a438: 92 10 20 01 mov 1, %o1 4000a43c: 40 00 25 42 call 40013944 <_POSIX_Message_queue_Create_support> 4000a440: 96 07 bf ec add %fp, -20, %o3 /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { 4000a444: 80 a2 3f ff cmp %o0, -1 4000a448: 12 80 00 1b bne 4000a4b4 4000a44c: c4 07 bf ec ld [ %fp + -20 ], %g2 4000a450: c2 04 20 00 ld [ %l0 ], %g1 4000a454: 82 00 7f ff add %g1, -1, %g1 4000a458: c2 24 20 00 st %g1, [ %l0 ] 4000a45c: c4 04 20 00 ld [ %l0 ], %g2 4000a460: 80 a0 a0 00 cmp %g2, 0 4000a464: 02 80 00 10 be 4000a4a4 4000a468: 01 00 00 00 nop 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 ); 4000a46c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000a470: 90 17 21 d0 or %i4, 0x1d0, %o0 4000a474: 40 00 12 10 call 4000ecb4 <_Objects_Free> 4000a478: b0 10 3f ff mov -1, %i0 4000a47c: 81 c7 e0 08 ret 4000a480: 81 e8 00 00 restore _Thread_Dispatch(); 4000a484: 40 00 17 3b call 40010170 <_Thread_Dispatch> <== NOT EXECUTED 4000a488: 01 00 00 00 nop <== NOT EXECUTED 4000a48c: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 4000a490: 81 c7 e0 08 ret <== NOT EXECUTED 4000a494: 81 e8 00 00 restore <== NOT EXECUTED 4000a498: 40 00 17 36 call 40010170 <_Thread_Dispatch> <== NOT EXECUTED 4000a49c: 01 00 00 00 nop <== NOT EXECUTED 4000a4a0: 30 bf ff d8 b,a 4000a400 <== NOT EXECUTED 4000a4a4: 40 00 17 33 call 40010170 <_Thread_Dispatch> 4000a4a8: 01 00 00 00 nop 4000a4ac: 10 bf ff f1 b 4000a470 4000a4b0: 92 10 00 18 mov %i0, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000a4b4: 90 17 21 d0 or %i4, 0x1d0, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 4000a4b8: c6 06 20 08 ld [ %i0 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000a4bc: c8 12 20 10 lduh [ %o0 + 0x10 ], %g4 4000a4c0: 03 00 00 3f sethi %hi(0xfc00), %g1 4000a4c4: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000a4c8: 82 08 c0 01 and %g3, %g1, %g1 4000a4cc: 80 a0 40 04 cmp %g1, %g4 4000a4d0: 18 80 00 05 bgu 4000a4e4 4000a4d4: c4 26 20 10 st %g2, [ %i0 + 0x10 ] information->local_table[ index ] = the_object; 4000a4d8: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 4000a4dc: 83 28 60 02 sll %g1, 2, %g1 4000a4e0: f0 20 80 01 st %i0, [ %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; 4000a4e4: c0 26 20 0c clr [ %i0 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000a4e8: c2 04 20 00 ld [ %l0 ], %g1 4000a4ec: 82 00 7f ff add %g1, -1, %g1 4000a4f0: c2 24 20 00 st %g1, [ %l0 ] 4000a4f4: c4 04 20 00 ld [ %l0 ], %g2 4000a4f8: 80 a0 a0 00 cmp %g2, 0 4000a4fc: 32 bf ff 66 bne,a 4000a294 4000a500: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED _Thread_Dispatch(); 4000a504: 40 00 17 1b call 40010170 <_Thread_Dispatch> 4000a508: 01 00 00 00 nop NULL ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; 4000a50c: f0 06 20 08 ld [ %i0 + 8 ], %i0 } 4000a510: 81 c7 e0 08 ret 4000a514: 81 e8 00 00 restore 4000a8a4 : int mq_setattr( mqd_t mqdes, const struct mq_attr *mqstat, struct mq_attr *omqstat ) { 4000a8a4: 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 ) 4000a8a8: 80 a6 60 00 cmp %i1, 0 4000a8ac: 02 80 00 3a be 4000a994 4000a8b0: 92 10 00 18 mov %i0, %o1 4000a8b4: 11 10 00 99 sethi %hi(0x40026400), %o0 4000a8b8: 94 07 bf f4 add %fp, -12, %o2 4000a8bc: 40 00 11 41 call 4000edc0 <_Objects_Get> 4000a8c0: 90 12 21 d0 or %o0, 0x1d0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4000a8c4: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000a8c8: 80 a0 60 01 cmp %g1, 1 4000a8cc: 02 80 00 2c be 4000a97c 4000a8d0: 01 00 00 00 nop 4000a8d4: 1a 80 00 1d bcc 4000a948 4000a8d8: 80 a0 60 02 cmp %g1, 2 /* * Return the old values. */ if ( omqstat ) { 4000a8dc: 80 a6 a0 00 cmp %i2, 0 4000a8e0: 02 80 00 0a be 4000a908 4000a8e4: c6 02 20 10 ld [ %o0 + 0x10 ], %g3 omqstat->mq_flags = the_mq_fd->oflag; 4000a8e8: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 4000a8ec: c2 26 80 00 st %g1, [ %i2 ] omqstat->mq_msgsize = the_core_mq->maximum_message_size; 4000a8f0: c4 00 e0 6c ld [ %g3 + 0x6c ], %g2 4000a8f4: c4 26 a0 08 st %g2, [ %i2 + 8 ] omqstat->mq_maxmsg = the_core_mq->maximum_pending_messages; 4000a8f8: c2 00 e0 64 ld [ %g3 + 0x64 ], %g1 4000a8fc: c2 26 a0 04 st %g1, [ %i2 + 4 ] omqstat->mq_curmsgs = the_core_mq->number_of_pending_messages; 4000a900: c4 00 e0 68 ld [ %g3 + 0x68 ], %g2 4000a904: c4 26 a0 0c st %g2, [ %i2 + 0xc ] } the_mq_fd->oflag = mqstat->mq_flags; 4000a908: c2 06 40 00 ld [ %i1 ], %g1 4000a90c: 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 ) 4000a910: 07 10 00 98 sethi %hi(0x40026000), %g3 4000a914: c2 00 e0 00 ld [ %g3 ], %g1 4000a918: 90 10 20 00 clr %o0 4000a91c: 82 00 7f ff add %g1, -1, %g1 4000a920: c2 20 e0 00 st %g1, [ %g3 ] 4000a924: c4 00 e0 00 ld [ %g3 ], %g2 4000a928: 80 a0 a0 00 cmp %g2, 0 4000a92c: 12 80 00 0b bne 4000a958 4000a930: 01 00 00 00 nop _Thread_Dispatch(); 4000a934: 40 00 16 0f call 40010170 <_Thread_Dispatch> 4000a938: 01 00 00 00 nop 4000a93c: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000a940: 81 c7 e0 08 ret 4000a944: 91 e8 00 08 restore %g0, %o0, %o0 if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4000a948: 02 80 00 06 be 4000a960 4000a94c: 01 00 00 00 nop the_mq_fd->oflag = mqstat->mq_flags; _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 4000a950: 40 00 05 bd call 4000c044 <== NOT EXECUTED 4000a954: 01 00 00 00 nop <== NOT EXECUTED } 4000a958: 81 c7 e0 08 ret 4000a95c: 91 e8 00 08 restore %g0, %o0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); 4000a960: 40 00 2f 22 call 400165e8 <__errno> 4000a964: 01 00 00 00 nop 4000a968: 82 10 20 09 mov 9, %g1 ! 9 4000a96c: c2 22 00 00 st %g1, [ %o0 ] 4000a970: 90 10 3f ff mov -1, %o0 the_mq_fd->oflag = mqstat->mq_flags; _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000a974: 81 c7 e0 08 ret 4000a978: 91 e8 00 08 restore %g0, %o0, %o0 the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); case OBJECTS_REMOTE: _Thread_Dispatch(); 4000a97c: 40 00 15 fd call 40010170 <_Thread_Dispatch> <== NOT EXECUTED 4000a980: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 4000a984: 40 00 05 ba call 4000c06c <== NOT EXECUTED 4000a988: 01 00 00 00 nop <== NOT EXECUTED the_mq_fd->oflag = mqstat->mq_flags; _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000a98c: 81 c7 e0 08 ret <== NOT EXECUTED 4000a990: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED POSIX_Message_queue_Control_fd *the_mq_fd; CORE_message_queue_Control *the_core_mq; Objects_Locations location; if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL ); 4000a994: 40 00 2f 15 call 400165e8 <__errno> 4000a998: 01 00 00 00 nop 4000a99c: 82 10 20 16 mov 0x16, %g1 ! 16 4000a9a0: c2 22 00 00 st %g1, [ %o0 ] 4000a9a4: 10 bf ff ed b 4000a958 4000a9a8: 90 10 3f ff mov -1, %o0 4000a9ac : char *msg_ptr, size_t msg_len, unsigned int *msg_prio, const struct timespec *abstime ) { 4000a9ac: 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 ) ) { 4000a9b0: 92 07 bf f4 add %fp, -12, %o1 4000a9b4: 40 00 00 95 call 4000ac08 <_POSIX_Absolute_timeout_to_ticks> 4000a9b8: 90 10 00 1c mov %i4, %o0 char *msg_ptr, size_t msg_len, unsigned int *msg_prio, const struct timespec *abstime ) { 4000a9bc: 92 10 00 19 mov %i1, %o1 4000a9c0: 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 ) ) { 4000a9c4: 80 a2 20 02 cmp %o0, 2 4000a9c8: 18 80 00 09 bgu 4000a9ec 4000a9cc: 96 10 00 1b mov %i3, %o3 4000a9d0: 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( 4000a9d4: da 07 bf f4 ld [ %fp + -12 ], %o5 <== NOT EXECUTED 4000a9d8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000a9dc: 7f ff fe d5 call 4000a530 <_POSIX_Message_queue_Receive_support> <== NOT EXECUTED 4000a9e0: 98 10 00 1c mov %i4, %o4 <== NOT EXECUTED msg_len, msg_prio, do_wait, ticks ); } 4000a9e4: 81 c7 e0 08 ret <== NOT EXECUTED 4000a9e8: 91 e8 00 08 restore %g0, %o0, %o0 <== 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 ) ) { 4000a9ec: 80 a2 20 03 cmp %o0, 3 4000a9f0: 12 bf ff fa bne 4000a9d8 4000a9f4: da 07 bf f4 ld [ %fp + -12 ], %o5 4000a9f8: b8 10 20 01 mov 1, %i4 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } return _POSIX_Message_queue_Receive_support( 4000a9fc: 90 10 00 18 mov %i0, %o0 4000aa00: 7f ff fe cc call 4000a530 <_POSIX_Message_queue_Receive_support> 4000aa04: 98 10 00 1c mov %i4, %o4 msg_len, msg_prio, do_wait, ticks ); } 4000aa08: 81 c7 e0 08 ret 4000aa0c: 91 e8 00 08 restore %g0, %o0, %o0 4000aa10 : const char *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec *abstime ) { 4000aa10: 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 ) ) { 4000aa14: 92 07 bf f4 add %fp, -12, %o1 4000aa18: 40 00 00 7c call 4000ac08 <_POSIX_Absolute_timeout_to_ticks> 4000aa1c: 90 10 00 1c mov %i4, %o0 const char *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec *abstime ) { 4000aa20: 92 10 00 19 mov %i1, %o1 4000aa24: 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 ) ) { 4000aa28: 80 a2 20 02 cmp %o0, 2 4000aa2c: 18 80 00 09 bgu 4000aa50 4000aa30: 96 10 00 1b mov %i3, %o3 4000aa34: 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( 4000aa38: da 07 bf f4 ld [ %fp + -12 ], %o5 <== NOT EXECUTED 4000aa3c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000aa40: 7f ff ff 36 call 4000a718 <_POSIX_Message_queue_Send_support> <== NOT EXECUTED 4000aa44: 98 10 00 1c mov %i4, %o4 <== NOT EXECUTED msg_len, msg_prio, do_wait, ticks ); } 4000aa48: 81 c7 e0 08 ret <== NOT EXECUTED 4000aa4c: 91 e8 00 08 restore %g0, %o0, %o0 <== 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 ) ) { 4000aa50: 80 a2 20 03 cmp %o0, 3 4000aa54: 12 bf ff fa bne 4000aa3c 4000aa58: da 07 bf f4 ld [ %fp + -12 ], %o5 4000aa5c: b8 10 20 01 mov 1, %i4 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } return _POSIX_Message_queue_Send_support( 4000aa60: 90 10 00 18 mov %i0, %o0 4000aa64: 7f ff ff 2d call 4000a718 <_POSIX_Message_queue_Send_support> 4000aa68: 98 10 00 1c mov %i4, %o4 msg_len, msg_prio, do_wait, ticks ); } 4000aa6c: 81 c7 e0 08 ret 4000aa70: 91 e8 00 08 restore %g0, %o0, %o0 4000ab18 : */ int mq_unlink( const char *name ) { 4000ab18: 9d e3 bf 90 save %sp, -112, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000ab1c: 21 10 00 98 sethi %hi(0x40026000), %l0 4000ab20: c2 04 20 00 ld [ %l0 ], %g1 4000ab24: 90 10 00 18 mov %i0, %o0 4000ab28: 82 00 60 01 inc %g1 4000ab2c: c2 24 20 00 st %g1, [ %l0 ] register POSIX_Message_queue_Control *the_mq; Objects_Id the_mq_id; _Thread_Disable_dispatch(); status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 4000ab30: 40 00 24 1d call 40013ba4 <_POSIX_Message_queue_Name_to_id> 4000ab34: 92 07 bf f4 add %fp, -12, %o1 if ( status != 0 ) { 4000ab38: b0 92 20 00 orcc %o0, 0, %i0 4000ab3c: 12 80 00 24 bne 4000abcc 4000ab40: 03 10 00 99 sethi %hi(0x40026400), %g1 RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object( Objects_Information *information, uint16_t index ) { if ( index > information->maximum ) 4000ab44: c4 07 bf f4 ld [ %fp + -12 ], %g2 4000ab48: 88 10 60 18 or %g1, 0x18, %g4 4000ab4c: c6 11 20 10 lduh [ %g4 + 0x10 ], %g3 4000ab50: 03 00 00 3f sethi %hi(0xfc00), %g1 4000ab54: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000ab58: 82 08 80 01 and %g2, %g1, %g1 4000ab5c: 80 a0 40 03 cmp %g1, %g3 4000ab60: 18 80 00 05 bgu 4000ab74 4000ab64: b0 10 20 00 clr %i0 4000ab68: c4 01 20 20 ld [ %g4 + 0x20 ], %g2 4000ab6c: 83 28 60 02 sll %g1, 2, %g1 4000ab70: f0 00 80 01 ld [ %g2 + %g1 ], %i0 4000ab74: d2 06 20 0c ld [ %i0 + 0xc ], %o1 _Objects_MP_Close( &_POSIX_Message_queue_Information, the_mq_id ); } #endif the_mq->linked = FALSE; 4000ab78: c0 26 20 18 clr [ %i0 + 0x18 ] 4000ab7c: 11 10 00 98 sethi %hi(0x40026000), %o0 4000ab80: 40 00 0e 12 call 4000e3c8 <_Heap_Free> 4000ab84: 90 12 20 4c or %o0, 0x4c, %o0 ! 4002604c <_Workspace_Area> _Workspace_Free( the_mq->Object.name ); _POSIX_Message_queue_Namespace_remove( the_mq ); _POSIX_Message_queue_Delete( the_mq ); 4000ab88: 90 10 00 18 mov %i0, %o0 4000ab8c: 7f ff fc e1 call 40009f10 <_POSIX_Message_queue_Delete> 4000ab90: c0 26 20 0c clr [ %i0 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000ab94: c2 04 20 00 ld [ %l0 ], %g1 4000ab98: b0 10 20 00 clr %i0 4000ab9c: 82 00 7f ff add %g1, -1, %g1 4000aba0: c2 24 20 00 st %g1, [ %l0 ] 4000aba4: c4 04 20 00 ld [ %l0 ], %g2 4000aba8: 80 a0 a0 00 cmp %g2, 0 4000abac: 02 80 00 04 be 4000abbc 4000abb0: 01 00 00 00 nop _Thread_Enable_dispatch(); return 0; } 4000abb4: 81 c7 e0 08 ret <== NOT EXECUTED 4000abb8: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 4000abbc: 40 00 15 6d call 40010170 <_Thread_Dispatch> 4000abc0: 01 00 00 00 nop 4000abc4: 81 c7 e0 08 ret 4000abc8: 81 e8 00 00 restore #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000abcc: c2 04 20 00 ld [ %l0 ], %g1 4000abd0: 82 00 7f ff add %g1, -1, %g1 4000abd4: c2 24 20 00 st %g1, [ %l0 ] 4000abd8: c4 04 20 00 ld [ %l0 ], %g2 4000abdc: 80 a0 a0 00 cmp %g2, 0 4000abe0: 02 80 00 07 be 4000abfc 4000abe4: 01 00 00 00 nop _Thread_Disable_dispatch(); status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); if ( status != 0 ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( status ); 4000abe8: 40 00 2e 80 call 400165e8 <__errno> 4000abec: 01 00 00 00 nop 4000abf0: f0 22 00 00 st %i0, [ %o0 ] 4000abf4: 81 c7 e0 08 ret 4000abf8: 91 e8 3f ff restore %g0, -1, %o0 _Thread_Dispatch(); 4000abfc: 40 00 15 5d call 40010170 <_Thread_Dispatch> 4000ac00: 01 00 00 00 nop 4000ac04: 30 bf ff f9 b,a 4000abe8 40015a80 : int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) { 40015a80: 9d e3 bf 98 save %sp, -104, %sp Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) ) 40015a84: 40 00 06 fc call 40017674 <_Timespec_Is_valid> 40015a88: 90 10 00 18 mov %i0, %o0 40015a8c: 80 a2 20 00 cmp %o0, 0 40015a90: 02 80 00 4d be 40015bc4 40015a94: 01 00 00 00 nop * Return EINVAL if the delay interval is negative. * * NOTE: This behavior is beyond the POSIX specification. * FSU and GNU/Linux pthreads shares this behavior. */ if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 ) 40015a98: c2 06 00 00 ld [ %i0 ], %g1 40015a9c: 80 a0 60 00 cmp %g1, 0 40015aa0: 06 80 00 49 bl 40015bc4 40015aa4: 01 00 00 00 nop 40015aa8: c2 06 20 04 ld [ %i0 + 4 ], %g1 40015aac: 80 a0 60 00 cmp %g1, 0 40015ab0: 06 80 00 45 bl 40015bc4 40015ab4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); ticks = _Timespec_To_ticks( rqtp ); 40015ab8: 40 00 07 00 call 400176b8 <_Timespec_To_ticks> 40015abc: 90 10 00 18 mov %i0, %o0 * A nanosleep for zero time is implemented as a yield. * This behavior is also beyond the POSIX specification but is * consistent with the RTEMS API and yields desirable behavior. */ if ( !ticks ) { 40015ac0: b0 92 20 00 orcc %o0, 0, %i0 40015ac4: 02 80 00 2d be 40015b78 40015ac8: 21 10 00 b2 sethi %hi(0x4002c800), %l0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40015acc: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 ! 4002c8a0 <_Thread_Dispatch_disable_level> 40015ad0: 82 00 60 01 inc %g1 40015ad4: c2 24 20 a0 st %g1, [ %l0 + 0xa0 ] /* * Block for the desired amount of time */ _Thread_Disable_dispatch(); _Thread_Set_state( 40015ad8: 23 10 00 b2 sethi %hi(0x4002c800), %l1 40015adc: d0 04 61 7c ld [ %l1 + 0x17c ], %o0 ! 4002c97c <_Thread_Executing> 40015ae0: 13 04 00 00 sethi %hi(0x10000000), %o1 40015ae4: 7f ff ed 87 call 40011100 <_Thread_Set_state> 40015ae8: 92 12 60 08 or %o1, 8, %o1 ! 10000008 _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( 40015aec: d2 04 61 7c ld [ %l1 + 0x17c ], %o1 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40015af0: 03 10 00 40 sethi %hi(0x40010000), %g1 40015af4: c4 02 60 08 ld [ %o1 + 8 ], %g2 40015af8: 82 10 63 c4 or %g1, 0x3c4, %g1 the_watchdog->id = id; 40015afc: c4 22 60 68 st %g2, [ %o1 + 0x68 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40015b00: c2 22 60 64 st %g1, [ %o1 + 0x64 ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40015b04: f0 22 60 54 st %i0, [ %o1 + 0x54 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40015b08: c0 22 60 50 clr [ %o1 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 40015b0c: c0 22 60 6c clr [ %o1 + 0x6c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40015b10: 11 10 00 b2 sethi %hi(0x4002c800), %o0 40015b14: 92 02 60 48 add %o1, 0x48, %o1 40015b18: 7f ff ef af call 400119d4 <_Watchdog_Insert> 40015b1c: 90 12 21 9c or %o0, 0x19c, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40015b20: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 40015b24: 82 00 7f ff add %g1, -1, %g1 40015b28: c2 24 20 a0 st %g1, [ %l0 + 0xa0 ] 40015b2c: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 40015b30: 80 a0 a0 00 cmp %g2, 0 40015b34: 02 80 00 2a be 40015bdc 40015b38: 01 00 00 00 nop _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); /* calculate time remaining */ if ( rmtp ) { 40015b3c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40015b40: 02 80 00 0c be 40015b70 40015b44: c2 04 61 7c ld [ %l1 + 0x17c ], %g1 ticks -= _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 40015b48: 92 10 00 19 mov %i1, %o1 _Thread_Enable_dispatch(); /* calculate time remaining */ if ( rmtp ) { ticks -= 40015b4c: c4 00 60 5c ld [ %g1 + 0x5c ], %g2 40015b50: e0 00 60 60 ld [ %g1 + 0x60 ], %l0 40015b54: a0 24 00 02 sub %l0, %g2, %l0 40015b58: a0 26 00 10 sub %i0, %l0, %l0 _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 40015b5c: 40 00 06 b1 call 40017620 <_Timespec_From_ticks> 40015b60: 90 10 00 10 mov %l0, %o0 /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) 40015b64: 80 a4 20 00 cmp %l0, 0 40015b68: 12 80 00 25 bne 40015bfc 40015b6c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINTR ); } return 0; } 40015b70: 81 c7 e0 08 ret 40015b74: 91 e8 20 00 restore %g0, 0, %o0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40015b78: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 40015b7c: 82 00 60 01 inc %g1 40015b80: c2 24 20 a0 st %g1, [ %l0 + 0xa0 ] * consistent with the RTEMS API and yields desirable behavior. */ if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); 40015b84: 7f ff ee 67 call 40011520 <_Thread_Yield_processor> 40015b88: 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 ) 40015b8c: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 40015b90: 82 00 7f ff add %g1, -1, %g1 40015b94: c2 24 20 a0 st %g1, [ %l0 + 0xa0 ] 40015b98: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 40015b9c: 80 a0 a0 00 cmp %g2, 0 40015ba0: 02 80 00 13 be 40015bec 40015ba4: 01 00 00 00 nop _Thread_Enable_dispatch(); if ( rmtp ) { 40015ba8: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40015bac: 02 bf ff f1 be 40015b70 40015bb0: 01 00 00 00 nop rmtp->tv_sec = 0; rmtp->tv_nsec = 0; 40015bb4: c0 26 60 04 clr [ %i1 + 4 ] if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); _Thread_Enable_dispatch(); if ( rmtp ) { rmtp->tv_sec = 0; 40015bb8: c0 26 40 00 clr [ %i1 ] rmtp->tv_nsec = 0; 40015bbc: 81 c7 e0 08 ret 40015bc0: 91 e8 20 00 restore %g0, 0, %o0 * * NOTE: This behavior is beyond the POSIX specification. * FSU and GNU/Linux pthreads shares this behavior. */ if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); 40015bc4: 40 00 11 c1 call 4001a2c8 <__errno> 40015bc8: b0 10 3f ff mov -1, %i0 40015bcc: 82 10 20 16 mov 0x16, %g1 40015bd0: c2 22 00 00 st %g1, [ %o0 ] 40015bd4: 81 c7 e0 08 ret 40015bd8: 81 e8 00 00 restore _Thread_Dispatch(); 40015bdc: 7f ff ea 23 call 40010468 <_Thread_Dispatch> 40015be0: 01 00 00 00 nop _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); /* calculate time remaining */ if ( rmtp ) { 40015be4: 10 bf ff d7 b 40015b40 40015be8: 80 a6 60 00 cmp %i1, 0 40015bec: 7f ff ea 1f call 40010468 <_Thread_Dispatch> 40015bf0: 01 00 00 00 nop if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); _Thread_Enable_dispatch(); if ( rmtp ) { 40015bf4: 10 bf ff ee b 40015bac 40015bf8: 80 a6 60 00 cmp %i1, 0 /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) rtems_set_errno_and_return_minus_one( EINTR ); 40015bfc: 40 00 11 b3 call 4001a2c8 <__errno> 40015c00: b0 10 3f ff mov -1, %i0 40015c04: 82 10 20 04 mov 4, %g1 40015c08: c2 22 00 00 st %g1, [ %o0 ] 40015c0c: 81 c7 e0 08 ret 40015c10: 81 e8 00 00 restore 400028e4 : */ int newlib_free_buffers( FILE *fp ) { 400028e4: 9d e3 bf 98 save %sp, -104, %sp switch ( fileno(fp) ) { 400028e8: 40 00 32 11 call 4000f12c 400028ec: 90 10 00 18 mov %i0, %o0 400028f0: 80 a2 20 02 cmp %o0, 2 400028f4: 28 80 00 06 bleu,a 4000290c 400028f8: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 400028fc: 40 00 31 92 call 4000ef44 <== NOT EXECUTED 40002900: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED } return 0; } 40002904: 81 c7 e0 08 ret 40002908: 91 e8 20 00 restore %g0, 0, %o0 { switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { 4000290c: 80 88 60 80 btst 0x80, %g1 40002910: 02 bf ff fd be 40002904 40002914: 01 00 00 00 nop free( fp->_bf._base ); 40002918: 7f ff fe 61 call 4000229c 4000291c: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 fp->_flags &= ~__SMBF; 40002920: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 fp->_bf._base = fp->_p = (unsigned char *) NULL; 40002924: c0 26 20 10 clr [ %i0 + 0x10 ] case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 40002928: 82 08 7f 7f and %g1, -129, %g1 fp->_bf._base = fp->_p = (unsigned char *) NULL; 4000292c: c0 26 00 00 clr [ %i0 ] case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 40002930: c2 36 20 0c sth %g1, [ %i0 + 0xc ] break; default: fclose(fp); } return 0; } 40002934: 81 c7 e0 08 ret 40002938: 91 e8 20 00 restore %g0, 0, %o0 40002960 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *pargp ) { 40002960: 9d e3 bf 98 save %sp, -104, %sp rtems_device_driver status; if ( !initialized ) { 40002964: 05 10 00 7a sethi %hi(0x4001e800), %g2 40002968: c2 48 a3 4c ldsb [ %g2 + 0x34c ], %g1 ! 4001eb4c 4000296c: 80 a0 60 00 cmp %g1, 0 40002970: 02 80 00 04 be 40002980 40002974: 82 10 20 01 mov 1, %g1 NULL_major = major; } return RTEMS_SUCCESSFUL; } 40002978: 81 c7 e0 08 ret 4000297c: 91 e8 20 00 restore %g0, 0, %o0 rtems_device_driver status; if ( !initialized ) { initialized = 1; status = rtems_io_register_name( 40002980: 11 10 00 70 sethi %hi(0x4001c000), %o0 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 40002984: c2 28 a3 4c stb %g1, [ %g2 + 0x34c ] status = rtems_io_register_name( 40002988: 90 12 21 c0 or %o0, 0x1c0, %o0 4000298c: 92 10 00 18 mov %i0, %o1 40002990: 40 00 00 50 call 40002ad0 40002994: 94 10 20 00 clr %o2 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 40002998: 80 a2 20 00 cmp %o0, 0 4000299c: 12 80 00 05 bne 400029b0 400029a0: 03 10 00 7b sethi %hi(0x4001ec00), %g1 rtems_fatal_error_occurred(status); NULL_major = major; 400029a4: f0 20 61 00 st %i0, [ %g1 + 0x100 ] ! 4001ed00 } return RTEMS_SUCCESSFUL; } 400029a8: 81 c7 e0 08 ret 400029ac: 91 e8 20 00 restore %g0, 0, %o0 major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); 400029b0: 40 00 13 b0 call 40007870 <== NOT EXECUTED 400029b4: 01 00 00 00 nop <== NOT EXECUTED NULL_major = major; 400029b8: 03 10 00 7b sethi %hi(0x4001ec00), %g1 <== NOT EXECUTED 400029bc: 10 bf ff fb b 400029a8 <== NOT EXECUTED 400029c0: f0 20 61 00 st %i0, [ %g1 + 0x100 ] ! 4001ed00 <== NOT EXECUTED 4000293c : void *pargp ) { rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 4000293c: 80 a2 a0 00 cmp %o2, 0 40002940: 02 80 00 04 be 40002950 40002944: 01 00 00 00 nop rw_args->bytes_moved = rw_args->count; 40002948: c2 02 a0 0c ld [ %o2 + 0xc ], %g1 <== NOT EXECUTED 4000294c: c2 22 a0 14 st %g1, [ %o2 + 0x14 ] <== NOT EXECUTED return NULL_SUCCESSFUL; } 40002950: 81 c3 e0 08 retl 40002954: 90 10 20 00 clr %o0 40002b68 : int open( const char *pathname, int flags, ... ) { 40002b68: 9d e3 bf 80 save %sp, -128, %sp 40002b6c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 40002b70: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 40002b74: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 40002b78: f4 27 a0 4c st %i2, [ %fp + 0x4c ] /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 40002b7c: 82 06 60 01 add %i1, 1, %g1 if ( ( status & _FREAD ) == _FREAD ) eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 40002b80: 80 88 60 02 btst 2, %g1 * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 40002b84: 82 08 60 01 and %g1, 1, %g1 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 40002b88: 02 80 00 03 be 40002b94 40002b8c: a1 28 60 02 sll %g1, 2, %l0 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 40002b90: a0 14 20 02 or %l0, 2, %l0 va_start(ap, flags); mode = va_arg( ap, int ); 40002b94: 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 ) { 40002b98: 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(); 40002b9c: 40 00 25 fd call 4000c390 40002ba0: c2 27 bf f4 st %g1, [ %fp + -12 ] if ( iop == 0 ) { 40002ba4: ba 92 20 00 orcc %o0, 0, %i5 40002ba8: 02 80 00 62 be 40002d30 40002bac: 92 10 00 10 mov %l0, %o1 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 40002bb0: b6 07 bf e4 add %fp, -28, %i3 40002bb4: 90 10 00 18 mov %i0, %o0 40002bb8: 94 10 00 1b mov %i3, %o2 40002bbc: 7f ff fd 20 call 4000203c 40002bc0: 96 10 20 01 mov 1, %o3 pathname, eval_flags, &loc, TRUE ); if ( status == -1 ) { 40002bc4: 80 a2 3f ff cmp %o0, -1 40002bc8: 02 80 00 73 be 40002d94 40002bcc: 82 0e 6a 00 and %i1, 0xa00, %g1 if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 40002bd0: b8 10 20 11 mov 0x11, %i4 40002bd4: 80 a0 6a 00 cmp %g1, 0xa00 40002bd8: 02 80 00 62 be 40002d60 40002bdc: a0 10 00 1b mov %i3, %l0 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 40002be0: c2 07 bf e8 ld [ %fp + -24 ], %g1 iop->file_info = loc.node_access; 40002be4: c4 07 bf e4 ld [ %fp + -28 ], %g2 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 40002be8: c2 27 60 30 st %g1, [ %i5 + 0x30 ] iop->file_info = loc.node_access; 40002bec: c4 27 60 2c st %g2, [ %i5 + 0x2c ] iop->flags |= rtems_libio_fcntl_flags( flags ); 40002bf0: e0 07 60 0c ld [ %i5 + 0xc ], %l0 40002bf4: 40 00 26 25 call 4000c488 40002bf8: 90 10 00 19 mov %i1, %o0 iop->pathinfo = loc; 40002bfc: c2 07 bf e4 ld [ %fp + -28 ], %g1 if ( !iop->handlers->open_h ) { 40002c00: c4 07 60 30 ld [ %i5 + 0x30 ], %g2 */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 40002c04: c2 27 60 10 st %g1, [ %i5 + 0x10 ] 40002c08: c2 07 bf e8 ld [ %fp + -24 ], %g1 if ( !iop->handlers->open_h ) { 40002c0c: c4 00 80 00 ld [ %g2 ], %g2 */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 40002c10: c2 27 60 14 st %g1, [ %i5 + 0x14 ] 40002c14: c2 07 bf ec ld [ %fp + -20 ], %g1 * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 40002c18: 90 12 00 10 or %o0, %l0, %o0 iop->pathinfo = loc; 40002c1c: c2 27 60 18 st %g1, [ %i5 + 0x18 ] 40002c20: c2 07 bf f0 ld [ %fp + -16 ], %g1 * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 40002c24: d0 27 60 0c st %o0, [ %i5 + 0xc ] iop->pathinfo = loc; if ( !iop->handlers->open_h ) { 40002c28: 80 a0 a0 00 cmp %g2, 0 40002c2c: 02 80 00 54 be 40002d7c 40002c30: c2 27 60 1c st %g1, [ %i5 + 0x1c ] rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 40002c34: 92 10 00 18 mov %i0, %o1 40002c38: 96 10 00 1a mov %i2, %o3 40002c3c: 90 10 00 1d mov %i5, %o0 40002c40: 9f c0 80 00 call %g2 40002c44: 94 10 00 19 mov %i1, %o2 if ( rc ) 40002c48: b8 92 20 00 orcc %o0, 0, %i4 40002c4c: 12 80 00 29 bne 40002cf0 40002c50: 80 8e 64 00 btst 0x400, %i1 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 40002c54: 02 80 00 16 be 40002cac 40002c58: 21 10 00 6a sethi %hi(0x4001a800), %l0 rc = ftruncate( iop - rtems_libio_iops, 0 ); 40002c5c: c4 04 21 94 ld [ %l0 + 0x194 ], %g2 ! 4001a994 40002c60: 92 10 20 00 clr %o1 40002c64: 84 27 40 02 sub %i5, %g2, %g2 40002c68: 85 38 a0 02 sra %g2, 2, %g2 40002c6c: 87 28 a0 02 sll %g2, 2, %g3 40002c70: 83 28 a0 06 sll %g2, 6, %g1 40002c74: 82 20 40 03 sub %g1, %g3, %g1 40002c78: 91 28 60 06 sll %g1, 6, %o0 40002c7c: 90 22 00 01 sub %o0, %g1, %o0 40002c80: 87 2a 20 0c sll %o0, 0xc, %g3 40002c84: 90 02 00 03 add %o0, %g3, %o0 40002c88: 90 02 00 02 add %o0, %g2, %o0 40002c8c: 91 2a 20 04 sll %o0, 4, %o0 40002c90: 90 22 00 02 sub %o0, %g2, %o0 40002c94: 91 2a 20 02 sll %o0, 2, %o0 40002c98: 40 00 24 dc call 4000c008 40002c9c: 90 20 80 08 sub %g2, %o0, %o0 if ( rc ) { 40002ca0: b8 92 20 00 orcc %o0, 0, %i4 40002ca4: 12 80 00 5a bne 40002e0c 40002ca8: 01 00 00 00 nop if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 40002cac: c6 04 21 94 ld [ %l0 + 0x194 ], %g3 40002cb0: 86 27 40 03 sub %i5, %g3, %g3 40002cb4: 87 38 e0 02 sra %g3, 2, %g3 40002cb8: 89 28 e0 02 sll %g3, 2, %g4 40002cbc: 85 28 e0 06 sll %g3, 6, %g2 40002cc0: 84 20 80 04 sub %g2, %g4, %g2 40002cc4: 83 28 a0 06 sll %g2, 6, %g1 40002cc8: 82 20 40 02 sub %g1, %g2, %g1 40002ccc: 89 28 60 0c sll %g1, 0xc, %g4 40002cd0: 82 00 40 04 add %g1, %g4, %g1 40002cd4: 82 00 40 03 add %g1, %g3, %g1 40002cd8: 83 28 60 04 sll %g1, 4, %g1 40002cdc: 82 20 40 03 sub %g1, %g3, %g1 40002ce0: 83 28 60 02 sll %g1, 2, %g1 40002ce4: b0 20 c0 01 sub %g3, %g1, %i0 40002ce8: 81 c7 e0 08 ret 40002cec: 81 e8 00 00 restore /* * Single exit and clean up path. */ done: va_end(ap); 40002cf0: a0 10 00 1b mov %i3, %l0 <== NOT EXECUTED if ( rc ) { if ( iop ) rtems_libio_free( iop ); 40002cf4: 40 00 25 90 call 4000c334 <== NOT EXECUTED 40002cf8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED if ( loc_to_free ) 40002cfc: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40002d00: 02 80 00 0c be 40002d30 40002d04: 01 00 00 00 nop rtems_filesystem_freenode( loc_to_free ); 40002d08: c2 04 20 08 ld [ %l0 + 8 ], %g1 40002d0c: 80 a0 60 00 cmp %g1, 0 40002d10: 02 80 00 08 be 40002d30 40002d14: 01 00 00 00 nop 40002d18: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40002d1c: 80 a0 60 00 cmp %g1, 0 40002d20: 02 80 00 04 be 40002d30 40002d24: 01 00 00 00 nop 40002d28: 9f c0 40 00 call %g1 40002d2c: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( rc ); 40002d30: 40 00 30 2f call 4000edec <__errno> 40002d34: b0 10 3f ff mov -1, %i0 40002d38: f8 22 00 00 st %i4, [ %o0 ] 40002d3c: 81 c7 e0 08 ret 40002d40: 81 e8 00 00 restore } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); if ( rc ) { rc = errno; 40002d44: 40 00 30 2a call 4000edec <__errno> 40002d48: 01 00 00 00 nop 40002d4c: f8 02 00 00 ld [ %o0 ], %i4 */ done: va_end(ap); if ( rc ) { 40002d50: 80 a7 20 00 cmp %i4, 0 40002d54: 02 bf ff d6 be 40002cac 40002d58: 21 10 00 6a sethi %hi(0x4001a800), %l0 40002d5c: a0 10 20 00 clr %l0 if ( iop ) 40002d60: 80 a7 60 00 cmp %i5, 0 40002d64: 22 bf ff e7 be,a 40002d00 40002d68: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED rtems_libio_free( iop ); 40002d6c: 40 00 25 72 call 4000c334 40002d70: 90 10 00 1d mov %i5, %o0 if ( loc_to_free ) 40002d74: 10 bf ff e3 b 40002d00 40002d78: 80 a4 20 00 cmp %l0, 0 rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 40002d7c: a0 10 00 1b mov %i3, %l0 <== NOT EXECUTED done: va_end(ap); if ( rc ) { if ( iop ) 40002d80: 80 a7 60 00 cmp %i5, 0 <== NOT EXECUTED 40002d84: 12 bf ff fa bne 40002d6c <== NOT EXECUTED 40002d88: b8 10 20 86 mov 0x86, %i4 <== NOT EXECUTED rtems_libio_free( iop ); if ( loc_to_free ) 40002d8c: 10 bf ff dd b 40002d00 <== NOT EXECUTED 40002d90: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED status = rtems_filesystem_evaluate_path( pathname, eval_flags, &loc, TRUE ); if ( status == -1 ) { if ( errno != ENOENT ) { 40002d94: 40 00 30 16 call 4000edec <__errno> 40002d98: 01 00 00 00 nop 40002d9c: c2 02 00 00 ld [ %o0 ], %g1 40002da0: 80 a0 60 02 cmp %g1, 2 40002da4: 12 bf ff e8 bne 40002d44 40002da8: 80 8e 62 00 btst 0x200, %i1 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 40002dac: b8 10 20 02 mov 2, %i4 40002db0: 02 bf ff ec be 40002d60 40002db4: a0 10 20 00 clr %l0 rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 40002db8: 13 3f ff e0 sethi %hi(0xffff8000), %o1 40002dbc: 90 10 00 18 mov %i0, %o0 40002dc0: 92 16 80 09 or %i2, %o1, %o1 40002dc4: 94 10 20 00 clr %o2 40002dc8: 93 2a 60 10 sll %o1, 0x10, %o1 40002dcc: 96 10 20 00 clr %o3 40002dd0: 7f ff fe 41 call 400026d4 40002dd4: 93 32 60 10 srl %o1, 0x10, %o1 if ( rc ) { 40002dd8: 80 a2 20 00 cmp %o0, 0 40002ddc: 12 bf ff da bne 40002d44 40002de0: 90 10 00 18 mov %i0, %o0 rc = errno; goto done; } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, 0x0, &loc, TRUE ); 40002de4: 92 10 20 00 clr %o1 40002de8: 94 10 00 1b mov %i3, %o2 40002dec: 96 10 20 01 mov 1, %o3 40002df0: 7f ff fc 93 call 4000203c 40002df4: b8 10 20 0d mov 0xd, %i4 if ( status != 0 ) { /* The file did not exist */ 40002df8: 80 a2 20 00 cmp %o0, 0 40002dfc: 12 bf ff d9 bne 40002d60 40002e00: a0 10 20 00 clr %l0 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 40002e04: 10 bf ff 78 b 40002be4 40002e08: c2 07 bf e8 ld [ %fp + -24 ], %g1 */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 40002e0c: 40 00 2f f8 call 4000edec <__errno> <== NOT EXECUTED 40002e10: 01 00 00 00 nop <== NOT EXECUTED 40002e14: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40002e18: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002e1c: 12 80 00 15 bne 40002e70 <== NOT EXECUTED 40002e20: 01 00 00 00 nop <== NOT EXECUTED close( iop - rtems_libio_iops ); 40002e24: c4 04 21 94 ld [ %l0 + 0x194 ], %g2 <== NOT EXECUTED 40002e28: 84 27 40 02 sub %i5, %g2, %g2 <== NOT EXECUTED 40002e2c: 85 38 a0 02 sra %g2, 2, %g2 <== NOT EXECUTED 40002e30: 87 28 a0 02 sll %g2, 2, %g3 <== NOT EXECUTED 40002e34: 83 28 a0 06 sll %g2, 6, %g1 <== NOT EXECUTED 40002e38: 82 20 40 03 sub %g1, %g3, %g1 <== NOT EXECUTED 40002e3c: 91 28 60 06 sll %g1, 6, %o0 <== NOT EXECUTED 40002e40: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED 40002e44: 87 2a 20 0c sll %o0, 0xc, %g3 <== NOT EXECUTED 40002e48: ba 10 20 00 clr %i5 <== NOT EXECUTED 40002e4c: 90 02 00 03 add %o0, %g3, %o0 <== NOT EXECUTED 40002e50: 90 02 00 02 add %o0, %g2, %o0 <== NOT EXECUTED 40002e54: 91 2a 20 04 sll %o0, 4, %o0 <== NOT EXECUTED 40002e58: 90 22 00 02 sub %o0, %g2, %o0 <== NOT EXECUTED 40002e5c: 91 2a 20 02 sll %o0, 2, %o0 <== NOT EXECUTED 40002e60: 40 00 24 39 call 4000bf44 <== NOT EXECUTED 40002e64: 90 20 80 08 sub %g2, %o0, %o0 <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 40002e68: 10 bf ff bb b 40002d54 <== NOT EXECUTED 40002e6c: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 40002e70: 40 00 2f df call 4000edec <__errno> <== NOT EXECUTED 40002e74: 01 00 00 00 nop <== NOT EXECUTED 40002e78: 10 bf ff eb b 40002e24 <== NOT EXECUTED 40002e7c: f8 02 00 00 ld [ %o0 ], %i4 <== NOT EXECUTED 40002aec : /* * This is a replaceable stub */ void open_dev_console(void) { 40002aec: 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) { 40002af0: 31 10 00 62 sethi %hi(0x40018800), %i0 40002af4: 92 10 20 00 clr %o1 40002af8: 90 16 22 20 or %i0, 0x220, %o0 40002afc: 40 00 00 1b call 40002b68 40002b00: 94 10 20 00 clr %o2 40002b04: 80 a2 3f ff cmp %o0, -1 40002b08: 02 80 00 0f be 40002b44 40002b0c: 90 16 22 20 or %i0, 0x220, %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) 40002b10: 92 10 20 01 mov 1, %o1 40002b14: 40 00 00 15 call 40002b68 40002b18: 94 10 20 00 clr %o2 40002b1c: 80 a2 3f ff cmp %o0, -1 40002b20: 02 80 00 0e be 40002b58 40002b24: 11 14 d5 11 sethi %hi(0x53544400), %o0 rtems_fatal_error_occurred( error_code | '1' ); if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 40002b28: 90 16 22 20 or %i0, 0x220, %o0 40002b2c: 92 10 20 01 mov 1, %o1 40002b30: 40 00 00 0e call 40002b68 40002b34: 94 10 20 00 clr %o2 40002b38: 80 a2 3f ff cmp %o0, -1 40002b3c: 02 80 00 04 be 40002b4c 40002b40: 31 14 d5 11 sethi %hi(0x53544400), %i0 40002b44: 81 c7 e0 08 ret 40002b48: 81 e8 00 00 restore rtems_fatal_error_occurred( error_code | '2' ); 40002b4c: b0 16 20 32 or %i0, 0x32, %i0 <== NOT EXECUTED 40002b50: 40 00 0f b2 call 40006a18 <== NOT EXECUTED 40002b54: 81 e8 00 00 restore <== NOT EXECUTED /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | '1' ); 40002b58: 40 00 0f b0 call 40006a18 <== NOT EXECUTED 40002b5c: 90 12 20 31 or %o0, 0x31, %o0 <== NOT EXECUTED if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 40002b60: 10 bf ff f3 b 40002b2c <== NOT EXECUTED 40002b64: 90 16 22 20 or %i0, 0x220, %o0 <== NOT EXECUTED 400196cc : * open a directory. */ DIR * opendir(name) const char *name; { 400196cc: 9d e3 bf 98 save %sp, -104, %sp register DIR *dirp; register int fd; if ((fd = open(name, 0)) == -1) 400196d0: 92 10 20 00 clr %o1 400196d4: 90 10 00 18 mov %i0, %o0 400196d8: 7f ff b2 65 call 4000606c 400196dc: b0 10 20 00 clr %i0 400196e0: 80 a2 3f ff cmp %o0, -1 400196e4: 02 80 00 18 be 40019744 400196e8: a0 10 00 08 mov %o0, %l0 return NULL; if (fcntl(fd, F_SETFD, 1) == -1 || 400196ec: 92 10 20 02 mov 2, %o1 400196f0: 40 00 29 4e call 40023c28 400196f4: 94 10 20 01 mov 1, %o2 400196f8: 80 a2 3f ff cmp %o0, -1 400196fc: 02 80 00 15 be 40019750 40019700: 90 10 00 10 mov %l0, %o0 40019704: 7f ff af 9a call 4000556c 40019708: 90 10 20 18 mov 0x18, %o0 4001970c: 80 a2 20 00 cmp %o0, 0 40019710: 22 80 00 10 be,a 40019750 40019714: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40019718: 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); 4001971c: 7f ff af 94 call 4000556c 40019720: 90 10 22 00 mov 0x200, %o0 dirp->dd_len = 512; 40019724: 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); 40019728: d0 26 20 0c st %o0, [ %i0 + 0xc ] dirp->dd_len = 512; if (dirp->dd_buf == NULL) { 4001972c: 80 a2 20 00 cmp %o0, 0 40019730: 02 80 00 07 be 4001974c 40019734: c2 26 20 10 st %g1, [ %i0 + 0x10 ] close (fd); return NULL; } dirp->dd_fd = fd; 40019738: e0 26 00 00 st %l0, [ %i0 ] dirp->dd_loc = 0; 4001973c: c0 26 20 04 clr [ %i0 + 4 ] dirp->dd_seek = 0; 40019740: c0 26 20 14 clr [ %i0 + 0x14 ] /* * Set up seek point for rewinddir. */ return dirp; } 40019744: 81 c7 e0 08 ret 40019748: 81 e8 00 00 restore */ dirp->dd_buf = malloc (512); dirp->dd_len = 512; if (dirp->dd_buf == NULL) { close (fd); 4001974c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40019750: 7f ff ad 7f call 40004d4c <== NOT EXECUTED 40019754: b0 10 20 00 clr %i0 <== NOT EXECUTED 40019758: 81 c7 e0 08 ret <== NOT EXECUTED 4001975c: 81 e8 00 00 restore <== NOT EXECUTED 40003a18 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 40003a18: 9d e3 bf 98 save %sp, -104, %sp int i; if (tty->termios.c_oflag & OPOST) { 40003a1c: c6 06 60 34 ld [ %i1 + 0x34 ], %g3 40003a20: 80 88 e0 01 btst 1, %g3 40003a24: 02 80 00 10 be 40003a64 40003a28: f0 2f a0 44 stb %i0, [ %fp + 0x44 ] switch (c) { 40003a2c: b0 0e 20 ff and %i0, 0xff, %i0 40003a30: 80 a6 20 09 cmp %i0, 9 40003a34: 22 80 00 28 be,a 40003ad4 40003a38: c8 06 60 28 ld [ %i1 + 0x28 ], %g4 40003a3c: 18 80 00 10 bgu 40003a7c 40003a40: 80 a6 20 0a cmp %i0, 0xa 40003a44: 80 a6 20 08 cmp %i0, 8 <== NOT EXECUTED 40003a48: 12 80 00 11 bne 40003a8c <== NOT EXECUTED 40003a4c: 80 88 e0 02 btst 2, %g3 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 40003a50: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 40003a54: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003a58: 04 80 00 03 ble 40003a64 <== NOT EXECUTED 40003a5c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED tty->column--; 40003a60: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 40003a64: 94 10 00 19 mov %i1, %o2 40003a68: 90 07 a0 44 add %fp, 0x44, %o0 40003a6c: 7f ff ff 96 call 400038c4 40003a70: 92 10 20 01 mov 1, %o1 40003a74: 81 c7 e0 08 ret 40003a78: 81 e8 00 00 restore oproc (unsigned char c, struct rtems_termios_tty *tty) { int i; if (tty->termios.c_oflag & OPOST) { switch (c) { 40003a7c: 02 80 00 24 be 40003b0c 40003a80: 80 a6 20 0d cmp %i0, 0xd 40003a84: 02 80 00 2f be 40003b40 40003a88: 80 88 e0 02 btst 2, %g3 if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 40003a8c: 02 80 00 08 be 40003aac 40003a90: 07 10 00 68 sethi %hi(0x4001a000), %g3 c = toupper(c); 40003a94: c4 00 e2 48 ld [ %g3 + 0x248 ], %g2 ! 4001a248 <__ctype_ptr> <== NOT EXECUTED 40003a98: c2 08 80 18 ldub [ %g2 + %i0 ], %g1 <== NOT EXECUTED 40003a9c: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 40003aa0: 32 80 00 02 bne,a 40003aa8 <== NOT EXECUTED 40003aa4: b0 06 3f e0 add %i0, -32, %i0 <== NOT EXECUTED 40003aa8: f0 2f a0 44 stb %i0, [ %fp + 0x44 ] <== NOT EXECUTED if (!iscntrl(c)) 40003aac: c2 00 e2 48 ld [ %g3 + 0x248 ], %g1 40003ab0: c4 0f a0 44 ldub [ %fp + 0x44 ], %g2 40003ab4: c6 08 80 01 ldub [ %g2 + %g1 ], %g3 40003ab8: 80 88 e0 20 btst 0x20, %g3 40003abc: 12 bf ff eb bne 40003a68 40003ac0: 94 10 00 19 mov %i1, %o2 tty->column++; 40003ac4: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 40003ac8: 82 00 60 01 inc %g1 40003acc: 10 bf ff e7 b 40003a68 40003ad0: c2 26 60 28 st %g1, [ %i1 + 0x28 ] tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { 40003ad4: 05 00 00 06 sethi %hi(0x1800), %g2 40003ad8: 82 08 c0 02 and %g3, %g2, %g1 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 40003adc: 86 09 20 07 and %g4, 7, %g3 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 40003ae0: 80 a0 40 02 cmp %g1, %g2 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 40003ae4: 82 10 20 08 mov 8, %g1 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 40003ae8: 02 80 00 25 be 40003b7c 40003aec: 92 20 40 03 sub %g1, %g3, %o1 tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 40003af0: 82 02 40 04 add %o1, %g4, %g1 <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 40003af4: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 40003af8: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 40003afc: 90 07 a0 44 add %fp, 0x44, %o0 <== NOT EXECUTED 40003b00: 7f ff ff 71 call 400038c4 <== NOT EXECUTED 40003b04: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40003b08: 30 80 00 23 b,a 40003b94 <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { switch (c) { case '\n': if (tty->termios.c_oflag & ONLRET) 40003b0c: 80 88 e0 20 btst 0x20, %g3 40003b10: 32 80 00 02 bne,a 40003b18 40003b14: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED tty->column = 0; if (tty->termios.c_oflag & ONLCR) { 40003b18: 80 88 e0 04 btst 4, %g3 40003b1c: 02 bf ff d3 be 40003a68 40003b20: 94 10 00 19 mov %i1, %o2 rtems_termios_puts ("\r", 1, tty); 40003b24: 11 10 00 63 sethi %hi(0x40018c00), %o0 40003b28: 92 10 20 01 mov 1, %o1 40003b2c: 90 12 21 70 or %o0, 0x170, %o0 40003b30: 7f ff ff 65 call 400038c4 40003b34: 94 10 00 19 mov %i1, %o2 tty->column = 0; 40003b38: 10 bf ff cb b 40003a64 40003b3c: c0 26 60 28 clr [ %i1 + 0x28 ] } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 40003b40: 80 88 e0 10 btst 0x10, %g3 <== NOT EXECUTED 40003b44: 02 80 00 06 be 40003b5c <== NOT EXECUTED 40003b48: 80 88 e0 08 btst 8, %g3 <== NOT EXECUTED 40003b4c: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 40003b50: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003b54: 02 bf ff c8 be 40003a74 <== NOT EXECUTED 40003b58: 80 88 e0 08 btst 8, %g3 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 40003b5c: 22 bf ff c2 be,a 40003a64 <== NOT EXECUTED 40003b60: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED c = '\n'; 40003b64: 82 10 20 0a mov 0xa, %g1 <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 40003b68: 80 88 e0 20 btst 0x20, %g3 <== NOT EXECUTED 40003b6c: 02 bf ff be be 40003a64 <== NOT EXECUTED 40003b70: c2 2f a0 44 stb %g1, [ %fp + 0x44 ] <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; 40003b74: 10 bf ff bc b 40003a64 <== NOT EXECUTED 40003b78: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; 40003b7c: 82 02 40 04 add %o1, %g4, %g1 rtems_termios_puts ( " ", i, tty); 40003b80: 94 10 00 19 mov %i1, %o2 break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; 40003b84: c2 26 60 28 st %g1, [ %i1 + 0x28 ] rtems_termios_puts ( " ", i, tty); 40003b88: 11 10 00 63 sethi %hi(0x40018c00), %o0 40003b8c: 7f ff ff 4e call 400038c4 40003b90: 90 12 21 78 or %o0, 0x178, %o0 ! 40018d78 40003b94: 81 c7 e0 08 ret 40003b98: 81 e8 00 00 restore 40005c5c : */ int pthread_barrier_destroy( pthread_barrier_t *barrier ) { 40005c5c: 9d e3 bf 90 save %sp, -112, %sp POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 40005c60: 80 a6 20 00 cmp %i0, 0 40005c64: 02 80 00 23 be 40005cf0 40005c68: 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( 40005c6c: d2 06 00 00 ld [ %i0 ], %o1 40005c70: 31 10 00 72 sethi %hi(0x4001c800), %i0 40005c74: 40 00 0d 56 call 400091cc <_Objects_Get> 40005c78: 90 16 20 c0 or %i0, 0xc0, %o0 ! 4001c8c0 <_POSIX_Barrier_Information> return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); switch ( location ) { 40005c7c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005c80: 80 a0 60 00 cmp %g1, 0 40005c84: 12 80 00 14 bne 40005cd4 40005c88: 92 10 00 08 mov %o0, %o1 case OBJECTS_REMOTE: case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: if ( the_barrier->Barrier.number_of_waiting_threads != 0 ) { 40005c8c: c2 02 20 58 ld [ %o0 + 0x58 ], %g1 40005c90: 80 a0 60 00 cmp %g1, 0 40005c94: 02 80 00 1a be 40005cfc 40005c98: 90 16 20 c0 or %i0, 0xc0, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40005c9c: 03 10 00 71 sethi %hi(0x4001c400), %g1 40005ca0: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 ! 4001c410 <_Thread_Dispatch_disable_level> 40005ca4: 90 10 20 10 mov 0x10, %o0 40005ca8: 84 00 bf ff add %g2, -1, %g2 40005cac: c4 20 60 10 st %g2, [ %g1 + 0x10 ] 40005cb0: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 40005cb4: 80 a0 e0 00 cmp %g3, 0 40005cb8: 12 80 00 0c bne 40005ce8 40005cbc: 01 00 00 00 nop _Thread_Dispatch(); 40005cc0: 40 00 12 2f call 4000a57c <_Thread_Dispatch> 40005cc4: 01 00 00 00 nop 40005cc8: 90 10 20 10 mov 0x10, %o0 ! 10 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40005ccc: 81 c7 e0 08 ret 40005cd0: 91 e8 00 08 restore %g0, %o0, %o0 if ( !barrier ) return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); switch ( location ) { 40005cd4: 80 a0 60 02 cmp %g1, 2 40005cd8: 08 80 00 07 bleu 40005cf4 40005cdc: 90 10 20 16 mov 0x16, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40005ce0: 40 00 02 45 call 400065f4 <== NOT EXECUTED 40005ce4: 01 00 00 00 nop <== NOT EXECUTED } 40005ce8: 81 c7 e0 08 ret 40005cec: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40005cf0: 90 10 20 16 mov 0x16, %o0 } 40005cf4: 81 c7 e0 08 ret 40005cf8: 91 e8 00 08 restore %g0, %o0, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40005cfc: c2 02 60 08 ld [ %o1 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40005d00: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 40005d04: 05 00 00 3f sethi %hi(0xfc00), %g2 40005d08: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40005d0c: 82 08 40 02 and %g1, %g2, %g1 40005d10: 80 a0 40 03 cmp %g1, %g3 40005d14: 18 80 00 04 bgu 40005d24 40005d18: 83 28 60 02 sll %g1, 2, %g1 information->local_table[ index ] = the_object; 40005d1c: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40005d20: 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 ); 40005d24: 40 00 0c e7 call 400090c0 <_Objects_Free> 40005d28: c0 22 60 0c clr [ %o1 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40005d2c: 03 10 00 71 sethi %hi(0x4001c400), %g1 40005d30: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 ! 4001c410 <_Thread_Dispatch_disable_level> 40005d34: 90 10 20 00 clr %o0 40005d38: 84 00 bf ff add %g2, -1, %g2 40005d3c: c4 20 60 10 st %g2, [ %g1 + 0x10 ] 40005d40: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 40005d44: 80 a0 e0 00 cmp %g3, 0 40005d48: 12 bf ff e8 bne 40005ce8 40005d4c: 01 00 00 00 nop _Thread_Dispatch(); 40005d50: 40 00 12 0b call 4000a57c <_Thread_Dispatch> 40005d54: 01 00 00 00 nop 40005d58: 10 bf ff e4 b 40005ce8 40005d5c: 90 10 20 00 clr %o0 ! 0 40005d60 : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { 40005d60: 9d e3 bf 88 save %sp, -120, %sp const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 40005d64: 80 a6 20 00 cmp %i0, 0 40005d68: 02 80 00 27 be 40005e04 40005d6c: a0 10 00 19 mov %i1, %l0 return EINVAL; if ( count == 0 ) 40005d70: 80 a6 a0 00 cmp %i2, 0 40005d74: 02 80 00 24 be 40005e04 40005d78: 80 a6 60 00 cmp %i1, 0 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 40005d7c: 22 80 00 25 be,a 40005e10 40005d80: a0 07 bf e8 add %fp, -24, %l0 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 40005d84: c2 04 00 00 ld [ %l0 ], %g1 40005d88: 80 a0 60 00 cmp %g1, 0 40005d8c: 22 80 00 1c be,a 40005dfc 40005d90: b0 10 20 16 mov 0x16, %i0 return EINVAL; switch ( the_attr->process_shared ) { 40005d94: c2 04 20 04 ld [ %l0 + 4 ], %g1 40005d98: 80 a0 60 00 cmp %g1, 0 40005d9c: 32 80 00 18 bne,a 40005dfc 40005da0: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40005da4: 33 10 00 71 sethi %hi(0x4001c400), %i1 40005da8: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 ! 4001c410 <_Thread_Dispatch_disable_level> /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; the_attributes.maximum_count = count; 40005dac: f4 27 bf f4 st %i2, [ %fp + -12 ] 40005db0: 82 00 60 01 inc %g1 } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 40005db4: c0 27 bf f0 clr [ %fp + -16 ] 40005db8: c2 26 60 10 st %g1, [ %i1 + 0x10 ] * 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 *) 40005dbc: 35 10 00 72 sethi %hi(0x4001c800), %i2 40005dc0: 40 00 0b b2 call 40008c88 <_Objects_Allocate> 40005dc4: 90 16 a0 c0 or %i2, 0xc0, %o0 ! 4001c8c0 <_POSIX_Barrier_Information> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 40005dc8: a0 92 20 00 orcc %o0, 0, %l0 40005dcc: 12 80 00 15 bne 40005e20 40005dd0: 90 04 20 10 add %l0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40005dd4: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 40005dd8: b0 10 20 0b mov 0xb, %i0 _Thread_Dispatch(); 40005ddc: 82 00 7f ff add %g1, -1, %g1 40005de0: c2 26 60 10 st %g1, [ %i1 + 0x10 ] 40005de4: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 40005de8: 80 a0 a0 00 cmp %g2, 0 40005dec: 12 80 00 07 bne 40005e08 40005df0: 01 00 00 00 nop 40005df4: 40 00 11 e2 call 4000a57c <_Thread_Dispatch> 40005df8: 01 00 00 00 nop 40005dfc: 81 c7 e0 08 ret 40005e00: 81 e8 00 00 restore 40005e04: b0 10 20 16 mov 0x16, %i0 * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); return 0; } 40005e08: 81 c7 e0 08 ret 40005e0c: 81 e8 00 00 restore * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); 40005e10: 7f ff ff 7d call 40005c04 40005e14: 90 10 00 10 mov %l0, %o0 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 40005e18: 10 bf ff dc b 40005d88 40005e1c: c2 04 00 00 ld [ %l0 ], %g1 if ( !the_barrier ) { _Thread_Enable_dispatch(); return EAGAIN; } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 40005e20: 40 00 08 d9 call 40008184 <_CORE_barrier_Initialize> 40005e24: 92 07 bf f0 add %fp, -16, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40005e28: 90 16 a0 c0 or %i2, 0xc0, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 40005e2c: c6 04 20 08 ld [ %l0 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40005e30: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 40005e34: 03 00 00 3f sethi %hi(0xfc00), %g1 40005e38: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40005e3c: 82 08 c0 01 and %g3, %g1, %g1 40005e40: 80 a0 40 02 cmp %g1, %g2 40005e44: 38 80 00 06 bgu,a 40005e5c 40005e48: c6 26 00 00 st %g3, [ %i0 ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40005e4c: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40005e50: 83 28 60 02 sll %g1, 2, %g1 40005e54: e0 20 80 01 st %l0, [ %g2 + %g1 ] ); /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; 40005e58: c6 26 00 00 st %g3, [ %i0 ] 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; 40005e5c: c0 24 20 0c clr [ %l0 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40005e60: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 40005e64: 10 bf ff de b 40005ddc 40005e68: b0 10 20 00 clr %i0 40005e6c : */ int pthread_barrier_wait( pthread_barrier_t *barrier ) { 40005e6c: 9d e3 bf 90 save %sp, -112, %sp POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 40005e70: 80 a6 20 00 cmp %i0, 0 40005e74: 02 80 00 24 be 40005f04 40005e78: 11 10 00 72 sethi %hi(0x4001c800), %o0 RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( pthread_barrier_t *barrier, Objects_Locations *location ) { return (POSIX_Barrier_Control *) _Objects_Get( 40005e7c: d2 06 00 00 ld [ %i0 ], %o1 40005e80: 94 07 bf f4 add %fp, -12, %o2 40005e84: 40 00 0c d2 call 400091cc <_Objects_Get> 40005e88: 90 12 20 c0 or %o0, 0xc0, %o0 return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); switch ( location ) { 40005e8c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005e90: 80 a0 60 00 cmp %g1, 0 40005e94: 22 80 00 09 be,a 40005eb8 40005e98: d2 02 20 08 ld [ %o0 + 8 ], %o1 40005e9c: 80 a0 60 02 cmp %g1, 2 40005ea0: 08 80 00 1a bleu 40005f08 40005ea4: 90 10 20 16 mov 0x16, %o0 _Thread_Enable_dispatch(); return _POSIX_Barrier_Translate_core_barrier_return_code( _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40005ea8: 40 00 01 d3 call 400065f4 <== NOT EXECUTED 40005eac: 01 00 00 00 nop <== NOT EXECUTED } 40005eb0: 81 c7 e0 08 ret <== NOT EXECUTED 40005eb4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_barrier_Wait( 40005eb8: 94 10 20 01 mov 1, %o2 40005ebc: 90 02 20 10 add %o0, 0x10, %o0 40005ec0: 96 10 20 00 clr %o3 40005ec4: 40 00 08 bc call 400081b4 <_CORE_barrier_Wait> 40005ec8: 98 10 20 00 clr %o4 40005ecc: 03 10 00 71 sethi %hi(0x4001c400), %g1 40005ed0: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 ! 4001c410 <_Thread_Dispatch_disable_level> 40005ed4: 84 00 bf ff add %g2, -1, %g2 40005ed8: c4 20 60 10 st %g2, [ %g1 + 0x10 ] 40005edc: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 40005ee0: 80 a0 e0 00 cmp %g3, 0 40005ee4: 02 80 00 0b be 40005f10 40005ee8: 01 00 00 00 nop TRUE, 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_Barrier_Translate_core_barrier_return_code( 40005eec: 03 10 00 71 sethi %hi(0x4001c400), %g1 <== NOT EXECUTED 40005ef0: c4 00 60 ec ld [ %g1 + 0xec ], %g2 ! 4001c4ec <_Thread_Executing> 40005ef4: 40 00 20 1a call 4000df5c <_POSIX_Barrier_Translate_core_barrier_return_code> 40005ef8: d0 00 a0 34 ld [ %g2 + 0x34 ], %o0 _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 40005efc: 81 c7 e0 08 ret 40005f00: 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(); 40005f04: 90 10 20 16 mov 0x16, %o0 } 40005f08: 81 c7 e0 08 ret 40005f0c: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 40005f10: 40 00 11 9b call 4000a57c <_Thread_Dispatch> 40005f14: 01 00 00 00 nop TRUE, 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_Barrier_Translate_core_barrier_return_code( 40005f18: 10 bf ff f6 b 40005ef0 40005f1c: 03 10 00 71 sethi %hi(0x4001c400), %g1 40005344 : */ int pthread_cancel( pthread_t thread ) { 40005344: 9d e3 bf 90 save %sp, -112, %sp /* * Don't even think about deleting a resource from an ISR. */ if ( _ISR_Is_in_progress() ) 40005348: 03 10 00 5f sethi %hi(0x40017c00), %g1 4000534c: c4 00 61 14 ld [ %g1 + 0x114 ], %g2 ! 40017d14 <_ISR_Nest_level> */ int pthread_cancel( pthread_t thread ) { 40005350: 92 10 00 18 mov %i0, %o1 /* * Don't even think about deleting a resource from an ISR. */ if ( _ISR_Is_in_progress() ) 40005354: 80 a0 a0 00 cmp %g2, 0 40005358: 12 80 00 11 bne 4000539c 4000535c: 90 10 20 47 mov 0x47, %o0 RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 40005360: 11 10 00 5f sethi %hi(0x40017c00), %o0 40005364: 94 07 bf f4 add %fp, -12, %o2 40005368: 40 00 0d aa call 40008a10 <_Objects_Get> 4000536c: 90 12 23 38 or %o0, 0x338, %o0 return EPROTO; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 40005370: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005374: 80 a0 60 01 cmp %g1, 1 40005378: 02 80 00 22 be 40005400 4000537c: 01 00 00 00 nop 40005380: 2a 80 00 09 bcs,a 400053a4 40005384: c6 02 21 70 ld [ %o0 + 0x170 ], %g3 40005388: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000538c: 02 80 00 04 be 4000539c <== NOT EXECUTED 40005390: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40005394: 40 00 02 d9 call 40005ef8 <== NOT EXECUTED 40005398: 01 00 00 00 nop <== NOT EXECUTED } 4000539c: 81 c7 e0 08 ret <== NOT EXECUTED 400053a0: 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; 400053a4: 82 10 20 01 mov 1, %g1 if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 400053a8: c4 00 e0 cc ld [ %g3 + 0xcc ], %g2 400053ac: 80 a0 a0 00 cmp %g2, 0 400053b0: 12 80 00 06 bne 400053c8 400053b4: c2 20 e0 d4 st %g1, [ %g3 + 0xd4 ] 400053b8: c2 00 e0 d0 ld [ %g3 + 0xd0 ], %g1 400053bc: 80 a0 60 01 cmp %g1, 1 400053c0: 02 80 00 14 be 40005410 400053c4: 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 ) 400053c8: 03 10 00 5f sethi %hi(0x40017c00), %g1 400053cc: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 ! 40017c50 <_Thread_Dispatch_disable_level> 400053d0: 90 10 20 00 clr %o0 400053d4: 84 00 bf ff add %g2, -1, %g2 400053d8: c4 20 60 50 st %g2, [ %g1 + 0x50 ] 400053dc: c6 00 60 50 ld [ %g1 + 0x50 ], %g3 400053e0: 80 a0 e0 00 cmp %g3, 0 400053e4: 12 bf ff ee bne 4000539c 400053e8: 01 00 00 00 nop _Thread_Dispatch(); 400053ec: 40 00 12 75 call 40009dc0 <_Thread_Dispatch> 400053f0: 01 00 00 00 nop 400053f4: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 400053f8: 81 c7 e0 08 ret 400053fc: 91 e8 00 08 restore %g0, %o0, %o0 the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { case OBJECTS_ERROR: return EINVAL; case OBJECTS_REMOTE: return POSIX_MP_NOT_IMPLEMENTED(); 40005400: 40 00 02 c8 call 40005f20 <== NOT EXECUTED 40005404: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40005408: 81 c7 e0 08 ret <== NOT EXECUTED 4000540c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED thread_support->cancelation_requested = 1; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS ) { _POSIX_Threads_cancel_run( the_thread ); 40005410: 40 00 00 03 call 4000541c <_POSIX_Threads_cancel_run> 40005414: 01 00 00 00 nop 40005418: 30 bf ff ec b,a 400053c8 40006608 : */ int pthread_cond_destroy( pthread_cond_t *cond ) { 40006608: 9d e3 bf 90 save %sp, -112, %sp ) { Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 4000660c: 80 a6 20 00 cmp %i0, 0 40006610: 32 80 00 05 bne,a 40006624 40006614: d2 06 00 00 ld [ %i0 ], %o1 } #endif _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40006618: 90 10 20 16 mov 0x16, %o0 } 4000661c: 81 c7 e0 08 ret 40006620: 91 e8 00 08 restore %g0, %o0, %o0 *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *id == PTHREAD_COND_INITIALIZER ) { 40006624: 80 a2 7f ff cmp %o1, -1 40006628: 02 80 00 3d be 4000671c 4000662c: 90 10 00 18 mov %i0, %o0 /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 40006630: 21 10 00 65 sethi %hi(0x40019400), %l0 40006634: 94 07 bf f4 add %fp, -12, %o2 40006638: 40 00 10 02 call 4000a640 <_Objects_Get> 4000663c: 90 14 23 2c or %l0, 0x32c, %o0 { POSIX_Condition_variables_Control *the_cond; Objects_Locations location; the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { 40006640: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006644: 80 a0 60 00 cmp %g1, 0 40006648: 12 80 00 14 bne 40006698 4000664c: b0 10 00 08 mov %o0, %i0 return EINVAL; case OBJECTS_LOCAL: if ( _Thread_queue_First( &the_cond->Wait_queue ) ) { 40006650: 40 00 17 5e call 4000c3c8 <_Thread_queue_First> 40006654: 90 02 20 18 add %o0, 0x18, %o0 40006658: 80 a2 20 00 cmp %o0, 0 4000665c: 02 80 00 15 be 400066b0 40006660: 90 14 23 2c or %l0, 0x32c, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006664: 03 10 00 64 sethi %hi(0x40019000), %g1 40006668: c4 00 61 e0 ld [ %g1 + 0x1e0 ], %g2 ! 400191e0 <_Thread_Dispatch_disable_level> 4000666c: 90 10 20 10 mov 0x10, %o0 40006670: 84 00 bf ff add %g2, -1, %g2 40006674: c4 20 61 e0 st %g2, [ %g1 + 0x1e0 ] 40006678: c6 00 61 e0 ld [ %g1 + 0x1e0 ], %g3 4000667c: 80 a0 e0 00 cmp %g3, 0 40006680: 12 bf ff e7 bne 4000661c 40006684: 01 00 00 00 nop _Thread_Dispatch(); 40006688: 40 00 14 da call 4000b9f0 <_Thread_Dispatch> 4000668c: 01 00 00 00 nop 40006690: 10 bf ff e3 b 4000661c 40006694: 90 10 20 10 mov 0x10, %o0 ! 10 { POSIX_Condition_variables_Control *the_cond; Objects_Locations location; the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { 40006698: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000669c: 28 bf ff e0 bleu,a 4000661c <== NOT EXECUTED 400066a0: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED } #endif _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 400066a4: 40 00 05 3f call 40007ba0 <== NOT EXECUTED 400066a8: 01 00 00 00 nop <== NOT EXECUTED 400066ac: 30 bf ff dc b,a 4000661c <== NOT EXECUTED ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 400066b0: c2 06 20 08 ld [ %i0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400066b4: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 400066b8: 05 00 00 3f sethi %hi(0xfc00), %g2 400066bc: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 400066c0: 82 08 40 02 and %g1, %g2, %g1 400066c4: 80 a0 40 03 cmp %g1, %g3 400066c8: 38 80 00 06 bgu,a 400066e0 400066cc: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 400066d0: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 400066d4: 83 28 60 02 sll %g1, 2, %g1 400066d8: 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; 400066dc: c0 26 20 0c clr [ %i0 + 0xc ] RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free ( POSIX_Condition_variables_Control *the_condition_variable ) { _Objects_Free( 400066e0: 40 00 0f 95 call 4000a534 <_Objects_Free> 400066e4: 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 ) 400066e8: 03 10 00 64 sethi %hi(0x40019000), %g1 400066ec: c4 00 61 e0 ld [ %g1 + 0x1e0 ], %g2 ! 400191e0 <_Thread_Dispatch_disable_level> 400066f0: 90 10 20 00 clr %o0 400066f4: 84 00 bf ff add %g2, -1, %g2 400066f8: c4 20 61 e0 st %g2, [ %g1 + 0x1e0 ] 400066fc: c6 00 61 e0 ld [ %g1 + 0x1e0 ], %g3 40006700: 80 a0 e0 00 cmp %g3, 0 40006704: 12 bf ff c6 bne 4000661c 40006708: 01 00 00 00 nop _Thread_Dispatch(); 4000670c: 40 00 14 b9 call 4000b9f0 <_Thread_Dispatch> 40006710: 01 00 00 00 nop 40006714: 10 bf ff c2 b 4000661c 40006718: 90 10 20 00 clr %o0 ! 0 if ( *id == PTHREAD_COND_INITIALIZER ) { /* * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); 4000671c: 40 00 00 07 call 40006738 <== NOT EXECUTED 40006720: 92 10 20 00 clr %o1 <== NOT EXECUTED if ( status ) { 40006724: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40006728: 12 bf ff bd bne 4000661c <== NOT EXECUTED 4000672c: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 40006730: 10 bf ff c0 b 40006630 <== NOT EXECUTED 40006734: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED 40006738 : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 40006738: 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; 4000673c: 03 10 00 5d sethi %hi(0x40017400), %g1 int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 40006740: a6 10 00 18 mov %i0, %l3 POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 40006744: 80 a6 60 00 cmp %i1, 0 40006748: 02 80 00 03 be 40006754 4000674c: a0 10 60 64 or %g1, 0x64, %l0 40006750: a0 10 00 19 mov %i1, %l0 /* * XXX: Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 40006754: c2 04 20 04 ld [ %l0 + 4 ], %g1 40006758: 80 a0 60 01 cmp %g1, 1 4000675c: 02 80 00 3d be 40006850 40006760: 01 00 00 00 nop return POSIX_MP_NOT_IMPLEMENTED(); if ( !the_attr->is_initialized ) 40006764: c2 04 00 00 ld [ %l0 ], %g1 40006768: 80 a0 60 00 cmp %g1, 0 4000676c: 02 80 00 16 be 400067c4 40006770: b0 10 20 16 mov 0x16, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006774: 23 10 00 64 sethi %hi(0x40019000), %l1 40006778: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 ! 400191e0 <_Thread_Dispatch_disable_level> 4000677c: 82 00 60 01 inc %g1 40006780: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] */ RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) 40006784: 25 10 00 65 sethi %hi(0x40019400), %l2 40006788: 40 00 0e 5d call 4000a0fc <_Objects_Allocate> 4000678c: 90 14 a3 2c or %l2, 0x32c, %o0 ! 4001972c <_POSIX_Condition_variables_Information> _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { 40006790: b2 92 20 00 orcc %o0, 0, %i1 40006794: 32 80 00 0e bne,a 400067cc 40006798: c2 04 20 04 ld [ %l0 + 4 ], %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000679c: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 400067a0: b0 10 20 0c mov 0xc, %i0 400067a4: 82 00 7f ff add %g1, -1, %g1 400067a8: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] 400067ac: c4 04 61 e0 ld [ %l1 + 0x1e0 ], %g2 400067b0: 80 a0 a0 00 cmp %g2, 0 400067b4: 12 80 00 25 bne 40006848 400067b8: 01 00 00 00 nop _Thread_Dispatch(); 400067bc: 40 00 14 8d call 4000b9f0 <_Thread_Dispatch> 400067c0: 01 00 00 00 nop 400067c4: 81 c7 e0 08 ret 400067c8: 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( 400067cc: 90 06 60 18 add %i1, 0x18, %o0 _Thread_Enable_dispatch(); return EAGAIN; } #endif the_cond->process_shared = the_attr->process_shared; 400067d0: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 400067d4: c0 26 60 14 clr [ %i1 + 0x14 ] /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( 400067d8: 92 10 20 00 clr %o1 400067dc: 94 10 28 00 mov 0x800, %o2 400067e0: 40 00 17 24 call 4000c470 <_Thread_queue_Initialize> 400067e4: 96 10 20 74 mov 0x74, %o3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400067e8: 90 14 a3 2c or %l2, 0x32c, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 400067ec: c6 06 60 08 ld [ %i1 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400067f0: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 400067f4: 03 00 00 3f sethi %hi(0xfc00), %g1 400067f8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400067fc: 82 08 c0 01 and %g3, %g1, %g1 40006800: 80 a0 40 02 cmp %g1, %g2 40006804: 38 80 00 06 bgu,a 4000681c 40006808: c6 24 c0 00 st %g3, [ %l3 ] <== NOT EXECUTED information->local_table[ index ] = the_object; 4000680c: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40006810: 83 28 60 02 sll %g1, 2, %g1 40006814: f2 20 80 01 st %i1, [ %g2 + %g1 ] &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; 40006818: c6 24 c0 00 st %g3, [ %l3 ] 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; 4000681c: c0 26 60 0c clr [ %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 ) 40006820: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 40006824: b0 10 20 00 clr %i0 40006828: 82 00 7f ff add %g1, -1, %g1 4000682c: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] 40006830: c4 04 61 e0 ld [ %l1 + 0x1e0 ], %g2 40006834: 80 a0 a0 00 cmp %g2, 0 40006838: 12 80 00 04 bne 40006848 4000683c: 01 00 00 00 nop _Thread_Dispatch(); 40006840: 40 00 14 6c call 4000b9f0 <_Thread_Dispatch> 40006844: 01 00 00 00 nop #endif _Thread_Enable_dispatch(); return 0; } 40006848: 81 c7 e0 08 ret 4000684c: 81 e8 00 00 restore /* * XXX: Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) return POSIX_MP_NOT_IMPLEMENTED(); 40006850: 40 00 04 de call 40007bc8 <== NOT EXECUTED 40006854: 81 e8 00 00 restore <== NOT EXECUTED 40006858: 01 00 00 00 nop 400065b4 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 400065b4: 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; 400065b8: 03 10 00 72 sethi %hi(0x4001c800), %g1 pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 400065bc: 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; 400065c0: 80 a6 60 00 cmp %i1, 0 400065c4: 02 80 00 03 be 400065d0 400065c8: a2 10 63 d8 or %g1, 0x3d8, %l1 400065cc: a2 10 00 19 mov %i1, %l1 if ( !the_attr->is_initialized ) 400065d0: c2 04 40 00 ld [ %l1 ], %g1 400065d4: 80 a0 60 00 cmp %g1, 0 400065d8: 02 80 00 10 be 40006618 400065dc: 01 00 00 00 nop /* * 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 ) ) 400065e0: c2 04 60 04 ld [ %l1 + 4 ], %g1 400065e4: 80 a0 60 00 cmp %g1, 0 400065e8: 22 80 00 07 be,a 40006604 400065ec: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 400065f0: c2 04 60 08 ld [ %l1 + 8 ], %g1 400065f4: 80 a0 6f ff cmp %g1, 0xfff 400065f8: 08 80 00 08 bleu 40006618 400065fc: 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 ) { 40006600: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 <== NOT EXECUTED 40006604: 80 a0 60 01 cmp %g1, 1 40006608: 02 80 00 34 be 400066d8 4000660c: 80 a0 60 02 cmp %g1, 2 40006610: 22 80 00 04 be,a 40006620 40006614: c4 04 60 18 ld [ %l1 + 0x18 ], %g2 40006618: 81 c7 e0 08 ret 4000661c: 91 e8 20 16 restore %g0, 0x16, %o0 schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 40006620: f2 04 60 14 ld [ %l1 + 0x14 ], %i1 schedparam = the_attr->schedparam; 40006624: c4 27 bf e0 st %g2, [ %fp + -32 ] 40006628: c2 04 60 1c ld [ %l1 + 0x1c ], %g1 4000662c: c2 27 bf e4 st %g1, [ %fp + -28 ] 40006630: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 40006634: c4 27 bf e8 st %g2, [ %fp + -24 ] 40006638: c2 04 60 24 ld [ %l1 + 0x24 ], %g1 4000663c: c2 27 bf ec st %g1, [ %fp + -20 ] 40006640: c4 04 60 28 ld [ %l1 + 0x28 ], %g2 40006644: c4 27 bf f0 st %g2, [ %fp + -16 ] 40006648: c2 04 60 2c ld [ %l1 + 0x2c ], %g1 4000664c: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) 40006650: c2 04 60 0c ld [ %l1 + 0xc ], %g1 40006654: 80 a0 60 00 cmp %g1, 0 40006658: 12 80 00 1e bne 400066d0 4000665c: b0 10 20 86 mov 0x86, %i0 /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 40006660: e6 07 bf e0 ld [ %fp + -32 ], %l3 40006664: 82 04 ff ff add %l3, -1, %g1 40006668: 80 a0 60 fd cmp %g1, 0xfd 4000666c: 18 bf ff eb bgu 40006618 40006670: 80 a6 60 01 cmp %i1, 1 */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 40006674: 02 80 00 41 be 40006778 40006678: a8 10 20 00 clr %l4 4000667c: 04 80 00 41 ble 40006780 40006680: 80 a6 60 02 cmp %i1, 2 40006684: 02 80 00 26 be 4000671c 40006688: 80 a6 60 03 cmp %i1, 3 4000668c: 12 bf ff e3 bne 40006618 40006690: 01 00 00 00 nop 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 ) < 40006694: 40 00 17 62 call 4000c41c <_Timespec_To_ticks> 40006698: 90 07 bf e8 add %fp, -24, %o0 4000669c: a0 10 00 08 mov %o0, %l0 400066a0: 40 00 17 5f call 4000c41c <_Timespec_To_ticks> 400066a4: 90 07 bf f0 add %fp, -16, %o0 400066a8: 80 a4 00 08 cmp %l0, %o0 400066ac: 0a bf ff db bcs 40006618 400066b0: 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 ) ) 400066b4: 82 00 7f ff add %g1, -1, %g1 400066b8: 80 a0 60 fd cmp %g1, 0xfd 400066bc: 18 bf ff d7 bgu 40006618 400066c0: 03 10 00 1b sethi %hi(0x40006c00), %g1 400066c4: a8 10 20 03 mov 3, %l4 400066c8: 10 80 00 17 b 40006724 400066cc: b0 10 61 40 or %g1, 0x140, %i0 *thread = the_thread->Object.id; _Thread_Enable_dispatch(); return 0; } 400066d0: 81 c7 e0 08 ret 400066d4: 81 e8 00 00 restore * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 400066d8: 03 10 00 7a sethi %hi(0x4001e800), %g1 400066dc: c4 00 63 3c ld [ %g1 + 0x33c ], %g2 ! 4001eb3c <_Thread_Executing> 400066e0: c6 00 a1 70 ld [ %g2 + 0x170 ], %g3 schedpolicy = api->schedpolicy; schedparam = api->schedparam; 400066e4: c8 00 e0 80 ld [ %g3 + 0x80 ], %g4 */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; schedpolicy = api->schedpolicy; 400066e8: f2 00 e0 7c ld [ %g3 + 0x7c ], %i1 schedparam = api->schedparam; 400066ec: c8 27 bf e0 st %g4, [ %fp + -32 ] 400066f0: c2 00 e0 84 ld [ %g3 + 0x84 ], %g1 400066f4: c2 27 bf e4 st %g1, [ %fp + -28 ] 400066f8: c4 00 e0 88 ld [ %g3 + 0x88 ], %g2 400066fc: c4 27 bf e8 st %g2, [ %fp + -24 ] 40006700: c2 00 e0 8c ld [ %g3 + 0x8c ], %g1 40006704: c2 27 bf ec st %g1, [ %fp + -20 ] 40006708: c4 00 e0 90 ld [ %g3 + 0x90 ], %g2 4000670c: c4 27 bf f0 st %g2, [ %fp + -16 ] 40006710: c2 00 e0 94 ld [ %g3 + 0x94 ], %g1 40006714: 10 bf ff cf b 40006650 40006718: c2 27 bf f4 st %g1, [ %fp + -12 ] */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 4000671c: a8 10 20 02 mov 2, %l4 <== NOT EXECUTED 40006720: b0 10 20 00 clr %i0 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006724: 25 10 00 7a sethi %hi(0x4001e800), %l2 40006728: c2 04 a2 60 ld [ %l2 + 0x260 ], %g1 ! 4001ea60 <_Thread_Dispatch_disable_level> 4000672c: 82 00 60 01 inc %g1 40006730: c2 24 a2 60 st %g1, [ %l2 + 0x260 ] * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 40006734: 2b 10 00 7b sethi %hi(0x4001ec00), %l5 40006738: 40 00 0c 4e call 40009870 <_Objects_Allocate> 4000673c: 90 15 61 48 or %l5, 0x148, %o0 ! 4001ed48 <_POSIX_Threads_Information> * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 40006740: a0 92 20 00 orcc %o0, 0, %l0 40006744: 32 80 00 14 bne,a 40006794 40006748: d4 04 60 04 ld [ %l1 + 4 ], %o2 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000674c: c2 04 a2 60 ld [ %l2 + 0x260 ], %g1 40006750: 82 00 7f ff add %g1, -1, %g1 40006754: c2 24 a2 60 st %g1, [ %l2 + 0x260 ] 40006758: c4 04 a2 60 ld [ %l2 + 0x260 ], %g2 4000675c: 80 a0 a0 00 cmp %g2, 0 40006760: 12 bf ff dc bne 400066d0 40006764: b0 10 20 0b mov 0xb, %i0 _Thread_Dispatch(); 40006768: 40 00 12 7f call 4000b164 <_Thread_Dispatch> 4000676c: 01 00 00 00 nop 40006770: 81 c7 e0 08 ret 40006774: 81 e8 00 00 restore */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 40006778: 10 bf ff eb b 40006724 4000677c: b0 10 20 00 clr %i0 40006780: 80 a6 60 00 cmp %i1, 0 40006784: a8 10 20 01 mov 1, %l4 40006788: 02 bf ff e7 be 40006724 4000678c: b0 10 20 00 clr %i0 40006790: 30 bf ff a2 b,a 40006618 /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 40006794: d6 04 60 08 ld [ %l1 + 8 ], %o3 40006798: 9a 10 20 ff mov 0xff, %o5 4000679c: e8 23 a0 60 st %l4, [ %sp + 0x60 ] 400067a0: f0 23 a0 64 st %i0, [ %sp + 0x64 ] 400067a4: c0 23 a0 68 clr [ %sp + 0x68 ] 400067a8: c0 23 a0 6c clr [ %sp + 0x6c ] 400067ac: 9a 23 40 13 sub %o5, %l3, %o5 400067b0: a8 10 20 01 mov 1, %l4 400067b4: 90 15 61 48 or %l5, 0x148, %o0 400067b8: e8 23 a0 5c st %l4, [ %sp + 0x5c ] 400067bc: 92 10 00 10 mov %l0, %o1 400067c0: 40 00 12 d7 call 4000b31c <_Thread_Initialize> 400067c4: 98 10 20 00 clr %o4 budget_callout, 0, /* isr level */ NULL /* posix threads don't have a name */ ); if ( !status ) { 400067c8: 80 a2 20 00 cmp %o0, 0 400067cc: 12 80 00 05 bne 400067e0 400067d0: 90 15 61 48 or %l5, 0x148, %o0 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 400067d4: 40 00 0d 35 call 40009ca8 <_Objects_Free> 400067d8: 92 10 00 10 mov %l0, %o1 400067dc: 30 bf ff dc b,a 4000674c /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 400067e0: e6 04 21 70 ld [ %l0 + 0x170 ], %l3 api->Attributes = *the_attr; 400067e4: 92 10 00 11 mov %l1, %o1 400067e8: 94 10 20 38 mov 0x38, %o2 400067ec: 40 00 2a 61 call 40011170 400067f0: 90 10 00 13 mov %l3, %o0 api->detachstate = the_attr->detachstate; 400067f4: c2 04 60 34 ld [ %l1 + 0x34 ], %g1 api->schedpolicy = schedpolicy; 400067f8: f2 24 e0 7c st %i1, [ %l3 + 0x7c ] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; 400067fc: c2 24 e0 38 st %g1, [ %l3 + 0x38 ] api->schedpolicy = schedpolicy; api->schedparam = schedparam; 40006800: c2 07 bf e0 ld [ %fp + -32 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 40006804: 94 10 00 1a mov %i2, %o2 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 40006808: c2 24 e0 80 st %g1, [ %l3 + 0x80 ] 4000680c: c2 07 bf e4 ld [ %fp + -28 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 40006810: 96 10 00 1b mov %i3, %o3 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 40006814: c2 24 e0 84 st %g1, [ %l3 + 0x84 ] 40006818: c2 07 bf e8 ld [ %fp + -24 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 4000681c: 90 10 00 10 mov %l0, %o0 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 40006820: c2 24 e0 88 st %g1, [ %l3 + 0x88 ] 40006824: c2 07 bf ec ld [ %fp + -20 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 40006828: 92 10 20 01 mov 1, %o1 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 4000682c: c2 24 e0 8c st %g1, [ %l3 + 0x8c ] 40006830: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 40006834: 98 10 20 00 clr %o4 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 40006838: c2 24 e0 90 st %g1, [ %l3 + 0x90 ] 4000683c: c4 07 bf f4 ld [ %fp + -12 ], %g2 40006840: c4 24 e0 94 st %g2, [ %l3 + 0x94 ] /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 40006844: 40 00 16 39 call 4000c128 <_Thread_Start> 40006848: e8 24 20 78 st %l4, [ %l0 + 0x78 ] start_routine, arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { 4000684c: 80 a6 60 03 cmp %i1, 3 40006850: 02 80 00 12 be 40006898 40006854: a2 10 00 08 mov %o0, %l1 /* * _Thread_Start only fails if the thread was in the incorrect state */ if ( !status ) { 40006858: 80 a4 60 00 cmp %l1, 0 4000685c: 12 80 00 18 bne 400068bc 40006860: 90 15 61 48 or %l5, 0x148, %o0 40006864: 40 00 0d 11 call 40009ca8 <_Objects_Free> <== NOT EXECUTED 40006868: 92 10 00 10 mov %l0, %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 ) 4000686c: c2 04 a2 60 ld [ %l2 + 0x260 ], %g1 <== NOT EXECUTED 40006870: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40006874: c2 24 a2 60 st %g1, [ %l2 + 0x260 ] <== NOT EXECUTED 40006878: c4 04 a2 60 ld [ %l2 + 0x260 ], %g2 <== NOT EXECUTED 4000687c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40006880: 12 bf ff 66 bne 40006618 <== NOT EXECUTED 40006884: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 40006888: 40 00 12 37 call 4000b164 <_Thread_Dispatch> <== NOT EXECUTED 4000688c: b0 10 20 16 mov 0x16, %i0 ! 16 <== NOT EXECUTED 40006890: 81 c7 e0 08 ret <== NOT EXECUTED 40006894: 81 e8 00 00 restore <== NOT EXECUTED arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { _Watchdog_Insert_ticks( 40006898: 40 00 16 e1 call 4000c41c <_Timespec_To_ticks> 4000689c: 90 04 e0 88 add %l3, 0x88, %o0 400068a0: 92 04 e0 9c add %l3, 0x9c, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 400068a4: d0 24 e0 a8 st %o0, [ %l3 + 0xa8 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400068a8: 11 10 00 7a sethi %hi(0x4001e800), %o0 400068ac: 40 00 17 ef call 4000c868 <_Watchdog_Insert> 400068b0: 90 12 23 5c or %o0, 0x35c, %o0 ! 4001eb5c <_Watchdog_Ticks_chain> /* * _Thread_Start only fails if the thread was in the incorrect state */ if ( !status ) { 400068b4: 10 bf ff ea b 4000685c 400068b8: 80 a4 60 00 cmp %l1, 0 /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 400068bc: c2 04 20 08 ld [ %l0 + 8 ], %g1 400068c0: c2 25 80 00 st %g1, [ %l6 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400068c4: c2 04 a2 60 ld [ %l2 + 0x260 ], %g1 400068c8: b0 10 20 00 clr %i0 400068cc: 82 00 7f ff add %g1, -1, %g1 400068d0: c2 24 a2 60 st %g1, [ %l2 + 0x260 ] 400068d4: c4 04 a2 60 ld [ %l2 + 0x260 ], %g2 400068d8: 80 a0 a0 00 cmp %g2, 0 400068dc: 12 80 00 04 bne 400068ec 400068e0: 01 00 00 00 nop _Thread_Dispatch(); 400068e4: 40 00 12 20 call 4000b164 <_Thread_Dispatch> 400068e8: 01 00 00 00 nop 400068ec: 81 c7 e0 08 ret 400068f0: 81 e8 00 00 restore 40005c74 : #include int pthread_detach( pthread_t thread ) { 40005c74: 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 *) 40005c78: 11 10 00 5f sethi %hi(0x40017c00), %o0 40005c7c: 92 10 00 18 mov %i0, %o1 40005c80: 90 12 21 98 or %o0, 0x198, %o0 40005c84: 40 00 0c 94 call 40008ed4 <_Objects_Get> 40005c88: 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 ) { 40005c8c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005c90: 80 a0 60 00 cmp %g1, 0 40005c94: 12 80 00 0f bne 40005cd0 40005c98: 80 a0 60 02 cmp %g1, 2 case OBJECTS_REMOTE: return ESRCH; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->detachstate = PTHREAD_CREATE_DETACHED; 40005c9c: c2 02 21 70 ld [ %o0 + 0x170 ], %g1 40005ca0: 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 ) 40005ca4: 07 10 00 5e sethi %hi(0x40017800), %g3 40005ca8: c2 00 e2 b0 ld [ %g3 + 0x2b0 ], %g1 ! 40017ab0 <_Thread_Dispatch_disable_level> 40005cac: 90 10 20 00 clr %o0 40005cb0: 82 00 7f ff add %g1, -1, %g1 40005cb4: c2 20 e2 b0 st %g1, [ %g3 + 0x2b0 ] 40005cb8: c4 00 e2 b0 ld [ %g3 + 0x2b0 ], %g2 40005cbc: 80 a0 a0 00 cmp %g2, 0 40005cc0: 02 80 00 0a be 40005ce8 40005cc4: 01 00 00 00 nop _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40005cc8: 81 c7 e0 08 ret 40005ccc: 91 e8 00 08 restore %g0, %o0, %o0 register Thread_Control *the_thread; POSIX_API_Control *api; Objects_Locations location; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 40005cd0: 08 bf ff fe bleu 40005cc8 40005cd4: 90 10 20 03 mov 3, %o0 api->detachstate = PTHREAD_CREATE_DETACHED; _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40005cd8: 40 00 01 c6 call 400063f0 <== NOT EXECUTED 40005cdc: 01 00 00 00 nop <== NOT EXECUTED } 40005ce0: 81 c7 e0 08 ret <== NOT EXECUTED 40005ce4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 40005ce8: 40 00 11 67 call 4000a284 <_Thread_Dispatch> 40005cec: 01 00 00 00 nop 40005cf0: 90 10 20 00 clr %o0 ! 0 40005cf4: 81 c7 e0 08 ret 40005cf8: 91 e8 00 08 restore %g0, %o0, %o0 4000e6a8 : #include void pthread_exit( void *value_ptr ) { 4000e6a8: 9d e3 bf 98 save %sp, -104, %sp Objects_Information *the_information; the_information = _Objects_Get_information( _Thread_Executing->Object.id ); 4000e6ac: 25 10 00 6b sethi %hi(0x4001ac00), %l2 4000e6b0: c2 04 a0 3c ld [ %l2 + 0x3c ], %g1 ! 4001ac3c <_Thread_Executing> 4000e6b4: 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 ]; 4000e6b8: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000e6bc: 85 30 e0 16 srl %g3, 0x16, %g2 4000e6c0: 82 10 62 c0 or %g1, 0x2c0, %g1 4000e6c4: 84 08 a0 1c and %g2, 0x1c, %g2 4000e6c8: c8 00 40 02 ld [ %g1 + %g2 ], %g4 4000e6cc: 87 30 e0 1b srl %g3, 0x1b, %g3 4000e6d0: 87 28 e0 02 sll %g3, 2, %g3 4000e6d4: e2 01 00 03 ld [ %g4 + %g3 ], %l1 /* This should never happen if _Thread_Get() works right */ assert( the_information ); 4000e6d8: 80 a4 60 00 cmp %l1, 0 4000e6dc: 22 80 00 19 be,a 4000e740 4000e6e0: 11 10 00 64 sethi %hi(0x40019000), %o0 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000e6e4: 21 10 00 6a sethi %hi(0x4001a800), %l0 4000e6e8: c2 04 23 60 ld [ %l0 + 0x360 ], %g1 ! 4001ab60 <_Thread_Dispatch_disable_level> 4000e6ec: 82 00 60 01 inc %g1 4000e6f0: c2 24 23 60 st %g1, [ %l0 + 0x360 ] _Thread_Disable_dispatch(); _Thread_Executing->Wait.return_argument = value_ptr; 4000e6f4: d2 04 a0 3c ld [ %l2 + 0x3c ], %o1 _Thread_Close( the_information, _Thread_Executing ); 4000e6f8: 90 10 00 11 mov %l1, %o0 4000e6fc: 7f ff ea 48 call 4000901c <_Thread_Close> 4000e700: 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 ); 4000e704: d2 04 a0 3c ld [ %l2 + 0x3c ], %o1 4000e708: 11 10 00 6b sethi %hi(0x4001ac00), %o0 4000e70c: 7f ff e5 57 call 40007c68 <_Objects_Free> 4000e710: 90 12 22 48 or %o0, 0x248, %o0 ! 4001ae48 <_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 ) 4000e714: c2 04 23 60 ld [ %l0 + 0x360 ], %g1 4000e718: 82 00 7f ff add %g1, -1, %g1 4000e71c: c2 24 23 60 st %g1, [ %l0 + 0x360 ] 4000e720: c4 04 23 60 ld [ %l0 + 0x360 ], %g2 4000e724: 80 a0 a0 00 cmp %g2, 0 4000e728: 02 80 00 04 be 4000e738 4000e72c: 01 00 00 00 nop 4000e730: 81 c7 e0 08 ret <== NOT EXECUTED 4000e734: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 4000e738: 7f ff ea b7 call 40009214 <_Thread_Dispatch> 4000e73c: 81 e8 00 00 restore Objects_Information *the_information; the_information = _Objects_Get_information( _Thread_Executing->Object.id ); /* This should never happen if _Thread_Get() works right */ assert( the_information ); 4000e740: 15 10 00 64 sethi %hi(0x40019000), %o2 <== NOT EXECUTED 4000e744: 90 12 21 a0 or %o0, 0x1a0, %o0 <== NOT EXECUTED 4000e748: 94 12 a1 e8 or %o2, 0x1e8, %o2 <== NOT EXECUTED 4000e74c: 7f ff ce 01 call 40001f50 <__assert> <== NOT EXECUTED 4000e750: 92 10 20 25 mov 0x25, %o1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000e754: 10 bf ff e5 b 4000e6e8 <== NOT EXECUTED 4000e758: 21 10 00 6a sethi %hi(0x4001a800), %l0 <== NOT EXECUTED 40008300 : int pthread_getschedparam( pthread_t thread, int *policy, struct sched_param *param ) { 40008300: 9d e3 bf 90 save %sp, -112, %sp Objects_Locations location; POSIX_API_Control *api; register Thread_Control *the_thread; if ( !policy || !param ) 40008304: 80 a6 60 00 cmp %i1, 0 40008308: 02 80 00 33 be 400083d4 4000830c: 92 10 00 18 mov %i0, %o1 40008310: 80 a6 a0 00 cmp %i2, 0 40008314: 02 80 00 30 be 400083d4 40008318: 94 07 bf f4 add %fp, -12, %o2 RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 4000831c: 11 10 00 6c sethi %hi(0x4001b000), %o0 40008320: 40 00 0c b0 call 4000b5e0 <_Objects_Get> 40008324: 90 12 23 d8 or %o0, 0x3d8, %o0 ! 4001b3d8 <_POSIX_Threads_Information> return EINVAL; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 40008328: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000832c: 80 a0 60 00 cmp %g1, 0 40008330: 22 80 00 09 be,a 40008354 40008334: c6 02 21 70 ld [ %o0 + 0x170 ], %g3 40008338: 80 a0 60 02 cmp %g1, 2 4000833c: 08 80 00 04 bleu 4000834c 40008340: 90 10 20 03 mov 3, %o0 } _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40008344: 40 00 01 ee call 40008afc <== NOT EXECUTED 40008348: 01 00 00 00 nop <== NOT EXECUTED } 4000834c: 81 c7 e0 08 ret 40008350: 91 e8 00 08 restore %g0, %o0, %o0 case OBJECTS_REMOTE: return ESRCH; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( policy ) *policy = api->schedpolicy; 40008354: c2 00 e0 7c ld [ %g3 + 0x7c ], %g1 40008358: c2 26 40 00 st %g1, [ %i1 ] if ( param ) { *param = api->schedparam; 4000835c: c4 00 e0 80 ld [ %g3 + 0x80 ], %g2 40008360: c4 26 80 00 st %g2, [ %i2 ] 40008364: c2 00 e0 84 ld [ %g3 + 0x84 ], %g1 40008368: c2 26 a0 04 st %g1, [ %i2 + 4 ] 4000836c: c4 00 e0 88 ld [ %g3 + 0x88 ], %g2 40008370: c4 26 a0 08 st %g2, [ %i2 + 8 ] 40008374: c2 00 e0 8c ld [ %g3 + 0x8c ], %g1 40008378: c2 26 a0 0c st %g1, [ %i2 + 0xc ] 4000837c: c4 00 e0 90 ld [ %g3 + 0x90 ], %g2 40008380: c4 26 a0 10 st %g2, [ %i2 + 0x10 ] 40008384: c2 00 e0 94 ld [ %g3 + 0x94 ], %g1 40008388: c2 26 a0 14 st %g1, [ %i2 + 0x14 ] param->sched_priority = 4000838c: c4 02 20 14 ld [ %o0 + 0x14 ], %g2 40008390: 82 10 20 ff mov 0xff, %g1 40008394: 82 20 40 02 sub %g1, %g2, %g1 40008398: 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 ) 4000839c: 07 10 00 6c sethi %hi(0x4001b000), %g3 400083a0: c2 00 e0 f0 ld [ %g3 + 0xf0 ], %g1 ! 4001b0f0 <_Thread_Dispatch_disable_level> 400083a4: 90 10 20 00 clr %o0 400083a8: 82 00 7f ff add %g1, -1, %g1 400083ac: c2 20 e0 f0 st %g1, [ %g3 + 0xf0 ] 400083b0: c4 00 e0 f0 ld [ %g3 + 0xf0 ], %g2 400083b4: 80 a0 a0 00 cmp %g2, 0 400083b8: 12 bf ff e5 bne 4000834c 400083bc: 01 00 00 00 nop _Thread_Dispatch(); 400083c0: 40 00 11 74 call 4000c990 <_Thread_Dispatch> 400083c4: 01 00 00 00 nop 400083c8: 90 10 20 00 clr %o0 ! 0 return 0; } return POSIX_BOTTOM_REACHED(); } 400083cc: 81 c7 e0 08 ret 400083d0: 91 e8 00 08 restore %g0, %o0, %o0 { Objects_Locations location; POSIX_API_Control *api; register Thread_Control *the_thread; if ( !policy || !param ) 400083d4: 10 bf ff de b 4000834c 400083d8: 90 10 20 16 mov 0x16, %o0 40005c60 : */ void *pthread_getspecific( pthread_key_t key ) { 40005c60: 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 *) 40005c64: 11 10 00 60 sethi %hi(0x40018000), %o0 40005c68: 92 10 00 18 mov %i0, %o1 40005c6c: 90 12 22 00 or %o0, 0x200, %o0 40005c70: 40 00 0d 4c call 400091a0 <_Objects_Get> 40005c74: 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 ) { 40005c78: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005c7c: 80 a0 60 00 cmp %g1, 0 40005c80: 12 80 00 18 bne 40005ce0 40005c84: 80 a0 60 02 cmp %g1, 2 case OBJECTS_ERROR: case OBJECTS_REMOTE: /* should never happen */ return NULL; case OBJECTS_LOCAL: api = _Objects_Get_API( _Thread_Executing->Object.id ); 40005c88: 03 10 00 5f sethi %hi(0x40017c00), %g1 40005c8c: c4 00 61 dc ld [ %g1 + 0x1dc ], %g2 ! 40017ddc <_Thread_Executing> 40005c90: c6 00 a0 08 ld [ %g2 + 8 ], %g3 index = _Objects_Get_index( _Thread_Executing->Object.id ); key_data = (void *) the_key->Values[ api ][ index ]; 40005c94: 05 00 00 3f sethi %hi(0xfc00), %g2 40005c98: 83 30 e0 16 srl %g3, 0x16, %g1 40005c9c: 82 08 60 1c and %g1, 0x1c, %g1 40005ca0: 82 00 40 08 add %g1, %o0, %g1 40005ca4: c8 00 60 18 ld [ %g1 + 0x18 ], %g4 40005ca8: 84 10 a3 ff or %g2, 0x3ff, %g2 40005cac: 86 08 c0 02 and %g3, %g2, %g3 40005cb0: 87 28 e0 02 sll %g3, 2, %g3 40005cb4: f0 01 00 03 ld [ %g4 + %g3 ], %i0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40005cb8: 05 10 00 5f sethi %hi(0x40017c00), %g2 40005cbc: c2 00 a1 00 ld [ %g2 + 0x100 ], %g1 ! 40017d00 <_Thread_Dispatch_disable_level> 40005cc0: 82 00 7f ff add %g1, -1, %g1 40005cc4: c2 20 a1 00 st %g1, [ %g2 + 0x100 ] 40005cc8: c6 00 a1 00 ld [ %g2 + 0x100 ], %g3 40005ccc: 80 a0 e0 00 cmp %g3, 0 40005cd0: 02 80 00 0a be 40005cf8 40005cd4: 01 00 00 00 nop _Thread_Enable_dispatch(); return key_data; } (void) POSIX_BOTTOM_REACHED(); return (void *)NULL; } 40005cd8: 81 c7 e0 08 ret 40005cdc: 81 e8 00 00 restore uint32_t index; Objects_Locations location; void *key_data; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 40005ce0: 08 bf ff fe bleu 40005cd8 40005ce4: b0 10 20 00 clr %i0 index = _Objects_Get_index( _Thread_Executing->Object.id ); key_data = (void *) the_key->Values[ api ][ index ]; _Thread_Enable_dispatch(); return key_data; } (void) POSIX_BOTTOM_REACHED(); 40005ce8: 40 00 02 75 call 400066bc <== NOT EXECUTED 40005cec: 01 00 00 00 nop <== NOT EXECUTED return (void *)NULL; } 40005cf0: 81 c7 e0 08 ret <== NOT EXECUTED 40005cf4: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 40005cf8: 40 00 12 16 call 4000a550 <_Thread_Dispatch> 40005cfc: 01 00 00 00 nop 40005d00: 81 c7 e0 08 ret 40005d04: 81 e8 00 00 restore 400077d0 : int pthread_join( pthread_t thread, void **value_ptr ) { 400077d0: 9d e3 bf 90 save %sp, -112, %sp 400077d4: 11 10 00 69 sethi %hi(0x4001a400), %o0 400077d8: 92 10 00 18 mov %i0, %o1 400077dc: 90 12 20 d8 or %o0, 0xd8, %o0 400077e0: 40 00 0c 65 call 4000a974 <_Objects_Get> 400077e4: 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 ) { 400077e8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400077ec: 80 a0 60 00 cmp %g1, 0 400077f0: 12 80 00 15 bne 40007844 400077f4: 80 a0 60 02 cmp %g1, 2 case OBJECTS_ERROR: case OBJECTS_REMOTE: return ESRCH; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 400077f8: c6 02 21 70 ld [ %o0 + 0x170 ], %g3 if ( api->detachstate == PTHREAD_CREATE_DETACHED ) { 400077fc: c2 00 e0 38 ld [ %g3 + 0x38 ], %g1 40007800: 80 a0 60 00 cmp %g1, 0 40007804: 12 80 00 16 bne 4000785c 40007808: 03 10 00 68 sethi %hi(0x4001a000), %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000780c: 03 10 00 68 sethi %hi(0x4001a000), %g1 40007810: c4 00 61 f0 ld [ %g1 + 0x1f0 ], %g2 ! 4001a1f0 <_Thread_Dispatch_disable_level> 40007814: 90 10 20 16 mov 0x16, %o0 40007818: 84 00 bf ff add %g2, -1, %g2 4000781c: c4 20 61 f0 st %g2, [ %g1 + 0x1f0 ] 40007820: c6 00 61 f0 ld [ %g1 + 0x1f0 ], %g3 40007824: 80 a0 e0 00 cmp %g3, 0 40007828: 12 80 00 05 bne 4000783c 4000782c: 01 00 00 00 nop _Thread_Dispatch(); 40007830: 40 00 11 3d call 4000bd24 <_Thread_Dispatch> 40007834: 01 00 00 00 nop 40007838: 90 10 20 16 mov 0x16, %o0 ! 16 *value_ptr = return_pointer; return 0; } return POSIX_BOTTOM_REACHED(); } 4000783c: 81 c7 e0 08 ret 40007840: 91 e8 00 08 restore %g0, %o0, %o0 POSIX_API_Control *api; Objects_Locations location; void *return_pointer; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 40007844: 08 bf ff fe bleu 4000783c 40007848: 90 10 20 03 mov 3, %o0 if ( value_ptr ) *value_ptr = return_pointer; return 0; } return POSIX_BOTTOM_REACHED(); 4000784c: 40 00 01 91 call 40007e90 <== NOT EXECUTED 40007850: 01 00 00 00 nop <== NOT EXECUTED } 40007854: 81 c7 e0 08 ret <== NOT EXECUTED 40007858: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE boolean _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 4000785c: c4 00 62 cc ld [ %g1 + 0x2cc ], %g2 if ( api->detachstate == PTHREAD_CREATE_DETACHED ) { _Thread_Enable_dispatch(); return EINVAL; } if ( _Thread_Is_executing( the_thread ) ) { 40007860: 80 a2 00 02 cmp %o0, %g2 40007864: 12 80 00 0f bne 400078a0 40007868: 82 07 bf f0 add %fp, -16, %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000786c: 03 10 00 68 sethi %hi(0x4001a000), %g1 40007870: c4 00 61 f0 ld [ %g1 + 0x1f0 ], %g2 ! 4001a1f0 <_Thread_Dispatch_disable_level> 40007874: 90 10 20 2d mov 0x2d, %o0 40007878: 84 00 bf ff add %g2, -1, %g2 4000787c: c4 20 61 f0 st %g2, [ %g1 + 0x1f0 ] 40007880: c6 00 61 f0 ld [ %g1 + 0x1f0 ], %g3 40007884: 80 a0 e0 00 cmp %g3, 0 40007888: 12 bf ff ed bne 4000783c 4000788c: 01 00 00 00 nop _Thread_Dispatch(); 40007890: 40 00 11 25 call 4000bd24 <_Thread_Dispatch> 40007894: 01 00 00 00 nop 40007898: 10 bf ff e9 b 4000783c 4000789c: 90 10 20 2d mov 0x2d, %o0 ! 2d /* * Put ourself on the threads join list */ _Thread_Executing->Wait.return_argument = &return_pointer; 400078a0: c2 20 a0 28 st %g1, [ %g2 + 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; 400078a4: 84 10 20 01 mov 1, %g2 _Thread_queue_Enter_critical_section( &api->Join_List ); _Thread_queue_Enqueue( &api->Join_List, WATCHDOG_NO_TIMEOUT ); 400078a8: 90 00 e0 3c add %g3, 0x3c, %o0 400078ac: c4 20 e0 6c st %g2, [ %g3 + 0x6c ] 400078b0: 92 10 20 00 clr %o1 400078b4: 15 10 00 32 sethi %hi(0x4000c800), %o2 400078b8: 40 00 12 8b call 4000c2e4 <_Thread_queue_Enqueue_with_handler> 400078bc: 94 12 a0 24 or %o2, 0x24, %o2 ! 4000c824 <_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 ) 400078c0: 05 10 00 68 sethi %hi(0x4001a000), %g2 400078c4: c2 00 a1 f0 ld [ %g2 + 0x1f0 ], %g1 ! 4001a1f0 <_Thread_Dispatch_disable_level> 400078c8: 82 00 7f ff add %g1, -1, %g1 400078cc: c2 20 a1 f0 st %g1, [ %g2 + 0x1f0 ] 400078d0: c6 00 a1 f0 ld [ %g2 + 0x1f0 ], %g3 400078d4: 80 a0 e0 00 cmp %g3, 0 400078d8: 12 80 00 05 bne 400078ec 400078dc: 80 a6 60 00 cmp %i1, 0 _Thread_Dispatch(); 400078e0: 40 00 11 11 call 4000bd24 <_Thread_Dispatch> 400078e4: 01 00 00 00 nop _Thread_Enable_dispatch(); if ( value_ptr ) 400078e8: 80 a6 60 00 cmp %i1, 0 400078ec: 02 bf ff d4 be 4000783c 400078f0: 90 10 20 00 clr %o0 *value_ptr = return_pointer; 400078f4: c2 07 bf f0 ld [ %fp + -16 ], %g1 400078f8: 10 bf ff d1 b 4000783c 400078fc: c2 26 40 00 st %g1, [ %i1 ] 400059d0 : int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 400059d0: 9d e3 bf 98 save %sp, -104, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400059d4: 25 10 00 5f sethi %hi(0x40017c00), %l2 400059d8: c2 04 a1 00 ld [ %l2 + 0x100 ], %g1 ! 40017d00 <_Thread_Dispatch_disable_level> 400059dc: 82 00 60 01 inc %g1 400059e0: c2 24 a1 00 st %g1, [ %l2 + 0x100 ] * _POSIX_Keys_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ) { return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information ); 400059e4: 29 10 00 60 sethi %hi(0x40018000), %l4 400059e8: 40 00 0c 9d call 40008c5c <_Objects_Allocate> 400059ec: 90 15 22 00 or %l4, 0x200, %o0 ! 40018200 <_POSIX_Keys_Information> _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 400059f0: a0 92 20 00 orcc %o0, 0, %l0 400059f4: 32 80 00 0e bne,a 40005a2c 400059f8: f2 24 20 14 st %i1, [ %l0 + 0x14 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400059fc: c2 04 a1 00 ld [ %l2 + 0x100 ], %g1 40005a00: b0 10 20 0b mov 0xb, %i0 _Thread_Dispatch(); 40005a04: 82 00 7f ff add %g1, -1, %g1 40005a08: c2 24 a1 00 st %g1, [ %l2 + 0x100 ] 40005a0c: c4 04 a1 00 ld [ %l2 + 0x100 ], %g2 40005a10: 80 a0 a0 00 cmp %g2, 0 40005a14: 12 80 00 3d bne 40005b08 40005a18: 01 00 00 00 nop 40005a1c: 40 00 12 cd call 4000a550 <_Thread_Dispatch> 40005a20: 01 00 00 00 nop 40005a24: 81 c7 e0 08 ret 40005a28: 81 e8 00 00 restore 40005a2c: 03 10 00 5f sethi %hi(0x40017c00), %g1 RTEMS_INLINE_ROUTINE void *_Workspace_Allocate( size_t size ) { return _Heap_Allocate( &_Workspace_Area, size ); 40005a30: 2f 10 00 5f sethi %hi(0x40017c00), %l7 40005a34: ac 10 60 60 or %g1, 0x60, %l6 _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 40005a38: b2 10 00 10 mov %l0, %i1 40005a3c: a6 10 20 01 mov 1, %l3 40005a40: aa 15 e1 4c or %l7, 0x14c, %l5 for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] && 40005a44: 83 2c e0 02 sll %l3, 2, %g1 40005a48: c2 00 40 16 ld [ %g1 + %l6 ], %g1 40005a4c: 80 a0 60 00 cmp %g1, 0 40005a50: 02 80 00 30 be 40005b10 40005a54: 90 10 00 15 mov %l5, %o0 40005a58: c2 00 60 04 ld [ %g1 + 4 ], %g1 40005a5c: 80 a0 60 00 cmp %g1, 0 40005a60: 22 80 00 0d be,a 40005a94 40005a64: c0 26 60 1c clr [ %i1 + 0x1c ] <== NOT EXECUTED _Objects_Information_table[ the_api ][ 1 ] ) { bytes_to_allocate = sizeof( void * ) * 40005a68: c2 10 60 10 lduh [ %g1 + 0x10 ], %g1 40005a6c: 82 00 60 01 inc %g1 40005a70: a3 28 60 02 sll %g1, 2, %l1 40005a74: 40 00 0b 1b call 400086e0 <_Heap_Allocate> 40005a78: 92 10 00 11 mov %l1, %o1 (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { 40005a7c: 82 92 20 00 orcc %o0, 0, %g1 40005a80: 02 80 00 26 be 40005b18 40005a84: 94 10 00 11 mov %l1, %o2 _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; 40005a88: c2 26 60 1c st %g1, [ %i1 + 0x1c ] memset( table, '\0', bytes_to_allocate ); 40005a8c: 40 00 2b 92 call 400108d4 40005a90: 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++ ) { 40005a94: 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; 40005a98: 80 a4 e0 05 cmp %l3, 5 40005a9c: 12 bf ff ea bne 40005a44 40005aa0: b2 06 60 04 add %i1, 4, %i1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40005aa4: 90 15 22 00 or %l4, 0x200, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 40005aa8: c8 04 20 08 ld [ %l0 + 8 ], %g4 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40005aac: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 } } the_key->is_active = TRUE; 40005ab0: 84 10 20 01 mov 1, %g2 40005ab4: 03 00 00 3f sethi %hi(0xfc00), %g1 40005ab8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40005abc: 82 09 00 01 and %g4, %g1, %g1 40005ac0: 80 a0 40 03 cmp %g1, %g3 40005ac4: 18 80 00 05 bgu 40005ad8 40005ac8: c4 24 20 10 st %g2, [ %l0 + 0x10 ] information->local_table[ index ] = the_object; 40005acc: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40005ad0: 83 28 60 02 sll %g1, 2, %g1 40005ad4: e0 20 80 01 st %l0, [ %g2 + %g1 ] _Objects_Open( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 40005ad8: c8 26 00 00 st %g4, [ %i0 ] 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; 40005adc: c0 24 20 0c clr [ %l0 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40005ae0: c2 04 a1 00 ld [ %l2 + 0x100 ], %g1 40005ae4: b0 10 20 00 clr %i0 40005ae8: 82 00 7f ff add %g1, -1, %g1 40005aec: c2 24 a1 00 st %g1, [ %l2 + 0x100 ] 40005af0: c4 04 a1 00 ld [ %l2 + 0x100 ], %g2 40005af4: 80 a0 a0 00 cmp %g2, 0 40005af8: 12 80 00 04 bne 40005b08 40005afc: 01 00 00 00 nop _Thread_Dispatch(); 40005b00: 40 00 12 94 call 4000a550 <_Thread_Dispatch> 40005b04: 01 00 00 00 nop _Thread_Enable_dispatch(); return 0; } 40005b08: 81 c7 e0 08 ret 40005b0c: 81 e8 00 00 restore } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); } else { the_key->Values[ the_api ] = NULL; 40005b10: 10 bf ff e1 b 40005a94 40005b14: c0 26 60 1c clr [ %i1 + 0x1c ] bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; the_api >= 1; 40005b18: a6 84 ff ff addcc %l3, -1, %l3 <== NOT EXECUTED 40005b1c: 02 80 00 0d be 40005b50 <== NOT EXECUTED 40005b20: 90 15 22 00 or %l4, 0x200, %o0 <== NOT EXECUTED 40005b24: 83 2c e0 02 sll %l3, 2, %g1 <== NOT EXECUTED 40005b28: b2 15 e1 4c or %l7, 0x14c, %i1 <== NOT EXECUTED 40005b2c: 82 00 60 18 add %g1, 0x18, %g1 <== NOT EXECUTED 40005b30: a2 04 00 01 add %l0, %g1, %l1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 40005b34: d2 04 40 00 ld [ %l1 ], %o1 <== NOT EXECUTED 40005b38: 40 00 0b 1c call 400087a8 <_Heap_Free> <== NOT EXECUTED 40005b3c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40005b40: a6 84 ff ff addcc %l3, -1, %l3 <== NOT EXECUTED 40005b44: 12 bf ff fc bne 40005b34 <== NOT EXECUTED 40005b48: a2 04 7f fc add %l1, -4, %l1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 40005b4c: 90 15 22 00 or %l4, 0x200, %o0 <== NOT EXECUTED 40005b50: 40 00 0d 51 call 40009094 <_Objects_Free> <== NOT EXECUTED 40005b54: 92 10 00 10 mov %l0, %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 ) 40005b58: c2 04 a1 00 ld [ %l2 + 0x100 ], %g1 <== NOT EXECUTED 40005b5c: 10 bf ff aa b 40005a04 <== NOT EXECUTED 40005b60: b0 10 20 0c mov 0xc, %i0 <== NOT EXECUTED 40005b64 : */ int pthread_key_delete( pthread_key_t key ) { 40005b64: 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 *) 40005b68: 23 10 00 60 sethi %hi(0x40018000), %l1 40005b6c: 92 10 00 18 mov %i0, %o1 40005b70: 94 07 bf f4 add %fp, -12, %o2 40005b74: 40 00 0d 8b call 400091a0 <_Objects_Get> 40005b78: 90 14 62 00 or %l1, 0x200, %o0 register POSIX_Keys_Control *the_key; Objects_Locations location; uint32_t the_api; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 40005b7c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005b80: 80 a0 60 00 cmp %g1, 0 40005b84: 12 80 00 28 bne 40005c24 40005b88: a0 10 00 08 mov %o0, %l0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40005b8c: c6 02 20 08 ld [ %o0 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40005b90: 88 14 62 00 or %l1, 0x200, %g4 40005b94: c4 11 20 10 lduh [ %g4 + 0x10 ], %g2 40005b98: 03 00 00 3f sethi %hi(0xfc00), %g1 40005b9c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40005ba0: 82 08 c0 01 and %g3, %g1, %g1 40005ba4: 80 a0 40 02 cmp %g1, %g2 40005ba8: 28 80 00 26 bleu,a 40005c40 40005bac: c4 01 20 20 ld [ %g4 + 0x20 ], %g2 40005bb0: 03 10 00 5f sethi %hi(0x40017c00), %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; 40005bb4: 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; 40005bb8: c0 24 20 10 clr [ %l0 + 0x10 ] 40005bbc: a4 10 61 4c or %g1, 0x14c, %l2 40005bc0: b0 10 20 00 clr %i0 for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) if ( the_key->Values[ the_api ] ) 40005bc4: 82 04 00 18 add %l0, %i0, %g1 40005bc8: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 40005bcc: 80 a2 60 00 cmp %o1, 0 40005bd0: 02 80 00 04 be 40005be0 40005bd4: b0 06 20 04 add %i0, 4, %i0 40005bd8: 40 00 0a f4 call 400087a8 <_Heap_Free> 40005bdc: 90 10 00 12 mov %l2, %o0 _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); the_key->is_active = FALSE; for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; 40005be0: 80 a6 20 10 cmp %i0, 0x10 40005be4: 12 bf ff f9 bne 40005bc8 40005be8: 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 ); 40005bec: 90 14 62 00 or %l1, 0x200, %o0 40005bf0: 40 00 0d 29 call 40009094 <_Objects_Free> 40005bf4: 92 10 00 10 mov %l0, %o1 40005bf8: 03 10 00 5f sethi %hi(0x40017c00), %g1 40005bfc: c4 00 61 00 ld [ %g1 + 0x100 ], %g2 ! 40017d00 <_Thread_Dispatch_disable_level> 40005c00: 90 10 20 00 clr %o0 40005c04: 84 00 bf ff add %g2, -1, %g2 40005c08: c4 20 61 00 st %g2, [ %g1 + 0x100 ] 40005c0c: c6 00 61 00 ld [ %g1 + 0x100 ], %g3 40005c10: 80 a0 e0 00 cmp %g3, 0 40005c14: 02 80 00 0e be 40005c4c 40005c18: 01 00 00 00 nop _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40005c1c: 81 c7 e0 08 ret 40005c20: 91 e8 00 08 restore %g0, %o0, %o0 register POSIX_Keys_Control *the_key; Objects_Locations location; uint32_t the_api; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 40005c24: 80 a0 60 02 cmp %g1, 2 40005c28: 08 bf ff fd bleu 40005c1c 40005c2c: 90 10 20 16 mov 0x16, %o0 _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40005c30: 40 00 02 a3 call 400066bc <== NOT EXECUTED 40005c34: 01 00 00 00 nop <== NOT EXECUTED } 40005c38: 81 c7 e0 08 ret <== NOT EXECUTED 40005c3c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) information->local_table[ index ] = the_object; 40005c40: 83 28 60 02 sll %g1, 2, %g1 40005c44: 10 bf ff db b 40005bb0 40005c48: c0 20 80 01 clr [ %g2 + %g1 ] _Thread_Dispatch(); 40005c4c: 40 00 12 41 call 4000a550 <_Thread_Dispatch> 40005c50: 01 00 00 00 nop 40005c54: 90 10 20 00 clr %o0 ! 0 40005c58: 81 c7 e0 08 ret 40005c5c: 91 e8 00 08 restore %g0, %o0, %o0 400263a8 : int pthread_kill( pthread_t thread, int sig ) { 400263a8: 9d e3 bf 90 save %sp, -112, %sp POSIX_API_Control *api; Thread_Control *the_thread; Objects_Locations location; if ( !sig ) 400263ac: 80 a6 60 00 cmp %i1, 0 400263b0: 02 80 00 46 be 400264c8 400263b4: 92 10 00 18 mov %i0, %o1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 400263b8: a0 06 7f ff add %i1, -1, %l0 400263bc: 80 a4 20 1f cmp %l0, 0x1f 400263c0: 18 80 00 42 bgu 400264c8 400263c4: 94 07 bf f4 add %fp, -12, %o2 RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 400263c8: 11 10 00 b2 sethi %hi(0x4002c800), %o0 400263cc: 7f ff a2 ff call 4000efc8 <_Objects_Get> 400263d0: 90 12 23 d4 or %o0, 0x3d4, %o0 ! 4002cbd4 <_POSIX_Threads_Information> 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 ) { 400263d4: c2 07 bf f4 ld [ %fp + -12 ], %g1 400263d8: 80 a0 60 00 cmp %g1, 0 400263dc: 02 80 00 0c be 4002640c 400263e0: b0 10 00 08 mov %o0, %i0 400263e4: 80 a0 60 02 cmp %g1, 2 400263e8: 18 80 00 34 bgu 400264b8 400263ec: 01 00 00 00 nop case OBJECTS_ERROR: case OBJECTS_REMOTE: rtems_set_errno_and_return_minus_one( ESRCH ); 400263f0: 7f ff cf b6 call 4001a2c8 <__errno> 400263f4: 01 00 00 00 nop 400263f8: 82 10 20 03 mov 3, %g1 ! 3 400263fc: c2 22 00 00 st %g1, [ %o0 ] 40026400: 90 10 3f ff mov -1, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40026404: 81 c7 e0 08 ret 40026408: 91 e8 00 08 restore %g0, %o0, %o0 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( sig ) { if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 4002640c: 87 2e 60 02 sll %i1, 2, %g3 40026410: 85 2e 60 04 sll %i1, 4, %g2 40026414: 03 10 00 b3 sethi %hi(0x4002cc00), %g1 40026418: 84 20 80 03 sub %g2, %g3, %g2 4002641c: 82 10 63 b8 or %g1, 0x3b8, %g1 40026420: 84 00 80 01 add %g2, %g1, %g2 40026424: c6 00 a0 08 ld [ %g2 + 8 ], %g3 40026428: 80 a0 e0 01 cmp %g3, 1 4002642c: 02 80 00 15 be 40026480 40026430: c8 02 21 70 ld [ %o0 + 0x170 ], %g4 return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 40026434: c4 01 20 c8 ld [ %g4 + 0xc8 ], %g2 (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 40026438: 92 10 00 19 mov %i1, %o1 return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 4002643c: b2 10 20 01 mov 1, %i1 40026440: 83 2e 40 10 sll %i1, %l0, %g1 40026444: 84 10 80 01 or %g2, %g1, %g2 (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 40026448: 94 10 20 00 clr %o2 4002644c: 7f ff ff 8c call 4002627c <_POSIX_signals_Unblock_thread> 40026450: c4 21 20 c8 st %g2, [ %g4 + 0xc8 ] the_thread->do_post_task_switch_extension = TRUE; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 40026454: 03 10 00 b2 sethi %hi(0x4002c800), %g1 40026458: c4 00 61 64 ld [ %g1 + 0x164 ], %g2 ! 4002c964 <_ISR_Nest_level> 4002645c: 80 a0 a0 00 cmp %g2, 0 40026460: 02 80 00 08 be 40026480 40026464: f2 26 20 78 st %i1, [ %i0 + 0x78 ] 40026468: 03 10 00 b2 sethi %hi(0x4002c800), %g1 4002646c: c4 00 61 7c ld [ %g1 + 0x17c ], %g2 ! 4002c97c <_Thread_Executing> 40026470: 80 a6 00 02 cmp %i0, %g2 40026474: 12 80 00 03 bne 40026480 40026478: 03 10 00 b2 sethi %hi(0x4002c800), %g1 _ISR_Signals_to_thread_executing = TRUE; 4002647c: f2 20 62 28 st %i1, [ %g1 + 0x228 ] ! 4002ca28 <_ISR_Signals_to_thread_executing> <== 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 ) 40026480: 03 10 00 b2 sethi %hi(0x4002c800), %g1 40026484: c4 00 60 a0 ld [ %g1 + 0xa0 ], %g2 ! 4002c8a0 <_Thread_Dispatch_disable_level> } _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40026488: 90 10 20 00 clr %o0 4002648c: 84 00 bf ff add %g2, -1, %g2 40026490: c4 20 60 a0 st %g2, [ %g1 + 0xa0 ] 40026494: c6 00 60 a0 ld [ %g1 + 0xa0 ], %g3 40026498: 80 a0 e0 00 cmp %g3, 0 4002649c: 12 bf ff da bne 40026404 400264a0: 01 00 00 00 nop _Thread_Dispatch(); 400264a4: 7f ff a7 f1 call 40010468 <_Thread_Dispatch> 400264a8: 01 00 00 00 nop 400264ac: 90 10 20 00 clr %o0 ! 0 } 400264b0: 81 c7 e0 08 ret 400264b4: 91 e8 00 08 restore %g0, %o0, %o0 } _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 400264b8: 40 00 00 18 call 40026518 <== NOT EXECUTED 400264bc: 01 00 00 00 nop <== NOT EXECUTED } 400264c0: 81 c7 e0 08 ret <== NOT EXECUTED 400264c4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 400264c8: 7f ff cf 80 call 4001a2c8 <__errno> 400264cc: 01 00 00 00 nop 400264d0: 82 10 20 16 mov 0x16, %g1 ! 16 400264d4: c2 22 00 00 st %g1, [ %o0 ] 400264d8: 10 bf ff cb b 40026404 400264dc: 90 10 3f ff mov -1, %o0 4000761c : */ int pthread_mutex_destroy( pthread_mutex_t *mutex ) { 4000761c: 9d e3 bf 90 save %sp, -112, %sp Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40007620: 80 a6 20 00 cmp %i0, 0 40007624: 32 80 00 05 bne,a 40007638 40007628: d2 06 00 00 ld [ %i0 ], %o1 } #endif _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 4000762c: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED } 40007630: 81 c7 e0 08 ret 40007634: 91 e8 00 08 restore %g0, %o0, %o0 40007638: 80 a2 7f ff cmp %o1, -1 4000763c: 02 80 00 40 be 4000773c 40007640: 90 10 00 18 mov %i0, %o0 return (POSIX_Mutex_Control *) 40007644: 21 10 00 6d sethi %hi(0x4001b400), %l0 40007648: 94 07 bf f4 add %fp, -12, %o2 4000764c: 40 00 0f e5 call 4000b5e0 <_Objects_Get> 40007650: 90 14 21 54 or %l0, 0x154, %o0 { register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { 40007654: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007658: 80 a0 60 00 cmp %g1, 0 4000765c: 12 80 00 13 bne 400076a8 40007660: b0 10 00 08 mov %o0, %i0 /* * 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 ) ) { 40007664: c2 02 20 64 ld [ %o0 + 0x64 ], %g1 40007668: 80 a0 60 00 cmp %g1, 0 4000766c: 32 80 00 15 bne,a 400076c0 40007670: a0 14 21 54 or %l0, 0x154, %l0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007674: 03 10 00 6c sethi %hi(0x4001b000), %g1 40007678: c4 00 60 f0 ld [ %g1 + 0xf0 ], %g2 ! 4001b0f0 <_Thread_Dispatch_disable_level> 4000767c: 90 10 20 10 mov 0x10, %o0 40007680: 84 00 bf ff add %g2, -1, %g2 40007684: c4 20 60 f0 st %g2, [ %g1 + 0xf0 ] 40007688: c6 00 60 f0 ld [ %g1 + 0xf0 ], %g3 4000768c: 80 a0 e0 00 cmp %g3, 0 40007690: 12 bf ff e8 bne 40007630 40007694: 01 00 00 00 nop _Thread_Dispatch(); 40007698: 40 00 14 be call 4000c990 <_Thread_Dispatch> 4000769c: 01 00 00 00 nop 400076a0: 10 bf ff e4 b 40007630 400076a4: 90 10 20 10 mov 0x10, %o0 ! 10 { register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { 400076a8: 80 a0 60 02 cmp %g1, 2 400076ac: 28 bf ff e1 bleu,a 40007630 400076b0: 90 10 20 16 mov 0x16, %o0 } #endif _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 400076b4: 40 00 05 12 call 40008afc <== NOT EXECUTED 400076b8: 01 00 00 00 nop <== NOT EXECUTED 400076bc: 30 bf ff dd b,a 40007630 <== NOT EXECUTED ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 400076c0: c2 02 20 08 ld [ %o0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400076c4: c6 14 20 10 lduh [ %l0 + 0x10 ], %g3 400076c8: 05 00 00 3f sethi %hi(0xfc00), %g2 400076cc: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 400076d0: 82 08 40 02 and %g1, %g2, %g1 400076d4: 80 a0 40 03 cmp %g1, %g3 400076d8: 18 80 00 05 bgu 400076ec 400076dc: 94 10 20 16 mov 0x16, %o2 information->local_table[ index ] = the_object; 400076e0: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 400076e4: 83 28 60 02 sll %g1, 2, %g1 400076e8: c0 20 80 01 clr [ %g2 + %g1 ] return EBUSY; } _Objects_Close( &_POSIX_Mutex_Information, &the_mutex->Object ); _CORE_mutex_Flush( 400076ec: 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; 400076f0: c0 26 20 0c clr [ %i0 + 0xc ] 400076f4: 40 00 0b af call 4000a5b0 <_CORE_mutex_Flush> 400076f8: 92 10 20 00 clr %o1 RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free ( POSIX_Mutex_Control *the_mutex ) { _Objects_Free( &_POSIX_Mutex_Information, &the_mutex->Object ); 400076fc: 90 10 00 10 mov %l0, %o0 40007700: 40 00 0f 75 call 4000b4d4 <_Objects_Free> 40007704: 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 ) 40007708: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000770c: c4 00 60 f0 ld [ %g1 + 0xf0 ], %g2 ! 4001b0f0 <_Thread_Dispatch_disable_level> 40007710: 90 10 20 00 clr %o0 40007714: 84 00 bf ff add %g2, -1, %g2 40007718: c4 20 60 f0 st %g2, [ %g1 + 0xf0 ] 4000771c: c6 00 60 f0 ld [ %g1 + 0xf0 ], %g3 40007720: 80 a0 e0 00 cmp %g3, 0 40007724: 12 bf ff c3 bne 40007630 40007728: 01 00 00 00 nop _Thread_Dispatch(); 4000772c: 40 00 14 99 call 4000c990 <_Thread_Dispatch> 40007730: 01 00 00 00 nop 40007734: 10 bf ff bf b 40007630 40007738: 90 10 20 00 clr %o0 ! 0 Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 4000773c: 40 00 00 38 call 4000781c <== NOT EXECUTED 40007740: 92 10 20 00 clr %o1 <== NOT EXECUTED 40007744: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40007748: 12 bf ff ba bne 40007630 <== NOT EXECUTED 4000774c: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 40007750: 10 bf ff bd b 40007644 <== NOT EXECUTED 40007754: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED 40007758 : int pthread_mutex_getprioceiling( pthread_mutex_t *mutex, int *prioceiling ) { 40007758: 9d e3 bf 90 save %sp, -112, %sp register POSIX_Mutex_Control *the_mutex; Objects_Locations location; if ( !prioceiling ) 4000775c: 80 a6 60 00 cmp %i1, 0 40007760: 02 80 00 04 be 40007770 40007764: 80 a6 20 00 cmp %i0, 0 40007768: 32 80 00 05 bne,a 4000777c 4000776c: d2 06 00 00 ld [ %i0 ], %o1 the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40007770: 90 10 20 16 mov 0x16, %o0 } 40007774: 81 c7 e0 08 ret 40007778: 91 e8 00 08 restore %g0, %o0, %o0 4000777c: 80 a2 7f ff cmp %o1, -1 40007780: 22 80 00 20 be,a 40007800 40007784: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED return (POSIX_Mutex_Control *) 40007788: 11 10 00 6d sethi %hi(0x4001b400), %o0 4000778c: 94 07 bf f4 add %fp, -12, %o2 40007790: 40 00 0f 94 call 4000b5e0 <_Objects_Get> 40007794: 90 12 21 54 or %o0, 0x154, %o0 if ( !prioceiling ) return EINVAL; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { 40007798: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000779c: 80 a0 60 00 cmp %g1, 0 400077a0: 12 80 00 13 bne 400077ec 400077a4: 80 a0 60 02 cmp %g1, 2 return POSIX_MP_NOT_IMPLEMENTED(); /* XXX feels questionable */ #endif case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: *prioceiling = _POSIX_Priority_From_core( 400077a8: c4 02 20 60 ld [ %o0 + 0x60 ], %g2 400077ac: 82 10 20 ff mov 0xff, %g1 400077b0: 82 20 40 02 sub %g1, %g2, %g1 400077b4: 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 ) 400077b8: 07 10 00 6c sethi %hi(0x4001b000), %g3 400077bc: c2 00 e0 f0 ld [ %g3 + 0xf0 ], %g1 ! 4001b0f0 <_Thread_Dispatch_disable_level> 400077c0: 90 10 20 00 clr %o0 400077c4: 82 00 7f ff add %g1, -1, %g1 400077c8: c2 20 e0 f0 st %g1, [ %g3 + 0xf0 ] 400077cc: c4 00 e0 f0 ld [ %g3 + 0xf0 ], %g2 400077d0: 80 a0 a0 00 cmp %g2, 0 400077d4: 12 bf ff e8 bne 40007774 400077d8: 01 00 00 00 nop _Thread_Dispatch(); 400077dc: 40 00 14 6d call 4000c990 <_Thread_Dispatch> 400077e0: 01 00 00 00 nop 400077e4: 10 bf ff e4 b 40007774 400077e8: 90 10 20 00 clr %o0 ! 0 if ( !prioceiling ) return EINVAL; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { 400077ec: 28 bf ff e2 bleu,a 40007774 400077f0: 90 10 20 16 mov 0x16, %o0 the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 400077f4: 40 00 04 c2 call 40008afc <== NOT EXECUTED 400077f8: 01 00 00 00 nop <== NOT EXECUTED 400077fc: 30 bf ff de b,a 40007774 <== NOT EXECUTED Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40007800: 40 00 00 07 call 4000781c <== NOT EXECUTED 40007804: 92 10 20 00 clr %o1 <== NOT EXECUTED 40007808: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000780c: 32 bf ff da bne,a 40007774 <== NOT EXECUTED 40007810: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 40007814: 10 bf ff dd b 40007788 <== NOT EXECUTED 40007818: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED 4000781c : int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 4000781c: 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; 40007820: 03 10 00 64 sethi %hi(0x40019000), %g1 40007824: 80 a6 60 00 cmp %i1, 0 40007828: 02 80 00 03 be 40007834 4000782c: a0 10 63 0c or %g1, 0x30c, %l0 40007830: a0 10 00 19 mov %i1, %l0 else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 40007834: 80 a6 20 00 cmp %i0, 0 40007838: 22 80 00 2c be,a 400078e8 4000783c: b0 10 20 16 mov 0x16, %i0 return EBUSY; } } #endif if ( !the_attr->is_initialized ) 40007840: c2 04 00 00 ld [ %l0 ], %g1 40007844: 80 a0 60 00 cmp %g1, 0 40007848: 22 80 00 28 be,a 400078e8 4000784c: b0 10 20 16 mov 0x16, %i0 /* * XXX: Be careful about attributes when global!!! */ assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE ); 40007850: c2 04 20 04 ld [ %l0 + 4 ], %g1 40007854: 80 a0 60 00 cmp %g1, 0 40007858: 12 80 00 2b bne 40007904 4000785c: 11 10 00 64 sethi %hi(0x40019000), %o0 /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 40007860: c2 04 20 0c ld [ %l0 + 0xc ], %g1 40007864: 80 a0 60 01 cmp %g1, 1 40007868: 02 80 00 07 be 40007884 4000786c: a4 10 20 02 mov 2, %l2 40007870: 80 a0 60 02 cmp %g1, 2 40007874: 02 80 00 22 be 400078fc 40007878: 80 a0 60 00 cmp %g1, 0 4000787c: 12 80 00 1d bne 400078f0 40007880: a4 10 20 00 clr %l2 break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 40007884: c2 04 20 08 ld [ %l0 + 8 ], %g1 40007888: 82 00 7f ff add %g1, -1, %g1 4000788c: 80 a0 60 fd cmp %g1, 0xfd 40007890: 38 80 00 16 bgu,a 400078e8 40007894: b0 10 20 16 mov 0x16, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007898: 23 10 00 6c sethi %hi(0x4001b000), %l1 4000789c: c2 04 60 f0 ld [ %l1 + 0xf0 ], %g1 ! 4001b0f0 <_Thread_Dispatch_disable_level> 400078a0: 82 00 60 01 inc %g1 400078a4: c2 24 60 f0 st %g1, [ %l1 + 0xf0 ] * _POSIX_Mutex_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ) { return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information ); 400078a8: 27 10 00 6d sethi %hi(0x4001b400), %l3 400078ac: 40 00 0d fc call 4000b09c <_Objects_Allocate> 400078b0: 90 14 e1 54 or %l3, 0x154, %o0 ! 4001b554 <_POSIX_Mutex_Information> _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 400078b4: b2 92 20 00 orcc %o0, 0, %i1 400078b8: 32 80 00 1e bne,a 40007930 400078bc: c2 04 20 04 ld [ %l0 + 4 ], %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400078c0: c2 04 60 f0 ld [ %l1 + 0xf0 ], %g1 400078c4: b0 10 20 0b mov 0xb, %i0 _Thread_Dispatch(); 400078c8: 82 00 7f ff add %g1, -1, %g1 400078cc: c2 24 60 f0 st %g1, [ %l1 + 0xf0 ] 400078d0: c4 04 60 f0 ld [ %l1 + 0xf0 ], %g2 400078d4: 80 a0 a0 00 cmp %g2, 0 400078d8: 12 80 00 07 bne 400078f4 400078dc: 01 00 00 00 nop 400078e0: 40 00 14 2c call 4000c990 <_Thread_Dispatch> 400078e4: 01 00 00 00 nop 400078e8: 81 c7 e0 08 ret 400078ec: 81 e8 00 00 restore 400078f0: b0 10 20 16 mov 0x16, %i0 ); #endif _Thread_Enable_dispatch(); return 0; } 400078f4: 81 c7 e0 08 ret 400078f8: 81 e8 00 00 restore /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 400078fc: 10 bf ff e2 b 40007884 40007900: a4 10 20 03 mov 3, %l2 /* * XXX: Be careful about attributes when global!!! */ assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE ); 40007904: 15 10 00 64 sethi %hi(0x40019000), %o2 <== NOT EXECUTED 40007908: 90 12 23 20 or %o0, 0x320, %o0 <== NOT EXECUTED 4000790c: 94 12 a3 68 or %o2, 0x368, %o2 <== NOT EXECUTED 40007910: 7f ff f1 bf call 4000400c <__assert> <== NOT EXECUTED 40007914: 92 10 20 64 mov 0x64, %o1 <== NOT EXECUTED /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 40007918: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 4000791c: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40007920: 12 bf ff d5 bne 40007874 <== NOT EXECUTED 40007924: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40007928: 10 bf ff d7 b 40007884 <== NOT EXECUTED 4000792c: a4 10 20 02 mov 2, %l2 <== NOT EXECUTED _Thread_Enable_dispatch(); return EAGAIN; } #endif the_mutex->process_shared = the_attr->process_shared; 40007930: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) 40007934: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 40007938: 80 a0 a0 00 cmp %g2, 0 4000793c: 32 80 00 04 bne,a 4000794c 40007940: c0 26 60 54 clr [ %i1 + 0x54 ] <== NOT EXECUTED the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; 40007944: 82 10 20 01 mov 1, %g1 40007948: c2 26 60 54 st %g1, [ %i1 + 0x54 ] the_mutex_attr->only_owner_release = TRUE; the_mutex_attr->priority_ceiling = 4000794c: c6 04 20 08 ld [ %l0 + 8 ], %g3 if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = TRUE; 40007950: 84 10 20 01 mov 1, %g2 the_mutex_attr->priority_ceiling = 40007954: 82 10 20 ff mov 0xff, %g1 40007958: 82 20 40 03 sub %g1, %g3, %g1 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; 4000795c: c4 26 60 58 st %g2, [ %i1 + 0x58 ] the_mutex_attr->priority_ceiling = 40007960: c2 26 60 60 st %g1, [ %i1 + 0x60 ] _POSIX_Priority_To_core( the_attr->prio_ceiling ); the_mutex_attr->discipline = the_discipline; 40007964: e4 26 60 5c st %l2, [ %i1 + 0x5c ] /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 40007968: 90 06 60 14 add %i1, 0x14, %o0 4000796c: 92 06 60 54 add %i1, 0x54, %o1 40007970: 40 00 0b 14 call 4000a5c0 <_CORE_mutex_Initialize> 40007974: 94 10 20 01 mov 1, %o2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40007978: 90 14 e1 54 or %l3, 0x154, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 4000797c: c6 06 60 08 ld [ %i1 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40007980: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 40007984: 03 00 00 3f sethi %hi(0xfc00), %g1 40007988: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000798c: 82 08 c0 01 and %g3, %g1, %g1 40007990: 80 a0 40 02 cmp %g1, %g2 40007994: 38 80 00 06 bgu,a 400079ac 40007998: c6 26 00 00 st %g3, [ %i0 ] <== NOT EXECUTED information->local_table[ index ] = the_object; 4000799c: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 400079a0: 83 28 60 02 sll %g1, 2, %g1 400079a4: 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; 400079a8: c6 26 00 00 st %g3, [ %i0 ] 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; 400079ac: c0 26 60 0c clr [ %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 ) 400079b0: c2 04 60 f0 ld [ %l1 + 0xf0 ], %g1 400079b4: 10 bf ff c5 b 400078c8 400079b8: b0 10 20 00 clr %i0 40007c70 : int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 40007c70: 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 ) 40007c74: 80 a6 a0 00 cmp %i2, 0 40007c78: 02 80 00 06 be 40007c90 40007c7c: a0 10 00 18 mov %i0, %l0 return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 40007c80: 82 06 7f ff add %i1, -1, %g1 40007c84: 80 a0 60 fd cmp %g1, 0xfd 40007c88: 08 80 00 04 bleu 40007c98 40007c8c: 01 00 00 00 nop ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40007c90: 81 c7 e0 08 ret 40007c94: 91 e8 20 16 restore %g0, 0x16, %o0 /* * Must acquire the mutex before we can change it's ceiling */ status = pthread_mutex_lock( mutex ); 40007c98: 7f ff ff 49 call 400079bc 40007c9c: 90 10 00 18 mov %i0, %o0 if ( status ) 40007ca0: b0 92 20 00 orcc %o0, 0, %i0 40007ca4: 12 80 00 24 bne 40007d34 40007ca8: 80 a4 20 00 cmp %l0, 0 Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40007cac: 22 80 00 22 be,a 40007d34 40007cb0: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED 40007cb4: d2 04 00 00 ld [ %l0 ], %o1 40007cb8: 80 a2 7f ff cmp %o1, -1 40007cbc: 22 80 00 26 be,a 40007d54 40007cc0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return (POSIX_Mutex_Control *) 40007cc4: 11 10 00 6d sethi %hi(0x4001b400), %o0 40007cc8: 94 07 bf f4 add %fp, -12, %o2 40007ccc: 40 00 0e 45 call 4000b5e0 <_Objects_Get> 40007cd0: 90 12 21 54 or %o0, 0x154, %o0 return status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { 40007cd4: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007cd8: 80 a0 60 00 cmp %g1, 0 40007cdc: 12 80 00 18 bne 40007d3c 40007ce0: 80 a0 60 02 cmp %g1, 2 return EINVAL; #endif case OBJECTS_ERROR: return EINVAL; /* impossible to get here */ case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 40007ce4: c6 02 20 60 ld [ %o0 + 0x60 ], %g3 the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; _CORE_mutex_Surrender( 40007ce8: 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( 40007cec: 82 10 20 ff mov 0xff, %g1 the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 40007cf0: 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( 40007cf4: 82 20 40 03 sub %g1, %g3, %g1 the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 40007cf8: 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( 40007cfc: c2 26 80 00 st %g1, [ %i2 ] the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; _CORE_mutex_Surrender( 40007d00: 94 10 20 00 clr %o2 40007d04: 40 00 0a 8c call 4000a734 <_CORE_mutex_Surrender> 40007d08: 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 ) 40007d0c: 05 10 00 6c sethi %hi(0x4001b000), %g2 40007d10: c2 00 a0 f0 ld [ %g2 + 0xf0 ], %g1 ! 4001b0f0 <_Thread_Dispatch_disable_level> 40007d14: 82 00 7f ff add %g1, -1, %g1 40007d18: c2 20 a0 f0 st %g1, [ %g2 + 0xf0 ] 40007d1c: c6 00 a0 f0 ld [ %g2 + 0xf0 ], %g3 40007d20: 80 a0 e0 00 cmp %g3, 0 40007d24: 12 80 00 04 bne 40007d34 40007d28: 01 00 00 00 nop _Thread_Dispatch(); 40007d2c: 40 00 13 19 call 4000c990 <_Thread_Dispatch> 40007d30: 01 00 00 00 nop 40007d34: 81 c7 e0 08 ret 40007d38: 81 e8 00 00 restore status = pthread_mutex_lock( mutex ); if ( status ) return status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { 40007d3c: 28 bf ff fe bleu,a 40007d34 <== NOT EXECUTED 40007d40: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED #endif ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40007d44: 40 00 03 6e call 40008afc <== NOT EXECUTED 40007d48: 01 00 00 00 nop <== NOT EXECUTED 40007d4c: 81 c7 e0 08 ret <== NOT EXECUTED 40007d50: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40007d54: 7f ff fe b2 call 4000781c <== NOT EXECUTED 40007d58: 92 10 20 00 clr %o1 <== NOT EXECUTED 40007d5c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40007d60: 32 bf ff f5 bne,a 40007d34 <== NOT EXECUTED 40007d64: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED 40007d68: 10 bf ff d7 b 40007cc4 <== NOT EXECUTED 40007d6c: d2 04 00 00 ld [ %l0 ], %o1 <== NOT EXECUTED 40007d70 : int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { 40007d70: 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 ); 40007d74: 90 10 00 19 mov %i1, %o0 40007d78: 40 00 00 46 call 40007e90 <_POSIX_Absolute_timeout_to_ticks> 40007d7c: 92 07 bf f4 add %fp, -12, %o1 switch ( status ) { 40007d80: 80 a2 20 03 cmp %o0, 3 40007d84: 02 80 00 07 be 40007da0 40007d88: d4 07 bf f4 ld [ %fp + -12 ], %o2 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } lock_status = _POSIX_Mutex_Lock_support( 40007d8c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40007d90: 7f ff ff 11 call 400079d4 <_POSIX_Mutex_Lock_support> <== NOT EXECUTED 40007d94: 92 10 20 00 clr %o1 <== NOT EXECUTED break; } } return lock_status; } 40007d98: 81 c7 e0 08 ret <== NOT EXECUTED 40007d9c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } lock_status = _POSIX_Mutex_Lock_support( 40007da0: 90 10 00 18 mov %i0, %o0 40007da4: 7f ff ff 0c call 400079d4 <_POSIX_Mutex_Lock_support> 40007da8: 92 10 20 01 mov 1, %o1 break; } } return lock_status; } 40007dac: 81 c7 e0 08 ret 40007db0: 91 e8 00 08 restore %g0, %o0, %o0 40007dcc : */ int pthread_mutex_unlock( pthread_mutex_t *mutex ) { 40007dcc: 9d e3 bf 90 save %sp, -112, %sp 40007dd0: 80 a6 20 00 cmp %i0, 0 40007dd4: 32 80 00 05 bne,a 40007de8 40007dd8: d2 06 00 00 ld [ %i0 ], %o1 ); _Thread_Enable_dispatch(); return _POSIX_Mutex_From_core_mutex_status( status ); break; } return POSIX_BOTTOM_REACHED(); 40007ddc: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED } 40007de0: 81 c7 e0 08 ret 40007de4: 91 e8 00 08 restore %g0, %o0, %o0 40007de8: 80 a2 7f ff cmp %o1, -1 40007dec: 22 80 00 22 be,a 40007e74 40007df0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED return (POSIX_Mutex_Control *) 40007df4: 11 10 00 6d sethi %hi(0x4001b400), %o0 40007df8: 94 07 bf f4 add %fp, -12, %o2 40007dfc: 40 00 0d f9 call 4000b5e0 <_Objects_Get> 40007e00: 90 12 21 54 or %o0, 0x154, %o0 register POSIX_Mutex_Control *the_mutex; Objects_Locations location; CORE_mutex_Status status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { 40007e04: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007e08: 80 a0 60 00 cmp %g1, 0 40007e0c: 12 80 00 12 bne 40007e54 40007e10: 80 a0 60 02 cmp %g1, 2 ); #endif case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: status = _CORE_mutex_Surrender( 40007e14: d2 02 20 08 ld [ %o0 + 8 ], %o1 40007e18: 94 10 20 00 clr %o2 40007e1c: 40 00 0a 46 call 4000a734 <_CORE_mutex_Surrender> 40007e20: 90 02 20 14 add %o0, 0x14, %o0 40007e24: 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 ) 40007e28: 03 10 00 6c sethi %hi(0x4001b000), %g1 40007e2c: c4 00 60 f0 ld [ %g1 + 0xf0 ], %g2 ! 4001b0f0 <_Thread_Dispatch_disable_level> 40007e30: 84 00 bf ff add %g2, -1, %g2 40007e34: c4 20 60 f0 st %g2, [ %g1 + 0xf0 ] 40007e38: c6 00 60 f0 ld [ %g1 + 0xf0 ], %g3 40007e3c: 80 a0 e0 00 cmp %g3, 0 40007e40: 02 80 00 0a be 40007e68 40007e44: 01 00 00 00 nop #else NULL #endif ); _Thread_Enable_dispatch(); return _POSIX_Mutex_From_core_mutex_status( status ); 40007e48: 40 00 21 04 call 40010258 <_POSIX_Mutex_From_core_mutex_status> 40007e4c: 90 10 00 18 mov %i0, %o0 40007e50: 30 bf ff e4 b,a 40007de0 register POSIX_Mutex_Control *the_mutex; Objects_Locations location; CORE_mutex_Status status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { 40007e54: 28 bf ff e3 bleu,a 40007de0 40007e58: 90 10 20 16 mov 0x16, %o0 ); _Thread_Enable_dispatch(); return _POSIX_Mutex_From_core_mutex_status( status ); break; } return POSIX_BOTTOM_REACHED(); 40007e5c: 40 00 03 28 call 40008afc <== NOT EXECUTED 40007e60: 01 00 00 00 nop <== NOT EXECUTED 40007e64: 30 bf ff df b,a 40007de0 <== NOT EXECUTED _Thread_Dispatch(); 40007e68: 40 00 12 ca call 4000c990 <_Thread_Dispatch> 40007e6c: 01 00 00 00 nop 40007e70: 30 bf ff f6 b,a 40007e48 Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40007e74: 7f ff fe 6a call 4000781c <== NOT EXECUTED 40007e78: 92 10 20 00 clr %o1 <== NOT EXECUTED 40007e7c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40007e80: 32 bf ff d8 bne,a 40007de0 <== NOT EXECUTED 40007e84: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 40007e88: 10 bf ff db b 40007df4 <== NOT EXECUTED 40007e8c: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED 40006e6c : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 40006e6c: 9d e3 bf 90 save %sp, -112, %sp if ( !once_control || !init_routine ) 40006e70: a0 96 20 00 orcc %i0, 0, %l0 40006e74: 02 80 00 18 be 40006ed4 40006e78: 80 a6 60 00 cmp %i1, 0 40006e7c: 02 80 00 16 be 40006ed4 40006e80: 01 00 00 00 nop return EINVAL; if ( !once_control->init_executed ) { 40006e84: c2 04 20 04 ld [ %l0 + 4 ], %g1 40006e88: 80 a0 60 00 cmp %g1, 0 40006e8c: 12 80 00 10 bne 40006ecc 40006e90: b0 10 20 00 clr %i0 rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 40006e94: b0 07 bf f4 add %fp, -12, %i0 40006e98: 90 10 21 00 mov 0x100, %o0 40006e9c: 92 10 21 00 mov 0x100, %o1 40006ea0: 40 00 05 41 call 400083a4 40006ea4: 94 10 00 18 mov %i0, %o2 if ( !once_control->init_executed ) { 40006ea8: c2 04 20 04 ld [ %l0 + 4 ], %g1 40006eac: 80 a0 60 00 cmp %g1, 0 40006eb0: 02 80 00 0b be 40006edc 40006eb4: 82 10 20 01 mov 1, %g1 once_control->is_initialized = TRUE; once_control->init_executed = TRUE; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 40006eb8: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED 40006ebc: 94 10 00 18 mov %i0, %o2 40006ec0: 92 10 21 00 mov 0x100, %o1 40006ec4: 40 00 05 38 call 400083a4 40006ec8: b0 10 20 00 clr %i0 } return 0; } 40006ecc: 81 c7 e0 08 ret 40006ed0: 81 e8 00 00 restore int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { if ( !once_control || !init_routine ) 40006ed4: 81 c7 e0 08 ret 40006ed8: 91 e8 20 16 restore %g0, 0x16, %o0 if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); if ( !once_control->init_executed ) { once_control->is_initialized = TRUE; once_control->init_executed = TRUE; 40006edc: c2 24 20 04 st %g1, [ %l0 + 4 ] (*init_routine)(); 40006ee0: 9f c6 40 00 call %i1 40006ee4: c2 24 00 00 st %g1, [ %l0 ] } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 40006ee8: 10 bf ff f5 b 40006ebc 40006eec: d0 07 bf f4 ld [ %fp + -12 ], %o0 4000625c : */ int pthread_rwlock_destroy( pthread_rwlock_t *rwlock ) { 4000625c: 9d e3 bf 90 save %sp, -112, %sp POSIX_RWLock_Control *the_rwlock = NULL; Objects_Locations location; if ( !rwlock ) 40006260: 80 a6 20 00 cmp %i0, 0 40006264: 02 80 00 24 be 400062f4 40006268: 21 10 00 76 sethi %hi(0x4001d800), %l0 RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 4000626c: d2 06 00 00 ld [ %i0 ], %o1 40006270: 94 07 bf f4 add %fp, -12, %o2 40006274: 40 00 0f 95 call 4000a0c8 <_Objects_Get> 40006278: 90 14 22 6c or %l0, 0x26c, %o0 return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 4000627c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006280: 80 a0 60 00 cmp %g1, 0 40006284: 12 80 00 15 bne 400062d8 40006288: b0 10 00 08 mov %o0, %i0 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 ) { 4000628c: 40 00 17 3b call 4000bf78 <_Thread_queue_First> 40006290: 90 02 20 10 add %o0, 0x10, %o0 40006294: 80 a2 20 00 cmp %o0, 0 40006298: 02 80 00 1a be 40006300 4000629c: 90 14 22 6c or %l0, 0x26c, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400062a0: 03 10 00 75 sethi %hi(0x4001d400), %g1 400062a4: c4 00 63 d0 ld [ %g1 + 0x3d0 ], %g2 ! 4001d7d0 <_Thread_Dispatch_disable_level> 400062a8: 90 10 20 10 mov 0x10, %o0 400062ac: 84 00 bf ff add %g2, -1, %g2 400062b0: c4 20 63 d0 st %g2, [ %g1 + 0x3d0 ] 400062b4: c6 00 63 d0 ld [ %g1 + 0x3d0 ], %g3 400062b8: 80 a0 e0 00 cmp %g3, 0 400062bc: 12 80 00 0c bne 400062ec 400062c0: 01 00 00 00 nop _Thread_Dispatch(); 400062c4: 40 00 14 6d call 4000b478 <_Thread_Dispatch> 400062c8: 01 00 00 00 nop 400062cc: 90 10 20 10 mov 0x10, %o0 ! 10 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 400062d0: 81 c7 e0 08 ret 400062d4: 91 e8 00 08 restore %g0, %o0, %o0 if ( !rwlock ) return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 400062d8: 80 a0 60 02 cmp %g1, 2 400062dc: 08 80 00 07 bleu 400062f8 400062e0: 90 10 20 16 mov 0x16, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 400062e4: 40 00 03 c1 call 400071e8 <== NOT EXECUTED 400062e8: 01 00 00 00 nop <== NOT EXECUTED } 400062ec: 81 c7 e0 08 ret 400062f0: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 400062f4: 90 10 20 16 mov 0x16, %o0 } 400062f8: 81 c7 e0 08 ret 400062fc: 91 e8 00 08 restore %g0, %o0, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40006300: c2 06 20 08 ld [ %i0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006304: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 40006308: 05 00 00 3f sethi %hi(0xfc00), %g2 4000630c: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40006310: 82 08 40 02 and %g1, %g2, %g1 40006314: 80 a0 40 03 cmp %g1, %g3 40006318: 38 80 00 06 bgu,a 40006330 4000631c: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40006320: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40006324: 83 28 60 02 sll %g1, 2, %g1 40006328: 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; 4000632c: c0 26 20 0c clr [ %i0 + 0xc ] */ RTEMS_INLINE_ROUTINE void _POSIX_RWLock_Free ( POSIX_RWLock_Control *the_RWLock ) { _Objects_Free( &_POSIX_RWLock_Information, &the_RWLock->Object ); 40006330: 40 00 0f 23 call 40009fbc <_Objects_Free> 40006334: 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 ) 40006338: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000633c: c4 00 63 d0 ld [ %g1 + 0x3d0 ], %g2 ! 4001d7d0 <_Thread_Dispatch_disable_level> 40006340: 90 10 20 00 clr %o0 40006344: 84 00 bf ff add %g2, -1, %g2 40006348: c4 20 63 d0 st %g2, [ %g1 + 0x3d0 ] 4000634c: c6 00 63 d0 ld [ %g1 + 0x3d0 ], %g3 40006350: 80 a0 e0 00 cmp %g3, 0 40006354: 12 bf ff e6 bne 400062ec 40006358: 01 00 00 00 nop _Thread_Dispatch(); 4000635c: 40 00 14 47 call 4000b478 <_Thread_Dispatch> 40006360: 01 00 00 00 nop 40006364: 10 bf ff e2 b 400062ec 40006368: 90 10 20 00 clr %o0 ! 0 4000636c : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 4000636c: 9d e3 bf 88 save %sp, -120, %sp const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 40006370: 80 a6 20 00 cmp %i0, 0 40006374: 02 80 00 23 be 40006400 40006378: a0 10 00 19 mov %i1, %l0 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 4000637c: 80 a6 60 00 cmp %i1, 0 40006380: 22 80 00 23 be,a 4000640c 40006384: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 40006388: c2 04 00 00 ld [ %l0 ], %g1 4000638c: 80 a0 60 00 cmp %g1, 0 40006390: 22 80 00 1a be,a 400063f8 40006394: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED return EINVAL; switch ( the_attr->process_shared ) { 40006398: c2 04 20 04 ld [ %l0 + 4 ], %g1 4000639c: 80 a0 60 00 cmp %g1, 0 400063a0: 32 80 00 16 bne,a 400063f8 400063a4: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400063a8: 33 10 00 75 sethi %hi(0x4001d400), %i1 400063ac: c2 06 63 d0 ld [ %i1 + 0x3d0 ], %g1 ! 4001d7d0 <_Thread_Dispatch_disable_level> 400063b0: 82 00 60 01 inc %g1 400063b4: c2 26 63 d0 st %g1, [ %i1 + 0x3d0 ] * 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 *) 400063b8: 23 10 00 76 sethi %hi(0x4001d800), %l1 400063bc: 40 00 0d f2 call 40009b84 <_Objects_Allocate> 400063c0: 90 14 62 6c or %l1, 0x26c, %o0 ! 4001da6c <_POSIX_RWLock_Information> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 400063c4: a0 92 20 00 orcc %o0, 0, %l0 400063c8: 12 80 00 15 bne 4000641c 400063cc: 90 04 20 10 add %l0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400063d0: c2 06 63 d0 ld [ %i1 + 0x3d0 ], %g1 400063d4: b0 10 20 0b mov 0xb, %i0 _Thread_Dispatch(); 400063d8: 82 00 7f ff add %g1, -1, %g1 400063dc: c2 26 63 d0 st %g1, [ %i1 + 0x3d0 ] 400063e0: c4 06 63 d0 ld [ %i1 + 0x3d0 ], %g2 400063e4: 80 a0 a0 00 cmp %g2, 0 400063e8: 12 80 00 07 bne 40006404 400063ec: 01 00 00 00 nop 400063f0: 40 00 14 22 call 4000b478 <_Thread_Dispatch> 400063f4: 01 00 00 00 nop 400063f8: 81 c7 e0 08 ret 400063fc: 81 e8 00 00 restore 40006400: b0 10 20 16 mov 0x16, %i0 *rwlock = the_rwlock->Object.id; _Thread_Enable_dispatch(); return 0; } 40006404: 81 c7 e0 08 ret 40006408: 81 e8 00 00 restore * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 4000640c: 40 00 03 4e call 40007144 <== NOT EXECUTED 40006410: 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 ) 40006414: 10 bf ff de b 4000638c <== NOT EXECUTED 40006418: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED if ( !the_rwlock ) { _Thread_Enable_dispatch(); return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 4000641c: 40 00 0b 14 call 4000906c <_CORE_RWLock_Initialize> 40006420: 92 07 bf f4 add %fp, -12, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006424: 90 14 62 6c or %l1, 0x26c, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 40006428: c6 04 20 08 ld [ %l0 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000642c: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 40006430: 03 00 00 3f sethi %hi(0xfc00), %g1 40006434: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40006438: 82 08 c0 01 and %g3, %g1, %g1 4000643c: 80 a0 40 02 cmp %g1, %g2 40006440: 38 80 00 06 bgu,a 40006458 40006444: c6 26 00 00 st %g3, [ %i0 ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40006448: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 4000644c: 83 28 60 02 sll %g1, 2, %g1 40006450: e0 20 80 01 st %l0, [ %g2 + %g1 ] &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 40006454: c6 26 00 00 st %g3, [ %i0 ] 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; 40006458: c0 24 20 0c clr [ %l0 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000645c: c2 06 63 d0 ld [ %i1 + 0x3d0 ], %g1 40006460: 10 bf ff de b 400063d8 40006464: b0 10 20 00 clr %i0 40006468 : */ int pthread_rwlock_rdlock( pthread_rwlock_t *rwlock ) { 40006468: 9d e3 bf 90 save %sp, -112, %sp POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 4000646c: 80 a6 20 00 cmp %i0, 0 40006470: 02 80 00 24 be 40006500 40006474: 11 10 00 76 sethi %hi(0x4001d800), %o0 RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 40006478: d2 06 00 00 ld [ %i0 ], %o1 4000647c: 94 07 bf f4 add %fp, -12, %o2 40006480: 40 00 0f 12 call 4000a0c8 <_Objects_Get> 40006484: 90 12 22 6c or %o0, 0x26c, %o0 return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 40006488: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000648c: 80 a0 60 00 cmp %g1, 0 40006490: 22 80 00 09 be,a 400064b4 40006494: d2 06 00 00 ld [ %i0 ], %o1 40006498: 80 a0 60 02 cmp %g1, 2 4000649c: 08 80 00 1a bleu 40006504 400064a0: 90 10 20 16 mov 0x16, %o0 return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 400064a4: 40 00 03 51 call 400071e8 <== NOT EXECUTED 400064a8: 01 00 00 00 nop <== NOT EXECUTED } 400064ac: 81 c7 e0 08 ret <== NOT EXECUTED 400064b0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 400064b4: 90 02 20 10 add %o0, 0x10, %o0 400064b8: 94 10 20 01 mov 1, %o2 400064bc: 96 10 20 00 clr %o3 400064c0: 40 00 0a f6 call 40009098 <_CORE_RWLock_Obtain_for_reading> 400064c4: 98 10 20 00 clr %o4 400064c8: 03 10 00 75 sethi %hi(0x4001d400), %g1 400064cc: c4 00 63 d0 ld [ %g1 + 0x3d0 ], %g2 ! 4001d7d0 <_Thread_Dispatch_disable_level> 400064d0: 84 00 bf ff add %g2, -1, %g2 400064d4: c4 20 63 d0 st %g2, [ %g1 + 0x3d0 ] 400064d8: c6 00 63 d0 ld [ %g1 + 0x3d0 ], %g3 400064dc: 80 a0 e0 00 cmp %g3, 0 400064e0: 02 80 00 0b be 4000650c 400064e4: 01 00 00 00 nop 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 400064e8: 03 10 00 76 sethi %hi(0x4001d800), %g1 <== NOT EXECUTED 400064ec: c4 00 60 ac ld [ %g1 + 0xac ], %g2 ! 4001d8ac <_Thread_Executing> 400064f0: 40 00 00 a1 call 40006774 <_POSIX_RWLock_Translate_core_RWLock_return_code> 400064f4: d0 00 a0 34 ld [ %g2 + 0x34 ], %o0 (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 400064f8: 81 c7 e0 08 ret 400064fc: 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(); 40006500: 90 10 20 16 mov 0x16, %o0 } 40006504: 81 c7 e0 08 ret 40006508: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 4000650c: 40 00 13 db call 4000b478 <_Thread_Dispatch> 40006510: 01 00 00 00 nop 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 40006514: 10 bf ff f6 b 400064ec 40006518: 03 10 00 76 sethi %hi(0x4001d800), %g1 4000651c : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 4000651c: 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 ) 40006520: 80 a6 20 00 cmp %i0, 0 40006524: 02 80 00 2b be 400065d0 40006528: 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 ); 4000652c: 40 00 22 b7 call 4000f008 <_POSIX_Absolute_timeout_to_ticks> 40006530: 92 07 bf f0 add %fp, -16, %o1 switch (status) { 40006534: 80 a2 20 02 cmp %o0, 2 40006538: 08 80 00 29 bleu 400065dc 4000653c: b2 10 00 08 mov %o0, %i1 40006540: 80 a2 20 03 cmp %o0, 3 40006544: 22 80 00 02 be,a 4000654c 40006548: a0 10 20 01 mov 1, %l0 4000654c: d2 06 00 00 ld [ %i0 ], %o1 40006550: 11 10 00 76 sethi %hi(0x4001d800), %o0 40006554: 94 07 bf f4 add %fp, -12, %o2 40006558: 40 00 0e dc call 4000a0c8 <_Objects_Get> 4000655c: 90 12 22 6c or %o0, 0x26c, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 40006560: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006564: 80 a0 60 00 cmp %g1, 0 40006568: 12 80 00 27 bne 40006604 4000656c: 80 a0 60 02 cmp %g1, 2 case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 40006570: d2 06 00 00 ld [ %i0 ], %o1 40006574: d6 07 bf f0 ld [ %fp + -16 ], %o3 40006578: 90 02 20 10 add %o0, 0x10, %o0 4000657c: 94 10 00 10 mov %l0, %o2 40006580: 40 00 0a c6 call 40009098 <_CORE_RWLock_Obtain_for_reading> 40006584: 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 ) 40006588: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000658c: c4 00 63 d0 ld [ %g1 + 0x3d0 ], %g2 ! 4001d7d0 <_Thread_Dispatch_disable_level> 40006590: 84 00 bf ff add %g2, -1, %g2 40006594: c4 20 63 d0 st %g2, [ %g1 + 0x3d0 ] 40006598: c6 00 63 d0 ld [ %g1 + 0x3d0 ], %g3 4000659c: 80 a0 e0 00 cmp %g3, 0 400065a0: 02 80 00 26 be 40006638 400065a4: 01 00 00 00 nop ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 400065a8: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 400065ac: 12 80 00 1e bne 40006624 400065b0: 07 10 00 76 sethi %hi(0x4001d800), %g3 400065b4: c2 00 e0 ac ld [ %g3 + 0xac ], %g1 ! 4001d8ac <_Thread_Executing> <== NOT EXECUTED 400065b8: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 <== NOT EXECUTED 400065bc: 80 a0 a0 02 cmp %g2, 2 <== NOT EXECUTED 400065c0: 12 80 00 1a bne 40006628 <== NOT EXECUTED 400065c4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 400065c8: 12 80 00 15 bne 4000661c <== NOT EXECUTED 400065cc: 80 a6 60 02 cmp %i1, 2 <== NOT EXECUTED return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 400065d0: 90 10 20 16 mov 0x16, %o0 } 400065d4: 81 c7 e0 08 ret 400065d8: 91 e8 00 08 restore %g0, %o0, %o0 400065dc: d2 06 00 00 ld [ %i0 ], %o1 400065e0: 11 10 00 76 sethi %hi(0x4001d800), %o0 400065e4: 94 07 bf f4 add %fp, -12, %o2 400065e8: 40 00 0e b8 call 4000a0c8 <_Objects_Get> 400065ec: 90 12 22 6c or %o0, 0x26c, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 400065f0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400065f4: 80 a0 60 00 cmp %g1, 0 400065f8: 02 bf ff de be 40006570 400065fc: a0 10 20 00 clr %l0 40006600: 80 a0 60 02 cmp %g1, 2 40006604: 08 bf ff f4 bleu 400065d4 40006608: 90 10 20 16 mov 0x16, %o0 return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 4000660c: 40 00 02 f7 call 400071e8 <== NOT EXECUTED 40006610: 01 00 00 00 nop <== NOT EXECUTED } 40006614: 81 c7 e0 08 ret <== NOT EXECUTED 40006618: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 4000661c: 08 bf ff ee bleu 400065d4 <== NOT EXECUTED 40006620: 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( 40006624: c2 00 e0 ac ld [ %g3 + 0xac ], %g1 40006628: 40 00 00 53 call 40006774 <_POSIX_RWLock_Translate_core_RWLock_return_code> 4000662c: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 40006630: 81 c7 e0 08 ret 40006634: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 40006638: 40 00 13 90 call 4000b478 <_Thread_Dispatch> 4000663c: 01 00 00 00 nop ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 40006640: 10 bf ff db b 400065ac 40006644: 80 a4 20 00 cmp %l0, 0 40006648 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 40006648: 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 ) 4000664c: 80 a6 20 00 cmp %i0, 0 40006650: 02 80 00 2b be 400066fc 40006654: 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 ); 40006658: 40 00 22 6c call 4000f008 <_POSIX_Absolute_timeout_to_ticks> 4000665c: 92 07 bf f0 add %fp, -16, %o1 switch (status) { 40006660: 80 a2 20 02 cmp %o0, 2 40006664: 08 80 00 29 bleu 40006708 40006668: b2 10 00 08 mov %o0, %i1 4000666c: 80 a2 20 03 cmp %o0, 3 40006670: 22 80 00 02 be,a 40006678 40006674: a0 10 20 01 mov 1, %l0 40006678: d2 06 00 00 ld [ %i0 ], %o1 4000667c: 11 10 00 76 sethi %hi(0x4001d800), %o0 40006680: 94 07 bf f4 add %fp, -12, %o2 40006684: 40 00 0e 91 call 4000a0c8 <_Objects_Get> 40006688: 90 12 22 6c or %o0, 0x26c, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 4000668c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006690: 80 a0 60 00 cmp %g1, 0 40006694: 12 80 00 27 bne 40006730 40006698: 80 a0 60 02 cmp %g1, 2 case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 4000669c: d2 06 00 00 ld [ %i0 ], %o1 400066a0: d6 07 bf f0 ld [ %fp + -16 ], %o3 400066a4: 90 02 20 10 add %o0, 0x10, %o0 400066a8: 94 10 00 10 mov %l0, %o2 400066ac: 40 00 0a b0 call 4000916c <_CORE_RWLock_Obtain_for_writing> 400066b0: 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 ) 400066b4: 03 10 00 75 sethi %hi(0x4001d400), %g1 400066b8: c4 00 63 d0 ld [ %g1 + 0x3d0 ], %g2 ! 4001d7d0 <_Thread_Dispatch_disable_level> 400066bc: 84 00 bf ff add %g2, -1, %g2 400066c0: c4 20 63 d0 st %g2, [ %g1 + 0x3d0 ] 400066c4: c6 00 63 d0 ld [ %g1 + 0x3d0 ], %g3 400066c8: 80 a0 e0 00 cmp %g3, 0 400066cc: 02 80 00 26 be 40006764 400066d0: 01 00 00 00 nop ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 400066d4: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 400066d8: 12 80 00 1e bne 40006750 400066dc: 07 10 00 76 sethi %hi(0x4001d800), %g3 400066e0: c2 00 e0 ac ld [ %g3 + 0xac ], %g1 ! 4001d8ac <_Thread_Executing> <== NOT EXECUTED 400066e4: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 <== NOT EXECUTED 400066e8: 80 a0 a0 02 cmp %g2, 2 <== NOT EXECUTED 400066ec: 12 80 00 1a bne 40006754 <== NOT EXECUTED 400066f0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 400066f4: 12 80 00 15 bne 40006748 <== NOT EXECUTED 400066f8: 80 a6 60 02 cmp %i1, 2 <== NOT EXECUTED return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 400066fc: 90 10 20 16 mov 0x16, %o0 } 40006700: 81 c7 e0 08 ret 40006704: 91 e8 00 08 restore %g0, %o0, %o0 40006708: d2 06 00 00 ld [ %i0 ], %o1 4000670c: 11 10 00 76 sethi %hi(0x4001d800), %o0 40006710: 94 07 bf f4 add %fp, -12, %o2 40006714: 40 00 0e 6d call 4000a0c8 <_Objects_Get> 40006718: 90 12 22 6c or %o0, 0x26c, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 4000671c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006720: 80 a0 60 00 cmp %g1, 0 40006724: 02 bf ff de be 4000669c 40006728: a0 10 20 00 clr %l0 4000672c: 80 a0 60 02 cmp %g1, 2 40006730: 08 bf ff f4 bleu 40006700 40006734: 90 10 20 16 mov 0x16, %o0 return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40006738: 40 00 02 ac call 400071e8 <== NOT EXECUTED 4000673c: 01 00 00 00 nop <== NOT EXECUTED } 40006740: 81 c7 e0 08 ret <== NOT EXECUTED 40006744: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 40006748: 08 bf ff ee bleu 40006700 <== NOT EXECUTED 4000674c: 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( 40006750: c2 00 e0 ac ld [ %g3 + 0xac ], %g1 40006754: 40 00 00 08 call 40006774 <_POSIX_RWLock_Translate_core_RWLock_return_code> 40006758: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 4000675c: 81 c7 e0 08 ret 40006760: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 40006764: 40 00 13 45 call 4000b478 <_Thread_Dispatch> 40006768: 01 00 00 00 nop ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 4000676c: 10 bf ff db b 400066d8 40006770: 80 a4 20 00 cmp %l0, 0 400067a0 : */ int pthread_rwlock_tryrdlock( pthread_rwlock_t *rwlock ) { 400067a0: 9d e3 bf 90 save %sp, -112, %sp POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 400067a4: 80 a6 20 00 cmp %i0, 0 400067a8: 02 80 00 24 be 40006838 400067ac: 11 10 00 76 sethi %hi(0x4001d800), %o0 400067b0: d2 06 00 00 ld [ %i0 ], %o1 400067b4: 94 07 bf f4 add %fp, -12, %o2 400067b8: 40 00 0e 44 call 4000a0c8 <_Objects_Get> 400067bc: 90 12 22 6c or %o0, 0x26c, %o0 return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 400067c0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400067c4: 80 a0 60 00 cmp %g1, 0 400067c8: 22 80 00 09 be,a 400067ec 400067cc: d2 06 00 00 ld [ %i0 ], %o1 400067d0: 80 a0 60 02 cmp %g1, 2 400067d4: 08 80 00 1a bleu 4000683c 400067d8: 90 10 20 16 mov 0x16, %o0 return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 400067dc: 40 00 02 83 call 400071e8 <== NOT EXECUTED 400067e0: 01 00 00 00 nop <== NOT EXECUTED } 400067e4: 81 c7 e0 08 ret <== NOT EXECUTED 400067e8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 400067ec: 90 02 20 10 add %o0, 0x10, %o0 400067f0: 94 10 20 00 clr %o2 400067f4: 96 10 20 00 clr %o3 400067f8: 40 00 0a 28 call 40009098 <_CORE_RWLock_Obtain_for_reading> 400067fc: 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 ) 40006800: 03 10 00 75 sethi %hi(0x4001d400), %g1 40006804: c4 00 63 d0 ld [ %g1 + 0x3d0 ], %g2 ! 4001d7d0 <_Thread_Dispatch_disable_level> 40006808: 84 00 bf ff add %g2, -1, %g2 4000680c: c4 20 63 d0 st %g2, [ %g1 + 0x3d0 ] 40006810: c6 00 63 d0 ld [ %g1 + 0x3d0 ], %g3 40006814: 80 a0 e0 00 cmp %g3, 0 40006818: 02 80 00 0b be 40006844 4000681c: 01 00 00 00 nop NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 40006820: 03 10 00 76 sethi %hi(0x4001d800), %g1 <== NOT EXECUTED 40006824: c4 00 60 ac ld [ %g1 + 0xac ], %g2 ! 4001d8ac <_Thread_Executing> 40006828: 7f ff ff d3 call 40006774 <_POSIX_RWLock_Translate_core_RWLock_return_code> 4000682c: d0 00 a0 34 ld [ %g2 + 0x34 ], %o0 (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 40006830: 81 c7 e0 08 ret 40006834: 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(); 40006838: 90 10 20 16 mov 0x16, %o0 } 4000683c: 81 c7 e0 08 ret 40006840: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 40006844: 40 00 13 0d call 4000b478 <_Thread_Dispatch> 40006848: 01 00 00 00 nop NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 4000684c: 10 bf ff f6 b 40006824 40006850: 03 10 00 76 sethi %hi(0x4001d800), %g1 40006854 : */ int pthread_rwlock_trywrlock( pthread_rwlock_t *rwlock ) { 40006854: 9d e3 bf 90 save %sp, -112, %sp POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 40006858: 80 a6 20 00 cmp %i0, 0 4000685c: 02 80 00 24 be 400068ec 40006860: 11 10 00 76 sethi %hi(0x4001d800), %o0 40006864: d2 06 00 00 ld [ %i0 ], %o1 40006868: 94 07 bf f4 add %fp, -12, %o2 4000686c: 40 00 0e 17 call 4000a0c8 <_Objects_Get> 40006870: 90 12 22 6c or %o0, 0x26c, %o0 return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 40006874: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006878: 80 a0 60 00 cmp %g1, 0 4000687c: 22 80 00 09 be,a 400068a0 40006880: d2 06 00 00 ld [ %i0 ], %o1 40006884: 80 a0 60 02 cmp %g1, 2 40006888: 08 80 00 1a bleu 400068f0 4000688c: 90 10 20 16 mov 0x16, %o0 return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40006890: 40 00 02 56 call 400071e8 <== NOT EXECUTED 40006894: 01 00 00 00 nop <== NOT EXECUTED } 40006898: 81 c7 e0 08 ret <== NOT EXECUTED 4000689c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 400068a0: 90 02 20 10 add %o0, 0x10, %o0 400068a4: 94 10 20 00 clr %o2 400068a8: 96 10 20 00 clr %o3 400068ac: 40 00 0a 30 call 4000916c <_CORE_RWLock_Obtain_for_writing> 400068b0: 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 ) 400068b4: 03 10 00 75 sethi %hi(0x4001d400), %g1 400068b8: c4 00 63 d0 ld [ %g1 + 0x3d0 ], %g2 ! 4001d7d0 <_Thread_Dispatch_disable_level> 400068bc: 84 00 bf ff add %g2, -1, %g2 400068c0: c4 20 63 d0 st %g2, [ %g1 + 0x3d0 ] 400068c4: c6 00 63 d0 ld [ %g1 + 0x3d0 ], %g3 400068c8: 80 a0 e0 00 cmp %g3, 0 400068cc: 02 80 00 0b be 400068f8 400068d0: 01 00 00 00 nop 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 400068d4: 03 10 00 76 sethi %hi(0x4001d800), %g1 <== NOT EXECUTED 400068d8: c4 00 60 ac ld [ %g1 + 0xac ], %g2 ! 4001d8ac <_Thread_Executing> 400068dc: 7f ff ff a6 call 40006774 <_POSIX_RWLock_Translate_core_RWLock_return_code> 400068e0: d0 00 a0 34 ld [ %g2 + 0x34 ], %o0 (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 400068e4: 81 c7 e0 08 ret 400068e8: 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(); 400068ec: 90 10 20 16 mov 0x16, %o0 } 400068f0: 81 c7 e0 08 ret 400068f4: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 400068f8: 40 00 12 e0 call 4000b478 <_Thread_Dispatch> 400068fc: 01 00 00 00 nop 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 40006900: 10 bf ff f6 b 400068d8 40006904: 03 10 00 76 sethi %hi(0x4001d800), %g1 40006908 : */ int pthread_rwlock_unlock( pthread_rwlock_t *rwlock ) { 40006908: 9d e3 bf 90 save %sp, -112, %sp POSIX_RWLock_Control *the_rwlock; Objects_Locations location; CORE_RWLock_Status status; if ( !rwlock ) 4000690c: 80 a6 20 00 cmp %i0, 0 40006910: 02 80 00 1f be 4000698c 40006914: 11 10 00 76 sethi %hi(0x4001d800), %o0 40006918: d2 06 00 00 ld [ %i0 ], %o1 4000691c: 94 07 bf f4 add %fp, -12, %o2 40006920: 40 00 0d ea call 4000a0c8 <_Objects_Get> 40006924: 90 12 22 6c or %o0, 0x26c, %o0 return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 40006928: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000692c: 80 a0 60 00 cmp %g1, 0 40006930: 02 80 00 08 be 40006950 40006934: 80 a0 60 02 cmp %g1, 2 40006938: 08 80 00 16 bleu 40006990 4000693c: 90 10 20 16 mov 0x16, %o0 status = _CORE_RWLock_Release( &the_rwlock->RWLock ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( status ); } return POSIX_BOTTOM_REACHED(); 40006940: 40 00 02 2a call 400071e8 <== NOT EXECUTED 40006944: 01 00 00 00 nop <== NOT EXECUTED } 40006948: 81 c7 e0 08 ret <== NOT EXECUTED 4000694c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: status = _CORE_RWLock_Release( &the_rwlock->RWLock ); 40006950: 40 00 0a 29 call 400091f4 <_CORE_RWLock_Release> 40006954: 90 02 20 10 add %o0, 0x10, %o0 40006958: 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 ) 4000695c: 03 10 00 75 sethi %hi(0x4001d400), %g1 40006960: c4 00 63 d0 ld [ %g1 + 0x3d0 ], %g2 ! 4001d7d0 <_Thread_Dispatch_disable_level> 40006964: 84 00 bf ff add %g2, -1, %g2 40006968: c4 20 63 d0 st %g2, [ %g1 + 0x3d0 ] 4000696c: c6 00 63 d0 ld [ %g1 + 0x3d0 ], %g3 40006970: 80 a0 e0 00 cmp %g3, 0 40006974: 02 80 00 09 be 40006998 40006978: 01 00 00 00 nop _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( status ); 4000697c: 7f ff ff 7e call 40006774 <_POSIX_RWLock_Translate_core_RWLock_return_code> 40006980: 90 10 00 18 mov %i0, %o0 } return POSIX_BOTTOM_REACHED(); } 40006984: 81 c7 e0 08 ret 40006988: 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(); 4000698c: 90 10 20 16 mov 0x16, %o0 } 40006990: 81 c7 e0 08 ret 40006994: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 40006998: 40 00 12 b8 call 4000b478 <_Thread_Dispatch> 4000699c: 01 00 00 00 nop 400069a0: 30 bf ff f7 b,a 4000697c 400069a4 : */ int pthread_rwlock_wrlock( pthread_rwlock_t *rwlock ) { 400069a4: 9d e3 bf 90 save %sp, -112, %sp POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 400069a8: 80 a6 20 00 cmp %i0, 0 400069ac: 02 80 00 24 be 40006a3c 400069b0: 11 10 00 76 sethi %hi(0x4001d800), %o0 400069b4: d2 06 00 00 ld [ %i0 ], %o1 400069b8: 94 07 bf f4 add %fp, -12, %o2 400069bc: 40 00 0d c3 call 4000a0c8 <_Objects_Get> 400069c0: 90 12 22 6c or %o0, 0x26c, %o0 return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 400069c4: c2 07 bf f4 ld [ %fp + -12 ], %g1 400069c8: 80 a0 60 00 cmp %g1, 0 400069cc: 22 80 00 09 be,a 400069f0 400069d0: d2 06 00 00 ld [ %i0 ], %o1 400069d4: 80 a0 60 02 cmp %g1, 2 400069d8: 08 80 00 1a bleu 40006a40 400069dc: 90 10 20 16 mov 0x16, %o0 return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 400069e0: 40 00 02 02 call 400071e8 <== NOT EXECUTED 400069e4: 01 00 00 00 nop <== NOT EXECUTED } 400069e8: 81 c7 e0 08 ret <== NOT EXECUTED 400069ec: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 400069f0: 90 02 20 10 add %o0, 0x10, %o0 400069f4: 94 10 20 01 mov 1, %o2 400069f8: 96 10 20 00 clr %o3 400069fc: 40 00 09 dc call 4000916c <_CORE_RWLock_Obtain_for_writing> 40006a00: 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 ) 40006a04: 03 10 00 75 sethi %hi(0x4001d400), %g1 40006a08: c4 00 63 d0 ld [ %g1 + 0x3d0 ], %g2 ! 4001d7d0 <_Thread_Dispatch_disable_level> 40006a0c: 84 00 bf ff add %g2, -1, %g2 40006a10: c4 20 63 d0 st %g2, [ %g1 + 0x3d0 ] 40006a14: c6 00 63 d0 ld [ %g1 + 0x3d0 ], %g3 40006a18: 80 a0 e0 00 cmp %g3, 0 40006a1c: 02 80 00 0b be 40006a48 40006a20: 01 00 00 00 nop 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 40006a24: 03 10 00 76 sethi %hi(0x4001d800), %g1 <== NOT EXECUTED 40006a28: c4 00 60 ac ld [ %g1 + 0xac ], %g2 ! 4001d8ac <_Thread_Executing> 40006a2c: 7f ff ff 52 call 40006774 <_POSIX_RWLock_Translate_core_RWLock_return_code> 40006a30: d0 00 a0 34 ld [ %g2 + 0x34 ], %o0 (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 40006a34: 81 c7 e0 08 ret 40006a38: 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(); 40006a3c: 90 10 20 16 mov 0x16, %o0 } 40006a40: 81 c7 e0 08 ret 40006a44: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 40006a48: 40 00 12 8c call 4000b478 <_Thread_Dispatch> 40006a4c: 01 00 00 00 nop 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 40006a50: 10 bf ff f6 b 40006a28 40006a54: 03 10 00 76 sethi %hi(0x4001d800), %g1 40005c90 : int pthread_setcancelstate( int state, int *oldstate ) { 40005c90: 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() ) 40005c94: 03 10 00 5f sethi %hi(0x40017c00), %g1 40005c98: c4 00 61 14 ld [ %g1 + 0x114 ], %g2 ! 40017d14 <_ISR_Nest_level> int pthread_setcancelstate( int state, int *oldstate ) { 40005c9c: 86 10 00 18 mov %i0, %g3 * 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() ) 40005ca0: 80 a0 a0 00 cmp %g2, 0 40005ca4: 12 80 00 22 bne 40005d2c 40005ca8: b0 10 20 47 mov 0x47, %i0 return EPROTO; if ( !oldstate ) 40005cac: 80 a6 60 00 cmp %i1, 0 40005cb0: 02 80 00 04 be 40005cc0 40005cb4: 80 a0 e0 01 cmp %g3, 1 return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 40005cb8: 08 80 00 04 bleu 40005cc8 40005cbc: 21 10 00 5f sethi %hi(0x40017c00), %l0 thread_support->cancelation_requested ) _POSIX_Threads_cancel_run( _Thread_Executing ); _Thread_Enable_dispatch(); return 0; } 40005cc0: 81 c7 e0 08 ret <== NOT EXECUTED 40005cc4: 91 e8 20 16 restore %g0, 0x16, %o0 <== NOT EXECUTED return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 40005cc8: 09 10 00 5f sethi %hi(0x40017c00), %g4 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40005ccc: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 40005cd0: c4 01 21 2c ld [ %g4 + 0x12c ], %g2 40005cd4: 82 00 60 01 inc %g1 40005cd8: c4 00 a1 70 ld [ %g2 + 0x170 ], %g2 40005cdc: c2 24 20 50 st %g1, [ %l0 + 0x50 ] _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 40005ce0: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1 thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 40005ce4: 80 a0 e0 00 cmp %g3, 0 return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 40005ce8: c2 26 40 00 st %g1, [ %i1 ] thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 40005cec: 12 80 00 06 bne 40005d04 40005cf0: c6 20 a0 cc st %g3, [ %g2 + 0xcc ] 40005cf4: c2 00 a0 d0 ld [ %g2 + 0xd0 ], %g1 40005cf8: 80 a0 60 01 cmp %g1, 1 40005cfc: 22 80 00 0e be,a 40005d34 40005d00: c2 00 a0 d4 ld [ %g2 + 0xd4 ], %g1 <== 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 ) 40005d04: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 40005d08: b0 10 20 00 clr %i0 40005d0c: 82 00 7f ff add %g1, -1, %g1 40005d10: c2 24 20 50 st %g1, [ %l0 + 0x50 ] 40005d14: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 40005d18: 80 a0 a0 00 cmp %g2, 0 40005d1c: 12 80 00 04 bne 40005d2c 40005d20: 01 00 00 00 nop _Thread_Dispatch(); 40005d24: 40 00 10 27 call 40009dc0 <_Thread_Dispatch> 40005d28: 01 00 00 00 nop 40005d2c: 81 c7 e0 08 ret 40005d30: 81 e8 00 00 restore 40005d34: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005d38: 02 bf ff f3 be 40005d04 <== NOT EXECUTED 40005d3c: 01 00 00 00 nop <== NOT EXECUTED thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) _POSIX_Threads_cancel_run( _Thread_Executing ); 40005d40: 7f ff fd b7 call 4000541c <_POSIX_Threads_cancel_run> <== NOT EXECUTED 40005d44: d0 01 21 2c ld [ %g4 + 0x12c ], %o0 <== NOT EXECUTED 40005d48: 30 bf ff ef b,a 40005d04 <== NOT EXECUTED 40005d4c : int pthread_setcanceltype( int type, int *oldtype ) { 40005d4c: 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() ) 40005d50: 03 10 00 5f sethi %hi(0x40017c00), %g1 40005d54: c4 00 61 14 ld [ %g1 + 0x114 ], %g2 ! 40017d14 <_ISR_Nest_level> int pthread_setcanceltype( int type, int *oldtype ) { 40005d58: 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() ) 40005d5c: 80 a0 a0 00 cmp %g2, 0 40005d60: 12 80 00 22 bne 40005de8 40005d64: b0 10 20 47 mov 0x47, %i0 return EPROTO; if ( !oldtype ) 40005d68: 80 a6 60 00 cmp %i1, 0 40005d6c: 02 80 00 04 be 40005d7c 40005d70: 80 a1 20 01 cmp %g4, 1 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 40005d74: 08 80 00 04 bleu 40005d84 40005d78: 21 10 00 5f sethi %hi(0x40017c00), %l0 thread_support->cancelation_requested ) _POSIX_Threads_cancel_run( _Thread_Executing ); _Thread_Enable_dispatch(); return 0; } 40005d7c: 81 c7 e0 08 ret <== NOT EXECUTED 40005d80: 91 e8 20 16 restore %g0, 0x16, %o0 <== NOT EXECUTED return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 40005d84: 1b 10 00 5f sethi %hi(0x40017c00), %o5 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40005d88: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 40005d8c: c4 03 61 2c ld [ %o5 + 0x12c ], %g2 40005d90: 82 00 60 01 inc %g1 40005d94: c6 00 a1 70 ld [ %g2 + 0x170 ], %g3 40005d98: c2 24 20 50 st %g1, [ %l0 + 0x50 ] _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 40005d9c: c2 00 e0 d0 ld [ %g3 + 0xd0 ], %g1 40005da0: c2 26 40 00 st %g1, [ %i1 ] thread_support->cancelability_type = type; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 40005da4: c4 00 e0 cc ld [ %g3 + 0xcc ], %g2 40005da8: 80 a0 a0 00 cmp %g2, 0 40005dac: 12 80 00 05 bne 40005dc0 40005db0: c8 20 e0 d0 st %g4, [ %g3 + 0xd0 ] 40005db4: 80 a1 20 01 cmp %g4, 1 40005db8: 22 80 00 0e be,a 40005df0 40005dbc: c2 00 e0 d4 ld [ %g3 + 0xd4 ], %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40005dc0: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 40005dc4: b0 10 20 00 clr %i0 40005dc8: 82 00 7f ff add %g1, -1, %g1 40005dcc: c2 24 20 50 st %g1, [ %l0 + 0x50 ] 40005dd0: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 40005dd4: 80 a0 a0 00 cmp %g2, 0 40005dd8: 12 80 00 04 bne 40005de8 40005ddc: 01 00 00 00 nop _Thread_Dispatch(); 40005de0: 40 00 0f f8 call 40009dc0 <_Thread_Dispatch> 40005de4: 01 00 00 00 nop 40005de8: 81 c7 e0 08 ret 40005dec: 81 e8 00 00 restore 40005df0: 80 a0 60 00 cmp %g1, 0 40005df4: 02 bf ff f3 be 40005dc0 40005df8: 01 00 00 00 nop thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) _POSIX_Threads_cancel_run( _Thread_Executing ); 40005dfc: 7f ff fd 88 call 4000541c <_POSIX_Threads_cancel_run> <== NOT EXECUTED 40005e00: d0 03 61 2c ld [ %o5 + 0x12c ], %o0 <== NOT EXECUTED 40005e04: 30 bf ff ef b,a 40005dc0 <== NOT EXECUTED 400088a0 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 400088a0: 9d e3 bf 90 save %sp, -112, %sp /* * Check all the parameters */ if ( !param ) 400088a4: 80 a6 a0 00 cmp %i2, 0 400088a8: 02 80 00 10 be 400088e8 400088ac: 90 10 20 16 mov 0x16, %o0 return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 400088b0: c2 06 80 00 ld [ %i2 ], %g1 400088b4: 82 00 7f ff add %g1, -1, %g1 400088b8: 80 a0 60 fd cmp %g1, 0xfd 400088bc: 18 80 00 0b bgu 400088e8 400088c0: 80 a6 60 01 cmp %i1, 1 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 400088c4: 02 80 00 66 be 40008a5c 400088c8: a2 10 20 00 clr %l1 400088cc: 04 80 00 66 ble 40008a64 400088d0: 80 a6 60 02 cmp %i1, 2 400088d4: 02 80 00 07 be 400088f0 400088d8: 80 a6 60 03 cmp %i1, 3 400088dc: 02 80 00 41 be 400089e0 400088e0: 01 00 00 00 nop } _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 400088e4: 90 10 20 16 mov 0x16, %o0 ! 16 } 400088e8: 81 c7 e0 08 ret 400088ec: 91 e8 00 08 restore %g0, %o0, %o0 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 400088f0: a2 10 20 02 mov 2, %l1 400088f4: a4 10 20 00 clr %l2 400088f8: 92 10 00 18 mov %i0, %o1 400088fc: 11 10 00 6c sethi %hi(0x4001b000), %o0 40008900: 94 07 bf f4 add %fp, -12, %o2 40008904: 40 00 0b 37 call 4000b5e0 <_Objects_Get> 40008908: 90 12 23 d8 or %o0, 0x3d8, %o0 /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 4000890c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40008910: 80 a0 60 00 cmp %g1, 0 40008914: 12 80 00 4b bne 40008a40 40008918: b0 10 00 08 mov %o0, %i0 case OBJECTS_ERROR: case OBJECTS_REMOTE: return ESRCH; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4000891c: e0 02 21 70 ld [ %o0 + 0x170 ], %l0 if ( api->schedpolicy == SCHED_SPORADIC ) 40008920: c2 04 20 7c ld [ %l0 + 0x7c ], %g1 40008924: 80 a0 60 03 cmp %g1, 3 40008928: 02 80 00 5e be 40008aa0 4000892c: 01 00 00 00 nop (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; 40008930: f2 24 20 7c st %i1, [ %l0 + 0x7c ] api->schedparam = *param; 40008934: c6 06 80 00 ld [ %i2 ], %g3 the_thread->budget_algorithm = budget_algorithm; 40008938: e2 26 20 88 st %l1, [ %i0 + 0x88 ] if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 4000893c: c6 24 20 80 st %g3, [ %l0 + 0x80 ] 40008940: c2 06 a0 04 ld [ %i2 + 4 ], %g1 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; 40008944: e4 26 20 8c st %l2, [ %i0 + 0x8c ] if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 40008948: c2 24 20 84 st %g1, [ %l0 + 0x84 ] 4000894c: c4 06 a0 08 ld [ %i2 + 8 ], %g2 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 40008950: 80 a6 60 00 cmp %i1, 0 if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 40008954: c4 24 20 88 st %g2, [ %l0 + 0x88 ] 40008958: c2 06 a0 0c ld [ %i2 + 0xc ], %g1 4000895c: c2 24 20 8c st %g1, [ %l0 + 0x8c ] 40008960: c4 06 a0 10 ld [ %i2 + 0x10 ], %g2 40008964: c4 24 20 90 st %g2, [ %l0 + 0x90 ] 40008968: c2 06 a0 14 ld [ %i2 + 0x14 ], %g1 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 4000896c: 06 80 00 0f bl 400089a8 40008970: c2 24 20 94 st %g1, [ %l0 + 0x94 ] 40008974: 80 a6 60 02 cmp %i1, 2 40008978: 14 80 00 41 bg 40008a7c 4000897c: 80 a6 60 03 cmp %i1, 3 40008980: c6 04 20 80 ld [ %l0 + 0x80 ], %g3 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 40008984: 03 10 00 6c sethi %hi(0x4001b000), %g1 40008988: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 ! 4001b048 <_Thread_Ticks_per_timeslice> 4000898c: 92 10 20 ff mov 0xff, %o1 the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 40008990: 90 10 00 18 mov %i0, %o0 40008994: 92 22 40 03 sub %o1, %g3, %o1 switch ( api->schedpolicy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 40008998: c4 26 20 84 st %g2, [ %i0 + 0x84 ] the_thread->real_priority = 4000899c: d2 26 20 18 st %o1, [ %i0 + 0x18 ] _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 400089a0: 40 00 0e d8 call 4000c500 <_Thread_Change_priority> 400089a4: 94 10 20 01 mov 1, %o2 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400089a8: 03 10 00 6c sethi %hi(0x4001b000), %g1 400089ac: c4 00 60 f0 ld [ %g1 + 0xf0 ], %g2 ! 4001b0f0 <_Thread_Dispatch_disable_level> 400089b0: 90 10 20 00 clr %o0 400089b4: 84 00 bf ff add %g2, -1, %g2 400089b8: c4 20 60 f0 st %g2, [ %g1 + 0xf0 ] 400089bc: c6 00 60 f0 ld [ %g1 + 0xf0 ], %g3 400089c0: 80 a0 e0 00 cmp %g3, 0 400089c4: 12 bf ff c9 bne 400088e8 400089c8: 01 00 00 00 nop _Thread_Dispatch(); 400089cc: 40 00 0f f1 call 4000c990 <_Thread_Dispatch> 400089d0: 01 00 00 00 nop 400089d4: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 400089d8: 81 c7 e0 08 ret 400089dc: 91 e8 00 08 restore %g0, %o0, %o0 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 ) < 400089e0: 40 00 14 80 call 4000dbe0 <_Timespec_To_ticks> 400089e4: 90 06 a0 08 add %i2, 8, %o0 400089e8: a0 10 00 08 mov %o0, %l0 400089ec: 40 00 14 7d call 4000dbe0 <_Timespec_To_ticks> 400089f0: 90 06 a0 10 add %i2, 0x10, %o0 400089f4: 80 a4 00 08 cmp %l0, %o0 400089f8: 2a bf ff bc bcs,a 400088e8 400089fc: 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 ) ) 40008a00: c2 06 a0 04 ld [ %i2 + 4 ], %g1 40008a04: 82 00 7f ff add %g1, -1, %g1 40008a08: 80 a0 60 fd cmp %g1, 0xfd 40008a0c: 18 bf ff b6 bgu 400088e4 40008a10: 03 10 00 21 sethi %hi(0x40008400), %g1 40008a14: 92 10 00 18 mov %i0, %o1 40008a18: a4 10 63 64 or %g1, 0x364, %l2 40008a1c: 11 10 00 6c sethi %hi(0x4001b000), %o0 40008a20: 94 07 bf f4 add %fp, -12, %o2 40008a24: 40 00 0a ef call 4000b5e0 <_Objects_Get> 40008a28: 90 12 23 d8 or %o0, 0x3d8, %o0 /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 40008a2c: c2 07 bf f4 ld [ %fp + -12 ], %g1 if ( _Timespec_To_ticks( ¶m->ss_replenish_period ) < _Timespec_To_ticks( ¶m->ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) 40008a30: a2 10 20 03 mov 3, %l1 /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 40008a34: 80 a0 60 00 cmp %g1, 0 40008a38: 02 bf ff b9 be 4000891c 40008a3c: b0 10 00 08 mov %o0, %i0 40008a40: 80 a0 60 02 cmp %g1, 2 40008a44: 08 bf ff a9 bleu 400088e8 40008a48: 90 10 20 03 mov 3, %o0 } _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40008a4c: 40 00 00 2c call 40008afc <== NOT EXECUTED 40008a50: 01 00 00 00 nop <== NOT EXECUTED } 40008a54: 81 c7 e0 08 ret <== NOT EXECUTED 40008a58: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 40008a5c: 10 bf ff a7 b 400088f8 40008a60: a4 10 20 00 clr %l2 40008a64: 80 a6 60 00 cmp %i1, 0 40008a68: a2 10 20 01 mov 1, %l1 40008a6c: 02 bf ff a3 be 400088f8 40008a70: a4 10 20 00 clr %l2 } _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40008a74: 10 bf ff 9d b 400088e8 40008a78: 90 10 20 16 mov 0x16, %o0 api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 40008a7c: 12 bf ff cb bne 400089a8 40008a80: 01 00 00 00 nop TRUE ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 40008a84: c6 24 20 98 st %g3, [ %l0 + 0x98 ] _Watchdog_Remove( &api->Sporadic_timer ); 40008a88: 40 00 15 d3 call 4000e1d4 <_Watchdog_Remove> 40008a8c: 90 04 20 9c add %l0, 0x9c, %o0 _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 40008a90: 92 10 00 18 mov %i0, %o1 40008a94: 7f ff ff 48 call 400087b4 <_POSIX_Threads_Sporadic_budget_TSR> 40008a98: 90 10 20 00 clr %o0 40008a9c: 30 bf ff c3 b,a 400089a8 return ESRCH; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 40008aa0: 40 00 15 cd call 4000e1d4 <_Watchdog_Remove> 40008aa4: 90 04 20 9c add %l0, 0x9c, %o0 api->schedpolicy = policy; 40008aa8: 10 bf ff a3 b 40008934 40008aac: f2 24 20 7c st %i1, [ %l0 + 0x7c ] 40005d08 : int pthread_setspecific( pthread_key_t key, const void *value ) { 40005d08: 9d e3 bf 90 save %sp, -112, %sp 40005d0c: 11 10 00 60 sethi %hi(0x40018000), %o0 40005d10: 92 10 00 18 mov %i0, %o1 40005d14: 90 12 22 00 or %o0, 0x200, %o0 40005d18: 40 00 0d 22 call 400091a0 <_Objects_Get> 40005d1c: 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 ) { 40005d20: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005d24: 80 a0 60 00 cmp %g1, 0 40005d28: 12 80 00 19 bne 40005d8c 40005d2c: 80 a0 60 02 cmp %g1, 2 case OBJECTS_ERROR: case OBJECTS_REMOTE: /* should never happen */ return EINVAL; case OBJECTS_LOCAL: api = _Objects_Get_API( _Thread_Executing->Object.id ); 40005d30: 03 10 00 5f sethi %hi(0x40017c00), %g1 40005d34: c4 00 61 dc ld [ %g1 + 0x1dc ], %g2 ! 40017ddc <_Thread_Executing> 40005d38: c6 00 a0 08 ld [ %g2 + 8 ], %g3 index = _Objects_Get_index( _Thread_Executing->Object.id ); the_key->Values[ api ][ index ] = (void *) value; 40005d3c: 05 00 00 3f sethi %hi(0xfc00), %g2 40005d40: 83 30 e0 16 srl %g3, 0x16, %g1 40005d44: 82 08 60 1c and %g1, 0x1c, %g1 40005d48: 82 00 40 08 add %g1, %o0, %g1 40005d4c: c8 00 60 18 ld [ %g1 + 0x18 ], %g4 40005d50: 84 10 a3 ff or %g2, 0x3ff, %g2 40005d54: 86 08 c0 02 and %g3, %g2, %g3 40005d58: 87 28 e0 02 sll %g3, 2, %g3 40005d5c: f2 21 00 03 st %i1, [ %g4 + %g3 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40005d60: 07 10 00 5f sethi %hi(0x40017c00), %g3 40005d64: c2 00 e1 00 ld [ %g3 + 0x100 ], %g1 ! 40017d00 <_Thread_Dispatch_disable_level> 40005d68: 90 10 20 00 clr %o0 40005d6c: 82 00 7f ff add %g1, -1, %g1 40005d70: c2 20 e1 00 st %g1, [ %g3 + 0x100 ] 40005d74: c4 00 e1 00 ld [ %g3 + 0x100 ], %g2 40005d78: 80 a0 a0 00 cmp %g2, 0 40005d7c: 02 80 00 0a be 40005da4 40005d80: 01 00 00 00 nop _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40005d84: 81 c7 e0 08 ret 40005d88: 91 e8 00 08 restore %g0, %o0, %o0 uint32_t api; uint32_t index; Objects_Locations location; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 40005d8c: 08 bf ff fe bleu 40005d84 40005d90: 90 10 20 16 mov 0x16, %o0 index = _Objects_Get_index( _Thread_Executing->Object.id ); the_key->Values[ api ][ index ] = (void *) value; _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40005d94: 40 00 02 4a call 400066bc <== NOT EXECUTED 40005d98: 01 00 00 00 nop <== NOT EXECUTED } 40005d9c: 81 c7 e0 08 ret <== NOT EXECUTED 40005da0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 40005da4: 40 00 11 eb call 4000a550 <_Thread_Dispatch> 40005da8: 01 00 00 00 nop 40005dac: 90 10 20 00 clr %o0 ! 0 40005db0: 81 c7 e0 08 ret 40005db4: 91 e8 00 08 restore %g0, %o0, %o0 40005908 : */ int pthread_spin_destroy( pthread_spinlock_t *spinlock ) { 40005908: 9d e3 bf 90 save %sp, -112, %sp POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; if ( !spinlock ) 4000590c: 80 a6 20 00 cmp %i0, 0 40005910: 02 80 00 23 be 4000599c 40005914: 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( 40005918: d2 06 00 00 ld [ %i0 ], %o1 4000591c: 31 10 00 54 sethi %hi(0x40015000), %i0 40005920: 40 00 0c 4e call 40008a58 <_Objects_Get> 40005924: 90 16 22 e4 or %i0, 0x2e4, %o0 ! 400152e4 <_POSIX_Spinlock_Information> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 40005928: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000592c: 80 a0 60 00 cmp %g1, 0 40005930: 12 80 00 14 bne 40005980 40005934: 92 10 00 08 mov %o0, %o1 RTEMS_INLINE_ROUTINE boolean _CORE_spinlock_Is_busy( CORE_spinlock_Control *the_spinlock ) { return (the_spinlock->users != 0); 40005938: 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 ) ) { 4000593c: 80 a0 60 00 cmp %g1, 0 40005940: 02 80 00 1a be 400059a8 40005944: 90 16 22 e4 or %i0, 0x2e4, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40005948: 03 10 00 53 sethi %hi(0x40014c00), %g1 4000594c: c4 00 63 b0 ld [ %g1 + 0x3b0 ], %g2 ! 40014fb0 <_Thread_Dispatch_disable_level> 40005950: 90 10 20 10 mov 0x10, %o0 40005954: 84 00 bf ff add %g2, -1, %g2 40005958: c4 20 63 b0 st %g2, [ %g1 + 0x3b0 ] 4000595c: c6 00 63 b0 ld [ %g1 + 0x3b0 ], %g3 40005960: 80 a0 e0 00 cmp %g3, 0 40005964: 12 80 00 0c bne 40005994 40005968: 01 00 00 00 nop _Thread_Dispatch(); 4000596c: 40 00 11 27 call 40009e08 <_Thread_Dispatch> 40005970: 01 00 00 00 nop 40005974: 90 10 20 10 mov 0x10, %o0 ! 10 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40005978: 81 c7 e0 08 ret 4000597c: 91 e8 00 08 restore %g0, %o0, %o0 if ( !spinlock ) return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 40005980: 80 a0 60 02 cmp %g1, 2 40005984: 08 80 00 07 bleu 400059a0 40005988: 90 10 20 16 mov 0x16, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 4000598c: 40 00 00 e9 call 40005d30 <== NOT EXECUTED 40005990: 01 00 00 00 nop <== NOT EXECUTED } 40005994: 81 c7 e0 08 ret 40005998: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 4000599c: 90 10 20 16 mov 0x16, %o0 } 400059a0: 81 c7 e0 08 ret 400059a4: 91 e8 00 08 restore %g0, %o0, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 400059a8: c2 02 60 08 ld [ %o1 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400059ac: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 400059b0: 05 00 00 3f sethi %hi(0xfc00), %g2 400059b4: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 400059b8: 82 08 40 02 and %g1, %g2, %g1 400059bc: 80 a0 40 03 cmp %g1, %g3 400059c0: 18 80 00 04 bgu 400059d0 400059c4: 83 28 60 02 sll %g1, 2, %g1 information->local_table[ index ] = the_object; 400059c8: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 400059cc: 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 ); 400059d0: 40 00 0b df call 4000894c <_Objects_Free> 400059d4: c0 22 60 0c clr [ %o1 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400059d8: 03 10 00 53 sethi %hi(0x40014c00), %g1 400059dc: c4 00 63 b0 ld [ %g1 + 0x3b0 ], %g2 ! 40014fb0 <_Thread_Dispatch_disable_level> 400059e0: 90 10 20 00 clr %o0 400059e4: 84 00 bf ff add %g2, -1, %g2 400059e8: c4 20 63 b0 st %g2, [ %g1 + 0x3b0 ] 400059ec: c6 00 63 b0 ld [ %g1 + 0x3b0 ], %g3 400059f0: 80 a0 e0 00 cmp %g3, 0 400059f4: 12 bf ff e8 bne 40005994 400059f8: 01 00 00 00 nop _Thread_Dispatch(); 400059fc: 40 00 11 03 call 40009e08 <_Thread_Dispatch> 40005a00: 01 00 00 00 nop 40005a04: 10 bf ff e4 b 40005994 40005a08: 90 10 20 00 clr %o0 ! 0 40005a0c : int pthread_spin_init( pthread_spinlock_t *spinlock, int pshared ) { 40005a0c: 9d e3 bf 90 save %sp, -112, %sp POSIX_Spinlock_Control *the_spinlock; CORE_spinlock_Attributes attributes; if ( !spinlock ) 40005a10: 80 a6 20 00 cmp %i0, 0 40005a14: 02 80 00 1a be 40005a7c 40005a18: 80 a6 60 00 cmp %i1, 0 return EINVAL; switch ( pshared ) { 40005a1c: 32 80 00 16 bne,a 40005a74 40005a20: b0 10 20 16 mov 0x16, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40005a24: 21 10 00 53 sethi %hi(0x40014c00), %l0 40005a28: c2 04 23 b0 ld [ %l0 + 0x3b0 ], %g1 ! 40014fb0 <_Thread_Dispatch_disable_level> 40005a2c: 82 00 60 01 inc %g1 40005a30: c2 24 23 b0 st %g1, [ %l0 + 0x3b0 ] * 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 *) 40005a34: 23 10 00 54 sethi %hi(0x40015000), %l1 40005a38: 40 00 0a b7 call 40008514 <_Objects_Allocate> 40005a3c: 90 14 62 e4 or %l1, 0x2e4, %o0 ! 400152e4 <_POSIX_Spinlock_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_spinlock = _POSIX_Spinlock_Allocate(); if ( !the_spinlock ) { 40005a40: b2 92 20 00 orcc %o0, 0, %i1 40005a44: 12 80 00 11 bne 40005a88 40005a48: 90 06 60 10 add %i1, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40005a4c: c2 04 23 b0 ld [ %l0 + 0x3b0 ], %g1 40005a50: b0 10 20 0b mov 0xb, %i0 _Thread_Dispatch(); 40005a54: 82 00 7f ff add %g1, -1, %g1 40005a58: c2 24 23 b0 st %g1, [ %l0 + 0x3b0 ] 40005a5c: c4 04 23 b0 ld [ %l0 + 0x3b0 ], %g2 40005a60: 80 a0 a0 00 cmp %g2, 0 40005a64: 12 80 00 07 bne 40005a80 40005a68: 01 00 00 00 nop 40005a6c: 40 00 10 e7 call 40009e08 <_Thread_Dispatch> 40005a70: 01 00 00 00 nop 40005a74: 81 c7 e0 08 ret 40005a78: 81 e8 00 00 restore 40005a7c: b0 10 20 16 mov 0x16, %i0 *spinlock = the_spinlock->Object.id; _Thread_Enable_dispatch(); return 0; } 40005a80: 81 c7 e0 08 ret 40005a84: 81 e8 00 00 restore if ( !the_spinlock ) { _Thread_Enable_dispatch(); return EAGAIN; } _CORE_spinlock_Initialize( &the_spinlock->Spinlock, &attributes ); 40005a88: 40 00 08 76 call 40007c60 <_CORE_spinlock_Initialize> 40005a8c: 92 07 bf f4 add %fp, -12, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40005a90: 90 14 62 e4 or %l1, 0x2e4, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 40005a94: c6 06 60 08 ld [ %i1 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40005a98: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 40005a9c: 03 00 00 3f sethi %hi(0xfc00), %g1 40005aa0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40005aa4: 82 08 c0 01 and %g3, %g1, %g1 40005aa8: 80 a0 40 02 cmp %g1, %g2 40005aac: 38 80 00 06 bgu,a 40005ac4 40005ab0: c6 26 00 00 st %g3, [ %i0 ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40005ab4: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40005ab8: 83 28 60 02 sll %g1, 2, %g1 40005abc: f2 20 80 01 st %i1, [ %g2 + %g1 ] &_POSIX_Spinlock_Information, &the_spinlock->Object, 0 ); *spinlock = the_spinlock->Object.id; 40005ac0: c6 26 00 00 st %g3, [ %i0 ] 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; 40005ac4: c0 26 60 0c clr [ %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 ) 40005ac8: c2 04 23 b0 ld [ %l0 + 0x3b0 ], %g1 40005acc: 10 bf ff e2 b 40005a54 40005ad0: b0 10 20 00 clr %i0 40005ad4 : */ int pthread_spin_lock( pthread_spinlock_t *spinlock ) { 40005ad4: 9d e3 bf 90 save %sp, -112, %sp POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 40005ad8: 80 a6 20 00 cmp %i0, 0 40005adc: 02 80 00 21 be 40005b60 40005ae0: 11 10 00 54 sethi %hi(0x40015000), %o0 RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get ( pthread_spinlock_t *spinlock, Objects_Locations *location ) { return (POSIX_Spinlock_Control *) _Objects_Get( 40005ae4: d2 06 00 00 ld [ %i0 ], %o1 40005ae8: 94 07 bf f4 add %fp, -12, %o2 40005aec: 40 00 0b db call 40008a58 <_Objects_Get> 40005af0: 90 12 22 e4 or %o0, 0x2e4, %o0 return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 40005af4: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005af8: 80 a0 60 00 cmp %g1, 0 40005afc: 02 80 00 09 be 40005b20 40005b00: 92 10 20 01 mov 1, %o1 40005b04: 80 a0 60 02 cmp %g1, 2 40005b08: 08 80 00 17 bleu 40005b64 40005b0c: 90 10 20 16 mov 0x16, %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(); 40005b10: 40 00 00 88 call 40005d30 <== NOT EXECUTED 40005b14: 01 00 00 00 nop <== NOT EXECUTED } 40005b18: 81 c7 e0 08 ret <== NOT EXECUTED 40005b1c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, TRUE, 0 ); 40005b20: 94 10 20 00 clr %o2 40005b24: 40 00 08 74 call 40007cf4 <_CORE_spinlock_Wait> 40005b28: 90 02 20 10 add %o0, 0x10, %o0 40005b2c: b0 10 00 08 mov %o0, %i0 40005b30: 03 10 00 53 sethi %hi(0x40014c00), %g1 40005b34: c4 00 63 b0 ld [ %g1 + 0x3b0 ], %g2 ! 40014fb0 <_Thread_Dispatch_disable_level> 40005b38: 84 00 bf ff add %g2, -1, %g2 40005b3c: c4 20 63 b0 st %g2, [ %g1 + 0x3b0 ] 40005b40: c6 00 63 b0 ld [ %g1 + 0x3b0 ], %g3 40005b44: 80 a0 e0 00 cmp %g3, 0 40005b48: 02 80 00 09 be 40005b6c 40005b4c: 01 00 00 00 nop _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 40005b50: 40 00 00 0a call 40005b78 <_POSIX_Spinlock_Translate_core_spinlock_return_code> 40005b54: 90 10 00 18 mov %i0, %o0 } return POSIX_BOTTOM_REACHED(); } 40005b58: 81 c7 e0 08 ret 40005b5c: 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(); 40005b60: 90 10 20 16 mov 0x16, %o0 } 40005b64: 81 c7 e0 08 ret 40005b68: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 40005b6c: 40 00 10 a7 call 40009e08 <_Thread_Dispatch> 40005b70: 01 00 00 00 nop 40005b74: 30 bf ff f7 b,a 40005b50 40005ba4 : */ int pthread_spin_trylock( pthread_spinlock_t *spinlock ) { 40005ba4: 9d e3 bf 90 save %sp, -112, %sp POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 40005ba8: 80 a6 20 00 cmp %i0, 0 40005bac: 02 80 00 21 be 40005c30 40005bb0: 11 10 00 54 sethi %hi(0x40015000), %o0 40005bb4: d2 06 00 00 ld [ %i0 ], %o1 40005bb8: 94 07 bf f4 add %fp, -12, %o2 40005bbc: 40 00 0b a7 call 40008a58 <_Objects_Get> 40005bc0: 90 12 22 e4 or %o0, 0x2e4, %o0 return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 40005bc4: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005bc8: 80 a0 60 00 cmp %g1, 0 40005bcc: 02 80 00 09 be 40005bf0 40005bd0: 92 10 20 00 clr %o1 40005bd4: 80 a0 60 02 cmp %g1, 2 40005bd8: 08 80 00 17 bleu 40005c34 40005bdc: 90 10 20 16 mov 0x16, %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(); 40005be0: 40 00 00 54 call 40005d30 <== NOT EXECUTED 40005be4: 01 00 00 00 nop <== NOT EXECUTED } 40005be8: 81 c7 e0 08 ret <== NOT EXECUTED 40005bec: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, FALSE, 0 ); 40005bf0: 94 10 20 00 clr %o2 40005bf4: 40 00 08 40 call 40007cf4 <_CORE_spinlock_Wait> 40005bf8: 90 02 20 10 add %o0, 0x10, %o0 40005bfc: 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 ) 40005c00: 03 10 00 53 sethi %hi(0x40014c00), %g1 40005c04: c4 00 63 b0 ld [ %g1 + 0x3b0 ], %g2 ! 40014fb0 <_Thread_Dispatch_disable_level> 40005c08: 84 00 bf ff add %g2, -1, %g2 40005c0c: c4 20 63 b0 st %g2, [ %g1 + 0x3b0 ] 40005c10: c6 00 63 b0 ld [ %g1 + 0x3b0 ], %g3 40005c14: 80 a0 e0 00 cmp %g3, 0 40005c18: 02 80 00 09 be 40005c3c 40005c1c: 01 00 00 00 nop _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 40005c20: 7f ff ff d6 call 40005b78 <_POSIX_Spinlock_Translate_core_spinlock_return_code> 40005c24: 90 10 00 18 mov %i0, %o0 } return POSIX_BOTTOM_REACHED(); } 40005c28: 81 c7 e0 08 ret 40005c2c: 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(); 40005c30: 90 10 20 16 mov 0x16, %o0 } 40005c34: 81 c7 e0 08 ret 40005c38: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 40005c3c: 40 00 10 73 call 40009e08 <_Thread_Dispatch> 40005c40: 01 00 00 00 nop 40005c44: 30 bf ff f7 b,a 40005c20 40005c48 : */ int pthread_spin_unlock( pthread_spinlock_t *spinlock ) { 40005c48: 9d e3 bf 90 save %sp, -112, %sp POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 40005c4c: 80 a6 20 00 cmp %i0, 0 40005c50: 02 80 00 1f be 40005ccc 40005c54: 11 10 00 54 sethi %hi(0x40015000), %o0 40005c58: d2 06 00 00 ld [ %i0 ], %o1 40005c5c: 94 07 bf f4 add %fp, -12, %o2 40005c60: 40 00 0b 7e call 40008a58 <_Objects_Get> 40005c64: 90 12 22 e4 or %o0, 0x2e4, %o0 return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 40005c68: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005c6c: 80 a0 60 00 cmp %g1, 0 40005c70: 02 80 00 08 be 40005c90 40005c74: 80 a0 60 02 cmp %g1, 2 40005c78: 08 80 00 16 bleu 40005cd0 40005c7c: 90 10 20 16 mov 0x16, %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(); 40005c80: 40 00 00 2c call 40005d30 <== NOT EXECUTED 40005c84: 01 00 00 00 nop <== NOT EXECUTED } 40005c88: 81 c7 e0 08 ret <== NOT EXECUTED 40005c8c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: status = _CORE_spinlock_Release( &the_spinlock->Spinlock ); 40005c90: 40 00 07 fb call 40007c7c <_CORE_spinlock_Release> 40005c94: 90 02 20 10 add %o0, 0x10, %o0 40005c98: 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 ) 40005c9c: 03 10 00 53 sethi %hi(0x40014c00), %g1 40005ca0: c4 00 63 b0 ld [ %g1 + 0x3b0 ], %g2 ! 40014fb0 <_Thread_Dispatch_disable_level> 40005ca4: 84 00 bf ff add %g2, -1, %g2 40005ca8: c4 20 63 b0 st %g2, [ %g1 + 0x3b0 ] 40005cac: c6 00 63 b0 ld [ %g1 + 0x3b0 ], %g3 40005cb0: 80 a0 e0 00 cmp %g3, 0 40005cb4: 02 80 00 09 be 40005cd8 40005cb8: 01 00 00 00 nop _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 40005cbc: 7f ff ff af call 40005b78 <_POSIX_Spinlock_Translate_core_spinlock_return_code> 40005cc0: 90 10 00 18 mov %i0, %o0 } return POSIX_BOTTOM_REACHED(); } 40005cc4: 81 c7 e0 08 ret 40005cc8: 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(); 40005ccc: 90 10 20 16 mov 0x16, %o0 } 40005cd0: 81 c7 e0 08 ret 40005cd4: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 40005cd8: 40 00 10 4c call 40009e08 <_Thread_Dispatch> 40005cdc: 01 00 00 00 nop 40005ce0: 30 bf ff f7 b,a 40005cbc 40005e2c : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 40005e2c: 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() ) 40005e30: 03 10 00 5f sethi %hi(0x40017c00), %g1 40005e34: c4 00 61 14 ld [ %g1 + 0x114 ], %g2 ! 40017d14 <_ISR_Nest_level> 40005e38: 80 a0 a0 00 cmp %g2, 0 40005e3c: 12 80 00 17 bne 40005e98 40005e40: 21 10 00 5f sethi %hi(0x40017c00), %l0 return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 40005e44: 07 10 00 5f sethi %hi(0x40017c00), %g3 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40005e48: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 40005e4c: c4 00 e1 2c ld [ %g3 + 0x12c ], %g2 40005e50: 82 00 60 01 inc %g1 40005e54: c4 00 a1 70 ld [ %g2 + 0x170 ], %g2 40005e58: c2 24 20 50 st %g1, [ %l0 + 0x50 ] _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 40005e5c: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1 40005e60: 80 a0 60 00 cmp %g1, 0 40005e64: 12 80 00 06 bne 40005e7c 40005e68: 01 00 00 00 nop 40005e6c: c2 00 a0 d4 ld [ %g2 + 0xd4 ], %g1 40005e70: 80 a0 60 00 cmp %g1, 0 40005e74: 12 80 00 0d bne 40005ea8 40005e78: 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 ) 40005e7c: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 40005e80: 82 00 7f ff add %g1, -1, %g1 40005e84: c2 24 20 50 st %g1, [ %l0 + 0x50 ] 40005e88: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 40005e8c: 80 a0 a0 00 cmp %g2, 0 40005e90: 02 80 00 04 be 40005ea0 40005e94: 01 00 00 00 nop 40005e98: 81 c7 e0 08 ret <== NOT EXECUTED 40005e9c: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 40005ea0: 40 00 0f c8 call 40009dc0 <_Thread_Dispatch> 40005ea4: 81 e8 00 00 restore thread_support->cancelation_requested ) _POSIX_Threads_cancel_run( _Thread_Executing ); 40005ea8: 7f ff fd 5d call 4000541c <_POSIX_Threads_cancel_run> 40005eac: d0 00 e1 2c ld [ %g3 + 0x12c ], %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40005eb0: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 40005eb4: 82 00 7f ff add %g1, -1, %g1 40005eb8: c2 24 20 50 st %g1, [ %l0 + 0x50 ] 40005ebc: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 40005ec0: 80 a0 a0 00 cmp %g2, 0 40005ec4: 12 bf ff f5 bne 40005e98 40005ec8: 01 00 00 00 nop 40005ecc: 30 bf ff f5 b,a 40005ea0 400183cc : ssize_t read( int fd, void *buffer, size_t count ) { 400183cc: 9d e3 bf 98 save %sp, -104, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 400183d0: 03 10 00 66 sethi %hi(0x40019800), %g1 400183d4: c4 00 60 fc ld [ %g1 + 0xfc ], %g2 ! 400198fc ssize_t read( int fd, void *buffer, size_t count ) { 400183d8: 92 10 00 19 mov %i1, %o1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 400183dc: 80 a6 00 02 cmp %i0, %g2 400183e0: 1a 80 00 24 bcc 40018470 400183e4: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 400183e8: 03 10 00 6a sethi %hi(0x4001a800), %g1 400183ec: c6 00 61 94 ld [ %g1 + 0x194 ], %g3 ! 4001a994 400183f0: 85 2e 20 02 sll %i0, 2, %g2 400183f4: 83 2e 20 04 sll %i0, 4, %g1 400183f8: 82 20 40 02 sub %g1, %g2, %g1 400183fc: 82 00 40 18 add %g1, %i0, %g1 40018400: 83 28 60 02 sll %g1, 2, %g1 40018404: b0 00 40 03 add %g1, %g3, %i0 rtems_libio_check_is_open(iop); 40018408: c2 06 20 0c ld [ %i0 + 0xc ], %g1 4001840c: 80 88 61 00 btst 0x100, %g1 40018410: 02 80 00 18 be 40018470 40018414: 80 a6 60 00 cmp %i1, 0 rtems_libio_check_buffer( buffer ); 40018418: 02 80 00 1c be 40018488 4001841c: 80 a6 a0 00 cmp %i2, 0 rtems_libio_check_count( count ); 40018420: 02 80 00 12 be 40018468 40018424: 90 10 20 00 clr %o0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 40018428: 80 88 60 02 btst 2, %g1 4001842c: 02 80 00 17 be 40018488 40018430: 01 00 00 00 nop /* * Now process the read(). */ if ( !iop->handlers->read_h ) 40018434: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40018438: c2 00 60 08 ld [ %g1 + 8 ], %g1 4001843c: 80 a0 60 00 cmp %g1, 0 40018440: 02 80 00 18 be 400184a0 40018444: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->read_h)( iop, buffer, count ); 40018448: 9f c0 40 00 call %g1 4001844c: 90 10 00 18 mov %i0, %o0 if ( rc > 0 ) 40018450: 80 a2 20 00 cmp %o0, 0 40018454: 04 80 00 05 ble 40018468 40018458: 01 00 00 00 nop iop->offset += rc; 4001845c: c2 06 20 08 ld [ %i0 + 8 ], %g1 40018460: 82 00 40 08 add %g1, %o0, %g1 40018464: c2 26 20 08 st %g1, [ %i0 + 8 ] return rc; } 40018468: 81 c7 e0 08 ret 4001846c: 91 e8 00 08 restore %g0, %o0, %o0 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 40018470: 7f ff da 5f call 4000edec <__errno> <== NOT EXECUTED 40018474: 01 00 00 00 nop <== NOT EXECUTED 40018478: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 4001847c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40018480: 10 bf ff fa b 40018468 <== NOT EXECUTED 40018484: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 40018488: 7f ff da 59 call 4000edec <__errno> <== NOT EXECUTED 4001848c: 01 00 00 00 nop <== NOT EXECUTED 40018490: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 40018494: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40018498: 10 bf ff f4 b 40018468 <== NOT EXECUTED 4001849c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 400184a0: 7f ff da 53 call 4000edec <__errno> <== NOT EXECUTED 400184a4: 01 00 00 00 nop <== NOT EXECUTED 400184a8: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 400184ac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400184b0: 10 bf ff ee b 40018468 <== NOT EXECUTED 400184b4: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 400199d4 : /* * get next entry in a directory. */ struct dirent * readdir(dirp) register DIR *dirp; { 400199d4: 9d e3 bf 98 save %sp, -104, %sp register struct dirent *dp; if ( !dirp ) 400199d8: 80 a6 20 00 cmp %i0, 0 400199dc: 02 80 00 29 be 40019a80 400199e0: 88 10 20 00 clr %g4 400199e4: d2 06 20 0c ld [ %i0 + 0xc ], %o1 return NULL; for (;;) { if (dirp->dd_loc == 0) { 400199e8: c4 06 20 04 ld [ %i0 + 4 ], %g2 400199ec: 80 a0 a0 00 cmp %g2, 0 400199f0: 22 80 00 1b be,a 40019a5c 400199f4: d0 06 00 00 ld [ %i0 ], %o0 dirp->dd_len); if (dirp->dd_size <= 0) return NULL; } if (dirp->dd_loc >= dirp->dd_size) { 400199f8: c2 06 20 08 ld [ %i0 + 8 ], %g1 400199fc: 80 a0 40 02 cmp %g1, %g2 40019a00: 24 bf ff fa ble,a 400199e8 40019a04: c0 26 20 04 clr [ %i0 + 4 ] dirp->dd_loc = 0; continue; } dp = (struct dirent *)(dirp->dd_buf + dirp->dd_loc); 40019a08: 88 00 80 09 add %g2, %o1, %g4 if ((intptr_t)dp & 03) /* bogus pointer check */ 40019a0c: 80 89 20 03 btst 3, %g4 40019a10: 32 80 00 1c bne,a 40019a80 40019a14: 88 10 20 00 clr %g4 <== NOT EXECUTED return NULL; if (dp->d_reclen <= 0 || 40019a18: c6 11 20 08 lduh [ %g4 + 8 ], %g3 40019a1c: 80 a0 e0 00 cmp %g3, 0 40019a20: 02 80 00 17 be 40019a7c 40019a24: 9a 00 80 03 add %g2, %g3, %o5 40019a28: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40019a2c: 82 00 60 01 inc %g1 40019a30: 82 20 40 02 sub %g1, %g2, %g1 40019a34: 80 a0 c0 01 cmp %g3, %g1 40019a38: 34 80 00 12 bg,a 40019a80 40019a3c: 88 10 20 00 clr %g4 <== NOT EXECUTED dp->d_reclen > dirp->dd_len + 1 - dirp->dd_loc) return NULL; dirp->dd_loc += dp->d_reclen; 40019a40: da 26 20 04 st %o5, [ %i0 + 4 ] if (dp->d_ino == 0) 40019a44: c2 00 80 09 ld [ %g2 + %o1 ], %g1 40019a48: 80 a0 60 00 cmp %g1, 0 40019a4c: 22 bf ff e8 be,a 400199ec 40019a50: c4 06 20 04 ld [ %i0 + 4 ], %g2 <== NOT EXECUTED continue; return (dp); } } 40019a54: 81 c7 e0 08 ret 40019a58: 91 e8 00 04 restore %g0, %g4, %o0 if ( !dirp ) return NULL; for (;;) { if (dirp->dd_loc == 0) { dirp->dd_size = getdents (dirp->dd_fd, 40019a5c: 40 00 29 54 call 40023fac 40019a60: d4 06 20 10 ld [ %i0 + 0x10 ], %o2 dirp->dd_buf, dirp->dd_len); if (dirp->dd_size <= 0) 40019a64: 80 a2 20 00 cmp %o0, 0 40019a68: 04 80 00 05 ble 40019a7c 40019a6c: d0 26 20 08 st %o0, [ %i0 + 8 ] 40019a70: c4 06 20 04 ld [ %i0 + 4 ], %g2 40019a74: 10 bf ff e1 b 400199f8 40019a78: d2 06 20 0c ld [ %i0 + 0xc ], %o1 return NULL; if (dp->d_reclen <= 0 || dp->d_reclen > dirp->dd_len + 1 - dirp->dd_loc) return NULL; dirp->dd_loc += dp->d_reclen; if (dp->d_ino == 0) 40019a7c: 88 10 20 00 clr %g4 continue; return (dp); } } 40019a80: 81 c7 e0 08 ret 40019a84: 91 e8 00 04 restore %g0, %g4, %o0 40005f0c : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 40005f0c: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t loc; int result; if (!buf) 40005f10: 80 a6 60 00 cmp %i1, 0 40005f14: 02 80 00 27 be 40005fb0 40005f18: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, 0, &loc, FALSE ); 40005f1c: a0 07 bf e8 add %fp, -24, %l0 40005f20: 92 10 20 00 clr %o1 40005f24: 94 10 00 10 mov %l0, %o2 40005f28: 96 10 20 00 clr %o3 40005f2c: 7f ff f9 89 call 40004550 40005f30: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 40005f34: 80 a2 20 00 cmp %o0, 0 40005f38: 12 80 00 1c bne 40005fa8 40005f3c: c4 07 bf f0 ld [ %fp + -16 ], %g2 return -1; if ( !loc.ops->node_type_h ){ 40005f40: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40005f44: 80 a0 60 00 cmp %g1, 0 40005f48: 22 80 00 31 be,a 4000600c 40005f4c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 40005f50: 9f c0 40 00 call %g1 40005f54: 90 10 00 10 mov %l0, %o0 40005f58: 80 a2 20 04 cmp %o0, 4 40005f5c: 12 80 00 1b bne 40005fc8 40005f60: c4 07 bf f0 ld [ %fp + -16 ], %g2 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ 40005f64: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 40005f68: 80 a0 60 00 cmp %g1, 0 40005f6c: 02 80 00 27 be 40006008 40005f70: 92 10 00 19 mov %i1, %o1 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 40005f74: 94 10 00 1a mov %i2, %o2 40005f78: 9f c0 40 00 call %g1 40005f7c: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40005f80: c2 07 bf f0 ld [ %fp + -16 ], %g1 40005f84: 80 a0 60 00 cmp %g1, 0 40005f88: 02 80 00 08 be 40005fa8 40005f8c: b0 10 00 08 mov %o0, %i0 40005f90: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40005f94: 80 a0 60 00 cmp %g1, 0 40005f98: 02 80 00 26 be 40006030 40005f9c: 01 00 00 00 nop 40005fa0: 9f c0 40 00 call %g1 40005fa4: 90 10 00 10 mov %l0, %o0 return result; } 40005fa8: 81 c7 e0 08 ret 40005fac: 81 e8 00 00 restore { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); 40005fb0: 40 00 35 76 call 40013588 <__errno> <== NOT EXECUTED 40005fb4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40005fb8: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 40005fbc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40005fc0: 81 c7 e0 08 ret <== NOT EXECUTED 40005fc4: 81 e8 00 00 restore <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ rtems_filesystem_freenode( &loc ); 40005fc8: c2 07 bf f0 ld [ %fp + -16 ], %g1 40005fcc: 80 a0 60 00 cmp %g1, 0 40005fd0: 02 80 00 08 be 40005ff0 40005fd4: 01 00 00 00 nop 40005fd8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40005fdc: 80 a0 60 00 cmp %g1, 0 40005fe0: 02 80 00 04 be 40005ff0 40005fe4: 01 00 00 00 nop 40005fe8: 9f c0 40 00 call %g1 40005fec: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); 40005ff0: 40 00 35 66 call 40013588 <__errno> 40005ff4: b0 10 3f ff mov -1, %i0 40005ff8: 82 10 20 16 mov 0x16, %g1 40005ffc: c2 22 00 00 st %g1, [ %o0 ] 40006000: 81 c7 e0 08 ret 40006004: 81 e8 00 00 restore } if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); 40006008: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4000600c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006010: 02 80 00 04 be 40006020 <== NOT EXECUTED 40006014: 01 00 00 00 nop <== NOT EXECUTED 40006018: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000601c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40006020: 40 00 35 5a call 40013588 <__errno> <== NOT EXECUTED 40006024: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40006028: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000602c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40006030: 81 c7 e0 08 ret <== NOT EXECUTED 40006034: 81 e8 00 00 restore <== NOT EXECUTED 40002484 : void *realloc( void *ptr, size_t size ) { 40002484: 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())) { 40002488: 03 10 00 6b sethi %hi(0x4001ac00), %g1 <== NOT EXECUTED 4000248c: c4 00 61 40 ld [ %g1 + 0x140 ], %g2 ! 4001ad40 <_System_state_Current> <== NOT EXECUTED 40002490: 80 a0 a0 03 cmp %g2, 3 <== NOT EXECUTED 40002494: 02 80 00 10 be 400024d4 <== NOT EXECUTED 40002498: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED } /* * Continue with realloc(). */ if ( !ptr ) 4000249c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 400024a0: 02 80 00 13 be 400024ec <== NOT EXECUTED 400024a4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED return malloc( size ); if ( !size ) { 400024a8: 02 80 00 15 be 400024fc <== NOT EXECUTED 400024ac: 21 10 00 6a sethi %hi(0x4001a800), %l0 <== NOT EXECUTED memcpy(np,ptr,size); free(ptr); return np; } #endif if ( _Protected_heap_Resize_block( &RTEMS_Malloc_Heap, ptr, size ) ) { 400024b0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 400024b4: 90 14 21 a0 or %l0, 0x1a0, %o0 <== NOT EXECUTED 400024b8: 40 00 19 95 call 40008b0c <_Protected_heap_Resize_block> <== NOT EXECUTED 400024bc: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED 400024c0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400024c4: 02 80 00 13 be 40002510 <== NOT EXECUTED 400024c8: 01 00 00 00 nop <== NOT EXECUTED memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 400024cc: 81 c7 e0 08 ret <== NOT EXECUTED 400024d0: 81 e8 00 00 restore <== NOT EXECUTED /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) 400024d4: c4 00 63 60 ld [ %g1 + 0x360 ], %g2 <== NOT EXECUTED 400024d8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400024dc: 02 80 00 25 be 40002570 <== NOT EXECUTED 400024e0: 03 10 00 6b sethi %hi(0x4001ac00), %g1 <== NOT EXECUTED memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 400024e4: 81 c7 e0 08 ret <== NOT EXECUTED 400024e8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); 400024ec: 7f ff ff 95 call 40002340 <== NOT EXECUTED 400024f0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 400024f4: 81 c7 e0 08 ret <== NOT EXECUTED 400024f8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED if ( !size ) { free( ptr ); 400024fc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40002500: 7f ff ff 67 call 4000229c <== NOT EXECUTED 40002504: b0 10 20 00 clr %i0 <== NOT EXECUTED 40002508: 81 c7 e0 08 ret <== NOT EXECUTED 4000250c: 81 e8 00 00 restore <== NOT EXECUTED #endif if ( _Protected_heap_Resize_block( &RTEMS_Malloc_Heap, ptr, size ) ) { return ptr; } new_area = malloc( size ); 40002510: 7f ff ff 8c call 40002340 <== NOT EXECUTED 40002514: 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 ) { 40002518: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 4000251c: 02 bf ff f2 be 400024e4 <== NOT EXECUTED 40002520: 90 14 21 a0 or %l0, 0x1a0, %o0 <== NOT EXECUTED return (void *) 0; } if ( !_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, ptr, &old_size) ) { 40002524: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40002528: 40 00 18 dd call 4000889c <_Protected_heap_Get_block_size> <== NOT EXECUTED 4000252c: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 40002530: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40002534: 02 80 00 15 be 40002588 <== NOT EXECUTED 40002538: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED errno = EINVAL; return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 4000253c: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 40002540: 08 80 00 03 bleu 4000254c <== NOT EXECUTED 40002544: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40002548: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED 4000254c: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 40002550: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40002554: 40 00 33 fb call 4000f540 <== NOT EXECUTED 40002558: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED free( ptr ); 4000255c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40002560: 7f ff ff 4f call 4000229c <== NOT EXECUTED 40002564: b0 10 00 11 mov %l1, %i0 <== NOT EXECUTED 40002568: 81 c7 e0 08 ret <== NOT EXECUTED 4000256c: 81 e8 00 00 restore <== NOT EXECUTED if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) return (void *) 0; if (_ISR_Nest_level > 0) 40002570: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 <== NOT EXECUTED 40002574: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40002578: 02 bf ff ca be 400024a0 <== NOT EXECUTED 4000257c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 40002580: 81 c7 e0 08 ret <== NOT EXECUTED 40002584: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if ( !new_area ) { return (void *) 0; } if ( !_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; 40002588: 40 00 32 19 call 4000edec <__errno> <== NOT EXECUTED 4000258c: b0 10 20 00 clr %i0 <== NOT EXECUTED 40002590: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40002594: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40002598: 81 c7 e0 08 ret <== NOT EXECUTED 4000259c: 81 e8 00 00 restore <== NOT EXECUTED 40019a88 : #include int rmdir( const char *pathname ) { 40019a88: 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 ); 40019a8c: 92 10 20 00 clr %o1 40019a90: 90 10 00 18 mov %i0, %o0 40019a94: a0 07 bf e8 add %fp, -24, %l0 40019a98: 96 10 20 00 clr %o3 40019a9c: 7f ff ad 0d call 40004ed0 40019aa0: 94 10 00 10 mov %l0, %o2 if ( result != 0 ) 40019aa4: 80 a2 20 00 cmp %o0, 0 40019aa8: 02 80 00 04 be 40019ab8 40019aac: 90 10 20 02 mov 2, %o0 result = (*loc.handlers->rmnod_h)( &loc ); rtems_filesystem_freenode( &loc ); return result; } 40019ab0: 81 c7 e0 08 ret 40019ab4: 91 e8 3f ff restore %g0, -1, %o0 result = rtems_filesystem_evaluate_path( pathname, 0, &loc, FALSE ); if ( result != 0 ) return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); 40019ab8: 7f ff ac d6 call 40004e10 40019abc: 92 10 00 10 mov %l0, %o1 if (result != 0) { 40019ac0: 80 a2 20 00 cmp %o0, 0 40019ac4: 12 80 00 2d bne 40019b78 40019ac8: c4 07 bf f0 ld [ %fp + -16 ], %g2 /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 40019acc: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40019ad0: 80 a0 60 00 cmp %g1, 0 40019ad4: 22 80 00 35 be,a 40019ba8 40019ad8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ 40019adc: 9f c0 40 00 call %g1 40019ae0: 90 10 00 10 mov %l0, %o0 40019ae4: 80 a2 20 01 cmp %o0, 1 40019ae8: 12 80 00 14 bne 40019b38 40019aec: c2 07 bf ec ld [ %fp + -20 ], %g1 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 40019af0: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 40019af4: 80 a0 60 00 cmp %g1, 0 40019af8: 22 80 00 37 be,a 40019bd4 40019afc: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &loc ); 40019b00: 9f c0 40 00 call %g1 40019b04: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40019b08: c2 07 bf f0 ld [ %fp + -16 ], %g1 40019b0c: 80 a0 60 00 cmp %g1, 0 40019b10: 02 80 00 08 be 40019b30 40019b14: b0 10 00 08 mov %o0, %i0 40019b18: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40019b1c: 80 a0 60 00 cmp %g1, 0 40019b20: 02 80 00 2b be 40019bcc 40019b24: 01 00 00 00 nop 40019b28: 9f c0 40 00 call %g1 40019b2c: 90 10 00 10 mov %l0, %o0 40019b30: 81 c7 e0 08 ret 40019b34: 81 e8 00 00 restore rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ rtems_filesystem_freenode( &loc ); 40019b38: c2 07 bf f0 ld [ %fp + -16 ], %g1 40019b3c: 80 a0 60 00 cmp %g1, 0 40019b40: 02 80 00 08 be 40019b60 40019b44: 01 00 00 00 nop 40019b48: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40019b4c: 80 a0 60 00 cmp %g1, 0 40019b50: 02 80 00 04 be 40019b60 40019b54: 01 00 00 00 nop 40019b58: 9f c0 40 00 call %g1 40019b5c: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 40019b60: 40 00 32 66 call 400264f8 <__errno> 40019b64: b0 10 3f ff mov -1, %i0 40019b68: 82 10 20 14 mov 0x14, %g1 40019b6c: c2 22 00 00 st %g1, [ %o0 ] 40019b70: 81 c7 e0 08 ret 40019b74: 81 e8 00 00 restore if ( result != 0 ) return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); if (result != 0) { rtems_filesystem_freenode( &loc ); 40019b78: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40019b7c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40019b80: 02 bf ff ec be 40019b30 <== NOT EXECUTED 40019b84: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40019b88: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40019b8c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40019b90: 02 bf ff e8 be 40019b30 <== NOT EXECUTED 40019b94: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40019b98: 9f c0 40 00 call %g1 <== NOT EXECUTED 40019b9c: 01 00 00 00 nop <== NOT EXECUTED 40019ba0: 81 c7 e0 08 ret <== NOT EXECUTED 40019ba4: 81 e8 00 00 restore <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ rtems_filesystem_freenode( &loc ); 40019ba8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40019bac: 02 80 00 04 be 40019bbc <== NOT EXECUTED 40019bb0: 01 00 00 00 nop <== NOT EXECUTED /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 40019bb4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40019bb8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40019bbc: 40 00 32 4f call 400264f8 <__errno> <== NOT EXECUTED 40019bc0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40019bc4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40019bc8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40019bcc: 81 c7 e0 08 ret <== NOT EXECUTED 40019bd0: 81 e8 00 00 restore <== NOT EXECUTED /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 40019bd4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40019bd8: 02 bf ff f9 be 40019bbc <== NOT EXECUTED 40019bdc: 01 00 00 00 nop <== NOT EXECUTED 40019be0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40019be4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40019be8: 12 bf ff f3 bne 40019bb4 <== NOT EXECUTED 40019bec: 01 00 00 00 nop <== NOT EXECUTED 40019bf0: 30 bf ff f3 b,a 40019bbc <== NOT EXECUTED 40019760 : sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[32] = ""; #endif return bad_buffer; } 40019760: 11 10 00 ae sethi %hi(0x4002b800), %o0 <== NOT EXECUTED 40019764: 81 c3 e0 08 retl <== NOT EXECUTED 40019768: 90 12 20 60 or %o0, 0x60, %o0 ! 4002b860 <== NOT EXECUTED 40014e84 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 40014e84: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 40014e88: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40014e8c: 40 00 00 0b call 40014eb8 <== NOT EXECUTED 40014e90: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED if (nap) 40014e94: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40014e98: 02 80 00 05 be 40014eac <== NOT EXECUTED 40014e9c: 01 00 00 00 nop <== NOT EXECUTED return nap->name; return rtems_assoc_name_bad(local_value); } 40014ea0: f0 02 00 00 ld [ %o0 ], %i0 <== NOT EXECUTED 40014ea4: 81 c7 e0 08 ret <== NOT EXECUTED 40014ea8: 81 e8 00 00 restore <== NOT EXECUTED nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 40014eac: 40 00 12 2d call 40019760 <== NOT EXECUTED 40014eb0: 91 e8 00 19 restore %g0, %i1, %o0 <== NOT EXECUTED 40014eb4: 01 00 00 00 nop 4000ed00 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4000ed00: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4000ed04: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED 4000ed08: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000ed0c: 02 80 00 1e be 4000ed84 <== NOT EXECUTED 4000ed10: 13 10 00 64 sethi %hi(0x40019000), %o1 <== NOT EXECUTED 4000ed14: 40 00 04 c4 call 40010024 <== NOT EXECUTED 4000ed18: 92 12 60 e0 or %o1, 0xe0, %o1 ! 400190e0 <_POSIX_Threads_Default_attributes+0x118> <== NOT EXECUTED 4000ed1c: 84 10 00 18 mov %i0, %g2 <== NOT EXECUTED 4000ed20: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000ed24: 12 80 00 0f bne 4000ed60 <== NOT EXECUTED 4000ed28: 86 10 20 00 clr %g3 <== NOT EXECUTED default_ap = ap++; for ( ; ap->name; ap++) 4000ed2c: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED 4000ed30: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ed34: 02 80 00 10 be 4000ed74 <== NOT EXECUTED 4000ed38: 84 06 20 0c add %i0, 0xc, %g2 <== NOT EXECUTED if (ap->local_value == local_value) 4000ed3c: c2 00 a0 04 ld [ %g2 + 4 ], %g1 <== NOT EXECUTED 4000ed40: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED 4000ed44: 02 80 00 0b be 4000ed70 <== NOT EXECUTED 4000ed48: 86 10 00 18 mov %i0, %g3 <== NOT EXECUTED const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4000ed4c: 84 00 a0 0c add %g2, 0xc, %g2 <== NOT EXECUTED 4000ed50: c2 00 80 00 ld [ %g2 ], %g1 <== NOT EXECUTED 4000ed54: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ed58: 02 80 00 09 be 4000ed7c <== NOT EXECUTED 4000ed5c: 01 00 00 00 nop <== NOT EXECUTED if (ap->local_value == local_value) 4000ed60: c2 00 a0 04 ld [ %g2 + 4 ], %g1 <== NOT EXECUTED 4000ed64: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED 4000ed68: 32 bf ff fa bne,a 4000ed50 <== NOT EXECUTED 4000ed6c: 84 00 a0 0c add %g2, 0xc, %g2 <== NOT EXECUTED const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4000ed70: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED if (ap->local_value == local_value) return ap; return default_ap; } 4000ed74: 81 c7 e0 08 ret <== NOT EXECUTED 4000ed78: 81 e8 00 00 restore <== NOT EXECUTED const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4000ed7c: 81 c7 e0 08 ret <== NOT EXECUTED 4000ed80: 91 e8 00 03 restore %g0, %g3, %o0 <== NOT EXECUTED uint32_t local_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4000ed84: 81 c7 e0 08 ret <== NOT EXECUTED 4000ed88: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000e2e0 : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 4000e2e0: 9d e3 bf 98 save %sp, -104, %sp const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4000e2e4: d0 06 00 00 ld [ %i0 ], %o0 4000e2e8: 80 a2 20 00 cmp %o0, 0 4000e2ec: 02 80 00 1e be 4000e364 4000e2f0: 13 10 00 64 sethi %hi(0x40019000), %o1 4000e2f4: 40 00 07 4c call 40010024 4000e2f8: 92 12 60 e0 or %o1, 0xe0, %o1 ! 400190e0 <_POSIX_Threads_Default_attributes+0x118> 4000e2fc: 84 10 00 18 mov %i0, %g2 4000e300: 80 a2 20 00 cmp %o0, 0 4000e304: 12 80 00 0f bne 4000e340 4000e308: 86 10 20 00 clr %g3 default_ap = ap++; for ( ; ap->name; ap++) 4000e30c: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED 4000e310: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000e314: 02 80 00 10 be 4000e354 <== NOT EXECUTED 4000e318: 84 06 20 0c add %i0, 0xc, %g2 <== NOT EXECUTED if (ap->remote_value == remote_value) 4000e31c: c2 00 a0 08 ld [ %g2 + 8 ], %g1 <== NOT EXECUTED 4000e320: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED 4000e324: 02 80 00 0b be 4000e350 <== NOT EXECUTED 4000e328: 86 10 00 18 mov %i0, %g3 <== NOT EXECUTED const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4000e32c: 84 00 a0 0c add %g2, 0xc, %g2 <== NOT EXECUTED 4000e330: c2 00 80 00 ld [ %g2 ], %g1 4000e334: 80 a0 60 00 cmp %g1, 0 4000e338: 02 80 00 09 be 4000e35c 4000e33c: 01 00 00 00 nop if (ap->remote_value == remote_value) 4000e340: c2 00 a0 08 ld [ %g2 + 8 ], %g1 4000e344: 80 a0 40 19 cmp %g1, %i1 4000e348: 32 bf ff fa bne,a 4000e330 4000e34c: 84 00 a0 0c add %g2, 0xc, %g2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4000e350: b0 10 00 02 mov %g2, %i0 if (ap->remote_value == remote_value) return ap; return default_ap; } 4000e354: 81 c7 e0 08 ret 4000e358: 81 e8 00 00 restore const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4000e35c: 81 c7 e0 08 ret 4000e360: 91 e8 00 03 restore %g0, %g3, %o0 uint32_t remote_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4000e364: 81 c7 e0 08 ret <== NOT EXECUTED 4000e368: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000e36c : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4000e36c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 4000e370: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000e374: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000e378: 40 00 02 62 call 4000ed00 <== NOT EXECUTED 4000e37c: b0 10 20 00 clr %i0 <== NOT EXECUTED if (nap) 4000e380: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000e384: 32 80 00 02 bne,a 4000e38c <== NOT EXECUTED 4000e388: f0 02 20 08 ld [ %o0 + 8 ], %i0 <== NOT EXECUTED return nap->remote_value; return 0; } 4000e38c: 81 c7 e0 08 ret <== NOT EXECUTED 4000e390: 81 e8 00 00 restore <== NOT EXECUTED 4000624c : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 4000624c: 9d e3 bf 90 save %sp, -112, %sp Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 40006250: a4 96 20 00 orcc %i0, 0, %l2 40006254: 02 80 00 20 be 400062d4 40006258: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 4000625c: 80 a6 e0 00 cmp %i3, 0 40006260: 02 80 00 1d be 400062d4 40006264: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 40006268: 80 8e 60 10 btst 0x10, %i1 4000626c: 02 80 00 39 be 40006350 40006270: 80 a6 a0 00 cmp %i2, 0 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 40006274: 02 80 00 18 be 400062d4 40006278: 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; 4000627c: c0 27 bf f0 clr [ %fp + -16 ] rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006280: 21 10 00 7c sethi %hi(0x4001f000), %l0 40006284: c2 04 23 10 ld [ %l0 + 0x310 ], %g1 ! 4001f310 <_Thread_Dispatch_disable_level> if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 40006288: f4 27 bf f4 st %i2, [ %fp + -12 ] 4000628c: 82 00 60 01 inc %g1 40006290: c2 24 23 10 st %g1, [ %l0 + 0x310 ] * 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 ); 40006294: 23 10 00 7c sethi %hi(0x4001f000), %l1 40006298: 40 00 0a 6b call 40008c44 <_Objects_Allocate> 4000629c: 90 14 61 74 or %l1, 0x174, %o0 ! 4001f174 <_Barrier_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 400062a0: b4 92 20 00 orcc %o0, 0, %i2 400062a4: 12 80 00 0e bne 400062dc 400062a8: 90 06 a0 14 add %i2, 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 ) 400062ac: c2 04 23 10 ld [ %l0 + 0x310 ], %g1 400062b0: b0 10 20 05 mov 5, %i0 400062b4: 82 00 7f ff add %g1, -1, %g1 400062b8: c2 24 23 10 st %g1, [ %l0 + 0x310 ] 400062bc: c4 04 23 10 ld [ %l0 + 0x310 ], %g2 400062c0: 80 a0 a0 00 cmp %g2, 0 400062c4: 12 80 00 21 bne 40006348 400062c8: 01 00 00 00 nop _Thread_Dispatch(); 400062cc: 40 00 10 d7 call 4000a628 <_Thread_Dispatch> 400062d0: 01 00 00 00 nop 400062d4: 81 c7 e0 08 ret 400062d8: 81 e8 00 00 restore _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 400062dc: f2 26 a0 10 st %i1, [ %i2 + 0x10 ] _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 400062e0: 40 00 07 8d call 40008114 <_CORE_barrier_Initialize> 400062e4: 92 07 bf f0 add %fp, -16, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400062e8: 90 14 61 74 or %l1, 0x174, %o0 Objects_Name name ) { uint32_t index; index = _Objects_Get_index( the_object->id ); 400062ec: c6 06 a0 08 ld [ %i2 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400062f0: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 400062f4: 03 00 00 3f sethi %hi(0xfc00), %g1 400062f8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400062fc: 82 08 c0 01 and %g3, %g1, %g1 40006300: 80 a0 40 02 cmp %g1, %g2 40006304: 38 80 00 06 bgu,a 4000631c 40006308: e4 26 a0 0c st %l2, [ %i2 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 4000630c: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40006310: 83 28 60 02 sll %g1, 2, %g1 40006314: 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; 40006318: e4 26 a0 0c st %l2, [ %i2 + 0xc ] &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 4000631c: c6 26 c0 00 st %g3, [ %i3 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006320: c2 04 23 10 ld [ %l0 + 0x310 ], %g1 40006324: b0 10 20 00 clr %i0 40006328: 82 00 7f ff add %g1, -1, %g1 4000632c: c2 24 23 10 st %g1, [ %l0 + 0x310 ] 40006330: c4 04 23 10 ld [ %l0 + 0x310 ], %g2 40006334: 80 a0 a0 00 cmp %g2, 0 40006338: 12 80 00 04 bne 40006348 4000633c: 01 00 00 00 nop _Thread_Dispatch(); 40006340: 40 00 10 ba call 4000a628 <_Thread_Dispatch> 40006344: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 40006348: 81 c7 e0 08 ret 4000634c: 81 e8 00 00 restore if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; 40006350: 82 10 20 01 mov 1, %g1 40006354: 10 bf ff cb b 40006280 40006358: c2 27 bf f0 st %g1, [ %fp + -16 ] 4000635c : */ rtems_status_code rtems_barrier_delete( rtems_id id ) { 4000635c: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 40006360: 21 10 00 7c sethi %hi(0x4001f000), %l0 40006364: 92 10 00 18 mov %i0, %o1 40006368: 94 07 bf f4 add %fp, -12, %o2 4000636c: 40 00 0b 87 call 40009188 <_Objects_Get> 40006370: 90 14 21 74 or %l0, 0x174, %o0 Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 40006374: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006378: 80 a0 60 00 cmp %g1, 0 4000637c: 12 80 00 20 bne 400063fc 40006380: b0 10 00 08 mov %o0, %i0 case OBJECTS_REMOTE: case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: _CORE_barrier_Flush( 40006384: 90 02 20 14 add %o0, 0x14, %o0 40006388: 92 10 20 00 clr %o1 4000638c: 40 00 13 1d call 4000b000 <_Thread_queue_Flush> 40006390: 94 10 20 02 mov 2, %o2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006394: 90 14 21 74 or %l0, 0x174, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40006398: c2 06 20 08 ld [ %i0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000639c: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 400063a0: 05 00 00 3f sethi %hi(0xfc00), %g2 400063a4: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 400063a8: 82 08 40 02 and %g1, %g2, %g1 400063ac: 80 a0 40 03 cmp %g1, %g3 400063b0: 38 80 00 06 bgu,a 400063c8 400063b4: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 400063b8: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 400063bc: 83 28 60 02 sll %g1, 2, %g1 400063c0: 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; 400063c4: c0 26 20 0c clr [ %i0 + 0xc ] */ RTEMS_INLINE_ROUTINE void _Barrier_Free ( Barrier_Control *the_barrier ) { _Objects_Free( &_Barrier_Information, &the_barrier->Object ); 400063c8: 40 00 0b 2d call 4000907c <_Objects_Free> 400063cc: 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 ) 400063d0: 03 10 00 7c sethi %hi(0x4001f000), %g1 400063d4: c4 00 63 10 ld [ %g1 + 0x310 ], %g2 ! 4001f310 <_Thread_Dispatch_disable_level> 400063d8: b0 10 20 00 clr %i0 400063dc: 84 00 bf ff add %g2, -1, %g2 400063e0: c4 20 63 10 st %g2, [ %g1 + 0x310 ] 400063e4: c6 00 63 10 ld [ %g1 + 0x310 ], %g3 400063e8: 80 a0 e0 00 cmp %g3, 0 400063ec: 02 80 00 09 be 40006410 400063f0: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400063f4: 81 c7 e0 08 ret 400063f8: 81 e8 00 00 restore { Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 400063fc: 80 a0 60 02 cmp %g1, 2 40006400: 08 bf ff fd bleu 400063f4 40006404: b0 10 20 04 mov 4, %i0 40006408: 81 c7 e0 08 ret <== NOT EXECUTED 4000640c: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED _Thread_Dispatch(); 40006410: 40 00 10 86 call 4000a628 <_Thread_Dispatch> 40006414: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40006418: 81 c7 e0 08 ret 4000641c: 81 e8 00 00 restore 40006458 : rtems_status_code rtems_barrier_release( rtems_id id, uint32_t *released ) { 40006458: 9d e3 bf 90 save %sp, -112, %sp 4000645c: a0 10 00 18 mov %i0, %l0 Barrier_Control *the_barrier; Objects_Locations location; if ( !released ) 40006460: 80 a6 60 00 cmp %i1, 0 40006464: 02 80 00 1f be 400064e0 40006468: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 4000646c: 11 10 00 7c sethi %hi(0x4001f000), %o0 40006470: 92 10 00 10 mov %l0, %o1 40006474: 90 12 21 74 or %o0, 0x174, %o0 40006478: 40 00 0b 44 call 40009188 <_Objects_Get> 4000647c: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 40006480: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006484: 80 a0 60 00 cmp %g1, 0 40006488: 02 80 00 07 be 400064a4 4000648c: 92 10 00 10 mov %l0, %o1 40006490: 80 a0 60 02 cmp %g1, 2 40006494: 08 80 00 13 bleu 400064e0 40006498: b0 10 20 04 mov 4, %i0 4000649c: 81 c7 e0 08 ret <== NOT EXECUTED 400064a0: 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 ); 400064a4: 94 10 20 00 clr %o2 400064a8: 40 00 07 27 call 40008144 <_CORE_barrier_Release> 400064ac: 90 02 20 14 add %o0, 0x14, %o0 400064b0: 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 ) 400064b4: 03 10 00 7c sethi %hi(0x4001f000), %g1 400064b8: c4 00 63 10 ld [ %g1 + 0x310 ], %g2 ! 4001f310 <_Thread_Dispatch_disable_level> 400064bc: b0 10 20 00 clr %i0 400064c0: 84 00 bf ff add %g2, -1, %g2 400064c4: c4 20 63 10 st %g2, [ %g1 + 0x310 ] 400064c8: c6 00 63 10 ld [ %g1 + 0x310 ], %g3 400064cc: 80 a0 e0 00 cmp %g3, 0 400064d0: 12 80 00 04 bne 400064e0 400064d4: 01 00 00 00 nop _Thread_Dispatch(); 400064d8: 40 00 10 54 call 4000a628 <_Thread_Dispatch> 400064dc: 01 00 00 00 nop return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400064e0: 81 c7 e0 08 ret 400064e4: 81 e8 00 00 restore 400064e8 : rtems_status_code rtems_barrier_wait( rtems_id id, rtems_interval timeout ) { 400064e8: 9d e3 bf 90 save %sp, -112, %sp 400064ec: 11 10 00 7c sethi %hi(0x4001f000), %o0 400064f0: 92 10 00 18 mov %i0, %o1 400064f4: 90 12 21 74 or %o0, 0x174, %o0 400064f8: 40 00 0b 24 call 40009188 <_Objects_Get> 400064fc: 94 07 bf f4 add %fp, -12, %o2 Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 40006500: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006504: 80 a0 60 00 cmp %g1, 0 40006508: 12 80 00 14 bne 40006558 4000650c: 96 10 00 19 mov %i1, %o3 case OBJECTS_REMOTE: case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: _CORE_barrier_Wait( 40006510: 90 02 20 14 add %o0, 0x14, %o0 40006514: 92 10 00 18 mov %i0, %o1 40006518: 94 10 20 01 mov 1, %o2 4000651c: 40 00 07 15 call 40008170 <_CORE_barrier_Wait> 40006520: 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 ) 40006524: 03 10 00 7c sethi %hi(0x4001f000), %g1 40006528: c4 00 63 10 ld [ %g1 + 0x310 ], %g2 ! 4001f310 <_Thread_Dispatch_disable_level> 4000652c: 84 00 bf ff add %g2, -1, %g2 40006530: c4 20 63 10 st %g2, [ %g1 + 0x310 ] 40006534: c6 00 63 10 ld [ %g1 + 0x310 ], %g3 40006538: 80 a0 e0 00 cmp %g3, 0 4000653c: 02 80 00 0d be 40006570 40006540: 03 10 00 7c sethi %hi(0x4001f000), %g1 TRUE, timeout, NULL ); _Thread_Enable_dispatch(); return _Barrier_Translate_core_barrier_return_code( 40006544: c4 00 63 ec ld [ %g1 + 0x3ec ], %g2 ! 4001f3ec <_Thread_Executing> <== NOT EXECUTED 40006548: 40 00 1f 95 call 4000e39c <_Barrier_Translate_core_barrier_return_code> <== NOT EXECUTED 4000654c: d0 00 a0 34 ld [ %g2 + 0x34 ], %o0 <== NOT EXECUTED _Thread_Executing->Wait.return_code ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40006550: 81 c7 e0 08 ret 40006554: 91 e8 00 08 restore %g0, %o0, %o0 { Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 40006558: 80 a0 60 02 cmp %g1, 2 4000655c: 08 bf ff fd bleu 40006550 40006560: 90 10 20 04 mov 4, %o0 40006564: 90 10 20 19 mov 0x19, %o0 <== NOT EXECUTED _Thread_Executing->Wait.return_code ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40006568: 81 c7 e0 08 ret <== NOT EXECUTED 4000656c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 40006570: 40 00 10 2e call 4000a628 <_Thread_Dispatch> 40006574: 01 00 00 00 nop TRUE, timeout, NULL ); _Thread_Enable_dispatch(); return _Barrier_Translate_core_barrier_return_code( 40006578: 03 10 00 7c sethi %hi(0x4001f000), %g1 4000657c: c4 00 63 ec ld [ %g1 + 0x3ec ], %g2 ! 4001f3ec <_Thread_Executing> 40006580: 40 00 1f 87 call 4000e39c <_Barrier_Translate_core_barrier_return_code> 40006584: d0 00 a0 34 ld [ %g2 + 0x34 ], %o0 40006588: 30 bf ff f2 b,a 40006550 40005260 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 40005260: 9d e3 bf 60 save %sp, -160, %sp 40005264: 82 10 00 18 mov %i0, %g1 if ( !time_buffer ) 40005268: 80 a6 60 00 cmp %i1, 0 4000526c: 02 80 00 19 be 400052d0 40005270: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; switch ( option ) { 40005274: 80 a0 60 04 cmp %g1, 4 40005278: 18 80 00 16 bgu 400052d0 4000527c: b0 10 20 19 mov 0x19, %i0 40005280: 83 28 60 02 sll %g1, 2, %g1 40005284: 05 10 00 14 sethi %hi(0x40005000), %g2 40005288: 84 10 a2 4c or %g2, 0x24c, %g2 ! 4000524c 4000528c: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40005290: 81 c0 c0 00 jmp %g3 40005294: 01 00 00 00 nop } case RTEMS_CLOCK_GET_TIME_VALUE: { struct timeval *time = (struct timeval *)time_buffer; if ( !_TOD_Is_set ) 40005298: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED 4000529c: c4 00 63 9c ld [ %g1 + 0x39c ], %g2 ! 4001ab9c <_TOD_Is_set> <== NOT EXECUTED 400052a0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400052a4: 12 80 00 46 bne 400053bc <== NOT EXECUTED 400052a8: 01 00 00 00 nop <== NOT EXECUTED } } return RTEMS_INTERNAL_ERROR; /* should never get here */ } 400052ac: 81 c7 e0 08 ret 400052b0: 91 e8 20 0b restore %g0, 0xb, %o0 } case RTEMS_CLOCK_GET_TICKS_PER_SECOND: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = TOD_MICROSECONDS_PER_SECOND / _TOD_Microseconds_per_tick; 400052b4: 03 10 00 6b sethi %hi(0x4001ac00), %g1 400052b8: d2 00 61 3c ld [ %g1 + 0x13c ], %o1 ! 4001ad3c <_TOD_Microseconds_per_tick> 400052bc: 11 00 03 d0 sethi %hi(0xf4000), %o0 400052c0: b0 10 20 00 clr %i0 400052c4: 40 00 42 f3 call 40015e90 <.udiv> 400052c8: 90 12 22 40 or %o0, 0x240, %o0 400052cc: d0 26 40 00 st %o0, [ %i1 ] 400052d0: 81 c7 e0 08 ret 400052d4: 81 e8 00 00 restore } case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = _Watchdog_Ticks_since_boot; 400052d8: 03 10 00 6b sethi %hi(0x4001ac00), %g1 400052dc: c4 00 60 e4 ld [ %g1 + 0xe4 ], %g2 ! 4001ace4 <_Watchdog_Ticks_since_boot> 400052e0: c4 26 40 00 st %g2, [ %i1 ] 400052e4: 81 c7 e0 08 ret 400052e8: 91 e8 20 00 restore %g0, 0, %o0 return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH: { rtems_interval *interval = (rtems_interval *)time_buffer; if ( !_TOD_Is_set ) 400052ec: 03 10 00 6a sethi %hi(0x4001a800), %g1 400052f0: c4 00 63 9c ld [ %g1 + 0x39c ], %g2 ! 4001ab9c <_TOD_Is_set> 400052f4: 80 a0 a0 00 cmp %g2, 0 400052f8: 02 bf ff ed be 400052ac 400052fc: 03 10 00 6b sethi %hi(0x4001ac00), %g1 return RTEMS_NOT_DEFINED; *interval = _TOD_Seconds_since_epoch; 40005300: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 ! 4001ac18 <_TOD_Now> 40005304: c4 26 40 00 st %g2, [ %i1 ] 40005308: 81 c7 e0 08 ret 4000530c: 91 e8 20 00 restore %g0, 0, %o0 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 ) 40005310: 03 10 00 6a sethi %hi(0x4001a800), %g1 40005314: c4 00 63 9c ld [ %g1 + 0x39c ], %g2 ! 4001ab9c <_TOD_Is_set> 40005318: 80 a0 a0 00 cmp %g2, 0 4000531c: 02 bf ff e4 be 400052ac 40005320: 01 00 00 00 nop ) { ISR_Level level; struct timespec now; _ISR_Disable(level); 40005324: 7f ff f2 b4 call 40001df4 40005328: 01 00 00 00 nop 4000532c: a0 10 00 08 mov %o0, %l0 _TOD_Get( &now ); 40005330: 40 00 07 97 call 4000718c <_TOD_Get> 40005334: 90 07 bf e8 add %fp, -24, %o0 _ISR_Enable(level); 40005338: 7f ff f2 b3 call 40001e04 4000533c: 90 10 00 10 mov %l0, %o0 time->tv_sec = now.tv_sec; 40005340: c2 07 bf e8 ld [ %fp + -24 ], %g1 time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 40005344: d0 07 bf ec ld [ %fp + -20 ], %o0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); time->tv_sec = now.tv_sec; 40005348: c2 27 bf f0 st %g1, [ %fp + -16 ] time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 4000534c: 40 00 42 d1 call 40015e90 <.udiv> 40005350: 92 10 23 e8 mov 0x3e8, %o1 /* Obtain the current time */ _TOD_Get_timeval( &now ); /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); 40005354: 92 07 bf c4 add %fp, -60, %o1 40005358: d0 27 bf f4 st %o0, [ %fp + -12 ] 4000535c: 40 00 28 74 call 4000f52c 40005360: 90 07 bf f0 add %fp, -16, %o0 /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; 40005364: c4 07 bf d0 ld [ %fp + -48 ], %g2 tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / _TOD_Microseconds_per_tick; 40005368: 03 10 00 6b sethi %hi(0x4001ac00), %g1 4000536c: d2 00 61 3c ld [ %g1 + 0x13c ], %o1 ! 4001ad3c <_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; 40005370: c4 26 60 08 st %g2, [ %i1 + 8 ] tmbuf->hour = time.tm_hour; 40005374: c2 07 bf cc ld [ %fp + -52 ], %g1 tmbuf->minute = time.tm_min; 40005378: c4 07 bf c8 ld [ %fp + -56 ], %g2 /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; 4000537c: c2 26 60 0c st %g1, [ %i1 + 0xc ] tmbuf->minute = time.tm_min; 40005380: c4 26 60 10 st %g2, [ %i1 + 0x10 ] /* 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; 40005384: c2 07 bf d8 ld [ %fp + -40 ], %g1 tmbuf->month = time.tm_mon + 1; 40005388: c4 07 bf d4 ld [ %fp + -44 ], %g2 tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; 4000538c: c6 07 bf c4 ld [ %fp + -60 ], %g3 tmbuf->ticks = now.tv_usec / _TOD_Microseconds_per_tick; 40005390: d0 07 bf f4 ld [ %fp + -12 ], %o0 /* 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; 40005394: 82 00 67 6c add %g1, 0x76c, %g1 tmbuf->month = time.tm_mon + 1; 40005398: 84 00 a0 01 inc %g2 tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; 4000539c: c6 26 60 14 st %g3, [ %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; 400053a0: c2 26 40 00 st %g1, [ %i1 ] tmbuf->month = time.tm_mon + 1; 400053a4: c4 26 60 04 st %g2, [ %i1 + 4 ] 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; 400053a8: 40 00 42 ba call 40015e90 <.udiv> 400053ac: b0 10 20 00 clr %i0 400053b0: d0 26 60 18 st %o0, [ %i1 + 0x18 ] 400053b4: 81 c7 e0 08 ret 400053b8: 81 e8 00 00 restore ) { ISR_Level level; struct timespec now; _ISR_Disable(level); 400053bc: 7f ff f2 8e call 40001df4 <== NOT EXECUTED 400053c0: 01 00 00 00 nop <== NOT EXECUTED 400053c4: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED _TOD_Get( &now ); 400053c8: 40 00 07 71 call 4000718c <_TOD_Get> <== NOT EXECUTED 400053cc: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED _ISR_Enable(level); 400053d0: 7f ff f2 8d call 40001e04 <== NOT EXECUTED 400053d4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED time->tv_sec = now.tv_sec; 400053d8: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 400053dc: d0 07 bf ec ld [ %fp + -20 ], %o0 <== NOT EXECUTED 400053e0: 92 10 23 e8 mov 0x3e8, %o1 <== NOT EXECUTED _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); time->tv_sec = now.tv_sec; 400053e4: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 400053e8: 40 00 42 aa call 40015e90 <.udiv> <== NOT EXECUTED 400053ec: b0 10 20 00 clr %i0 <== NOT EXECUTED 400053f0: d0 26 60 04 st %o0, [ %i1 + 4 ] <== NOT EXECUTED 400053f4: 81 c7 e0 08 ret <== NOT EXECUTED 400053f8: 81 e8 00 00 restore <== NOT EXECUTED 4000541c : * * NOTE: This routine only works for leap-years through 2099. */ rtems_status_code rtems_clock_tick( void ) { 4000541c: 9d e3 bf 98 save %sp, -104, %sp _TOD_Tickle_ticks(); 40005420: 40 00 07 83 call 4000722c <_TOD_Tickle_ticks> 40005424: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void ) { _Watchdog_Tickle( &_Watchdog_Ticks_chain ); 40005428: 11 10 00 6b sethi %hi(0x4001ac00), %o0 4000542c: 40 00 15 41 call 4000a930 <_Watchdog_Tickle> 40005430: 90 12 20 5c or %o0, 0x5c, %o0 ! 4001ac5c <_Watchdog_Ticks_chain> _Watchdog_Tickle_ticks(); _Thread_Tickle_timeslice(); 40005434: 40 00 13 65 call 4000a1c8 <_Thread_Tickle_timeslice> 40005438: 01 00 00 00 nop * otherwise. */ RTEMS_INLINE_ROUTINE boolean _Thread_Is_context_switch_necessary( void ) { return ( _Context_Switch_necessary ); 4000543c: 03 10 00 6b sethi %hi(0x4001ac00), %g1 40005440: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 ! 4001ac4c <_Context_Switch_necessary> if ( _Thread_Is_context_switch_necessary() && 40005444: 80 a0 a0 00 cmp %g2, 0 40005448: 02 80 00 06 be 40005460 4000544c: 03 10 00 6a sethi %hi(0x4001a800), %g1 * otherwise. */ RTEMS_INLINE_ROUTINE boolean _Thread_Is_dispatching_enabled( void ) { return ( _Thread_Dispatch_disable_level == 0 ); 40005450: c4 00 63 60 ld [ %g1 + 0x360 ], %g2 ! 4001ab60 <_Thread_Dispatch_disable_level> 40005454: 80 a0 a0 00 cmp %g2, 0 40005458: 02 80 00 04 be 40005468 4000545c: 01 00 00 00 nop _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 40005460: 81 c7 e0 08 ret 40005464: 91 e8 20 00 restore %g0, 0, %o0 _Thread_Tickle_timeslice(); if ( _Thread_Is_context_switch_necessary() && _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); 40005468: 40 00 0f 6b call 40009214 <_Thread_Dispatch> <== NOT EXECUTED 4000546c: b0 10 20 00 clr %i0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 40005470: 81 c7 e0 08 ret <== NOT EXECUTED 40005474: 81 e8 00 00 restore <== NOT EXECUTED 40002b34 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 40002b34: 9d e3 bf 68 save %sp, -152, %sp struct timespec uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 40002b38: 80 a6 60 00 cmp %i1, 0 40002b3c: 02 80 00 61 be 40002cc0 40002b40: 01 00 00 00 nop * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS _TOD_Get_uptime( &uptime ); 40002b44: 40 00 17 e8 call 40008ae4 <_TOD_Get_uptime> 40002b48: 90 07 bf e0 add %fp, -32, %o0 _Timespec_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 40002b4c: 92 07 bf e0 add %fp, -32, %o1 40002b50: 94 07 bf d8 add %fp, -40, %o2 40002b54: 11 10 00 9f sethi %hi(0x40027c00), %o0 40002b58: 40 00 26 25 call 4000c3ec <_Timespec_Subtract> 40002b5c: 90 12 23 24 or %o0, 0x324, %o0 ! 40027f24 } } } #endif (*print)( context, "CPU Usage by thread\n" 40002b60: 90 10 00 18 mov %i0, %o0 40002b64: 13 10 00 73 sethi %hi(0x4001cc00), %o1 40002b68: 9f c6 40 00 call %i1 40002b6c: 92 12 61 48 or %o1, 0x148, %o1 ! 4001cd48 40002b70: 03 10 00 9d sethi %hi(0x40027400), %g1 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( context, "0x%08" PRIx32 " %4s ", the_thread->Object.id, name ); 40002b74: 05 10 00 73 sethi %hi(0x4001cc00), %g2 } } } #endif (*print)( context, "CPU Usage by thread\n" 40002b78: aa 10 63 f4 or %g1, 0x3f4, %l5 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40002b7c: a8 07 bf eb add %fp, -21, %l4 /* * Print the information */ (*print)( context, 40002b80: 03 10 00 73 sethi %hi(0x4001cc00), %g1 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( context, "0x%08" PRIx32 " %4s ", the_thread->Object.id, name ); 40002b84: b4 10 a1 88 or %g2, 0x188, %i2 /* * Print the information */ (*print)( context, 40002b88: b6 10 61 a0 or %g1, 0x1a0, %i3 /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40002b8c: 39 10 00 9e sethi %hi(0x40027800), %i4 _Timespec_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timespec_Add_to( &ran, &used ); }; _Timespec_Divide( &ran, &total, &ival, &fval ); 40002b90: ba 07 bf f4 add %fp, -12, %i5 40002b94: ae 07 bf f0 add %fp, -16, %l7 40002b98: ac 07 bf d0 add %fp, -48, %l6 ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 40002b9c: c2 05 40 00 ld [ %l5 ], %g1 40002ba0: 80 a0 60 00 cmp %g1, 0 40002ba4: 22 80 00 39 be,a 40002c88 40002ba8: aa 05 60 04 add %l5, 4, %l5 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 40002bac: e6 00 60 04 ld [ %g1 + 4 ], %l3 if ( information ) { 40002bb0: 80 a4 e0 00 cmp %l3, 0 40002bb4: 22 80 00 35 be,a 40002c88 40002bb8: aa 05 60 04 add %l5, 4, %l5 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { 40002bbc: c2 14 e0 10 lduh [ %l3 + 0x10 ], %g1 40002bc0: 86 90 60 00 orcc %g1, 0, %g3 40002bc4: 22 80 00 31 be,a 40002c88 40002bc8: aa 05 60 04 add %l5, 4, %l5 40002bcc: a4 10 20 01 mov 1, %l2 the_thread = (Thread_Control *)information->local_table[ i ]; 40002bd0: c4 04 e0 20 ld [ %l3 + 0x20 ], %g2 40002bd4: 83 2c a0 02 sll %l2, 2, %g1 40002bd8: e0 00 80 01 ld [ %g2 + %g1 ], %l0 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40002bdc: 94 10 00 14 mov %l4, %o2 40002be0: 92 10 20 05 mov 5, %o1 information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 40002be4: 80 a4 20 00 cmp %l0, 0 40002be8: 02 80 00 22 be 40002c70 40002bec: a4 04 a0 01 inc %l2 continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40002bf0: d0 04 20 08 ld [ %l0 + 8 ], %o0 40002bf4: 40 00 10 bb call 40006ee0 40002bf8: a2 10 00 16 mov %l6, %l1 (*print)( context, "0x%08" PRIx32 " %4s ", the_thread->Object.id, name ); 40002bfc: d4 04 20 08 ld [ %l0 + 8 ], %o2 40002c00: 90 10 00 18 mov %i0, %o0 40002c04: 92 10 00 1a mov %i2, %o1 40002c08: 9f c6 40 00 call %i1 40002c0c: 96 10 00 14 mov %l4, %o3 #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; 40002c10: c4 1c 20 90 ldd [ %l0 + 0x90 ], %g2 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40002c14: c8 07 21 6c ld [ %i4 + 0x16c ], %g4 #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; 40002c18: c4 3f bf d0 std %g2, [ %fp + -48 ] if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40002c1c: da 01 20 08 ld [ %g4 + 8 ], %o5 40002c20: c2 04 20 08 ld [ %l0 + 8 ], %g1 40002c24: 80 a3 40 01 cmp %o5, %g1 40002c28: 02 80 00 28 be 40002cc8 40002c2c: 92 07 bf e0 add %fp, -32, %o1 _Timespec_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timespec_Add_to( &ran, &used ); }; _Timespec_Divide( &ran, &total, &ival, &fval ); 40002c30: 94 10 00 1d mov %i5, %o2 40002c34: 96 10 00 17 mov %l7, %o3 40002c38: 90 10 00 11 mov %l1, %o0 40002c3c: 40 00 25 5c call 4000c1ac <_Timespec_Divide> 40002c40: 92 07 bf d8 add %fp, -40, %o1 /* * Print the information */ (*print)( context, 40002c44: d0 07 bf d4 ld [ %fp + -44 ], %o0 40002c48: 40 00 5a d6 call 400197a0 <.udiv> 40002c4c: 92 10 23 e8 mov 0x3e8, %o1 40002c50: d4 07 bf d0 ld [ %fp + -48 ], %o2 40002c54: d8 07 bf f4 ld [ %fp + -12 ], %o4 40002c58: da 07 bf f0 ld [ %fp + -16 ], %o5 40002c5c: 96 10 00 08 mov %o0, %o3 40002c60: 92 10 00 1b mov %i3, %o1 40002c64: 9f c6 40 00 call %i1 40002c68: 90 10 00 18 mov %i0, %o0 40002c6c: c6 14 e0 10 lduh [ %l3 + 0x10 ], %g3 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 40002c70: 83 28 e0 10 sll %g3, 0x10, %g1 40002c74: 83 30 60 10 srl %g1, 0x10, %g1 40002c78: 80 a0 40 12 cmp %g1, %l2 40002c7c: 3a bf ff d6 bcc,a 40002bd4 40002c80: c4 04 e0 20 ld [ %l3 + 0x20 ], %g2 40002c84: aa 05 60 04 add %l5, 4, %l5 " ID NAME TICKS PERCENT\n" #endif ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 40002c88: 03 10 00 9e sethi %hi(0x40027800), %g1 40002c8c: 82 10 60 04 or %g1, 4, %g1 ! 40027804 <_Objects_Information_table+0x14> 40002c90: 80 a5 40 01 cmp %l5, %g1 40002c94: 32 bf ff c3 bne,a 40002ba0 40002c98: c2 05 40 00 ld [ %l5 ], %g1 } } } #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS (*print)( context, "Time since last CPU Usage reset %" PRId32 40002c9c: d0 07 bf dc ld [ %fp + -36 ], %o0 40002ca0: 40 00 5a c0 call 400197a0 <.udiv> 40002ca4: 92 10 23 e8 mov 0x3e8, %o1 40002ca8: d4 07 bf d8 ld [ %fp + -40 ], %o2 40002cac: 96 10 00 08 mov %o0, %o3 40002cb0: 13 10 00 73 sethi %hi(0x4001cc00), %o1 40002cb4: 90 10 00 18 mov %i0, %o0 40002cb8: 9f c6 40 00 call %i1 40002cbc: 92 12 61 b8 or %o1, 0x1b8, %o1 40002cc0: 81 c7 e0 08 ret 40002cc4: 81 e8 00 00 restore * 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( 40002cc8: 94 07 bf c8 add %fp, -56, %o2 40002ccc: 11 10 00 9e sethi %hi(0x40027800), %o0 40002cd0: 40 00 25 c7 call 4000c3ec <_Timespec_Subtract> 40002cd4: 90 12 21 74 or %o0, 0x174, %o0 ! 40027974 <_Thread_Time_of_last_context_switch> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timespec_Add_to( &ran, &used ); 40002cd8: 92 07 bf c8 add %fp, -56, %o1 40002cdc: 40 00 25 1a call 4000c144 <_Timespec_Add_to> 40002ce0: 90 10 00 16 mov %l6, %o0 }; _Timespec_Divide( &ran, &total, &ival, &fval ); 40002ce4: 10 bf ff d4 b 40002c34 40002ce8: 94 10 00 1d mov %i5, %o2 4000de58 : { 0, 0, 0 }, }; static int rtems_deviceio_errno(rtems_status_code code) { 4000de58: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 4000de5c: 11 10 00 68 sethi %hi(0x4001a000), %o0 <== NOT EXECUTED 4000de60: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000de64: 40 00 01 42 call 4000e36c <== NOT EXECUTED 4000de68: 90 12 21 94 or %o0, 0x194, %o0 <== NOT EXECUTED 4000de6c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4000de70: 02 80 00 05 be 4000de84 <== NOT EXECUTED 4000de74: 01 00 00 00 nop <== NOT EXECUTED { errno = rc; 4000de78: 40 00 03 dd call 4000edec <__errno> <== NOT EXECUTED 4000de7c: 01 00 00 00 nop <== NOT EXECUTED 4000de80: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED return -1; } return -1; } 4000de84: 81 c7 e0 08 ret <== NOT EXECUTED 4000de88: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 40008be8 : int rtems_error( int error_flag, const char *printf_format, ... ) { 40008be8: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); 40008bec: 94 07 a0 4c add %fp, 0x4c, %o2 <== NOT EXECUTED int rtems_error( int error_flag, const char *printf_format, ... ) { 40008bf0: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 40008bf4: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 40008bf8: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 40008bfc: 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); 40008c00: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40008c04: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40008c08: 7f ff ff 7c call 400089f8 <== NOT EXECUTED 40008c0c: d4 27 bf f4 st %o2, [ %fp + -12 ] <== NOT EXECUTED va_end(arglist); return chars_written; } 40008c10: 81 c7 e0 08 ret <== NOT EXECUTED 40008c14: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 400056b0 : rtems_status_code rtems_event_send( Objects_Id id, rtems_event_set event_in ) { 400056b0: 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 ) ) { 400056b4: 92 96 20 00 orcc %i0, 0, %o1 400056b8: 12 80 00 1c bne 40005728 400056bc: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400056c0: 23 10 00 6a sethi %hi(0x4001a800), %l1 400056c4: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 ! 4001ab60 <_Thread_Dispatch_disable_level> 400056c8: 82 00 60 01 inc %g1 400056cc: c2 24 63 60 st %g1, [ %l1 + 0x360 ] 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; 400056d0: 03 10 00 6b sethi %hi(0x4001ac00), %g1 400056d4: f0 00 60 3c ld [ %g1 + 0x3c ], %i0 ! 4001ac3c <_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; 400056d8: c0 27 bf f4 clr [ %fp + -12 ] rtems_event_set *the_event_set ) { ISR_Level level; _ISR_Disable( level ); 400056dc: 7f ff f1 c6 call 40001df4 400056e0: e0 06 21 6c ld [ %i0 + 0x16c ], %l0 *the_event_set |= the_new_events; 400056e4: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 400056e8: 82 10 40 19 or %g1, %i1, %g1 400056ec: c2 24 20 40 st %g1, [ %l0 + 0x40 ] _ISR_Enable( level ); 400056f0: 7f ff f1 c5 call 40001e04 400056f4: 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 ); 400056f8: 40 00 00 2d call 400057ac <_Event_Surrender> 400056fc: 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 ) 40005700: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 40005704: b0 10 20 00 clr %i0 40005708: 82 00 7f ff add %g1, -1, %g1 4000570c: c2 24 63 60 st %g1, [ %l1 + 0x360 ] 40005710: c4 04 63 60 ld [ %l1 + 0x360 ], %g2 40005714: 80 a0 a0 00 cmp %g2, 0 40005718: 02 80 00 0a be 40005740 4000571c: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40005720: 81 c7 e0 08 ret 40005724: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 40005728: 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 ) { 4000572c: 80 a0 a0 04 cmp %g2, 4 40005730: 08 80 00 08 bleu 40005750 40005734: 83 32 60 1b srl %o1, 0x1b, %g1 40005738: 81 c7 e0 08 ret <== NOT EXECUTED 4000573c: 91 e8 20 04 restore %g0, 4, %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 ) _Thread_Dispatch(); 40005740: 40 00 0e b5 call 40009214 <_Thread_Dispatch> 40005744: 01 00 00 00 nop 40005748: 81 c7 e0 08 ret 4000574c: 81 e8 00 00 restore *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40005750: 80 a0 60 01 cmp %g1, 1 40005754: 12 bf ff f3 bne 40005720 40005758: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 4000575c: 83 28 a0 02 sll %g2, 2, %g1 40005760: 05 10 00 6a sethi %hi(0x4001a800), %g2 40005764: 84 10 a2 c0 or %g2, 0x2c0, %g2 ! 4001aac0 <_Objects_Information_table> 40005768: c6 00 80 01 ld [ %g2 + %g1 ], %g3 4000576c: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 40005770: 80 a2 20 00 cmp %o0, 0 40005774: 02 bf ff f5 be 40005748 40005778: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 4000577c: 40 00 09 7e call 40007d74 <_Objects_Get> 40005780: 94 07 bf f4 add %fp, -12, %o2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); switch ( location ) { 40005784: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005788: b0 10 00 08 mov %o0, %i0 4000578c: 80 a0 60 00 cmp %g1, 0 40005790: 02 bf ff d3 be 400056dc 40005794: 23 10 00 6a sethi %hi(0x4001a800), %l1 40005798: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000579c: 18 bf ff e1 bgu 40005720 <== NOT EXECUTED 400057a0: b0 10 20 19 mov 0x19, %i0 <== 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 ) _Thread_Dispatch(); 400057a4: 81 c7 e0 08 ret <== NOT EXECUTED 400057a8: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED 4000daa4 : rtems_status_code rtems_extension_create( rtems_name name, rtems_extensions_table *extension_table, Objects_Id *id ) { 4000daa4: 9d e3 bf 98 save %sp, -104, %sp Extension_Control *the_extension; if ( !rtems_is_name_valid( name ) ) 4000daa8: a6 96 20 00 orcc %i0, 0, %l3 4000daac: 02 80 00 16 be 4000db04 4000dab0: b0 10 20 03 mov 3, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000dab4: 23 10 00 b2 sethi %hi(0x4002c800), %l1 4000dab8: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 ! 4002c8a0 <_Thread_Dispatch_disable_level> 4000dabc: 82 00 60 01 inc %g1 4000dac0: c2 24 60 a0 st %g1, [ %l1 + 0xa0 ] * the inactive chain of free extension control blocks. */ RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); 4000dac4: 25 10 00 b2 sethi %hi(0x4002c800), %l2 4000dac8: 40 00 03 ef call 4000ea84 <_Objects_Allocate> 4000dacc: 90 14 a3 3c or %l2, 0x33c, %o0 ! 4002cb3c <_Extension_Information> _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { 4000dad0: a0 92 20 00 orcc %o0, 0, %l0 4000dad4: 12 80 00 0e bne 4000db0c 4000dad8: 90 04 20 10 add %l0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000dadc: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 <== NOT EXECUTED 4000dae0: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED 4000dae4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000dae8: c2 24 60 a0 st %g1, [ %l1 + 0xa0 ] <== NOT EXECUTED 4000daec: c4 04 60 a0 ld [ %l1 + 0xa0 ], %g2 <== NOT EXECUTED 4000daf0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000daf4: 12 80 00 20 bne 4000db74 <== NOT EXECUTED 4000daf8: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 4000dafc: 40 00 0a 5b call 40010468 <_Thread_Dispatch> <== NOT EXECUTED 4000db00: 01 00 00 00 nop <== NOT EXECUTED 4000db04: 81 c7 e0 08 ret <== NOT EXECUTED 4000db08: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } _User_extensions_Add_set( &the_extension->Extension, extension_table ); 4000db0c: 40 00 0e df call 40011688 <_User_extensions_Add_set> 4000db10: 92 10 00 19 mov %i1, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000db14: 90 14 a3 3c or %l2, 0x33c, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 4000db18: c6 04 20 08 ld [ %l0 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000db1c: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 4000db20: 03 00 00 3f sethi %hi(0xfc00), %g1 4000db24: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000db28: 82 08 c0 01 and %g3, %g1, %g1 4000db2c: 80 a0 40 02 cmp %g1, %g2 4000db30: 38 80 00 06 bgu,a 4000db48 4000db34: e6 24 20 0c st %l3, [ %l0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 4000db38: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 4000db3c: 83 28 60 02 sll %g1, 2, %g1 4000db40: e0 20 80 01 st %l0, [ %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; 4000db44: e6 24 20 0c st %l3, [ %l0 + 0xc ] &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; 4000db48: c6 26 80 00 st %g3, [ %i2 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000db4c: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 4000db50: b0 10 20 00 clr %i0 4000db54: 82 00 7f ff add %g1, -1, %g1 4000db58: c2 24 60 a0 st %g1, [ %l1 + 0xa0 ] 4000db5c: c4 04 60 a0 ld [ %l1 + 0xa0 ], %g2 4000db60: 80 a0 a0 00 cmp %g2, 0 4000db64: 12 80 00 04 bne 4000db74 4000db68: 01 00 00 00 nop _Thread_Dispatch(); 4000db6c: 40 00 0a 3f call 40010468 <_Thread_Dispatch> 4000db70: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4000db74: 81 c7 e0 08 ret 4000db78: 81 e8 00 00 restore 4000db7c : */ rtems_status_code rtems_extension_delete( Objects_Id id ) { 4000db7c: 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 *) 4000db80: 21 10 00 b2 sethi %hi(0x4002c800), %l0 <== NOT EXECUTED 4000db84: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000db88: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 4000db8c: 40 00 05 0f call 4000efc8 <_Objects_Get> <== NOT EXECUTED 4000db90: 90 14 23 3c or %l0, 0x33c, %o0 <== NOT EXECUTED Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 4000db94: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4000db98: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000db9c: 12 80 00 1e bne 4000dc14 <== NOT EXECUTED 4000dba0: b0 10 00 08 mov %o0, %i0 <== 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 ); 4000dba4: 40 00 0e f3 call 40011770 <_User_extensions_Remove_set> <== NOT EXECUTED 4000dba8: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000dbac: 90 14 23 3c or %l0, 0x33c, %o0 <== NOT EXECUTED ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 4000dbb0: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000dbb4: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 <== NOT EXECUTED 4000dbb8: 05 00 00 3f sethi %hi(0xfc00), %g2 <== NOT EXECUTED 4000dbbc: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff <== NOT EXECUTED 4000dbc0: 82 08 40 02 and %g1, %g2, %g1 <== NOT EXECUTED 4000dbc4: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 4000dbc8: 38 80 00 06 bgu,a 4000dbe0 <== NOT EXECUTED 4000dbcc: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 4000dbd0: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 <== NOT EXECUTED 4000dbd4: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 4000dbd8: 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; 4000dbdc: 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 ); 4000dbe0: 40 00 04 b7 call 4000eebc <_Objects_Free> <== NOT EXECUTED 4000dbe4: 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 ) 4000dbe8: 03 10 00 b2 sethi %hi(0x4002c800), %g1 <== NOT EXECUTED 4000dbec: c4 00 60 a0 ld [ %g1 + 0xa0 ], %g2 ! 4002c8a0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000dbf0: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000dbf4: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED 4000dbf8: c4 20 60 a0 st %g2, [ %g1 + 0xa0 ] <== NOT EXECUTED 4000dbfc: c6 00 60 a0 ld [ %g1 + 0xa0 ], %g3 <== NOT EXECUTED 4000dc00: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 4000dc04: 02 80 00 09 be 4000dc28 <== NOT EXECUTED 4000dc08: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000dc0c: 81 c7 e0 08 ret <== NOT EXECUTED 4000dc10: 81 e8 00 00 restore <== NOT EXECUTED { Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 4000dc14: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000dc18: 08 bf ff fd bleu 4000dc0c <== NOT EXECUTED 4000dc1c: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED 4000dc20: 81 c7 e0 08 ret <== NOT EXECUTED 4000dc24: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED _Thread_Dispatch(); 4000dc28: 40 00 0a 10 call 40010468 <_Thread_Dispatch> <== NOT EXECUTED 4000dc2c: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000dc30: 81 c7 e0 08 ret <== NOT EXECUTED 4000dc34: 81 e8 00 00 restore <== NOT EXECUTED 40001f7c : int rtems_filesystem_evaluate_parent( int flags, rtems_filesystem_location_info_t *pathloc ) { 40001f7c: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t parent; int result; if ( !pathloc ) 40001f80: 80 a6 60 00 cmp %i1, 0 40001f84: 02 80 00 28 be 40002024 40001f88: 92 10 00 18 mov %i0, %o1 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) 40001f8c: c8 06 60 08 ld [ %i1 + 8 ], %g4 40001f90: da 01 00 00 ld [ %g4 ], %o5 40001f94: 80 a3 60 00 cmp %o5, 0 40001f98: 02 80 00 1d be 4000200c 40001f9c: 11 10 00 63 sethi %hi(0x40018c00), %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); parent = *pathloc; 40001fa0: c6 06 60 0c ld [ %i1 + 0xc ], %g3 40001fa4: c2 06 40 00 ld [ %i1 ], %g1 40001fa8: c4 06 60 04 ld [ %i1 + 4 ], %g2 40001fac: c2 27 bf e8 st %g1, [ %fp + -24 ] 40001fb0: c4 27 bf ec st %g2, [ %fp + -20 ] 40001fb4: c8 27 bf f0 st %g4, [ %fp + -16 ] 40001fb8: c6 27 bf f4 st %g3, [ %fp + -12 ] result = (*pathloc->ops->evalpath_h)( "..", flags, &parent ); 40001fbc: b2 07 bf e8 add %fp, -24, %i1 40001fc0: 90 12 21 10 or %o0, 0x110, %o0 40001fc4: 9f c3 40 00 call %o5 40001fc8: 94 10 00 19 mov %i1, %o2 if (result != 0){ 40001fcc: b0 92 20 00 orcc %o0, 0, %i0 40001fd0: 12 80 00 0d bne 40002004 40001fd4: c2 07 bf f0 ld [ %fp + -16 ], %g1 return -1; } rtems_filesystem_freenode( &parent ); 40001fd8: 80 a0 60 00 cmp %g1, 0 40001fdc: 02 80 00 16 be 40002034 40001fe0: 01 00 00 00 nop 40001fe4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40001fe8: 80 a0 60 00 cmp %g1, 0 40001fec: 02 80 00 12 be 40002034 40001ff0: 01 00 00 00 nop 40001ff4: 9f c0 40 00 call %g1 40001ff8: 90 10 00 19 mov %i1, %o0 return result; } 40001ffc: 81 c7 e0 08 ret 40002000: 81 e8 00 00 restore if ( !pathloc->ops->evalpath_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); parent = *pathloc; result = (*pathloc->ops->evalpath_h)( "..", flags, &parent ); if (result != 0){ 40002004: 81 c7 e0 08 ret <== NOT EXECUTED 40002008: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000200c: 40 00 33 78 call 4000edec <__errno> <== NOT EXECUTED 40002010: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002014: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40002018: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000201c: 81 c7 e0 08 ret <== NOT EXECUTED 40002020: 81 e8 00 00 restore <== NOT EXECUTED { rtems_filesystem_location_info_t parent; int result; if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 40002024: 40 00 33 72 call 4000edec <__errno> <== NOT EXECUTED 40002028: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000202c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 40002030: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40002034: 81 c7 e0 08 ret <== NOT EXECUTED 40002038: 81 e8 00 00 restore <== NOT EXECUTED 4000203c : const char *pathname, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 4000203c: 9d e3 bf 98 save %sp, -104, %sp /* * Verify Input parameters. */ if ( !pathname ) 40002040: 80 a6 20 00 cmp %i0, 0 40002044: 02 80 00 50 be 40002184 40002048: 80 a6 a0 00 cmp %i2, 0 rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 4000204c: 02 80 00 54 be 4000219c 40002050: 01 00 00 00 nop /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 40002054: c2 4e 00 00 ldsb [ %i0 ], %g1 40002058: 80 a0 60 2f cmp %g1, 0x2f 4000205c: 02 80 00 11 be 400020a0 40002060: 80 a0 60 5c cmp %g1, 0x5c 40002064: 02 80 00 0f be 400020a0 40002068: 80 a0 60 00 cmp %g1, 0 4000206c: 02 80 00 0e be 400020a4 40002070: 03 10 00 67 sethi %hi(0x40019c00), %g1 40002074: c6 00 63 20 ld [ %g1 + 0x320 ], %g3 ! 40019f20 40002078: 88 10 20 00 clr %g4 4000207c: c2 00 e0 04 ld [ %g3 + 4 ], %g1 40002080: c2 26 80 00 st %g1, [ %i2 ] 40002084: c4 00 e0 08 ld [ %g3 + 8 ], %g2 40002088: c4 26 a0 04 st %g2, [ %i2 + 4 ] 4000208c: c2 00 e0 0c ld [ %g3 + 0xc ], %g1 40002090: c2 26 a0 08 st %g1, [ %i2 + 8 ] 40002094: c4 00 e0 10 ld [ %g3 + 0x10 ], %g2 40002098: 10 80 00 0d b 400020cc 4000209c: c4 26 a0 0c st %g2, [ %i2 + 0xc ] 400020a0: 03 10 00 67 sethi %hi(0x40019c00), %g1 400020a4: c6 00 63 20 ld [ %g1 + 0x320 ], %g3 ! 40019f20 400020a8: 88 10 20 01 mov 1, %g4 400020ac: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 400020b0: c2 26 80 00 st %g1, [ %i2 ] 400020b4: c4 00 e0 18 ld [ %g3 + 0x18 ], %g2 400020b8: c4 26 a0 04 st %g2, [ %i2 + 4 ] 400020bc: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 400020c0: c2 26 a0 08 st %g1, [ %i2 + 8 ] 400020c4: c4 00 e0 20 ld [ %g3 + 0x20 ], %g2 400020c8: c4 26 a0 0c st %g2, [ %i2 + 0xc ] if ( !pathloc->ops->evalpath_h ) 400020cc: c2 06 a0 08 ld [ %i2 + 8 ], %g1 400020d0: c2 00 40 00 ld [ %g1 ], %g1 400020d4: 80 a0 60 00 cmp %g1, 0 400020d8: 02 80 00 25 be 4000216c 400020dc: 90 06 00 04 add %i0, %g4, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( &pathname[i], flags, pathloc ); 400020e0: 92 10 00 19 mov %i1, %o1 400020e4: 9f c0 40 00 call %g1 400020e8: 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 ) { 400020ec: b0 92 20 00 orcc %o0, 0, %i0 400020f0: 12 80 00 0f bne 4000212c 400020f4: 80 a6 e0 00 cmp %i3, 0 400020f8: 02 80 00 2d be 400021ac 400020fc: 01 00 00 00 nop if ( !pathloc->ops->node_type_h ){ 40002100: c4 06 a0 08 ld [ %i2 + 8 ], %g2 40002104: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40002108: 80 a0 60 00 cmp %g1, 0 4000210c: 22 80 00 13 be,a 40002158 40002110: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 40002114: 9f c0 40 00 call %g1 40002118: 90 10 00 1a mov %i2, %o0 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 4000211c: 90 02 3f fd add %o0, -3, %o0 40002120: 80 a2 20 01 cmp %o0, 1 40002124: 28 80 00 04 bleu,a 40002134 40002128: c4 06 a0 08 ld [ %i2 + 8 ], %g2 } } return result; } 4000212c: 81 c7 e0 08 ret 40002130: 81 e8 00 00 restore type = (*pathloc->ops->node_type_h)( pathloc ); if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 40002134: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1 40002138: 80 a0 60 00 cmp %g1, 0 4000213c: 02 80 00 06 be 40002154 40002140: 90 10 00 1a mov %i2, %o0 * pathloc will be passed up (and eventually released). * Hence, the (valid) originial node that we submit to * eval_link_h() should be released by the handler. */ result = (*pathloc->ops->eval_link_h)( pathloc, flags ); 40002144: 9f c0 40 00 call %g1 40002148: 92 10 00 19 mov %i1, %o1 } } return result; } 4000214c: 81 c7 e0 08 ret 40002150: 91 e8 00 08 restore %g0, %o0, %o0 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ rtems_filesystem_freenode( pathloc ); 40002154: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40002158: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000215c: 02 80 00 04 be 4000216c <== NOT EXECUTED 40002160: 01 00 00 00 nop <== NOT EXECUTED 40002164: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002168: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000216c: 40 00 33 20 call 4000edec <__errno> <== NOT EXECUTED 40002170: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002174: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40002178: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000217c: 81 c7 e0 08 ret <== NOT EXECUTED 40002180: 81 e8 00 00 restore <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 40002184: 40 00 33 1a call 4000edec <__errno> 40002188: b0 10 3f ff mov -1, %i0 4000218c: 82 10 20 0e mov 0xe, %g1 40002190: c2 22 00 00 st %g1, [ %o0 ] 40002194: 81 c7 e0 08 ret 40002198: 81 e8 00 00 restore if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 4000219c: 40 00 33 14 call 4000edec <__errno> <== NOT EXECUTED 400021a0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400021a4: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 400021a8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400021ac: 81 c7 e0 08 ret 400021b0: 81 e8 00 00 restore 4000bdd4 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 4000bdd4: 9d e3 bf 80 save %sp, -128, %sp /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 4000bdd8: 25 10 00 67 sethi %hi(0x40019c00), %l2 4000bddc: c4 04 a3 20 ld [ %l2 + 0x320 ], %g2 ! 40019f20 4000bde0: 82 10 20 12 mov 0x12, %g1 init_fs_mount_table(); 4000bde4: 40 00 01 c0 call 4000c4e4 4000bde8: c2 30 a0 24 sth %g1, [ %g2 + 0x24 ] /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 4000bdec: 03 10 00 66 sethi %hi(0x40019800), %g1 4000bdf0: c4 00 61 18 ld [ %g1 + 0x118 ], %g2 ! 40019918 4000bdf4: 80 a0 a0 00 cmp %g2, 0 4000bdf8: 02 80 00 40 be 4000bef8 4000bdfc: 03 10 00 66 sethi %hi(0x40019800), %g1 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 4000be00: c4 00 61 14 ld [ %g1 + 0x114 ], %g2 ! 40019914 status = mount( 4000be04: 90 07 bf f4 add %fp, -12, %o0 4000be08: d8 00 a0 0c ld [ %g2 + 0xc ], %o4 4000be0c: d2 00 80 00 ld [ %g2 ], %o1 4000be10: d4 00 a0 04 ld [ %g2 + 4 ], %o2 4000be14: 40 00 01 bc call 4000c504 4000be18: d6 00 a0 08 ld [ %g2 + 8 ], %o3 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 4000be1c: 80 a2 3f ff cmp %o0, -1 4000be20: 02 80 00 45 be 4000bf34 4000be24: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 4000be28: c8 07 bf f4 ld [ %fp + -12 ], %g4 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 4000be2c: c2 04 a3 20 ld [ %l2 + 0x320 ], %g1 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 4000be30: c4 01 20 18 ld [ %g4 + 0x18 ], %g2 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 4000be34: c0 30 60 26 clrh [ %g1 + 0x26 ] * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 4000be38: c4 20 60 14 st %g2, [ %g1 + 0x14 ] 4000be3c: c6 01 20 1c ld [ %g4 + 0x1c ], %g3 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000be40: a0 07 bf e4 add %fp, -28, %l0 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 4000be44: c6 20 60 18 st %g3, [ %g1 + 0x18 ] 4000be48: c4 01 20 20 ld [ %g4 + 0x20 ], %g2 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000be4c: 23 10 00 63 sethi %hi(0x40018c00), %l1 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 4000be50: c4 20 60 1c st %g2, [ %g1 + 0x1c ] 4000be54: c6 01 20 24 ld [ %g4 + 0x24 ], %g3 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000be58: 92 10 20 00 clr %o1 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 4000be5c: c6 20 60 20 st %g3, [ %g1 + 0x20 ] /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000be60: 94 10 00 10 mov %l0, %o2 4000be64: 96 10 20 00 clr %o3 4000be68: 7f ff d8 75 call 4000203c 4000be6c: 90 14 63 78 or %l1, 0x378, %o0 rtems_filesystem_root = loc; 4000be70: c4 04 a3 20 ld [ %l2 + 0x320 ], %g2 4000be74: c2 07 bf e4 ld [ %fp + -28 ], %g1 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000be78: 94 10 00 10 mov %l0, %o2 * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; 4000be7c: c2 20 a0 14 st %g1, [ %g2 + 0x14 ] 4000be80: c2 07 bf e8 ld [ %fp + -24 ], %g1 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000be84: 92 10 20 00 clr %o1 * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; 4000be88: c2 20 a0 18 st %g1, [ %g2 + 0x18 ] 4000be8c: c2 07 bf ec ld [ %fp + -20 ], %g1 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000be90: 96 10 20 00 clr %o3 * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; 4000be94: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] 4000be98: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000be9c: 90 14 63 78 or %l1, 0x378, %o0 4000bea0: 7f ff d8 67 call 4000203c 4000bea4: c2 20 a0 20 st %g1, [ %g2 + 0x20 ] rtems_filesystem_current = loc; 4000bea8: c2 07 bf e4 ld [ %fp + -28 ], %g1 4000beac: c6 04 a3 20 ld [ %l2 + 0x320 ], %g3 * * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); 4000beb0: 11 10 00 63 sethi %hi(0x40018c00), %o0 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_current = loc; 4000beb4: c2 20 e0 04 st %g1, [ %g3 + 4 ] 4000beb8: c2 07 bf e8 ld [ %fp + -24 ], %g1 * * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); 4000bebc: 90 12 23 80 or %o0, 0x380, %o0 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_current = loc; 4000bec0: c2 20 e0 08 st %g1, [ %g3 + 8 ] 4000bec4: c2 07 bf ec ld [ %fp + -20 ], %g1 * * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); 4000bec8: 92 10 21 ff mov 0x1ff, %o1 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_current = loc; 4000becc: c2 20 e0 0c st %g1, [ %g3 + 0xc ] 4000bed0: c4 07 bf f0 ld [ %fp + -16 ], %g2 * * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); 4000bed4: 40 00 01 7a call 4000c4bc 4000bed8: c4 20 e0 10 st %g2, [ %g3 + 0x10 ] if ( status != 0 ) 4000bedc: 80 a2 20 00 cmp %o0, 0 4000bee0: 02 80 00 04 be 4000bef0 4000bee4: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 rtems_fatal_error_occurred( 0xABCD0003 ); 4000bee8: 7f ff ea cc call 40006a18 <== NOT EXECUTED 4000beec: 90 12 20 03 or %o0, 3, %o0 ! abcd0003 <== NOT EXECUTED 4000bef0: 81 c7 e0 08 ret 4000bef4: 81 e8 00 00 restore /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); 4000bef8: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 4000befc: 7f ff ea c7 call 40006a18 <== NOT EXECUTED 4000bf00: 90 12 20 01 or %o0, 1, %o0 ! abcd0001 <== NOT EXECUTED mt = &rtems_filesystem_mount_table[0]; 4000bf04: 03 10 00 66 sethi %hi(0x40019800), %g1 <== NOT EXECUTED 4000bf08: c4 00 61 14 ld [ %g1 + 0x114 ], %g2 ! 40019914 <== NOT EXECUTED status = mount( 4000bf0c: 90 07 bf f4 add %fp, -12, %o0 <== NOT EXECUTED 4000bf10: d8 00 a0 0c ld [ %g2 + 0xc ], %o4 <== NOT EXECUTED 4000bf14: d2 00 80 00 ld [ %g2 ], %o1 <== NOT EXECUTED 4000bf18: d4 00 a0 04 ld [ %g2 + 4 ], %o2 <== NOT EXECUTED 4000bf1c: 40 00 01 7a call 4000c504 <== NOT EXECUTED 4000bf20: d6 00 a0 08 ld [ %g2 + 8 ], %o3 <== NOT EXECUTED &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 4000bf24: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 4000bf28: 32 bf ff c1 bne,a 4000be2c <== NOT EXECUTED 4000bf2c: c8 07 bf f4 ld [ %fp + -12 ], %g4 <== NOT EXECUTED rtems_fatal_error_occurred( 0xABCD0002 ); 4000bf30: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 4000bf34: 7f ff ea b9 call 40006a18 <== NOT EXECUTED 4000bf38: 90 12 20 02 or %o0, 2, %o0 ! abcd0002 <== NOT EXECUTED * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 4000bf3c: 10 bf ff bc b 4000be2c <== NOT EXECUTED 4000bf40: c8 07 bf f4 ld [ %fp + -12 ], %g4 <== NOT EXECUTED 40006a34 : #include const char *rtems_get_version_string(void) { return _RTEMS_version; } 40006a34: 11 10 00 66 sethi %hi(0x40019800), %o0 <== NOT EXECUTED 40006a38: 81 c3 e0 08 retl <== NOT EXECUTED 40006a3c: 90 12 20 98 or %o0, 0x98, %o0 ! 40019898 <_RTEMS_version> <== NOT EXECUTED 400067d8 : rtems_interrupt_level rtems_initialize_executive_early( rtems_configuration_table *configuration_table, rtems_cpu_table *cpu_table ) { 400067d8: 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 ); 400067dc: 7f ff ed 86 call 40001df4 400067e0: 01 00 00 00 nop 400067e4: a6 10 00 08 mov %o0, %l3 if ( configuration_table == NULL ) 400067e8: 80 a6 20 00 cmp %i0, 0 400067ec: 22 80 00 79 be,a 400069d0 400067f0: 90 10 20 00 clr %o0 <== NOT EXECUTED /* * Grab our own copy of the user's CPU table. */ _CPU_Table = *cpu_table; 400067f4: 05 10 00 6a sethi %hi(0x4001a800), %g2 RTEMS_INLINE_ROUTINE void _System_state_Handler_initialization ( boolean is_multiprocessing ) { _System_state_Current = SYSTEM_STATE_BEFORE_INITIALIZATION; _System_state_Is_multiprocessing = is_multiprocessing; 400067f8: 03 10 00 6b sethi %hi(0x4001ac00), %g1 400067fc: a4 10 a3 74 or %g2, 0x374, %l2 40006800: 94 10 20 28 mov 0x28, %o2 40006804: 92 10 00 19 mov %i1, %o1 40006808: c0 20 60 68 clr [ %g1 + 0x68 ] RTEMS_INLINE_ROUTINE void _System_state_Handler_initialization ( boolean is_multiprocessing ) { _System_state_Current = SYSTEM_STATE_BEFORE_INITIALIZATION; 4000680c: 29 10 00 6b sethi %hi(0x4001ac00), %l4 40006810: 90 10 00 12 mov %l2, %o0 40006814: 40 00 23 4b call 4000f540 40006818: c0 25 21 40 clr [ %l4 + 0x140 ] /* * Provided just for user convenience. */ _Configuration_Table = configuration_table; 4000681c: 03 10 00 6b sethi %hi(0x4001ac00), %g1 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_NO_CPU_TABLE ); _CPU_Initialize( cpu_table, _Thread_Dispatch ); 40006820: 90 10 00 19 mov %i1, %o0 40006824: 13 10 00 24 sethi %hi(0x40009000), %o1 40006828: 92 12 62 14 or %o1, 0x214, %o1 ! 40009214 <_Thread_Dispatch> 4000682c: 40 00 11 a6 call 4000aec4 <_CPU_Initialize> 40006830: f0 20 60 20 st %i0, [ %g1 + 0x20 ] /* * Do this as early as possible to insure no debugging output * is even attempted to be printed. */ _Debug_Manager_initialization(); 40006834: 40 00 1a b8 call 4000d314 <_Debug_Manager_initialization> 40006838: a2 10 20 01 mov 1, %l1 _API_extensions_Initialization(); 4000683c: 40 00 01 03 call 40006c48 <_API_extensions_Initialization> 40006840: 01 00 00 00 nop _Thread_Dispatch_initialization(); _Workspace_Handler_initialization( 40006844: d2 06 20 04 ld [ %i0 + 4 ], %o1 40006848: 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; 4000684c: 03 10 00 6a sethi %hi(0x4001a800), %g1 40006850: e2 20 63 60 st %l1, [ %g1 + 0x360 ] ! 4001ab60 <_Thread_Dispatch_disable_level> 40006854: 40 00 10 6e call 4000aa0c <_Workspace_Handler_initialization> 40006858: 21 10 00 6b sethi %hi(0x4001ac00), %l0 (void *)configuration_table->work_space_start, configuration_table->work_space_size ); _User_extensions_Handler_initialization( 4000685c: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 40006860: 40 00 0e df call 4000a3dc <_User_extensions_Handler_initialization> 40006864: d2 06 20 24 ld [ %i0 + 0x24 ], %o1 configuration_table->number_of_initial_extensions, configuration_table->User_extension_table ); _ISR_Handler_initialization(); 40006868: 40 00 03 d5 call 400077bc <_ISR_Handler_initialization> 4000686c: 01 00 00 00 nop _Objects_Handler_initialization( 40006870: 90 10 20 01 mov 1, %o0 ! 1 40006874: 92 10 20 01 mov 1, %o1 40006878: 40 00 05 d8 call 40007fd8 <_Objects_Handler_initialization> 4000687c: 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; 40006880: 05 10 00 6a sethi %hi(0x4001a800), %g2 /* * Initialize the internal allocator Mutex */ _API_Mutex_Initialization( 1 ); 40006884: 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; 40006888: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000688c: 82 10 63 a0 or %g1, 0x3a0, %g1 ! 4001aba0 <_Internal_Objects> /* * Initialize the internal allocator Mutex */ _API_Mutex_Initialization( 1 ); 40006890: 92 10 20 01 mov 1, %o1 multiprocessing_table->node, multiprocessing_table->maximum_nodes, multiprocessing_table->maximum_global_objects ); _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects; 40006894: c2 20 a2 c4 st %g1, [ %g2 + 0x2c4 ] /* * Initialize the internal allocator Mutex */ _API_Mutex_Initialization( 1 ); 40006898: 94 10 20 02 mov 2, %o2 4000689c: 96 10 20 01 mov 1, %o3 400068a0: 98 10 20 74 mov 0x74, %o4 400068a4: 9a 10 20 00 clr %o5 400068a8: 40 00 05 5a call 40007e10 <_Objects_Initialize_information> 400068ac: 90 14 20 6c or %l0, 0x6c, %o0 _API_Mutex_Allocate( _RTEMS_Allocator_Mutex ); 400068b0: 82 10 20 02 mov 2, %g1 400068b4: e2 27 bf e8 st %l1, [ %fp + -24 ] 400068b8: c2 27 bf f0 st %g1, [ %fp + -16 ] 400068bc: c0 27 bf ec clr [ %fp + -20 ] 400068c0: c0 27 bf f4 clr [ %fp + -12 ] 400068c4: 40 00 03 db call 40007830 <_Objects_Allocate> 400068c8: 90 14 20 6c or %l0, 0x6c, %o0 400068cc: 03 10 00 6b sethi %hi(0x4001ac00), %g1 400068d0: 84 10 00 08 mov %o0, %g2 400068d4: 92 07 bf e8 add %fp, -24, %o1 400068d8: c4 20 60 34 st %g2, [ %g1 + 0x34 ] 400068dc: 90 02 20 10 add %o0, 0x10, %o0 400068e0: 40 00 01 47 call 40006dfc <_CORE_mutex_Initialize> 400068e4: 94 10 20 01 mov 1, %o2 RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { size_t index; _Priority_Major_bit_map = 0; 400068e8: 03 10 00 6b sethi %hi(0x4001ac00), %g1 for ( index=0 ; index <16 ; index++ ) _Priority_Bit_map[ index ] = 0; 400068ec: 05 10 00 6b sethi %hi(0x4001ac00), %g2 RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { size_t index; _Priority_Major_bit_map = 0; 400068f0: c0 30 60 30 clrh [ %g1 + 0x30 ] for ( index=0 ; index <16 ; index++ ) _Priority_Bit_map[ index ] = 0; 400068f4: c0 30 a0 c0 clrh [ %g2 + 0xc0 ] 400068f8: 82 10 20 02 mov 2, %g1 400068fc: 84 10 a0 c0 or %g2, 0xc0, %g2 40006900: c0 30 40 02 clrh [ %g1 + %g2 ] 40006904: 82 00 60 02 add %g1, 2, %g1 RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { size_t index; _Priority_Major_bit_map = 0; for ( index=0 ; index <16 ; index++ ) 40006908: 80 a0 60 20 cmp %g1, 0x20 4000690c: 32 bf ff fe bne,a 40006904 40006910: c0 30 40 02 clrh [ %g1 + %g2 ] _Priority_Handler_initialization(); _Watchdog_Handler_initialization(); 40006914: 40 00 0f be call 4000a80c <_Watchdog_Handler_initialization> 40006918: 01 00 00 00 nop _TOD_Handler_initialization( configuration_table->microseconds_per_tick ); 4000691c: 40 00 02 35 call 400071f0 <_TOD_Handler_initialization> 40006920: d0 06 20 0c ld [ %i0 + 0xc ], %o0 _Thread_Handler_initialization( 40006924: d2 06 20 08 ld [ %i0 + 8 ], %o1 40006928: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 4000692c: 40 00 0b 01 call 40009530 <_Thread_Handler_initialization> 40006930: 94 10 20 00 clr %o2 ); #endif /* MANAGERS */ _RTEMS_API_Initialize( configuration_table ); 40006934: 40 00 00 a6 call 40006bcc <_RTEMS_API_Initialize> 40006938: 90 10 00 18 mov %i0, %o0 _Extension_Manager_initialization( configuration_table->maximum_extensions ); 4000693c: 40 00 00 2a call 400069e4 <_Extension_Manager_initialization> 40006940: d0 06 20 08 ld [ %i0 + 8 ], %o0 _IO_Manager_initialization( 40006944: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 40006948: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 4000694c: 40 00 00 4e call 40006a84 <_IO_Manager_initialization> 40006950: 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 ); 40006954: 40 00 00 7a call 40006b3c <_POSIX_API_Initialize> 40006958: 90 10 00 18 mov %i0, %o0 RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 4000695c: 82 10 20 01 mov 1, %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(); 40006960: 40 00 09 d9 call 400090c4 <_Thread_Create_idle> 40006964: c2 25 21 40 st %g1, [ %l4 + 0x140 ] /* * Scheduling can properly occur now as long as we avoid dispatching. */ if ( cpu_table->pretasking_hook ) 40006968: d0 06 40 00 ld [ %i1 ], %o0 4000696c: 80 a2 20 00 cmp %o0, 0 40006970: 02 80 00 04 be 40006980 40006974: 01 00 00 00 nop (*cpu_table->pretasking_hook)(); 40006978: 9f c2 00 00 call %o0 4000697c: 01 00 00 00 nop /* * Run the API and BSPs predriver hook. */ _API_extensions_Run_predriver(); 40006980: 40 00 00 d4 call 40006cd0 <_API_extensions_Run_predriver> 40006984: 01 00 00 00 nop if ( _CPU_Table.predriver_hook ) 40006988: c2 04 a0 04 ld [ %l2 + 4 ], %g1 4000698c: 80 a0 60 00 cmp %g1, 0 40006990: 02 80 00 04 be 400069a0 40006994: 01 00 00 00 nop (*_CPU_Table.predriver_hook)(); 40006998: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000699c: 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(); 400069a0: 40 00 00 28 call 40006a40 <_IO_Initialize_all_drivers> 400069a4: 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(); 400069a8: 40 00 00 af call 40006c64 <_API_extensions_Run_postdriver> 400069ac: 01 00 00 00 nop if ( _CPU_Table.postdriver_hook ) 400069b0: c4 04 a0 08 ld [ %l2 + 8 ], %g2 400069b4: 80 a0 a0 00 cmp %g2, 0 400069b8: 02 80 00 04 be 400069c8 400069bc: 01 00 00 00 nop (*_CPU_Table.postdriver_hook)(); 400069c0: 9f c0 80 00 call %g2 400069c4: 01 00 00 00 nop return bsp_level; } 400069c8: 81 c7 e0 08 ret 400069cc: 91 e8 00 13 restore %g0, %l3, %o0 */ _ISR_Disable( bsp_level ); if ( configuration_table == NULL ) _Internal_error_Occurred( 400069d0: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 400069d4: 40 00 03 6a call 4000777c <_Internal_error_Occurred> <== NOT EXECUTED 400069d8: 94 10 20 00 clr %o2 <== NOT EXECUTED /* * Grab our own copy of the user's CPU table. */ _CPU_Table = *cpu_table; 400069dc: 10 bf ff 87 b 400067f8 <== NOT EXECUTED 400069e0: 05 10 00 6a sethi %hi(0x4001a800), %g2 <== NOT EXECUTED 40001e14 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 40001e14: 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 ); 40001e18: 92 10 20 00 clr %o1 <== NOT EXECUTED 40001e1c: a2 07 bf e8 add %fp, -24, %l1 <== NOT EXECUTED 40001e20: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40001e24: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 40001e28: 40 00 00 85 call 4000203c <== NOT EXECUTED 40001e2c: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 40001e30: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== 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 ); 40001e34: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 40001e38: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED 40001e3c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40001e40: 12 80 00 0e bne 40001e78 <== NOT EXECUTED 40001e44: e4 07 bf e8 ld [ %fp + -24 ], %l2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40001e48: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40001e4c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001e50: 02 80 00 04 be 40001e60 <== NOT EXECUTED 40001e54: 01 00 00 00 nop <== NOT EXECUTED 40001e58: 9f c0 40 00 call %g1 <== NOT EXECUTED 40001e5c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40001e60: 40 00 33 e3 call 4000edec <__errno> <== NOT EXECUTED 40001e64: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40001e68: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40001e6c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40001e70: 81 c7 e0 08 ret <== NOT EXECUTED 40001e74: 81 e8 00 00 restore <== NOT EXECUTED } node_type = (*loc.ops->node_type_h)( &loc ); 40001e78: 9f c0 80 00 call %g2 <== NOT EXECUTED 40001e7c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 40001e80: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40001e84: 12 80 00 18 bne 40001ee4 <== NOT EXECUTED 40001e88: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40001e8c: 80 a2 20 02 cmp %o0, 2 <== NOT EXECUTED 40001e90: 12 80 00 16 bne 40001ee8 <== NOT EXECUTED 40001e94: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 40001e98: f0 26 40 00 st %i0, [ %i1 ] <== NOT EXECUTED device_info->device_name_length = strlen( name ); 40001e9c: 40 00 38 b2 call 40010164 <== NOT EXECUTED 40001ea0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40001ea4: d0 26 60 04 st %o0, [ %i1 + 4 ] <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 40001ea8: c2 04 a0 4c ld [ %l2 + 0x4c ], %g1 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 40001eac: c6 07 bf f0 ld [ %fp + -16 ], %g3 <== NOT EXECUTED return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; 40001eb0: c2 26 60 08 st %g1, [ %i1 + 8 ] <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 40001eb4: c4 04 a0 50 ld [ %l2 + 0x50 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40001eb8: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40001ebc: 02 80 00 17 be 40001f18 <== NOT EXECUTED 40001ec0: c4 26 60 0c st %g2, [ %i1 + 0xc ] <== NOT EXECUTED 40001ec4: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED 40001ec8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001ecc: 02 80 00 13 be 40001f18 <== NOT EXECUTED 40001ed0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40001ed4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40001ed8: b0 10 20 00 clr %i0 <== NOT EXECUTED 40001edc: 81 c7 e0 08 ret <== NOT EXECUTED 40001ee0: 81 e8 00 00 restore <== NOT EXECUTED } node_type = (*loc.ops->node_type_h)( &loc ); if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { rtems_filesystem_freenode( &loc ); 40001ee4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001ee8: 02 80 00 0a be 40001f10 <== NOT EXECUTED 40001eec: 01 00 00 00 nop <== NOT EXECUTED 40001ef0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40001ef4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001ef8: 02 80 00 06 be 40001f10 <== NOT EXECUTED 40001efc: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40001f00: 9f c0 40 00 call %g1 <== NOT EXECUTED 40001f04: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED 40001f08: 81 c7 e0 08 ret <== NOT EXECUTED 40001f0c: 81 e8 00 00 restore <== NOT EXECUTED device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 40001f10: 81 c7 e0 08 ret <== NOT EXECUTED 40001f14: 91 e8 20 0d restore %g0, 0xd, %o0 <== NOT EXECUTED #endif return RTEMS_SUCCESSFUL; } 40001f18: 81 c7 e0 08 ret <== NOT EXECUTED 40001f1c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40007b48 : rtems_status_code rtems_io_register_driver( rtems_device_major_number major, rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 40007b48: 9d e3 bf 98 save %sp, -104, %sp /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 40007b4c: 80 a6 60 00 cmp %i1, 0 40007b50: 02 80 00 3e be 40007c48 40007b54: 90 10 00 18 mov %i0, %o0 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) 40007b58: 80 a6 a0 00 cmp %i2, 0 40007b5c: 02 80 00 3b be 40007c48 40007b60: 01 00 00 00 nop return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 40007b64: c2 06 40 00 ld [ %i1 ], %g1 40007b68: 80 a0 60 00 cmp %g1, 0 40007b6c: 22 80 00 34 be,a 40007c3c 40007b70: c2 06 60 04 ld [ %i1 + 4 ], %g1 return RTEMS_INVALID_ADDRESS; *registered_major = 0; 40007b74: c0 26 80 00 clr [ %i2 ] /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 40007b78: 03 10 00 7c sethi %hi(0x4001f000), %g1 40007b7c: c6 00 61 6c ld [ %g1 + 0x16c ], %g3 ! 4001f16c <_IO_Number_of_drivers> 40007b80: 80 a0 c0 08 cmp %g3, %o0 40007b84: 08 80 00 43 bleu 40007c90 40007b88: b0 10 20 0a mov 0xa, %i0 /* * Test for initialise/open being present to indicate the driver slot is * in use. */ if ( major == 0 ) { 40007b8c: 80 a2 20 00 cmp %o0, 0 40007b90: 12 80 00 1f bne 40007c0c 40007b94: 03 10 00 7c sethi %hi(0x4001f000), %g1 boolean found = FALSE; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 40007b98: 90 80 ff ff addcc %g3, -1, %o0 40007b9c: 02 80 00 26 be 40007c34 40007ba0: c8 00 61 70 ld [ %g1 + 0x170 ], %g4 if ( !_IO_Driver_address_table[major].initialization_entry && 40007ba4: 85 28 e0 05 sll %g3, 5, %g2 40007ba8: 83 28 e0 03 sll %g3, 3, %g1 40007bac: 84 20 80 01 sub %g2, %g1, %g2 40007bb0: 84 00 bf e8 add %g2, -24, %g2 40007bb4: 10 80 00 04 b 40007bc4 40007bb8: 84 00 80 04 add %g2, %g4, %g2 * in use. */ if ( major == 0 ) { boolean found = FALSE; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 40007bbc: 02 80 00 1e be 40007c34 40007bc0: 84 00 bf e8 add %g2, -24, %g2 if ( !_IO_Driver_address_table[major].initialization_entry && 40007bc4: c2 00 80 00 ld [ %g2 ], %g1 40007bc8: 80 a0 60 00 cmp %g1, 0 40007bcc: 32 bf ff fc bne,a 40007bbc 40007bd0: 90 82 3f ff addcc %o0, -1, %o0 40007bd4: c2 00 a0 04 ld [ %g2 + 4 ], %g1 40007bd8: 80 a0 60 00 cmp %g1, 0 40007bdc: 32 bf ff f8 bne,a 40007bbc 40007be0: 90 82 3f ff addcc %o0, -1, %o0 <== NOT EXECUTED if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 40007be4: 85 2a 20 03 sll %o0, 3, %g2 40007be8: 83 2a 20 05 sll %o0, 5, %g1 40007bec: 82 20 40 02 sub %g1, %g2, %g1 40007bf0: 88 01 00 01 add %g4, %g1, %g4 40007bf4: c2 01 20 04 ld [ %g4 + 4 ], %g1 40007bf8: 80 a0 60 00 cmp %g1, 0 40007bfc: 22 80 00 15 be,a 40007c50 40007c00: c2 06 40 00 ld [ %i1 ], %g1 _IO_Driver_address_table[major] = *driver_table; *registered_major = major; rtems_io_initialize( major, 0, NULL ); return RTEMS_SUCCESSFUL; 40007c04: 81 c7 e0 08 ret <== NOT EXECUTED 40007c08: 91 e8 20 0c restore %g0, 0xc, %o0 <== NOT EXECUTED if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 40007c0c: c8 00 61 70 ld [ %g1 + 0x170 ], %g4 40007c10: 85 2a 20 03 sll %o0, 3, %g2 40007c14: 83 2a 20 05 sll %o0, 5, %g1 40007c18: 82 20 40 02 sub %g1, %g2, %g1 40007c1c: c6 00 40 04 ld [ %g1 + %g4 ], %g3 40007c20: 80 a0 e0 00 cmp %g3, 0 40007c24: 02 bf ff f4 be 40007bf4 40007c28: 88 00 40 04 add %g1, %g4, %g4 _IO_Driver_address_table[major] = *driver_table; *registered_major = major; rtems_io_initialize( major, 0, NULL ); return RTEMS_SUCCESSFUL; 40007c2c: 81 c7 e0 08 ret 40007c30: 91 e8 20 0c restore %g0, 0xc, %o0 40007c34: 81 c7 e0 08 ret 40007c38: 91 e8 20 05 restore %g0, 5, %o0 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 40007c3c: 80 a0 60 00 cmp %g1, 0 40007c40: 32 bf ff ce bne,a 40007b78 40007c44: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED _IO_Driver_address_table[major] = *driver_table; *registered_major = major; rtems_io_initialize( major, 0, NULL ); return RTEMS_SUCCESSFUL; 40007c48: 81 c7 e0 08 ret 40007c4c: 91 e8 20 09 restore %g0, 9, %o0 _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; *registered_major = major; 40007c50: d0 26 80 00 st %o0, [ %i2 ] if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 40007c54: c2 21 00 00 st %g1, [ %g4 ] 40007c58: c4 06 60 04 ld [ %i1 + 4 ], %g2 *registered_major = major; rtems_io_initialize( major, 0, NULL ); 40007c5c: 92 10 20 00 clr %o1 if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 40007c60: c4 21 20 04 st %g2, [ %g4 + 4 ] 40007c64: c2 06 60 08 ld [ %i1 + 8 ], %g1 *registered_major = major; rtems_io_initialize( major, 0, NULL ); 40007c68: 94 10 20 00 clr %o2 if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 40007c6c: c2 21 20 08 st %g1, [ %g4 + 8 ] 40007c70: c4 06 60 0c ld [ %i1 + 0xc ], %g2 *registered_major = major; rtems_io_initialize( major, 0, NULL ); 40007c74: b0 10 20 00 clr %i0 if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 40007c78: c4 21 20 0c st %g2, [ %g4 + 0xc ] 40007c7c: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 40007c80: c2 21 20 10 st %g1, [ %g4 + 0x10 ] 40007c84: c4 06 60 14 ld [ %i1 + 0x14 ], %g2 *registered_major = major; rtems_io_initialize( major, 0, NULL ); 40007c88: 7f ff ff 30 call 40007948 40007c8c: c4 21 20 14 st %g2, [ %g4 + 0x14 ] 40007c90: 81 c7 e0 08 ret 40007c94: 81 e8 00 00 restore 40009230 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 40009230: 9d e3 bf 98 save %sp, -104, %sp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 40009234: 80 a6 20 00 cmp %i0, 0 40009238: 02 80 00 23 be 400092c4 4000923c: 03 10 00 9d sethi %hi(0x40027400), %g1 return; 40009240: a4 10 63 f4 or %g1, 0x3f4, %l2 ! 400277f4 <_Objects_Information_table+0x4> 40009244: a6 04 a0 10 add %l2, 0x10, %l3 for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 40009248: c2 04 80 00 ld [ %l2 ], %g1 4000924c: 80 a0 60 00 cmp %g1, 0 40009250: 22 80 00 1a be,a 400092b8 40009254: a4 04 a0 04 add %l2, 4, %l2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 40009258: e2 00 60 04 ld [ %g1 + 4 ], %l1 if ( information ) { 4000925c: 80 a4 60 00 cmp %l1, 0 40009260: 22 80 00 16 be,a 400092b8 40009264: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { 40009268: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 4000926c: 86 90 60 00 orcc %g1, 0, %g3 40009270: 22 80 00 12 be,a 400092b8 40009274: a4 04 a0 04 add %l2, 4, %l2 40009278: a0 10 20 01 mov 1, %l0 the_thread = (Thread_Control *)information->local_table[ i ]; 4000927c: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 40009280: 83 2c 20 02 sll %l0, 2, %g1 40009284: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( !the_thread ) 40009288: 80 a2 20 00 cmp %o0, 0 4000928c: 02 80 00 05 be 400092a0 40009290: a0 04 20 01 inc %l0 continue; (*routine)(the_thread); 40009294: 9f c6 00 00 call %i0 40009298: 01 00 00 00 nop 4000929c: c6 14 60 10 lduh [ %l1 + 0x10 ], %g3 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 400092a0: 83 28 e0 10 sll %g3, 0x10, %g1 400092a4: 83 30 60 10 srl %g1, 0x10, %g1 400092a8: 80 a0 40 10 cmp %g1, %l0 400092ac: 3a bf ff f5 bcc,a 40009280 400092b0: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 400092b4: a4 04 a0 04 add %l2, 4, %l2 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 400092b8: 80 a4 80 13 cmp %l2, %l3 400092bc: 32 bf ff e4 bne,a 4000924c 400092c0: c2 04 80 00 ld [ %l2 ], %g1 400092c4: 81 c7 e0 08 ret 400092c8: 81 e8 00 00 restore 4000c390 : * 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 ) { 4000c390: 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 ); 4000c394: 23 10 00 6a sethi %hi(0x4001a800), %l1 4000c398: d0 04 61 9c ld [ %l1 + 0x19c ], %o0 ! 4001a99c 4000c39c: 92 10 20 00 clr %o1 4000c3a0: 7f ff e6 81 call 40005da4 4000c3a4: 94 10 20 00 clr %o2 if (rtems_libio_iop_freelist) { 4000c3a8: 21 10 00 6a sethi %hi(0x4001a800), %l0 4000c3ac: c4 04 21 98 ld [ %l0 + 0x198 ], %g2 ! 4001a998 4000c3b0: 80 a0 a0 00 cmp %g2, 0 4000c3b4: 12 80 00 07 bne 4000c3d0 4000c3b8: 03 10 00 6a sethi %hi(0x4001a800), %g1 } failed: iop = 0; done: 4000c3bc: b0 10 20 00 clr %i0 rtems_semaphore_release( rtems_libio_semaphore ); 4000c3c0: 7f ff e7 48 call 400060e0 4000c3c4: d0 04 61 9c ld [ %l1 + 0x19c ], %o0 return iop; } 4000c3c8: 81 c7 e0 08 ret 4000c3cc: 81 e8 00 00 restore rtems_id sema; rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); if (rtems_libio_iop_freelist) { rc = rtems_semaphore_create( 4000c3d0: c6 00 61 94 ld [ %g1 + 0x194 ], %g3 4000c3d4: 92 10 20 01 mov 1, %o1 4000c3d8: 86 20 80 03 sub %g2, %g3, %g3 4000c3dc: 87 38 e0 02 sra %g3, 2, %g3 4000c3e0: 83 28 e0 02 sll %g3, 2, %g1 4000c3e4: 85 28 e0 06 sll %g3, 6, %g2 4000c3e8: 84 20 80 01 sub %g2, %g1, %g2 4000c3ec: 83 28 a0 06 sll %g2, 6, %g1 4000c3f0: 82 20 40 02 sub %g1, %g2, %g1 4000c3f4: 85 28 60 0c sll %g1, 0xc, %g2 4000c3f8: 82 00 40 02 add %g1, %g2, %g1 4000c3fc: 82 00 40 03 add %g1, %g3, %g1 4000c400: 83 28 60 04 sll %g1, 4, %g1 4000c404: 82 20 40 03 sub %g1, %g3, %g1 4000c408: 83 28 60 02 sll %g1, 2, %g1 4000c40c: 86 20 c0 01 sub %g3, %g1, %g3 4000c410: 94 10 20 54 mov 0x54, %o2 4000c414: 96 10 20 00 clr %o3 4000c418: 11 13 10 92 sethi %hi(0x4c424800), %o0 4000c41c: 98 07 bf f4 add %fp, -12, %o4 4000c420: 90 12 21 00 or %o0, 0x100, %o0 4000c424: 7f ff e5 89 call 40005a48 4000c428: 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) 4000c42c: 80 a2 20 00 cmp %o0, 0 4000c430: 32 bf ff e4 bne,a 4000c3c0 4000c434: b0 10 20 00 clr %i0 <== NOT EXECUTED goto failed; iop = rtems_libio_iop_freelist; 4000c438: f0 04 21 98 ld [ %l0 + 0x198 ], %i0 next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; 4000c43c: c4 07 bf f4 ld [ %fp + -12 ], %g2 &sema ); if (rc != RTEMS_SUCCESSFUL) goto failed; iop = rtems_libio_iop_freelist; next = iop->data1; 4000c440: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 (void) memset( iop, 0, sizeof(rtems_libio_t) ); 4000c444: c0 26 20 20 clr [ %i0 + 0x20 ] 4000c448: c0 26 00 00 clr [ %i0 ] 4000c44c: c0 26 20 04 clr [ %i0 + 4 ] 4000c450: c0 26 20 08 clr [ %i0 + 8 ] 4000c454: c0 26 20 10 clr [ %i0 + 0x10 ] 4000c458: c0 26 20 14 clr [ %i0 + 0x14 ] 4000c45c: c0 26 20 18 clr [ %i0 + 0x18 ] 4000c460: c0 26 20 1c clr [ %i0 + 0x1c ] 4000c464: c0 26 20 24 clr [ %i0 + 0x24 ] 4000c468: c0 26 20 28 clr [ %i0 + 0x28 ] 4000c46c: c0 26 20 2c clr [ %i0 + 0x2c ] 4000c470: c0 26 20 30 clr [ %i0 + 0x30 ] iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; rtems_libio_iop_freelist = next; 4000c474: c2 24 21 98 st %g1, [ %l0 + 0x198 ] 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; 4000c478: c4 26 20 20 st %g2, [ %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; 4000c47c: 82 10 21 00 mov 0x100, %g1 4000c480: 10 bf ff d0 b 4000c3c0 4000c484: c2 26 20 0c st %g1, [ %i0 + 0xc ] 400021b4 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 400021b4: 9d e3 bf 98 save %sp, -104, %sp rtems_status_code rc; int i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 400021b8: 21 10 00 66 sethi %hi(0x40019800), %l0 400021bc: d0 04 20 fc ld [ %l0 + 0xfc ], %o0 ! 400198fc 400021c0: 80 a2 20 00 cmp %o0, 0 400021c4: 12 80 00 13 bne 40002210 400021c8: 92 10 20 34 mov 0x34, %o1 /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 400021cc: 11 13 10 92 sethi %hi(0x4c424800), %o0 400021d0: 92 10 20 01 mov 1, %o1 400021d4: 90 12 21 4f or %o0, 0x14f, %o0 400021d8: 94 10 20 54 mov 0x54, %o2 400021dc: 96 10 20 00 clr %o3 400021e0: 19 10 00 6a sethi %hi(0x4001a800), %o4 400021e4: 40 00 0e 19 call 40005a48 400021e8: 98 13 21 9c or %o4, 0x19c, %o4 ! 4001a99c 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 400021ec: 80 a2 20 00 cmp %o0, 0 400021f0: 12 80 00 04 bne 40002200 400021f4: 01 00 00 00 nop /* * Initialize the base file system infrastructure. */ rtems_filesystem_initialize(); 400021f8: 40 00 26 f7 call 4000bdd4 400021fc: 81 e8 00 00 restore RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) rtems_fatal_error_occurred( rc ); 40002200: 40 00 12 06 call 40006a18 <== NOT EXECUTED 40002204: 01 00 00 00 nop <== NOT EXECUTED /* * Initialize the base file system infrastructure. */ rtems_filesystem_initialize(); 40002208: 40 00 26 f3 call 4000bdd4 <== NOT EXECUTED 4000220c: 81 e8 00 00 restore <== NOT EXECUTED int i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 40002210: 40 00 00 ea call 400025b8 40002214: 23 10 00 6a sethi %hi(0x4001a800), %l1 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 40002218: 80 a2 20 00 cmp %o0, 0 4000221c: 02 80 00 18 be 4000227c 40002220: d0 24 61 94 st %o0, [ %l1 + 0x194 ] rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 40002224: c8 04 61 94 ld [ %l1 + 0x194 ], %g4 for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++) 40002228: c6 04 20 fc ld [ %l0 + 0xfc ], %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; 4000222c: 03 10 00 6a sethi %hi(0x4001a800), %g1 for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++) 40002230: 80 a0 e0 01 cmp %g3, 1 40002234: 02 80 00 10 be 40002274 40002238: c8 20 61 98 st %g4, [ %g1 + 0x198 ] 4000223c: 82 10 00 04 mov %g4, %g1 40002240: 84 10 20 01 mov 1, %g2 iop->data1 = iop + 1; 40002244: 82 00 60 34 add %g1, 0x34, %g1 40002248: 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++) 4000224c: 80 a0 80 03 cmp %g2, %g3 40002250: 12 bf ff fd bne 40002244 40002254: c2 20 7f f4 st %g1, [ %g1 + -12 ] 40002258: 85 28 e0 02 sll %g3, 2, %g2 4000225c: 83 28 e0 04 sll %g3, 4, %g1 40002260: 82 20 40 02 sub %g1, %g2, %g1 40002264: 82 00 40 03 add %g1, %g3, %g1 40002268: 83 28 60 02 sll %g1, 2, %g1 4000226c: 82 01 00 01 add %g4, %g1, %g1 40002270: 88 00 7f cc add %g1, -52, %g4 iop->data1 = iop + 1; iop->data1 = NULL; 40002274: 10 bf ff d6 b 400021cc 40002278: c0 21 20 28 clr [ %g4 + 0x28 ] if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 4000227c: 40 00 11 e7 call 40006a18 <== NOT EXECUTED 40002280: 90 10 20 1a mov 0x1a, %o0 <== NOT EXECUTED iop = rtems_libio_iop_freelist = rtems_libio_iops; 40002284: 10 bf ff e9 b 40002228 <== NOT EXECUTED 40002288: c8 04 61 94 ld [ %l1 + 0x194 ], %g4 <== NOT EXECUTED 4001988c : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 4001988c: 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); 40019890: 90 10 20 00 clr %o0 40019894: 92 10 20 00 clr %o1 40019898: 40 00 03 d4 call 4001a7e8 4001989c: 94 07 bf f4 add %fp, -12, %o2 if (sc != RTEMS_SUCCESSFUL) return sc; 400198a0: b0 92 20 00 orcc %o0, 0, %i0 400198a4: 12 80 00 44 bne 400199b4 400198a8: 25 10 00 f1 sethi %hi(0x4003c400), %l2 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 400198ac: c4 04 a2 c0 ld [ %l2 + 0x2c0 ], %g2 ! 4003c6c0 400198b0: 03 10 00 fc sethi %hi(0x4003f000), %g1 400198b4: a6 10 60 54 or %g1, 0x54, %l3 ! 4003f054 400198b8: 80 a0 80 13 cmp %g2, %l3 400198bc: 12 80 00 0f bne 400198f8 400198c0: a2 14 a2 c0 or %l2, 0x2c0, %l1 rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 400198c4: 7f ff af 2a call 4000556c 400198c8: 90 10 20 40 mov 0x40, %o0 if (!tmp) 400198cc: a0 92 20 00 orcc %o0, 0, %l0 400198d0: 02 80 00 3b be 400199bc 400198d4: 92 10 00 11 mov %l1, %o1 #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); 400198d8: 90 10 20 00 clr %o0 400198dc: 15 10 00 65 sethi %hi(0x40019400), %o2 400198e0: 40 00 04 e7 call 4001ac7c 400198e4: 94 12 a3 60 or %o2, 0x360, %o2 ! 40019760 if (sc != RTEMS_SUCCESSFUL) { 400198e8: a2 92 20 00 orcc %o0, 0, %l1 400198ec: 32 80 00 36 bne,a 400199c4 400198f0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 400198f4: e0 24 a2 c0 st %l0, [ %l2 + 0x2c0 ] }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 400198f8: d0 04 a2 c0 ld [ %l2 + 0x2c0 ], %o0 400198fc: 92 10 00 13 mov %l3, %o1 40019900: 40 00 39 b2 call 40027fc8 40019904: 94 10 20 40 mov 0x40, %o2 rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 40019908: 03 10 00 fa sethi %hi(0x4003e800), %g1 4001990c: c8 00 60 68 ld [ %g1 + 0x68 ], %g4 ! 4003e868 } 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*/ 40019910: c4 04 a2 c0 ld [ %l2 + 0x2c0 ], %g2 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 40019914: c2 01 20 18 ld [ %g4 + 0x18 ], %g1 * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 40019918: a2 07 bf e4 add %fp, -28, %l1 *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 4001991c: c2 20 a0 14 st %g1, [ %g2 + 0x14 ] } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ 40019920: c2 07 bf f4 ld [ %fp + -12 ], %g1 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 40019924: c6 01 20 1c ld [ %g4 + 0x1c ], %g3 } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ 40019928: c2 20 80 00 st %g1, [ %g2 ] /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 4001992c: c6 20 a0 18 st %g3, [ %g2 + 0x18 ] 40019930: c2 01 20 20 ld [ %g4 + 0x20 ], %g1 * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 40019934: 21 10 00 e2 sethi %hi(0x40038800), %l0 *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 40019938: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] 4001993c: c6 01 20 24 ld [ %g4 + 0x24 ], %g3 * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 40019940: 92 10 20 00 clr %o1 *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 40019944: c6 20 a0 20 st %g3, [ %g2 + 0x20 ] * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 40019948: 94 10 00 11 mov %l1, %o2 4001994c: 96 10 20 00 clr %o3 40019950: 7f ff ad 60 call 40004ed0 40019954: 90 14 22 58 or %l0, 0x258, %o0 rtems_filesystem_root = loc; 40019958: c4 04 a2 c0 ld [ %l2 + 0x2c0 ], %g2 4001995c: c2 07 bf e4 ld [ %fp + -28 ], %g1 rtems_filesystem_evaluate_path("/", 0, &loc, 0); 40019960: 90 14 22 58 or %l0, 0x258, %o0 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; 40019964: c2 20 a0 14 st %g1, [ %g2 + 0x14 ] 40019968: c2 07 bf e8 ld [ %fp + -24 ], %g1 rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4001996c: 94 10 00 11 mov %l1, %o2 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; 40019970: c2 20 a0 18 st %g1, [ %g2 + 0x18 ] 40019974: c2 07 bf ec ld [ %fp + -20 ], %g1 rtems_filesystem_evaluate_path("/", 0, &loc, 0); 40019978: 92 10 20 00 clr %o1 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; 4001997c: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] 40019980: c2 07 bf f0 ld [ %fp + -16 ], %g1 rtems_filesystem_evaluate_path("/", 0, &loc, 0); 40019984: 96 10 20 00 clr %o3 40019988: 7f ff ad 52 call 40004ed0 4001998c: c2 20 a0 20 st %g1, [ %g2 + 0x20 ] rtems_filesystem_current = loc; 40019990: c2 07 bf e4 ld [ %fp + -28 ], %g1 40019994: c6 04 a2 c0 ld [ %l2 + 0x2c0 ], %g3 40019998: c2 20 e0 04 st %g1, [ %g3 + 4 ] 4001999c: c4 07 bf e8 ld [ %fp + -24 ], %g2 400199a0: c4 20 e0 08 st %g2, [ %g3 + 8 ] 400199a4: c2 07 bf ec ld [ %fp + -20 ], %g1 400199a8: c2 20 e0 0c st %g1, [ %g3 + 0xc ] 400199ac: c4 07 bf f0 ld [ %fp + -16 ], %g2 400199b0: c4 20 e0 10 st %g2, [ %g3 + 0x10 ] return RTEMS_SUCCESSFUL; } 400199b4: 81 c7 e0 08 ret 400199b8: 81 e8 00 00 restore if (sc != RTEMS_SUCCESSFUL) return sc; /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); if (!tmp) 400199bc: 81 c7 e0 08 ret <== NOT EXECUTED 400199c0: 91 e8 20 1a restore %g0, 0x1a, %o0 <== NOT EXECUTED sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); if (sc != RTEMS_SUCCESSFUL) { /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 400199c4: 7f ff ae c1 call 400054c8 <== NOT EXECUTED 400199c8: b0 10 00 11 mov %l1, %i0 <== NOT EXECUTED 400199cc: 81 c7 e0 08 ret <== NOT EXECUTED 400199d0: 81 e8 00 00 restore <== NOT EXECUTED 400197d8 : * 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) { 400197d8: 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); 400197dc: 90 10 20 00 clr %o0 <== NOT EXECUTED 400197e0: 92 10 20 00 clr %o1 <== NOT EXECUTED 400197e4: 40 00 04 01 call 4001a7e8 <== NOT EXECUTED 400197e8: 94 07 bf f0 add %fp, -16, %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 400197ec: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 400197f0: 12 80 00 13 bne 4001983c <== NOT EXECUTED 400197f4: 25 10 00 f1 sethi %hi(0x4003c400), %l2 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 400197f8: e2 04 a2 c0 ld [ %l2 + 0x2c0 ], %l1 ! 4003c6c0 <== NOT EXECUTED 400197fc: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40019800: c4 04 40 00 ld [ %l1 ], %g2 <== NOT EXECUTED 40019804: 86 14 a2 c0 or %l2, 0x2c0, %g3 <== NOT EXECUTED 40019808: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4001980c: 02 80 00 0e be 40019844 <== NOT EXECUTED 40019810: a0 10 00 03 mov %g3, %l0 <== NOT EXECUTED free_user_env(tmp); }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 40019814: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40019818: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4001981c: 40 00 05 eb call 4001afc8 <== NOT EXECUTED 40019820: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 40019824: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 40019828: 02 80 00 10 be 40019868 <== NOT EXECUTED 4001982c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 40019830: 03 10 00 fc sethi %hi(0x4003f000), %g1 <== NOT EXECUTED 40019834: 82 10 60 54 or %g1, 0x54, %g1 ! 4003f054 <== NOT EXECUTED 40019838: c2 24 a2 c0 st %g1, [ %l2 + 0x2c0 ] <== NOT EXECUTED return sc; } 4001983c: 81 c7 e0 08 ret <== NOT EXECUTED 40019840: 91 e8 00 02 restore %g0, %g2, %o0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_current_user_env->task_id==current_task_id) { /* kill the current user env & task_var*/ rtems_user_env_t *tmp = rtems_current_user_env; sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env); 40019844: 40 00 05 6d call 4001adf8 <== NOT EXECUTED 40019848: 92 10 00 03 mov %g3, %o1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 4001984c: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 40019850: 12 bf ff fb bne 4001983c <== NOT EXECUTED 40019854: 01 00 00 00 nop <== NOT EXECUTED free_user_env(tmp); 40019858: 7f ff ff c2 call 40019760 <== NOT EXECUTED 4001985c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 40019860: 10 bf ff ee b 40019818 <== NOT EXECUTED 40019864: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 40019868: 15 10 00 65 sethi %hi(0x40019400), %o2 <== NOT EXECUTED 4001986c: 40 00 05 04 call 4001ac7c <== NOT EXECUTED 40019870: 94 12 a3 60 or %o2, 0x360, %o2 ! 40019760 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 40019874: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 40019878: 12 bf ff ef bne 40019834 <== NOT EXECUTED 4001987c: 03 10 00 fc sethi %hi(0x4003f000), %g1 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 40019880: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40019884: 10 bf ff ee b 4001983c <== NOT EXECUTED 40019888: c2 24 a2 c0 st %g1, [ %l2 + 0x2c0 ] <== NOT EXECUTED 4000c1d0 : */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 4000c1d0: 84 10 00 08 mov %o0, %g2 uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4000c1d4: 82 08 a0 06 and %g2, 6, %g1 4000c1d8: 80 a0 60 06 cmp %g1, 6 4000c1dc: 02 80 00 05 be 4000c1f0 4000c1e0: 90 10 20 02 mov 2, %o0 fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 4000c1e4: 80 88 a0 02 btst 2, %g2 4000c1e8: 02 80 00 0e be 4000c220 4000c1ec: 90 10 20 00 clr %o0 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 ) { 4000c1f0: 80 88 a0 01 btst 1, %g2 4000c1f4: 02 80 00 04 be 4000c204 4000c1f8: 80 88 a2 00 btst 0x200, %g2 fcntl_flags |= O_NONBLOCK; 4000c1fc: 03 00 00 10 sethi %hi(0x4000), %g1 4000c200: 90 12 00 01 or %o0, %g1, %o0 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 4000c204: 32 80 00 02 bne,a 4000c20c 4000c208: 90 12 20 08 or %o0, 8, %o0 fcntl_flags |= O_APPEND; } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 4000c20c: 80 88 a4 00 btst 0x400, %g2 4000c210: 32 80 00 02 bne,a 4000c218 4000c214: 90 12 22 00 or %o0, 0x200, %o0 fcntl_flags |= O_CREAT; } return fcntl_flags; } 4000c218: 81 c3 e0 08 retl 4000c21c: 01 00 00 00 nop { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 4000c220: 83 30 a0 02 srl %g2, 2, %g1 <== NOT EXECUTED 4000c224: 10 bf ff f3 b 4000c1f0 <== NOT EXECUTED 4000c228: 90 08 60 01 and %g1, 1, %o0 <== NOT EXECUTED 4000ef8c : Objects_Id id, void *buffer, size_t size, uint32_t *count ) { 4000ef8c: 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 ) 4000ef90: 80 a6 60 00 cmp %i1, 0 4000ef94: 02 80 00 28 be 4000f034 4000ef98: 80 a6 e0 00 cmp %i3, 0 return RTEMS_INVALID_ADDRESS; if ( !count ) 4000ef9c: 02 80 00 26 be 4000f034 4000efa0: 92 10 00 18 mov %i0, %o1 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 4000efa4: 11 10 00 d5 sethi %hi(0x40035400), %o0 4000efa8: 90 12 22 70 or %o0, 0x270, %o0 ! 40035670 <_Message_queue_Information> 4000efac: 40 00 19 84 call 400155bc <_Objects_Get> 4000efb0: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4000efb4: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000efb8: 80 a0 60 00 cmp %g1, 0 4000efbc: 02 80 00 08 be 4000efdc 4000efc0: 9a 10 00 1b mov %i3, %o5 4000efc4: 80 a0 60 02 cmp %g1, 2 4000efc8: 08 80 00 03 bleu 4000efd4 4000efcc: 90 10 20 04 mov 4, %o0 4000efd0: 90 10 20 19 mov 0x19, %o0 <== NOT EXECUTED return _Message_queue_Translate_core_message_queue_return_code( core_status ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000efd4: 81 c7 e0 08 ret 4000efd8: 91 e8 00 08 restore %g0, %o0, %o0 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: core_status = _CORE_message_queue_Broadcast( 4000efdc: 92 10 00 19 mov %i1, %o1 4000efe0: 94 10 00 1a mov %i2, %o2 4000efe4: 96 10 00 18 mov %i0, %o3 4000efe8: 98 10 20 00 clr %o4 4000efec: 40 00 13 f8 call 40013fcc <_CORE_message_queue_Broadcast> 4000eff0: 90 02 20 14 add %o0, 0x14, %o0 4000eff4: 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 ) 4000eff8: 03 10 00 d3 sethi %hi(0x40034c00), %g1 4000effc: c4 00 60 80 ld [ %g1 + 0x80 ], %g2 ! 40034c80 <_Thread_Dispatch_disable_level> 4000f000: 84 00 bf ff add %g2, -1, %g2 4000f004: c4 20 60 80 st %g2, [ %g1 + 0x80 ] 4000f008: c6 00 60 80 ld [ %g1 + 0x80 ], %g3 4000f00c: 80 a0 e0 00 cmp %g3, 0 4000f010: 02 80 00 06 be 4000f028 4000f014: 01 00 00 00 nop #endif count ); _Thread_Enable_dispatch(); return 4000f018: 40 00 01 35 call 4000f4ec <_Message_queue_Translate_core_message_queue_return_code> 4000f01c: 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 */ } 4000f020: 81 c7 e0 08 ret 4000f024: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 4000f028: 40 00 1e 8d call 40016a5c <_Thread_Dispatch> 4000f02c: 01 00 00 00 nop 4000f030: 30 bf ff fa b,a 4000f018 #endif count ); _Thread_Enable_dispatch(); return 4000f034: 10 bf ff e8 b 4000efd4 <== NOT EXECUTED 4000f038: 90 10 20 09 mov 9, %o0 <== NOT EXECUTED 4000f03c : uint32_t count, uint32_t max_message_size, rtems_attribute attribute_set, Objects_Id *id ) { 4000f03c: 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 ) ) 4000f040: a4 96 20 00 orcc %i0, 0, %l2 4000f044: 02 80 00 1f be 4000f0c0 4000f048: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 4000f04c: 80 a7 20 00 cmp %i4, 0 4000f050: 02 80 00 1c be 4000f0c0 4000f054: 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 ) 4000f058: 80 a6 60 00 cmp %i1, 0 4000f05c: 02 80 00 19 be 4000f0c0 4000f060: b0 10 20 0a mov 0xa, %i0 return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 4000f064: 80 a6 a0 00 cmp %i2, 0 4000f068: 02 80 00 16 be 4000f0c0 4000f06c: b0 10 20 08 mov 8, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000f070: 23 10 00 d3 sethi %hi(0x40034c00), %l1 4000f074: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 ! 40034c80 <_Thread_Dispatch_disable_level> 4000f078: 82 00 60 01 inc %g1 4000f07c: c2 24 60 80 st %g1, [ %l1 + 0x80 ] #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate( count, max_message_size ); 4000f080: 90 10 00 19 mov %i1, %o0 4000f084: 40 00 2f 2a call 4001ad2c <_Message_queue_Allocate> 4000f088: 92 10 00 1a mov %i2, %o1 if ( !the_message_queue ) { 4000f08c: a0 92 20 00 orcc %o0, 0, %l0 4000f090: 12 80 00 0e bne 4000f0c8 4000f094: 80 8e e0 04 btst 4, %i3 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000f098: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 4000f09c: b0 10 20 05 mov 5, %i0 _Thread_Dispatch(); 4000f0a0: 82 00 7f ff add %g1, -1, %g1 4000f0a4: c2 24 60 80 st %g1, [ %l1 + 0x80 ] 4000f0a8: c4 04 60 80 ld [ %l1 + 0x80 ], %g2 4000f0ac: 80 a0 a0 00 cmp %g2, 0 4000f0b0: 12 80 00 33 bne 4000f17c 4000f0b4: 01 00 00 00 nop 4000f0b8: 40 00 1e 69 call 40016a5c <_Thread_Dispatch> 4000f0bc: 01 00 00 00 nop 4000f0c0: 81 c7 e0 08 ret 4000f0c4: 81 e8 00 00 restore } #endif the_message_queue->attribute_set = attribute_set; if (_Attributes_Is_priority( attribute_set ) ) 4000f0c8: 12 80 00 11 bne 4000f10c 4000f0cc: f6 24 20 10 st %i3, [ %l0 + 0x10 ] the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; 4000f0d0: c0 27 bf f4 clr [ %fp + -12 ] if ( ! _CORE_message_queue_Initialize( 4000f0d4: 94 10 00 19 mov %i1, %o2 4000f0d8: 96 10 00 1a mov %i2, %o3 4000f0dc: 90 04 20 14 add %l0, 0x14, %o0 4000f0e0: 40 00 14 08 call 40014100 <_CORE_message_queue_Initialize> 4000f0e4: 92 07 bf f4 add %fp, -12, %o1 4000f0e8: 80 a2 20 00 cmp %o0, 0 4000f0ec: 12 80 00 0b bne 4000f118 4000f0f0: 92 10 00 10 mov %l0, %o1 RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 4000f0f4: 11 10 00 d5 sethi %hi(0x40035400), %o0 <== NOT EXECUTED 4000f0f8: 40 00 18 da call 40015460 <_Objects_Free> <== NOT EXECUTED 4000f0fc: 90 12 22 70 or %o0, 0x270, %o0 ! 40035670 <_Message_queue_Information> <== 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 ) 4000f100: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 <== NOT EXECUTED 4000f104: 10 bf ff e7 b 4000f0a0 <== NOT EXECUTED 4000f108: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED #endif the_message_queue->attribute_set = attribute_set; if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 4000f10c: 82 10 20 01 mov 1, %g1 4000f110: 10 bf ff f1 b 4000f0d4 4000f114: c2 27 bf f4 st %g1, [ %fp + -12 ] Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000f118: 03 10 00 d5 sethi %hi(0x40035400), %g1 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 4000f11c: c6 04 20 08 ld [ %l0 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000f120: 88 10 62 70 or %g1, 0x270, %g4 4000f124: c4 11 20 10 lduh [ %g4 + 0x10 ], %g2 4000f128: 03 00 00 3f sethi %hi(0xfc00), %g1 4000f12c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000f130: 82 08 c0 01 and %g3, %g1, %g1 4000f134: 80 a0 40 02 cmp %g1, %g2 4000f138: 38 80 00 06 bgu,a 4000f150 4000f13c: e4 24 20 0c st %l2, [ %l0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 4000f140: c4 01 20 20 ld [ %g4 + 0x20 ], %g2 4000f144: 83 28 60 02 sll %g1, 2, %g1 4000f148: e0 20 80 01 st %l0, [ %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; 4000f14c: e4 24 20 0c st %l2, [ %l0 + 0xc ] &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 4000f150: c6 27 00 00 st %g3, [ %i4 ] 4000f154: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 4000f158: b0 10 20 00 clr %i0 4000f15c: 82 00 7f ff add %g1, -1, %g1 4000f160: c2 24 60 80 st %g1, [ %l1 + 0x80 ] 4000f164: c4 04 60 80 ld [ %l1 + 0x80 ], %g2 4000f168: 80 a0 a0 00 cmp %g2, 0 4000f16c: 12 80 00 04 bne 4000f17c 4000f170: 01 00 00 00 nop _Thread_Dispatch(); 4000f174: 40 00 1e 3a call 40016a5c <_Thread_Dispatch> 4000f178: 01 00 00 00 nop ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4000f17c: 81 c7 e0 08 ret 4000f180: 81 e8 00 00 restore 400162b8 : */ rtems_status_code rtems_message_queue_delete( Objects_Id id ) { 400162b8: 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 *) 400162bc: 21 10 00 b4 sethi %hi(0x4002d000), %l0 400162c0: 92 10 00 18 mov %i0, %o1 400162c4: 94 07 bf f4 add %fp, -12, %o2 400162c8: 7f ff e3 40 call 4000efc8 <_Objects_Get> 400162cc: 90 14 23 0c or %l0, 0x30c, %o0 register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 400162d0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400162d4: 80 a0 60 00 cmp %g1, 0 400162d8: 12 80 00 20 bne 40016358 400162dc: b0 10 00 08 mov %o0, %i0 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400162e0: a0 14 23 0c or %l0, 0x30c, %l0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 400162e4: c2 02 20 08 ld [ %o0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400162e8: c6 14 20 10 lduh [ %l0 + 0x10 ], %g3 400162ec: 05 00 00 3f sethi %hi(0xfc00), %g2 400162f0: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 400162f4: 82 08 40 02 and %g1, %g2, %g1 400162f8: 80 a0 40 03 cmp %g1, %g3 400162fc: 18 80 00 05 bgu 40016310 40016300: 94 10 20 05 mov 5, %o2 information->local_table[ index ] = the_object; 40016304: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 40016308: 83 28 60 02 sll %g1, 2, %g1 4001630c: c0 20 80 01 clr [ %g2 + %g1 ] case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, &the_message_queue->Object ); _CORE_message_queue_Close( 40016310: 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; 40016314: c0 26 20 0c clr [ %i0 + 0xc ] 40016318: 40 00 01 c0 call 40016a18 <_CORE_message_queue_Close> 4001631c: 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 ); 40016320: 90 10 00 10 mov %l0, %o0 40016324: 7f ff e2 e6 call 4000eebc <_Objects_Free> 40016328: 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 ) 4001632c: 03 10 00 b2 sethi %hi(0x4002c800), %g1 40016330: c4 00 60 a0 ld [ %g1 + 0xa0 ], %g2 ! 4002c8a0 <_Thread_Dispatch_disable_level> 40016334: b0 10 20 00 clr %i0 40016338: 84 00 bf ff add %g2, -1, %g2 4001633c: c4 20 60 a0 st %g2, [ %g1 + 0xa0 ] 40016340: c6 00 60 a0 ld [ %g1 + 0xa0 ], %g3 40016344: 80 a0 e0 00 cmp %g3, 0 40016348: 02 80 00 09 be 4001636c 4001634c: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40016350: 81 c7 e0 08 ret 40016354: 81 e8 00 00 restore { register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 40016358: 80 a0 60 02 cmp %g1, 2 4001635c: 08 bf ff fd bleu 40016350 40016360: b0 10 20 04 mov 4, %i0 40016364: 81 c7 e0 08 ret <== NOT EXECUTED 40016368: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED _Thread_Dispatch(); 4001636c: 7f ff e8 3f call 40010468 <_Thread_Dispatch> 40016370: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40016374: 81 c7 e0 08 ret 40016378: 81 e8 00 00 restore 4000f248 : rtems_status_code rtems_message_queue_flush( Objects_Id id, uint32_t *count ) { 4000f248: 9d e3 bf 90 save %sp, -112, %sp 4000f24c: 92 10 00 18 mov %i0, %o1 register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 4000f250: 80 a6 60 00 cmp %i1, 0 4000f254: 02 80 00 1c be 4000f2c4 4000f258: 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 *) 4000f25c: 11 10 00 d5 sethi %hi(0x40035400), %o0 4000f260: 94 07 bf f4 add %fp, -12, %o2 4000f264: 40 00 18 d6 call 400155bc <_Objects_Get> 4000f268: 90 12 22 70 or %o0, 0x270, %o0 return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4000f26c: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000f270: 80 a0 60 00 cmp %g1, 0 4000f274: 02 80 00 06 be 4000f28c 4000f278: 80 a0 60 02 cmp %g1, 2 4000f27c: 08 80 00 12 bleu 4000f2c4 4000f280: b0 10 20 04 mov 4, %i0 4000f284: 81 c7 e0 08 ret <== NOT EXECUTED 4000f288: 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 ); 4000f28c: 40 00 13 7d call 40014080 <_CORE_message_queue_Flush> 4000f290: 90 02 20 14 add %o0, 0x14, %o0 4000f294: 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 ) 4000f298: 03 10 00 d3 sethi %hi(0x40034c00), %g1 4000f29c: c4 00 60 80 ld [ %g1 + 0x80 ], %g2 ! 40034c80 <_Thread_Dispatch_disable_level> 4000f2a0: b0 10 20 00 clr %i0 4000f2a4: 84 00 bf ff add %g2, -1, %g2 4000f2a8: c4 20 60 80 st %g2, [ %g1 + 0x80 ] 4000f2ac: c6 00 60 80 ld [ %g1 + 0x80 ], %g3 4000f2b0: 80 a0 e0 00 cmp %g3, 0 4000f2b4: 12 80 00 04 bne 4000f2c4 4000f2b8: 01 00 00 00 nop _Thread_Dispatch(); 4000f2bc: 40 00 1d e8 call 40016a5c <_Thread_Dispatch> 4000f2c0: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000f2c4: 81 c7 e0 08 ret 4000f2c8: 81 e8 00 00 restore 4000f2cc : rtems_status_code rtems_message_queue_get_number_pending( Objects_Id id, uint32_t *count ) { 4000f2cc: 9d e3 bf 90 save %sp, -112, %sp 4000f2d0: 92 10 00 18 mov %i0, %o1 register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 4000f2d4: 80 a6 60 00 cmp %i1, 0 4000f2d8: 02 80 00 1b be 4000f344 4000f2dc: b0 10 20 09 mov 9, %i0 4000f2e0: 11 10 00 d5 sethi %hi(0x40035400), %o0 4000f2e4: 94 07 bf f4 add %fp, -12, %o2 4000f2e8: 40 00 18 b5 call 400155bc <_Objects_Get> 4000f2ec: 90 12 22 70 or %o0, 0x270, %o0 return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4000f2f0: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000f2f4: 80 a0 60 00 cmp %g1, 0 4000f2f8: 22 80 00 07 be,a 4000f314 4000f2fc: c2 02 20 5c ld [ %o0 + 0x5c ], %g1 4000f300: 80 a0 60 02 cmp %g1, 2 4000f304: 08 80 00 10 bleu 4000f344 4000f308: b0 10 20 04 mov 4, %i0 4000f30c: 81 c7 e0 08 ret <== NOT EXECUTED 4000f310: 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; 4000f314: 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 ) 4000f318: 07 10 00 d3 sethi %hi(0x40034c00), %g3 4000f31c: c2 00 e0 80 ld [ %g3 + 0x80 ], %g1 ! 40034c80 <_Thread_Dispatch_disable_level> 4000f320: b0 10 20 00 clr %i0 4000f324: 82 00 7f ff add %g1, -1, %g1 4000f328: c2 20 e0 80 st %g1, [ %g3 + 0x80 ] 4000f32c: c4 00 e0 80 ld [ %g3 + 0x80 ], %g2 4000f330: 80 a0 a0 00 cmp %g2, 0 4000f334: 12 80 00 04 bne 4000f344 4000f338: 01 00 00 00 nop _Thread_Dispatch(); 4000f33c: 40 00 1d c8 call 40016a5c <_Thread_Dispatch> 4000f340: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000f344: 81 c7 e0 08 ret 4000f348: 81 e8 00 00 restore 400163b0 : void *buffer, size_t *size, uint32_t option_set, rtems_interval timeout ) { 400163b0: 9d e3 bf 90 save %sp, -112, %sp register Message_queue_Control *the_message_queue; Objects_Locations location; boolean wait; if ( !buffer ) 400163b4: 80 a6 60 00 cmp %i1, 0 400163b8: 02 80 00 2b be 40016464 400163bc: 92 10 00 18 mov %i0, %o1 return RTEMS_INVALID_ADDRESS; if ( !size ) 400163c0: 80 a6 a0 00 cmp %i2, 0 400163c4: 02 80 00 28 be 40016464 400163c8: 94 07 bf f4 add %fp, -12, %o2 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 400163cc: 11 10 00 b4 sethi %hi(0x4002d000), %o0 400163d0: 7f ff e2 fe call 4000efc8 <_Objects_Get> 400163d4: 90 12 23 0c or %o0, 0x30c, %o0 ! 4002d30c <_Message_queue_Information> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 400163d8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400163dc: 80 a0 60 00 cmp %g1, 0 400163e0: 22 80 00 08 be,a 40016400 400163e4: d2 02 20 08 ld [ %o0 + 8 ], %o1 400163e8: 80 a0 60 02 cmp %g1, 2 400163ec: 08 80 00 03 bleu 400163f8 400163f0: 90 10 20 04 mov 4, %o0 400163f4: 90 10 20 19 mov 0x19, %o0 <== NOT EXECUTED ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400163f8: 81 c7 e0 08 ret 400163fc: 91 e8 00 08 restore %g0, %o0, %o0 40016400: 98 0e e0 01 and %i3, 1, %o4 if ( _Options_Is_no_wait( option_set ) ) wait = FALSE; else wait = TRUE; _CORE_message_queue_Seize( 40016404: 94 10 00 19 mov %i1, %o2 40016408: 96 10 00 1a mov %i2, %o3 4001640c: 98 1b 20 01 xor %o4, 1, %o4 40016410: 9a 10 00 1c mov %i4, %o5 40016414: 40 00 01 a7 call 40016ab0 <_CORE_message_queue_Seize> 40016418: 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 ) 4001641c: 05 10 00 b2 sethi %hi(0x4002c800), %g2 40016420: c2 00 a0 a0 ld [ %g2 + 0xa0 ], %g1 ! 4002c8a0 <_Thread_Dispatch_disable_level> 40016424: 82 00 7f ff add %g1, -1, %g1 40016428: c2 20 a0 a0 st %g1, [ %g2 + 0xa0 ] 4001642c: c6 00 a0 a0 ld [ %g2 + 0xa0 ], %g3 40016430: 80 a0 e0 00 cmp %g3, 0 40016434: 02 80 00 08 be 40016454 40016438: 01 00 00 00 nop size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( 4001643c: 03 10 00 b2 sethi %hi(0x4002c800), %g1 <== NOT EXECUTED 40016440: c4 00 61 7c ld [ %g1 + 0x17c ], %g2 ! 4002c97c <_Thread_Executing> 40016444: 40 00 00 36 call 4001651c <_Message_queue_Translate_core_message_queue_return_code> 40016448: d0 00 a0 34 ld [ %g2 + 0x34 ], %o0 ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4001644c: 81 c7 e0 08 ret 40016450: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 40016454: 7f ff e8 05 call 40010468 <_Thread_Dispatch> 40016458: 01 00 00 00 nop size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( 4001645c: 10 bf ff f9 b 40016440 40016460: 03 10 00 b2 sethi %hi(0x4002c800), %g1 40016464: 10 bf ff e5 b 400163f8 <== NOT EXECUTED 40016468: 90 10 20 09 mov 9, %o0 <== NOT EXECUTED 4001646c : rtems_status_code rtems_message_queue_send( Objects_Id id, void *buffer, size_t size ) { 4001646c: 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 ) 40016470: 80 a6 60 00 cmp %i1, 0 40016474: 02 80 00 20 be 400164f4 40016478: 90 10 20 09 mov 9, %o0 4001647c: 11 10 00 b4 sethi %hi(0x4002d000), %o0 40016480: 92 10 00 18 mov %i0, %o1 40016484: 90 12 23 0c or %o0, 0x30c, %o0 40016488: 7f ff e2 d0 call 4000efc8 <_Objects_Get> 4001648c: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) 40016490: c2 07 bf f4 ld [ %fp + -12 ], %g1 40016494: 80 a0 60 00 cmp %g1, 0 40016498: 12 80 00 19 bne 400164fc 4001649c: 80 a0 60 02 cmp %g1, 2 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, boolean wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 400164a0: 94 10 00 1a mov %i2, %o2 400164a4: c0 23 a0 5c clr [ %sp + 0x5c ] 400164a8: c0 23 a0 60 clr [ %sp + 0x60 ] 400164ac: 92 10 00 19 mov %i1, %o1 400164b0: 96 10 00 18 mov %i0, %o3 400164b4: 98 10 20 00 clr %o4 400164b8: 90 02 20 14 add %o0, 0x14, %o0 400164bc: 1b 1f ff ff sethi %hi(0x7ffffc00), %o5 400164c0: 40 00 01 c3 call 40016bcc <_CORE_message_queue_Submit> 400164c4: 9a 13 63 ff or %o5, 0x3ff, %o5 ! 7fffffff 400164c8: 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 ) 400164cc: 05 10 00 b2 sethi %hi(0x4002c800), %g2 400164d0: c2 00 a0 a0 ld [ %g2 + 0xa0 ], %g1 ! 4002c8a0 <_Thread_Dispatch_disable_level> 400164d4: 82 00 7f ff add %g1, -1, %g1 400164d8: c2 20 a0 a0 st %g1, [ %g2 + 0xa0 ] 400164dc: c6 00 a0 a0 ld [ %g2 + 0xa0 ], %g3 400164e0: 80 a0 e0 00 cmp %g3, 0 400164e4: 02 80 00 0b be 40016510 400164e8: 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); 400164ec: 40 00 00 0c call 4001651c <_Message_queue_Translate_core_message_queue_return_code> 400164f0: 90 10 00 1a mov %i2, %o0 } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400164f4: 81 c7 e0 08 ret 400164f8: 91 e8 00 08 restore %g0, %o0, %o0 if ( !buffer ) return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) 400164fc: 08 bf ff fe bleu 400164f4 40016500: 90 10 20 04 mov 4, %o0 40016504: 90 10 20 19 mov 0x19, %o0 <== NOT EXECUTED return _Message_queue_Translate_core_message_queue_return_code(status); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40016508: 81 c7 e0 08 ret <== NOT EXECUTED 4001650c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 40016510: 7f ff e7 d6 call 40010468 <_Thread_Dispatch> 40016514: 01 00 00 00 nop 40016518: 30 bf ff f5 b,a 400164ec 4000888c : rtems_status_code rtems_message_queue_urgent( Objects_Id id, void *buffer, size_t size ) { 4000888c: 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 ) 40008890: 80 a6 60 00 cmp %i1, 0 40008894: 02 80 00 1f be 40008910 40008898: 90 10 20 09 mov 9, %o0 4000889c: 11 10 00 8d sethi %hi(0x40023400), %o0 400088a0: 92 10 00 18 mov %i0, %o1 400088a4: 90 12 21 98 or %o0, 0x198, %o0 400088a8: 40 00 0a 47 call 4000b1c4 <_Objects_Get> 400088ac: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) 400088b0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400088b4: 80 a0 60 00 cmp %g1, 0 400088b8: 12 80 00 18 bne 40008918 400088bc: 80 a0 60 02 cmp %g1, 2 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, boolean wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 400088c0: 94 10 00 1a mov %i2, %o2 400088c4: c0 23 a0 5c clr [ %sp + 0x5c ] 400088c8: c0 23 a0 60 clr [ %sp + 0x60 ] 400088cc: 92 10 00 19 mov %i1, %o1 400088d0: 96 10 00 18 mov %i0, %o3 400088d4: 98 10 20 00 clr %o4 400088d8: 1b 20 00 00 sethi %hi(0x80000000), %o5 400088dc: 40 00 06 0e call 4000a114 <_CORE_message_queue_Submit> 400088e0: 90 02 20 14 add %o0, 0x14, %o0 400088e4: 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 ) 400088e8: 03 10 00 8a sethi %hi(0x40022800), %g1 400088ec: c4 00 63 b0 ld [ %g1 + 0x3b0 ], %g2 ! 40022bb0 <_Thread_Dispatch_disable_level> 400088f0: 84 00 bf ff add %g2, -1, %g2 400088f4: c4 20 63 b0 st %g2, [ %g1 + 0x3b0 ] 400088f8: c6 00 63 b0 ld [ %g1 + 0x3b0 ], %g3 400088fc: 80 a0 e0 00 cmp %g3, 0 40008900: 02 80 00 0b be 4000892c 40008904: 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); 40008908: 7f ff ff d7 call 40008864 <_Message_queue_Translate_core_message_queue_return_code> 4000890c: 90 10 00 1a mov %i2, %o0 } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40008910: 81 c7 e0 08 ret 40008914: 91 e8 00 08 restore %g0, %o0, %o0 if ( !buffer ) return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) 40008918: 08 bf ff fe bleu 40008910 <== NOT EXECUTED 4000891c: 90 10 20 04 mov 4, %o0 <== NOT EXECUTED 40008920: 90 10 20 19 mov 0x19, %o0 <== NOT EXECUTED return _Message_queue_Translate_core_message_queue_return_code(status); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40008924: 81 c7 e0 08 ret <== NOT EXECUTED 40008928: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 4000892c: 40 00 0f 4e call 4000c664 <_Thread_Dispatch> 40008930: 01 00 00 00 nop 40008934: 30 bf ff f5 b,a 40008908 40008bb4 : void rtems_panic( const char *printf_format, ... ) { 40008bb4: 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); 40008bb8: 11 08 00 00 sethi %hi(0x20000000), %o0 <== NOT EXECUTED ... ) { va_list arglist; va_start(arglist, printf_format); 40008bbc: 94 07 a0 48 add %fp, 0x48, %o2 <== NOT EXECUTED void rtems_panic( const char *printf_format, ... ) { 40008bc0: f2 27 a0 48 st %i1, [ %fp + 0x48 ] <== NOT EXECUTED 40008bc4: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 40008bc8: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 40008bcc: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 40008bd0: 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); 40008bd4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40008bd8: 7f ff ff 88 call 400089f8 <== NOT EXECUTED 40008bdc: d4 27 bf f4 st %o2, [ %fp + -12 ] <== NOT EXECUTED va_end(arglist); } 40008be0: 81 c7 e0 08 ret <== NOT EXECUTED 40008be4: 81 e8 00 00 restore <== NOT EXECUTED 4000f514 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, Objects_Id *id ) { 4000f514: 9d e3 bf 98 save %sp, -104, %sp register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 4000f518: a8 96 20 00 orcc %i0, 0, %l4 4000f51c: 02 80 00 29 be 4000f5c0 4000f520: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !starting_address ) 4000f524: 80 a6 60 00 cmp %i1, 0 4000f528: 02 80 00 11 be 4000f56c 4000f52c: 80 a7 60 00 cmp %i5, 0 return RTEMS_INVALID_ADDRESS; if ( !id ) 4000f530: 02 80 00 0f be 4000f56c 4000f534: 80 a6 a0 00 cmp %i2, 0 return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 4000f538: 12 80 00 04 bne 4000f548 4000f53c: 80 a6 e0 00 cmp %i3, 0 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4000f540: 81 c7 e0 08 ret 4000f544: 91 e8 20 08 restore %g0, 8, %o0 return RTEMS_INVALID_ADDRESS; if ( !id ) return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 4000f548: 02 80 00 1e be 4000f5c0 4000f54c: b0 10 20 08 mov 8, %i0 4000f550: 80 a6 80 1b cmp %i2, %i3 4000f554: 0a 80 00 1b bcs 4000f5c0 4000f558: 80 8e e0 07 btst 7, %i3 4000f55c: 12 80 00 19 bne 4000f5c0 4000f560: 80 8e 60 07 btst 7, %i1 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 4000f564: 02 80 00 04 be 4000f574 4000f568: 25 10 00 d3 sethi %hi(0x40034c00), %l2 4000f56c: 81 c7 e0 08 ret 4000f570: 91 e8 20 09 restore %g0, 9, %o0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000f574: c2 04 a0 80 ld [ %l2 + 0x80 ], %g1 4000f578: 82 00 60 01 inc %g1 4000f57c: c2 24 a0 80 st %g1, [ %l2 + 0x80 ] * the inactive chain of free partition control blocks. */ RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void ) { return (Partition_Control *) _Objects_Allocate( &_Partition_Information ); 4000f580: 27 10 00 d2 sethi %hi(0x40034800), %l3 4000f584: 40 00 16 a9 call 40015028 <_Objects_Allocate> 4000f588: 90 14 e2 00 or %l3, 0x200, %o0 ! 40034a00 <_Partition_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 4000f58c: a2 92 20 00 orcc %o0, 0, %l1 4000f590: 12 80 00 0e bne 4000f5c8 4000f594: 92 10 00 1b mov %i3, %o1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000f598: c2 04 a0 80 ld [ %l2 + 0x80 ], %g1 4000f59c: b0 10 20 05 mov 5, %i0 _Thread_Dispatch(); 4000f5a0: 82 00 7f ff add %g1, -1, %g1 4000f5a4: c2 24 a0 80 st %g1, [ %l2 + 0x80 ] 4000f5a8: c4 04 a0 80 ld [ %l2 + 0x80 ], %g2 4000f5ac: 80 a0 a0 00 cmp %g2, 0 4000f5b0: 12 80 00 04 bne 4000f5c0 4000f5b4: 01 00 00 00 nop 4000f5b8: 40 00 1d 29 call 40016a5c <_Thread_Dispatch> 4000f5bc: 01 00 00 00 nop 4000f5c0: 81 c7 e0 08 ret 4000f5c4: 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; 4000f5c8: f8 24 60 1c st %i4, [ %l1 + 0x1c ] _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 4000f5cc: f2 24 60 10 st %i1, [ %l1 + 0x10 ] the_partition->length = length; 4000f5d0: f4 24 60 14 st %i2, [ %l1 + 0x14 ] the_partition->buffer_size = buffer_size; 4000f5d4: f6 24 60 18 st %i3, [ %l1 + 0x18 ] the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; 4000f5d8: c0 24 60 20 clr [ %l1 + 0x20 ] _Chain_Initialize( &the_partition->Memory, starting_address, 4000f5dc: 40 00 58 44 call 400256ec <.udiv> 4000f5e0: 90 10 00 1a mov %i2, %o0 4000f5e4: a0 04 60 24 add %l1, 0x24, %l0 4000f5e8: 94 10 00 08 mov %o0, %o2 4000f5ec: 92 10 00 19 mov %i1, %o1 4000f5f0: 90 10 00 10 mov %l0, %o0 4000f5f4: 40 00 12 5e call 40013f6c <_Chain_Initialize> 4000f5f8: 96 10 00 1b mov %i3, %o3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000f5fc: 90 14 e2 00 or %l3, 0x200, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 4000f600: c6 04 60 08 ld [ %l1 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000f604: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 4000f608: 03 00 00 3f sethi %hi(0xfc00), %g1 4000f60c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000f610: 82 08 c0 01 and %g3, %g1, %g1 4000f614: 80 a0 40 02 cmp %g1, %g2 4000f618: 38 80 00 06 bgu,a 4000f630 4000f61c: e8 24 60 0c st %l4, [ %l1 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 4000f620: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 4000f624: 83 28 60 02 sll %g1, 2, %g1 4000f628: e2 20 80 01 st %l1, [ %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; 4000f62c: e8 24 60 0c st %l4, [ %l1 + 0xc ] &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 4000f630: c6 27 40 00 st %g3, [ %i5 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000f634: c2 04 a0 80 ld [ %l2 + 0x80 ], %g1 4000f638: 10 bf ff da b 4000f5a0 4000f63c: b0 10 20 00 clr %i0 4000f640 : */ rtems_status_code rtems_partition_delete( Objects_Id id ) { 4000f640: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 4000f644: 92 10 00 18 mov %i0, %o1 4000f648: 94 07 bf f4 add %fp, -12, %o2 4000f64c: 31 10 00 d2 sethi %hi(0x40034800), %i0 4000f650: 40 00 17 db call 400155bc <_Objects_Get> 4000f654: 90 16 22 00 or %i0, 0x200, %o0 ! 40034a00 <_Partition_Information> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 4000f658: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000f65c: 80 a0 60 00 cmp %g1, 0 4000f660: 12 80 00 13 bne 4000f6ac 4000f664: 92 10 00 08 mov %o0, %o1 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { 4000f668: c2 02 20 20 ld [ %o0 + 0x20 ], %g1 4000f66c: 80 a0 60 00 cmp %g1, 0 4000f670: 02 80 00 14 be 4000f6c0 4000f674: 90 16 22 00 or %i0, 0x200, %o0 4000f678: 03 10 00 d3 sethi %hi(0x40034c00), %g1 4000f67c: c4 00 60 80 ld [ %g1 + 0x80 ], %g2 ! 40034c80 <_Thread_Dispatch_disable_level> 4000f680: b0 10 20 0c mov 0xc, %i0 4000f684: 84 00 bf ff add %g2, -1, %g2 4000f688: c4 20 60 80 st %g2, [ %g1 + 0x80 ] 4000f68c: c6 00 60 80 ld [ %g1 + 0x80 ], %g3 4000f690: 80 a0 e0 00 cmp %g3, 0 4000f694: 12 80 00 22 bne 4000f71c 4000f698: 01 00 00 00 nop _Thread_Dispatch(); 4000f69c: 40 00 1c f0 call 40016a5c <_Thread_Dispatch> 4000f6a0: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000f6a4: 81 c7 e0 08 ret 4000f6a8: 81 e8 00 00 restore { register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 4000f6ac: 80 a0 60 02 cmp %g1, 2 4000f6b0: 08 bf ff fd bleu 4000f6a4 4000f6b4: b0 10 20 04 mov 4, %i0 4000f6b8: 81 c7 e0 08 ret <== NOT EXECUTED 4000f6bc: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 4000f6c0: c2 02 60 08 ld [ %o1 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000f6c4: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 4000f6c8: 05 00 00 3f sethi %hi(0xfc00), %g2 4000f6cc: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 4000f6d0: 82 08 40 02 and %g1, %g2, %g1 4000f6d4: 80 a0 40 03 cmp %g1, %g3 4000f6d8: 18 80 00 04 bgu 4000f6e8 4000f6dc: 83 28 60 02 sll %g1, 2, %g1 information->local_table[ index ] = the_object; 4000f6e0: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 4000f6e4: c0 20 80 01 clr [ %g2 + %g1 ] RTEMS_INLINE_ROUTINE void _Partition_Free ( Partition_Control *the_partition ) { _Objects_Free( &_Partition_Information, &the_partition->Object ); 4000f6e8: 40 00 17 5e call 40015460 <_Objects_Free> 4000f6ec: c0 22 60 0c clr [ %o1 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000f6f0: 03 10 00 d3 sethi %hi(0x40034c00), %g1 4000f6f4: c4 00 60 80 ld [ %g1 + 0x80 ], %g2 ! 40034c80 <_Thread_Dispatch_disable_level> 4000f6f8: b0 10 20 00 clr %i0 4000f6fc: 84 00 bf ff add %g2, -1, %g2 4000f700: c4 20 60 80 st %g2, [ %g1 + 0x80 ] 4000f704: c6 00 60 80 ld [ %g1 + 0x80 ], %g3 4000f708: 80 a0 e0 00 cmp %g3, 0 4000f70c: 12 80 00 04 bne 4000f71c 4000f710: 01 00 00 00 nop _Thread_Dispatch(); 4000f714: 40 00 1c d2 call 40016a5c <_Thread_Dispatch> 4000f718: 01 00 00 00 nop 4000f71c: 81 c7 e0 08 ret 4000f720: 81 e8 00 00 restore 4000f724 : rtems_status_code rtems_partition_get_buffer( Objects_Id id, void **buffer ) { 4000f724: 9d e3 bf 90 save %sp, -112, %sp 4000f728: 92 10 00 18 mov %i0, %o1 register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 4000f72c: 80 a6 60 00 cmp %i1, 0 4000f730: 02 80 00 1a be 4000f798 4000f734: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 4000f738: 11 10 00 d2 sethi %hi(0x40034800), %o0 4000f73c: 94 07 bf f4 add %fp, -12, %o2 4000f740: 40 00 17 9f call 400155bc <_Objects_Get> 4000f744: 90 12 22 00 or %o0, 0x200, %o0 return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 4000f748: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000f74c: 80 a0 60 00 cmp %g1, 0 4000f750: 12 80 00 14 bne 4000f7a0 4000f754: b0 10 00 08 mov %o0, %i0 RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 4000f758: 40 00 11 f2 call 40013f20 <_Chain_Get> 4000f75c: 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 ) { 4000f760: a0 92 20 00 orcc %o0, 0, %l0 4000f764: 32 80 00 14 bne,a 4000f7b4 4000f768: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000f76c: 03 10 00 d3 sethi %hi(0x40034c00), %g1 4000f770: c4 00 60 80 ld [ %g1 + 0x80 ], %g2 ! 40034c80 <_Thread_Dispatch_disable_level> 4000f774: b0 10 20 0d mov 0xd, %i0 4000f778: 84 00 bf ff add %g2, -1, %g2 4000f77c: c4 20 60 80 st %g2, [ %g1 + 0x80 ] 4000f780: c6 00 60 80 ld [ %g1 + 0x80 ], %g3 4000f784: 80 a0 e0 00 cmp %g3, 0 4000f788: 12 80 00 04 bne 4000f798 4000f78c: 01 00 00 00 nop _Thread_Dispatch(); 4000f790: 40 00 1c b3 call 40016a5c <_Thread_Dispatch> 4000f794: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_UNSATISFIED; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000f798: 81 c7 e0 08 ret 4000f79c: 81 e8 00 00 restore if ( !buffer ) return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 4000f7a0: 80 a0 60 02 cmp %g1, 2 4000f7a4: 08 bf ff fd bleu 4000f798 4000f7a8: b0 10 20 04 mov 4, %i0 4000f7ac: 81 c7 e0 08 ret <== NOT EXECUTED 4000f7b0: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED return RTEMS_INVALID_ID; case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { the_partition->number_of_used_blocks += 1; 4000f7b4: 82 00 60 01 inc %g1 4000f7b8: c2 26 20 20 st %g1, [ %i0 + 0x20 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000f7bc: 05 10 00 d3 sethi %hi(0x40034c00), %g2 4000f7c0: c2 00 a0 80 ld [ %g2 + 0x80 ], %g1 ! 40034c80 <_Thread_Dispatch_disable_level> 4000f7c4: 82 00 7f ff add %g1, -1, %g1 4000f7c8: c2 20 a0 80 st %g1, [ %g2 + 0x80 ] 4000f7cc: c6 00 a0 80 ld [ %g2 + 0x80 ], %g3 4000f7d0: 80 a0 e0 00 cmp %g3, 0 4000f7d4: 02 80 00 05 be 4000f7e8 4000f7d8: 01 00 00 00 nop _Thread_Enable_dispatch(); *buffer = the_buffer; 4000f7dc: e0 26 40 00 st %l0, [ %i1 ] <== NOT EXECUTED 4000f7e0: 81 c7 e0 08 ret 4000f7e4: 91 e8 20 00 restore %g0, 0, %o0 _Thread_Dispatch(); 4000f7e8: 40 00 1c 9d call 40016a5c <_Thread_Dispatch> 4000f7ec: 01 00 00 00 nop 4000f7f0: 10 bf ff fc b 4000f7e0 4000f7f4: e0 26 40 00 st %l0, [ %i1 ] 4000f82c : rtems_status_code rtems_partition_return_buffer( Objects_Id id, void *buffer ) { 4000f82c: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 4000f830: 11 10 00 d2 sethi %hi(0x40034800), %o0 4000f834: 92 10 00 18 mov %i0, %o1 4000f838: 90 12 22 00 or %o0, 0x200, %o0 4000f83c: 40 00 17 60 call 400155bc <_Objects_Get> 4000f840: 94 07 bf f4 add %fp, -12, %o2 register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 4000f844: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000f848: 80 a0 60 00 cmp %g1, 0 4000f84c: 12 80 00 12 bne 4000f894 4000f850: b0 10 00 08 mov %o0, %i0 ) { void *starting; void *ending; starting = the_partition->starting_address; 4000f854: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 ending = _Addresses_Add_offset( starting, the_partition->length ); return ( 4000f858: 80 a0 80 19 cmp %g2, %i1 4000f85c: 28 80 00 13 bleu,a 4000f8a8 4000f860: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000f864: 03 10 00 d3 sethi %hi(0x40034c00), %g1 4000f868: c4 00 60 80 ld [ %g1 + 0x80 ], %g2 ! 40034c80 <_Thread_Dispatch_disable_level> 4000f86c: 84 00 bf ff add %g2, -1, %g2 4000f870: c4 20 60 80 st %g2, [ %g1 + 0x80 ] 4000f874: c6 00 60 80 ld [ %g1 + 0x80 ], %g3 4000f878: 80 a0 e0 00 cmp %g3, 0 4000f87c: 12 80 00 27 bne 4000f918 4000f880: 01 00 00 00 nop _Thread_Dispatch(); 4000f884: 40 00 1c 76 call 40016a5c <_Thread_Dispatch> 4000f888: b0 10 20 09 mov 9, %i0 ! 9 4000f88c: 81 c7 e0 08 ret 4000f890: 81 e8 00 00 restore 4000f894: 80 a0 60 02 cmp %g1, 2 4000f898: 08 bf ff fd bleu 4000f88c 4000f89c: b0 10 20 04 mov 4, %i0 4000f8a0: 81 c7 e0 08 ret <== NOT EXECUTED 4000f8a4: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED 4000f8a8: 82 00 80 01 add %g2, %g1, %g1 4000f8ac: 80 a0 40 19 cmp %g1, %i1 4000f8b0: 0a bf ff ed bcs 4000f864 4000f8b4: 01 00 00 00 nop 4000f8b8: d2 02 20 18 ld [ %o0 + 0x18 ], %o1 4000f8bc: 40 00 58 38 call 4002599c <.urem> 4000f8c0: 90 26 40 02 sub %i1, %g2, %o0 4000f8c4: 80 a2 20 00 cmp %o0, 0 4000f8c8: 12 bf ff e7 bne 4000f864 4000f8cc: 92 10 00 19 mov %i1, %o1 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 4000f8d0: 40 00 11 88 call 40013ef0 <_Chain_Append> 4000f8d4: 90 06 20 24 add %i0, 0x24, %o0 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; 4000f8d8: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 4000f8dc: 82 00 7f ff add %g1, -1, %g1 4000f8e0: c2 26 20 20 st %g1, [ %i0 + 0x20 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000f8e4: 07 10 00 d3 sethi %hi(0x40034c00), %g3 4000f8e8: c2 00 e0 80 ld [ %g3 + 0x80 ], %g1 ! 40034c80 <_Thread_Dispatch_disable_level> 4000f8ec: b0 10 20 00 clr %i0 4000f8f0: 82 00 7f ff add %g1, -1, %g1 4000f8f4: c2 20 e0 80 st %g1, [ %g3 + 0x80 ] 4000f8f8: c4 00 e0 80 ld [ %g3 + 0x80 ], %g2 4000f8fc: 80 a0 a0 00 cmp %g2, 0 4000f900: 12 80 00 04 bne 4000f910 4000f904: 01 00 00 00 nop _Thread_Dispatch(); 4000f908: 40 00 1c 55 call 40016a5c <_Thread_Dispatch> 4000f90c: 01 00 00 00 nop 4000f910: 81 c7 e0 08 ret 4000f914: 81 e8 00 00 restore _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000f918: 81 c7 e0 08 ret <== NOT EXECUTED 4000f91c: 91 e8 20 09 restore %g0, 9, %o0 <== NOT EXECUTED 4000e798 : */ rtems_status_code rtems_port_delete( Objects_Id id ) { 4000e798: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 4000e79c: 92 10 00 18 mov %i0, %o1 4000e7a0: 94 07 bf f4 add %fp, -12, %o2 4000e7a4: 31 10 00 d2 sethi %hi(0x40034800), %i0 4000e7a8: 40 00 1b 85 call 400155bc <_Objects_Get> 4000e7ac: 90 16 21 b4 or %i0, 0x1b4, %o0 ! 400349b4 <_Dual_ported_memory_Information> register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 4000e7b0: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000e7b4: 80 a0 60 00 cmp %g1, 0 4000e7b8: 12 80 00 1a bne 4000e820 4000e7bc: 92 10 00 08 mov %o0, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000e7c0: 90 16 21 b4 or %i0, 0x1b4, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 4000e7c4: c2 02 60 08 ld [ %o1 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000e7c8: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 4000e7cc: 05 00 00 3f sethi %hi(0xfc00), %g2 4000e7d0: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 4000e7d4: 82 08 40 02 and %g1, %g2, %g1 4000e7d8: 80 a0 40 03 cmp %g1, %g3 4000e7dc: 18 80 00 04 bgu 4000e7ec 4000e7e0: 83 28 60 02 sll %g1, 2, %g1 information->local_table[ index ] = the_object; 4000e7e4: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 4000e7e8: c0 20 80 01 clr [ %g2 + %g1 ] RTEMS_INLINE_ROUTINE void _Dual_ported_memory_Free ( Dual_ported_memory_Control *the_port ) { _Objects_Free( &_Dual_ported_memory_Information, &the_port->Object ); 4000e7ec: 40 00 1b 1d call 40015460 <_Objects_Free> 4000e7f0: c0 22 60 0c clr [ %o1 + 0xc ] 4000e7f4: 03 10 00 d3 sethi %hi(0x40034c00), %g1 4000e7f8: c4 00 60 80 ld [ %g1 + 0x80 ], %g2 ! 40034c80 <_Thread_Dispatch_disable_level> 4000e7fc: b0 10 20 00 clr %i0 4000e800: 84 00 bf ff add %g2, -1, %g2 4000e804: c4 20 60 80 st %g2, [ %g1 + 0x80 ] 4000e808: c6 00 60 80 ld [ %g1 + 0x80 ], %g3 4000e80c: 80 a0 e0 00 cmp %g3, 0 4000e810: 02 80 00 0a be 4000e838 4000e814: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000e818: 81 c7 e0 08 ret <== NOT EXECUTED 4000e81c: 81 e8 00 00 restore <== NOT EXECUTED { register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 4000e820: 82 18 60 02 xor %g1, 2, %g1 4000e824: 80 a0 00 01 cmp %g0, %g1 4000e828: 84 60 20 00 subx %g0, 0, %g2 4000e82c: b0 08 a0 15 and %g2, 0x15, %i0 4000e830: 81 c7 e0 08 ret 4000e834: 91 ee 20 04 restore %i0, 4, %o0 _Thread_Dispatch(); 4000e838: 40 00 20 89 call 40016a5c <_Thread_Dispatch> 4000e83c: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000e840: 81 c7 e0 08 ret 4000e844: 81 e8 00 00 restore 4000fb34 : */ rtems_status_code rtems_rate_monotonic_delete( Objects_Id id ) { 4000fb34: 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 *) 4000fb38: 21 10 00 d2 sethi %hi(0x40034800), %l0 4000fb3c: 92 10 00 18 mov %i0, %o1 4000fb40: 94 07 bf f4 add %fp, -12, %o2 4000fb44: 40 00 16 9e call 400155bc <_Objects_Get> 4000fb48: 90 14 22 4c or %l0, 0x24c, %o0 Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 4000fb4c: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000fb50: 80 a0 60 00 cmp %g1, 0 4000fb54: 12 80 00 20 bne 4000fbd4 4000fb58: b0 10 00 08 mov %o0, %i0 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000fb5c: a0 14 22 4c or %l0, 0x24c, %l0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 4000fb60: c2 02 20 08 ld [ %o0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000fb64: c6 14 20 10 lduh [ %l0 + 0x10 ], %g3 4000fb68: 05 00 00 3f sethi %hi(0xfc00), %g2 4000fb6c: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 4000fb70: 82 08 40 02 and %g1, %g2, %g1 4000fb74: 80 a0 40 03 cmp %g1, %g3 4000fb78: 38 80 00 06 bgu,a 4000fb90 4000fb7c: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 4000fb80: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 4000fb84: 83 28 60 02 sll %g1, 2, %g1 4000fb88: 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; 4000fb8c: 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 ); 4000fb90: 40 00 22 7b call 4001857c <_Watchdog_Remove> 4000fb94: 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 ); 4000fb98: 90 10 00 10 mov %l0, %o0 the_period->state = RATE_MONOTONIC_INACTIVE; 4000fb9c: c0 26 20 38 clr [ %i0 + 0x38 ] 4000fba0: 40 00 16 30 call 40015460 <_Objects_Free> 4000fba4: 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 ) 4000fba8: 03 10 00 d3 sethi %hi(0x40034c00), %g1 4000fbac: c4 00 60 80 ld [ %g1 + 0x80 ], %g2 ! 40034c80 <_Thread_Dispatch_disable_level> 4000fbb0: b0 10 20 00 clr %i0 4000fbb4: 84 00 bf ff add %g2, -1, %g2 4000fbb8: c4 20 60 80 st %g2, [ %g1 + 0x80 ] 4000fbbc: c6 00 60 80 ld [ %g1 + 0x80 ], %g3 4000fbc0: 80 a0 e0 00 cmp %g3, 0 4000fbc4: 02 80 00 0a be 4000fbec 4000fbc8: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000fbcc: 81 c7 e0 08 ret <== NOT EXECUTED 4000fbd0: 81 e8 00 00 restore <== NOT EXECUTED { Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 4000fbd4: 82 18 60 02 xor %g1, 2, %g1 4000fbd8: 80 a0 00 01 cmp %g0, %g1 4000fbdc: 84 60 20 00 subx %g0, 0, %g2 4000fbe0: b0 08 a0 15 and %g2, 0x15, %i0 4000fbe4: 81 c7 e0 08 ret 4000fbe8: 91 ee 20 04 restore %i0, 4, %o0 _Thread_Dispatch(); 4000fbec: 40 00 1b 9c call 40016a5c <_Thread_Dispatch> 4000fbf0: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000fbf4: 81 c7 e0 08 ret 4000fbf8: 81 e8 00 00 restore 4000edb0 : rtems_status_code rtems_rate_monotonic_get_statistics( Objects_Id id, rtems_rate_monotonic_period_statistics *statistics ) { 4000edb0: 9d e3 bf 90 save %sp, -112, %sp 4000edb4: 92 10 00 18 mov %i0, %o1 Objects_Locations location; Rate_monotonic_Control *the_period; if ( !statistics ) 4000edb8: 80 a6 60 00 cmp %i1, 0 4000edbc: 02 80 00 17 be 4000ee18 4000edc0: b0 10 20 09 mov 9, %i0 4000edc4: 11 10 00 7e sethi %hi(0x4001f800), %o0 4000edc8: 94 07 bf f4 add %fp, -12, %o2 4000edcc: 7f ff ea dc call 4000993c <_Objects_Get> 4000edd0: 90 12 21 48 or %o0, 0x148, %o0 return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 4000edd4: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000edd8: 80 a0 60 00 cmp %g1, 0 4000eddc: 12 80 00 11 bne 4000ee20 4000ede0: 92 10 00 08 mov %o0, %o1 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: *statistics = the_period->Statistics; 4000ede4: 90 10 00 19 mov %i1, %o0 4000ede8: 92 02 60 54 add %o1, 0x54, %o1 4000edec: 40 00 09 2b call 40011298 4000edf0: 94 10 20 38 mov 0x38, %o2 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000edf4: 03 10 00 7e sethi %hi(0x4001f800), %g1 4000edf8: c4 00 62 e0 ld [ %g1 + 0x2e0 ], %g2 ! 4001fae0 <_Thread_Dispatch_disable_level> 4000edfc: b0 10 20 00 clr %i0 4000ee00: 84 00 bf ff add %g2, -1, %g2 4000ee04: c4 20 62 e0 st %g2, [ %g1 + 0x2e0 ] 4000ee08: c6 00 62 e0 ld [ %g1 + 0x2e0 ], %g3 4000ee0c: 80 a0 e0 00 cmp %g3, 0 4000ee10: 02 80 00 0a be 4000ee38 4000ee14: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000ee18: 81 c7 e0 08 ret <== NOT EXECUTED 4000ee1c: 81 e8 00 00 restore <== NOT EXECUTED if ( !statistics ) return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 4000ee20: 82 18 60 02 xor %g1, 2, %g1 4000ee24: 80 a0 00 01 cmp %g0, %g1 4000ee28: 84 60 20 00 subx %g0, 0, %g2 4000ee2c: b0 08 a0 15 and %g2, 0x15, %i0 4000ee30: 81 c7 e0 08 ret 4000ee34: 91 ee 20 04 restore %i0, 4, %o0 _Thread_Dispatch(); 4000ee38: 7f ff ef e9 call 4000addc <_Thread_Dispatch> 4000ee3c: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000ee40: 81 c7 e0 08 ret 4000ee44: 81 e8 00 00 restore 4000ee48 : rtems_status_code rtems_rate_monotonic_get_status( Objects_Id id, rtems_rate_monotonic_period_status *status ) { 4000ee48: 9d e3 bf 88 save %sp, -120, %sp 4000ee4c: 92 10 00 18 mov %i0, %o1 Objects_Locations location; Rate_monotonic_Control *the_period; if ( !status ) 4000ee50: 80 a6 60 00 cmp %i1, 0 4000ee54: 02 80 00 21 be 4000eed8 4000ee58: b0 10 20 09 mov 9, %i0 4000ee5c: 11 10 00 7e sethi %hi(0x4001f800), %o0 4000ee60: 94 07 bf f4 add %fp, -12, %o2 4000ee64: 7f ff ea b6 call 4000993c <_Objects_Get> 4000ee68: 90 12 21 48 or %o0, 0x148, %o0 return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 4000ee6c: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000ee70: 80 a0 60 00 cmp %g1, 0 4000ee74: 12 80 00 1b bne 4000eee0 4000ee78: b0 10 00 08 mov %o0, %i0 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); 4000ee7c: c2 02 20 50 ld [ %o0 + 0x50 ], %g1 4000ee80: 80 a0 60 00 cmp %g1, 0 4000ee84: 02 80 00 03 be 4000ee90 4000ee88: 84 10 20 00 clr %g2 4000ee8c: c4 00 60 08 ld [ %g1 + 8 ], %g2 status->state = the_period->state; 4000ee90: 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); 4000ee94: c4 26 40 00 st %g2, [ %i1 ] status->state = the_period->state; if ( status->state == RATE_MONOTONIC_INACTIVE ) { 4000ee98: 80 a0 60 00 cmp %g1, 0 4000ee9c: 12 80 00 1b bne 4000ef08 4000eea0: 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; 4000eea4: 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; 4000eea8: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED status->since_last_period.tv_nsec = 0; 4000eeac: 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; 4000eeb0: c0 26 60 10 clr [ %i1 + 0x10 ] <== 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 ) 4000eeb4: 03 10 00 7e sethi %hi(0x4001f800), %g1 4000eeb8: c4 00 62 e0 ld [ %g1 + 0x2e0 ], %g2 ! 4001fae0 <_Thread_Dispatch_disable_level> 4000eebc: b0 10 20 00 clr %i0 4000eec0: 84 00 bf ff add %g2, -1, %g2 4000eec4: c4 20 62 e0 st %g2, [ %g1 + 0x2e0 ] 4000eec8: c6 00 62 e0 ld [ %g1 + 0x2e0 ], %g3 4000eecc: 80 a0 e0 00 cmp %g3, 0 4000eed0: 02 80 00 0a be 4000eef8 4000eed4: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000eed8: 81 c7 e0 08 ret <== NOT EXECUTED 4000eedc: 81 e8 00 00 restore <== NOT EXECUTED if ( !status ) return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 4000eee0: 82 18 60 02 xor %g1, 2, %g1 <== NOT EXECUTED 4000eee4: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 4000eee8: 84 60 20 00 subx %g0, 0, %g2 <== NOT EXECUTED 4000eeec: b0 08 a0 15 and %g2, 0x15, %i0 <== NOT EXECUTED 4000eef0: 81 c7 e0 08 ret <== NOT EXECUTED 4000eef4: 91 ee 20 04 restore %i0, 4, %o0 <== NOT EXECUTED _Thread_Dispatch(); 4000eef8: 7f ff ef b9 call 4000addc <_Thread_Dispatch> 4000eefc: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000ef00: 81 c7 e0 08 ret 4000ef04: 81 e8 00 00 restore * 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 ); 4000ef08: a0 07 bf ec add %fp, -20, %l0 4000ef0c: 7f ff e7 3e call 40008c04 <_TOD_Get_uptime> 4000ef10: 90 10 00 10 mov %l0, %o0 #endif #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS _Timespec_Subtract( 4000ef14: 90 06 20 44 add %i0, 0x44, %o0 4000ef18: 92 10 00 10 mov %l0, %o1 4000ef1c: 7f ff f4 6b call 4000c0c8 <_Timespec_Subtract> 4000ef20: 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( 4000ef24: 92 10 00 10 mov %l0, %o1 4000ef28: 94 06 60 10 add %i1, 0x10, %o2 4000ef2c: 11 10 00 7e sethi %hi(0x4001f800), %o0 4000ef30: 7f ff f4 66 call 4000c0c8 <_Timespec_Subtract> 4000ef34: 90 12 23 c4 or %o0, 0x3c4, %o0 ! 4001fbc4 <_Thread_Time_of_last_context_switch> 4000ef38: 30 bf ff df b,a 4000eeb4 40006bd0 : rtems_status_code rtems_rate_monotonic_period( Objects_Id id, rtems_interval length ) { 40006bd0: 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 *) 40006bd4: 11 10 00 7e sethi %hi(0x4001f800), %o0 40006bd8: 92 10 00 18 mov %i0, %o1 40006bdc: 90 12 21 48 or %o0, 0x148, %o0 40006be0: 40 00 0b 57 call 4000993c <_Objects_Get> 40006be4: 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 ) { 40006be8: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006bec: 80 a0 60 00 cmp %g1, 0 40006bf0: 12 80 00 15 bne 40006c44 40006bf4: a2 10 00 08 mov %o0, %l1 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 40006bf8: 25 10 00 7e sethi %hi(0x4001f800), %l2 40006bfc: c4 02 20 50 ld [ %o0 + 0x50 ], %g2 40006c00: c2 04 a3 bc ld [ %l2 + 0x3bc ], %g1 40006c04: 80 a0 80 01 cmp %g2, %g1 40006c08: 02 80 00 14 be 40006c58 40006c0c: 80 a6 60 00 cmp %i1, 0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006c10: 03 10 00 7e sethi %hi(0x4001f800), %g1 40006c14: c4 00 62 e0 ld [ %g1 + 0x2e0 ], %g2 ! 4001fae0 <_Thread_Dispatch_disable_level> 40006c18: b0 10 20 17 mov 0x17, %i0 _Thread_Dispatch(); 40006c1c: 84 00 bf ff add %g2, -1, %g2 40006c20: c4 20 62 e0 st %g2, [ %g1 + 0x2e0 ] 40006c24: c6 00 62 e0 ld [ %g1 + 0x2e0 ], %g3 40006c28: 80 a0 e0 00 cmp %g3, 0 40006c2c: 12 80 00 66 bne 40006dc4 40006c30: 01 00 00 00 nop 40006c34: 40 00 10 6a call 4000addc <_Thread_Dispatch> 40006c38: 01 00 00 00 nop 40006c3c: 81 c7 e0 08 ret 40006c40: 81 e8 00 00 restore rtems_status_code return_value; rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 40006c44: 80 a0 60 02 cmp %g1, 2 40006c48: 02 bf ff fd be 40006c3c 40006c4c: b0 10 20 04 mov 4, %i0 break; } } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40006c50: 81 c7 e0 08 ret <== NOT EXECUTED 40006c54: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 40006c58: 22 80 00 73 be,a 40006e24 40006c5c: d0 02 20 38 ld [ %o0 + 0x38 ], %o0 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 40006c60: 7f ff ef 57 call 400029bc 40006c64: 01 00 00 00 nop 40006c68: a0 10 00 08 mov %o0, %l0 switch ( the_period->state ) { 40006c6c: e6 04 60 38 ld [ %l1 + 0x38 ], %l3 40006c70: 80 a4 e0 02 cmp %l3, 2 40006c74: 02 80 00 34 be 40006d44 40006c78: 80 a4 e0 04 cmp %l3, 4 40006c7c: 02 80 00 54 be 40006dcc 40006c80: 80 a4 e0 00 cmp %l3, 0 40006c84: 32 bf ff ee bne,a 40006c3c 40006c88: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED /* * No need to update statistics -- there are not a period active */ _ISR_Enable( level ); 40006c8c: 7f ff ef 50 call 400029cc 40006c90: 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 ); 40006c94: 40 00 07 dc call 40008c04 <_TOD_Get_uptime> 40006c98: 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; 40006c9c: c2 07 bf ec ld [ %fp + -20 ], %g1 #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS { struct timespec ran; the_period->owner_executed_at_period = 40006ca0: c6 04 a3 bc ld [ %l2 + 0x3bc ], %g3 #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; 40006ca4: c2 24 60 44 st %g1, [ %l1 + 0x44 ] 40006ca8: 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( 40006cac: 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; 40006cb0: c2 24 60 48 st %g1, [ %l1 + 0x48 ] #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS { struct timespec ran; the_period->owner_executed_at_period = 40006cb4: c4 00 e0 90 ld [ %g3 + 0x90 ], %g2 _Thread_Executing->cpu_time_used; /* How much time time since last context switch */ _Timespec_Subtract( 40006cb8: a0 07 bf e4 add %fp, -28, %l0 #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS { struct timespec ran; the_period->owner_executed_at_period = 40006cbc: c4 24 60 3c st %g2, [ %l1 + 0x3c ] 40006cc0: c2 00 e0 94 ld [ %g3 + 0x94 ], %g1 _Thread_Executing->cpu_time_used; /* How much time time since last context switch */ _Timespec_Subtract( 40006cc4: 94 10 00 10 mov %l0, %o2 #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS { struct timespec ran; the_period->owner_executed_at_period = 40006cc8: c2 24 60 40 st %g1, [ %l1 + 0x40 ] _Thread_Executing->cpu_time_used; /* How much time time since last context switch */ _Timespec_Subtract( 40006ccc: 11 10 00 7e sethi %hi(0x4001f800), %o0 40006cd0: 40 00 14 fe call 4000c0c8 <_Timespec_Subtract> 40006cd4: 90 12 23 c4 or %o0, 0x3c4, %o0 ! 4001fbc4 <_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 ); 40006cd8: 92 10 00 10 mov %l0, %o1 40006cdc: 40 00 14 98 call 4000bf3c <_Timespec_Add_to> 40006ce0: 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; 40006ce4: 84 10 20 02 mov 2, %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40006ce8: 03 10 00 1c sethi %hi(0x40007000), %g1 40006cec: 82 10 61 f8 or %g1, 0x1f8, %g1 ! 400071f8 <_Rate_monotonic_Timeout> the_watchdog->id = id; 40006cf0: f0 24 60 30 st %i0, [ %l1 + 0x30 ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40006cf4: f2 24 60 1c st %i1, [ %l1 + 0x1c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40006cf8: c0 24 60 18 clr [ %l1 + 0x18 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 40006cfc: c0 24 60 34 clr [ %l1 + 0x34 ] _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 40006d00: f2 24 60 4c st %i1, [ %l1 + 0x4c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40006d04: 92 04 60 10 add %l1, 0x10, %o1 #else the_period->owner_ticks_executed_at_period = _Thread_Executing->ticks_executed; #endif the_period->state = RATE_MONOTONIC_ACTIVE; 40006d08: c4 24 60 38 st %g2, [ %l1 + 0x38 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40006d0c: c2 24 60 2c st %g1, [ %l1 + 0x2c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40006d10: 11 10 00 7e sethi %hi(0x4001f800), %o0 40006d14: 40 00 15 b8 call 4000c3f4 <_Watchdog_Insert> 40006d18: 90 12 23 dc or %o0, 0x3dc, %o0 ! 4001fbdc <_Watchdog_Ticks_chain> #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006d1c: 05 10 00 7e sethi %hi(0x4001f800), %g2 40006d20: c2 00 a2 e0 ld [ %g2 + 0x2e0 ], %g1 ! 4001fae0 <_Thread_Dispatch_disable_level> 40006d24: 82 00 7f ff add %g1, -1, %g1 40006d28: c2 20 a2 e0 st %g1, [ %g2 + 0x2e0 ] 40006d2c: c6 00 a2 e0 ld [ %g2 + 0x2e0 ], %g3 40006d30: 80 a0 e0 00 cmp %g3, 0 40006d34: 02 80 00 22 be 40006dbc 40006d38: 01 00 00 00 nop _Thread_Dispatch(); 40006d3c: 81 c7 e0 08 ret <== NOT EXECUTED 40006d40: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 40006d44: 7f ff ff 43 call 40006a50 <_Rate_monotonic_Update_statistics> 40006d48: 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; 40006d4c: 82 10 20 01 mov 1, %g1 the_period->next_length = length; 40006d50: 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; 40006d54: c2 24 60 38 st %g1, [ %l1 + 0x38 ] the_period->next_length = length; _ISR_Enable( level ); 40006d58: 7f ff ef 1d call 400029cc 40006d5c: 90 10 00 10 mov %l0, %o0 _Thread_Executing->Wait.id = the_period->Object.id; 40006d60: c2 04 a3 bc ld [ %l2 + 0x3bc ], %g1 40006d64: c4 04 60 08 ld [ %l1 + 8 ], %g2 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40006d68: 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; 40006d6c: c4 20 60 20 st %g2, [ %g1 + 0x20 ] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40006d70: 40 00 13 41 call 4000ba74 <_Thread_Set_state> 40006d74: 13 00 00 10 sethi %hi(0x4000), %o1 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 40006d78: 7f ff ef 11 call 400029bc 40006d7c: 01 00 00 00 nop local_state = the_period->state; 40006d80: e0 04 60 38 ld [ %l1 + 0x38 ], %l0 the_period->state = RATE_MONOTONIC_ACTIVE; 40006d84: e6 24 60 38 st %l3, [ %l1 + 0x38 ] _ISR_Enable( level ); 40006d88: 7f ff ef 11 call 400029cc 40006d8c: 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 ) 40006d90: 80 a4 20 03 cmp %l0, 3 40006d94: 02 80 00 32 be 40006e5c 40006d98: d0 04 a3 bc ld [ %l2 + 0x3bc ], %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006d9c: 03 10 00 7e sethi %hi(0x4001f800), %g1 40006da0: c4 00 62 e0 ld [ %g1 + 0x2e0 ], %g2 ! 4001fae0 <_Thread_Dispatch_disable_level> 40006da4: 84 00 bf ff add %g2, -1, %g2 40006da8: c4 20 62 e0 st %g2, [ %g1 + 0x2e0 ] 40006dac: c6 00 62 e0 ld [ %g1 + 0x2e0 ], %g3 40006db0: 80 a0 e0 00 cmp %g3, 0 40006db4: 12 bf ff e2 bne 40006d3c 40006db8: 01 00 00 00 nop _Thread_Dispatch(); 40006dbc: 40 00 10 08 call 4000addc <_Thread_Dispatch> 40006dc0: b0 10 20 00 clr %i0 ! 0 40006dc4: 81 c7 e0 08 ret 40006dc8: 81 e8 00 00 restore case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 40006dcc: 7f ff ff 21 call 40006a50 <_Rate_monotonic_Update_statistics> 40006dd0: 90 10 00 11 mov %l1, %o0 _ISR_Enable( level ); 40006dd4: 7f ff ee fe call 400029cc 40006dd8: 90 10 00 10 mov %l0, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 40006ddc: 82 10 20 02 mov 2, %g1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40006de0: f2 24 60 1c st %i1, [ %l1 + 0x1c ] the_period->next_length = length; 40006de4: f2 24 60 4c st %i1, [ %l1 + 0x4c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40006de8: 92 04 60 10 add %l1, 0x10, %o1 */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 40006dec: c2 24 60 38 st %g1, [ %l1 + 0x38 ] 40006df0: 11 10 00 7e sethi %hi(0x4001f800), %o0 40006df4: 40 00 15 80 call 4000c3f4 <_Watchdog_Insert> 40006df8: 90 12 23 dc or %o0, 0x3dc, %o0 ! 4001fbdc <_Watchdog_Ticks_chain> #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006dfc: 07 10 00 7e sethi %hi(0x4001f800), %g3 40006e00: c2 00 e2 e0 ld [ %g3 + 0x2e0 ], %g1 ! 4001fae0 <_Thread_Dispatch_disable_level> 40006e04: b0 10 20 06 mov 6, %i0 40006e08: 82 00 7f ff add %g1, -1, %g1 40006e0c: c2 20 e2 e0 st %g1, [ %g3 + 0x2e0 ] 40006e10: c4 00 e2 e0 ld [ %g3 + 0x2e0 ], %g2 40006e14: 80 a0 a0 00 cmp %g2, 0 40006e18: 02 bf ff 87 be 40006c34 40006e1c: 01 00 00 00 nop 40006e20: 30 bf ff e9 b,a 40006dc4 <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 40006e24: 80 a2 20 02 cmp %o0, 2 40006e28: 02 80 00 09 be 40006e4c 40006e2c: b0 10 20 00 clr %i0 40006e30: 80 a2 20 04 cmp %o0, 4 40006e34: 02 80 00 06 be 40006e4c 40006e38: b0 10 20 06 mov 6, %i0 40006e3c: 80 a2 20 00 cmp %o0, 0 40006e40: 02 80 00 03 be 40006e4c 40006e44: b0 10 20 0b mov 0xb, %i0 40006e48: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED 40006e4c: 03 10 00 7e sethi %hi(0x4001f800), %g1 40006e50: c4 00 62 e0 ld [ %g1 + 0x2e0 ], %g2 ! 4001fae0 <_Thread_Dispatch_disable_level> 40006e54: 10 bf ff 73 b 40006c20 40006e58: 84 00 bf ff add %g2, -1, %g2 * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40006e5c: 40 00 0f 2b call 4000ab08 <_Thread_Clear_state> <== NOT EXECUTED 40006e60: 13 00 00 10 sethi %hi(0x4000), %o1 <== NOT EXECUTED 40006e64: 30 bf ff ce b,a 40006d9c <== NOT EXECUTED 40006e68 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 40006e68: 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 ) 40006e6c: 80 a6 60 00 cmp %i1, 0 40006e70: 02 80 00 4e be 40006fa8 40006e74: 90 10 00 18 mov %i0, %o0 return; (*print)( context, "Period information by period\n" ); 40006e78: 13 10 00 74 sethi %hi(0x4001d000), %o1 40006e7c: 9f c6 40 00 call %i1 40006e80: 92 12 60 48 or %o1, 0x48, %o1 ! 4001d048 #if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) (*print)( context, "--- CPU times are in seconds ---\n" ); 40006e84: 90 10 00 18 mov %i0, %o0 40006e88: 13 10 00 74 sethi %hi(0x4001d000), %o1 40006e8c: 9f c6 40 00 call %i1 40006e90: 92 12 60 68 or %o1, 0x68, %o1 ! 4001d068 #endif #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) (*print)( context, "--- Wall times are in seconds ---\n" ); 40006e94: 90 10 00 18 mov %i0, %o0 40006e98: 13 10 00 74 sethi %hi(0x4001d000), %o1 40006e9c: 9f c6 40 00 call %i1 40006ea0: 92 12 60 90 or %o1, 0x90, %o1 ! 4001d090 Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 40006ea4: 90 10 00 18 mov %i0, %o0 40006ea8: 13 10 00 74 sethi %hi(0x4001d000), %o1 40006eac: 9f c6 40 00 call %i1 40006eb0: 92 12 60 b8 or %o1, 0xb8, %o1 ! 4001d0b8 #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS " " #endif " WALL TIME\n" ); (*print)( context, " " 40006eb4: 90 10 00 18 mov %i0, %o0 40006eb8: 13 10 00 74 sethi %hi(0x4001d000), %o1 40006ebc: 9f c6 40 00 call %i1 40006ec0: 92 12 61 08 or %o1, 0x108, %o1 ! 4001d108 /* * 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 ; 40006ec4: 03 10 00 7e sethi %hi(0x4001f800), %g1 40006ec8: a6 10 61 48 or %g1, 0x148, %l3 ! 4001f948 <_Rate_monotonic_Information> 40006ecc: e4 04 e0 08 ld [ %l3 + 8 ], %l2 id <= _Rate_monotonic_Information.maximum_id ; 40006ed0: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 40006ed4: 80 a4 80 01 cmp %l2, %g1 40006ed8: 18 80 00 34 bgu 40006fa8 40006edc: 03 10 00 74 sethi %hi(0x4001d000), %g1 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 40006ee0: 05 10 00 74 sethi %hi(0x4001d000), %g2 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 40006ee4: b6 10 61 58 or %g1, 0x158, %i3 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 40006ee8: b8 10 a0 88 or %g2, 0x88, %i4 40006eec: a8 07 bf 98 add %fp, -104, %l4 status = rtems_rate_monotonic_get_statistics( id, &the_stats ); if ( status != RTEMS_SUCCESSFUL ) continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 40006ef0: aa 07 bf d0 add %fp, -48, %l5 */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 40006ef4: ba 07 bf b0 add %fp, -80, %i5 40006ef8: ac 07 bf e8 add %fp, -24, %l6 * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 40006efc: b4 07 bf c8 add %fp, -56, %i2 40006f00: 10 80 00 06 b 40006f18 40006f04: ae 07 bf f3 add %fp, -13, %l7 * 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++ ) { 40006f08: 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 ; 40006f0c: 80 a0 40 12 cmp %g1, %l2 40006f10: 0a 80 00 26 bcs 40006fa8 40006f14: 01 00 00 00 nop id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 40006f18: 90 10 00 12 mov %l2, %o0 40006f1c: 40 00 1f a5 call 4000edb0 40006f20: 92 10 00 14 mov %l4, %o1 if ( status != RTEMS_SUCCESSFUL ) 40006f24: 80 a2 20 00 cmp %o0, 0 40006f28: 32 bf ff f8 bne,a 40006f08 40006f2c: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 40006f30: 92 10 00 15 mov %l5, %o1 40006f34: 40 00 1f c5 call 4000ee48 40006f38: 90 10 00 12 mov %l2, %o0 if ( status != RTEMS_SUCCESSFUL ) 40006f3c: 80 a2 20 00 cmp %o0, 0 40006f40: 32 bf ff f2 bne,a 40006f08 40006f44: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 <== NOT EXECUTED continue; name[ 0 ] = '\0'; if ( the_status.owner ) { 40006f48: d0 07 bf d0 ld [ %fp + -48 ], %o0 /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); if ( status != RTEMS_SUCCESSFUL ) continue; name[ 0 ] = '\0'; 40006f4c: c0 2f bf f3 clrb [ %fp + -13 ] if ( the_status.owner ) { 40006f50: 80 a2 20 00 cmp %o0, 0 40006f54: 12 80 00 4b bne 40007080 40006f58: a0 10 00 17 mov %l7, %l0 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 40006f5c: d8 1f bf 98 ldd [ %fp + -104 ], %o4 <== NOT EXECUTED 40006f60: 94 10 00 12 mov %l2, %o2 40006f64: 92 10 00 1b mov %i3, %o1 40006f68: 96 10 00 10 mov %l0, %o3 40006f6c: 9f c6 40 00 call %i1 40006f70: 90 10 00 18 mov %i0, %o0 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 40006f74: c2 07 bf 98 ld [ %fp + -104 ], %g1 */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 40006f78: 94 10 00 16 mov %l6, %o2 40006f7c: 90 10 00 1d mov %i5, %o0 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 40006f80: 80 a0 60 00 cmp %g1, 0 40006f84: 12 80 00 0b bne 40006fb0 40006f88: 92 10 00 1c mov %i4, %o1 (*print)( context, "\n" ); 40006f8c: 9f c6 40 00 call %i1 40006f90: 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 ; 40006f94: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 id++ ) { 40006f98: 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 ; 40006f9c: 80 a0 40 12 cmp %g1, %l2 40006fa0: 1a bf ff df bcc 40006f1c 40006fa4: 90 10 00 12 mov %l2, %o0 40006fa8: 81 c7 e0 08 ret 40006fac: 81 e8 00 00 restore */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 40006fb0: 40 00 13 fd call 4000bfa4 <_Timespec_Divide_by_integer> 40006fb4: 92 10 00 01 mov %g1, %o1 &the_stats.total_cpu_time, the_stats.count, &cpu_average ); (*print)( context, 40006fb8: d0 07 bf a4 ld [ %fp + -92 ], %o0 40006fbc: 40 00 49 c8 call 400196dc <.div> 40006fc0: 92 10 23 e8 mov 0x3e8, %o1 40006fc4: a2 10 00 08 mov %o0, %l1 40006fc8: d0 07 bf ac ld [ %fp + -84 ], %o0 40006fcc: 40 00 49 c4 call 400196dc <.div> 40006fd0: 92 10 23 e8 mov 0x3e8, %o1 40006fd4: c2 07 bf e8 ld [ %fp + -24 ], %g1 40006fd8: a0 10 00 08 mov %o0, %l0 40006fdc: d0 07 bf ec ld [ %fp + -20 ], %o0 40006fe0: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 40006fe4: 40 00 49 be call 400196dc <.div> 40006fe8: 92 10 23 e8 mov 0x3e8, %o1 40006fec: d8 07 bf a8 ld [ %fp + -88 ], %o4 40006ff0: d4 07 bf a0 ld [ %fp + -96 ], %o2 40006ff4: 96 10 00 11 mov %l1, %o3 40006ff8: 9a 10 00 10 mov %l0, %o5 40006ffc: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 40007000: 13 10 00 74 sethi %hi(0x4001d000), %o1 40007004: 90 10 00 18 mov %i0, %o0 40007008: 9f c6 40 00 call %i1 4000700c: 92 12 61 70 or %o1, 0x170, %o1 * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 40007010: d2 07 bf 98 ld [ %fp + -104 ], %o1 40007014: 94 10 00 16 mov %l6, %o2 40007018: 40 00 13 e3 call 4000bfa4 <_Timespec_Divide_by_integer> 4000701c: 90 10 00 1a mov %i2, %o0 &the_stats.total_wall_time, the_stats.count, &wall_average ); (*print)( context, 40007020: d0 07 bf bc ld [ %fp + -68 ], %o0 40007024: 40 00 49 ae call 400196dc <.div> 40007028: 92 10 23 e8 mov 0x3e8, %o1 4000702c: a2 10 00 08 mov %o0, %l1 40007030: d0 07 bf c4 ld [ %fp + -60 ], %o0 40007034: 40 00 49 aa call 400196dc <.div> 40007038: 92 10 23 e8 mov 0x3e8, %o1 4000703c: c2 07 bf e8 ld [ %fp + -24 ], %g1 40007040: a0 10 00 08 mov %o0, %l0 40007044: d0 07 bf ec ld [ %fp + -20 ], %o0 40007048: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 4000704c: 40 00 49 a4 call 400196dc <.div> 40007050: 92 10 23 e8 mov 0x3e8, %o1 40007054: d4 07 bf b8 ld [ %fp + -72 ], %o2 40007058: d8 07 bf c0 ld [ %fp + -64 ], %o4 4000705c: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 40007060: 96 10 00 11 mov %l1, %o3 40007064: 9a 10 00 10 mov %l0, %o5 40007068: 90 10 00 18 mov %i0, %o0 4000706c: 13 10 00 74 sethi %hi(0x4001d000), %o1 40007070: 9f c6 40 00 call %i1 40007074: 92 12 61 90 or %o1, 0x190, %o1 ! 4001d190 /* * 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 ; 40007078: 10 bf ff a4 b 40006f08 4000707c: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 continue; name[ 0 ] = '\0'; if ( the_status.owner ) { rtems_object_get_name( the_status.owner, sizeof(name), name ); 40007080: 92 10 20 05 mov 5, %o1 40007084: 40 00 00 8f call 400072c0 40007088: 94 10 00 17 mov %l7, %o2 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 4000708c: 10 bf ff b5 b 40006f60 40007090: d8 1f bf 98 ldd [ %fp + -104 ], %o4 400070b0 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 400070b0: 9d e3 bf 98 save %sp, -104, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400070b4: 25 10 00 7e sethi %hi(0x4001f800), %l2 400070b8: c2 04 a2 e0 ld [ %l2 + 0x2e0 ], %g1 ! 4001fae0 <_Thread_Dispatch_disable_level> 400070bc: 82 00 60 01 inc %g1 400070c0: c2 24 a2 e0 st %g1, [ %l2 + 0x2e0 ] /* * 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 ; 400070c4: 03 10 00 7e sethi %hi(0x4001f800), %g1 400070c8: a2 10 61 48 or %g1, 0x148, %l1 ! 4001f948 <_Rate_monotonic_Information> 400070cc: e0 04 60 08 ld [ %l1 + 8 ], %l0 id <= _Rate_monotonic_Information.maximum_id ; 400070d0: c2 04 60 0c ld [ %l1 + 0xc ], %g1 400070d4: 80 a4 00 01 cmp %l0, %g1 400070d8: 18 80 00 09 bgu 400070fc 400070dc: 01 00 00 00 nop id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 400070e0: 40 00 00 13 call 4000712c 400070e4: 90 10 00 10 mov %l0, %o0 /* * 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 ; 400070e8: c2 04 60 0c ld [ %l1 + 0xc ], %g1 id++ ) { 400070ec: 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 ; 400070f0: 80 a0 40 10 cmp %g1, %l0 400070f4: 1a bf ff fb bcc 400070e0 400070f8: 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 ) 400070fc: c2 04 a2 e0 ld [ %l2 + 0x2e0 ], %g1 40007100: 82 00 7f ff add %g1, -1, %g1 40007104: c2 24 a2 e0 st %g1, [ %l2 + 0x2e0 ] 40007108: c4 04 a2 e0 ld [ %l2 + 0x2e0 ], %g2 4000710c: 80 a0 a0 00 cmp %g2, 0 40007110: 02 80 00 04 be 40007120 40007114: 01 00 00 00 nop 40007118: 81 c7 e0 08 ret <== NOT EXECUTED 4000711c: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 40007120: 40 00 0f 2f call 4000addc <_Thread_Dispatch> 40007124: 81 e8 00 00 restore 40007128: 01 00 00 00 nop 40010114 : uint32_t length, uint32_t page_size, rtems_attribute attribute_set, Objects_Id *id ) { 40010114: 9d e3 bf 98 save %sp, -104, %sp Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 40010118: a8 96 20 00 orcc %i0, 0, %l4 4001011c: 02 80 00 58 be 4001027c 40010120: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !starting_address ) 40010124: 80 a6 60 00 cmp %i1, 0 40010128: 02 80 00 06 be 40010140 4001012c: 80 a7 60 00 cmp %i5, 0 return RTEMS_INVALID_ADDRESS; if ( !id ) 40010130: 02 80 00 04 be 40010140 40010134: 80 8e 60 07 btst 7, %i1 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) 40010138: 02 80 00 04 be 40010148 4001013c: 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 ) _Thread_Dispatch(); 40010140: 81 c7 e0 08 ret 40010144: 91 e8 20 09 restore %g0, 9, %o0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 40010148: 7f ff ea 73 call 4000ab14 4001014c: 01 00 00 00 nop 40010150: a2 10 00 08 mov %o0, %l1 40010154: 25 10 00 d3 sethi %hi(0x40034c00), %l2 40010158: c2 04 a0 80 ld [ %l2 + 0x80 ], %g1 ! 40034c80 <_Thread_Dispatch_disable_level> 4001015c: 80 a0 60 00 cmp %g1, 0 40010160: 02 80 00 0b be 4001018c 40010164: 03 10 00 d3 sethi %hi(0x40034c00), %g1 40010168: 03 10 00 d3 sethi %hi(0x40034c00), %g1 <== NOT EXECUTED 4001016c: c4 00 62 60 ld [ %g1 + 0x260 ], %g2 ! 40034e60 <_System_state_Current> <== NOT EXECUTED 40010170: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 40010174: 08 80 00 05 bleu 40010188 <== NOT EXECUTED 40010178: 90 10 20 00 clr %o0 <== NOT EXECUTED 4001017c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40010180: 40 00 13 7d call 40014f74 <_Internal_error_Occurred> <== NOT EXECUTED 40010184: 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; 40010188: 03 10 00 d3 sethi %hi(0x40034c00), %g1 <== NOT EXECUTED 4001018c: 27 10 00 d3 sethi %hi(0x40034c00), %l3 40010190: c6 00 61 5c ld [ %g1 + 0x15c ], %g3 40010194: e0 04 e1 54 ld [ %l3 + 0x154 ], %l0 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40010198: c0 20 e0 34 clr [ %g3 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4001019c: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 400101a0: 80 a0 60 00 cmp %g1, 0 400101a4: 22 80 00 12 be,a 400101ec 400101a8: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 400101ac: c0 24 20 60 clr [ %l0 + 0x60 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 400101b0: c2 00 e0 08 ld [ %g3 + 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; 400101b4: c4 04 20 58 ld [ %l0 + 0x58 ], %g2 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; 400101b8: 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; 400101bc: 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; 400101c0: c6 24 20 6c st %g3, [ %l0 + 0x6c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 400101c4: 80 a0 a0 02 cmp %g2, 2 400101c8: 12 80 00 2f bne 40010284 400101cc: c8 24 20 64 st %g4, [ %l0 + 0x64 ] _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 400101d0: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 400101d4: 82 00 60 01 inc %g1 400101d8: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( level ); 400101dc: 7f ff ea 52 call 4000ab24 400101e0: 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 ); 400101e4: 10 80 00 0f b 40010220 400101e8: 23 10 00 d2 sethi %hi(0x40034800), %l1 /* * 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 ) ) { 400101ec: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 400101f0: 32 80 00 48 bne,a 40010310 <== NOT EXECUTED 400101f4: c4 04 20 08 ld [ %l0 + 8 ], %g2 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 400101f8: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 400101fc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40010200: 12 80 00 41 bne 40010304 <== NOT EXECUTED 40010204: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 40010208: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 4001020c: 82 00 60 01 inc %g1 <== NOT EXECUTED 40010210: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 40010214: 7f ff ea 44 call 4000ab24 <== NOT EXECUTED 40010218: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4001021c: 23 10 00 d2 sethi %hi(0x40034800), %l1 <== NOT EXECUTED 40010220: 40 00 13 82 call 40015028 <_Objects_Allocate> 40010224: 90 14 62 98 or %l1, 0x298, %o0 ! 40034a98 <_Region_Information> the_region = _Region_Allocate(); if ( !the_region ) { 40010228: a0 92 20 00 orcc %o0, 0, %l0 4001022c: 32 80 00 4e bne,a 40010364 40010230: 90 04 20 68 add %l0, 0x68, %o0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40010234: c2 04 a0 80 ld [ %l2 + 0x80 ], %g1 40010238: 82 00 60 01 inc %g1 4001023c: c2 24 a0 80 st %g1, [ %l2 + 0x80 ] _RTEMS_Unlock_allocator(); 40010240: d0 04 e1 54 ld [ %l3 + 0x154 ], %o0 40010244: 94 10 20 00 clr %o2 40010248: d2 02 20 08 ld [ %o0 + 8 ], %o1 4001024c: 40 00 10 d1 call 40014590 <_CORE_mutex_Surrender> 40010250: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40010254: c2 04 a0 80 ld [ %l2 + 0x80 ], %g1 40010258: b0 10 20 05 mov 5, %i0 _Thread_Dispatch(); 4001025c: 82 00 7f ff add %g1, -1, %g1 40010260: c2 24 a0 80 st %g1, [ %l2 + 0x80 ] 40010264: c4 04 a0 80 ld [ %l2 + 0x80 ], %g2 40010268: 80 a0 a0 00 cmp %g2, 0 4001026c: 12 80 00 04 bne 4001027c 40010270: 01 00 00 00 nop 40010274: 40 00 19 fa call 40016a5c <_Thread_Dispatch> 40010278: 01 00 00 00 nop 4001027c: 81 c7 e0 08 ret 40010280: 81 e8 00 00 restore 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; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40010284: 80 a0 a0 03 cmp %g2, 3 <== NOT EXECUTED 40010288: 12 bf ff d5 bne 400101dc <== NOT EXECUTED 4001028c: 01 00 00 00 nop <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40010290: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 40010294: c4 00 e0 14 ld [ %g3 + 0x14 ], %g2 <== NOT EXECUTED 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++; 40010298: 82 00 60 01 inc %g1 <== NOT EXECUTED 4001029c: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] <== NOT EXECUTED */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 400102a0: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 <== NOT EXECUTED current = executing->current_priority; if ( current == ceiling ) { 400102a4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400102a8: 02 80 00 4e be 400103e0 <== NOT EXECUTED 400102ac: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 400102b0: 1a 80 00 42 bcc 400103b8 <== NOT EXECUTED 400102b4: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400102b8: c2 04 a0 80 ld [ %l2 + 0x80 ], %g1 <== NOT EXECUTED 400102bc: 82 00 60 01 inc %g1 <== NOT EXECUTED 400102c0: c2 24 a0 80 st %g1, [ %l2 + 0x80 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 400102c4: 7f ff ea 18 call 4000ab24 <== NOT EXECUTED 400102c8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED _Thread_Change_priority( 400102cc: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 400102d0: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 400102d4: 40 00 18 be call 400165cc <_Thread_Change_priority> <== NOT EXECUTED 400102d8: 94 10 20 00 clr %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 ) 400102dc: c2 04 a0 80 ld [ %l2 + 0x80 ], %g1 <== NOT EXECUTED 400102e0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400102e4: c2 24 a0 80 st %g1, [ %l2 + 0x80 ] <== NOT EXECUTED 400102e8: c4 04 a0 80 ld [ %l2 + 0x80 ], %g2 <== NOT EXECUTED 400102ec: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400102f0: 12 bf ff cc bne 40010220 <== NOT EXECUTED 400102f4: 23 10 00 d2 sethi %hi(0x40034800), %l1 <== NOT EXECUTED _Thread_Dispatch(); 400102f8: 40 00 19 d9 call 40016a5c <_Thread_Dispatch> <== NOT EXECUTED 400102fc: 01 00 00 00 nop <== NOT EXECUTED 40010300: 30 bf ff c8 b,a 40010220 <== 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 ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40010304: 02 80 00 13 be 40010350 <== NOT EXECUTED 40010308: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 4001030c: c4 04 20 08 ld [ %l0 + 8 ], %g2 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40010310: c2 04 a0 80 ld [ %l2 + 0x80 ], %g1 <== NOT EXECUTED 40010314: c4 20 e0 20 st %g2, [ %g3 + 0x20 ] <== NOT EXECUTED 40010318: 82 00 60 01 inc %g1 <== 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; 4001031c: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED 40010320: c2 24 a0 80 st %g1, [ %l2 + 0x80 ] <== NOT EXECUTED 40010324: c4 24 20 40 st %g2, [ %l0 + 0x40 ] <== NOT EXECUTED 40010328: 82 04 20 10 add %l0, 0x10, %g1 <== NOT EXECUTED 4001032c: c2 20 e0 44 st %g1, [ %g3 + 0x44 ] <== NOT EXECUTED 40010330: 7f ff e9 fd call 4000ab24 <== NOT EXECUTED 40010334: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40010338: d0 04 e1 54 ld [ %l3 + 0x154 ], %o0 <== NOT EXECUTED 4001033c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40010340: 40 00 10 70 call 40014500 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 40010344: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED 40010348: 10 bf ff b6 b 40010220 <== NOT EXECUTED 4001034c: 23 10 00 d2 sethi %hi(0x40034800), %l1 <== 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; 40010350: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 40010354: 7f ff e9 f4 call 4000ab24 <== NOT EXECUTED 40010358: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4001035c: 10 bf ff b1 b 40010220 <== NOT EXECUTED 40010360: 23 10 00 d2 sethi %hi(0x40034800), %l1 <== NOT EXECUTED if ( !the_region ) { _RTEMS_Unlock_allocator(); return RTEMS_TOO_MANY; } the_region->maximum_segment_size = 40010364: 92 10 00 19 mov %i1, %o1 40010368: 94 10 00 1a mov %i2, %o2 4001036c: 40 00 12 b5 call 40014e40 <_Heap_Initialize> 40010370: 96 10 00 1b mov %i3, %o3 _Heap_Initialize(&the_region->Memory, starting_address, length, page_size); if ( !the_region->maximum_segment_size ) { 40010374: 80 a2 20 00 cmp %o0, 0 40010378: 12 80 00 1e bne 400103f0 4001037c: 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 ); 40010380: 90 14 62 98 or %l1, 0x298, %o0 40010384: 40 00 14 37 call 40015460 <_Objects_Free> 40010388: 92 10 00 10 mov %l0, %o1 4001038c: c2 04 a0 80 ld [ %l2 + 0x80 ], %g1 40010390: 82 00 60 01 inc %g1 40010394: c2 24 a0 80 st %g1, [ %l2 + 0x80 ] _Region_Free( the_region ); _RTEMS_Unlock_allocator(); 40010398: d0 04 e1 54 ld [ %l3 + 0x154 ], %o0 4001039c: 94 10 20 00 clr %o2 400103a0: d2 02 20 08 ld [ %o0 + 8 ], %o1 400103a4: 40 00 10 7b call 40014590 <_CORE_mutex_Surrender> 400103a8: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400103ac: c2 04 a0 80 ld [ %l2 + 0x80 ], %g1 400103b0: 10 bf ff ab b 4001025c 400103b4: b0 10 20 08 mov 8, %i0 ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 400103b8: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 400103bc: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 400103c0: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 400103c4: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED 400103c8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400103cc: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 400103d0: 7f ff e9 d5 call 4000ab24 <== NOT EXECUTED 400103d4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED * the inactive chain of free region control blocks. */ RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void ) { return (Region_Control *) _Objects_Allocate( &_Region_Information ); 400103d8: 10 bf ff 92 b 40010220 <== NOT EXECUTED 400103dc: 23 10 00 d2 sethi %hi(0x40034800), %l1 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 400103e0: 7f ff e9 d1 call 4000ab24 <== NOT EXECUTED 400103e4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400103e8: 10 bf ff 8e b 40010220 <== NOT EXECUTED 400103ec: 23 10 00 d2 sethi %hi(0x40034800), %l1 <== NOT EXECUTED 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( 400103f0: 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; 400103f4: f2 24 20 50 st %i1, [ %l0 + 0x50 ] the_region->length = length; 400103f8: f4 24 20 54 st %i2, [ %l0 + 0x54 ] the_region->page_size = page_size; 400103fc: f6 24 20 58 st %i3, [ %l0 + 0x58 ] the_region->attribute_set = attribute_set; 40010400: f8 24 20 60 st %i4, [ %l0 + 0x60 ] the_region->number_of_used_blocks = 0; 40010404: c0 24 20 64 clr [ %l0 + 0x64 ] _Thread_queue_Initialize( 40010408: 93 37 20 02 srl %i4, 2, %o1 4001040c: 94 10 20 40 mov 0x40, %o2 40010410: 92 0a 60 01 and %o1, 1, %o1 40010414: 40 00 1c 10 call 40017454 <_Thread_queue_Initialize> 40010418: 96 10 20 06 mov 6, %o3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4001041c: 90 14 62 98 or %l1, 0x298, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 40010420: c6 04 20 08 ld [ %l0 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40010424: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 40010428: 03 00 00 3f sethi %hi(0xfc00), %g1 4001042c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40010430: 82 08 c0 01 and %g3, %g1, %g1 40010434: 80 a0 40 02 cmp %g1, %g2 40010438: 38 80 00 06 bgu,a 40010450 4001043c: c6 27 40 00 st %g3, [ %i5 ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40010440: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40010444: 83 28 60 02 sll %g1, 2, %g1 40010448: e0 20 80 01 st %l0, [ %g2 + %g1 ] &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 4001044c: c6 27 40 00 st %g3, [ %i5 ] rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40010450: c2 04 a0 80 ld [ %l2 + 0x80 ], %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; 40010454: e8 24 20 0c st %l4, [ %l0 + 0xc ] 40010458: 82 00 60 01 inc %g1 4001045c: c2 24 a0 80 st %g1, [ %l2 + 0x80 ] _RTEMS_Unlock_allocator(); 40010460: d0 04 e1 54 ld [ %l3 + 0x154 ], %o0 40010464: 94 10 20 00 clr %o2 40010468: d2 02 20 08 ld [ %o0 + 8 ], %o1 4001046c: 40 00 10 49 call 40014590 <_CORE_mutex_Surrender> 40010470: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40010474: c2 04 a0 80 ld [ %l2 + 0x80 ], %g1 40010478: 10 bf ff 79 b 4001025c 4001047c: b0 10 20 00 clr %i0 40010480 : */ rtems_status_code rtems_region_delete( Objects_Id id ) { 40010480: 9d e3 bf 90 save %sp, -112, %sp register Region_Control *the_region; Objects_Locations location; _RTEMS_Lock_allocator(); 40010484: 7f ff e9 a4 call 4000ab14 40010488: 01 00 00 00 nop 4001048c: a2 10 00 08 mov %o0, %l1 40010490: 25 10 00 d3 sethi %hi(0x40034c00), %l2 40010494: c2 04 a0 80 ld [ %l2 + 0x80 ], %g1 ! 40034c80 <_Thread_Dispatch_disable_level> 40010498: 80 a0 60 00 cmp %g1, 0 4001049c: 02 80 00 0b be 400104c8 400104a0: 27 10 00 d3 sethi %hi(0x40034c00), %l3 400104a4: 03 10 00 d3 sethi %hi(0x40034c00), %g1 <== NOT EXECUTED 400104a8: c4 00 62 60 ld [ %g1 + 0x260 ], %g2 ! 40034e60 <_System_state_Current> <== NOT EXECUTED 400104ac: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 400104b0: 08 80 00 06 bleu 400104c8 <== NOT EXECUTED 400104b4: 90 10 20 00 clr %o0 <== NOT EXECUTED 400104b8: 92 10 20 00 clr %o1 <== NOT EXECUTED 400104bc: 40 00 12 ae call 40014f74 <_Internal_error_Occurred> <== NOT EXECUTED 400104c0: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 400104c4: 27 10 00 d3 sethi %hi(0x40034c00), %l3 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 400104c8: 09 10 00 d3 sethi %hi(0x40034c00), %g4 400104cc: e0 04 e1 54 ld [ %l3 + 0x154 ], %l0 400104d0: c4 01 21 5c ld [ %g4 + 0x15c ], %g2 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 400104d4: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 400104d8: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 400104dc: 80 a0 60 00 cmp %g1, 0 400104e0: 22 80 00 36 be,a 400105b8 400104e4: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 400104e8: c0 24 20 60 clr [ %l0 + 0x60 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 400104ec: 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; 400104f0: 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; 400104f4: 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; 400104f8: 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; 400104fc: 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 ) || 40010500: 80 a0 e0 02 cmp %g3, 2 40010504: 12 80 00 56 bne 4001065c 40010508: c8 24 20 64 st %g4, [ %l0 + 0x64 ] _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 4001050c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40010510: 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++; 40010514: 82 00 60 01 inc %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40010518: 02 80 00 7c be 40010708 4001051c: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] _ISR_Enable( level ); 40010520: 7f ff e9 81 call 4000ab24 40010524: 90 10 00 11 mov %l1, %o0 RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 40010528: 92 10 00 18 mov %i0, %o1 4001052c: 21 10 00 d2 sethi %hi(0x40034800), %l0 40010530: 94 07 bf f4 add %fp, -12, %o2 40010534: 40 00 14 0e call 4001556c <_Objects_Get_no_protection> 40010538: 90 14 22 98 or %l0, 0x298, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 4001053c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40010540: 80 a0 60 01 cmp %g1, 1 40010544: 02 80 00 33 be 40010610 40010548: 92 10 00 08 mov %o0, %o1 4001054c: 80 a0 60 01 cmp %g1, 1 40010550: 1a 80 00 5f bcc 400106cc 40010554: 80 a0 60 02 cmp %g1, 2 _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks == 0 ) { 40010558: c2 02 20 64 ld [ %o0 + 0x64 ], %g1 4001055c: 80 a0 60 00 cmp %g1, 0 40010560: 22 80 00 99 be,a 400107c4 40010564: 90 14 22 98 or %l0, 0x298, %o0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40010568: c2 04 a0 80 ld [ %l2 + 0x80 ], %g1 4001056c: 82 00 60 01 inc %g1 40010570: c2 24 a0 80 st %g1, [ %l2 + 0x80 ] _Objects_Close( &_Region_Information, &the_region->Object ); _Region_Free( the_region ); _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } _RTEMS_Unlock_allocator(); 40010574: d0 04 e1 54 ld [ %l3 + 0x154 ], %o0 40010578: 94 10 20 00 clr %o2 4001057c: d2 02 20 08 ld [ %o0 + 8 ], %o1 40010580: 40 00 10 04 call 40014590 <_CORE_mutex_Surrender> 40010584: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40010588: c2 04 a0 80 ld [ %l2 + 0x80 ], %g1 4001058c: b0 10 20 0c mov 0xc, %i0 40010590: 82 00 7f ff add %g1, -1, %g1 40010594: c2 24 a0 80 st %g1, [ %l2 + 0x80 ] 40010598: c4 04 a0 80 ld [ %l2 + 0x80 ], %g2 4001059c: 80 a0 a0 00 cmp %g2, 0 400105a0: 12 80 00 49 bne 400106c4 400105a4: 01 00 00 00 nop _Thread_Dispatch(); 400105a8: 40 00 19 2d call 40016a5c <_Thread_Dispatch> 400105ac: 01 00 00 00 nop 400105b0: 81 c7 e0 08 ret 400105b4: 81 e8 00 00 restore /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 400105b8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400105bc: 12 80 00 30 bne 4001067c <== NOT EXECUTED 400105c0: c6 04 e1 54 ld [ %l3 + 0x154 ], %g3 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 400105c4: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 400105c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400105cc: 22 80 00 6a be,a 40010774 <== NOT EXECUTED 400105d0: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 400105d4: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 400105d8: 12 80 00 29 bne 4001067c <== NOT EXECUTED 400105dc: 82 10 20 02 mov 2, %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; 400105e0: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 400105e4: 7f ff e9 50 call 4000ab24 <== NOT EXECUTED 400105e8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400105ec: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 400105f0: 21 10 00 d2 sethi %hi(0x40034800), %l0 <== NOT EXECUTED 400105f4: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 400105f8: 40 00 13 dd call 4001556c <_Objects_Get_no_protection> <== NOT EXECUTED 400105fc: 90 14 22 98 or %l0, 0x298, %o0 <== NOT EXECUTED register Region_Control *the_region; Objects_Locations location; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 40010600: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40010604: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40010608: 12 bf ff d2 bne 40010550 <== NOT EXECUTED 4001060c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40010610: c2 04 a0 80 ld [ %l2 + 0x80 ], %g1 <== NOT EXECUTED 40010614: 82 00 60 01 inc %g1 <== NOT EXECUTED 40010618: c2 24 a0 80 st %g1, [ %l2 + 0x80 ] <== NOT EXECUTED case OBJECTS_REMOTE: /* this error cannot be returned */ _RTEMS_Unlock_allocator(); 4001061c: d0 04 e1 54 ld [ %l3 + 0x154 ], %o0 <== NOT EXECUTED 40010620: 94 10 20 00 clr %o2 <== NOT EXECUTED 40010624: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 40010628: 40 00 0f da call 40014590 <_CORE_mutex_Surrender> <== NOT EXECUTED 4001062c: 90 02 20 10 add %o0, 0x10, %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 ) 40010630: c2 04 a0 80 ld [ %l2 + 0x80 ], %g1 <== NOT EXECUTED 40010634: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40010638: c2 24 a0 80 st %g1, [ %l2 + 0x80 ] <== NOT EXECUTED 4001063c: c4 04 a0 80 ld [ %l2 + 0x80 ], %g2 <== NOT EXECUTED 40010640: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40010644: 12 80 00 24 bne 400106d4 <== NOT EXECUTED 40010648: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 4001064c: 40 00 19 04 call 40016a5c <_Thread_Dispatch> <== NOT EXECUTED 40010650: b0 10 20 19 mov 0x19, %i0 ! 19 <== NOT EXECUTED 40010654: 81 c7 e0 08 ret <== NOT EXECUTED 40010658: 81 e8 00 00 restore <== NOT EXECUTED 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; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4001065c: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 40010660: 12 bf ff b0 bne 40010520 <== NOT EXECUTED 40010664: 01 00 00 00 nop <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40010668: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4001066c: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40010670: 02 80 00 26 be 40010708 <== NOT EXECUTED 40010674: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED 40010678: 30 bf ff aa b,a 40010520 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4001067c: c2 04 a0 80 ld [ %l2 + 0x80 ], %g1 <== NOT EXECUTED ) { register Region_Control *the_region; Objects_Locations location; _RTEMS_Lock_allocator(); 40010680: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 40010684: c8 01 21 5c ld [ %g4 + 0x15c ], %g4 <== NOT EXECUTED 40010688: 82 00 60 01 inc %g1 <== NOT EXECUTED 4001068c: c4 21 20 20 st %g2, [ %g4 + 0x20 ] <== NOT EXECUTED 40010690: c2 24 a0 80 st %g1, [ %l2 + 0x80 ] <== NOT EXECUTED 40010694: 84 00 e0 10 add %g3, 0x10, %g2 <== NOT EXECUTED 40010698: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 4001069c: c4 21 20 44 st %g2, [ %g4 + 0x44 ] <== NOT EXECUTED 400106a0: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 400106a4: 7f ff e9 20 call 4000ab24 <== NOT EXECUTED 400106a8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400106ac: d0 04 e1 54 ld [ %l3 + 0x154 ], %o0 <== NOT EXECUTED 400106b0: 92 10 20 00 clr %o1 <== NOT EXECUTED 400106b4: 40 00 0f 93 call 40014500 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 400106b8: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED 400106bc: 10 bf ff 9c b 4001052c <== NOT EXECUTED 400106c0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED _RTEMS_Unlock_allocator(); return RTEMS_RESOURCE_IN_USE; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400106c4: 81 c7 e0 08 ret <== NOT EXECUTED 400106c8: 81 e8 00 00 restore <== NOT EXECUTED register Region_Control *the_region; Objects_Locations location; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 400106cc: 02 80 00 04 be 400106dc 400106d0: 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 ) _Thread_Dispatch(); 400106d4: 81 c7 e0 08 ret <== NOT EXECUTED 400106d8: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400106dc: c2 04 a0 80 ld [ %l2 + 0x80 ], %g1 400106e0: 82 00 60 01 inc %g1 400106e4: c2 24 a0 80 st %g1, [ %l2 + 0x80 ] case OBJECTS_REMOTE: /* this error cannot be returned */ _RTEMS_Unlock_allocator(); return RTEMS_INTERNAL_ERROR; case OBJECTS_ERROR: _RTEMS_Unlock_allocator(); 400106e8: d0 04 e1 54 ld [ %l3 + 0x154 ], %o0 400106ec: 94 10 20 00 clr %o2 400106f0: d2 02 20 08 ld [ %o0 + 8 ], %o1 400106f4: 40 00 0f a7 call 40014590 <_CORE_mutex_Surrender> 400106f8: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400106fc: c2 04 a0 80 ld [ %l2 + 0x80 ], %g1 40010700: 10 bf ff a4 b 40010590 40010704: b0 10 20 04 mov 4, %i0 */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 40010708: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED current = executing->current_priority; 4001070c: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 40010710: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40010714: 02 80 00 28 be 400107b4 <== NOT EXECUTED 40010718: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 4001071c: 1a 80 00 1c bcc 4001078c <== NOT EXECUTED 40010720: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40010724: c2 04 a0 80 ld [ %l2 + 0x80 ], %g1 <== NOT EXECUTED 40010728: 82 00 60 01 inc %g1 <== NOT EXECUTED 4001072c: c2 24 a0 80 st %g1, [ %l2 + 0x80 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 40010730: 7f ff e8 fd call 4000ab24 <== NOT EXECUTED 40010734: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED _Thread_Change_priority( 40010738: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 4001073c: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 40010740: 40 00 17 a3 call 400165cc <_Thread_Change_priority> <== NOT EXECUTED 40010744: 94 10 20 00 clr %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 ) 40010748: c2 04 a0 80 ld [ %l2 + 0x80 ], %g1 <== NOT EXECUTED 4001074c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40010750: c2 24 a0 80 st %g1, [ %l2 + 0x80 ] <== NOT EXECUTED 40010754: c4 04 a0 80 ld [ %l2 + 0x80 ], %g2 <== NOT EXECUTED 40010758: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4001075c: 32 bf ff 74 bne,a 4001052c <== NOT EXECUTED 40010760: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED _Thread_Dispatch(); 40010764: 40 00 18 be call 40016a5c <_Thread_Dispatch> <== NOT EXECUTED 40010768: 01 00 00 00 nop <== NOT EXECUTED 4001076c: 10 bf ff 70 b 4001052c <== NOT EXECUTED 40010770: 92 10 00 18 mov %i0, %o1 <== 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++; 40010774: 82 00 60 01 inc %g1 <== NOT EXECUTED 40010778: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 4001077c: 7f ff e8 ea call 4000ab24 <== NOT EXECUTED 40010780: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40010784: 10 bf ff 6a b 4001052c <== NOT EXECUTED 40010788: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4001078c: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 40010790: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40010794: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 40010798: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4001079c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400107a0: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 400107a4: 7f ff e8 e0 call 4000ab24 <== NOT EXECUTED 400107a8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400107ac: 10 bf ff 60 b 4001052c <== NOT EXECUTED 400107b0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 400107b4: 7f ff e8 dc call 4000ab24 <== NOT EXECUTED 400107b8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400107bc: 10 bf ff 5c b 4001052c <== NOT EXECUTED 400107c0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 400107c4: c2 02 60 08 ld [ %o1 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400107c8: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 400107cc: 05 00 00 3f sethi %hi(0xfc00), %g2 400107d0: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 400107d4: 82 08 40 02 and %g1, %g2, %g1 400107d8: 80 a0 40 03 cmp %g1, %g3 400107dc: 18 80 00 05 bgu 400107f0 400107e0: 01 00 00 00 nop information->local_table[ index ] = the_object; 400107e4: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 400107e8: 83 28 60 02 sll %g1, 2, %g1 400107ec: c0 20 80 01 clr [ %g2 + %g1 ] RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 400107f0: 40 00 13 1c call 40015460 <_Objects_Free> 400107f4: c0 22 60 0c clr [ %o1 + 0xc ] rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400107f8: c2 04 a0 80 ld [ %l2 + 0x80 ], %g1 400107fc: 82 00 60 01 inc %g1 40010800: c2 24 a0 80 st %g1, [ %l2 + 0x80 ] case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks == 0 ) { _Objects_Close( &_Region_Information, &the_region->Object ); _Region_Free( the_region ); _RTEMS_Unlock_allocator(); 40010804: d0 04 e1 54 ld [ %l3 + 0x154 ], %o0 40010808: 94 10 20 00 clr %o2 4001080c: d2 02 20 08 ld [ %o0 + 8 ], %o1 40010810: 40 00 0f 60 call 40014590 <_CORE_mutex_Surrender> 40010814: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40010818: c2 04 a0 80 ld [ %l2 + 0x80 ], %g1 4001081c: 10 bf ff 5d b 40010590 40010820: b0 10 20 00 clr %i0 40010824 : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 40010824: 9d e3 bf 90 save %sp, -112, %sp 40010828: a8 10 00 18 mov %i0, %l4 Objects_Locations location; uint32_t amount_extended; Heap_Extend_status heap_status; rtems_status_code status; if ( !starting_address ) 4001082c: 80 a6 60 00 cmp %i1, 0 40010830: 02 80 00 59 be 40010994 40010834: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; status = RTEMS_SUCCESSFUL; _RTEMS_Lock_allocator(); /* to prevent deletion */ 40010838: 7f ff e8 b7 call 4000ab14 4001083c: 01 00 00 00 nop 40010840: a4 10 00 08 mov %o0, %l2 40010844: 23 10 00 d3 sethi %hi(0x40034c00), %l1 40010848: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 ! 40034c80 <_Thread_Dispatch_disable_level> 4001084c: 80 a0 60 00 cmp %g1, 0 40010850: 02 80 00 0b be 4001087c 40010854: 27 10 00 d3 sethi %hi(0x40034c00), %l3 40010858: 03 10 00 d3 sethi %hi(0x40034c00), %g1 <== NOT EXECUTED 4001085c: c4 00 62 60 ld [ %g1 + 0x260 ], %g2 ! 40034e60 <_System_state_Current> <== NOT EXECUTED 40010860: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 40010864: 08 80 00 06 bleu 4001087c <== NOT EXECUTED 40010868: 90 10 20 00 clr %o0 <== NOT EXECUTED 4001086c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40010870: 40 00 11 c1 call 40014f74 <_Internal_error_Occurred> <== NOT EXECUTED 40010874: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 40010878: 27 10 00 d3 sethi %hi(0x40034c00), %l3 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 4001087c: 09 10 00 d3 sethi %hi(0x40034c00), %g4 40010880: e0 04 e1 54 ld [ %l3 + 0x154 ], %l0 40010884: c4 01 21 5c ld [ %g4 + 0x15c ], %g2 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40010888: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4001088c: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 40010890: 80 a0 60 00 cmp %g1, 0 40010894: 22 80 00 42 be,a 4001099c 40010898: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 4001089c: c0 24 20 60 clr [ %l0 + 0x60 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 400108a0: 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; 400108a4: 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; 400108a8: 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; 400108ac: 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; 400108b0: 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 ) || 400108b4: 80 a0 e0 02 cmp %g3, 2 400108b8: 02 80 00 61 be 40010a3c 400108bc: c8 24 20 64 st %g4, [ %l0 + 0x64 ] 400108c0: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 400108c4: 22 80 00 60 be,a 40010a44 <== NOT EXECUTED 400108c8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( level ); 400108cc: 7f ff e8 96 call 4000ab24 400108d0: 90 10 00 12 mov %l2, %o0 RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 400108d4: 92 10 00 14 mov %l4, %o1 400108d8: 11 10 00 d2 sethi %hi(0x40034800), %o0 400108dc: 94 07 bf f4 add %fp, -12, %o2 400108e0: 40 00 13 23 call 4001556c <_Objects_Get_no_protection> 400108e4: 90 12 22 98 or %o0, 0x298, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 400108e8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400108ec: 80 a0 60 01 cmp %g1, 1 400108f0: 02 80 00 40 be 400109f0 400108f4: a0 10 00 08 mov %o0, %l0 400108f8: 80 a0 60 01 cmp %g1, 1 400108fc: 1a 80 00 70 bcc 40010abc 40010900: 80 a0 60 02 cmp %g1, 2 _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; case OBJECTS_LOCAL: heap_status = _Heap_Extend( 40010904: 92 10 00 19 mov %i1, %o1 40010908: 94 10 00 1a mov %i2, %o2 4001090c: 90 02 20 68 add %o0, 0x68, %o0 40010910: 96 07 bf f0 add %fp, -16, %o3 40010914: 40 00 10 65 call 40014aa8 <_Heap_Extend> 40010918: b0 10 20 09 mov 9, %i0 starting_address, length, &amount_extended ); switch ( heap_status ) { 4001091c: 80 a2 20 01 cmp %o0, 1 40010920: 02 80 00 0c be 40010950 40010924: 01 00 00 00 nop 40010928: 1a 80 00 8e bcc 40010b60 4001092c: 82 1a 20 02 xor %o0, 2, %g1 case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 40010930: c6 07 bf f0 ld [ %fp + -16 ], %g3 40010934: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 the_region->maximum_segment_size += amount_extended; 40010938: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 4001093c: 84 00 80 03 add %g2, %g3, %g2 the_region->maximum_segment_size += amount_extended; 40010940: 82 00 40 03 add %g1, %g3, %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 40010944: c4 24 20 54 st %g2, [ %l0 + 0x54 ] the_region->maximum_segment_size += amount_extended; 40010948: c2 24 20 5c st %g1, [ %l0 + 0x5c ] 4001094c: b0 10 20 00 clr %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40010950: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 40010954: 82 00 60 01 inc %g1 40010958: c2 24 60 80 st %g1, [ %l1 + 0x80 ] break; case HEAP_EXTEND_NOT_IMPLEMENTED: status = RTEMS_NOT_IMPLEMENTED; break; } _RTEMS_Unlock_allocator(); 4001095c: d0 04 e1 54 ld [ %l3 + 0x154 ], %o0 40010960: 94 10 20 00 clr %o2 40010964: d2 02 20 08 ld [ %o0 + 8 ], %o1 40010968: 40 00 0f 0a call 40014590 <_CORE_mutex_Surrender> 4001096c: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40010970: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 40010974: 82 00 7f ff add %g1, -1, %g1 40010978: c2 24 60 80 st %g1, [ %l1 + 0x80 ] 4001097c: c4 04 60 80 ld [ %l1 + 0x80 ], %g2 40010980: 80 a0 a0 00 cmp %g2, 0 40010984: 12 80 00 2c bne 40010a34 40010988: 01 00 00 00 nop _Thread_Dispatch(); 4001098c: 40 00 18 34 call 40016a5c <_Thread_Dispatch> 40010990: 01 00 00 00 nop 40010994: 81 c7 e0 08 ret 40010998: 81 e8 00 00 restore /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 4001099c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400109a0: 12 80 00 4d bne 40010ad4 <== NOT EXECUTED 400109a4: c6 04 e1 54 ld [ %l3 + 0x154 ], %g3 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 400109a8: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 400109ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400109b0: 12 80 00 47 bne 40010acc <== NOT EXECUTED 400109b4: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 400109b8: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 400109bc: 82 00 60 01 inc %g1 <== NOT EXECUTED 400109c0: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 400109c4: 7f ff e8 58 call 4000ab24 <== NOT EXECUTED 400109c8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400109cc: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED 400109d0: 11 10 00 d2 sethi %hi(0x40034800), %o0 <== NOT EXECUTED 400109d4: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 400109d8: 40 00 12 e5 call 4001556c <_Objects_Get_no_protection> <== NOT EXECUTED 400109dc: 90 12 22 98 or %o0, 0x298, %o0 <== NOT EXECUTED status = RTEMS_SUCCESSFUL; _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Get( id, &location ); switch ( location ) { 400109e0: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 400109e4: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 400109e8: 12 bf ff c5 bne 400108fc <== NOT EXECUTED 400109ec: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400109f0: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 <== NOT EXECUTED 400109f4: 82 00 60 01 inc %g1 <== NOT EXECUTED 400109f8: c2 24 60 80 st %g1, [ %l1 + 0x80 ] <== NOT EXECUTED case OBJECTS_REMOTE: /* this error cannot be returned */ _RTEMS_Unlock_allocator(); 400109fc: d0 04 e1 54 ld [ %l3 + 0x154 ], %o0 <== NOT EXECUTED 40010a00: 94 10 20 00 clr %o2 <== NOT EXECUTED 40010a04: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 40010a08: 40 00 0e e2 call 40014590 <_CORE_mutex_Surrender> <== NOT EXECUTED 40010a0c: 90 02 20 10 add %o0, 0x10, %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 ) 40010a10: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 <== NOT EXECUTED 40010a14: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40010a18: c2 24 60 80 st %g1, [ %l1 + 0x80 ] <== NOT EXECUTED 40010a1c: c4 04 60 80 ld [ %l1 + 0x80 ], %g2 <== NOT EXECUTED 40010a20: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40010a24: 12 80 00 28 bne 40010ac4 <== NOT EXECUTED 40010a28: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 40010a2c: 40 00 18 0c call 40016a5c <_Thread_Dispatch> <== NOT EXECUTED 40010a30: b0 10 20 19 mov 0x19, %i0 ! 19 <== NOT EXECUTED 40010a34: 81 c7 e0 08 ret <== NOT EXECUTED 40010a38: 81 e8 00 00 restore <== NOT EXECUTED 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++; 40010a3c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40010a40: 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++; 40010a44: 82 00 60 01 inc %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40010a48: 12 bf ff a1 bne 400108cc 40010a4c: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 40010a50: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED current = executing->current_priority; 40010a54: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 40010a58: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40010a5c: 02 80 00 50 be 40010b9c <== NOT EXECUTED 40010a60: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 40010a64: 1a 80 00 44 bcc 40010b74 <== NOT EXECUTED 40010a68: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40010a6c: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 <== NOT EXECUTED 40010a70: 82 00 60 01 inc %g1 <== NOT EXECUTED 40010a74: c2 24 60 80 st %g1, [ %l1 + 0x80 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 40010a78: 7f ff e8 2b call 4000ab24 <== NOT EXECUTED 40010a7c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED _Thread_Change_priority( 40010a80: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 40010a84: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 40010a88: 40 00 16 d1 call 400165cc <_Thread_Change_priority> <== NOT EXECUTED 40010a8c: 94 10 20 00 clr %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 ) 40010a90: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 <== NOT EXECUTED 40010a94: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40010a98: c2 24 60 80 st %g1, [ %l1 + 0x80 ] <== NOT EXECUTED 40010a9c: c4 04 60 80 ld [ %l1 + 0x80 ], %g2 <== NOT EXECUTED 40010aa0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40010aa4: 32 bf ff 8d bne,a 400108d8 <== NOT EXECUTED 40010aa8: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED _Thread_Dispatch(); 40010aac: 40 00 17 ec call 40016a5c <_Thread_Dispatch> <== NOT EXECUTED 40010ab0: 01 00 00 00 nop <== NOT EXECUTED 40010ab4: 10 bf ff 89 b 400108d8 <== NOT EXECUTED 40010ab8: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED status = RTEMS_SUCCESSFUL; _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Get( id, &location ); switch ( location ) { 40010abc: 02 80 00 18 be 40010b1c 40010ac0: 01 00 00 00 nop 40010ac4: 81 c7 e0 08 ret <== NOT EXECUTED 40010ac8: 91 e8 20 19 restore %g0, 0x19, %o0 <== 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 ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40010acc: 02 80 00 1f be 40010b48 <== NOT EXECUTED 40010ad0: c6 04 e1 54 ld [ %l3 + 0x154 ], %g3 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40010ad4: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 <== NOT EXECUTED if ( !starting_address ) return RTEMS_INVALID_ADDRESS; status = RTEMS_SUCCESSFUL; _RTEMS_Lock_allocator(); /* to prevent deletion */ 40010ad8: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 40010adc: c8 01 21 5c ld [ %g4 + 0x15c ], %g4 <== NOT EXECUTED 40010ae0: 82 00 60 01 inc %g1 <== NOT EXECUTED 40010ae4: c4 21 20 20 st %g2, [ %g4 + 0x20 ] <== NOT EXECUTED 40010ae8: c2 24 60 80 st %g1, [ %l1 + 0x80 ] <== NOT EXECUTED 40010aec: 84 00 e0 10 add %g3, 0x10, %g2 <== NOT EXECUTED 40010af0: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40010af4: c4 21 20 44 st %g2, [ %g4 + 0x44 ] <== NOT EXECUTED 40010af8: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 40010afc: 7f ff e8 0a call 4000ab24 <== NOT EXECUTED 40010b00: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40010b04: d0 04 e1 54 ld [ %l3 + 0x154 ], %o0 <== NOT EXECUTED 40010b08: 92 10 20 00 clr %o1 <== NOT EXECUTED 40010b0c: 40 00 0e 7d call 40014500 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 40010b10: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED 40010b14: 10 bf ff 71 b 400108d8 <== NOT EXECUTED 40010b18: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED 40010b1c: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 40010b20: 82 00 60 01 inc %g1 40010b24: c2 24 60 80 st %g1, [ %l1 + 0x80 ] case OBJECTS_REMOTE: /* this error cannot be returned */ _RTEMS_Unlock_allocator(); return RTEMS_INTERNAL_ERROR; case OBJECTS_ERROR: _RTEMS_Unlock_allocator(); 40010b28: d0 04 e1 54 ld [ %l3 + 0x154 ], %o0 40010b2c: 94 10 20 00 clr %o2 40010b30: d2 02 20 08 ld [ %o0 + 8 ], %o1 40010b34: 40 00 0e 97 call 40014590 <_CORE_mutex_Surrender> 40010b38: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40010b3c: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 40010b40: 10 bf ff 8d b 40010974 40010b44: b0 10 20 04 mov 4, %i0 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; 40010b48: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 40010b4c: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 40010b50: 7f ff e7 f5 call 4000ab24 <== NOT EXECUTED 40010b54: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40010b58: 10 bf ff 60 b 400108d8 <== NOT EXECUTED 40010b5c: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED starting_address, length, &amount_extended ); switch ( heap_status ) { 40010b60: 80 a0 00 01 cmp %g0, %g1 40010b64: 84 60 20 00 subx %g0, 0, %g2 40010b68: b0 08 bf e8 and %g2, -24, %i0 40010b6c: 10 bf ff 79 b 40010950 40010b70: b0 06 20 18 add %i0, 0x18, %i0 ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 40010b74: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 40010b78: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40010b7c: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 40010b80: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40010b84: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40010b88: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40010b8c: 7f ff e7 e6 call 4000ab24 <== NOT EXECUTED 40010b90: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40010b94: 10 bf ff 51 b 400108d8 <== NOT EXECUTED 40010b98: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 40010b9c: 7f ff e7 e2 call 4000ab24 <== NOT EXECUTED 40010ba0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40010ba4: 10 bf ff 4d b 400108d8 <== NOT EXECUTED 40010ba8: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED 40010bac : uint32_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 40010bac: 9d e3 bf 90 save %sp, -112, %sp 40010bb0: aa 10 00 18 mov %i0, %l5 register Region_Control *the_region; Objects_Locations location; Thread_Control *executing; void *the_segment; if ( !segment ) 40010bb4: 80 a7 20 00 cmp %i4, 0 40010bb8: 02 80 00 4e be 40010cf0 40010bbc: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; *segment = NULL; if ( size == 0 ) 40010bc0: 80 a6 60 00 cmp %i1, 0 40010bc4: 02 80 00 c8 be 40010ee4 40010bc8: c0 27 00 00 clr [ %i4 ] return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 40010bcc: 7f ff e7 d2 call 4000ab14 40010bd0: 01 00 00 00 nop 40010bd4: a4 10 00 08 mov %o0, %l2 40010bd8: 23 10 00 d3 sethi %hi(0x40034c00), %l1 40010bdc: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 ! 40034c80 <_Thread_Dispatch_disable_level> 40010be0: 80 a0 60 00 cmp %g1, 0 40010be4: 02 80 00 0b be 40010c10 40010be8: 29 10 00 d3 sethi %hi(0x40034c00), %l4 40010bec: 03 10 00 d3 sethi %hi(0x40034c00), %g1 <== NOT EXECUTED 40010bf0: c4 00 62 60 ld [ %g1 + 0x260 ], %g2 ! 40034e60 <_System_state_Current> <== NOT EXECUTED 40010bf4: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 40010bf8: 08 80 00 06 bleu 40010c10 <== NOT EXECUTED 40010bfc: 90 10 20 00 clr %o0 <== NOT EXECUTED 40010c00: 92 10 20 00 clr %o1 <== NOT EXECUTED 40010c04: 40 00 10 dc call 40014f74 <_Internal_error_Occurred> <== NOT EXECUTED 40010c08: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 40010c0c: 29 10 00 d3 sethi %hi(0x40034c00), %l4 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 40010c10: 27 10 00 d3 sethi %hi(0x40034c00), %l3 40010c14: e0 05 21 54 ld [ %l4 + 0x154 ], %l0 40010c18: c4 04 e1 5c ld [ %l3 + 0x15c ], %g2 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40010c1c: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 40010c20: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 40010c24: 80 a0 60 00 cmp %g1, 0 40010c28: 22 80 00 34 be,a 40010cf8 40010c2c: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 40010c30: c0 24 20 60 clr [ %l0 + 0x60 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40010c34: 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; 40010c38: 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; 40010c3c: 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; 40010c40: 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; 40010c44: 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 ) || 40010c48: 80 a0 e0 02 cmp %g3, 2 40010c4c: 02 80 00 54 be 40010d9c 40010c50: c8 24 20 64 st %g4, [ %l0 + 0x64 ] 40010c54: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 40010c58: 22 80 00 53 be,a 40010da4 <== NOT EXECUTED 40010c5c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( level ); 40010c60: 7f ff e7 b1 call 4000ab24 40010c64: 90 10 00 12 mov %l2, %o0 executing = _Thread_Executing; 40010c68: f0 04 e1 5c ld [ %l3 + 0x15c ], %i0 40010c6c: 11 10 00 d2 sethi %hi(0x40034800), %o0 40010c70: 92 10 00 15 mov %l5, %o1 40010c74: 90 12 22 98 or %o0, 0x298, %o0 40010c78: 40 00 12 3d call 4001556c <_Objects_Get_no_protection> 40010c7c: 94 07 bf f4 add %fp, -12, %o2 the_region = _Region_Get( id, &location ); switch ( location ) { 40010c80: c2 07 bf f4 ld [ %fp + -12 ], %g1 40010c84: 80 a0 60 01 cmp %g1, 1 40010c88: 02 80 00 32 be 40010d50 40010c8c: a0 10 00 08 mov %o0, %l0 40010c90: 80 a0 60 01 cmp %g1, 1 40010c94: 1a 80 00 62 bcc 40010e1c 40010c98: 80 a0 60 02 cmp %g1, 2 case OBJECTS_ERROR: _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) { 40010c9c: c2 02 20 5c ld [ %o0 + 0x5c ], %g1 40010ca0: 80 a6 40 01 cmp %i1, %g1 40010ca4: 28 80 00 a0 bleu,a 40010f24 40010ca8: 90 02 20 68 add %o0, 0x68, %o0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40010cac: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 40010cb0: 82 00 60 01 inc %g1 40010cb4: c2 24 60 80 st %g1, [ %l1 + 0x80 ] _RTEMS_Unlock_allocator(); 40010cb8: d0 05 21 54 ld [ %l4 + 0x154 ], %o0 40010cbc: 94 10 20 00 clr %o2 40010cc0: d2 02 20 08 ld [ %o0 + 8 ], %o1 40010cc4: 40 00 0e 33 call 40014590 <_CORE_mutex_Surrender> 40010cc8: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40010ccc: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 40010cd0: 82 00 7f ff add %g1, -1, %g1 40010cd4: c2 24 60 80 st %g1, [ %l1 + 0x80 ] 40010cd8: c4 04 60 80 ld [ %l1 + 0x80 ], %g2 40010cdc: 80 a0 a0 00 cmp %g2, 0 40010ce0: 12 80 00 81 bne 40010ee4 40010ce4: 01 00 00 00 nop _Thread_Dispatch(); 40010ce8: 40 00 17 5d call 40016a5c <_Thread_Dispatch> 40010cec: b0 10 20 08 mov 8, %i0 ! 8 40010cf0: 81 c7 e0 08 ret 40010cf4: 81 e8 00 00 restore /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 40010cf8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40010cfc: 12 80 00 4e bne 40010e34 <== NOT EXECUTED 40010d00: c6 05 21 54 ld [ %l4 + 0x154 ], %g3 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40010d04: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 40010d08: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40010d0c: 12 80 00 48 bne 40010e2c <== NOT EXECUTED 40010d10: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 40010d14: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 40010d18: 82 00 60 01 inc %g1 <== NOT EXECUTED 40010d1c: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 40010d20: 7f ff e7 81 call 4000ab24 <== NOT EXECUTED 40010d24: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40010d28: 11 10 00 d2 sethi %hi(0x40034800), %o0 <== NOT EXECUTED if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); executing = _Thread_Executing; 40010d2c: f0 04 e1 5c ld [ %l3 + 0x15c ], %i0 <== NOT EXECUTED 40010d30: 90 12 22 98 or %o0, 0x298, %o0 <== NOT EXECUTED 40010d34: 92 10 00 15 mov %l5, %o1 <== NOT EXECUTED 40010d38: 40 00 12 0d call 4001556c <_Objects_Get_no_protection> <== NOT EXECUTED 40010d3c: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { 40010d40: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40010d44: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40010d48: 12 bf ff d3 bne 40010c94 <== NOT EXECUTED 40010d4c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40010d50: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 <== NOT EXECUTED 40010d54: 82 00 60 01 inc %g1 <== NOT EXECUTED 40010d58: c2 24 60 80 st %g1, [ %l1 + 0x80 ] <== NOT EXECUTED case OBJECTS_REMOTE: /* this error cannot be returned */ _RTEMS_Unlock_allocator(); 40010d5c: d0 05 21 54 ld [ %l4 + 0x154 ], %o0 <== NOT EXECUTED 40010d60: 94 10 20 00 clr %o2 <== NOT EXECUTED 40010d64: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 40010d68: 40 00 0e 0a call 40014590 <_CORE_mutex_Surrender> <== NOT EXECUTED 40010d6c: 90 02 20 10 add %o0, 0x10, %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 ) 40010d70: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 <== NOT EXECUTED 40010d74: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40010d78: c2 24 60 80 st %g1, [ %l1 + 0x80 ] <== NOT EXECUTED 40010d7c: c4 04 60 80 ld [ %l1 + 0x80 ], %g2 <== NOT EXECUTED 40010d80: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40010d84: 12 80 00 28 bne 40010e24 <== NOT EXECUTED 40010d88: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 40010d8c: 40 00 17 34 call 40016a5c <_Thread_Dispatch> <== NOT EXECUTED 40010d90: b0 10 20 19 mov 0x19, %i0 ! 19 <== NOT EXECUTED 40010d94: 81 c7 e0 08 ret <== NOT EXECUTED 40010d98: 81 e8 00 00 restore <== NOT EXECUTED 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++; 40010d9c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40010da0: 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++; 40010da4: 82 00 60 01 inc %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40010da8: 12 bf ff ae bne 40010c60 40010dac: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 40010db0: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED current = executing->current_priority; 40010db4: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 40010db8: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40010dbc: 02 80 00 56 be 40010f14 <== NOT EXECUTED 40010dc0: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 40010dc4: 1a 80 00 4a bcc 40010eec <== NOT EXECUTED 40010dc8: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40010dcc: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 <== NOT EXECUTED 40010dd0: 82 00 60 01 inc %g1 <== NOT EXECUTED 40010dd4: c2 24 60 80 st %g1, [ %l1 + 0x80 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 40010dd8: 7f ff e7 53 call 4000ab24 <== NOT EXECUTED 40010ddc: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED _Thread_Change_priority( 40010de0: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 40010de4: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 40010de8: 40 00 15 f9 call 400165cc <_Thread_Change_priority> <== NOT EXECUTED 40010dec: 94 10 20 00 clr %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 ) 40010df0: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 <== NOT EXECUTED 40010df4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40010df8: c2 24 60 80 st %g1, [ %l1 + 0x80 ] <== NOT EXECUTED 40010dfc: c4 04 60 80 ld [ %l1 + 0x80 ], %g2 <== NOT EXECUTED 40010e00: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40010e04: 32 bf ff 9a bne,a 40010c6c <== NOT EXECUTED 40010e08: f0 04 e1 5c ld [ %l3 + 0x15c ], %i0 <== NOT EXECUTED _Thread_Dispatch(); 40010e0c: 40 00 17 14 call 40016a5c <_Thread_Dispatch> <== NOT EXECUTED 40010e10: 01 00 00 00 nop <== NOT EXECUTED if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); executing = _Thread_Executing; 40010e14: 10 bf ff 96 b 40010c6c <== NOT EXECUTED 40010e18: f0 04 e1 5c ld [ %l3 + 0x15c ], %i0 <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { 40010e1c: 02 80 00 18 be 40010e7c 40010e20: 01 00 00 00 nop _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); _Thread_Enable_dispatch(); return (rtems_status_code) executing->Wait.return_code; 40010e24: 81 c7 e0 08 ret <== NOT EXECUTED 40010e28: 91 e8 20 19 restore %g0, 0x19, %o0 <== 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 ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40010e2c: 02 80 00 28 be 40010ecc <== NOT EXECUTED 40010e30: c6 05 21 54 ld [ %l4 + 0x154 ], %g3 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40010e34: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 <== NOT EXECUTED *segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 40010e38: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 40010e3c: c8 04 e1 5c ld [ %l3 + 0x15c ], %g4 <== NOT EXECUTED 40010e40: 82 00 60 01 inc %g1 <== NOT EXECUTED 40010e44: c4 21 20 20 st %g2, [ %g4 + 0x20 ] <== NOT EXECUTED 40010e48: c2 24 60 80 st %g1, [ %l1 + 0x80 ] <== NOT EXECUTED 40010e4c: 84 00 e0 10 add %g3, 0x10, %g2 <== NOT EXECUTED 40010e50: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40010e54: c4 21 20 44 st %g2, [ %g4 + 0x44 ] <== NOT EXECUTED 40010e58: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 40010e5c: 7f ff e7 32 call 4000ab24 <== NOT EXECUTED 40010e60: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40010e64: d0 05 21 54 ld [ %l4 + 0x154 ], %o0 <== NOT EXECUTED 40010e68: 92 10 20 00 clr %o1 <== NOT EXECUTED 40010e6c: 40 00 0d a5 call 40014500 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 40010e70: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED executing = _Thread_Executing; 40010e74: 10 bf ff 7e b 40010c6c <== NOT EXECUTED 40010e78: f0 04 e1 5c ld [ %l3 + 0x15c ], %i0 <== NOT EXECUTED 40010e7c: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 40010e80: 82 00 60 01 inc %g1 40010e84: c2 24 60 80 st %g1, [ %l1 + 0x80 ] case OBJECTS_REMOTE: /* this error cannot be returned */ _RTEMS_Unlock_allocator(); return RTEMS_INTERNAL_ERROR; case OBJECTS_ERROR: _RTEMS_Unlock_allocator(); 40010e88: d0 05 21 54 ld [ %l4 + 0x154 ], %o0 40010e8c: 94 10 20 00 clr %o2 40010e90: d2 02 20 08 ld [ %o0 + 8 ], %o1 40010e94: 40 00 0d bf call 40014590 <_CORE_mutex_Surrender> 40010e98: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40010e9c: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 40010ea0: b0 10 20 04 mov 4, %i0 _Thread_Dispatch(); 40010ea4: 82 00 7f ff add %g1, -1, %g1 40010ea8: c2 24 60 80 st %g1, [ %l1 + 0x80 ] 40010eac: c4 04 60 80 ld [ %l1 + 0x80 ], %g2 40010eb0: 80 a0 a0 00 cmp %g2, 0 40010eb4: 12 80 00 6d bne 40011068 40010eb8: 01 00 00 00 nop 40010ebc: 40 00 16 e8 call 40016a5c <_Thread_Dispatch> 40010ec0: 01 00 00 00 nop 40010ec4: 81 c7 e0 08 ret 40010ec8: 81 e8 00 00 restore 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; 40010ecc: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 40010ed0: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 40010ed4: 7f ff e7 14 call 4000ab24 <== NOT EXECUTED 40010ed8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); executing = _Thread_Executing; 40010edc: 10 bf ff 64 b 40010c6c <== NOT EXECUTED 40010ee0: f0 04 e1 5c ld [ %l3 + 0x15c ], %i0 <== NOT EXECUTED _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); _Thread_Enable_dispatch(); return (rtems_status_code) executing->Wait.return_code; 40010ee4: 81 c7 e0 08 ret <== NOT EXECUTED 40010ee8: 91 e8 20 08 restore %g0, 8, %o0 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 40010eec: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 40010ef0: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40010ef4: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 40010ef8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40010efc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40010f00: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40010f04: 7f ff e7 08 call 4000ab24 <== NOT EXECUTED 40010f08: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); executing = _Thread_Executing; 40010f0c: 10 bf ff 58 b 40010c6c <== NOT EXECUTED 40010f10: f0 04 e1 5c ld [ %l3 + 0x15c ], %i0 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 40010f14: 7f ff e7 04 call 4000ab24 <== NOT EXECUTED 40010f18: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40010f1c: 10 bf ff 54 b 40010c6c <== NOT EXECUTED 40010f20: f0 04 e1 5c ld [ %l3 + 0x15c ], %i0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uint32_t size ) { return _Heap_Allocate( &the_region->Memory, size ); 40010f24: 40 00 0e af call 400149e0 <_Heap_Allocate> 40010f28: 92 10 00 19 mov %i1, %o1 the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 40010f2c: a4 92 20 00 orcc %o0, 0, %l2 40010f30: 02 80 00 17 be 40010f8c 40010f34: 80 8e a0 01 btst 1, %i2 the_region->number_of_used_blocks += 1; 40010f38: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40010f3c: c4 04 60 80 ld [ %l1 + 0x80 ], %g2 40010f40: 82 00 60 01 inc %g1 40010f44: c2 24 20 64 st %g1, [ %l0 + 0x64 ] 40010f48: 84 00 a0 01 inc %g2 40010f4c: c4 24 60 80 st %g2, [ %l1 + 0x80 ] _RTEMS_Unlock_allocator(); 40010f50: d0 05 21 54 ld [ %l4 + 0x154 ], %o0 40010f54: 94 10 20 00 clr %o2 40010f58: d2 02 20 08 ld [ %o0 + 8 ], %o1 40010f5c: 40 00 0d 8d call 40014590 <_CORE_mutex_Surrender> 40010f60: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40010f64: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 40010f68: 82 00 7f ff add %g1, -1, %g1 40010f6c: c2 24 60 80 st %g1, [ %l1 + 0x80 ] 40010f70: c4 04 60 80 ld [ %l1 + 0x80 ], %g2 40010f74: 80 a0 a0 00 cmp %g2, 0 40010f78: 02 80 00 12 be 40010fc0 40010f7c: 01 00 00 00 nop *segment = the_segment; 40010f80: e4 27 00 00 st %l2, [ %i4 ] <== NOT EXECUTED 40010f84: 81 c7 e0 08 ret 40010f88: 91 e8 20 00 restore %g0, 0, %o0 return RTEMS_SUCCESSFUL; } if ( _Options_Is_no_wait( option_set ) ) { 40010f8c: 02 80 00 11 be 40010fd0 40010f90: 01 00 00 00 nop rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40010f94: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 40010f98: 82 00 60 01 inc %g1 40010f9c: c2 24 60 80 st %g1, [ %l1 + 0x80 ] _RTEMS_Unlock_allocator(); 40010fa0: d0 05 21 54 ld [ %l4 + 0x154 ], %o0 40010fa4: 94 10 20 00 clr %o2 40010fa8: d2 02 20 08 ld [ %o0 + 8 ], %o1 40010fac: 40 00 0d 79 call 40014590 <_CORE_mutex_Surrender> 40010fb0: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40010fb4: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 40010fb8: 10 bf ff bb b 40010ea4 40010fbc: b0 10 20 0d mov 0xd, %i0 _Thread_Dispatch(); 40010fc0: 40 00 16 a7 call 40016a5c <_Thread_Dispatch> 40010fc4: 01 00 00 00 nop _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { the_region->number_of_used_blocks += 1; _RTEMS_Unlock_allocator(); *segment = the_segment; 40010fc8: 10 bf ff ef b 40010f84 40010fcc: e4 27 00 00 st %l2, [ %i4 ] rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40010fd0: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 40010fd4: 25 10 00 d3 sethi %hi(0x40034c00), %l2 40010fd8: 82 00 60 01 inc %g1 40010fdc: c2 24 60 80 st %g1, [ %l1 + 0x80 ] 40010fe0: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 40010fe4: 82 00 60 01 inc %g1 40010fe8: c2 24 60 80 st %g1, [ %l1 + 0x80 ] * 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(); 40010fec: d0 05 21 54 ld [ %l4 + 0x154 ], %o0 40010ff0: 94 10 20 00 clr %o2 40010ff4: d2 02 20 08 ld [ %o0 + 8 ], %o1 40010ff8: 40 00 0d 66 call 40014590 <_CORE_mutex_Surrender> 40010ffc: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40011000: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 40011004: 82 00 7f ff add %g1, -1, %g1 40011008: c2 24 60 80 st %g1, [ %l1 + 0x80 ] 4001100c: c4 04 60 80 ld [ %l1 + 0x80 ], %g2 40011010: 80 a0 a0 00 cmp %g2, 0 40011014: 02 80 00 17 be 40011070 40011018: 01 00 00 00 nop 4001101c: 82 10 20 01 mov 1, %g1 ! 1 executing->Wait.queue = &the_region->Wait_queue; 40011020: 90 04 20 10 add %l0, 0x10, %o0 executing->Wait.id = id; 40011024: ea 26 20 20 st %l5, [ %i0 + 0x20 ] executing->Wait.count = size; 40011028: f2 26 20 24 st %i1, [ %i0 + 0x24 ] executing->Wait.return_argument = segment; 4001102c: 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 ); 40011030: 92 10 00 1b mov %i3, %o1 * because this thread is going to block. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); executing->Wait.queue = &the_region->Wait_queue; 40011034: d0 26 20 44 st %o0, [ %i0 + 0x44 ] 40011038: c2 24 20 40 st %g1, [ %l0 + 0x40 ] 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 ); 4001103c: 15 10 00 5d sethi %hi(0x40017400), %o2 40011040: 40 00 17 f7 call 4001701c <_Thread_queue_Enqueue_with_handler> 40011044: 94 12 a1 5c or %o2, 0x15c, %o2 ! 4001755c <_Thread_queue_Timeout> 40011048: c2 04 a0 80 ld [ %l2 + 0x80 ], %g1 4001104c: 82 00 7f ff add %g1, -1, %g1 40011050: c2 24 a0 80 st %g1, [ %l2 + 0x80 ] 40011054: c4 04 a0 80 ld [ %l2 + 0x80 ], %g2 40011058: 80 a0 a0 00 cmp %g2, 0 4001105c: 02 80 00 09 be 40011080 40011060: 01 00 00 00 nop _Thread_Enable_dispatch(); return (rtems_status_code) executing->Wait.return_code; 40011064: f0 06 20 34 ld [ %i0 + 0x34 ], %i0 <== NOT EXECUTED 40011068: 81 c7 e0 08 ret <== NOT EXECUTED 4001106c: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 40011070: 40 00 16 7b call 40016a5c <_Thread_Dispatch> <== NOT EXECUTED 40011074: 01 00 00 00 nop <== NOT EXECUTED 40011078: 10 bf ff ea b 40011020 <== NOT EXECUTED 4001107c: 82 10 20 01 mov 1, %g1 ! 1 <== NOT EXECUTED 40011080: 40 00 16 77 call 40016a5c <_Thread_Dispatch> 40011084: 01 00 00 00 nop 40011088: f0 06 20 34 ld [ %i0 + 0x34 ], %i0 4001108c: 81 c7 e0 08 ret 40011090: 81 e8 00 00 restore 400110cc : rtems_status_code rtems_region_return_segment( Objects_Id id, void *segment ) { 400110cc: 9d e3 bf 90 save %sp, -112, %sp #ifdef RTEMS_REGION_FREE_SHRED_PATTERN uint32_t size; #endif int status; _RTEMS_Lock_allocator(); 400110d0: 7f ff e6 91 call 4000ab14 400110d4: 01 00 00 00 nop 400110d8: a4 10 00 08 mov %o0, %l2 400110dc: 23 10 00 d3 sethi %hi(0x40034c00), %l1 400110e0: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 ! 40034c80 <_Thread_Dispatch_disable_level> 400110e4: 80 a0 60 00 cmp %g1, 0 400110e8: 02 80 00 0b be 40011114 400110ec: 27 10 00 d3 sethi %hi(0x40034c00), %l3 400110f0: 03 10 00 d3 sethi %hi(0x40034c00), %g1 <== NOT EXECUTED 400110f4: c4 00 62 60 ld [ %g1 + 0x260 ], %g2 ! 40034e60 <_System_state_Current> <== NOT EXECUTED 400110f8: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 400110fc: 08 80 00 06 bleu 40011114 <== NOT EXECUTED 40011100: 90 10 20 00 clr %o0 <== NOT EXECUTED 40011104: 92 10 20 00 clr %o1 <== NOT EXECUTED 40011108: 40 00 0f 9b call 40014f74 <_Internal_error_Occurred> <== NOT EXECUTED 4001110c: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 40011110: 27 10 00 d3 sethi %hi(0x40034c00), %l3 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 40011114: 09 10 00 d3 sethi %hi(0x40034c00), %g4 40011118: e0 04 e1 54 ld [ %l3 + 0x154 ], %l0 4001111c: c4 01 21 5c ld [ %g4 + 0x15c ], %g2 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40011120: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 40011124: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 40011128: 80 a0 60 00 cmp %g1, 0 4001112c: 22 80 00 38 be,a 4001120c 40011130: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 40011134: c0 24 20 60 clr [ %l0 + 0x60 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40011138: 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; 4001113c: 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; 40011140: 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; 40011144: 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; 40011148: 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 ) || 4001114c: 80 a0 e0 02 cmp %g3, 2 40011150: 12 80 00 58 bne 400112b0 40011154: c8 24 20 64 st %g4, [ %l0 + 0x64 ] _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40011158: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4001115c: 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++; 40011160: 82 00 60 01 inc %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40011164: 02 80 00 7c be 40011354 40011168: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] _ISR_Enable( level ); 4001116c: 7f ff e6 6e call 4000ab24 40011170: 90 10 00 12 mov %l2, %o0 RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 40011174: 92 10 00 18 mov %i0, %o1 40011178: 11 10 00 d2 sethi %hi(0x40034800), %o0 4001117c: 94 07 bf f4 add %fp, -12, %o2 40011180: 40 00 10 fb call 4001556c <_Objects_Get_no_protection> 40011184: 90 12 22 98 or %o0, 0x298, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 40011188: c2 07 bf f4 ld [ %fp + -12 ], %g1 4001118c: 80 a0 60 01 cmp %g1, 1 40011190: 02 80 00 35 be 40011264 40011194: a0 10 00 08 mov %o0, %l0 40011198: 80 a0 60 01 cmp %g1, 1 4001119c: 1a 80 00 5f bcc 40011318 400111a0: 80 a0 60 02 cmp %g1, 2 RTEMS_INLINE_ROUTINE boolean _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 400111a4: 92 10 00 19 mov %i1, %o1 400111a8: 40 00 0e 73 call 40014b74 <_Heap_Free> 400111ac: 90 02 20 68 add %o0, 0x68, %o0 status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) { 400111b0: 80 a2 20 00 cmp %o0, 0 400111b4: 32 80 00 97 bne,a 40011410 400111b8: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400111bc: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 400111c0: 82 00 60 01 inc %g1 400111c4: c2 24 60 80 st %g1, [ %l1 + 0x80 ] _RTEMS_Unlock_allocator(); 400111c8: d0 04 e1 54 ld [ %l3 + 0x154 ], %o0 400111cc: 94 10 20 00 clr %o2 400111d0: d2 02 20 08 ld [ %o0 + 8 ], %o1 400111d4: 40 00 0c ef call 40014590 <_CORE_mutex_Surrender> 400111d8: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400111dc: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 400111e0: b0 10 20 09 mov 9, %i0 400111e4: 82 00 7f ff add %g1, -1, %g1 400111e8: c2 24 60 80 st %g1, [ %l1 + 0x80 ] 400111ec: c4 04 60 80 ld [ %l1 + 0x80 ], %g2 400111f0: 80 a0 a0 00 cmp %g2, 0 400111f4: 12 80 00 8c bne 40011424 400111f8: 01 00 00 00 nop _Thread_Dispatch(); 400111fc: 40 00 16 18 call 40016a5c <_Thread_Dispatch> 40011200: 01 00 00 00 nop 40011204: 81 c7 e0 08 ret 40011208: 81 e8 00 00 restore /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 4001120c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40011210: 12 80 00 30 bne 400112d0 <== NOT EXECUTED 40011214: c6 04 e1 54 ld [ %l3 + 0x154 ], %g3 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40011218: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 4001121c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40011220: 22 80 00 68 be,a 400113c0 <== NOT EXECUTED 40011224: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 40011228: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4001122c: 12 80 00 29 bne 400112d0 <== NOT EXECUTED 40011230: 82 10 20 02 mov 2, %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; 40011234: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 40011238: 7f ff e6 3b call 4000ab24 <== NOT EXECUTED 4001123c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 40011240: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40011244: 11 10 00 d2 sethi %hi(0x40034800), %o0 <== NOT EXECUTED 40011248: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 4001124c: 40 00 10 c8 call 4001556c <_Objects_Get_no_protection> <== NOT EXECUTED 40011250: 90 12 22 98 or %o0, 0x298, %o0 <== NOT EXECUTED #endif int status; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 40011254: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40011258: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4001125c: 12 bf ff d0 bne 4001119c <== NOT EXECUTED 40011260: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40011264: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 <== NOT EXECUTED 40011268: 82 00 60 01 inc %g1 <== NOT EXECUTED 4001126c: c2 24 60 80 st %g1, [ %l1 + 0x80 ] <== NOT EXECUTED case OBJECTS_REMOTE: /* this error cannot be returned */ _RTEMS_Unlock_allocator(); 40011270: d0 04 e1 54 ld [ %l3 + 0x154 ], %o0 <== NOT EXECUTED 40011274: 94 10 20 00 clr %o2 <== NOT EXECUTED 40011278: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 4001127c: 40 00 0c c5 call 40014590 <_CORE_mutex_Surrender> <== NOT EXECUTED 40011280: 90 02 20 10 add %o0, 0x10, %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 ) 40011284: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 <== NOT EXECUTED 40011288: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4001128c: c2 24 60 80 st %g1, [ %l1 + 0x80 ] <== NOT EXECUTED 40011290: c4 04 60 80 ld [ %l1 + 0x80 ], %g2 <== NOT EXECUTED 40011294: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40011298: 12 80 00 22 bne 40011320 <== NOT EXECUTED 4001129c: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 400112a0: 40 00 15 ef call 40016a5c <_Thread_Dispatch> <== NOT EXECUTED 400112a4: b0 10 20 19 mov 0x19, %i0 ! 19 <== NOT EXECUTED 400112a8: 81 c7 e0 08 ret <== NOT EXECUTED 400112ac: 81 e8 00 00 restore <== NOT EXECUTED 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; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 400112b0: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 400112b4: 12 bf ff ae bne 4001116c <== NOT EXECUTED 400112b8: 01 00 00 00 nop <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 400112bc: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 400112c0: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 400112c4: 02 80 00 24 be 40011354 <== NOT EXECUTED 400112c8: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED 400112cc: 30 bf ff a8 b,a 4001116c <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400112d0: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 <== NOT EXECUTED #ifdef RTEMS_REGION_FREE_SHRED_PATTERN uint32_t size; #endif int status; _RTEMS_Lock_allocator(); 400112d4: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 400112d8: c8 01 21 5c ld [ %g4 + 0x15c ], %g4 <== NOT EXECUTED 400112dc: 82 00 60 01 inc %g1 <== NOT EXECUTED 400112e0: c4 21 20 20 st %g2, [ %g4 + 0x20 ] <== NOT EXECUTED 400112e4: c2 24 60 80 st %g1, [ %l1 + 0x80 ] <== NOT EXECUTED 400112e8: 84 00 e0 10 add %g3, 0x10, %g2 <== NOT EXECUTED 400112ec: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 400112f0: c4 21 20 44 st %g2, [ %g4 + 0x44 ] <== NOT EXECUTED 400112f4: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 400112f8: 7f ff e6 0b call 4000ab24 <== NOT EXECUTED 400112fc: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40011300: d0 04 e1 54 ld [ %l3 + 0x154 ], %o0 <== NOT EXECUTED 40011304: 92 10 20 00 clr %o1 <== NOT EXECUTED 40011308: 40 00 0c 7e call 40014500 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 4001130c: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED 40011310: 10 bf ff 9a b 40011178 <== NOT EXECUTED 40011314: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { 40011318: 02 80 00 04 be 40011328 4001131c: 01 00 00 00 nop the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator internally */ return RTEMS_SUCCESSFUL; 40011320: 81 c7 e0 08 ret <== NOT EXECUTED 40011324: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED 40011328: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 4001132c: 82 00 60 01 inc %g1 40011330: c2 24 60 80 st %g1, [ %l1 + 0x80 ] case OBJECTS_REMOTE: /* this error cannot be returned */ _RTEMS_Unlock_allocator(); return RTEMS_INTERNAL_ERROR; case OBJECTS_ERROR: _RTEMS_Unlock_allocator(); 40011334: d0 04 e1 54 ld [ %l3 + 0x154 ], %o0 40011338: 94 10 20 00 clr %o2 4001133c: d2 02 20 08 ld [ %o0 + 8 ], %o1 40011340: 40 00 0c 94 call 40014590 <_CORE_mutex_Surrender> 40011344: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40011348: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 4001134c: 10 bf ff a6 b 400111e4 40011350: b0 10 20 04 mov 4, %i0 */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 40011354: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED current = executing->current_priority; 40011358: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 4001135c: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40011360: 02 80 00 28 be 40011400 <== NOT EXECUTED 40011364: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 40011368: 1a 80 00 1c bcc 400113d8 <== NOT EXECUTED 4001136c: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40011370: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 <== NOT EXECUTED 40011374: 82 00 60 01 inc %g1 <== NOT EXECUTED 40011378: c2 24 60 80 st %g1, [ %l1 + 0x80 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 4001137c: 7f ff e5 ea call 4000ab24 <== NOT EXECUTED 40011380: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED _Thread_Change_priority( 40011384: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 40011388: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 4001138c: 40 00 14 90 call 400165cc <_Thread_Change_priority> <== NOT EXECUTED 40011390: 94 10 20 00 clr %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 ) 40011394: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 <== NOT EXECUTED 40011398: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4001139c: c2 24 60 80 st %g1, [ %l1 + 0x80 ] <== NOT EXECUTED 400113a0: c4 04 60 80 ld [ %l1 + 0x80 ], %g2 <== NOT EXECUTED 400113a4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400113a8: 32 bf ff 74 bne,a 40011178 <== NOT EXECUTED 400113ac: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED _Thread_Dispatch(); 400113b0: 40 00 15 ab call 40016a5c <_Thread_Dispatch> <== NOT EXECUTED 400113b4: 01 00 00 00 nop <== NOT EXECUTED 400113b8: 10 bf ff 70 b 40011178 <== NOT EXECUTED 400113bc: 92 10 00 18 mov %i0, %o1 <== 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++; 400113c0: 82 00 60 01 inc %g1 <== NOT EXECUTED 400113c4: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 400113c8: 7f ff e5 d7 call 4000ab24 <== NOT EXECUTED 400113cc: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400113d0: 10 bf ff 6a b 40011178 <== NOT EXECUTED 400113d4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 400113d8: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 400113dc: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 400113e0: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 400113e4: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 400113e8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400113ec: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 400113f0: 7f ff e5 cd call 4000ab24 <== NOT EXECUTED 400113f4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400113f8: 10 bf ff 60 b 40011178 <== NOT EXECUTED 400113fc: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 40011400: 7f ff e5 c9 call 4000ab24 <== NOT EXECUTED 40011404: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40011408: 10 bf ff 5c b 40011178 <== NOT EXECUTED 4001140c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; } the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator internally */ 40011410: 90 10 00 10 mov %l0, %o0 if ( !status ) { _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ADDRESS; } the_region->number_of_used_blocks -= 1; 40011414: 82 00 7f ff add %g1, -1, %g1 _Region_Process_queue(the_region); /* unlocks allocator internally */ 40011418: b0 10 20 00 clr %i0 4001141c: 40 00 26 71 call 4001ade0 <_Region_Process_queue> 40011420: c2 24 20 64 st %g1, [ %l0 + 0x64 ] 40011424: 81 c7 e0 08 ret 40011428: 81 e8 00 00 restore 40005a48 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 40005a48: 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 ) ) 40005a4c: aa 96 20 00 orcc %i0, 0, %l5 40005a50: 02 80 00 12 be 40005a98 40005a54: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 40005a58: 80 a7 20 00 cmp %i4, 0 40005a5c: 02 80 00 0f be 40005a98 40005a60: b0 10 20 09 mov 9, %i0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 40005a64: a4 8e a0 40 andcc %i2, 0x40, %l2 40005a68: 12 80 00 0e bne 40005aa0 40005a6c: a0 0e a0 30 and %i2, 0x30, %l0 40005a70: 80 8e a0 80 btst 0x80, %i2 40005a74: 12 80 00 0c bne 40005aa4 40005a78: 80 a4 20 10 cmp %l0, 0x10 RTEMS_INLINE_ROUTINE boolean _Attributes_Is_counting_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE); 40005a7c: 80 a0 00 10 cmp %g0, %l0 40005a80: a2 60 3f ff subx %g0, -1, %l1 if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 40005a84: 80 a4 60 00 cmp %l1, 0 40005a88: 12 80 00 17 bne 40005ae4 40005a8c: 80 a6 60 01 cmp %i1, 1 40005a90: 08 80 00 15 bleu 40005ae4 40005a94: b0 10 20 0a mov 0xa, %i0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 40005a98: 81 c7 e0 08 ret 40005a9c: 81 e8 00 00 restore #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 40005aa0: 80 a4 20 10 cmp %l0, 0x10 40005aa4: 12 80 00 0b bne 40005ad0 40005aa8: 80 a4 20 20 cmp %l0, 0x20 40005aac: 80 8e a0 04 btst 4, %i2 40005ab0: 02 80 00 06 be 40005ac8 40005ab4: 80 a4 a0 00 cmp %l2, 0 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 40005ab8: 02 bf ff f1 be 40005a7c 40005abc: 80 8e a0 80 btst 0x80, %i2 40005ac0: 02 bf ff f0 be 40005a80 40005ac4: 80 a0 00 10 cmp %g0, %l0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 40005ac8: 81 c7 e0 08 ret 40005acc: 91 e8 20 0b restore %g0, 0xb, %o0 #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 40005ad0: 12 bf ff fe bne 40005ac8 40005ad4: 80 8e a0 04 btst 4, %i2 40005ad8: 12 bf ff f8 bne 40005ab8 40005adc: 80 a4 a0 00 cmp %l2, 0 40005ae0: 30 bf ff fa b,a 40005ac8 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40005ae4: 29 10 00 6a sethi %hi(0x4001a800), %l4 40005ae8: c2 05 23 60 ld [ %l4 + 0x360 ], %g1 ! 4001ab60 <_Thread_Dispatch_disable_level> 40005aec: 82 00 60 01 inc %g1 40005af0: c2 25 23 60 st %g1, [ %l4 + 0x360 ] * the inactive chain of free semaphore control blocks. */ RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void ) { return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information ); 40005af4: 31 10 00 6a sethi %hi(0x4001a800), %i0 40005af8: 40 00 07 4e call 40007830 <_Objects_Allocate> 40005afc: 90 16 22 14 or %i0, 0x214, %o0 ! 4001aa14 <_Semaphore_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 40005b00: a6 92 20 00 orcc %o0, 0, %l3 40005b04: 12 80 00 0e bne 40005b3c 40005b08: 80 a4 60 00 cmp %l1, 0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40005b0c: c2 05 23 60 ld [ %l4 + 0x360 ], %g1 40005b10: b0 10 20 05 mov 5, %i0 _Thread_Dispatch(); 40005b14: 82 00 7f ff add %g1, -1, %g1 40005b18: c2 25 23 60 st %g1, [ %l4 + 0x360 ] 40005b1c: c4 05 23 60 ld [ %l4 + 0x360 ], %g2 40005b20: 80 a0 a0 00 cmp %g2, 0 40005b24: 12 80 00 04 bne 40005b34 40005b28: 01 00 00 00 nop 40005b2c: 40 00 0d ba call 40009214 <_Thread_Dispatch> 40005b30: 01 00 00 00 nop 40005b34: 81 c7 e0 08 ret 40005b38: 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 ) ) { 40005b3c: 12 80 00 1e bne 40005bb4 40005b40: f4 24 e0 10 st %i2, [ %l3 + 0x10 ] CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 40005b44: 80 a4 a0 00 cmp %l2, 0 40005b48: 02 80 00 39 be 40005c2c 40005b4c: 80 8e a0 80 btst 0x80, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40005b50: 82 10 20 02 mov 2, %g1 40005b54: c2 27 bf e8 st %g1, [ %fp + -24 ] the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 40005b58: 80 a4 20 10 cmp %l0, 0x10 40005b5c: 12 80 00 39 bne 40005c40 40005b60: 82 10 20 02 mov 2, %g1 the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 40005b64: c2 07 bf e8 ld [ %fp + -24 ], %g1 40005b68: 80 a0 60 01 cmp %g1, 1 40005b6c: 18 80 00 3d bgu 40005c60 40005b70: c0 27 bf e0 clr [ %fp + -32 ] case CORE_MUTEX_DISCIPLINES_FIFO: case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; 40005b74: c0 27 bf e4 clr [ %fp + -28 ] the_mutex_attributes.only_owner_release = FALSE; } the_mutex_attributes.priority_ceiling = priority_ceiling; mutex_status = _CORE_mutex_Initialize( 40005b78: 82 1e 60 01 xor %i1, 1, %g1 40005b7c: 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; 40005b80: f6 27 bf ec st %i3, [ %fp + -20 ] mutex_status = _CORE_mutex_Initialize( 40005b84: 94 60 3f ff subx %g0, -1, %o2 40005b88: 90 04 e0 14 add %l3, 0x14, %o0 40005b8c: 40 00 04 9c call 40006dfc <_CORE_mutex_Initialize> 40005b90: 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 ) { 40005b94: 80 a2 20 06 cmp %o0, 6 40005b98: 12 80 00 14 bne 40005be8 40005b9c: 90 16 22 14 or %i0, 0x214, %o0 RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 40005ba0: 40 00 08 32 call 40007c68 <_Objects_Free> <== NOT EXECUTED 40005ba4: 92 10 00 13 mov %l3, %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 ) 40005ba8: c2 05 23 60 ld [ %l4 + 0x360 ], %g1 <== NOT EXECUTED 40005bac: 10 bf ff da b 40005b14 <== NOT EXECUTED 40005bb0: b0 10 20 13 mov 0x13, %i0 <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) 40005bb4: 80 8e a0 04 btst 4, %i2 40005bb8: 22 80 00 04 be,a 40005bc8 40005bbc: c0 27 bf f4 clr [ %fp + -12 ] the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 40005bc0: 82 10 20 01 mov 1, %g1 40005bc4: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 40005bc8: 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; 40005bcc: c0 27 bf e0 clr [ %fp + -32 ] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; 40005bd0: c0 27 bf ec clr [ %fp + -20 ] _CORE_semaphore_Initialize( 40005bd4: 94 10 00 19 mov %i1, %o2 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 40005bd8: 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( 40005bdc: 90 04 e0 14 add %l3, 0x14, %o0 40005be0: 40 00 05 44 call 400070f0 <_CORE_semaphore_Initialize> 40005be4: 92 07 bf f0 add %fp, -16, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40005be8: 90 16 22 14 or %i0, 0x214, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 40005bec: c6 04 e0 08 ld [ %l3 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40005bf0: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 40005bf4: 03 00 00 3f sethi %hi(0xfc00), %g1 40005bf8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40005bfc: 82 08 c0 01 and %g3, %g1, %g1 40005c00: 80 a0 40 02 cmp %g1, %g2 40005c04: 38 80 00 06 bgu,a 40005c1c 40005c08: ea 24 e0 0c st %l5, [ %l3 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40005c0c: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40005c10: 83 28 60 02 sll %g1, 2, %g1 40005c14: e6 20 80 01 st %l3, [ %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; 40005c18: ea 24 e0 0c st %l5, [ %l3 + 0xc ] &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 40005c1c: c6 27 00 00 st %g3, [ %i4 ] 40005c20: c2 05 23 60 ld [ %l4 + 0x360 ], %g1 40005c24: 10 bf ff bc b 40005b14 40005c28: b0 10 20 00 clr %i0 if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 40005c2c: 02 80 00 08 be 40005c4c 40005c30: 80 8e a0 04 btst 4, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 40005c34: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED 40005c38: 10 bf ff c8 b 40005b58 <== NOT EXECUTED 40005c3c: c2 27 bf e8 st %g1, [ %fp + -24 ] <== NOT EXECUTED the_mutex_attributes.only_owner_release = TRUE; break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; the_mutex_attributes.only_owner_release = FALSE; 40005c40: 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; 40005c44: 10 bf ff cd b 40005b78 40005c48: c2 27 bf e0 st %g1, [ %fp + -32 ] if ( _Attributes_Is_inherit_priority( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; else if ( _Attributes_Is_priority( attribute_set ) ) 40005c4c: 22 bf ff c3 be,a 40005b58 40005c50: c0 27 bf e8 clr [ %fp + -24 ] the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 40005c54: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40005c58: 10 bf ff c0 b 40005b58 <== NOT EXECUTED 40005c5c: c2 27 bf e8 st %g1, [ %fp + -24 ] <== NOT EXECUTED if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 40005c60: 80 a0 60 03 cmp %g1, 3 40005c64: 18 bf ff c6 bgu 40005b7c 40005c68: 82 1e 60 01 xor %i1, 1, %g1 case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_mutex_attributes.only_owner_release = TRUE; 40005c6c: 82 10 20 01 mov 1, %g1 40005c70: 10 bf ff c2 b 40005b78 40005c74: c2 27 bf e4 st %g1, [ %fp + -28 ] 40005c78 : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 40005c78: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 40005c7c: 21 10 00 6a sethi %hi(0x4001a800), %l0 40005c80: 92 10 00 18 mov %i0, %o1 40005c84: 94 07 bf f4 add %fp, -12, %o2 40005c88: 40 00 08 3b call 40007d74 <_Objects_Get> 40005c8c: 90 14 22 14 or %l0, 0x214, %o0 register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 40005c90: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005c94: 80 a0 60 00 cmp %g1, 0 40005c98: 12 80 00 19 bne 40005cfc 40005c9c: b0 10 00 08 mov %o0, %i0 40005ca0: 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) ) { 40005ca4: 84 88 60 30 andcc %g1, 0x30, %g2 40005ca8: 22 80 00 1a be,a 40005d10 40005cac: 90 02 20 14 add %o0, 0x14, %o0 if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 40005cb0: c2 02 20 64 ld [ %o0 + 0x64 ], %g1 40005cb4: 80 a0 60 00 cmp %g1, 0 40005cb8: 12 80 00 35 bne 40005d8c 40005cbc: 80 a0 a0 20 cmp %g2, 0x20 40005cc0: 02 80 00 34 be 40005d90 40005cc4: 90 06 20 14 add %i0, 0x14, %o0 40005cc8: 03 10 00 6a sethi %hi(0x4001a800), %g1 40005ccc: c4 00 63 60 ld [ %g1 + 0x360 ], %g2 ! 4001ab60 <_Thread_Dispatch_disable_level> 40005cd0: b0 10 20 0c mov 0xc, %i0 40005cd4: 84 00 bf ff add %g2, -1, %g2 40005cd8: c4 20 63 60 st %g2, [ %g1 + 0x360 ] 40005cdc: c6 00 63 60 ld [ %g1 + 0x360 ], %g3 40005ce0: 80 a0 e0 00 cmp %g3, 0 40005ce4: 12 80 00 28 bne 40005d84 40005ce8: 01 00 00 00 nop _Thread_Dispatch(); 40005cec: 40 00 0d 4a call 40009214 <_Thread_Dispatch> 40005cf0: 01 00 00 00 nop 40005cf4: 81 c7 e0 08 ret 40005cf8: 81 e8 00 00 restore { register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 40005cfc: 80 a0 60 02 cmp %g1, 2 40005d00: 08 bf ff fd bleu 40005cf4 40005d04: b0 10 20 04 mov 4, %i0 40005d08: 81 c7 e0 08 ret <== NOT EXECUTED 40005d0c: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 40005d10: 92 10 20 00 clr %o1 40005d14: 40 00 04 f3 call 400070e0 <_CORE_semaphore_Flush> 40005d18: 94 10 20 02 mov 2, %o2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40005d1c: 90 14 22 14 or %l0, 0x214, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40005d20: c2 06 20 08 ld [ %i0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40005d24: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 40005d28: 05 00 00 3f sethi %hi(0xfc00), %g2 40005d2c: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40005d30: 82 08 40 02 and %g1, %g2, %g1 40005d34: 80 a0 40 03 cmp %g1, %g3 40005d38: 38 80 00 06 bgu,a 40005d50 40005d3c: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40005d40: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40005d44: 83 28 60 02 sll %g1, 2, %g1 40005d48: 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; 40005d4c: c0 26 20 0c clr [ %i0 + 0xc ] RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 40005d50: 40 00 07 c6 call 40007c68 <_Objects_Free> 40005d54: 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 ) 40005d58: 03 10 00 6a sethi %hi(0x4001a800), %g1 40005d5c: c4 00 63 60 ld [ %g1 + 0x360 ], %g2 ! 4001ab60 <_Thread_Dispatch_disable_level> 40005d60: b0 10 20 00 clr %i0 40005d64: 84 00 bf ff add %g2, -1, %g2 40005d68: c4 20 63 60 st %g2, [ %g1 + 0x360 ] 40005d6c: c6 00 63 60 ld [ %g1 + 0x360 ], %g3 40005d70: 80 a0 e0 00 cmp %g3, 0 40005d74: 12 80 00 04 bne 40005d84 40005d78: 01 00 00 00 nop _Thread_Dispatch(); 40005d7c: 40 00 0d 26 call 40009214 <_Thread_Dispatch> 40005d80: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40005d84: 81 c7 e0 08 ret 40005d88: 81 e8 00 00 restore !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 40005d8c: 90 06 20 14 add %i0, 0x14, %o0 40005d90: 92 10 20 00 clr %o1 40005d94: 40 00 04 16 call 40006dec <_CORE_mutex_Flush> 40005d98: 94 10 20 04 mov 4, %o2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40005d9c: 10 bf ff e1 b 40005d20 40005da0: 90 14 22 14 or %l0, 0x214, %o0 40006244 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 40006244: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 40006248: 11 10 00 73 sethi %hi(0x4001cc00), %o0 4000624c: 92 10 00 18 mov %i0, %o1 40006250: 90 12 20 7c or %o0, 0x7c, %o0 40006254: 40 00 08 9b call 400084c0 <_Objects_Get> 40006258: 94 07 bf f4 add %fp, -12, %o2 register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 4000625c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006260: 80 a0 60 00 cmp %g1, 0 40006264: 12 80 00 16 bne 400062bc 40006268: 80 a0 60 02 cmp %g1, 2 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 4000626c: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40006270: 80 88 60 30 btst 0x30, %g1 40006274: 12 80 00 16 bne 400062cc 40006278: 90 02 20 14 add %o0, 0x14, %o0 &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 4000627c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40006280: 40 00 05 6b call 4000782c <_CORE_semaphore_Flush> <== NOT EXECUTED 40006284: 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 ) 40006288: 03 10 00 73 sethi %hi(0x4001cc00), %g1 4000628c: c4 00 61 d0 ld [ %g1 + 0x1d0 ], %g2 ! 4001cdd0 <_Thread_Dispatch_disable_level> 40006290: b0 10 20 00 clr %i0 40006294: 84 00 bf ff add %g2, -1, %g2 40006298: c4 20 61 d0 st %g2, [ %g1 + 0x1d0 ] 4000629c: c6 00 61 d0 ld [ %g1 + 0x1d0 ], %g3 400062a0: 80 a0 e0 00 cmp %g3, 0 400062a4: 12 80 00 04 bne 400062b4 400062a8: 01 00 00 00 nop _Thread_Dispatch(); 400062ac: 40 00 0d 71 call 40009870 <_Thread_Dispatch> 400062b0: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400062b4: 81 c7 e0 08 ret 400062b8: 81 e8 00 00 restore { register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 400062bc: 08 bf ff fe bleu 400062b4 <== NOT EXECUTED 400062c0: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED 400062c4: 81 c7 e0 08 ret <== NOT EXECUTED 400062c8: 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) ) { _CORE_mutex_Flush( 400062cc: 92 10 20 00 clr %o1 400062d0: 40 00 04 9a call 40007538 <_CORE_mutex_Flush> 400062d4: 94 10 20 01 mov 1, %o2 400062d8: 30 bf ff ec b,a 40006288 40005da4 : rtems_status_code rtems_semaphore_obtain( rtems_id id, uint32_t option_set, rtems_interval timeout ) { 40005da4: 9d e3 bf 90 save %sp, -112, %sp Objects_Id id, Objects_Locations *location, ISR_Level *level ) { return (Semaphore_Control *) 40005da8: 11 10 00 6a sethi %hi(0x4001a800), %o0 40005dac: 92 10 00 18 mov %i0, %o1 40005db0: 90 12 22 14 or %o0, 0x214, %o0 40005db4: 94 07 bf f4 add %fp, -12, %o2 40005db8: 40 00 07 d1 call 40007cfc <_Objects_Get_isr_disable> 40005dbc: 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 ) { 40005dc0: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005dc4: 80 a0 60 00 cmp %g1, 0 40005dc8: 12 80 00 19 bne 40005e2c 40005dcc: a0 10 00 08 mov %o0, %l0 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 40005dd0: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40005dd4: 80 88 60 30 btst 0x30, %g1 40005dd8: 12 80 00 1b bne 40005e44 40005ddc: 23 10 00 6a sethi %hi(0x4001a800), %l1 Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 40005de0: 27 10 00 6b sethi %hi(0x4001ac00), %l3 40005de4: e4 04 e0 3c ld [ %l3 + 0x3c ], %l2 ! 4001ac3c <_Thread_Executing> Watchdog_Interval timeout, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 40005de8: d0 07 bf f0 ld [ %fp + -16 ], %o0 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 40005dec: c0 24 a0 34 clr [ %l2 + 0x34 ] if ( the_semaphore->count != 0 ) { 40005df0: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 40005df4: 80 a0 60 00 cmp %g1, 0 40005df8: 12 80 00 8f bne 40006034 40005dfc: 80 8e 60 01 btst 1, %i1 the_semaphore->count -= 1; _ISR_Enable( level ); return; } if ( !wait ) { 40005e00: 02 80 00 73 be 40005fcc 40005e04: 01 00 00 00 nop _ISR_Enable( level ); 40005e08: 7f ff ef ff call 40001e04 40005e0c: 01 00 00 00 nop executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 40005e10: 82 10 20 01 mov 1, %g1 ! 1 40005e14: c2 24 a0 34 st %g1, [ %l2 + 0x34 ] id, ((_Options_Is_no_wait( option_set )) ? FALSE : TRUE), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 40005e18: c2 04 e0 3c ld [ %l3 + 0x3c ], %g1 40005e1c: 40 00 00 f4 call 400061ec <_Semaphore_Translate_core_semaphore_return_code> 40005e20: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 _Thread_Executing->Wait.return_code ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40005e24: 81 c7 e0 08 ret 40005e28: 91 e8 00 08 restore %g0, %o0, %o0 register Semaphore_Control *the_semaphore; Objects_Locations location; ISR_Level level; the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { 40005e2c: 80 a0 60 02 cmp %g1, 2 40005e30: 08 bf ff fd bleu 40005e24 40005e34: 90 10 20 04 mov 4, %o0 40005e38: 90 10 20 19 mov 0x19, %o0 <== NOT EXECUTED return _Semaphore_Translate_core_semaphore_return_code( _Thread_Executing->Wait.return_code ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40005e3c: 81 c7 e0 08 ret <== NOT EXECUTED 40005e40: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { _CORE_mutex_Seize( 40005e44: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 40005e48: 80 a0 60 00 cmp %g1, 0 40005e4c: 02 80 00 0e be 40005e84 40005e50: 27 10 00 6b sethi %hi(0x4001ac00), %l3 40005e54: 80 8e 60 01 btst 1, %i1 40005e58: 12 80 00 0c bne 40005e88 40005e5c: c6 04 e0 3c ld [ %l3 + 0x3c ], %g3 40005e60: 03 10 00 6b sethi %hi(0x4001ac00), %g1 40005e64: c4 00 61 40 ld [ %g1 + 0x140 ], %g2 ! 4001ad40 <_System_state_Current> 40005e68: 80 a0 a0 01 cmp %g2, 1 40005e6c: 08 80 00 07 bleu 40005e88 40005e70: 90 10 20 00 clr %o0 40005e74: 92 10 20 00 clr %o1 <== NOT EXECUTED 40005e78: 40 00 06 41 call 4000777c <_Internal_error_Occurred> <== NOT EXECUTED 40005e7c: 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; 40005e80: 27 10 00 6b sethi %hi(0x4001ac00), %l3 <== NOT EXECUTED 40005e84: c6 04 e0 3c ld [ %l3 + 0x3c ], %g3 ! 4001ac3c <_Thread_Executing> CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 40005e88: d0 07 bf f0 ld [ %fp + -16 ], %o0 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40005e8c: c0 20 e0 34 clr [ %g3 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 40005e90: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 40005e94: 80 a0 60 00 cmp %g1, 0 40005e98: 22 80 00 37 be,a 40005f74 40005e9c: c2 04 20 70 ld [ %l0 + 0x70 ], %g1 the_mutex->lock = CORE_MUTEX_LOCKED; 40005ea0: c0 24 20 64 clr [ %l0 + 0x64 ] the_mutex->holder = executing; 40005ea4: c6 24 20 70 st %g3, [ %l0 + 0x70 ] the_mutex->holder_id = executing->Object.id; 40005ea8: c2 00 e0 08 ld [ %g3 + 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; 40005eac: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 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; 40005eb0: 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; 40005eb4: c2 24 20 74 st %g1, [ %l0 + 0x74 ] the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40005eb8: 80 a0 a0 02 cmp %g2, 2 40005ebc: 12 80 00 24 bne 40005f4c 40005ec0: c8 24 20 68 st %g4, [ %l0 + 0x68 ] _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40005ec4: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 40005ec8: 82 00 60 01 inc %g1 40005ecc: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40005ed0: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 40005ed4: 80 a0 a0 03 cmp %g2, 3 40005ed8: 12 80 00 20 bne 40005f58 40005edc: 01 00 00 00 nop */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 40005ee0: c4 04 20 60 ld [ %l0 + 0x60 ], %g2 <== NOT EXECUTED current = executing->current_priority; 40005ee4: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 40005ee8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40005eec: 02 80 00 79 be 400060d0 <== NOT EXECUTED 40005ef0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 40005ef4: 1a 80 00 6d bcc 400060a8 <== NOT EXECUTED 40005ef8: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40005efc: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 <== NOT EXECUTED 40005f00: 82 00 60 01 inc %g1 <== NOT EXECUTED 40005f04: c2 24 63 60 st %g1, [ %l1 + 0x360 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 40005f08: 7f ff ef bf call 40001e04 <== NOT EXECUTED 40005f0c: 01 00 00 00 nop <== NOT EXECUTED _Thread_Change_priority( 40005f10: d2 04 20 60 ld [ %l0 + 0x60 ], %o1 <== NOT EXECUTED 40005f14: d0 04 20 70 ld [ %l0 + 0x70 ], %o0 <== NOT EXECUTED 40005f18: 40 00 0b 9b call 40008d84 <_Thread_Change_priority> <== NOT EXECUTED 40005f1c: 94 10 20 00 clr %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 ) 40005f20: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 <== NOT EXECUTED 40005f24: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40005f28: c2 24 63 60 st %g1, [ %l1 + 0x360 ] <== NOT EXECUTED 40005f2c: c4 04 63 60 ld [ %l1 + 0x360 ], %g2 <== NOT EXECUTED 40005f30: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40005f34: 32 80 00 0c bne,a 40005f64 <== NOT EXECUTED 40005f38: c2 04 e0 3c ld [ %l3 + 0x3c ], %g1 <== NOT EXECUTED _Thread_Dispatch(); 40005f3c: 40 00 0c b6 call 40009214 <_Thread_Dispatch> <== NOT EXECUTED 40005f40: 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( 40005f44: 10 80 00 08 b 40005f64 <== NOT EXECUTED 40005f48: c2 04 e0 3c ld [ %l3 + 0x3c ], %g1 <== NOT EXECUTED 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; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40005f4c: 80 a0 a0 03 cmp %g2, 3 <== NOT EXECUTED 40005f50: 22 bf ff de be,a 40005ec8 <== NOT EXECUTED 40005f54: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( level ); 40005f58: 7f ff ef ab call 40001e04 40005f5c: 01 00 00 00 nop 40005f60: c2 04 e0 3c ld [ %l3 + 0x3c ], %g1 40005f64: 40 00 00 98 call 400061c4 <_Semaphore_Translate_core_mutex_return_code> 40005f68: 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 */ } 40005f6c: 81 c7 e0 08 ret 40005f70: 91 e8 00 08 restore %g0, %o0, %o0 /* * 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 ) ) { 40005f74: 80 a0 40 03 cmp %g1, %g3 40005f78: 12 80 00 0d bne 40005fac 40005f7c: 80 8e 60 01 btst 1, %i1 switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40005f80: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 40005f84: 80 a0 60 00 cmp %g1, 0 40005f88: 12 80 00 40 bne 40006088 40005f8c: 80 a0 60 01 cmp %g1, 1 case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 40005f90: c2 04 20 68 ld [ %l0 + 0x68 ], %g1 40005f94: 82 00 60 01 inc %g1 40005f98: c2 24 20 68 st %g1, [ %l0 + 0x68 ] _ISR_Enable( level ); 40005f9c: 7f ff ef 9a call 40001e04 40005fa0: 01 00 00 00 nop id, ((_Options_Is_no_wait( option_set )) ? FALSE : TRUE), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 40005fa4: 10 bf ff f0 b 40005f64 40005fa8: c2 04 e0 3c ld [ %l3 + 0x3c ], %g1 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { _CORE_mutex_Seize( 40005fac: 02 80 00 28 be 4000604c 40005fb0: c6 04 e0 3c ld [ %l3 + 0x3c ], %g3 40005fb4: 7f ff ef 94 call 40001e04 40005fb8: d0 07 bf f0 ld [ %fp + -16 ], %o0 40005fbc: c4 04 e0 3c ld [ %l3 + 0x3c ], %g2 40005fc0: 82 10 20 01 mov 1, %g1 40005fc4: 10 bf ff e7 b 40005f60 40005fc8: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40005fcc: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 40005fd0: 82 00 60 01 inc %g1 40005fd4: c2 24 63 60 st %g1, [ %l1 + 0x360 ] RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; 40005fd8: 82 10 20 01 mov 1, %g1 40005fdc: 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; 40005fe0: f0 24 a0 20 st %i0, [ %l2 + 0x20 ] return; } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 40005fe4: a0 04 20 14 add %l0, 0x14, %l0 40005fe8: e0 24 a0 44 st %l0, [ %l2 + 0x44 ] executing->Wait.id = id; _ISR_Enable( level ); 40005fec: 7f ff ef 86 call 40001e04 40005ff0: 01 00 00 00 nop _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 40005ff4: 90 10 00 10 mov %l0, %o0 40005ff8: 92 10 00 1a mov %i2, %o1 40005ffc: 15 10 00 27 sethi %hi(0x40009c00), %o2 40006000: 40 00 0d f5 call 400097d4 <_Thread_queue_Enqueue_with_handler> 40006004: 94 12 a1 14 or %o2, 0x114, %o2 ! 40009d14 <_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 ) 40006008: c2 04 63 60 ld [ %l1 + 0x360 ], %g1 4000600c: 82 00 7f ff add %g1, -1, %g1 40006010: c2 24 63 60 st %g1, [ %l1 + 0x360 ] 40006014: c4 04 63 60 ld [ %l1 + 0x360 ], %g2 40006018: 80 a0 a0 00 cmp %g2, 0 4000601c: 32 bf ff 80 bne,a 40005e1c 40006020: c2 04 e0 3c ld [ %l3 + 0x3c ], %g1 <== NOT EXECUTED _Thread_Dispatch(); 40006024: 40 00 0c 7c call 40009214 <_Thread_Dispatch> 40006028: 01 00 00 00 nop id, ((_Options_Is_no_wait( option_set )) ? FALSE : TRUE), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 4000602c: 10 bf ff 7c b 40005e1c 40006030: c2 04 e0 3c ld [ %l3 + 0x3c ], %g1 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( the_semaphore->count != 0 ) { the_semaphore->count -= 1; 40006034: 82 00 7f ff add %g1, -1, %g1 40006038: c2 24 20 5c st %g1, [ %l0 + 0x5c ] _ISR_Enable( level ); 4000603c: 7f ff ef 72 call 40001e04 40006040: 01 00 00 00 nop 40006044: 10 bf ff 76 b 40005e1c 40006048: c2 04 e0 3c ld [ %l3 + 0x3c ], %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000604c: c4 04 63 60 ld [ %l1 + 0x360 ], %g2 40006050: 82 10 20 01 mov 1, %g1 40006054: c2 24 20 44 st %g1, [ %l0 + 0x44 ] case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { _CORE_mutex_Seize( 40006058: f0 20 e0 20 st %i0, [ %g3 + 0x20 ] 4000605c: 84 00 a0 01 inc %g2 40006060: a0 04 20 14 add %l0, 0x14, %l0 40006064: c4 24 63 60 st %g2, [ %l1 + 0x360 ] 40006068: e0 20 e0 44 st %l0, [ %g3 + 0x44 ] 4000606c: 7f ff ef 66 call 40001e04 40006070: d0 07 bf f0 ld [ %fp + -16 ], %o0 40006074: 90 10 00 10 mov %l0, %o0 40006078: 40 00 03 9a call 40006ee0 <_CORE_mutex_Seize_interrupt_blocking> 4000607c: 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( 40006080: 10 bf ff b9 b 40005f64 40006084: c2 04 e0 3c ld [ %l3 + 0x3c ], %g1 * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40006088: 12 bf ff c9 bne 40005fac 4000608c: 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; 40006090: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 40006094: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 40006098: 7f ff ef 5b call 40001e04 <== NOT EXECUTED 4000609c: 01 00 00 00 nop <== NOT EXECUTED 400060a0: 10 bf ff b1 b 40005f64 <== NOT EXECUTED 400060a4: c2 04 e0 3c ld [ %l3 + 0x3c ], %g1 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 400060a8: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 400060ac: c8 24 20 64 st %g4, [ %l0 + 0x64 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 400060b0: c0 24 20 68 clr [ %l0 + 0x68 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 400060b4: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED 400060b8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400060bc: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 400060c0: 7f ff ef 51 call 40001e04 <== NOT EXECUTED 400060c4: 01 00 00 00 nop <== NOT EXECUTED 400060c8: 10 bf ff a7 b 40005f64 <== NOT EXECUTED 400060cc: c2 04 e0 3c ld [ %l3 + 0x3c ], %g1 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 400060d0: 7f ff ef 4d call 40001e04 <== NOT EXECUTED 400060d4: 01 00 00 00 nop <== NOT EXECUTED 400060d8: 10 bf ff a3 b 40005f64 <== NOT EXECUTED 400060dc: c2 04 e0 3c ld [ %l3 + 0x3c ], %g1 <== NOT EXECUTED 400060e0 : #endif rtems_status_code rtems_semaphore_release( rtems_id id ) { 400060e0: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 400060e4: 11 10 00 6a sethi %hi(0x4001a800), %o0 400060e8: 92 10 00 18 mov %i0, %o1 400060ec: 90 12 22 14 or %o0, 0x214, %o0 400060f0: 40 00 07 21 call 40007d74 <_Objects_Get> 400060f4: 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 ) { 400060f8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400060fc: 80 a0 60 00 cmp %g1, 0 40006100: 12 80 00 16 bne 40006158 40006104: 80 a0 60 02 cmp %g1, 2 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 40006108: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 4000610c: 80 88 60 30 btst 0x30, %g1 40006110: 02 80 00 17 be 4000616c 40006114: 92 10 00 18 mov %i0, %o1 mutex_status = _CORE_mutex_Surrender( 40006118: 94 10 20 00 clr %o2 4000611c: 40 00 03 95 call 40006f70 <_CORE_mutex_Surrender> 40006120: 90 02 20 14 add %o0, 0x14, %o0 40006124: 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 ) 40006128: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000612c: c4 00 63 60 ld [ %g1 + 0x360 ], %g2 ! 4001ab60 <_Thread_Dispatch_disable_level> 40006130: 84 00 bf ff add %g2, -1, %g2 40006134: c4 20 63 60 st %g2, [ %g1 + 0x360 ] 40006138: c6 00 63 60 ld [ %g1 + 0x360 ], %g3 4000613c: 80 a0 e0 00 cmp %g3, 0 40006140: 02 80 00 1e be 400061b8 40006144: 01 00 00 00 nop &the_semaphore->Core_control.mutex, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return _Semaphore_Translate_core_mutex_return_code( mutex_status ); 40006148: 40 00 00 1f call 400061c4 <_Semaphore_Translate_core_mutex_return_code> 4000614c: 90 10 00 18 mov %i0, %o0 _Semaphore_Translate_core_semaphore_return_code( semaphore_status ); } } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40006150: 81 c7 e0 08 ret 40006154: 91 e8 00 08 restore %g0, %o0, %o0 Objects_Locations location; CORE_mutex_Status mutex_status; CORE_semaphore_Status semaphore_status; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 40006158: 08 bf ff fe bleu 40006150 4000615c: 90 10 20 04 mov 4, %o0 40006160: 90 10 20 19 mov 0x19, %o0 <== NOT EXECUTED _Semaphore_Translate_core_semaphore_return_code( semaphore_status ); } } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40006164: 81 c7 e0 08 ret <== NOT EXECUTED 40006168: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return _Semaphore_Translate_core_mutex_return_code( mutex_status ); } else { semaphore_status = _CORE_semaphore_Surrender( 4000616c: 94 10 20 00 clr %o2 40006170: 40 00 03 ef call 4000712c <_CORE_semaphore_Surrender> 40006174: 90 02 20 14 add %o0, 0x14, %o0 40006178: b0 10 00 08 mov %o0, %i0 4000617c: 03 10 00 6a sethi %hi(0x4001a800), %g1 40006180: c4 00 63 60 ld [ %g1 + 0x360 ], %g2 ! 4001ab60 <_Thread_Dispatch_disable_level> 40006184: 84 00 bf ff add %g2, -1, %g2 40006188: c4 20 63 60 st %g2, [ %g1 + 0x360 ] 4000618c: c6 00 63 60 ld [ %g1 + 0x360 ], %g3 40006190: 80 a0 e0 00 cmp %g3, 0 40006194: 02 80 00 06 be 400061ac 40006198: 01 00 00 00 nop &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return 4000619c: 40 00 00 14 call 400061ec <_Semaphore_Translate_core_semaphore_return_code> 400061a0: 90 10 00 18 mov %i0, %o0 _Semaphore_Translate_core_semaphore_return_code( semaphore_status ); } } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400061a4: 81 c7 e0 08 ret 400061a8: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 400061ac: 40 00 0c 1a call 40009214 <_Thread_Dispatch> 400061b0: 01 00 00 00 nop 400061b4: 30 bf ff fa b,a 4000619c 400061b8: 40 00 0c 17 call 40009214 <_Thread_Dispatch> 400061bc: 01 00 00 00 nop 400061c0: 30 bf ff e2 b,a 40006148 400184f0 : */ void rtems_shutdown_executive( uint32_t result ) { 400184f0: 9d e3 bf 98 save %sp, -104, %sp if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 400184f4: 33 10 00 6b sethi %hi(0x4001ac00), %i1 400184f8: c2 06 61 40 ld [ %i1 + 0x140 ], %g1 ! 4001ad40 <_System_state_Current> 400184fc: 80 a0 60 04 cmp %g1, 4 40018500: 02 80 00 0c be 40018530 40018504: 11 10 00 66 sethi %hi(0x40019800), %o0 #if defined(__USE_INIT_FINI__) extern void _fini( void ); atexit( _fini ); 40018508: 7f ff da 31 call 4000edcc 4001850c: 90 12 20 dc or %o0, 0xdc, %o0 ! 400198dc <_fini> * routine which initialized the system. */ RTEMS_INLINE_ROUTINE void _Thread_Stop_multitasking( void ) { _Context_Switch( &_Thread_Executing->Registers, &_Thread_BSP_context ); 40018510: 03 10 00 6b sethi %hi(0x4001ac00), %g1 40018514: f0 00 60 3c ld [ %g1 + 0x3c ], %i0 ! 4001ac3c <_Thread_Executing> 40018518: 84 10 20 04 mov 4, %g2 4001851c: b0 06 20 e0 add %i0, 0xe0, %i0 40018520: c4 26 61 40 st %g2, [ %i1 + 0x140 ] 40018524: 33 10 00 6a sethi %hi(0x4001a800), %i1 40018528: 7f ff c9 62 call 4000aab0 <_CPU_Context_switch> 4001852c: 93 ee 62 d8 restore %i1, 0x2d8, %o1 40018530: 81 c7 e0 08 ret <== NOT EXECUTED 40018534: 81 e8 00 00 restore <== NOT EXECUTED 40011c2c : rtems_status_code rtems_signal_send( Objects_Id id, rtems_signal_set signal_set ) { 40011c2c: 9d e3 bf 90 save %sp, -112, %sp 40011c30: 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 ) 40011c34: 80 a6 60 00 cmp %i1, 0 40011c38: 02 80 00 1b be 40011ca4 40011c3c: 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 ) ) { 40011c40: 80 a2 60 00 cmp %o1, 0 40011c44: 12 80 00 1a bne 40011cac 40011c48: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40011c4c: 23 10 00 d3 sethi %hi(0x40034c00), %l1 40011c50: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 ! 40034c80 <_Thread_Dispatch_disable_level> 40011c54: 82 00 60 01 inc %g1 40011c58: c2 24 60 80 st %g1, [ %l1 + 0x80 ] 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; 40011c5c: 03 10 00 d3 sethi %hi(0x40034c00), %g1 40011c60: e0 00 61 5c ld [ %g1 + 0x15c ], %l0 ! 40034d5c <_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; 40011c64: c0 27 bf f4 clr [ %fp + -12 ] case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 40011c68: f0 04 21 6c ld [ %l0 + 0x16c ], %i0 asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { 40011c6c: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 40011c70: 80 a0 60 00 cmp %g1, 0 40011c74: 32 80 00 2c bne,a 40011d24 40011c78: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40011c7c: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 40011c80: b0 10 20 0b mov 0xb, %i0 40011c84: 82 00 7f ff add %g1, -1, %g1 40011c88: c2 24 60 80 st %g1, [ %l1 + 0x80 ] 40011c8c: c4 04 60 80 ld [ %l1 + 0x80 ], %g2 40011c90: 80 a0 a0 00 cmp %g2, 0 40011c94: 12 80 00 0b bne 40011cc0 40011c98: 01 00 00 00 nop _Thread_Dispatch(); 40011c9c: 40 00 13 70 call 40016a5c <_Thread_Dispatch> 40011ca0: 01 00 00 00 nop 40011ca4: 81 c7 e0 08 ret 40011ca8: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 40011cac: 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 ) { 40011cb0: 80 a0 a0 04 cmp %g2, 4 40011cb4: 08 80 00 05 bleu 40011cc8 40011cb8: 83 32 60 1b srl %o1, 0x1b, %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40011cbc: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40011cc0: 81 c7 e0 08 ret 40011cc4: 81 e8 00 00 restore *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40011cc8: 80 a0 60 01 cmp %g1, 1 40011ccc: 12 bf ff f6 bne 40011ca4 40011cd0: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40011cd4: 83 28 a0 02 sll %g2, 2, %g1 40011cd8: 05 10 00 d2 sethi %hi(0x40034800), %g2 40011cdc: 84 10 a3 e0 or %g2, 0x3e0, %g2 ! 40034be0 <_Objects_Information_table> 40011ce0: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40011ce4: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 40011ce8: 80 a2 20 00 cmp %o0, 0 40011cec: 02 bf ff f5 be 40011cc0 40011cf0: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40011cf4: 40 00 0e 32 call 400155bc <_Objects_Get> 40011cf8: 94 07 bf f4 add %fp, -12, %o2 if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); switch ( location ) { 40011cfc: c2 07 bf f4 ld [ %fp + -12 ], %g1 40011d00: a0 10 00 08 mov %o0, %l0 40011d04: 80 a0 60 00 cmp %g1, 0 40011d08: 02 bf ff d8 be 40011c68 40011d0c: 23 10 00 d3 sethi %hi(0x40034c00), %l1 40011d10: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40011d14: 18 bf ff e4 bgu 40011ca4 <== NOT EXECUTED 40011d18: b0 10 20 19 mov 0x19, %i0 <== 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 ) _Thread_Dispatch(); 40011d1c: 81 c7 e0 08 ret <== NOT EXECUTED 40011d20: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 40011d24: 80 a0 60 00 cmp %g1, 0 40011d28: 02 80 00 19 be 40011d8c 40011d2c: 01 00 00 00 nop rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 40011d30: 7f ff e3 79 call 4000ab14 40011d34: 01 00 00 00 nop *signal_set |= signals; 40011d38: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 40011d3c: 82 10 40 19 or %g1, %i1, %g1 40011d40: c2 26 20 54 st %g1, [ %i0 + 0x54 ] _ISR_Enable( _level ); 40011d44: 7f ff e3 78 call 4000ab24 40011d48: 01 00 00 00 nop _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = TRUE; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 40011d4c: 03 10 00 d3 sethi %hi(0x40034c00), %g1 40011d50: c4 00 61 44 ld [ %g1 + 0x144 ], %g2 ! 40034d44 <_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; 40011d54: 86 10 20 01 mov 1, %g3 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 40011d58: 80 a0 a0 00 cmp %g2, 0 40011d5c: 02 80 00 09 be 40011d80 40011d60: c6 24 20 78 st %g3, [ %l0 + 0x78 ] 40011d64: 03 10 00 d3 sethi %hi(0x40034c00), %g1 <== NOT EXECUTED 40011d68: c4 00 61 5c ld [ %g1 + 0x15c ], %g2 ! 40034d5c <_Thread_Executing> <== NOT EXECUTED 40011d6c: 80 a4 00 02 cmp %l0, %g2 <== NOT EXECUTED 40011d70: 12 80 00 04 bne 40011d80 <== NOT EXECUTED 40011d74: 01 00 00 00 nop <== NOT EXECUTED _ISR_Signals_to_thread_executing = TRUE; 40011d78: 03 10 00 d3 sethi %hi(0x40034c00), %g1 <== NOT EXECUTED 40011d7c: c6 20 62 08 st %g3, [ %g1 + 0x208 ] ! 40034e08 <_ISR_Signals_to_thread_executing> <== 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 ) 40011d80: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 40011d84: 10 bf ff c0 b 40011c84 40011d88: b0 10 20 00 clr %i0 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 40011d8c: 7f ff e3 62 call 4000ab14 40011d90: 01 00 00 00 nop *signal_set |= signals; 40011d94: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 40011d98: 82 10 40 19 or %g1, %i1, %g1 40011d9c: c2 26 20 58 st %g1, [ %i0 + 0x58 ] _ISR_Enable( _level ); 40011da0: 7f ff e3 61 call 4000ab24 40011da4: 01 00 00 00 nop 40011da8: 30 bf ff f6 b,a 40011d80 40002968 : /* * Check if blown */ boolean rtems_stack_checker_is_blown( void ) { 40002968: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 4000296c: 21 10 00 7c sethi %hi(0x4001f000), %l0 <== NOT EXECUTED 40002970: c2 04 23 7c ld [ %l0 + 0x37c ], %g1 ! 4001f37c <_Thread_Executing> <== NOT EXECUTED ) { void *sp = __builtin_frame_address(0); #if defined(__GNUC__) if ( sp < the_stack->area ) { 40002974: d0 00 60 d4 ld [ %g1 + 0xd4 ], %o0 <== NOT EXECUTED 40002978: 80 a7 80 08 cmp %fp, %o0 <== NOT EXECUTED 4000297c: 0a 80 00 07 bcs 40002998 <== NOT EXECUTED 40002980: b0 10 20 00 clr %i0 <== NOT EXECUTED 40002984: c2 00 60 d0 ld [ %g1 + 0xd0 ], %g1 <== NOT EXECUTED 40002988: 82 02 00 01 add %o0, %g1, %g1 <== NOT EXECUTED 4000298c: 80 a0 40 1e cmp %g1, %fp <== NOT EXECUTED 40002990: 84 60 3f ff subx %g0, -1, %g2 <== NOT EXECUTED 40002994: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 40002998: 03 10 00 7b sethi %hi(0x4001ec00), %g1 <== NOT EXECUTED 4000299c: c4 00 62 f4 ld [ %g1 + 0x2f4 ], %g2 ! 4001eef4 <== NOT EXECUTED 400029a0: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 400029a4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400029a8: 12 80 00 0d bne 400029dc <== NOT EXECUTED 400029ac: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED } /* * The Stack Pointer and the Pattern Area are OK so return FALSE. */ if ( sp_ok && pattern_ok ) 400029b0: 80 8e 20 ff btst 0xff, %i0 <== NOT EXECUTED 400029b4: 22 80 00 06 be,a 400029cc <== NOT EXECUTED 400029b8: d0 04 23 7c ld [ %l0 + 0x37c ], %o0 <== NOT EXECUTED 400029bc: 80 88 60 ff btst 0xff, %g1 <== NOT EXECUTED 400029c0: 12 80 00 05 bne 400029d4 <== NOT EXECUTED 400029c4: 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 ); 400029c8: d0 04 23 7c ld [ %l0 + 0x37c ], %o0 <== NOT EXECUTED 400029cc: 7f ff ff cd call 40002900 <== NOT EXECUTED 400029d0: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return TRUE; } 400029d4: 81 c7 e0 08 ret <== NOT EXECUTED 400029d8: 81 e8 00 00 restore <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { pattern_ok = (!memcmp( 400029dc: 90 02 20 08 add %o0, 8, %o0 <== NOT EXECUTED 400029e0: 13 10 00 7c sethi %hi(0x4001f000), %o1 <== NOT EXECUTED 400029e4: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 400029e8: 40 00 38 92 call 40010c30 <== NOT EXECUTED 400029ec: 92 12 60 b0 or %o1, 0xb0, %o1 <== NOT EXECUTED 400029f0: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 400029f4: 92 60 3f ff subx %g0, -1, %o1 <== NOT EXECUTED 400029f8: 10 bf ff ee b 400029b0 <== NOT EXECUTED 400029fc: 82 10 00 09 mov %o1, %g1 <== NOT EXECUTED 400028e4 : } void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 400028e4: 13 10 00 10 sethi %hi(0x40004000), %o1 <== NOT EXECUTED 400028e8: 90 10 20 00 clr %o0 <== NOT EXECUTED 400028ec: 92 12 62 5c or %o1, 0x25c, %o1 <== NOT EXECUTED 400028f0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400028f4: 7f ff ff e2 call 4000287c <== NOT EXECUTED 400028f8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400028fc: 01 00 00 00 nop 4000287c : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 4000287c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (Stack_check_Initialized == 0) 40002880: 03 10 00 7b sethi %hi(0x4001ec00), %g1 <== NOT EXECUTED 40002884: c4 00 62 f4 ld [ %g1 + 0x2f4 ], %g2 ! 4001eef4 <== NOT EXECUTED 40002888: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000288c: 02 80 00 14 be 400028dc <== NOT EXECUTED 40002890: 23 10 00 7b sethi %hi(0x4001ec00), %l1 <== NOT EXECUTED return; print_context = context; print_handler = print; 40002894: 21 10 00 7b sethi %hi(0x4001ec00), %l0 <== NOT EXECUTED ) { if (Stack_check_Initialized == 0) return; print_context = context; 40002898: f0 24 62 f8 st %i0, [ %l1 + 0x2f8 ] <== NOT EXECUTED print_handler = print; 4000289c: f2 24 22 fc st %i1, [ %l0 + 0x2fc ] <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 400028a0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400028a4: 13 10 00 71 sethi %hi(0x4001c400), %o1 <== NOT EXECUTED 400028a8: 9f c6 40 00 call %i1 <== NOT EXECUTED 400028ac: 92 12 60 08 or %o1, 8, %o1 ! 4001c408 <== NOT EXECUTED (*print)( context, 400028b0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400028b4: 13 10 00 71 sethi %hi(0x4001c400), %o1 <== NOT EXECUTED 400028b8: 9f c6 40 00 call %i1 <== NOT EXECUTED 400028bc: 92 12 60 20 or %o1, 0x20, %o1 ! 4001c420 <== 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 ); 400028c0: 11 10 00 09 sethi %hi(0x40002400), %o0 <== NOT EXECUTED 400028c4: 40 00 18 bd call 40008bb8 <== NOT EXECUTED 400028c8: 90 12 23 6c or %o0, 0x36c, %o0 ! 4000276c <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 400028cc: 7f ff ff a8 call 4000276c <== NOT EXECUTED 400028d0: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED print_context = NULL; 400028d4: c0 24 62 f8 clr [ %l1 + 0x2f8 ] <== NOT EXECUTED print_handler = NULL; 400028d8: c0 24 22 fc clr [ %l0 + 0x2fc ] <== NOT EXECUTED 400028dc: 81 c7 e0 08 ret <== NOT EXECUTED 400028e0: 81 e8 00 00 restore <== NOT EXECUTED 40002ad0 : */ void rtems_stack_checker_switch_extension( Thread_Control *running, Thread_Control *heir ) { 40002ad0: 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; 40002ad4: c4 06 20 d4 ld [ %i0 + 0xd4 ], %g2 ) { void *sp = __builtin_frame_address(0); #if defined(__GNUC__) if ( sp < the_stack->area ) { 40002ad8: 80 a7 80 02 cmp %fp, %g2 40002adc: 0a 80 00 07 bcs 40002af8 40002ae0: 90 00 a0 08 add %g2, 8, %o0 return FALSE; } if ( sp > (the_stack->area + the_stack->size) ) { 40002ae4: c2 06 20 d0 ld [ %i0 + 0xd0 ], %g1 40002ae8: 82 00 80 01 add %g2, %g1, %g1 40002aec: 80 a7 80 01 cmp %fp, %g1 40002af0: 28 80 00 0a bleu,a 40002b18 40002af4: 13 10 00 7c sethi %hi(0x4001f000), %o1 /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 40002af8: 13 10 00 7c sethi %hi(0x4001f000), %o1 <== NOT EXECUTED 40002afc: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 40002b00: 40 00 38 4c call 40010c30 <== NOT EXECUTED 40002b04: 92 12 60 b0 or %o1, 0xb0, %o1 <== NOT EXECUTED 40002b08: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 40002b0c: b2 60 3f ff subx %g0, -1, %i1 <== NOT EXECUTED (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 40002b10: 7f ff ff 7c call 40002900 <== NOT EXECUTED 40002b14: 81 e8 00 00 restore <== NOT EXECUTED /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 40002b18: 94 10 20 10 mov 0x10, %o2 40002b1c: 40 00 38 45 call 40010c30 40002b20: 92 12 60 b0 or %o1, 0xb0, %o1 40002b24: 80 a2 20 00 cmp %o0, 0 40002b28: 02 80 00 04 be 40002b38 40002b2c: 01 00 00 00 nop (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 40002b30: 7f ff ff 74 call 40002900 <== NOT EXECUTED 40002b34: 93 e8 20 00 restore %g0, 0, %o1 <== NOT EXECUTED 40002b38: 81 c7 e0 08 ret 40002b3c: 81 e8 00 00 restore 400089dc : const char * rtems_status_text( rtems_status_code status ) { 400089dc: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED return rtems_assoc_name_by_local(rtems_status_assoc, status); 400089e0: 11 10 00 a9 sethi %hi(0x4002a400), %o0 <== NOT EXECUTED 400089e4: 90 12 22 d4 or %o0, 0x2d4, %o0 ! 4002a6d4 <== NOT EXECUTED 400089e8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400089ec: 40 00 31 26 call 40014e84 <== NOT EXECUTED 400089f0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400089f4: 01 00 00 00 nop 40006380 : */ rtems_status_code rtems_task_delete( Objects_Id id ) { 40006380: 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 ) ) { 40006384: 92 96 20 00 orcc %i0, 0, %o1 40006388: 12 80 00 20 bne 40006408 4000638c: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006390: 21 10 00 6a sethi %hi(0x4001a800), %l0 40006394: c2 04 23 60 ld [ %l0 + 0x360 ], %g1 ! 4001ab60 <_Thread_Dispatch_disable_level> 40006398: 82 00 60 01 inc %g1 4000639c: c2 24 23 60 st %g1, [ %l0 + 0x360 ] 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; 400063a0: 03 10 00 6b sethi %hi(0x4001ac00), %g1 400063a4: f0 00 60 3c ld [ %g1 + 0x3c ], %i0 ! 4001ac3c <_Thread_Executing> 400063a8: 07 10 00 6a sethi %hi(0x4001a800), %g3 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; 400063ac: c0 27 bf f4 clr [ %fp + -12 ] 400063b0: a2 10 e2 c0 or %g3, 0x2c0, %l1 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: the_information = _Objects_Get_information( the_thread->Object.id ); 400063b4: c2 06 20 08 ld [ %i0 + 8 ], %g1 400063b8: 85 30 60 16 srl %g1, 0x16, %g2 400063bc: 84 08 a0 1c and %g2, 0x1c, %g2 400063c0: c6 04 40 02 ld [ %l1 + %g2 ], %g3 400063c4: 83 30 60 1b srl %g1, 0x1b, %g1 400063c8: 83 28 60 02 sll %g1, 2, %g1 400063cc: d0 00 c0 01 ld [ %g3 + %g1 ], %o0 if ( !the_information ) { 400063d0: 80 a2 20 00 cmp %o0, 0 400063d4: 12 80 00 13 bne 40006420 400063d8: 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 ) 400063dc: c2 04 23 60 ld [ %l0 + 0x360 ], %g1 <== NOT EXECUTED 400063e0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400063e4: c2 24 23 60 st %g1, [ %l0 + 0x360 ] <== NOT EXECUTED 400063e8: c4 04 23 60 ld [ %l0 + 0x360 ], %g2 <== NOT EXECUTED 400063ec: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400063f0: 12 80 00 04 bne 40006400 <== NOT EXECUTED 400063f4: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED _Thread_Dispatch(); 400063f8: 40 00 0b 87 call 40009214 <_Thread_Dispatch> <== NOT EXECUTED 400063fc: 01 00 00 00 nop <== NOT EXECUTED 40006400: 81 c7 e0 08 ret 40006404: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 40006408: 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 ) { 4000640c: 80 a0 a0 04 cmp %g2, 4 40006410: 08 80 00 1b bleu 4000647c 40006414: 83 32 60 1b srl %o1, 0x1b, %g1 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40006418: 81 c7 e0 08 ret <== NOT EXECUTED 4000641c: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_INVALID_ID; /* This should never happen if _Thread_Get() works right */ } _Thread_Close( the_information, the_thread ); 40006420: 40 00 0a ff call 4000901c <_Thread_Close> 40006424: 92 10 00 18 mov %i0, %o1 40006428: c4 06 20 08 ld [ %i0 + 8 ], %g2 4000642c: 92 10 00 18 mov %i0, %o1 if ( !_Objects_Is_class_valid( the_class ) ) return NULL; the_api = _Objects_Get_API( id ); return _Objects_Information_table[ the_api ][ the_class ]; 40006430: 83 30 a0 16 srl %g2, 0x16, %g1 40006434: 82 08 60 1c and %g1, 0x1c, %g1 40006438: c6 04 40 01 ld [ %l1 + %g1 ], %g3 4000643c: 85 30 a0 1b srl %g2, 0x1b, %g2 40006440: 85 28 a0 02 sll %g2, 2, %g2 40006444: 40 00 06 09 call 40007c68 <_Objects_Free> 40006448: d0 00 c0 02 ld [ %g3 + %g2 ], %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000644c: c2 04 23 60 ld [ %l0 + 0x360 ], %g1 40006450: b0 10 20 00 clr %i0 40006454: 82 00 7f ff add %g1, -1, %g1 40006458: c2 24 23 60 st %g1, [ %l0 + 0x360 ] 4000645c: c4 04 23 60 ld [ %l0 + 0x360 ], %g2 40006460: 80 a0 a0 00 cmp %g2, 0 40006464: 12 80 00 04 bne 40006474 40006468: 01 00 00 00 nop _Thread_Dispatch(); 4000646c: 40 00 0b 6a call 40009214 <_Thread_Dispatch> 40006470: 01 00 00 00 nop 40006474: 81 c7 e0 08 ret 40006478: 81 e8 00 00 restore *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 4000647c: 80 a0 60 01 cmp %g1, 1 40006480: 12 bf ff e0 bne 40006400 40006484: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40006488: 85 28 a0 02 sll %g2, 2, %g2 4000648c: 07 10 00 6a sethi %hi(0x4001a800), %g3 40006490: a2 10 e2 c0 or %g3, 0x2c0, %l1 ! 4001aac0 <_Objects_Information_table> 40006494: c2 04 40 02 ld [ %l1 + %g2 ], %g1 40006498: d0 00 60 04 ld [ %g1 + 4 ], %o0 if ( !information ) { 4000649c: 80 a2 20 00 cmp %o0, 0 400064a0: 02 bf ff f5 be 40006474 400064a4: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 400064a8: 40 00 06 33 call 40007d74 <_Objects_Get> 400064ac: 94 07 bf f4 add %fp, -12, %o2 register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; the_thread = _Thread_Get( id, &location ); switch ( location ) { 400064b0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400064b4: b0 10 00 08 mov %o0, %i0 400064b8: 80 a0 60 00 cmp %g1, 0 400064bc: 02 bf ff be be 400063b4 400064c0: 21 10 00 6a sethi %hi(0x4001a800), %l0 400064c4: 80 a0 60 02 cmp %g1, 2 400064c8: 18 bf ff ce bgu 40006400 400064cc: b0 10 20 19 mov 0x19, %i0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 400064d0: 81 c7 e0 08 ret 400064d4: 91 e8 20 04 restore %g0, 4, %o0 40007c8c : rtems_status_code rtems_task_get_note( Objects_Id id, uint32_t notepad, uint32_t *note ) { 40007c8c: 9d e3 bf 90 save %sp, -112, %sp 40007c90: 92 10 00 18 mov %i0, %o1 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !note ) 40007c94: 80 a6 a0 00 cmp %i2, 0 40007c98: 02 80 00 3b be 40007d84 40007c9c: 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 ) 40007ca0: 80 a6 60 0f cmp %i1, 0xf 40007ca4: 18 80 00 38 bgu 40007d84 40007ca8: 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 ) || 40007cac: 80 a2 60 00 cmp %o1, 0 40007cb0: 12 80 00 09 bne 40007cd4 40007cb4: 07 10 00 81 sethi %hi(0x40020400), %g3 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 40007cb8: c2 00 e1 9c ld [ %g3 + 0x19c ], %g1 ! 4002059c <_Thread_Executing> 40007cbc: 87 2e 60 02 sll %i1, 2, %g3 40007cc0: c4 00 61 6c ld [ %g1 + 0x16c ], %g2 40007cc4: c2 00 80 03 ld [ %g2 + %g3 ], %g1 40007cc8: c2 26 80 00 st %g1, [ %i2 ] 40007ccc: 81 c7 e0 08 ret 40007cd0: 91 e8 20 00 restore %g0, 0, %o0 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 40007cd4: c2 00 e1 9c ld [ %g3 + 0x19c ], %g1 40007cd8: c4 00 60 08 ld [ %g1 + 8 ], %g2 40007cdc: 80 a2 40 02 cmp %o1, %g2 40007ce0: 22 bf ff f8 be,a 40007cc0 40007ce4: 87 2e 60 02 sll %i1, 2, %g3 <== 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); 40007ce8: 83 32 60 18 srl %o1, 0x18, %g1 40007cec: 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 ) { 40007cf0: 80 a0 a0 04 cmp %g2, 4 40007cf4: 08 80 00 04 bleu 40007d04 40007cf8: 83 32 60 1b srl %o1, 0x1b, %g1 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40007cfc: 81 c7 e0 08 ret <== NOT EXECUTED 40007d00: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40007d04: 80 a0 60 01 cmp %g1, 1 40007d08: 12 80 00 1f bne 40007d84 40007d0c: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40007d10: 83 28 a0 02 sll %g2, 2, %g1 40007d14: 05 10 00 81 sethi %hi(0x40020400), %g2 40007d18: 84 10 a0 20 or %g2, 0x20, %g2 ! 40020420 <_Objects_Information_table> 40007d1c: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40007d20: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 40007d24: 80 a2 20 00 cmp %o0, 0 40007d28: 02 80 00 17 be 40007d84 40007d2c: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40007d30: 40 00 07 79 call 40009b14 <_Objects_Get> 40007d34: 94 07 bf f4 add %fp, -12, %o2 *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 40007d38: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007d3c: 80 a0 60 00 cmp %g1, 0 40007d40: 12 80 00 13 bne 40007d8c 40007d44: 80 a0 60 02 cmp %g1, 2 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 40007d48: c6 02 21 6c ld [ %o0 + 0x16c ], %g3 40007d4c: 83 2e 60 02 sll %i1, 2, %g1 40007d50: c4 00 c0 01 ld [ %g3 + %g1 ], %g2 40007d54: c4 26 80 00 st %g2, [ %i2 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007d58: 07 10 00 81 sethi %hi(0x40020400), %g3 40007d5c: c2 00 e0 c0 ld [ %g3 + 0xc0 ], %g1 ! 400204c0 <_Thread_Dispatch_disable_level> 40007d60: b0 10 20 00 clr %i0 40007d64: 82 00 7f ff add %g1, -1, %g1 40007d68: c2 20 e0 c0 st %g1, [ %g3 + 0xc0 ] 40007d6c: c4 00 e0 c0 ld [ %g3 + 0xc0 ], %g2 40007d70: 80 a0 a0 00 cmp %g2, 0 40007d74: 12 80 00 04 bne 40007d84 40007d78: 01 00 00 00 nop _Thread_Dispatch(); 40007d7c: 40 00 0c 52 call 4000aec4 <_Thread_Dispatch> 40007d80: 01 00 00 00 nop 40007d84: 81 c7 e0 08 ret 40007d88: 81 e8 00 00 restore *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 40007d8c: 18 bf ff fe bgu 40007d84 <== NOT EXECUTED 40007d90: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED 40007d94: 81 c7 e0 08 ret <== NOT EXECUTED 40007d98: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED 40006b68 : */ rtems_status_code rtems_task_is_suspended( Objects_Id id ) { 40006b68: 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 ) ) { 40006b6c: 92 96 20 00 orcc %i0, 0, %o1 40006b70: 12 80 00 19 bne 40006bd4 40006b74: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006b78: 05 10 00 78 sethi %hi(0x4001e000), %g2 <== NOT EXECUTED 40006b7c: c2 00 a3 50 ld [ %g2 + 0x350 ], %g1 ! 4001e350 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40006b80: 82 00 60 01 inc %g1 <== NOT EXECUTED 40006b84: c2 20 a3 50 st %g1, [ %g2 + 0x350 ] <== 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; 40006b88: 03 10 00 79 sethi %hi(0x4001e400), %g1 <== NOT EXECUTED 40006b8c: d0 00 60 2c ld [ %g1 + 0x2c ], %o0 ! 4001e42c <_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; 40006b90: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 40006b94: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40006b98: 80 88 60 02 btst 2, %g1 40006b9c: 02 80 00 15 be 40006bf0 40006ba0: 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 ) 40006ba4: c2 00 a3 50 ld [ %g2 + 0x350 ], %g1 40006ba8: b0 10 20 0f mov 0xf, %i0 40006bac: 82 00 7f ff add %g1, -1, %g1 40006bb0: c2 20 a3 50 st %g1, [ %g2 + 0x350 ] 40006bb4: c4 00 a3 50 ld [ %g2 + 0x350 ], %g2 40006bb8: 80 a0 a0 00 cmp %g2, 0 40006bbc: 12 80 00 0b bne 40006be8 40006bc0: 01 00 00 00 nop _Thread_Dispatch(); 40006bc4: 40 00 0b 74 call 40009994 <_Thread_Dispatch> 40006bc8: 01 00 00 00 nop 40006bcc: 81 c7 e0 08 ret 40006bd0: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 40006bd4: 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 ) { 40006bd8: 80 a0 a0 04 cmp %g2, 4 40006bdc: 08 80 00 08 bleu 40006bfc 40006be0: 83 32 60 1b srl %o1, 0x1b, %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40006be4: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_ALREADY_SUSPENDED; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40006be8: 81 c7 e0 08 ret <== NOT EXECUTED 40006bec: 81 e8 00 00 restore <== 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 ) 40006bf0: c2 00 a3 50 ld [ %g2 + 0x350 ], %g1 40006bf4: 10 bf ff ee b 40006bac 40006bf8: b0 10 20 00 clr %i0 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40006bfc: 80 a0 60 01 cmp %g1, 1 40006c00: 12 bf ff f3 bne 40006bcc 40006c04: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40006c08: 83 28 a0 02 sll %g2, 2, %g1 40006c0c: 05 10 00 78 sethi %hi(0x4001e000), %g2 40006c10: 84 10 a2 b0 or %g2, 0x2b0, %g2 ! 4001e2b0 <_Objects_Information_table> 40006c14: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40006c18: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 40006c1c: 80 a2 20 00 cmp %o0, 0 40006c20: 02 bf ff f2 be 40006be8 40006c24: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40006c28: 40 00 06 6f call 400085e4 <_Objects_Get> 40006c2c: 94 07 bf f4 add %fp, -12, %o2 { register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 40006c30: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006c34: 80 a0 60 00 cmp %g1, 0 40006c38: 02 bf ff d7 be 40006b94 40006c3c: 05 10 00 78 sethi %hi(0x4001e000), %g2 40006c40: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40006c44: 18 bf ff e2 bgu 40006bcc <== NOT EXECUTED 40006c48: b0 10 20 19 mov 0x19, %i0 <== 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 ) _Thread_Dispatch(); 40006c4c: 81 c7 e0 08 ret <== NOT EXECUTED 40006c50: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED 40007144 : rtems_status_code rtems_task_restart( Objects_Id id, uint32_t argument ) { 40007144: 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 ) ) { 40007148: 92 96 20 00 orcc %i0, 0, %o1 4000714c: 12 80 00 1b bne 400071b8 40007150: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007154: 21 10 00 7a sethi %hi(0x4001e800), %l0 40007158: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 ! 4001e810 <_Thread_Dispatch_disable_level> 4000715c: 82 00 60 01 inc %g1 40007160: c2 24 20 10 st %g1, [ %l0 + 0x10 ] 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; 40007164: 03 10 00 7a sethi %hi(0x4001e800), %g1 40007168: d0 00 60 ec ld [ %g1 + 0xec ], %o0 ! 4001e8ec <_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; 4000716c: c0 27 bf f4 clr [ %fp + -12 ] case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { 40007170: 94 10 00 19 mov %i1, %o2 40007174: 40 00 0e 4b call 4000aaa0 <_Thread_Restart> 40007178: 92 10 20 00 clr %o1 4000717c: 80 a2 20 00 cmp %o0, 0 40007180: 12 80 00 15 bne 400071d4 40007184: 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 ) 40007188: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 4000718c: b0 10 20 0e mov 0xe, %i0 40007190: 82 00 7f ff add %g1, -1, %g1 40007194: c2 24 20 10 st %g1, [ %l0 + 0x10 ] 40007198: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 4000719c: 80 a0 a0 00 cmp %g2, 0 400071a0: 12 80 00 0b bne 400071cc 400071a4: 01 00 00 00 nop _Thread_Dispatch(); 400071a8: 40 00 0b 48 call 40009ec8 <_Thread_Dispatch> 400071ac: 01 00 00 00 nop 400071b0: 81 c7 e0 08 ret 400071b4: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 400071b8: 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 ) { 400071bc: 80 a0 a0 04 cmp %g2, 4 400071c0: 08 80 00 08 bleu 400071e0 400071c4: 83 32 60 1b srl %o1, 0x1b, %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 400071c8: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400071cc: 81 c7 e0 08 ret <== NOT EXECUTED 400071d0: 81 e8 00 00 restore <== 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 ) 400071d4: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 400071d8: 10 bf ff ee b 40007190 400071dc: b0 10 20 00 clr %i0 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 400071e0: 80 a0 60 01 cmp %g1, 1 400071e4: 12 bf ff f3 bne 400071b0 400071e8: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 400071ec: 83 28 a0 02 sll %g2, 2, %g1 400071f0: 05 10 00 79 sethi %hi(0x4001e400), %g2 400071f4: 84 10 a3 70 or %g2, 0x370, %g2 ! 4001e770 <_Objects_Information_table> 400071f8: c6 00 80 01 ld [ %g2 + %g1 ], %g3 400071fc: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 40007200: 80 a2 20 00 cmp %o0, 0 40007204: 02 bf ff f2 be 400071cc 40007208: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 4000720c: 40 00 06 43 call 40008b18 <_Objects_Get> 40007210: 94 07 bf f4 add %fp, -12, %o2 { register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 40007214: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007218: 80 a0 60 00 cmp %g1, 0 4000721c: 02 bf ff d5 be 40007170 40007220: 21 10 00 7a sethi %hi(0x4001e800), %l0 40007224: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40007228: 18 bf ff e2 bgu 400071b0 <== NOT EXECUTED 4000722c: b0 10 20 19 mov 0x19, %i0 <== 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 ) _Thread_Dispatch(); 40007230: 81 c7 e0 08 ret <== NOT EXECUTED 40007234: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED 40007c00 : */ rtems_status_code rtems_task_resume( Objects_Id id ) { 40007c00: 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 ) ) { 40007c04: 92 96 20 00 orcc %i0, 0, %o1 40007c08: 12 80 00 19 bne 40007c6c 40007c0c: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007c10: 21 10 00 9e sethi %hi(0x40027800), %l0 40007c14: c2 04 20 90 ld [ %l0 + 0x90 ], %g1 ! 40027890 <_Thread_Dispatch_disable_level> 40007c18: 82 00 60 01 inc %g1 40007c1c: c2 24 20 90 st %g1, [ %l0 + 0x90 ] 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; 40007c20: 03 10 00 9e sethi %hi(0x40027800), %g1 40007c24: d0 00 61 6c ld [ %g1 + 0x16c ], %o0 ! 4002796c <_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; 40007c28: c0 27 bf f4 clr [ %fp + -12 ] case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { 40007c2c: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40007c30: 80 88 60 02 btst 2, %g1 40007c34: 12 80 00 2b bne 40007ce0 40007c38: 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 ) 40007c3c: c2 04 20 90 ld [ %l0 + 0x90 ], %g1 40007c40: b0 10 20 0e mov 0xe, %i0 40007c44: 82 00 7f ff add %g1, -1, %g1 40007c48: c2 24 20 90 st %g1, [ %l0 + 0x90 ] 40007c4c: c4 04 20 90 ld [ %l0 + 0x90 ], %g2 40007c50: 80 a0 a0 00 cmp %g2, 0 40007c54: 12 80 00 0b bne 40007c80 40007c58: 01 00 00 00 nop _Thread_Dispatch(); 40007c5c: 40 00 0c 2d call 4000ad10 <_Thread_Dispatch> 40007c60: 01 00 00 00 nop 40007c64: 81 c7 e0 08 ret 40007c68: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 40007c6c: 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 ) { 40007c70: 80 a0 a0 04 cmp %g2, 4 40007c74: 08 80 00 05 bleu 40007c88 40007c78: 83 32 60 1b srl %o1, 0x1b, %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40007c7c: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40007c80: 81 c7 e0 08 ret 40007c84: 81 e8 00 00 restore *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40007c88: 80 a0 60 01 cmp %g1, 1 40007c8c: 12 bf ff f6 bne 40007c64 40007c90: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40007c94: 83 28 a0 02 sll %g2, 2, %g1 40007c98: 05 10 00 9d sethi %hi(0x40027400), %g2 40007c9c: 84 10 a3 f0 or %g2, 0x3f0, %g2 ! 400277f0 <_Objects_Information_table> 40007ca0: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40007ca4: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 40007ca8: 80 a2 20 00 cmp %o0, 0 40007cac: 02 bf ff f5 be 40007c80 40007cb0: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40007cb4: 40 00 07 2b call 40009960 <_Objects_Get> 40007cb8: 94 07 bf f4 add %fp, -12, %o2 { register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 40007cbc: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007cc0: 80 a0 60 00 cmp %g1, 0 40007cc4: 02 bf ff da be 40007c2c 40007cc8: 21 10 00 9e sethi %hi(0x40027800), %l0 40007ccc: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40007cd0: 18 bf ff e5 bgu 40007c64 <== NOT EXECUTED 40007cd4: b0 10 20 19 mov 0x19, %i0 <== 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 ) _Thread_Dispatch(); 40007cd8: 81 c7 e0 08 ret <== NOT EXECUTED 40007cdc: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { _Thread_Resume( the_thread, TRUE ); 40007ce0: 40 00 0f 18 call 4000b940 <_Thread_Resume> 40007ce4: 92 10 20 01 mov 1, %o1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007ce8: c2 04 20 90 ld [ %l0 + 0x90 ], %g1 40007cec: 10 bf ff d6 b 40007c44 40007cf0: b0 10 20 00 clr %i0 40007f6c : rtems_status_code rtems_task_set_note( Objects_Id id, uint32_t notepad, uint32_t note ) { 40007f6c: 9d e3 bf 90 save %sp, -112, %sp 40007f70: 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 ) 40007f74: 80 a6 60 0f cmp %i1, 0xf 40007f78: 18 80 00 36 bgu 40008050 40007f7c: 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 ) || 40007f80: 80 a2 60 00 cmp %o1, 0 40007f84: 12 80 00 08 bne 40007fa4 40007f88: 07 10 00 81 sethi %hi(0x40020400), %g3 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 40007f8c: c2 00 e1 9c ld [ %g3 + 0x19c ], %g1 ! 4002059c <_Thread_Executing> <== NOT EXECUTED 40007f90: c4 00 61 6c ld [ %g1 + 0x16c ], %g2 <== NOT EXECUTED 40007f94: 87 2e 60 02 sll %i1, 2, %g3 <== NOT EXECUTED 40007f98: f4 20 80 03 st %i2, [ %g2 + %g3 ] <== NOT EXECUTED 40007f9c: 81 c7 e0 08 ret <== NOT EXECUTED 40007fa0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 40007fa4: c2 00 e1 9c ld [ %g3 + 0x19c ], %g1 40007fa8: c4 00 60 08 ld [ %g1 + 8 ], %g2 40007fac: 80 a2 40 02 cmp %o1, %g2 40007fb0: 22 bf ff f9 be,a 40007f94 40007fb4: c4 00 61 6c ld [ %g1 + 0x16c ], %g2 <== NOT EXECUTED 40007fb8: 83 32 60 18 srl %o1, 0x18, %g1 40007fbc: 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 ) { 40007fc0: 80 a0 a0 04 cmp %g2, 4 40007fc4: 08 80 00 04 bleu 40007fd4 40007fc8: 83 32 60 1b srl %o1, 0x1b, %g1 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40007fcc: 81 c7 e0 08 ret <== NOT EXECUTED 40007fd0: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40007fd4: 80 a0 60 01 cmp %g1, 1 40007fd8: 12 80 00 1e bne 40008050 40007fdc: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40007fe0: 83 28 a0 02 sll %g2, 2, %g1 40007fe4: 05 10 00 81 sethi %hi(0x40020400), %g2 40007fe8: 84 10 a0 20 or %g2, 0x20, %g2 ! 40020420 <_Objects_Information_table> 40007fec: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40007ff0: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 40007ff4: 80 a2 20 00 cmp %o0, 0 40007ff8: 02 80 00 16 be 40008050 40007ffc: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40008000: 40 00 06 c5 call 40009b14 <_Objects_Get> 40008004: 94 07 bf f4 add %fp, -12, %o2 api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 40008008: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000800c: 80 a0 60 00 cmp %g1, 0 40008010: 12 80 00 12 bne 40008058 40008014: 80 a0 60 02 cmp %g1, 2 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 40008018: c4 02 21 6c ld [ %o0 + 0x16c ], %g2 4000801c: 83 2e 60 02 sll %i1, 2, %g1 40008020: 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 ) 40008024: 07 10 00 81 sethi %hi(0x40020400), %g3 40008028: c2 00 e0 c0 ld [ %g3 + 0xc0 ], %g1 ! 400204c0 <_Thread_Dispatch_disable_level> 4000802c: b0 10 20 00 clr %i0 40008030: 82 00 7f ff add %g1, -1, %g1 40008034: c2 20 e0 c0 st %g1, [ %g3 + 0xc0 ] 40008038: c4 00 e0 c0 ld [ %g3 + 0xc0 ], %g2 4000803c: 80 a0 a0 00 cmp %g2, 0 40008040: 12 80 00 04 bne 40008050 40008044: 01 00 00 00 nop _Thread_Dispatch(); 40008048: 40 00 0b 9f call 4000aec4 <_Thread_Dispatch> 4000804c: 01 00 00 00 nop 40008050: 81 c7 e0 08 ret 40008054: 81 e8 00 00 restore api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 40008058: 18 bf ff fe bgu 40008050 <== NOT EXECUTED 4000805c: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED 40008060: 81 c7 e0 08 ret <== NOT EXECUTED 40008064: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED 4000d554 : rtems_status_code rtems_task_set_priority( Objects_Id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 4000d554: 9d e3 bf 90 save %sp, -112, %sp register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 4000d558: 80 a6 60 00 cmp %i1, 0 4000d55c: 02 80 00 06 be 4000d574 4000d560: 92 10 00 18 mov %i0, %o1 4000d564: 82 06 7f ff add %i1, -1, %g1 4000d568: 80 a0 60 fe cmp %g1, 0xfe 4000d56c: 18 80 00 26 bgu 4000d604 4000d570: b0 10 20 13 mov 0x13, %i0 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 4000d574: 80 a6 a0 00 cmp %i2, 0 4000d578: 02 80 00 23 be 4000d604 4000d57c: 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 ) ) { 4000d580: 80 a2 60 00 cmp %o1, 0 4000d584: 12 80 00 22 bne 4000d60c 4000d588: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000d58c: 21 10 00 b2 sethi %hi(0x4002c800), %l0 4000d590: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 ! 4002c8a0 <_Thread_Dispatch_disable_level> 4000d594: 82 00 60 01 inc %g1 4000d598: c2 24 20 a0 st %g1, [ %l0 + 0xa0 ] 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; 4000d59c: 03 10 00 b2 sethi %hi(0x4002c800), %g1 4000d5a0: d0 00 61 7c ld [ %g1 + 0x17c ], %o0 ! 4002c97c <_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; 4000d5a4: c0 27 bf f4 clr [ %fp + -12 ] case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: /* XXX convert from core priority */ *old_priority = the_thread->current_priority; 4000d5a8: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 4000d5ac: 80 a6 60 00 cmp %i1, 0 4000d5b0: 02 80 00 0d be 4000d5e4 4000d5b4: c2 26 80 00 st %g1, [ %i2 ] the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 4000d5b8: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 4000d5bc: 80 a0 60 00 cmp %g1, 0 4000d5c0: 02 80 00 06 be 4000d5d8 4000d5c4: f2 22 20 18 st %i1, [ %o0 + 0x18 ] 4000d5c8: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 4000d5cc: 80 a6 40 01 cmp %i1, %g1 4000d5d0: 1a 80 00 05 bcc 4000d5e4 4000d5d4: 01 00 00 00 nop the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, FALSE ); 4000d5d8: 92 10 00 19 mov %i1, %o1 4000d5dc: 40 00 0a 7f call 4000ffd8 <_Thread_Change_priority> 4000d5e0: 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 ) 4000d5e4: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 4000d5e8: b0 10 20 00 clr %i0 4000d5ec: 82 00 7f ff add %g1, -1, %g1 4000d5f0: c2 24 20 a0 st %g1, [ %l0 + 0xa0 ] 4000d5f4: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 4000d5f8: 80 a0 a0 00 cmp %g2, 0 4000d5fc: 02 80 00 0a be 4000d624 4000d600: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000d604: 81 c7 e0 08 ret 4000d608: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 4000d60c: 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 ) { 4000d610: 80 a0 a0 04 cmp %g2, 4 4000d614: 08 80 00 08 bleu 4000d634 4000d618: 83 32 60 1b srl %o1, 0x1b, %g1 4000d61c: 81 c7 e0 08 ret <== NOT EXECUTED 4000d620: 91 e8 20 04 restore %g0, 4, %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 ) _Thread_Dispatch(); 4000d624: 40 00 0b 91 call 40010468 <_Thread_Dispatch> 4000d628: 01 00 00 00 nop 4000d62c: 81 c7 e0 08 ret 4000d630: 81 e8 00 00 restore *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 4000d634: 80 a0 60 01 cmp %g1, 1 4000d638: 12 bf ff f3 bne 4000d604 4000d63c: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 4000d640: 83 28 a0 02 sll %g2, 2, %g1 4000d644: 05 10 00 b2 sethi %hi(0x4002c800), %g2 4000d648: 84 10 a0 00 mov %g2, %g2 ! 4002c800 <_Objects_Information_table> 4000d64c: c6 00 80 01 ld [ %g2 + %g1 ], %g3 4000d650: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 4000d654: 80 a2 20 00 cmp %o0, 0 4000d658: 02 bf ff f5 be 4000d62c 4000d65c: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 4000d660: 40 00 06 5a call 4000efc8 <_Objects_Get> 4000d664: 94 07 bf f4 add %fp, -12, %o2 if ( !old_priority ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 4000d668: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000d66c: 80 a0 60 00 cmp %g1, 0 4000d670: 02 bf ff ce be 4000d5a8 4000d674: 21 10 00 b2 sethi %hi(0x4002c800), %l0 4000d678: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000d67c: 18 bf ff e2 bgu 4000d604 <== NOT EXECUTED 4000d680: b0 10 20 19 mov 0x19, %i0 <== 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 ) _Thread_Dispatch(); 4000d684: 81 c7 e0 08 ret <== NOT EXECUTED 4000d688: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED 40006614 : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 40006614: 9d e3 bf 90 save %sp, -112, %sp 40006618: 92 10 00 18 mov %i0, %o1 register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 4000661c: 80 a6 60 00 cmp %i1, 0 40006620: 02 80 00 1e be 40006698 40006624: 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 ) ) { 40006628: 80 a2 60 00 cmp %o1, 0 4000662c: 12 80 00 1d bne 400066a0 40006630: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006634: 21 10 00 6a sethi %hi(0x4001a800), %l0 40006638: c2 04 23 60 ld [ %l0 + 0x360 ], %g1 ! 4001ab60 <_Thread_Dispatch_disable_level> 4000663c: 82 00 60 01 inc %g1 40006640: c2 24 23 60 st %g1, [ %l0 + 0x360 ] 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; 40006644: 03 10 00 6b sethi %hi(0x4001ac00), %g1 40006648: d0 00 60 3c ld [ %g1 + 0x3c ], %o0 ! 4001ac3c <_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; 4000664c: c0 27 bf f4 clr [ %fp + -12 ] case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( _Thread_Start( 40006650: 94 10 00 19 mov %i1, %o2 40006654: 98 10 00 1a mov %i2, %o4 40006658: 92 10 20 00 clr %o1 4000665c: 40 00 0e c9 call 4000a180 <_Thread_Start> 40006660: 96 10 20 00 clr %o3 40006664: 80 a2 20 00 cmp %o0, 0 40006668: 12 80 00 2b bne 40006714 4000666c: 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 ) 40006670: c2 04 23 60 ld [ %l0 + 0x360 ], %g1 40006674: b0 10 20 0e mov 0xe, %i0 40006678: 82 00 7f ff add %g1, -1, %g1 4000667c: c2 24 23 60 st %g1, [ %l0 + 0x360 ] 40006680: c4 04 23 60 ld [ %l0 + 0x360 ], %g2 40006684: 80 a0 a0 00 cmp %g2, 0 40006688: 12 80 00 0b bne 400066b4 4000668c: 01 00 00 00 nop _Thread_Dispatch(); 40006690: 40 00 0a e1 call 40009214 <_Thread_Dispatch> 40006694: 01 00 00 00 nop 40006698: 81 c7 e0 08 ret 4000669c: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 400066a0: 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 ) { 400066a4: 80 a0 a0 04 cmp %g2, 4 400066a8: 08 80 00 05 bleu 400066bc 400066ac: 83 32 60 1b srl %o1, 0x1b, %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 400066b0: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400066b4: 81 c7 e0 08 ret 400066b8: 81 e8 00 00 restore *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 400066bc: 80 a0 60 01 cmp %g1, 1 400066c0: 12 bf ff f6 bne 40006698 400066c4: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 400066c8: 83 28 a0 02 sll %g2, 2, %g1 400066cc: 05 10 00 6a sethi %hi(0x4001a800), %g2 400066d0: 84 10 a2 c0 or %g2, 0x2c0, %g2 ! 4001aac0 <_Objects_Information_table> 400066d4: c6 00 80 01 ld [ %g2 + %g1 ], %g3 400066d8: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 400066dc: 80 a2 20 00 cmp %o0, 0 400066e0: 02 bf ff f5 be 400066b4 400066e4: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 400066e8: 40 00 05 a3 call 40007d74 <_Objects_Get> 400066ec: 94 07 bf f4 add %fp, -12, %o2 if ( entry_point == NULL ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 400066f0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400066f4: 80 a0 60 00 cmp %g1, 0 400066f8: 02 bf ff d6 be 40006650 400066fc: 21 10 00 6a sethi %hi(0x4001a800), %l0 40006700: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40006704: 18 bf ff e5 bgu 40006698 <== NOT EXECUTED 40006708: b0 10 20 19 mov 0x19, %i0 <== 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 ) _Thread_Dispatch(); 4000670c: 81 c7 e0 08 ret <== NOT EXECUTED 40006710: 91 e8 20 04 restore %g0, 4, %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 ) 40006714: c2 04 23 60 ld [ %l0 + 0x360 ], %g1 40006718: 10 bf ff d8 b 40006678 4000671c: b0 10 20 00 clr %i0 40007e00 : */ rtems_status_code rtems_task_suspend( Objects_Id id ) { 40007e00: 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 ) ) { 40007e04: 92 96 20 00 orcc %i0, 0, %o1 40007e08: 12 80 00 19 bne 40007e6c 40007e0c: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007e10: 21 10 00 9e sethi %hi(0x40027800), %l0 40007e14: c2 04 20 90 ld [ %l0 + 0x90 ], %g1 ! 40027890 <_Thread_Dispatch_disable_level> 40007e18: 82 00 60 01 inc %g1 40007e1c: c2 24 20 90 st %g1, [ %l0 + 0x90 ] 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; 40007e20: 03 10 00 9e sethi %hi(0x40027800), %g1 40007e24: d0 00 61 6c ld [ %g1 + 0x16c ], %o0 ! 4002796c <_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; 40007e28: c0 27 bf f4 clr [ %fp + -12 ] case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 40007e2c: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40007e30: 80 88 60 02 btst 2, %g1 40007e34: 02 80 00 2b be 40007ee0 40007e38: 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 ) 40007e3c: c2 04 20 90 ld [ %l0 + 0x90 ], %g1 40007e40: b0 10 20 0f mov 0xf, %i0 40007e44: 82 00 7f ff add %g1, -1, %g1 40007e48: c2 24 20 90 st %g1, [ %l0 + 0x90 ] 40007e4c: c4 04 20 90 ld [ %l0 + 0x90 ], %g2 40007e50: 80 a0 a0 00 cmp %g2, 0 40007e54: 12 80 00 0b bne 40007e80 40007e58: 01 00 00 00 nop _Thread_Dispatch(); 40007e5c: 40 00 0b ad call 4000ad10 <_Thread_Dispatch> 40007e60: 01 00 00 00 nop 40007e64: 81 c7 e0 08 ret 40007e68: 81 e8 00 00 restore 40007e6c: 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 ) { 40007e70: 80 a0 a0 04 cmp %g2, 4 40007e74: 08 80 00 05 bleu 40007e88 40007e78: 83 32 60 1b srl %o1, 0x1b, %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40007e7c: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_ALREADY_SUSPENDED; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40007e80: 81 c7 e0 08 ret <== NOT EXECUTED 40007e84: 81 e8 00 00 restore <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40007e88: 80 a0 60 01 cmp %g1, 1 40007e8c: 12 bf ff f6 bne 40007e64 40007e90: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40007e94: 83 28 a0 02 sll %g2, 2, %g1 40007e98: 05 10 00 9d sethi %hi(0x40027400), %g2 40007e9c: 84 10 a3 f0 or %g2, 0x3f0, %g2 ! 400277f0 <_Objects_Information_table> 40007ea0: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40007ea4: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 40007ea8: 80 a2 20 00 cmp %o0, 0 40007eac: 02 bf ff f5 be 40007e80 40007eb0: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40007eb4: 40 00 06 ab call 40009960 <_Objects_Get> 40007eb8: 94 07 bf f4 add %fp, -12, %o2 { register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 40007ebc: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007ec0: 80 a0 60 00 cmp %g1, 0 40007ec4: 02 bf ff da be 40007e2c 40007ec8: 21 10 00 9e sethi %hi(0x40027800), %l0 40007ecc: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40007ed0: 18 bf ff e5 bgu 40007e64 <== NOT EXECUTED 40007ed4: b0 10 20 19 mov 0x19, %i0 <== 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 ) _Thread_Dispatch(); 40007ed8: 81 c7 e0 08 ret <== NOT EXECUTED 40007edc: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Suspend( the_thread ); 40007ee0: 40 00 0f d7 call 4000be3c <_Thread_Suspend> 40007ee4: 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 ) 40007ee8: c2 04 20 90 ld [ %l0 + 0x90 ], %g1 40007eec: 10 bf ff d6 b 40007e44 40007ef0: b0 10 20 00 clr %i0 4001ac7c : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 4001ac7c: 9d e3 bf 90 save %sp, -112, %sp 4001ac80: 92 10 00 18 mov %i0, %o1 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 4001ac84: 80 a6 60 00 cmp %i1, 0 4001ac88: 02 80 00 22 be 4001ad10 4001ac8c: 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 ) ) { 4001ac90: 80 a2 60 00 cmp %o1, 0 4001ac94: 12 80 00 21 bne 4001ad18 4001ac98: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4001ac9c: 21 10 00 fa sethi %hi(0x4003e800), %l0 4001aca0: c2 04 21 d0 ld [ %l0 + 0x1d0 ], %g1 ! 4003e9d0 <_Thread_Dispatch_disable_level> 4001aca4: 82 00 60 01 inc %g1 4001aca8: c2 24 21 d0 st %g1, [ %l0 + 0x1d0 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 4001acac: 03 10 00 fa sethi %hi(0x4003e800), %g1 4001acb0: f0 00 62 ac ld [ %g1 + 0x2ac ], %i0 ! 4003eaac <_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; 4001acb4: c0 27 bf f4 clr [ %fp + -12 ] /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 4001acb8: c4 06 21 7c ld [ %i0 + 0x17c ], %g2 while (tvp) { 4001acbc: 80 a0 a0 00 cmp %g2, 0 4001acc0: 32 80 00 08 bne,a 4001ace0 4001acc4: c2 00 a0 04 ld [ %g2 + 4 ], %g1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void *_Workspace_Allocate( size_t size ) { return _Heap_Allocate( &_Workspace_Area, size ); 4001acc8: 10 80 00 1a b 4001ad30 4001accc: 11 10 00 fa sethi %hi(0x4003e800), %o0 4001acd0: 84 90 60 00 orcc %g1, 0, %g2 <== NOT EXECUTED 4001acd4: 02 80 00 17 be 4001ad30 <== NOT EXECUTED 4001acd8: 11 10 00 fa sethi %hi(0x4003e800), %o0 <== NOT EXECUTED if (tvp->ptr == ptr) { 4001acdc: c2 00 a0 04 ld [ %g2 + 4 ], %g1 <== NOT EXECUTED 4001ace0: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED 4001ace4: 32 bf ff fb bne,a 4001acd0 <== NOT EXECUTED 4001ace8: c2 00 80 00 ld [ %g2 ], %g1 <== NOT EXECUTED tvp->dtor = dtor; 4001acec: f4 20 a0 10 st %i2, [ %g2 + 0x10 ] <== 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 ) 4001acf0: c2 04 21 d0 ld [ %l0 + 0x1d0 ], %g1 _Thread_Dispatch(); 4001acf4: b0 10 20 00 clr %i0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001acf8: 82 00 7f ff add %g1, -1, %g1 4001acfc: c2 24 21 d0 st %g1, [ %l0 + 0x1d0 ] 4001ad00: c4 04 21 d0 ld [ %l0 + 0x1d0 ], %g2 4001ad04: 80 a0 a0 00 cmp %g2, 0 4001ad08: 02 80 00 1c be 4001ad78 4001ad0c: 01 00 00 00 nop the_thread->task_variables = new; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4001ad10: 81 c7 e0 08 ret <== NOT EXECUTED 4001ad14: 81 e8 00 00 restore <== NOT EXECUTED 4001ad18: 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 ) { 4001ad1c: 80 a0 a0 04 cmp %g2, 4 <== NOT EXECUTED 4001ad20: 08 80 00 21 bleu 4001ada4 <== NOT EXECUTED 4001ad24: 83 32 60 1b srl %o1, 0x1b, %g1 <== 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 ) _Thread_Dispatch(); 4001ad28: 81 c7 e0 08 ret <== NOT EXECUTED 4001ad2c: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED 4001ad30: 92 10 20 14 mov 0x14, %o1 4001ad34: 7f ff bf 93 call 4000ab80 <_Heap_Allocate> 4001ad38: 90 12 22 1c or %o0, 0x21c, %o0 * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 4001ad3c: 80 a2 20 00 cmp %o0, 0 4001ad40: 32 80 00 12 bne,a 4001ad88 4001ad44: c4 06 21 7c ld [ %i0 + 0x17c ], %g2 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001ad48: c2 04 21 d0 ld [ %l0 + 0x1d0 ], %g1 <== NOT EXECUTED 4001ad4c: b0 10 20 1a mov 0x1a, %i0 <== NOT EXECUTED 4001ad50: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4001ad54: c2 24 21 d0 st %g1, [ %l0 + 0x1d0 ] <== NOT EXECUTED 4001ad58: c4 04 21 d0 ld [ %l0 + 0x1d0 ], %g2 <== NOT EXECUTED 4001ad5c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4001ad60: 12 80 00 08 bne 4001ad80 <== NOT EXECUTED 4001ad64: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 4001ad68: 7f ff c7 ba call 4000cc50 <_Thread_Dispatch> <== NOT EXECUTED 4001ad6c: 01 00 00 00 nop <== NOT EXECUTED 4001ad70: 81 c7 e0 08 ret <== NOT EXECUTED 4001ad74: 81 e8 00 00 restore <== NOT EXECUTED 4001ad78: 7f ff c7 b6 call 4000cc50 <_Thread_Dispatch> 4001ad7c: b0 10 20 00 clr %i0 4001ad80: 81 c7 e0 08 ret 4001ad84: 81 e8 00 00 restore _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 4001ad88: 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; 4001ad8c: 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; 4001ad90: c2 22 20 08 st %g1, [ %o0 + 8 ] new->ptr = ptr; 4001ad94: f2 22 20 04 st %i1, [ %o0 + 4 ] new->dtor = dtor; 4001ad98: f4 22 20 10 st %i2, [ %o0 + 0x10 ] new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 4001ad9c: 10 bf ff d5 b 4001acf0 4001ada0: c4 22 00 00 st %g2, [ %o0 ] *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 4001ada4: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4001ada8: 12 bf ff e0 bne 4001ad28 <== NOT EXECUTED 4001adac: 83 28 a0 02 sll %g2, 2, %g1 <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 4001adb0: 05 10 00 fa sethi %hi(0x4003e800), %g2 <== NOT EXECUTED 4001adb4: 84 10 a1 30 or %g2, 0x130, %g2 ! 4003e930 <_Objects_Information_table> <== NOT EXECUTED 4001adb8: c6 00 80 01 ld [ %g2 + %g1 ], %g3 <== NOT EXECUTED 4001adbc: d0 00 e0 04 ld [ %g3 + 4 ], %o0 <== NOT EXECUTED if ( !information ) { 4001adc0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001adc4: 02 bf ff d9 be 4001ad28 <== NOT EXECUTED 4001adc8: 01 00 00 00 nop <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 4001adcc: 7f ff c2 1d call 4000b640 <_Objects_Get> <== NOT EXECUTED 4001add0: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED if ( !ptr ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 4001add4: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4001add8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4001addc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001ade0: 02 bf ff b6 be 4001acb8 <== NOT EXECUTED 4001ade4: 21 10 00 fa sethi %hi(0x4003e800), %l0 <== NOT EXECUTED 4001ade8: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4001adec: 18 bf ff c9 bgu 4001ad10 <== NOT EXECUTED 4001adf0: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED 4001adf4: 30 bf ff cd b,a 4001ad28 <== NOT EXECUTED 4001adf8 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 4001adf8: 9d e3 bf 90 save %sp, -112, %sp Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 4001adfc: 80 a6 60 00 cmp %i1, 0 4001ae00: 02 80 00 50 be 4001af40 4001ae04: 92 10 00 18 mov %i0, %o1 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 ) ) { 4001ae08: 80 a6 20 00 cmp %i0, 0 4001ae0c: 12 80 00 26 bne 4001aea4 4001ae10: 83 36 20 18 srl %i0, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4001ae14: 21 10 00 fa sethi %hi(0x4003e800), %l0 4001ae18: c2 04 21 d0 ld [ %l0 + 0x1d0 ], %g1 ! 4003e9d0 <_Thread_Dispatch_disable_level> 4001ae1c: 82 00 60 01 inc %g1 4001ae20: c2 24 21 d0 st %g1, [ %l0 + 0x1d0 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 4001ae24: 03 10 00 fa sethi %hi(0x4003e800), %g1 4001ae28: d0 00 62 ac ld [ %g1 + 0x2ac ], %o0 ! 4003eaac <_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; 4001ae2c: c0 27 bf f4 clr [ %fp + -12 ] default: return RTEMS_INTERNAL_ERROR; case OBJECTS_LOCAL: tvp = the_thread->task_variables; 4001ae30: c6 02 21 7c ld [ %o0 + 0x17c ], %g3 while (tvp) { 4001ae34: 80 a0 e0 00 cmp %g3, 0 4001ae38: 02 80 00 10 be 4001ae78 4001ae3c: 01 00 00 00 nop if (tvp->ptr == ptr) { 4001ae40: c2 00 e0 04 ld [ %g3 + 4 ], %g1 4001ae44: 80 a0 40 19 cmp %g1, %i1 4001ae48: 32 80 00 09 bne,a 4001ae6c 4001ae4c: c4 00 c0 00 ld [ %g3 ], %g2 <== NOT EXECUTED if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 4001ae50: 10 80 00 5b b 4001afbc 4001ae54: c2 00 c0 00 ld [ %g3 ], %g1 return RTEMS_INTERNAL_ERROR; case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { 4001ae58: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED 4001ae5c: 02 80 00 18 be 4001aebc <== NOT EXECUTED 4001ae60: b0 10 00 02 mov %g2, %i0 <== 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 ) _Thread_Dispatch(); 4001ae64: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED _Workspace_Free(tvp); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 4001ae68: c4 00 c0 00 ld [ %g3 ], %g2 <== NOT EXECUTED default: return RTEMS_INTERNAL_ERROR; case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 4001ae6c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4001ae70: 32 bf ff fa bne,a 4001ae58 <== NOT EXECUTED 4001ae74: c2 00 a0 04 ld [ %g2 + 4 ], %g1 <== 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 ) 4001ae78: c2 04 21 d0 ld [ %l0 + 0x1d0 ], %g1 <== NOT EXECUTED 4001ae7c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4001ae80: c2 24 21 d0 st %g1, [ %l0 + 0x1d0 ] <== NOT EXECUTED 4001ae84: c4 04 21 d0 ld [ %l0 + 0x1d0 ], %g2 <== NOT EXECUTED 4001ae88: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4001ae8c: 12 80 00 2d bne 4001af40 <== NOT EXECUTED 4001ae90: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 4001ae94: 7f ff c7 6f call 4000cc50 <_Thread_Dispatch> <== NOT EXECUTED 4001ae98: b0 10 20 09 mov 9, %i0 ! 9 <== NOT EXECUTED 4001ae9c: 81 c7 e0 08 ret <== NOT EXECUTED 4001aea0: 81 e8 00 00 restore <== NOT EXECUTED 4001aea4: 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 ) { 4001aea8: 80 a0 a0 04 cmp %g2, 4 <== NOT EXECUTED 4001aeac: 08 80 00 2e bleu 4001af64 <== NOT EXECUTED 4001aeb0: 83 36 20 1b srl %i0, 0x1b, %g1 <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4001aeb4: 81 c7 e0 08 ret <== NOT EXECUTED 4001aeb8: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 4001aebc: c2 00 80 00 ld [ %g2 ], %g1 <== NOT EXECUTED 4001aec0: c2 20 c0 00 st %g1, [ %g3 ] <== NOT EXECUTED else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; if (_Thread_Is_executing(the_thread)) { 4001aec4: 03 10 00 fa sethi %hi(0x4003e800), %g1 4001aec8: c4 00 62 ac ld [ %g1 + 0x2ac ], %g2 ! 4003eaac <_Thread_Executing> 4001aecc: 80 a2 00 02 cmp %o0, %g2 4001aed0: 32 80 00 1e bne,a 4001af48 4001aed4: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED if (tvp->dtor) 4001aed8: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 4001aedc: 80 a0 a0 00 cmp %g2, 0 4001aee0: 22 80 00 06 be,a 4001aef8 4001aee4: c4 06 20 04 ld [ %i0 + 4 ], %g2 (*tvp->dtor)(*tvp->ptr); 4001aee8: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 4001aeec: 9f c0 80 00 call %g2 <== NOT EXECUTED 4001aef0: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED *tvp->ptr = tvp->gval; 4001aef4: c4 06 20 04 ld [ %i0 + 4 ], %g2 <== NOT EXECUTED 4001aef8: c2 06 20 08 ld [ %i0 + 8 ], %g1 4001aefc: c2 20 80 00 st %g1, [ %g2 ] RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 4001af00: 92 10 00 18 mov %i0, %o1 4001af04: 11 10 00 fa sethi %hi(0x4003e800), %o0 4001af08: 7f ff bf 50 call 4000ac48 <_Heap_Free> 4001af0c: 90 12 22 1c or %o0, 0x21c, %o0 ! 4003ea1c <_Workspace_Area> #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001af10: c2 04 21 d0 ld [ %l0 + 0x1d0 ], %g1 4001af14: b0 10 20 00 clr %i0 4001af18: 82 00 7f ff add %g1, -1, %g1 4001af1c: c2 24 21 d0 st %g1, [ %l0 + 0x1d0 ] 4001af20: c4 04 21 d0 ld [ %l0 + 0x1d0 ], %g2 4001af24: 80 a0 a0 00 cmp %g2, 0 4001af28: 12 80 00 04 bne 4001af38 4001af2c: 01 00 00 00 nop _Thread_Dispatch(); 4001af30: 7f ff c7 48 call 4000cc50 <_Thread_Dispatch> 4001af34: 01 00 00 00 nop 4001af38: 81 c7 e0 08 ret 4001af3c: 81 e8 00 00 restore 4001af40: 81 c7 e0 08 ret <== NOT EXECUTED 4001af44: 91 e8 20 09 restore %g0, 9, %o0 <== NOT EXECUTED } else { if (tvp->dtor) 4001af48: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001af4c: 22 bf ff ee be,a 4001af04 <== NOT EXECUTED 4001af50: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED (*tvp->dtor)(tvp->tval); 4001af54: 9f c0 40 00 call %g1 <== NOT EXECUTED 4001af58: d0 06 20 0c ld [ %i0 + 0xc ], %o0 <== NOT EXECUTED 4001af5c: 10 bf ff ea b 4001af04 <== NOT EXECUTED 4001af60: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 4001af64: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4001af68: 32 bf ff cd bne,a 4001ae9c <== NOT EXECUTED 4001af6c: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 4001af70: 83 28 a0 02 sll %g2, 2, %g1 <== NOT EXECUTED 4001af74: 05 10 00 fa sethi %hi(0x4003e800), %g2 <== NOT EXECUTED 4001af78: 84 10 a1 30 or %g2, 0x130, %g2 ! 4003e930 <_Objects_Information_table> <== NOT EXECUTED 4001af7c: c6 00 80 01 ld [ %g2 + %g1 ], %g3 <== NOT EXECUTED 4001af80: d0 00 e0 04 ld [ %g3 + 4 ], %o0 <== NOT EXECUTED if ( !information ) { 4001af84: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001af88: 22 bf ff c5 be,a 4001ae9c <== NOT EXECUTED 4001af8c: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 4001af90: 7f ff c1 ac call 4000b640 <_Objects_Get> <== NOT EXECUTED 4001af94: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); switch (location) { 4001af98: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4001af9c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001afa0: 02 bf ff a4 be 4001ae30 <== NOT EXECUTED 4001afa4: 21 10 00 fa sethi %hi(0x4003e800), %l0 <== NOT EXECUTED 4001afa8: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4001afac: 18 bf ff bc bgu 4001ae9c <== NOT EXECUTED 4001afb0: b0 10 20 19 mov 0x19, %i0 <== 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 ) _Thread_Dispatch(); 4001afb4: 81 c7 e0 08 ret <== NOT EXECUTED 4001afb8: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 4001afbc: b0 10 00 03 mov %g3, %i0 4001afc0: 10 bf ff c1 b 4001aec4 4001afc4: c2 22 21 7c st %g1, [ %o0 + 0x17c ] 4001afc8 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 4001afc8: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 4001afcc: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 4001afd0: 02 80 00 3b be 4001b0bc <== NOT EXECUTED 4001afd4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; if ( !result ) 4001afd8: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 4001afdc: 02 80 00 38 be 4001b0bc <== NOT EXECUTED 4001afe0: 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 ) ) { 4001afe4: 12 80 00 21 bne 4001b068 <== NOT EXECUTED 4001afe8: 83 36 20 18 srl %i0, 0x18, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4001afec: 05 10 00 fa sethi %hi(0x4003e800), %g2 <== NOT EXECUTED 4001aff0: c2 00 a1 d0 ld [ %g2 + 0x1d0 ], %g1 ! 4003e9d0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4001aff4: 82 00 60 01 inc %g1 <== NOT EXECUTED 4001aff8: c2 20 a1 d0 st %g1, [ %g2 + 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; 4001affc: 03 10 00 fa sethi %hi(0x4003e800), %g1 <== NOT EXECUTED 4001b000: d0 00 62 ac ld [ %g1 + 0x2ac ], %o0 ! 4003eaac <_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; 4001b004: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 4001b008: d0 02 21 7c ld [ %o0 + 0x17c ], %o0 <== NOT EXECUTED while (tvp) { 4001b00c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001b010: 32 80 00 07 bne,a 4001b02c <== NOT EXECUTED 4001b014: c2 02 20 04 ld [ %o0 + 4 ], %g1 <== NOT EXECUTED 4001b018: 30 80 00 1a b,a 4001b080 <== NOT EXECUTED 4001b01c: 90 90 60 00 orcc %g1, 0, %o0 <== NOT EXECUTED 4001b020: 02 80 00 18 be 4001b080 <== NOT EXECUTED 4001b024: 01 00 00 00 nop <== NOT EXECUTED if (tvp->ptr == ptr) { 4001b028: c2 02 20 04 ld [ %o0 + 4 ], %g1 <== NOT EXECUTED 4001b02c: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED 4001b030: 32 bf ff fb bne,a 4001b01c <== NOT EXECUTED 4001b034: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 4001b038: c2 02 20 0c ld [ %o0 + 0xc ], %g1 <== NOT EXECUTED 4001b03c: c2 26 80 00 st %g1, [ %i2 ] <== 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 ) 4001b040: c2 00 a1 d0 ld [ %g2 + 0x1d0 ], %g1 <== NOT EXECUTED 4001b044: b0 10 20 00 clr %i0 <== NOT EXECUTED 4001b048: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4001b04c: c2 20 a1 d0 st %g1, [ %g2 + 0x1d0 ] <== NOT EXECUTED 4001b050: c4 00 a1 d0 ld [ %g2 + 0x1d0 ], %g2 <== NOT EXECUTED 4001b054: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4001b058: 02 80 00 15 be 4001b0ac <== NOT EXECUTED 4001b05c: 01 00 00 00 nop <== NOT EXECUTED } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4001b060: 81 c7 e0 08 ret <== NOT EXECUTED 4001b064: 81 e8 00 00 restore <== NOT EXECUTED 4001b068: 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 ) { 4001b06c: 80 a0 a0 04 cmp %g2, 4 <== NOT EXECUTED 4001b070: 08 80 00 15 bleu 4001b0c4 <== NOT EXECUTED 4001b074: 83 36 20 1b srl %i0, 0x1b, %g1 <== NOT EXECUTED 4001b078: 81 c7 e0 08 ret <== NOT EXECUTED 4001b07c: 91 e8 20 04 restore %g0, 4, %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 ) 4001b080: c2 00 a1 d0 ld [ %g2 + 0x1d0 ], %g1 <== NOT EXECUTED 4001b084: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4001b088: c2 20 a1 d0 st %g1, [ %g2 + 0x1d0 ] <== NOT EXECUTED 4001b08c: c4 00 a1 d0 ld [ %g2 + 0x1d0 ], %g2 <== NOT EXECUTED 4001b090: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4001b094: 12 80 00 0a bne 4001b0bc <== NOT EXECUTED 4001b098: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 4001b09c: 7f ff c6 ed call 4000cc50 <_Thread_Dispatch> <== NOT EXECUTED 4001b0a0: b0 10 20 09 mov 9, %i0 ! 9 <== NOT EXECUTED 4001b0a4: 81 c7 e0 08 ret <== NOT EXECUTED 4001b0a8: 81 e8 00 00 restore <== NOT EXECUTED 4001b0ac: 7f ff c6 e9 call 4000cc50 <_Thread_Dispatch> <== NOT EXECUTED 4001b0b0: 01 00 00 00 nop <== NOT EXECUTED 4001b0b4: 81 c7 e0 08 ret <== NOT EXECUTED 4001b0b8: 81 e8 00 00 restore <== NOT EXECUTED 4001b0bc: 81 c7 e0 08 ret <== NOT EXECUTED 4001b0c0: 91 e8 20 09 restore %g0, 9, %o0 <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 4001b0c4: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4001b0c8: 32 bf ff e6 bne,a 4001b060 <== NOT EXECUTED 4001b0cc: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 4001b0d0: 83 28 a0 02 sll %g2, 2, %g1 <== NOT EXECUTED 4001b0d4: 05 10 00 fa sethi %hi(0x4003e800), %g2 <== NOT EXECUTED 4001b0d8: 84 10 a1 30 or %g2, 0x130, %g2 ! 4003e930 <_Objects_Information_table> <== NOT EXECUTED 4001b0dc: c6 00 80 01 ld [ %g2 + %g1 ], %g3 <== NOT EXECUTED 4001b0e0: d0 00 e0 04 ld [ %g3 + 4 ], %o0 <== NOT EXECUTED if ( !information ) { 4001b0e4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001b0e8: 22 bf ff de be,a 4001b060 <== NOT EXECUTED 4001b0ec: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 4001b0f0: 7f ff c1 54 call 4000b640 <_Objects_Get> <== NOT EXECUTED 4001b0f4: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 4001b0f8: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4001b0fc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001b100: 02 bf ff c2 be 4001b008 <== NOT EXECUTED 4001b104: 05 10 00 fa sethi %hi(0x4003e800), %g2 <== NOT EXECUTED 4001b108: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4001b10c: 18 bf ff d5 bgu 4001b060 <== NOT EXECUTED 4001b110: b0 10 20 19 mov 0x19, %i0 <== 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 ) _Thread_Dispatch(); 4001b114: 81 c7 e0 08 ret <== NOT EXECUTED 4001b118: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED 400032c0 : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 400032c0: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 400032c4: 05 10 00 67 sethi %hi(0x40019c00), %g2 <== NOT EXECUTED int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 400032c8: d0 20 62 04 st %o0, [ %g1 + 0x204 ] <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 400032cc: d2 20 a2 08 st %o1, [ %g2 + 0x208 ] <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 400032d0: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 400032d4: 90 10 20 00 clr %o0 <== NOT EXECUTED 400032d8: 81 c3 e0 08 retl <== NOT EXECUTED 400032dc: d4 20 62 0c st %o2, [ %g1 + 0x20c ] <== NOT EXECUTED 40004a74 : } } rtems_status_code rtems_termios_close (void *arg) { 40004a74: 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); 40004a78: 23 10 00 6a sethi %hi(0x4001a800), %l1 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40004a7c: c2 06 00 00 ld [ %i0 ], %g1 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40004a80: d0 04 62 08 ld [ %l1 + 0x208 ], %o0 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40004a84: e0 00 60 28 ld [ %g1 + 0x28 ], %l0 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40004a88: 92 10 20 00 clr %o1 40004a8c: 40 00 04 c6 call 40005da4 40004a90: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) 40004a94: 80 a2 20 00 cmp %o0, 0 40004a98: 12 80 00 47 bne 40004bb4 40004a9c: 01 00 00 00 nop rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 40004aa0: c2 04 20 08 ld [ %l0 + 8 ], %g1 40004aa4: 82 00 7f ff add %g1, -1, %g1 40004aa8: 80 a0 60 00 cmp %g1, 0 40004aac: 12 80 00 3a bne 40004b94 40004ab0: c2 24 20 08 st %g1, [ %l0 + 8 ] if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 40004ab4: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 40004ab8: 03 10 00 6a sethi %hi(0x4001a800), %g1 40004abc: 82 10 60 04 or %g1, 4, %g1 ! 4001a804 40004ac0: 85 28 a0 05 sll %g2, 5, %g2 40004ac4: 84 00 80 01 add %g2, %g1, %g2 40004ac8: c2 00 a0 04 ld [ %g2 + 4 ], %g1 40004acc: 80 a0 60 00 cmp %g1, 0 40004ad0: 02 80 00 49 be 40004bf4 40004ad4: 01 00 00 00 nop /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 40004ad8: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004adc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED * default: just flush output buffer */ drainOutput (tty); } if (tty->device.outputUsesInterrupts 40004ae0: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 <== NOT EXECUTED 40004ae4: 80 a0 60 02 cmp %g1, 2 40004ae8: 22 80 00 47 be,a 40004c04 40004aec: d0 04 20 c4 ld [ %l0 + 0xc4 ], %o0 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) 40004af0: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 40004af4: 80 a0 60 00 cmp %g1, 0 40004af8: 22 80 00 07 be,a 40004b14 40004afc: c4 04 00 00 ld [ %l0 ], %g2 (*tty->device.lastClose)(tty->major, tty->minor, arg); 40004b00: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED 40004b04: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 <== NOT EXECUTED 40004b08: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004b0c: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED if (tty->forw == NULL) { 40004b10: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED 40004b14: 80 a0 a0 00 cmp %g2, 0 40004b18: 22 80 00 30 be,a 40004bd8 40004b1c: c6 04 20 04 ld [ %l0 + 4 ], %g3 if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 40004b20: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED 40004b24: c2 20 a0 04 st %g1, [ %g2 + 4 ] <== NOT EXECUTED } if (tty->back == NULL) { 40004b28: c2 04 20 04 ld [ %l0 + 4 ], %g1 40004b2c: 80 a0 60 00 cmp %g1, 0 40004b30: 22 80 00 25 be,a 40004bc4 40004b34: 03 10 00 6a sethi %hi(0x4001a800), %g1 if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 40004b38: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 40004b3c: 40 00 04 4f call 40005c78 40004b40: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 rtems_semaphore_delete (tty->osem); 40004b44: 40 00 04 4d call 40005c78 40004b48: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 40004b4c: 40 00 04 4b call 40005c78 40004b50: d0 04 20 8c ld [ %l0 + 0x8c ], %o0 if ((tty->device.pollRead == NULL) || 40004b54: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 40004b58: 80 a0 60 00 cmp %g1, 0 40004b5c: 02 80 00 13 be 40004ba8 40004b60: 01 00 00 00 nop 40004b64: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 40004b68: 80 a0 60 02 cmp %g1, 2 40004b6c: 02 80 00 0f be 40004ba8 40004b70: 01 00 00 00 nop (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); 40004b74: 7f ff f5 ca call 4000229c 40004b78: d0 04 20 58 ld [ %l0 + 0x58 ], %o0 free (tty->rawOutBuf.theBuf); 40004b7c: 7f ff f5 c8 call 4000229c 40004b80: d0 04 20 7c ld [ %l0 + 0x7c ], %o0 free (tty->cbuf); 40004b84: 7f ff f5 c6 call 4000229c 40004b88: d0 04 20 1c ld [ %l0 + 0x1c ], %o0 free (tty); 40004b8c: 7f ff f5 c4 call 4000229c 40004b90: 90 10 00 10 mov %l0, %o0 } rtems_semaphore_release (rtems_termios_ttyMutex); 40004b94: d0 04 62 08 ld [ %l1 + 0x208 ], %o0 40004b98: 40 00 05 52 call 400060e0 40004b9c: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 40004ba0: 81 c7 e0 08 ret 40004ba4: 81 e8 00 00 restore rtems_semaphore_delete (tty->isem); rtems_semaphore_delete (tty->osem); rtems_semaphore_delete (tty->rawOutBuf.Semaphore); if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); 40004ba8: 40 00 04 34 call 40005c78 <== NOT EXECUTED 40004bac: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED 40004bb0: 30 bf ff f1 b,a 40004b74 <== NOT EXECUTED struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 40004bb4: 40 00 07 99 call 40006a18 <== NOT EXECUTED 40004bb8: 01 00 00 00 nop <== NOT EXECUTED if (--tty->refcount == 0) { 40004bbc: 10 bf ff ba b 40004aa4 <== NOT EXECUTED 40004bc0: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; if ( rtems_termios_ttyHead != NULL ) { 40004bc4: 80 a0 a0 00 cmp %g2, 0 40004bc8: 02 bf ff dd be 40004b3c 40004bcc: c4 20 62 10 st %g2, [ %g1 + 0x210 ] rtems_termios_ttyHead->back = NULL; 40004bd0: 10 bf ff db b 40004b3c <== NOT EXECUTED 40004bd4: c0 20 a0 04 clr [ %g2 + 4 ] <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { rtems_termios_ttyTail = tty->back; 40004bd8: 03 10 00 6a sethi %hi(0x4001a800), %g1 if ( rtems_termios_ttyTail != NULL ) { 40004bdc: 80 a0 e0 00 cmp %g3, 0 40004be0: 02 bf ff d2 be 40004b28 40004be4: c6 20 62 0c st %g3, [ %g1 + 0x20c ] rtems_termios_ttyTail->forw = NULL; 40004be8: c0 20 c0 00 clr [ %g3 ] <== NOT EXECUTED 40004bec: 10 bf ff cf b 40004b28 <== NOT EXECUTED 40004bf0: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED } else { /* * default: just flush output buffer */ drainOutput (tty); 40004bf4: 7f ff fd 66 call 4000418c 40004bf8: 90 10 00 10 mov %l0, %o0 } if (tty->device.outputUsesInterrupts 40004bfc: 10 bf ff ba b 40004ae4 40004c00: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 40004c04: 40 00 02 ab call 400056b0 <== NOT EXECUTED 40004c08: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 40004c0c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004c10: 12 80 00 0c bne 40004c40 <== NOT EXECUTED 40004c14: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 40004c18: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0 <== NOT EXECUTED 40004c1c: 40 00 02 a5 call 400056b0 <== NOT EXECUTED 40004c20: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 40004c24: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004c28: 22 bf ff b3 be,a 40004af4 <== NOT EXECUTED 40004c2c: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40004c30: 40 00 07 7a call 40006a18 <== NOT EXECUTED 40004c34: 01 00 00 00 nop <== NOT EXECUTED } if (tty->device.lastClose) 40004c38: 10 bf ff af b 40004af4 <== NOT EXECUTED 40004c3c: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED */ sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 40004c40: 40 00 07 76 call 40006a18 <== NOT EXECUTED 40004c44: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_event_send( 40004c48: 10 bf ff f5 b 40004c1c <== NOT EXECUTED 40004c4c: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0 <== NOT EXECUTED 400034f4 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 400034f4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 400034f8: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 400034fc: c4 06 20 b4 ld [ %i0 + 0xb4 ], %g2 <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 40003500: 82 00 40 19 add %g1, %i1, %g1 <== NOT EXECUTED 40003504: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40003508: 80 a0 a0 02 cmp %g2, 2 <== NOT EXECUTED 4000350c: 02 80 00 10 be 4000354c <== NOT EXECUTED 40003510: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 40003514: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 40003518: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 4000351c: 02 80 00 04 be 4000352c <== NOT EXECUTED 40003520: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 40003524: 7f ff ff 75 call 400032f8 <== NOT EXECUTED 40003528: 81 e8 00 00 restore <== NOT EXECUTED } else if (tty->t_line == PPPDISC ) { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 4000352c: c2 00 60 b8 ld [ %g1 + 0xb8 ], %g1 <== NOT EXECUTED 40003530: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003534: 02 80 00 04 be 40003544 <== NOT EXECUTED 40003538: b0 10 20 00 clr %i0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 4000353c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003540: 01 00 00 00 nop <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 40003544: 81 c7 e0 08 ret <== NOT EXECUTED 40003548: 81 e8 00 00 restore <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 4000354c: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 <== NOT EXECUTED 40003550: 40 00 08 58 call 400056b0 <== NOT EXECUTED 40003554: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 40003558: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000355c: 02 bf ff fa be 40003544 <== NOT EXECUTED 40003560: b0 10 20 00 clr %i0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40003564: 40 00 0d 2d call 40006a18 <== NOT EXECUTED 40003568: 01 00 00 00 nop <== NOT EXECUTED 4000356c: 30 bf ff f6 b,a 40003544 <== NOT EXECUTED 40003570 : * 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) { 40003570: 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) { 40003574: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 40003578: 05 10 00 6a sethi %hi(0x4001a800), %g2 <== NOT EXECUTED 4000357c: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40003580: a0 10 a0 04 or %g2, 4, %l0 <== NOT EXECUTED 40003584: 82 00 40 10 add %g1, %l0, %g1 <== NOT EXECUTED 40003588: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED 4000358c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40003590: 02 80 00 24 be 40003620 <== NOT EXECUTED 40003594: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED while (len--) { 40003598: 22 80 00 11 be,a 400035dc <== NOT EXECUTED 4000359c: c2 06 20 e4 ld [ %i0 + 0xe4 ], %g1 <== NOT EXECUTED 400035a0: b4 06 80 19 add %i2, %i1, %i2 <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 400035a4: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== 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++; 400035a8: d0 0e 40 00 ldub [ %i1 ], %o0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_rint(c,tty); 400035ac: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 400035b0: 82 00 40 10 add %g1, %l0, %g1 <== NOT EXECUTED 400035b4: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED 400035b8: 91 2a 20 18 sll %o0, 0x18, %o0 <== NOT EXECUTED 400035bc: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 400035c0: 9f c0 80 00 call %g2 <== NOT EXECUTED 400035c4: 91 3a 20 18 sra %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++; 400035c8: b2 06 60 01 inc %i1 <== 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--) { 400035cc: 80 a6 40 1a cmp %i1, %i2 <== NOT EXECUTED 400035d0: 32 bf ff f6 bne,a 400035a8 <== NOT EXECUTED 400035d4: 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 )) { 400035d8: c2 06 20 e4 ld [ %i0 + 0xe4 ], %g1 <== NOT EXECUTED 400035dc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400035e0: 12 80 00 0e bne 40003618 <== NOT EXECUTED 400035e4: a8 10 20 00 clr %l4 <== NOT EXECUTED 400035e8: c2 06 20 dc ld [ %i0 + 0xdc ], %g1 <== NOT EXECUTED 400035ec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400035f0: 02 80 00 0a be 40003618 <== NOT EXECUTED 400035f4: 01 00 00 00 nop <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 400035f8: d2 06 20 e0 ld [ %i0 + 0xe0 ], %o1 <== NOT EXECUTED 400035fc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003600: 90 06 20 30 add %i0, 0x30, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 40003604: a8 10 20 00 clr %l4 <== NOT EXECUTED 40003608: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 4000360c: c2 26 20 e4 st %g1, [ %i0 + 0xe4 ] <== NOT EXECUTED } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 40003610: 81 c7 e0 08 ret <== NOT EXECUTED 40003614: 91 e8 00 14 restore %g0, %l4, %o0 <== NOT EXECUTED 40003618: 81 c7 e0 08 ret <== NOT EXECUTED 4000361c: 91 e8 00 14 restore %g0, %l4, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 40003620: b4 06 bf ff add %i2, -1, %i2 <== 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) { 40003624: a8 10 20 00 clr %l4 <== NOT EXECUTED 40003628: a6 10 20 00 clr %l3 <== 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); 4000362c: aa 06 20 30 add %i0, 0x30, %l5 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 40003630: 80 a6 bf ff cmp %i2, -1 <== NOT EXECUTED 40003634: 02 80 00 1c be 400036a4 <== NOT EXECUTED 40003638: ac 06 20 4a add %i0, 0x4a, %l6 <== NOT EXECUTED c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 4000363c: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40003640: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 40003644: 02 80 00 0b be 40003670 <== NOT EXECUTED 40003648: e2 0e 40 00 ldub [ %i1 ], %l1 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 4000364c: c4 0e 20 4a ldub [ %i0 + 0x4a ], %g2 <== NOT EXECUTED 40003650: 83 2c 60 18 sll %l1, 0x18, %g1 <== NOT EXECUTED 40003654: 87 38 60 18 sra %g1, 0x18, %g3 <== NOT EXECUTED 40003658: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 4000365c: 02 80 00 63 be 400037e8 <== NOT EXECUTED 40003660: c2 0e 20 49 ldub [ %i0 + 0x49 ], %g1 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = TRUE; } else if (c == tty->termios.c_cc[VSTART]) { 40003664: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 40003668: 02 80 00 68 be 40003808 <== NOT EXECUTED 4000366c: 01 00 00 00 nop <== NOT EXECUTED /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = TRUE; } } if (flow_rcv) { 40003670: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 40003674: 02 80 00 23 be 40003700 <== NOT EXECUTED 40003678: 01 00 00 00 nop <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 4000367c: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40003680: 82 08 60 30 and %g1, 0x30, %g1 <== NOT EXECUTED 40003684: 80 a0 60 20 cmp %g1, 0x20 <== NOT EXECUTED 40003688: 02 80 00 0f be 400036c4 <== NOT EXECUTED 4000368c: 01 00 00 00 nop <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 40003690: b2 06 60 01 inc %i1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 40003694: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED 40003698: 80 a6 bf ff cmp %i2, -1 <== NOT EXECUTED 4000369c: 12 bf ff e8 bne 4000363c <== NOT EXECUTED 400036a0: 01 00 00 00 nop <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 400036a4: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 400036a8: d0 06 20 68 ld [ %i0 + 0x68 ], %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 400036ac: 82 00 40 14 add %g1, %l4, %g1 <== NOT EXECUTED 400036b0: c2 26 20 78 st %g1, [ %i0 + 0x78 ] <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 400036b4: 40 00 0a 8b call 400060e0 <== NOT EXECUTED 400036b8: b0 10 00 14 mov %l4, %i0 <== NOT EXECUTED return dropped; } 400036bc: 81 c7 e0 08 ret <== NOT EXECUTED 400036c0: 81 e8 00 00 restore <== NOT EXECUTED } if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); 400036c4: 7f ff f9 cc call 40001df4 <== NOT EXECUTED 400036c8: 01 00 00 00 nop <== NOT EXECUTED 400036cc: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 400036d0: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 400036d4: 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; 400036d8: 82 08 7f df and %g1, -33, %g1 <== NOT EXECUTED 400036dc: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 400036e0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400036e4: 12 80 00 55 bne 40003838 <== NOT EXECUTED 400036e8: 01 00 00 00 nop <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 400036ec: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400036f0: 7f ff f9 c5 call 40001e04 <== NOT EXECUTED 400036f4: b2 06 60 01 inc %i1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 400036f8: 10 bf ff e8 b 40003698 <== NOT EXECUTED 400036fc: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 40003700: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 <== NOT EXECUTED 40003704: d2 06 20 64 ld [ %i0 + 0x64 ], %o1 <== NOT EXECUTED 40003708: 40 00 4a 8e call 40016140 <.urem> <== NOT EXECUTED 4000370c: 90 02 20 01 inc %o0 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 40003710: 7f ff f9 b9 call 40001df4 <== NOT EXECUTED 40003714: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 40003718: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 4000371c: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED 40003720: d0 06 20 64 ld [ %i0 + 0x64 ], %o0 <== NOT EXECUTED 40003724: d2 06 20 64 ld [ %i0 + 0x64 ], %o1 <== NOT EXECUTED 40003728: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED 4000372c: 40 00 4a 85 call 40016140 <.urem> <== NOT EXECUTED 40003730: 90 02 00 10 add %o0, %l0, %o0 <== NOT EXECUTED 40003734: c2 06 20 c0 ld [ %i0 + 0xc0 ], %g1 <== NOT EXECUTED 40003738: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 4000373c: 08 80 00 13 bleu 40003788 <== NOT EXECUTED 40003740: 01 00 00 00 nop <== NOT EXECUTED 40003744: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40003748: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000374c: 12 80 00 0f bne 40003788 <== NOT EXECUTED 40003750: 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; 40003754: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40003758: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED 4000375c: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 40003760: c4 06 20 b8 ld [ %i0 + 0xb8 ], %g2 <== NOT EXECUTED 40003764: 84 08 a4 02 and %g2, 0x402, %g2 <== NOT EXECUTED 40003768: 80 a0 a4 00 cmp %g2, 0x400 <== NOT EXECUTED 4000376c: 02 80 00 45 be 40003880 <== NOT EXECUTED 40003770: 01 00 00 00 nop <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 40003774: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40003778: 82 08 61 04 and %g1, 0x104, %g1 <== NOT EXECUTED 4000377c: 80 a0 61 00 cmp %g1, 0x100 <== NOT EXECUTED 40003780: 02 80 00 36 be 40003858 <== NOT EXECUTED 40003784: 01 00 00 00 nop <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); } } } /* reenable interrupts */ rtems_interrupt_enable(level); 40003788: 7f ff f9 9f call 40001e04 <== NOT EXECUTED 4000378c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 40003790: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED 40003794: 80 a0 40 10 cmp %g1, %l0 <== NOT EXECUTED 40003798: 22 80 00 21 be,a 4000381c <== NOT EXECUTED 4000379c: a8 05 20 01 inc %l4 <== NOT EXECUTED dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 400037a0: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 <== NOT EXECUTED 400037a4: e2 28 40 10 stb %l1, [ %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 )) { 400037a8: c4 06 20 e4 ld [ %i0 + 0xe4 ], %g2 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; 400037ac: 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 )) { 400037b0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400037b4: 32 bf ff b8 bne,a 40003694 <== NOT EXECUTED 400037b8: b2 06 60 01 inc %i1 <== NOT EXECUTED 400037bc: c2 06 20 dc ld [ %i0 + 0xdc ], %g1 <== NOT EXECUTED 400037c0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400037c4: 22 bf ff b4 be,a 40003694 <== NOT EXECUTED 400037c8: b2 06 60 01 inc %i1 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 400037cc: d2 06 20 e0 ld [ %i0 + 0xe0 ], %o1 <== NOT EXECUTED 400037d0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400037d4: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 400037d8: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 400037dc: b2 06 60 01 inc %i1 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); tty->tty_rcvwakeup = 1; 400037e0: 10 bf ff ad b 40003694 <== NOT EXECUTED 400037e4: c2 26 20 e4 st %g1, [ %i0 + 0xe4 ] <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { 400037e8: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 400037ec: 02 80 00 0e be 40003824 <== NOT EXECUTED 400037f0: 01 00 00 00 nop <== NOT EXECUTED tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 400037f4: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 400037f8: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 400037fc: 82 10 60 10 or %g1, 0x10, %g1 <== NOT EXECUTED 40003800: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED 40003804: 30 bf ff 9e b,a 4000367c <== NOT EXECUTED flow_rcv = TRUE; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 40003808: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 4000380c: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED flow_rcv = TRUE; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 40003810: 82 08 7f ef and %g1, -17, %g1 <== NOT EXECUTED 40003814: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED 40003818: 30 bf ff 99 b,a 4000367c <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 4000381c: 10 bf ff 9e b 40003694 <== NOT EXECUTED 40003820: b2 06 60 01 inc %i1 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 40003824: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 40003828: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 4000382c: 82 18 60 10 xor %g1, 0x10, %g1 <== NOT EXECUTED 40003830: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED 40003834: 30 bf ff 92 b,a 4000367c <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 40003838: d2 06 20 84 ld [ %i0 + 0x84 ], %o1 <== NOT EXECUTED 4000383c: c2 06 20 7c ld [ %i0 + 0x7c ], %g1 <== NOT EXECUTED 40003840: c4 06 20 a4 ld [ %i0 + 0xa4 ], %g2 <== NOT EXECUTED 40003844: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 40003848: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 4000384c: 9f c0 80 00 call %g2 <== NOT EXECUTED 40003850: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 40003854: 30 bf ff a6 b,a 400036ec <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 40003858: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 4000385c: 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; 40003860: 82 10 60 04 or %g1, 4, %g1 <== NOT EXECUTED 40003864: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 40003868: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000386c: 02 bf ff c7 be 40003788 <== NOT EXECUTED 40003870: 01 00 00 00 nop <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 40003874: 9f c0 80 00 call %g2 <== NOT EXECUTED 40003878: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 4000387c: 30 bf ff c3 b,a 40003788 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 40003880: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40003884: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40003888: 12 80 00 06 bne 400038a0 <== NOT EXECUTED 4000388c: 01 00 00 00 nop <== NOT EXECUTED 40003890: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED 40003894: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003898: 12 bf ff bc bne 40003788 <== NOT EXECUTED 4000389c: 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; 400038a0: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 400038a4: c4 06 20 a4 ld [ %i0 + 0xa4 ], %g2 <== NOT EXECUTED 400038a8: 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; 400038ac: 82 10 60 02 or %g1, 2, %g1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 400038b0: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 400038b4: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED (*tty->device.write)(tty->minor, 400038b8: 9f c0 80 00 call %g2 <== NOT EXECUTED 400038bc: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 400038c0: 30 bf ff b2 b,a 40003788 <== NOT EXECUTED 40003270 : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 40003270: 9d e3 bf 98 save %sp, -104, %sp rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 40003274: 03 10 00 6a sethi %hi(0x4001a800), %g1 40003278: c4 00 62 08 ld [ %g1 + 0x208 ], %g2 ! 4001aa08 4000327c: 80 a0 a0 00 cmp %g2, 0 40003280: 02 80 00 04 be 40003290 40003284: 98 10 62 08 or %g1, 0x208, %o4 40003288: 81 c7 e0 08 ret 4000328c: 81 e8 00 00 restore sc = rtems_semaphore_create ( 40003290: 11 15 14 9b sethi %hi(0x54526c00), %o0 40003294: 92 10 20 01 mov 1, %o1 40003298: 90 12 21 69 or %o0, 0x169, %o0 4000329c: 94 10 20 54 mov 0x54, %o2 400032a0: 40 00 09 ea call 40005a48 400032a4: 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) 400032a8: 80 a2 20 00 cmp %o0, 0 400032ac: 02 bf ff f7 be 40003288 400032b0: 01 00 00 00 nop rtems_fatal_error_occurred (sc); 400032b4: 40 00 0d d9 call 40006a18 <== NOT EXECUTED 400032b8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 400032bc: 01 00 00 00 nop 40004658 : } } rtems_status_code rtems_termios_ioctl (void *arg) { 40004658: 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; 4000465c: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 40004660: 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; 40004664: e2 00 60 28 ld [ %g1 + 0x28 ], %l1 <== NOT EXECUTED struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 40004668: 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); 4000466c: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 <== NOT EXECUTED } } rtems_status_code rtems_termios_ioctl (void *arg) { 40004670: 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); 40004674: 92 10 20 00 clr %o1 <== NOT EXECUTED 40004678: 40 00 05 cb call 40005da4 <== NOT EXECUTED 4000467c: 94 10 20 00 clr %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) { 40004680: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40004684: 22 80 00 05 be,a 40004698 <== NOT EXECUTED 40004688: c4 04 a0 04 ld [ %l2 + 4 ], %g2 <== NOT EXECUTED args->ioctl_return = sc; 4000468c: f0 24 a0 0c st %i0, [ %l2 + 0xc ] <== NOT EXECUTED 40004690: 81 c7 e0 08 ret <== NOT EXECUTED 40004694: 81 e8 00 00 restore <== NOT EXECUTED return sc; } switch (args->command) { 40004698: 80 a0 a0 04 cmp %g2, 4 <== NOT EXECUTED 4000469c: 22 80 00 27 be,a 40004738 <== NOT EXECUTED 400046a0: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED 400046a4: 18 80 00 0e bgu 400046dc <== NOT EXECUTED 400046a8: 03 10 01 19 sethi %hi(0x40046400), %g1 <== NOT EXECUTED 400046ac: 80 a0 a0 02 cmp %g2, 2 <== NOT EXECUTED 400046b0: 22 80 00 61 be,a 40004834 <== NOT EXECUTED 400046b4: d2 04 a0 08 ld [ %l2 + 8 ], %o1 <== NOT EXECUTED 400046b8: 08 80 00 4c bleu 400047e8 <== NOT EXECUTED 400046bc: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED if (tty->device.setAttributes) (*tty->device.setAttributes)(tty->minor, &tty->termios); break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 400046c0: 7f ff fe b3 call 4000418c <== NOT EXECUTED 400046c4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 400046c8: 40 00 06 86 call 400060e0 <== NOT EXECUTED 400046cc: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 <== NOT EXECUTED args->ioctl_return = sc; 400046d0: f0 24 a0 0c st %i0, [ %l2 + 0xc ] <== NOT EXECUTED return sc; } 400046d4: 81 c7 e0 08 ret <== NOT EXECUTED 400046d8: 81 e8 00 00 restore <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 400046dc: 82 10 62 7f or %g1, 0x27f, %g1 <== NOT EXECUTED 400046e0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400046e4: 02 80 00 48 be 40004804 <== NOT EXECUTED 400046e8: 01 00 00 00 nop <== NOT EXECUTED 400046ec: 18 80 00 1b bgu 40004758 <== NOT EXECUTED 400046f0: 03 10 01 1d sethi %hi(0x40047400), %g1 <== NOT EXECUTED 400046f4: 80 a0 a0 05 cmp %g2, 5 <== NOT EXECUTED 400046f8: 22 80 00 14 be,a 40004748 <== NOT EXECUTED 400046fc: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 40004700: c4 04 60 cc ld [ %l1 + 0xcc ], %g2 <== NOT EXECUTED 40004704: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED 40004708: 82 10 60 04 or %g1, 4, %g1 ! 4001a804 <== NOT EXECUTED 4000470c: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 40004710: 84 00 80 01 add %g2, %g1, %g2 <== NOT EXECUTED 40004714: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 <== NOT EXECUTED 40004718: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000471c: 02 bf ff eb be 400046c8 <== NOT EXECUTED 40004720: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 40004724: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40004728: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000472c: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 40004730: 10 bf ff e6 b 400046c8 <== NOT EXECUTED 40004734: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 40004738: c2 24 60 dc st %g1, [ %l1 + 0xdc ] <== NOT EXECUTED 4000473c: c4 04 20 04 ld [ %l0 + 4 ], %g2 <== NOT EXECUTED 40004740: 10 bf ff e2 b 400046c8 <== NOT EXECUTED 40004744: c4 24 60 e0 st %g2, [ %l1 + 0xe0 ] <== NOT EXECUTED case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 40004748: c2 24 60 d4 st %g1, [ %l1 + 0xd4 ] <== NOT EXECUTED 4000474c: c4 04 20 04 ld [ %l0 + 4 ], %g2 <== NOT EXECUTED 40004750: 10 bf ff de b 400046c8 <== NOT EXECUTED 40004754: c4 24 60 d8 st %g2, [ %l1 + 0xd8 ] <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 40004758: 82 10 60 1a or %g1, 0x1a, %g1 <== NOT EXECUTED 4000475c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004760: 02 80 00 1e be 400047d8 <== NOT EXECUTED 40004764: 03 20 01 1d sethi %hi(0x80047400), %g1 <== NOT EXECUTED 40004768: 82 10 60 1b or %g1, 0x1b, %g1 ! 8004741b <== NOT EXECUTED 4000476c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004770: 32 bf ff e5 bne,a 40004704 <== NOT EXECUTED 40004774: c4 04 60 cc ld [ %l1 + 0xcc ], %g2 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 40004778: c2 04 60 cc ld [ %l1 + 0xcc ], %g1 <== NOT EXECUTED 4000477c: 05 10 00 6a sethi %hi(0x4001a800), %g2 <== NOT EXECUTED 40004780: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40004784: a0 10 a0 04 or %g2, 4, %l0 <== NOT EXECUTED 40004788: 82 00 40 10 add %g1, %l0, %g1 <== NOT EXECUTED 4000478c: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 40004790: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004794: 22 80 00 06 be,a 400047ac <== NOT EXECUTED 40004798: c2 04 a0 08 ld [ %l2 + 8 ], %g1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 4000479c: 9f c0 40 00 call %g1 <== NOT EXECUTED 400047a0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400047a4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 400047a8: c2 04 a0 08 ld [ %l2 + 8 ], %g1 <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ 400047ac: 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); 400047b0: c6 00 40 00 ld [ %g1 ], %g3 <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 400047b4: 85 28 e0 05 sll %g3, 5, %g2 <== NOT EXECUTED 400047b8: c4 04 00 02 ld [ %l0 + %g2 ], %g2 <== NOT EXECUTED 400047bc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400047c0: 02 bf ff c2 be 400046c8 <== NOT EXECUTED 400047c4: c6 24 60 cc st %g3, [ %l1 + 0xcc ] <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 400047c8: 9f c0 80 00 call %g2 <== NOT EXECUTED 400047cc: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400047d0: 10 bf ff be b 400046c8 <== NOT EXECUTED 400047d4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 400047d8: c4 04 a0 08 ld [ %l2 + 8 ], %g2 <== NOT EXECUTED 400047dc: c2 04 60 cc ld [ %l1 + 0xcc ], %g1 <== NOT EXECUTED 400047e0: 10 bf ff ba b 400046c8 <== NOT EXECUTED 400047e4: c2 20 80 00 st %g1, [ %g2 ] <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 400047e8: 32 bf ff c7 bne,a 40004704 <== NOT EXECUTED 400047ec: 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; 400047f0: d0 04 a0 08 ld [ %l2 + 8 ], %o0 <== NOT EXECUTED 400047f4: 92 04 60 30 add %l1, 0x30, %o1 <== NOT EXECUTED 400047f8: 40 00 2b 52 call 4000f540 <== NOT EXECUTED 400047fc: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED 40004800: 30 bf ff b2 b,a 400046c8 <== NOT EXECUTED *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 40004804: c4 04 60 60 ld [ %l1 + 0x60 ], %g2 <== NOT EXECUTED 40004808: c2 04 60 5c ld [ %l1 + 0x5c ], %g1 <== NOT EXECUTED if ( rawnc < 0 ) 4000480c: 88 a0 80 01 subcc %g2, %g1, %g4 <== NOT EXECUTED 40004810: 0c 80 00 82 bneg 40004a18 <== NOT EXECUTED 40004814: 01 00 00 00 nop <== NOT EXECUTED rawnc += tty->rawInBuf.Size; /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 40004818: c2 04 60 20 ld [ %l1 + 0x20 ], %g1 <== NOT EXECUTED 4000481c: c4 04 60 24 ld [ %l1 + 0x24 ], %g2 <== NOT EXECUTED 40004820: c6 04 a0 08 ld [ %l2 + 8 ], %g3 <== NOT EXECUTED 40004824: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 40004828: 82 00 40 04 add %g1, %g4, %g1 <== NOT EXECUTED 4000482c: 10 bf ff a7 b 400046c8 <== NOT EXECUTED 40004830: c2 20 c0 00 st %g1, [ %g3 ] <== NOT EXECUTED case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 40004834: a6 04 60 30 add %l1, 0x30, %l3 <== NOT EXECUTED 40004838: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED 4000483c: 40 00 2b 41 call 4000f540 <== NOT EXECUTED 40004840: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 40004844: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40004848: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 4000484c: 02 80 00 19 be 400048b0 <== NOT EXECUTED 40004850: 01 00 00 00 nop <== NOT EXECUTED 40004854: c2 04 60 30 ld [ %l1 + 0x30 ], %g1 <== NOT EXECUTED 40004858: 80 88 64 00 btst 0x400, %g1 <== NOT EXECUTED 4000485c: 12 80 00 15 bne 400048b0 <== NOT EXECUTED 40004860: 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); 40004864: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40004868: 82 08 7d ef and %g1, -529, %g1 <== NOT EXECUTED 4000486c: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 40004870: c4 04 60 b8 ld [ %l1 + 0xb8 ], %g2 <== NOT EXECUTED 40004874: 80 88 a0 20 btst 0x20, %g2 <== NOT EXECUTED 40004878: 02 80 00 0e be 400048b0 <== NOT EXECUTED 4000487c: 01 00 00 00 nop <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 40004880: 7f ff f5 5d call 40001df4 <== NOT EXECUTED 40004884: 01 00 00 00 nop <== NOT EXECUTED 40004888: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 4000488c: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 40004890: 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; 40004894: 82 08 7f df and %g1, -33, %g1 <== NOT EXECUTED 40004898: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 4000489c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400048a0: 12 80 00 6d bne 40004a54 <== NOT EXECUTED 400048a4: 01 00 00 00 nop <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 400048a8: 7f ff f5 57 call 40001e04 <== NOT EXECUTED 400048ac: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 400048b0: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 400048b4: 80 88 64 00 btst 0x400, %g1 <== NOT EXECUTED 400048b8: 02 80 00 0c be 400048e8 <== NOT EXECUTED 400048bc: 03 00 00 04 sethi %hi(0x1000), %g1 <== NOT EXECUTED 400048c0: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED 400048c4: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED 400048c8: 12 80 00 08 bne 400048e8 <== NOT EXECUTED 400048cc: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 400048d0: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 400048d4: 82 08 7b ff and %g1, -1025, %g1 <== NOT EXECUTED 400048d8: 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); 400048dc: c4 04 60 b8 ld [ %l1 + 0xb8 ], %g2 <== NOT EXECUTED 400048e0: 84 08 bf fd and %g2, -3, %g2 <== NOT EXECUTED 400048e4: c4 24 60 b8 st %g2, [ %l1 + 0xb8 ] <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 400048e8: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 400048ec: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 400048f0: 12 80 00 22 bne 40004978 <== NOT EXECUTED 400048f4: c6 04 60 38 ld [ %l1 + 0x38 ], %g3 <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { 400048f8: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 400048fc: 06 80 00 4a bl 40004a24 <== NOT EXECUTED 40004900: 01 00 00 00 nop <== NOT EXECUTED tty->flow_ctrl |= FL_MDRTS; } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 40004904: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED 40004908: 03 00 00 04 sethi %hi(0x1000), %g1 <== NOT EXECUTED 4000490c: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED 40004910: 02 80 00 06 be 40004928 <== NOT EXECUTED 40004914: 80 88 a4 00 btst 0x400, %g2 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXOF; 40004918: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 4000491c: 82 10 64 00 or %g1, 0x400, %g1 <== NOT EXECUTED 40004920: 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) { 40004924: 80 88 a4 00 btst 0x400, %g2 <== NOT EXECUTED 40004928: 22 80 00 06 be,a 40004940 <== NOT EXECUTED 4000492c: c2 04 60 3c ld [ %l1 + 0x3c ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXON; 40004930: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40004934: 82 10 62 00 or %g1, 0x200, %g1 <== NOT EXECUTED 40004938: 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) { 4000493c: c2 04 60 3c ld [ %l1 + 0x3c ], %g1 <== NOT EXECUTED 40004940: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 40004944: 02 80 00 23 be 400049d0 <== NOT EXECUTED 40004948: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 4000494c: c0 24 60 6c clr [ %l1 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 40004950: c0 24 60 70 clr [ %l1 + 0x70 ] <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 40004954: c0 24 60 74 clr [ %l1 + 0x74 ] <== NOT EXECUTED else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 40004958: c2 04 60 a8 ld [ %l1 + 0xa8 ], %g1 <== NOT EXECUTED 4000495c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004960: 02 bf ff 5a be 400046c8 <== NOT EXECUTED 40004964: 01 00 00 00 nop <== NOT EXECUTED (*tty->device.setAttributes)(tty->minor, &tty->termios); 40004968: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED 4000496c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004970: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED 40004974: 30 bf ff 55 b,a 400046c8 <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 40004978: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 4000497c: 06 80 00 2a bl 40004a24 <== NOT EXECUTED 40004980: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 40004984: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40004988: 82 08 7e ff and %g1, -257, %g1 <== NOT EXECUTED 4000498c: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 40004990: c4 04 60 b8 ld [ %l1 + 0xb8 ], %g2 <== NOT EXECUTED 40004994: 80 88 a0 04 btst 4, %g2 <== NOT EXECUTED 40004998: 02 80 00 09 be 400049bc <== NOT EXECUTED 4000499c: 01 00 00 00 nop <== NOT EXECUTED 400049a0: c2 04 60 b0 ld [ %l1 + 0xb0 ], %g1 <== NOT EXECUTED 400049a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400049a8: 02 80 00 05 be 400049bc <== NOT EXECUTED 400049ac: 01 00 00 00 nop <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 400049b0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400049b4: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED 400049b8: c6 04 60 38 ld [ %l1 + 0x38 ], %g3 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 400049bc: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 400049c0: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED 400049c4: 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) { 400049c8: 10 bf ff cd b 400048fc <== NOT EXECUTED 400049cc: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { rtems_interval ticksPerSecond; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond); 400049d0: 40 00 02 24 call 40005260 <== NOT EXECUTED 400049d4: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10; 400049d8: d2 07 bf f4 ld [ %fp + -12 ], %o1 <== NOT EXECUTED 400049dc: e0 0c 60 46 ldub [ %l1 + 0x46 ], %l0 <== NOT EXECUTED 400049e0: 40 00 44 f2 call 40015da8 <.umul> <== NOT EXECUTED 400049e4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400049e8: 40 00 45 2a call 40015e90 <.udiv> <== NOT EXECUTED 400049ec: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED if (tty->termios.c_cc[VTIME]) { 400049f0: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 400049f4: 02 80 00 11 be 40004a38 <== NOT EXECUTED 400049f8: d0 24 60 54 st %o0, [ %l1 + 0x54 ] <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) 400049fc: c2 0c 60 47 ldub [ %l1 + 0x47 ], %g1 <== NOT EXECUTED else { rtems_interval ticksPerSecond; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond); tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10; if (tty->termios.c_cc[VTIME]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 40004a00: c0 24 60 6c clr [ %l1 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) 40004a04: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004a08: 12 bf ff d3 bne 40004954 <== NOT EXECUTED 40004a0c: d0 24 60 70 st %o0, [ %l1 + 0x70 ] <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 40004a10: 10 bf ff d2 b 40004958 <== NOT EXECUTED 40004a14: d0 24 60 74 st %o0, [ %l1 + 0x74 ] <== NOT EXECUTED #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; 40004a18: c2 04 60 64 ld [ %l1 + 0x64 ], %g1 <== NOT EXECUTED 40004a1c: 10 bf ff 7f b 40004818 <== NOT EXECUTED 40004a20: 88 01 00 01 add %g4, %g1, %g4 <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { tty->flow_ctrl |= FL_MDRTS; 40004a24: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40004a28: 82 10 61 00 or %g1, 0x100, %g1 <== NOT EXECUTED 40004a2c: 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) { 40004a30: 10 bf ff b6 b 40004908 <== NOT EXECUTED 40004a34: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 40004a38: c2 0c 60 47 ldub [ %l1 + 0x47 ], %g1 <== NOT EXECUTED 40004a3c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004a40: 32 bf ff c4 bne,a 40004950 <== NOT EXECUTED 40004a44: c0 24 60 6c clr [ %l1 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 40004a48: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40004a4c: 10 bf ff c3 b 40004958 <== NOT EXECUTED 40004a50: c2 24 60 6c st %g1, [ %l1 + 0x6c ] <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 40004a54: d2 04 60 84 ld [ %l1 + 0x84 ], %o1 <== NOT EXECUTED 40004a58: c2 04 60 7c ld [ %l1 + 0x7c ], %g1 <== NOT EXECUTED 40004a5c: c4 04 60 a4 ld [ %l1 + 0xa4 ], %g2 <== NOT EXECUTED 40004a60: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED 40004a64: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 40004a68: 9f c0 80 00 call %g2 <== NOT EXECUTED 40004a6c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 40004a70: 30 bf ff 8e b,a 400048a8 <== NOT EXECUTED 40004c50 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 40004c50: 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, 40004c54: 29 10 00 6a sethi %hi(0x4001a800), %l4 40004c58: d0 05 22 08 ld [ %l4 + 0x208 ], %o0 ! 4001aa08 40004c5c: 92 10 20 00 clr %o1 40004c60: 40 00 04 51 call 40005da4 40004c64: 94 10 20 00 clr %o2 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 40004c68: a4 92 20 00 orcc %o0, 0, %l2 40004c6c: 32 80 00 1e bne,a 40004ce4 40004c70: b0 10 00 12 mov %l2, %i0 <== NOT EXECUTED return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 40004c74: 27 10 00 6a sethi %hi(0x4001a800), %l3 40004c78: e0 04 e2 10 ld [ %l3 + 0x210 ], %l0 ! 4001aa10 40004c7c: 80 a4 20 00 cmp %l0, 0 40004c80: 32 80 00 08 bne,a 40004ca0 40004c84: c2 04 20 0c ld [ %l0 + 0xc ], %g1 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 40004c88: 10 80 00 19 b 40004cec 40004c8c: 90 10 20 01 mov 1, %o0 */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 40004c90: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40004c94: 02 80 00 16 be 40004cec <== NOT EXECUTED 40004c98: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED if ((tty->major == major) && (tty->minor == minor)) 40004c9c: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 40004ca0: 80 a0 40 18 cmp %g1, %i0 40004ca4: 32 bf ff fb bne,a 40004c90 40004ca8: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED 40004cac: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40004cb0: 80 a0 40 19 cmp %g1, %i1 40004cb4: 32 bf ff f7 bne,a 40004c90 40004cb8: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; if (!tty->refcount++) { 40004cbc: c2 04 20 08 ld [ %l0 + 8 ], %g1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 40004cc0: c4 06 80 00 ld [ %i2 ], %g2 if (!tty->refcount++) { 40004cc4: 82 00 60 01 inc %g1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 40004cc8: e0 20 a0 28 st %l0, [ %g2 + 0x28 ] if (!tty->refcount++) { 40004ccc: 80 a0 60 01 cmp %g1, 1 40004cd0: 02 80 00 1e be 40004d48 40004cd4: c2 24 20 08 st %g1, [ %l0 + 8 ] (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 40004cd8: 40 00 05 02 call 400060e0 40004cdc: d0 05 22 08 ld [ %l4 + 0x208 ], %o0 return RTEMS_SUCCESSFUL; } 40004ce0: b0 10 00 12 mov %l2, %i0 40004ce4: 81 c7 e0 08 ret 40004ce8: 81 e8 00 00 restore static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 40004cec: 7f ff f6 33 call 400025b8 40004cf0: 92 10 20 e8 mov 0xe8, %o1 if (tty == NULL) { 40004cf4: a2 92 20 00 orcc %o0, 0, %l1 40004cf8: 12 80 00 06 bne 40004d10 40004cfc: d0 05 22 08 ld [ %l4 + 0x208 ], %o0 */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); if (tty->rawInBuf.theBuf == NULL) { free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 40004d00: 40 00 04 f8 call 400060e0 <== NOT EXECUTED 40004d04: a4 10 20 1a mov 0x1a, %l2 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); return RTEMS_SUCCESSFUL; } 40004d08: 81 c7 e0 08 ret <== NOT EXECUTED 40004d0c: 91 e8 00 12 restore %g0, %l2, %o0 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 40004d10: 03 10 00 67 sethi %hi(0x40019c00), %g1 40004d14: c4 00 62 08 ld [ %g1 + 0x208 ], %g2 ! 40019e08 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 40004d18: a0 10 00 11 mov %l1, %l0 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 40004d1c: c4 24 60 64 st %g2, [ %l1 + 0x64 ] tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 40004d20: d0 04 60 64 ld [ %l1 + 0x64 ], %o0 40004d24: 7f ff f5 87 call 40002340 40004d28: 01 00 00 00 nop if (tty->rawInBuf.theBuf == NULL) { 40004d2c: 80 a2 20 00 cmp %o0, 0 40004d30: 12 80 00 25 bne 40004dc4 40004d34: d0 24 60 58 st %o0, [ %l1 + 0x58 ] free(tty); 40004d38: 7f ff f5 59 call 4000229c <== NOT EXECUTED 40004d3c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 40004d40: 10 bf ff f0 b 40004d00 <== NOT EXECUTED 40004d44: d0 05 22 08 ld [ %l4 + 0x208 ], %o0 <== NOT EXECUTED c = 'a'; } args->iop->data1 = tty; if (!tty->refcount++) { if (tty->device.firstOpen) 40004d48: c2 04 20 98 ld [ %l0 + 0x98 ], %g1 40004d4c: 80 a0 60 00 cmp %g1, 0 40004d50: 02 80 00 05 be 40004d64 40004d54: 90 10 00 18 mov %i0, %o0 (*tty->device.firstOpen)(major, minor, arg); 40004d58: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40004d5c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004d60: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40004d64: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 40004d68: 80 a0 60 02 cmp %g1, 2 40004d6c: 12 bf ff db bne 40004cd8 40004d70: 13 10 00 14 sethi %hi(0x40005000), %o1 sc = rtems_task_start(tty->rxTaskId, 40004d74: d0 04 20 c4 ld [ %l0 + 0xc4 ], %o0 <== NOT EXECUTED 40004d78: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 40004d7c: 40 00 06 26 call 40006614 <== NOT EXECUTED 40004d80: 92 12 61 24 or %o1, 0x124, %o1 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 40004d84: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004d88: 22 80 00 05 be,a 40004d9c <== NOT EXECUTED 40004d8c: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40004d90: 40 00 07 22 call 40006a18 <== NOT EXECUTED 40004d94: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_task_start(tty->txTaskId, 40004d98: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0 <== NOT EXECUTED 40004d9c: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 40004da0: 13 10 00 14 sethi %hi(0x40005000), %o1 <== NOT EXECUTED 40004da4: 40 00 06 1c call 40006614 <== NOT EXECUTED 40004da8: 92 12 61 b4 or %o1, 0x1b4, %o1 ! 400051b4 <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 40004dac: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004db0: 02 bf ff ca be 40004cd8 <== NOT EXECUTED 40004db4: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40004db8: 40 00 07 18 call 40006a18 <== NOT EXECUTED 40004dbc: 01 00 00 00 nop <== NOT EXECUTED 40004dc0: 30 bf ff c6 b,a 40004cd8 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 40004dc4: 03 10 00 67 sethi %hi(0x40019c00), %g1 40004dc8: c4 00 62 0c ld [ %g1 + 0x20c ], %g2 ! 40019e0c 40004dcc: c4 24 60 88 st %g2, [ %l1 + 0x88 ] tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 40004dd0: d0 04 60 88 ld [ %l1 + 0x88 ], %o0 40004dd4: 7f ff f5 5b call 40002340 40004dd8: 01 00 00 00 nop if (tty->rawOutBuf.theBuf == NULL) { 40004ddc: 80 a2 20 00 cmp %o0, 0 40004de0: 12 80 00 0b bne 40004e0c 40004de4: d0 24 60 7c st %o0, [ %l1 + 0x7c ] free((void *)(tty->rawInBuf.theBuf)); 40004de8: d0 04 60 58 ld [ %l1 + 0x58 ], %o0 <== NOT EXECUTED free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 40004dec: a4 10 20 1a mov 0x1a, %l2 <== NOT EXECUTED * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); free((void *)(tty->rawInBuf.theBuf)); 40004df0: 7f ff f5 2b call 4000229c <== NOT EXECUTED 40004df4: b0 10 00 12 mov %l2, %i0 <== NOT EXECUTED free(tty); 40004df8: 7f ff f5 29 call 4000229c <== NOT EXECUTED 40004dfc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 40004e00: 40 00 04 b8 call 400060e0 <== NOT EXECUTED 40004e04: d0 05 22 08 ld [ %l4 + 0x208 ], %o0 <== NOT EXECUTED 40004e08: 30 bf ff b7 b,a 40004ce4 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 40004e0c: 03 10 00 67 sethi %hi(0x40019c00), %g1 40004e10: 7f ff f5 4c call 40002340 40004e14: d0 00 62 04 ld [ %g1 + 0x204 ], %o0 ! 40019e04 if (tty->cbuf == NULL) { 40004e18: 80 a2 20 00 cmp %o0, 0 40004e1c: 12 80 00 07 bne 40004e38 40004e20: d0 24 60 1c st %o0, [ %l1 + 0x1c ] free((void *)(tty->rawOutBuf.theBuf)); 40004e24: d0 04 60 7c ld [ %l1 + 0x7c ], %o0 <== NOT EXECUTED 40004e28: 7f ff f5 1d call 4000229c <== NOT EXECUTED 40004e2c: a4 10 20 1a mov 0x1a, %l2 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 40004e30: 10 bf ff f0 b 40004df0 <== NOT EXECUTED 40004e34: d0 04 60 58 ld [ %l1 + 0x58 ], %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 40004e38: c2 04 e2 10 ld [ %l3 + 0x210 ], %g1 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 40004e3c: c0 24 60 d4 clr [ %l1 + 0xd4 ] tty->tty_snd.sw_arg = NULL; 40004e40: c0 24 60 d8 clr [ %l1 + 0xd8 ] tty->tty_rcv.sw_pfn = NULL; 40004e44: c0 24 60 dc clr [ %l1 + 0xdc ] tty->tty_rcv.sw_arg = NULL; 40004e48: c0 24 60 e0 clr [ %l1 + 0xe0 ] tty->tty_rcvwakeup = 0; 40004e4c: c0 24 60 e4 clr [ %l1 + 0xe4 ] /* * link tty */ tty->forw = rtems_termios_ttyHead; 40004e50: c2 24 40 00 st %g1, [ %l1 ] tty->back = NULL; if (rtems_termios_ttyHead != NULL) 40004e54: 80 a0 60 00 cmp %g1, 0 40004e58: 02 80 00 03 be 40004e64 40004e5c: c0 24 60 04 clr [ %l1 + 4 ] rtems_termios_ttyHead->back = tty; 40004e60: e2 20 60 04 st %l1, [ %g1 + 4 ] <== NOT EXECUTED rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 40004e64: 07 10 00 6a sethi %hi(0x4001a800), %g3 40004e68: c4 00 e2 0c ld [ %g3 + 0x20c ], %g2 ! 4001aa0c */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 40004e6c: 03 10 00 6a sethi %hi(0x4001a800), %g1 if (rtems_termios_ttyTail == NULL) 40004e70: 80 a0 a0 00 cmp %g2, 0 40004e74: 02 80 00 72 be 4000503c 40004e78: e0 20 62 10 st %l0, [ %g1 + 0x210 ] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 40004e7c: 27 10 00 67 sethi %hi(0x40019c00), %l3 40004e80: c2 4c e2 10 ldsb [ %l3 + 0x210 ], %g1 ! 40019e10 40004e84: 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; 40004e88: f2 24 20 10 st %i1, [ %l0 + 0x10 ] tty->major = major; 40004e8c: f0 24 20 0c st %i0, [ %l0 + 0xc ] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 40004e90: 90 12 21 00 or %o0, 0x100, %o0 40004e94: 92 10 20 01 mov 1, %o1 40004e98: 90 10 40 08 or %g1, %o0, %o0 40004e9c: 94 10 20 54 mov 0x54, %o2 40004ea0: 96 10 20 00 clr %o3 40004ea4: 40 00 02 e9 call 40005a48 40004ea8: 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) 40004eac: 80 a2 20 00 cmp %o0, 0 40004eb0: 12 80 00 99 bne 40005114 40004eb4: 01 00 00 00 nop rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 40004eb8: c2 4c e2 10 ldsb [ %l3 + 0x210 ], %g1 40004ebc: 11 15 14 9b sethi %hi(0x54526c00), %o0 40004ec0: 92 10 20 01 mov 1, %o1 40004ec4: 90 12 23 00 or %o0, 0x300, %o0 40004ec8: 94 10 20 54 mov 0x54, %o2 40004ecc: 90 10 40 08 or %g1, %o0, %o0 40004ed0: 96 10 20 00 clr %o3 40004ed4: 40 00 02 dd call 40005a48 40004ed8: 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) 40004edc: 80 a2 20 00 cmp %o0, 0 40004ee0: 12 80 00 89 bne 40005104 40004ee4: 01 00 00 00 nop rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 40004ee8: c2 4c e2 10 ldsb [ %l3 + 0x210 ], %g1 40004eec: 11 15 14 9e sethi %hi(0x54527800), %o0 40004ef0: 92 10 20 00 clr %o1 40004ef4: 90 10 40 08 or %g1, %o0, %o0 40004ef8: 94 10 20 20 mov 0x20, %o2 40004efc: 96 10 20 00 clr %o3 40004f00: 40 00 02 d2 call 40005a48 40004f04: 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) 40004f08: 80 a2 20 00 cmp %o0, 0 40004f0c: 12 80 00 7a bne 400050f4 40004f10: 01 00 00 00 nop rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 40004f14: c0 24 20 94 clr [ %l0 + 0x94 ] /* * Set callbacks */ tty->device = *callbacks; 40004f18: 92 10 00 1b mov %i3, %o1 40004f1c: 90 04 20 98 add %l0, 0x98, %o0 40004f20: 40 00 29 88 call 4000f540 40004f24: 94 10 20 20 mov 0x20, %o2 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40004f28: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 40004f2c: 80 a0 60 02 cmp %g1, 2 40004f30: 02 80 00 54 be 40005080 40004f34: c2 4c e2 10 ldsb [ %l3 + 0x210 ], %g1 &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 40004f38: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 40004f3c: 80 a0 60 00 cmp %g1, 0 40004f40: 02 80 00 41 be 40005044 40004f44: c2 4c e2 10 ldsb [ %l3 + 0x210 ], %g1 40004f48: c2 04 60 b4 ld [ %l1 + 0xb4 ], %g1 40004f4c: 80 a0 60 02 cmp %g1, 2 40004f50: 02 80 00 3d be 40005044 40004f54: c2 4c e2 10 ldsb [ %l3 + 0x210 ], %g1 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 40004f58: c8 0c e2 10 ldub [ %l3 + 0x210 ], %g4 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; 40004f5c: c0 24 60 b8 clr [ %l1 + 0xb8 ] /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 40004f60: c2 04 60 64 ld [ %l1 + 0x64 ], %g1 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 40004f64: 88 01 20 01 inc %g4 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; 40004f68: da 04 60 64 ld [ %l1 + 0x64 ], %o5 /* 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; 40004f6c: 83 30 60 01 srl %g1, 1, %g1 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 40004f70: c8 2c e2 10 stb %g4, [ %l3 + 0x210 ] /* 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; 40004f74: c2 24 60 bc st %g1, [ %l1 + 0xbc ] } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 40004f78: 03 00 00 09 sethi %hi(0x2400), %g1 40004f7c: 82 10 61 02 or %g1, 0x102, %g1 ! 2502 tty->termios.c_oflag = OPOST | ONLCR | XTABS; 40004f80: 05 00 00 06 sethi %hi(0x1800), %g2 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 40004f84: c2 24 60 30 st %g1, [ %l1 + 0x30 ] tty->termios.c_oflag = OPOST | ONLCR | XTABS; 40004f88: 84 10 a0 05 or %g2, 5, %g2 tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 40004f8c: 03 00 00 20 sethi %hi(0x8000), %g1 40004f90: 82 10 62 3b or %g1, 0x23b, %g1 ! 823b /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 40004f94: c4 24 60 34 st %g2, [ %l1 + 0x34 ] tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 40004f98: c2 24 60 3c st %g1, [ %l1 + 0x3c ] tty->termios.c_cc[VINTR] = '\003'; 40004f9c: 84 10 20 03 mov 3, %g2 tty->termios.c_cc[VQUIT] = '\034'; 40004fa0: 82 10 20 1c mov 0x1c, %g1 tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 40004fa4: c4 2c 60 41 stb %g2, [ %l1 + 0x41 ] tty->termios.c_cc[VQUIT] = '\034'; 40004fa8: c2 2c 60 42 stb %g1, [ %l1 + 0x42 ] tty->termios.c_cc[VERASE] = '\177'; 40004fac: 84 10 20 7f mov 0x7f, %g2 tty->termios.c_cc[VKILL] = '\025'; 40004fb0: 82 10 20 15 mov 0x15, %g1 tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; 40004fb4: c4 2c 60 43 stb %g2, [ %l1 + 0x43 ] tty->termios.c_cc[VKILL] = '\025'; 40004fb8: c2 2c 60 44 stb %g1, [ %l1 + 0x44 ] tty->termios.c_cc[VEOF] = '\004'; 40004fbc: 84 10 20 04 mov 4, %g2 tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 40004fc0: 82 10 20 11 mov 0x11, %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'; 40004fc4: c4 2c 60 45 stb %g2, [ %l1 + 0x45 ] tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 40004fc8: c2 2c 60 49 stb %g1, [ %l1 + 0x49 ] tty->termios.c_cc[VSTOP] = '\023'; 40004fcc: 84 10 20 13 mov 0x13, %g2 tty->termios.c_cc[VSUSP] = '\032'; 40004fd0: 82 10 20 1a mov 0x1a, %g1 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 40004fd4: 86 10 28 bd mov 0x8bd, %g3 tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; 40004fd8: c4 2c 60 4a stb %g2, [ %l1 + 0x4a ] tty->termios.c_cc[VSUSP] = '\032'; 40004fdc: c2 2c 60 4b stb %g1, [ %l1 + 0x4b ] tty->termios.c_cc[VREPRINT] = '\022'; 40004fe0: 84 10 20 12 mov 0x12, %g2 tty->termios.c_cc[VDISCARD] = '\017'; 40004fe4: 82 10 20 0f mov 0xf, %g1 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 40004fe8: c6 24 60 38 st %g3, [ %l1 + 0x38 ] tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; 40004fec: c4 2c 60 4d stb %g2, [ %l1 + 0x4d ] tty->termios.c_cc[VDISCARD] = '\017'; 40004ff0: c2 2c 60 4e stb %g1, [ %l1 + 0x4e ] tty->termios.c_cc[VWERASE] = '\027'; 40004ff4: 84 10 20 17 mov 0x17, %g2 tty->termios.c_cc[VLNEXT] = '\026'; 40004ff8: 86 10 20 16 mov 0x16, %g3 tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 40004ffc: 83 2b 60 01 sll %o5, 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'; 40005000: c0 2c 60 4c clrb [ %l1 + 0x4c ] 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; 40005004: 82 00 40 0d add %g1, %o5, %g1 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'; 40005008: 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; 4000500c: 83 30 60 02 srl %g1, 2, %g1 tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; 40005010: c4 2c 60 4f stb %g2, [ %l1 + 0x4f ] tty->termios.c_cc[VLNEXT] = '\026'; 40005014: c6 2c 60 50 stb %g3, [ %l1 + 0x50 ] tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 40005018: 89 29 20 18 sll %g4, 0x18, %g4 4000501c: 89 39 20 18 sra %g4, 0x18, %g4 40005020: 80 a1 20 7b cmp %g4, 0x7b 40005024: 12 bf ff 26 bne 40004cbc 40005028: c2 24 60 c0 st %g1, [ %l1 + 0xc0 ] c = 'a'; 4000502c: 84 10 20 61 mov 0x61, %g2 <== NOT EXECUTED 40005030: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED 40005034: 10 bf ff 22 b 40004cbc <== NOT EXECUTED 40005038: c4 28 62 10 stb %g2, [ %g1 + 0x210 ] ! 40019e10 <== NOT EXECUTED tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; 4000503c: 10 bf ff 90 b 40004e7c 40005040: e0 20 e2 0c st %l0, [ %g3 + 0x20c ] rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 40005044: 11 15 14 9c sethi %hi(0x54527000), %o0 <== NOT EXECUTED 40005048: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000504c: 90 12 22 00 or %o0, 0x200, %o0 <== NOT EXECUTED 40005050: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED 40005054: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED 40005058: 96 10 20 00 clr %o3 <== NOT EXECUTED 4000505c: 40 00 02 7b call 40005a48 <== NOT EXECUTED 40005060: 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) 40005064: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005068: 22 bf ff bd be,a 40004f5c <== NOT EXECUTED 4000506c: c8 0c e2 10 ldub [ %l3 + 0x210 ], %g4 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40005070: 40 00 06 6a call 40006a18 <== NOT EXECUTED 40005074: 01 00 00 00 nop <== NOT EXECUTED tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 40005078: 10 bf ff b9 b 40004f5c <== NOT EXECUTED 4000507c: c8 0c e2 10 ldub [ %l3 + 0x210 ], %g4 <== NOT EXECUTED /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 40005080: 11 15 1e 15 sethi %hi(0x54785400), %o0 <== NOT EXECUTED 40005084: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 40005088: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED 4000508c: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED 40005090: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED 40005094: 98 10 20 00 clr %o4 <== NOT EXECUTED 40005098: 40 00 04 5f call 40006214 <== NOT EXECUTED 4000509c: 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) 400050a0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400050a4: 02 80 00 05 be 400050b8 <== NOT EXECUTED 400050a8: c2 4c e2 10 ldsb [ %l3 + 0x210 ], %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 400050ac: 40 00 06 5b call 40006a18 <== NOT EXECUTED 400050b0: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_task_create ( 400050b4: c2 4c e2 10 ldsb [ %l3 + 0x210 ], %g1 <== NOT EXECUTED 400050b8: 11 14 9e 15 sethi %hi(0x52785400), %o0 <== NOT EXECUTED 400050bc: 92 10 20 09 mov 9, %o1 <== NOT EXECUTED 400050c0: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED 400050c4: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED 400050c8: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED 400050cc: 98 10 20 00 clr %o4 <== NOT EXECUTED 400050d0: 40 00 04 51 call 40006214 <== NOT EXECUTED 400050d4: 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) 400050d8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400050dc: 22 bf ff 98 be,a 40004f3c <== NOT EXECUTED 400050e0: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 400050e4: 40 00 06 4d call 40006a18 <== NOT EXECUTED 400050e8: 01 00 00 00 nop <== NOT EXECUTED } if ((tty->device.pollRead == NULL) || 400050ec: 10 bf ff 94 b 40004f3c <== NOT EXECUTED 400050f0: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 <== NOT EXECUTED 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 400050f4: 40 00 06 49 call 40006a18 <== NOT EXECUTED 400050f8: 01 00 00 00 nop <== NOT EXECUTED tty->rawOutBufState = rob_idle; 400050fc: 10 bf ff 87 b 40004f18 <== NOT EXECUTED 40005100: c0 24 20 94 clr [ %l0 + 0x94 ] <== NOT EXECUTED 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->osem); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 40005104: 40 00 06 45 call 40006a18 <== NOT EXECUTED 40005108: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_semaphore_create ( 4000510c: 10 bf ff 78 b 40004eec <== NOT EXECUTED 40005110: c2 4c e2 10 ldsb [ %l3 + 0x210 ], %g1 <== NOT EXECUTED 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->isem); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 40005114: 40 00 06 41 call 40006a18 <== NOT EXECUTED 40005118: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_semaphore_create ( 4000511c: 10 bf ff 68 b 40004ebc <== NOT EXECUTED 40005120: c2 4c e2 10 ldsb [ %l3 + 0x210 ], %g1 <== NOT EXECUTED 400038c4 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 400038c4: 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) { 400038c8: c2 06 a0 b4 ld [ %i2 + 0xb4 ], %g1 400038cc: 80 a0 60 00 cmp %g1, 0 400038d0: 22 80 00 4c be,a 40003a00 400038d4: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; 400038d8: e4 06 a0 80 ld [ %i2 + 0x80 ], %l2 <== NOT EXECUTED while (len) { 400038dc: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 400038e0: 02 80 00 4c be 40003a10 <== NOT EXECUTED 400038e4: 01 00 00 00 nop <== NOT EXECUTED * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 400038e8: d2 06 a0 88 ld [ %i2 + 0x88 ], %o1 <== NOT EXECUTED 400038ec: 40 00 4a 15 call 40016140 <.urem> <== NOT EXECUTED 400038f0: 90 04 a0 01 add %l2, 1, %o0 <== NOT EXECUTED rtems_interrupt_disable (level); 400038f4: 7f ff f9 40 call 40001df4 <== NOT EXECUTED 400038f8: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED 400038fc: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED while (newHead == tty->rawOutBuf.Tail) { 40003900: e2 06 a0 84 ld [ %i2 + 0x84 ], %l1 <== NOT EXECUTED 40003904: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED 40003908: 02 80 00 0a be 40003930 <== NOT EXECUTED 4000390c: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 40003910: 30 80 00 1b b,a 4000397c <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 40003914: 7f ff f9 38 call 40001df4 <== NOT EXECUTED 40003918: 01 00 00 00 nop <== NOT EXECUTED 4000391c: 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) { 40003920: c2 06 a0 84 ld [ %i2 + 0x84 ], %g1 <== NOT EXECUTED 40003924: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED 40003928: 12 80 00 15 bne 4000397c <== NOT EXECUTED 4000392c: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED tty->rawOutBufState = rob_wait; 40003930: c2 26 a0 94 st %g1, [ %i2 + 0x94 ] <== NOT EXECUTED rtems_interrupt_enable (level); 40003934: 7f ff f9 34 call 40001e04 <== NOT EXECUTED 40003938: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 4000393c: d0 06 a0 8c ld [ %i2 + 0x8c ], %o0 <== NOT EXECUTED 40003940: 92 10 20 00 clr %o1 <== NOT EXECUTED 40003944: 40 00 09 18 call 40005da4 <== NOT EXECUTED 40003948: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 4000394c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003950: 02 bf ff f1 be 40003914 <== NOT EXECUTED 40003954: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40003958: 40 00 0c 30 call 40006a18 <== NOT EXECUTED 4000395c: 01 00 00 00 nop <== NOT EXECUTED rtems_interrupt_disable (level); 40003960: 7f ff f9 25 call 40001df4 <== NOT EXECUTED 40003964: 01 00 00 00 nop <== NOT EXECUTED 40003968: 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) { 4000396c: c2 06 a0 84 ld [ %i2 + 0x84 ], %g1 <== NOT EXECUTED 40003970: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED 40003974: 02 bf ff ef be 40003930 <== NOT EXECUTED 40003978: 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++; 4000397c: c8 06 a0 80 ld [ %i2 + 0x80 ], %g4 <== NOT EXECUTED 40003980: c4 0e 00 00 ldub [ %i0 ], %g2 <== NOT EXECUTED 40003984: c2 06 a0 7c ld [ %i2 + 0x7c ], %g1 <== NOT EXECUTED 40003988: c4 28 40 04 stb %g2, [ %g1 + %g4 ] <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 4000398c: c6 06 a0 94 ld [ %i2 + 0x94 ], %g3 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; 40003990: e4 26 a0 80 st %l2, [ %i2 + 0x80 ] <== NOT EXECUTED if (tty->rawOutBufState == rob_idle) { 40003994: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40003998: 12 80 00 0b bne 400039c4 <== NOT EXECUTED 4000399c: 01 00 00 00 nop <== NOT EXECUTED /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 400039a0: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED 400039a4: 80 88 60 10 btst 0x10, %g1 <== NOT EXECUTED 400039a8: 02 80 00 0d be 400039dc <== NOT EXECUTED 400039ac: 01 00 00 00 nop <== NOT EXECUTED (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; 400039b0: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED 400039b4: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED 400039b8: c2 26 a0 b8 st %g1, [ %i2 + 0xb8 ] <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 400039bc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 400039c0: c2 26 a0 94 st %g1, [ %i2 + 0x94 ] <== NOT EXECUTED } rtems_interrupt_enable (level); 400039c4: 7f ff f9 10 call 40001e04 <== NOT EXECUTED 400039c8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 400039cc: b2 86 7f ff addcc %i1, -1, %i1 <== NOT EXECUTED 400039d0: 02 80 00 10 be 40003a10 <== NOT EXECUTED 400039d4: b0 06 20 01 inc %i0 <== NOT EXECUTED 400039d8: 30 bf ff c4 b,a 400038e8 <== NOT EXECUTED tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { (*tty->device.write)(tty->minor, 400039dc: d2 06 a0 84 ld [ %i2 + 0x84 ], %o1 <== NOT EXECUTED 400039e0: c2 06 a0 7c ld [ %i2 + 0x7c ], %g1 <== NOT EXECUTED 400039e4: c4 06 a0 a4 ld [ %i2 + 0xa4 ], %g2 <== NOT EXECUTED 400039e8: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 <== NOT EXECUTED 400039ec: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 400039f0: 9f c0 80 00 call %g2 <== NOT EXECUTED 400039f4: 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; 400039f8: 10 bf ff f2 b 400039c0 <== NOT EXECUTED 400039fc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); 40003a00: c2 06 a0 a4 ld [ %i2 + 0xa4 ], %g1 40003a04: 92 10 00 18 mov %i0, %o1 40003a08: 9f c0 40 00 call %g1 40003a0c: 94 10 00 19 mov %i1, %o2 40003a10: 81 c7 e0 08 ret 40003a14: 81 e8 00 00 restore 4000423c : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 4000423c: 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; 40004240: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED uint32_t count = args->count; 40004244: e2 06 20 0c ld [ %i0 + 0xc ], %l1 <== 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; 40004248: e0 00 60 28 ld [ %g1 + 0x28 ], %l0 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; 4000424c: e4 06 20 08 ld [ %i0 + 8 ], %l2 <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40004250: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 40004254: 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); 40004258: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000425c: 40 00 06 d2 call 40005da4 <== NOT EXECUTED 40004260: 94 10 20 00 clr %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 40004264: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40004268: 12 80 00 10 bne 400042a8 <== NOT EXECUTED 4000426c: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 40004270: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED 40004274: 82 10 60 04 or %g1, 4, %g1 <== NOT EXECUTED 40004278: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 4000427c: 84 00 80 01 add %g2, %g1, %g2 <== NOT EXECUTED 40004280: c2 00 a0 08 ld [ %g2 + 8 ], %g1 <== NOT EXECUTED 40004284: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004288: 02 80 00 0a be 400042b0 <== NOT EXECUTED 4000428c: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 40004290: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004294: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40004298: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 4000429c: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED 400042a0: 40 00 07 90 call 400060e0 <== NOT EXECUTED 400042a4: c0 24 20 e4 clr [ %l0 + 0xe4 ] <== NOT EXECUTED 400042a8: 81 c7 e0 08 ret <== NOT EXECUTED 400042ac: 81 e8 00 00 restore <== NOT EXECUTED return sc; } if (tty->cindex == tty->ccount) { 400042b0: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED 400042b4: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 400042b8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400042bc: 22 80 00 20 be,a 4000433c <== NOT EXECUTED 400042c0: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 400042c4: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 400042c8: 22 80 00 16 be,a 40004320 <== NOT EXECUTED 400042cc: c2 05 20 0c ld [ %l4 + 0xc ], %g1 <== NOT EXECUTED 400042d0: c6 04 20 24 ld [ %l0 + 0x24 ], %g3 <== NOT EXECUTED 400042d4: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 400042d8: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 400042dc: 26 80 00 09 bl,a 40004300 <== NOT EXECUTED 400042e0: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 400042e4: 10 80 00 0f b 40004320 <== NOT EXECUTED 400042e8: c2 05 20 0c ld [ %l4 + 0xc ], %g1 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 400042ec: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 400042f0: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 400042f4: 24 80 00 0b ble,a 40004320 <== NOT EXECUTED 400042f8: c2 05 20 0c ld [ %l4 + 0xc ], %g1 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 400042fc: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 40004300: a2 84 7f ff addcc %l1, -1, %l1 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 40004304: c4 08 40 03 ldub [ %g1 + %g3 ], %g2 <== NOT EXECUTED 40004308: 86 00 e0 01 inc %g3 <== NOT EXECUTED 4000430c: c4 2c 80 00 stb %g2, [ %l2 ] <== NOT EXECUTED 40004310: c6 24 20 24 st %g3, [ %l0 + 0x24 ] <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 40004314: 12 bf ff f6 bne 400042ec <== NOT EXECUTED 40004318: a4 04 a0 01 inc %l2 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 4000431c: c2 05 20 0c ld [ %l4 + 0xc ], %g1 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 40004320: 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; 40004324: 82 20 40 11 sub %g1, %l1, %g1 <== NOT EXECUTED 40004328: c2 25 20 14 st %g1, [ %l4 + 0x14 ] <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 4000432c: 40 00 07 6d call 400060e0 <== NOT EXECUTED 40004330: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED return sc; } 40004334: 81 c7 e0 08 ret <== NOT EXECUTED 40004338: 81 e8 00 00 restore <== NOT EXECUTED return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 4000433c: 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; 40004340: 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; 40004344: c0 24 20 20 clr [ %l0 + 0x20 ] <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 40004348: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000434c: 02 80 00 06 be 40004364 <== NOT EXECUTED 40004350: c0 24 20 24 clr [ %l0 + 0x24 ] <== NOT EXECUTED 40004354: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 <== NOT EXECUTED 40004358: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000435c: 22 80 00 51 be,a 400044a0 <== NOT EXECUTED 40004360: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; 40004364: e6 04 20 74 ld [ %l0 + 0x74 ], %l3 <== NOT EXECUTED 40004368: aa 10 20 01 mov 1, %l5 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 4000436c: 2d 10 00 67 sethi %hi(0x40019c00), %l6 <== 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, 40004370: ae 04 20 49 add %l0, 0x49, %l7 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 40004374: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 <== NOT EXECUTED 40004378: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 4000437c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004380: 02 80 00 3e be 40004478 <== NOT EXECUTED 40004384: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED 40004388: c2 05 a2 04 ld [ %l6 + 0x204 ], %g1 <== NOT EXECUTED 4000438c: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 40004390: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40004394: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004398: 16 80 00 38 bge 40004478 <== NOT EXECUTED 4000439c: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 400043a0: d0 04 20 5c ld [ %l0 + 0x5c ], %o0 <== NOT EXECUTED 400043a4: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 400043a8: 40 00 47 66 call 40016140 <.urem> <== NOT EXECUTED 400043ac: 90 02 20 01 inc %o0 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 400043b0: 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; 400043b4: 84 10 00 08 mov %o0, %g2 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 400043b8: e6 08 40 08 ldub [ %g1 + %o0 ], %l3 <== NOT EXECUTED tty->rawInBuf.Head = newHead; 400043bc: d0 24 20 5c st %o0, [ %l0 + 0x5c ] <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 400043c0: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 400043c4: d0 04 20 64 ld [ %l0 + 0x64 ], %o0 <== NOT EXECUTED 400043c8: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 400043cc: 90 02 00 01 add %o0, %g1, %o0 <== NOT EXECUTED 400043d0: 40 00 47 5c call 40016140 <.urem> <== NOT EXECUTED 400043d4: 90 22 00 02 sub %o0, %g2, %o0 <== NOT EXECUTED 400043d8: c2 04 20 bc ld [ %l0 + 0xbc ], %g1 <== NOT EXECUTED 400043dc: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 400043e0: 3a 80 00 18 bcc,a 40004440 <== NOT EXECUTED 400043e4: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 400043e8: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400043ec: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED 400043f0: 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)) 400043f4: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED 400043f8: 84 08 a2 02 and %g2, 0x202, %g2 <== NOT EXECUTED 400043fc: 80 a0 a2 02 cmp %g2, 0x202 <== NOT EXECUTED 40004400: 22 80 00 88 be,a 40004620 <== NOT EXECUTED 40004404: c2 04 20 94 ld [ %l0 + 0x94 ], %g1 <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 40004408: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 4000440c: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 40004410: 22 80 00 0c be,a 40004440 <== NOT EXECUTED 40004414: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 40004418: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 4000441c: 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; 40004420: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED 40004424: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 40004428: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000442c: 22 80 00 05 be,a 40004440 <== NOT EXECUTED 40004430: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 40004434: 9f c0 80 00 call %g2 <== NOT EXECUTED 40004438: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 4000443c: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 40004440: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 40004444: 02 80 00 63 be 400045d0 <== NOT EXECUTED 40004448: 90 0c e0 ff and %l3, 0xff, %o0 <== NOT EXECUTED if (siproc (c, tty)) 4000444c: 7f ff ff 07 call 40004068 <== NOT EXECUTED 40004450: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40004454: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004458: 32 80 00 02 bne,a 40004460 <== NOT EXECUTED 4000445c: aa 10 20 00 clr %l5 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 40004460: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 <== NOT EXECUTED 40004464: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 40004468: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4000446c: 12 bf ff c7 bne 40004388 <== NOT EXECUTED 40004470: e6 04 20 70 ld [ %l0 + 0x70 ], %l3 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 40004474: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED 40004478: 02 bf ff 94 be 400042c8 <== NOT EXECUTED 4000447c: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 40004480: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED 40004484: d2 04 20 6c ld [ %l0 + 0x6c ], %o1 <== NOT EXECUTED 40004488: 40 00 06 47 call 40005da4 <== NOT EXECUTED 4000448c: 94 10 00 13 mov %l3, %o2 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 40004490: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004494: 02 bf ff b8 be 40004374 <== NOT EXECUTED 40004498: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 4000449c: 30 bf ff 8b b,a 400042c8 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 400044a0: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 400044a4: 12 80 00 3a bne 4000458c <== NOT EXECUTED 400044a8: 01 00 00 00 nop <== NOT EXECUTED } } } else { rtems_interval then, now; if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 400044ac: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED 400044b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400044b4: 12 80 00 07 bne 400044d0 <== NOT EXECUTED 400044b8: aa 07 bf f4 add %fp, -12, %l5 <== NOT EXECUTED 400044bc: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED 400044c0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400044c4: 12 80 00 3f bne 400045c0 <== NOT EXECUTED 400044c8: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED else { siproc (n, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); 400044cc: 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); 400044d0: a6 07 bf f0 add %fp, -16, %l3 <== 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); 400044d4: 9f c0 80 00 call %g2 <== NOT EXECUTED 400044d8: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 400044dc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400044e0: 26 80 00 17 bl,a 4000453c <== NOT EXECUTED 400044e4: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED } } rtems_task_wake_after (1); } else { siproc (n, tty); 400044e8: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED 400044ec: 7f ff fe df call 40004068 <== NOT EXECUTED 400044f0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 400044f4: c4 0c 20 47 ldub [ %l0 + 0x47 ], %g2 <== NOT EXECUTED 400044f8: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 400044fc: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40004500: 16 bf ff 71 bge 400042c4 <== NOT EXECUTED 40004504: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 40004508: 22 80 00 07 be,a 40004524 <== NOT EXECUTED 4000450c: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 <== NOT EXECUTED 40004510: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED 40004514: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004518: 12 80 00 26 bne 400045b0 <== NOT EXECUTED 4000451c: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED 40004520: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 <== NOT EXECUTED else { rtems_interval then, now; if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); for (;;) { n = (*tty->device.pollRead)(tty->minor); 40004524: 9f c0 80 00 call %g2 <== NOT EXECUTED 40004528: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 4000452c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004530: 36 bf ff ef bge,a 400044ec <== NOT EXECUTED 40004534: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 40004538: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED 4000453c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004540: 02 80 00 2c be 400045f0 <== NOT EXECUTED 40004544: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 40004548: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000454c: 02 80 00 06 be 40004564 <== NOT EXECUTED 40004550: 01 00 00 00 nop <== NOT EXECUTED 40004554: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40004558: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000455c: 12 80 00 28 bne 400045fc <== NOT EXECUTED 40004560: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 40004564: 40 00 08 6f call 40006720 <== NOT EXECUTED 40004568: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000456c: 10 bf ff da b 400044d4 <== NOT EXECUTED 40004570: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 <== NOT EXECUTED n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); } else { if (siproc (n, tty)) 40004574: 7f ff fe bd call 40004068 <== NOT EXECUTED 40004578: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4000457c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004580: 12 bf ff 52 bne 400042c8 <== NOT EXECUTED 40004584: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40004588: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 <== NOT EXECUTED { int n; if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); 4000458c: 9f c0 80 00 call %g2 <== NOT EXECUTED 40004590: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 40004594: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004598: 16 bf ff f7 bge 40004574 <== NOT EXECUTED 4000459c: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED rtems_task_wake_after (1); 400045a0: 40 00 08 60 call 40006720 <== NOT EXECUTED 400045a4: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 400045a8: 10 bf ff f9 b 4000458c <== NOT EXECUTED 400045ac: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 <== 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); 400045b0: 40 00 03 2c call 40005260 <== NOT EXECUTED 400045b4: 92 10 00 15 mov %l5, %o1 <== NOT EXECUTED 400045b8: 10 bf ff db b 40004524 <== NOT EXECUTED 400045bc: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 <== NOT EXECUTED } } else { rtems_interval then, now; if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); 400045c0: 40 00 03 28 call 40005260 <== NOT EXECUTED 400045c4: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED 400045c8: 10 bf ff c1 b 400044cc <== NOT EXECUTED 400045cc: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 400045d0: 7f ff fe a6 call 40004068 <== NOT EXECUTED 400045d4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 400045d8: c4 0c 20 47 ldub [ %l0 + 0x47 ], %g2 <== NOT EXECUTED 400045dc: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 400045e0: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400045e4: 36 bf ff 9f bge,a 40004460 <== NOT EXECUTED 400045e8: aa 10 20 00 clr %l5 <== NOT EXECUTED 400045ec: 30 bf ff 9d b,a 40004460 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 400045f0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400045f4: 02 bf ff 34 be 400042c4 <== NOT EXECUTED 400045f8: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED break; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); 400045fc: 40 00 03 19 call 40005260 <== NOT EXECUTED 40004600: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 40004604: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 <== NOT EXECUTED 40004608: c4 1f bf f0 ldd [ %fp + -16 ], %g2 <== NOT EXECUTED 4000460c: 84 20 80 03 sub %g2, %g3, %g2 <== NOT EXECUTED 40004610: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004614: 08 bf ff d4 bleu 40004564 <== NOT EXECUTED 40004618: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 4000461c: 30 bf ff 2b b,a 400042c8 <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 40004620: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004624: 22 80 00 07 be,a 40004640 <== NOT EXECUTED 40004628: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 4000462c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004630: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40004634: 02 bf ff 75 be 40004408 <== NOT EXECUTED 40004638: 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, 4000463c: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 40004640: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 40004644: 92 10 00 17 mov %l7, %o1 <== NOT EXECUTED 40004648: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000464c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 40004650: 10 bf ff 7c b 40004440 <== NOT EXECUTED 40004654: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 400032f8 : * 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) { 400032f8: 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)) 400032fc: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40003300: 82 08 64 03 and %g1, 0x403, %g1 <== NOT EXECUTED 40003304: 80 a0 64 01 cmp %g1, 0x401 <== NOT EXECUTED 40003308: 22 80 00 41 be,a 4000340c <== NOT EXECUTED 4000330c: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 40003310: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40003314: 82 08 60 03 and %g1, 3, %g1 <== NOT EXECUTED 40003318: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000331c: 22 80 00 4c be,a 4000344c <== NOT EXECUTED 40003320: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 40003324: c4 06 20 80 ld [ %i0 + 0x80 ], %g2 <== NOT EXECUTED 40003328: c2 06 20 84 ld [ %i0 + 0x84 ], %g1 <== NOT EXECUTED 4000332c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40003330: 22 80 00 2f be,a 400033ec <== NOT EXECUTED 40003334: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; } rtems_interrupt_disable(level); 40003338: 7f ff fa af call 40001df4 <== NOT EXECUTED 4000333c: 01 00 00 00 nop <== NOT EXECUTED len = tty->t_dqlen; 40003340: e0 06 20 90 ld [ %i0 + 0x90 ], %l0 <== NOT EXECUTED tty->t_dqlen = 0; 40003344: c0 26 20 90 clr [ %i0 + 0x90 ] <== NOT EXECUTED rtems_interrupt_enable(level); 40003348: 7f ff fa af call 40001e04 <== NOT EXECUTED 4000334c: 01 00 00 00 nop <== NOT EXECUTED newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 40003350: d0 06 20 84 ld [ %i0 + 0x84 ], %o0 <== NOT EXECUTED 40003354: d2 06 20 88 ld [ %i0 + 0x88 ], %o1 <== NOT EXECUTED 40003358: 40 00 4b 7a call 40016140 <.urem> <== NOT EXECUTED 4000335c: 90 04 00 08 add %l0, %o0, %o0 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 40003360: 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; 40003364: d0 26 20 84 st %o0, [ %i0 + 0x84 ] <== NOT EXECUTED if (tty->rawOutBufState == rob_wait) { 40003368: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000336c: 02 80 00 54 be 400034bc <== NOT EXECUTED 40003370: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } if (newTail == tty->rawOutBuf.Head) { 40003374: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 40003378: 80 a0 40 10 cmp %g1, %l0 <== NOT EXECUTED 4000337c: 22 80 00 44 be,a 4000348c <== NOT EXECUTED 40003380: c2 06 20 d4 ld [ %i0 + 0xd4 ], %g1 <== NOT EXECUTED if ( tty->tty_snd.sw_pfn != NULL) { (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 40003384: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40003388: 82 08 62 10 and %g1, 0x210, %g1 <== NOT EXECUTED 4000338c: 80 a0 62 10 cmp %g1, 0x210 <== NOT EXECUTED 40003390: 02 80 00 4e be 400034c8 <== NOT EXECUTED 40003394: 01 00 00 00 nop <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 40003398: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 4000339c: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 400033a0: 18 80 00 18 bgu 40003400 <== NOT EXECUTED 400033a4: 01 00 00 00 nop <== NOT EXECUTED nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 400033a8: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 400033ac: 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)) { 400033b0: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400033b4: 80 88 66 00 btst 0x600, %g1 <== NOT EXECUTED 400033b8: 32 80 00 02 bne,a 400033c0 <== NOT EXECUTED 400033bc: a2 10 20 01 mov 1, %l1 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 400033c0: d2 06 20 7c ld [ %i0 + 0x7c ], %o1 <== NOT EXECUTED 400033c4: c4 06 20 a4 ld [ %i0 + 0xa4 ], %g2 <== NOT EXECUTED 400033c8: 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*/ 400033cc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 400033d0: 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*/ 400033d4: c2 26 20 94 st %g1, [ %i0 + 0x94 ] <== NOT EXECUTED (*tty->device.write)(tty->minor, 400033d8: 9f c0 80 00 call %g2 <== NOT EXECUTED 400033dc: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 400033e0: e0 26 20 84 st %l0, [ %i0 + 0x84 ] <== NOT EXECUTED } return nToSend; } 400033e4: 81 c7 e0 08 ret <== NOT EXECUTED 400033e8: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 400033ec: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 400033f0: 02 80 00 30 be 400034b0 <== NOT EXECUTED 400033f4: a2 10 20 00 clr %l1 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 400033f8: 81 c7 e0 08 ret <== NOT EXECUTED 400033fc: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; 40003400: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 <== NOT EXECUTED 40003404: 10 bf ff eb b 400033b0 <== NOT EXECUTED 40003408: a2 20 40 10 sub %g1, %l0, %l1 <== NOT EXECUTED /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 4000340c: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 40003410: 92 06 20 4a add %i0, 0x4a, %o1 <== NOT EXECUTED 40003414: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003418: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 4000341c: 7f ff fa 76 call 40001df4 <== NOT EXECUTED 40003420: 01 00 00 00 nop <== NOT EXECUTED tty->t_dqlen--; 40003424: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 40003428: 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--; 4000342c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 40003430: 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--; 40003434: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 40003438: c4 26 20 b8 st %g2, [ %i0 + 0xb8 ] <== NOT EXECUTED rtems_interrupt_enable(level); 4000343c: 7f ff fa 72 call 40001e04 <== NOT EXECUTED 40003440: a2 10 20 01 mov 1, %l1 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 40003444: 81 c7 e0 08 ret <== NOT EXECUTED 40003448: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED * FIXME: this .write call will generate another * dequeue callback. This will advance the "Tail" in the data * buffer, although the corresponding data is not yet out! * Therefore the dequeue "length" should be reduced by 1 */ (*tty->device.write)(tty->minor, 4000344c: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 40003450: 92 06 20 49 add %i0, 0x49, %o1 <== NOT EXECUTED 40003454: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003458: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 4000345c: 7f ff fa 66 call 40001df4 <== NOT EXECUTED 40003460: 01 00 00 00 nop <== NOT EXECUTED tty->t_dqlen--; 40003464: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 40003468: 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--; 4000346c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 40003470: 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--; 40003474: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 40003478: c4 26 20 b8 st %g2, [ %i0 + 0xb8 ] <== NOT EXECUTED rtems_interrupt_enable(level); 4000347c: 7f ff fa 62 call 40001e04 <== NOT EXECUTED 40003480: a2 10 20 01 mov 1, %l1 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 40003484: 81 c7 e0 08 ret <== NOT EXECUTED 40003488: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 4000348c: 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) { 40003490: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003494: 02 bf ff d3 be 400033e0 <== NOT EXECUTED 40003498: a2 10 20 00 clr %l1 <== NOT EXECUTED (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 4000349c: d2 06 20 d8 ld [ %i0 + 0xd8 ], %o1 <== NOT EXECUTED 400034a0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400034a4: 90 06 20 30 add %i0, 0x30, %o0 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 400034a8: e0 26 20 84 st %l0, [ %i0 + 0x84 ] <== NOT EXECUTED 400034ac: 30 bf ff ce b,a 400033e4 <== NOT EXECUTED */ if (tty->rawOutBufState == rob_wait) { /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 400034b0: 40 00 0b 0c call 400060e0 <== NOT EXECUTED 400034b4: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 400034b8: 30 bf ff d0 b,a 400033f8 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 400034bc: 40 00 0b 09 call 400060e0 <== NOT EXECUTED 400034c0: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 400034c4: 30 bf ff ac b,a 40003374 <== NOT EXECUTED /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 400034c8: 7f ff fa 4b call 40001df4 <== NOT EXECUTED 400034cc: 01 00 00 00 nop <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 400034d0: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 400034d4: 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; 400034d8: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 400034dc: 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; 400034e0: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ rtems_interrupt_enable(level); 400034e4: 7f ff fa 48 call 40001e04 <== NOT EXECUTED 400034e8: a2 10 20 00 clr %l1 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 400034ec: e0 26 20 84 st %l0, [ %i0 + 0x84 ] <== NOT EXECUTED 400034f0: 30 bf ff bd b,a 400033e4 <== NOT EXECUTED 40005124 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 40005124: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED 40005128: a0 07 bf f0 add %fp, -16, %l0 <== NOT EXECUTED 4000512c: a2 07 bf f7 add %fp, -9, %l1 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 40005130: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40005134: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40005138: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000513c: 40 00 00 cf call 40005478 <== NOT EXECUTED 40005140: 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) { 40005144: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40005148: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000514c: 32 80 00 16 bne,a 400051a4 <== NOT EXECUTED 40005150: c0 26 20 c4 clr [ %i0 + 0xc4 ] <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 40005154: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1 <== NOT EXECUTED 40005158: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000515c: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED if (c != EOF) { 40005160: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 40005164: 02 bf ff f3 be 40005130 <== NOT EXECUTED 40005168: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; 4000516c: d0 2f bf f7 stb %o0, [ %fp + -9 ] <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 40005170: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 40005174: 7f ff f8 ff call 40003570 <== NOT EXECUTED 40005178: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 4000517c: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40005180: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40005184: 94 10 20 00 clr %o2 <== NOT EXECUTED 40005188: 40 00 00 bc call 40005478 <== NOT EXECUTED 4000518c: 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) { 40005190: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40005194: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40005198: 22 bf ff f0 be,a 40005158 <== NOT EXECUTED 4000519c: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1 <== NOT EXECUTED tty->rxTaskId = 0; 400051a0: c0 26 20 c4 clr [ %i0 + 0xc4 ] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 400051a4: 40 00 04 77 call 40006380 <== NOT EXECUTED 400051a8: 90 10 20 00 clr %o0 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 400051ac: 10 bf ff e2 b 40005134 <== NOT EXECUTED 400051b0: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 400032e0 : 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); 400032e0: d0 02 20 c4 ld [ %o0 + 0xc4 ], %o0 <== NOT EXECUTED 400032e4: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 400032e8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400032ec: 40 00 08 f1 call 400056b0 <== NOT EXECUTED 400032f0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400032f4: 01 00 00 00 nop 400051b4 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 400051b4: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED 400051b8: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED 400051bc: a0 07 bf f4 add %fp, -12, %l0 <== NOT EXECUTED 400051c0: a2 10 60 04 or %g1, 4, %l1 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 400051c4: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 400051c8: 94 10 20 00 clr %o2 <== NOT EXECUTED 400051cc: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 400051d0: 40 00 00 aa call 40005478 <== NOT EXECUTED 400051d4: 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) { 400051d8: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 400051dc: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 400051e0: 12 80 00 16 bne 40005238 <== NOT EXECUTED 400051e4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 400051e8: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 400051ec: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 400051f0: 82 00 40 11 add %g1, %l1, %g1 <== NOT EXECUTED 400051f4: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED 400051f8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400051fc: 02 80 00 04 be 4000520c <== NOT EXECUTED 40005200: 01 00 00 00 nop <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 40005204: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005208: 01 00 00 00 nop <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 4000520c: 7f ff f8 3b call 400032f8 <== NOT EXECUTED 40005210: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 40005214: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40005218: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000521c: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40005220: 40 00 00 96 call 40005478 <== NOT EXECUTED 40005224: 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) { 40005228: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4000522c: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40005230: 02 bf ff ee be 400051e8 <== NOT EXECUTED 40005234: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED tty->txTaskId = 0; 40005238: c0 26 20 c8 clr [ %i0 + 0xc8 ] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 4000523c: 40 00 04 51 call 40006380 <== NOT EXECUTED 40005240: 90 10 20 00 clr %o0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 40005244: 10 bf ff e1 b 400051c8 <== NOT EXECUTED 40005248: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 400040b4 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 400040b4: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 400040b8: c2 06 00 00 ld [ %i0 ], %g1 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 400040bc: a6 10 00 18 mov %i0, %l3 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 400040c0: e2 00 60 28 ld [ %g1 + 0x28 ], %l1 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 400040c4: 92 10 20 00 clr %o1 400040c8: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 400040cc: 40 00 07 36 call 40005da4 400040d0: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) 400040d4: b0 92 20 00 orcc %o0, 0, %i0 400040d8: 12 80 00 0f bne 40004114 400040dc: 03 10 00 6a sethi %hi(0x4001a800), %g1 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 400040e0: c4 04 60 cc ld [ %l1 + 0xcc ], %g2 400040e4: 82 10 60 04 or %g1, 4, %g1 400040e8: 85 28 a0 05 sll %g2, 5, %g2 400040ec: 84 00 80 01 add %g2, %g1, %g2 400040f0: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 400040f4: 80 a0 60 00 cmp %g1, 0 400040f8: 02 80 00 09 be 4000411c 400040fc: 92 10 00 13 mov %l3, %o1 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 40004100: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004104: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40004108: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 4000410c: 40 00 07 f5 call 400060e0 <== NOT EXECUTED 40004110: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 <== NOT EXECUTED 40004114: 81 c7 e0 08 ret <== NOT EXECUTED 40004118: 81 e8 00 00 restore <== NOT EXECUTED return sc; } if (tty->termios.c_oflag & OPOST) { 4000411c: c2 04 60 34 ld [ %l1 + 0x34 ], %g1 40004120: 80 88 60 01 btst 1, %g1 40004124: 32 80 00 0c bne,a 40004154 40004128: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 4000412c: d0 04 e0 08 ld [ %l3 + 8 ], %o0 <== NOT EXECUTED 40004130: d2 04 e0 0c ld [ %l3 + 0xc ], %o1 <== NOT EXECUTED 40004134: 7f ff fd e4 call 400038c4 <== NOT EXECUTED 40004138: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED args->bytes_moved = args->count; 4000413c: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 <== NOT EXECUTED 40004140: c2 24 e0 14 st %g1, [ %l3 + 0x14 ] } rtems_semaphore_release (tty->osem); 40004144: 40 00 07 e7 call 400060e0 40004148: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 return sc; } 4000414c: 81 c7 e0 08 ret 40004150: 81 e8 00 00 restore return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 40004154: 80 a0 60 00 cmp %g1, 0 40004158: 02 bf ff fa be 40004140 4000415c: c4 04 e0 08 ld [ %l3 + 8 ], %g2 40004160: a0 10 00 02 mov %g2, %l0 40004164: a4 00 80 01 add %g2, %g1, %l2 oproc (*buffer++, tty); 40004168: d0 0c 00 00 ldub [ %l0 ], %o0 4000416c: 7f ff fe 2b call 40003a18 40004170: 92 10 00 11 mov %l1, %o1 40004174: 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--) 40004178: 80 a4 00 12 cmp %l0, %l2 4000417c: 32 bf ff fc bne,a 4000416c 40004180: 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; 40004184: 10 bf ff ef b 40004140 40004188: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 40012a64 : */ rtems_status_code rtems_timer_cancel( Objects_Id id ) { 40012a64: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 40012a68: 11 10 00 d5 sethi %hi(0x40035400), %o0 40012a6c: 92 10 00 18 mov %i0, %o1 40012a70: 90 12 22 bc or %o0, 0x2bc, %o0 40012a74: 40 00 0a d2 call 400155bc <_Objects_Get> 40012a78: 94 07 bf f4 add %fp, -12, %o2 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40012a7c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40012a80: 80 a0 60 00 cmp %g1, 0 40012a84: 12 80 00 11 bne 40012ac8 40012a88: 82 18 60 02 xor %g1, 2, %g1 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 40012a8c: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40012a90: 80 a0 60 04 cmp %g1, 4 40012a94: 12 80 00 16 bne 40012aec 40012a98: 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 ) 40012a9c: 03 10 00 d3 sethi %hi(0x40034c00), %g1 <== NOT EXECUTED 40012aa0: c4 00 60 80 ld [ %g1 + 0x80 ], %g2 ! 40034c80 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40012aa4: b0 10 20 00 clr %i0 <== NOT EXECUTED 40012aa8: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED 40012aac: c4 20 60 80 st %g2, [ %g1 + 0x80 ] <== NOT EXECUTED 40012ab0: c6 00 60 80 ld [ %g1 + 0x80 ], %g3 <== NOT EXECUTED 40012ab4: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40012ab8: 02 80 00 09 be 40012adc <== NOT EXECUTED 40012abc: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40012ac0: 81 c7 e0 08 ret <== NOT EXECUTED 40012ac4: 81 e8 00 00 restore <== NOT EXECUTED { Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40012ac8: 80 a0 00 01 cmp %g0, %g1 40012acc: 84 60 20 00 subx %g0, 0, %g2 40012ad0: b0 08 a0 15 and %g2, 0x15, %i0 40012ad4: 81 c7 e0 08 ret 40012ad8: 91 ee 20 04 restore %i0, 4, %o0 _Thread_Dispatch(); 40012adc: 40 00 0f e0 call 40016a5c <_Thread_Dispatch> 40012ae0: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40012ae4: 81 c7 e0 08 ret 40012ae8: 81 e8 00 00 restore case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) (void) _Watchdog_Remove( &the_timer->Ticker ); 40012aec: 40 00 16 a4 call 4001857c <_Watchdog_Remove> 40012af0: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40012af4: 03 10 00 d3 sethi %hi(0x40034c00), %g1 40012af8: c4 00 60 80 ld [ %g1 + 0x80 ], %g2 ! 40034c80 <_Thread_Dispatch_disable_level> 40012afc: b0 10 20 00 clr %i0 40012b00: 84 00 bf ff add %g2, -1, %g2 40012b04: c4 20 60 80 st %g2, [ %g1 + 0x80 ] 40012b08: c6 00 60 80 ld [ %g1 + 0x80 ], %g3 40012b0c: 80 a0 e0 00 cmp %g3, 0 40012b10: 12 bf ff f5 bne 40012ae4 40012b14: 01 00 00 00 nop 40012b18: 30 bf ff f1 b,a 40012adc 40012c08 : */ rtems_status_code rtems_timer_delete( Objects_Id id ) { 40012c08: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 40012c0c: 21 10 00 d5 sethi %hi(0x40035400), %l0 40012c10: 92 10 00 18 mov %i0, %o1 40012c14: 94 07 bf f4 add %fp, -12, %o2 40012c18: 40 00 0a 69 call 400155bc <_Objects_Get> 40012c1c: 90 14 22 bc or %l0, 0x2bc, %o0 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40012c20: c2 07 bf f4 ld [ %fp + -12 ], %g1 40012c24: 80 a0 60 00 cmp %g1, 0 40012c28: 12 80 00 1f bne 40012ca4 40012c2c: b0 10 00 08 mov %o0, %i0 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40012c30: a0 14 22 bc or %l0, 0x2bc, %l0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40012c34: c2 02 20 08 ld [ %o0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40012c38: c6 14 20 10 lduh [ %l0 + 0x10 ], %g3 40012c3c: 05 00 00 3f sethi %hi(0xfc00), %g2 40012c40: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40012c44: 82 08 40 02 and %g1, %g2, %g1 40012c48: 80 a0 40 03 cmp %g1, %g3 40012c4c: 38 80 00 06 bgu,a 40012c64 40012c50: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40012c54: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 40012c58: 83 28 60 02 sll %g1, 2, %g1 40012c5c: 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; 40012c60: 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 ); 40012c64: 40 00 16 46 call 4001857c <_Watchdog_Remove> 40012c68: 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 ); 40012c6c: 90 10 00 10 mov %l0, %o0 40012c70: 40 00 09 fc call 40015460 <_Objects_Free> 40012c74: 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 ) 40012c78: 03 10 00 d3 sethi %hi(0x40034c00), %g1 40012c7c: c4 00 60 80 ld [ %g1 + 0x80 ], %g2 ! 40034c80 <_Thread_Dispatch_disable_level> 40012c80: b0 10 20 00 clr %i0 40012c84: 84 00 bf ff add %g2, -1, %g2 40012c88: c4 20 60 80 st %g2, [ %g1 + 0x80 ] 40012c8c: c6 00 60 80 ld [ %g1 + 0x80 ], %g3 40012c90: 80 a0 e0 00 cmp %g3, 0 40012c94: 02 80 00 0a be 40012cbc 40012c98: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40012c9c: 81 c7 e0 08 ret <== NOT EXECUTED 40012ca0: 81 e8 00 00 restore <== NOT EXECUTED { Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40012ca4: 82 18 60 02 xor %g1, 2, %g1 40012ca8: 80 a0 00 01 cmp %g0, %g1 40012cac: 84 60 20 00 subx %g0, 0, %g2 40012cb0: b0 08 a0 15 and %g2, 0x15, %i0 40012cb4: 81 c7 e0 08 ret 40012cb8: 91 ee 20 04 restore %i0, 4, %o0 _Thread_Dispatch(); 40012cbc: 40 00 0f 68 call 40016a5c <_Thread_Dispatch> 40012cc0: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40012cc4: 81 c7 e0 08 ret 40012cc8: 81 e8 00 00 restore 40012ccc : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 40012ccc: 9d e3 bf 90 save %sp, -112, %sp 40012cd0: a4 10 00 18 mov %i0, %l2 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 40012cd4: 80 a6 60 00 cmp %i1, 0 40012cd8: 02 80 00 3e be 40012dd0 40012cdc: b0 10 20 0a mov 0xa, %i0 return RTEMS_INVALID_NUMBER; if ( !routine ) 40012ce0: 80 a6 a0 00 cmp %i2, 0 40012ce4: 02 80 00 3b be 40012dd0 40012ce8: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 40012cec: 11 10 00 d5 sethi %hi(0x40035400), %o0 40012cf0: 92 10 00 12 mov %l2, %o1 40012cf4: 90 12 22 bc or %o0, 0x2bc, %o0 40012cf8: 40 00 0a 31 call 400155bc <_Objects_Get> 40012cfc: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40012d00: c2 07 bf f4 ld [ %fp + -12 ], %g1 40012d04: 80 a0 60 00 cmp %g1, 0 40012d08: 12 80 00 17 bne 40012d64 40012d0c: a0 10 00 08 mov %o0, %l0 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 40012d10: a2 02 20 10 add %o0, 0x10, %l1 40012d14: 40 00 16 1a call 4001857c <_Watchdog_Remove> 40012d18: 90 10 00 11 mov %l1, %o0 _ISR_Disable( level ); 40012d1c: 7f ff df 7e call 4000ab14 40012d20: 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 ) { 40012d24: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 40012d28: 80 a0 60 00 cmp %g1, 0 40012d2c: 22 80 00 14 be,a 40012d7c 40012d30: f4 24 20 2c st %i2, [ %l0 + 0x2c ] _ISR_Enable( level ); 40012d34: 7f ff df 7c call 4000ab24 <== NOT EXECUTED 40012d38: 01 00 00 00 nop <== 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 ) 40012d3c: 03 10 00 d3 sethi %hi(0x40034c00), %g1 <== NOT EXECUTED 40012d40: c4 00 60 80 ld [ %g1 + 0x80 ], %g2 ! 40034c80 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40012d44: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED 40012d48: c4 20 60 80 st %g2, [ %g1 + 0x80 ] <== NOT EXECUTED 40012d4c: c6 00 60 80 ld [ %g1 + 0x80 ], %g3 <== NOT EXECUTED 40012d50: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40012d54: 02 80 00 1d be 40012dc8 <== NOT EXECUTED 40012d58: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40012d5c: 81 c7 e0 08 ret <== NOT EXECUTED 40012d60: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if ( !routine ) return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40012d64: 82 18 60 02 xor %g1, 2, %g1 40012d68: 80 a0 00 01 cmp %g0, %g1 40012d6c: 84 60 20 00 subx %g0, 0, %g2 40012d70: b0 08 a0 15 and %g2, 0x15, %i0 40012d74: 81 c7 e0 08 ret 40012d78: 91 ee 20 04 restore %i0, 4, %o0 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 40012d7c: e4 24 20 30 st %l2, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 40012d80: 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; 40012d84: c0 24 20 38 clr [ %l0 + 0x38 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40012d88: c0 24 20 18 clr [ %l0 + 0x18 ] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 40012d8c: 7f ff df 66 call 4000ab24 40012d90: 01 00 00 00 nop ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40012d94: 92 10 00 11 mov %l1, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40012d98: f2 24 20 1c st %i1, [ %l0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40012d9c: 11 10 00 d3 sethi %hi(0x40034c00), %o0 40012da0: 40 00 15 8d call 400183d4 <_Watchdog_Insert> 40012da4: 90 12 21 7c or %o0, 0x17c, %o0 ! 40034d7c <_Watchdog_Ticks_chain> 40012da8: 05 10 00 d3 sethi %hi(0x40034c00), %g2 40012dac: c2 00 a0 80 ld [ %g2 + 0x80 ], %g1 ! 40034c80 <_Thread_Dispatch_disable_level> 40012db0: 82 00 7f ff add %g1, -1, %g1 40012db4: c2 20 a0 80 st %g1, [ %g2 + 0x80 ] 40012db8: c6 00 a0 80 ld [ %g2 + 0x80 ], %g3 40012dbc: 80 a0 e0 00 cmp %g3, 0 40012dc0: 32 80 00 04 bne,a 40012dd0 40012dc4: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Dispatch(); 40012dc8: 40 00 0f 25 call 40016a5c <_Thread_Dispatch> 40012dcc: b0 10 20 00 clr %i0 40012dd0: 81 c7 e0 08 ret 40012dd4: 81 e8 00 00 restore 40008614 : rtems_status_code rtems_timer_get_information( Objects_Id id, rtems_timer_information *the_info ) { 40008614: 9d e3 bf 90 save %sp, -112, %sp 40008618: 92 10 00 18 mov %i0, %o1 Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) 4000861c: 80 a6 60 00 cmp %i1, 0 40008620: 02 80 00 1b be 4000868c 40008624: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 40008628: 11 10 00 82 sethi %hi(0x40020800), %o0 4000862c: 94 07 bf f4 add %fp, -12, %o2 40008630: 40 00 07 b6 call 4000a508 <_Objects_Get> 40008634: 90 12 23 54 or %o0, 0x354, %o0 return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40008638: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000863c: 80 a0 60 00 cmp %g1, 0 40008640: 12 80 00 15 bne 40008694 40008644: 82 18 60 02 xor %g1, 2, %g1 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; the_info->initial = the_timer->Ticker.initial; 40008648: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; 4000864c: c6 02 20 38 ld [ %o0 + 0x38 ], %g3 the_info->initial = the_timer->Ticker.initial; 40008650: c2 26 60 04 st %g1, [ %i1 + 4 ] the_info->start_time = the_timer->Ticker.start_time; 40008654: c4 02 20 24 ld [ %o0 + 0x24 ], %g2 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; 40008658: c6 26 40 00 st %g3, [ %i1 ] the_info->initial = the_timer->Ticker.initial; the_info->start_time = the_timer->Ticker.start_time; 4000865c: c4 26 60 08 st %g2, [ %i1 + 8 ] the_info->stop_time = the_timer->Ticker.stop_time; 40008660: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 40008664: 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 ) 40008668: 07 10 00 83 sethi %hi(0x40020c00), %g3 4000866c: c2 00 e1 40 ld [ %g3 + 0x140 ], %g1 ! 40020d40 <_Thread_Dispatch_disable_level> 40008670: b0 10 20 00 clr %i0 40008674: 82 00 7f ff add %g1, -1, %g1 40008678: c2 20 e1 40 st %g1, [ %g3 + 0x140 ] 4000867c: c4 00 e1 40 ld [ %g3 + 0x140 ], %g2 40008680: 80 a0 a0 00 cmp %g2, 0 40008684: 02 80 00 09 be 400086a8 40008688: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000868c: 81 c7 e0 08 ret <== NOT EXECUTED 40008690: 81 e8 00 00 restore <== NOT EXECUTED if ( !the_info ) return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40008694: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 40008698: 84 60 20 00 subx %g0, 0, %g2 <== NOT EXECUTED 4000869c: b0 08 a0 15 and %g2, 0x15, %i0 <== NOT EXECUTED 400086a0: 81 c7 e0 08 ret <== NOT EXECUTED 400086a4: 91 ee 20 04 restore %i0, 4, %o0 <== NOT EXECUTED _Thread_Dispatch(); 400086a8: 40 00 0c c0 call 4000b9a8 <_Thread_Dispatch> 400086ac: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400086b0: 81 c7 e0 08 ret 400086b4: 81 e8 00 00 restore 40013530 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 40013530: 9d e3 bf 90 save %sp, -112, %sp /* * Make sure the requested priority is valid. */ _priority = priority; if ( priority == RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 40013534: 92 10 20 00 clr %o1 40013538: 80 a6 3f ff cmp %i0, -1 4001353c: 02 80 00 07 be 40013558 40013540: 94 10 00 19 mov %i1, %o2 _priority = 0; else if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) 40013544: 82 06 3f ff add %i0, -1, %g1 40013548: 80 a0 60 fe cmp %g1, 0xfe 4001354c: 18 80 00 16 bgu 400135a4 40013550: a2 10 20 13 mov 0x13, %l1 40013554: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40013558: 21 10 00 d3 sethi %hi(0x40034c00), %l0 4001355c: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 ! 40034c80 <_Thread_Dispatch_disable_level> 40013560: 82 00 60 01 inc %g1 40013564: c2 24 20 80 st %g1, [ %l0 + 0x80 ] * Just to make sure the test versus create/start operation are atomic. */ _Thread_Disable_dispatch(); if ( _Timer_Server ) { 40013568: 33 10 00 d5 sethi %hi(0x40035400), %i1 4001356c: c2 06 63 08 ld [ %i1 + 0x308 ], %g1 ! 40035708 <_Timer_Server> 40013570: 80 a0 60 00 cmp %g1, 0 40013574: 02 80 00 0e be 400135ac 40013578: 19 00 00 20 sethi %hi(0x8000), %o4 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001357c: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 <== NOT EXECUTED 40013580: a2 10 20 0e mov 0xe, %l1 <== NOT EXECUTED _Thread_Dispatch(); 40013584: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40013588: c2 24 20 80 st %g1, [ %l0 + 0x80 ] 4001358c: c4 04 20 80 ld [ %l0 + 0x80 ], %g2 40013590: 80 a0 a0 00 cmp %g2, 0 40013594: 12 80 00 04 bne 400135a4 40013598: 01 00 00 00 nop 4001359c: 40 00 0d 30 call 40016a5c <_Thread_Dispatch> 400135a0: 01 00 00 00 nop _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; } 400135a4: 81 c7 e0 08 ret 400135a8: 91 e8 00 11 restore %g0, %l1, %o0 * 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( 400135ac: 11 15 12 53 sethi %hi(0x54494c00), %o0 400135b0: 98 16 80 0c or %i2, %o4, %o4 400135b4: 90 12 21 45 or %o0, 0x145, %o0 400135b8: 96 10 21 00 mov 0x100, %o3 400135bc: 7f ff f9 fc call 40011dac 400135c0: 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) { 400135c4: a2 92 20 00 orcc %o0, 0, %l1 400135c8: 02 80 00 05 be 400135dc 400135cc: d0 07 bf f4 ld [ %fp + -12 ], %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400135d0: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 400135d4: 10 bf ff ed b 40013588 400135d8: 82 00 7f ff add %g1, -1, %g1 _Thread_Enable_dispatch(); return status; } status = rtems_task_start( 400135dc: 13 10 00 4c sethi %hi(0x40013000), %o1 400135e0: 94 10 20 00 clr %o2 400135e4: 7f ff fc 3d call 400126d8 400135e8: 92 12 63 dc or %o1, 0x3dc, %o1 id, /* the id from create */ (rtems_task_entry) _Timer_Server_body, /* the timer server entry point */ 0 /* there is no argument */ ); if (status) { 400135ec: a2 92 20 00 orcc %o0, 0, %l1 400135f0: 12 bf ff f8 bne 400135d0 400135f4: 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 ) 400135f8: 03 10 00 d2 sethi %hi(0x40034800), %g1 400135fc: 9a 10 63 30 or %g1, 0x330, %o5 ! 40034b30 <_RTEMS_tasks_Information> 40013600: c4 13 60 10 lduh [ %o5 + 0x10 ], %g2 40013604: 03 00 00 3f sethi %hi(0xfc00), %g1 40013608: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4001360c: 86 09 00 01 and %g4, %g1, %g3 40013610: 80 a0 c0 02 cmp %g3, %g2 40013614: 18 80 00 05 bgu 40013628 40013618: 82 10 20 00 clr %g1 4001361c: c4 03 60 20 ld [ %o5 + 0x20 ], %g2 40013620: 83 28 e0 02 sll %g3, 2, %g1 40013624: c2 00 80 01 ld [ %g2 + %g1 ], %g1 ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 40013628: c0 20 60 6c clr [ %g1 + 0x6c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4001362c: c0 20 60 50 clr [ %g1 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; 40013630: c8 20 60 68 st %g4, [ %g1 + 0x68 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40013634: 07 10 00 5a sethi %hi(0x40016800), %g3 * * 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( 40013638: c2 26 63 08 st %g1, [ %i1 + 0x308 ] 4001363c: 86 10 e1 b8 or %g3, 0x1b8, %g3 40013640: c6 20 60 64 st %g3, [ %g1 + 0x64 ] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40013644: 03 10 00 d2 sethi %hi(0x40034800), %g1 40013648: 82 10 63 80 or %g1, 0x380, %g1 ! 40034b80 <_Timer_Ticks_chain+0x4> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4001364c: c2 20 7f fc st %g1, [ %g1 + -4 ] 40013650: 82 00 7f fc add %g1, -4, %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40013654: 05 10 00 d2 sethi %hi(0x40034800), %g2 Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40013658: c2 20 60 08 st %g1, [ %g1 + 8 ] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4001365c: 84 10 a3 94 or %g2, 0x394, %g2 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 40013660: c0 20 60 04 clr [ %g1 + 4 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40013664: c4 20 bf fc st %g2, [ %g2 + -4 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40013668: 03 10 00 d2 sethi %hi(0x40034800), %g1 4001366c: 84 00 bf fc add %g2, -4, %g2 40013670: 82 10 63 9c or %g1, 0x39c, %g1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40013674: c4 20 a0 08 st %g2, [ %g2 + 8 ] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 40013678: c0 20 a0 04 clr [ %g2 + 4 ] the_watchdog->routine = routine; 4001367c: c6 20 60 1c st %g3, [ %g1 + 0x1c ] the_watchdog->id = id; 40013680: c8 20 60 20 st %g4, [ %g1 + 0x20 ] the_watchdog->user_data = user_data; 40013684: c0 20 60 24 clr [ %g1 + 0x24 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40013688: 10 bf ff d2 b 400135d0 4001368c: c0 20 60 08 clr [ %g1 + 8 ] 40012f24 : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 40012f24: 9d e3 bf 90 save %sp, -112, %sp 40012f28: 11 10 00 d5 sethi %hi(0x40035400), %o0 40012f2c: 92 10 00 18 mov %i0, %o1 40012f30: 90 12 22 bc or %o0, 0x2bc, %o0 40012f34: 40 00 09 a2 call 400155bc <_Objects_Get> 40012f38: 94 07 bf f4 add %fp, -12, %o2 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40012f3c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40012f40: 80 a0 60 00 cmp %g1, 0 40012f44: 12 80 00 18 bne 40012fa4 40012f48: a0 10 00 08 mov %o0, %l0 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 40012f4c: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40012f50: 80 a0 60 01 cmp %g1, 1 40012f54: 22 80 00 2f be,a 40013010 40012f58: 31 10 00 d5 sethi %hi(0x40035400), %i0 40012f5c: 2a 80 00 18 bcs,a 40012fbc 40012f60: a0 02 20 10 add %o0, 0x10, %l0 40012f64: 80 a0 60 04 cmp %g1, 4 40012f68: 18 80 00 1b bgu 40012fd4 40012f6c: 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 ) 40012f70: 03 10 00 d3 sethi %hi(0x40034c00), %g1 40012f74: c4 00 60 80 ld [ %g1 + 0x80 ], %g2 ! 40034c80 <_Thread_Dispatch_disable_level> 40012f78: b0 10 20 0b mov 0xb, %i0 40012f7c: 84 00 bf ff add %g2, -1, %g2 40012f80: c4 20 60 80 st %g2, [ %g1 + 0x80 ] 40012f84: c6 00 60 80 ld [ %g1 + 0x80 ], %g3 40012f88: 80 a0 e0 00 cmp %g3, 0 40012f8c: 12 80 00 1f bne 40013008 40012f90: 01 00 00 00 nop _Thread_Dispatch(); 40012f94: 40 00 0e b2 call 40016a5c <_Thread_Dispatch> 40012f98: 01 00 00 00 nop 40012f9c: 81 c7 e0 08 ret 40012fa0: 81 e8 00 00 restore { Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40012fa4: 82 18 60 02 xor %g1, 2, %g1 40012fa8: 80 a0 00 01 cmp %g0, %g1 40012fac: 84 60 20 00 subx %g0, 0, %g2 40012fb0: b0 08 a0 15 and %g2, 0x15, %i0 40012fb4: 81 c7 e0 08 ret 40012fb8: 91 ee 20 04 restore %i0, 4, %o0 return RTEMS_INVALID_ID; case OBJECTS_LOCAL: switch ( the_timer->the_class ) { case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 40012fbc: 40 00 15 70 call 4001857c <_Watchdog_Remove> 40012fc0: 90 10 00 10 mov %l0, %o0 _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 40012fc4: 11 10 00 d3 sethi %hi(0x40034c00), %o0 40012fc8: 92 10 00 10 mov %l0, %o1 40012fcc: 40 00 15 02 call 400183d4 <_Watchdog_Insert> 40012fd0: 90 12 21 7c or %o0, 0x17c, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40012fd4: 03 10 00 d3 sethi %hi(0x40034c00), %g1 40012fd8: c4 00 60 80 ld [ %g1 + 0x80 ], %g2 ! 40034c80 <_Thread_Dispatch_disable_level> 40012fdc: b0 10 20 00 clr %i0 40012fe0: 84 00 bf ff add %g2, -1, %g2 40012fe4: c4 20 60 80 st %g2, [ %g1 + 0x80 ] 40012fe8: c6 00 60 80 ld [ %g1 + 0x80 ], %g3 40012fec: 80 a0 e0 00 cmp %g3, 0 40012ff0: 02 80 00 04 be 40013000 40012ff4: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40012ff8: 81 c7 e0 08 ret <== NOT EXECUTED 40012ffc: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 40013000: 40 00 0e 97 call 40016a5c <_Thread_Dispatch> 40013004: 01 00 00 00 nop 40013008: 81 c7 e0 08 ret 4001300c: 81 e8 00 00 restore case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); break; case TIMER_INTERVAL_ON_TASK: _Timer_Server_stop_ticks_timer(); 40013010: d0 06 23 08 ld [ %i0 + 0x308 ], %o0 _Watchdog_Remove( &the_timer->Ticker ); 40013014: a2 04 20 10 add %l0, 0x10, %l1 case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); break; case TIMER_INTERVAL_ON_TASK: _Timer_Server_stop_ticks_timer(); 40013018: 40 00 15 59 call 4001857c <_Watchdog_Remove> 4001301c: 90 02 20 48 add %o0, 0x48, %o0 _Watchdog_Remove( &the_timer->Ticker ); 40013020: 40 00 15 57 call 4001857c <_Watchdog_Remove> 40013024: 90 10 00 11 mov %l1, %o0 _Timer_Server_process_ticks_chain(); 40013028: 40 00 00 dc call 40013398 <_Timer_Server_process_ticks_chain> 4001302c: 21 10 00 d2 sethi %hi(0x40034800), %l0 _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); 40013030: 92 10 00 11 mov %l1, %o1 40013034: 40 00 14 e8 call 400183d4 <_Watchdog_Insert> 40013038: 90 14 23 7c or %l0, 0x37c, %o0 */ RTEMS_INLINE_ROUTINE boolean _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4001303c: c4 04 23 7c ld [ %l0 + 0x37c ], %g2 40013040: a0 14 23 7c or %l0, 0x37c, %l0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40013044: a0 04 20 04 add %l0, 4, %l0 _Timer_Server_reset_ticks_timer(); 40013048: 80 a0 80 10 cmp %g2, %l0 4001304c: 02 bf ff e2 be 40012fd4 40013050: c2 06 23 08 ld [ %i0 + 0x308 ], %g1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40013054: c4 00 a0 10 ld [ %g2 + 0x10 ], %g2 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40013058: 92 00 60 48 add %g1, 0x48, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4001305c: c4 20 60 54 st %g2, [ %g1 + 0x54 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40013060: 11 10 00 d3 sethi %hi(0x40034c00), %o0 40013064: 40 00 14 dc call 400183d4 <_Watchdog_Insert> 40013068: 90 12 21 7c or %o0, 0x17c, %o0 ! 40034d7c <_Watchdog_Ticks_chain> 4001306c: 30 bf ff da b,a 40012fd4 40013070 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 40013070: 9d e3 bf 90 save %sp, -112, %sp Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 40013074: 23 10 00 d5 sethi %hi(0x40035400), %l1 40013078: c2 04 63 08 ld [ %l1 + 0x308 ], %g1 ! 40035708 <_Timer_Server> Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 4001307c: a6 10 00 18 mov %i0, %l3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 40013080: 80 a0 60 00 cmp %g1, 0 40013084: 02 80 00 3b be 40013170 40013088: b0 10 20 0e mov 0xe, %i0 return RTEMS_INCORRECT_STATE; if ( !routine ) 4001308c: 80 a6 a0 00 cmp %i2, 0 40013090: 02 80 00 38 be 40013170 40013094: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 40013098: 80 a6 60 00 cmp %i1, 0 4001309c: 02 80 00 35 be 40013170 400130a0: b0 10 20 0a mov 0xa, %i0 400130a4: 11 10 00 d5 sethi %hi(0x40035400), %o0 400130a8: 92 10 00 13 mov %l3, %o1 400130ac: 90 12 22 bc or %o0, 0x2bc, %o0 400130b0: 40 00 09 43 call 400155bc <_Objects_Get> 400130b4: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 400130b8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400130bc: 80 a0 60 00 cmp %g1, 0 400130c0: 12 80 00 30 bne 40013180 400130c4: a0 10 00 08 mov %o0, %l0 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 400130c8: a4 02 20 10 add %o0, 0x10, %l2 400130cc: 40 00 15 2c call 4001857c <_Watchdog_Remove> 400130d0: 90 10 00 12 mov %l2, %o0 _ISR_Disable( level ); 400130d4: 7f ff de 90 call 4000ab14 400130d8: 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 ) { 400130dc: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 400130e0: 80 a0 60 00 cmp %g1, 0 400130e4: 12 80 00 2d bne 40013198 400130e8: 82 10 20 01 mov 1, %g1 * 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; 400130ec: f2 24 20 1c st %i1, [ %l0 + 0x1c ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 400130f0: f4 24 20 2c st %i2, [ %l0 + 0x2c ] the_watchdog->id = id; 400130f4: e6 24 20 30 st %l3, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 400130f8: f6 24 20 34 st %i3, [ %l0 + 0x34 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400130fc: 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; 40013100: 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 ); 40013104: 7f ff de 88 call 4000ab24 40013108: 21 10 00 d2 sethi %hi(0x40034800), %l0 _Timer_Server_stop_ticks_timer(); 4001310c: d0 04 63 08 ld [ %l1 + 0x308 ], %o0 40013110: 40 00 15 1b call 4001857c <_Watchdog_Remove> 40013114: 90 02 20 48 add %o0, 0x48, %o0 _Timer_Server_process_ticks_chain(); 40013118: 40 00 00 a0 call 40013398 <_Timer_Server_process_ticks_chain> 4001311c: 01 00 00 00 nop _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); 40013120: 90 14 23 7c or %l0, 0x37c, %o0 40013124: 40 00 14 ac call 400183d4 <_Watchdog_Insert> 40013128: 92 10 00 12 mov %l2, %o1 */ RTEMS_INLINE_ROUTINE boolean _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4001312c: c4 04 23 7c ld [ %l0 + 0x37c ], %g2 40013130: a0 14 23 7c or %l0, 0x37c, %l0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40013134: a0 04 20 04 add %l0, 4, %l0 _Timer_Server_reset_ticks_timer(); 40013138: 80 a0 80 10 cmp %g2, %l0 4001313c: 12 80 00 1a bne 400131a4 40013140: c2 04 63 08 ld [ %l1 + 0x308 ], %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40013144: 03 10 00 d3 sethi %hi(0x40034c00), %g1 40013148: c4 00 60 80 ld [ %g1 + 0x80 ], %g2 ! 40034c80 <_Thread_Dispatch_disable_level> _Thread_Dispatch(); 4001314c: b0 10 20 00 clr %i0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40013150: 84 00 bf ff add %g2, -1, %g2 40013154: c4 20 60 80 st %g2, [ %g1 + 0x80 ] 40013158: c6 00 60 80 ld [ %g1 + 0x80 ], %g3 4001315c: 80 a0 e0 00 cmp %g3, 0 40013160: 12 80 00 06 bne 40013178 40013164: 01 00 00 00 nop _Thread_Dispatch(); 40013168: 40 00 0e 3d call 40016a5c <_Thread_Dispatch> 4001316c: b0 10 20 00 clr %i0 ! 0 40013170: 81 c7 e0 08 ret 40013174: 81 e8 00 00 restore _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40013178: 81 c7 e0 08 ret <== NOT EXECUTED 4001317c: 81 e8 00 00 restore <== NOT EXECUTED if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40013180: 82 18 60 02 xor %g1, 2, %g1 40013184: 80 a0 00 01 cmp %g0, %g1 40013188: 84 60 20 00 subx %g0, 0, %g2 4001318c: b0 08 a0 15 and %g2, 0x15, %i0 40013190: 81 c7 e0 08 ret 40013194: 91 ee 20 04 restore %i0, 4, %o0 * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 40013198: 7f ff de 63 call 4000ab24 <== NOT EXECUTED 4001319c: 01 00 00 00 nop <== NOT EXECUTED 400131a0: 30 bf ff e9 b,a 40013144 <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 400131a4: c4 00 a0 10 ld [ %g2 + 0x10 ], %g2 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400131a8: 92 00 60 48 add %g1, 0x48, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 400131ac: c4 20 60 54 st %g2, [ %g1 + 0x54 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400131b0: 11 10 00 d3 sethi %hi(0x40034c00), %o0 400131b4: 40 00 14 88 call 400183d4 <_Watchdog_Insert> 400131b8: 90 12 21 7c or %o0, 0x17c, %o0 ! 40034d7c <_Watchdog_Ticks_chain> 400131bc: 30 bf ff e2 b,a 40013144 400089f8 : static int rtems_verror( uint32_t error_flag, const char *printf_format, va_list arglist ) { 400089f8: 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) 400089fc: 03 08 00 00 sethi %hi(0x20000000), %g1 <== NOT EXECUTED 40008a00: a8 8e 00 01 andcc %i0, %g1, %l4 <== NOT EXECUTED 40008a04: 02 80 00 10 be 40008a44 <== NOT EXECUTED 40008a08: a6 10 00 18 mov %i0, %l3 <== NOT EXECUTED { if (rtems_panic_in_progress++) 40008a0c: 07 10 00 b1 sethi %hi(0x4002c400), %g3 <== NOT EXECUTED 40008a10: c2 00 e2 d4 ld [ %g3 + 0x2d4 ], %g1 ! 4002c6d4 <== NOT EXECUTED 40008a14: 82 00 60 01 inc %g1 <== NOT EXECUTED 40008a18: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40008a1c: 02 80 00 0a be 40008a44 <== NOT EXECUTED 40008a20: c2 20 e2 d4 st %g1, [ %g3 + 0x2d4 ] <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008a24: 03 10 00 b2 sethi %hi(0x4002c800), %g1 <== NOT EXECUTED 40008a28: c4 00 60 a0 ld [ %g1 + 0xa0 ], %g2 ! 4002c8a0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40008a2c: 84 00 a0 01 inc %g2 <== NOT EXECUTED 40008a30: c4 20 60 a0 st %g2, [ %g1 + 0xa0 ] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 40008a34: c2 00 e2 d4 ld [ %g3 + 0x2d4 ], %g1 <== NOT EXECUTED 40008a38: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40008a3c: 14 80 00 3c bg 40008b2c <== NOT EXECUTED 40008a40: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 40008a44: 25 10 00 ae sethi %hi(0x4002b800), %l2 <== NOT EXECUTED 40008a48: c2 04 a0 88 ld [ %l2 + 0x88 ], %g1 ! 4002b888 <_impure_ptr> <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 40008a4c: a2 10 20 00 clr %l1 <== NOT EXECUTED /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 40008a50: 40 00 46 7b call 4001a43c <== NOT EXECUTED 40008a54: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 40008a58: 03 1c 00 00 sethi %hi(0x70000000), %g1 <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 40008a5c: 05 10 00 00 sethi %hi(0x40000000), %g2 <== NOT EXECUTED 40008a60: 80 8c c0 02 btst %l3, %g2 <== NOT EXECUTED 40008a64: 12 80 00 3f bne 40008b60 <== NOT EXECUTED 40008a68: a0 2c c0 01 andn %l3, %g1, %l0 <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 40008a6c: c2 04 a0 88 ld [ %l2 + 0x88 ], %g1 <== NOT EXECUTED 40008a70: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 40008a74: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40008a78: 40 00 5f 30 call 40020738 <== NOT EXECUTED 40008a7c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED if (status) 40008a80: 80 a4 20 00 cmp %l0, 0 <== 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); 40008a84: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED if (status) 40008a88: 12 80 00 2b bne 40008b34 <== NOT EXECUTED 40008a8c: 35 10 00 ae sethi %hi(0x4002b800), %i2 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) 40008a90: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40008a94: 02 80 00 12 be 40008adc <== NOT EXECUTED 40008a98: c2 04 a0 88 ld [ %l2 + 0x88 ], %g1 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 40008a9c: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40008aa0: 04 80 00 09 ble 40008ac4 <== NOT EXECUTED 40008aa4: 13 10 00 9e sethi %hi(0x40027800), %o1 <== NOT EXECUTED 40008aa8: 40 00 54 39 call 4001db8c <== NOT EXECUTED 40008aac: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40008ab0: c2 4a 00 00 ldsb [ %o0 ], %g1 <== NOT EXECUTED 40008ab4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008ab8: 12 80 00 2e bne 40008b70 <== NOT EXECUTED 40008abc: c2 04 a0 88 ld [ %l2 + 0x88 ], %g1 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 40008ac0: 13 10 00 9e sethi %hi(0x40027800), %o1 <== NOT EXECUTED 40008ac4: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40008ac8: 92 12 61 80 or %o1, 0x180, %o1 <== NOT EXECUTED 40008acc: 40 00 48 1d call 4001ab40 <== NOT EXECUTED 40008ad0: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 40008ad4: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 40008ad8: c2 04 a0 88 ld [ %l2 + 0x88 ], %g1 <== NOT EXECUTED 40008adc: 13 10 00 9f sethi %hi(0x40027c00), %o1 <== NOT EXECUTED 40008ae0: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40008ae4: 40 00 48 17 call 4001ab40 <== NOT EXECUTED 40008ae8: 92 12 63 f8 or %o1, 0x3f8, %o1 <== NOT EXECUTED (void) fflush(stderr); 40008aec: c2 04 a0 88 ld [ %l2 + 0x88 ], %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"); 40008af0: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED (void) fflush(stderr); 40008af4: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40008af8: 40 00 46 51 call 4001a43c <== NOT EXECUTED 40008afc: b0 04 00 18 add %l0, %i0, %i0 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 40008b00: 03 0c 00 00 sethi %hi(0x30000000), %g1 <== NOT EXECUTED 40008b04: 80 8c c0 01 btst %l3, %g1 <== NOT EXECUTED 40008b08: 02 80 00 09 be 40008b2c <== NOT EXECUTED 40008b0c: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 40008b10: 02 80 00 23 be 40008b9c <== NOT EXECUTED 40008b14: 90 10 20 00 clr %o0 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 40008b18: 13 10 00 9e sethi %hi(0x40027800), %o1 <== NOT EXECUTED 40008b1c: 40 00 00 33 call 40008be8 <== NOT EXECUTED 40008b20: 92 12 61 98 or %o1, 0x198, %o1 ! 40027998 <== NOT EXECUTED _exit(local_errno); 40008b24: 40 00 02 8e call 4000955c <_exit> <== NOT EXECUTED 40008b28: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_error(0, "fatal error, aborting"); abort(); } } return chars_written; } 40008b2c: 81 c7 e0 08 ret <== NOT EXECUTED 40008b30: 81 e8 00 00 restore <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 40008b34: c2 06 a0 88 ld [ %i2 + 0x88 ], %g1 <== NOT EXECUTED 40008b38: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40008b3c: 7f ff ff a8 call 400089dc <== NOT EXECUTED 40008b40: e0 00 60 0c ld [ %g1 + 0xc ], %l0 <== NOT EXECUTED 40008b44: 13 10 00 9e sethi %hi(0x40027800), %o1 <== NOT EXECUTED 40008b48: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 40008b4c: 92 12 61 60 or %o1, 0x160, %o1 <== NOT EXECUTED 40008b50: 40 00 47 fc call 4001ab40 <== NOT EXECUTED 40008b54: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40008b58: 10 bf ff ce b 40008a90 <== NOT EXECUTED 40008b5c: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ local_errno = errno; 40008b60: 40 00 45 da call 4001a2c8 <__errno> <== NOT EXECUTED 40008b64: 01 00 00 00 nop <== NOT EXECUTED 40008b68: 10 bf ff c1 b 40008a6c <== NOT EXECUTED 40008b6c: e2 02 00 00 ld [ %o0 ], %l1 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 40008b70: c2 06 a0 88 ld [ %i2 + 0x88 ], %g1 <== NOT EXECUTED 40008b74: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40008b78: 40 00 54 05 call 4001db8c <== NOT EXECUTED 40008b7c: e0 00 60 0c ld [ %g1 + 0xc ], %l0 <== NOT EXECUTED 40008b80: 13 10 00 9e sethi %hi(0x40027800), %o1 <== NOT EXECUTED 40008b84: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 40008b88: 92 12 61 70 or %o1, 0x170, %o1 <== NOT EXECUTED 40008b8c: 40 00 47 ed call 4001ab40 <== NOT EXECUTED 40008b90: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40008b94: 10 bf ff d1 b 40008ad8 <== NOT EXECUTED 40008b98: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED rtems_error(0, "fatal error, exiting"); _exit(local_errno); } else { rtems_error(0, "fatal error, aborting"); 40008b9c: 13 10 00 9e sethi %hi(0x40027800), %o1 <== NOT EXECUTED 40008ba0: 40 00 00 12 call 40008be8 <== NOT EXECUTED 40008ba4: 92 12 61 b0 or %o1, 0x1b0, %o1 ! 400279b0 <== NOT EXECUTED abort(); 40008ba8: 40 00 45 ba call 4001a290 <== NOT EXECUTED 40008bac: 01 00 00 00 nop 40008bb0: 01 00 00 00 nop 40018bd4 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 40018bd4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED 40018bd8: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 <== NOT EXECUTED 40018bdc: a2 10 20 00 clr %l1 <== NOT EXECUTED 40018be0: a6 10 63 ff or %g1, 0x3ff, %l3 <== NOT EXECUTED 40018be4: a4 10 20 00 clr %l2 <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 40018be8: 2b 10 00 f5 sethi %hi(0x4003d400), %l5 <== NOT EXECUTED limit++; continue; } sign = 1; } if (!isdigit(c)) 40018bec: 29 10 00 f5 sethi %hi(0x4003d400), %l4 <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 40018bf0: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 40018bf4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40018bf8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40018bfc: 06 80 00 23 bl 40018c88 <== NOT EXECUTED 40018c00: c2 26 20 04 st %g1, [ %i0 + 4 ] <== NOT EXECUTED 40018c04: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED 40018c08: e0 08 40 00 ldub [ %g1 ], %l0 <== NOT EXECUTED 40018c0c: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED if (c == ':') 40018c10: 80 a4 20 3a cmp %l0, 0x3a <== NOT EXECUTED 40018c14: 02 80 00 24 be 40018ca4 <== NOT EXECUTED 40018c18: c4 26 00 00 st %g2, [ %i0 ] <== NOT EXECUTED break; if (sign == 0) { 40018c1c: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40018c20: 12 80 00 06 bne 40018c38 <== NOT EXECUTED 40018c24: c2 05 23 68 ld [ %l4 + 0x368 ], %g1 <== NOT EXECUTED if (c == '-') { 40018c28: 80 a4 20 2d cmp %l0, 0x2d <== NOT EXECUTED 40018c2c: 02 80 00 2f be 40018ce8 <== NOT EXECUTED 40018c30: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED limit++; continue; } sign = 1; } if (!isdigit(c)) 40018c34: c2 05 23 68 ld [ %l4 + 0x368 ], %g1 <== NOT EXECUTED 40018c38: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 <== NOT EXECUTED 40018c3c: 80 88 a0 04 btst 4, %g2 <== NOT EXECUTED 40018c40: 02 80 00 28 be 40018ce0 <== NOT EXECUTED 40018c44: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED return 0; d = c - '0'; if ((i > (limit / 10)) 40018c48: 40 00 73 09 call 4003586c <.udiv> <== NOT EXECUTED 40018c4c: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 40018c50: 80 a4 40 08 cmp %l1, %o0 <== NOT EXECUTED 40018c54: 18 80 00 23 bgu 40018ce0 <== NOT EXECUTED 40018c58: 01 00 00 00 nop <== NOT EXECUTED 40018c5c: 02 80 00 1b be 40018cc8 <== NOT EXECUTED 40018c60: a0 04 3f d0 add %l0, -48, %l0 <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 40018c64: 85 2c 60 03 sll %l1, 3, %g2 <== NOT EXECUTED 40018c68: 83 2c 60 01 sll %l1, 1, %g1 <== NOT EXECUTED 40018c6c: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 40018c70: a2 04 00 01 add %l0, %g1, %l1 <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 40018c74: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 40018c78: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40018c7c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40018c80: 16 bf ff e1 bge 40018c04 <== NOT EXECUTED 40018c84: c2 26 20 04 st %g1, [ %i0 + 4 ] <== NOT EXECUTED 40018c88: d0 05 63 70 ld [ %l5 + 0x370 ], %o0 <== NOT EXECUTED 40018c8c: 40 00 43 67 call 40029a28 <__srget_r> <== NOT EXECUTED 40018c90: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40018c94: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED if (c == ':') 40018c98: 80 a4 20 3a cmp %l0, 0x3a <== NOT EXECUTED 40018c9c: 12 bf ff e1 bne 40018c20 <== NOT EXECUTED 40018ca0: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) 40018ca4: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40018ca8: 02 80 00 0e be 40018ce0 <== NOT EXECUTED 40018cac: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED return 0; *val = i * sign; 40018cb0: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40018cb4: 7f ff a8 ec call 40003064 <.umul> <== NOT EXECUTED 40018cb8: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 40018cbc: d0 26 40 00 st %o0, [ %i1 ] <== NOT EXECUTED 40018cc0: 81 c7 e0 08 ret <== NOT EXECUTED 40018cc4: 81 e8 00 00 restore <== NOT EXECUTED sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 40018cc8: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40018ccc: 40 00 73 94 call 40035b1c <.urem> <== NOT EXECUTED 40018cd0: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 40018cd4: 80 a4 00 08 cmp %l0, %o0 <== NOT EXECUTED 40018cd8: 08 bf ff e4 bleu 40018c68 <== NOT EXECUTED 40018cdc: 85 2c 60 03 sll %l1, 3, %g2 <== NOT EXECUTED } if (sign == 0) return 0; *val = i * sign; return 1; } 40018ce0: 81 c7 e0 08 ret <== NOT EXECUTED 40018ce4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; limit++; 40018ce8: a6 04 e0 01 inc %l3 <== NOT EXECUTED 40018cec: 10 bf ff c1 b 40018bf0 <== NOT EXECUTED 40018cf0: a4 10 3f ff mov -1, %l2 <== NOT EXECUTED 40018cf4 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 40018cf4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int c; *name = *bufp; 40018cf8: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 40018cfc: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED for (;;) { c = getc(fp); 40018d00: 10 80 00 19 b 40018d64 <== NOT EXECUTED 40018d04: 33 10 00 f5 sethi %hi(0x4003d400), %i1 <== NOT EXECUTED 40018d08: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED 40018d0c: d0 08 40 00 ldub [ %g1 ], %o0 <== NOT EXECUTED 40018d10: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED if (c == ':') { 40018d14: 80 a2 20 3a cmp %o0, 0x3a <== NOT EXECUTED 40018d18: 02 80 00 1e be 40018d90 <== NOT EXECUTED 40018d1c: c4 26 00 00 st %g2, [ %i0 ] <== NOT EXECUTED if (nlFlag) return 0; break; } if (c == '\n') { 40018d20: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED 40018d24: 02 80 00 28 be 40018dc4 <== NOT EXECUTED 40018d28: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED if (!nlFlag) return 0; break; } if (c == EOF) 40018d2c: 02 80 00 29 be 40018dd0 <== NOT EXECUTED 40018d30: 01 00 00 00 nop <== NOT EXECUTED return 0; if (*nleft < 2) 40018d34: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED 40018d38: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40018d3c: 08 80 00 25 bleu 40018dd0 <== NOT EXECUTED 40018d40: 01 00 00 00 nop <== NOT EXECUTED return 0; **bufp = c; 40018d44: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 40018d48: d0 28 40 00 stb %o0, [ %g1 ] <== NOT EXECUTED ++(*bufp); 40018d4c: c4 06 80 00 ld [ %i2 ], %g2 <== NOT EXECUTED --(*nleft); 40018d50: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 40018d54: 84 00 a0 01 inc %g2 <== NOT EXECUTED --(*nleft); 40018d58: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 40018d5c: c4 26 80 00 st %g2, [ %i2 ] <== NOT EXECUTED --(*nleft); 40018d60: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED { int c; *name = *bufp; for (;;) { c = getc(fp); 40018d64: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 40018d68: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40018d6c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40018d70: 16 bf ff e6 bge 40018d08 <== NOT EXECUTED 40018d74: c2 26 20 04 st %g1, [ %i0 + 4 ] <== NOT EXECUTED 40018d78: d0 06 63 70 ld [ %i1 + 0x370 ], %o0 <== NOT EXECUTED 40018d7c: 40 00 43 2b call 40029a28 <__srget_r> <== NOT EXECUTED 40018d80: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED if (c == ':') { 40018d84: 80 a2 20 3a cmp %o0, 0x3a <== NOT EXECUTED 40018d88: 12 bf ff e7 bne 40018d24 <== NOT EXECUTED 40018d8c: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED if (nlFlag) 40018d90: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 40018d94: 12 80 00 0f bne 40018dd0 <== NOT EXECUTED 40018d98: 01 00 00 00 nop <== NOT EXECUTED return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 40018d9c: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 40018da0: c0 28 40 00 clrb [ %g1 ] <== NOT EXECUTED ++(*bufp); 40018da4: c4 06 80 00 ld [ %i2 ], %g2 <== NOT EXECUTED --(*nleft); 40018da8: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 40018dac: 84 00 a0 01 inc %g2 <== NOT EXECUTED --(*nleft); 40018db0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 40018db4: c4 26 80 00 st %g2, [ %i2 ] <== NOT EXECUTED --(*nleft); 40018db8: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED 40018dbc: 81 c7 e0 08 ret <== NOT EXECUTED 40018dc0: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) 40018dc4: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 40018dc8: 32 bf ff f6 bne,a 40018da0 <== NOT EXECUTED 40018dcc: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; } 40018dd0: 81 c7 e0 08 ret <== NOT EXECUTED 40018dd4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40005608 : scandir(dirname, namelist, select, dcomp) const char *dirname; struct dirent ***namelist; int (*select)(struct dirent *); int (*dcomp)(const struct dirent **, const struct dirent **); { 40005608: 9d e3 bf 48 save %sp, -184, %sp struct stat stb; long arraysz; DIR *dirp = NULL; int i; if ((dirp = opendir(dirname)) == NULL) 4000560c: 7f ff fd 7c call 40004bfc 40005610: 90 10 00 18 mov %i0, %o0 40005614: a4 92 20 00 orcc %o0, 0, %l2 40005618: 02 80 00 61 be 4000579c 4000561c: 92 10 3f ff mov -1, %o1 return(-1); if (fstat(dirp->dd_fd, &stb) < 0) 40005620: d0 04 80 00 ld [ %l2 ], %o0 40005624: aa 07 bf a8 add %fp, -88, %l5 40005628: 40 00 23 ca call 4000e550 4000562c: 92 10 00 15 mov %l5, %o1 40005630: 80 a2 20 00 cmp %o0, 0 40005634: 06 80 00 6b bl 400057e0 40005638: 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); 4000563c: 40 00 43 15 call 40016290 <.div> 40005640: 92 10 20 18 mov 0x18, %o1 names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *)); if (names == NULL) goto cleanup_and_bail; 40005644: 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); 40005648: a8 10 00 08 mov %o0, %l4 names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *)); 4000564c: 7f ff fa a2 call 400040d4 40005650: 91 2a 20 02 sll %o0, 2, %o0 if (names == NULL) 40005654: a6 92 20 00 orcc %o0, 0, %l3 40005658: 22 80 00 4c be,a 40005788 4000565c: b0 10 20 00 clr %i0 goto cleanup_and_bail; while ((d = readdir(dirp)) != NULL) { 40005660: 7f ff ff 4e call 40005398 40005664: 90 10 00 12 mov %l2, %o0 40005668: a0 92 20 00 orcc %o0, 0, %l0 4000566c: 02 80 00 29 be 40005710 40005670: 80 a6 a0 00 cmp %i2, 0 if (select != NULL && !(*select)(d)) 40005674: 22 80 00 08 be,a 40005694 40005678: d0 14 20 0a lduh [ %l0 + 0xa ], %o0 <== NOT EXECUTED 4000567c: 9f c6 80 00 call %i2 40005680: 01 00 00 00 nop 40005684: 80 a2 20 00 cmp %o0, 0 40005688: 02 bf ff f6 be 40005660 4000568c: 01 00 00 00 nop continue; /* just selected names */ /* * Make a minimum size copy of the data */ p = (struct dirent *)malloc(DIRSIZ(d)); 40005690: d0 14 20 0a lduh [ %l0 + 0xa ], %o0 40005694: 90 02 20 04 add %o0, 4, %o0 40005698: 90 0a 3f fc and %o0, -4, %o0 4000569c: 7f ff fa 8e call 400040d4 400056a0: 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); 400056a4: 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)); 400056a8: a2 10 00 08 mov %o0, %l1 if (p == NULL) 400056ac: 80 a4 60 00 cmp %l1, 0 400056b0: 02 80 00 36 be 40005788 400056b4: 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; 400056b8: 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; 400056bc: c2 04 00 00 ld [ %l0 ], %g1 p->d_reclen = d->d_reclen; 400056c0: 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); 400056c4: 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; 400056c8: c2 24 40 00 st %g1, [ %l1 ] p->d_reclen = d->d_reclen; 400056cc: c4 34 60 08 sth %g2, [ %l1 + 8 ] p->d_namlen = d->d_namlen; 400056d0: c6 34 60 0a sth %g3, [ %l1 + 0xa ] strncpy(p->d_name, d->d_name, p->d_namlen + 1); 400056d4: 95 32 a0 10 srl %o2, 0x10, %o2 400056d8: 40 00 39 4f call 40013c14 400056dc: 94 02 a0 01 inc %o2 /* * Check to make sure the array has space left and * realloc the maximum size. */ if (++nitems >= arraysz) { 400056e0: b0 06 20 01 inc %i0 400056e4: 80 a6 00 14 cmp %i0, %l4 400056e8: 3a 80 00 1a bcc,a 40005750 400056ec: d0 04 80 00 ld [ %l2 ], %o0 <== NOT EXECUTED names = (struct dirent **)realloc((char *)names, arraysz * sizeof(struct dirent *)); if (names == NULL) goto cleanup_and_bail; } names[nitems-1] = p; 400056f0: 83 2e 20 02 sll %i0, 2, %g1 400056f4: 82 00 40 13 add %g1, %l3, %g1 arraysz = (stb.st_size / 24); names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *)); if (names == NULL) goto cleanup_and_bail; while ((d = readdir(dirp)) != NULL) { 400056f8: 90 10 00 12 mov %l2, %o0 400056fc: 7f ff ff 27 call 40005398 40005700: e2 20 7f fc st %l1, [ %g1 + -4 ] 40005704: a0 92 20 00 orcc %o0, 0, %l0 40005708: 12 bf ff db bne 40005674 4000570c: 80 a6 a0 00 cmp %i2, 0 if (names == NULL) goto cleanup_and_bail; } names[nitems-1] = p; } closedir(dirp); 40005710: 7f ff f7 77 call 400034ec 40005714: 90 10 00 12 mov %l2, %o0 if (nitems && dcomp != NULL){ 40005718: 80 a6 20 00 cmp %i0, 0 4000571c: 02 80 00 0a be 40005744 40005720: 92 10 00 18 mov %i0, %o1 40005724: 80 a6 e0 00 cmp %i3, 0 40005728: 02 80 00 07 be 40005744 4000572c: 96 10 00 1b mov %i3, %o3 qsort(names, nitems, sizeof(struct dirent *), dcomp); 40005730: 90 10 00 13 mov %l3, %o0 40005734: 92 10 00 18 mov %i0, %o1 40005738: 40 00 36 08 call 40012f58 4000573c: 94 10 20 04 mov 4, %o2 } *namelist = names; return(nitems); 40005740: 92 10 00 18 mov %i0, %o1 } closedir(dirp); if (nitems && dcomp != NULL){ qsort(names, nitems, sizeof(struct dirent *), dcomp); } *namelist = names; 40005744: e6 26 40 00 st %l3, [ %i1 ] free( names[i] ); free( names ); } return(-1); } 40005748: 81 c7 e0 08 ret 4000574c: 91 e8 00 09 restore %g0, %o1, %o0 /* * Check to make sure the array has space left and * realloc the maximum size. */ if (++nitems >= arraysz) { if (fstat(dirp->dd_fd, &stb) < 0) 40005750: 40 00 23 80 call 4000e550 <== NOT EXECUTED 40005754: 92 10 00 15 mov %l5, %o1 <== NOT EXECUTED 40005758: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000575c: 06 80 00 0b bl 40005788 <== NOT EXECUTED 40005760: 92 10 20 0c mov 0xc, %o1 <== NOT EXECUTED goto cleanup_and_bail; /* just might have grown */ arraysz = stb.st_size / 12; 40005764: 40 00 42 cb call 40016290 <.div> <== NOT EXECUTED 40005768: d0 07 bf c8 ld [ %fp + -56 ], %o0 <== NOT EXECUTED 4000576c: a8 10 00 08 mov %o0, %l4 <== NOT EXECUTED names = (struct dirent **)realloc((char *)names, 40005770: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40005774: 7f ff fa a9 call 40004218 <== NOT EXECUTED 40005778: 93 2d 20 02 sll %l4, 2, %o1 <== NOT EXECUTED arraysz * sizeof(struct dirent *)); if (names == NULL) 4000577c: a6 92 20 00 orcc %o0, 0, %l3 <== NOT EXECUTED 40005780: 12 bf ff dd bne 400056f4 <== NOT EXECUTED 40005784: 83 2e 20 02 sll %i0, 2, %g1 <== NOT EXECUTED return(nitems); cleanup_and_bail: if ( dirp ) closedir( dirp ); 40005788: 7f ff f7 59 call 400034ec 4000578c: 90 10 00 12 mov %l2, %o0 if ( names ) { 40005790: 80 a4 e0 00 cmp %l3, 0 40005794: 12 80 00 04 bne 400057a4 40005798: 92 10 3f ff mov -1, %o1 free( names[i] ); free( names ); } return(-1); } 4000579c: 81 c7 e0 08 ret 400057a0: 91 e8 00 09 restore %g0, %o1, %o0 if ( dirp ) closedir( dirp ); if ( names ) { for (i=0; i < nitems; i++ ) 400057a4: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 400057a8: 02 80 00 0a be 400057d0 <== NOT EXECUTED 400057ac: 82 10 20 00 clr %g1 <== NOT EXECUTED 400057b0: a0 10 20 00 clr %l0 <== NOT EXECUTED free( names[i] ); 400057b4: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 400057b8: d0 04 c0 01 ld [ %l3 + %g1 ], %o0 <== NOT EXECUTED 400057bc: 7f ff fa 1d call 40004030 <== NOT EXECUTED 400057c0: a0 04 20 01 inc %l0 <== NOT EXECUTED if ( dirp ) closedir( dirp ); if ( names ) { for (i=0; i < nitems; i++ ) 400057c4: 80 a4 00 18 cmp %l0, %i0 <== NOT EXECUTED 400057c8: 12 bf ff fb bne 400057b4 <== NOT EXECUTED 400057cc: 82 10 00 10 mov %l0, %g1 <== NOT EXECUTED free( names[i] ); free( names ); 400057d0: 7f ff fa 18 call 40004030 <== NOT EXECUTED 400057d4: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 400057d8: 10 bf ff f1 b 4000579c <== NOT EXECUTED 400057dc: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED return(nitems); cleanup_and_bail: if ( dirp ) closedir( dirp ); 400057e0: 7f ff f7 43 call 400034ec <== NOT EXECUTED 400057e4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400057e8: 10 bf ff ed b 4000579c <== NOT EXECUTED 400057ec: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED 40018dd8 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 40018dd8: 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) 40018ddc: 98 10 20 00 clr %o4 <== NOT EXECUTED FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 40018de0: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 40018de4: 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) 40018de8: b4 07 a0 50 add %fp, 0x50, %i2 <== NOT EXECUTED 40018dec: b6 07 a0 4c add %fp, 0x4c, %i3 <== NOT EXECUTED 40018df0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40018df4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40018df8: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40018dfc: 7f ff ff be call 40018cf4 <== NOT EXECUTED 40018e00: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40018e04: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40018e08: 12 80 00 04 bne 40018e18 <== NOT EXECUTED 40018e0c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; } 40018e10: 81 c7 e0 08 ret <== NOT EXECUTED 40018e14: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 40018e18: 92 06 60 04 add %i1, 4, %o1 <== NOT EXECUTED 40018e1c: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40018e20: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40018e24: 7f ff ff b4 call 40018cf4 <== NOT EXECUTED 40018e28: 98 10 20 00 clr %o4 <== NOT EXECUTED 40018e2c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40018e30: 02 bf ff f8 be 40018e10 <== NOT EXECUTED 40018e34: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40018e38: 7f ff ff 67 call 40018bd4 <== NOT EXECUTED 40018e3c: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED 40018e40: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40018e44: 02 bf ff f3 be 40018e10 <== NOT EXECUTED 40018e48: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40018e4c: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40018e50: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40018e54: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED 40018e58: 7f ff ff a7 call 40018cf4 <== NOT EXECUTED 40018e5c: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED 40018e60: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40018e64: 02 bf ff eb be 40018e10 <== NOT EXECUTED 40018e68: da 07 bf f0 ld [ %fp + -16 ], %o5 <== NOT EXECUTED || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; 40018e6c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40018e70: 86 10 00 0d mov %o5, %g3 <== NOT EXECUTED if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; 40018e74: c2 36 60 08 sth %g1, [ %i1 + 8 ] <== NOT EXECUTED /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40018e78: c4 0b 40 00 ldub [ %o5 ], %g2 <== NOT EXECUTED 40018e7c: 83 28 a0 18 sll %g2, 0x18, %g1 <== NOT EXECUTED 40018e80: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40018e84: 02 80 00 0f be 40018ec0 <== NOT EXECUTED 40018e88: 88 10 20 17 mov 0x17, %g4 <== NOT EXECUTED 40018e8c: 88 10 20 01 mov 1, %g4 <== NOT EXECUTED 40018e90: 86 00 e0 01 inc %g3 <== NOT EXECUTED 40018e94: c4 08 c0 00 ldub [ %g3 ], %g2 <== NOT EXECUTED if(*cp == ',') 40018e98: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED memcount++; 40018e9c: 82 18 60 2c xor %g1, 0x2c, %g1 <== NOT EXECUTED 40018ea0: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40018ea4: 83 28 a0 18 sll %g2, 0x18, %g1 <== NOT EXECUTED if(*cp == ',') memcount++; 40018ea8: 88 61 3f ff subx %g4, -1, %g4 <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40018eac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40018eb0: 32 bf ff f9 bne,a 40018e94 <== NOT EXECUTED 40018eb4: 86 00 e0 01 inc %g3 <== NOT EXECUTED 40018eb8: 83 29 20 02 sll %g4, 2, %g1 <== NOT EXECUTED 40018ebc: 88 00 60 13 add %g1, 0x13, %g4 <== NOT EXECUTED } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 40018ec0: c2 07 a0 50 ld [ %fp + 0x50 ], %g1 <== NOT EXECUTED 40018ec4: 80 a0 40 04 cmp %g1, %g4 <== NOT EXECUTED 40018ec8: 0a bf ff d2 bcs 40018e10 <== NOT EXECUTED 40018ecc: c2 07 a0 4c ld [ %fp + 0x4c ], %g1 <== NOT EXECUTED return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 40018ed0: 82 00 60 0f add %g1, 0xf, %g1 <== NOT EXECUTED 40018ed4: 82 08 7f f0 and %g1, -16, %g1 <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 40018ed8: da 20 40 00 st %o5, [ %g1 ] <== NOT EXECUTED for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40018edc: 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); 40018ee0: c2 26 60 0c st %g1, [ %i1 + 0xc ] <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40018ee4: c2 08 80 00 ldub [ %g2 ], %g1 <== NOT EXECUTED 40018ee8: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 40018eec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40018ef0: 02 80 00 15 be 40018f44 <== NOT EXECUTED 40018ef4: 86 10 20 04 mov 4, %g3 <== NOT EXECUTED 40018ef8: 86 00 a0 01 add %g2, 1, %g3 <== NOT EXECUTED 40018efc: 10 80 00 07 b 40018f18 <== NOT EXECUTED 40018f00: 88 10 20 01 mov 1, %g4 <== NOT EXECUTED 40018f04: c2 08 c0 00 ldub [ %g3 ], %g1 <== NOT EXECUTED 40018f08: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 40018f0c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40018f10: 02 80 00 0c be 40018f40 <== NOT EXECUTED 40018f14: 86 00 e0 01 inc %g3 <== NOT EXECUTED if(*cp == ',') { 40018f18: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED 40018f1c: 80 a0 60 2c cmp %g1, 0x2c <== NOT EXECUTED 40018f20: 32 bf ff fa bne,a 40018f08 <== NOT EXECUTED 40018f24: c2 08 c0 00 ldub [ %g3 ], %g1 <== NOT EXECUTED *cp = '\0'; 40018f28: c0 28 ff ff clrb [ %g3 + -1 ] <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 40018f2c: c4 06 60 0c ld [ %i1 + 0xc ], %g2 <== NOT EXECUTED 40018f30: 83 29 20 02 sll %g4, 2, %g1 <== NOT EXECUTED 40018f34: 88 01 20 01 inc %g4 <== NOT EXECUTED 40018f38: 10 bf ff f3 b 40018f04 <== NOT EXECUTED 40018f3c: c6 20 80 01 st %g3, [ %g2 + %g1 ] <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40018f40: 87 29 20 02 sll %g4, 2, %g3 <== NOT EXECUTED if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 40018f44: c2 06 60 0c ld [ %i1 + 0xc ], %g1 <== NOT EXECUTED 40018f48: c0 20 40 03 clr [ %g1 + %g3 ] <== NOT EXECUTED 40018f4c: 81 c7 e0 08 ret <== NOT EXECUTED 40018f50: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED 40018fa0 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 40018fa0: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40018fa4: 98 10 20 00 clr %o4 <== NOT EXECUTED FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 40018fa8: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 40018fac: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40018fb0: b4 07 a0 50 add %fp, 0x50, %i2 <== NOT EXECUTED 40018fb4: b6 07 a0 4c add %fp, 0x4c, %i3 <== NOT EXECUTED 40018fb8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40018fbc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40018fc0: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40018fc4: 7f ff ff 4c call 40018cf4 <== NOT EXECUTED 40018fc8: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40018fcc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40018fd0: 12 80 00 04 bne 40018fe0 <== NOT EXECUTED 40018fd4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; return 1; } 40018fd8: 81 c7 e0 08 ret <== NOT EXECUTED 40018fdc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40018fe0: 92 06 60 04 add %i1, 4, %o1 <== NOT EXECUTED 40018fe4: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40018fe8: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40018fec: 7f ff ff 42 call 40018cf4 <== NOT EXECUTED 40018ff0: 98 10 20 00 clr %o4 <== NOT EXECUTED 40018ff4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40018ff8: 02 bf ff f8 be 40018fd8 <== NOT EXECUTED 40018ffc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40019000: 7f ff fe f5 call 40018bd4 <== NOT EXECUTED 40019004: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED 40019008: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001900c: 02 bf ff f3 be 40018fd8 <== NOT EXECUTED 40019010: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40019014: 7f ff fe f0 call 40018bd4 <== NOT EXECUTED 40019018: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED 4001901c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40019020: 02 bf ff ee be 40018fd8 <== NOT EXECUTED 40019024: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40019028: 92 06 60 0c add %i1, 0xc, %o1 <== NOT EXECUTED 4001902c: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40019030: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40019034: 7f ff ff 30 call 40018cf4 <== NOT EXECUTED 40019038: 98 10 20 00 clr %o4 <== NOT EXECUTED 4001903c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40019040: 02 bf ff e6 be 40018fd8 <== NOT EXECUTED 40019044: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40019048: 92 06 60 10 add %i1, 0x10, %o1 <== NOT EXECUTED 4001904c: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40019050: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40019054: 7f ff ff 28 call 40018cf4 <== NOT EXECUTED 40019058: 98 10 20 00 clr %o4 <== NOT EXECUTED 4001905c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40019060: 02 bf ff de be 40018fd8 <== NOT EXECUTED 40019064: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40019068: 92 06 60 14 add %i1, 0x14, %o1 <== NOT EXECUTED 4001906c: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40019070: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40019074: 7f ff ff 20 call 40018cf4 <== NOT EXECUTED 40019078: 98 10 20 00 clr %o4 <== NOT EXECUTED 4001907c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40019080: 02 bf ff d6 be 40018fd8 <== NOT EXECUTED 40019084: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40019088: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 4001908c: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40019090: 92 06 60 18 add %i1, 0x18, %o1 <== NOT EXECUTED 40019094: 7f ff ff 18 call 40018cf4 <== NOT EXECUTED 40019098: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED 4001909c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400190a0: 02 bf ff ce be 40018fd8 <== NOT EXECUTED 400190a4: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; 400190a8: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== NOT EXECUTED || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; 400190ac: c2 36 60 08 sth %g1, [ %i1 + 8 ] <== NOT EXECUTED pwd->pw_gid = pwgid; 400190b0: c4 36 60 0a sth %g2, [ %i1 + 0xa ] <== NOT EXECUTED 400190b4: 81 c7 e0 08 ret <== NOT EXECUTED 400190b8: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED 40006f70 : */ int sched_get_priority_max( int policy ) { 40006f70: 9d e3 bf 98 save %sp, -104, %sp switch ( policy ) { 40006f74: 80 a6 20 03 cmp %i0, 3 40006f78: 08 80 00 06 bleu 40006f90 40006f7c: b0 10 20 fe mov 0xfe, %i0 case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 40006f80: 40 00 26 8f call 400109bc <__errno> <== NOT EXECUTED 40006f84: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40006f88: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40006f8c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; } 40006f90: 81 c7 e0 08 ret 40006f94: 81 e8 00 00 restore 40006fd0 : int sched_getparam( pid_t pid, const struct sched_param *param ) { 40006fd0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSYS ); 40006fd4: 40 00 26 7a call 400109bc <__errno> <== NOT EXECUTED 40006fd8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40006fdc: 82 10 20 58 mov 0x58, %g1 <== NOT EXECUTED 40006fe0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } 40006fe4: 81 c7 e0 08 ret <== NOT EXECUTED 40006fe8: 81 e8 00 00 restore <== NOT EXECUTED 40006f98 : */ int sched_getscheduler( pid_t pid ) { 40006f98: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSYS ); 40006f9c: 40 00 26 88 call 400109bc <__errno> <== NOT EXECUTED 40006fa0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40006fa4: 82 10 20 58 mov 0x58, %g1 <== NOT EXECUTED 40006fa8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } 40006fac: 81 c7 e0 08 ret <== NOT EXECUTED 40006fb0: 81 e8 00 00 restore <== NOT EXECUTED 40007008 : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { 40007008: 9d e3 bf 98 save %sp, -104, %sp /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 4000700c: 80 a6 20 00 cmp %i0, 0 40007010: 12 80 00 0a bne 40007038 40007014: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) 40007018: 02 80 00 13 be 40007064 4000701c: 03 10 00 7a sethi %hi(0x4001e800), %g1 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 40007020: d0 00 61 b8 ld [ %g1 + 0x1b8 ], %o0 ! 4001e9b8 <_Thread_Ticks_per_timeslice> 40007024: 92 10 00 19 mov %i1, %o1 40007028: 40 00 14 c1 call 4000c32c <_Timespec_From_ticks> 4000702c: b0 10 20 00 clr %i0 return 0; } 40007030: 81 c7 e0 08 ret 40007034: 81 e8 00 00 restore { /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 40007038: 7f ff f0 2a call 400030e0 4000703c: 01 00 00 00 nop 40007040: 80 a2 00 18 cmp %o0, %i0 40007044: 02 bf ff f5 be 40007018 40007048: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); 4000704c: 40 00 26 5c call 400109bc <__errno> <== NOT EXECUTED 40007050: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40007054: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED 40007058: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000705c: 81 c7 e0 08 ret <== NOT EXECUTED 40007060: 81 e8 00 00 restore <== NOT EXECUTED if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 40007064: 40 00 26 56 call 400109bc <__errno> <== NOT EXECUTED 40007068: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000706c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40007070: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40007074: 81 c7 e0 08 ret <== NOT EXECUTED 40007078: 81 e8 00 00 restore <== NOT EXECUTED 40006fec : int sched_setparam( pid_t pid, const struct sched_param *param ) { 40006fec: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSYS ); 40006ff0: 40 00 26 73 call 400109bc <__errno> <== NOT EXECUTED 40006ff4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40006ff8: 82 10 20 58 mov 0x58, %g1 <== NOT EXECUTED 40006ffc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } 40007000: 81 c7 e0 08 ret <== NOT EXECUTED 40007004: 81 e8 00 00 restore <== NOT EXECUTED 40006fb4 : int sched_setscheduler( pid_t pid, int policy, const struct sched_param *param ) { 40006fb4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSYS ); 40006fb8: 40 00 26 81 call 400109bc <__errno> <== NOT EXECUTED 40006fbc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40006fc0: 82 10 20 58 mov 0x58, %g1 <== NOT EXECUTED 40006fc4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } 40006fc8: 81 c7 e0 08 ret <== NOT EXECUTED 40006fcc: 81 e8 00 00 restore <== NOT EXECUTED 40006e90 : */ int sem_close( sem_t *sem ) { 40006e90: 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 *) 40006e94: d2 06 00 00 ld [ %i0 ], %o1 40006e98: 11 10 00 81 sethi %hi(0x40020400), %o0 40006e9c: 94 07 bf f4 add %fp, -12, %o2 40006ea0: 40 00 0c 44 call 40009fb0 <_Objects_Get> 40006ea4: 90 12 23 30 or %o0, 0x330, %o0 register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 40006ea8: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006eac: 80 a0 60 01 cmp %g1, 1 40006eb0: 02 80 00 1c be 40006f20 40006eb4: 01 00 00 00 nop 40006eb8: 2a 80 00 09 bcs,a 40006edc 40006ebc: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 40006ec0: 80 a0 60 02 cmp %g1, 2 40006ec4: 02 80 00 1d be 40006f38 40006ec8: 01 00 00 00 nop the_semaphore->open_count -= 1; _POSIX_Semaphore_Delete( the_semaphore ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40006ecc: 40 00 01 aa call 40007574 <== NOT EXECUTED 40006ed0: 01 00 00 00 nop <== NOT EXECUTED } 40006ed4: 81 c7 e0 08 ret <== NOT EXECUTED 40006ed8: 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; 40006edc: 82 00 7f ff add %g1, -1, %g1 _POSIX_Semaphore_Delete( the_semaphore ); 40006ee0: 40 00 21 b4 call 4000f5b0 <_POSIX_Semaphore_Delete> 40006ee4: 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 ) 40006ee8: 07 10 00 80 sethi %hi(0x40020000), %g3 40006eec: c2 00 e3 b0 ld [ %g3 + 0x3b0 ], %g1 ! 400203b0 <_Thread_Dispatch_disable_level> 40006ef0: 90 10 20 00 clr %o0 40006ef4: 82 00 7f ff add %g1, -1, %g1 40006ef8: c2 20 e3 b0 st %g1, [ %g3 + 0x3b0 ] 40006efc: c4 00 e3 b0 ld [ %g3 + 0x3b0 ], %g2 40006f00: 80 a0 a0 00 cmp %g2, 0 40006f04: 12 bf ff f4 bne 40006ed4 40006f08: 01 00 00 00 nop _Thread_Dispatch(); 40006f0c: 40 00 11 15 call 4000b360 <_Thread_Dispatch> 40006f10: 01 00 00 00 nop 40006f14: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40006f18: 81 c7 e0 08 ret 40006f1c: 91 e8 00 08 restore %g0, %o0, %o0 the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_REMOTE: _Thread_Dispatch(); 40006f20: 40 00 11 10 call 4000b360 <_Thread_Dispatch> <== NOT EXECUTED 40006f24: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 40006f28: 40 00 01 9d call 4000759c <== NOT EXECUTED 40006f2c: 01 00 00 00 nop <== NOT EXECUTED _POSIX_Semaphore_Delete( the_semaphore ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40006f30: 81 c7 e0 08 ret <== NOT EXECUTED 40006f34: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); 40006f38: 40 00 2a 78 call 40011918 <__errno> 40006f3c: 01 00 00 00 nop 40006f40: 82 10 20 16 mov 0x16, %g1 ! 16 40006f44: c2 22 00 00 st %g1, [ %o0 ] 40006f48: 90 10 3f ff mov -1, %o0 _POSIX_Semaphore_Delete( the_semaphore ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40006f4c: 81 c7 e0 08 ret 40006f50: 91 e8 00 08 restore %g0, %o0, %o0 40006f54 : */ int sem_destroy( sem_t *sem ) { 40006f54: 9d e3 bf 90 save %sp, -112, %sp 40006f58: d2 06 00 00 ld [ %i0 ], %o1 40006f5c: 11 10 00 81 sethi %hi(0x40020400), %o0 40006f60: 94 07 bf f4 add %fp, -12, %o2 40006f64: 40 00 0c 13 call 40009fb0 <_Objects_Get> 40006f68: 90 12 23 30 or %o0, 0x330, %o0 register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 40006f6c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006f70: 80 a0 60 01 cmp %g1, 1 40006f74: 02 80 00 2f be 40007030 40006f78: 01 00 00 00 nop 40006f7c: 2a 80 00 09 bcs,a 40006fa0 40006f80: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 40006f84: 80 a0 60 02 cmp %g1, 2 40006f88: 02 80 00 23 be 40007014 40006f8c: 01 00 00 00 nop _POSIX_Semaphore_Delete( the_semaphore ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40006f90: 40 00 01 79 call 40007574 <== NOT EXECUTED 40006f94: 01 00 00 00 nop <== NOT EXECUTED } 40006f98: 81 c7 e0 08 ret <== NOT EXECUTED 40006f9c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { 40006fa0: 80 a0 60 01 cmp %g1, 1 40006fa4: 02 80 00 12 be 40006fec 40006fa8: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } _POSIX_Semaphore_Delete( the_semaphore ); 40006fac: 40 00 21 81 call 4000f5b0 <_POSIX_Semaphore_Delete> 40006fb0: 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 ) 40006fb4: 03 10 00 80 sethi %hi(0x40020000), %g1 40006fb8: c4 00 63 b0 ld [ %g1 + 0x3b0 ], %g2 ! 400203b0 <_Thread_Dispatch_disable_level> 40006fbc: 90 10 20 00 clr %o0 40006fc0: 84 00 bf ff add %g2, -1, %g2 40006fc4: c4 20 63 b0 st %g2, [ %g1 + 0x3b0 ] 40006fc8: c6 00 63 b0 ld [ %g1 + 0x3b0 ], %g3 40006fcc: 80 a0 e0 00 cmp %g3, 0 40006fd0: 12 bf ff f2 bne 40006f98 40006fd4: 01 00 00 00 nop _Thread_Dispatch(); 40006fd8: 40 00 10 e2 call 4000b360 <_Thread_Dispatch> 40006fdc: 01 00 00 00 nop 40006fe0: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40006fe4: 81 c7 e0 08 ret 40006fe8: 91 e8 00 08 restore %g0, %o0, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006fec: 03 10 00 80 sethi %hi(0x40020000), %g1 <== NOT EXECUTED 40006ff0: c4 00 63 b0 ld [ %g1 + 0x3b0 ], %g2 ! 400203b0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40006ff4: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED 40006ff8: c4 20 63 b0 st %g2, [ %g1 + 0x3b0 ] <== NOT EXECUTED 40006ffc: c6 00 63 b0 ld [ %g1 + 0x3b0 ], %g3 <== NOT EXECUTED 40007000: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40007004: 12 80 00 04 bne 40007014 <== NOT EXECUTED 40007008: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 4000700c: 40 00 10 d5 call 4000b360 <_Thread_Dispatch> <== NOT EXECUTED 40007010: 01 00 00 00 nop <== NOT EXECUTED * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); 40007014: 40 00 2a 41 call 40011918 <__errno> 40007018: 01 00 00 00 nop 4000701c: 82 10 20 16 mov 0x16, %g1 ! 16 40007020: c2 22 00 00 st %g1, [ %o0 ] 40007024: 90 10 3f ff mov -1, %o0 _POSIX_Semaphore_Delete( the_semaphore ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40007028: 81 c7 e0 08 ret 4000702c: 91 e8 00 08 restore %g0, %o0, %o0 the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_REMOTE: _Thread_Dispatch(); 40007030: 40 00 10 cc call 4000b360 <_Thread_Dispatch> <== NOT EXECUTED 40007034: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 40007038: 40 00 01 59 call 4000759c <== NOT EXECUTED 4000703c: 01 00 00 00 nop <== NOT EXECUTED _POSIX_Semaphore_Delete( the_semaphore ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40007040: 81 c7 e0 08 ret <== NOT EXECUTED 40007044: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40007048 : int sem_getvalue( sem_t *sem, int *sval ) { 40007048: 9d e3 bf 90 save %sp, -112, %sp 4000704c: d2 06 00 00 ld [ %i0 ], %o1 40007050: 11 10 00 81 sethi %hi(0x40020400), %o0 40007054: 94 07 bf f4 add %fp, -12, %o2 40007058: 40 00 0b d6 call 40009fb0 <_Objects_Get> 4000705c: 90 12 23 30 or %o0, 0x330, %o0 register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 40007060: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007064: 80 a0 60 01 cmp %g1, 1 40007068: 02 80 00 1a be 400070d0 4000706c: 01 00 00 00 nop 40007070: 2a 80 00 09 bcs,a 40007094 40007074: c2 02 20 68 ld [ %o0 + 0x68 ], %g1 40007078: 80 a0 60 02 cmp %g1, 2 4000707c: 02 80 00 1b be 400070e8 40007080: 01 00 00 00 nop case OBJECTS_LOCAL: *sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40007084: 40 00 01 3c call 40007574 <== NOT EXECUTED 40007088: 01 00 00 00 nop <== NOT EXECUTED } 4000708c: 81 c7 e0 08 ret <== NOT EXECUTED 40007090: 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 ); 40007094: 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 ) 40007098: 07 10 00 80 sethi %hi(0x40020000), %g3 4000709c: c2 00 e3 b0 ld [ %g3 + 0x3b0 ], %g1 ! 400203b0 <_Thread_Dispatch_disable_level> 400070a0: 90 10 20 00 clr %o0 400070a4: 82 00 7f ff add %g1, -1, %g1 400070a8: c2 20 e3 b0 st %g1, [ %g3 + 0x3b0 ] 400070ac: c4 00 e3 b0 ld [ %g3 + 0x3b0 ], %g2 400070b0: 80 a0 a0 00 cmp %g2, 0 400070b4: 12 bf ff f6 bne 4000708c 400070b8: 01 00 00 00 nop _Thread_Dispatch(); 400070bc: 40 00 10 a9 call 4000b360 <_Thread_Dispatch> 400070c0: 01 00 00 00 nop 400070c4: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 400070c8: 81 c7 e0 08 ret 400070cc: 91 e8 00 08 restore %g0, %o0, %o0 the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_REMOTE: _Thread_Dispatch(); 400070d0: 40 00 10 a4 call 4000b360 <_Thread_Dispatch> <== NOT EXECUTED 400070d4: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 400070d8: 40 00 01 31 call 4000759c <== NOT EXECUTED 400070dc: 01 00 00 00 nop <== NOT EXECUTED *sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 400070e0: 81 c7 e0 08 ret <== NOT EXECUTED 400070e4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); 400070e8: 40 00 2a 0c call 40011918 <__errno> 400070ec: 01 00 00 00 nop 400070f0: 82 10 20 16 mov 0x16, %g1 ! 16 400070f4: c2 22 00 00 st %g1, [ %o0 ] 400070f8: 90 10 3f ff mov -1, %o0 *sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 400070fc: 81 c7 e0 08 ret 40007100: 91 e8 00 08 restore %g0, %o0, %o0 40007104 : int sem_init( sem_t *sem, int pshared, unsigned int value ) { 40007104: 9d e3 bf 90 save %sp, -112, %sp 40007108: 92 10 00 19 mov %i1, %o1 int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 4000710c: 80 a6 20 00 cmp %i0, 0 40007110: 02 80 00 0c be 40007140 40007114: 94 10 00 1a mov %i2, %o2 rtems_set_errno_and_return_minus_one( EINVAL ); status = _POSIX_Semaphore_Create_support( 40007118: 90 10 20 00 clr %o0 4000711c: 40 00 20 b4 call 4000f3ec <_POSIX_Semaphore_Create_support> 40007120: 96 07 bf f4 add %fp, -12, %o3 pshared, value, &the_semaphore ); if ( status != -1 ) 40007124: 80 a2 3f ff cmp %o0, -1 40007128: 02 80 00 04 be 40007138 4000712c: c2 07 bf f4 ld [ %fp + -12 ], %g1 *sem = the_semaphore->Object.id; 40007130: c4 00 60 08 ld [ %g1 + 8 ], %g2 40007134: c4 26 00 00 st %g2, [ %i0 ] return status; } 40007138: 81 c7 e0 08 ret 4000713c: 91 e8 00 08 restore %g0, %o0, %o0 { int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) rtems_set_errno_and_return_minus_one( EINVAL ); 40007140: 40 00 29 f6 call 40011918 <__errno> <== NOT EXECUTED 40007144: 01 00 00 00 nop <== NOT EXECUTED 40007148: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4000714c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40007150: 10 bf ff fa b 40007138 <== NOT EXECUTED 40007154: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 40007158 : int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { 40007158: 9d e3 bf 88 save %sp, -120, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000715c: 21 10 00 80 sethi %hi(0x40020000), %l0 40007160: c2 04 23 b0 ld [ %l0 + 0x3b0 ], %g1 ! 400203b0 <_Thread_Dispatch_disable_level> 40007164: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 40007168: 82 00 60 01 inc %g1 4000716c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 40007170: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 40007174: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 40007178: c2 24 23 b0 st %g1, [ %l0 + 0x3b0 ] POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 4000717c: b8 8e 62 00 andcc %i1, 0x200, %i4 40007180: 12 80 00 42 bne 40007288 40007184: f6 07 a0 50 ld [ %fp + 0x50 ], %i3 40007188: b6 10 20 00 clr %i3 mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); va_end(arg); } status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 4000718c: 90 10 00 18 mov %i0, %o0 40007190: 40 00 21 25 call 4000f624 <_POSIX_Semaphore_Name_to_id> 40007194: 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 "semaphore does not exist" * or some other miscellaneous error on the name. */ if ( status ) { 40007198: ba 92 20 00 orcc %o0, 0, %i5 4000719c: 02 80 00 11 be 400071e0 400071a0: 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) ) ) { 400071a4: 80 a7 60 02 cmp %i5, 2 400071a8: 02 80 00 3b be 40007294 400071ac: 80 a7 20 00 cmp %i4, 0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400071b0: c2 04 23 b0 ld [ %l0 + 0x3b0 ], %g1 400071b4: 82 00 7f ff add %g1, -1, %g1 400071b8: c2 24 23 b0 st %g1, [ %l0 + 0x3b0 ] 400071bc: c4 04 23 b0 ld [ %l0 + 0x3b0 ], %g2 400071c0: 80 a0 a0 00 cmp %g2, 0 400071c4: 02 80 00 52 be 4000730c 400071c8: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 400071cc: 40 00 29 d3 call 40011918 <__errno> <== NOT EXECUTED 400071d0: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 400071d4: fa 22 00 00 st %i5, [ %o0 ] <== NOT EXECUTED 400071d8: 81 c7 e0 08 ret <== NOT EXECUTED 400071dc: 81 e8 00 00 restore <== NOT EXECUTED /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 400071e0: 80 a0 6a 00 cmp %g1, 0xa00 400071e4: 02 80 00 1c be 40007254 400071e8: d2 07 bf f0 ld [ %fp + -16 ], %o1 400071ec: 94 07 bf e8 add %fp, -24, %o2 400071f0: 11 10 00 81 sethi %hi(0x40020400), %o0 400071f4: 40 00 0b 6f call 40009fb0 <_Objects_Get> 400071f8: 90 12 23 30 or %o0, 0x330, %o0 ! 40020730 <_POSIX_Semaphore_Information> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); the_semaphore->open_count += 1; 400071fc: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); 40007200: d0 27 bf ec st %o0, [ %fp + -20 ] the_semaphore->open_count += 1; 40007204: 82 00 60 01 inc %g1 40007208: c2 22 20 1c st %g1, [ %o0 + 0x1c ] 4000720c: c2 04 23 b0 ld [ %l0 + 0x3b0 ], %g1 40007210: 3b 10 00 80 sethi %hi(0x40020000), %i5 40007214: 82 00 7f ff add %g1, -1, %g1 40007218: c2 24 23 b0 st %g1, [ %l0 + 0x3b0 ] 4000721c: c4 04 23 b0 ld [ %l0 + 0x3b0 ], %g2 40007220: 80 a0 a0 00 cmp %g2, 0 40007224: 02 80 00 34 be 400072f4 40007228: 01 00 00 00 nop 4000722c: c2 07 63 b0 ld [ %i5 + 0x3b0 ], %g1 40007230: 82 00 7f ff add %g1, -1, %g1 40007234: c2 27 63 b0 st %g1, [ %i5 + 0x3b0 ] 40007238: c4 07 63 b0 ld [ %i5 + 0x3b0 ], %g2 4000723c: 80 a0 a0 00 cmp %g2, 0 40007240: 02 80 00 29 be 400072e4 40007244: 01 00 00 00 nop _Thread_Enable_dispatch(); _Thread_Enable_dispatch(); id = &the_semaphore->Object.id; return (sem_t *)id; 40007248: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 4000724c: 81 c7 e0 08 ret 40007250: 91 e8 60 08 restore %g1, 8, %o0 40007254: c2 04 23 b0 ld [ %l0 + 0x3b0 ], %g1 40007258: 82 00 7f ff add %g1, -1, %g1 4000725c: c2 24 23 b0 st %g1, [ %l0 + 0x3b0 ] 40007260: c4 04 23 b0 ld [ %l0 + 0x3b0 ], %g2 40007264: 80 a0 a0 00 cmp %g2, 0 40007268: 02 80 00 26 be 40007300 4000726c: 01 00 00 00 nop * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 40007270: 40 00 29 aa call 40011918 <__errno> 40007274: b0 10 3f ff mov -1, %i0 ! ffffffff 40007278: 82 10 20 11 mov 0x11, %g1 4000727c: c2 22 00 00 st %g1, [ %o0 ] 40007280: 81 c7 e0 08 ret 40007284: 81 e8 00 00 restore _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); 40007288: 82 07 a0 54 add %fp, 0x54, %g1 4000728c: 10 bf ff c0 b 4000718c 40007290: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * 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) ) ) { 40007294: 02 bf ff c7 be 400071b0 40007298: 90 10 00 18 mov %i0, %o0 /* * At this point, the semaphore does not exist and everything has been * checked. We should go ahead and create a semaphore. */ status =_POSIX_Semaphore_Create_support( 4000729c: 94 10 00 1b mov %i3, %o2 400072a0: 92 10 20 00 clr %o1 400072a4: 40 00 20 52 call 4000f3ec <_POSIX_Semaphore_Create_support> 400072a8: 96 07 bf ec add %fp, -20, %o3 400072ac: ba 10 00 08 mov %o0, %i5 400072b0: c2 04 23 b0 ld [ %l0 + 0x3b0 ], %g1 400072b4: 82 00 7f ff add %g1, -1, %g1 400072b8: c2 24 23 b0 st %g1, [ %l0 + 0x3b0 ] 400072bc: c4 04 23 b0 ld [ %l0 + 0x3b0 ], %g2 400072c0: 80 a0 a0 00 cmp %g2, 0 400072c4: 02 80 00 19 be 40007328 400072c8: 01 00 00 00 nop * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); if ( status == -1 ) 400072cc: 80 a7 7f ff cmp %i5, -1 <== NOT EXECUTED 400072d0: 02 bf ff c2 be 400071d8 400072d4: b0 10 3f ff mov -1, %i0 return SEM_FAILED; id = &the_semaphore->Object.id; return (sem_t *)id; 400072d8: c2 07 bf ec ld [ %fp + -20 ], %g1 } 400072dc: 81 c7 e0 08 ret 400072e0: 91 e8 60 08 restore %g1, 8, %o0 _Thread_Dispatch(); 400072e4: 40 00 10 1f call 4000b360 <_Thread_Dispatch> 400072e8: 01 00 00 00 nop the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); the_semaphore->open_count += 1; _Thread_Enable_dispatch(); _Thread_Enable_dispatch(); id = &the_semaphore->Object.id; return (sem_t *)id; 400072ec: 10 bf ff d8 b 4000724c 400072f0: c2 07 bf ec ld [ %fp + -20 ], %g1 400072f4: 40 00 10 1b call 4000b360 <_Thread_Dispatch> <== NOT EXECUTED 400072f8: 01 00 00 00 nop <== NOT EXECUTED 400072fc: 30 bf ff cc b,a 4000722c <== NOT EXECUTED 40007300: 40 00 10 18 call 4000b360 <_Thread_Dispatch> 40007304: 01 00 00 00 nop 40007308: 30 bf ff da b,a 40007270 4000730c: 40 00 10 15 call 4000b360 <_Thread_Dispatch> 40007310: b0 10 3f ff mov -1, %i0 * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 40007314: 40 00 29 81 call 40011918 <__errno> 40007318: 01 00 00 00 nop 4000731c: fa 22 00 00 st %i5, [ %o0 ] 40007320: 81 c7 e0 08 ret 40007324: 81 e8 00 00 restore 40007328: 40 00 10 0e call 4000b360 <_Thread_Dispatch> 4000732c: 01 00 00 00 nop * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); if ( status == -1 ) 40007330: 10 bf ff e8 b 400072d0 40007334: 80 a7 7f ff cmp %i5, -1 40007338 : */ int sem_post( sem_t *sem ) { 40007338: 9d e3 bf 90 save %sp, -112, %sp 4000733c: d2 06 00 00 ld [ %i0 ], %o1 40007340: 11 10 00 81 sethi %hi(0x40020400), %o0 40007344: 94 07 bf f4 add %fp, -12, %o2 40007348: 40 00 0b 1a call 40009fb0 <_Objects_Get> 4000734c: 90 12 23 30 or %o0, 0x330, %o0 register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 40007350: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007354: 80 a0 60 01 cmp %g1, 1 40007358: 02 80 00 1c be 400073c8 4000735c: 01 00 00 00 nop 40007360: 2a 80 00 09 bcs,a 40007384 40007364: d2 02 20 08 ld [ %o0 + 8 ], %o1 40007368: 80 a0 60 02 cmp %g1, 2 4000736c: 02 80 00 1d be 400073e0 40007370: 01 00 00 00 nop #endif ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40007374: 40 00 00 80 call 40007574 <== NOT EXECUTED 40007378: 01 00 00 00 nop <== NOT EXECUTED } 4000737c: 81 c7 e0 08 ret <== NOT EXECUTED 40007380: 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( 40007384: 94 10 20 00 clr %o2 40007388: 40 00 07 f8 call 40009368 <_CORE_semaphore_Surrender> 4000738c: 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 ) 40007390: 03 10 00 80 sethi %hi(0x40020000), %g1 40007394: c4 00 63 b0 ld [ %g1 + 0x3b0 ], %g2 ! 400203b0 <_Thread_Dispatch_disable_level> 40007398: 90 10 20 00 clr %o0 4000739c: 84 00 bf ff add %g2, -1, %g2 400073a0: c4 20 63 b0 st %g2, [ %g1 + 0x3b0 ] 400073a4: c6 00 63 b0 ld [ %g1 + 0x3b0 ], %g3 400073a8: 80 a0 e0 00 cmp %g3, 0 400073ac: 12 bf ff f4 bne 4000737c 400073b0: 01 00 00 00 nop _Thread_Dispatch(); 400073b4: 40 00 0f eb call 4000b360 <_Thread_Dispatch> 400073b8: 01 00 00 00 nop 400073bc: 90 10 20 00 clr %o0 ! 0 ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 400073c0: 81 c7 e0 08 ret 400073c4: 91 e8 00 08 restore %g0, %o0, %o0 the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_REMOTE: _Thread_Dispatch(); 400073c8: 40 00 0f e6 call 4000b360 <_Thread_Dispatch> <== NOT EXECUTED 400073cc: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 400073d0: 40 00 00 73 call 4000759c <== NOT EXECUTED 400073d4: 01 00 00 00 nop <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 400073d8: 81 c7 e0 08 ret <== NOT EXECUTED 400073dc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); 400073e0: 40 00 29 4e call 40011918 <__errno> 400073e4: 01 00 00 00 nop 400073e8: 82 10 20 16 mov 0x16, %g1 ! 16 400073ec: c2 22 00 00 st %g1, [ %o0 ] 400073f0: 90 10 3f ff mov -1, %o0 ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 400073f4: 81 c7 e0 08 ret 400073f8: 91 e8 00 08 restore %g0, %o0, %o0 400073fc : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 400073fc: 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 ); 40007400: 90 10 00 19 mov %i1, %o0 40007404: 40 00 1d 87 call 4000ea20 <_POSIX_Absolute_timeout_to_ticks> 40007408: 92 07 bf f4 add %fp, -12, %o1 switch ( status ) { 4000740c: 80 a2 20 02 cmp %o0, 2 40007410: 18 80 00 07 bgu 4000742c 40007414: d4 07 bf f4 ld [ %fp + -12 ], %o2 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 40007418: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000741c: 40 00 20 a1 call 4000f6a0 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED 40007420: 92 10 20 00 clr %o1 <== NOT EXECUTED break; } } return lock_status; } 40007424: 81 c7 e0 08 ret <== NOT EXECUTED 40007428: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 4000742c: 90 10 00 18 mov %i0, %o0 40007430: 40 00 20 9c call 4000f6a0 <_POSIX_Semaphore_Wait_support> 40007434: 92 10 20 01 mov 1, %o1 break; } } return lock_status; } 40007438: 81 c7 e0 08 ret 4000743c: 91 e8 00 08 restore %g0, %o0, %o0 40007458 : */ int sem_unlink( const char *name ) { 40007458: 9d e3 bf 90 save %sp, -112, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000745c: 21 10 00 80 sethi %hi(0x40020000), %l0 40007460: c2 04 23 b0 ld [ %l0 + 0x3b0 ], %g1 ! 400203b0 <_Thread_Dispatch_disable_level> 40007464: 90 10 00 18 mov %i0, %o0 40007468: 82 00 60 01 inc %g1 4000746c: c2 24 23 b0 st %g1, [ %l0 + 0x3b0 ] register POSIX_Semaphore_Control *the_semaphore; sem_t the_semaphore_id; _Thread_Disable_dispatch(); status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 40007470: 40 00 20 6d call 4000f624 <_POSIX_Semaphore_Name_to_id> 40007474: 92 07 bf f4 add %fp, -12, %o1 if ( status != 0 ) { 40007478: b0 92 20 00 orcc %o0, 0, %i0 4000747c: 12 80 00 1f bne 400074f8 40007480: 03 10 00 81 sethi %hi(0x40020400), %g1 RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object( Objects_Information *information, uint16_t index ) { if ( index > information->maximum ) 40007484: c4 07 bf f4 ld [ %fp + -12 ], %g2 40007488: 88 10 63 30 or %g1, 0x330, %g4 4000748c: c6 11 20 10 lduh [ %g4 + 0x10 ], %g3 40007490: 03 00 00 3f sethi %hi(0xfc00), %g1 40007494: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40007498: 82 08 80 01 and %g2, %g1, %g1 4000749c: 80 a0 40 03 cmp %g1, %g3 400074a0: 18 80 00 05 bgu 400074b4 400074a4: 90 10 20 00 clr %o0 400074a8: c4 01 20 20 ld [ %g4 + 0x20 ], %g2 400074ac: 83 28 60 02 sll %g1, 2, %g1 400074b0: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( the_semaphore->process_shared == PTHREAD_PROCESS_SHARED ) { _Objects_MP_Close( &_POSIX_Semaphore_Information, the_semaphore_id ); } #endif the_semaphore->linked = FALSE; 400074b4: c0 22 20 18 clr [ %o0 + 0x18 ] _POSIX_Semaphore_Namespace_remove( the_semaphore ); _POSIX_Semaphore_Delete( the_semaphore ); 400074b8: 40 00 20 3e call 4000f5b0 <_POSIX_Semaphore_Delete> 400074bc: c0 22 20 0c clr [ %o0 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400074c0: c2 04 23 b0 ld [ %l0 + 0x3b0 ], %g1 400074c4: b0 10 20 00 clr %i0 400074c8: 82 00 7f ff add %g1, -1, %g1 400074cc: c2 24 23 b0 st %g1, [ %l0 + 0x3b0 ] 400074d0: c4 04 23 b0 ld [ %l0 + 0x3b0 ], %g2 400074d4: 80 a0 a0 00 cmp %g2, 0 400074d8: 02 80 00 04 be 400074e8 400074dc: 01 00 00 00 nop _Thread_Enable_dispatch(); return 0; } 400074e0: 81 c7 e0 08 ret <== NOT EXECUTED 400074e4: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 400074e8: 40 00 0f 9e call 4000b360 <_Thread_Dispatch> 400074ec: 01 00 00 00 nop 400074f0: 81 c7 e0 08 ret 400074f4: 81 e8 00 00 restore #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400074f8: c2 04 23 b0 ld [ %l0 + 0x3b0 ], %g1 400074fc: 82 00 7f ff add %g1, -1, %g1 40007500: c2 24 23 b0 st %g1, [ %l0 + 0x3b0 ] 40007504: c4 04 23 b0 ld [ %l0 + 0x3b0 ], %g2 40007508: 80 a0 a0 00 cmp %g2, 0 4000750c: 02 80 00 07 be 40007528 40007510: 01 00 00 00 nop _Thread_Disable_dispatch(); status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); if ( status != 0 ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( status ); 40007514: 40 00 29 01 call 40011918 <__errno> 40007518: 01 00 00 00 nop 4000751c: f0 22 00 00 st %i0, [ %o0 ] 40007520: 81 c7 e0 08 ret 40007524: 91 e8 3f ff restore %g0, -1, %o0 _Thread_Dispatch(); 40007528: 40 00 0f 8e call 4000b360 <_Thread_Dispatch> 4000752c: 01 00 00 00 nop 40007530: 30 bf ff f9 b,a 40007514 40018b70 : int setgid( gid_t gid ) { _POSIX_types_Gid = gid; 40018b70: 03 10 00 f1 sethi %hi(0x4003c400), %g1 <== NOT EXECUTED 40018b74: c4 00 62 c0 ld [ %g1 + 0x2c0 ], %g2 ! 4003c6c0 <== NOT EXECUTED 40018b78: d0 30 a0 2a sth %o0, [ %g2 + 0x2a ] <== NOT EXECUTED return 0; } 40018b7c: 81 c3 e0 08 retl <== NOT EXECUTED 40018b80: 90 10 20 00 clr %o0 <== NOT EXECUTED 400191f4 : return NULL; return &grent; } void setgrent(void) { 400191f4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED init_etc_passwd_group(); 400191f8: 7f ff ff c4 call 40019108 <== NOT EXECUTED 400191fc: 21 10 00 f8 sethi %hi(0x4003e000), %l0 <== NOT EXECUTED if (group_fp != NULL) 40019200: d0 04 20 34 ld [ %l0 + 0x34 ], %o0 ! 4003e034 <== NOT EXECUTED 40019204: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40019208: 22 80 00 05 be,a 4001921c <== NOT EXECUTED 4001920c: 11 10 00 e5 sethi %hi(0x40039400), %o0 <== NOT EXECUTED fclose(group_fp); 40019210: 40 00 35 10 call 40026650 <== NOT EXECUTED 40019214: 01 00 00 00 nop <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 40019218: 11 10 00 e5 sethi %hi(0x40039400), %o0 <== NOT EXECUTED 4001921c: 13 10 00 ee sethi %hi(0x4003b800), %o1 <== NOT EXECUTED 40019220: 90 12 21 90 or %o0, 0x190, %o0 <== NOT EXECUTED 40019224: 40 00 37 09 call 40026e48 <== NOT EXECUTED 40019228: 92 12 61 38 or %o1, 0x138, %o1 <== NOT EXECUTED 4001922c: d0 24 20 34 st %o0, [ %l0 + 0x34 ] <== NOT EXECUTED } 40019230: 81 c7 e0 08 ret <== NOT EXECUTED 40019234: 81 e8 00 00 restore <== NOT EXECUTED 400193f8 : return NULL; return &pwent; } void setpwent(void) { 400193f8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED init_etc_passwd_group(); 400193fc: 7f ff ff 43 call 40019108 <== NOT EXECUTED 40019400: 21 10 00 f7 sethi %hi(0x4003dc00), %l0 <== NOT EXECUTED if (passwd_fp != NULL) 40019404: d0 04 23 4c ld [ %l0 + 0x34c ], %o0 ! 4003df4c <== NOT EXECUTED 40019408: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001940c: 22 80 00 05 be,a 40019420 <== NOT EXECUTED 40019410: 11 10 00 e5 sethi %hi(0x40039400), %o0 <== NOT EXECUTED fclose(passwd_fp); 40019414: 40 00 34 8f call 40026650 <== NOT EXECUTED 40019418: 01 00 00 00 nop <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 4001941c: 11 10 00 e5 sethi %hi(0x40039400), %o0 <== NOT EXECUTED 40019420: 13 10 00 ee sethi %hi(0x4003b800), %o1 <== NOT EXECUTED 40019424: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40019428: 40 00 36 88 call 40026e48 <== NOT EXECUTED 4001942c: 92 12 61 38 or %o1, 0x138, %o1 <== NOT EXECUTED 40019430: d0 24 23 4c st %o0, [ %l0 + 0x34c ] <== NOT EXECUTED } 40019434: 81 c7 e0 08 ret <== NOT EXECUTED 40019438: 81 e8 00 00 restore <== NOT EXECUTED 4001960c : int setuid( uid_t uid ) { _POSIX_types_Uid = uid; 4001960c: 03 10 00 f1 sethi %hi(0x4003c400), %g1 <== NOT EXECUTED 40019610: c4 00 62 c0 ld [ %g1 + 0x2c0 ], %g2 ! 4003c6c0 <== NOT EXECUTED 40019614: d0 30 a0 28 sth %o0, [ %g2 + 0x28 ] <== NOT EXECUTED return 0; } 40019618: 81 c3 e0 08 retl <== NOT EXECUTED 4001961c: 90 10 20 00 clr %o0 <== NOT EXECUTED 40006470 : int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 40006470: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; if ( oact ) 40006474: 80 a6 a0 00 cmp %i2, 0 40006478: 02 80 00 0d be 400064ac 4000647c: 87 2e 20 02 sll %i0, 2, %g3 *oact = _POSIX_signals_Vectors[ sig ]; 40006480: 05 10 00 78 sethi %hi(0x4001e000), %g2 <== NOT EXECUTED 40006484: 83 2e 20 04 sll %i0, 4, %g1 <== NOT EXECUTED 40006488: 84 10 a2 e4 or %g2, 0x2e4, %g2 <== NOT EXECUTED 4000648c: 82 20 40 03 sub %g1, %g3, %g1 <== NOT EXECUTED 40006490: c8 00 80 01 ld [ %g2 + %g1 ], %g4 <== NOT EXECUTED 40006494: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 40006498: c8 26 80 00 st %g4, [ %i2 ] <== NOT EXECUTED 4000649c: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED 400064a0: c4 26 a0 04 st %g2, [ %i2 + 4 ] <== NOT EXECUTED 400064a4: c6 00 60 08 ld [ %g1 + 8 ], %g3 <== NOT EXECUTED 400064a8: c6 26 a0 08 st %g3, [ %i2 + 8 ] <== NOT EXECUTED if ( !sig ) 400064ac: 80 a6 20 00 cmp %i0, 0 400064b0: 02 80 00 33 be 4000657c 400064b4: b4 06 3f ff add %i0, -1, %i2 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 400064b8: 80 a6 a0 1f cmp %i2, 0x1f 400064bc: 18 80 00 30 bgu 4000657c 400064c0: 80 a6 20 09 cmp %i0, 9 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 400064c4: 02 80 00 2e be 4000657c 400064c8: 80 a6 60 00 cmp %i1, 0 /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 400064cc: 02 80 00 1a be 40006534 400064d0: 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 ); 400064d4: 7f ff ef ca call 400023fc 400064d8: 01 00 00 00 nop 400064dc: a0 10 00 08 mov %o0, %l0 if ( act->sa_handler == SIG_DFL ) { 400064e0: c2 06 60 08 ld [ %i1 + 8 ], %g1 400064e4: 80 a0 60 00 cmp %g1, 0 400064e8: 02 80 00 15 be 4000653c 400064ec: 90 10 20 01 mov 1, %o0 _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; } else { _POSIX_signals_Clear_process_signals( signo_to_mask(sig) ); 400064f0: 40 00 1e a9 call 4000df94 <_POSIX_signals_Clear_process_signals> 400064f4: 91 2a 00 1a sll %o0, %i2, %o0 _POSIX_signals_Vectors[ sig ] = *act; 400064f8: da 06 40 00 ld [ %i1 ], %o5 400064fc: 85 2e 20 02 sll %i0, 2, %g2 40006500: 83 2e 20 04 sll %i0, 4, %g1 40006504: 07 10 00 78 sethi %hi(0x4001e000), %g3 40006508: 82 20 40 02 sub %g1, %g2, %g1 4000650c: 86 10 e2 e4 or %g3, 0x2e4, %g3 40006510: da 20 c0 01 st %o5, [ %g3 + %g1 ] 40006514: c8 06 60 04 ld [ %i1 + 4 ], %g4 40006518: 82 00 40 03 add %g1, %g3, %g1 4000651c: c8 20 60 04 st %g4, [ %g1 + 4 ] 40006520: c4 06 60 08 ld [ %i1 + 8 ], %g2 40006524: c4 20 60 08 st %g2, [ %g1 + 8 ] } _ISR_Enable( level ); 40006528: 7f ff ef b9 call 4000240c 4000652c: 90 10 00 10 mov %l0, %o0 40006530: 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; } 40006534: 81 c7 e0 08 ret 40006538: 91 e8 00 01 restore %g0, %g1, %o0 * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); if ( act->sa_handler == SIG_DFL ) { _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; 4000653c: 85 2e 20 02 sll %i0, 2, %g2 <== NOT EXECUTED 40006540: 87 2e 20 04 sll %i0, 4, %g3 <== NOT EXECUTED 40006544: 03 10 00 74 sethi %hi(0x4001d000), %g1 <== NOT EXECUTED 40006548: 86 20 c0 02 sub %g3, %g2, %g3 <== NOT EXECUTED 4000654c: 82 10 60 dc or %g1, 0xdc, %g1 <== NOT EXECUTED 40006550: c8 00 40 03 ld [ %g1 + %g3 ], %g4 <== NOT EXECUTED 40006554: 82 00 c0 01 add %g3, %g1, %g1 <== NOT EXECUTED 40006558: da 00 60 08 ld [ %g1 + 8 ], %o5 <== NOT EXECUTED 4000655c: d8 00 60 04 ld [ %g1 + 4 ], %o4 <== NOT EXECUTED 40006560: 05 10 00 78 sethi %hi(0x4001e000), %g2 <== NOT EXECUTED 40006564: 84 10 a2 e4 or %g2, 0x2e4, %g2 ! 4001e2e4 <_POSIX_signals_Vectors> <== NOT EXECUTED 40006568: c8 20 80 03 st %g4, [ %g2 + %g3 ] <== NOT EXECUTED 4000656c: 86 00 c0 02 add %g3, %g2, %g3 <== NOT EXECUTED 40006570: da 20 e0 08 st %o5, [ %g3 + 8 ] <== NOT EXECUTED 40006574: 10 bf ff ed b 40006528 <== NOT EXECUTED 40006578: d8 20 e0 04 st %o4, [ %g3 + 4 ] <== NOT EXECUTED * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) rtems_set_errno_and_return_minus_one( EINVAL ); 4000657c: 40 00 27 17 call 400101d8 <__errno> 40006580: 01 00 00 00 nop 40006584: 82 10 20 16 mov 0x16, %g1 ! 16 40006588: c2 22 00 00 st %g1, [ %o0 ] 4000658c: 10 bf ff ea b 40006534 40006590: 82 10 3f ff mov -1, %g1 40006918 : int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { 40006918: 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 ) { 4000691c: 80 a6 a0 00 cmp %i2, 0 40006920: 02 80 00 0c be 40006950 40006924: a6 10 20 00 clr %l3 if ( !_Timespec_Is_valid( timeout ) ) 40006928: 40 00 14 a3 call 4000bbb4 <_Timespec_Is_valid> 4000692c: 90 10 00 1a mov %i2, %o0 40006930: 80 a2 20 00 cmp %o0, 0 40006934: 02 80 00 76 be 40006b0c 40006938: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); 4000693c: 40 00 14 c5 call 4000bc50 <_Timespec_To_ticks> 40006940: 90 10 00 1a mov %i2, %o0 if ( !interval ) 40006944: a6 92 20 00 orcc %o0, 0, %l3 40006948: 02 80 00 71 be 40006b0c 4000694c: 01 00 00 00 nop /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 40006950: 80 a6 60 00 cmp %i1, 0 40006954: 02 80 00 03 be 40006960 40006958: a4 07 bf ec add %fp, -20, %l2 4000695c: a4 10 00 19 mov %i1, %l2 the_thread = _Thread_Executing; 40006960: 29 10 00 79 sethi %hi(0x4001e400), %l4 40006964: f4 05 22 0c ld [ %l4 + 0x20c ], %i2 ! 4001e60c <_Thread_Executing> * What if they are already pending? */ /* API signals pending? */ _ISR_Disable( level ); 40006968: 7f ff ef 6c call 40002718 4000696c: f2 06 a1 70 ld [ %i2 + 0x170 ], %i1 40006970: a0 10 00 08 mov %o0, %l0 if ( *set & api->signals_pending ) { 40006974: c4 06 00 00 ld [ %i0 ], %g2 40006978: c2 06 60 c8 ld [ %i1 + 0xc8 ], %g1 4000697c: 80 88 80 01 btst %g2, %g1 40006980: 12 80 00 42 bne 40006a88 40006984: 01 00 00 00 nop return the_info->si_signo; } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { 40006988: 03 10 00 7b sethi %hi(0x4001ec00), %g1 4000698c: c2 00 61 90 ld [ %g1 + 0x190 ], %g1 ! 4001ed90 <_POSIX_signals_Pending> 40006990: 80 88 80 01 btst %g2, %g1 40006994: 12 80 00 2c bne 40006a44 40006998: 23 10 00 79 sethi %hi(0x4001e400), %l1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000699c: c2 04 61 30 ld [ %l1 + 0x130 ], %g1 ! 4001e530 <_Thread_Dispatch_disable_level> the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; return signo; } the_info->si_signo = -1; 400069a0: 84 10 3f ff mov -1, %g2 400069a4: 82 00 60 01 inc %g1 400069a8: c4 24 80 00 st %g2, [ %l2 ] 400069ac: c2 24 61 30 st %g1, [ %l1 + 0x130 ] _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; the_thread->Wait.return_code = EINTR; 400069b0: 82 10 20 04 mov 4, %g1 400069b4: c2 26 a0 34 st %g1, [ %i2 + 0x34 ] the_thread->Wait.option = *set; 400069b8: c4 06 00 00 ld [ %i0 ], %g2 RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; 400069bc: 82 10 20 01 mov 1, %g1 the_thread->Wait.return_argument = the_info; 400069c0: 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; 400069c4: c4 26 a0 30 st %g2, [ %i2 + 0x30 ] } the_info->si_signo = -1; _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; 400069c8: 21 10 00 7b sethi %hi(0x4001ec00), %l0 400069cc: a0 14 21 50 or %l0, 0x150, %l0 ! 4001ed50 <_POSIX_signals_Wait_queue> 400069d0: e0 26 a0 44 st %l0, [ %i2 + 0x44 ] 400069d4: 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 ); 400069d8: 7f ff ef 54 call 40002728 400069dc: 01 00 00 00 nop _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); 400069e0: 90 10 00 10 mov %l0, %o0 400069e4: 92 10 00 13 mov %l3, %o1 400069e8: 15 10 00 2d sethi %hi(0x4000b400), %o2 400069ec: 40 00 11 86 call 4000b004 <_Thread_queue_Enqueue_with_handler> 400069f0: 94 12 a1 44 or %o2, 0x144, %o2 ! 4000b544 <_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 ) 400069f4: c2 04 61 30 ld [ %l1 + 0x130 ], %g1 400069f8: 82 00 7f ff add %g1, -1, %g1 400069fc: c2 24 61 30 st %g1, [ %l1 + 0x130 ] 40006a00: c4 04 61 30 ld [ %l1 + 0x130 ], %g2 40006a04: 80 a0 a0 00 cmp %g2, 0 40006a08: 02 80 00 31 be 40006acc 40006a0c: 94 10 00 12 mov %l2, %o2 /* * 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 ); 40006a10: d2 04 80 00 ld [ %l2 ], %o1 <== NOT EXECUTED 40006a14: 96 10 20 00 clr %o3 <== NOT EXECUTED 40006a18: 98 10 20 00 clr %o4 <== NOT EXECUTED 40006a1c: 40 00 1f 62 call 4000e7a4 <_POSIX_signals_Clear_signals> <== NOT EXECUTED 40006a20: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED errno = _Thread_Executing->Wait.return_code; 40006a24: 40 00 27 c4 call 40010934 <__errno> <== NOT EXECUTED 40006a28: 01 00 00 00 nop <== NOT EXECUTED 40006a2c: c2 05 22 0c ld [ %l4 + 0x20c ], %g1 <== NOT EXECUTED 40006a30: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 <== NOT EXECUTED 40006a34: c4 22 00 00 st %g2, [ %o0 ] <== NOT EXECUTED return the_info->si_signo; 40006a38: f0 04 80 00 ld [ %l2 ], %i0 <== NOT EXECUTED } 40006a3c: 81 c7 e0 08 ret <== NOT EXECUTED 40006a40: 81 e8 00 00 restore <== NOT EXECUTED } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); 40006a44: 7f ff ff 9a call 400068ac <_POSIX_signals_Get_highest> 40006a48: 90 10 00 01 mov %g1, %o0 _POSIX_signals_Clear_signals( api, signo, the_info, TRUE, FALSE ); 40006a4c: 94 10 00 12 mov %l2, %o2 } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); 40006a50: b0 10 00 08 mov %o0, %i0 _POSIX_signals_Clear_signals( api, signo, the_info, TRUE, FALSE ); 40006a54: 96 10 20 01 mov 1, %o3 40006a58: 90 10 00 19 mov %i1, %o0 40006a5c: 92 10 00 18 mov %i0, %o1 40006a60: 40 00 1f 51 call 4000e7a4 <_POSIX_signals_Clear_signals> 40006a64: 98 10 20 00 clr %o4 _ISR_Enable( level ); 40006a68: 7f ff ef 30 call 40002728 40006a6c: 90 10 00 10 mov %l0, %o0 the_info->si_signo = signo; the_info->si_code = SI_USER; 40006a70: 82 10 20 01 mov 1, %g1 the_info->si_value.sival_int = 0; 40006a74: 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; 40006a78: f0 24 80 00 st %i0, [ %l2 ] the_info->si_code = SI_USER; 40006a7c: c2 24 a0 04 st %g1, [ %l2 + 4 ] 40006a80: 81 c7 e0 08 ret 40006a84: 81 e8 00 00 restore /* 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 ); 40006a88: 7f ff ff 89 call 400068ac <_POSIX_signals_Get_highest> 40006a8c: 90 10 00 01 mov %g1, %o0 _POSIX_signals_Clear_signals( 40006a90: 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 ); 40006a94: 92 10 00 08 mov %o0, %o1 _POSIX_signals_Clear_signals( 40006a98: 96 10 20 00 clr %o3 40006a9c: 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 ); 40006aa0: d2 24 80 00 st %o1, [ %l2 ] _POSIX_signals_Clear_signals( 40006aa4: 40 00 1f 40 call 4000e7a4 <_POSIX_signals_Clear_signals> 40006aa8: 98 10 20 00 clr %o4 the_info->si_signo, the_info, FALSE, FALSE ); _ISR_Enable( level ); 40006aac: 7f ff ef 1f call 40002728 40006ab0: 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; 40006ab4: f0 04 80 00 ld [ %l2 ], %i0 FALSE, FALSE ); _ISR_Enable( level ); the_info->si_code = SI_USER; 40006ab8: 82 10 20 01 mov 1, %g1 the_info->si_value.sival_int = 0; 40006abc: c0 24 a0 08 clr [ %l2 + 8 ] FALSE, FALSE ); _ISR_Enable( level ); the_info->si_code = SI_USER; 40006ac0: c2 24 a0 04 st %g1, [ %l2 + 4 ] 40006ac4: 81 c7 e0 08 ret 40006ac8: 81 e8 00 00 restore _Thread_Dispatch(); 40006acc: 40 00 0f de call 4000aa44 <_Thread_Dispatch> 40006ad0: 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 ); 40006ad4: d2 04 80 00 ld [ %l2 ], %o1 40006ad8: 94 10 00 12 mov %l2, %o2 40006adc: 96 10 20 00 clr %o3 40006ae0: 98 10 20 00 clr %o4 40006ae4: 40 00 1f 30 call 4000e7a4 <_POSIX_signals_Clear_signals> 40006ae8: 90 10 00 19 mov %i1, %o0 errno = _Thread_Executing->Wait.return_code; 40006aec: 40 00 27 92 call 40010934 <__errno> 40006af0: 01 00 00 00 nop 40006af4: c2 05 22 0c ld [ %l4 + 0x20c ], %g1 40006af8: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 40006afc: c4 22 00 00 st %g2, [ %o0 ] return the_info->si_signo; 40006b00: f0 04 80 00 ld [ %l2 ], %i0 } 40006b04: 81 c7 e0 08 ret 40006b08: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 40006b0c: 40 00 27 8a call 40010934 <__errno> 40006b10: b0 10 3f ff mov -1, %i0 40006b14: 82 10 20 16 mov 0x16, %g1 40006b18: c2 22 00 00 st %g1, [ %o0 ] 40006b1c: 81 c7 e0 08 ret 40006b20: 81 e8 00 00 restore 4000885c : int sigwait( const sigset_t *set, int *sig ) { 4000885c: 9d e3 bf 98 save %sp, -104, %sp int status; status = sigtimedwait( set, NULL, NULL ); 40008860: 92 10 20 00 clr %o1 40008864: 90 10 00 18 mov %i0, %o0 40008868: 7f ff ff 75 call 4000863c 4000886c: 94 10 20 00 clr %o2 if ( status != -1 ) { 40008870: 80 a2 3f ff cmp %o0, -1 40008874: 02 80 00 07 be 40008890 40008878: 80 a6 60 00 cmp %i1, 0 if ( sig ) 4000887c: 02 80 00 03 be 40008888 40008880: b0 10 20 00 clr %i0 *sig = status; 40008884: d0 26 40 00 st %o0, [ %i1 ] 40008888: 81 c7 e0 08 ret 4000888c: 81 e8 00 00 restore return 0; } return errno; 40008890: 40 00 27 c5 call 400127a4 <__errno> <== NOT EXECUTED 40008894: 01 00 00 00 nop <== NOT EXECUTED 40008898: f0 02 00 00 ld [ %o0 ], %i0 <== NOT EXECUTED } 4000889c: 81 c7 e0 08 ret <== NOT EXECUTED 400088a0: 81 e8 00 00 restore <== NOT EXECUTED 40004068 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 40004068: 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)) { 4000406c: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 40004070: 80 88 6e 78 btst 0xe78, %g1 <== NOT EXECUTED 40004074: 32 80 00 05 bne,a 40004088 <== NOT EXECUTED 40004078: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); 4000407c: b0 0e 20 ff and %i0, 0xff, %i0 <== NOT EXECUTED 40004080: 7f ff ff 77 call 40003e5c <== NOT EXECUTED 40004084: 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); 40004088: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000408c: 40 00 07 46 call 40005da4 <== NOT EXECUTED 40004090: 92 10 20 00 clr %o1 <== NOT EXECUTED i = iproc (c, tty); 40004094: 90 0e 20 ff and %i0, 0xff, %o0 <== NOT EXECUTED 40004098: 7f ff ff 71 call 40003e5c <== NOT EXECUTED 4000409c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400040a0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 400040a4: 40 00 08 0f call 400060e0 <== NOT EXECUTED 400040a8: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 400040ac: 81 c7 e0 08 ret <== NOT EXECUTED 400040b0: 81 e8 00 00 restore <== NOT EXECUTED 4000687c : int _STAT_NAME( const char *path, struct stat *buf ) { 4000687c: 9d e3 bf 88 save %sp, -120, %sp /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 40006880: 80 a6 60 00 cmp %i1, 0 40006884: 02 80 00 32 be 4000694c 40006888: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); 4000688c: a0 07 bf e8 add %fp, -24, %l0 40006890: 92 10 20 00 clr %o1 40006894: 94 10 00 10 mov %l0, %o2 40006898: 96 10 20 01 mov 1, %o3 4000689c: 7f ff f9 8d call 40004ed0 400068a0: b0 10 3f ff mov -1, %i0 if ( status != 0 ) 400068a4: 80 a2 20 00 cmp %o0, 0 400068a8: 12 80 00 27 bne 40006944 400068ac: c4 07 bf ec ld [ %fp + -20 ], %g2 return -1; if ( !loc.handlers->fstat_h ){ 400068b0: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 400068b4: 80 a0 60 00 cmp %g1, 0 400068b8: 02 80 00 2b be 40006964 400068bc: 92 10 00 19 mov %i1, %o1 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 400068c0: c0 26 40 00 clr [ %i1 ] 400068c4: c0 26 60 04 clr [ %i1 + 4 ] 400068c8: c0 26 60 08 clr [ %i1 + 8 ] 400068cc: c0 26 60 0c clr [ %i1 + 0xc ] 400068d0: c0 26 60 10 clr [ %i1 + 0x10 ] 400068d4: c0 26 60 14 clr [ %i1 + 0x14 ] 400068d8: c0 26 60 18 clr [ %i1 + 0x18 ] 400068dc: c0 26 60 1c clr [ %i1 + 0x1c ] 400068e0: c0 26 60 20 clr [ %i1 + 0x20 ] 400068e4: c0 26 60 24 clr [ %i1 + 0x24 ] 400068e8: c0 26 60 28 clr [ %i1 + 0x28 ] 400068ec: c0 26 60 2c clr [ %i1 + 0x2c ] 400068f0: c0 26 60 30 clr [ %i1 + 0x30 ] 400068f4: c0 26 60 34 clr [ %i1 + 0x34 ] 400068f8: c0 26 60 38 clr [ %i1 + 0x38 ] 400068fc: c0 26 60 3c clr [ %i1 + 0x3c ] 40006900: c0 26 60 40 clr [ %i1 + 0x40 ] 40006904: c0 26 60 44 clr [ %i1 + 0x44 ] 40006908: c0 26 60 48 clr [ %i1 + 0x48 ] 4000690c: c0 26 60 4c clr [ %i1 + 0x4c ] status = (*loc.handlers->fstat_h)( &loc, buf ); 40006910: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 40006914: 9f c0 40 00 call %g1 40006918: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 4000691c: c2 07 bf f0 ld [ %fp + -16 ], %g1 40006920: 80 a0 60 00 cmp %g1, 0 40006924: 02 80 00 08 be 40006944 40006928: b0 10 00 08 mov %o0, %i0 4000692c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40006930: 80 a0 60 00 cmp %g1, 0 40006934: 02 80 00 1a be 4000699c 40006938: 01 00 00 00 nop 4000693c: 9f c0 40 00 call %g1 40006940: 90 10 00 10 mov %l0, %o0 return status; } 40006944: 81 c7 e0 08 ret 40006948: 81 e8 00 00 restore /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 4000694c: 40 00 7e eb call 400264f8 <__errno> 40006950: b0 10 3f ff mov -1, %i0 40006954: 82 10 20 0e mov 0xe, %g1 40006958: c2 22 00 00 st %g1, [ %o0 ] 4000695c: 81 c7 e0 08 ret 40006960: 81 e8 00 00 restore status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 40006964: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40006968: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000696c: 02 80 00 08 be 4000698c <== NOT EXECUTED 40006970: 01 00 00 00 nop <== NOT EXECUTED 40006974: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40006978: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000697c: 02 80 00 04 be 4000698c <== NOT EXECUTED 40006980: 01 00 00 00 nop <== NOT EXECUTED 40006984: 9f c0 40 00 call %g1 <== NOT EXECUTED 40006988: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000698c: 40 00 7e db call 400264f8 <__errno> <== NOT EXECUTED 40006990: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40006994: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40006998: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000699c: 81 c7 e0 08 ret <== NOT EXECUTED 400069a0: 81 e8 00 00 restore <== NOT EXECUTED 400051f8 : int symlink( const char *actualpath, const char *sympath ) { 400051f8: 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 ); 400051fc: c2 4e 40 00 ldsb [ %i1 ], %g1 40005200: 80 a0 60 2f cmp %g1, 0x2f 40005204: 02 80 00 07 be 40005220 40005208: a0 10 00 18 mov %i0, %l0 4000520c: 80 a0 60 5c cmp %g1, 0x5c 40005210: 02 80 00 04 be 40005220 40005214: 80 a0 60 00 cmp %g1, 0 40005218: 12 80 00 2b bne 400052c4 4000521c: 03 10 00 67 sethi %hi(0x40019c00), %g1 40005220: 03 10 00 67 sethi %hi(0x40019c00), %g1 40005224: c6 00 63 a0 ld [ %g1 + 0x3a0 ], %g3 ! 40019fa0 40005228: 88 10 20 01 mov 1, %g4 4000522c: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 40005230: c2 27 bf e4 st %g1, [ %fp + -28 ] 40005234: c4 00 e0 18 ld [ %g3 + 0x18 ], %g2 40005238: c4 27 bf e8 st %g2, [ %fp + -24 ] 4000523c: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 40005240: c2 27 bf ec st %g1, [ %fp + -20 ] 40005244: c4 00 e0 20 ld [ %g3 + 0x20 ], %g2 40005248: c4 27 bf f0 st %g2, [ %fp + -16 ] result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 4000524c: c2 07 bf ec ld [ %fp + -20 ], %g1 40005250: 90 06 40 04 add %i1, %g4, %o0 40005254: c4 00 60 04 ld [ %g1 + 4 ], %g2 40005258: b2 07 bf e4 add %fp, -28, %i1 4000525c: 94 07 bf f4 add %fp, -12, %o2 40005260: 92 10 00 19 mov %i1, %o1 40005264: 9f c0 80 00 call %g2 40005268: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 4000526c: 80 a2 20 00 cmp %o0, 0 40005270: 12 80 00 13 bne 400052bc 40005274: c4 07 bf ec ld [ %fp + -20 ], %g2 return -1; if ( !loc.ops->symlink_h ) { 40005278: c2 00 a0 38 ld [ %g2 + 0x38 ], %g1 4000527c: 80 a0 60 00 cmp %g1, 0 40005280: 02 80 00 1c be 400052f0 40005284: d4 07 bf f4 ld [ %fp + -12 ], %o2 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 40005288: 92 10 00 10 mov %l0, %o1 4000528c: 9f c0 40 00 call %g1 40005290: 90 10 00 19 mov %i1, %o0 rtems_filesystem_freenode( &loc ); 40005294: c2 07 bf ec ld [ %fp + -20 ], %g1 40005298: 80 a0 60 00 cmp %g1, 0 4000529c: 02 80 00 08 be 400052bc 400052a0: b0 10 00 08 mov %o0, %i0 400052a4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400052a8: 80 a0 60 00 cmp %g1, 0 400052ac: 02 80 00 1b be 40005318 400052b0: 01 00 00 00 nop 400052b4: 9f c0 40 00 call %g1 400052b8: 90 10 00 19 mov %i1, %o0 return result; } 400052bc: 81 c7 e0 08 ret 400052c0: 81 e8 00 00 restore rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 400052c4: c6 00 63 a0 ld [ %g1 + 0x3a0 ], %g3 400052c8: 88 10 20 00 clr %g4 400052cc: c2 00 e0 04 ld [ %g3 + 4 ], %g1 400052d0: c2 27 bf e4 st %g1, [ %fp + -28 ] 400052d4: c4 00 e0 08 ld [ %g3 + 8 ], %g2 400052d8: c4 27 bf e8 st %g2, [ %fp + -24 ] 400052dc: c2 00 e0 0c ld [ %g3 + 0xc ], %g1 400052e0: c2 27 bf ec st %g1, [ %fp + -20 ] 400052e4: c4 00 e0 10 ld [ %g3 + 0x10 ], %g2 400052e8: 10 bf ff d9 b 4000524c 400052ec: c4 27 bf f0 st %g2, [ %fp + -16 ] result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); 400052f0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 400052f4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400052f8: 02 80 00 04 be 40005308 <== NOT EXECUTED 400052fc: 01 00 00 00 nop <== NOT EXECUTED 40005300: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005304: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40005308: 40 00 31 ff call 40011b04 <__errno> <== NOT EXECUTED 4000530c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40005310: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40005314: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40005318: 81 c7 e0 08 ret <== NOT EXECUTED 4000531c: 81 e8 00 00 restore <== NOT EXECUTED 4001592c : int tcgetattr( int fd, struct termios *tp ) { 4001592c: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED return ioctl( fd, RTEMS_IO_GET_ATTRIBUTES, tp ); 40015930: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40015934: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40015938: 40 00 0f ba call 40019820 <== NOT EXECUTED 4001593c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40015940: 01 00 00 00 nop 40015944 : int tcsetattr( int fd, int opt, struct termios *tp ) { 40015944: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED switch (opt) { 40015948: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 4001594c: 02 80 00 10 be 4001598c <== NOT EXECUTED 40015950: 80 a6 60 01 cmp %i1, 1 <== NOT EXECUTED 40015954: 02 80 00 08 be 40015974 <== NOT EXECUTED 40015958: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001595c: 40 00 12 5b call 4001a2c8 <__errno> <== NOT EXECUTED 40015960: 01 00 00 00 nop <== NOT EXECUTED 40015964: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40015968: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } } 4001596c: 81 c7 e0 08 ret <== NOT EXECUTED 40015970: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED switch (opt) { default: rtems_set_errno_and_return_minus_one( ENOTSUP ); case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 40015974: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 40015978: 40 00 0f aa call 40019820 <== NOT EXECUTED 4001597c: 94 10 20 00 clr %o2 <== NOT EXECUTED 40015980: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40015984: 06 bf ff fa bl 4001596c <== NOT EXECUTED 40015988: 01 00 00 00 nop <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 4001598c: 40 00 0f a5 call 40019820 <== NOT EXECUTED 40015990: 93 e8 20 02 restore %g0, 2, %o1 <== NOT EXECUTED 40015994: 01 00 00 00 nop 40005960 : #include long telldir( DIR *dirp ) { 40005960: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_t *iop; if ( !dirp ) 40005964: 80 a6 20 00 cmp %i0, 0 40005968: 02 80 00 1d be 400059dc 4000596c: 03 10 00 64 sethi %hi(0x40019000), %g1 /* * Get the file control block structure associated with the * file descriptor */ iop = rtems_libio_iop( dirp->dd_fd ); 40005970: f0 06 00 00 ld [ %i0 ], %i0 40005974: c4 00 62 6c ld [ %g1 + 0x26c ], %g2 40005978: 80 a6 00 02 cmp %i0, %g2 4000597c: 1a 80 00 0e bcc 400059b4 40005980: 03 10 00 69 sethi %hi(0x4001a400), %g1 40005984: c6 00 60 04 ld [ %g1 + 4 ], %g3 ! 4001a404 40005988: 85 2e 20 02 sll %i0, 2, %g2 4000598c: 83 2e 20 04 sll %i0, 4, %g1 40005990: 82 20 40 02 sub %g1, %g2, %g1 40005994: 82 00 40 18 add %g1, %i0, %g1 40005998: 83 28 60 02 sll %g1, 2, %g1 if (iop == NULL) 4000599c: 82 80 40 03 addcc %g1, %g3, %g1 400059a0: 02 80 00 06 be 400059b8 400059a4: 92 10 20 2c mov 0x2c, %o1 assert(0); return (long)( iop->offset ); 400059a8: f0 00 60 08 ld [ %g1 + 8 ], %i0 } 400059ac: 81 c7 e0 08 ret 400059b0: 81 e8 00 00 restore */ iop = rtems_libio_iop( dirp->dd_fd ); if (iop == NULL) assert(0); 400059b4: 92 10 20 2c mov 0x2c, %o1 <== NOT EXECUTED 400059b8: 11 10 00 61 sethi %hi(0x40018400), %o0 <== NOT EXECUTED 400059bc: 15 10 00 61 sethi %hi(0x40018400), %o2 <== NOT EXECUTED 400059c0: 90 12 23 b8 or %o0, 0x3b8, %o0 <== NOT EXECUTED 400059c4: 7f ff f6 7a call 400033ac <__assert> <== NOT EXECUTED 400059c8: 94 12 a0 98 or %o2, 0x98, %o2 <== NOT EXECUTED 400059cc: 82 10 20 00 clr %g1 <== NOT EXECUTED return (long)( iop->offset ); 400059d0: f0 00 60 08 ld [ %g1 + 8 ], %i0 <== NOT EXECUTED } 400059d4: 81 c7 e0 08 ret <== NOT EXECUTED 400059d8: 81 e8 00 00 restore <== NOT EXECUTED ) { rtems_libio_t *iop; if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); 400059dc: 40 00 31 4a call 40011f04 <__errno> <== NOT EXECUTED 400059e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400059e4: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 400059e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400059ec: 81 c7 e0 08 ret <== NOT EXECUTED 400059f0: 81 e8 00 00 restore <== NOT EXECUTED 4000b930 : int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 4000b930: 9d e3 bf 98 save %sp, -104, %sp POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 4000b934: 80 a6 20 01 cmp %i0, 1 4000b938: 12 80 00 4a bne 4000ba60 4000b93c: 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) { 4000b940: 02 80 00 0e be 4000b978 4000b944: 21 10 00 98 sethi %hi(0x40026000), %l0 /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && 4000b948: c2 06 40 00 ld [ %i1 ], %g1 4000b94c: 82 00 7f ff add %g1, -1, %g1 4000b950: 80 a0 60 01 cmp %g1, 1 4000b954: 18 80 00 43 bgu 4000ba60 4000b958: 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 ) 4000b95c: c2 06 60 04 ld [ %i1 + 4 ], %g1 4000b960: 80 a0 60 00 cmp %g1, 0 4000b964: 02 80 00 3f be 4000ba60 4000b968: 82 00 7f ff add %g1, -1, %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) 4000b96c: 80 a0 60 1f cmp %g1, 0x1f 4000b970: 18 80 00 3c bgu 4000ba60 4000b974: 01 00 00 00 nop rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000b978: c2 04 20 00 ld [ %l0 ], %g1 4000b97c: 82 00 60 01 inc %g1 4000b980: c2 24 20 00 st %g1, [ %l0 ] * 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 ); 4000b984: 31 10 00 98 sethi %hi(0x40026000), %i0 4000b988: 40 00 0b bd call 4000e87c <_Objects_Allocate> 4000b98c: 90 16 23 cc or %i0, 0x3cc, %o0 ! 400263cc <_POSIX_Timer_Information> /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 4000b990: 80 a2 20 00 cmp %o0, 0 4000b994: 02 80 00 39 be 4000ba78 4000b998: 82 10 20 02 mov 2, %g1 } /* 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; 4000b99c: 05 10 00 98 sethi %hi(0x40026000), %g2 rtems_set_errno_and_return_minus_one( EAGAIN ); } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; 4000b9a0: c2 2a 20 3c stb %g1, [ %o0 + 0x3c ] ptimer->thread_id = _Thread_Executing->Object.id; 4000b9a4: c6 00 a0 dc ld [ %g2 + 0xdc ], %g3 if ( evp != NULL ) { 4000b9a8: 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; 4000b9ac: c2 00 e0 08 ld [ %g3 + 8 ], %g1 if ( evp != NULL ) { 4000b9b0: 02 80 00 08 be 4000b9d0 4000b9b4: c2 22 20 38 st %g1, [ %o0 + 0x38 ] ptimer->inf.sigev_notify = evp->sigev_notify; ptimer->inf.sigev_signo = evp->sigev_signo; ptimer->inf.sigev_value = evp->sigev_value; 4000b9b8: 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; 4000b9bc: c4 06 40 00 ld [ %i1 ], %g2 ptimer->inf.sigev_signo = evp->sigev_signo; 4000b9c0: 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; 4000b9c4: c4 22 20 40 st %g2, [ %o0 + 0x40 ] ptimer->inf.sigev_signo = evp->sigev_signo; 4000b9c8: c6 22 20 44 st %g3, [ %o0 + 0x44 ] ptimer->inf.sigev_value = evp->sigev_value; 4000b9cc: c2 22 20 48 st %g1, [ %o0 + 0x48 ] Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000b9d0: 88 16 23 cc or %i0, 0x3cc, %g4 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 4000b9d4: c6 02 20 08 ld [ %o0 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000b9d8: c4 11 20 10 lduh [ %g4 + 0x10 ], %g2 } ptimer->overrun = 0; 4000b9dc: c0 22 20 68 clr [ %o0 + 0x68 ] ptimer->timer_data.it_value.tv_sec = 0; 4000b9e0: c0 22 20 5c clr [ %o0 + 0x5c ] ptimer->timer_data.it_value.tv_nsec = 0; 4000b9e4: c0 22 20 60 clr [ %o0 + 0x60 ] ptimer->timer_data.it_interval.tv_sec = 0; 4000b9e8: c0 22 20 54 clr [ %o0 + 0x54 ] ptimer->timer_data.it_interval.tv_nsec = 0; 4000b9ec: c0 22 20 58 clr [ %o0 + 0x58 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4000b9f0: c0 22 20 18 clr [ %o0 + 0x18 ] the_watchdog->routine = routine; 4000b9f4: c0 22 20 2c clr [ %o0 + 0x2c ] the_watchdog->id = id; 4000b9f8: c0 22 20 30 clr [ %o0 + 0x30 ] 4000b9fc: 03 00 00 3f sethi %hi(0xfc00), %g1 4000ba00: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000ba04: 82 08 c0 01 and %g3, %g1, %g1 4000ba08: 80 a0 40 02 cmp %g1, %g2 4000ba0c: 18 80 00 05 bgu 4000ba20 4000ba10: c0 22 20 34 clr [ %o0 + 0x34 ] information->local_table[ index ] = the_object; 4000ba14: c4 01 20 20 ld [ %g4 + 0x20 ], %g2 4000ba18: 83 28 60 02 sll %g1, 2, %g1 4000ba1c: d0 20 80 01 st %o0, [ %g2 + %g1 ] _Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL ); _Objects_Open(&_POSIX_Timer_Information, &ptimer->Object, (Objects_Name) 0); *timerid = ptimer->Object.id; 4000ba20: c6 26 80 00 st %g3, [ %i2 ] 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; 4000ba24: c0 22 20 0c clr [ %o0 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000ba28: c2 04 20 00 ld [ %l0 ], %g1 4000ba2c: b0 10 20 00 clr %i0 4000ba30: 82 00 7f ff add %g1, -1, %g1 4000ba34: c2 24 20 00 st %g1, [ %l0 ] 4000ba38: c4 04 20 00 ld [ %l0 ], %g2 4000ba3c: 80 a0 a0 00 cmp %g2, 0 4000ba40: 02 80 00 04 be 4000ba50 4000ba44: 01 00 00 00 nop _Thread_Enable_dispatch(); return 0; } 4000ba48: 81 c7 e0 08 ret <== NOT EXECUTED 4000ba4c: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 4000ba50: 40 00 11 c8 call 40010170 <_Thread_Dispatch> 4000ba54: 01 00 00 00 nop 4000ba58: 81 c7 e0 08 ret 4000ba5c: 81 e8 00 00 restore if ( !evp->sigev_signo ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 4000ba60: 40 00 2a e2 call 400165e8 <__errno> <== NOT EXECUTED 4000ba64: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000ba68: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000ba6c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000ba70: 81 c7 e0 08 ret <== NOT EXECUTED 4000ba74: 81 e8 00 00 restore <== 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 ) 4000ba78: c2 04 20 00 ld [ %l0 ], %g1 <== NOT EXECUTED 4000ba7c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000ba80: c2 24 20 00 st %g1, [ %l0 ] <== NOT EXECUTED 4000ba84: c4 04 20 00 ld [ %l0 ], %g2 <== NOT EXECUTED 4000ba88: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000ba8c: 02 80 00 08 be 4000baac <== NOT EXECUTED 4000ba90: 01 00 00 00 nop <== NOT EXECUTED * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); 4000ba94: 40 00 2a d5 call 400165e8 <__errno> <== NOT EXECUTED 4000ba98: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4000ba9c: 82 10 20 0b mov 0xb, %g1 <== NOT EXECUTED 4000baa0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000baa4: 81 c7 e0 08 ret <== NOT EXECUTED 4000baa8: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 4000baac: 40 00 11 b1 call 40010170 <_Thread_Dispatch> <== NOT EXECUTED 4000bab0: 01 00 00 00 nop <== NOT EXECUTED 4000bab4: 30 bf ff f8 b,a 4000ba94 <== NOT EXECUTED 4000b858 : */ int timer_delete( timer_t timerid ) { 4000b858: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED 4000b85c: 21 10 00 98 sethi %hi(0x40026000), %l0 <== NOT EXECUTED 4000b860: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000b864: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 4000b868: 40 00 0d 56 call 4000edc0 <_Objects_Get> <== NOT EXECUTED 4000b86c: 90 14 23 cc or %l0, 0x3cc, %o0 <== NOT EXECUTED */ POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 4000b870: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4000b874: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000b878: 12 80 00 21 bne 4000b8fc <== NOT EXECUTED 4000b87c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000b880: a0 14 23 cc or %l0, 0x3cc, %l0 <== NOT EXECUTED ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 4000b884: c2 02 20 08 ld [ %o0 + 8 ], %g1 <== NOT EXECUTED Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000b888: c6 14 20 10 lduh [ %l0 + 0x10 ], %g3 <== NOT EXECUTED 4000b88c: 05 00 00 3f sethi %hi(0xfc00), %g2 <== NOT EXECUTED 4000b890: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff <== NOT EXECUTED 4000b894: 82 08 40 02 and %g1, %g2, %g1 <== NOT EXECUTED 4000b898: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 4000b89c: 38 80 00 06 bgu,a 4000b8b4 <== NOT EXECUTED 4000b8a0: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED information->local_table[ index ] = the_object; 4000b8a4: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 4000b8a8: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 4000b8ac: c0 20 80 01 clr [ %g2 + %g1 ] <== NOT EXECUTED case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Timer_Information, &ptimer->Object ); ptimer->state = POSIX_TIMER_STATE_FREE; 4000b8b0: 82 10 20 01 mov 1, %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; 4000b8b4: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED 4000b8b8: c2 2e 20 3c stb %g1, [ %i0 + 0x3c ] <== NOT EXECUTED (void) _Watchdog_Remove( &ptimer->Timer ); 4000b8bc: 40 00 18 0d call 400118f0 <_Watchdog_Remove> <== NOT EXECUTED 4000b8c0: 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 ); 4000b8c4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000b8c8: 40 00 0c fb call 4000ecb4 <_Objects_Free> <== NOT EXECUTED 4000b8cc: 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 ) 4000b8d0: 07 10 00 98 sethi %hi(0x40026000), %g3 <== NOT EXECUTED 4000b8d4: c2 00 e0 00 ld [ %g3 ], %g1 <== NOT EXECUTED 4000b8d8: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000b8dc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000b8e0: c2 20 e0 00 st %g1, [ %g3 ] <== NOT EXECUTED 4000b8e4: c4 00 e0 00 ld [ %g3 ], %g2 <== NOT EXECUTED 4000b8e8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000b8ec: 02 80 00 0d be 4000b920 <== NOT EXECUTED 4000b8f0: 01 00 00 00 nop <== NOT EXECUTED _POSIX_Timer_Free( ptimer ); _Thread_Enable_dispatch(); return 0; } return -1; /* unreached - only to remove warnings */ } 4000b8f4: 81 c7 e0 08 ret <== NOT EXECUTED 4000b8f8: 81 e8 00 00 restore <== NOT EXECUTED */ POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 4000b8fc: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000b900: 18 bf ff fd bgu 4000b8f4 <== NOT EXECUTED 4000b904: 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 ); 4000b908: 40 00 2b 38 call 400165e8 <__errno> <== NOT EXECUTED 4000b90c: 01 00 00 00 nop <== NOT EXECUTED 4000b910: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4000b914: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000b918: 81 c7 e0 08 ret <== NOT EXECUTED 4000b91c: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 4000b920: 40 00 12 14 call 40010170 <_Thread_Dispatch> <== NOT EXECUTED 4000b924: 01 00 00 00 nop <== NOT EXECUTED _POSIX_Timer_Free( ptimer ); _Thread_Enable_dispatch(); return 0; } return -1; /* unreached - only to remove warnings */ } 4000b928: 81 c7 e0 08 ret <== NOT EXECUTED 4000b92c: 81 e8 00 00 restore <== NOT EXECUTED 4000b7d0 : */ int timer_getoverrun( timer_t timerid ) { 4000b7d0: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED 4000b7d4: 11 10 00 98 sethi %hi(0x40026000), %o0 <== NOT EXECUTED 4000b7d8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000b7dc: 90 12 23 cc or %o0, 0x3cc, %o0 <== NOT EXECUTED 4000b7e0: 40 00 0d 78 call 4000edc0 <_Objects_Get> <== NOT EXECUTED 4000b7e4: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED int overrun; POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 4000b7e8: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4000b7ec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000b7f0: 12 80 00 0e bne 4000b828 <== NOT EXECUTED 4000b7f4: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: overrun = ptimer->overrun; 4000b7f8: f0 02 20 68 ld [ %o0 + 0x68 ], %i0 <== NOT EXECUTED ptimer->overrun = 0; 4000b7fc: c0 22 20 68 clr [ %o0 + 0x68 ] <== 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 ) 4000b800: 03 10 00 98 sethi %hi(0x40026000), %g1 <== NOT EXECUTED 4000b804: c4 00 60 00 ld [ %g1 ], %g2 <== NOT EXECUTED 4000b808: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED 4000b80c: c4 20 60 00 st %g2, [ %g1 ] <== NOT EXECUTED 4000b810: c6 00 60 00 ld [ %g1 ], %g3 <== NOT EXECUTED 4000b814: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 4000b818: 02 80 00 0c be 4000b848 <== NOT EXECUTED 4000b81c: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return overrun; } return -1; /* unreached - only to remove warnings */ } 4000b820: 81 c7 e0 08 ret <== NOT EXECUTED 4000b824: 81 e8 00 00 restore <== NOT EXECUTED int overrun; POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 4000b828: 18 bf ff fe bgu 4000b820 <== NOT EXECUTED 4000b82c: 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 ); 4000b830: 40 00 2b 6e call 400165e8 <__errno> <== NOT EXECUTED 4000b834: 01 00 00 00 nop <== NOT EXECUTED 4000b838: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4000b83c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000b840: 81 c7 e0 08 ret <== NOT EXECUTED 4000b844: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 4000b848: 40 00 12 4a call 40010170 <_Thread_Dispatch> <== NOT EXECUTED 4000b84c: 01 00 00 00 nop <== NOT EXECUTED ptimer->overrun = 0; _Thread_Enable_dispatch(); return overrun; } return -1; /* unreached - only to remove warnings */ } 4000b850: 81 c7 e0 08 ret <== NOT EXECUTED 4000b854: 81 e8 00 00 restore <== NOT EXECUTED 4000b71c : int timer_gettime( timer_t timerid, struct itimerspec *value ) { 4000b71c: 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 ); 4000b720: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED 4000b724: 40 00 0a 94 call 4000e174 <_TOD_Get> <== NOT EXECUTED 4000b728: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED int timer_gettime( timer_t timerid, struct itimerspec *value ) { 4000b72c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 4000b730: 11 10 00 98 sethi %hi(0x40026000), %o0 <== NOT EXECUTED 4000b734: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 4000b738: 40 00 0d a2 call 4000edc0 <_Objects_Get> <== NOT EXECUTED 4000b73c: 90 12 23 cc or %o0, 0x3cc, %o0 <== NOT EXECUTED /* Reads the current time */ _TOD_Get( ¤t_time ); ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 4000b740: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4000b744: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000b748: 12 80 00 15 bne 4000b79c <== NOT EXECUTED 4000b74c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED case OBJECTS_LOCAL: /* Calculates the time left before the timer finishes */ _Timespec_Subtract( 4000b750: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4000b754: 90 02 20 5c add %o0, 0x5c, %o0 <== NOT EXECUTED 4000b758: 40 00 17 04 call 40011368 <_Timespec_Subtract> <== NOT EXECUTED 4000b75c: 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; 4000b760: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 <== NOT EXECUTED 4000b764: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED 4000b768: c4 06 20 58 ld [ %i0 + 0x58 ], %g2 <== NOT EXECUTED 4000b76c: c4 26 60 04 st %g2, [ %i1 + 4 ] <== 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 ) 4000b770: 07 10 00 98 sethi %hi(0x40026000), %g3 <== NOT EXECUTED 4000b774: c2 00 e0 00 ld [ %g3 ], %g1 <== NOT EXECUTED 4000b778: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000b77c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000b780: c2 20 e0 00 st %g1, [ %g3 ] <== NOT EXECUTED 4000b784: c4 00 e0 00 ld [ %g3 ], %g2 <== NOT EXECUTED 4000b788: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000b78c: 02 80 00 0d be 4000b7c0 <== NOT EXECUTED 4000b790: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } return -1; /* unreached - only to remove warnings */ } 4000b794: 81 c7 e0 08 ret <== NOT EXECUTED 4000b798: 81 e8 00 00 restore <== NOT EXECUTED /* Reads the current time */ _TOD_Get( ¤t_time ); ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 4000b79c: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000b7a0: 18 bf ff fd bgu 4000b794 <== NOT EXECUTED 4000b7a4: 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 ); 4000b7a8: 40 00 2b 90 call 400165e8 <__errno> <== NOT EXECUTED 4000b7ac: 01 00 00 00 nop <== NOT EXECUTED 4000b7b0: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4000b7b4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000b7b8: 81 c7 e0 08 ret <== NOT EXECUTED 4000b7bc: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 4000b7c0: 40 00 12 6c call 40010170 <_Thread_Dispatch> <== NOT EXECUTED 4000b7c4: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } return -1; /* unreached - only to remove warnings */ } 4000b7c8: 81 c7 e0 08 ret <== NOT EXECUTED 4000b7cc: 81 e8 00 00 restore <== NOT EXECUTED 4000bab8 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 4000bab8: 9d e3 bf 90 save %sp, -112, %sp POSIX_Timer_Control *ptimer; Objects_Locations location; boolean activated; if ( value == NULL ) { 4000babc: 80 a6 a0 00 cmp %i2, 0 4000bac0: 02 80 00 29 be 4000bb64 4000bac4: 92 10 00 18 mov %i0, %o1 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 ) || 4000bac8: c4 06 a0 0c ld [ %i2 + 0xc ], %g2 4000bacc: 03 0e e6 b2 sethi %hi(0x3b9ac800), %g1 4000bad0: 82 10 62 00 or %g1, 0x200, %g1 ! 3b9aca00 4000bad4: 80 a0 80 01 cmp %g2, %g1 4000bad8: 18 80 00 23 bgu 4000bb64 4000badc: 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 ) { 4000bae0: 02 80 00 04 be 4000baf0 4000bae4: 80 a6 60 00 cmp %i1, 0 4000bae8: 12 80 00 1f bne 4000bb64 4000baec: 01 00 00 00 nop RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 4000baf0: 11 10 00 98 sethi %hi(0x40026000), %o0 4000baf4: 94 07 bf f4 add %fp, -12, %o2 4000baf8: 40 00 0c b2 call 4000edc0 <_Objects_Get> 4000bafc: 90 12 23 cc or %o0, 0x3cc, %o0 * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 4000bb00: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000bb04: a0 10 00 08 mov %o0, %l0 4000bb08: 80 a0 60 00 cmp %g1, 0 4000bb0c: 12 80 00 1a bne 4000bb74 4000bb10: 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 ) { 4000bb14: c2 06 a0 08 ld [ %i2 + 8 ], %g1 4000bb18: 80 a0 60 00 cmp %g1, 0 4000bb1c: 12 80 00 06 bne 4000bb34 4000bb20: 80 a6 60 00 cmp %i1, 0 4000bb24: c2 06 a0 0c ld [ %i2 + 0xc ], %g1 <== NOT EXECUTED 4000bb28: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000bb2c: 02 80 00 5d be 4000bca0 <== NOT EXECUTED 4000bb30: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } /* absolute or relative? */ switch (flags) { 4000bb34: 02 80 00 42 be 4000bc3c 4000bb38: 80 a6 60 04 cmp %i1, 4 4000bb3c: 22 80 00 10 be,a 4000bb7c <== NOT EXECUTED 4000bb40: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== 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 ) 4000bb44: 03 10 00 98 sethi %hi(0x40026000), %g1 <== NOT EXECUTED 4000bb48: c4 00 60 00 ld [ %g1 ], %g2 <== NOT EXECUTED 4000bb4c: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED 4000bb50: c4 20 60 00 st %g2, [ %g1 ] <== NOT EXECUTED 4000bb54: c6 00 60 00 ld [ %g1 ], %g3 <== NOT EXECUTED 4000bb58: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 4000bb5c: 02 80 00 6d be 4000bd10 <== NOT EXECUTED 4000bb60: 01 00 00 00 nop <== NOT EXECUTED _TOD_Get( &ptimer->time ); _Thread_Enable_dispatch(); return 0; } _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); 4000bb64: 40 00 2a a1 call 400165e8 <__errno> <== NOT EXECUTED 4000bb68: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4000bb6c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000bb70: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000bb74: 81 c7 e0 08 ret <== NOT EXECUTED 4000bb78: 81 e8 00 00 restore <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000bb7c: 05 10 00 98 sethi %hi(0x40026000), %g2 <== NOT EXECUTED void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 4000bb80: c2 24 20 30 st %g1, [ %l0 + 0x30 ] <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000bb84: c6 00 a0 b8 ld [ %g2 + 0xb8 ], %g3 <== NOT EXECUTED 4000bb88: c2 06 a0 08 ld [ %i2 + 8 ], %g1 <== NOT EXECUTED Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4000bb8c: c0 24 20 18 clr [ %l0 + 0x18 ] <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000bb90: 82 20 40 03 sub %g1, %g3, %g1 <== NOT EXECUTED 4000bb94: 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; 4000bb98: 03 10 00 2d sethi %hi(0x4000b400), %g1 <== NOT EXECUTED 4000bb9c: 82 10 62 94 or %g1, 0x294, %g1 ! 4000b694 <_POSIX_Timer_TSR> <== NOT EXECUTED the_watchdog->id = id; the_watchdog->user_data = user_data; 4000bba0: e0 24 20 34 st %l0, [ %l0 + 0x34 ] <== NOT EXECUTED Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4000bba4: c2 24 20 2c st %g1, [ %l0 + 0x2c ] <== NOT EXECUTED ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 4000bba8: 11 10 00 98 sethi %hi(0x40026000), %o0 <== NOT EXECUTED 4000bbac: 92 04 20 10 add %l0, 0x10, %o1 <== NOT EXECUTED 4000bbb0: 40 00 16 e6 call 40011748 <_Watchdog_Insert> <== NOT EXECUTED 4000bbb4: 90 12 20 f0 or %o0, 0xf0, %o0 <== NOT EXECUTED &ptimer->Timer, value->it_value.tv_sec - _TOD_Seconds_since_epoch ); /* Returns the old ones in "ovalue" */ if ( ovalue ) 4000bbb8: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 4000bbbc: 22 80 00 0b be,a 4000bbe8 <== NOT EXECUTED 4000bbc0: c4 06 80 00 ld [ %i2 ], %g2 <== NOT EXECUTED } /* The timer has been started and is running */ /* return the old ones in "ovalue" */ if ( ovalue ) *ovalue = ptimer->timer_data; 4000bbc4: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 <== NOT EXECUTED 4000bbc8: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED 4000bbcc: c4 04 20 58 ld [ %l0 + 0x58 ], %g2 <== NOT EXECUTED 4000bbd0: c4 26 e0 04 st %g2, [ %i3 + 4 ] <== NOT EXECUTED 4000bbd4: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 <== NOT EXECUTED 4000bbd8: c2 26 e0 08 st %g1, [ %i3 + 8 ] <== NOT EXECUTED 4000bbdc: c4 04 20 60 ld [ %l0 + 0x60 ], %g2 <== NOT EXECUTED 4000bbe0: c4 26 e0 0c st %g2, [ %i3 + 0xc ] <== NOT EXECUTED ptimer->timer_data = *value; 4000bbe4: c4 06 80 00 ld [ %i2 ], %g2 <== NOT EXECUTED /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; _TOD_Get( &ptimer->time ); 4000bbe8: 90 04 20 6c add %l0, 0x6c, %o0 /* The timer has been started and is running */ /* return the old ones in "ovalue" */ if ( ovalue ) *ovalue = ptimer->timer_data; ptimer->timer_data = *value; 4000bbec: c4 24 20 54 st %g2, [ %l0 + 0x54 ] 4000bbf0: c2 06 a0 04 ld [ %i2 + 4 ], %g1 4000bbf4: c2 24 20 58 st %g1, [ %l0 + 0x58 ] 4000bbf8: c4 06 a0 08 ld [ %i2 + 8 ], %g2 /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 4000bbfc: 82 10 20 03 mov 3, %g1 /* The timer has been started and is running */ /* return the old ones in "ovalue" */ if ( ovalue ) *ovalue = ptimer->timer_data; ptimer->timer_data = *value; 4000bc00: c4 24 20 5c st %g2, [ %l0 + 0x5c ] 4000bc04: c6 06 a0 0c ld [ %i2 + 0xc ], %g3 /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 4000bc08: c2 2c 20 3c stb %g1, [ %l0 + 0x3c ] _TOD_Get( &ptimer->time ); 4000bc0c: 40 00 09 5a call 4000e174 <_TOD_Get> 4000bc10: c6 24 20 60 st %g3, [ %l0 + 0x60 ] 4000bc14: 05 10 00 98 sethi %hi(0x40026000), %g2 4000bc18: c2 00 a0 00 ld [ %g2 ], %g1 4000bc1c: 82 00 7f ff add %g1, -1, %g1 4000bc20: c2 20 a0 00 st %g1, [ %g2 ] 4000bc24: c6 00 a0 00 ld [ %g2 ], %g3 4000bc28: 80 a0 e0 00 cmp %g3, 0 4000bc2c: 02 80 00 19 be 4000bc90 4000bc30: 01 00 00 00 nop } _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } return -1; /* unreached - only to remove warnings */ } 4000bc34: 81 c7 e0 08 ret <== NOT EXECUTED 4000bc38: 91 e8 20 00 restore %g0, 0, %o0 <== 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 ); 4000bc3c: 40 00 15 e1 call 400113c0 <_Timespec_To_ticks> 4000bc40: 90 06 a0 08 add %i2, 8, %o0 activated = _Watchdog_Insert_ticks_helper( 4000bc44: 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 ); 4000bc48: 92 10 00 08 mov %o0, %o1 4000bc4c: d0 24 20 64 st %o0, [ %l0 + 0x64 ] activated = _Watchdog_Insert_ticks_helper( 4000bc50: 17 10 00 2d sethi %hi(0x4000b400), %o3 4000bc54: 90 04 20 10 add %l0, 0x10, %o0 4000bc58: 96 12 e2 94 or %o3, 0x294, %o3 4000bc5c: 7f ff fe 73 call 4000b628 <_Watchdog_Insert_ticks_helper> 4000bc60: 98 10 00 10 mov %l0, %o4 ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 4000bc64: 80 a2 20 00 cmp %o0, 0 4000bc68: 12 80 00 26 bne 4000bd00 4000bc6c: 80 a6 e0 00 cmp %i3, 0 4000bc70: 03 10 00 98 sethi %hi(0x40026000), %g1 <== NOT EXECUTED 4000bc74: c4 00 60 00 ld [ %g1 ], %g2 <== NOT EXECUTED 4000bc78: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED 4000bc7c: c4 20 60 00 st %g2, [ %g1 ] <== NOT EXECUTED 4000bc80: c6 00 60 00 ld [ %g1 ], %g3 <== NOT EXECUTED 4000bc84: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 4000bc88: 32 bf ff bb bne,a 4000bb74 <== NOT EXECUTED 4000bc8c: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Dispatch(); 4000bc90: 40 00 11 38 call 40010170 <_Thread_Dispatch> 4000bc94: b0 10 20 00 clr %i0 4000bc98: 81 c7 e0 08 ret 4000bc9c: 81 e8 00 00 restore 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 ) { /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 4000bca0: 40 00 17 14 call 400118f0 <_Watchdog_Remove> <== NOT EXECUTED 4000bca4: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED /* The old data of the timer are returned */ if ( ovalue ) 4000bca8: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 4000bcac: 22 80 00 0b be,a 4000bcd8 <== NOT EXECUTED 4000bcb0: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED *ovalue = ptimer->timer_data; 4000bcb4: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 <== NOT EXECUTED 4000bcb8: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED 4000bcbc: c4 04 20 58 ld [ %l0 + 0x58 ], %g2 <== NOT EXECUTED 4000bcc0: c4 26 e0 04 st %g2, [ %i3 + 4 ] <== NOT EXECUTED 4000bcc4: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 <== NOT EXECUTED 4000bcc8: c2 26 e0 08 st %g1, [ %i3 + 8 ] <== NOT EXECUTED 4000bccc: c4 04 20 60 ld [ %l0 + 0x60 ], %g2 <== NOT EXECUTED 4000bcd0: c4 26 e0 0c st %g2, [ %i3 + 0xc ] <== NOT EXECUTED /* The new data are set */ ptimer->timer_data = *value; 4000bcd4: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 4000bcd8: c2 24 20 54 st %g1, [ %l0 + 0x54 ] <== NOT EXECUTED 4000bcdc: c4 06 a0 04 ld [ %i2 + 4 ], %g2 <== NOT EXECUTED 4000bce0: c4 24 20 58 st %g2, [ %l0 + 0x58 ] <== NOT EXECUTED 4000bce4: c2 06 a0 08 ld [ %i2 + 8 ], %g1 <== NOT EXECUTED 4000bce8: c2 24 20 5c st %g1, [ %l0 + 0x5c ] <== NOT EXECUTED 4000bcec: c4 06 a0 0c ld [ %i2 + 0xc ], %g2 <== NOT EXECUTED /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 4000bcf0: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED (void) _Watchdog_Remove( &ptimer->Timer ); /* The old data of the timer are returned */ if ( ovalue ) *ovalue = ptimer->timer_data; /* The new data are set */ ptimer->timer_data = *value; 4000bcf4: c4 24 20 60 st %g2, [ %l0 + 0x60 ] <== NOT EXECUTED /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 4000bcf8: 10 bf ff c7 b 4000bc14 <== NOT EXECUTED 4000bcfc: c2 2c 20 3c stb %g1, [ %l0 + 0x3c ] <== NOT EXECUTED return 0; } /* The timer has been started and is running */ /* return the old ones in "ovalue" */ if ( ovalue ) 4000bd00: 32 bf ff b2 bne,a 4000bbc8 4000bd04: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 <== NOT EXECUTED *ovalue = ptimer->timer_data; ptimer->timer_data = *value; 4000bd08: 10 bf ff b8 b 4000bbe8 4000bd0c: c4 06 80 00 ld [ %i2 ], %g2 4000bd10: 40 00 11 18 call 40010170 <_Thread_Dispatch> <== NOT EXECUTED 4000bd14: 01 00 00 00 nop <== NOT EXECUTED 4000bd18: 30 bf ff 93 b,a 4000bb64 <== NOT EXECUTED 40019d7c : */ char *ttyname( int fd ) { 40019d7c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if ( !ttyname_r( fd, ttyname_buf, sizeof(ttyname_buf) ) ) 40019d80: 21 10 00 f2 sethi %hi(0x4003c800), %l0 <== NOT EXECUTED 40019d84: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40019d88: 94 10 24 06 mov 0x406, %o2 <== NOT EXECUTED 40019d8c: 92 14 20 30 or %l0, 0x30, %o1 <== NOT EXECUTED 40019d90: 7f ff ff ba call 40019c78 <== NOT EXECUTED 40019d94: b0 14 20 30 or %l0, 0x30, %i0 <== NOT EXECUTED 40019d98: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40019d9c: 12 80 00 04 bne 40019dac <== NOT EXECUTED 40019da0: 01 00 00 00 nop <== NOT EXECUTED return ttyname_buf; return NULL; } 40019da4: 81 c7 e0 08 ret <== NOT EXECUTED 40019da8: 81 e8 00 00 restore <== NOT EXECUTED 40019dac: 81 c7 e0 08 ret <== NOT EXECUTED 40019db0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40019c78 : int ttyname_r( int fd, char *name, int namesize ) { 40019c78: 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) 40019c7c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40019c80: 7f ff ff e3 call 40019c0c <== NOT EXECUTED 40019c84: 92 07 bf d4 add %fp, -44, %o1 <== NOT EXECUTED 40019c88: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40019c8c: 06 80 00 0d bl 40019cc0 <== NOT EXECUTED 40019c90: 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)) 40019c94: 40 00 28 79 call 40023e78 <== NOT EXECUTED 40019c98: 92 07 bf 80 add %fp, -128, %o1 <== NOT EXECUTED 40019c9c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40019ca0: 12 80 00 08 bne 40019cc0 <== NOT EXECUTED 40019ca4: c2 17 bf 8c lduh [ %fp + -116 ], %g1 <== NOT EXECUTED 40019ca8: 05 00 00 3c sethi %hi(0xf000), %g2 <== NOT EXECUTED 40019cac: 07 00 00 08 sethi %hi(0x2000), %g3 <== NOT EXECUTED 40019cb0: 82 08 40 02 and %g1, %g2, %g1 <== NOT EXECUTED 40019cb4: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40019cb8: 02 80 00 08 be 40019cd8 <== NOT EXECUTED 40019cbc: 11 10 00 e5 sethi %hi(0x40039400), %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); 40019cc0: 40 00 32 0e call 400264f8 <__errno> <== NOT EXECUTED 40019cc4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40019cc8: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 40019ccc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40019cd0: 81 c7 e0 08 ret <== NOT EXECUTED 40019cd4: 81 e8 00 00 restore <== NOT EXECUTED for (rval = NULL; (dirp = readdir (dp)) != NULL ;) { if (dirp->d_ino != sb.st_ino) continue; strcpy (name + sizeof (_PATH_DEV) - 1, dirp->d_name); 40019cd8: 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) 40019cdc: 90 12 21 d0 or %o0, 0x1d0, %o0 <== NOT EXECUTED 40019ce0: 7f ff fe 7b call 400196cc <== NOT EXECUTED 40019ce4: a2 07 bf 30 add %fp, -208, %l1 <== NOT EXECUTED 40019ce8: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40019cec: 02 bf ff f5 be 40019cc0 <== NOT EXECUTED 40019cf0: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); for (rval = NULL; (dirp = readdir (dp)) != NULL ;) 40019cf4: 7f ff ff 38 call 400199d4 <== NOT EXECUTED 40019cf8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40019cfc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40019d00: 02 80 00 1a be 40019d68 <== NOT EXECUTED 40019d04: c2 07 bf 88 ld [ %fp + -120 ], %g1 <== NOT EXECUTED { if (dirp->d_ino != sb.st_ino) 40019d08: c4 02 00 00 ld [ %o0 ], %g2 <== NOT EXECUTED 40019d0c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40019d10: 12 bf ff f9 bne 40019cf4 <== NOT EXECUTED 40019d14: 92 02 20 0c add %o0, 0xc, %o1 <== NOT EXECUTED continue; strcpy (name + sizeof (_PATH_DEV) - 1, dirp->d_name); 40019d18: 40 00 40 fe call 4002a110 <== NOT EXECUTED 40019d1c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if (stat (name, &dsb) || sb.st_dev != dsb.st_dev || 40019d20: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40019d24: 7f ff b2 d6 call 4000687c <== NOT EXECUTED 40019d28: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40019d2c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40019d30: 12 bf ff f1 bne 40019cf4 <== NOT EXECUTED 40019d34: c4 07 bf 80 ld [ %fp + -128 ], %g2 <== NOT EXECUTED 40019d38: c2 07 bf 30 ld [ %fp + -208 ], %g1 <== NOT EXECUTED 40019d3c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40019d40: 12 bf ff ed bne 40019cf4 <== NOT EXECUTED 40019d44: c4 07 bf 84 ld [ %fp + -124 ], %g2 <== NOT EXECUTED 40019d48: c2 07 bf 34 ld [ %fp + -204 ], %g1 <== NOT EXECUTED 40019d4c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40019d50: 12 bf ff e9 bne 40019cf4 <== NOT EXECUTED 40019d54: c4 07 bf 88 ld [ %fp + -120 ], %g2 <== NOT EXECUTED 40019d58: c2 07 bf 38 ld [ %fp + -200 ], %g1 <== NOT EXECUTED 40019d5c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40019d60: 12 bf ff e5 bne 40019cf4 <== NOT EXECUTED 40019d64: 01 00 00 00 nop <== NOT EXECUTED sb.st_ino != dsb.st_ino) continue; rval = name; break; } (void) closedir (dp); 40019d68: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40019d6c: 7f ff f9 83 call 40018378 <== NOT EXECUTED 40019d70: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 40019d74: 81 c7 e0 08 ret <== NOT EXECUTED 40019d78: 81 e8 00 00 restore <== NOT EXECUTED 40019dd0 : #include int unlink( const char *path ) { 40019dd0: 9d e3 bf 88 save %sp, -120, %sp /* * Get the node to be unlinked. */ result = rtems_filesystem_evaluate_path( path, 0, &loc, FALSE ); 40019dd4: 92 10 20 00 clr %o1 40019dd8: 90 10 00 18 mov %i0, %o0 40019ddc: a0 07 bf e8 add %fp, -24, %l0 40019de0: 96 10 20 00 clr %o3 40019de4: 7f ff ac 3b call 40004ed0 40019de8: 94 10 00 10 mov %l0, %o2 if ( result != 0 ) 40019dec: 80 a2 20 00 cmp %o0, 0 40019df0: 02 80 00 04 be 40019e00 40019df4: 90 10 20 02 mov 2, %o0 result = (*loc.ops->unlink_h)( &loc ); rtems_filesystem_freenode( &loc ); return result; } 40019df8: 81 c7 e0 08 ret 40019dfc: 91 e8 3f ff restore %g0, -1, %o0 result = rtems_filesystem_evaluate_path( path, 0, &loc, FALSE ); if ( result != 0 ) return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); 40019e00: 7f ff ac 04 call 40004e10 40019e04: 92 10 00 10 mov %l0, %o1 if (result != 0 && errno != ENOTSUP) { 40019e08: 80 a2 20 00 cmp %o0, 0 40019e0c: 12 80 00 1d bne 40019e80 40019e10: c4 07 bf f0 ld [ %fp + -16 ], %g2 rtems_filesystem_freenode( &loc ); return -1; } if ( !loc.ops->node_type_h ) { 40019e14: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40019e18: 80 a0 60 00 cmp %g1, 0 40019e1c: 22 80 00 2b be,a 40019ec8 40019e20: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { 40019e24: 9f c0 40 00 call %g1 40019e28: 90 10 00 10 mov %l0, %o0 40019e2c: 80 a2 20 01 cmp %o0, 1 40019e30: 02 80 00 31 be 40019ef4 40019e34: c4 07 bf f0 ld [ %fp + -16 ], %g2 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { 40019e38: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 40019e3c: 80 a0 60 00 cmp %g1, 0 40019e40: 22 80 00 22 be,a 40019ec8 40019e44: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &loc ); 40019e48: 9f c0 40 00 call %g1 40019e4c: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40019e50: c2 07 bf f0 ld [ %fp + -16 ], %g1 40019e54: 80 a0 60 00 cmp %g1, 0 40019e58: 02 80 00 08 be 40019e78 40019e5c: b0 10 00 08 mov %o0, %i0 40019e60: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40019e64: 80 a0 60 00 cmp %g1, 0 40019e68: 02 80 00 31 be 40019f2c 40019e6c: 01 00 00 00 nop 40019e70: 9f c0 40 00 call %g1 40019e74: 90 10 00 10 mov %l0, %o0 40019e78: 81 c7 e0 08 ret 40019e7c: 81 e8 00 00 restore result = rtems_filesystem_evaluate_path( path, 0, &loc, FALSE ); if ( result != 0 ) return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); if (result != 0 && errno != ENOTSUP) { 40019e80: 40 00 31 9e call 400264f8 <__errno> <== NOT EXECUTED 40019e84: 01 00 00 00 nop <== NOT EXECUTED 40019e88: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40019e8c: 80 a0 60 86 cmp %g1, 0x86 <== NOT EXECUTED 40019e90: 02 bf ff e1 be 40019e14 <== NOT EXECUTED 40019e94: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40019e98: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40019e9c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40019ea0: 02 bf ff f6 be 40019e78 <== NOT EXECUTED 40019ea4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40019ea8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40019eac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40019eb0: 02 bf ff f2 be 40019e78 <== NOT EXECUTED 40019eb4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40019eb8: 9f c0 40 00 call %g1 <== NOT EXECUTED 40019ebc: 01 00 00 00 nop <== NOT EXECUTED 40019ec0: 81 c7 e0 08 ret <== NOT EXECUTED 40019ec4: 81 e8 00 00 restore <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { rtems_filesystem_freenode( &loc ); 40019ec8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40019ecc: 02 80 00 04 be 40019edc <== NOT EXECUTED 40019ed0: 01 00 00 00 nop <== NOT EXECUTED 40019ed4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40019ed8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40019edc: 40 00 31 87 call 400264f8 <__errno> <== NOT EXECUTED 40019ee0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40019ee4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40019ee8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40019eec: 81 c7 e0 08 ret <== NOT EXECUTED 40019ef0: 81 e8 00 00 restore <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 40019ef4: c2 07 bf f0 ld [ %fp + -16 ], %g1 40019ef8: 80 a0 60 00 cmp %g1, 0 40019efc: 02 80 00 08 be 40019f1c 40019f00: 01 00 00 00 nop 40019f04: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40019f08: 80 a0 60 00 cmp %g1, 0 40019f0c: 02 80 00 04 be 40019f1c 40019f10: 01 00 00 00 nop 40019f14: 9f c0 40 00 call %g1 40019f18: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EISDIR ); 40019f1c: 40 00 31 77 call 400264f8 <__errno> 40019f20: b0 10 3f ff mov -1, %i0 40019f24: 82 10 20 15 mov 0x15, %g1 40019f28: c2 22 00 00 st %g1, [ %o0 ] 40019f2c: 81 c7 e0 08 ret 40019f30: 81 e8 00 00 restore 40007378 : */ int unmount( const char *path ) { 40007378: 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 ) ) 4000737c: 92 10 20 00 clr %o1 40007380: a2 07 bf e8 add %fp, -24, %l1 40007384: 90 10 00 18 mov %i0, %o0 40007388: 94 10 00 11 mov %l1, %o2 4000738c: 7f ff f0 51 call 400034d0 40007390: 96 10 20 01 mov 1, %o3 40007394: 80 a2 20 00 cmp %o0, 0 40007398: 02 80 00 04 be 400073a8 4000739c: e0 07 bf f4 ld [ %fp + -12 ], %l0 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 400073a0: 81 c7 e0 08 ret 400073a4: 91 e8 3f ff restore %g0, -1, %o0 /* * Verify this is the root node for the file system to be unmounted. */ if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){ 400073a8: 92 10 00 11 mov %l1, %o1 if ( rtems_filesystem_evaluate_path( path, 0x0, &loc, TRUE ) ) return -1; mt_entry = loc.mt_entry; fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 400073ac: a4 04 20 18 add %l0, 0x18, %l2 /* * Verify this is the root node for the file system to be unmounted. */ if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){ 400073b0: 7f ff ff d3 call 400072fc 400073b4: 90 10 00 12 mov %l2, %o0 400073b8: 80 a2 20 00 cmp %o0, 0 400073bc: 02 80 00 4a be 400074e4 400073c0: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 400073c4: 80 a0 60 00 cmp %g1, 0 400073c8: 22 80 00 09 be,a 400073ec 400073cc: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 400073d0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400073d4: 80 a0 60 00 cmp %g1, 0 400073d8: 22 80 00 05 be,a 400073ec 400073dc: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 400073e0: 9f c0 40 00 call %g1 400073e4: 90 10 00 11 mov %l1, %o0 /* * Verify Unmount is supported by both filesystems. */ if ( !fs_mount_loc->ops->unmount_h ) 400073e8: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 400073ec: c4 00 60 28 ld [ %g1 + 0x28 ], %g2 400073f0: 80 a0 a0 00 cmp %g2, 0 400073f4: 02 80 00 55 be 40007548 400073f8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) 400073fc: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 40007400: c4 00 60 2c ld [ %g1 + 0x2c ], %g2 40007404: 80 a0 a0 00 cmp %g2, 0 40007408: 02 80 00 50 be 40007548 4000740c: 03 10 00 67 sethi %hi(0x40019c00), %g1 * that made the current node thread based instead * of system based? I thought it was but it doesn't * look like it in this version. */ if ( rtems_filesystem_current.mt_entry == mt_entry ) 40007410: c4 00 63 a0 ld [ %g1 + 0x3a0 ], %g2 ! 40019fa0 40007414: c6 00 a0 10 ld [ %g2 + 0x10 ], %g3 40007418: 80 a0 c0 10 cmp %g3, %l0 4000741c: 02 80 00 2c be 400074cc 40007420: 90 10 00 18 mov %i0, %o0 /* * Verify there are no file systems below the path specified */ if ( file_systems_below_this_mountpoint( path, fs_root_loc, mt_entry ) != 0 ) 40007424: 92 10 00 12 mov %l2, %o1 40007428: 7f ff ff bb call 40007314 4000742c: 94 10 00 10 mov %l0, %o2 40007430: 80 a2 20 00 cmp %o0, 0 40007434: 12 80 00 26 bne 400074cc 40007438: 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 ) 4000743c: 7f ff f1 14 call 4000388c 40007440: 90 10 00 10 mov %l0, %o0 40007444: 80 a2 20 01 cmp %o0, 1 40007448: 02 80 00 21 be 400074cc 4000744c: 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 ) 40007450: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 40007454: c2 00 a0 28 ld [ %g2 + 0x28 ], %g1 40007458: 9f c0 40 00 call %g1 4000745c: 90 10 00 10 mov %l0, %o0 40007460: 80 a2 20 00 cmp %o0, 0 40007464: 12 bf ff cf bne 400073a0 40007468: 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){ 4000746c: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 40007470: c2 00 a0 2c ld [ %g2 + 0x2c ], %g1 40007474: 9f c0 40 00 call %g1 40007478: 90 10 00 10 mov %l0, %o0 4000747c: 80 a2 20 00 cmp %o0, 0 40007480: 32 80 00 28 bne,a 40007520 40007484: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 <== NOT EXECUTED /* * Extract the mount table entry from the chain */ Chain_Extract( ( Chain_Node * ) mt_entry ); 40007488: 40 00 06 d4 call 40008fd8 <_Chain_Extract> 4000748c: 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 ); 40007490: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40007494: 80 a0 60 00 cmp %g1, 0 40007498: 02 80 00 09 be 400074bc 4000749c: 90 10 00 10 mov %l0, %o0 400074a0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400074a4: 80 a0 60 00 cmp %g1, 0 400074a8: 02 80 00 05 be 400074bc 400074ac: 01 00 00 00 nop 400074b0: 9f c0 40 00 call %g1 400074b4: 90 04 20 08 add %l0, 8, %o0 free( mt_entry ); 400074b8: 90 10 00 10 mov %l0, %o0 400074bc: 7f ff f2 25 call 40003d50 400074c0: b0 10 20 00 clr %i0 400074c4: 81 c7 e0 08 ret 400074c8: 81 e8 00 00 restore * descriptors that are currently active and reference nodes in the * file system that we are trying to unmount */ if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 ) rtems_set_errno_and_return_minus_one( EBUSY ); 400074cc: 40 00 29 8e call 40011b04 <__errno> 400074d0: b0 10 3f ff mov -1, %i0 400074d4: 82 10 20 10 mov 0x10, %g1 400074d8: c2 22 00 00 st %g1, [ %o0 ] 400074dc: 81 c7 e0 08 ret 400074e0: 81 e8 00 00 restore /* * Verify this is the root node for the file system to be unmounted. */ if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){ rtems_filesystem_freenode( &loc ); 400074e4: 80 a0 60 00 cmp %g1, 0 400074e8: 02 80 00 08 be 40007508 400074ec: 01 00 00 00 nop 400074f0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400074f4: 80 a0 60 00 cmp %g1, 0 400074f8: 02 80 00 04 be 40007508 400074fc: 01 00 00 00 nop 40007500: 9f c0 40 00 call %g1 40007504: 90 10 00 11 mov %l1, %o0 rtems_set_errno_and_return_minus_one( EACCES ); 40007508: 40 00 29 7f call 40011b04 <__errno> 4000750c: b0 10 3f ff mov -1, %i0 40007510: 82 10 20 0d mov 0xd, %g1 40007514: c2 22 00 00 st %g1, [ %o0 ] 40007518: 81 c7 e0 08 ret 4000751c: 81 e8 00 00 restore * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 40007520: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 <== NOT EXECUTED 40007524: 9f c0 40 00 call %g1 <== NOT EXECUTED 40007528: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000752c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40007530: 02 bf ff 9c be 400073a0 <== NOT EXECUTED 40007534: 90 10 20 00 clr %o0 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 40007538: 40 00 05 c6 call 40008c50 <== NOT EXECUTED 4000753c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40007540: 81 c7 e0 08 ret <== NOT EXECUTED 40007544: 81 e8 00 00 restore <== NOT EXECUTED if ( !fs_mount_loc->ops->unmount_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 40007548: 40 00 29 6f call 40011b04 <__errno> <== NOT EXECUTED 4000754c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40007550: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40007554: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40007558: 81 c7 e0 08 ret <== NOT EXECUTED 4000755c: 81 e8 00 00 restore <== NOT EXECUTED 4000bf6c : int usleep( useconds_t useconds ) { 4000bf6c: 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; 4000bf70: 21 00 03 d0 sethi %hi(0xf4000), %l0 <== NOT EXECUTED 4000bf74: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000bf78: 7f ff d6 1f call 400017f4 <.udiv> <== NOT EXECUTED 4000bf7c: 92 14 22 40 or %l0, 0x240, %o1 <== NOT EXECUTED tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 4000bf80: 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; 4000bf84: d0 27 bf f0 st %o0, [ %fp + -16 ] <== NOT EXECUTED tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 4000bf88: 40 00 5e af call 40023a44 <.urem> <== NOT EXECUTED 4000bf8c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000bf90: 85 2a 20 02 sll %o0, 2, %g2 <== NOT EXECUTED 4000bf94: 83 2a 20 07 sll %o0, 7, %g1 <== NOT EXECUTED 4000bf98: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 4000bf9c: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED 4000bfa0: 83 28 60 03 sll %g1, 3, %g1 <== NOT EXECUTED nanosleep( &tp, &tm ); 4000bfa4: 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; 4000bfa8: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED nanosleep( &tp, &tm ); 4000bfac: 40 00 26 b5 call 40015a80 <== NOT EXECUTED 4000bfb0: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED remaining = tm.tv_sec * TOD_MICROSECONDS_PER_SECOND; 4000bfb4: c4 07 bf e8 ld [ %fp + -24 ], %g2 <== NOT EXECUTED 4000bfb8: d0 07 bf ec ld [ %fp + -20 ], %o0 <== NOT EXECUTED 4000bfbc: 87 28 a0 03 sll %g2, 3, %g3 <== NOT EXECUTED 4000bfc0: 83 28 a0 08 sll %g2, 8, %g1 <== NOT EXECUTED 4000bfc4: 82 20 40 03 sub %g1, %g3, %g1 <== NOT EXECUTED 4000bfc8: 92 10 23 e8 mov 0x3e8, %o1 <== NOT EXECUTED 4000bfcc: b1 28 60 06 sll %g1, 6, %i0 <== NOT EXECUTED 4000bfd0: b0 26 00 01 sub %i0, %g1, %i0 <== NOT EXECUTED 4000bfd4: 7f ff d6 0a call 400017fc <.div> <== NOT EXECUTED 4000bfd8: b0 06 00 02 add %i0, %g2, %i0 <== NOT EXECUTED 4000bfdc: b1 2e 20 06 sll %i0, 6, %i0 <== NOT EXECUTED remaining += tm.tv_nsec / 1000; return remaining; /* seconds remaining */ } 4000bfe0: 81 c7 e0 08 ret <== NOT EXECUTED 4000bfe4: 91 ea 00 18 restore %o0, %i0, %o0 <== NOT EXECUTED 40006f60 : int utime( const char *path, const struct utimbuf *times ) { 40006f60: 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 ) ) 40006f64: 92 10 20 00 clr %o1 40006f68: 90 10 00 18 mov %i0, %o0 40006f6c: a0 07 bf e8 add %fp, -24, %l0 40006f70: 96 10 20 01 mov 1, %o3 40006f74: 94 10 00 10 mov %l0, %o2 40006f78: 7f ff f0 18 call 40002fd8 40006f7c: b0 10 3f ff mov -1, %i0 40006f80: 80 a2 20 00 cmp %o0, 0 40006f84: 12 80 00 14 bne 40006fd4 40006f88: c4 07 bf f0 ld [ %fp + -16 ], %g2 return -1; if ( !temp_loc.ops->utime_h ){ 40006f8c: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 40006f90: 80 a0 60 00 cmp %g1, 0 40006f94: 22 80 00 12 be,a 40006fdc 40006f98: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 40006f9c: d4 06 60 04 ld [ %i1 + 4 ], %o2 40006fa0: d2 06 40 00 ld [ %i1 ], %o1 40006fa4: 9f c0 40 00 call %g1 40006fa8: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &temp_loc ); 40006fac: c2 07 bf f0 ld [ %fp + -16 ], %g1 40006fb0: 80 a0 60 00 cmp %g1, 0 40006fb4: 02 80 00 08 be 40006fd4 40006fb8: b0 10 00 08 mov %o0, %i0 40006fbc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40006fc0: 80 a0 60 00 cmp %g1, 0 40006fc4: 02 80 00 0f be 40007000 40006fc8: 01 00 00 00 nop 40006fcc: 9f c0 40 00 call %g1 40006fd0: 90 10 00 10 mov %l0, %o0 return result; } 40006fd4: 81 c7 e0 08 ret 40006fd8: 81 e8 00 00 restore if ( rtems_filesystem_evaluate_path( path, 0x00, &temp_loc, TRUE ) ) return -1; if ( !temp_loc.ops->utime_h ){ rtems_filesystem_freenode( &temp_loc ); 40006fdc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006fe0: 02 80 00 04 be 40006ff0 <== NOT EXECUTED 40006fe4: 01 00 00 00 nop <== NOT EXECUTED 40006fe8: 9f c0 40 00 call %g1 <== NOT EXECUTED 40006fec: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40006ff0: 40 00 2a 7e call 400119e8 <__errno> <== NOT EXECUTED 40006ff4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40006ff8: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40006ffc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40007000: 81 c7 e0 08 ret <== NOT EXECUTED 40007004: 81 e8 00 00 restore <== NOT EXECUTED 40002f70 : | Arguments: as in printf: fmt - format string, ... - unnamed arguments. | Returns: Nothing. +--------------------------------------------------------------------------*/ void vprintk(const char *fmt, va_list ap) { 40002f70: 9d e3 bf 80 save %sp, -128, %sp char c, *str; int lflag, base, sign, width, lead; for (; *fmt != '\0'; fmt++) 40002f74: d0 0e 00 00 ldub [ %i0 ], %o0 40002f78: 91 2a 20 18 sll %o0, 0x18, %o0 40002f7c: 80 a2 20 00 cmp %o0, 0 40002f80: 02 80 00 3a be 40003068 40002f84: 03 10 00 0b sethi %hi(0x40002c00), %g1 40002f88: 05 10 00 63 sethi %hi(0x40018c00), %g2 if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) 40002f8c: b4 10 62 9c or %g1, 0x29c, %i2 40002f90: b8 10 a1 58 or %g2, 0x158, %i4 break; case 'c': BSP_output_char(va_arg(ap, int)); break; default: BSP_output_char(c); 40002f94: 3b 10 00 66 sethi %hi(0x40019800), %i5 40002f98: ac 07 bf e4 add %fp, -28, %l6 lflag = 0; base = 0; sign = 0; width = 0; lead = ' '; if (*fmt == '%') 40002f9c: 91 3a 20 18 sra %o0, 0x18, %o0 40002fa0: 80 a2 20 25 cmp %o0, 0x25 40002fa4: 12 80 00 33 bne 40003070 40002fa8: c2 07 61 f4 ld [ %i5 + 0x1f4 ], %g1 { fmt++; 40002fac: b0 06 20 01 inc %i0 if (*fmt == '0' ) { 40002fb0: d0 0e 00 00 ldub [ %i0 ], %o0 40002fb4: 87 2a 20 18 sll %o0, 0x18, %g3 40002fb8: 83 38 e0 18 sra %g3, 0x18, %g1 40002fbc: 80 a0 60 30 cmp %g1, 0x30 40002fc0: 02 80 00 97 be 4000321c 40002fc4: b6 10 20 20 mov 0x20, %i3 lead = '0'; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 40002fc8: 82 02 3f d0 add %o0, -48, %g1 40002fcc: 82 08 60 ff and %g1, 0xff, %g1 40002fd0: 80 a0 60 09 cmp %g1, 9 40002fd4: 08 80 00 05 bleu 40002fe8 40002fd8: aa 10 20 00 clr %l5 width *= 10; width += (*fmt - '0'); fmt++; } if ((c = *fmt) == 'l') 40002fdc: 10 80 00 11 b 40003020 40002fe0: 83 38 e0 18 sra %g3, 0x18, %g1 40002fe4: 87 2a 20 18 sll %o0, 0x18, %g3 <== NOT EXECUTED fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; width += (*fmt - '0'); fmt++; 40002fe8: b0 06 20 01 inc %i0 fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 40002fec: d0 0e 00 00 ldub [ %i0 ], %o0 width *= 10; width += (*fmt - '0'); 40002ff0: 85 2d 60 03 sll %l5, 3, %g2 40002ff4: 83 2d 60 01 sll %l5, 1, %g1 40002ff8: 87 38 e0 18 sra %g3, 0x18, %g3 40002ffc: 82 00 40 02 add %g1, %g2, %g1 fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 40003000: 84 02 3f d0 add %o0, -48, %g2 width *= 10; width += (*fmt - '0'); 40003004: 82 00 40 03 add %g1, %g3, %g1 fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 40003008: 84 08 a0 ff and %g2, 0xff, %g2 4000300c: 80 a0 a0 09 cmp %g2, 9 40003010: 08 bf ff f5 bleu 40002fe4 40003014: aa 00 7f d0 add %g1, -48, %l5 40003018: 87 2a 20 18 sll %o0, 0x18, %g3 width *= 10; width += (*fmt - '0'); fmt++; } if ((c = *fmt) == 'l') 4000301c: 83 38 e0 18 sra %g3, 0x18, %g1 40003020: 80 a0 60 6c cmp %g1, 0x6c 40003024: 22 80 00 83 be,a 40003230 40003028: b0 06 20 01 inc %i0 { lflag = 1; c = *++fmt; } switch (c) 4000302c: 82 02 3f bc add %o0, -68, %g1 40003030: 82 08 60 ff and %g1, 0xff, %g1 40003034: 80 a0 60 34 cmp %g1, 0x34 40003038: 08 80 00 12 bleu 40003080 4000303c: 83 28 60 02 sll %g1, 2, %g1 break; case 'c': BSP_output_char(va_arg(ap, int)); break; default: BSP_output_char(c); 40003040: c2 07 61 f4 ld [ %i5 + 0x1f4 ], %g1 <== NOT EXECUTED 40003044: 91 2a 20 18 sll %o0, 0x18, %o0 <== NOT EXECUTED 40003048: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000304c: 91 3a 20 18 sra %o0, 0x18, %o0 <== NOT EXECUTED vprintk(const char *fmt, va_list ap) { char c, *str; int lflag, base, sign, width, lead; for (; *fmt != '\0'; fmt++) 40003050: b0 06 20 01 inc %i0 <== NOT EXECUTED 40003054: d0 0e 00 00 ldub [ %i0 ], %o0 40003058: 91 2a 20 18 sll %o0, 0x18, %o0 4000305c: 80 a2 20 00 cmp %o0, 0 40003060: 12 bf ff d0 bne 40002fa0 40003064: 91 3a 20 18 sra %o0, 0x18, %o0 40003068: 81 c7 e0 08 ret 4000306c: 81 e8 00 00 restore printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), base, sign, width, lead); } else { BSP_output_char(*fmt); 40003070: 9f c0 40 00 call %g1 40003074: 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++) 40003078: 10 bf ff f8 b 40003058 4000307c: d0 0e 00 00 ldub [ %i0 ], %o0 if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) 40003080: c4 06 80 01 ld [ %i2 + %g1 ], %g2 40003084: 81 c0 80 00 jmp %g2 40003088: 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++) 4000308c: e0 06 40 00 ld [ %i1 ], %l0 40003090: d0 0c 00 00 ldub [ %l0 ], %o0 40003094: 91 2a 20 18 sll %o0, 0x18, %o0 40003098: 80 a2 20 00 cmp %o0, 0 4000309c: 02 bf ff ed be 40003050 400030a0: b2 06 60 04 add %i1, 4, %i1 BSP_output_char(*str); 400030a4: c2 07 61 f4 ld [ %i5 + 0x1f4 ], %g1 400030a8: 9f c0 40 00 call %g1 400030ac: 91 3a 20 18 sra %o0, 0x18, %o0 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++) 400030b0: a0 04 20 01 inc %l0 400030b4: d0 0c 00 00 ldub [ %l0 ], %o0 400030b8: 91 2a 20 18 sll %o0, 0x18, %o0 400030bc: 80 a2 20 00 cmp %o0, 0 400030c0: 12 bf ff fa bne 400030a8 400030c4: c2 07 61 f4 ld [ %i5 + 0x1f4 ], %g1 vprintk(const char *fmt, va_list ap) { char c, *str; int lflag, base, sign, width, lead; for (; *fmt != '\0'; fmt++) 400030c8: 10 bf ff e3 b 40003054 400030cc: b0 06 20 01 inc %i0 break; case 'c': BSP_output_char(va_arg(ap, int)); break; default: BSP_output_char(c); 400030d0: 82 10 20 00 clr %g1 400030d4: a4 10 20 10 mov 0x10, %l2 break; } /* switch*/ if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), 400030d8: e2 06 40 00 ld [ %i1 ], %l1 { long unsigned int n; int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { 400030dc: 80 88 60 ff btst 0xff, %g1 BSP_output_char(c); break; } /* switch*/ if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), 400030e0: b2 06 60 04 add %i1, 4, %i1 { long unsigned int n; int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { 400030e4: 02 80 00 0d be 40003118 400030e8: a6 10 00 1d mov %i5, %l3 400030ec: 80 a4 60 00 cmp %l1, 0 400030f0: 16 80 00 0b bge 4000311c 400030f4: 90 10 00 11 mov %l1, %o0 BSP_output_char('-'); 400030f8: c2 07 61 f4 ld [ %i5 + 0x1f4 ], %g1 <== NOT EXECUTED 400030fc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003100: 90 10 20 2d mov 0x2d, %o0 <== NOT EXECUTED num = -num; if (maxwidth) maxwidth--; 40003104: 82 1d 60 00 xor %l5, 0, %g1 <== NOT EXECUTED int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { BSP_output_char('-'); num = -num; 40003108: a2 20 00 11 neg %l1 <== NOT EXECUTED if (maxwidth) maxwidth--; 4000310c: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 40003110: 84 40 20 00 addx %g0, 0, %g2 <== NOT EXECUTED 40003114: aa 25 40 02 sub %l5, %g2, %l5 <== NOT EXECUTED } count = 0; while ((n = num / base) > 0) { 40003118: 90 10 00 11 mov %l1, %o0 4000311c: 92 10 00 12 mov %l2, %o1 40003120: 40 00 4b 5c call 40015e90 <.udiv> 40003124: a8 10 20 00 clr %l4 40003128: a0 92 20 00 orcc %o0, 0, %l0 4000312c: 12 80 00 05 bne 40003140 40003130: ae 10 00 16 mov %l6, %l7 40003134: 10 80 00 41 b 40003238 40003138: a4 10 20 01 mov 1, %l2 4000313c: a0 10 00 08 mov %o0, %l0 toPrint[count++] = (num - (n*base)); 40003140: 92 10 00 12 mov %l2, %o1 40003144: 40 00 4b 19 call 40015da8 <.umul> 40003148: 90 10 00 10 mov %l0, %o0 4000314c: 90 24 40 08 sub %l1, %o0, %o0 num = -num; if (maxwidth) maxwidth--; } count = 0; while ((n = num / base) > 0) { 40003150: 92 10 00 12 mov %l2, %o1 toPrint[count++] = (num - (n*base)); 40003154: d0 2d 00 16 stb %o0, [ %l4 + %l6 ] num = -num; if (maxwidth) maxwidth--; } count = 0; while ((n = num / base) > 0) { 40003158: 90 10 00 10 mov %l0, %o0 4000315c: 40 00 4b 4d call 40015e90 <.udiv> 40003160: a8 05 20 01 inc %l4 40003164: 80 a2 20 00 cmp %o0, 0 40003168: 12 bf ff f5 bne 4000313c 4000316c: a2 10 00 10 mov %l0, %l1 40003170: a4 05 20 01 add %l4, 1, %l2 toPrint[count++] = (num - (n*base)); num = n ; } toPrint[count++] = num; 40003174: 84 07 bf f8 add %fp, -8, %g2 40003178: 82 00 80 14 add %g2, %l4, %g1 4000317c: e2 28 7f ec stb %l1, [ %g1 + -20 ] for (n=maxwidth ; n > count; n-- ) 40003180: 80 a5 40 12 cmp %l5, %l2 40003184: 08 80 00 0a bleu 400031ac 40003188: a0 10 00 15 mov %l5, %l0 4000318c: a2 10 00 1b mov %i3, %l1 BSP_output_char(lead); 40003190: c2 04 e1 f4 ld [ %l3 + 0x1f4 ], %g1 40003194: 9f c0 40 00 call %g1 40003198: 90 10 00 11 mov %l1, %o0 toPrint[count++] = (num - (n*base)); num = n ; } toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) 4000319c: a0 04 3f ff add %l0, -1, %l0 400031a0: 80 a4 00 12 cmp %l0, %l2 400031a4: 18 bf ff fc bgu 40003194 400031a8: c2 04 e1 f4 ld [ %l3 + 0x1f4 ], %g1 400031ac: 82 04 bf ff add %l2, -1, %g1 400031b0: a2 10 20 00 clr %l1 400031b4: a0 05 c0 01 add %l7, %g1, %l0 BSP_output_char(lead); for (n = 0; n < count; n++){ BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 400031b8: c2 4c 00 00 ldsb [ %l0 ], %g1 400031bc: c4 04 e1 f4 ld [ %l3 + 0x1f4 ], %g2 400031c0: d0 4f 00 01 ldsb [ %i4 + %g1 ], %o0 400031c4: 9f c0 80 00 call %g2 400031c8: a2 04 60 01 inc %l1 toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++){ 400031cc: 80 a4 40 12 cmp %l1, %l2 400031d0: 0a bf ff fa bcs 400031b8 400031d4: a0 04 3f ff add %l0, -1, %l0 vprintk(const char *fmt, va_list ap) { char c, *str; int lflag, base, sign, width, lead; for (; *fmt != '\0'; fmt++) 400031d8: 10 bf ff 9f b 40003054 400031dc: b0 06 20 01 inc %i0 case 's': for (str = va_arg(ap, char *); *str; str++) BSP_output_char(*str); break; case 'c': BSP_output_char(va_arg(ap, int)); 400031e0: d0 4e 60 03 ldsb [ %i1 + 3 ], %o0 <== NOT EXECUTED 400031e4: c2 07 61 f4 ld [ %i5 + 0x1f4 ], %g1 <== NOT EXECUTED 400031e8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400031ec: b2 06 60 04 add %i1, 4, %i1 <== NOT EXECUTED vprintk(const char *fmt, va_list ap) { char c, *str; int lflag, base, sign, width, lead; for (; *fmt != '\0'; fmt++) 400031f0: 10 bf ff 99 b 40003054 <== NOT EXECUTED 400031f4: b0 06 20 01 inc %i0 <== NOT EXECUTED } switch (c) { case 'o': case 'O': base = 8; sign = 0; break; case 'i': case 'I': case 'd': case 'D': base = 10; sign = 1; break; 400031f8: 82 10 20 00 clr %g1 <== NOT EXECUTED 400031fc: 10 bf ff b7 b 400030d8 <== NOT EXECUTED 40003200: a4 10 20 0a mov 0xa, %l2 <== NOT EXECUTED if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) 40003204: 82 10 20 00 clr %g1 <== NOT EXECUTED 40003208: 10 bf ff b4 b 400030d8 <== NOT EXECUTED 4000320c: a4 10 20 08 mov 8, %l2 <== NOT EXECUTED { case 'o': case 'O': base = 8; sign = 0; break; 40003210: 82 10 20 01 mov 1, %g1 40003214: 10 bf ff b1 b 400030d8 40003218: a4 10 20 0a mov 0xa, %l2 if (*fmt == '%') { fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; 4000321c: b0 06 20 01 inc %i0 40003220: d0 0e 00 00 ldub [ %i0 ], %o0 40003224: b6 10 20 30 mov 0x30, %i3 40003228: 10 bf ff 68 b 40002fc8 4000322c: 87 2a 20 18 sll %o0, 0x18, %g3 } if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; 40003230: 10 bf ff 7f b 4000302c 40003234: d0 0e 00 00 ldub [ %i0 ], %o0 count = 0; while ((n = num / base) > 0) { toPrint[count++] = (num - (n*base)); num = n ; } toPrint[count++] = num; 40003238: 10 bf ff d0 b 40003178 4000323c: 84 07 bf f8 add %fp, -8, %g2 40018538 : ssize_t write( int fd, const void *buffer, size_t count ) { 40018538: 9d e3 bf 98 save %sp, -104, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 4001853c: 03 10 00 66 sethi %hi(0x40019800), %g1 40018540: c4 00 60 fc ld [ %g1 + 0xfc ], %g2 ! 400198fc ssize_t write( int fd, const void *buffer, size_t count ) { 40018544: 92 10 00 19 mov %i1, %o1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40018548: 80 a6 00 02 cmp %i0, %g2 4001854c: 1a 80 00 24 bcc 400185dc 40018550: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 40018554: 03 10 00 6a sethi %hi(0x4001a800), %g1 40018558: c6 00 61 94 ld [ %g1 + 0x194 ], %g3 ! 4001a994 4001855c: 85 2e 20 02 sll %i0, 2, %g2 40018560: 83 2e 20 04 sll %i0, 4, %g1 40018564: 82 20 40 02 sub %g1, %g2, %g1 40018568: 82 00 40 18 add %g1, %i0, %g1 4001856c: 83 28 60 02 sll %g1, 2, %g1 40018570: b0 00 40 03 add %g1, %g3, %i0 rtems_libio_check_is_open(iop); 40018574: c2 06 20 0c ld [ %i0 + 0xc ], %g1 40018578: 80 88 61 00 btst 0x100, %g1 4001857c: 02 80 00 18 be 400185dc 40018580: 80 a6 60 00 cmp %i1, 0 rtems_libio_check_buffer( buffer ); 40018584: 02 80 00 1c be 400185f4 40018588: 80 a6 a0 00 cmp %i2, 0 rtems_libio_check_count( count ); 4001858c: 02 80 00 12 be 400185d4 40018590: 90 10 20 00 clr %o0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 40018594: 80 88 60 04 btst 4, %g1 40018598: 02 80 00 17 be 400185f4 4001859c: 01 00 00 00 nop /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 400185a0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 400185a4: c2 00 60 0c ld [ %g1 + 0xc ], %g1 400185a8: 80 a0 60 00 cmp %g1, 0 400185ac: 02 80 00 18 be 4001860c 400185b0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->write_h)( iop, buffer, count ); 400185b4: 9f c0 40 00 call %g1 400185b8: 90 10 00 18 mov %i0, %o0 if ( rc > 0 ) 400185bc: 80 a2 20 00 cmp %o0, 0 400185c0: 04 80 00 05 ble 400185d4 400185c4: 01 00 00 00 nop iop->offset += rc; 400185c8: c2 06 20 08 ld [ %i0 + 8 ], %g1 400185cc: 82 00 40 08 add %g1, %o0, %g1 400185d0: c2 26 20 08 st %g1, [ %i0 + 8 ] return rc; } 400185d4: 81 c7 e0 08 ret 400185d8: 91 e8 00 08 restore %g0, %o0, %o0 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 400185dc: 7f ff da 04 call 4000edec <__errno> <== NOT EXECUTED 400185e0: 01 00 00 00 nop <== NOT EXECUTED 400185e4: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 400185e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400185ec: 10 bf ff fa b 400185d4 <== NOT EXECUTED 400185f0: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 400185f4: 7f ff d9 fe call 4000edec <__errno> <== NOT EXECUTED 400185f8: 01 00 00 00 nop <== NOT EXECUTED 400185fc: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 40018600: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40018604: 10 bf ff f4 b 400185d4 <== NOT EXECUTED 40018608: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001860c: 7f ff d9 f8 call 4000edec <__errno> <== NOT EXECUTED 40018610: 01 00 00 00 nop <== NOT EXECUTED 40018614: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40018618: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001861c: 10 bf ff ee b 400185d4 <== NOT EXECUTED 40018620: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED