RTEMS 4.9.6Annotated Report
Sun Jul 24 16:12:19 2011
02009338 <IMFS_Set_handlers>:
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
switch( node->type ) {
2009338: c2 02 00 00 ld [ %o0 ], %g1
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
200933c: c4 02 20 0c ld [ %o0 + 0xc ], %g2
switch( node->type ) {
2009340: c2 00 60 48 ld [ %g1 + 0x48 ], %g1
2009344: 82 00 7f ff add %g1, -1, %g1
2009348: 80 a0 60 05 cmp %g1, 5
200934c: 18 80 00 12 bgu 2009394 <IMFS_Set_handlers+0x5c> <== NEVER TAKEN
2009350: c6 00 a0 2c ld [ %g2 + 0x2c ], %g3
2009354: 83 28 60 02 sll %g1, 2, %g1
2009358: 05 00 80 24 sethi %hi(0x2009000), %g2
200935c: 84 10 a3 20 or %g2, 0x320, %g2 ! 2009320 <miniIMFS_initialize+0x24>
2009360: c2 00 80 01 ld [ %g2 + %g1 ], %g1
2009364: 81 c0 40 00 jmp %g1
2009368: 01 00 00 00 nop
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
200936c: 10 80 00 09 b 2009390 <IMFS_Set_handlers+0x58>
2009370: c2 00 e0 08 ld [ %g3 + 8 ], %g1
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
2009374: 03 00 80 57 sethi %hi(0x2015c00), %g1
2009378: 10 80 00 06 b 2009390 <IMFS_Set_handlers+0x58>
200937c: 82 10 61 ac or %g1, 0x1ac, %g1 ! 2015dac <IMFS_device_handlers>
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
2009380: 03 00 80 57 sethi %hi(0x2015c00), %g1
2009384: 10 80 00 03 b 2009390 <IMFS_Set_handlers+0x58>
2009388: 82 10 61 e4 or %g1, 0x1e4, %g1 ! 2015de4 <IMFS_link_handlers>
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
200938c: c2 00 e0 04 ld [ %g3 + 4 ], %g1
2009390: c2 22 20 04 st %g1, [ %o0 + 4 ]
break;
}
return 0;
}
2009394: 81 c3 e0 08 retl
2009398: 90 10 20 00 clr %o0
0200b110 <IMFS_chown>:
int IMFS_chown(
rtems_filesystem_location_info_t *pathloc, /* IN */
uid_t owner, /* IN */
gid_t group /* IN */
)
{
200b110: 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();
200b114: 40 00 04 34 call 200c1e4 <geteuid>
200b118: e0 06 00 00 ld [ %i0 ], %l0
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
200b11c: c2 14 20 38 lduh [ %l0 + 0x38 ], %g1
200b120: 91 2a 20 10 sll %o0, 0x10, %o0
200b124: 91 32 20 10 srl %o0, 0x10, %o0
200b128: 80 a2 00 01 cmp %o0, %g1
200b12c: 02 80 00 0a be 200b154 <IMFS_chown+0x44> <== ALWAYS TAKEN
200b130: 80 a2 20 00 cmp %o0, 0
200b134: 22 80 00 09 be,a 200b158 <IMFS_chown+0x48> <== NOT EXECUTED
200b138: f2 34 20 38 sth %i1, [ %l0 + 0x38 ] <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EPERM );
200b13c: 40 00 11 c0 call 200f83c <__errno> <== NOT EXECUTED
200b140: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200b144: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
200b148: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200b14c: 81 c7 e0 08 ret <== NOT EXECUTED
200b150: 81 e8 00 00 restore <== NOT EXECUTED
#endif
jnode->st_uid = owner;
200b154: f2 34 20 38 sth %i1, [ %l0 + 0x38 ]
jnode->st_gid = group;
200b158: f4 34 20 3a sth %i2, [ %l0 + 0x3a ]
IMFS_update_ctime( jnode );
200b15c: 90 07 bf f0 add %fp, -16, %o0
200b160: 7f ff e1 4e call 2003698 <gettimeofday>
200b164: 92 10 20 00 clr %o1
200b168: c2 07 bf f0 ld [ %fp + -16 ], %g1
200b16c: c2 24 20 44 st %g1, [ %l0 + 0x44 ]
return 0;
}
200b170: 81 c7 e0 08 ret
200b174: 91 e8 20 00 restore %g0, 0, %o0
0200c458 <IMFS_create_node>:
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
200c458: 9d e3 bf 90 save %sp, -112, %sp
IMFS_jnode_t *node;
struct timeval tv;
IMFS_jnode_t *parent = NULL;
IMFS_fs_info_t *fs_info;
if ( parent_loc != NULL )
200c45c: a2 96 20 00 orcc %i0, 0, %l1
200c460: 02 80 00 03 be 200c46c <IMFS_create_node+0x14>
200c464: a0 10 20 00 clr %l0
parent = parent_loc->node_access;
200c468: e0 04 40 00 ld [ %l1 ], %l0
/*
* Allocate an IMFS jnode
*/
node = calloc( 1, sizeof( IMFS_jnode_t ) );
200c46c: 90 10 20 01 mov 1, %o0
200c470: 7f ff f7 2f call 200a12c <calloc>
200c474: 92 10 20 5c mov 0x5c, %o1
if ( !node )
200c478: b0 92 20 00 orcc %o0, 0, %i0
200c47c: 02 80 00 4a be 200c5a4 <IMFS_create_node+0x14c> <== NEVER TAKEN
200c480: 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 );
200c484: 92 10 00 1a mov %i2, %o1
200c488: 94 10 20 20 mov 0x20, %o2
/*
* Fill in the basic information
*/
node->st_nlink = 1;
node->type = type;
200c48c: f2 26 20 48 st %i1, [ %i0 + 0x48 ]
/*
* Fill in the basic information
*/
node->st_nlink = 1;
200c490: c2 36 20 30 sth %g1, [ %i0 + 0x30 ]
node->type = type;
strncpy( node->name, name, IMFS_NAME_MAX );
200c494: 40 00 08 42 call 200e59c <strncpy>
200c498: 90 06 20 0c add %i0, 0xc, %o0
/*
* Fill in the mode and permission information for the jnode structure.
*/
node->st_mode = mode & ~rtems_filesystem_umask;
200c49c: 03 00 80 5b sethi %hi(0x2016c00), %g1
200c4a0: c2 00 62 64 ld [ %g1 + 0x264 ], %g1 ! 2016e64 <rtems_current_user_env>
/*
* Set the type specific information
*/
switch (type) {
200c4a4: b2 06 7f ff add %i1, -1, %i1
/*
* Fill in the mode and permission information for the jnode structure.
*/
node->st_mode = mode & ~rtems_filesystem_umask;
200c4a8: c2 10 60 24 lduh [ %g1 + 0x24 ], %g1
200c4ac: 82 2e c0 01 andn %i3, %g1, %g1
#if defined(RTEMS_POSIX_API)
node->st_uid = geteuid();
200c4b0: 7f ff f7 d4 call 200a400 <geteuid>
200c4b4: c2 36 20 2e sth %g1, [ %i0 + 0x2e ]
node->st_gid = getegid();
200c4b8: 7f ff f7 ce call 200a3f0 <getegid>
200c4bc: d0 36 20 38 sth %o0, [ %i0 + 0x38 ]
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
200c4c0: 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();
200c4c4: d0 36 20 3a sth %o0, [ %i0 + 0x3a ]
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
200c4c8: 7f ff f7 d2 call 200a410 <gettimeofday>
200c4cc: 90 07 bf f0 add %fp, -16, %o0
node->stat_atime = (time_t) tv.tv_sec;
200c4d0: c2 07 bf f0 ld [ %fp + -16 ], %g1
/*
* Set the type specific information
*/
switch (type) {
200c4d4: 80 a6 60 05 cmp %i1, 5
gettimeofday( &tv, 0 );
node->stat_atime = (time_t) tv.tv_sec;
node->stat_mtime = (time_t) tv.tv_sec;
node->stat_ctime = (time_t) tv.tv_sec;
200c4d8: c2 26 20 44 st %g1, [ %i0 + 0x44 ]
* Now set all the times.
*/
gettimeofday( &tv, 0 );
node->stat_atime = (time_t) tv.tv_sec;
200c4dc: c2 26 20 3c st %g1, [ %i0 + 0x3c ]
/*
* Set the type specific information
*/
switch (type) {
200c4e0: 18 80 00 1d bgu 200c554 <IMFS_create_node+0xfc> <== NEVER TAKEN
200c4e4: c2 26 20 40 st %g1, [ %i0 + 0x40 ]
200c4e8: 83 2e 60 02 sll %i1, 2, %g1
200c4ec: 05 00 80 31 sethi %hi(0x200c400), %g2
200c4f0: 84 10 a0 40 or %g2, 0x40, %g2 ! 200c440 <device_open+0x4c>
200c4f4: c2 00 80 01 ld [ %g2 + %g1 ], %g1
200c4f8: 81 c0 40 00 jmp %g1
200c4fc: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
200c500: 82 06 20 50 add %i0, 0x50, %g1
the_chain->permanent_null = NULL;
200c504: c0 26 20 50 clr [ %i0 + 0x50 ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
200c508: c2 26 20 4c st %g1, [ %i0 + 0x4c ]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
200c50c: 82 06 20 4c add %i0, 0x4c, %g1
200c510: 10 80 00 19 b 200c574 <IMFS_create_node+0x11c>
200c514: c2 26 20 54 st %g1, [ %i0 + 0x54 ]
case IMFS_HARD_LINK:
node->info.hard_link.link_node = info->hard_link.link_node;
break;
case IMFS_SYM_LINK:
node->info.sym_link.name = info->sym_link.name;
200c518: c2 07 00 00 ld [ %i4 ], %g1
200c51c: 10 80 00 16 b 200c574 <IMFS_create_node+0x11c>
200c520: c2 26 20 4c st %g1, [ %i0 + 0x4c ]
break;
case IMFS_DEVICE:
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
200c524: c2 07 20 04 ld [ %i4 + 4 ], %g1
case IMFS_SYM_LINK:
node->info.sym_link.name = info->sym_link.name;
break;
case IMFS_DEVICE:
node->info.device.major = info->device.major;
200c528: c4 07 00 00 ld [ %i4 ], %g2
node->info.device.minor = info->device.minor;
200c52c: c2 26 20 50 st %g1, [ %i0 + 0x50 ]
case IMFS_SYM_LINK:
node->info.sym_link.name = info->sym_link.name;
break;
case IMFS_DEVICE:
node->info.device.major = info->device.major;
200c530: 10 80 00 11 b 200c574 <IMFS_create_node+0x11c>
200c534: c4 26 20 4c st %g2, [ %i0 + 0x4c ]
node->info.device.minor = info->device.minor;
break;
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
200c538: c0 26 20 4c clr [ %i0 + 0x4c ] <== NOT EXECUTED
node->info.linearfile.direct = 0;
200c53c: c0 26 20 50 clr [ %i0 + 0x50 ] <== NOT EXECUTED
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
200c540: c0 26 20 4c clr [ %i0 + 0x4c ]
node->info.file.indirect = 0;
200c544: c0 26 20 50 clr [ %i0 + 0x50 ]
node->info.file.doubly_indirect = 0;
200c548: c0 26 20 54 clr [ %i0 + 0x54 ]
node->info.file.triply_indirect = 0;
200c54c: 10 80 00 0a b 200c574 <IMFS_create_node+0x11c>
200c550: c0 26 20 58 clr [ %i0 + 0x58 ]
break;
default:
assert(0);
200c554: 11 00 80 58 sethi %hi(0x2016000), %o0 <== NOT EXECUTED
200c558: 15 00 80 58 sethi %hi(0x2016000), %o2 <== NOT EXECUTED
200c55c: 17 00 80 57 sethi %hi(0x2015c00), %o3 <== NOT EXECUTED
200c560: 90 12 22 00 or %o0, 0x200, %o0 <== NOT EXECUTED
200c564: 94 12 a2 50 or %o2, 0x250, %o2 <== NOT EXECUTED
200c568: 96 12 e1 10 or %o3, 0x110, %o3 <== NOT EXECUTED
200c56c: 7f ff d6 57 call 2001ec8 <__assert_func> <== NOT EXECUTED
200c570: 92 10 20 74 mov 0x74, %o1 <== NOT EXECUTED
/*
* If this node has a parent, then put it in that directory list.
*/
if ( parent ) {
200c574: 80 a4 20 00 cmp %l0, 0
200c578: 02 80 00 0b be 200c5a4 <IMFS_create_node+0x14c>
200c57c: 90 04 20 4c add %l0, 0x4c, %o0
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
200c580: 7f ff e6 8f call 2005fbc <_Chain_Append>
200c584: 92 10 00 18 mov %i0, %o1
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
node->Parent = parent;
fs_info = parent_loc->mt_entry->fs_info;
200c588: c2 04 60 0c ld [ %l1 + 0xc ], %g1
* If this node has a parent, then put it in that directory list.
*/
if ( parent ) {
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
node->Parent = parent;
200c58c: e0 26 20 08 st %l0, [ %i0 + 8 ]
fs_info = parent_loc->mt_entry->fs_info;
200c590: c4 00 60 2c ld [ %g1 + 0x2c ], %g2
node->st_ino = ++fs_info->ino_count;
200c594: c2 00 80 00 ld [ %g2 ], %g1
200c598: 82 00 60 01 inc %g1
200c59c: c2 20 80 00 st %g1, [ %g2 ]
200c5a0: c2 26 20 34 st %g1, [ %i0 + 0x34 ]
}
return node;
}
200c5a4: 81 c7 e0 08 ret
200c5a8: 81 e8 00 00 restore
02003ac0 <IMFS_dump_directory>:
void IMFS_dump_directory(
IMFS_jnode_t *the_directory,
int level
)
{
2003ac0: 9d e3 bf 98 save %sp, -104, %sp
rtems_chain_node *the_node;
rtems_chain_control *the_chain;
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
2003ac4: 80 a6 20 00 cmp %i0, 0
2003ac8: 12 80 00 0a bne 2003af0 <IMFS_dump_directory+0x30> <== ALWAYS TAKEN
2003acc: 80 a6 60 00 cmp %i1, 0
2003ad0: 11 00 80 72 sethi %hi(0x201c800), %o0 <== NOT EXECUTED
2003ad4: 15 00 80 72 sethi %hi(0x201c800), %o2 <== NOT EXECUTED
2003ad8: 17 00 80 72 sethi %hi(0x201c800), %o3 <== NOT EXECUTED
2003adc: 90 12 21 f0 or %o0, 0x1f0, %o0 <== NOT EXECUTED
2003ae0: 94 12 a3 b0 or %o2, 0x3b0, %o2 <== NOT EXECUTED
2003ae4: 96 12 e2 b8 or %o3, 0x2b8, %o3 <== NOT EXECUTED
2003ae8: 10 80 00 0b b 2003b14 <IMFS_dump_directory+0x54> <== NOT EXECUTED
2003aec: 92 10 20 7f mov 0x7f, %o1 <== NOT EXECUTED
assert( level >= 0 );
2003af0: 36 80 00 0b bge,a 2003b1c <IMFS_dump_directory+0x5c> <== ALWAYS TAKEN
2003af4: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
2003af8: 11 00 80 72 sethi %hi(0x201c800), %o0 <== NOT EXECUTED
2003afc: 15 00 80 72 sethi %hi(0x201c800), %o2 <== NOT EXECUTED
2003b00: 17 00 80 72 sethi %hi(0x201c800), %o3 <== NOT EXECUTED
2003b04: 90 12 21 f0 or %o0, 0x1f0, %o0 <== NOT EXECUTED
2003b08: 94 12 a3 b0 or %o2, 0x3b0, %o2 <== NOT EXECUTED
2003b0c: 96 12 e2 c8 or %o3, 0x2c8, %o3 <== NOT EXECUTED
2003b10: 92 10 20 81 mov 0x81, %o1 <== NOT EXECUTED
2003b14: 40 00 01 c3 call 2004220 <__assert_func> <== NOT EXECUTED
2003b18: 01 00 00 00 nop <== NOT EXECUTED
assert( the_directory->type == IMFS_DIRECTORY );
2003b1c: 80 a0 60 01 cmp %g1, 1
2003b20: 22 80 00 0a be,a 2003b48 <IMFS_dump_directory+0x88> <== ALWAYS TAKEN
2003b24: 03 00 80 7b sethi %hi(0x201ec00), %g1
2003b28: 11 00 80 72 sethi %hi(0x201c800), %o0 <== NOT EXECUTED
2003b2c: 15 00 80 72 sethi %hi(0x201c800), %o2 <== NOT EXECUTED
2003b30: 17 00 80 72 sethi %hi(0x201c800), %o3 <== NOT EXECUTED
2003b34: 90 12 21 f0 or %o0, 0x1f0, %o0 <== NOT EXECUTED
2003b38: 94 12 a3 b0 or %o2, 0x3b0, %o2 <== NOT EXECUTED
2003b3c: 96 12 e2 d8 or %o3, 0x2d8, %o3 <== NOT EXECUTED
2003b40: 10 bf ff f5 b 2003b14 <IMFS_dump_directory+0x54> <== NOT EXECUTED
2003b44: 92 10 20 83 mov 0x83, %o1 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
2003b48: a4 06 20 50 add %i0, 0x50, %l2
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
2003b4c: a8 10 60 a8 or %g1, 0xa8, %l4
assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
2003b50: f0 06 20 4c ld [ %i0 + 0x4c ], %i0
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
2003b54: 03 00 80 72 sethi %hi(0x201c800), %g1
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
2003b58: a2 06 60 01 add %i1, 1, %l1
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
2003b5c: 10 80 00 14 b 2003bac <IMFS_dump_directory+0xec>
2003b60: a6 10 63 00 or %g1, 0x300, %l3
2003b64: c2 05 00 00 ld [ %l4 ], %g1
2003b68: 90 10 00 13 mov %l3, %o0
2003b6c: d2 00 60 08 ld [ %g1 + 8 ], %o1
2003b70: 40 00 37 d0 call 2011ab0 <fputs>
2003b74: a0 04 20 01 inc %l0
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
2003b78: 80 a4 00 19 cmp %l0, %i1
2003b7c: 24 bf ff fb ble,a 2003b68 <IMFS_dump_directory+0xa8>
2003b80: c2 05 00 00 ld [ %l4 ], %g1
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
2003b84: 7f ff ff 78 call 2003964 <IMFS_print_jnode>
2003b88: 90 10 00 18 mov %i0, %o0
if ( the_jnode->type == IMFS_DIRECTORY )
2003b8c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
2003b90: 80 a0 60 01 cmp %g1, 1
2003b94: 32 80 00 06 bne,a 2003bac <IMFS_dump_directory+0xec>
2003b98: f0 06 00 00 ld [ %i0 ], %i0
IMFS_dump_directory( the_jnode, level + 1 );
2003b9c: 90 10 00 18 mov %i0, %o0
2003ba0: 7f ff ff c8 call 2003ac0 <IMFS_dump_directory>
2003ba4: 92 10 00 11 mov %l1, %o1
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
2003ba8: f0 06 00 00 ld [ %i0 ], %i0
assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
!rtems_chain_is_tail( the_chain, the_node );
2003bac: 80 a6 00 12 cmp %i0, %l2
2003bb0: 12 bf ff ed bne 2003b64 <IMFS_dump_directory+0xa4>
2003bb4: a0 10 20 00 clr %l0
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
}
}
2003bb8: 81 c7 e0 08 ret
2003bbc: 81 e8 00 00 restore
02009548 <IMFS_eval_path>:
int IMFS_eval_path(
const char *pathname, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
2009548: 9d e3 bf 60 save %sp, -160, %sp
char token[ IMFS_NAME_MAX + 1 ];
rtems_filesystem_location_info_t newloc;
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
200954c: 80 8e 7f f8 btst -8, %i1
2009550: 02 80 00 0a be 2009578 <IMFS_eval_path+0x30> <== ALWAYS TAKEN
2009554: a8 10 00 18 mov %i0, %l4
assert( 0 );
2009558: 11 00 80 57 sethi %hi(0x2015c00), %o0 <== NOT EXECUTED
200955c: 15 00 80 57 sethi %hi(0x2015c00), %o2 <== NOT EXECUTED
2009560: 17 00 80 57 sethi %hi(0x2015c00), %o3 <== NOT EXECUTED
2009564: 90 12 20 c0 or %o0, 0xc0, %o0 <== NOT EXECUTED
2009568: 94 12 a0 b0 or %o2, 0xb0, %o2 <== NOT EXECUTED
200956c: 96 12 e1 10 or %o3, 0x110, %o3 <== NOT EXECUTED
2009570: 7f ff e2 56 call 2001ec8 <__assert_func> <== NOT EXECUTED
2009574: 92 10 21 ea mov 0x1ea, %o1 <== 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 )
2009578: 03 00 80 5b sethi %hi(0x2016c00), %g1
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
200957c: e0 06 80 00 ld [ %i2 ], %l0
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
2009580: ae 10 62 64 or %g1, 0x264, %l7
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
2009584: a6 10 20 00 clr %l3
2009588: a2 10 20 01 mov 1, %l1
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], token, &len );
200958c: aa 07 bf c0 add %fp, -64, %l5
2009590: 10 80 00 6a b 2009738 <IMFS_eval_path+0x1f0>
2009594: ac 07 bf f4 add %fp, -12, %l6
2009598: 90 05 00 13 add %l4, %l3, %o0
200959c: 92 10 00 15 mov %l5, %o1
20095a0: 40 00 01 a0 call 2009c20 <IMFS_get_token>
20095a4: 94 10 00 16 mov %l6, %o2
i += len;
if ( !pathloc->node_access )
20095a8: c2 06 80 00 ld [ %i2 ], %g1
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], token, &len );
20095ac: a2 10 00 08 mov %o0, %l1
i += len;
if ( !pathloc->node_access )
20095b0: 80 a0 60 00 cmp %g1, 0
20095b4: 02 80 00 57 be 2009710 <IMFS_eval_path+0x1c8> <== NEVER TAKEN
20095b8: e4 07 bf f4 ld [ %fp + -12 ], %l2
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
20095bc: 80 a2 20 00 cmp %o0, 0
20095c0: 22 80 00 10 be,a 2009600 <IMFS_eval_path+0xb8>
20095c4: a6 04 c0 12 add %l3, %l2, %l3
if ( node->type == IMFS_DIRECTORY )
20095c8: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
20095cc: 80 a0 60 01 cmp %g1, 1
20095d0: 32 80 00 0c bne,a 2009600 <IMFS_eval_path+0xb8>
20095d4: a6 04 c0 12 add %l3, %l2, %l3
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
20095d8: 90 10 00 1a mov %i2, %o0
20095dc: 7f ff ff 70 call 200939c <IMFS_evaluate_permission>
20095e0: 92 10 20 01 mov 1, %o1
20095e4: 80 a2 20 00 cmp %o0, 0
20095e8: 32 80 00 06 bne,a 2009600 <IMFS_eval_path+0xb8>
20095ec: a6 04 c0 12 add %l3, %l2, %l3
rtems_set_errno_and_return_minus_one( EACCES );
20095f0: 40 00 0e a9 call 200d094 <__errno>
20095f4: b0 10 3f ff mov -1, %i0
20095f8: 10 80 00 4d b 200972c <IMFS_eval_path+0x1e4>
20095fc: 82 10 20 0d mov 0xd, %g1
node = pathloc->node_access;
switch( type ) {
2009600: 80 a4 60 03 cmp %l1, 3
2009604: 02 80 00 1b be 2009670 <IMFS_eval_path+0x128>
2009608: e0 06 80 00 ld [ %i2 ], %l0
200960c: 80 a4 60 04 cmp %l1, 4
2009610: 02 80 00 44 be 2009720 <IMFS_eval_path+0x1d8>
2009614: 80 a4 60 02 cmp %l1, 2
2009618: 12 80 00 49 bne 200973c <IMFS_eval_path+0x1f4>
200961c: 80 a4 60 00 cmp %l1, 0
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
2009620: c2 05 c0 00 ld [ %l7 ], %g1
2009624: c2 00 60 14 ld [ %g1 + 0x14 ], %g1
2009628: 80 a4 00 01 cmp %l0, %g1
200962c: 02 bf ff dc be 200959c <IMFS_eval_path+0x54>
2009630: 90 05 00 13 add %l4, %l3, %o0
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
2009634: d2 06 a0 0c ld [ %i2 + 0xc ], %o1
2009638: c2 02 60 18 ld [ %o1 + 0x18 ], %g1
200963c: 80 a4 00 01 cmp %l0, %g1
2009640: 32 80 00 04 bne,a 2009650 <IMFS_eval_path+0x108>
2009644: e0 04 20 08 ld [ %l0 + 8 ], %l0
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
2009648: 10 80 00 4a b 2009770 <IMFS_eval_path+0x228>
200964c: 92 02 60 08 add %o1, 8, %o1
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),flags,pathloc);
}
} else {
if ( !node->Parent )
2009650: 80 a4 20 00 cmp %l0, 0
2009654: 32 bf ff d1 bne,a 2009598 <IMFS_eval_path+0x50>
2009658: e0 26 80 00 st %l0, [ %i2 ]
rtems_set_errno_and_return_minus_one( ENOENT );
200965c: 40 00 0e 8e call 200d094 <__errno>
2009660: b0 10 3f ff mov -1, %i0
2009664: e2 22 00 00 st %l1, [ %o0 ]
2009668: 81 c7 e0 08 ret
200966c: 81 e8 00 00 restore
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
2009670: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
2009674: 80 a0 60 03 cmp %g1, 3
2009678: 12 80 00 0a bne 20096a0 <IMFS_eval_path+0x158>
200967c: 80 a0 60 04 cmp %g1, 4
IMFS_evaluate_hard_link( pathloc, 0 );
2009680: 90 10 00 1a mov %i2, %o0
2009684: 7f ff ff 67 call 2009420 <IMFS_evaluate_hard_link>
2009688: 92 10 20 00 clr %o1
node = pathloc->node_access;
200968c: e0 06 80 00 ld [ %i2 ], %l0
if ( !node )
2009690: 80 a4 20 00 cmp %l0, 0
2009694: 32 80 00 0e bne,a 20096cc <IMFS_eval_path+0x184> <== ALWAYS TAKEN
2009698: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
200969c: 30 80 00 0f b,a 20096d8 <IMFS_eval_path+0x190> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
20096a0: 32 80 00 0b bne,a 20096cc <IMFS_eval_path+0x184>
20096a4: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
result = IMFS_evaluate_sym_link( pathloc, 0 );
20096a8: 90 10 00 1a mov %i2, %o0
20096ac: 7f ff ff 75 call 2009480 <IMFS_evaluate_sym_link>
20096b0: 92 10 20 00 clr %o1
20096b4: b0 10 00 08 mov %o0, %i0
node = pathloc->node_access;
if ( result == -1 )
20096b8: 80 a2 3f ff cmp %o0, -1
20096bc: 02 bf ff eb be 2009668 <IMFS_eval_path+0x120> <== NEVER TAKEN
20096c0: 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;
20096c4: a0 10 00 08 mov %o0, %l0
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
20096c8: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
20096cc: 80 a0 60 01 cmp %g1, 1
20096d0: 22 80 00 06 be,a 20096e8 <IMFS_eval_path+0x1a0>
20096d4: d2 04 20 58 ld [ %l0 + 0x58 ], %o1
rtems_set_errno_and_return_minus_one( ENOTDIR );
20096d8: 40 00 0e 6f call 200d094 <__errno>
20096dc: b0 10 3f ff mov -1, %i0
20096e0: 10 80 00 13 b 200972c <IMFS_eval_path+0x1e4>
20096e4: 82 10 20 14 mov 0x14, %g1
/*
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
20096e8: 80 a2 60 00 cmp %o1, 0
20096ec: 02 80 00 04 be 20096fc <IMFS_eval_path+0x1b4>
20096f0: 90 10 00 10 mov %l0, %o0
newloc = node->info.directory.mt_fs->mt_fs_root;
20096f4: 10 80 00 1f b 2009770 <IMFS_eval_path+0x228>
20096f8: 92 02 60 18 add %o1, 0x18, %o1
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
20096fc: 40 00 01 1e call 2009b74 <IMFS_find_match_in_dir>
2009700: 92 10 00 15 mov %l5, %o1
if ( !node )
2009704: a0 92 20 00 orcc %o0, 0, %l0
2009708: 32 bf ff a4 bne,a 2009598 <IMFS_eval_path+0x50>
200970c: e0 26 80 00 st %l0, [ %i2 ]
rtems_set_errno_and_return_minus_one( ENOENT );
2009710: 40 00 0e 61 call 200d094 <__errno>
2009714: b0 10 3f ff mov -1, %i0
2009718: 10 80 00 05 b 200972c <IMFS_eval_path+0x1e4>
200971c: 82 10 20 02 mov 2, %g1
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
2009720: 40 00 0e 5d call 200d094 <__errno>
2009724: b0 10 3f ff mov -1, %i0
2009728: 82 10 20 5b mov 0x5b, %g1
200972c: c2 22 00 00 st %g1, [ %o0 ]
2009730: 81 c7 e0 08 ret
2009734: 81 e8 00 00 restore
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
2009738: 80 a4 60 00 cmp %l1, 0
200973c: 22 80 00 06 be,a 2009754 <IMFS_eval_path+0x20c>
2009740: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
2009744: 80 a4 60 04 cmp %l1, 4
2009748: 12 bf ff 95 bne 200959c <IMFS_eval_path+0x54> <== ALWAYS TAKEN
200974c: 90 05 00 13 add %l4, %l3, %o0
* new fs root node and let let the mounted filesystem set the handlers.
*
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
2009750: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 <== NOT EXECUTED
2009754: 80 a0 60 01 cmp %g1, 1
2009758: 12 80 00 18 bne 20097b8 <IMFS_eval_path+0x270>
200975c: 01 00 00 00 nop
if ( node->info.directory.mt_fs != NULL ) {
2009760: d0 04 20 58 ld [ %l0 + 0x58 ], %o0
2009764: 80 a2 20 00 cmp %o0, 0
2009768: 02 80 00 14 be 20097b8 <IMFS_eval_path+0x270>
200976c: 92 02 20 18 add %o0, 0x18, %o1
newloc = node->info.directory.mt_fs->mt_fs_root;
2009770: a0 07 bf e4 add %fp, -28, %l0
2009774: 94 10 20 10 mov 0x10, %o2
2009778: 40 00 10 39 call 200d85c <memcpy>
200977c: 90 10 00 10 mov %l0, %o0
*pathloc = newloc;
2009780: 92 10 00 10 mov %l0, %o1
2009784: 94 10 20 10 mov 0x10, %o2
2009788: 40 00 10 35 call 200d85c <memcpy>
200978c: 90 10 00 1a mov %i2, %o0
return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc );
2009790: c2 06 a0 08 ld [ %i2 + 8 ], %g1
2009794: d0 07 bf f4 ld [ %fp + -12 ], %o0
2009798: c2 00 40 00 ld [ %g1 ], %g1
200979c: 90 24 c0 08 sub %l3, %o0, %o0
20097a0: 92 10 00 19 mov %i1, %o1
20097a4: 90 05 00 08 add %l4, %o0, %o0
20097a8: 9f c0 40 00 call %g1
20097ac: 94 10 00 1a mov %i2, %o2
20097b0: 81 c7 e0 08 ret
20097b4: 91 e8 00 08 restore %g0, %o0, %o0
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
20097b8: 7f ff fe e0 call 2009338 <IMFS_Set_handlers>
20097bc: 90 10 00 1a mov %i2, %o0
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
20097c0: 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 );
20097c4: b0 10 00 08 mov %o0, %i0
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
20097c8: 7f ff fe f5 call 200939c <IMFS_evaluate_permission>
20097cc: 90 10 00 1a mov %i2, %o0
20097d0: 80 a2 20 00 cmp %o0, 0
20097d4: 12 80 00 06 bne 20097ec <IMFS_eval_path+0x2a4>
20097d8: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EACCES );
20097dc: 40 00 0e 2e call 200d094 <__errno>
20097e0: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff>
20097e4: 82 10 20 0d mov 0xd, %g1
20097e8: c2 22 00 00 st %g1, [ %o0 ]
return result;
}
20097ec: 81 c7 e0 08 ret
20097f0: 81 e8 00 00 restore
020098ac <IMFS_evaluate_for_make>:
int IMFS_evaluate_for_make(
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
20098ac: 9d e3 bf 60 save %sp, -160, %sp
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
20098b0: e0 06 40 00 ld [ %i1 ], %l0
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
20098b4: 03 00 80 5b sethi %hi(0x2016c00), %g1
int IMFS_evaluate_for_make(
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
20098b8: a8 10 00 18 mov %i0, %l4
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
20098bc: ae 10 62 64 or %g1, 0x264, %l7
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
20098c0: a4 10 20 00 clr %l2
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], token, &len );
20098c4: aa 07 bf c0 add %fp, -64, %l5
20098c8: ac 07 bf f4 add %fp, -12, %l6
20098cc: 90 05 00 12 add %l4, %l2, %o0
20098d0: 92 10 00 15 mov %l5, %o1
20098d4: 40 00 00 d3 call 2009c20 <IMFS_get_token>
20098d8: 94 10 00 16 mov %l6, %o2
i += len;
if ( !pathloc->node_access )
20098dc: c2 06 40 00 ld [ %i1 ], %g1
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], token, &len );
20098e0: a2 10 00 08 mov %o0, %l1
i += len;
if ( !pathloc->node_access )
20098e4: 80 a0 60 00 cmp %g1, 0
20098e8: 02 80 00 82 be 2009af0 <IMFS_evaluate_for_make+0x244> <== NEVER TAKEN
20098ec: e6 07 bf f4 ld [ %fp + -12 ], %l3
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
20098f0: 80 a2 20 00 cmp %o0, 0
20098f4: 22 80 00 10 be,a 2009934 <IMFS_evaluate_for_make+0x88>
20098f8: a4 04 80 13 add %l2, %l3, %l2
if ( node->type == IMFS_DIRECTORY )
20098fc: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
2009900: 80 a0 60 01 cmp %g1, 1
2009904: 32 80 00 0c bne,a 2009934 <IMFS_evaluate_for_make+0x88>
2009908: a4 04 80 13 add %l2, %l3, %l2
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
200990c: 90 10 00 19 mov %i1, %o0
2009910: 7f ff fe a3 call 200939c <IMFS_evaluate_permission>
2009914: 92 10 20 01 mov 1, %o1
2009918: 80 a2 20 00 cmp %o0, 0
200991c: 32 80 00 06 bne,a 2009934 <IMFS_evaluate_for_make+0x88>
2009920: a4 04 80 13 add %l2, %l3, %l2
rtems_set_errno_and_return_minus_one( EACCES );
2009924: 40 00 0d dc call 200d094 <__errno>
2009928: b0 10 3f ff mov -1, %i0
200992c: 10 80 00 83 b 2009b38 <IMFS_evaluate_for_make+0x28c>
2009930: 82 10 20 0d mov 0xd, %g1
node = pathloc->node_access;
switch( type ) {
2009934: 80 a4 60 02 cmp %l1, 2
2009938: 02 80 00 0f be 2009974 <IMFS_evaluate_for_make+0xc8>
200993c: e0 06 40 00 ld [ %i1 ], %l0
2009940: 80 a4 60 02 cmp %l1, 2
2009944: 18 80 00 07 bgu 2009960 <IMFS_evaluate_for_make+0xb4>
2009948: 80 a4 60 03 cmp %l1, 3
200994c: 80 a4 60 00 cmp %l1, 0
2009950: 02 80 00 56 be 2009aa8 <IMFS_evaluate_for_make+0x1fc>
2009954: 01 00 00 00 nop
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], token, &len );
2009958: 10 bf ff de b 20098d0 <IMFS_evaluate_for_make+0x24>
200995c: 90 05 00 12 add %l4, %l2, %o0
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
2009960: 02 80 00 19 be 20099c4 <IMFS_evaluate_for_make+0x118>
2009964: 80 a4 60 04 cmp %l1, 4
2009968: 32 bf ff da bne,a 20098d0 <IMFS_evaluate_for_make+0x24> <== NEVER TAKEN
200996c: 90 05 00 12 add %l4, %l2, %o0 <== NOT EXECUTED
2009970: 30 80 00 52 b,a 2009ab8 <IMFS_evaluate_for_make+0x20c>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
2009974: c2 05 c0 00 ld [ %l7 ], %g1
2009978: c2 00 60 14 ld [ %g1 + 0x14 ], %g1
200997c: 80 a4 00 01 cmp %l0, %g1
2009980: 02 bf ff d4 be 20098d0 <IMFS_evaluate_for_make+0x24>
2009984: 90 05 00 12 add %l4, %l2, %o0
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
2009988: d2 06 60 0c ld [ %i1 + 0xc ], %o1
200998c: c2 02 60 18 ld [ %o1 + 0x18 ], %g1
2009990: 80 a4 00 01 cmp %l0, %g1
2009994: 32 80 00 04 bne,a 20099a4 <IMFS_evaluate_for_make+0xf8>
2009998: e0 04 20 08 ld [ %l0 + 8 ], %l0
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
200999c: 10 80 00 2a b 2009a44 <IMFS_evaluate_for_make+0x198>
20099a0: 92 02 60 08 add %o1, 8, %o1
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
20099a4: 80 a4 20 00 cmp %l0, 0
20099a8: 32 bf ff c9 bne,a 20098cc <IMFS_evaluate_for_make+0x20>
20099ac: e0 26 40 00 st %l0, [ %i1 ]
rtems_set_errno_and_return_minus_one( ENOENT );
20099b0: 40 00 0d b9 call 200d094 <__errno>
20099b4: b0 10 3f ff mov -1, %i0
20099b8: e2 22 00 00 st %l1, [ %o0 ]
20099bc: 81 c7 e0 08 ret
20099c0: 81 e8 00 00 restore
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
20099c4: d0 04 20 48 ld [ %l0 + 0x48 ], %o0
20099c8: 80 a2 20 03 cmp %o0, 3
20099cc: 12 80 00 0a bne 20099f4 <IMFS_evaluate_for_make+0x148>
20099d0: 80 a2 20 04 cmp %o0, 4
result = IMFS_evaluate_link( pathloc, 0 );
20099d4: 90 10 00 19 mov %i1, %o0
20099d8: 7f ff ff 87 call 20097f4 <IMFS_evaluate_link>
20099dc: 92 10 20 00 clr %o1
if ( result == -1 )
20099e0: 80 a2 3f ff cmp %o0, -1
20099e4: 12 80 00 0c bne 2009a14 <IMFS_evaluate_for_make+0x168> <== ALWAYS TAKEN
20099e8: b0 10 00 08 mov %o0, %i0
20099ec: 81 c7 e0 08 ret <== NOT EXECUTED
20099f0: 81 e8 00 00 restore <== NOT EXECUTED
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
20099f4: 32 80 00 09 bne,a 2009a18 <IMFS_evaluate_for_make+0x16c>
20099f8: d0 06 40 00 ld [ %i1 ], %o0
result = IMFS_evaluate_link( pathloc, 0 );
20099fc: 90 10 00 19 mov %i1, %o0
2009a00: 7f ff ff 7d call 20097f4 <IMFS_evaluate_link>
2009a04: 92 10 20 00 clr %o1
if ( result == -1 )
2009a08: 80 a2 3f ff cmp %o0, -1
2009a0c: 02 bf ff ec be 20099bc <IMFS_evaluate_for_make+0x110> <== NEVER TAKEN
2009a10: b0 10 00 08 mov %o0, %i0
return -1;
}
node = pathloc->node_access;
2009a14: d0 06 40 00 ld [ %i1 ], %o0
if ( !node )
2009a18: 80 a2 20 00 cmp %o0, 0
2009a1c: 02 80 00 44 be 2009b2c <IMFS_evaluate_for_make+0x280> <== NEVER TAKEN
2009a20: 01 00 00 00 nop
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
2009a24: c2 02 20 48 ld [ %o0 + 0x48 ], %g1
2009a28: 80 a0 60 01 cmp %g1, 1
2009a2c: 12 80 00 40 bne 2009b2c <IMFS_evaluate_for_make+0x280>
2009a30: 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 ) {
2009a34: d2 02 20 58 ld [ %o0 + 0x58 ], %o1
2009a38: 80 a2 60 00 cmp %o1, 0
2009a3c: 02 80 00 14 be 2009a8c <IMFS_evaluate_for_make+0x1e0>
2009a40: 92 02 60 18 add %o1, 0x18, %o1
newloc = node->info.directory.mt_fs->mt_fs_root;
2009a44: a0 07 bf e4 add %fp, -28, %l0
2009a48: 94 10 20 10 mov 0x10, %o2
2009a4c: 40 00 0f 84 call 200d85c <memcpy>
2009a50: 90 10 00 10 mov %l0, %o0
*pathloc = newloc;
2009a54: 92 10 00 10 mov %l0, %o1
2009a58: 94 10 20 10 mov 0x10, %o2
2009a5c: 40 00 0f 80 call 200d85c <memcpy>
2009a60: 90 10 00 19 mov %i1, %o0
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
2009a64: c2 06 60 08 ld [ %i1 + 8 ], %g1
2009a68: d0 07 bf f4 ld [ %fp + -12 ], %o0
2009a6c: c2 00 60 04 ld [ %g1 + 4 ], %g1
2009a70: 90 24 80 08 sub %l2, %o0, %o0
2009a74: 92 10 00 19 mov %i1, %o1
2009a78: 90 05 00 08 add %l4, %o0, %o0
2009a7c: 9f c0 40 00 call %g1
2009a80: 94 10 00 1a mov %i2, %o2
2009a84: 81 c7 e0 08 ret
2009a88: 91 e8 00 08 restore %g0, %o0, %o0
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
2009a8c: 40 00 00 3a call 2009b74 <IMFS_find_match_in_dir>
2009a90: 92 10 00 15 mov %l5, %o1
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
2009a94: a0 92 20 00 orcc %o0, 0, %l0
2009a98: 02 80 00 0c be 2009ac8 <IMFS_evaluate_for_make+0x21c>
2009a9c: c2 07 bf f4 ld [ %fp + -12 ], %g1
done = true;
else
pathloc->node_access = node;
2009aa0: 10 bf ff 8b b 20098cc <IMFS_evaluate_for_make+0x20>
2009aa4: e0 26 40 00 st %l0, [ %i1 ]
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
2009aa8: 40 00 0d 7b call 200d094 <__errno>
2009aac: b0 10 3f ff mov -1, %i0
2009ab0: 10 80 00 22 b 2009b38 <IMFS_evaluate_for_make+0x28c>
2009ab4: 82 10 20 11 mov 0x11, %g1
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
2009ab8: 40 00 0d 77 call 200d094 <__errno>
2009abc: b0 10 3f ff mov -1, %i0
2009ac0: 10 80 00 1e b 2009b38 <IMFS_evaluate_for_make+0x28c>
2009ac4: 82 10 20 5b mov 0x5b, %g1
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
2009ac8: 84 05 00 12 add %l4, %l2, %g2
2009acc: 82 24 80 01 sub %l2, %g1, %g1
2009ad0: 82 05 00 01 add %l4, %g1, %g1
2009ad4: 10 80 00 0b b 2009b00 <IMFS_evaluate_for_make+0x254>
2009ad8: c2 26 80 00 st %g1, [ %i2 ]
* We have evaluated the path as far as we can.
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++) {
if ( !IMFS_is_separator( path[ i ] ) )
2009adc: 80 a0 60 2f cmp %g1, 0x2f
2009ae0: 02 80 00 08 be 2009b00 <IMFS_evaluate_for_make+0x254>
2009ae4: 80 a0 60 5c cmp %g1, 0x5c
2009ae8: 22 80 00 07 be,a 2009b04 <IMFS_evaluate_for_make+0x258>
2009aec: c2 48 80 00 ldsb [ %g2 ], %g1
rtems_set_errno_and_return_minus_one( ENOENT );
2009af0: 40 00 0d 69 call 200d094 <__errno>
2009af4: b0 10 3f ff mov -1, %i0
2009af8: 10 80 00 10 b 2009b38 <IMFS_evaluate_for_make+0x28c>
2009afc: 82 10 20 02 mov 2, %g1
/*
* We have evaluated the path as far as we can.
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++) {
2009b00: c2 48 80 00 ldsb [ %g2 ], %g1
2009b04: 80 a0 60 00 cmp %g1, 0
2009b08: 12 bf ff f5 bne 2009adc <IMFS_evaluate_for_make+0x230>
2009b0c: 84 00 a0 01 inc %g2
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
2009b10: 7f ff fe 0a call 2009338 <IMFS_Set_handlers>
2009b14: 90 10 00 19 mov %i1, %o0
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
2009b18: c2 06 40 00 ld [ %i1 ], %g1
2009b1c: c2 00 60 48 ld [ %g1 + 0x48 ], %g1
2009b20: 80 a0 60 01 cmp %g1, 1
2009b24: 02 80 00 08 be 2009b44 <IMFS_evaluate_for_make+0x298> <== ALWAYS TAKEN
2009b28: b0 10 00 08 mov %o0, %i0
rtems_set_errno_and_return_minus_one( ENOTDIR );
2009b2c: 40 00 0d 5a call 200d094 <__errno>
2009b30: b0 10 3f ff mov -1, %i0
2009b34: 82 10 20 14 mov 0x14, %g1
2009b38: c2 22 00 00 st %g1, [ %o0 ]
2009b3c: 81 c7 e0 08 ret
2009b40: 81 e8 00 00 restore
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
2009b44: 90 10 00 19 mov %i1, %o0
2009b48: 7f ff fe 15 call 200939c <IMFS_evaluate_permission>
2009b4c: 92 10 20 03 mov 3, %o1
2009b50: 80 a2 20 00 cmp %o0, 0
2009b54: 12 80 00 06 bne 2009b6c <IMFS_evaluate_for_make+0x2c0>
2009b58: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EACCES );
2009b5c: 40 00 0d 4e call 200d094 <__errno>
2009b60: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff>
2009b64: 82 10 20 0d mov 0xd, %g1
2009b68: c2 22 00 00 st %g1, [ %o0 ]
return result;
}
2009b6c: 81 c7 e0 08 ret
2009b70: 81 e8 00 00 restore
02009420 <IMFS_evaluate_hard_link>:
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
2009420: 9d e3 bf 98 save %sp, -104, %sp
IMFS_jnode_t *jnode = node->node_access;
2009424: c4 06 00 00 ld [ %i0 ], %g2
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
2009428: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1
200942c: 80 a0 60 03 cmp %g1, 3
2009430: 22 80 00 04 be,a 2009440 <IMFS_evaluate_hard_link+0x20> <== ALWAYS TAKEN
2009434: c2 00 a0 4c ld [ %g2 + 0x4c ], %g1
rtems_fatal_error_occurred (0xABCD0000);
2009438: 7f ff f1 e3 call 2005bc4 <rtems_fatal_error_occurred> <== NOT EXECUTED
200943c: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED
* Set the hard link value and the handlers.
*/
node->node_access = jnode->info.hard_link.link_node;
IMFS_Set_handlers( node );
2009440: 90 10 00 18 mov %i0, %o0
2009444: 7f ff ff bd call 2009338 <IMFS_Set_handlers>
2009448: c2 26 00 00 st %g1, [ %i0 ]
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
200944c: 90 10 00 18 mov %i0, %o0
2009450: 92 10 00 19 mov %i1, %o1
2009454: 7f ff ff d2 call 200939c <IMFS_evaluate_permission>
2009458: b0 10 20 00 clr %i0
200945c: 80 a2 20 00 cmp %o0, 0
2009460: 12 80 00 06 bne 2009478 <IMFS_evaluate_hard_link+0x58> <== ALWAYS TAKEN
2009464: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EACCES );
2009468: 40 00 0f 0b call 200d094 <__errno> <== NOT EXECUTED
200946c: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff> <== NOT EXECUTED
2009470: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED
2009474: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
return result;
}
2009478: 81 c7 e0 08 ret
200947c: 81 e8 00 00 restore
0200939c <IMFS_evaluate_permission>:
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
200939c: 9d e3 bf 98 save %sp, -104, %sp
uid_t st_uid;
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
20093a0: 80 8e 7f f8 btst -8, %i1
20093a4: 02 80 00 08 be 20093c4 <IMFS_evaluate_permission+0x28> <== ALWAYS TAKEN
20093a8: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EPERM );
20093ac: 40 00 0f 3a call 200d094 <__errno> <== NOT EXECUTED
20093b0: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff> <== NOT EXECUTED
20093b4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
20093b8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20093bc: 81 c7 e0 08 ret <== NOT EXECUTED
20093c0: 81 e8 00 00 restore <== NOT EXECUTED
jnode = node->node_access;
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
20093c4: 40 00 04 0f call 200a400 <geteuid>
20093c8: e2 06 00 00 ld [ %i0 ], %l1
st_gid = getegid();
20093cc: 40 00 04 09 call 200a3f0 <getegid>
20093d0: a0 10 00 08 mov %o0, %l0
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
20093d4: c2 14 60 38 lduh [ %l1 + 0x38 ], %g1
20093d8: a1 2c 20 10 sll %l0, 0x10, %l0
20093dc: a1 34 20 10 srl %l0, 0x10, %l0
20093e0: 80 a4 00 01 cmp %l0, %g1
20093e4: 02 80 00 09 be 2009408 <IMFS_evaluate_permission+0x6c>
20093e8: b1 2e 60 06 sll %i1, 6, %i0
flags_to_test <<= 6;
else if ( st_gid == jnode->st_gid )
20093ec: c4 14 60 3a lduh [ %l1 + 0x3a ], %g2
20093f0: 83 2a 20 10 sll %o0, 0x10, %g1
20093f4: 83 30 60 10 srl %g1, 0x10, %g1
20093f8: 80 a0 40 02 cmp %g1, %g2
20093fc: 02 80 00 03 be 2009408 <IMFS_evaluate_permission+0x6c> <== ALWAYS TAKEN
2009400: b1 2e 60 03 sll %i1, 3, %i0
2009404: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED
flags_to_test <<= 3;
2009408: c2 14 60 2e lduh [ %l1 + 0x2e ], %g1
200940c: 82 2e 00 01 andn %i0, %g1, %g1
2009410: 80 a0 00 01 cmp %g0, %g1
2009414: b0 60 3f ff subx %g0, -1, %i0
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
return 1;
return 0;
}
2009418: 81 c7 e0 08 ret
200941c: 81 e8 00 00 restore
02009480 <IMFS_evaluate_sym_link>:
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
2009480: 9d e3 bf 98 save %sp, -104, %sp
IMFS_jnode_t *jnode = node->node_access;
2009484: e0 06 00 00 ld [ %i0 ], %l0
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
2009488: a2 10 00 18 mov %i0, %l1
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
200948c: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
2009490: 80 a0 60 04 cmp %g1, 4
2009494: 12 80 00 07 bne 20094b0 <IMFS_evaluate_sym_link+0x30> <== NEVER TAKEN
2009498: 11 2a f3 40 sethi %hi(0xabcd0000), %o0
rtems_fatal_error_occurred (0xABCD0000);
if ( !jnode->Parent )
200949c: c2 04 20 08 ld [ %l0 + 8 ], %g1
20094a0: 80 a0 60 00 cmp %g1, 0
20094a4: 32 80 00 05 bne,a 20094b8 <IMFS_evaluate_sym_link+0x38> <== ALWAYS TAKEN
20094a8: c2 26 00 00 st %g1, [ %i0 ]
rtems_fatal_error_occurred( 0xBAD00000 );
20094ac: 11 2e b4 00 sethi %hi(0xbad00000), %o0 <== NOT EXECUTED
20094b0: 7f ff f1 c5 call 2005bc4 <rtems_fatal_error_occurred> <== NOT EXECUTED
20094b4: 01 00 00 00 nop <== NOT EXECUTED
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
rtems_filesystem_get_sym_start_loc(
20094b8: c2 04 20 4c ld [ %l0 + 0x4c ], %g1
20094bc: c2 48 40 00 ldsb [ %g1 ], %g1
20094c0: 80 a0 60 2f cmp %g1, 0x2f
20094c4: 02 80 00 06 be 20094dc <IMFS_evaluate_sym_link+0x5c>
20094c8: 80 a0 60 5c cmp %g1, 0x5c
20094cc: 02 80 00 04 be 20094dc <IMFS_evaluate_sym_link+0x5c> <== NEVER TAKEN
20094d0: 80 a0 60 00 cmp %g1, 0
20094d4: 12 80 00 09 bne 20094f8 <IMFS_evaluate_sym_link+0x78> <== ALWAYS TAKEN
20094d8: 82 10 20 00 clr %g1
20094dc: 03 00 80 5b sethi %hi(0x2016c00), %g1
20094e0: d2 00 62 64 ld [ %g1 + 0x264 ], %o1 ! 2016e64 <rtems_current_user_env>
20094e4: 90 10 00 11 mov %l1, %o0
20094e8: 92 02 60 14 add %o1, 0x14, %o1
20094ec: 40 00 10 dc call 200d85c <memcpy>
20094f0: 94 10 20 10 mov 0x10, %o2
20094f4: 82 10 20 01 mov 1, %g1
/*
* Use eval path to evaluate the path of the symbolic link.
*/
result = IMFS_eval_path(
20094f8: d0 04 20 4c ld [ %l0 + 0x4c ], %o0
20094fc: 94 10 00 11 mov %l1, %o2
2009500: 90 02 00 01 add %o0, %g1, %o0
2009504: 40 00 00 11 call 2009548 <IMFS_eval_path>
2009508: 92 10 00 19 mov %i1, %o1
200950c: b0 10 00 08 mov %o0, %i0
&jnode->info.sym_link.name[i],
flags,
node
);
IMFS_Set_handlers( node );
2009510: 7f ff ff 8a call 2009338 <IMFS_Set_handlers>
2009514: 90 10 00 11 mov %l1, %o0
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
2009518: 90 10 00 11 mov %l1, %o0
200951c: 7f ff ff a0 call 200939c <IMFS_evaluate_permission>
2009520: 92 10 00 19 mov %i1, %o1
2009524: 80 a2 20 00 cmp %o0, 0
2009528: 12 80 00 06 bne 2009540 <IMFS_evaluate_sym_link+0xc0> <== ALWAYS TAKEN
200952c: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EACCES );
2009530: 40 00 0e d9 call 200d094 <__errno> <== NOT EXECUTED
2009534: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff> <== NOT EXECUTED
2009538: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED
200953c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
return result;
}
2009540: 81 c7 e0 08 ret
2009544: 81 e8 00 00 restore
0200c5ac <IMFS_fchmod>:
int IMFS_fchmod(
rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
200c5ac: 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();
200c5b0: 7f ff f7 94 call 200a400 <geteuid>
200c5b4: e0 06 00 00 ld [ %i0 ], %l0
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
200c5b8: c2 14 20 38 lduh [ %l0 + 0x38 ], %g1
200c5bc: 91 2a 20 10 sll %o0, 0x10, %o0
200c5c0: 91 32 20 10 srl %o0, 0x10, %o0
200c5c4: 80 a2 00 01 cmp %o0, %g1
200c5c8: 02 80 00 04 be 200c5d8 <IMFS_fchmod+0x2c> <== ALWAYS TAKEN
200c5cc: 80 a2 20 00 cmp %o0, 0
200c5d0: 12 80 00 08 bne 200c5f0 <IMFS_fchmod+0x44> <== NOT EXECUTED
200c5d4: 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 ) ) )
200c5d8: 83 2e 60 10 sll %i1, 0x10, %g1
200c5dc: 83 30 60 10 srl %g1, 0x10, %g1
200c5e0: 82 08 7e 00 and %g1, -512, %g1
200c5e4: 80 a0 60 00 cmp %g1, 0
200c5e8: 22 80 00 08 be,a 200c608 <IMFS_fchmod+0x5c>
200c5ec: c2 14 20 2e lduh [ %l0 + 0x2e ], %g1
rtems_set_errno_and_return_minus_one( EPERM );
200c5f0: 40 00 02 a9 call 200d094 <__errno>
200c5f4: b0 10 3f ff mov -1, %i0
200c5f8: 82 10 20 01 mov 1, %g1
200c5fc: c2 22 00 00 st %g1, [ %o0 ]
200c600: 81 c7 e0 08 ret
200c604: 81 e8 00 00 restore
jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO);
jnode->st_mode |= mode;
IMFS_update_ctime( jnode );
200c608: 90 07 bf f0 add %fp, -16, %o0
*/
if ( mode & (~ (S_IRWXU | S_IRWXG | S_IRWXO ) ) )
rtems_set_errno_and_return_minus_one( EPERM );
jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO);
jnode->st_mode |= mode;
200c60c: 82 08 7e 00 and %g1, -512, %g1
200c610: 82 16 40 01 or %i1, %g1, %g1
IMFS_update_ctime( jnode );
200c614: 92 10 20 00 clr %o1
200c618: 7f ff f7 7e call 200a410 <gettimeofday>
200c61c: c2 34 20 2e sth %g1, [ %l0 + 0x2e ]
200c620: c2 07 bf f0 ld [ %fp + -16 ], %g1
200c624: c2 24 20 44 st %g1, [ %l0 + 0x44 ]
return 0;
}
200c628: 81 c7 e0 08 ret
200c62c: 91 e8 20 00 restore %g0, 0, %o0
02009b74 <IMFS_find_match_in_dir>:
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
2009b74: 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 );
2009b78: 80 a6 20 00 cmp %i0, 0
2009b7c: 12 80 00 0a bne 2009ba4 <IMFS_find_match_in_dir+0x30> <== ALWAYS TAKEN
2009b80: 80 a6 60 00 cmp %i1, 0
2009b84: 11 00 80 57 sethi %hi(0x2015c00), %o0 <== NOT EXECUTED
2009b88: 15 00 80 57 sethi %hi(0x2015c00), %o2 <== NOT EXECUTED
2009b8c: 17 00 80 57 sethi %hi(0x2015c00), %o3 <== NOT EXECUTED
2009b90: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED
2009b94: 94 12 a1 90 or %o2, 0x190, %o2 <== NOT EXECUTED
2009b98: 96 12 e1 70 or %o3, 0x170, %o3 <== NOT EXECUTED
2009b9c: 7f ff e0 cb call 2001ec8 <__assert_func> <== NOT EXECUTED
2009ba0: 92 10 20 2a mov 0x2a, %o1 <== NOT EXECUTED
if ( !name )
2009ba4: 02 80 00 1c be 2009c14 <IMFS_find_match_in_dir+0xa0> <== NEVER TAKEN
2009ba8: 90 10 00 19 mov %i1, %o0
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
2009bac: 13 00 80 57 sethi %hi(0x2015c00), %o1
2009bb0: 40 00 12 09 call 200e3d4 <strcmp>
2009bb4: 92 12 61 80 or %o1, 0x180, %o1 ! 2015d80 <dotname>
2009bb8: 80 a2 20 00 cmp %o0, 0
2009bbc: 02 80 00 09 be 2009be0 <IMFS_find_match_in_dir+0x6c> <== NEVER TAKEN
2009bc0: 90 10 00 19 mov %i1, %o0
return directory;
if ( !strcmp( name, dotdotname ) )
2009bc4: 13 00 80 57 sethi %hi(0x2015c00), %o1
2009bc8: 40 00 12 03 call 200e3d4 <strcmp>
2009bcc: 92 12 61 88 or %o1, 0x188, %o1 ! 2015d88 <dotdotname>
2009bd0: 80 a2 20 00 cmp %o0, 0
2009bd4: 12 80 00 05 bne 2009be8 <IMFS_find_match_in_dir+0x74> <== ALWAYS TAKEN
2009bd8: a0 06 20 50 add %i0, 0x50, %l0
return directory->Parent;
2009bdc: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED
2009be0: 81 c7 e0 08 ret <== NOT EXECUTED
2009be4: 81 e8 00 00 restore <== NOT EXECUTED
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
2009be8: 10 80 00 08 b 2009c08 <IMFS_find_match_in_dir+0x94>
2009bec: f0 06 20 4c ld [ %i0 + 0x4c ], %i0
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
if ( !strcmp( name, the_jnode->name ) )
2009bf0: 40 00 11 f9 call 200e3d4 <strcmp>
2009bf4: 92 06 20 0c add %i0, 0xc, %o1
2009bf8: 80 a2 20 00 cmp %o0, 0
2009bfc: 02 80 00 07 be 2009c18 <IMFS_find_match_in_dir+0xa4>
2009c00: 01 00 00 00 nop
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
2009c04: f0 06 00 00 ld [ %i0 ], %i0
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
!rtems_chain_is_tail( the_chain, the_node );
2009c08: 80 a6 00 10 cmp %i0, %l0
2009c0c: 12 bf ff f9 bne 2009bf0 <IMFS_find_match_in_dir+0x7c>
2009c10: 90 10 00 19 mov %i1, %o0
2009c14: b0 10 20 00 clr %i0
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
2009c18: 81 c7 e0 08 ret
2009c1c: 81 e8 00 00 restore
0200bb40 <IMFS_fsunmount>:
((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next))
int IMFS_fsunmount(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
200bb40: 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;
200bb44: 94 10 20 10 mov 0x10, %o2
200bb48: 90 07 bf e8 add %fp, -24, %o0
/*
* Traverse tree that starts at the mt_fs_root and deallocate memory
* associated memory space
*/
jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access;
200bb4c: e0 06 20 18 ld [ %i0 + 0x18 ], %l0
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
200bb50: a2 10 00 08 mov %o0, %l1
* Traverse tree that starts at the mt_fs_root and deallocate memory
* associated memory space
*/
jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access;
loc = temp_mt_entry->mt_fs_root;
200bb54: 40 00 13 62 call 20108dc <memcpy>
200bb58: 92 06 20 18 add %i0, 0x18, %o1
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
200bb5c: c0 26 20 18 clr [ %i0 + 0x18 ]
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
200bb60: e0 27 bf e8 st %l0, [ %fp + -24 ]
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
200bb64: f0 04 20 08 ld [ %l0 + 8 ], %i0
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
200bb68: 7f ff fd e5 call 200b2fc <IMFS_Set_handlers>
200bb6c: 90 10 00 11 mov %l1, %o0
if ( jnode->type != IMFS_DIRECTORY ) {
200bb70: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
200bb74: 80 a0 60 01 cmp %g1, 1
200bb78: 12 80 00 06 bne 200bb90 <IMFS_fsunmount+0x50>
200bb7c: 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 ) ) {
200bb80: c2 04 20 4c ld [ %l0 + 0x4c ], %g1
200bb84: 80 a0 40 02 cmp %g1, %g2
200bb88: 12 80 00 08 bne 200bba8 <IMFS_fsunmount+0x68>
200bb8c: 80 a4 20 00 cmp %l0, 0
result = IMFS_unlink( &loc );
200bb90: 7f ff db 8d call 20029c4 <IMFS_unlink>
200bb94: 90 10 00 11 mov %l1, %o0
if (result != 0)
200bb98: 80 a2 20 00 cmp %o0, 0
200bb9c: 12 80 00 13 bne 200bbe8 <IMFS_fsunmount+0xa8> <== NEVER TAKEN
200bba0: a0 10 00 18 mov %i0, %l0
return -1;
jnode = next;
}
if ( jnode != NULL ) {
200bba4: 80 a4 20 00 cmp %l0, 0
200bba8: 22 80 00 11 be,a 200bbec <IMFS_fsunmount+0xac>
200bbac: b0 10 20 00 clr %i0
if ( jnode->type == IMFS_DIRECTORY ) {
200bbb0: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
200bbb4: 80 a0 60 01 cmp %g1, 1
200bbb8: 32 bf ff eb bne,a 200bb64 <IMFS_fsunmount+0x24> <== NEVER TAKEN
200bbbc: e0 27 bf e8 st %l0, [ %fp + -24 ] <== NOT EXECUTED
if ( jnode_has_children( jnode ) )
200bbc0: c4 04 20 4c ld [ %l0 + 0x4c ], %g2
200bbc4: 82 04 20 50 add %l0, 0x50, %g1
200bbc8: 80 a0 80 01 cmp %g2, %g1
200bbcc: 22 bf ff e6 be,a 200bb64 <IMFS_fsunmount+0x24>
200bbd0: e0 27 bf e8 st %l0, [ %fp + -24 ]
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
200bbd4: a0 90 a0 00 orcc %g2, 0, %l0
200bbd8: 32 bf ff e3 bne,a 200bb64 <IMFS_fsunmount+0x24> <== ALWAYS TAKEN
200bbdc: e0 27 bf e8 st %l0, [ %fp + -24 ]
200bbe0: 81 c7 e0 08 ret <== NOT EXECUTED
200bbe4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
200bbe8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
return 0;
}
200bbec: 81 c7 e0 08 ret
200bbf0: 81 e8 00 00 restore
02009c20 <IMFS_get_token>:
IMFS_token_types IMFS_get_token(
const char *path,
char *token,
int *token_len
)
{
2009c20: 9d e3 bf 98 save %sp, -104, %sp
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
2009c24: 84 10 20 00 clr %g2
2009c28: 10 80 00 07 b 2009c44 <IMFS_get_token+0x24>
2009c2c: c6 0e 00 00 ldub [ %i0 ], %g3
while ( (!IMFS_is_separator(c)) && (i <= IMFS_NAME_MAX) ) {
token[i] = c;
if ( i == IMFS_NAME_MAX )
2009c30: 12 80 00 04 bne 2009c40 <IMFS_get_token+0x20>
2009c34: 84 00 a0 01 inc %g2
2009c38: 81 c7 e0 08 ret
2009c3c: 91 e8 20 04 restore %g0, 4, %o0
return IMFS_INVALID_TOKEN;
if ( !IMFS_is_valid_name_char(c) )
type = IMFS_INVALID_TOKEN;
c = path [++i];
2009c40: c6 0e 00 02 ldub [ %i0 + %g2 ], %g3
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i <= IMFS_NAME_MAX) ) {
2009c44: 83 28 e0 18 sll %g3, 0x18, %g1
2009c48: 83 38 60 18 sra %g1, 0x18, %g1
2009c4c: 80 a0 60 2f cmp %g1, 0x2f
2009c50: 02 80 00 09 be 2009c74 <IMFS_get_token+0x54>
2009c54: 80 a0 60 5c cmp %g1, 0x5c
2009c58: 02 80 00 07 be 2009c74 <IMFS_get_token+0x54>
2009c5c: 80 a0 60 00 cmp %g1, 0
2009c60: 02 80 00 06 be 2009c78 <IMFS_get_token+0x58>
2009c64: 80 a0 a0 00 cmp %g2, 0
2009c68: 80 a0 a0 20 cmp %g2, 0x20
2009c6c: 24 bf ff f1 ble,a 2009c30 <IMFS_get_token+0x10> <== ALWAYS TAKEN
2009c70: c6 2e 40 02 stb %g3, [ %i1 + %g2 ]
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
2009c74: 80 a0 a0 00 cmp %g2, 0
2009c78: 12 80 00 0a bne 2009ca0 <IMFS_get_token+0x80>
2009c7c: 82 06 40 02 add %i1, %g2, %g1
token[i] = c;
2009c80: c6 2e 40 00 stb %g3, [ %i1 ]
if ( token[i] != '\0' ) {
2009c84: 83 28 e0 18 sll %g3, 0x18, %g1
2009c88: 80 a0 60 00 cmp %g1, 0
2009c8c: 02 80 00 0b be 2009cb8 <IMFS_get_token+0x98>
2009c90: b0 10 20 00 clr %i0
2009c94: 84 10 20 01 mov 1, %g2
2009c98: 10 80 00 08 b 2009cb8 <IMFS_get_token+0x98>
2009c9c: b0 10 20 01 mov 1, %i0
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
2009ca0: c2 48 7f ff ldsb [ %g1 + -1 ], %g1
2009ca4: 80 a0 60 00 cmp %g1, 0
2009ca8: 02 80 00 04 be 2009cb8 <IMFS_get_token+0x98> <== NEVER TAKEN
2009cac: b0 10 20 03 mov 3, %i0
token[i] = '\0';
2009cb0: c0 2e 40 02 clrb [ %i1 + %g2 ]
2009cb4: b0 10 20 03 mov 3, %i0
/*
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == IMFS_NAME ) {
2009cb8: 80 a6 20 03 cmp %i0, 3
2009cbc: 12 80 00 11 bne 2009d00 <IMFS_get_token+0xe0>
2009cc0: c4 26 80 00 st %g2, [ %i2 ]
if ( strcmp( token, "..") == 0 )
2009cc4: 90 10 00 19 mov %i1, %o0
2009cc8: 13 00 80 56 sethi %hi(0x2015800), %o1
2009ccc: 40 00 11 c2 call 200e3d4 <strcmp>
2009cd0: 92 12 62 30 or %o1, 0x230, %o1 ! 2015a30 <pollCallbacks.4788+0x350>
2009cd4: 80 a2 20 00 cmp %o0, 0
2009cd8: 12 80 00 04 bne 2009ce8 <IMFS_get_token+0xc8>
2009cdc: 90 10 00 19 mov %i1, %o0
2009ce0: 81 c7 e0 08 ret
2009ce4: 91 e8 20 02 restore %g0, 2, %o0
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
2009ce8: 13 00 80 57 sethi %hi(0x2015c00), %o1
2009cec: 40 00 11 ba call 200e3d4 <strcmp>
2009cf0: 92 12 61 a8 or %o1, 0x1a8, %o1 ! 2015da8 <__func__.5202+0x18>
2009cf4: 80 a2 20 00 cmp %o0, 0
2009cf8: 22 80 00 02 be,a 2009d00 <IMFS_get_token+0xe0>
2009cfc: b0 10 20 01 mov 1, %i0
type = IMFS_CURRENT_DIR;
}
return type;
}
2009d00: 81 c7 e0 08 ret
2009d04: 81 e8 00 00 restore
02009d08 <IMFS_initialize_support>:
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers
)
{
2009d08: 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,
2009d0c: 03 00 80 5a sethi %hi(0x2016800), %g1
2009d10: 84 10 20 10 mov 0x10, %g2
2009d14: c6 00 61 4c ld [ %g1 + 0x14c ], %g3
2009d18: 82 10 20 00 clr %g1
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16;
!is_valid && (bit_mask <= 512);
2009d1c: 80 a0 80 03 cmp %g2, %g3
2009d20: 02 80 00 06 be 2009d38 <IMFS_initialize_support+0x30>
2009d24: 82 00 60 01 inc %g1
2009d28: 80 a0 60 06 cmp %g1, 6
2009d2c: 12 bf ff fc bne 2009d1c <IMFS_initialize_support+0x14> <== ALWAYS TAKEN
2009d30: 85 28 a0 01 sll %g2, 1, %g2
2009d34: 84 10 20 80 mov 0x80, %g2 <== NOT EXECUTED
bit_mask <<= 1) {
if (bit_mask == requested_bytes_per_block) {
is_valid = true;
}
}
*dest_bytes_per_block = ((is_valid)
2009d38: 03 00 80 5d sethi %hi(0x2017400), %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(
2009d3c: 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)
2009d40: c4 20 60 f4 st %g2, [ %g1 + 0xf4 ]
* 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(
2009d44: 92 10 20 01 mov 1, %o1
2009d48: 90 10 20 00 clr %o0
2009d4c: 15 00 80 56 sethi %hi(0x2015800), %o2
2009d50: 17 00 00 10 sethi %hi(0x4000), %o3
2009d54: 94 12 a1 a0 or %o2, 0x1a0, %o2
2009d58: 40 00 09 c0 call 200c458 <IMFS_create_node>
2009d5c: 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;
2009d60: 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(
2009d64: 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;
2009d68: f2 26 20 20 st %i1, [ %i0 + 0x20 ]
"",
( S_IFDIR | 0755 ),
NULL
);
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
2009d6c: 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;
2009d70: 13 00 80 58 sethi %hi(0x2016000), %o1
2009d74: 90 06 20 30 add %i0, 0x30, %o0
2009d78: 40 00 0e b9 call 200d85c <memcpy>
2009d7c: 92 12 61 d0 or %o1, 0x1d0, %o1
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
2009d80: 90 10 20 01 mov 1, %o0
2009d84: 40 00 00 ea call 200a12c <calloc>
2009d88: 92 10 20 0c mov 0xc, %o1
if ( !fs_info ){
2009d8c: 80 a2 20 00 cmp %o0, 0
2009d90: 12 80 00 0a bne 2009db8 <IMFS_initialize_support+0xb0> <== ALWAYS TAKEN
2009d94: c4 06 20 18 ld [ %i0 + 0x18 ], %g2
free(temp_mt_entry->mt_fs_root.node_access);
2009d98: 40 00 01 2f call 200a254 <free> <== NOT EXECUTED
2009d9c: 90 10 00 02 mov %g2, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
2009da0: 40 00 0c bd call 200d094 <__errno> <== NOT EXECUTED
2009da4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2009da8: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
2009dac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2009db0: 81 c7 e0 08 ret <== NOT EXECUTED
2009db4: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Set st_ino for the root to 1.
*/
fs_info->ino_count = 1;
2009db8: 82 10 20 01 mov 1, %g1
2009dbc: 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;
2009dc0: 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;
2009dc4: f6 22 20 08 st %i3, [ %o0 + 8 ]
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
2009dc8: 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;
2009dcc: 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;
}
2009dd0: 81 c7 e0 08 ret
2009dd4: 91 e8 20 00 restore %g0, 0, %o0
02002728 <IMFS_link>:
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
2002728: 9d e3 bf 58 save %sp, -168, %sp
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
200272c: c2 06 00 00 ld [ %i0 ], %g1
2002730: c2 27 bf dc st %g1, [ %fp + -36 ]
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
2002734: c2 10 60 30 lduh [ %g1 + 0x30 ], %g1
2002738: 80 a0 60 07 cmp %g1, 7
200273c: 08 80 00 06 bleu 2002754 <IMFS_link+0x2c>
2002740: 90 10 00 1a mov %i2, %o0
rtems_set_errno_and_return_minus_one( EMLINK );
2002744: 40 00 34 3e call 200f83c <__errno>
2002748: 01 00 00 00 nop
200274c: 10 80 00 13 b 2002798 <IMFS_link+0x70>
2002750: 82 10 20 1f mov 0x1f, %g1 ! 1f <PROM_START+0x1f>
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( token, new_name, &i );
2002754: a0 07 bf b8 add %fp, -72, %l0
2002758: 94 07 bf f4 add %fp, -12, %o2
200275c: 40 00 25 51 call 200bca0 <IMFS_get_token>
2002760: 92 10 00 10 mov %l0, %o1
/*
* Create a new link node.
*/
new_node = IMFS_create_node(
2002764: 90 10 00 19 mov %i1, %o0
2002768: 94 10 00 10 mov %l0, %o2
200276c: 92 10 20 03 mov 3, %o1
2002770: 17 00 00 28 sethi %hi(0xa000), %o3
2002774: 98 07 bf dc add %fp, -36, %o4
2002778: 40 00 22 86 call 200b190 <IMFS_create_node>
200277c: 96 12 e1 ff or %o3, 0x1ff, %o3
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
2002780: 80 a2 20 00 cmp %o0, 0
2002784: 12 80 00 08 bne 20027a4 <IMFS_link+0x7c> <== ALWAYS TAKEN
2002788: c4 07 bf dc ld [ %fp + -36 ], %g2
rtems_set_errno_and_return_minus_one( ENOMEM );
200278c: 40 00 34 2c call 200f83c <__errno> <== NOT EXECUTED
2002790: 01 00 00 00 nop <== NOT EXECUTED
2002794: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc> <== NOT EXECUTED
2002798: c2 22 00 00 st %g1, [ %o0 ]
200279c: 81 c7 e0 08 ret
20027a0: 91 e8 3f ff restore %g0, -1, %o0
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
IMFS_update_ctime( info.hard_link.link_node );
20027a4: 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++;
20027a8: c2 10 a0 30 lduh [ %g2 + 0x30 ], %g1
IMFS_update_ctime( info.hard_link.link_node );
20027ac: 92 10 20 00 clr %o1
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
20027b0: 82 00 60 01 inc %g1
IMFS_update_ctime( info.hard_link.link_node );
20027b4: 40 00 03 b9 call 2003698 <gettimeofday>
20027b8: c2 30 a0 30 sth %g1, [ %g2 + 0x30 ]
20027bc: c4 07 bf ec ld [ %fp + -20 ], %g2
20027c0: c2 07 bf dc ld [ %fp + -36 ], %g1
20027c4: c4 20 60 44 st %g2, [ %g1 + 0x44 ]
return 0;
}
20027c8: 81 c7 e0 08 ret
20027cc: 91 e8 20 00 restore %g0, 0, %o0
0200e0d4 <IMFS_memfile_addblock>:
MEMFILE_STATIC int IMFS_memfile_addblock(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
200e0d4: 9d e3 bf 98 save %sp, -104, %sp
200e0d8: 90 10 00 18 mov %i0, %o0
block_p memory;
block_p *block_entry_ptr;
assert( the_jnode );
200e0dc: 80 a6 20 00 cmp %i0, 0
200e0e0: 12 80 00 0a bne 200e108 <IMFS_memfile_addblock+0x34> <== ALWAYS TAKEN
200e0e4: 92 10 00 19 mov %i1, %o1
200e0e8: 11 00 80 57 sethi %hi(0x2015c00), %o0 <== NOT EXECUTED
200e0ec: 15 00 80 58 sethi %hi(0x2016000), %o2 <== NOT EXECUTED
200e0f0: 17 00 80 57 sethi %hi(0x2015c00), %o3 <== NOT EXECUTED
200e0f4: 90 12 23 48 or %o0, 0x348, %o0 <== NOT EXECUTED
200e0f8: 94 12 a1 08 or %o2, 0x108, %o2 <== NOT EXECUTED
200e0fc: 96 12 e3 98 or %o3, 0x398, %o3 <== NOT EXECUTED
200e100: 10 80 00 0c b 200e130 <IMFS_memfile_addblock+0x5c> <== NOT EXECUTED
200e104: 92 10 21 69 mov 0x169, %o1 <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
200e108: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
200e10c: 80 a0 60 05 cmp %g1, 5
200e110: 02 80 00 0a be 200e138 <IMFS_memfile_addblock+0x64> <== ALWAYS TAKEN
200e114: 15 00 80 58 sethi %hi(0x2016000), %o2
200e118: 11 00 80 57 sethi %hi(0x2015c00), %o0 <== NOT EXECUTED
200e11c: 17 00 80 57 sethi %hi(0x2015c00), %o3 <== NOT EXECUTED
200e120: 90 12 23 48 or %o0, 0x348, %o0 <== NOT EXECUTED
200e124: 94 12 a1 08 or %o2, 0x108, %o2 <== NOT EXECUTED
200e128: 96 12 e3 a8 or %o3, 0x3a8, %o3 <== NOT EXECUTED
200e12c: 92 10 21 6d mov 0x16d, %o1 <== NOT EXECUTED
200e130: 7f ff d2 c1 call 2002c34 <__assert_func> <== NOT EXECUTED
200e134: 01 00 00 00 nop <== NOT EXECUTED
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
200e138: 7f ff fe 7a call 200db20 <IMFS_memfile_get_block_pointer>
200e13c: 94 10 20 01 mov 1, %o2 ! 1 <PROM_START+0x1>
if ( *block_entry_ptr )
200e140: 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 );
200e144: b2 10 00 08 mov %o0, %i1
if ( *block_entry_ptr )
200e148: 80 a0 60 00 cmp %g1, 0
200e14c: 12 80 00 09 bne 200e170 <IMFS_memfile_addblock+0x9c>
200e150: b0 10 20 00 clr %i0
#if 0
fprintf(stdout, "%d %p", block, block_entry_ptr );
fflush(stdout);
#endif
memory = memfile_alloc_block();
200e154: 7f ff fe 66 call 200daec <memfile_alloc_block>
200e158: b0 10 20 01 mov 1, %i0
if ( !memory )
200e15c: 80 a2 20 00 cmp %o0, 0
200e160: 02 80 00 04 be 200e170 <IMFS_memfile_addblock+0x9c> <== NEVER TAKEN
200e164: 01 00 00 00 nop
return 1;
*block_entry_ptr = memory;
200e168: d0 26 40 00 st %o0, [ %i1 ]
200e16c: b0 10 20 00 clr %i0
return 0;
}
200e170: 81 c7 e0 08 ret
200e174: 81 e8 00 00 restore
0200e178 <IMFS_memfile_extend>:
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
200e178: 9d e3 bf 98 save %sp, -104, %sp
/*
* Perform internal consistency checks
*/
assert( the_jnode );
200e17c: a4 96 20 00 orcc %i0, 0, %l2
200e180: 32 80 00 0a bne,a 200e1a8 <IMFS_memfile_extend+0x30> <== ALWAYS TAKEN
200e184: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1
200e188: 11 00 80 57 sethi %hi(0x2015c00), %o0 <== NOT EXECUTED
200e18c: 15 00 80 58 sethi %hi(0x2016000), %o2 <== NOT EXECUTED
200e190: 17 00 80 57 sethi %hi(0x2015c00), %o3 <== NOT EXECUTED
200e194: 90 12 23 48 or %o0, 0x348, %o0 <== NOT EXECUTED
200e198: 94 12 a1 20 or %o2, 0x120, %o2 <== NOT EXECUTED
200e19c: 96 12 e3 98 or %o3, 0x398, %o3 <== NOT EXECUTED
200e1a0: 10 80 00 0c b 200e1d0 <IMFS_memfile_extend+0x58> <== NOT EXECUTED
200e1a4: 92 10 21 31 mov 0x131, %o1 <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
200e1a8: 80 a0 60 05 cmp %g1, 5
200e1ac: 02 80 00 0b be 200e1d8 <IMFS_memfile_extend+0x60> <== ALWAYS TAKEN
200e1b0: 03 00 80 5c sethi %hi(0x2017000), %g1
200e1b4: 11 00 80 57 sethi %hi(0x2015c00), %o0 <== NOT EXECUTED
200e1b8: 15 00 80 58 sethi %hi(0x2016000), %o2 <== NOT EXECUTED
200e1bc: 17 00 80 57 sethi %hi(0x2015c00), %o3 <== NOT EXECUTED
200e1c0: 90 12 23 48 or %o0, 0x348, %o0 <== NOT EXECUTED
200e1c4: 94 12 a1 20 or %o2, 0x120, %o2 <== NOT EXECUTED
200e1c8: 96 12 e3 a8 or %o3, 0x3a8, %o3 <== NOT EXECUTED
200e1cc: 92 10 21 35 mov 0x135, %o1 <== NOT EXECUTED
200e1d0: 7f ff d2 99 call 2002c34 <__assert_func> <== NOT EXECUTED
200e1d4: 01 00 00 00 nop <== NOT EXECUTED
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
200e1d8: e2 00 61 9c ld [ %g1 + 0x19c ], %l1
200e1dc: a1 34 60 02 srl %l1, 2, %l0
200e1e0: 92 10 00 10 mov %l0, %o1
200e1e4: 40 00 15 af call 20138a0 <.umul>
200e1e8: 90 04 20 01 add %l0, 1, %o0
200e1ec: 92 10 00 10 mov %l0, %o1
200e1f0: 40 00 15 ac call 20138a0 <.umul>
200e1f4: 90 02 20 01 inc %o0
200e1f8: 92 10 00 11 mov %l1, %o1
200e1fc: 40 00 15 a9 call 20138a0 <.umul>
200e200: 90 02 3f ff add %o0, -1, %o0
200e204: 80 a6 40 08 cmp %i1, %o0
200e208: 2a 80 00 06 bcs,a 200e220 <IMFS_memfile_extend+0xa8> <== ALWAYS TAKEN
200e20c: e0 04 a0 4c ld [ %l2 + 0x4c ], %l0
rtems_set_errno_and_return_minus_one( EINVAL );
200e210: 40 00 05 8b call 200f83c <__errno> <== NOT EXECUTED
200e214: 01 00 00 00 nop <== NOT EXECUTED
200e218: 10 80 00 1f b 200e294 <IMFS_memfile_extend+0x11c> <== NOT EXECUTED
200e21c: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16> <== NOT EXECUTED
if ( new_length <= the_jnode->info.file.size )
200e220: 80 a6 40 10 cmp %i1, %l0
200e224: 04 80 00 24 ble 200e2b4 <IMFS_memfile_extend+0x13c>
200e228: b0 10 20 00 clr %i0
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
200e22c: 92 10 00 11 mov %l1, %o1
200e230: 40 00 15 d8 call 2013990 <.div>
200e234: 90 10 00 19 mov %i1, %o0
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
200e238: 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;
200e23c: b0 10 00 08 mov %o0, %i0
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
200e240: 40 00 15 d4 call 2013990 <.div>
200e244: 90 10 00 10 mov %l0, %o0
200e248: a2 10 00 08 mov %o0, %l1
200e24c: 10 80 00 15 b 200e2a0 <IMFS_memfile_extend+0x128>
200e250: a0 10 00 08 mov %o0, %l0
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
200e254: 7f ff ff a0 call 200e0d4 <IMFS_memfile_addblock>
200e258: 92 10 00 10 mov %l0, %o1
200e25c: 80 a2 20 00 cmp %o0, 0
200e260: 22 80 00 10 be,a 200e2a0 <IMFS_memfile_extend+0x128> <== ALWAYS TAKEN
200e264: a0 04 20 01 inc %l0
for ( ; block>=old_blocks ; block-- ) {
200e268: 10 80 00 06 b 200e280 <IMFS_memfile_extend+0x108> <== NOT EXECUTED
200e26c: 80 a4 00 11 cmp %l0, %l1 <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
200e270: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
200e274: 7f ff fe d5 call 200ddc8 <IMFS_memfile_remove_block> <== NOT EXECUTED
200e278: 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-- ) {
200e27c: 80 a4 00 11 cmp %l0, %l1 <== NOT EXECUTED
200e280: 1a bf ff fc bcc 200e270 <IMFS_memfile_extend+0xf8> <== NOT EXECUTED
200e284: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
200e288: 40 00 05 6d call 200f83c <__errno> <== NOT EXECUTED
200e28c: 01 00 00 00 nop <== NOT EXECUTED
200e290: 82 10 20 1c mov 0x1c, %g1 ! 1c <PROM_START+0x1c> <== NOT EXECUTED
200e294: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200e298: 81 c7 e0 08 ret <== NOT EXECUTED
200e29c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
200e2a0: 80 a4 00 18 cmp %l0, %i0
200e2a4: 08 bf ff ec bleu 200e254 <IMFS_memfile_extend+0xdc>
200e2a8: 90 10 00 12 mov %l2, %o0
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
200e2ac: f2 24 a0 4c st %i1, [ %l2 + 0x4c ]
200e2b0: b0 10 20 00 clr %i0
return 0;
}
200e2b4: 81 c7 e0 08 ret
200e2b8: 81 e8 00 00 restore
0200db20 <IMFS_memfile_get_block_pointer>:
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
200db20: 9d e3 bf 98 save %sp, -104, %sp
/*
* Perform internal consistency checks
*/
assert( the_jnode );
200db24: 80 a6 20 00 cmp %i0, 0
200db28: 32 80 00 0a bne,a 200db50 <IMFS_memfile_get_block_pointer+0x30><== ALWAYS TAKEN
200db2c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
200db30: 11 00 80 57 sethi %hi(0x2015c00), %o0 <== NOT EXECUTED
200db34: 15 00 80 58 sethi %hi(0x2016000), %o2 <== NOT EXECUTED
200db38: 17 00 80 57 sethi %hi(0x2015c00), %o3 <== NOT EXECUTED
200db3c: 90 12 23 48 or %o0, 0x348, %o0 <== NOT EXECUTED
200db40: 94 12 a0 80 or %o2, 0x80, %o2 <== NOT EXECUTED
200db44: 96 12 e3 98 or %o3, 0x398, %o3 <== NOT EXECUTED
200db48: 10 80 00 0c b 200db78 <IMFS_memfile_get_block_pointer+0x58><== NOT EXECUTED
200db4c: 92 10 23 86 mov 0x386, %o1 <== NOT EXECUTED
if ( !the_jnode )
return NULL;
assert( the_jnode->type == IMFS_MEMORY_FILE );
200db50: 80 a0 60 05 cmp %g1, 5
200db54: 02 80 00 0b be 200db80 <IMFS_memfile_get_block_pointer+0x60><== ALWAYS TAKEN
200db58: 03 00 80 5c sethi %hi(0x2017000), %g1
200db5c: 11 00 80 57 sethi %hi(0x2015c00), %o0 <== NOT EXECUTED
200db60: 15 00 80 58 sethi %hi(0x2016000), %o2 <== NOT EXECUTED
200db64: 17 00 80 57 sethi %hi(0x2015c00), %o3 <== NOT EXECUTED
200db68: 90 12 23 48 or %o0, 0x348, %o0 <== NOT EXECUTED
200db6c: 94 12 a0 80 or %o2, 0x80, %o2 <== NOT EXECUTED
200db70: 96 12 e3 a8 or %o3, 0x3a8, %o3 <== NOT EXECUTED
200db74: 92 10 23 8a mov 0x38a, %o1 <== NOT EXECUTED
200db78: 7f ff d4 2f call 2002c34 <__assert_func> <== NOT EXECUTED
200db7c: 01 00 00 00 nop <== NOT EXECUTED
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
200db80: c2 00 61 9c ld [ %g1 + 0x19c ], %g1
200db84: a3 30 60 02 srl %g1, 2, %l1
200db88: 82 04 7f ff add %l1, -1, %g1
200db8c: 80 a6 40 01 cmp %i1, %g1
200db90: 18 80 00 13 bgu 200dbdc <IMFS_memfile_get_block_pointer+0xbc><== NEVER TAKEN
200db94: 90 04 60 01 add %l1, 1, %o0
fprintf(stdout, "(s %d) ", block );
fflush(stdout);
#endif
p = info->indirect;
if ( malloc_it ) {
200db98: 80 a6 a0 00 cmp %i2, 0
200db9c: 02 80 00 0d be 200dbd0 <IMFS_memfile_get_block_pointer+0xb0>
200dba0: c4 06 20 50 ld [ %i0 + 0x50 ], %g2
if ( !p ) {
200dba4: 80 a0 a0 00 cmp %g2, 0
200dba8: 12 80 00 34 bne 200dc78 <IMFS_memfile_get_block_pointer+0x158>
200dbac: 83 2e 60 02 sll %i1, 2, %g1
p = memfile_alloc_block();
200dbb0: 7f ff ff cf call 200daec <memfile_alloc_block>
200dbb4: 01 00 00 00 nop
if ( !p )
200dbb8: 80 a2 20 00 cmp %o0, 0
200dbbc: 22 80 00 81 be,a 200ddc0 <IMFS_memfile_get_block_pointer+0x2a0><== NEVER TAKEN
200dbc0: b0 10 20 00 clr %i0 <== NOT EXECUTED
return 0;
info->indirect = p;
200dbc4: d0 26 20 50 st %o0, [ %i0 + 0x50 ]
}
return &info->indirect[ my_block ];
200dbc8: 10 80 00 2b b 200dc74 <IMFS_memfile_get_block_pointer+0x154>
200dbcc: c4 06 20 50 ld [ %i0 + 0x50 ], %g2
}
if ( !p )
200dbd0: 80 a0 a0 00 cmp %g2, 0
return 0;
return &info->indirect[ my_block ];
200dbd4: 10 80 00 78 b 200ddb4 <IMFS_memfile_get_block_pointer+0x294>
200dbd8: 83 2e 60 02 sll %i1, 2, %g1
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
200dbdc: 40 00 17 31 call 20138a0 <.umul> <== NOT EXECUTED
200dbe0: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
200dbe4: 82 02 3f ff add %o0, -1, %g1 <== NOT EXECUTED
200dbe8: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED
200dbec: 18 80 00 2c bgu 200dc9c <IMFS_memfile_get_block_pointer+0x17c><== NOT EXECUTED
200dbf0: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
#if 0
fprintf(stdout, "(d %d) ", block );
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
200dbf4: a0 26 40 11 sub %i1, %l1, %l0 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
200dbf8: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
200dbfc: 40 00 18 0f call 2013c38 <.urem> <== NOT EXECUTED
200dc00: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
200dc04: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
200dc08: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
200dc0c: 40 00 17 5f call 2013988 <.udiv> <== NOT EXECUTED
200dc10: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
p = info->doubly_indirect;
if ( malloc_it ) {
200dc14: 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;
200dc18: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
p = info->doubly_indirect;
if ( malloc_it ) {
200dc1c: 02 80 00 19 be 200dc80 <IMFS_memfile_get_block_pointer+0x160><== NOT EXECUTED
200dc20: d0 06 20 54 ld [ %i0 + 0x54 ], %o0 <== NOT EXECUTED
if ( !p ) {
200dc24: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200dc28: 12 80 00 09 bne 200dc4c <IMFS_memfile_get_block_pointer+0x12c><== NOT EXECUTED
200dc2c: 83 2c 20 02 sll %l0, 2, %g1 <== NOT EXECUTED
p = memfile_alloc_block();
200dc30: 7f ff ff af call 200daec <memfile_alloc_block> <== NOT EXECUTED
200dc34: 01 00 00 00 nop <== NOT EXECUTED
if ( !p )
200dc38: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200dc3c: 22 80 00 61 be,a 200ddc0 <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
200dc40: b0 10 20 00 clr %i0 <== NOT EXECUTED
return 0;
info->doubly_indirect = p;
200dc44: d0 26 20 54 st %o0, [ %i0 + 0x54 ] <== NOT EXECUTED
}
p1 = (block_p *)p[ doubly ];
200dc48: 83 2c 20 02 sll %l0, 2, %g1 <== NOT EXECUTED
200dc4c: c4 02 00 01 ld [ %o0 + %g1 ], %g2 <== NOT EXECUTED
if ( !p1 ) {
200dc50: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
200dc54: 12 80 00 08 bne 200dc74 <IMFS_memfile_get_block_pointer+0x154><== NOT EXECUTED
200dc58: a0 02 00 01 add %o0, %g1, %l0 <== NOT EXECUTED
p1 = memfile_alloc_block();
200dc5c: 7f ff ff a4 call 200daec <memfile_alloc_block> <== NOT EXECUTED
200dc60: 01 00 00 00 nop <== NOT EXECUTED
if ( !p1 )
200dc64: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED
200dc68: 22 80 00 56 be,a 200ddc0 <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
200dc6c: b0 10 20 00 clr %i0 <== NOT EXECUTED
return 0;
p[ doubly ] = (block_p) p1;
200dc70: c4 24 00 00 st %g2, [ %l0 ] <== NOT EXECUTED
}
return (block_p *)&p1[ singly ];
200dc74: 83 2e 60 02 sll %i1, 2, %g1
200dc78: 81 c7 e0 08 ret
200dc7c: 91 e8 80 01 restore %g2, %g1, %o0
}
if ( !p )
200dc80: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200dc84: 02 80 00 4f be 200ddc0 <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
200dc88: b0 10 20 00 clr %i0 <== NOT EXECUTED
return 0;
p = (block_p *)p[ doubly ];
200dc8c: 83 2c 20 02 sll %l0, 2, %g1 <== NOT EXECUTED
#if 0
fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly,
singly, p, &p[singly] );
fflush(stdout);
#endif
return (block_p *)&p[ singly ];
200dc90: 85 2e 60 02 sll %i1, 2, %g2 <== NOT EXECUTED
}
if ( !p )
return 0;
p = (block_p *)p[ doubly ];
200dc94: 10 80 00 47 b 200ddb0 <IMFS_memfile_get_block_pointer+0x290><== NOT EXECUTED
200dc98: c2 02 00 01 ld [ %o0 + %g1 ], %g1 <== NOT EXECUTED
#endif
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
200dc9c: 90 02 20 01 inc %o0 <== NOT EXECUTED
200dca0: 40 00 17 00 call 20138a0 <.umul> <== NOT EXECUTED
200dca4: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
200dca8: 90 02 3f ff add %o0, -1, %o0 <== NOT EXECUTED
200dcac: 80 a6 40 08 cmp %i1, %o0 <== NOT EXECUTED
200dcb0: 18 80 00 43 bgu 200ddbc <IMFS_memfile_get_block_pointer+0x29c><== NOT EXECUTED
200dcb4: a0 26 40 10 sub %i1, %l0, %l0 <== NOT EXECUTED
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
200dcb8: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
200dcbc: 40 00 17 df call 2013c38 <.urem> <== NOT EXECUTED
200dcc0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
200dcc4: 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;
200dcc8: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
200dccc: 40 00 17 2f call 2013988 <.udiv> <== NOT EXECUTED
200dcd0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
200dcd4: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
200dcd8: 40 00 17 2c call 2013988 <.udiv> <== NOT EXECUTED
200dcdc: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
200dce0: 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;
200dce4: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
200dce8: 40 00 17 d4 call 2013c38 <.urem> <== NOT EXECUTED
200dcec: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
p = info->triply_indirect;
if ( malloc_it ) {
200dcf0: 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;
200dcf4: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED
p = info->triply_indirect;
if ( malloc_it ) {
200dcf8: 02 80 00 24 be 200dd88 <IMFS_memfile_get_block_pointer+0x268><== NOT EXECUTED
200dcfc: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 <== NOT EXECUTED
if ( !p ) {
200dd00: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200dd04: 12 80 00 09 bne 200dd28 <IMFS_memfile_get_block_pointer+0x208><== NOT EXECUTED
200dd08: 83 2e 60 02 sll %i1, 2, %g1 <== NOT EXECUTED
p = memfile_alloc_block();
200dd0c: 7f ff ff 78 call 200daec <memfile_alloc_block> <== NOT EXECUTED
200dd10: 01 00 00 00 nop <== NOT EXECUTED
if ( !p )
200dd14: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200dd18: 22 80 00 2a be,a 200ddc0 <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
200dd1c: b0 10 20 00 clr %i0 <== NOT EXECUTED
return 0;
info->triply_indirect = p;
200dd20: d0 26 20 58 st %o0, [ %i0 + 0x58 ] <== NOT EXECUTED
}
p1 = (block_p *) p[ triply ];
200dd24: 83 2e 60 02 sll %i1, 2, %g1 <== NOT EXECUTED
200dd28: c6 02 00 01 ld [ %o0 + %g1 ], %g3 <== NOT EXECUTED
if ( !p1 ) {
200dd2c: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED
200dd30: 12 80 00 08 bne 200dd50 <IMFS_memfile_get_block_pointer+0x230><== NOT EXECUTED
200dd34: a0 02 00 01 add %o0, %g1, %l0 <== NOT EXECUTED
p1 = memfile_alloc_block();
200dd38: 7f ff ff 6d call 200daec <memfile_alloc_block> <== NOT EXECUTED
200dd3c: 01 00 00 00 nop <== NOT EXECUTED
if ( !p1 )
200dd40: 86 92 20 00 orcc %o0, 0, %g3 <== NOT EXECUTED
200dd44: 02 80 00 1f be 200ddc0 <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
200dd48: b0 10 20 00 clr %i0 <== NOT EXECUTED
return 0;
p[ triply ] = (block_p) p1;
200dd4c: c6 24 00 00 st %g3, [ %l0 ] <== NOT EXECUTED
}
p2 = (block_p *)p1[ doubly ];
200dd50: 83 2c 60 02 sll %l1, 2, %g1 <== NOT EXECUTED
200dd54: d0 00 c0 01 ld [ %g3 + %g1 ], %o0 <== NOT EXECUTED
if ( !p2 ) {
200dd58: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200dd5c: 12 80 00 08 bne 200dd7c <IMFS_memfile_get_block_pointer+0x25c><== NOT EXECUTED
200dd60: a0 00 c0 01 add %g3, %g1, %l0 <== NOT EXECUTED
p2 = memfile_alloc_block();
200dd64: 7f ff ff 62 call 200daec <memfile_alloc_block> <== NOT EXECUTED
200dd68: 01 00 00 00 nop <== NOT EXECUTED
if ( !p2 )
200dd6c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200dd70: 22 80 00 14 be,a 200ddc0 <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
200dd74: b0 10 20 00 clr %i0 <== NOT EXECUTED
return 0;
p1[ doubly ] = (block_p) p2;
200dd78: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED
}
return (block_p *)&p2[ singly ];
200dd7c: 83 2c a0 02 sll %l2, 2, %g1 <== NOT EXECUTED
200dd80: 81 c7 e0 08 ret <== NOT EXECUTED
200dd84: 91 ea 00 01 restore %o0, %g1, %o0 <== NOT EXECUTED
}
if ( !p )
200dd88: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200dd8c: 02 80 00 0d be 200ddc0 <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
200dd90: b0 10 20 00 clr %i0 <== NOT EXECUTED
#if 0
fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly );
fflush(stdout);
#endif
p1 = (block_p *) p[ triply ];
200dd94: 83 2e 60 02 sll %i1, 2, %g1 <== NOT EXECUTED
200dd98: d0 02 00 01 ld [ %o0 + %g1 ], %o0 <== NOT EXECUTED
if ( !p1 )
200dd9c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200dda0: 02 80 00 08 be 200ddc0 <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
200dda4: 83 2c 60 02 sll %l1, 2, %g1 <== NOT EXECUTED
return 0;
p2 = (block_p *)p1[ doubly ];
200dda8: c2 02 00 01 ld [ %o0 + %g1 ], %g1 <== NOT EXECUTED
if ( !p2 )
return 0;
return (block_p *)&p2[ singly ];
200ddac: 85 2c a0 02 sll %l2, 2, %g2 <== NOT EXECUTED
p1 = (block_p *) p[ triply ];
if ( !p1 )
return 0;
p2 = (block_p *)p1[ doubly ];
if ( !p2 )
200ddb0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200ddb4: 12 80 00 03 bne 200ddc0 <IMFS_memfile_get_block_pointer+0x2a0><== ALWAYS TAKEN
200ddb8: b0 00 40 02 add %g1, %g2, %i0
return 0;
return (block_p *)&p2[ singly ];
200ddbc: b0 10 20 00 clr %i0 <== NOT EXECUTED
/*
* This means the requested block number is out of range.
*/
return 0;
}
200ddc0: 81 c7 e0 08 ret
200ddc4: 81 e8 00 00 restore
0200e6ac <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
200e6ac: 9d e3 bf 90 save %sp, -112, %sp
/*
* Perform internal consistency checks
*/
assert( the_jnode );
200e6b0: a6 96 20 00 orcc %i0, 0, %l3
200e6b4: 32 80 00 0a bne,a 200e6dc <IMFS_memfile_read+0x30> <== ALWAYS TAKEN
200e6b8: c4 04 e0 48 ld [ %l3 + 0x48 ], %g2
200e6bc: 11 00 80 57 sethi %hi(0x2015c00), %o0 <== NOT EXECUTED
200e6c0: 15 00 80 58 sethi %hi(0x2016000), %o2 <== NOT EXECUTED
200e6c4: 17 00 80 57 sethi %hi(0x2015c00), %o3 <== NOT EXECUTED
200e6c8: 90 12 23 48 or %o0, 0x348, %o0 <== NOT EXECUTED
200e6cc: 94 12 a0 b8 or %o2, 0xb8, %o2 <== NOT EXECUTED
200e6d0: 96 12 e3 98 or %o3, 0x398, %o3 <== NOT EXECUTED
200e6d4: 10 80 00 0d b 200e708 <IMFS_memfile_read+0x5c> <== NOT EXECUTED
200e6d8: 92 10 22 4a mov 0x24a, %o1 <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE ||
200e6dc: 82 00 bf fb add %g2, -5, %g1
200e6e0: 80 a0 60 01 cmp %g1, 1
200e6e4: 08 80 00 0b bleu 200e710 <IMFS_memfile_read+0x64> <== ALWAYS TAKEN
200e6e8: 80 a6 a0 00 cmp %i2, 0
200e6ec: 11 00 80 57 sethi %hi(0x2015c00), %o0 <== NOT EXECUTED
200e6f0: 15 00 80 58 sethi %hi(0x2016000), %o2 <== NOT EXECUTED
200e6f4: 17 00 80 58 sethi %hi(0x2016000), %o3 <== NOT EXECUTED
200e6f8: 90 12 23 48 or %o0, 0x348, %o0 <== NOT EXECUTED
200e6fc: 94 12 a0 b8 or %o2, 0xb8, %o2 <== NOT EXECUTED
200e700: 96 12 e0 28 or %o3, 0x28, %o3 <== NOT EXECUTED
200e704: 92 10 22 4f mov 0x24f, %o1 <== NOT EXECUTED
200e708: 7f ff d1 4b call 2002c34 <__assert_func> <== NOT EXECUTED
200e70c: 01 00 00 00 nop <== NOT EXECUTED
/*
* Error checks on arguments
*/
assert( dest );
200e710: 32 80 00 0a bne,a 200e738 <IMFS_memfile_read+0x8c> <== ALWAYS TAKEN
200e714: 80 a6 e0 00 cmp %i3, 0
200e718: 11 00 80 57 sethi %hi(0x2015c00), %o0 <== NOT EXECUTED
200e71c: 15 00 80 58 sethi %hi(0x2016000), %o2 <== NOT EXECUTED
200e720: 17 00 80 58 sethi %hi(0x2016000), %o3 <== NOT EXECUTED
200e724: 90 12 23 48 or %o0, 0x348, %o0 <== NOT EXECUTED
200e728: 94 12 a0 b8 or %o2, 0xb8, %o2 <== NOT EXECUTED
200e72c: 96 12 e0 78 or %o3, 0x78, %o3 <== NOT EXECUTED
200e730: 10 bf ff f6 b 200e708 <IMFS_memfile_read+0x5c> <== NOT EXECUTED
200e734: 92 10 22 58 mov 0x258, %o1 <== NOT EXECUTED
/*
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
200e738: 12 80 00 08 bne 200e758 <IMFS_memfile_read+0xac> <== ALWAYS TAKEN
200e73c: 80 a0 a0 06 cmp %g2, 6
rtems_set_errno_and_return_minus_one( EINVAL );
200e740: 40 00 04 3f call 200f83c <__errno> <== NOT EXECUTED
200e744: 01 00 00 00 nop <== NOT EXECUTED
200e748: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16> <== NOT EXECUTED
200e74c: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED
200e750: 10 80 00 76 b 200e928 <IMFS_memfile_read+0x27c> <== NOT EXECUTED
200e754: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
if (the_jnode->type == IMFS_LINEAR_FILE) {
200e758: 32 80 00 0c bne,a 200e788 <IMFS_memfile_read+0xdc> <== ALWAYS TAKEN
200e75c: c4 04 e0 4c ld [ %l3 + 0x4c ], %g2
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
200e760: c2 04 e0 4c ld [ %l3 + 0x4c ], %g1 <== NOT EXECUTED
200e764: b0 20 40 19 sub %g1, %i1, %i0 <== NOT EXECUTED
200e768: 80 a6 00 1b cmp %i0, %i3 <== NOT EXECUTED
200e76c: 38 80 00 02 bgu,a 200e774 <IMFS_memfile_read+0xc8> <== NOT EXECUTED
200e770: b0 10 00 1b mov %i3, %i0 <== NOT EXECUTED
my_length = the_jnode->info.linearfile.size - start;
memcpy(dest, &file_ptr[start], my_length);
200e774: d2 04 e0 50 ld [ %l3 + 0x50 ], %o1 <== NOT EXECUTED
200e778: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
200e77c: 92 02 40 19 add %o1, %i1, %o1 <== NOT EXECUTED
200e780: 10 80 00 62 b 200e908 <IMFS_memfile_read+0x25c> <== NOT EXECUTED
200e784: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED
* If the last byte we are supposed to read is past the end of this
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
200e788: 82 06 c0 19 add %i3, %i1, %g1
200e78c: 80 a0 40 02 cmp %g1, %g2
200e790: 18 80 00 03 bgu 200e79c <IMFS_memfile_read+0xf0> <== ALWAYS TAKEN
200e794: a0 20 80 19 sub %g2, %i1, %l0
200e798: a0 10 00 1b mov %i3, %l0 <== NOT EXECUTED
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
200e79c: 03 00 80 5c sethi %hi(0x2017000), %g1
200e7a0: f6 00 61 9c ld [ %g1 + 0x19c ], %i3 ! 201719c <imfs_memfile_bytes_per_block>
200e7a4: 90 10 00 19 mov %i1, %o0
200e7a8: 40 00 15 26 call 2013c40 <.rem>
200e7ac: 92 10 00 1b mov %i3, %o1
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
200e7b0: 92 10 00 1b mov %i3, %o1
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
200e7b4: a2 10 00 08 mov %o0, %l1
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
200e7b8: 40 00 14 76 call 2013990 <.div>
200e7bc: 90 10 00 19 mov %i1, %o0
if ( start_offset ) {
200e7c0: 80 a4 60 00 cmp %l1, 0
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
200e7c4: b2 10 00 08 mov %o0, %i1
if ( start_offset ) {
200e7c8: a4 10 00 1a mov %i2, %l2
200e7cc: 02 80 00 1d be 200e840 <IMFS_memfile_read+0x194>
200e7d0: b0 10 20 00 clr %i0
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
200e7d4: 90 10 00 13 mov %l3, %o0
200e7d8: 92 10 00 19 mov %i1, %o1
200e7dc: 7f ff fc d1 call 200db20 <IMFS_memfile_get_block_pointer>
200e7e0: 94 10 20 00 clr %o2
assert( block_ptr );
200e7e4: 80 a2 20 00 cmp %o0, 0
200e7e8: 32 80 00 0a bne,a 200e810 <IMFS_memfile_read+0x164> <== ALWAYS TAKEN
200e7ec: 92 26 c0 11 sub %i3, %l1, %o1
200e7f0: 11 00 80 57 sethi %hi(0x2015c00), %o0 <== NOT EXECUTED
200e7f4: 15 00 80 58 sethi %hi(0x2016000), %o2 <== NOT EXECUTED
200e7f8: 17 00 80 57 sethi %hi(0x2015c00), %o3 <== NOT EXECUTED
200e7fc: 90 12 23 48 or %o0, 0x348, %o0 <== NOT EXECUTED
200e800: 94 12 a0 b8 or %o2, 0xb8, %o2 <== NOT EXECUTED
200e804: 96 12 e3 e8 or %o3, 0x3e8, %o3 <== NOT EXECUTED
200e808: 10 bf ff c0 b 200e708 <IMFS_memfile_read+0x5c> <== NOT EXECUTED
200e80c: 92 10 22 94 mov 0x294, %o1 <== NOT EXECUTED
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
200e810: 80 a4 00 09 cmp %l0, %o1
200e814: 08 80 00 03 bleu 200e820 <IMFS_memfile_read+0x174>
200e818: 94 10 00 10 mov %l0, %o2
200e81c: 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 );
200e820: d2 02 00 00 ld [ %o0 ], %o1
dest += to_copy;
200e824: a4 06 80 0a add %i2, %o2, %l2
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
200e828: 92 02 40 11 add %o1, %l1, %o1
dest += to_copy;
block++;
200e82c: b2 06 60 01 inc %i1
my_length -= to_copy;
200e830: a0 24 00 0a sub %l0, %o2, %l0
200e834: 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 );
200e838: 40 00 08 29 call 20108dc <memcpy>
200e83c: 90 10 00 1a mov %i2, %o0
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
200e840: 03 00 80 5c sethi %hi(0x2017000), %g1
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
200e844: a2 10 61 9c or %g1, 0x19c, %l1 ! 201719c <imfs_memfile_bytes_per_block>
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
200e848: 10 80 00 17 b 200e8a4 <IMFS_memfile_read+0x1f8>
200e84c: f6 00 61 9c ld [ %g1 + 0x19c ], %i3
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
200e850: 92 10 00 19 mov %i1, %o1
200e854: 7f ff fc b3 call 200db20 <IMFS_memfile_get_block_pointer>
200e858: 94 10 20 00 clr %o2
assert( block_ptr );
200e85c: 80 a2 20 00 cmp %o0, 0
200e860: 32 80 00 0a bne,a 200e888 <IMFS_memfile_read+0x1dc> <== ALWAYS TAKEN
200e864: d2 02 00 00 ld [ %o0 ], %o1
200e868: 11 00 80 57 sethi %hi(0x2015c00), %o0 <== NOT EXECUTED
200e86c: 15 00 80 58 sethi %hi(0x2016000), %o2 <== NOT EXECUTED
200e870: 17 00 80 57 sethi %hi(0x2015c00), %o3 <== NOT EXECUTED
200e874: 90 12 23 48 or %o0, 0x348, %o0 <== NOT EXECUTED
200e878: 94 12 a0 b8 or %o2, 0xb8, %o2 <== NOT EXECUTED
200e87c: 96 12 e3 e8 or %o3, 0x3e8, %o3 <== NOT EXECUTED
200e880: 10 bf ff a2 b 200e708 <IMFS_memfile_read+0x5c> <== NOT EXECUTED
200e884: 92 10 22 a5 mov 0x2a5, %o1 <== NOT EXECUTED
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
block++;
200e888: b2 06 60 01 inc %i1
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
200e88c: 90 10 00 12 mov %l2, %o0
dest += to_copy;
block++;
my_length -= to_copy;
200e890: a0 24 00 1b sub %l0, %i3, %l0
copied += to_copy;
200e894: b0 06 00 1b add %i0, %i3, %i0
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
200e898: a4 04 80 1b add %l2, %i3, %l2
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
200e89c: 40 00 08 10 call 20108dc <memcpy>
200e8a0: 94 10 00 1b mov %i3, %o2
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
200e8a4: c2 04 40 00 ld [ %l1 ], %g1
200e8a8: 80 a4 00 01 cmp %l0, %g1
200e8ac: 1a bf ff e9 bcc 200e850 <IMFS_memfile_read+0x1a4>
200e8b0: 90 10 00 13 mov %l3, %o0
* Phase 3: possibly the first part of one block
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
200e8b4: 80 a4 20 00 cmp %l0, 0
200e8b8: 02 80 00 17 be 200e914 <IMFS_memfile_read+0x268>
200e8bc: 90 07 bf f0 add %fp, -16, %o0
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
200e8c0: 92 10 00 19 mov %i1, %o1
200e8c4: 90 10 00 13 mov %l3, %o0
200e8c8: 7f ff fc 96 call 200db20 <IMFS_memfile_get_block_pointer>
200e8cc: 94 10 20 00 clr %o2
assert( block_ptr );
200e8d0: 80 a2 20 00 cmp %o0, 0
200e8d4: 32 80 00 0a bne,a 200e8fc <IMFS_memfile_read+0x250> <== ALWAYS TAKEN
200e8d8: d2 02 00 00 ld [ %o0 ], %o1
200e8dc: 11 00 80 57 sethi %hi(0x2015c00), %o0 <== NOT EXECUTED
200e8e0: 15 00 80 58 sethi %hi(0x2016000), %o2 <== NOT EXECUTED
200e8e4: 17 00 80 57 sethi %hi(0x2015c00), %o3 <== NOT EXECUTED
200e8e8: 90 12 23 48 or %o0, 0x348, %o0 <== NOT EXECUTED
200e8ec: 94 12 a0 b8 or %o2, 0xb8, %o2 <== NOT EXECUTED
200e8f0: 96 12 e3 e8 or %o3, 0x3e8, %o3 <== NOT EXECUTED
200e8f4: 10 bf ff 85 b 200e708 <IMFS_memfile_read+0x5c> <== NOT EXECUTED
200e8f8: 92 10 22 b7 mov 0x2b7, %o1 <== NOT EXECUTED
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
copied += my_length;
200e8fc: b0 04 00 18 add %l0, %i0, %i0
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
200e900: 90 10 00 12 mov %l2, %o0
200e904: 94 10 00 10 mov %l0, %o2
200e908: 40 00 07 f5 call 20108dc <memcpy>
200e90c: 01 00 00 00 nop
copied += my_length;
}
IMFS_update_atime( the_jnode );
200e910: 90 07 bf f0 add %fp, -16, %o0
200e914: 7f ff d3 61 call 2003698 <gettimeofday>
200e918: 92 10 20 00 clr %o1
200e91c: c2 07 bf f0 ld [ %fp + -16 ], %g1
return copied;
200e920: 94 10 00 18 mov %i0, %o2
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
copied += my_length;
}
IMFS_update_atime( the_jnode );
200e924: c2 24 e0 3c st %g1, [ %l3 + 0x3c ]
return copied;
}
200e928: 81 c7 e0 08 ret
200e92c: 91 e8 00 0a restore %g0, %o2, %o0
0200de6c <IMFS_memfile_remove>:
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
200de6c: 9d e3 bf 98 save %sp, -104, %sp
/*
* Perform internal consistency checks
*/
assert( the_jnode );
200de70: 80 a6 20 00 cmp %i0, 0
200de74: 32 80 00 0a bne,a 200de9c <IMFS_memfile_remove+0x30> <== ALWAYS TAKEN
200de78: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
200de7c: 11 00 80 57 sethi %hi(0x2015c00), %o0 <== NOT EXECUTED
200de80: 15 00 80 58 sethi %hi(0x2016000), %o2 <== NOT EXECUTED
200de84: 17 00 80 57 sethi %hi(0x2015c00), %o3 <== NOT EXECUTED
200de88: 90 12 23 48 or %o0, 0x348, %o0 <== NOT EXECUTED
200de8c: 94 12 a0 d0 or %o2, 0xd0, %o2 <== NOT EXECUTED
200de90: 96 12 e3 98 or %o3, 0x398, %o3 <== NOT EXECUTED
200de94: 10 80 00 0c b 200dec4 <IMFS_memfile_remove+0x58> <== NOT EXECUTED
200de98: 92 10 21 ec mov 0x1ec, %o1 <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
200de9c: 80 a0 60 05 cmp %g1, 5
200dea0: 02 80 00 0b be 200decc <IMFS_memfile_remove+0x60> <== ALWAYS TAKEN
200dea4: 03 00 80 5c sethi %hi(0x2017000), %g1
200dea8: 11 00 80 57 sethi %hi(0x2015c00), %o0 <== NOT EXECUTED
200deac: 15 00 80 58 sethi %hi(0x2016000), %o2 <== NOT EXECUTED
200deb0: 17 00 80 57 sethi %hi(0x2015c00), %o3 <== NOT EXECUTED
200deb4: 90 12 23 48 or %o0, 0x348, %o0 <== NOT EXECUTED
200deb8: 94 12 a0 d0 or %o2, 0xd0, %o2 <== NOT EXECUTED
200debc: 96 12 e3 a8 or %o3, 0x3a8, %o3 <== NOT EXECUTED
200dec0: 92 10 21 f0 mov 0x1f0, %o1 <== NOT EXECUTED
200dec4: 7f ff d3 5c call 2002c34 <__assert_func> <== NOT EXECUTED
200dec8: 01 00 00 00 nop <== NOT EXECUTED
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
200decc: c4 06 20 50 ld [ %i0 + 0x50 ], %g2
/*
* Eventually this could be set smarter at each call to
* memfile_free_blocks_in_table to greatly speed this up.
*/
to_free = IMFS_MEMFILE_BLOCK_SLOTS;
200ded0: c2 00 61 9c ld [ %g1 + 0x19c ], %g1
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
200ded4: 80 a0 a0 00 cmp %g2, 0
200ded8: 02 80 00 05 be 200deec <IMFS_memfile_remove+0x80>
200dedc: a7 30 60 02 srl %g1, 2, %l3
memfile_free_blocks_in_table( &info->indirect, to_free );
200dee0: 90 06 20 50 add %i0, 0x50, %o0
200dee4: 7f ff ff c5 call 200ddf8 <memfile_free_blocks_in_table>
200dee8: 92 10 00 13 mov %l3, %o1
}
if ( info->doubly_indirect ) {
200deec: c2 06 20 54 ld [ %i0 + 0x54 ], %g1
200def0: 80 a0 60 00 cmp %g1, 0
200def4: 02 80 00 15 be 200df48 <IMFS_memfile_remove+0xdc> <== ALWAYS TAKEN
200def8: 03 00 80 5c sethi %hi(0x2017000), %g1
200defc: a0 10 20 00 clr %l0 <== NOT EXECUTED
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
200df00: 10 80 00 0a b 200df28 <IMFS_memfile_remove+0xbc> <== NOT EXECUTED
200df04: a2 10 61 9c or %g1, 0x19c, %l1 <== NOT EXECUTED
if ( info->doubly_indirect[i] ) {
200df08: 85 2c 20 02 sll %l0, 2, %g2 <== NOT EXECUTED
200df0c: c2 02 00 02 ld [ %o0 + %g2 ], %g1 <== NOT EXECUTED
200df10: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200df14: 02 80 00 04 be 200df24 <IMFS_memfile_remove+0xb8> <== NOT EXECUTED
200df18: 90 02 00 02 add %o0, %g2, %o0 <== NOT EXECUTED
memfile_free_blocks_in_table(
200df1c: 7f ff ff b7 call 200ddf8 <memfile_free_blocks_in_table> <== NOT EXECUTED
200df20: 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<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
200df24: a0 04 20 01 inc %l0 <== NOT EXECUTED
200df28: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED
200df2c: 83 30 60 02 srl %g1, 2, %g1 <== NOT EXECUTED
200df30: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED
200df34: 2a bf ff f5 bcs,a 200df08 <IMFS_memfile_remove+0x9c> <== NOT EXECUTED
200df38: d0 06 20 54 ld [ %i0 + 0x54 ], %o0 <== NOT EXECUTED
if ( info->doubly_indirect[i] ) {
memfile_free_blocks_in_table(
(block_p **)&info->doubly_indirect[i], to_free );
}
}
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
200df3c: 90 06 20 54 add %i0, 0x54, %o0 <== NOT EXECUTED
200df40: 7f ff ff ae call 200ddf8 <memfile_free_blocks_in_table> <== NOT EXECUTED
200df44: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
}
if ( info->triply_indirect ) {
200df48: c2 06 20 58 ld [ %i0 + 0x58 ], %g1
200df4c: 80 a0 60 00 cmp %g1, 0
200df50: 02 80 00 26 be 200dfe8 <IMFS_memfile_remove+0x17c> <== ALWAYS TAKEN
200df54: 03 00 80 5c sethi %hi(0x2017000), %g1
200df58: a4 10 20 00 clr %l2 <== NOT EXECUTED
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
200df5c: 10 80 00 1b b 200dfc8 <IMFS_memfile_remove+0x15c> <== NOT EXECUTED
200df60: aa 10 61 9c or %g1, 0x19c, %l5 <== NOT EXECUTED
}
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
200df64: a9 2c a0 02 sll %l2, 2, %l4 <== NOT EXECUTED
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
200df68: d0 00 40 14 ld [ %g1 + %l4 ], %o0 <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
200df6c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200df70: 22 80 00 1c be,a 200dfe0 <IMFS_memfile_remove+0x174> <== NOT EXECUTED
200df74: 90 06 20 58 add %i0, 0x58, %o0 <== NOT EXECUTED
break;
200df78: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
200df7c: 10 80 00 09 b 200dfa0 <IMFS_memfile_remove+0x134> <== NOT EXECUTED
200df80: a2 10 20 00 clr %l1 <== NOT EXECUTED
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
if ( p[j] ) {
200df84: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200df88: 02 80 00 04 be 200df98 <IMFS_memfile_remove+0x12c> <== NOT EXECUTED
200df8c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
200df90: 7f ff ff 9a call 200ddf8 <memfile_free_blocks_in_table> <== NOT EXECUTED
200df94: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
if ( !p ) /* ensure we have a valid pointer */
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
200df98: a2 04 60 01 inc %l1 <== NOT EXECUTED
200df9c: a0 04 20 04 add %l0, 4, %l0 <== NOT EXECUTED
200dfa0: c2 05 40 00 ld [ %l5 ], %g1 <== NOT EXECUTED
200dfa4: 83 30 60 02 srl %g1, 2, %g1 <== NOT EXECUTED
200dfa8: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED
200dfac: 2a bf ff f6 bcs,a 200df84 <IMFS_memfile_remove+0x118> <== NOT EXECUTED
200dfb0: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
200dfb4: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 <== NOT EXECUTED
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
200dfb8: a4 04 a0 01 inc %l2 <== NOT EXECUTED
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
200dfbc: 90 02 00 14 add %o0, %l4, %o0 <== NOT EXECUTED
200dfc0: 7f ff ff 8e call 200ddf8 <memfile_free_blocks_in_table> <== NOT EXECUTED
200dfc4: 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<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
200dfc8: c2 05 40 00 ld [ %l5 ], %g1 <== NOT EXECUTED
200dfcc: 83 30 60 02 srl %g1, 2, %g1 <== NOT EXECUTED
200dfd0: 80 a4 80 01 cmp %l2, %g1 <== NOT EXECUTED
200dfd4: 2a bf ff e4 bcs,a 200df64 <IMFS_memfile_remove+0xf8> <== NOT EXECUTED
200dfd8: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 <== NOT EXECUTED
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
200dfdc: 90 06 20 58 add %i0, 0x58, %o0 <== NOT EXECUTED
200dfe0: 7f ff ff 86 call 200ddf8 <memfile_free_blocks_in_table> <== NOT EXECUTED
200dfe4: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
200dfe8: 81 c7 e0 08 ret
200dfec: 91 e8 20 00 restore %g0, 0, %o0
0200ddc8 <IMFS_memfile_remove_block>:
MEMFILE_STATIC int IMFS_memfile_remove_block(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
200ddc8: 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 );
200ddcc: 94 10 20 00 clr %o2 <== NOT EXECUTED
200ddd0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200ddd4: 7f ff ff 53 call 200db20 <IMFS_memfile_get_block_pointer> <== NOT EXECUTED
200ddd8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
ptr = *block_entry_ptr;
200dddc: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED
*block_entry_ptr = 0;
memfile_free_block( ptr );
return 1;
}
200dde0: 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;
200dde4: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED
memfile_free_block( ptr );
200dde8: 7f ff ff 38 call 200dac8 <memfile_free_block> <== NOT EXECUTED
200ddec: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED
return 1;
}
200ddf0: 81 c7 e0 08 ret <== NOT EXECUTED
200ddf4: 81 e8 00 00 restore <== NOT EXECUTED
0200e380 <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
200e380: 9d e3 bf 90 save %sp, -112, %sp
/*
* Perform internal consistency checks
*/
assert( the_jnode );
200e384: a4 96 20 00 orcc %i0, 0, %l2
200e388: 32 80 00 0a bne,a 200e3b0 <IMFS_memfile_write+0x30> <== ALWAYS TAKEN
200e38c: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1
200e390: 11 00 80 57 sethi %hi(0x2015c00), %o0 <== NOT EXECUTED
200e394: 15 00 80 58 sethi %hi(0x2016000), %o2 <== NOT EXECUTED
200e398: 17 00 80 57 sethi %hi(0x2015c00), %o3 <== NOT EXECUTED
200e39c: 90 12 23 48 or %o0, 0x348, %o0 <== NOT EXECUTED
200e3a0: 94 12 a0 a0 or %o2, 0xa0, %o2 <== NOT EXECUTED
200e3a4: 96 12 e3 98 or %o3, 0x398, %o3 <== NOT EXECUTED
200e3a8: 10 80 00 82 b 200e5b0 <IMFS_memfile_write+0x230> <== NOT EXECUTED
200e3ac: 92 10 22 e1 mov 0x2e1, %o1 <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
200e3b0: 80 a0 60 05 cmp %g1, 5
200e3b4: 02 80 00 0a be 200e3dc <IMFS_memfile_write+0x5c> <== ALWAYS TAKEN
200e3b8: 80 a6 a0 00 cmp %i2, 0
200e3bc: 11 00 80 57 sethi %hi(0x2015c00), %o0 <== NOT EXECUTED
200e3c0: 15 00 80 58 sethi %hi(0x2016000), %o2 <== NOT EXECUTED
200e3c4: 17 00 80 57 sethi %hi(0x2015c00), %o3 <== NOT EXECUTED
200e3c8: 90 12 23 48 or %o0, 0x348, %o0 <== NOT EXECUTED
200e3cc: 94 12 a0 a0 or %o2, 0xa0, %o2 <== NOT EXECUTED
200e3d0: 96 12 e3 a8 or %o3, 0x3a8, %o3 <== NOT EXECUTED
200e3d4: 10 80 00 77 b 200e5b0 <IMFS_memfile_write+0x230> <== NOT EXECUTED
200e3d8: 92 10 22 e5 mov 0x2e5, %o1 <== NOT EXECUTED
/*
* Error check arguments
*/
assert( source );
200e3dc: 12 80 00 0a bne 200e404 <IMFS_memfile_write+0x84> <== ALWAYS TAKEN
200e3e0: 80 a6 e0 00 cmp %i3, 0
200e3e4: 11 00 80 57 sethi %hi(0x2015c00), %o0 <== NOT EXECUTED
200e3e8: 15 00 80 58 sethi %hi(0x2016000), %o2 <== NOT EXECUTED
200e3ec: 17 00 80 57 sethi %hi(0x2015c00), %o3 <== NOT EXECUTED
200e3f0: 90 12 23 48 or %o0, 0x348, %o0 <== NOT EXECUTED
200e3f4: 94 12 a0 a0 or %o2, 0xa0, %o2 <== NOT EXECUTED
200e3f8: 96 12 e3 e0 or %o3, 0x3e0, %o3 <== NOT EXECUTED
200e3fc: 10 80 00 6d b 200e5b0 <IMFS_memfile_write+0x230> <== NOT EXECUTED
200e400: 92 10 22 ed mov 0x2ed, %o1 <== NOT EXECUTED
/*
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
200e404: 32 80 00 06 bne,a 200e41c <IMFS_memfile_write+0x9c> <== ALWAYS TAKEN
200e408: c2 04 a0 4c ld [ %l2 + 0x4c ], %g1
rtems_set_errno_and_return_minus_one( EINVAL );
200e40c: 40 00 05 0c call 200f83c <__errno> <== NOT EXECUTED
200e410: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200e414: 10 80 00 0e b 200e44c <IMFS_memfile_write+0xcc> <== NOT EXECUTED
200e418: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
/*
* If the last byte we are supposed to write is past the end of this
* in memory file, then extend the length.
*/
last_byte = start + length;
200e41c: 92 06 c0 19 add %i3, %i1, %o1
if ( last_byte > the_jnode->info.file.size ) {
200e420: 80 a2 40 01 cmp %o1, %g1
200e424: 08 80 00 0d bleu 200e458 <IMFS_memfile_write+0xd8> <== NEVER TAKEN
200e428: 03 00 80 5c sethi %hi(0x2017000), %g1
status = IMFS_memfile_extend( the_jnode, last_byte );
200e42c: 7f ff ff 53 call 200e178 <IMFS_memfile_extend>
200e430: 90 10 00 12 mov %l2, %o0
if ( status )
200e434: 80 a2 20 00 cmp %o0, 0
200e438: 02 80 00 08 be 200e458 <IMFS_memfile_write+0xd8> <== ALWAYS TAKEN
200e43c: 03 00 80 5c sethi %hi(0x2017000), %g1
rtems_set_errno_and_return_minus_one( ENOSPC );
200e440: 40 00 04 ff call 200f83c <__errno> <== NOT EXECUTED
200e444: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200e448: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED
200e44c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200e450: 81 c7 e0 08 ret <== NOT EXECUTED
200e454: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
200e458: e0 00 61 9c ld [ %g1 + 0x19c ], %l0
200e45c: 90 10 00 19 mov %i1, %o0
200e460: 40 00 15 f8 call 2013c40 <.rem>
200e464: 92 10 00 10 mov %l0, %o1
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
200e468: 92 10 00 10 mov %l0, %o1
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
200e46c: a2 10 00 08 mov %o0, %l1
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
200e470: 40 00 15 48 call 2013990 <.div>
200e474: 90 10 00 19 mov %i1, %o0
if ( start_offset ) {
200e478: 80 a4 60 00 cmp %l1, 0
200e47c: 12 80 00 05 bne 200e490 <IMFS_memfile_write+0x110>
200e480: b2 10 00 08 mov %o0, %i1
200e484: a0 10 00 1a mov %i2, %l0
200e488: 10 80 00 1c b 200e4f8 <IMFS_memfile_write+0x178>
200e48c: b0 10 20 00 clr %i0
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
200e490: 90 10 00 12 mov %l2, %o0
200e494: 92 10 00 19 mov %i1, %o1
200e498: 7f ff fd a2 call 200db20 <IMFS_memfile_get_block_pointer>
200e49c: 94 10 20 00 clr %o2
assert( block_ptr );
200e4a0: 80 a2 20 00 cmp %o0, 0
200e4a4: 32 80 00 0a bne,a 200e4cc <IMFS_memfile_write+0x14c> <== ALWAYS TAKEN
200e4a8: 94 24 00 11 sub %l0, %l1, %o2
200e4ac: 11 00 80 57 sethi %hi(0x2015c00), %o0 <== NOT EXECUTED
200e4b0: 15 00 80 58 sethi %hi(0x2016000), %o2 <== NOT EXECUTED
200e4b4: 17 00 80 57 sethi %hi(0x2015c00), %o3 <== NOT EXECUTED
200e4b8: 90 12 23 48 or %o0, 0x348, %o0 <== NOT EXECUTED
200e4bc: 94 12 a0 a0 or %o2, 0xa0, %o2 <== NOT EXECUTED
200e4c0: 96 12 e3 e8 or %o3, 0x3e8, %o3 <== NOT EXECUTED
200e4c4: 10 80 00 3b b 200e5b0 <IMFS_memfile_write+0x230> <== NOT EXECUTED
200e4c8: 92 10 23 1a mov 0x31a, %o1 <== NOT EXECUTED
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
200e4cc: 80 a2 80 1b cmp %o2, %i3
200e4d0: 38 80 00 02 bgu,a 200e4d8 <IMFS_memfile_write+0x158> <== ALWAYS TAKEN
200e4d4: 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 );
200e4d8: d0 02 00 00 ld [ %o0 ], %o0
src += to_copy;
200e4dc: a0 06 80 0a add %i2, %o2, %l0
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
200e4e0: 90 02 00 11 add %o0, %l1, %o0
src += to_copy;
block++;
200e4e4: b2 06 60 01 inc %i1
my_length -= to_copy;
200e4e8: b6 26 c0 0a sub %i3, %o2, %i3
copied += to_copy;
200e4ec: b0 10 00 0a mov %o2, %i0
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
200e4f0: 40 00 08 fb call 20108dc <memcpy>
200e4f4: 92 10 00 1a mov %i2, %o1
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
200e4f8: 03 00 80 5c sethi %hi(0x2017000), %g1
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
200e4fc: a2 10 61 9c or %g1, 0x19c, %l1 ! 201719c <imfs_memfile_bytes_per_block>
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
200e500: 10 80 00 17 b 200e55c <IMFS_memfile_write+0x1dc>
200e504: f4 00 61 9c ld [ %g1 + 0x19c ], %i2
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
200e508: 92 10 00 19 mov %i1, %o1
200e50c: 7f ff fd 85 call 200db20 <IMFS_memfile_get_block_pointer>
200e510: 94 10 20 00 clr %o2
assert( block_ptr );
200e514: 80 a2 20 00 cmp %o0, 0
200e518: 32 80 00 0a bne,a 200e540 <IMFS_memfile_write+0x1c0> <== ALWAYS TAKEN
200e51c: d0 02 00 00 ld [ %o0 ], %o0
200e520: 11 00 80 57 sethi %hi(0x2015c00), %o0 <== NOT EXECUTED
200e524: 15 00 80 58 sethi %hi(0x2016000), %o2 <== NOT EXECUTED
200e528: 17 00 80 57 sethi %hi(0x2015c00), %o3 <== NOT EXECUTED
200e52c: 90 12 23 48 or %o0, 0x348, %o0 <== NOT EXECUTED
200e530: 94 12 a0 a0 or %o2, 0xa0, %o2 <== NOT EXECUTED
200e534: 96 12 e3 e8 or %o3, 0x3e8, %o3 <== NOT EXECUTED
200e538: 10 80 00 1e b 200e5b0 <IMFS_memfile_write+0x230> <== NOT EXECUTED
200e53c: 92 10 23 2e mov 0x32e, %o1 <== NOT EXECUTED
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
200e540: 92 10 00 10 mov %l0, %o1
src += to_copy;
block++;
200e544: b2 06 60 01 inc %i1
my_length -= to_copy;
200e548: b6 26 c0 1a sub %i3, %i2, %i3
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
200e54c: b0 06 00 1a add %i0, %i2, %i0
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
src += to_copy;
200e550: a0 04 00 1a add %l0, %i2, %l0
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
200e554: 40 00 08 e2 call 20108dc <memcpy>
200e558: 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 ) {
200e55c: c2 04 40 00 ld [ %l1 ], %g1
200e560: 80 a6 c0 01 cmp %i3, %g1
200e564: 1a bf ff e9 bcc 200e508 <IMFS_memfile_write+0x188>
200e568: 90 10 00 12 mov %l2, %o0
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
200e56c: 80 a6 e0 00 cmp %i3, 0
200e570: 02 80 00 17 be 200e5cc <IMFS_memfile_write+0x24c>
200e574: 90 07 bf f0 add %fp, -16, %o0
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
200e578: 92 10 00 19 mov %i1, %o1
200e57c: 90 10 00 12 mov %l2, %o0
200e580: 7f ff fd 68 call 200db20 <IMFS_memfile_get_block_pointer>
200e584: 94 10 20 00 clr %o2
assert( block_ptr );
200e588: 80 a2 20 00 cmp %o0, 0
200e58c: 32 80 00 0b bne,a 200e5b8 <IMFS_memfile_write+0x238> <== ALWAYS TAKEN
200e590: d0 02 00 00 ld [ %o0 ], %o0
200e594: 11 00 80 57 sethi %hi(0x2015c00), %o0 <== NOT EXECUTED
200e598: 15 00 80 58 sethi %hi(0x2016000), %o2 <== NOT EXECUTED
200e59c: 17 00 80 57 sethi %hi(0x2015c00), %o3 <== NOT EXECUTED
200e5a0: 90 12 23 48 or %o0, 0x348, %o0 <== NOT EXECUTED
200e5a4: 94 12 a0 a0 or %o2, 0xa0, %o2 <== NOT EXECUTED
200e5a8: 96 12 e3 e8 or %o3, 0x3e8, %o3 <== NOT EXECUTED
200e5ac: 92 10 23 44 mov 0x344, %o1 <== NOT EXECUTED
200e5b0: 7f ff d1 a1 call 2002c34 <__assert_func> <== NOT EXECUTED
200e5b4: 01 00 00 00 nop <== NOT EXECUTED
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, my_length );
my_length = 0;
copied += to_copy;
200e5b8: b0 06 00 1b add %i0, %i3, %i0
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, my_length );
200e5bc: 92 10 00 10 mov %l0, %o1
200e5c0: 40 00 08 c7 call 20108dc <memcpy>
200e5c4: 94 10 00 1b mov %i3, %o2
my_length = 0;
copied += to_copy;
}
IMFS_atime_mtime_update( the_jnode );
200e5c8: 90 07 bf f0 add %fp, -16, %o0
200e5cc: 7f ff d4 33 call 2003698 <gettimeofday>
200e5d0: 92 10 20 00 clr %o1
200e5d4: c2 07 bf f0 ld [ %fp + -16 ], %g1
200e5d8: c2 24 a0 3c st %g1, [ %l2 + 0x3c ]
200e5dc: c2 24 a0 40 st %g1, [ %l2 + 0x40 ]
return copied;
}
200e5e0: 81 c7 e0 08 ret
200e5e4: 81 e8 00 00 restore
02009dd8 <IMFS_mknod>:
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
2009dd8: 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 );
2009ddc: 90 10 00 18 mov %i0, %o0
2009de0: 92 07 bf c0 add %fp, -64, %o1
2009de4: 7f ff ff 8f call 2009c20 <IMFS_get_token>
2009de8: 94 07 bf f4 add %fp, -12, %o2
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
2009dec: 03 00 00 3c sethi %hi(0xf000), %g1
2009df0: b3 2e 60 10 sll %i1, 0x10, %i1
2009df4: 97 36 60 10 srl %i1, 0x10, %o3
2009df8: 84 0a c0 01 and %o3, %g1, %g2
2009dfc: 03 00 00 10 sethi %hi(0x4000), %g1
2009e00: 80 a0 80 01 cmp %g2, %g1
2009e04: 02 80 00 17 be 2009e60 <IMFS_mknod+0x88>
2009e08: 90 10 00 1c mov %i4, %o0
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
2009e0c: 03 00 00 20 sethi %hi(0x8000), %g1
2009e10: 80 a0 80 01 cmp %g2, %g1
2009e14: 02 80 00 14 be 2009e64 <IMFS_mknod+0x8c>
2009e18: 92 10 20 05 mov 5, %o1
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
2009e1c: 03 00 00 18 sethi %hi(0x6000), %g1
2009e20: 80 a0 80 01 cmp %g2, %g1
2009e24: 02 80 00 05 be 2009e38 <IMFS_mknod+0x60> <== NEVER TAKEN
2009e28: 03 00 00 08 sethi %hi(0x2000), %g1
2009e2c: 80 a0 80 01 cmp %g2, %g1
2009e30: 12 80 00 06 bne 2009e48 <IMFS_mknod+0x70> <== NEVER TAKEN
2009e34: 01 00 00 00 nop
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
2009e38: f4 27 bf e4 st %i2, [ %fp + -28 ]
2009e3c: f6 27 bf e8 st %i3, [ %fp + -24 ]
2009e40: 10 80 00 09 b 2009e64 <IMFS_mknod+0x8c>
2009e44: 92 10 20 02 mov 2, %o1
} else {
rtems_set_errno_and_return_minus_one( EINVAL );
2009e48: 40 00 0c 93 call 200d094 <__errno> <== NOT EXECUTED
2009e4c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2009e50: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2009e54: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2009e58: 81 c7 e0 08 ret <== NOT EXECUTED
2009e5c: 81 e8 00 00 restore <== NOT EXECUTED
2009e60: 92 10 20 01 mov 1, %o1
/*
* Allocate and fill in an IMFS jnode
*/
new_node = IMFS_create_node(
2009e64: 94 07 bf c0 add %fp, -64, %o2
2009e68: 98 07 bf e4 add %fp, -28, %o4
2009e6c: 40 00 09 7b call 200c458 <IMFS_create_node>
2009e70: b0 10 20 00 clr %i0
new_name,
mode,
&info
);
if ( !new_node )
2009e74: 80 a2 20 00 cmp %o0, 0
2009e78: 12 80 00 06 bne 2009e90 <IMFS_mknod+0xb8> <== ALWAYS TAKEN
2009e7c: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOMEM );
2009e80: 40 00 0c 85 call 200d094 <__errno> <== NOT EXECUTED
2009e84: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff> <== NOT EXECUTED
2009e88: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
2009e8c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
return 0;
}
2009e90: 81 c7 e0 08 ret
2009e94: 81 e8 00 00 restore
02002890 <IMFS_mount>:
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
2002890: 9d e3 bf 98 save %sp, -104, %sp
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
2002894: c4 06 20 08 ld [ %i0 + 8 ], %g2
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
2002898: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1
200289c: 80 a0 60 01 cmp %g1, 1
20028a0: 22 80 00 08 be,a 20028c0 <IMFS_mount+0x30> <== ALWAYS TAKEN
20028a4: f0 20 a0 58 st %i0, [ %g2 + 0x58 ]
rtems_set_errno_and_return_minus_one( ENOTDIR );
20028a8: 40 00 33 e5 call 200f83c <__errno> <== NOT EXECUTED
20028ac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20028b0: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED
20028b4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20028b8: 81 c7 e0 08 ret <== NOT EXECUTED
20028bc: 81 e8 00 00 restore <== NOT EXECUTED
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
return 0;
}
20028c0: 81 c7 e0 08 ret
20028c4: 91 e8 20 00 restore %g0, 0, %o0
02003964 <IMFS_print_jnode>:
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
2003964: 9d e3 bf 98 save %sp, -104, %sp
assert( the_jnode );
2003968: 80 a6 20 00 cmp %i0, 0
200396c: 12 80 00 0a bne 2003994 <IMFS_print_jnode+0x30> <== ALWAYS TAKEN
2003970: 21 00 80 7b sethi %hi(0x201ec00), %l0
2003974: 11 00 80 72 sethi %hi(0x201c800), %o0 <== NOT EXECUTED
2003978: 15 00 80 72 sethi %hi(0x201c800), %o2 <== NOT EXECUTED
200397c: 17 00 80 72 sethi %hi(0x201c800), %o3 <== NOT EXECUTED
2003980: 90 12 21 f0 or %o0, 0x1f0, %o0 <== NOT EXECUTED
2003984: 94 12 a3 c8 or %o2, 0x3c8, %o2 <== NOT EXECUTED
2003988: 96 12 e2 40 or %o3, 0x240, %o3 <== NOT EXECUTED
200398c: 10 80 00 3b b 2003a78 <IMFS_print_jnode+0x114> <== NOT EXECUTED
2003990: 92 10 20 38 mov 0x38, %o1 <== NOT EXECUTED
fprintf(stdout, "%s", the_jnode->name );
2003994: c2 04 20 a8 ld [ %l0 + 0xa8 ], %g1
2003998: 90 06 20 0c add %i0, 0xc, %o0
200399c: 40 00 38 45 call 2011ab0 <fputs>
20039a0: d2 00 60 08 ld [ %g1 + 8 ], %o1
switch( the_jnode->type ) {
20039a4: d4 06 20 48 ld [ %i0 + 0x48 ], %o2
20039a8: 82 02 bf ff add %o2, -1, %g1
20039ac: 80 a0 60 05 cmp %g1, 5
20039b0: 38 80 00 3b bgu,a 2003a9c <IMFS_print_jnode+0x138> <== NEVER TAKEN
20039b4: c2 04 20 a8 ld [ %l0 + 0xa8 ], %g1 <== NOT EXECUTED
20039b8: 83 28 60 02 sll %g1, 2, %g1
20039bc: 05 00 80 0e sethi %hi(0x2003800), %g2
20039c0: 84 10 a1 10 or %g2, 0x110, %g2 ! 2003910 <sparc_enable_interrupts+0x10>
20039c4: c2 00 80 01 ld [ %g2 + %g1 ], %g1
20039c8: 81 c0 40 00 jmp %g1
20039cc: 01 00 00 00 nop
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
20039d0: c2 04 20 a8 ld [ %l0 + 0xa8 ], %g1
20039d4: 90 10 20 2f mov 0x2f, %o0
20039d8: 40 00 37 fe call 20119d0 <fputc>
20039dc: d2 00 60 08 ld [ %g1 + 8 ], %o1
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
20039e0: 10 80 00 35 b 2003ab4 <IMFS_print_jnode+0x150>
20039e4: 31 00 80 72 sethi %hi(0x201c800), %i0
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
break;
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
20039e8: c2 04 20 a8 ld [ %l0 + 0xa8 ], %g1
20039ec: 13 00 80 72 sethi %hi(0x201c800), %o1
20039f0: d6 06 20 50 ld [ %i0 + 0x50 ], %o3
20039f4: d0 00 60 08 ld [ %g1 + 8 ], %o0
20039f8: d4 06 20 4c ld [ %i0 + 0x4c ], %o2
20039fc: 10 80 00 08 b 2003a1c <IMFS_print_jnode+0xb8>
2003a00: 92 12 62 50 or %o1, 0x250, %o1
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
2003a04: c2 04 20 a8 ld [ %l0 + 0xa8 ], %g1 <== NOT EXECUTED
2003a08: d6 06 20 50 ld [ %i0 + 0x50 ], %o3 <== NOT EXECUTED
2003a0c: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED
2003a10: d4 06 20 4c ld [ %i0 + 0x4c ], %o2 <== NOT EXECUTED
2003a14: 13 00 80 72 sethi %hi(0x201c800), %o1 <== NOT EXECUTED
2003a18: 92 12 62 68 or %o1, 0x268, %o1 ! 201ca68 <pollCallbacks.4788+0x388><== NOT EXECUTED
2003a1c: 40 00 37 d3 call 2011968 <fprintf>
2003a20: 31 00 80 72 sethi %hi(0x201c800), %i0
2003a24: 30 80 00 24 b,a 2003ab4 <IMFS_print_jnode+0x150>
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
2003a28: c2 04 20 a8 ld [ %l0 + 0xa8 ], %g1
2003a2c: d4 06 20 4c ld [ %i0 + 0x4c ], %o2
2003a30: d0 00 60 08 ld [ %g1 + 8 ], %o0
2003a34: 13 00 80 72 sethi %hi(0x201c800), %o1
2003a38: 40 00 37 cc call 2011968 <fprintf>
2003a3c: 92 12 62 78 or %o1, 0x278, %o1 ! 201ca78 <pollCallbacks.4788+0x398>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
2003a40: 10 80 00 1d b 2003ab4 <IMFS_print_jnode+0x150>
2003a44: 31 00 80 72 sethi %hi(0x201c800), %i0
(uint32_t)the_jnode->info.file.size );
#endif
break;
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
2003a48: c2 04 20 a8 ld [ %l0 + 0xa8 ], %g1 <== NOT EXECUTED
2003a4c: 11 00 80 72 sethi %hi(0x201c800), %o0 <== NOT EXECUTED
2003a50: d2 00 60 08 ld [ %g1 + 8 ], %o1 <== NOT EXECUTED
2003a54: 40 00 38 17 call 2011ab0 <fputs> <== NOT EXECUTED
2003a58: 90 12 22 88 or %o0, 0x288, %o0 <== NOT EXECUTED
assert(0);
2003a5c: 92 10 20 5d mov 0x5d, %o1 <== NOT EXECUTED
2003a60: 11 00 80 72 sethi %hi(0x201c800), %o0 <== NOT EXECUTED
2003a64: 15 00 80 72 sethi %hi(0x201c800), %o2 <== NOT EXECUTED
2003a68: 17 00 80 72 sethi %hi(0x201c800), %o3 <== NOT EXECUTED
2003a6c: 90 12 21 f0 or %o0, 0x1f0, %o0 <== NOT EXECUTED
2003a70: 94 12 a3 c8 or %o2, 0x3c8, %o2 <== NOT EXECUTED
2003a74: 96 12 e2 a0 or %o3, 0x2a0, %o3 <== NOT EXECUTED
2003a78: 40 00 01 ea call 2004220 <__assert_func> <== NOT EXECUTED
2003a7c: 01 00 00 00 nop <== NOT EXECUTED
break;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
2003a80: c2 04 20 a8 ld [ %l0 + 0xa8 ], %g1 <== NOT EXECUTED
2003a84: 11 00 80 72 sethi %hi(0x201c800), %o0 <== NOT EXECUTED
2003a88: d2 00 60 08 ld [ %g1 + 8 ], %o1 <== NOT EXECUTED
2003a8c: 40 00 38 09 call 2011ab0 <fputs> <== NOT EXECUTED
2003a90: 90 12 22 88 or %o0, 0x288, %o0 <== NOT EXECUTED
assert(0);
2003a94: 10 bf ff f3 b 2003a60 <IMFS_print_jnode+0xfc> <== NOT EXECUTED
2003a98: 92 10 20 62 mov 0x62, %o1 <== NOT EXECUTED
break;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
2003a9c: 13 00 80 72 sethi %hi(0x201c800), %o1 <== NOT EXECUTED
2003aa0: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED
2003aa4: 40 00 37 b1 call 2011968 <fprintf> <== NOT EXECUTED
2003aa8: 92 12 62 a8 or %o1, 0x2a8, %o1 <== NOT EXECUTED
assert(0);
2003aac: 10 bf ff ed b 2003a60 <IMFS_print_jnode+0xfc> <== NOT EXECUTED
2003ab0: 92 10 20 67 mov 0x67, %o1 <== NOT EXECUTED
break;
}
puts("");
2003ab4: 40 00 3e 9e call 201352c <puts>
2003ab8: 91 ee 21 a0 restore %i0, 0x1a0, %o0
020028d4 <IMFS_readlink>:
int IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
size_t bufsize
)
{
20028d4: 9d e3 bf 98 save %sp, -104, %sp
IMFS_jnode_t *node;
int i;
node = loc->node_access;
20028d8: c6 06 00 00 ld [ %i0 ], %g3
if ( node->type != IMFS_SYM_LINK )
20028dc: c2 00 e0 48 ld [ %g3 + 0x48 ], %g1
20028e0: 80 a0 60 04 cmp %g1, 4
20028e4: 02 80 00 0a be 200290c <IMFS_readlink+0x38> <== ALWAYS TAKEN
20028e8: b0 10 20 00 clr %i0
rtems_set_errno_and_return_minus_one( EINVAL );
20028ec: 40 00 33 d4 call 200f83c <__errno> <== NOT EXECUTED
20028f0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20028f4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
20028f8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20028fc: 81 c7 e0 08 ret <== NOT EXECUTED
2002900: 81 e8 00 00 restore <== NOT EXECUTED
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
buf[i] = node->info.sym_link.name[i];
2002904: c2 2e 40 18 stb %g1, [ %i1 + %i0 ]
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
2002908: b0 06 20 01 inc %i0
200290c: 80 a6 00 1a cmp %i0, %i2
2002910: 1a 80 00 07 bcc 200292c <IMFS_readlink+0x58>
2002914: 01 00 00 00 nop
2002918: c2 00 e0 4c ld [ %g3 + 0x4c ], %g1
200291c: c4 48 40 18 ldsb [ %g1 + %i0 ], %g2
2002920: 80 a0 a0 00 cmp %g2, 0
2002924: 12 bf ff f8 bne 2002904 <IMFS_readlink+0x30>
2002928: c2 08 40 18 ldub [ %g1 + %i0 ], %g1
buf[i] = node->info.sym_link.name[i];
return i;
}
200292c: 81 c7 e0 08 ret
2002930: 81 e8 00 00 restore
02009ea4 <IMFS_rmnod>:
*/
int IMFS_rmnod(
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
2009ea4: 9d e3 bf 90 save %sp, -112, %sp
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
2009ea8: 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 ) {
2009eac: c2 04 20 08 ld [ %l0 + 8 ], %g1
2009eb0: 80 a0 60 00 cmp %g1, 0
2009eb4: 22 80 00 06 be,a 2009ecc <IMFS_rmnod+0x28> <== NEVER TAKEN
2009eb8: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
2009ebc: 40 00 06 26 call 200b754 <_Chain_Extract>
2009ec0: 90 10 00 10 mov %l0, %o0
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
2009ec4: c0 24 20 08 clr [ %l0 + 8 ]
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
2009ec8: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1
IMFS_update_ctime( the_jnode );
2009ecc: 92 10 20 00 clr %o1
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
2009ed0: 82 00 7f ff add %g1, -1, %g1
IMFS_update_ctime( the_jnode );
2009ed4: 90 07 bf f0 add %fp, -16, %o0
2009ed8: 40 00 01 4e call 200a410 <gettimeofday>
2009edc: c2 34 20 30 sth %g1, [ %l0 + 0x30 ]
2009ee0: 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) ) {
2009ee4: 90 10 00 10 mov %l0, %o0
2009ee8: 40 00 01 83 call 200a4f4 <rtems_libio_is_file_open>
2009eec: c2 24 20 44 st %g1, [ %l0 + 0x44 ]
2009ef0: 80 a2 20 00 cmp %o0, 0
2009ef4: 12 80 00 18 bne 2009f54 <IMFS_rmnod+0xb0> <== NEVER TAKEN
2009ef8: 01 00 00 00 nop
2009efc: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1
2009f00: 80 a0 60 00 cmp %g1, 0
2009f04: 12 80 00 14 bne 2009f54 <IMFS_rmnod+0xb0> <== NEVER TAKEN
2009f08: 03 00 80 5b sethi %hi(0x2016c00), %g1
/*
* Is rtems_filesystem_current this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
2009f0c: c6 00 62 64 ld [ %g1 + 0x264 ], %g3 ! 2016e64 <rtems_current_user_env>
2009f10: c4 06 00 00 ld [ %i0 ], %g2
2009f14: c2 00 e0 04 ld [ %g3 + 4 ], %g1
2009f18: 80 a0 40 02 cmp %g1, %g2
2009f1c: 22 80 00 02 be,a 2009f24 <IMFS_rmnod+0x80> <== NEVER TAKEN
2009f20: c0 20 e0 04 clr [ %g3 + 4 ] <== NOT EXECUTED
/*
* Free memory associated with a memory file.
*/
if ( the_jnode->type == IMFS_SYM_LINK ) {
2009f24: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
2009f28: 80 a0 60 04 cmp %g1, 4
2009f2c: 12 80 00 08 bne 2009f4c <IMFS_rmnod+0xa8>
2009f30: 01 00 00 00 nop
if ( the_jnode->info.sym_link.name )
2009f34: d0 04 20 4c ld [ %l0 + 0x4c ], %o0
2009f38: 80 a2 20 00 cmp %o0, 0
2009f3c: 02 80 00 04 be 2009f4c <IMFS_rmnod+0xa8> <== NEVER TAKEN
2009f40: 01 00 00 00 nop
free( (void*) the_jnode->info.sym_link.name );
2009f44: 40 00 00 c4 call 200a254 <free>
2009f48: 01 00 00 00 nop
}
free( the_jnode );
2009f4c: 40 00 00 c2 call 200a254 <free>
2009f50: 90 10 00 10 mov %l0, %o0
}
return 0;
}
2009f54: 81 c7 e0 08 ret
2009f58: 91 e8 20 00 restore %g0, 0, %o0
02009f5c <IMFS_stat>:
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
2009f5c: 9d e3 bf 98 save %sp, -104, %sp
IMFS_jnode_t *the_jnode;
IMFS_device_t *io;
the_jnode = loc->node_access;
2009f60: f0 06 00 00 ld [ %i0 ], %i0
switch ( the_jnode->type ) {
2009f64: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
2009f68: 80 a0 60 04 cmp %g1, 4
2009f6c: 22 80 00 19 be,a 2009fd0 <IMFS_stat+0x74> <== NEVER TAKEN
2009f70: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED
2009f74: 14 80 00 07 bg 2009f90 <IMFS_stat+0x34>
2009f78: 80 a0 60 06 cmp %g1, 6
2009f7c: 80 a0 60 02 cmp %g1, 2
2009f80: 12 80 00 0e bne 2009fb8 <IMFS_stat+0x5c> <== NEVER TAKEN
2009f84: 01 00 00 00 nop
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_dev = rtems_filesystem_make_dev_t( io->major, io->minor );
2009f88: 10 80 00 06 b 2009fa0 <IMFS_stat+0x44>
2009f8c: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
2009f90: 14 80 00 0a bg 2009fb8 <IMFS_stat+0x5c> <== NEVER TAKEN
2009f94: 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;
2009f98: 10 80 00 06 b 2009fb0 <IMFS_stat+0x54>
2009f9c: c2 06 20 4c ld [ %i0 + 0x4c ], %g1
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
2009fa0: c4 06 20 4c ld [ %i0 + 0x4c ], %g2
switch ( the_jnode->type ) {
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_dev = rtems_filesystem_make_dev_t( io->major, io->minor );
2009fa4: c2 26 60 04 st %g1, [ %i1 + 4 ]
2009fa8: 10 80 00 0a b 2009fd0 <IMFS_stat+0x74>
2009fac: c4 26 40 00 st %g2, [ %i1 ]
break;
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
2009fb0: 10 80 00 08 b 2009fd0 <IMFS_stat+0x74>
2009fb4: c2 26 60 20 st %g1, [ %i1 + 0x20 ]
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
2009fb8: 40 00 0c 37 call 200d094 <__errno> <== NOT EXECUTED
2009fbc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2009fc0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2009fc4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2009fc8: 81 c7 e0 08 ret <== NOT EXECUTED
2009fcc: 81 e8 00 00 restore <== NOT EXECUTED
break;
}
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
2009fd0: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
break;
}
buf->st_mode = the_jnode->st_mode;
2009fd4: c4 16 20 2e lduh [ %i0 + 0x2e ], %g2
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
2009fd8: c2 26 60 08 st %g1, [ %i1 + 8 ]
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
break;
}
buf->st_mode = the_jnode->st_mode;
2009fdc: c4 36 60 0c sth %g2, [ %i1 + 0xc ]
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;
buf->st_atime = the_jnode->stat_atime;
2009fe0: c2 06 20 3c ld [ %i0 + 0x3c ], %g1
rtems_set_errno_and_return_minus_one( ENOTSUP );
break;
}
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
2009fe4: c4 16 20 30 lduh [ %i0 + 0x30 ], %g2
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;
2009fe8: c2 26 60 24 st %g1, [ %i1 + 0x24 ]
rtems_set_errno_and_return_minus_one( ENOTSUP );
break;
}
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
2009fec: c4 36 60 0e sth %g2, [ %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;
buf->st_mtime = the_jnode->stat_mtime;
2009ff0: c2 06 20 40 ld [ %i0 + 0x40 ], %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;
2009ff4: c4 16 20 38 lduh [ %i0 + 0x38 ], %g2
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
2009ff8: c2 26 60 2c st %g1, [ %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;
2009ffc: c4 36 60 10 sth %g2, [ %i1 + 0x10 ]
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
200a000: c6 06 20 44 ld [ %i0 + 0x44 ], %g3
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;
200a004: 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;
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
200a008: 03 00 80 5a sethi %hi(0x2016800), %g1
200a00c: c2 00 61 4c ld [ %g1 + 0x14c ], %g1 ! 201694c <imfs_rq_memfile_bytes_per_block>
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;
200a010: 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;
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
200a014: c2 26 60 3c st %g1, [ %i1 + 0x3c ]
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
200a018: c6 26 60 34 st %g3, [ %i1 + 0x34 ]
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
return 0;
}
200a01c: 81 c7 e0 08 ret
200a020: 91 e8 20 00 restore %g0, 0, %o0
02002934 <IMFS_symlink>:
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
2002934: 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 );
2002938: 94 07 bf f4 add %fp, -12, %o2
200293c: a0 07 bf c0 add %fp, -64, %l0
2002940: 90 10 00 1a mov %i2, %o0
2002944: 40 00 24 d7 call 200bca0 <IMFS_get_token>
2002948: 92 10 00 10 mov %l0, %o1
/*
* Duplicate link name
*/
info.sym_link.name = strdup( link_name);
200294c: 40 00 3b aa call 20117f4 <strdup>
2002950: 90 10 00 19 mov %i1, %o0
2002954: d0 27 bf e4 st %o0, [ %fp + -28 ]
if (info.sym_link.name == NULL) {
2002958: 80 a2 20 00 cmp %o0, 0
200295c: 12 80 00 08 bne 200297c <IMFS_symlink+0x48> <== ALWAYS TAKEN
2002960: 90 10 00 18 mov %i0, %o0
rtems_set_errno_and_return_minus_one( ENOMEM);
2002964: 40 00 33 b6 call 200f83c <__errno> <== NOT EXECUTED
2002968: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200296c: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
2002970: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2002974: 81 c7 e0 08 ret
2002978: 81 e8 00 00 restore
/*
* Create a new link node.
*/
new_node = IMFS_create_node(
200297c: 94 10 00 10 mov %l0, %o2
2002980: 92 10 20 04 mov 4, %o1
2002984: 17 00 00 28 sethi %hi(0xa000), %o3
2002988: 98 07 bf e4 add %fp, -28, %o4
200298c: 96 12 e1 ff or %o3, 0x1ff, %o3
2002990: 40 00 22 00 call 200b190 <IMFS_create_node>
2002994: b0 10 20 00 clr %i0
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
2002998: 80 a2 20 00 cmp %o0, 0
200299c: 12 bf ff f6 bne 2002974 <IMFS_symlink+0x40> <== ALWAYS TAKEN
20029a0: d0 07 bf e4 ld [ %fp + -28 ], %o0
free( info.sym_link.name);
20029a4: 40 00 02 b3 call 2003470 <free> <== NOT EXECUTED
20029a8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM);
20029ac: 40 00 33 a4 call 200f83c <__errno> <== NOT EXECUTED
20029b0: 01 00 00 00 nop <== NOT EXECUTED
20029b4: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc> <== NOT EXECUTED
20029b8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
}
return 0;
}
20029bc: 81 c7 e0 08 ret <== NOT EXECUTED
20029c0: 81 e8 00 00 restore <== NOT EXECUTED
020029c4 <IMFS_unlink>:
#include <rtems/seterr.h>
int IMFS_unlink(
rtems_filesystem_location_info_t *loc /* IN */
)
{
20029c4: 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;
20029c8: 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 ) {
20029cc: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
20029d0: 80 a0 60 03 cmp %g1, 3
20029d4: 32 80 00 29 bne,a 2002a78 <IMFS_unlink+0xb4>
20029d8: c2 06 20 04 ld [ %i0 + 4 ], %g1
if ( !node->info.hard_link.link_node )
20029dc: e2 04 20 4c ld [ %l0 + 0x4c ], %l1
20029e0: 80 a4 60 00 cmp %l1, 0
20029e4: 12 80 00 08 bne 2002a04 <IMFS_unlink+0x40> <== ALWAYS TAKEN
20029e8: a4 07 bf e0 add %fp, -32, %l2
rtems_set_errno_and_return_minus_one( EINVAL );
20029ec: 40 00 33 94 call 200f83c <__errno> <== NOT EXECUTED
20029f0: 01 00 00 00 nop <== NOT EXECUTED
20029f4: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16> <== NOT EXECUTED
20029f8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20029fc: 10 80 00 22 b 2002a84 <IMFS_unlink+0xc0> <== NOT EXECUTED
2002a00: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
the_link = *loc;
2002a04: 92 10 00 18 mov %i0, %o1
2002a08: 94 10 20 10 mov 0x10, %o2
2002a0c: 40 00 37 b4 call 20108dc <memcpy>
2002a10: 90 10 00 12 mov %l2, %o0
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
2002a14: 90 10 00 12 mov %l2, %o0
2002a18: 40 00 22 39 call 200b2fc <IMFS_Set_handlers>
2002a1c: e2 27 bf e0 st %l1, [ %fp + -32 ]
/*
* If removing the last hard link to a node, then we need
* to remove the node that is a link and the node itself.
*/
if ( node->info.hard_link.link_node->st_nlink == 1)
2002a20: c4 04 20 4c ld [ %l0 + 0x4c ], %g2
2002a24: c2 10 a0 30 lduh [ %g2 + 0x30 ], %g1
2002a28: 80 a0 60 01 cmp %g1, 1
2002a2c: 12 80 00 0b bne 2002a58 <IMFS_unlink+0x94>
2002a30: 82 00 7f ff add %g1, -1, %g1
{
result = (*the_link.handlers->rmnod_h)( &the_link );
2002a34: c2 07 bf e4 ld [ %fp + -28 ], %g1
2002a38: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
2002a3c: 9f c0 40 00 call %g1
2002a40: 90 10 00 12 mov %l2, %o0
if ( result != 0 )
2002a44: 80 a2 20 00 cmp %o0, 0
2002a48: 02 80 00 0b be 2002a74 <IMFS_unlink+0xb0>
2002a4c: 90 10 3f ff mov -1, %o0
*/
result = (*loc->handlers->rmnod_h)( loc );
return result;
}
2002a50: 81 c7 e0 08 ret
2002a54: 91 e8 00 08 restore %g0, %o0, %o0
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
IMFS_update_ctime( node->info.hard_link.link_node );
2002a58: 90 07 bf f0 add %fp, -16, %o0
if ( result != 0 )
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
2002a5c: c2 30 a0 30 sth %g1, [ %g2 + 0x30 ]
IMFS_update_ctime( node->info.hard_link.link_node );
2002a60: 40 00 03 0e call 2003698 <gettimeofday>
2002a64: 92 10 20 00 clr %o1
2002a68: c4 04 20 4c ld [ %l0 + 0x4c ], %g2
2002a6c: c2 07 bf f0 ld [ %fp + -16 ], %g1
2002a70: c2 20 a0 44 st %g1, [ %g2 + 0x44 ]
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( loc );
2002a74: c2 06 20 04 ld [ %i0 + 4 ], %g1
2002a78: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
2002a7c: 9f c0 40 00 call %g1
2002a80: 90 10 00 18 mov %i0, %o0
return result;
}
2002a84: b0 10 00 08 mov %o0, %i0
2002a88: 81 c7 e0 08 ret
2002a8c: 81 e8 00 00 restore
02002a90 <IMFS_unmount>:
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
2002a90: 9d e3 bf 98 save %sp, -104, %sp
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
2002a94: c4 06 20 08 ld [ %i0 + 8 ], %g2
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
2002a98: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1
2002a9c: 80 a0 60 01 cmp %g1, 1
2002aa0: 22 80 00 06 be,a 2002ab8 <IMFS_unmount+0x28> <== ALWAYS TAKEN
2002aa4: c2 00 a0 58 ld [ %g2 + 0x58 ], %g1
rtems_set_errno_and_return_minus_one( ENOTDIR );
2002aa8: 40 00 33 65 call 200f83c <__errno> <== NOT EXECUTED
2002aac: 01 00 00 00 nop <== NOT EXECUTED
2002ab0: 10 80 00 08 b 2002ad0 <IMFS_unmount+0x40> <== NOT EXECUTED
2002ab4: 82 10 20 14 mov 0x14, %g1 ! 14 <PROM_START+0x14> <== NOT EXECUTED
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
2002ab8: 80 a0 60 00 cmp %g1, 0
2002abc: 32 80 00 08 bne,a 2002adc <IMFS_unmount+0x4c> <== ALWAYS TAKEN
2002ac0: c0 20 a0 58 clr [ %g2 + 0x58 ]
rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
2002ac4: 40 00 33 5e call 200f83c <__errno> <== NOT EXECUTED
2002ac8: 01 00 00 00 nop <== NOT EXECUTED
2002acc: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16> <== NOT EXECUTED
2002ad0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2002ad4: 81 c7 e0 08 ret <== NOT EXECUTED
2002ad8: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
*/
node->info.directory.mt_fs = NULL;
return 0;
}
2002adc: 81 c7 e0 08 ret
2002ae0: 91 e8 20 00 restore %g0, 0, %o0
020021e4 <RTEMS_Malloc_Initialize>:
void RTEMS_Malloc_Initialize(
void *start,
size_t length,
size_t sbrk_amount
)
{
20021e4: 9d e3 bf 98 save %sp, -104, %sp
#endif
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers )
20021e8: 03 00 80 5c sethi %hi(0x2017000), %g1
20021ec: c2 00 63 a4 ld [ %g1 + 0x3a4 ], %g1 ! 20173a4 <rtems_malloc_statistics_helpers>
20021f0: 80 a0 60 00 cmp %g1, 0
20021f4: 02 80 00 05 be 2002208 <RTEMS_Malloc_Initialize+0x24> <== ALWAYS TAKEN
20021f8: 01 00 00 00 nop
(*rtems_malloc_statistics_helpers->initialize)();
20021fc: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
2002200: 9f c0 40 00 call %g1 <== NOT EXECUTED
2002204: 01 00 00 00 nop <== NOT EXECUTED
/*
* Initialize the garbage collection list to start with nothing on it.
*/
malloc_deferred_frees_initialize();
2002208: 40 00 21 60 call 200a788 <malloc_deferred_frees_initialize>
200220c: a0 10 00 18 mov %i0, %l0
starting_address = start;
/*
* Initialize the optional sbrk support for extending the heap
*/
if (rtems_malloc_sbrk_helpers) {
2002210: 03 00 80 5c sethi %hi(0x2017000), %g1
2002214: c2 00 63 a8 ld [ %g1 + 0x3a8 ], %g1 ! 20173a8 <rtems_malloc_sbrk_helpers>
2002218: 80 a0 60 00 cmp %g1, 0
200221c: 02 80 00 06 be 2002234 <RTEMS_Malloc_Initialize+0x50> <== ALWAYS TAKEN
2002220: 90 10 00 18 mov %i0, %o0
starting_address = (*rtems_malloc_sbrk_helpers->initialize)(
2002224: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
2002228: 9f c0 40 00 call %g1 <== NOT EXECUTED
200222c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
2002230: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
* of the time under UNIX because zero'ing memory when it is first
* given to a process eliminates the chance of a process seeing data
* left over from another process. This would be a security violation.
*/
if ( rtems_configuration_get_do_zero_of_workspace() )
2002234: 03 00 80 5e sethi %hi(0x2017800), %g1
2002238: c2 00 60 bc ld [ %g1 + 0xbc ], %g1 ! 20178bc <_Configuration_Table>
200223c: c2 08 60 28 ldub [ %g1 + 0x28 ], %g1
2002240: 80 a0 60 00 cmp %g1, 0
2002244: 02 80 00 07 be 2002260 <RTEMS_Malloc_Initialize+0x7c> <== ALWAYS TAKEN
2002248: 92 10 00 10 mov %l0, %o1
memset( starting_address, 0, length );
200224c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2002250: 92 10 20 00 clr %o1 <== NOT EXECUTED
2002254: 40 00 2d bb call 200d940 <memset> <== NOT EXECUTED
2002258: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
void *starting_address,
size_t size,
uint32_t page_size
)
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
200225c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
2002260: 11 00 80 5d sethi %hi(0x2017400), %o0
2002264: 94 10 00 19 mov %i1, %o2
2002268: 90 12 22 50 or %o0, 0x250, %o0
200226c: 40 00 10 aa call 2006514 <_Heap_Initialize>
2002270: 96 10 20 08 mov 8, %o3
&RTEMS_Malloc_Heap,
starting_address,
length,
CPU_HEAP_ALIGNMENT
);
if ( !status )
2002274: 80 a2 20 00 cmp %o0, 0
2002278: 12 80 00 04 bne 2002288 <RTEMS_Malloc_Initialize+0xa4> <== ALWAYS TAKEN
200227c: 05 00 80 5d sethi %hi(0x2017400), %g2
rtems_fatal_error_occurred( status );
2002280: 40 00 0e 51 call 2005bc4 <rtems_fatal_error_occurred> <== NOT EXECUTED
2002284: 01 00 00 00 nop <== NOT EXECUTED
rtems_print_buffer( (start + length) - 48, 48 );
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
#endif
MSBUMP(space_available, length);
2002288: c2 00 a2 a8 ld [ %g2 + 0x2a8 ], %g1
200228c: 82 06 40 01 add %i1, %g1, %g1
2002290: c2 20 a2 a8 st %g1, [ %g2 + 0x2a8 ]
}
2002294: 81 c7 e0 08 ret
2002298: 81 e8 00 00 restore
020026e8 <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
20026e8: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED
void *high_water_mark;
void *current;
Stack_Control *stack;
char name[5];
if ( !the_thread )
20026ec: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
20026f0: 02 80 00 4a be 2002818 <Stack_check_Dump_threads_usage+0x130><== NOT EXECUTED
20026f4: 03 00 80 6d sethi %hi(0x201b400), %g1 <== NOT EXECUTED
return;
if ( !print_handler )
20026f8: e8 00 63 e4 ld [ %g1 + 0x3e4 ], %l4 ! 201b7e4 <print_handler><== NOT EXECUTED
20026fc: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED
2002700: 02 80 00 46 be 2002818 <Stack_check_Dump_threads_usage+0x130><== NOT EXECUTED
2002704: 80 a6 3f ff cmp %i0, -1 <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
if (the_thread == (Thread_Control *) -1) {
2002708: 32 80 00 0b bne,a 2002734 <Stack_check_Dump_threads_usage+0x4c><== NOT EXECUTED
200270c: ec 06 21 50 ld [ %i0 + 0x150 ], %l6 <== NOT EXECUTED
if (Stack_check_Interrupt_stack.area) {
2002710: 03 00 80 6e sethi %hi(0x201b800), %g1 <== NOT EXECUTED
2002714: 96 10 62 70 or %g1, 0x270, %o3 ! 201ba70 <Stack_check_Interrupt_stack><== NOT EXECUTED
2002718: c2 02 e0 04 ld [ %o3 + 4 ], %g1 <== NOT EXECUTED
200271c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2002720: 02 80 00 3e be 2002818 <Stack_check_Dump_threads_usage+0x130><== NOT EXECUTED
2002724: a4 10 00 0b mov %o3, %l2 <== NOT EXECUTED
stack = &Stack_check_Interrupt_stack;
the_thread = 0;
current = 0;
}
else
return;
2002728: b0 10 20 00 clr %i0 <== NOT EXECUTED
200272c: 10 80 00 03 b 2002738 <Stack_check_Dump_threads_usage+0x50><== NOT EXECUTED
2002730: ac 10 20 00 clr %l6 <== NOT EXECUTED
} else {
stack = &the_thread->Start.Initial_stack;
2002734: a4 06 20 c4 add %i0, 0xc4, %l2 <== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
2002738: e0 04 a0 04 ld [ %l2 + 4 ], %l0 <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
200273c: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED
} else {
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
2002740: a0 04 20 10 add %l0, 0x10, %l0 <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
2002744: a6 00 7f f0 add %g1, -16, %l3 <== NOT EXECUTED
high_water_mark = Stack_check_find_high_water_mark(low, size);
2002748: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
200274c: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
2002750: 7f ff ff d6 call 20026a8 <Stack_check_find_high_water_mark><== NOT EXECUTED
2002754: a0 04 00 13 add %l0, %l3, %l0 <== NOT EXECUTED
if ( high_water_mark )
2002758: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200275c: 12 80 00 03 bne 2002768 <Stack_check_Dump_threads_usage+0x80><== NOT EXECUTED
2002760: aa 24 00 08 sub %l0, %o0, %l5 <== NOT EXECUTED
2002764: aa 10 20 00 clr %l5 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
if ( the_thread ) {
2002768: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
200276c: 02 80 00 10 be 20027ac <Stack_check_Dump_threads_usage+0xc4><== NOT EXECUTED
2002770: 03 00 80 6d sethi %hi(0x201b400), %g1 <== NOT EXECUTED
(*print_handler)(
2002774: e0 06 20 08 ld [ %i0 + 8 ], %l0 <== NOT EXECUTED
2002778: e2 00 63 e0 ld [ %g1 + 0x3e0 ], %l1 <== NOT EXECUTED
200277c: 94 07 bf f0 add %fp, -16, %o2 <== NOT EXECUTED
2002780: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2002784: 40 00 0f 47 call 20064a0 <rtems_object_get_name> <== NOT EXECUTED
2002788: 92 10 20 05 mov 5, %o1 <== NOT EXECUTED
200278c: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
2002790: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
2002794: 13 00 80 63 sethi %hi(0x2018c00), %o1 <== NOT EXECUTED
2002798: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
200279c: 9f c5 00 00 call %l4 <== NOT EXECUTED
20027a0: 92 12 62 38 or %o1, 0x238, %o1 <== NOT EXECUTED
);
} else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
(*print_handler)(
20027a4: 10 80 00 08 b 20027c4 <Stack_check_Dump_threads_usage+0xdc><== NOT EXECUTED
20027a8: d6 04 80 00 ld [ %l2 ], %o3 <== NOT EXECUTED
"0x%08" PRIx32 " %4s",
the_thread->Object.id,
rtems_object_get_name( the_thread->Object.id, sizeof(name), name )
);
} else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
20027ac: d0 00 63 e0 ld [ %g1 + 0x3e0 ], %o0 <== NOT EXECUTED
20027b0: 13 00 80 63 sethi %hi(0x2018c00), %o1 <== NOT EXECUTED
20027b4: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED
20027b8: 9f c5 00 00 call %l4 <== NOT EXECUTED
20027bc: 92 12 62 48 or %o1, 0x248, %o1 <== NOT EXECUTED
}
(*print_handler)(
20027c0: d6 04 80 00 ld [ %l2 ], %o3 <== NOT EXECUTED
20027c4: d4 04 a0 04 ld [ %l2 + 4 ], %o2 <== NOT EXECUTED
20027c8: 21 00 80 6d sethi %hi(0x201b400), %l0 <== NOT EXECUTED
20027cc: 23 00 80 6d sethi %hi(0x201b400), %l1 <== NOT EXECUTED
20027d0: c2 04 23 e4 ld [ %l0 + 0x3e4 ], %g1 <== NOT EXECUTED
20027d4: d0 04 63 e0 ld [ %l1 + 0x3e0 ], %o0 <== NOT EXECUTED
20027d8: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED
20027dc: 98 10 00 16 mov %l6, %o4 <== NOT EXECUTED
20027e0: 96 02 80 0b add %o2, %o3, %o3 <== NOT EXECUTED
20027e4: 9a 10 00 13 mov %l3, %o5 <== NOT EXECUTED
20027e8: 13 00 80 63 sethi %hi(0x2018c00), %o1 <== NOT EXECUTED
20027ec: 9f c0 40 00 call %g1 <== NOT EXECUTED
20027f0: 92 12 62 58 or %o1, 0x258, %o1 ! 2018e58 <pollCallbacks.4788+0x330><== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
20027f4: 03 00 80 6d sethi %hi(0x201b400), %g1 <== NOT EXECUTED
20027f8: c2 00 63 dc ld [ %g1 + 0x3dc ], %g1 ! 201b7dc <Stack_check_Initialized><== NOT EXECUTED
20027fc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2002800: 12 80 00 08 bne 2002820 <Stack_check_Dump_threads_usage+0x138><== NOT EXECUTED
2002804: c2 04 23 e4 ld [ %l0 + 0x3e4 ], %g1 <== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
2002808: d0 04 63 e0 ld [ %l1 + 0x3e0 ], %o0 <== NOT EXECUTED
200280c: 13 00 80 63 sethi %hi(0x2018c00), %o1 <== NOT EXECUTED
2002810: 9f c0 40 00 call %g1 <== NOT EXECUTED
2002814: 92 12 62 78 or %o1, 0x278, %o1 ! 2018e78 <pollCallbacks.4788+0x350><== NOT EXECUTED
2002818: 81 c7 e0 08 ret <== NOT EXECUTED
200281c: 81 e8 00 00 restore <== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
2002820: d0 04 63 e0 ld [ %l1 + 0x3e0 ], %o0 <== NOT EXECUTED
2002824: 13 00 80 63 sethi %hi(0x2018c00), %o1 <== NOT EXECUTED
2002828: 94 10 00 15 mov %l5, %o2 <== NOT EXECUTED
200282c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2002830: 92 12 62 88 or %o1, 0x288, %o1 <== NOT EXECUTED
2002834: 81 c7 e0 08 ret <== NOT EXECUTED
2002838: 81 e8 00 00 restore <== NOT EXECUTED
02002a14 <Stack_check_Initialize>:
/*
* Stack_check_Initialize
*/
void Stack_check_Initialize( void )
{
2002a14: 9d e3 bf 98 save %sp, -104, %sp
uint32_t *p;
if (Stack_check_Initialized)
2002a18: 03 00 80 6d sethi %hi(0x201b400), %g1
2002a1c: c2 00 63 dc ld [ %g1 + 0x3dc ], %g1 ! 201b7dc <Stack_check_Initialized>
2002a20: 80 a0 60 00 cmp %g1, 0
2002a24: 12 80 00 23 bne 2002ab0 <Stack_check_Initialize+0x9c>
2002a28: 03 00 80 6f sethi %hi(0x201bc00), %g1
/*
* If appropriate, setup the interrupt stack for high water testing
* also.
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) {
2002a2c: c6 00 60 60 ld [ %g1 + 0x60 ], %g3 ! 201bc60 <_CPU_Interrupt_stack_low>
for ( p = Stack_check_Pattern.pattern;
p < &Stack_check_Pattern.pattern[PATTERN_SIZE_WORDS];
p += 4
) {
p[0] = 0xFEEDF00D; /* FEED FOOD to BAD DOG */
2002a30: 03 3f bb 7c sethi %hi(0xfeedf000), %g1
2002a34: 82 10 60 0d or %g1, 0xd, %g1 ! feedf00d <RAM_END+0xfcadf00d>
2002a38: 05 00 80 6e sethi %hi(0x201b800), %g2
2002a3c: c2 20 a2 60 st %g1, [ %g2 + 0x260 ] ! 201ba60 <Stack_check_Pattern>
p[1] = 0x0BAD0D06;
2002a40: 03 02 eb 43 sethi %hi(0xbad0c00), %g1
2002a44: 82 10 61 06 or %g1, 0x106, %g1 ! bad0d06 <RAM_END+0x96d0d06>
for ( p = Stack_check_Pattern.pattern;
p < &Stack_check_Pattern.pattern[PATTERN_SIZE_WORDS];
p += 4
) {
p[0] = 0xFEEDF00D; /* FEED FOOD to BAD DOG */
2002a48: 84 10 a2 60 or %g2, 0x260, %g2
p[1] = 0x0BAD0D06;
2002a4c: c2 20 a0 04 st %g1, [ %g2 + 4 ]
p[2] = 0xDEADF00D; /* DEAD FOOD GOOD DOG */
2002a50: 03 37 ab 7c sethi %hi(0xdeadf000), %g1
2002a54: 82 10 60 0d or %g1, 0xd, %g1 ! deadf00d <RAM_END+0xdc6df00d>
2002a58: c2 20 a0 08 st %g1, [ %g2 + 8 ]
p[3] = 0x600D0D06;
2002a5c: 03 18 03 43 sethi %hi(0x600d0c00), %g1
2002a60: 82 10 61 06 or %g1, 0x106, %g1 ! 600d0d06 <RAM_END+0x5dcd0d06>
/*
* If appropriate, setup the interrupt stack for high water testing
* also.
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) {
2002a64: 80 a0 e0 00 cmp %g3, 0
2002a68: 02 80 00 0f be 2002aa4 <Stack_check_Initialize+0x90> <== NEVER TAKEN
2002a6c: c2 20 a0 0c st %g1, [ %g2 + 0xc ]
2002a70: 03 00 80 6e sethi %hi(0x201b800), %g1
2002a74: c4 00 63 ac ld [ %g1 + 0x3ac ], %g2 ! 201bbac <_CPU_Interrupt_stack_high>
2002a78: 80 a0 a0 00 cmp %g2, 0
2002a7c: 02 80 00 0a be 2002aa4 <Stack_check_Initialize+0x90> <== NEVER TAKEN
2002a80: 84 20 80 03 sub %g2, %g3, %g2
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
2002a84: 03 00 80 6e sethi %hi(0x201b800), %g1
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
2002a88: c4 20 62 70 st %g2, [ %g1 + 0x270 ] ! 201ba70 <Stack_check_Interrupt_stack>
* If appropriate, setup the interrupt stack for high water testing
* also.
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) {
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
2002a8c: 82 10 62 70 or %g1, 0x270, %g1
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
2002a90: 90 10 00 03 mov %g3, %o0
2002a94: 94 10 00 02 mov %g2, %o2
* If appropriate, setup the interrupt stack for high water testing
* also.
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) {
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
2002a98: c6 20 60 04 st %g3, [ %g1 + 4 ]
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
2002a9c: 40 00 31 7f call 200f098 <memset>
2002aa0: 92 10 20 a5 mov 0xa5, %o1
}
#endif
Stack_check_Initialized = 1;
2002aa4: 84 10 20 01 mov 1, %g2
2002aa8: 03 00 80 6d sethi %hi(0x201b400), %g1
2002aac: c4 20 63 dc st %g2, [ %g1 + 0x3dc ] ! 201b7dc <Stack_check_Initialized>
2002ab0: 81 c7 e0 08 ret
2002ab4: 81 e8 00 00 restore
020026a8 <Stack_check_find_high_water_mark>:
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
20026a8: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED
for (ebase = base + length; base < ebase; base++)
20026ac: 92 0a 7f fc and %o1, -4, %o1 <== NOT EXECUTED
if (*base != U32_PATTERN)
20026b0: 03 29 69 69 sethi %hi(0xa5a5a400), %g1 <== NOT EXECUTED
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
20026b4: 84 02 00 09 add %o0, %o1, %g2 <== NOT EXECUTED
if (*base != U32_PATTERN)
20026b8: 10 80 00 06 b 20026d0 <Stack_check_find_high_water_mark+0x28><== NOT EXECUTED
20026bc: 86 10 61 a5 or %g1, 0x1a5, %g3 <== NOT EXECUTED
20026c0: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED
20026c4: 12 80 00 07 bne 20026e0 <Stack_check_find_high_water_mark+0x38><== NOT EXECUTED
20026c8: 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++)
20026cc: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED
20026d0: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED
20026d4: 2a bf ff fb bcs,a 20026c0 <Stack_check_find_high_water_mark+0x18><== NOT EXECUTED
20026d8: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED
20026dc: 90 10 20 00 clr %o0 <== NOT EXECUTED
if (*base != U32_PATTERN)
return (void *) base;
#endif
return (void *)0;
}
20026e0: 81 c3 e0 08 retl <== NOT EXECUTED
020028b0 <Stack_check_report_blown_task>:
*/
void Stack_check_report_blown_task(
Thread_Control *running,
bool pattern_ok
)
{
20028b0: 9d e3 bf 98 save %sp, -104, %sp
Stack_Control *stack = &running->Start.Initial_stack;
printk(
20028b4: d4 1e 20 08 ldd [ %i0 + 8 ], %o2
20028b8: 92 10 00 18 mov %i0, %o1
20028bc: 11 00 80 63 sethi %hi(0x2018c00), %o0
20028c0: 40 00 05 31 call 2003d84 <printk>
20028c4: 90 12 22 f8 or %o0, 0x2f8, %o0 ! 2018ef8 <pollCallbacks.4788+0x3d0>
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
printk(
20028c8: d4 06 20 c4 ld [ %i0 + 0xc4 ], %o2
20028cc: d2 06 20 c8 ld [ %i0 + 0xc8 ], %o1
20028d0: 96 10 00 0a mov %o2, %o3
20028d4: 11 00 80 63 sethi %hi(0x2018c00), %o0
20028d8: 94 02 bf ff add %o2, -1, %o2
20028dc: 90 12 23 38 or %o0, 0x338, %o0
20028e0: 40 00 05 29 call 2003d84 <printk>
20028e4: 94 02 40 0a add %o1, %o2, %o2
stack->area,
stack->area + stack->size - 1,
stack->size
);
if ( !pattern_ok ) {
20028e8: 80 8e 60 ff btst 0xff, %i1
20028ec: 12 80 00 07 bne 2002908 <Stack_check_report_blown_task+0x58><== NEVER TAKEN
20028f0: 11 00 80 63 sethi %hi(0x2018c00), %o0
printk(
20028f4: d2 06 20 c8 ld [ %i0 + 0xc8 ], %o1
20028f8: 92 02 60 08 add %o1, 8, %o1
20028fc: 90 12 23 68 or %o0, 0x368, %o0
2002900: 40 00 05 21 call 2003d84 <printk>
2002904: 94 10 20 10 mov 0x10, %o2
" Damaged pattern begins at 0x%08lx and is %d bytes long\n",
(unsigned long) Stack_check_Get_pattern_area(stack),
PATTERN_SIZE_BYTES);
}
rtems_fatal_error_occurred( 0x81 );
2002908: 40 00 11 5f call 2006e84 <rtems_fatal_error_occurred>
200290c: 90 10 20 81 mov 0x81, %o0
02005e18 <_API_extensions_Run_postdriver>:
*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
2005e18: 9d e3 bf 98 save %sp, -104, %sp
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
2005e1c: 03 00 80 5e sethi %hi(0x2017800), %g1
2005e20: e0 00 62 64 ld [ %g1 + 0x264 ], %l0 ! 2017a64 <_API_extensions_List>
2005e24: 82 10 62 64 or %g1, 0x264, %g1
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
2005e28: 10 80 00 08 b 2005e48 <_API_extensions_Run_postdriver+0x30>
2005e2c: a2 00 60 04 add %g1, 4, %l1
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->postdriver_hook )
2005e30: 80 a0 60 00 cmp %g1, 0
2005e34: 22 80 00 05 be,a 2005e48 <_API_extensions_Run_postdriver+0x30><== NEVER TAKEN
2005e38: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED
(*the_extension->postdriver_hook)();
2005e3c: 9f c0 40 00 call %g1
2005e40: 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 ) {
2005e44: 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 ) ;
2005e48: 80 a4 00 11 cmp %l0, %l1
2005e4c: 32 bf ff f9 bne,a 2005e30 <_API_extensions_Run_postdriver+0x18>
2005e50: c2 04 20 0c ld [ %l0 + 0xc ], %g1
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->postdriver_hook )
(*the_extension->postdriver_hook)();
}
}
2005e54: 81 c7 e0 08 ret
2005e58: 81 e8 00 00 restore
02005e5c <_API_extensions_Run_postswitch>:
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
2005e5c: 9d e3 bf 98 save %sp, -104, %sp
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
2005e60: 03 00 80 5e sethi %hi(0x2017800), %g1
2005e64: e0 00 62 64 ld [ %g1 + 0x264 ], %l0 ! 2017a64 <_API_extensions_List>
2005e68: 82 10 62 64 or %g1, 0x264, %g1
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
2005e6c: a4 00 60 04 add %g1, 4, %l2
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->postswitch_hook )
(*the_extension->postswitch_hook)( _Thread_Executing );
2005e70: 03 00 80 5e sethi %hi(0x2017800), %g1
2005e74: 10 80 00 08 b 2005e94 <_API_extensions_Run_postswitch+0x38>
2005e78: a2 10 60 e4 or %g1, 0xe4, %l1 ! 20178e4 <_Thread_Executing>
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->postswitch_hook )
2005e7c: 80 a0 60 00 cmp %g1, 0
2005e80: 22 80 00 05 be,a 2005e94 <_API_extensions_Run_postswitch+0x38><== NEVER TAKEN
2005e84: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED
(*the_extension->postswitch_hook)( _Thread_Executing );
2005e88: 9f c0 40 00 call %g1
2005e8c: d0 04 40 00 ld [ %l1 ], %o0
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
2005e90: 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 ) ;
2005e94: 80 a4 00 12 cmp %l0, %l2
2005e98: 32 bf ff f9 bne,a 2005e7c <_API_extensions_Run_postswitch+0x20>
2005e9c: c2 04 20 10 ld [ %l0 + 0x10 ], %g1
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->postswitch_hook )
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
2005ea0: 81 c7 e0 08 ret
2005ea4: 81 e8 00 00 restore
02005dd4 <_API_extensions_Run_predriver>:
*
* _API_extensions_Run_predriver
*/
void _API_extensions_Run_predriver( void )
{
2005dd4: 9d e3 bf 98 save %sp, -104, %sp
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
2005dd8: 03 00 80 5e sethi %hi(0x2017800), %g1
2005ddc: e0 00 62 64 ld [ %g1 + 0x264 ], %l0 ! 2017a64 <_API_extensions_List>
2005de0: 82 10 62 64 or %g1, 0x264, %g1
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
2005de4: 10 80 00 08 b 2005e04 <_API_extensions_Run_predriver+0x30>
2005de8: a2 00 60 04 add %g1, 4, %l1
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->predriver_hook )
2005dec: 80 a0 60 00 cmp %g1, 0
2005df0: 22 80 00 05 be,a 2005e04 <_API_extensions_Run_predriver+0x30><== ALWAYS TAKEN
2005df4: e0 04 00 00 ld [ %l0 ], %l0
(*the_extension->predriver_hook)();
2005df8: 9f c0 40 00 call %g1 <== NOT EXECUTED
2005dfc: 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 ) {
2005e00: 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 ) ;
2005e04: 80 a4 00 11 cmp %l0, %l1
2005e08: 32 bf ff f9 bne,a 2005dec <_API_extensions_Run_predriver+0x18>
2005e0c: c2 04 20 08 ld [ %l0 + 8 ], %g1
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->predriver_hook )
(*the_extension->predriver_hook)();
}
}
2005e10: 81 c7 e0 08 ret
2005e14: 81 e8 00 00 restore
02008034 <_CORE_RWLock_Obtain_for_reading>:
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
2008034: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
2008038: 03 00 80 68 sethi %hi(0x201a000), %g1
* If unlocked, then OK to read.
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
200803c: 7f ff eb 77 call 2002e18 <sparc_disable_interrupts>
2008040: e0 00 63 84 ld [ %g1 + 0x384 ], %l0 ! 201a384 <_Thread_Executing>
2008044: a2 10 00 08 mov %o0, %l1
switch ( the_rwlock->current_state ) {
2008048: c2 06 20 44 ld [ %i0 + 0x44 ], %g1
200804c: 80 a0 60 00 cmp %g1, 0
2008050: 22 80 00 06 be,a 2008068 <_CORE_RWLock_Obtain_for_reading+0x34>
2008054: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
2008058: 80 a0 60 01 cmp %g1, 1
200805c: 12 80 00 16 bne 20080b4 <_CORE_RWLock_Obtain_for_reading+0x80>
2008060: 80 8e a0 ff btst 0xff, %i2
2008064: 30 80 00 06 b,a 200807c <_CORE_RWLock_Obtain_for_reading+0x48>
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
2008068: 84 10 20 01 mov 1, %g2
the_rwlock->number_of_readers += 1;
200806c: 82 00 60 01 inc %g1
*/
_ISR_Disable( level );
switch ( the_rwlock->current_state ) {
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
2008070: c4 26 20 44 st %g2, [ %i0 + 0x44 ]
the_rwlock->number_of_readers += 1;
2008074: c2 26 20 48 st %g1, [ %i0 + 0x48 ]
_ISR_Enable( level );
2008078: 30 80 00 0a b,a 20080a0 <_CORE_RWLock_Obtain_for_reading+0x6c>
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
return;
case CORE_RWLOCK_LOCKED_FOR_READING: {
Thread_Control *waiter;
waiter = _Thread_queue_First( &the_rwlock->Wait_queue );
200807c: 40 00 07 bc call 2009f6c <_Thread_queue_First>
2008080: 90 10 00 18 mov %i0, %o0
if ( !waiter ) {
2008084: 80 a2 20 00 cmp %o0, 0
2008088: 12 80 00 0b bne 20080b4 <_CORE_RWLock_Obtain_for_reading+0x80><== NEVER TAKEN
200808c: 80 8e a0 ff btst 0xff, %i2
the_rwlock->number_of_readers += 1;
2008090: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
2008094: 82 00 60 01 inc %g1
2008098: c2 26 20 48 st %g1, [ %i0 + 0x48 ]
_ISR_Enable( level );
200809c: 90 10 00 11 mov %l1, %o0
20080a0: 7f ff eb 62 call 2002e28 <sparc_enable_interrupts>
20080a4: 01 00 00 00 nop
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
20080a8: c0 24 20 34 clr [ %l0 + 0x34 ]
20080ac: 81 c7 e0 08 ret
20080b0: 81 e8 00 00 restore
/*
* If the thread is not willing to wait, then return immediately.
*/
if ( !wait ) {
20080b4: 12 80 00 08 bne 20080d4 <_CORE_RWLock_Obtain_for_reading+0xa0>
20080b8: 82 10 20 01 mov 1, %g1
_ISR_Enable( level );
20080bc: 7f ff eb 5b call 2002e28 <sparc_enable_interrupts>
20080c0: 90 10 00 11 mov %l1, %o0
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
20080c4: 82 10 20 02 mov 2, %g1
20080c8: c2 24 20 34 st %g1, [ %l0 + 0x34 ]
20080cc: 81 c7 e0 08 ret
20080d0: 81 e8 00 00 restore
* We need to wait to enter this critical section
*/
_Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue );
executing->Wait.queue = &the_rwlock->Wait_queue;
executing->Wait.id = id;
20080d4: f2 24 20 20 st %i1, [ %l0 + 0x20 ]
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
20080d8: c0 24 20 34 clr [ %l0 + 0x34 ]
/*
* We need to wait to enter this critical section
*/
_Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue );
executing->Wait.queue = &the_rwlock->Wait_queue;
20080dc: f0 24 20 44 st %i0, [ %l0 + 0x44 ]
executing->Wait.id = id;
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
20080e0: c0 24 20 30 clr [ %l0 + 0x30 ]
20080e4: c2 26 20 30 st %g1, [ %i0 + 0x30 ]
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
_ISR_Enable( level );
20080e8: 90 10 00 11 mov %l1, %o0
20080ec: 7f ff eb 4f call 2002e28 <sparc_enable_interrupts>
20080f0: 35 00 80 20 sethi %hi(0x2008000), %i2
_Thread_queue_Enqueue_with_handler(
20080f4: b2 10 00 1b mov %i3, %i1
20080f8: 40 00 06 ab call 2009ba4 <_Thread_queue_Enqueue_with_handler>
20080fc: 95 ee a2 88 restore %i2, 0x288, %o2
0200818c <_CORE_RWLock_Release>:
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
200818c: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
2008190: 03 00 80 68 sethi %hi(0x201a000), %g1
* Otherwise, we have to block.
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
2008194: 7f ff eb 21 call 2002e18 <sparc_disable_interrupts>
2008198: e0 00 63 84 ld [ %g1 + 0x384 ], %l0 ! 201a384 <_Thread_Executing>
200819c: 84 10 00 08 mov %o0, %g2
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
20081a0: c2 06 20 44 ld [ %i0 + 0x44 ], %g1
20081a4: 80 a0 60 00 cmp %g1, 0
20081a8: 12 80 00 08 bne 20081c8 <_CORE_RWLock_Release+0x3c> <== ALWAYS TAKEN
20081ac: 80 a0 60 01 cmp %g1, 1
_ISR_Enable( level );
20081b0: 7f ff eb 1e call 2002e28 <sparc_enable_interrupts> <== NOT EXECUTED
20081b4: b0 10 20 00 clr %i0 <== NOT EXECUTED
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
20081b8: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED
20081bc: c2 24 20 34 st %g1, [ %l0 + 0x34 ] <== NOT EXECUTED
20081c0: 81 c7 e0 08 ret <== NOT EXECUTED
20081c4: 81 e8 00 00 restore <== NOT EXECUTED
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
20081c8: 32 80 00 0b bne,a 20081f4 <_CORE_RWLock_Release+0x68>
20081cc: c0 24 20 34 clr [ %l0 + 0x34 ]
the_rwlock->number_of_readers -= 1;
20081d0: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
20081d4: 82 00 7f ff add %g1, -1, %g1
if ( the_rwlock->number_of_readers != 0 ) {
20081d8: 80 a0 60 00 cmp %g1, 0
20081dc: 02 80 00 05 be 20081f0 <_CORE_RWLock_Release+0x64>
20081e0: c2 26 20 48 st %g1, [ %i0 + 0x48 ]
/* must be unlocked again */
_ISR_Enable( level );
20081e4: 7f ff eb 11 call 2002e28 <sparc_enable_interrupts>
20081e8: b0 10 20 00 clr %i0
20081ec: 30 80 00 25 b,a 2008280 <_CORE_RWLock_Release+0xf4>
return CORE_RWLOCK_SUCCESSFUL;
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
20081f0: 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;
20081f4: c0 26 20 44 clr [ %i0 + 0x44 ]
_ISR_Enable( level );
20081f8: 7f ff eb 0c call 2002e28 <sparc_enable_interrupts>
20081fc: 90 10 00 02 mov %g2, %o0
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
2008200: 40 00 06 04 call 2009a10 <_Thread_queue_Dequeue>
2008204: 90 10 00 18 mov %i0, %o0
if ( next ) {
2008208: 80 a2 20 00 cmp %o0, 0
200820c: 22 80 00 1d be,a 2008280 <_CORE_RWLock_Release+0xf4>
2008210: b0 10 20 00 clr %i0
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
2008214: c2 02 20 30 ld [ %o0 + 0x30 ], %g1
2008218: 80 a0 60 01 cmp %g1, 1
200821c: 32 80 00 05 bne,a 2008230 <_CORE_RWLock_Release+0xa4>
2008220: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
2008224: 82 10 20 02 mov 2, %g1
2008228: 10 80 00 15 b 200827c <_CORE_RWLock_Release+0xf0>
200822c: c2 26 20 44 st %g1, [ %i0 + 0x44 ]
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
2008230: 84 10 20 01 mov 1, %g2
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
2008234: 82 00 60 01 inc %g1
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
2008238: c4 26 20 44 st %g2, [ %i0 + 0x44 ]
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
200823c: 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 );
2008240: 40 00 07 4b call 2009f6c <_Thread_queue_First>
2008244: 90 10 00 18 mov %i0, %o0
if ( !next ||
2008248: 80 a2 20 00 cmp %o0, 0
200824c: 22 80 00 0d be,a 2008280 <_CORE_RWLock_Release+0xf4>
2008250: b0 10 20 00 clr %i0
2008254: c2 02 20 30 ld [ %o0 + 0x30 ], %g1
2008258: 80 a0 60 01 cmp %g1, 1
200825c: 02 80 00 08 be 200827c <_CORE_RWLock_Release+0xf0> <== NEVER TAKEN
2008260: 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;
2008264: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
2008268: 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;
200826c: 82 00 60 01 inc %g1
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
2008270: 40 00 06 f0 call 2009e30 <_Thread_queue_Extract>
2008274: c2 26 20 48 st %g1, [ %i0 + 0x48 ]
2008278: 30 bf ff f2 b,a 2008240 <_CORE_RWLock_Release+0xb4>
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
200827c: b0 10 20 00 clr %i0
2008280: 81 c7 e0 08 ret
2008284: 81 e8 00 00 restore
02008288 <_CORE_RWLock_Timeout>:
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
2008288: 9d e3 bf 90 save %sp, -112, %sp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
200828c: 90 10 00 18 mov %i0, %o0
2008290: 40 00 04 fb call 200967c <_Thread_Get>
2008294: 92 07 bf f4 add %fp, -12, %o1
switch ( location ) {
2008298: c2 07 bf f4 ld [ %fp + -12 ], %g1
200829c: 80 a0 60 00 cmp %g1, 0
20082a0: 12 80 00 08 bne 20082c0 <_CORE_RWLock_Timeout+0x38> <== NEVER TAKEN
20082a4: 01 00 00 00 nop
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
20082a8: 40 00 07 77 call 200a084 <_Thread_queue_Process_timeout>
20082ac: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
20082b0: 05 00 80 68 sethi %hi(0x201a000), %g2
20082b4: c2 00 a2 c0 ld [ %g2 + 0x2c0 ], %g1 ! 201a2c0 <_Thread_Dispatch_disable_level>
20082b8: 82 00 7f ff add %g1, -1, %g1
20082bc: c2 20 a2 c0 st %g1, [ %g2 + 0x2c0 ]
20082c0: 81 c7 e0 08 ret
20082c4: 81 e8 00 00 restore
020071b0 <_CORE_barrier_Wait>:
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
20071b0: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
20071b4: 03 00 80 64 sethi %hi(0x2019000), %g1
20071b8: e2 00 61 14 ld [ %g1 + 0x114 ], %l1 ! 2019114 <_Thread_Executing>
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
20071bc: b4 10 00 1c mov %i4, %i2
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
20071c0: c0 24 60 34 clr [ %l1 + 0x34 ]
_ISR_Disable( level );
20071c4: 7f ff ed 50 call 2002704 <sparc_disable_interrupts>
20071c8: a0 10 00 18 mov %i0, %l0
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
20071cc: a4 10 00 19 mov %i1, %l2
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
_ISR_Disable( level );
20071d0: 86 10 00 08 mov %o0, %g3
the_barrier->number_of_waiting_threads++;
20071d4: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
if ( the_barrier->number_of_waiting_threads ==
20071d8: c4 06 20 44 ld [ %i0 + 0x44 ], %g2
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
_ISR_Disable( level );
the_barrier->number_of_waiting_threads++;
20071dc: 82 00 60 01 inc %g1
if ( the_barrier->number_of_waiting_threads ==
20071e0: 80 a0 40 02 cmp %g1, %g2
20071e4: 12 80 00 0b bne 2007210 <_CORE_barrier_Wait+0x60>
20071e8: c2 26 20 48 st %g1, [ %i0 + 0x48 ]
the_barrier->Attributes.maximum_count) {
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
20071ec: c2 06 20 40 ld [ %i0 + 0x40 ], %g1
20071f0: 80 a0 60 00 cmp %g1, 0
20071f4: 12 80 00 08 bne 2007214 <_CORE_barrier_Wait+0x64> <== NEVER TAKEN
20071f8: 82 10 20 01 mov 1, %g1
executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED;
20071fc: c2 24 60 34 st %g1, [ %l1 + 0x34 ]
_ISR_Enable( level );
2007200: 7f ff ed 45 call 2002714 <sparc_enable_interrupts>
2007204: 01 00 00 00 nop
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );
2007208: 40 00 16 1a call 200ca70 <_CORE_barrier_Release>
200720c: 81 e8 00 00 restore
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
2007210: 82 10 20 01 mov 1, %g1
}
}
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
executing->Wait.id = id;
2007214: e4 24 60 20 st %l2, [ %l1 + 0x20 ]
return;
}
}
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
2007218: e0 24 60 44 st %l0, [ %l1 + 0x44 ]
200721c: c2 24 20 30 st %g1, [ %l0 + 0x30 ]
executing->Wait.id = id;
_ISR_Enable( level );
2007220: 90 10 00 03 mov %g3, %o0
2007224: 7f ff ed 3c call 2002714 <sparc_enable_interrupts>
2007228: 35 00 80 24 sethi %hi(0x2009000), %i2
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
200722c: b0 10 00 10 mov %l0, %i0
2007230: b2 10 00 1b mov %i3, %i1
2007234: 40 00 06 f8 call 2008e14 <_Thread_queue_Enqueue_with_handler>
2007238: 95 ee a1 e0 restore %i2, 0x1e0, %o2
02012600 <_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
)
{
2012600: 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 ) {
2012604: 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
)
{
2012608: 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 ) {
201260c: 80 a6 80 01 cmp %i2, %g1
2012610: 18 80 00 17 bgu 201266c <_CORE_message_queue_Broadcast+0x6c><== NEVER TAKEN
2012614: 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 ) {
2012618: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1
201261c: 80 a0 60 00 cmp %g1, 0
2012620: 02 80 00 0a be 2012648 <_CORE_message_queue_Broadcast+0x48><== ALWAYS TAKEN
2012624: a2 10 20 00 clr %l1
*count = 0;
2012628: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED
201262c: 81 c7 e0 08 ret <== NOT EXECUTED
2012630: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
2012634: d0 04 20 2c ld [ %l0 + 0x2c ], %o0
2012638: 40 00 22 36 call 201af10 <memcpy>
201263c: a2 04 60 01 inc %l1
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
2012640: c2 04 20 28 ld [ %l0 + 0x28 ], %g1
2012644: 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))) {
2012648: 40 00 09 d2 call 2014d90 <_Thread_queue_Dequeue>
201264c: 90 10 00 12 mov %l2, %o0
2012650: 92 10 00 19 mov %i1, %o1
2012654: a0 10 00 08 mov %o0, %l0
2012658: 80 a2 20 00 cmp %o0, 0
201265c: 12 bf ff f6 bne 2012634 <_CORE_message_queue_Broadcast+0x34>
2012660: 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;
2012664: e2 27 40 00 st %l1, [ %i5 ]
2012668: b0 10 20 00 clr %i0
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
201266c: 81 c7 e0 08 ret
2012670: 81 e8 00 00 restore
02012350 <_CORE_message_queue_Initialize>:
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Attributes *the_message_queue_attributes,
uint32_t maximum_pending_messages,
size_t maximum_message_size
)
{
2012350: 9d e3 bf 98 save %sp, -104, %sp
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
the_message_queue->number_of_pending_messages = 0;
2012354: c0 26 20 48 clr [ %i0 + 0x48 ]
)
{
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
2012358: 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;
201235c: 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;
2012360: c0 26 20 60 clr [ %i0 + 0x60 ]
the_message_queue->notify_argument = the_argument;
2012364: 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)) {
2012368: 80 8e e0 03 btst 3, %i3
201236c: 02 80 00 07 be 2012388 <_CORE_message_queue_Initialize+0x38>
2012370: a0 10 00 1b mov %i3, %l0
allocated_message_size += sizeof(uint32_t);
2012374: 82 06 e0 04 add %i3, 4, %g1
allocated_message_size &= ~(sizeof(uint32_t) - 1);
2012378: a0 08 7f fc and %g1, -4, %l0
}
if (allocated_message_size < maximum_message_size)
201237c: 80 a4 00 1b cmp %l0, %i3
2012380: 0a 80 00 23 bcs 201240c <_CORE_message_queue_Initialize+0xbc><== NEVER TAKEN
2012384: 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 = (size_t) maximum_pending_messages *
2012388: b6 04 20 14 add %l0, 0x14, %i3
201238c: 92 10 00 1a mov %i2, %o1
2012390: 40 00 29 58 call 201c8f0 <.umul>
2012394: 90 10 00 1b mov %i3, %o0
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
2012398: 80 a2 00 10 cmp %o0, %l0
201239c: 0a 80 00 1c bcs 201240c <_CORE_message_queue_Initialize+0xbc><== NEVER TAKEN
20123a0: 01 00 00 00 nop
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
20123a4: 7f ff f4 2d call 200f458 <_Workspace_Allocate>
20123a8: 01 00 00 00 nop
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
20123ac: 80 a2 20 00 cmp %o0, 0
20123b0: 02 80 00 17 be 201240c <_CORE_message_queue_Initialize+0xbc>
20123b4: d0 26 20 5c st %o0, [ %i0 + 0x5c ]
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
20123b8: 92 10 00 08 mov %o0, %o1
20123bc: 94 10 00 1a mov %i2, %o2
20123c0: 90 06 20 68 add %i0, 0x68, %o0
20123c4: 7f ff ff 8a call 20121ec <_Chain_Initialize>
20123c8: 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(
20123cc: c2 06 40 00 ld [ %i1 ], %g1
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
20123d0: c0 26 20 54 clr [ %i0 + 0x54 ]
20123d4: 82 18 60 01 xor %g1, 1, %g1
20123d8: 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);
20123dc: 82 06 20 54 add %i0, 0x54, %g1
20123e0: c2 26 20 50 st %g1, [ %i0 + 0x50 ]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
20123e4: 82 06 20 50 add %i0, 0x50, %g1
20123e8: 90 10 00 18 mov %i0, %o0
20123ec: c2 26 20 58 st %g1, [ %i0 + 0x58 ]
20123f0: 92 60 3f ff subx %g0, -1, %o1
20123f4: 94 10 20 80 mov 0x80, %o2
20123f8: 96 10 20 06 mov 6, %o3
20123fc: 7f ff f0 ad call 200e6b0 <_Thread_queue_Initialize>
2012400: b0 10 20 01 mov 1, %i0
2012404: 81 c7 e0 08 ret
2012408: 81 e8 00 00 restore
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
201240c: 81 c7 e0 08 ret
2012410: 91 e8 20 00 restore %g0, 0, %o0
0200c4b0 <_CORE_message_queue_Seize>:
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
200c4b0: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
Thread_Control *the_thread;
executing = _Thread_Executing;
200c4b4: 27 00 80 89 sethi %hi(0x2022400), %l3
200c4b8: e2 04 e3 74 ld [ %l3 + 0x374 ], %l1 ! 2022774 <_Thread_Executing>
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
200c4bc: a4 10 00 19 mov %i1, %l2
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
Thread_Control *the_thread;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
200c4c0: c0 24 60 34 clr [ %l1 + 0x34 ]
_ISR_Disable( level );
200c4c4: 7f ff e9 ed call 2006c78 <sparc_disable_interrupts>
200c4c8: a0 10 00 18 mov %i0, %l0
200c4cc: 86 10 00 08 mov %o0, %g3
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
200c4d0: f2 06 20 50 ld [ %i0 + 0x50 ], %i1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
200c4d4: 82 06 20 54 add %i0, 0x54, %g1
200c4d8: 80 a6 40 01 cmp %i1, %g1
200c4dc: 02 80 00 24 be 200c56c <_CORE_message_queue_Seize+0xbc>
200c4e0: 84 06 20 50 add %i0, 0x50, %g2
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
200c4e4: c2 06 40 00 ld [ %i1 ], %g1
the_chain->first = new_first;
200c4e8: c2 26 20 50 st %g1, [ %i0 + 0x50 ]
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
200c4ec: 80 a6 60 00 cmp %i1, 0
200c4f0: 02 80 00 1f be 200c56c <_CORE_message_queue_Seize+0xbc> <== NEVER TAKEN
200c4f4: c4 20 60 04 st %g2, [ %g1 + 4 ]
the_message_queue->number_of_pending_messages -= 1;
200c4f8: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
200c4fc: 82 00 7f ff add %g1, -1, %g1
200c500: c2 26 20 48 st %g1, [ %i0 + 0x48 ]
_ISR_Enable( level );
200c504: 7f ff e9 e1 call 2006c88 <sparc_enable_interrupts>
200c508: a2 06 60 10 add %i1, 0x10, %l1
*size_p = the_message->Contents.size;
200c50c: d4 06 60 0c ld [ %i1 + 0xc ], %o2
_Thread_Executing->Wait.count = the_message->priority;
200c510: c4 04 e3 74 ld [ %l3 + 0x374 ], %g2
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
_ISR_Enable( level );
*size_p = the_message->Contents.size;
200c514: d4 26 c0 00 st %o2, [ %i3 ]
_Thread_Executing->Wait.count = the_message->priority;
200c518: c2 06 60 08 ld [ %i1 + 8 ], %g1
200c51c: c2 20 a0 24 st %g1, [ %g2 + 0x24 ]
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
200c520: 92 10 00 11 mov %l1, %o1
200c524: 40 00 20 9c call 2014794 <memcpy>
200c528: 90 10 00 1a mov %i2, %o0
*
* NOTE: If we note that the queue was not full before this receive,
* then we can avoid this dequeue.
*/
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
200c52c: 40 00 07 44 call 200e23c <_Thread_queue_Dequeue>
200c530: 90 10 00 18 mov %i0, %o0
if ( !the_thread ) {
200c534: 80 a2 20 00 cmp %o0, 0
200c538: 32 80 00 04 bne,a 200c548 <_CORE_message_queue_Seize+0x98>
200c53c: d4 02 20 30 ld [ %o0 + 0x30 ], %o2
RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer (
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Buffer_control *the_message
)
{
_Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node );
200c540: 7f ff ff ab call 200c3ec <_Chain_Append>
200c544: 91 ee 20 68 restore %i0, 0x68, %o0
* There was a thread waiting to send a message. This code
* puts the messages in the message queue on behalf of the
* waiting task.
*/
the_message->priority = the_thread->Wait.count;
200c548: c2 02 20 24 ld [ %o0 + 0x24 ], %g1
the_message->Contents.size = (size_t) the_thread->Wait.option;
200c54c: d4 26 60 0c st %o2, [ %i1 + 0xc ]
* There was a thread waiting to send a message. This code
* puts the messages in the message queue on behalf of the
* waiting task.
*/
the_message->priority = the_thread->Wait.count;
200c550: c2 26 60 08 st %g1, [ %i1 + 8 ]
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
200c554: d2 02 20 2c ld [ %o0 + 0x2c ], %o1
200c558: 40 00 20 8f call 2014794 <memcpy>
200c55c: 90 10 00 11 mov %l1, %o0
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
200c560: f4 06 60 08 ld [ %i1 + 8 ], %i2
200c564: 40 00 17 30 call 2012224 <_CORE_message_queue_Insert_message>
200c568: 81 e8 00 00 restore
the_message->priority
);
return;
}
if ( !wait ) {
200c56c: 80 8f 20 ff btst 0xff, %i4
200c570: 12 80 00 08 bne 200c590 <_CORE_message_queue_Seize+0xe0>
200c574: 82 10 20 01 mov 1, %g1
_ISR_Enable( level );
200c578: 7f ff e9 c4 call 2006c88 <sparc_enable_interrupts>
200c57c: 90 10 00 03 mov %g3, %o0
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
200c580: 82 10 20 04 mov 4, %g1
200c584: c2 24 60 34 st %g1, [ %l1 + 0x34 ]
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
200c588: 81 c7 e0 08 ret
200c58c: 81 e8 00 00 restore
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
200c590: c2 24 20 30 st %g1, [ %l0 + 0x30 ]
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
executing->Wait.return_argument_second.mutable_object = buffer;
executing->Wait.return_argument = size_p;
200c594: f6 24 60 28 st %i3, [ %l1 + 0x28 ]
return;
}
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
200c598: e4 24 60 20 st %l2, [ %l1 + 0x20 ]
executing->Wait.return_argument_second.mutable_object = buffer;
200c59c: f4 24 60 2c st %i2, [ %l1 + 0x2c ]
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
return;
}
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
200c5a0: e0 24 60 44 st %l0, [ %l1 + 0x44 ]
executing->Wait.id = id;
executing->Wait.return_argument_second.mutable_object = buffer;
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
200c5a4: 90 10 00 03 mov %g3, %o0
200c5a8: 7f ff e9 b8 call 2006c88 <sparc_enable_interrupts>
200c5ac: 35 00 80 39 sethi %hi(0x200e400), %i2
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
200c5b0: b0 10 00 10 mov %l0, %i0
200c5b4: b2 10 00 1d mov %i5, %i1
200c5b8: 40 00 07 86 call 200e3d0 <_Thread_queue_Enqueue_with_handler>
200c5bc: 95 ee a3 9c restore %i2, 0x39c, %o2
0200c5c4 <_CORE_message_queue_Submit>:
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
200c5c4: 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 ) {
200c5c8: c2 06 20 4c ld [ %i0 + 0x4c ], %g1
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
200c5cc: 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 ) {
200c5d0: 80 a6 80 01 cmp %i2, %g1
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
200c5d4: e4 0f a0 5f ldub [ %fp + 0x5f ], %l2
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
200c5d8: 18 80 00 3f bgu 200c6d4 <_CORE_message_queue_Submit+0x110>
200c5dc: 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 ) {
200c5e0: c2 04 60 48 ld [ %l1 + 0x48 ], %g1
200c5e4: 80 a0 60 00 cmp %g1, 0
200c5e8: 32 80 00 0f bne,a 200c624 <_CORE_message_queue_Submit+0x60>
200c5ec: c4 04 60 48 ld [ %l1 + 0x48 ], %g2
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
200c5f0: 40 00 07 13 call 200e23c <_Thread_queue_Dequeue>
200c5f4: 90 10 00 11 mov %l1, %o0
if ( the_thread ) {
200c5f8: a0 92 20 00 orcc %o0, 0, %l0
200c5fc: 02 80 00 09 be 200c620 <_CORE_message_queue_Submit+0x5c>
200c600: 92 10 00 19 mov %i1, %o1
200c604: d0 04 20 2c ld [ %l0 + 0x2c ], %o0
200c608: 40 00 20 63 call 2014794 <memcpy>
200c60c: 94 10 00 1a mov %i2, %o2
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
200c610: c2 04 20 28 ld [ %l0 + 0x28 ], %g1
the_thread->Wait.count = submit_type;
200c614: fa 24 20 24 st %i5, [ %l0 + 0x24 ]
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
200c618: 10 80 00 15 b 200c66c <_CORE_message_queue_Submit+0xa8>
200c61c: f4 20 40 00 st %i2, [ %g1 ]
/*
* No one waiting on the message queue at this time, so attempt to
* queue the message up for a future receive.
*/
if ( the_message_queue->number_of_pending_messages <
200c620: c4 04 60 48 ld [ %l1 + 0x48 ], %g2
200c624: c2 04 60 44 ld [ %l1 + 0x44 ], %g1
200c628: 80 a0 80 01 cmp %g2, %g1
200c62c: 1a 80 00 12 bcc 200c674 <_CORE_message_queue_Submit+0xb0>
200c630: 80 a4 a0 00 cmp %l2, 0
RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control *
_CORE_message_queue_Allocate_message_buffer (
CORE_message_queue_Control *the_message_queue
)
{
return (CORE_message_queue_Buffer_control *)
200c634: 40 00 16 de call 20121ac <_Chain_Get>
200c638: 90 04 60 68 add %l1, 0x68, %o0
/*
* NOTE: If the system is consistent, this error should never occur.
*/
if ( !the_message ) {
200c63c: a0 92 20 00 orcc %o0, 0, %l0
200c640: 02 80 00 27 be 200c6dc <_CORE_message_queue_Submit+0x118> <== NEVER TAKEN
200c644: 92 10 00 19 mov %i1, %o1
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
200c648: 94 10 00 1a mov %i2, %o2
200c64c: 40 00 20 52 call 2014794 <memcpy>
200c650: 90 04 20 10 add %l0, 0x10, %o0
size
);
the_message->Contents.size = size;
the_message->priority = submit_type;
_CORE_message_queue_Insert_message(
200c654: 90 10 00 11 mov %l1, %o0
_CORE_message_queue_Copy_buffer(
buffer,
the_message->Contents.buffer,
size
);
the_message->Contents.size = size;
200c658: f4 24 20 0c st %i2, [ %l0 + 0xc ]
the_message->priority = submit_type;
200c65c: fa 24 20 08 st %i5, [ %l0 + 8 ]
_CORE_message_queue_Insert_message(
200c660: 92 10 00 10 mov %l0, %o1
200c664: 40 00 16 f0 call 2012224 <_CORE_message_queue_Insert_message>
200c668: 94 10 00 1d mov %i5, %o2
200c66c: 81 c7 e0 08 ret
200c670: 91 e8 20 00 restore %g0, 0, %o0
* No message buffers were available so we may need to return an
* overflow error or block the sender until the message is placed
* on the queue.
*/
if ( !wait ) {
200c674: 02 80 00 18 be 200c6d4 <_CORE_message_queue_Submit+0x110>
200c678: 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() ) {
200c67c: 03 00 80 89 sethi %hi(0x2022400), %g1
200c680: c2 00 63 50 ld [ %g1 + 0x350 ], %g1 ! 2022750 <_ISR_Nest_level>
200c684: 80 a0 60 00 cmp %g1, 0
200c688: 32 80 00 13 bne,a 200c6d4 <_CORE_message_queue_Submit+0x110><== NEVER TAKEN
200c68c: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED
* it as a variable. Doing this emphasizes how dangerous it
* would be to use this variable prior to here.
*/
{
Thread_Control *executing = _Thread_Executing;
200c690: 03 00 80 89 sethi %hi(0x2022400), %g1
_ISR_Disable( level );
200c694: 7f ff e9 79 call 2006c78 <sparc_disable_interrupts>
200c698: e0 00 63 74 ld [ %g1 + 0x374 ], %l0 ! 2022774 <_Thread_Executing>
200c69c: 82 10 20 01 mov 1, %g1
200c6a0: c2 24 60 30 st %g1, [ %l1 + 0x30 ]
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
executing->Wait.return_argument_second.immutable_object = buffer;
executing->Wait.option = (uint32_t) size;
executing->Wait.count = submit_type;
200c6a4: 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;
200c6a8: f6 24 20 20 st %i3, [ %l0 + 0x20 ]
executing->Wait.return_argument_second.immutable_object = buffer;
200c6ac: f2 24 20 2c st %i1, [ %l0 + 0x2c ]
executing->Wait.option = (uint32_t) size;
200c6b0: 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;
200c6b4: e2 24 20 44 st %l1, [ %l0 + 0x44 ]
executing->Wait.id = id;
executing->Wait.return_argument_second.immutable_object = buffer;
executing->Wait.option = (uint32_t) size;
executing->Wait.count = submit_type;
_ISR_Enable( level );
200c6b8: 7f ff e9 74 call 2006c88 <sparc_enable_interrupts>
200c6bc: b0 10 20 07 mov 7, %i0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
200c6c0: d2 07 a0 60 ld [ %fp + 0x60 ], %o1
200c6c4: 90 10 00 11 mov %l1, %o0
200c6c8: 15 00 80 39 sethi %hi(0x200e400), %o2
200c6cc: 40 00 07 41 call 200e3d0 <_Thread_queue_Enqueue_with_handler>
200c6d0: 94 12 a3 9c or %o2, 0x39c, %o2 ! 200e79c <_Thread_queue_Timeout>
200c6d4: 81 c7 e0 08 ret
200c6d8: 81 e8 00 00 restore
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
200c6dc: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED
}
200c6e0: 81 c7 e0 08 ret <== NOT EXECUTED
200c6e4: 81 e8 00 00 restore <== NOT EXECUTED
02005ffc <_CORE_mutex_Initialize>:
CORE_mutex_Status _CORE_mutex_Initialize(
CORE_mutex_Control *the_mutex,
CORE_mutex_Attributes *the_mutex_attributes,
uint32_t initial_lock
)
{
2005ffc: 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;
2006000: 94 10 20 10 mov 0x10, %o2
2006004: 90 06 20 40 add %i0, 0x40, %o0
2006008: 40 00 1e 15 call 200d85c <memcpy>
200600c: 92 10 00 19 mov %i1, %o1
the_mutex->lock = initial_lock;
2006010: f4 26 20 50 st %i2, [ %i0 + 0x50 ]
the_mutex->blocked_count = 0;
2006014: c0 26 20 58 clr [ %i0 + 0x58 ]
if ( initial_lock == CORE_MUTEX_LOCKED ) {
2006018: 80 a6 a0 00 cmp %i2, 0
200601c: 12 80 00 18 bne 200607c <_CORE_mutex_Initialize+0x80>
2006020: a0 10 00 18 mov %i0, %l0
the_mutex->nest_count = 1;
the_mutex->holder = _Thread_Executing;
2006024: 03 00 80 5e sethi %hi(0x2017800), %g1
2006028: c6 00 60 e4 ld [ %g1 + 0xe4 ], %g3 ! 20178e4 <_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;
200602c: 82 10 20 01 mov 1, %g1
2006030: c2 26 20 54 st %g1, [ %i0 + 0x54 ]
the_mutex->holder = _Thread_Executing;
the_mutex->holder_id = _Thread_Executing->Object.id;
2006034: c2 00 e0 08 ld [ %g3 + 8 ], %g1
*/
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority(
CORE_mutex_Attributes *the_attribute
)
{
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
2006038: c4 06 20 48 ld [ %i0 + 0x48 ], %g2
200603c: c2 26 20 60 st %g1, [ %i0 + 0x60 ]
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
2006040: 80 a0 a0 02 cmp %g2, 2
2006044: 02 80 00 05 be 2006058 <_CORE_mutex_Initialize+0x5c>
2006048: c6 26 20 5c st %g3, [ %i0 + 0x5c ]
200604c: 80 a0 a0 03 cmp %g2, 3
2006050: 32 80 00 0f bne,a 200608c <_CORE_mutex_Initialize+0x90> <== ALWAYS TAKEN
2006054: c2 06 60 08 ld [ %i1 + 8 ], %g1
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
if ( _Thread_Executing->current_priority <
2006058: c4 00 e0 14 ld [ %g3 + 0x14 ], %g2
200605c: c2 04 20 4c ld [ %l0 + 0x4c ], %g1
2006060: 80 a0 80 01 cmp %g2, %g1
2006064: 0a 80 00 11 bcs 20060a8 <_CORE_mutex_Initialize+0xac> <== NEVER TAKEN
2006068: b0 10 20 06 mov 6, %i0
_Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = _Thread_Executing->current_priority;
#endif
_Thread_Executing->resource_count++;
200606c: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1
2006070: 82 00 60 01 inc %g1
2006074: 10 80 00 05 b 2006088 <_CORE_mutex_Initialize+0x8c>
2006078: c2 20 e0 1c st %g1, [ %g3 + 0x1c ]
}
} else {
the_mutex->nest_count = 0;
200607c: c0 26 20 54 clr [ %i0 + 0x54 ]
the_mutex->holder = NULL;
2006080: c0 26 20 5c clr [ %i0 + 0x5c ]
the_mutex->holder_id = 0;
2006084: c0 26 20 60 clr [ %i0 + 0x60 ]
}
_Thread_queue_Initialize(
2006088: c2 06 60 08 ld [ %i1 + 8 ], %g1
200608c: 90 10 00 10 mov %l0, %o0
2006090: 80 a0 00 01 cmp %g0, %g1
2006094: 94 10 24 00 mov 0x400, %o2
2006098: 92 40 20 00 addx %g0, 0, %o1
200609c: 96 10 20 05 mov 5, %o3
20060a0: 40 00 07 ad call 2007f54 <_Thread_queue_Initialize>
20060a4: b0 10 20 00 clr %i0
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
20060a8: 81 c7 e0 08 ret
20060ac: 81 e8 00 00 restore
02006114 <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
2006114: 9d e3 bf 98 save %sp, -104, %sp
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
2006118: 03 00 80 5e sethi %hi(0x2017800), %g1
200611c: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 ! 2017820 <_Thread_Dispatch_disable_level>
2006120: 80 a0 60 00 cmp %g1, 0
2006124: 02 80 00 0d be 2006158 <_CORE_mutex_Seize+0x44>
2006128: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
200612c: 80 8e a0 ff btst 0xff, %i2
2006130: 02 80 00 0b be 200615c <_CORE_mutex_Seize+0x48> <== NEVER TAKEN
2006134: 90 10 00 18 mov %i0, %o0
2006138: 03 00 80 5e sethi %hi(0x2017800), %g1
200613c: c2 00 61 c4 ld [ %g1 + 0x1c4 ], %g1 ! 20179c4 <_System_state_Current>
2006140: 80 a0 60 01 cmp %g1, 1
2006144: 08 80 00 05 bleu 2006158 <_CORE_mutex_Seize+0x44>
2006148: 90 10 20 00 clr %o0
200614c: 92 10 20 00 clr %o1
2006150: 40 00 01 7b call 200673c <_Internal_error_Occurred>
2006154: 94 10 20 13 mov 0x13, %o2
2006158: 90 10 00 18 mov %i0, %o0
200615c: 40 00 15 a6 call 200b7f4 <_CORE_mutex_Seize_interrupt_trylock>
2006160: 92 07 a0 54 add %fp, 0x54, %o1
2006164: 80 a2 20 00 cmp %o0, 0
2006168: 02 80 00 09 be 200618c <_CORE_mutex_Seize+0x78>
200616c: 80 8e a0 ff btst 0xff, %i2
2006170: 12 80 00 09 bne 2006194 <_CORE_mutex_Seize+0x80>
2006174: 39 00 80 5e sethi %hi(0x2017800), %i4
2006178: 7f ff ef 01 call 2001d7c <sparc_enable_interrupts>
200617c: d0 07 a0 54 ld [ %fp + 0x54 ], %o0
2006180: c4 07 20 e4 ld [ %i4 + 0xe4 ], %g2
2006184: 82 10 20 01 mov 1, %g1
2006188: c2 20 a0 34 st %g1, [ %g2 + 0x34 ]
200618c: 81 c7 e0 08 ret
2006190: 81 e8 00 00 restore
2006194: c6 07 20 e4 ld [ %i4 + 0xe4 ], %g3
2006198: 05 00 80 5e sethi %hi(0x2017800), %g2
200619c: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 ! 2017820 <_Thread_Dispatch_disable_level>
20061a0: f2 20 e0 20 st %i1, [ %g3 + 0x20 ]
20061a4: 82 00 60 01 inc %g1
20061a8: f0 20 e0 44 st %i0, [ %g3 + 0x44 ]
20061ac: c2 20 a0 20 st %g1, [ %g2 + 0x20 ]
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
20061b0: 82 10 20 01 mov 1, %g1
20061b4: c2 26 20 30 st %g1, [ %i0 + 0x30 ]
20061b8: 7f ff ee f1 call 2001d7c <sparc_enable_interrupts>
20061bc: d0 07 a0 54 ld [ %fp + 0x54 ], %o0
20061c0: 90 10 00 18 mov %i0, %o0
20061c4: 7f ff ff bb call 20060b0 <_CORE_mutex_Seize_interrupt_blocking>
20061c8: 92 10 00 1b mov %i3, %o1
20061cc: 81 c7 e0 08 ret
20061d0: 81 e8 00 00 restore
0200b7f4 <_CORE_mutex_Seize_interrupt_trylock>:
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
int _CORE_mutex_Seize_interrupt_trylock(
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
200b7f4: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *executing;
ISR_Level level = *level_p;
/* disabled when you get here */
executing = _Thread_Executing;
200b7f8: 03 00 80 5e sethi %hi(0x2017800), %g1
200b7fc: c4 00 60 e4 ld [ %g1 + 0xe4 ], %g2 ! 20178e4 <_Thread_Executing>
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
Thread_Control *executing;
ISR_Level level = *level_p;
200b800: d0 06 40 00 ld [ %i1 ], %o0
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
200b804: c0 20 a0 34 clr [ %g2 + 0x34 ]
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
200b808: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
200b80c: 80 a0 60 00 cmp %g1, 0
200b810: 22 80 00 32 be,a 200b8d8 <_CORE_mutex_Seize_interrupt_trylock+0xe4>
200b814: c6 06 20 5c ld [ %i0 + 0x5c ], %g3
the_mutex->lock = CORE_MUTEX_LOCKED;
200b818: c0 26 20 50 clr [ %i0 + 0x50 ]
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
200b81c: c2 00 a0 08 ld [ %g2 + 8 ], %g1
*/
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority(
CORE_mutex_Attributes *the_attribute
)
{
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
200b820: c6 06 20 48 ld [ %i0 + 0x48 ], %g3
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
200b824: c2 26 20 60 st %g1, [ %i0 + 0x60 ]
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
200b828: c4 26 20 5c st %g2, [ %i0 + 0x5c ]
the_mutex->holder_id = executing->Object.id;
the_mutex->nest_count = 1;
200b82c: 82 10 20 01 mov 1, %g1
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
200b830: 80 a0 e0 02 cmp %g3, 2
200b834: 02 80 00 05 be 200b848 <_CORE_mutex_Seize_interrupt_trylock+0x54>
200b838: c2 26 20 54 st %g1, [ %i0 + 0x54 ]
200b83c: 80 a0 e0 03 cmp %g3, 3
200b840: 32 80 00 06 bne,a 200b858 <_CORE_mutex_Seize_interrupt_trylock+0x64>
200b844: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
200b848: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1
200b84c: 82 00 60 01 inc %g1
200b850: c2 20 a0 1c st %g1, [ %g2 + 0x1c ]
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
200b854: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
200b858: 80 a0 60 03 cmp %g1, 3
200b85c: 22 80 00 03 be,a 200b868 <_CORE_mutex_Seize_interrupt_trylock+0x74>
200b860: c6 06 20 4c ld [ %i0 + 0x4c ], %g3
_ISR_Enable( level );
200b864: 30 80 00 2c b,a 200b914 <_CORE_mutex_Seize_interrupt_trylock+0x120>
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
200b868: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1
if ( current == ceiling ) {
200b86c: 80 a0 40 03 cmp %g1, %g3
200b870: 12 80 00 03 bne 200b87c <_CORE_mutex_Seize_interrupt_trylock+0x88><== ALWAYS TAKEN
200b874: 01 00 00 00 nop
_ISR_Enable( level );
200b878: 30 80 00 27 b,a 200b914 <_CORE_mutex_Seize_interrupt_trylock+0x120><== NOT EXECUTED
return 0;
}
if ( current > ceiling ) {
200b87c: 08 80 00 0f bleu 200b8b8 <_CORE_mutex_Seize_interrupt_trylock+0xc4>
200b880: 82 10 20 06 mov 6, %g1
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
200b884: 05 00 80 5e sethi %hi(0x2017800), %g2
200b888: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 ! 2017820 <_Thread_Dispatch_disable_level>
200b88c: 82 00 60 01 inc %g1
200b890: c2 20 a0 20 st %g1, [ %g2 + 0x20 ]
_Thread_Disable_dispatch();
_ISR_Enable( level );
200b894: 7f ff d9 3a call 2001d7c <sparc_enable_interrupts>
200b898: 01 00 00 00 nop
_Thread_Change_priority(
200b89c: d2 06 20 4c ld [ %i0 + 0x4c ], %o1
200b8a0: d0 06 20 5c ld [ %i0 + 0x5c ], %o0
200b8a4: 7f ff ee 0f call 20070e0 <_Thread_Change_priority>
200b8a8: 94 10 20 00 clr %o2
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
FALSE
);
_Thread_Enable_dispatch();
200b8ac: 7f ff ef 9b call 2007718 <_Thread_Enable_dispatch>
200b8b0: b0 10 20 00 clr %i0
200b8b4: 30 80 00 1a b,a 200b91c <_CORE_mutex_Seize_interrupt_trylock+0x128>
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
200b8b8: c2 20 a0 34 st %g1, [ %g2 + 0x34 ]
the_mutex->lock = CORE_MUTEX_UNLOCKED;
200b8bc: 82 10 20 01 mov 1, %g1
the_mutex->nest_count = 0; /* undo locking above */
200b8c0: c0 26 20 54 clr [ %i0 + 0x54 ]
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
the_mutex->lock = CORE_MUTEX_UNLOCKED;
200b8c4: c2 26 20 50 st %g1, [ %i0 + 0x50 ]
the_mutex->nest_count = 0; /* undo locking above */
executing->resource_count--; /* undo locking above */
200b8c8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1
200b8cc: 82 00 7f ff add %g1, -1, %g1
200b8d0: c2 20 a0 1c st %g1, [ %g2 + 0x1c ]
_ISR_Enable( level );
200b8d4: 30 80 00 10 b,a 200b914 <_CORE_mutex_Seize_interrupt_trylock+0x120>
/*
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
200b8d8: 80 a0 c0 02 cmp %g3, %g2
200b8dc: 12 80 00 12 bne 200b924 <_CORE_mutex_Seize_interrupt_trylock+0x130>
200b8e0: 01 00 00 00 nop
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
200b8e4: c2 06 20 40 ld [ %i0 + 0x40 ], %g1
200b8e8: 80 a0 60 00 cmp %g1, 0
200b8ec: 22 80 00 07 be,a 200b908 <_CORE_mutex_Seize_interrupt_trylock+0x114>
200b8f0: c2 06 20 54 ld [ %i0 + 0x54 ], %g1
200b8f4: 80 a0 60 01 cmp %g1, 1
200b8f8: 12 80 00 0b bne 200b924 <_CORE_mutex_Seize_interrupt_trylock+0x130>
200b8fc: 82 10 20 02 mov 2, %g1
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
_ISR_Enable( level );
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
200b900: 10 80 00 05 b 200b914 <_CORE_mutex_Seize_interrupt_trylock+0x120>
200b904: c2 20 e0 34 st %g1, [ %g3 + 0x34 ]
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
200b908: 82 00 60 01 inc %g1
200b90c: c2 26 20 54 st %g1, [ %i0 + 0x54 ]
_ISR_Enable( level );
200b910: 30 80 00 01 b,a 200b914 <_CORE_mutex_Seize_interrupt_trylock+0x120>
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
_ISR_Enable( level );
200b914: 7f ff d9 1a call 2001d7c <sparc_enable_interrupts>
200b918: b0 10 20 00 clr %i0
200b91c: 81 c7 e0 08 ret
200b920: 81 e8 00 00 restore
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
200b924: 81 c7 e0 08 ret
200b928: 91 e8 20 01 restore %g0, 1, %o0
020061d4 <_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
)
{
20061d4: 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 ) {
20061d8: c2 0e 20 44 ldub [ %i0 + 0x44 ], %g1
CORE_mutex_Status _CORE_mutex_Surrender(
CORE_mutex_Control *the_mutex,
Objects_Id id,
CORE_mutex_API_mp_support_callout api_mutex_mp_support
)
{
20061dc: 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 ) {
20061e0: 80 a0 60 00 cmp %g1, 0
20061e4: 02 80 00 07 be 2006200 <_CORE_mutex_Surrender+0x2c>
20061e8: d0 06 20 5c ld [ %i0 + 0x5c ], %o0
if ( !_Thread_Is_executing( holder ) )
20061ec: 03 00 80 5e sethi %hi(0x2017800), %g1
20061f0: c2 00 60 e4 ld [ %g1 + 0xe4 ], %g1 ! 20178e4 <_Thread_Executing>
20061f4: 80 a2 00 01 cmp %o0, %g1
20061f8: 12 80 00 52 bne 2006340 <_CORE_mutex_Surrender+0x16c>
20061fc: 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 )
2006200: c2 04 20 54 ld [ %l0 + 0x54 ], %g1
2006204: 80 a0 60 00 cmp %g1, 0
2006208: 02 80 00 4d be 200633c <_CORE_mutex_Surrender+0x168>
200620c: 82 00 7f ff add %g1, -1, %g1
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
if ( the_mutex->nest_count != 0 ) {
2006210: 80 a0 60 00 cmp %g1, 0
2006214: 02 80 00 09 be 2006238 <_CORE_mutex_Surrender+0x64>
2006218: c2 24 20 54 st %g1, [ %l0 + 0x54 ]
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
200621c: c2 04 20 40 ld [ %l0 + 0x40 ], %g1
2006220: 80 a0 60 00 cmp %g1, 0
2006224: 02 80 00 47 be 2006340 <_CORE_mutex_Surrender+0x16c> <== ALWAYS TAKEN
2006228: b0 10 20 00 clr %i0
200622c: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED
2006230: 02 80 00 44 be 2006340 <_CORE_mutex_Surrender+0x16c> <== NOT EXECUTED
2006234: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED
2006238: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
/*
* Formally release the mutex before possibly transferring it to a
* blocked thread.
*/
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
200623c: 80 a0 60 02 cmp %g1, 2
2006240: 02 80 00 04 be 2006250 <_CORE_mutex_Surrender+0x7c>
2006244: 80 a0 60 03 cmp %g1, 3
2006248: 32 80 00 07 bne,a 2006264 <_CORE_mutex_Surrender+0x90>
200624c: c0 24 20 5c clr [ %l0 + 0x5c ]
the_mutex->nest_count++;
return CORE_MUTEX_RELEASE_NOT_ORDER;
}
first_node = _Chain_Get_first_unprotected(&holder->lock_mutex);
#endif
holder->resource_count--;
2006250: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
2006254: 82 00 7f ff add %g1, -1, %g1
2006258: c2 22 20 1c st %g1, [ %o0 + 0x1c ]
200625c: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
}
the_mutex->holder = NULL;
2006260: 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 ) ||
2006264: 80 a0 60 02 cmp %g1, 2
2006268: 02 80 00 05 be 200627c <_CORE_mutex_Surrender+0xa8>
200626c: c0 24 20 60 clr [ %l0 + 0x60 ]
2006270: 80 a0 60 03 cmp %g1, 3
2006274: 12 80 00 0d bne 20062a8 <_CORE_mutex_Surrender+0xd4>
2006278: 01 00 00 00 nop
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
if(the_mutex->queue.priority_before != holder->current_priority)
_Thread_Change_priority(holder,the_mutex->queue.priority_before,TRUE);
#endif
if ( holder->resource_count == 0 &&
200627c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
2006280: 80 a0 60 00 cmp %g1, 0
2006284: 12 80 00 09 bne 20062a8 <_CORE_mutex_Surrender+0xd4>
2006288: 01 00 00 00 nop
200628c: d2 02 20 18 ld [ %o0 + 0x18 ], %o1
2006290: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
2006294: 80 a2 40 01 cmp %o1, %g1
2006298: 02 80 00 04 be 20062a8 <_CORE_mutex_Surrender+0xd4>
200629c: 01 00 00 00 nop
holder->real_priority != holder->current_priority ) {
_Thread_Change_priority( holder, holder->real_priority, TRUE );
20062a0: 40 00 03 90 call 20070e0 <_Thread_Change_priority>
20062a4: 94 10 20 01 mov 1, %o2 ! 1 <PROM_START+0x1>
/*
* 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 ) ) ) {
20062a8: 40 00 06 0e call 2007ae0 <_Thread_queue_Dequeue>
20062ac: 90 10 00 10 mov %l0, %o0
20062b0: 86 92 20 00 orcc %o0, 0, %g3
20062b4: 02 80 00 1f be 2006330 <_CORE_mutex_Surrender+0x15c>
20062b8: 82 10 20 01 mov 1, %g1
} else
#endif
{
the_mutex->holder = the_thread;
the_mutex->holder_id = the_thread->Object.id;
20062bc: c2 00 e0 08 ld [ %g3 + 8 ], %g1
the_mutex->nest_count = 1;
switch ( the_mutex->Attributes.discipline ) {
20062c0: c4 04 20 48 ld [ %l0 + 0x48 ], %g2
} else
#endif
{
the_mutex->holder = the_thread;
the_mutex->holder_id = the_thread->Object.id;
20062c4: c2 24 20 60 st %g1, [ %l0 + 0x60 ]
} else
#endif
{
the_mutex->holder = the_thread;
20062c8: c6 24 20 5c st %g3, [ %l0 + 0x5c ]
the_mutex->holder_id = the_thread->Object.id;
the_mutex->nest_count = 1;
20062cc: 82 10 20 01 mov 1, %g1
switch ( the_mutex->Attributes.discipline ) {
20062d0: 80 a0 a0 02 cmp %g2, 2
20062d4: 02 80 00 07 be 20062f0 <_CORE_mutex_Surrender+0x11c>
20062d8: c2 24 20 54 st %g1, [ %l0 + 0x54 ]
20062dc: 80 a0 a0 03 cmp %g2, 3
20062e0: 12 80 00 18 bne 2006340 <_CORE_mutex_Surrender+0x16c>
20062e4: b0 10 20 00 clr %i0
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
_Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue);
the_mutex->queue.priority_before = the_thread->current_priority;
#endif
the_thread->resource_count++;
20062e8: 10 80 00 07 b 2006304 <_CORE_mutex_Surrender+0x130>
20062ec: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
_Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue);
the_mutex->queue.priority_before = the_thread->current_priority;
#endif
the_thread->resource_count++;
20062f0: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1
20062f4: 82 00 60 01 inc %g1
20062f8: c2 20 e0 1c st %g1, [ %g3 + 0x1c ]
20062fc: 81 c7 e0 08 ret
2006300: 91 e8 20 00 restore %g0, 0, %o0
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
_Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue);
the_mutex->queue.priority_before = the_thread->current_priority;
#endif
the_thread->resource_count++;
if (the_mutex->Attributes.priority_ceiling <
2006304: c4 00 e0 14 ld [ %g3 + 0x14 ], %g2
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
_Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue);
the_mutex->queue.priority_before = the_thread->current_priority;
#endif
the_thread->resource_count++;
2006308: 82 00 60 01 inc %g1
200630c: c2 20 e0 1c st %g1, [ %g3 + 0x1c ]
if (the_mutex->Attributes.priority_ceiling <
2006310: d2 04 20 4c ld [ %l0 + 0x4c ], %o1
2006314: 80 a2 40 02 cmp %o1, %g2
2006318: 3a 80 00 0a bcc,a 2006340 <_CORE_mutex_Surrender+0x16c> <== NEVER TAKEN
200631c: b0 10 20 00 clr %i0 <== NOT EXECUTED
the_thread->current_priority){
_Thread_Change_priority(
2006320: 40 00 03 70 call 20070e0 <_Thread_Change_priority>
2006324: 94 10 20 00 clr %o2
}
break;
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
2006328: 81 c7 e0 08 ret
200632c: 91 e8 20 00 restore %g0, 0, %o0
2006330: c2 24 20 50 st %g1, [ %l0 + 0x50 ]
2006334: 81 c7 e0 08 ret
2006338: 91 e8 20 00 restore %g0, 0, %o0
200633c: b0 10 20 00 clr %i0
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
2006340: 81 c7 e0 08 ret
2006344: 81 e8 00 00 restore
02006394 <_CORE_semaphore_Surrender>:
CORE_semaphore_Status _CORE_semaphore_Surrender(
CORE_semaphore_Control *the_semaphore,
Objects_Id id,
CORE_semaphore_API_mp_support_callout api_semaphore_mp_support
)
{
2006394: 9d e3 bf 98 save %sp, -104, %sp
2006398: a0 10 00 18 mov %i0, %l0
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
200639c: b0 10 20 00 clr %i0
20063a0: 40 00 05 d0 call 2007ae0 <_Thread_queue_Dequeue>
20063a4: 90 10 00 10 mov %l0, %o0
20063a8: 80 a2 20 00 cmp %o0, 0
20063ac: 12 80 00 0e bne 20063e4 <_CORE_semaphore_Surrender+0x50>
20063b0: 01 00 00 00 nop
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
20063b4: 7f ff ee 6e call 2001d6c <sparc_disable_interrupts>
20063b8: 01 00 00 00 nop
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
20063bc: c4 04 20 48 ld [ %l0 + 0x48 ], %g2
20063c0: c2 04 20 40 ld [ %l0 + 0x40 ], %g1
20063c4: 80 a0 80 01 cmp %g2, %g1
20063c8: 1a 80 00 05 bcc 20063dc <_CORE_semaphore_Surrender+0x48> <== NEVER TAKEN
20063cc: b0 10 20 04 mov 4, %i0
the_semaphore->count += 1;
20063d0: 82 00 a0 01 add %g2, 1, %g1
20063d4: b0 10 20 00 clr %i0
20063d8: c2 24 20 48 st %g1, [ %l0 + 0x48 ]
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
20063dc: 7f ff ee 68 call 2001d7c <sparc_enable_interrupts>
20063e0: 01 00 00 00 nop
}
return status;
}
20063e4: 81 c7 e0 08 ret
20063e8: 81 e8 00 00 restore
02006d84 <_CORE_spinlock_Release>:
*/
CORE_spinlock_Status _CORE_spinlock_Release(
CORE_spinlock_Control *the_spinlock
)
{
2006d84: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
_ISR_Disable( level );
2006d88: 7f ff ed d1 call 20024cc <sparc_disable_interrupts>
2006d8c: 01 00 00 00 nop
/*
* It must locked before it can be unlocked.
*/
if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
2006d90: c2 06 20 04 ld [ %i0 + 4 ], %g1
2006d94: 80 a0 60 00 cmp %g1, 0
2006d98: 12 80 00 06 bne 2006db0 <_CORE_spinlock_Release+0x2c>
2006d9c: 03 00 80 4d sethi %hi(0x2013400), %g1
_ISR_Enable( level );
2006da0: 7f ff ed cf call 20024dc <sparc_enable_interrupts>
2006da4: b0 10 20 06 mov 6, %i0
2006da8: 81 c7 e0 08 ret
2006dac: 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 ) {
2006db0: c2 00 63 94 ld [ %g1 + 0x394 ], %g1
2006db4: c4 06 20 0c ld [ %i0 + 0xc ], %g2
2006db8: c2 00 60 08 ld [ %g1 + 8 ], %g1
2006dbc: 80 a0 80 01 cmp %g2, %g1
2006dc0: 02 80 00 06 be 2006dd8 <_CORE_spinlock_Release+0x54> <== ALWAYS TAKEN
2006dc4: 01 00 00 00 nop
_ISR_Enable( level );
2006dc8: 7f ff ed c5 call 20024dc <sparc_enable_interrupts> <== NOT EXECUTED
2006dcc: b0 10 20 02 mov 2, %i0 ! 2 <PROM_START+0x2> <== NOT EXECUTED
2006dd0: 81 c7 e0 08 ret <== NOT EXECUTED
2006dd4: 81 e8 00 00 restore <== NOT EXECUTED
}
/*
* Let it be unlocked.
*/
the_spinlock->users -= 1;
2006dd8: c2 06 20 08 ld [ %i0 + 8 ], %g1
2006ddc: 82 00 7f ff add %g1, -1, %g1
2006de0: c2 26 20 08 st %g1, [ %i0 + 8 ]
the_spinlock->lock = CORE_SPINLOCK_UNLOCKED;
2006de4: c0 26 20 04 clr [ %i0 + 4 ]
the_spinlock->holder = 0;
2006de8: c0 26 20 0c clr [ %i0 + 0xc ]
_ISR_Enable( level );
2006dec: 7f ff ed bc call 20024dc <sparc_enable_interrupts>
2006df0: b0 10 20 00 clr %i0
return CORE_SPINLOCK_SUCCESSFUL;
}
2006df4: 81 c7 e0 08 ret
2006df8: 81 e8 00 00 restore
02006dfc <_CORE_spinlock_Wait>:
CORE_spinlock_Status _CORE_spinlock_Wait(
CORE_spinlock_Control *the_spinlock,
bool wait,
Watchdog_Interval timeout
)
{
2006dfc: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout;
2006e00: 03 00 80 4e sethi %hi(0x2013800), %g1
2006e04: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 ! 2013824 <_Watchdog_Ticks_since_boot>
_ISR_Disable( level );
2006e08: 7f ff ed b1 call 20024cc <sparc_disable_interrupts>
2006e0c: a2 06 80 01 add %i2, %g1, %l1
2006e10: 86 10 00 08 mov %o0, %g3
if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) &&
2006e14: c2 06 20 04 ld [ %i0 + 4 ], %g1
2006e18: 80 a0 60 01 cmp %g1, 1
2006e1c: 12 80 00 0c bne 2006e4c <_CORE_spinlock_Wait+0x50>
2006e20: 03 00 80 4d sethi %hi(0x2013400), %g1
2006e24: c2 00 63 94 ld [ %g1 + 0x394 ], %g1 ! 2013794 <_Thread_Executing>
2006e28: c4 06 20 0c ld [ %i0 + 0xc ], %g2
2006e2c: c2 00 60 08 ld [ %g1 + 8 ], %g1
2006e30: 80 a0 80 01 cmp %g2, %g1
2006e34: 12 80 00 06 bne 2006e4c <_CORE_spinlock_Wait+0x50>
2006e38: 01 00 00 00 nop
(the_spinlock->holder == _Thread_Executing->Object.id) ) {
_ISR_Enable( level );
2006e3c: 7f ff ed a8 call 20024dc <sparc_enable_interrupts>
2006e40: b0 10 20 01 mov 1, %i0 ! 1 <PROM_START+0x1>
2006e44: 81 c7 e0 08 ret
2006e48: 81 e8 00 00 restore
return CORE_SPINLOCK_HOLDER_RELOCKING;
}
the_spinlock->users += 1;
2006e4c: c2 06 20 08 ld [ %i0 + 8 ], %g1
}
/*
* Spinlock is unavailable. If not willing to wait, return.
*/
if ( !wait ) {
2006e50: b2 0e 60 ff and %i1, 0xff, %i1
if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) &&
(the_spinlock->holder == _Thread_Executing->Object.id) ) {
_ISR_Enable( level );
return CORE_SPINLOCK_HOLDER_RELOCKING;
}
the_spinlock->users += 1;
2006e54: 82 00 60 01 inc %g1
2006e58: c2 26 20 08 st %g1, [ %i0 + 8 ]
}
/*
* They are willing to wait but there could be a timeout.
*/
if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) {
2006e5c: 03 00 80 4e sethi %hi(0x2013800), %g1
2006e60: a4 10 60 24 or %g1, 0x24, %l2 ! 2013824 <_Watchdog_Ticks_since_boot>
2006e64: 03 00 80 4d sethi %hi(0x2013400), %g1
2006e68: a0 10 62 d0 or %g1, 0x2d0, %l0 ! 20136d0 <_Thread_Dispatch_disable_level>
_ISR_Enable( level );
return CORE_SPINLOCK_HOLDER_RELOCKING;
}
the_spinlock->users += 1;
for ( ;; ) {
if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
2006e6c: c2 06 20 04 ld [ %i0 + 4 ], %g1
2006e70: 80 a0 60 00 cmp %g1, 0
2006e74: 12 80 00 0d bne 2006ea8 <_CORE_spinlock_Wait+0xac>
2006e78: 80 a6 60 00 cmp %i1, 0
the_spinlock->lock = CORE_SPINLOCK_LOCKED;
the_spinlock->holder = _Thread_Executing->Object.id;
2006e7c: 03 00 80 4d sethi %hi(0x2013400), %g1
2006e80: c4 00 63 94 ld [ %g1 + 0x394 ], %g2 ! 2013794 <_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;
2006e84: 82 10 20 01 mov 1, %g1
2006e88: c2 26 20 04 st %g1, [ %i0 + 4 ]
the_spinlock->holder = _Thread_Executing->Object.id;
2006e8c: c2 00 a0 08 ld [ %g2 + 8 ], %g1
2006e90: c2 26 20 0c st %g1, [ %i0 + 0xc ]
_ISR_Enable( level );
2006e94: b0 10 20 00 clr %i0
2006e98: 7f ff ed 91 call 20024dc <sparc_enable_interrupts>
2006e9c: 90 10 00 03 mov %g3, %o0
2006ea0: 81 c7 e0 08 ret
2006ea4: 81 e8 00 00 restore
}
/*
* Spinlock is unavailable. If not willing to wait, return.
*/
if ( !wait ) {
2006ea8: 12 80 00 0a bne 2006ed0 <_CORE_spinlock_Wait+0xd4> <== ALWAYS TAKEN
2006eac: 80 a6 a0 00 cmp %i2, 0
the_spinlock->users -= 1;
2006eb0: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED
2006eb4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
2006eb8: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED
_ISR_Enable( level );
2006ebc: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED
2006ec0: 7f ff ed 87 call 20024dc <sparc_enable_interrupts> <== NOT EXECUTED
2006ec4: 90 10 00 03 mov %g3, %o0 <== NOT EXECUTED
2006ec8: 81 c7 e0 08 ret <== NOT EXECUTED
2006ecc: 81 e8 00 00 restore <== NOT EXECUTED
}
/*
* They are willing to wait but there could be a timeout.
*/
if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) {
2006ed0: 02 80 00 0e be 2006f08 <_CORE_spinlock_Wait+0x10c> <== ALWAYS TAKEN
2006ed4: 01 00 00 00 nop
2006ed8: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED
2006edc: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED
2006ee0: 18 80 00 0a bgu 2006f08 <_CORE_spinlock_Wait+0x10c> <== NOT EXECUTED
2006ee4: 01 00 00 00 nop <== NOT EXECUTED
the_spinlock->users -= 1;
2006ee8: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED
2006eec: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
2006ef0: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED
_ISR_Enable( level );
2006ef4: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED
2006ef8: 7f ff ed 79 call 20024dc <sparc_enable_interrupts> <== NOT EXECUTED
2006efc: 90 10 00 03 mov %g3, %o0 <== NOT EXECUTED
2006f00: 81 c7 e0 08 ret <== NOT EXECUTED
2006f04: 81 e8 00 00 restore <== NOT EXECUTED
*
* A spinlock cannot be deleted while it is being used so we are
* safe from deletion.
*/
_ISR_Enable( level );
2006f08: 7f ff ed 75 call 20024dc <sparc_enable_interrupts>
2006f0c: 90 10 00 03 mov %g3, %o0
/* An ISR could occur here */
_Thread_Enable_dispatch();
2006f10: 40 00 04 a7 call 20081ac <_Thread_Enable_dispatch>
2006f14: 01 00 00 00 nop
2006f18: c2 04 00 00 ld [ %l0 ], %g1
2006f1c: 82 00 60 01 inc %g1
2006f20: c2 24 00 00 st %g1, [ %l0 ]
/* Another thread could get dispatched here */
/* Reenter the critical sections so we can attempt the lock again. */
_Thread_Disable_dispatch();
_ISR_Disable( level );
2006f24: 7f ff ed 6a call 20024cc <sparc_disable_interrupts>
2006f28: 01 00 00 00 nop
2006f2c: 86 10 00 08 mov %o0, %g3
2006f30: 30 bf ff cf b,a 2006e6c <_CORE_spinlock_Wait+0x70>
0200b6e8 <_Debug_Is_enabled>:
*/
bool _Debug_Is_enabled(
rtems_debug_control level
)
{
200b6e8: 03 00 80 5e sethi %hi(0x2017800), %g1 <== NOT EXECUTED
200b6ec: c2 00 60 e8 ld [ %g1 + 0xe8 ], %g1 ! 20178e8 <_Debug_Level><== NOT EXECUTED
200b6f0: 90 0a 00 01 and %o0, %g1, %o0 <== NOT EXECUTED
200b6f4: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED
return (_Debug_Level & level) ? true : false;
}
200b6f8: 81 c3 e0 08 retl <== NOT EXECUTED
200b6fc: 90 40 20 00 addx %g0, 0, %o0 <== NOT EXECUTED
02004e70 <_Event_Seize>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
2004e70: 9d e3 bf 98 save %sp, -104, %sp
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
2004e74: 03 00 80 5e sethi %hi(0x2017800), %g1
2004e78: e0 00 60 e4 ld [ %g1 + 0xe4 ], %l0 ! 20178e4 <_Thread_Executing>
executing->Wait.return_code = RTEMS_SUCCESSFUL;
2004e7c: c0 24 20 34 clr [ %l0 + 0x34 ]
api = executing->API_Extensions[ THREAD_API_RTEMS ];
_ISR_Disable( level );
2004e80: 7f ff f3 bb call 2001d6c <sparc_disable_interrupts>
2004e84: e4 04 21 68 ld [ %l0 + 0x168 ], %l2
pending_events = api->pending_events;
2004e88: c2 04 80 00 ld [ %l2 ], %g1
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
2004e8c: a2 8e 00 01 andcc %i0, %g1, %l1
2004e90: 02 80 00 0e be 2004ec8 <_Event_Seize+0x58>
2004e94: 80 8e 60 01 btst 1, %i1
2004e98: 80 a4 40 18 cmp %l1, %i0
2004e9c: 02 80 00 04 be 2004eac <_Event_Seize+0x3c>
2004ea0: 80 8e 60 02 btst 2, %i1
2004ea4: 02 80 00 09 be 2004ec8 <_Event_Seize+0x58> <== NEVER TAKEN
2004ea8: 80 8e 60 01 btst 1, %i1
(seized_events == event_in || _Options_Is_any( option_set )) ) {
api->pending_events =
2004eac: 82 28 40 11 andn %g1, %l1, %g1
2004eb0: c2 24 80 00 st %g1, [ %l2 ]
_Event_sets_Clear( pending_events, seized_events );
_ISR_Enable( level );
2004eb4: 7f ff f3 b2 call 2001d7c <sparc_enable_interrupts>
2004eb8: 01 00 00 00 nop
2004ebc: e2 26 c0 00 st %l1, [ %i3 ]
2004ec0: 81 c7 e0 08 ret
2004ec4: 81 e8 00 00 restore
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
2004ec8: 02 80 00 09 be 2004eec <_Event_Seize+0x7c>
2004ecc: 84 10 20 01 mov 1, %g2
_ISR_Enable( level );
2004ed0: 7f ff f3 ab call 2001d7c <sparc_enable_interrupts>
2004ed4: 01 00 00 00 nop
executing->Wait.return_code = RTEMS_UNSATISFIED;
2004ed8: 82 10 20 0d mov 0xd, %g1 ! d <PROM_START+0xd>
2004edc: c2 24 20 34 st %g1, [ %l0 + 0x34 ]
*event_out = seized_events;
2004ee0: e2 26 c0 00 st %l1, [ %i3 ]
2004ee4: 81 c7 e0 08 ret
2004ee8: 81 e8 00 00 restore
return;
}
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
2004eec: 03 00 80 60 sethi %hi(0x2018000), %g1
executing->Wait.option = (uint32_t) option_set;
2004ef0: f2 24 20 30 st %i1, [ %l0 + 0x30 ]
executing->Wait.count = (uint32_t) event_in;
2004ef4: f0 24 20 24 st %i0, [ %l0 + 0x24 ]
executing->Wait.return_argument = event_out;
2004ef8: f6 24 20 28 st %i3, [ %l0 + 0x28 ]
executing->Wait.return_code = RTEMS_UNSATISFIED;
*event_out = seized_events;
return;
}
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
2004efc: c4 20 61 40 st %g2, [ %g1 + 0x140 ]
executing->Wait.option = (uint32_t) option_set;
executing->Wait.count = (uint32_t) event_in;
executing->Wait.return_argument = event_out;
_ISR_Enable( level );
2004f00: 7f ff f3 9f call 2001d7c <sparc_enable_interrupts>
2004f04: 01 00 00 00 nop
if ( ticks ) {
2004f08: 80 a6 a0 00 cmp %i2, 0
2004f0c: 02 80 00 0f be 2004f48 <_Event_Seize+0xd8>
2004f10: 90 10 00 10 mov %l0, %o0
_Watchdog_Initialize(
2004f14: c2 04 20 08 ld [ %l0 + 8 ], %g1
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2004f18: 11 00 80 5e sethi %hi(0x2017800), %o0
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
2004f1c: c2 24 20 68 st %g1, [ %l0 + 0x68 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2004f20: 03 00 80 14 sethi %hi(0x2005000), %g1
2004f24: 82 10 61 18 or %g1, 0x118, %g1 ! 2005118 <_Event_Timeout>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2004f28: f4 24 20 54 st %i2, [ %l0 + 0x54 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2004f2c: c0 24 20 50 clr [ %l0 + 0x50 ]
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
2004f30: c0 24 20 6c clr [ %l0 + 0x6c ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2004f34: c2 24 20 64 st %g1, [ %l0 + 0x64 ]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2004f38: 90 12 21 04 or %o0, 0x104, %o0
2004f3c: 40 00 0e 6d call 20088f0 <_Watchdog_Insert>
2004f40: 92 04 20 48 add %l0, 0x48, %o1
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
2004f44: 90 10 00 10 mov %l0, %o0
2004f48: 40 00 0c 68 call 20080e8 <_Thread_Set_state>
2004f4c: 92 10 21 00 mov 0x100, %o1
_ISR_Disable( level );
2004f50: 7f ff f3 87 call 2001d6c <sparc_disable_interrupts>
2004f54: 01 00 00 00 nop
sync_state = _Event_Sync_state;
2004f58: 03 00 80 60 sethi %hi(0x2018000), %g1
2004f5c: f0 00 61 40 ld [ %g1 + 0x140 ], %i0 ! 2018140 <_Event_Sync_state>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
2004f60: c0 20 61 40 clr [ %g1 + 0x140 ]
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
2004f64: 80 a6 20 01 cmp %i0, 1
2004f68: 12 80 00 04 bne 2004f78 <_Event_Seize+0x108>
2004f6c: b2 10 00 10 mov %l0, %i1
_ISR_Enable( level );
2004f70: 7f ff f3 83 call 2001d7c <sparc_enable_interrupts>
2004f74: 91 e8 00 08 restore %g0, %o0, %o0
* An interrupt completed the thread's blocking request.
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
2004f78: 40 00 08 45 call 200708c <_Thread_blocking_operation_Cancel>
2004f7c: 95 e8 00 08 restore %g0, %o0, %o2
02004fdc <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
2004fdc: 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 ];
2004fe0: e0 06 21 68 ld [ %i0 + 0x168 ], %l0
option_set = (rtems_option) the_thread->Wait.option;
_ISR_Disable( level );
2004fe4: 7f ff f3 62 call 2001d6c <sparc_disable_interrupts>
2004fe8: e2 06 20 30 ld [ %i0 + 0x30 ], %l1
2004fec: b2 10 00 08 mov %o0, %i1
pending_events = api->pending_events;
2004ff0: c8 04 00 00 ld [ %l0 ], %g4
event_condition = (rtems_event_set) the_thread->Wait.count;
2004ff4: c4 06 20 24 ld [ %i0 + 0x24 ], %g2
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
2004ff8: 86 88 80 04 andcc %g2, %g4, %g3
2004ffc: 12 80 00 03 bne 2005008 <_Event_Surrender+0x2c>
2005000: 03 00 80 5e sethi %hi(0x2017800), %g1
_ISR_Enable( level );
2005004: 30 80 00 42 b,a 200510c <_Event_Surrender+0x130>
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
2005008: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1 ! 20178c0 <_ISR_Nest_level>
200500c: 80 a0 60 00 cmp %g1, 0
2005010: 22 80 00 1e be,a 2005088 <_Event_Surrender+0xac>
2005014: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
2005018: 03 00 80 5e sethi %hi(0x2017800), %g1
200501c: c2 00 60 e4 ld [ %g1 + 0xe4 ], %g1 ! 20178e4 <_Thread_Executing>
2005020: 80 a6 00 01 cmp %i0, %g1
2005024: 32 80 00 19 bne,a 2005088 <_Event_Surrender+0xac>
2005028: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
200502c: 1b 00 80 60 sethi %hi(0x2018000), %o5
2005030: c2 03 61 40 ld [ %o5 + 0x140 ], %g1 ! 2018140 <_Event_Sync_state>
2005034: 80 a0 60 01 cmp %g1, 1
2005038: 02 80 00 07 be 2005054 <_Event_Surrender+0x78>
200503c: 80 a0 c0 02 cmp %g3, %g2
2005040: c2 03 61 40 ld [ %o5 + 0x140 ], %g1
2005044: 80 a0 60 02 cmp %g1, 2
2005048: 32 80 00 10 bne,a 2005088 <_Event_Surrender+0xac> <== ALWAYS TAKEN
200504c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
2005050: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED
2005054: 02 80 00 04 be 2005064 <_Event_Surrender+0x88> <== ALWAYS TAKEN
2005058: 80 8c 60 02 btst 2, %l1
200505c: 02 80 00 0a be 2005084 <_Event_Surrender+0xa8> <== NOT EXECUTED
2005060: 01 00 00 00 nop <== NOT EXECUTED
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
2005064: 82 29 00 03 andn %g4, %g3, %g1
2005068: c2 24 00 00 st %g1, [ %l0 ]
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
200506c: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
2005070: c0 26 20 24 clr [ %i0 + 0x24 ]
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
2005074: c6 20 40 00 st %g3, [ %g1 ]
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
2005078: 84 10 20 03 mov 3, %g2
200507c: 03 00 80 60 sethi %hi(0x2018000), %g1
2005080: c4 20 61 40 st %g2, [ %g1 + 0x140 ] ! 2018140 <_Event_Sync_state>
}
_ISR_Enable( level );
2005084: 30 80 00 22 b,a 200510c <_Event_Surrender+0x130>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
2005088: 80 88 61 00 btst 0x100, %g1
200508c: 02 80 00 20 be 200510c <_Event_Surrender+0x130> <== NEVER TAKEN
2005090: 80 a0 c0 02 cmp %g3, %g2
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
2005094: 02 80 00 04 be 20050a4 <_Event_Surrender+0xc8>
2005098: 80 8c 60 02 btst 2, %l1
200509c: 02 80 00 1c be 200510c <_Event_Surrender+0x130> <== NEVER TAKEN
20050a0: 01 00 00 00 nop
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
20050a4: 82 29 00 03 andn %g4, %g3, %g1
20050a8: c2 24 00 00 st %g1, [ %l0 ]
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
20050ac: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
the_thread->Wait.count = 0;
20050b0: c0 26 20 24 clr [ %i0 + 0x24 ]
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
20050b4: c6 20 40 00 st %g3, [ %g1 ]
_ISR_Flash( level );
20050b8: 7f ff f3 31 call 2001d7c <sparc_enable_interrupts>
20050bc: 90 10 00 19 mov %i1, %o0
20050c0: 7f ff f3 2b call 2001d6c <sparc_disable_interrupts>
20050c4: 01 00 00 00 nop
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
20050c8: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
20050cc: 80 a0 60 02 cmp %g1, 2
20050d0: 02 80 00 06 be 20050e8 <_Event_Surrender+0x10c>
20050d4: 82 10 20 03 mov 3, %g1
_ISR_Enable( level );
20050d8: 7f ff f3 29 call 2001d7c <sparc_enable_interrupts>
20050dc: 90 10 00 19 mov %i1, %o0
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
20050e0: 10 80 00 08 b 2005100 <_Event_Surrender+0x124>
20050e4: 33 04 00 ff sethi %hi(0x1003fc00), %i1
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
20050e8: c2 26 20 50 st %g1, [ %i0 + 0x50 ]
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
20050ec: 7f ff f3 24 call 2001d7c <sparc_enable_interrupts>
20050f0: 90 10 00 19 mov %i1, %o0
(void) _Watchdog_Remove( &the_thread->Timer );
20050f4: 40 00 0e 59 call 2008a58 <_Watchdog_Remove>
20050f8: 90 06 20 48 add %i0, 0x48, %o0
20050fc: 33 04 00 ff sethi %hi(0x1003fc00), %i1
2005100: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <RAM_END+0xdc3fff8>
2005104: 40 00 08 6f call 20072c0 <_Thread_Clear_state>
2005108: 81 e8 00 00 restore
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
200510c: 7f ff f3 1c call 2001d7c <sparc_enable_interrupts>
2005110: 91 e8 00 19 restore %g0, %i1, %o0
02005118 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
2005118: 9d e3 bf 90 save %sp, -112, %sp
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
200511c: 90 10 00 18 mov %i0, %o0
2005120: 40 00 09 8b call 200774c <_Thread_Get>
2005124: 92 07 bf f4 add %fp, -12, %o1
switch ( location ) {
2005128: c2 07 bf f4 ld [ %fp + -12 ], %g1
200512c: 80 a0 60 00 cmp %g1, 0
2005130: 12 80 00 0f bne 200516c <_Event_Timeout+0x54> <== NEVER TAKEN
2005134: b0 10 00 08 mov %o0, %i0
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
_ISR_Disable( level );
2005138: 7f ff f3 0d call 2001d6c <sparc_disable_interrupts>
200513c: 01 00 00 00 nop
2005140: 86 10 00 08 mov %o0, %g3
if ( !the_thread->Wait.count ) { /* verify thread is waiting */
2005144: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
2005148: 80 a0 60 00 cmp %g1, 0
200514c: 12 80 00 0a bne 2005174 <_Event_Timeout+0x5c> <== ALWAYS TAKEN
2005150: 03 00 80 5e sethi %hi(0x2017800), %g1
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
2005154: 05 00 80 5e sethi %hi(0x2017800), %g2 <== NOT EXECUTED
2005158: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 ! 2017820 <_Thread_Dispatch_disable_level><== NOT EXECUTED
200515c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
2005160: c2 20 a0 20 st %g1, [ %g2 + 0x20 ] <== NOT EXECUTED
_Thread_Unnest_dispatch();
_ISR_Enable( level );
2005164: 7f ff f3 06 call 2001d7c <sparc_enable_interrupts> <== NOT EXECUTED
2005168: 01 00 00 00 nop <== NOT EXECUTED
200516c: 81 c7 e0 08 ret <== NOT EXECUTED
2005170: 81 e8 00 00 restore <== NOT EXECUTED
return;
}
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
2005174: c2 00 60 e4 ld [ %g1 + 0xe4 ], %g1
2005178: 80 a6 00 01 cmp %i0, %g1
200517c: 12 80 00 09 bne 20051a0 <_Event_Timeout+0x88>
2005180: c0 26 20 24 clr [ %i0 + 0x24 ]
Thread_blocking_operation_States sync = _Event_Sync_state;
2005184: 05 00 80 60 sethi %hi(0x2018000), %g2
2005188: c2 00 a1 40 ld [ %g2 + 0x140 ], %g1 ! 2018140 <_Event_Sync_state>
if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) ||
200518c: 80 a0 60 01 cmp %g1, 1
2005190: 18 80 00 05 bgu 20051a4 <_Event_Timeout+0x8c> <== NEVER TAKEN
2005194: 82 10 20 06 mov 6, %g1
(sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) {
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
2005198: 82 10 20 02 mov 2, %g1
200519c: c2 20 a1 40 st %g1, [ %g2 + 0x140 ]
}
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
20051a0: 82 10 20 06 mov 6, %g1
20051a4: c2 26 20 34 st %g1, [ %i0 + 0x34 ]
_ISR_Enable( level );
20051a8: 7f ff f2 f5 call 2001d7c <sparc_enable_interrupts>
20051ac: 90 10 00 03 mov %g3, %o0
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
20051b0: 90 10 00 18 mov %i0, %o0
20051b4: 13 04 00 ff sethi %hi(0x1003fc00), %o1
20051b8: 40 00 08 42 call 20072c0 <_Thread_Clear_state>
20051bc: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 <RAM_END+0xdc3fff8>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
20051c0: 05 00 80 5e sethi %hi(0x2017800), %g2
20051c4: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 ! 2017820 <_Thread_Dispatch_disable_level>
20051c8: 82 00 7f ff add %g1, -1, %g1
20051cc: c2 20 a0 20 st %g1, [ %g2 + 0x20 ]
20051d0: 81 c7 e0 08 ret
20051d4: 81 e8 00 00 restore
0200b990 <_Heap_Allocate>:
void *_Heap_Allocate(
Heap_Control *the_heap,
size_t size
)
{
200b990: 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 =
200b994: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
200b998: d4 06 20 14 ld [ %i0 + 0x14 ], %o2
void *_Heap_Allocate(
Heap_Control *the_heap,
size_t size
)
{
200b99c: a0 10 00 18 mov %i0, %l0
Heap_Block *the_block;
void *ptr = NULL;
Heap_Statistics *const stats = &the_heap->stats;
Heap_Block *const tail = _Heap_Tail(the_heap);
the_size =
200b9a0: 90 10 00 19 mov %i1, %o0
200b9a4: 7f ff eb 28 call 2006644 <_Heap_Calc_block_size>
200b9a8: b0 10 20 00 clr %i0
_Heap_Calc_block_size(size, the_heap->page_size, the_heap->min_block_size);
if(the_size == 0)
200b9ac: 80 a2 20 00 cmp %o0, 0
200b9b0: 02 80 00 1d be 200ba24 <_Heap_Allocate+0x94> <== NEVER TAKEN
200b9b4: b2 10 20 00 clr %i1
*/
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First (
Heap_Control *the_heap
)
{
return _Heap_Head(the_heap)->next;
200b9b8: 10 80 00 13 b 200ba04 <_Heap_Allocate+0x74>
200b9bc: f0 04 20 08 ld [ %l0 + 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) {
200b9c0: 80 a0 40 08 cmp %g1, %o0
200b9c4: 2a 80 00 0f bcs,a 200ba00 <_Heap_Allocate+0x70>
200b9c8: f0 06 20 08 ld [ %i0 + 8 ], %i0
(void)_Heap_Block_allocate(the_heap, the_block, the_size );
200b9cc: 94 10 00 08 mov %o0, %o2
200b9d0: 92 10 00 18 mov %i0, %o1
200b9d4: 7f ff eb 30 call 2006694 <_Heap_Block_allocate>
200b9d8: 90 10 00 10 mov %l0, %o0
ptr = _Heap_User_area(the_block);
stats->allocs += 1;
200b9dc: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
stats->searches += search_count + 1;
200b9e0: 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;
200b9e4: 82 00 60 01 inc %g1
stats->searches += search_count + 1;
200b9e8: 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;
200b9ec: c2 24 20 48 st %g1, [ %l0 + 0x48 ]
stats->searches += search_count + 1;
200b9f0: 84 00 80 19 add %g2, %i1, %g2
200b9f4: b0 06 20 08 add %i0, 8, %i0
200b9f8: 10 80 00 07 b 200ba14 <_Heap_Allocate+0x84>
200b9fc: c4 24 20 4c st %g2, [ %l0 + 0x4c ]
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)
200ba00: b2 06 60 01 inc %i1
if(the_size == 0)
return NULL;
/* Find large enough free block. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
200ba04: 80 a6 00 10 cmp %i0, %l0
200ba08: 32 bf ff ee bne,a 200b9c0 <_Heap_Allocate+0x30>
200ba0c: c2 06 20 04 ld [ %i0 + 4 ], %g1
200ba10: b0 10 20 00 clr %i0
_HAssert(_Heap_Is_aligned_ptr(ptr, the_heap->page_size));
break;
}
}
if(stats->max_search < search_count)
200ba14: c2 04 20 44 ld [ %l0 + 0x44 ], %g1
200ba18: 80 a0 40 19 cmp %g1, %i1
200ba1c: 2a 80 00 02 bcs,a 200ba24 <_Heap_Allocate+0x94>
200ba20: f2 24 20 44 st %i1, [ %l0 + 0x44 ]
stats->max_search = search_count;
return ptr;
}
200ba24: 81 c7 e0 08 ret
200ba28: 81 e8 00 00 restore
020086d0 <_Heap_Allocate_aligned>:
void *_Heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
)
{
20086d0: 9d e3 bf 98 save %sp, -104, %sp
uint32_t search_count;
Heap_Block *the_block;
void *user_ptr = NULL;
uint32_t const page_size = the_heap->page_size;
20086d4: e8 06 20 10 ld [ %i0 + 0x10 ], %l4
Heap_Block *const tail = _Heap_Tail(the_heap);
uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET;
uint32_t const the_size =
_Heap_Calc_block_size(size, page_size, the_heap->min_block_size);
20086d8: d4 06 20 14 ld [ %i0 + 0x14 ], %o2
20086dc: 90 10 00 19 mov %i1, %o0
20086e0: 40 00 01 5d call 2008c54 <_Heap_Calc_block_size>
20086e4: 92 10 00 14 mov %l4, %o1
void *user_ptr = NULL;
uint32_t const page_size = the_heap->page_size;
Heap_Statistics *const stats = &the_heap->stats;
Heap_Block *const tail = _Heap_Tail(the_heap);
uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET;
20086e8: b2 06 7f fc add %i1, -4, %i1
uint32_t const the_size =
_Heap_Calc_block_size(size, page_size, the_heap->min_block_size);
if(the_size == 0)
20086ec: ba 92 20 00 orcc %o0, 0, %i5
20086f0: 02 80 00 67 be 200888c <_Heap_Allocate_aligned+0x1bc> <== NEVER TAKEN
20086f4: 90 10 20 00 clr %o0
return NULL;
if(alignment == 0)
20086f8: 80 a6 a0 00 cmp %i2, 0
20086fc: 22 80 00 02 be,a 2008704 <_Heap_Allocate_aligned+0x34>
2008700: b4 10 20 08 mov 8, %i2
*/
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First (
Heap_Control *the_heap
)
{
return _Heap_Head(the_heap)->next;
2008704: e2 06 20 08 ld [ %i0 + 8 ], %l1
2008708: 10 80 00 59 b 200886c <_Heap_Allocate_aligned+0x19c>
200870c: aa 10 20 00 clr %l5
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
2008710: a6 08 7f fe and %g1, -2, %l3
uint32_t const block_size = _Heap_Block_size(the_block);
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
if(block_size >= the_size) { /* the_block is large enough. */
2008714: 80 a4 c0 1d cmp %l3, %i5
2008718: 2a 80 00 54 bcs,a 2008868 <_Heap_Allocate_aligned+0x198>
200871c: e2 04 60 08 ld [ %l1 + 8 ], %l1
_H_uptr_t *value,
uint32_t alignment
)
{
_H_uptr_t v = *value;
*value = v - (v % alignment);
2008720: 92 10 00 1a mov %i2, %o1
/* Calculate 'aligned_user_addr' that will become the user pointer we
return. It should be at least 'end_to_user_offs' bytes less than the
the 'block_end' and should be aligned on 'alignment' boundary.
Calculations are from the 'block_end' as we are going to split free
block so that the upper part of the block becomes used block. */
_H_uptr_t const block_end = _H_p2u(the_block) + block_size;
2008724: ae 04 40 13 add %l1, %l3, %l7
aligned_user_addr = block_end - end_to_user_offs;
2008728: a0 25 c0 19 sub %l7, %i1, %l0
200872c: 40 00 3e fe call 2018324 <.urem>
2008730: 90 10 00 10 mov %l0, %o0
if(block_size >= the_size) { /* the_block is large enough. */
_H_uptr_t user_addr;
_H_uptr_t aligned_user_addr;
_H_uptr_t const user_area = _H_p2u(_Heap_User_area(the_block));
2008734: 92 10 00 14 mov %l4, %o1
2008738: a4 24 00 08 sub %l0, %o0, %l2
200873c: 40 00 3e fa call 2018324 <.urem>
2008740: 90 10 00 12 mov %l2, %o0
2008744: a0 04 60 08 add %l1, 8, %l0
2008748: 84 24 80 08 sub %l2, %o0, %g2
only at 'page_size' aligned addresses */
user_addr = aligned_user_addr;
_Heap_Align_down_uptr(&user_addr, page_size);
/* Make sure 'user_addr' calculated didn't run out of 'the_block'. */
if(user_addr >= user_area) {
200874c: 80 a0 80 10 cmp %g2, %l0
2008750: 2a 80 00 46 bcs,a 2008868 <_Heap_Allocate_aligned+0x198>
2008754: e2 04 60 08 ld [ %l1 + 8 ], %l1
/* The block seems to be acceptable. Check if the remainder of
'the_block' is less than 'min_block_size' so that 'the_block' won't
actually be split at the address we assume. */
if(user_addr - user_area < the_heap->min_block_size) {
2008758: ec 06 20 14 ld [ %i0 + 0x14 ], %l6
200875c: 82 20 80 10 sub %g2, %l0, %g1
2008760: 80 a0 40 16 cmp %g1, %l6
2008764: 1a 80 00 15 bcc 20087b8 <_Heap_Allocate_aligned+0xe8>
2008768: 80 a4 a0 00 cmp %l2, 0
'aligned_user_addr' to be outside of [0,page_size) range. If we do,
we will need to store this distance somewhere to be able to
resurrect the block address from the user pointer. (Having the
distance within [0,page_size) range allows resurrection by
aligning user pointer down to the nearest 'page_size' boundary.) */
if(aligned_user_addr - user_addr >= page_size) {
200876c: 82 24 80 10 sub %l2, %l0, %g1
2008770: 80 a0 40 14 cmp %g1, %l4
2008774: 0a 80 00 10 bcs 20087b4 <_Heap_Allocate_aligned+0xe4> <== ALWAYS TAKEN
2008778: 84 10 00 10 mov %l0, %g2
uint32_t alignment
)
{
_H_uptr_t v = *value;
uint32_t a = alignment;
_H_uptr_t r = v % a;
200877c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2008780: 40 00 3e e9 call 2018324 <.urem> <== NOT EXECUTED
2008784: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
*value = r ? v - r + a : v;
2008788: 82 04 00 1a add %l0, %i2, %g1 <== NOT EXECUTED
200878c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2008790: 12 80 00 03 bne 200879c <_Heap_Allocate_aligned+0xcc> <== NOT EXECUTED
2008794: 90 20 40 08 sub %g1, %o0, %o0 <== NOT EXECUTED
2008798: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
/* The user pointer will be too far from 'user_addr'. See if we
can make 'aligned_user_addr' to be close enough to the
'user_addr'. */
aligned_user_addr = user_addr;
_Heap_Align_up_uptr(&aligned_user_addr, alignment);
if(aligned_user_addr - user_addr >= page_size) {
200879c: 82 22 00 10 sub %o0, %l0, %g1 <== NOT EXECUTED
20087a0: 80 a0 40 14 cmp %g1, %l4 <== NOT EXECUTED
20087a4: 3a 80 00 31 bcc,a 2008868 <_Heap_Allocate_aligned+0x198> <== NOT EXECUTED
20087a8: e2 04 60 08 ld [ %l1 + 8 ], %l1 <== NOT EXECUTED
20087ac: 84 10 00 10 mov %l0, %g2 <== NOT EXECUTED
20087b0: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED
aligned_user_addr = 0;
}
}
}
if(aligned_user_addr) {
20087b4: 80 a4 a0 00 cmp %l2, 0
20087b8: 22 80 00 2c be,a 2008868 <_Heap_Allocate_aligned+0x198> <== NEVER TAKEN
20087bc: e2 04 60 08 ld [ %l1 + 8 ], %l1 <== NOT EXECUTED
/* The block is indeed acceptable: calculate the size of the block
to be allocated and perform allocation. */
uint32_t const alloc_size =
block_end - user_addr + HEAP_BLOCK_USER_OFFSET;
20087c0: 82 05 e0 08 add %l7, 8, %g1
20087c4: a0 20 40 02 sub %g1, %g2, %l0
Heap_Block *the_block,
uint32_t alloc_size)
{
Heap_Statistics *const stats = &the_heap->stats;
uint32_t const block_size = _Heap_Block_size(the_block);
uint32_t const the_rest = block_size - alloc_size;
20087c8: 84 24 c0 10 sub %l3, %l0, %g2
_HAssert(_Heap_Is_aligned(block_size, the_heap->page_size));
_HAssert(_Heap_Is_aligned(alloc_size, the_heap->page_size));
_HAssert(alloc_size <= block_size);
_HAssert(_Heap_Is_prev_used(the_block));
if(the_rest >= the_heap->min_block_size) {
20087cc: 80 a0 80 16 cmp %g2, %l6
20087d0: 2a 80 00 08 bcs,a 20087f0 <_Heap_Allocate_aligned+0x120>
20087d4: c6 04 60 08 ld [ %l1 + 8 ], %g3
/* Split the block so that lower part is still free, and upper part
becomes used. */
the_block->size = the_rest | HEAP_PREV_USED;
20087d8: 82 10 a0 01 or %g2, 1, %g1
20087dc: c2 24 60 04 st %g1, [ %l1 + 4 ]
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
void *base,
uint32_t offset
)
{
return (void *)((char *)base + offset);
20087e0: a2 04 40 02 add %l1, %g2, %l1
the_block = _Heap_Block_at(the_block, the_rest);
the_block->prev_size = the_rest;
20087e4: c4 24 40 00 st %g2, [ %l1 ]
the_block->size = alloc_size;
20087e8: 10 80 00 09 b 200880c <_Heap_Allocate_aligned+0x13c>
20087ec: e0 24 60 04 st %l0, [ %l1 + 4 ]
)
{
Heap_Block *block = the_block;
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
20087f0: c4 04 60 0c ld [ %l1 + 0xc ], %g2
/* Don't split the block as remainder is either zero or too small to be
used as a separate free block. Change 'alloc_size' to the size of the
block and remove the block from the list of free blocks. */
_Heap_Block_remove(the_block);
alloc_size = block_size;
stats->free_blocks -= 1;
20087f4: c2 06 20 38 ld [ %i0 + 0x38 ], %g1
prev->next = next;
next->prev = prev;
20087f8: c4 20 e0 0c st %g2, [ %g3 + 0xc ]
20087fc: 82 00 7f ff add %g1, -1, %g1
{
Heap_Block *block = the_block;
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
2008800: c6 20 a0 08 st %g3, [ %g2 + 8 ]
2008804: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
2008808: a0 10 00 13 mov %l3, %l0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
200880c: 84 04 40 10 add %l1, %l0, %g2
}
/* Mark the block as used (in the next block). */
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
2008810: c2 00 a0 04 ld [ %g2 + 4 ], %g1
2008814: 82 10 60 01 or %g1, 1, %g1
2008818: c2 20 a0 04 st %g1, [ %g2 + 4 ]
/* Update statistics */
stats->free_size -= alloc_size;
200881c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
if(stats->min_free_size > stats->free_size)
2008820: c4 06 20 34 ld [ %i0 + 0x34 ], %g2
stats->free_blocks -= 1;
}
/* Mark the block as used (in the next block). */
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
/* Update statistics */
stats->free_size -= alloc_size;
2008824: 82 20 40 10 sub %g1, %l0, %g1
if(stats->min_free_size > stats->free_size)
2008828: 80 a0 80 01 cmp %g2, %g1
200882c: 08 80 00 03 bleu 2008838 <_Heap_Allocate_aligned+0x168>
2008830: c2 26 20 30 st %g1, [ %i0 + 0x30 ]
stats->min_free_size = stats->free_size;
2008834: c2 26 20 34 st %g1, [ %i0 + 0x34 ]
stats->used_blocks += 1;
2008838: c2 06 20 40 ld [ %i0 + 0x40 ], %g1
_HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment));
the_block = block_allocate(the_heap, the_block, alloc_size);
stats->searches += search_count + 1;
200883c: c6 06 20 4c ld [ %i0 + 0x4c ], %g3
stats->allocs += 1;
2008840: c4 06 20 48 ld [ %i0 + 0x48 ], %g2
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
/* Update statistics */
stats->free_size -= alloc_size;
if(stats->min_free_size > stats->free_size)
stats->min_free_size = stats->free_size;
stats->used_blocks += 1;
2008844: 82 00 60 01 inc %g1
_HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment));
the_block = block_allocate(the_heap, the_block, alloc_size);
stats->searches += search_count + 1;
2008848: 86 00 e0 01 inc %g3
stats->allocs += 1;
200884c: 84 00 a0 01 inc %g2
_HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment));
the_block = block_allocate(the_heap, the_block, alloc_size);
stats->searches += search_count + 1;
2008850: 86 00 c0 15 add %g3, %l5, %g3
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
/* Update statistics */
stats->free_size -= alloc_size;
if(stats->min_free_size > stats->free_size)
stats->min_free_size = stats->free_size;
stats->used_blocks += 1;
2008854: c2 26 20 40 st %g1, [ %i0 + 0x40 ]
_HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment));
the_block = block_allocate(the_heap, the_block, alloc_size);
stats->searches += search_count + 1;
stats->allocs += 1;
2008858: c4 26 20 48 st %g2, [ %i0 + 0x48 ]
_HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment));
the_block = block_allocate(the_heap, the_block, alloc_size);
stats->searches += search_count + 1;
200885c: c6 26 20 4c st %g3, [ %i0 + 0x4c ]
stats->allocs += 1;
check_result(the_heap, the_block, user_addr,
aligned_user_addr, size);
user_ptr = (void*)aligned_user_addr;
2008860: 10 80 00 07 b 200887c <_Heap_Allocate_aligned+0x1ac>
2008864: 90 10 00 12 mov %l2, %o0
/* Find large enough free block that satisfies the alignment requirements. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
the_block = the_block->next, ++search_count)
2008868: aa 05 60 01 inc %l5
alignment = CPU_ALIGNMENT;
/* Find large enough free block that satisfies the alignment requirements. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
200886c: 80 a4 40 18 cmp %l1, %i0
2008870: 32 bf ff a8 bne,a 2008710 <_Heap_Allocate_aligned+0x40>
2008874: c2 04 60 04 ld [ %l1 + 4 ], %g1
2008878: 90 10 20 00 clr %o0
}
}
}
}
if(stats->max_search < search_count)
200887c: c2 06 20 44 ld [ %i0 + 0x44 ], %g1
2008880: 80 a0 40 15 cmp %g1, %l5
2008884: 2a 80 00 02 bcs,a 200888c <_Heap_Allocate_aligned+0x1bc>
2008888: ea 26 20 44 st %l5, [ %i0 + 0x44 ]
stats->max_search = search_count;
return user_ptr;
}
200888c: 81 c7 e0 08 ret
2008890: 91 e8 00 08 restore %g0, %o0, %o0
0200e298 <_Heap_Extend>:
Heap_Control *the_heap,
void *starting_address,
size_t size,
uint32_t *amount_extended
)
{
200e298: 9d e3 bf 98 save %sp, -104, %sp
* 5. non-contiguous higher address (NOT SUPPORTED)
*
* As noted, this code only supports (4).
*/
if ( starting_address >= the_heap->begin && /* case 3 */
200e29c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
200e2a0: 80 a6 40 01 cmp %i1, %g1
200e2a4: 0a 80 00 06 bcs 200e2bc <_Heap_Extend+0x24>
200e2a8: a2 10 00 18 mov %i0, %l1
200e2ac: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
200e2b0: 80 a6 40 01 cmp %i1, %g1
200e2b4: 0a 80 00 28 bcs 200e354 <_Heap_Extend+0xbc>
200e2b8: b0 10 20 01 mov 1, %i0
starting_address < the_heap->end
)
return HEAP_EXTEND_ERROR;
if ( starting_address != the_heap->end )
200e2bc: c2 04 60 1c ld [ %l1 + 0x1c ], %g1
200e2c0: 80 a6 40 01 cmp %i1, %g1
200e2c4: 12 80 00 24 bne 200e354 <_Heap_Extend+0xbc>
200e2c8: b0 10 20 02 mov 2, %i0
uint32_t *value,
uint32_t alignment
)
{
uint32_t v = *value;
*value = v - (v % alignment);
200e2cc: d2 04 60 10 ld [ %l1 + 0x10 ], %o1
* Currently only case 4 should make it to this point.
* The basic trick is to make the extend area look like a used
* block and free it.
*/
old_final = the_heap->final;
200e2d0: e4 04 60 24 ld [ %l1 + 0x24 ], %l2
200e2d4: 82 06 40 1a add %i1, %i2, %g1
the_heap->end = _Addresses_Add_offset( the_heap->end, size );
the_size = _Addresses_Subtract( the_heap->end, old_final ) - HEAP_OVERHEAD;
200e2d8: a0 20 40 12 sub %g1, %l2, %l0
* The basic trick is to make the extend area look like a used
* block and free it.
*/
old_final = the_heap->final;
the_heap->end = _Addresses_Add_offset( the_heap->end, size );
200e2dc: c2 24 60 1c st %g1, [ %l1 + 0x1c ]
the_size = _Addresses_Subtract( the_heap->end, old_final ) - HEAP_OVERHEAD;
200e2e0: a0 04 3f f8 add %l0, -8, %l0
200e2e4: 40 00 28 10 call 2018324 <.urem>
200e2e8: 90 10 00 10 mov %l0, %o0
_Heap_Align_down( &the_size, the_heap->page_size );
*amount_extended = size;
200e2ec: f4 26 c0 00 st %i2, [ %i3 ]
if( the_size < the_heap->min_block_size )
200e2f0: c2 04 60 14 ld [ %l1 + 0x14 ], %g1
200e2f4: a0 24 00 08 sub %l0, %o0, %l0
200e2f8: 80 a4 00 01 cmp %l0, %g1
200e2fc: 0a 80 00 16 bcs 200e354 <_Heap_Extend+0xbc> <== NEVER TAKEN
200e300: b0 10 20 00 clr %i0
return HEAP_EXTEND_SUCCESSFUL;
old_final->size = the_size | (old_final->size & HEAP_PREV_USED);
200e304: c2 04 a0 04 ld [ %l2 + 4 ], %g1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
200e308: 88 04 80 10 add %l2, %l0, %g4
200e30c: 82 08 60 01 and %g1, 1, %g1
200e310: 82 14 00 01 or %l0, %g1, %g1
200e314: c2 24 a0 04 st %g1, [ %l2 + 4 ]
new_final = _Heap_Block_at( old_final, the_size );
new_final->size = HEAP_PREV_USED;
200e318: 82 10 20 01 mov 1, %g1
200e31c: c2 21 20 04 st %g1, [ %g4 + 4 ]
the_heap->final = new_final;
stats->size += size;
200e320: c2 04 60 2c ld [ %l1 + 0x2c ], %g1
stats->used_blocks += 1;
200e324: c4 04 60 40 ld [ %l1 + 0x40 ], %g2
stats->frees -= 1; /* Don't count subsequent call as actual free() */
200e328: c6 04 60 50 ld [ %l1 + 0x50 ], %g3
old_final->size = the_size | (old_final->size & HEAP_PREV_USED);
new_final = _Heap_Block_at( old_final, the_size );
new_final->size = HEAP_PREV_USED;
the_heap->final = new_final;
stats->size += size;
200e32c: 82 00 40 1a add %g1, %i2, %g1
stats->used_blocks += 1;
200e330: 84 00 a0 01 inc %g2
stats->frees -= 1; /* Don't count subsequent call as actual free() */
200e334: 86 00 ff ff add %g3, -1, %g3
return HEAP_EXTEND_SUCCESSFUL;
old_final->size = the_size | (old_final->size & HEAP_PREV_USED);
new_final = _Heap_Block_at( old_final, the_size );
new_final->size = HEAP_PREV_USED;
the_heap->final = new_final;
200e338: c8 24 60 24 st %g4, [ %l1 + 0x24 ]
stats->size += size;
200e33c: c2 24 60 2c st %g1, [ %l1 + 0x2c ]
stats->used_blocks += 1;
200e340: c4 24 60 40 st %g2, [ %l1 + 0x40 ]
stats->frees -= 1; /* Don't count subsequent call as actual free() */
200e344: c6 24 60 50 st %g3, [ %l1 + 0x50 ]
_Heap_Free( the_heap, _Heap_User_area( old_final ) );
200e348: 90 10 00 11 mov %l1, %o0
200e34c: 7f ff e9 79 call 2008930 <_Heap_Free>
200e350: 92 04 a0 08 add %l2, 8, %o1
return HEAP_EXTEND_SUCCESSFUL;
}
200e354: 81 c7 e0 08 ret
200e358: 81 e8 00 00 restore
0200ba2c <_Heap_Free>:
bool _Heap_Free(
Heap_Control *the_heap,
void *starting_address
)
{
200ba2c: 9d e3 bf 98 save %sp, -104, %sp
uint32_t the_size;
uint32_t next_size;
Heap_Statistics *const stats = &the_heap->stats;
bool next_is_free;
if ( !_Addresses_Is_in_range(
200ba30: e4 06 20 20 ld [ %i0 + 0x20 ], %l2
200ba34: e2 06 20 24 ld [ %i0 + 0x24 ], %l1
200ba38: 80 a6 40 12 cmp %i1, %l2
200ba3c: 84 60 3f ff subx %g0, -1, %g2
200ba40: 80 a4 40 19 cmp %l1, %i1
200ba44: 82 60 3f ff subx %g0, -1, %g1
200ba48: 80 88 80 01 btst %g2, %g1
200ba4c: 02 80 00 73 be 200bc18 <_Heap_Free+0x1ec>
200ba50: 01 00 00 00 nop
/* 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);
200ba54: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
200ba58: 40 00 21 06 call 2013e70 <.urem>
200ba5c: 90 10 00 19 mov %i1, %o0
200ba60: a0 06 7f f8 add %i1, -8, %l0
200ba64: 90 24 00 08 sub %l0, %o0, %o0
return( FALSE );
}
_Heap_Start_of_block( the_heap, starting_address, &the_block );
if ( !_Heap_Is_block_in( the_heap, the_block ) ) {
200ba68: 80 a2 00 12 cmp %o0, %l2
200ba6c: 84 60 3f ff subx %g0, -1, %g2
200ba70: 80 a4 40 08 cmp %l1, %o0
200ba74: 82 60 3f ff subx %g0, -1, %g1
200ba78: 80 88 80 01 btst %g2, %g1
200ba7c: 02 80 00 67 be 200bc18 <_Heap_Free+0x1ec> <== NEVER TAKEN
200ba80: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
200ba84: c6 02 20 04 ld [ %o0 + 4 ], %g3
200ba88: 96 08 ff fe and %g3, -2, %o3
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
200ba8c: 88 02 00 0b add %o0, %o3, %g4
}
the_size = _Heap_Block_size( the_block );
next_block = _Heap_Block_at( the_block, the_size );
if ( !_Heap_Is_block_in( the_heap, next_block ) ) {
200ba90: 80 a1 00 12 cmp %g4, %l2
200ba94: 84 60 3f ff subx %g0, -1, %g2
200ba98: 80 a4 40 04 cmp %l1, %g4
200ba9c: 82 60 3f ff subx %g0, -1, %g1
200baa0: 80 88 80 01 btst %g2, %g1
200baa4: 02 80 00 5d be 200bc18 <_Heap_Free+0x1ec> <== NEVER TAKEN
200baa8: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used (
Heap_Block *the_block
)
{
return (the_block->size & HEAP_PREV_USED);
200baac: c2 01 20 04 ld [ %g4 + 4 ], %g1
_HAssert( FALSE );
return( FALSE );
}
if ( !_Heap_Is_prev_used( next_block ) ) {
200bab0: 80 88 60 01 btst 1, %g1
200bab4: 02 80 00 59 be 200bc18 <_Heap_Free+0x1ec> <== NEVER TAKEN
200bab8: 94 08 7f fe and %g1, -2, %o2
_HAssert( FALSE );
return( FALSE );
}
next_size = _Heap_Block_size( next_block );
next_is_free = next_block < the_heap->final &&
200babc: 80 a1 00 11 cmp %g4, %l1
200bac0: 1a 80 00 06 bcc 200bad8 <_Heap_Free+0xac>
200bac4: 82 10 20 00 clr %g1
200bac8: 82 01 00 0a add %g4, %o2, %g1
200bacc: c2 00 60 04 ld [ %g1 + 4 ], %g1
200bad0: 82 08 60 01 and %g1, 1, %g1
200bad4: 82 18 60 01 xor %g1, 1, %g1
!_Heap_Is_prev_used(_Heap_Block_at(next_block, next_size));
if ( !_Heap_Is_prev_used( the_block ) ) {
200bad8: 80 88 e0 01 btst 1, %g3
200badc: 12 80 00 25 bne 200bb70 <_Heap_Free+0x144>
200bae0: 86 10 00 01 mov %g1, %g3
uint32_t const prev_size = the_block->prev_size;
200bae4: d8 02 00 00 ld [ %o0 ], %o4
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
200bae8: 9a 22 00 0c sub %o0, %o4, %o5
Heap_Block *const prev_block = _Heap_Block_at( the_block, -prev_size );
if ( !_Heap_Is_block_in( the_heap, prev_block ) ) {
200baec: 80 a3 40 12 cmp %o5, %l2
200baf0: 84 60 3f ff subx %g0, -1, %g2
200baf4: 80 a4 40 0d cmp %l1, %o5
200baf8: 82 60 3f ff subx %g0, -1, %g1
200bafc: 80 88 80 01 btst %g2, %g1
200bb00: 02 80 00 46 be 200bc18 <_Heap_Free+0x1ec> <== NEVER TAKEN
200bb04: 01 00 00 00 nop
return( FALSE );
}
/* As we always coalesce free blocks, the block that preceedes prev_block
must have been used. */
if ( !_Heap_Is_prev_used ( prev_block) ) {
200bb08: c2 03 60 04 ld [ %o5 + 4 ], %g1
200bb0c: 80 88 60 01 btst 1, %g1
200bb10: 02 80 00 42 be 200bc18 <_Heap_Free+0x1ec> <== NEVER TAKEN
200bb14: 80 a0 e0 00 cmp %g3, 0
_HAssert( FALSE );
return( FALSE );
}
if ( next_is_free ) { /* coalesce both */
200bb18: 02 80 00 0f be 200bb54 <_Heap_Free+0x128>
200bb1c: 84 02 c0 0c add %o3, %o4, %g2
uint32_t const size = the_size + prev_size + next_size;
_Heap_Block_remove( next_block );
stats->free_blocks -= 1;
200bb20: c2 06 20 38 ld [ %i0 + 0x38 ], %g1
)
{
Heap_Block *block = the_block;
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
200bb24: c6 01 20 0c ld [ %g4 + 0xc ], %g3
Heap_Block *the_block
)
{
Heap_Block *block = the_block;
Heap_Block *next = block->next;
200bb28: c4 01 20 08 ld [ %g4 + 8 ], %g2
200bb2c: 82 00 7f ff add %g1, -1, %g1
200bb30: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
Heap_Block *prev = block->prev;
prev->next = next;
next->prev = prev;
200bb34: c6 20 a0 0c st %g3, [ %g2 + 0xc ]
_HAssert( FALSE );
return( FALSE );
}
if ( next_is_free ) { /* coalesce both */
uint32_t const size = the_size + prev_size + next_size;
200bb38: 82 02 c0 0a add %o3, %o2, %g1
{
Heap_Block *block = the_block;
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
200bb3c: c4 20 e0 08 st %g2, [ %g3 + 8 ]
200bb40: 82 00 40 0c add %g1, %o4, %g1
_Heap_Block_remove( next_block );
stats->free_blocks -= 1;
prev_block->size = size | HEAP_PREV_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
200bb44: c2 23 40 01 st %g1, [ %o5 + %g1 ]
if ( next_is_free ) { /* coalesce both */
uint32_t const size = the_size + prev_size + next_size;
_Heap_Block_remove( next_block );
stats->free_blocks -= 1;
prev_block->size = size | HEAP_PREV_USED;
200bb48: 82 10 60 01 or %g1, 1, %g1
200bb4c: 10 80 00 28 b 200bbec <_Heap_Free+0x1c0>
200bb50: c2 23 60 04 st %g1, [ %o5 + 4 ]
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
}
else { /* coalesce prev */
uint32_t const size = the_size + prev_size;
prev_block->size = size | HEAP_PREV_USED;
200bb54: 82 10 a0 01 or %g2, 1, %g1
200bb58: c2 23 60 04 st %g1, [ %o5 + 4 ]
next_block->size &= ~HEAP_PREV_USED;
200bb5c: c2 01 20 04 ld [ %g4 + 4 ], %g1
next_block->prev_size = size;
200bb60: c4 22 00 0b st %g2, [ %o0 + %o3 ]
next_block->prev_size = size;
}
else { /* coalesce prev */
uint32_t const size = the_size + prev_size;
prev_block->size = size | HEAP_PREV_USED;
next_block->size &= ~HEAP_PREV_USED;
200bb64: 82 08 7f fe and %g1, -2, %g1
200bb68: 10 80 00 21 b 200bbec <_Heap_Free+0x1c0>
200bb6c: c2 21 20 04 st %g1, [ %g4 + 4 ]
next_block->prev_size = size;
}
}
else if ( next_is_free ) { /* coalesce next */
200bb70: 80 a0 e0 00 cmp %g3, 0
200bb74: 02 80 00 0d be 200bba8 <_Heap_Free+0x17c>
200bb78: 82 12 e0 01 or %o3, 1, %g1
Heap_Block *new_block
)
{
Heap_Block *block = old_block;
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
200bb7c: c2 01 20 0c ld [ %g4 + 0xc ], %g1
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *block = old_block;
Heap_Block *next = block->next;
200bb80: c4 01 20 08 ld [ %g4 + 8 ], %g2
Heap_Block *prev = block->prev;
block = new_block;
block->next = next;
block->prev = prev;
200bb84: c2 22 20 0c st %g1, [ %o0 + 0xc ]
Heap_Block *block = old_block;
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
block = new_block;
block->next = next;
200bb88: c4 22 20 08 st %g2, [ %o0 + 8 ]
block->prev = prev;
next->prev = prev->next = block;
200bb8c: d0 20 60 08 st %o0, [ %g1 + 8 ]
200bb90: d0 20 a0 0c st %o0, [ %g2 + 0xc ]
uint32_t const size = the_size + next_size;
200bb94: 82 02 80 0b add %o2, %o3, %g1
_Heap_Block_replace( next_block, the_block );
the_block->size = size | HEAP_PREV_USED;
next_block = _Heap_Block_at( the_block, size );
next_block->prev_size = size;
200bb98: c2 22 00 01 st %g1, [ %o0 + %g1 ]
}
}
else if ( next_is_free ) { /* coalesce next */
uint32_t const size = the_size + next_size;
_Heap_Block_replace( next_block, the_block );
the_block->size = size | HEAP_PREV_USED;
200bb9c: 82 10 60 01 or %g1, 1, %g1
200bba0: 10 80 00 13 b 200bbec <_Heap_Free+0x1c0>
200bba4: c2 22 20 04 st %g1, [ %o0 + 4 ]
}
else { /* no coalesce */
/* Add 'the_block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Block_insert_after( _Heap_Head( the_heap), the_block );
the_block->size = the_size | HEAP_PREV_USED;
200bba8: c2 22 20 04 st %g1, [ %o0 + 4 ]
next_block->size &= ~HEAP_PREV_USED;
200bbac: c2 01 20 04 ld [ %g4 + 4 ], %g1
)
{
Heap_Block *prev = prev_block;
Heap_Block *block = the_block;
Heap_Block *next = prev->next;
200bbb0: c6 06 20 08 ld [ %i0 + 8 ], %g3
200bbb4: 82 08 7f fe and %g1, -2, %g1
next_block->prev_size = the_size;
200bbb8: d6 22 00 0b st %o3, [ %o0 + %o3 ]
else { /* no coalesce */
/* Add 'the_block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Block_insert_after( _Heap_Head( the_heap), the_block );
the_block->size = the_size | HEAP_PREV_USED;
next_block->size &= ~HEAP_PREV_USED;
200bbbc: c2 21 20 04 st %g1, [ %g4 + 4 ]
next_block->prev_size = the_size;
stats->free_blocks += 1;
200bbc0: c2 06 20 38 ld [ %i0 + 0x38 ], %g1
block->next = next;
200bbc4: c6 22 20 08 st %g3, [ %o0 + 8 ]
block->prev = prev;
200bbc8: f0 22 20 0c st %i0, [ %o0 + 0xc ]
if ( stats->max_free_blocks < stats->free_blocks )
200bbcc: c4 06 20 3c ld [ %i0 + 0x3c ], %g2
_Heap_Block_insert_after( _Heap_Head( the_heap), the_block );
the_block->size = the_size | HEAP_PREV_USED;
next_block->size &= ~HEAP_PREV_USED;
next_block->prev_size = the_size;
stats->free_blocks += 1;
200bbd0: 82 00 60 01 inc %g1
next->prev = prev->next = block;
200bbd4: d0 20 e0 0c st %o0, [ %g3 + 0xc ]
200bbd8: d0 26 20 08 st %o0, [ %i0 + 8 ]
if ( stats->max_free_blocks < stats->free_blocks )
200bbdc: 80 a0 80 01 cmp %g2, %g1
200bbe0: 1a 80 00 03 bcc 200bbec <_Heap_Free+0x1c0>
200bbe4: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
stats->max_free_blocks = stats->free_blocks;
200bbe8: c2 26 20 3c st %g1, [ %i0 + 0x3c ]
}
stats->used_blocks -= 1;
200bbec: c2 06 20 40 ld [ %i0 + 0x40 ], %g1
stats->free_size += the_size;
200bbf0: c4 06 20 30 ld [ %i0 + 0x30 ], %g2
stats->frees += 1;
200bbf4: c6 06 20 50 ld [ %i0 + 0x50 ], %g3
if ( stats->max_free_blocks < stats->free_blocks )
stats->max_free_blocks = stats->free_blocks;
}
stats->used_blocks -= 1;
stats->free_size += the_size;
200bbf8: 84 00 80 0b add %g2, %o3, %g2
stats->free_blocks += 1;
if ( stats->max_free_blocks < stats->free_blocks )
stats->max_free_blocks = stats->free_blocks;
}
stats->used_blocks -= 1;
200bbfc: 82 00 7f ff add %g1, -1, %g1
stats->free_size += the_size;
200bc00: c4 26 20 30 st %g2, [ %i0 + 0x30 ]
stats->free_blocks += 1;
if ( stats->max_free_blocks < stats->free_blocks )
stats->max_free_blocks = stats->free_blocks;
}
stats->used_blocks -= 1;
200bc04: c2 26 20 40 st %g1, [ %i0 + 0x40 ]
stats->free_size += the_size;
stats->frees += 1;
200bc08: 86 00 e0 01 inc %g3
200bc0c: c6 26 20 50 st %g3, [ %i0 + 0x50 ]
200bc10: 81 c7 e0 08 ret
200bc14: 91 e8 20 01 restore %g0, 1, %o0
return( TRUE );
}
200bc18: 81 c7 e0 08 ret
200bc1c: 91 e8 20 00 restore %g0, 0, %o0
0200e35c <_Heap_Get_free_information>:
)
{
Heap_Block *the_block;
Heap_Block *const tail = _Heap_Tail(the_heap);
info->number = 0;
200e35c: c0 22 40 00 clr [ %o1 ]
info->largest = 0;
200e360: c0 22 60 04 clr [ %o1 + 4 ]
info->total = 0;
200e364: c0 22 60 08 clr [ %o1 + 8 ]
*/
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First (
Heap_Control *the_heap
)
{
return _Heap_Head(the_heap)->next;
200e368: 10 80 00 0e b 200e3a0 <_Heap_Get_free_information+0x44>
200e36c: da 02 20 08 ld [ %o0 + 8 ], %o5
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++;
200e370: c2 02 40 00 ld [ %o1 ], %g1
info->total += the_size;
200e374: c4 02 60 08 ld [ %o1 + 8 ], %g2
if ( info->largest < the_size )
200e378: c8 02 60 04 ld [ %o1 + 4 ], %g4
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
200e37c: 86 08 ff fe and %g3, -2, %g3
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++;
200e380: 82 00 60 01 inc %g1
info->total += the_size;
200e384: 84 00 80 03 add %g2, %g3, %g2
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++;
200e388: c2 22 40 00 st %g1, [ %o1 ]
info->total += the_size;
if ( info->largest < the_size )
200e38c: 80 a1 00 03 cmp %g4, %g3
200e390: 1a 80 00 03 bcc 200e39c <_Heap_Get_free_information+0x40> <== NEVER TAKEN
200e394: c4 22 60 08 st %g2, [ %o1 + 8 ]
info->largest = the_size;
200e398: c6 22 60 04 st %g3, [ %o1 + 4 ]
info->largest = 0;
info->total = 0;
for(the_block = _Heap_First(the_heap);
the_block != tail;
the_block = the_block->next)
200e39c: da 03 60 08 ld [ %o5 + 8 ], %o5
info->number = 0;
info->largest = 0;
info->total = 0;
for(the_block = _Heap_First(the_heap);
the_block != tail;
200e3a0: 80 a3 40 08 cmp %o5, %o0
200e3a4: 32 bf ff f3 bne,a 200e370 <_Heap_Get_free_information+0x14>
200e3a8: c6 03 60 04 ld [ %o5 + 4 ], %g3
info->number++;
info->total += the_size;
if ( info->largest < the_size )
info->largest = the_size;
}
}
200e3ac: 81 c3 e0 08 retl
0200e3b4 <_Heap_Get_information>:
Heap_Block *const end = the_heap->final;
_HAssert(the_block->prev_size == HEAP_PREV_USED);
_HAssert(_Heap_Is_prev_used(the_block));
the_info->Free.number = 0;
200e3b4: c0 22 40 00 clr [ %o1 ]
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
Heap_Block *the_block = the_heap->start;
Heap_Block *const end = the_heap->final;
200e3b8: d8 02 20 24 ld [ %o0 + 0x24 ], %o4
_HAssert(the_block->prev_size == HEAP_PREV_USED);
_HAssert(_Heap_Is_prev_used(the_block));
the_info->Free.number = 0;
the_info->Free.total = 0;
200e3bc: c0 22 60 08 clr [ %o1 + 8 ]
the_info->Free.largest = 0;
200e3c0: c0 22 60 04 clr [ %o1 + 4 ]
the_info->Used.number = 0;
200e3c4: c0 22 60 0c clr [ %o1 + 0xc ]
the_info->Used.total = 0;
200e3c8: c0 22 60 14 clr [ %o1 + 0x14 ]
the_info->Used.largest = 0;
200e3cc: c0 22 60 10 clr [ %o1 + 0x10 ]
Heap_Get_information_status _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
Heap_Block *the_block = the_heap->start;
200e3d0: 10 80 00 23 b 200e45c <_Heap_Get_information+0xa8>
200e3d4: c4 02 20 20 ld [ %o0 + 0x20 ], %g2
200e3d8: 88 08 7f fe and %g1, -2, %g4
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
200e3dc: 9a 00 80 04 add %g2, %g4, %o5
while ( the_block != end ) {
uint32_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
if ( _Heap_Is_prev_used(next_block) ) {
200e3e0: c2 03 60 04 ld [ %o5 + 4 ], %g1
200e3e4: 80 88 60 01 btst 1, %g1
200e3e8: 22 80 00 0d be,a 200e41c <_Heap_Get_information+0x68>
200e3ec: c2 02 40 00 ld [ %o1 ], %g1
the_info->Used.number++;
200e3f0: c2 02 60 0c ld [ %o1 + 0xc ], %g1
the_info->Used.total += the_size;
200e3f4: c4 02 60 14 ld [ %o1 + 0x14 ], %g2
if ( the_info->Used.largest < the_size )
200e3f8: c6 02 60 10 ld [ %o1 + 0x10 ], %g3
while ( the_block != end ) {
uint32_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
if ( _Heap_Is_prev_used(next_block) ) {
the_info->Used.number++;
200e3fc: 82 00 60 01 inc %g1
the_info->Used.total += the_size;
200e400: 84 00 80 04 add %g2, %g4, %g2
while ( the_block != end ) {
uint32_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
if ( _Heap_Is_prev_used(next_block) ) {
the_info->Used.number++;
200e404: c2 22 60 0c st %g1, [ %o1 + 0xc ]
the_info->Used.total += the_size;
if ( the_info->Used.largest < the_size )
200e408: 80 a0 c0 04 cmp %g3, %g4
200e40c: 1a 80 00 13 bcc 200e458 <_Heap_Get_information+0xa4>
200e410: c4 22 60 14 st %g2, [ %o1 + 0x14 ]
the_info->Used.largest = the_size;
200e414: 10 80 00 11 b 200e458 <_Heap_Get_information+0xa4>
200e418: c8 22 60 10 st %g4, [ %o1 + 0x10 ]
} else {
the_info->Free.number++;
the_info->Free.total += the_size;
200e41c: c4 02 60 08 ld [ %o1 + 8 ], %g2
if ( the_info->Free.largest < the_size )
200e420: c6 02 60 04 ld [ %o1 + 4 ], %g3
the_info->Used.number++;
the_info->Used.total += the_size;
if ( the_info->Used.largest < the_size )
the_info->Used.largest = the_size;
} else {
the_info->Free.number++;
200e424: 82 00 60 01 inc %g1
the_info->Free.total += the_size;
200e428: 84 00 80 04 add %g2, %g4, %g2
the_info->Used.number++;
the_info->Used.total += the_size;
if ( the_info->Used.largest < the_size )
the_info->Used.largest = the_size;
} else {
the_info->Free.number++;
200e42c: c2 22 40 00 st %g1, [ %o1 ]
the_info->Free.total += the_size;
if ( the_info->Free.largest < the_size )
200e430: 80 a0 c0 04 cmp %g3, %g4
200e434: 1a 80 00 03 bcc 200e440 <_Heap_Get_information+0x8c> <== NEVER TAKEN
200e438: c4 22 60 08 st %g2, [ %o1 + 8 ]
the_info->Free.largest = the_size;
200e43c: c8 22 60 04 st %g4, [ %o1 + 4 ]
if ( the_size != next_block->prev_size )
200e440: c2 03 40 00 ld [ %o5 ], %g1
200e444: 80 a1 00 01 cmp %g4, %g1
200e448: 02 80 00 05 be 200e45c <_Heap_Get_information+0xa8> <== ALWAYS TAKEN
200e44c: 84 10 00 0d mov %o5, %g2
200e450: 81 c3 e0 08 retl <== NOT EXECUTED
200e454: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
200e458: 84 10 00 0d mov %o5, %g2
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
200e45c: 80 a0 80 0c cmp %g2, %o4
200e460: 32 bf ff de bne,a 200e3d8 <_Heap_Get_information+0x24>
200e464: c2 00 a0 04 ld [ %g2 + 4 ], %g1
}
/* Handle the last dummy block. Don't consider this block to be
"used" as client never allocated it. Make 'Used.total' contain this
blocks' overhead though. */
the_info->Used.total += HEAP_OVERHEAD;
200e468: c2 02 60 14 ld [ %o1 + 0x14 ], %g1
200e46c: 90 10 20 00 clr %o0
200e470: 82 00 60 08 add %g1, 8, %g1
return HEAP_GET_INFORMATION_SUCCESSFUL;
}
200e474: 81 c3 e0 08 retl
200e478: c2 22 60 14 st %g1, [ %o1 + 0x14 ]
02006514 <_Heap_Initialize>:
Heap_Control *the_heap,
void *starting_address,
size_t size,
uint32_t page_size
)
{
2006514: 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)
2006518: 80 a6 e0 00 cmp %i3, 0
200651c: 12 80 00 04 bne 200652c <_Heap_Initialize+0x18>
2006520: 84 8e e0 07 andcc %i3, 7, %g2
2006524: 10 80 00 06 b 200653c <_Heap_Initialize+0x28>
2006528: b6 10 20 08 mov 8, %i3
)
{
uint32_t v = *value;
uint32_t a = alignment;
uint32_t r = v % a;
*value = r ? v - r + a : v;
200652c: 02 80 00 05 be 2006540 <_Heap_Initialize+0x2c>
2006530: a0 06 60 08 add %i1, 8, %l0
2006534: 82 06 e0 08 add %i3, 8, %g1
2006538: b6 20 40 02 sub %g1, %g2, %i3
/* 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;
200653c: 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;
2006540: 92 10 00 1b mov %i3, %o1
2006544: 40 00 36 4b call 2013e70 <.urem>
2006548: 90 10 00 10 mov %l0, %o0
*value = r ? v - r + a : v;
200654c: 80 a2 20 00 cmp %o0, 0
2006550: 22 80 00 05 be,a 2006564 <_Heap_Initialize+0x50>
2006554: 90 10 20 10 mov 0x10, %o0
2006558: 82 06 c0 10 add %i3, %l0, %g1
200655c: a0 20 40 08 sub %g1, %o0, %l0
uint32_t alignment
)
{
uint32_t v = *value;
uint32_t a = alignment;
uint32_t r = v % a;
2006560: 90 10 20 10 mov 0x10, %o0
2006564: 40 00 36 43 call 2013e70 <.urem>
2006568: 92 10 00 1b mov %i3, %o1
*value = r ? v - r + a : v;
200656c: 82 06 e0 10 add %i3, 0x10, %g1
2006570: 80 a2 20 00 cmp %o0, 0
_Heap_Align_up_uptr ( &aligned_start, page_size );
aligned_start -= HEAP_BLOCK_USER_OFFSET;
2006574: a2 04 3f f8 add %l0, -8, %l1
2006578: 12 80 00 03 bne 2006584 <_Heap_Initialize+0x70>
200657c: 82 20 40 08 sub %g1, %o0, %g1
2006580: 82 10 20 10 mov 0x10, %g1
2006584: 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);
2006588: 82 24 40 19 sub %l1, %i1, %g1
200658c: 82 00 60 08 add %g1, 8, %g1
if ( size < overhead )
2006590: 80 a6 80 01 cmp %i2, %g1
2006594: 0a 80 00 2a bcs 200663c <_Heap_Initialize+0x128> <== NEVER TAKEN
2006598: a0 26 80 01 sub %i2, %g1, %l0
uint32_t *value,
uint32_t alignment
)
{
uint32_t v = *value;
*value = v - (v % alignment);
200659c: 92 10 00 1b mov %i3, %o1
20065a0: 40 00 36 34 call 2013e70 <.urem>
20065a4: 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 )
20065a8: a0 a4 00 08 subcc %l0, %o0, %l0
20065ac: 02 80 00 24 be 200663c <_Heap_Initialize+0x128>
20065b0: 07 00 80 5d sethi %hi(0x2017400), %g3
return 0; /* Too small area for the heap */
the_heap->page_size = page_size;
20065b4: 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;
20065b8: f6 24 40 00 st %i3, [ %l1 ]
the_block->size = the_size | HEAP_PREV_USED;
20065bc: 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++;
20065c0: c4 00 e0 ec ld [ %g3 + 0xec ], %g2
the_heap->end = starting_address + size;
the_block = (Heap_Block *) aligned_start;
the_block->prev_size = page_size;
the_block->size = the_size | HEAP_PREV_USED;
20065c4: 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 */
20065c8: e0 24 40 10 st %l0, [ %l1 + %l0 ]
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
void *base,
uint32_t offset
)
{
return (void *)((char *)base + offset);
20065cc: 88 04 40 10 add %l1, %l0, %g4
the_block->size = page_size;
20065d0: f6 21 20 04 st %i3, [ %g4 + 4 ]
the_block = (Heap_Block *) aligned_start;
the_block->prev_size = page_size;
the_block->size = the_size | HEAP_PREV_USED;
the_block->next = _Heap_Tail( the_heap );
20065d4: f0 24 60 08 st %i0, [ %l1 + 8 ]
the_block->prev = _Heap_Head( the_heap );
20065d8: 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++;
20065dc: c4 26 20 28 st %g2, [ %i0 + 0x28 ]
the_block->size = page_size;
stats->size = size;
stats->free_size = the_size;
stats->min_free_size = the_size;
stats->free_blocks = 1;
20065e0: 82 10 20 01 mov 1, %g1
the_block = _Heap_Block_at( the_block, the_size );
the_heap->final = the_block; /* Permanent final block of the heap */
the_block->prev_size = the_size; /* Previous block is free */
the_block->size = page_size;
stats->size = size;
20065e4: f4 26 20 2c st %i2, [ %i0 + 0x2c ]
stats->free_size = the_size;
stats->min_free_size = the_size;
stats->free_blocks = 1;
stats->max_free_blocks = 1;
20065e8: c2 26 20 3c st %g1, [ %i0 + 0x3c ]
the_block->size = page_size;
stats->size = size;
stats->free_size = the_size;
stats->min_free_size = the_size;
stats->free_blocks = 1;
20065ec: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
the_heap->final = the_block; /* Permanent final block of the heap */
the_block->prev_size = the_size; /* Previous block is free */
the_block->size = page_size;
stats->size = size;
stats->free_size = the_size;
20065f0: e0 26 20 30 st %l0, [ %i0 + 0x30 ]
stats->min_free_size = the_size;
20065f4: e0 26 20 34 st %l0, [ %i0 + 0x34 ]
stats->free_blocks = 1;
stats->max_free_blocks = 1;
stats->used_blocks = 0;
20065f8: c0 26 20 40 clr [ %i0 + 0x40 ]
stats->max_search = 0;
20065fc: c0 26 20 44 clr [ %i0 + 0x44 ]
stats->allocs = 0;
2006600: c0 26 20 48 clr [ %i0 + 0x48 ]
stats->searches = 0;
2006604: c0 26 20 4c clr [ %i0 + 0x4c ]
stats->frees = 0;
2006608: c0 26 20 50 clr [ %i0 + 0x50 ]
stats->resizes = 0;
200660c: c0 26 20 54 clr [ %i0 + 0x54 ]
if ( the_size == 0 )
return 0; /* Too small area for the heap */
the_heap->page_size = page_size;
the_heap->begin = starting_address;
the_heap->end = starting_address + size;
2006610: 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++;
2006614: 84 00 a0 01 inc %g2
if ( the_size == 0 )
return 0; /* Too small area for the heap */
the_heap->page_size = page_size;
the_heap->begin = starting_address;
the_heap->end = starting_address + size;
2006618: 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;
200661c: 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;
2006620: e2 26 20 08 st %l1, [ %i0 + 8 ]
_Heap_Tail(the_heap)->prev = the_block;
2006624: e2 26 20 0c st %l1, [ %i0 + 0xc ]
the_heap->start = the_block;
2006628: 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 */
200662c: c8 26 20 24 st %g4, [ %i0 + 0x24 ]
stats->max_search = 0;
stats->allocs = 0;
stats->searches = 0;
stats->frees = 0;
stats->resizes = 0;
stats->instance = instance++;
2006630: c4 20 e0 ec st %g2, [ %g3 + 0xec ]
return ( the_size - HEAP_BLOCK_USED_OVERHEAD );
2006634: 81 c7 e0 08 ret
2006638: 91 ec 3f fc restore %l0, -4, %o0
}
200663c: 81 c7 e0 08 ret
2006640: 91 e8 20 00 restore %g0, 0, %o0
02014fa4 <_Heap_Resize_block>:
void *starting_address,
size_t size,
uint32_t *old_mem_size,
uint32_t *avail_mem_size
)
{
2014fa4: 9d e3 bf 98 save %sp, -104, %sp
Heap_Block *next_next_block;
uint32_t old_block_size;
uint32_t old_user_size;
uint32_t prev_used_flag;
Heap_Statistics *const stats = &the_heap->stats;
uint32_t const min_block_size = the_heap->min_block_size;
2014fa8: e8 06 20 14 ld [ %i0 + 0x14 ], %l4
uint32_t const page_size = the_heap->page_size;
2014fac: ec 06 20 10 ld [ %i0 + 0x10 ], %l6
*old_mem_size = 0;
2014fb0: c0 26 c0 00 clr [ %i3 ]
*avail_mem_size = 0;
2014fb4: c0 27 00 00 clr [ %i4 ]
/* The address passed could be greater than the block address plus
* HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user
* pointers. To get rid of this offset we need to align the address down
* to the nearest 'page_size' boundary. */
_Heap_Align_down_uptr ( &addr, the_heap->page_size );
*the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET);
2014fb8: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
2014fbc: 7f ff fb ad call 2013e70 <.urem>
2014fc0: 90 10 00 19 mov %i1, %o0
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in (
Heap_Control *the_heap,
Heap_Block *the_block
)
{
return _Addresses_Is_in_range( the_block, the_heap->start, the_heap->final );
2014fc4: c8 06 20 20 ld [ %i0 + 0x20 ], %g4
2014fc8: c6 06 20 24 ld [ %i0 + 0x24 ], %g3
/* The address passed could be greater than the block address plus
* HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user
* pointers. To get rid of this offset we need to align the address down
* to the nearest 'page_size' boundary. */
_Heap_Align_down_uptr ( &addr, the_heap->page_size );
*the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET);
2014fcc: 82 06 7f f8 add %i1, -8, %g1
2014fd0: a4 20 40 08 sub %g1, %o0, %l2
_Heap_Start_of_block(the_heap, starting_address, &the_block);
_HAssert(_Heap_Is_block_in(the_heap, the_block));
if (!_Heap_Is_block_in(the_heap, the_block))
2014fd4: 80 a4 80 04 cmp %l2, %g4
2014fd8: 84 60 3f ff subx %g0, -1, %g2
2014fdc: 80 a0 c0 12 cmp %g3, %l2
2014fe0: 82 60 3f ff subx %g0, -1, %g1
2014fe4: 80 88 80 01 btst %g2, %g1
2014fe8: 02 80 00 75 be 20151bc <_Heap_Resize_block+0x218>
2014fec: a6 10 00 18 mov %i0, %l3
return HEAP_RESIZE_FATAL_ERROR;
prev_used_flag = the_block->size & HEAP_PREV_USED;
2014ff0: da 04 a0 04 ld [ %l2 + 4 ], %o5
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
2014ff4: aa 0b 7f fe and %o5, -2, %l5
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
2014ff8: a2 04 80 15 add %l2, %l5, %l1
old_block_size = _Heap_Block_size(the_block);
next_block = _Heap_Block_at(the_block, old_block_size);
_HAssert(_Heap_Is_block_in(the_heap, next_block));
_HAssert(_Heap_Is_prev_used(next_block));
if ( !_Heap_Is_block_in(the_heap, next_block) ||
2014ffc: 80 a4 40 04 cmp %l1, %g4
2015000: 84 60 3f ff subx %g0, -1, %g2
2015004: 80 a0 c0 11 cmp %g3, %l1
2015008: 82 60 3f ff subx %g0, -1, %g1
201500c: 80 88 80 01 btst %g2, %g1
2015010: 02 80 00 6b be 20151bc <_Heap_Resize_block+0x218> <== NEVER TAKEN
2015014: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used (
Heap_Block *the_block
)
{
return (the_block->size & HEAP_PREV_USED);
2015018: c2 04 60 04 ld [ %l1 + 4 ], %g1
201501c: 80 88 60 01 btst 1, %g1
2015020: 02 80 00 67 be 20151bc <_Heap_Resize_block+0x218> <== NEVER TAKEN
2015024: 80 a4 40 03 cmp %l1, %g3
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
2015028: b0 08 7f fe and %g1, -2, %i0
!_Heap_Is_prev_used(next_block))
return HEAP_RESIZE_FATAL_ERROR;
next_block_size = _Heap_Block_size(next_block);
next_next_block = _Heap_Block_at(next_block, next_block_size);
next_is_used = (next_block == the_heap->final) ||
201502c: 84 10 20 01 mov 1, %g2
2015030: 02 80 00 04 be 2015040 <_Heap_Resize_block+0x9c> <== NEVER TAKEN
2015034: 82 04 40 18 add %l1, %i0, %g1
2015038: c2 00 60 04 ld [ %g1 + 4 ], %g1
201503c: 84 08 60 01 and %g1, 1, %g2
_Heap_Is_prev_used(next_next_block);
/* See _Heap_Size_of_user_area() source for explanations */
old_user_size = _Addresses_Subtract(next_block, starting_address)
2015040: 82 24 40 19 sub %l1, %i1, %g1
2015044: 82 00 60 04 add %g1, 4, %g1
+ HEAP_BLOCK_HEADER_OFFSET;
*old_mem_size = old_user_size;
2015048: c2 26 c0 00 st %g1, [ %i3 ]
!_Heap_Is_prev_used(next_block))
return HEAP_RESIZE_FATAL_ERROR;
next_block_size = _Heap_Block_size(next_block);
next_next_block = _Heap_Block_at(next_block, next_block_size);
next_is_used = (next_block == the_heap->final) ||
201504c: b2 10 00 02 mov %g2, %i1
old_user_size = _Addresses_Subtract(next_block, starting_address)
+ HEAP_BLOCK_HEADER_OFFSET;
*old_mem_size = old_user_size;
if (size > old_user_size) {
2015050: 80 a6 80 01 cmp %i2, %g1
2015054: 08 80 00 1e bleu 20150cc <_Heap_Resize_block+0x128>
2015058: b6 0b 60 01 and %o5, 1, %i3
/* Need to extend the block: allocate part of the next block and then
merge 'the_block' and allocated block together. */
if (next_is_used) /* Next block is in use, -- no way to extend */
201505c: 80 a6 60 00 cmp %i1, 0
2015060: 12 80 00 59 bne 20151c4 <_Heap_Resize_block+0x220>
2015064: a0 26 80 01 sub %i2, %g1, %l0
uint32_t alignment
)
{
uint32_t v = *value;
uint32_t a = alignment;
uint32_t r = v % a;
2015068: 92 10 00 16 mov %l6, %o1
201506c: 7f ff fb 81 call 2013e70 <.urem>
2015070: 90 10 00 10 mov %l0, %o0
*value = r ? v - r + a : v;
2015074: 80 a2 20 00 cmp %o0, 0
2015078: 02 80 00 05 be 201508c <_Heap_Resize_block+0xe8> <== NEVER TAKEN
201507c: 80 a4 00 14 cmp %l0, %l4
2015080: 82 04 00 16 add %l0, %l6, %g1
2015084: a0 20 40 08 sub %g1, %o0, %l0
2015088: 80 a4 00 14 cmp %l0, %l4
201508c: 1a 80 00 03 bcc 2015098 <_Heap_Resize_block+0xf4> <== NEVER TAKEN
2015090: 90 10 00 10 mov %l0, %o0
2015094: 90 10 00 14 mov %l4, %o0
else {
uint32_t add_block_size = size - old_user_size;
_Heap_Align_up(&add_block_size, page_size);
if (add_block_size < min_block_size)
add_block_size = min_block_size;
if (add_block_size > next_block_size)
2015098: 80 a2 00 18 cmp %o0, %i0
201509c: 18 80 00 4a bgu 20151c4 <_Heap_Resize_block+0x220> <== NEVER TAKEN
20150a0: 94 10 00 08 mov %o0, %o2
return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */
add_block_size =
20150a4: 92 10 00 11 mov %l1, %o1
20150a8: 7f ff c5 7b call 2006694 <_Heap_Block_allocate>
20150ac: 90 10 00 13 mov %l3, %o0
_Heap_Block_allocate(the_heap, next_block, add_block_size);
/* Merge two subsequent blocks */
the_block->size = (old_block_size + add_block_size) | prev_used_flag;
20150b0: 90 02 00 15 add %o0, %l5, %o0
20150b4: 90 12 00 1b or %o0, %i3, %o0
20150b8: d0 24 a0 04 st %o0, [ %l2 + 4 ]
--stats->used_blocks;
20150bc: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1
20150c0: 82 00 7f ff add %g1, -1, %g1
20150c4: 10 80 00 39 b 20151a8 <_Heap_Resize_block+0x204>
20150c8: c2 24 e0 40 st %g1, [ %l3 + 0x40 ]
}
} else {
/* Calculate how much memory we could free */
uint32_t free_block_size = old_user_size - size;
20150cc: a0 20 40 1a sub %g1, %i2, %l0
uint32_t *value,
uint32_t alignment
)
{
uint32_t v = *value;
*value = v - (v % alignment);
20150d0: 92 10 00 16 mov %l6, %o1
20150d4: 7f ff fb 67 call 2013e70 <.urem>
20150d8: 90 10 00 10 mov %l0, %o0
_Heap_Align_down(&free_block_size, page_size);
if (free_block_size > 0) {
20150dc: a0 a4 00 08 subcc %l0, %o0, %l0
20150e0: 22 80 00 33 be,a 20151ac <_Heap_Resize_block+0x208>
20150e4: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1
/* To free some memory the block should be shortened so that it can
can hold 'size' user bytes and still remain not shorter than
'min_block_size'. */
uint32_t new_block_size = old_block_size - free_block_size;
20150e8: 84 25 40 10 sub %l5, %l0, %g2
if (new_block_size < min_block_size) {
20150ec: 80 a0 80 14 cmp %g2, %l4
20150f0: 1a 80 00 07 bcc 201510c <_Heap_Resize_block+0x168>
20150f4: 80 a6 60 00 cmp %i1, 0
uint32_t delta = min_block_size - new_block_size;
20150f8: 82 25 00 02 sub %l4, %g2, %g1
_HAssert(free_block_size >= delta);
free_block_size -= delta;
if (free_block_size == 0) {
20150fc: a0 a4 00 01 subcc %l0, %g1, %l0
2015100: 02 80 00 2a be 20151a8 <_Heap_Resize_block+0x204> <== ALWAYS TAKEN
2015104: 84 00 80 01 add %g2, %g1, %g2
_HAssert(new_block_size >= min_block_size);
_HAssert(new_block_size + free_block_size == old_block_size);
_HAssert(_Heap_Is_aligned(new_block_size, page_size));
_HAssert(_Heap_Is_aligned(free_block_size, page_size));
if (!next_is_used) {
2015108: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
201510c: 12 80 00 15 bne 2015160 <_Heap_Resize_block+0x1bc> <== NEVER TAKEN
2015110: 80 a4 00 14 cmp %l0, %l4
Heap_Block *const new_next_block =
_Heap_Block_at(the_block, new_block_size);
uint32_t const new_next_block_size =
next_block_size + free_block_size;
_HAssert(_Heap_Is_block_in(the_heap, next_next_block));
the_block->size = new_block_size | prev_used_flag;
2015114: 82 10 80 1b or %g2, %i3, %g1
if (!next_is_used) {
/* Extend the next block to the low addresses by 'free_block_size' */
Heap_Block *const new_next_block =
_Heap_Block_at(the_block, new_block_size);
uint32_t const new_next_block_size =
next_block_size + free_block_size;
2015118: 86 04 00 18 add %l0, %i0, %g3
_HAssert(_Heap_Is_block_in(the_heap, next_next_block));
the_block->size = new_block_size | prev_used_flag;
201511c: c2 24 a0 04 st %g1, [ %l2 + 4 ]
new_next_block->size = new_next_block_size | HEAP_PREV_USED;
2015120: 82 10 e0 01 or %g3, 1, %g1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
2015124: 84 04 80 02 add %l2, %g2, %g2
next_next_block->prev_size = new_next_block_size;
2015128: c6 24 40 18 st %g3, [ %l1 + %i0 ]
Heap_Block *new_block
)
{
Heap_Block *block = old_block;
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
201512c: da 04 60 0c ld [ %l1 + 0xc ], %o5
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *block = old_block;
Heap_Block *next = block->next;
2015130: c8 04 60 08 ld [ %l1 + 8 ], %g4
_Heap_Block_at(the_block, new_block_size);
uint32_t const new_next_block_size =
next_block_size + free_block_size;
_HAssert(_Heap_Is_block_in(the_heap, next_next_block));
the_block->size = new_block_size | prev_used_flag;
new_next_block->size = new_next_block_size | HEAP_PREV_USED;
2015134: c2 20 a0 04 st %g1, [ %g2 + 4 ]
next_next_block->prev_size = new_next_block_size;
_Heap_Block_replace(next_block, new_next_block);
the_heap->stats.free_size += free_block_size;
2015138: c2 04 e0 30 ld [ %l3 + 0x30 ], %g1
Heap_Block *prev = block->prev;
block = new_block;
block->next = next;
201513c: c8 20 a0 08 st %g4, [ %g2 + 8 ]
2015140: 82 00 40 10 add %g1, %l0, %g1
block->prev = prev;
2015144: da 20 a0 0c st %o5, [ %g2 + 0xc ]
2015148: c2 24 e0 30 st %g1, [ %l3 + 0x30 ]
*avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD;
201514c: 86 00 ff fc add %g3, -4, %g3
next->prev = prev->next = block;
2015150: c4 21 20 0c st %g2, [ %g4 + 0xc ]
2015154: c4 23 60 08 st %g2, [ %o5 + 8 ]
2015158: 10 80 00 14 b 20151a8 <_Heap_Resize_block+0x204>
201515c: c6 27 00 00 st %g3, [ %i4 ]
} else if (free_block_size >= min_block_size) {
2015160: 2a 80 00 13 bcs,a 20151ac <_Heap_Resize_block+0x208> <== NOT EXECUTED
2015164: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1 <== NOT EXECUTED
/* Split the block into 2 used parts, then free the second one. */
the_block->size = new_block_size | prev_used_flag;
2015168: 82 10 80 1b or %g2, %i3, %g1 <== NOT EXECUTED
201516c: c2 24 a0 04 st %g1, [ %l2 + 4 ] <== NOT EXECUTED
next_block = _Heap_Block_at(the_block, new_block_size);
next_block->size = free_block_size | HEAP_PREV_USED;
2015170: 82 14 20 01 or %l0, 1, %g1 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
2015174: 92 04 80 02 add %l2, %g2, %o1 <== NOT EXECUTED
2015178: c2 22 60 04 st %g1, [ %o1 + 4 ] <== NOT EXECUTED
++stats->used_blocks; /* We have created used block */
201517c: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 <== NOT EXECUTED
--stats->frees; /* Don't count next call in stats */
2015180: c4 04 e0 50 ld [ %l3 + 0x50 ], %g2 <== NOT EXECUTED
} else if (free_block_size >= min_block_size) {
/* Split the block into 2 used parts, then free the second one. */
the_block->size = new_block_size | prev_used_flag;
next_block = _Heap_Block_at(the_block, new_block_size);
next_block->size = free_block_size | HEAP_PREV_USED;
++stats->used_blocks; /* We have created used block */
2015184: 82 00 60 01 inc %g1 <== NOT EXECUTED
--stats->frees; /* Don't count next call in stats */
2015188: 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 */
201518c: c2 24 e0 40 st %g1, [ %l3 + 0x40 ] <== NOT EXECUTED
--stats->frees; /* Don't count next call in stats */
2015190: c4 24 e0 50 st %g2, [ %l3 + 0x50 ] <== NOT EXECUTED
_Heap_Free(the_heap, _Heap_User_area(next_block));
2015194: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED
2015198: 7f ff da 25 call 200ba2c <_Heap_Free> <== NOT EXECUTED
201519c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
*avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD;
20151a0: 82 04 3f fc add %l0, -4, %g1 <== NOT EXECUTED
20151a4: c2 27 00 00 st %g1, [ %i4 ] <== NOT EXECUTED
}
}
}
++stats->resizes;
20151a8: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1
20151ac: 82 00 60 01 inc %g1
20151b0: c2 24 e0 54 st %g1, [ %l3 + 0x54 ]
20151b4: 81 c7 e0 08 ret
20151b8: 91 e8 20 00 restore %g0, 0, %o0
return HEAP_RESIZE_SUCCESSFUL;
20151bc: 81 c7 e0 08 ret
20151c0: 91 e8 20 02 restore %g0, 2, %o0
}
20151c4: 81 c7 e0 08 ret
20151c8: 91 e8 20 01 restore %g0, 1, %o0
020151cc <_Heap_Size_of_user_area>:
bool _Heap_Size_of_user_area(
Heap_Control *the_heap,
void *starting_address,
size_t *size
)
{
20151cc: 9d e3 bf 98 save %sp, -104, %sp
Heap_Block *the_block;
Heap_Block *next_block;
uint32_t the_size;
if ( !_Addresses_Is_in_range(
20151d0: e0 06 20 20 ld [ %i0 + 0x20 ], %l0
20151d4: e2 06 20 24 ld [ %i0 + 0x24 ], %l1
20151d8: 80 a6 40 10 cmp %i1, %l0
20151dc: 84 60 3f ff subx %g0, -1, %g2
20151e0: 80 a4 40 19 cmp %l1, %i1
20151e4: 82 60 3f ff subx %g0, -1, %g1
20151e8: 80 88 80 01 btst %g2, %g1
20151ec: 02 80 00 20 be 201526c <_Heap_Size_of_user_area+0xa0>
20151f0: 01 00 00 00 nop
/* 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);
20151f4: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
20151f8: 7f ff fb 1e call 2013e70 <.urem>
20151fc: 90 10 00 19 mov %i1, %o0
2015200: 82 06 7f f8 add %i1, -8, %g1
2015204: 86 20 40 08 sub %g1, %o0, %g3
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 ) )
2015208: 80 a0 c0 10 cmp %g3, %l0
201520c: 84 60 3f ff subx %g0, -1, %g2
2015210: 80 a4 40 03 cmp %l1, %g3
2015214: 82 60 3f ff subx %g0, -1, %g1
2015218: 80 88 80 01 btst %g2, %g1
201521c: 02 80 00 14 be 201526c <_Heap_Size_of_user_area+0xa0> <== NEVER TAKEN
2015220: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
2015224: c2 00 e0 04 ld [ %g3 + 4 ], %g1
2015228: 82 08 7f fe and %g1, -2, %g1
201522c: 90 00 c0 01 add %g3, %g1, %o0
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 (
2015230: 80 a2 00 10 cmp %o0, %l0
2015234: 84 60 3f ff subx %g0, -1, %g2
2015238: 80 a4 40 08 cmp %l1, %o0
201523c: 82 60 3f ff subx %g0, -1, %g1
2015240: 80 88 80 01 btst %g2, %g1
2015244: 02 80 00 0a be 201526c <_Heap_Size_of_user_area+0xa0> <== NEVER TAKEN
2015248: 01 00 00 00 nop
201524c: c2 02 20 04 ld [ %o0 + 4 ], %g1
2015250: 80 88 60 01 btst 1, %g1
2015254: 02 80 00 06 be 201526c <_Heap_Size_of_user_area+0xa0> <== NEVER TAKEN
2015258: 82 22 00 19 sub %o0, %i1, %g1
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 )
201525c: 82 00 60 04 add %g1, 4, %g1
2015260: c2 26 80 00 st %g1, [ %i2 ]
2015264: 81 c7 e0 08 ret
2015268: 91 e8 20 01 restore %g0, 1, %o0
+ HEAP_BLOCK_HEADER_OFFSET;
return( TRUE );
}
201526c: 81 c7 e0 08 ret
2015270: 91 e8 20 00 restore %g0, 0, %o0
0200e524 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
200e524: 9d e3 bf 98 save %sp, -104, %sp
200e528: a6 10 00 18 mov %i0, %l3
/*
if ( !_System_state_Is_up( _System_state_Get() ) )
return TRUE;
*/
if (source < 0)
200e52c: 80 a6 60 00 cmp %i1, 0
Heap_Control *the_heap,
int source,
bool do_dump
)
{
Heap_Block *the_block = the_heap->start;
200e530: e0 06 20 20 ld [ %i0 + 0x20 ], %l0
/*
if ( !_System_state_Is_up( _System_state_Get() ) )
return TRUE;
*/
if (source < 0)
200e534: 16 80 00 03 bge 200e540 <_Heap_Walk+0x1c> <== ALWAYS TAKEN
200e538: ec 06 20 24 ld [ %i0 + 0x24 ], %l6
source = the_heap->stats.instance;
200e53c: f2 06 20 28 ld [ %i0 + 0x28 ], %i1 <== NOT EXECUTED
/*
* Handle the 1st block
*/
if (!_Heap_Is_prev_used(the_block)) {
200e540: c2 04 20 04 ld [ %l0 + 4 ], %g1
200e544: 80 88 60 01 btst 1, %g1
200e548: 12 80 00 07 bne 200e564 <_Heap_Walk+0x40> <== ALWAYS TAKEN
200e54c: b0 10 20 00 clr %i0
printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source);
200e550: 11 00 80 6c sethi %hi(0x201b000), %o0 <== NOT EXECUTED
200e554: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200e558: 90 12 21 c8 or %o0, 0x1c8, %o0 <== NOT EXECUTED
200e55c: 7f ff d9 29 call 2004a00 <printk> <== NOT EXECUTED
200e560: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
error = 1;
}
if (the_block->prev_size != the_heap->page_size) {
200e564: c4 04 00 00 ld [ %l0 ], %g2
200e568: c2 04 e0 10 ld [ %l3 + 0x10 ], %g1
200e56c: 80 a0 80 01 cmp %g2, %g1
200e570: 22 80 00 5e be,a 200e6e8 <_Heap_Walk+0x1c4> <== ALWAYS TAKEN
200e574: 03 00 80 68 sethi %hi(0x201a000), %g1
printk("PASS: %d !prev_size of 1st block isn't page_size\n", source);
200e578: 11 00 80 6c sethi %hi(0x201b000), %o0 <== NOT EXECUTED
200e57c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200e580: 90 12 22 00 or %o0, 0x200, %o0 <== NOT EXECUTED
200e584: 7f ff d9 1f call 2004a00 <printk> <== NOT EXECUTED
200e588: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
error = 1;
}
}
}
if (do_dump || error) printk("\n");
200e58c: 10 80 00 57 b 200e6e8 <_Heap_Walk+0x1c4> <== NOT EXECUTED
200e590: 03 00 80 68 sethi %hi(0x201a000), %g1 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
200e594: e8 04 20 04 ld [ %l0 + 4 ], %l4
printk(" prev_size %d", the_block->prev_size);
else
printk(" (prev_size) %d", the_block->prev_size);
}
if (!_Heap_Is_block_in(the_heap, next_block)) {
200e598: c6 04 e0 24 ld [ %l3 + 0x24 ], %g3
200e59c: a4 0d 3f fe and %l4, -2, %l2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
200e5a0: a2 04 00 12 add %l0, %l2, %l1
200e5a4: 80 a4 40 01 cmp %l1, %g1
200e5a8: 84 60 3f ff subx %g0, -1, %g2
200e5ac: 80 a0 c0 11 cmp %g3, %l1
200e5b0: 82 60 3f ff subx %g0, -1, %g1
200e5b4: 80 88 80 01 btst %g2, %g1
200e5b8: 32 80 00 09 bne,a 200e5dc <_Heap_Walk+0xb8> <== ALWAYS TAKEN
200e5bc: c2 04 60 04 ld [ %l1 + 4 ], %g1
if (do_dump) printk("\n");
printk("PASS: %d !block %p is out of heap\n", source, next_block);
200e5c0: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED
200e5c4: 11 00 80 6c sethi %hi(0x201b000), %o0 <== NOT EXECUTED
200e5c8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200e5cc: 7f ff d9 0d call 2004a00 <printk> <== NOT EXECUTED
200e5d0: 90 12 22 38 or %o0, 0x238, %o0 <== NOT EXECUTED
the_block = next_block;
}
if (the_block != end) {
printk("PASS: %d !last block address isn't equal to 'final' %p %p\n",
200e5d4: 10 80 00 51 b 200e718 <_Heap_Walk+0x1f4> <== NOT EXECUTED
200e5d8: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED
printk("PASS: %d !block %p is out of heap\n", source, next_block);
error = 1;
break;
}
if (!_Heap_Is_prev_used(next_block)) {
200e5dc: 80 88 60 01 btst 1, %g1
200e5e0: 12 80 00 27 bne 200e67c <_Heap_Walk+0x158>
200e5e4: 80 a6 20 00 cmp %i0, 0
if (do_dump)
printk( " prev %p next %p", the_block->prev, the_block->next);
if (_Heap_Block_size(the_block) != next_block->prev_size) {
200e5e8: c2 04 40 00 ld [ %l1 ], %g1
200e5ec: 80 a4 80 01 cmp %l2, %g1
200e5f0: 02 80 00 07 be 200e60c <_Heap_Walk+0xe8> <== ALWAYS TAKEN
200e5f4: 80 8d 20 01 btst 1, %l4
if (do_dump) printk("\n");
printk("PASS: %d !front and back sizes don't match", source);
200e5f8: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED
200e5fc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200e600: 7f ff d9 00 call 2004a00 <printk> <== NOT EXECUTED
200e604: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
error = 1;
}
if (!prev_used) {
200e608: 80 8d 20 01 btst 1, %l4 <== NOT EXECUTED
200e60c: 32 80 00 0c bne,a 200e63c <_Heap_Walk+0x118> <== ALWAYS TAKEN
200e610: c2 04 e0 08 ld [ %l3 + 8 ], %g1
if (do_dump || error) printk("\n");
200e614: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
200e618: 02 80 00 05 be 200e62c <_Heap_Walk+0x108> <== NOT EXECUTED
200e61c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
200e620: 7f ff d8 f8 call 2004a00 <printk> <== NOT EXECUTED
200e624: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED
printk("PASS: %d !two consecutive blocks are free", source);
200e628: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
200e62c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200e630: 7f ff d8 f4 call 2004a00 <printk> <== NOT EXECUTED
200e634: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
200e638: c2 04 e0 08 ld [ %l3 + 8 ], %g1 <== NOT EXECUTED
error = 1;
}
{ /* Check if 'the_block' is in the free block list */
Heap_Block* block = _Heap_First(the_heap);
while(block != the_block && block != tail)
200e63c: 80 a0 40 10 cmp %g1, %l0
200e640: 02 80 00 0e be 200e678 <_Heap_Walk+0x154>
200e644: 80 a0 40 13 cmp %g1, %l3
200e648: 32 bf ff fd bne,a 200e63c <_Heap_Walk+0x118> <== ALWAYS TAKEN
200e64c: c2 00 60 08 ld [ %g1 + 8 ], %g1
block = block->next;
if(block != the_block) {
if (do_dump || error) printk("\n");
200e650: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
200e654: 22 80 00 05 be,a 200e668 <_Heap_Walk+0x144> <== NOT EXECUTED
200e658: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
200e65c: 7f ff d8 e9 call 2004a00 <printk> <== NOT EXECUTED
200e660: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED
printk("PASS: %d !the_block not in the free list", source);
200e664: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
200e668: 7f ff d8 e6 call 2004a00 <printk> <== NOT EXECUTED
200e66c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
error = 1;
}
}
}
if (do_dump || error) printk("\n");
200e670: 10 80 00 06 b 200e688 <_Heap_Walk+0x164> <== NOT EXECUTED
200e674: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED
200e678: 80 a6 20 00 cmp %i0, 0
200e67c: 22 80 00 06 be,a 200e694 <_Heap_Walk+0x170> <== ALWAYS TAKEN
200e680: c2 04 e0 14 ld [ %l3 + 0x14 ], %g1
200e684: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED
200e688: 7f ff d8 de call 2004a00 <printk> <== NOT EXECUTED
200e68c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
if (the_size < the_heap->min_block_size) {
200e690: c2 04 e0 14 ld [ %l3 + 0x14 ], %g1 <== NOT EXECUTED
200e694: 80 a4 80 01 cmp %l2, %g1
200e698: 3a 80 00 05 bcc,a 200e6ac <_Heap_Walk+0x188> <== ALWAYS TAKEN
200e69c: d2 04 e0 10 ld [ %l3 + 0x10 ], %o1
printk("PASS: %d !block size is too small\n", source);
200e6a0: 11 00 80 6c sethi %hi(0x201b000), %o0 <== NOT EXECUTED
200e6a4: 10 80 00 09 b 200e6c8 <_Heap_Walk+0x1a4> <== NOT EXECUTED
200e6a8: 90 12 22 f0 or %o0, 0x2f0, %o0 ! 201b2f0 <_POSIX_Threads_Default_attributes+0x160><== NOT EXECUTED
error = 1;
break;
}
if (!_Heap_Is_aligned( the_size, the_heap->page_size)) {
200e6ac: 40 00 27 1e call 2018324 <.urem>
200e6b0: 90 10 00 12 mov %l2, %o0
200e6b4: 80 a2 20 00 cmp %o0, 0
200e6b8: 02 80 00 08 be 200e6d8 <_Heap_Walk+0x1b4> <== ALWAYS TAKEN
200e6bc: 80 a6 20 00 cmp %i0, 0
printk("PASS: %d !block size is misaligned\n", source);
200e6c0: 11 00 80 6c sethi %hi(0x201b000), %o0 <== NOT EXECUTED
200e6c4: 90 12 23 18 or %o0, 0x318, %o0 ! 201b318 <_POSIX_Threads_Default_attributes+0x188><== NOT EXECUTED
200e6c8: 7f ff d8 ce call 2004a00 <printk> <== NOT EXECUTED
200e6cc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
the_block = next_block;
}
if (the_block != end) {
printk("PASS: %d !last block address isn't equal to 'final' %p %p\n",
200e6d0: 10 80 00 12 b 200e718 <_Heap_Walk+0x1f4> <== NOT EXECUTED
200e6d4: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED
if (!_Heap_Is_aligned( the_size, the_heap->page_size)) {
printk("PASS: %d !block size is misaligned\n", source);
error = 1;
}
if (++passes > (do_dump ? 10 : 0) && error)
200e6d8: 12 80 00 10 bne 200e718 <_Heap_Walk+0x1f4> <== NEVER TAKEN
200e6dc: 96 10 00 16 mov %l6, %o3
break;
200e6e0: 10 80 00 09 b 200e704 <_Heap_Walk+0x1e0>
200e6e4: a0 10 00 11 mov %l1, %l0
error = 1;
}
}
}
if (do_dump || error) printk("\n");
200e6e8: aa 10 63 c0 or %g1, 0x3c0, %l5
Heap_Block* block = _Heap_First(the_heap);
while(block != the_block && block != tail)
block = block->next;
if(block != the_block) {
if (do_dump || error) printk("\n");
printk("PASS: %d !the_block not in the free list", source);
200e6ec: 03 00 80 6c sethi %hi(0x201b000), %g1
200e6f0: b8 10 62 c0 or %g1, 0x2c0, %i4 ! 201b2c0 <_POSIX_Threads_Default_attributes+0x130>
printk("PASS: %d !front and back sizes don't match", source);
error = 1;
}
if (!prev_used) {
if (do_dump || error) printk("\n");
printk("PASS: %d !two consecutive blocks are free", source);
200e6f4: 03 00 80 6c sethi %hi(0x201b000), %g1
200e6f8: ba 10 62 90 or %g1, 0x290, %i5 ! 201b290 <_POSIX_Threads_Default_attributes+0x100>
if (!_Heap_Is_prev_used(next_block)) {
if (do_dump)
printk( " prev %p next %p", the_block->prev, the_block->next);
if (_Heap_Block_size(the_block) != next_block->prev_size) {
if (do_dump) printk("\n");
printk("PASS: %d !front and back sizes don't match", source);
200e6fc: 03 00 80 6c sethi %hi(0x201b000), %g1
200e700: ae 10 62 60 or %g1, 0x260, %l7 ! 201b260 <_POSIX_Threads_Default_attributes+0xd0>
if (the_block->prev_size != the_heap->page_size) {
printk("PASS: %d !prev_size of 1st block isn't page_size\n", source);
error = 1;
}
while ( the_block != end ) {
200e704: 80 a4 00 16 cmp %l0, %l6
200e708: 32 bf ff a3 bne,a 200e594 <_Heap_Walk+0x70>
200e70c: c2 04 e0 20 ld [ %l3 + 0x20 ], %g1
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
200e710: 10 80 00 09 b 200e734 <_Heap_Walk+0x210>
200e714: c2 04 20 04 ld [ %l0 + 4 ], %g1
the_block = next_block;
}
if (the_block != end) {
printk("PASS: %d !last block address isn't equal to 'final' %p %p\n",
200e718: 11 00 80 6c sethi %hi(0x201b000), %o0 <== NOT EXECUTED
200e71c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200e720: 90 12 23 40 or %o0, 0x340, %o0 <== NOT EXECUTED
200e724: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
200e728: 7f ff d8 b6 call 2004a00 <printk> <== NOT EXECUTED
200e72c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
200e730: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED
source, the_block, end);
error = 1;
}
if (_Heap_Block_size(the_block) != the_heap->page_size) {
200e734: d6 04 e0 10 ld [ %l3 + 0x10 ], %o3
200e738: 94 08 7f fe and %g1, -2, %o2
200e73c: 80 a2 80 0b cmp %o2, %o3
200e740: 02 80 00 06 be 200e758 <_Heap_Walk+0x234> <== ALWAYS TAKEN
200e744: 92 10 00 19 mov %i1, %o1
printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source,
200e748: 11 00 80 6c sethi %hi(0x201b000), %o0 <== NOT EXECUTED
200e74c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
200e750: 7f ff d8 ac call 2004a00 <printk> <== NOT EXECUTED
200e754: 90 12 23 80 or %o0, 0x380, %o0 <== NOT EXECUTED
if(do_dump && error)
_Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 );
return error;
}
200e758: 81 c7 e0 08 ret
200e75c: 81 e8 00 00 restore
020067f8 <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
20067f8: 9d e3 bf 98 save %sp, -104, %sp
* If the application is using the optional manager stubs and
* still attempts to create the object, the information block
* should be all zeroed out because it is in the BSS. So let's
* check that code for this manager is even present.
*/
if ( information->size == 0 )
20067fc: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
2006800: a0 10 00 18 mov %i0, %l0
* If the application is using the optional manager stubs and
* still attempts to create the object, the information block
* should be all zeroed out because it is in the BSS. So let's
* check that code for this manager is even present.
*/
if ( information->size == 0 )
2006804: 80 a0 60 00 cmp %g1, 0
2006808: 02 80 00 24 be 2006898 <_Objects_Allocate+0xa0> <== NEVER TAKEN
200680c: b0 10 20 00 clr %i0
/*
* OK. The manager should be initialized and configured to have objects.
* With any luck, it is safe to attempt to allocate an object.
*/
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
2006810: a2 04 20 20 add %l0, 0x20, %l1
2006814: 40 00 13 da call 200b77c <_Chain_Get>
2006818: 90 10 00 11 mov %l1, %o0
if ( information->auto_extend ) {
200681c: c2 0c 20 12 ldub [ %l0 + 0x12 ], %g1
2006820: 80 a0 60 00 cmp %g1, 0
2006824: 02 80 00 1d be 2006898 <_Objects_Allocate+0xa0>
2006828: b0 10 00 08 mov %o0, %i0
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
200682c: 80 a2 20 00 cmp %o0, 0
2006830: 32 80 00 0a bne,a 2006858 <_Objects_Allocate+0x60>
2006834: c4 06 20 08 ld [ %i0 + 8 ], %g2
_Objects_Extend_information( information );
2006838: 40 00 00 25 call 20068cc <_Objects_Extend_information>
200683c: 90 10 00 10 mov %l0, %o0
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
2006840: 40 00 13 cf call 200b77c <_Chain_Get>
2006844: 90 10 00 11 mov %l1, %o0
}
if ( the_object ) {
2006848: b0 92 20 00 orcc %o0, 0, %i0
200684c: 02 80 00 13 be 2006898 <_Objects_Allocate+0xa0> <== NEVER TAKEN
2006850: 01 00 00 00 nop
uint32_t block;
block = _Objects_Get_index( the_object->id ) -
2006854: c4 06 20 08 ld [ %i0 + 8 ], %g2
2006858: d0 04 20 08 ld [ %l0 + 8 ], %o0
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
200685c: d2 04 20 14 ld [ %l0 + 0x14 ], %o1
}
if ( the_object ) {
uint32_t block;
block = _Objects_Get_index( the_object->id ) -
2006860: 03 00 00 3f sethi %hi(0xfc00), %g1
2006864: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
2006868: 84 08 80 01 and %g2, %g1, %g2
200686c: 90 0a 00 01 and %o0, %g1, %o0
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
2006870: 40 00 34 d4 call 2013bc0 <.udiv>
2006874: 90 20 80 08 sub %g2, %o0, %o0
2006878: c6 04 20 30 ld [ %l0 + 0x30 ], %g3
200687c: 91 2a 20 02 sll %o0, 2, %o0
information->inactive--;
2006880: c2 14 20 2c lduh [ %l0 + 0x2c ], %g1
block = _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
2006884: c4 00 c0 08 ld [ %g3 + %o0 ], %g2
information->inactive--;
2006888: 82 00 7f ff add %g1, -1, %g1
block = _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
200688c: 84 00 bf ff add %g2, -1, %g2
information->inactive--;
2006890: c2 34 20 2c sth %g1, [ %l0 + 0x2c ]
block = _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
2006894: c4 20 c0 08 st %g2, [ %g3 + %o0 ]
information->inactive--;
}
}
return the_object;
}
2006898: 81 c7 e0 08 ret
200689c: 81 e8 00 00 restore
020068cc <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
20068cc: 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;
20068d0: 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 )
20068d4: e0 16 20 10 lduh [ %i0 + 0x10 ], %l0
20068d8: 03 00 00 3f sethi %hi(0xfc00), %g1
20068dc: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
20068e0: a2 08 80 01 and %g2, %g1, %l1
20068e4: 80 a4 00 11 cmp %l0, %l1
20068e8: 3a 80 00 06 bcc,a 2006900 <_Objects_Extend_information+0x34>
20068ec: e4 06 20 14 ld [ %i0 + 0x14 ], %l2
20068f0: aa 10 00 11 mov %l1, %l5
20068f4: ae 10 20 00 clr %l7
20068f8: 10 80 00 13 b 2006944 <_Objects_Extend_information+0x78>
20068fc: ac 10 20 00 clr %l6
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
2006900: 90 10 00 10 mov %l0, %o0
2006904: 92 10 00 12 mov %l2, %o1
2006908: 40 00 34 ae call 2013bc0 <.udiv>
200690c: aa 10 00 11 mov %l1, %l5
2006910: ac 10 20 00 clr %l6
2006914: 10 80 00 09 b 2006938 <_Objects_Extend_information+0x6c>
2006918: ae 10 00 08 mov %o0, %l7
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL )
200691c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
2006920: c2 00 40 02 ld [ %g1 + %g2 ], %g1
2006924: 80 a0 60 00 cmp %g1, 0
2006928: 02 80 00 08 be 2006948 <_Objects_Extend_information+0x7c>
200692c: 80 a5 40 10 cmp %l5, %l0
break;
else
index_base += information->allocation_size;
2006930: aa 05 40 12 add %l5, %l2, %l5
if ( information->maximum < minimum_index )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
2006934: ac 05 a0 01 inc %l6
2006938: 80 a5 80 17 cmp %l6, %l7
200693c: 0a bf ff f8 bcs 200691c <_Objects_Extend_information+0x50>
2006940: 85 2d a0 02 sll %l6, 2, %g2
/*
* If the index_base is the maximum we need to grow the tables.
*/
if (index_base >= information->maximum ) {
2006944: 80 a5 40 10 cmp %l5, %l0
2006948: 2a 80 00 5d bcs,a 2006abc <_Objects_Extend_information+0x1f0>
200694c: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1
* Up the block count and maximum
*/
block_count++;
maximum = information->maximum + information->allocation_size;
2006950: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
/*
* Allocate the tables and break it up.
*/
if ( information->auto_extend ) {
2006954: c4 0e 20 12 ldub [ %i0 + 0x12 ], %g2
* Up the block count and maximum
*/
block_count++;
maximum = information->maximum + information->allocation_size;
2006958: ba 04 00 01 add %l0, %g1, %i5
/*
* Allocate the tables and break it up.
*/
if ( information->auto_extend ) {
200695c: 80 a0 a0 00 cmp %g2, 0
/*
* Up the block count and maximum
*/
block_count++;
2006960: a0 05 e0 01 add %l7, 1, %l0
2006964: 82 07 40 11 add %i5, %l1, %g1
/*
* Allocate the tables and break it up.
*/
if ( information->auto_extend ) {
2006968: 02 80 00 0b be 2006994 <_Objects_Extend_information+0xc8>
200696c: 91 2c 20 01 sll %l0, 1, %o0
object_blocks = (void**)
2006970: 90 02 00 10 add %o0, %l0, %o0
2006974: 90 00 40 08 add %g1, %o0, %o0
2006978: 40 00 08 93 call 2008bc4 <_Workspace_Allocate>
200697c: 91 2a 20 02 sll %o0, 2, %o0
block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *))
);
if ( !object_blocks )
2006980: a4 92 20 00 orcc %o0, 0, %l2
2006984: 32 80 00 0a bne,a 20069ac <_Objects_Extend_information+0xe0><== ALWAYS TAKEN
2006988: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
200698c: 81 c7 e0 08 ret <== NOT EXECUTED
2006990: 81 e8 00 00 restore <== NOT EXECUTED
return;
}
else {
object_blocks = (void**)
2006994: 90 02 00 10 add %o0, %l0, %o0
2006998: 90 00 40 08 add %g1, %o0, %o0
200699c: 40 00 08 91 call 2008be0 <_Workspace_Allocate_or_fatal_error>
20069a0: 91 2a 20 02 sll %o0, 2, %o0
20069a4: a4 10 00 08 mov %o0, %l2
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
20069a8: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
/*
* Break the block into the various sections.
*
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
20069ac: 85 2c 20 02 sll %l0, 2, %g2
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
20069b0: 80 a0 40 11 cmp %g1, %l1
/*
* Break the block into the various sections.
*
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
20069b4: a8 04 80 02 add %l2, %g2, %l4
20069b8: a6 05 00 02 add %l4, %g2, %l3
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
20069bc: 08 80 00 15 bleu 2006a10 <_Objects_Extend_information+0x144>
20069c0: 84 10 20 00 clr %g2
/*
* Copy each section of the table over. This has to be performed as
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
20069c4: d2 06 20 34 ld [ %i0 + 0x34 ], %o1
20069c8: a1 2d e0 02 sll %l7, 2, %l0
20069cc: 90 10 00 12 mov %l2, %o0
20069d0: 40 00 1b a3 call 200d85c <memcpy>
20069d4: 94 10 00 10 mov %l0, %o2
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
20069d8: d2 06 20 30 ld [ %i0 + 0x30 ], %o1
20069dc: 94 10 00 10 mov %l0, %o2
20069e0: 40 00 1b 9f call 200d85c <memcpy>
20069e4: 90 10 00 14 mov %l4, %o0
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
20069e8: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2
20069ec: d2 06 20 1c ld [ %i0 + 0x1c ], %o1
20069f0: 94 04 40 0a add %l1, %o2, %o2
20069f4: 90 10 00 13 mov %l3, %o0
20069f8: 40 00 1b 99 call 200d85c <memcpy>
20069fc: 95 2a a0 02 sll %o2, 2, %o2
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
2006a00: 10 80 00 08 b 2006a20 <_Objects_Extend_information+0x154>
2006a04: 83 2d e0 02 sll %l7, 2, %g1
else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
2006a08: 84 00 a0 01 inc %g2
local_table[ index ] = NULL;
2006a0c: c0 24 c0 01 clr [ %l3 + %g1 ]
else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
2006a10: 80 a0 80 11 cmp %g2, %l1
2006a14: 2a bf ff fd bcs,a 2006a08 <_Objects_Extend_information+0x13c>
2006a18: 83 28 a0 02 sll %g2, 2, %g1
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
2006a1c: 83 2d e0 02 sll %l7, 2, %g1
inactive_per_block[block_count] = 0;
2006a20: c0 25 00 01 clr [ %l4 + %g1 ]
for ( index=index_base ;
index < ( information->allocation_size + index_base );
2006a24: c4 06 20 14 ld [ %i0 + 0x14 ], %g2
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
2006a28: c0 24 80 01 clr [ %l2 + %g1 ]
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
2006a2c: 83 2d 60 02 sll %l5, 2, %g1
2006a30: 86 05 40 02 add %l5, %g2, %g3
2006a34: 84 04 c0 01 add %l3, %g1, %g2
2006a38: 10 80 00 04 b 2006a48 <_Objects_Extend_information+0x17c>
2006a3c: 82 10 00 15 mov %l5, %g1
index++ ) {
2006a40: 82 00 60 01 inc %g1
2006a44: 84 00 a0 04 add %g2, 4, %g2
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
2006a48: 80 a0 40 03 cmp %g1, %g3
2006a4c: 2a bf ff fd bcs,a 2006a40 <_Objects_Extend_information+0x174>
2006a50: c0 20 80 00 clr [ %g2 ]
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
2006a54: 7f ff ec c6 call 2001d6c <sparc_disable_interrupts>
2006a58: 01 00 00 00 nop
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = maximum;
information->maximum_id = _Objects_Build_id(
2006a5c: c2 06 00 00 ld [ %i0 ], %g1
2006a60: c8 16 20 04 lduh [ %i0 + 4 ], %g4
2006a64: 87 2f 60 10 sll %i5, 0x10, %g3
2006a68: 89 29 20 1b sll %g4, 0x1b, %g4
2006a6c: 87 30 e0 10 srl %g3, 0x10, %g3
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
2006a70: e0 06 20 34 ld [ %i0 + 0x34 ], %l0
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = maximum;
information->maximum_id = _Objects_Build_id(
2006a74: 05 00 00 40 sethi %hi(0x10000), %g2
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
2006a78: e8 26 20 30 st %l4, [ %i0 + 0x30 ]
information->local_table = local_table;
2006a7c: e6 26 20 1c st %l3, [ %i0 + 0x1c ]
information->maximum = maximum;
information->maximum_id = _Objects_Build_id(
2006a80: 83 28 60 18 sll %g1, 0x18, %g1
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = maximum;
2006a84: fa 36 20 10 sth %i5, [ %i0 + 0x10 ]
information->maximum_id = _Objects_Build_id(
2006a88: 82 10 40 02 or %g1, %g2, %g1
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
2006a8c: e4 26 20 34 st %l2, [ %i0 + 0x34 ]
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = maximum;
information->maximum_id = _Objects_Build_id(
2006a90: 82 10 40 04 or %g1, %g4, %g1
2006a94: 82 10 40 03 or %g1, %g3, %g1
2006a98: c2 26 20 0c st %g1, [ %i0 + 0xc ]
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
2006a9c: 7f ff ec b8 call 2001d7c <sparc_enable_interrupts>
2006aa0: 01 00 00 00 nop
if ( old_tables )
2006aa4: 80 a4 20 00 cmp %l0, 0
2006aa8: 22 80 00 05 be,a 2006abc <_Objects_Extend_information+0x1f0>
2006aac: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1
_Workspace_Free( old_tables );
2006ab0: 40 00 08 3e call 2008ba8 <_Workspace_Free>
2006ab4: 90 10 00 10 mov %l0, %o0
/*
* Allocate the name table, and the objects
*/
if ( information->auto_extend ) {
2006ab8: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1
2006abc: e2 06 20 34 ld [ %i0 + 0x34 ], %l1
2006ac0: 80 a0 60 00 cmp %g1, 0
2006ac4: 02 80 00 0f be 2006b00 <_Objects_Extend_information+0x234>
2006ac8: a1 2d a0 02 sll %l6, 2, %l0
information->object_blocks[ block ] =
2006acc: d0 06 20 18 ld [ %i0 + 0x18 ], %o0
2006ad0: 40 00 34 02 call 2013ad8 <.umul>
2006ad4: d2 06 20 14 ld [ %i0 + 0x14 ], %o1
2006ad8: 40 00 08 3b call 2008bc4 <_Workspace_Allocate>
2006adc: 01 00 00 00 nop
_Workspace_Allocate(
(information->allocation_size * information->size)
);
if ( !information->object_blocks[ block ] )
2006ae0: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
/*
* Allocate the name table, and the objects
*/
if ( information->auto_extend ) {
information->object_blocks[ block ] =
2006ae4: d0 24 40 10 st %o0, [ %l1 + %l0 ]
_Workspace_Allocate(
(information->allocation_size * information->size)
);
if ( !information->object_blocks[ block ] )
2006ae8: c2 00 40 10 ld [ %g1 + %l0 ], %g1
2006aec: 80 a0 60 00 cmp %g1, 0
2006af0: 32 80 00 0b bne,a 2006b1c <_Objects_Extend_information+0x250><== ALWAYS TAKEN
2006af4: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
2006af8: 81 c7 e0 08 ret <== NOT EXECUTED
2006afc: 81 e8 00 00 restore <== NOT EXECUTED
return;
}
else {
information->object_blocks[ block ] =
2006b00: d0 06 20 18 ld [ %i0 + 0x18 ], %o0
2006b04: 40 00 33 f5 call 2013ad8 <.umul>
2006b08: d2 06 20 14 ld [ %i0 + 0x14 ], %o1
2006b0c: 40 00 08 35 call 2008be0 <_Workspace_Allocate_or_fatal_error>
2006b10: 01 00 00 00 nop
2006b14: d0 24 40 10 st %o0, [ %l1 + %l0 ]
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
2006b18: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
2006b1c: a5 2d a0 02 sll %l6, 2, %l2
2006b20: d4 06 20 14 ld [ %i0 + 0x14 ], %o2
2006b24: d2 00 40 12 ld [ %g1 + %l2 ], %o1
2006b28: d6 06 20 18 ld [ %i0 + 0x18 ], %o3
2006b2c: 90 07 bf ec add %fp, -20, %o0
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
2006b30: a0 10 00 15 mov %l5, %l0
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) {
2006b34: a8 10 00 08 mov %o0, %l4
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
2006b38: 40 00 13 21 call 200b7bc <_Chain_Initialize>
2006b3c: a2 06 20 20 add %i0, 0x20, %l1
index = index_base;
while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) {
the_object->id = _Objects_Build_id(
2006b40: 10 80 00 0d b 2006b74 <_Objects_Extend_information+0x2a8>
2006b44: 27 00 00 40 sethi %hi(0x10000), %l3
2006b48: c4 16 20 04 lduh [ %i0 + 4 ], %g2
2006b4c: 83 28 60 18 sll %g1, 0x18, %g1
2006b50: 85 28 a0 1b sll %g2, 0x1b, %g2
2006b54: 82 10 40 13 or %g1, %l3, %g1
2006b58: 82 10 40 02 or %g1, %g2, %g1
2006b5c: 82 10 40 10 or %g1, %l0, %g1
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
2006b60: 92 10 00 08 mov %o0, %o1
index = index_base;
while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) {
the_object->id = _Objects_Build_id(
2006b64: c2 22 20 08 st %g1, [ %o0 + 8 ]
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
2006b68: a0 04 20 01 inc %l0
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
2006b6c: 7f ff fd 14 call 2005fbc <_Chain_Append>
2006b70: 90 10 00 11 mov %l1, %o0
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) {
2006b74: 40 00 13 02 call 200b77c <_Chain_Get>
2006b78: 90 10 00 14 mov %l4, %o0
2006b7c: 80 a2 20 00 cmp %o0, 0
2006b80: 32 bf ff f2 bne,a 2006b48 <_Objects_Extend_information+0x27c>
2006b84: c2 06 00 00 ld [ %i0 ], %g1
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
2006b88: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
2006b8c: c4 06 20 30 ld [ %i0 + 0x30 ], %g2
information->inactive += information->allocation_size;
2006b90: c6 16 20 2c lduh [ %i0 + 0x2c ], %g3
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
2006b94: c2 20 80 12 st %g1, [ %g2 + %l2 ]
information->inactive += information->allocation_size;
2006b98: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
2006b9c: 82 00 40 03 add %g1, %g3, %g1
2006ba0: c2 36 20 2c sth %g1, [ %i0 + 0x2c ]
2006ba4: 81 c7 e0 08 ret
2006ba8: 81 e8 00 00 restore
02006c58 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint32_t the_class
)
{
2006c58: 9d e3 bf 98 save %sp, -104, %sp
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
2006c5c: 82 06 3f ff add %i0, -1, %g1
2006c60: 80 a0 60 03 cmp %g1, 3
2006c64: 38 80 00 1c bgu,a 2006cd4 <_Objects_Get_information+0x7c>
2006c68: b0 10 20 00 clr %i0
int the_class_api_maximum;
if ( !_Objects_Is_api_valid( the_api ) )
return NULL;
if ( !the_class )
2006c6c: 10 80 00 1c b 2006cdc <_Objects_Get_information+0x84>
2006c70: 80 a6 60 00 cmp %i1, 0
return NULL;
the_class_api_maximum = _Objects_API_maximum_class( the_api );
2006c74: 40 00 13 eb call 200bc20 <_Objects_API_maximum_class>
2006c78: 90 10 00 18 mov %i0, %o0
if ( the_class_api_maximum < 0 ||
2006c7c: 80 a2 20 00 cmp %o0, 0
2006c80: 06 80 00 14 bl 2006cd0 <_Objects_Get_information+0x78> <== NEVER TAKEN
2006c84: 80 a6 40 08 cmp %i1, %o0
2006c88: 38 80 00 13 bgu,a 2006cd4 <_Objects_Get_information+0x7c><== NEVER TAKEN
2006c8c: b0 10 20 00 clr %i0 <== NOT EXECUTED
the_class > (uint32_t) the_class_api_maximum )
return NULL;
if ( !_Objects_Information_table[ the_api ] )
2006c90: 85 2e 20 02 sll %i0, 2, %g2
2006c94: 03 00 80 5d sethi %hi(0x2017400), %g1
2006c98: 82 10 63 80 or %g1, 0x380, %g1 ! 2017780 <_Objects_Information_table>
2006c9c: c4 00 40 02 ld [ %g1 + %g2 ], %g2
2006ca0: 80 a0 a0 00 cmp %g2, 0
2006ca4: 02 80 00 0c be 2006cd4 <_Objects_Get_information+0x7c> <== NEVER TAKEN
2006ca8: b0 10 20 00 clr %i0
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
2006cac: 83 2e 60 02 sll %i1, 2, %g1
2006cb0: f0 00 80 01 ld [ %g2 + %g1 ], %i0
if ( !info )
2006cb4: 80 a6 20 00 cmp %i0, 0
2006cb8: 02 80 00 07 be 2006cd4 <_Objects_Get_information+0x7c> <== NEVER TAKEN
2006cbc: 01 00 00 00 nop
* In a multprocessing configuration, we may access remote objects.
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
2006cc0: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
2006cc4: 80 a0 60 00 cmp %g1, 0
2006cc8: 12 80 00 03 bne 2006cd4 <_Objects_Get_information+0x7c>
2006ccc: 01 00 00 00 nop
2006cd0: b0 10 20 00 clr %i0 ! 0 <PROM_START>
return NULL;
#endif
return info;
}
2006cd4: 81 c7 e0 08 ret
2006cd8: 81 e8 00 00 restore
int the_class_api_maximum;
if ( !_Objects_Is_api_valid( the_api ) )
return NULL;
if ( !the_class )
2006cdc: 22 bf ff fe be,a 2006cd4 <_Objects_Get_information+0x7c>
2006ce0: b0 10 20 00 clr %i0
2006ce4: 30 bf ff e4 b,a 2006c74 <_Objects_Get_information+0x1c>
02013fc8 <_Objects_Get_no_protection>:
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
2013fc8: c2 02 20 08 ld [ %o0 + 8 ], %g1
if ( information->maximum >= index ) {
2013fcc: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
2013fd0: 92 22 40 01 sub %o1, %g1, %o1
2013fd4: 82 02 60 01 add %o1, 1, %g1
if ( information->maximum >= index ) {
2013fd8: 80 a0 80 01 cmp %g2, %g1
2013fdc: 0a 80 00 09 bcs 2014000 <_Objects_Get_no_protection+0x38>
2013fe0: 83 28 60 02 sll %g1, 2, %g1
if ( (the_object = information->local_table[ index ]) != NULL ) {
2013fe4: c4 02 20 1c ld [ %o0 + 0x1c ], %g2
2013fe8: d0 00 80 01 ld [ %g2 + %g1 ], %o0
2013fec: 80 a2 20 00 cmp %o0, 0
2013ff0: 02 80 00 05 be 2014004 <_Objects_Get_no_protection+0x3c> <== NEVER TAKEN
2013ff4: 82 10 20 01 mov 1, %g1
*location = OBJECTS_LOCAL;
2013ff8: 81 c3 e0 08 retl
2013ffc: c0 22 80 00 clr [ %o2 ]
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
2014000: 82 10 20 01 mov 1, %g1
2014004: 90 10 20 00 clr %o0
return NULL;
}
2014008: 81 c3 e0 08 retl
201400c: c2 22 80 00 st %g1, [ %o2 ]
020081b8 <_Objects_Id_to_name>:
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
20081b8: 9d e3 bf 90 save %sp, -112, %sp
20081bc: 92 10 00 18 mov %i0, %o1
Objects_Id tmpId;
Objects_Information *information;
Objects_Control *the_object = (Objects_Control *) 0;
Objects_Locations ignored_location;
if ( !name )
20081c0: 80 a6 60 00 cmp %i1, 0
20081c4: 02 80 00 22 be 200824c <_Objects_Id_to_name+0x94> <== NEVER TAKEN
20081c8: b0 10 20 01 mov 1, %i0
return OBJECTS_INVALID_NAME;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
20081cc: 80 a2 60 00 cmp %o1, 0
20081d0: 12 80 00 06 bne 20081e8 <_Objects_Id_to_name+0x30>
20081d4: 83 32 60 18 srl %o1, 0x18, %g1
20081d8: 03 00 80 6f sethi %hi(0x201bc00), %g1
20081dc: c2 00 63 c4 ld [ %g1 + 0x3c4 ], %g1 ! 201bfc4 <_Thread_Executing>
20081e0: d2 00 60 08 ld [ %g1 + 8 ], %o1
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
20081e4: 83 32 60 18 srl %o1, 0x18, %g1
20081e8: 84 08 60 07 and %g1, 7, %g2
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
20081ec: 82 00 bf ff add %g2, -1, %g1
20081f0: 80 a0 60 03 cmp %g1, 3
20081f4: 38 80 00 16 bgu,a 200824c <_Objects_Id_to_name+0x94>
20081f8: b0 10 20 03 mov 3, %i0
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
20081fc: 10 80 00 18 b 200825c <_Objects_Id_to_name+0xa4>
2008200: 85 28 a0 02 sll %g2, 2, %g2
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
2008204: 83 28 60 02 sll %g1, 2, %g1
2008208: d0 00 80 01 ld [ %g2 + %g1 ], %o0
if ( !information )
200820c: 80 a2 20 00 cmp %o0, 0
2008210: 02 80 00 0f be 200824c <_Objects_Id_to_name+0x94> <== NEVER TAKEN
2008214: b0 10 20 03 mov 3, %i0
return OBJECTS_INVALID_ID;
if ( information->is_string )
2008218: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1
200821c: 80 a0 60 00 cmp %g1, 0
2008220: 12 80 00 0d bne 2008254 <_Objects_Id_to_name+0x9c> <== NEVER TAKEN
2008224: 01 00 00 00 nop
return OBJECTS_INVALID_ID;
the_object = _Objects_Get( information, tmpId, &ignored_location );
2008228: 7f ff ff c7 call 2008144 <_Objects_Get>
200822c: 94 07 bf f4 add %fp, -12, %o2
if ( !the_object )
2008230: 80 a2 20 00 cmp %o0, 0
2008234: 22 80 00 06 be,a 200824c <_Objects_Id_to_name+0x94>
2008238: b0 10 20 03 mov 3, %i0
return OBJECTS_INVALID_ID;
*name = the_object->name;
200823c: c2 02 20 0c ld [ %o0 + 0xc ], %g1
_Thread_Enable_dispatch();
2008240: b0 10 20 00 clr %i0
2008244: 40 00 02 5f call 2008bc0 <_Thread_Enable_dispatch>
2008248: c2 26 40 00 st %g1, [ %i1 ]
200824c: 81 c7 e0 08 ret
2008250: 81 e8 00 00 restore
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
2008254: 81 c7 e0 08 ret <== NOT EXECUTED
2008258: 81 e8 00 00 restore <== NOT EXECUTED
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
200825c: 03 00 80 6f sethi %hi(0x201bc00), %g1
2008260: 82 10 62 60 or %g1, 0x260, %g1 ! 201be60 <_Objects_Information_table>
2008264: c4 00 40 02 ld [ %g1 + %g2 ], %g2
2008268: 80 a0 a0 00 cmp %g2, 0
200826c: 12 bf ff e6 bne 2008204 <_Objects_Id_to_name+0x4c> <== ALWAYS TAKEN
2008270: 83 32 60 1b srl %o1, 0x1b, %g1
if ( !the_object )
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
2008274: 81 c7 e0 08 ret <== NOT EXECUTED
2008278: 91 e8 20 03 restore %g0, 3, %o0 <== NOT EXECUTED
020128f4 <_Objects_Name_to_id_string>:
Objects_Name_or_id_lookup_errors _Objects_Name_to_id_string(
Objects_Information *information,
const char *name,
Objects_Id *id
)
{
20128f4: 9d e3 bf 98 save %sp, -104, %sp
20128f8: a6 10 00 18 mov %i0, %l3
uint32_t index;
uint32_t name_length;
/* ASSERT: information->is_string == TRUE */
if ( !id )
20128fc: 80 a6 a0 00 cmp %i2, 0
2012900: 02 80 00 22 be 2012988 <_Objects_Name_to_id_string+0x94> <== NEVER TAKEN
2012904: b0 10 20 02 mov 2, %i0
return OBJECTS_INVALID_ADDRESS;
if ( !name )
2012908: 80 a6 60 00 cmp %i1, 0
201290c: 22 80 00 1f be,a 2012988 <_Objects_Name_to_id_string+0x94><== NEVER TAKEN
2012910: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
return OBJECTS_INVALID_NAME;
if ( information->maximum != 0 ) {
2012914: c2 14 e0 10 lduh [ %l3 + 0x10 ], %g1
2012918: a4 90 60 00 orcc %g1, 0, %l2
201291c: 12 80 00 17 bne 2012978 <_Objects_Name_to_id_string+0x84> <== ALWAYS TAKEN
2012920: a2 10 20 01 mov 1, %l1
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
2012924: 81 c7 e0 08 ret <== NOT EXECUTED
2012928: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED
the_object = information->local_table[ index ];
201292c: c2 04 e0 1c ld [ %l3 + 0x1c ], %g1
return OBJECTS_INVALID_NAME;
if ( information->maximum != 0 ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
2012930: a2 04 60 01 inc %l1
the_object = information->local_table[ index ];
2012934: e0 00 40 02 ld [ %g1 + %g2 ], %l0
if ( !the_object )
2012938: 80 a4 20 00 cmp %l0, 0
201293c: 02 80 00 0f be 2012978 <_Objects_Name_to_id_string+0x84>
2012940: 90 10 00 19 mov %i1, %o0
continue;
if ( !the_object->name.name_p )
2012944: d2 04 20 0c ld [ %l0 + 0xc ], %o1
2012948: 80 a2 60 00 cmp %o1, 0
201294c: 02 80 00 0c be 201297c <_Objects_Name_to_id_string+0x88>
2012950: 80 a4 40 12 cmp %l1, %l2
continue;
if (!strncmp( name, the_object->name.name_p, information->name_length)) {
2012954: 40 00 0c 8e call 2015b8c <strncmp>
2012958: d4 14 e0 3a lduh [ %l3 + 0x3a ], %o2
201295c: 80 a2 20 00 cmp %o0, 0
2012960: 32 80 00 07 bne,a 201297c <_Objects_Name_to_id_string+0x88>
2012964: 80 a4 40 12 cmp %l1, %l2
*id = the_object->id;
2012968: c2 04 20 08 ld [ %l0 + 8 ], %g1
201296c: c2 26 80 00 st %g1, [ %i2 ]
2012970: 81 c7 e0 08 ret
2012974: 91 e8 20 00 restore %g0, 0, %o0
return OBJECTS_INVALID_NAME;
if ( information->maximum != 0 ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
2012978: 80 a4 40 12 cmp %l1, %l2
201297c: 08 bf ff ec bleu 201292c <_Objects_Name_to_id_string+0x38>
2012980: 85 2c 60 02 sll %l1, 2, %g2
2012984: b0 10 20 01 mov 1, %i0
}
}
}
return OBJECTS_INVALID_NAME;
}
2012988: 81 c7 e0 08 ret
201298c: 81 e8 00 00 restore
02006edc <_Objects_Name_to_id_u32>:
Objects_Information *information,
uint32_t name,
uint32_t node,
Objects_Id *id
)
{
2006edc: 9a 10 00 08 mov %o0, %o5
Objects_Name name_for_mp;
#endif
/* ASSERT: information->is_string == FALSE */
if ( !id )
2006ee0: 80 a2 e0 00 cmp %o3, 0
2006ee4: 02 80 00 29 be 2006f88 <_Objects_Name_to_id_u32+0xac>
2006ee8: 90 10 20 02 mov 2, %o0
return OBJECTS_INVALID_ADDRESS;
if ( name == 0 )
2006eec: 80 a2 60 00 cmp %o1, 0
2006ef0: 22 80 00 26 be,a 2006f88 <_Objects_Name_to_id_u32+0xac>
2006ef4: 90 10 20 01 mov 1, %o0
return OBJECTS_INVALID_NAME;
search_local_node = FALSE;
if ( information->maximum != 0 &&
2006ef8: c2 13 60 10 lduh [ %o5 + 0x10 ], %g1
2006efc: 84 90 60 00 orcc %g1, 0, %g2
2006f00: 22 80 00 22 be,a 2006f88 <_Objects_Name_to_id_u32+0xac> <== NEVER TAKEN
2006f04: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
2006f08: 80 a2 a0 00 cmp %o2, 0
2006f0c: 02 80 00 19 be 2006f70 <_Objects_Name_to_id_u32+0x94>
2006f10: 83 28 a0 10 sll %g2, 0x10, %g1
2006f14: 03 1f ff ff sethi %hi(0x7ffffc00), %g1
2006f18: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff <RAM_END+0x7dbfffff>
2006f1c: 80 a2 80 01 cmp %o2, %g1
2006f20: 02 80 00 13 be 2006f6c <_Objects_Name_to_id_u32+0x90>
2006f24: 80 a2 a0 01 cmp %o2, 1
2006f28: 32 80 00 18 bne,a 2006f88 <_Objects_Name_to_id_u32+0xac>
2006f2c: 90 10 20 01 mov 1, %o0
search_local_node = TRUE;
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
2006f30: 10 80 00 10 b 2006f70 <_Objects_Name_to_id_u32+0x94>
2006f34: 83 28 a0 10 sll %g2, 0x10, %g1
the_object = information->local_table[ index ];
2006f38: c2 03 60 1c ld [ %o5 + 0x1c ], %g1
2006f3c: c4 00 40 02 ld [ %g1 + %g2 ], %g2
if ( !the_object )
2006f40: 80 a0 a0 00 cmp %g2, 0
2006f44: 02 80 00 0d be 2006f78 <_Objects_Name_to_id_u32+0x9c>
2006f48: 86 00 e0 01 inc %g3
continue;
if ( name == the_object->name.name_u32 ) {
2006f4c: c2 00 a0 0c ld [ %g2 + 0xc ], %g1
2006f50: 80 a2 40 01 cmp %o1, %g1
2006f54: 32 80 00 0a bne,a 2006f7c <_Objects_Name_to_id_u32+0xa0>
2006f58: 80 a0 c0 04 cmp %g3, %g4
*id = the_object->id;
2006f5c: c2 00 a0 08 ld [ %g2 + 8 ], %g1
2006f60: 90 10 20 00 clr %o0
2006f64: 81 c3 e0 08 retl
2006f68: c2 22 c0 00 st %g1, [ %o3 ]
search_local_node = TRUE;
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
2006f6c: 83 28 a0 10 sll %g2, 0x10, %g1
2006f70: 86 10 20 01 mov 1, %g3
2006f74: 89 30 60 10 srl %g1, 0x10, %g4
2006f78: 80 a0 c0 04 cmp %g3, %g4
2006f7c: 08 bf ff ef bleu 2006f38 <_Objects_Name_to_id_u32+0x5c>
2006f80: 85 28 e0 02 sll %g3, 2, %g2
2006f84: 90 10 20 01 mov 1, %o0
name_for_mp.name_u32 = name;
return _Objects_MP_Global_name_search( information, name_for_mp, node, id );
#else
return OBJECTS_INVALID_NAME;
#endif
}
2006f88: 81 c3 e0 08 retl
02007614 <_Objects_Set_name>:
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
2007614: 9d e3 bf 98 save %sp, -104, %sp
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length ) + 1;
2007618: d2 16 20 3a lduh [ %i0 + 0x3a ], %o1
200761c: 40 00 20 e9 call 200f9c0 <strnlen>
2007620: 90 10 00 1a mov %i2, %o0
if ( information->is_string ) {
2007624: c2 0e 20 38 ldub [ %i0 + 0x38 ], %g1
2007628: 80 a0 60 00 cmp %g1, 0
200762c: 02 80 00 17 be 2007688 <_Objects_Set_name+0x74>
2007630: a0 02 20 01 add %o0, 1, %l0
char *d;
d = _Workspace_Allocate( length );
2007634: 90 10 00 10 mov %l0, %o0
2007638: 40 00 07 3c call 2009328 <_Workspace_Allocate>
200763c: b0 10 20 00 clr %i0
if ( !d )
2007640: a2 92 20 00 orcc %o0, 0, %l1
2007644: 02 80 00 27 be 20076e0 <_Objects_Set_name+0xcc> <== NEVER TAKEN
2007648: 01 00 00 00 nop
return FALSE;
if ( the_object->name.name_p ) {
200764c: d0 06 60 0c ld [ %i1 + 0xc ], %o0
2007650: 80 a2 20 00 cmp %o0, 0
2007654: 02 80 00 06 be 200766c <_Objects_Set_name+0x58>
2007658: 92 10 00 1a mov %i2, %o1
_Workspace_Free( (void *)the_object->name.name_p );
200765c: 40 00 07 2c call 200930c <_Workspace_Free>
2007660: 01 00 00 00 nop
the_object->name.name_p = NULL;
2007664: c0 26 60 0c clr [ %i1 + 0xc ]
}
strncpy( d, name, length );
2007668: 92 10 00 1a mov %i2, %o1
200766c: 90 10 00 11 mov %l1, %o0
2007670: 40 00 20 9a call 200f8d8 <strncpy>
2007674: 94 10 00 10 mov %l0, %o2
d[ length ] = '\0';
2007678: c0 2c 40 10 clrb [ %l1 + %l0 ]
the_object->name.name_p = d;
200767c: e2 26 60 0c st %l1, [ %i1 + 0xc ]
2007680: 81 c7 e0 08 ret
2007684: 91 e8 20 01 restore %g0, 1, %o0
} else {
the_object->name.name_u32 = _Objects_Build_name(
2007688: 80 a4 20 00 cmp %l0, 0
200768c: 02 80 00 1a be 20076f4 <_Objects_Set_name+0xe0> <== NEVER TAKEN
2007690: 1b 08 00 00 sethi %hi(0x20000000), %o5
2007694: c2 4e 80 00 ldsb [ %i2 ], %g1
2007698: 80 a4 20 01 cmp %l0, 1
200769c: 02 80 00 16 be 20076f4 <_Objects_Set_name+0xe0>
20076a0: 9b 28 60 18 sll %g1, 0x18, %o5
20076a4: c2 4e a0 01 ldsb [ %i2 + 1 ], %g1
20076a8: 80 a4 20 02 cmp %l0, 2
20076ac: 08 80 00 0f bleu 20076e8 <_Objects_Set_name+0xd4>
20076b0: 89 28 60 10 sll %g1, 0x10, %g4
20076b4: c2 4e a0 02 ldsb [ %i2 + 2 ], %g1
20076b8: 80 a4 20 03 cmp %l0, 3
20076bc: 87 28 60 08 sll %g1, 8, %g3
20076c0: 08 80 00 03 bleu 20076cc <_Objects_Set_name+0xb8>
20076c4: 84 10 20 20 mov 0x20, %g2
20076c8: c4 4e a0 03 ldsb [ %i2 + 3 ], %g2
20076cc: 82 13 40 04 or %o5, %g4, %g1
20076d0: b0 10 20 01 mov 1, %i0
20076d4: 82 10 40 03 or %g1, %g3, %g1
20076d8: 82 10 40 02 or %g1, %g2, %g1
20076dc: c2 26 60 0c st %g1, [ %i1 + 0xc ]
);
}
return TRUE;
}
20076e0: 81 c7 e0 08 ret
20076e4: 81 e8 00 00 restore
strncpy( d, name, length );
d[ length ] = '\0';
the_object->name.name_p = d;
} else {
the_object->name.name_u32 = _Objects_Build_name(
20076e8: 84 10 20 20 mov 0x20, %g2
20076ec: 10 bf ff f8 b 20076cc <_Objects_Set_name+0xb8>
20076f0: 07 00 00 08 sethi %hi(0x2000), %g3
20076f4: 10 bf ff fd b 20076e8 <_Objects_Set_name+0xd4>
20076f8: 09 00 08 00 sethi %hi(0x200000), %g4
02006f98 <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
2006f98: 9d e3 bf 98 save %sp, -104, %sp
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_index(
Objects_Id id
)
{
return (id >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS;
2006f9c: 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;
2006fa0: e0 06 20 14 ld [ %i0 + 0x14 ], %l0
2006fa4: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0
2006fa8: 03 00 00 3f sethi %hi(0xfc00), %g1
2006fac: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
2006fb0: 92 10 00 10 mov %l0, %o1
2006fb4: a2 08 80 01 and %g2, %g1, %l1
2006fb8: 40 00 33 02 call 2013bc0 <.udiv>
2006fbc: 90 22 00 11 sub %o0, %l1, %o0
2006fc0: 10 80 00 2e b 2007078 <_Objects_Shrink_information+0xe0>
2006fc4: 84 10 20 00 clr %g2
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] == information->allocation_size ) {
2006fc8: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
2006fcc: c2 00 40 12 ld [ %g1 + %l2 ], %g1
2006fd0: 80 a0 40 10 cmp %g1, %l0
2006fd4: 12 80 00 28 bne 2007074 <_Objects_Shrink_information+0xdc>
2006fd8: 84 00 a0 01 inc %g2
/*
* XXX - Not to sure how to use a chain where you need to iterate and
* and remove elements.
*/
the_object = (Objects_Control *) information->Inactive.first;
2006fdc: e0 06 20 20 ld [ %i0 + 0x20 ], %l0
2006fe0: 03 00 00 3f sethi %hi(0xfc00), %g1
2006fe4: a6 10 63 ff or %g1, 0x3ff, %l3 ! ffff <PROM_START+0xffff>
2006fe8: c2 04 20 08 ld [ %l0 + 8 ], %g1
2006fec: 84 08 40 13 and %g1, %l3, %g2
*/
do {
index = _Objects_Get_index( the_object->id );
if ((index >= index_base) &&
2006ff0: 80 a0 80 11 cmp %g2, %l1
2006ff4: 2a 80 00 0c bcs,a 2007024 <_Objects_Shrink_information+0x8c>
2006ff8: e0 04 00 00 ld [ %l0 ], %l0
2006ffc: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
2007000: 82 04 40 01 add %l1, %g1, %g1
2007004: 80 a0 80 01 cmp %g2, %g1
2007008: 1a 80 00 06 bcc 2007020 <_Objects_Shrink_information+0x88>
200700c: 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 );
2007010: 40 00 11 d1 call 200b754 <_Chain_Extract>
2007014: e0 04 00 00 ld [ %l0 ], %l0
}
else {
the_object = (Objects_Control *) the_object->Node.next;
}
}
while ( the_object && !_Chain_Is_last( &the_object->Node ) );
2007018: 10 80 00 04 b 2007028 <_Objects_Shrink_information+0x90>
200701c: 80 a4 20 00 cmp %l0, 0
the_object = NULL;
_Chain_Extract( &extract_me->Node );
}
else {
the_object = (Objects_Control *) the_object->Node.next;
2007020: e0 04 00 00 ld [ %l0 ], %l0
}
}
while ( the_object && !_Chain_Is_last( &the_object->Node ) );
2007024: 80 a4 20 00 cmp %l0, 0
2007028: 22 80 00 07 be,a 2007044 <_Objects_Shrink_information+0xac><== NEVER TAKEN
200702c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED
2007030: c2 04 00 00 ld [ %l0 ], %g1
2007034: 80 a0 60 00 cmp %g1, 0
2007038: 32 bf ff ed bne,a 2006fec <_Objects_Shrink_information+0x54>
200703c: c2 04 20 08 ld [ %l0 + 8 ], %g1
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
2007040: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
2007044: 40 00 06 d9 call 2008ba8 <_Workspace_Free>
2007048: d0 00 40 12 ld [ %g1 + %l2 ], %o0
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
200704c: c4 06 20 30 ld [ %i0 + 0x30 ], %g2
information->inactive -= information->allocation_size;
2007050: c2 16 20 2c lduh [ %i0 + 0x2c ], %g1
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
2007054: c0 20 80 12 clr [ %g2 + %l2 ]
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
2007058: c4 06 20 34 ld [ %i0 + 0x34 ], %g2
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
200705c: c6 06 20 14 ld [ %i0 + 0x14 ], %g3
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
2007060: c0 20 80 12 clr [ %g2 + %l2 ]
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
2007064: 82 20 40 03 sub %g1, %g3, %g1
2007068: c2 36 20 2c sth %g1, [ %i0 + 0x2c ]
200706c: 81 c7 e0 08 ret
2007070: 81 e8 00 00 restore
return;
}
index_base += information->allocation_size;
2007074: 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++ ) {
2007078: 80 a0 80 08 cmp %g2, %o0
200707c: 0a bf ff d3 bcs 2006fc8 <_Objects_Shrink_information+0x30>
2007080: a5 28 a0 02 sll %g2, 2, %l2
2007084: 81 c7 e0 08 ret
2007088: 81 e8 00 00 restore
02005ca8 <_POSIX_API_Initialize>:
void _POSIX_API_Initialize(
rtems_configuration_table *configuration_table
)
{
2005ca8: 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;
2005cac: f0 06 20 44 ld [ %i0 + 0x44 ], %i0
if ( !api_configuration )
2005cb0: 80 a6 20 00 cmp %i0, 0
2005cb4: 32 80 00 05 bne,a 2005cc8 <_POSIX_API_Initialize+0x20> <== ALWAYS TAKEN
2005cb8: d0 06 20 14 ld [ %i0 + 0x14 ], %o0
2005cbc: 03 00 80 57 sethi %hi(0x2015c00), %g1 <== NOT EXECUTED
2005cc0: b0 10 60 00 mov %g1, %i0 ! 2015c00 <_POSIX_Default_configuration><== NOT EXECUTED
api_configuration = &_POSIX_Default_configuration;
_Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects;
_POSIX_signals_Manager_Initialization(
2005cc4: d0 06 20 14 ld [ %i0 + 0x14 ], %o0 <== NOT EXECUTED
api_configuration = configuration_table->POSIX_api_configuration;
if ( !api_configuration )
api_configuration = &_POSIX_Default_configuration;
_Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects;
2005cc8: 05 00 80 5d sethi %hi(0x2017400), %g2
2005ccc: 03 00 80 5f sethi %hi(0x2017c00), %g1
2005cd0: 82 10 60 f4 or %g1, 0xf4, %g1 ! 2017cf4 <_POSIX_Objects>
_POSIX_signals_Manager_Initialization(
2005cd4: 40 00 14 10 call 200ad14 <_POSIX_signals_Manager_Initialization>
2005cd8: c2 20 a3 8c st %g1, [ %g2 + 0x38c ]
api_configuration->maximum_queued_signals
);
_POSIX_Threads_Manager_initialization(
2005cdc: d2 06 20 2c ld [ %i0 + 0x2c ], %o1
2005ce0: d4 06 20 30 ld [ %i0 + 0x30 ], %o2
2005ce4: 40 00 14 8d call 200af18 <_POSIX_Threads_Manager_initialization>
2005ce8: 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(
2005cec: 40 00 13 b3 call 200abb8 <_POSIX_Condition_variables_Manager_initialization>
2005cf0: d0 06 20 08 ld [ %i0 + 8 ], %o0
api_configuration->maximum_condition_variables
);
_POSIX_Key_Manager_initialization( api_configuration->maximum_keys );
2005cf4: 40 00 13 be call 200abec <_POSIX_Key_Manager_initialization>
2005cf8: d0 06 20 0c ld [ %i0 + 0xc ], %o0
_POSIX_Mutex_Manager_initialization(
2005cfc: 40 00 13 df call 200ac78 <_POSIX_Mutex_Manager_initialization>
2005d00: d0 06 20 04 ld [ %i0 + 4 ], %o0
api_configuration->maximum_mutexes
);
_POSIX_Message_queue_Manager_initialization(
2005d04: 40 00 13 c7 call 200ac20 <_POSIX_Message_queue_Manager_initialization>
2005d08: d0 06 20 18 ld [ %i0 + 0x18 ], %o0
api_configuration->maximum_message_queues
);
_POSIX_Semaphore_Manager_initialization(
2005d0c: 40 00 15 3e call 200b204 <_POSIX_Semaphore_Manager_initialization>
2005d10: d0 06 20 1c ld [ %i0 + 0x1c ], %o0
api_configuration->maximum_semaphores
);
_POSIX_Timer_Manager_initialization( api_configuration->maximum_timers );
2005d14: 40 00 15 2f call 200b1d0 <_POSIX_Timer_Manager_initialization>
2005d18: d0 06 20 10 ld [ %i0 + 0x10 ], %o0
_POSIX_Barrier_Manager_initialization( api_configuration->maximum_barriers );
2005d1c: 40 00 13 e4 call 200acac <_POSIX_Barrier_Manager_initialization>
2005d20: d0 06 20 20 ld [ %i0 + 0x20 ], %o0
_POSIX_RWLock_Manager_initialization( api_configuration->maximum_rwlocks );
2005d24: 40 00 13 ef call 200ace0 <_POSIX_RWLock_Manager_initialization>
2005d28: d0 06 20 24 ld [ %i0 + 0x24 ], %o0
_POSIX_Spinlock_Manager_initialization(api_configuration->maximum_spinlocks);
2005d2c: f0 06 20 28 ld [ %i0 + 0x28 ], %i0
2005d30: 40 00 14 63 call 200aebc <_POSIX_Spinlock_Manager_initialization>
2005d34: 81 e8 00 00 restore
02005eb8 <_POSIX_Condition_variables_Get>:
POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get (
pthread_cond_t *cond,
Objects_Locations *location
)
{
2005eb8: 9d e3 bf 98 save %sp, -104, %sp
Objects_Id *id = (Objects_Id *)cond;
int status;
if ( !id ) {
2005ebc: 80 a6 20 00 cmp %i0, 0
2005ec0: 02 80 00 0c be 2005ef0 <_POSIX_Condition_variables_Get+0x38>
2005ec4: b4 10 00 19 mov %i1, %i2
*location = OBJECTS_ERROR;
return (POSIX_Condition_variables_Control *) 0;
}
if ( *id == PTHREAD_COND_INITIALIZER ) {
2005ec8: c2 06 00 00 ld [ %i0 ], %g1
2005ecc: 80 a0 7f ff cmp %g1, -1
2005ed0: 32 80 00 0c bne,a 2005f00 <_POSIX_Condition_variables_Get+0x48><== ALWAYS TAKEN
2005ed4: f2 06 00 00 ld [ %i0 ], %i1
/*
* Do an "auto-create" here.
*/
status = pthread_cond_init( (pthread_cond_t *)id, 0 );
2005ed8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2005edc: 40 00 00 0d call 2005f10 <pthread_cond_init> <== NOT EXECUTED
2005ee0: 92 10 20 00 clr %o1 <== NOT EXECUTED
if ( status ) {
2005ee4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2005ee8: 22 80 00 06 be,a 2005f00 <_POSIX_Condition_variables_Get+0x48><== NOT EXECUTED
2005eec: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED
*location = OBJECTS_ERROR;
2005ef0: 82 10 20 01 mov 1, %g1
2005ef4: c2 26 80 00 st %g1, [ %i2 ]
* Now call Objects_Get()
*/
return (POSIX_Condition_variables_Control *)
_Objects_Get( &_POSIX_Condition_variables_Information, *id, location );
}
2005ef8: 81 c7 e0 08 ret
2005efc: 91 e8 20 00 restore %g0, 0, %o0
/*
* Now call Objects_Get()
*/
return (POSIX_Condition_variables_Control *)
2005f00: 31 00 80 5b sethi %hi(0x2016c00), %i0
2005f04: 40 00 0b c2 call 2008e0c <_Objects_Get>
2005f08: 91 ee 22 b4 restore %i0, 0x2b4, %o0
020060b4 <_POSIX_Condition_variables_Wait_support>:
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
20060b4: 9d e3 bf 90 save %sp, -112, %sp
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
20060b8: a0 07 bf f4 add %fp, -12, %l0
20060bc: 90 10 00 19 mov %i1, %o0
20060c0: 40 00 00 7d call 20062b4 <_POSIX_Mutex_Get>
20060c4: 92 10 00 10 mov %l0, %o1
20060c8: 80 a2 20 00 cmp %o0, 0
20060cc: 22 80 00 18 be,a 200612c <_POSIX_Condition_variables_Wait_support+0x78>
20060d0: b0 10 20 16 mov 0x16, %i0
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
20060d4: 03 00 80 5a sethi %hi(0x2016800), %g1
20060d8: c4 00 62 20 ld [ %g1 + 0x220 ], %g2 ! 2016a20 <_Thread_Dispatch_disable_level>
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
20060dc: 92 10 00 10 mov %l0, %o1
20060e0: 84 00 bf ff add %g2, -1, %g2
20060e4: 90 10 00 18 mov %i0, %o0
20060e8: c4 20 62 20 st %g2, [ %g1 + 0x220 ]
20060ec: 7f ff ff 73 call 2005eb8 <_POSIX_Condition_variables_Get>
20060f0: 01 00 00 00 nop
switch ( location ) {
20060f4: c2 07 bf f4 ld [ %fp + -12 ], %g1
20060f8: 80 a0 60 00 cmp %g1, 0
20060fc: 12 80 00 33 bne 20061c8 <_POSIX_Condition_variables_Wait_support+0x114>
2006100: a2 10 00 08 mov %o0, %l1
case OBJECTS_LOCAL:
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
2006104: c4 02 20 14 ld [ %o0 + 0x14 ], %g2
2006108: 80 a0 a0 00 cmp %g2, 0
200610c: 02 80 00 0a be 2006134 <_POSIX_Condition_variables_Wait_support+0x80>
2006110: 01 00 00 00 nop
2006114: c2 06 40 00 ld [ %i1 ], %g1
2006118: 80 a0 80 01 cmp %g2, %g1
200611c: 02 80 00 06 be 2006134 <_POSIX_Condition_variables_Wait_support+0x80><== ALWAYS TAKEN
2006120: 01 00 00 00 nop
_Thread_Enable_dispatch();
2006124: 40 00 0d 7b call 2009710 <_Thread_Enable_dispatch> <== NOT EXECUTED
2006128: b0 10 20 16 mov 0x16, %i0 ! 16 <PROM_START+0x16> <== NOT EXECUTED
200612c: 81 c7 e0 08 ret
2006130: 81 e8 00 00 restore
return EINVAL;
}
(void) pthread_mutex_unlock( mutex );
2006134: 40 00 00 f0 call 20064f4 <pthread_mutex_unlock>
2006138: 90 10 00 19 mov %i1, %o0
_Thread_Enable_dispatch();
return EINVAL;
}
*/
if ( !already_timedout ) {
200613c: 80 8e e0 ff btst 0xff, %i3
2006140: 12 80 00 1b bne 20061ac <_POSIX_Condition_variables_Wait_support+0xf8>
2006144: 21 00 80 5a sethi %hi(0x2016800), %l0
the_cond->Mutex = *mutex;
2006148: c2 06 40 00 ld [ %i1 ], %g1
200614c: c2 24 60 14 st %g1, [ %l1 + 0x14 ]
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
2006150: c2 04 22 e4 ld [ %l0 + 0x2e4 ], %g1
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
_Thread_Executing->Wait.id = *cond;
2006154: c6 06 00 00 ld [ %i0 ], %g3
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
2006158: 84 04 60 18 add %l1, 0x18, %g2
_Thread_Executing->Wait.id = *cond;
200615c: c6 20 60 20 st %g3, [ %g1 + 0x20 ]
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
2006160: c4 20 60 44 st %g2, [ %g1 + 0x44 ]
_Thread_Executing->Wait.id = *cond;
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
2006164: 92 10 00 1a mov %i2, %o1
2006168: 90 10 00 02 mov %g2, %o0
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
200616c: c0 20 60 34 clr [ %g1 + 0x34 ]
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
_Thread_Executing->Wait.id = *cond;
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
2006170: 15 00 80 28 sethi %hi(0x200a000), %o2
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
2006174: 82 10 20 01 mov 1, %g1
2006178: 94 12 a0 b8 or %o2, 0xb8, %o2
200617c: 40 00 0e bc call 2009c6c <_Thread_queue_Enqueue_with_handler>
2006180: c2 24 60 48 st %g1, [ %l1 + 0x48 ]
_Thread_Enable_dispatch();
2006184: 40 00 0d 63 call 2009710 <_Thread_Enable_dispatch>
2006188: 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;
200618c: c2 04 22 e4 ld [ %l0 + 0x2e4 ], %g1
2006190: f0 00 60 34 ld [ %g1 + 0x34 ], %i0
if ( status && status != ETIMEDOUT )
2006194: 80 a6 20 00 cmp %i0, 0
2006198: 02 80 00 07 be 20061b4 <_POSIX_Condition_variables_Wait_support+0x100>
200619c: 80 a6 20 74 cmp %i0, 0x74
20061a0: 12 80 00 0b bne 20061cc <_POSIX_Condition_variables_Wait_support+0x118><== NEVER TAKEN
20061a4: 01 00 00 00 nop
20061a8: 30 80 00 03 b,a 20061b4 <_POSIX_Condition_variables_Wait_support+0x100>
return status;
} else {
_Thread_Enable_dispatch();
20061ac: 40 00 0d 59 call 2009710 <_Thread_Enable_dispatch>
20061b0: b0 10 20 74 mov 0x74, %i0
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
20061b4: 40 00 00 af call 2006470 <pthread_mutex_lock>
20061b8: 90 10 00 19 mov %i1, %o0
if ( mutex_status )
20061bc: 80 a2 20 00 cmp %o0, 0
20061c0: 02 80 00 03 be 20061cc <_POSIX_Condition_variables_Wait_support+0x118>
20061c4: 01 00 00 00 nop
20061c8: b0 10 20 16 mov 0x16, %i0 ! 16 <PROM_START+0x16>
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
20061cc: 81 c7 e0 08 ret
20061d0: 81 e8 00 00 restore
0200c790 <_POSIX_Keys_Run_destructors>:
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
200c790: 9d e3 bf 98 save %sp, -104, %sp
uint32_t iterations;
bool are_all_null;
POSIX_Keys_Control *the_key;
void *value;
thread_index = _Objects_Get_index( thread->Object.id );
200c794: 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 ];
200c798: 05 00 00 3f sethi %hi(0xfc00), %g2
200c79c: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff <PROM_START+0xffff>
200c7a0: 84 08 40 02 and %g1, %g2, %g2
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
200c7a4: 83 30 60 18 srl %g1, 0x18, %g1
200c7a8: 82 08 60 07 and %g1, 7, %g1
200c7ac: 82 00 60 06 add %g1, 6, %g1
200c7b0: a9 28 a0 02 sll %g2, 2, %l4
200c7b4: a7 28 60 02 sll %g1, 2, %l3
200c7b8: a4 10 20 00 clr %l2
for ( ; ; ) {
are_all_null = TRUE;
for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) {
200c7bc: 03 00 80 5f sethi %hi(0x2017c00), %g1
200c7c0: aa 10 60 74 or %g1, 0x74, %l5 ! 2017c74 <_POSIX_Keys_Information>
the_key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table[ index ];
if ( the_key && the_key->is_active && the_key->destructor ) {
value = the_key->Values[ thread_api ][ thread_index ];
200c7c4: a0 10 20 01 mov 1, %l0
200c7c8: 10 80 00 1b b 200c834 <_POSIX_Keys_Run_destructors+0xa4>
200c7cc: a2 10 20 01 mov 1, %l1
are_all_null = TRUE;
for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) {
the_key = (POSIX_Keys_Control *)
200c7d0: c2 05 60 1c ld [ %l5 + 0x1c ], %g1
200c7d4: f0 00 40 02 ld [ %g1 + %g2 ], %i0
_POSIX_Keys_Information.local_table[ index ];
if ( the_key && the_key->is_active && the_key->destructor ) {
200c7d8: 80 a6 20 00 cmp %i0, 0
200c7dc: 02 80 00 16 be 200c834 <_POSIX_Keys_Run_destructors+0xa4>
200c7e0: a0 04 20 01 inc %l0
200c7e4: c2 0e 20 10 ldub [ %i0 + 0x10 ], %g1
200c7e8: 80 a0 60 00 cmp %g1, 0
200c7ec: 22 80 00 13 be,a 200c838 <_POSIX_Keys_Run_destructors+0xa8><== NEVER TAKEN
200c7f0: c2 15 60 10 lduh [ %l5 + 0x10 ], %g1 <== NOT EXECUTED
200c7f4: c4 06 20 14 ld [ %i0 + 0x14 ], %g2
200c7f8: 80 a0 a0 00 cmp %g2, 0
200c7fc: 22 80 00 0f be,a 200c838 <_POSIX_Keys_Run_destructors+0xa8><== NEVER TAKEN
200c800: c2 15 60 10 lduh [ %l5 + 0x10 ], %g1 <== NOT EXECUTED
value = the_key->Values[ thread_api ][ thread_index ];
200c804: c2 06 00 13 ld [ %i0 + %l3 ], %g1
200c808: c2 00 40 14 ld [ %g1 + %l4 ], %g1
if ( value ) {
200c80c: 90 90 60 00 orcc %g1, 0, %o0
200c810: 22 80 00 0a be,a 200c838 <_POSIX_Keys_Run_destructors+0xa8><== NEVER TAKEN
200c814: c2 15 60 10 lduh [ %l5 + 0x10 ], %g1 <== NOT EXECUTED
(*the_key->destructor)( value );
200c818: 9f c0 80 00 call %g2
200c81c: 01 00 00 00 nop
if ( the_key->Values[ thread_api ][ thread_index ] )
200c820: c2 06 00 13 ld [ %i0 + %l3 ], %g1
200c824: c2 00 40 14 ld [ %g1 + %l4 ], %g1
200c828: 80 a0 00 01 cmp %g0, %g1
200c82c: 82 40 3f ff addx %g0, -1, %g1
200c830: a2 0c 40 01 and %l1, %g1, %l1
for ( ; ; ) {
are_all_null = TRUE;
for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) {
200c834: c2 15 60 10 lduh [ %l5 + 0x10 ], %g1
200c838: 80 a4 00 01 cmp %l0, %g1
200c83c: 08 bf ff e5 bleu 200c7d0 <_POSIX_Keys_Run_destructors+0x40>
200c840: 85 2c 20 02 sll %l0, 2, %g2
are_all_null = FALSE;
}
}
}
if ( are_all_null == TRUE )
200c844: 80 8c 60 ff btst 0xff, %l1
200c848: 12 80 00 05 bne 200c85c <_POSIX_Keys_Run_destructors+0xcc>
200c84c: a4 04 a0 01 inc %l2
* loop. It seems rude to unnecessarily lock up a system.
*
* Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
*/
if ( iterations >= PTHREAD_DESTRUCTOR_ITERATIONS )
200c850: 80 a4 a0 04 cmp %l2, 4
200c854: 12 bf ff dd bne 200c7c8 <_POSIX_Keys_Run_destructors+0x38>
200c858: a0 10 20 01 mov 1, %l0
200c85c: 81 c7 e0 08 ret
200c860: 81 e8 00 00 restore
02011588 <_POSIX_Message_queue_Create_support>:
const char *name_arg,
int pshared,
struct mq_attr *attr_ptr,
POSIX_Message_queue_Control **message_queue
)
{
2011588: 9d e3 bf 88 save %sp, -120, %sp
CORE_message_queue_Attributes *the_mq_attr;
struct mq_attr attr;
char *name;
size_t n;
n = strnlen( name_arg, NAME_MAX );
201158c: 92 10 20 ff mov 0xff, %o1
2011590: 40 00 12 0f call 2015dcc <strnlen>
2011594: 90 10 00 18 mov %i0, %o0
const char *name_arg,
int pshared,
struct mq_attr *attr_ptr,
POSIX_Message_queue_Control **message_queue
)
{
2011598: a8 10 00 18 mov %i0, %l4
CORE_message_queue_Attributes *the_mq_attr;
struct mq_attr attr;
char *name;
size_t n;
n = strnlen( name_arg, NAME_MAX );
201159c: a6 10 00 08 mov %o0, %l3
const char *name_arg,
int pshared,
struct mq_attr *attr_ptr,
POSIX_Message_queue_Control **message_queue
)
{
20115a0: 92 10 00 1a mov %i2, %o1
struct mq_attr attr;
char *name;
size_t n;
n = strnlen( name_arg, NAME_MAX );
if ( n > NAME_MAX )
20115a4: 80 a2 20 ff cmp %o0, 0xff
20115a8: 18 80 00 5d bgu 201171c <_POSIX_Message_queue_Create_support+0x194><== NEVER TAKEN
20115ac: b0 10 20 5b mov 0x5b, %i0
20115b0: 05 00 80 89 sethi %hi(0x2022400), %g2
20115b4: c2 00 a2 b0 ld [ %g2 + 0x2b0 ], %g1 ! 20226b0 <_Thread_Dispatch_disable_level>
20115b8: 82 00 60 01 inc %g1
20115bc: c2 20 a2 b0 st %g1, [ %g2 + 0x2b0 ]
* 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 ) {
20115c0: a4 10 20 10 mov 0x10, %l2
20115c4: 80 a6 a0 00 cmp %i2, 0
20115c8: 02 80 00 14 be 2011618 <_POSIX_Message_queue_Create_support+0x90>
20115cc: a2 10 20 0a mov 0xa, %l1
attr.mq_maxmsg = 10;
attr.mq_msgsize = 16;
} else {
if ( attr_ptr->mq_maxmsg <= 0 ){
20115d0: c2 06 a0 04 ld [ %i2 + 4 ], %g1
20115d4: 80 a0 60 00 cmp %g1, 0
20115d8: 04 80 00 06 ble 20115f0 <_POSIX_Message_queue_Create_support+0x68>
20115dc: 01 00 00 00 nop
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( attr_ptr->mq_msgsize <= 0 ){
20115e0: c2 06 a0 08 ld [ %i2 + 8 ], %g1
20115e4: 80 a0 60 00 cmp %g1, 0
20115e8: 34 80 00 08 bg,a 2011608 <_POSIX_Message_queue_Create_support+0x80>
20115ec: 90 07 bf e8 add %fp, -24, %o0
_Thread_Enable_dispatch();
20115f0: 7f ff f2 21 call 200de74 <_Thread_Enable_dispatch>
20115f4: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
20115f8: 40 00 0a 56 call 2013f50 <__errno>
20115fc: 01 00 00 00 nop
2011600: 10 80 00 39 b 20116e4 <_POSIX_Message_queue_Create_support+0x15c>
2011604: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
}
attr = *attr_ptr;
2011608: 40 00 0c 63 call 2014794 <memcpy>
201160c: 94 10 20 10 mov 0x10, %o2
2011610: e4 07 bf f0 ld [ %fp + -16 ], %l2
2011614: e2 07 bf ec ld [ %fp + -20 ], %l1
*/
RTEMS_INLINE_ROUTINE
POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void )
{
return (POSIX_Message_queue_Control *)
2011618: 21 00 80 8a sethi %hi(0x2022800), %l0
201161c: 7f ff ee 4f call 200cf58 <_Objects_Allocate>
2011620: 90 14 22 40 or %l0, 0x240, %o0 ! 2022a40 <_POSIX_Message_queue_Information>
}
the_mq = _POSIX_Message_queue_Allocate();
if ( !the_mq ) {
2011624: b4 92 20 00 orcc %o0, 0, %i2
2011628: 32 80 00 08 bne,a 2011648 <_POSIX_Message_queue_Create_support+0xc0><== ALWAYS TAKEN
201162c: 82 10 20 01 mov 1, %g1
_Thread_Enable_dispatch();
2011630: 7f ff f2 11 call 200de74 <_Thread_Enable_dispatch> <== NOT EXECUTED
2011634: 01 00 00 00 nop <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENFILE );
2011638: 40 00 0a 46 call 2013f50 <__errno> <== NOT EXECUTED
201163c: 01 00 00 00 nop <== NOT EXECUTED
2011640: 10 80 00 29 b 20116e4 <_POSIX_Message_queue_Create_support+0x15c><== NOT EXECUTED
2011644: 82 10 20 17 mov 0x17, %g1 ! 17 <PROM_START+0x17> <== NOT EXECUTED
}
the_mq->process_shared = pshared;
2011648: f2 26 a0 10 st %i1, [ %i2 + 0x10 ]
/*
* Make a copy of the user's string for name just in case it was
* dynamically constructed.
*/
name = _Workspace_Allocate(n);
201164c: 90 10 00 13 mov %l3, %o0
}
the_mq->process_shared = pshared;
the_mq->named = TRUE;
the_mq->open_count = 1;
the_mq->linked = TRUE;
2011650: c2 2e a0 15 stb %g1, [ %i2 + 0x15 ]
rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq->process_shared = pshared;
the_mq->named = TRUE;
the_mq->open_count = 1;
2011654: c2 26 a0 18 st %g1, [ %i2 + 0x18 ]
/*
* Make a copy of the user's string for name just in case it was
* dynamically constructed.
*/
name = _Workspace_Allocate(n);
2011658: 7f ff f7 80 call 200f458 <_Workspace_Allocate>
201165c: c2 2e a0 14 stb %g1, [ %i2 + 0x14 ]
if (!name) {
2011660: b2 92 20 00 orcc %o0, 0, %i1
2011664: 12 80 00 0b bne 2011690 <_POSIX_Message_queue_Create_support+0x108><== ALWAYS TAKEN
2011668: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free (
POSIX_Message_queue_Control *the_mq
)
{
_Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object );
201166c: 90 14 22 40 or %l0, 0x240, %o0 <== NOT EXECUTED
2011670: 7f ff ef 27 call 200d30c <_Objects_Free> <== NOT EXECUTED
2011674: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
_POSIX_Message_queue_Free( the_mq );
_Thread_Enable_dispatch();
2011678: 7f ff f1 ff call 200de74 <_Thread_Enable_dispatch> <== NOT EXECUTED
201167c: 01 00 00 00 nop <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
2011680: 40 00 0a 34 call 2013f50 <__errno> <== NOT EXECUTED
2011684: 01 00 00 00 nop <== NOT EXECUTED
2011688: 10 80 00 17 b 20116e4 <_POSIX_Message_queue_Create_support+0x15c><== NOT EXECUTED
201168c: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc> <== NOT EXECUTED
}
strcpy( name, name_arg );
2011690: 40 00 0f 64 call 2015420 <strcpy>
2011694: 92 10 00 14 mov %l4, %o1
*/
the_mq_attr = &the_mq->Message_queue.Attributes;
the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
if ( ! _CORE_message_queue_Initialize(
2011698: 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;
201169c: c0 26 a0 5c clr [ %i2 + 0x5c ]
if ( ! _CORE_message_queue_Initialize(
20116a0: 96 10 00 12 mov %l2, %o3
20116a4: 90 06 a0 1c add %i2, 0x1c, %o0
20116a8: 40 00 03 2a call 2012350 <_CORE_message_queue_Initialize>
20116ac: 92 06 a0 5c add %i2, 0x5c, %o1
20116b0: 80 8a 20 ff btst 0xff, %o0
20116b4: 12 80 00 0f bne 20116f0 <_POSIX_Message_queue_Create_support+0x168><== ALWAYS TAKEN
20116b8: 82 14 22 40 or %l0, 0x240, %g1
20116bc: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
20116c0: 7f ff ef 13 call 200d30c <_Objects_Free> <== NOT EXECUTED
20116c4: 90 14 22 40 or %l0, 0x240, %o0 <== NOT EXECUTED
attr.mq_maxmsg,
attr.mq_msgsize
) ) {
_POSIX_Message_queue_Free( the_mq );
_Workspace_Free(name);
20116c8: 7f ff f7 5d call 200f43c <_Workspace_Free> <== NOT EXECUTED
20116cc: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
_Thread_Enable_dispatch();
20116d0: 7f ff f1 e9 call 200de74 <_Thread_Enable_dispatch> <== NOT EXECUTED
20116d4: 01 00 00 00 nop <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
20116d8: 40 00 0a 1e call 2013f50 <__errno> <== NOT EXECUTED
20116dc: 01 00 00 00 nop <== NOT EXECUTED
20116e0: 82 10 20 1c mov 0x1c, %g1 ! 1c <PROM_START+0x1c> <== NOT EXECUTED
20116e4: c2 22 00 00 st %g1, [ %o0 ]
20116e8: 81 c7 e0 08 ret
20116ec: 91 e8 3f ff restore %g0, -1, %o0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
20116f0: c4 06 a0 08 ld [ %i2 + 8 ], %g2
20116f4: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
20116f8: 03 00 00 3f sethi %hi(0xfc00), %g1
20116fc: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
2011700: 84 08 80 01 and %g2, %g1, %g2
2011704: 85 28 a0 02 sll %g2, 2, %g2
2011708: f4 20 c0 02 st %i2, [ %g3 + %g2 ]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string */
the_object->name.name_p = name;
201170c: f2 26 a0 0c st %i1, [ %i2 + 0xc ]
&_POSIX_Message_queue_Information,
&the_mq->Object,
name
);
*message_queue = the_mq;
2011710: f4 26 c0 00 st %i2, [ %i3 ]
_Thread_Enable_dispatch();
2011714: 7f ff f1 d8 call 200de74 <_Thread_Enable_dispatch>
2011718: b0 10 20 00 clr %i0
return 0;
}
201171c: 81 c7 e0 08 ret
2011720: 81 e8 00 00 restore
02009c1c <_POSIX_Message_queue_Delete>:
*/
void _POSIX_Message_queue_Delete(
POSIX_Message_queue_Control *the_mq
)
{
2009c1c: 9d e3 bf 98 save %sp, -104, %sp
if ( !the_mq->linked && !the_mq->open_count ) {
2009c20: c2 0e 20 15 ldub [ %i0 + 0x15 ], %g1
2009c24: 80 a0 60 00 cmp %g1, 0
2009c28: 12 80 00 16 bne 2009c80 <_POSIX_Message_queue_Delete+0x64>
2009c2c: b2 10 00 18 mov %i0, %i1
2009c30: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
2009c34: 80 a0 60 00 cmp %g1, 0
2009c38: 12 80 00 12 bne 2009c80 <_POSIX_Message_queue_Delete+0x64>
2009c3c: 01 00 00 00 nop
/* the name memory may have been freed by unlink. */
Objects_Control *the_object = &the_mq->Object;
if ( the_object->name.name_p )
2009c40: d0 06 20 0c ld [ %i0 + 0xc ], %o0
2009c44: 80 a2 20 00 cmp %o0, 0
2009c48: 02 80 00 04 be 2009c58 <_POSIX_Message_queue_Delete+0x3c> <== ALWAYS TAKEN
2009c4c: 31 00 80 8a sethi %hi(0x2022800), %i0
_Workspace_Free( (void *)the_object->name.name_p );
2009c50: 40 00 15 fb call 200f43c <_Workspace_Free> <== NOT EXECUTED
2009c54: 01 00 00 00 nop <== NOT EXECUTED
_Objects_Close( &_POSIX_Message_queue_Information, the_object );
2009c58: 92 10 00 19 mov %i1, %o1
2009c5c: 40 00 0c e9 call 200d000 <_Objects_Close>
2009c60: 90 16 22 40 or %i0, 0x240, %o0
_CORE_message_queue_Close(
2009c64: 90 06 60 1c add %i1, 0x1c, %o0
2009c68: 92 10 20 00 clr %o1
2009c6c: 94 10 20 05 mov 5, %o2
2009c70: 40 00 09 eb call 200c41c <_CORE_message_queue_Close>
2009c74: b0 16 22 40 or %i0, 0x240, %i0
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free (
POSIX_Message_queue_Control *the_mq
)
{
_Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object );
2009c78: 40 00 0d a5 call 200d30c <_Objects_Free>
2009c7c: 81 e8 00 00 restore
2009c80: 81 c7 e0 08 ret
2009c84: 81 e8 00 00 restore
02009fdc <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
2009fdc: 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 *)
2009fe0: 11 00 80 8a sethi %hi(0x2022800), %o0
2009fe4: 94 07 bf f4 add %fp, -12, %o2
2009fe8: 90 12 23 bc or %o0, 0x3bc, %o0
2009fec: 40 00 0d 35 call 200d4c0 <_Objects_Get>
2009ff0: 92 10 00 18 mov %i0, %o1
Objects_Locations location;
size_t length_out;
bool do_wait;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
2009ff4: c2 07 bf f4 ld [ %fp + -12 ], %g1
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
2009ff8: 94 10 00 19 mov %i1, %o2
Objects_Locations location;
size_t length_out;
bool do_wait;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
2009ffc: 80 a0 60 00 cmp %g1, 0
200a000: 12 80 00 3b bne 200a0ec <_POSIX_Message_queue_Receive_support+0x110>
200a004: 9a 10 00 1d mov %i5, %o5
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
200a008: c4 02 20 14 ld [ %o0 + 0x14 ], %g2
200a00c: 82 08 a0 03 and %g2, 3, %g1
200a010: 80 a0 60 01 cmp %g1, 1
200a014: 32 80 00 08 bne,a 200a034 <_POSIX_Message_queue_Receive_support+0x58>
200a018: d0 02 20 10 ld [ %o0 + 0x10 ], %o0
_Thread_Enable_dispatch();
200a01c: 40 00 0f 96 call 200de74 <_Thread_Enable_dispatch>
200a020: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EBADF );
200a024: 40 00 27 cb call 2013f50 <__errno>
200a028: 01 00 00 00 nop
200a02c: 10 80 00 0b b 200a058 <_POSIX_Message_queue_Receive_support+0x7c>
200a030: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9>
}
the_mq = the_mq_fd->Queue;
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
200a034: c2 02 20 68 ld [ %o0 + 0x68 ], %g1
200a038: 80 a6 80 01 cmp %i2, %g1
200a03c: 1a 80 00 09 bcc 200a060 <_POSIX_Message_queue_Receive_support+0x84>
200a040: 80 8f 20 ff btst 0xff, %i4
_Thread_Enable_dispatch();
200a044: 40 00 0f 8c call 200de74 <_Thread_Enable_dispatch>
200a048: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EMSGSIZE );
200a04c: 40 00 27 c1 call 2013f50 <__errno>
200a050: 01 00 00 00 nop
200a054: 82 10 20 7a mov 0x7a, %g1 ! 7a <PROM_START+0x7a>
200a058: 10 80 00 23 b 200a0e4 <_POSIX_Message_queue_Receive_support+0x108>
200a05c: c2 22 00 00 st %g1, [ %o0 ]
length_out = -1;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
200a060: 02 80 00 05 be 200a074 <_POSIX_Message_queue_Receive_support+0x98><== NEVER TAKEN
200a064: 82 10 20 00 clr %g1
do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? FALSE : TRUE;
200a068: 83 30 a0 0e srl %g2, 0xe, %g1
200a06c: 82 18 60 01 xor %g1, 1, %g1
200a070: 82 08 60 01 and %g1, 1, %g1
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
200a074: 98 08 60 01 and %g1, 1, %o4
200a078: 90 02 20 1c add %o0, 0x1c, %o0
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
200a07c: 82 10 3f ff mov -1, %g1
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
200a080: 92 10 00 18 mov %i0, %o1
200a084: 96 07 bf f0 add %fp, -16, %o3
200a088: 40 00 09 0a call 200c4b0 <_CORE_message_queue_Seize>
200a08c: c2 27 bf f0 st %g1, [ %fp + -16 ]
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
200a090: 40 00 0f 79 call 200de74 <_Thread_Enable_dispatch>
200a094: 3b 00 80 89 sethi %hi(0x2022400), %i5
*msg_prio =
200a098: c4 07 63 74 ld [ %i5 + 0x374 ], %g2 ! 2022774 <_Thread_Executing>
200a09c: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
if ( !_Thread_Executing->Wait.return_code )
200a0a0: c6 00 a0 34 ld [ %g2 + 0x34 ], %g3
do_wait,
timeout
);
_Thread_Enable_dispatch();
*msg_prio =
200a0a4: 85 38 60 1f sra %g1, 0x1f, %g2
200a0a8: 82 18 80 01 xor %g2, %g1, %g1
200a0ac: 82 20 40 02 sub %g1, %g2, %g1
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
if ( !_Thread_Executing->Wait.return_code )
200a0b0: 80 a0 e0 00 cmp %g3, 0
200a0b4: 12 80 00 05 bne 200a0c8 <_POSIX_Message_queue_Receive_support+0xec>
200a0b8: c2 26 c0 00 st %g1, [ %i3 ]
return length_out;
200a0bc: f0 07 bf f0 ld [ %fp + -16 ], %i0
200a0c0: 81 c7 e0 08 ret
200a0c4: 81 e8 00 00 restore
rtems_set_errno_and_return_minus_one(
200a0c8: 40 00 27 a2 call 2013f50 <__errno>
200a0cc: 01 00 00 00 nop
200a0d0: c2 07 63 74 ld [ %i5 + 0x374 ], %g1
200a0d4: a0 10 00 08 mov %o0, %l0
200a0d8: 40 00 00 9f call 200a354 <_POSIX_Message_queue_Translate_core_message_queue_return_code>
200a0dc: d0 00 60 34 ld [ %g1 + 0x34 ], %o0
200a0e0: d0 24 00 00 st %o0, [ %l0 ]
200a0e4: 81 c7 e0 08 ret
200a0e8: 91 e8 3f ff restore %g0, -1, %o0
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
200a0ec: 40 00 27 99 call 2013f50 <__errno>
200a0f0: b0 10 3f ff mov -1, %i0
200a0f4: 82 10 20 09 mov 9, %g1
200a0f8: c2 22 00 00 st %g1, [ %o0 ]
}
200a0fc: 81 c7 e0 08 ret
200a100: 81 e8 00 00 restore
0200a11c <_POSIX_Message_queue_Send_support>:
size_t msg_len,
uint32_t msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
200a11c: 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 )
200a120: 80 a6 e0 20 cmp %i3, 0x20
200a124: 28 80 00 06 bleu,a 200a13c <_POSIX_Message_queue_Send_support+0x20>
200a128: 11 00 80 8a sethi %hi(0x2022800), %o0
rtems_set_errno_and_return_minus_one( EINVAL );
200a12c: 40 00 27 89 call 2013f50 <__errno>
200a130: 01 00 00 00 nop
200a134: 10 80 00 13 b 200a180 <_POSIX_Message_queue_Send_support+0x64>
200a138: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
200a13c: 92 10 00 18 mov %i0, %o1
200a140: 90 12 23 bc or %o0, 0x3bc, %o0
200a144: 40 00 0c df call 200d4c0 <_Objects_Get>
200a148: 94 07 bf f4 add %fp, -12, %o2
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
200a14c: c2 07 bf f4 ld [ %fp + -12 ], %g1
200a150: 80 a0 60 00 cmp %g1, 0
200a154: 12 80 00 30 bne 200a214 <_POSIX_Message_queue_Send_support+0xf8>
200a158: 01 00 00 00 nop
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) {
200a15c: c4 02 20 14 ld [ %o0 + 0x14 ], %g2
200a160: 80 88 a0 03 btst 3, %g2
200a164: 12 80 00 09 bne 200a188 <_POSIX_Message_queue_Send_support+0x6c>
200a168: 80 8f 20 ff btst 0xff, %i4
_Thread_Enable_dispatch();
200a16c: 40 00 0f 42 call 200de74 <_Thread_Enable_dispatch>
200a170: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EBADF );
200a174: 40 00 27 77 call 2013f50 <__errno>
200a178: 01 00 00 00 nop
200a17c: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9>
200a180: 10 80 00 23 b 200a20c <_POSIX_Message_queue_Send_support+0xf0>
200a184: c2 22 00 00 st %g1, [ %o0 ]
}
the_mq = the_mq_fd->Queue;
200a188: d0 02 20 10 ld [ %o0 + 0x10 ], %o0
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
200a18c: 02 80 00 05 be 200a1a0 <_POSIX_Message_queue_Send_support+0x84><== NEVER TAKEN
200a190: 82 10 20 00 clr %g1
do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? FALSE : TRUE;
200a194: 83 30 a0 0e srl %g2, 0xe, %g1
200a198: 82 18 60 01 xor %g1, 1, %g1
200a19c: 82 08 60 01 and %g1, 1, %g1
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
200a1a0: 82 08 60 ff and %g1, 0xff, %g1
200a1a4: fa 23 a0 60 st %i5, [ %sp + 0x60 ]
200a1a8: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
200a1ac: 92 10 00 19 mov %i1, %o1
200a1b0: 94 10 00 1a mov %i2, %o2
200a1b4: 96 10 00 18 mov %i0, %o3
200a1b8: 9a 20 00 1b neg %i3, %o5
200a1bc: 98 10 20 00 clr %o4
200a1c0: 40 00 09 01 call 200c5c4 <_CORE_message_queue_Submit>
200a1c4: 90 02 20 1c add %o0, 0x1c, %o0
_POSIX_Message_queue_Priority_to_core( msg_prio ),
do_wait,
timeout /* no timeout */
);
_Thread_Enable_dispatch();
200a1c8: 40 00 0f 2b call 200de74 <_Thread_Enable_dispatch>
200a1cc: ba 10 00 08 mov %o0, %i5
* after it wakes up. The returned status is correct for
* non-blocking operations but if we blocked, then we need
* to look at the status in our TCB.
*/
if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT )
200a1d0: 80 a7 60 07 cmp %i5, 7
200a1d4: 12 80 00 06 bne 200a1ec <_POSIX_Message_queue_Send_support+0xd0>
200a1d8: 80 a7 60 00 cmp %i5, 0
msg_status = _Thread_Executing->Wait.return_code;
200a1dc: 03 00 80 89 sethi %hi(0x2022400), %g1
200a1e0: c2 00 63 74 ld [ %g1 + 0x374 ], %g1 ! 2022774 <_Thread_Executing>
200a1e4: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
if ( !msg_status )
200a1e8: 80 a7 60 00 cmp %i5, 0
200a1ec: 02 80 00 0e be 200a224 <_POSIX_Message_queue_Send_support+0x108>
200a1f0: b0 10 20 00 clr %i0
return msg_status;
rtems_set_errno_and_return_minus_one(
200a1f4: 40 00 27 57 call 2013f50 <__errno>
200a1f8: 01 00 00 00 nop
200a1fc: a0 10 00 08 mov %o0, %l0
200a200: 40 00 00 55 call 200a354 <_POSIX_Message_queue_Translate_core_message_queue_return_code>
200a204: 90 10 00 1d mov %i5, %o0
200a208: d0 24 00 00 st %o0, [ %l0 ]
200a20c: 81 c7 e0 08 ret
200a210: 91 e8 3f ff restore %g0, -1, %o0
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
200a214: 40 00 27 4f call 2013f50 <__errno>
200a218: b0 10 3f ff mov -1, %i0
200a21c: 82 10 20 09 mov 9, %g1
200a220: c2 22 00 00 st %g1, [ %o0 ]
}
200a224: 81 c7 e0 08 ret
200a228: 81 e8 00 00 restore
02007008 <_POSIX_Mutex_Get>:
POSIX_Mutex_Control *_POSIX_Mutex_Get (
pthread_mutex_t *mutex,
Objects_Locations *location
)
{
2007008: 9d e3 bf 98 save %sp, -104, %sp
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
200700c: 80 a6 20 00 cmp %i0, 0
2007010: 02 80 00 0c be 2007040 <_POSIX_Mutex_Get+0x38>
2007014: b4 10 00 19 mov %i1, %i2
2007018: c2 06 00 00 ld [ %i0 ], %g1
200701c: 80 a0 7f ff cmp %g1, -1
2007020: 32 80 00 0c bne,a 2007050 <_POSIX_Mutex_Get+0x48> <== ALWAYS TAKEN
2007024: f2 06 00 00 ld [ %i0 ], %i1
2007028: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
200702c: 40 00 00 20 call 20070ac <pthread_mutex_init> <== NOT EXECUTED
2007030: 92 10 20 00 clr %o1 <== NOT EXECUTED
2007034: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2007038: 22 80 00 06 be,a 2007050 <_POSIX_Mutex_Get+0x48> <== NOT EXECUTED
200703c: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED
2007040: 82 10 20 01 mov 1, %g1
2007044: c2 26 80 00 st %g1, [ %i2 ]
return (POSIX_Mutex_Control *)
_Objects_Get( &_POSIX_Mutex_Information, *id, location );
}
2007048: 81 c7 e0 08 ret
200704c: 91 e8 20 00 restore %g0, 0, %o0
{
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
return (POSIX_Mutex_Control *)
2007050: 31 00 80 63 sethi %hi(0x2018c00), %i0
2007054: 40 00 0b 9a call 2009ebc <_Objects_Get>
2007058: 91 ee 22 10 restore %i0, 0x210, %o0
02006fa8 <_POSIX_Mutex_Get_interrupt_disable>:
POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable (
pthread_mutex_t *mutex,
Objects_Locations *location,
ISR_Level *level
)
{
2006fa8: 9d e3 bf 98 save %sp, -104, %sp
2006fac: a0 10 00 19 mov %i1, %l0
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
2006fb0: 80 a6 20 00 cmp %i0, 0
2006fb4: 02 80 00 0c be 2006fe4 <_POSIX_Mutex_Get_interrupt_disable+0x3c><== NEVER TAKEN
2006fb8: b6 10 00 1a mov %i2, %i3
2006fbc: c2 06 00 00 ld [ %i0 ], %g1
2006fc0: 80 a0 7f ff cmp %g1, -1
2006fc4: 32 80 00 0c bne,a 2006ff4 <_POSIX_Mutex_Get_interrupt_disable+0x4c><== ALWAYS TAKEN
2006fc8: f2 06 00 00 ld [ %i0 ], %i1
2006fcc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2006fd0: 40 00 00 37 call 20070ac <pthread_mutex_init> <== NOT EXECUTED
2006fd4: 92 10 20 00 clr %o1 <== NOT EXECUTED
2006fd8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2006fdc: 22 80 00 06 be,a 2006ff4 <_POSIX_Mutex_Get_interrupt_disable+0x4c><== NOT EXECUTED
2006fe0: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED
2006fe4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
2006fe8: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED
return (POSIX_Mutex_Control *)
_Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level );
}
2006fec: 81 c7 e0 08 ret <== NOT EXECUTED
2006ff0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
{
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
return (POSIX_Mutex_Control *)
2006ff4: b4 10 00 10 mov %l0, %i2
2006ff8: 31 00 80 63 sethi %hi(0x2018c00), %i0
2006ffc: 40 00 0b 92 call 2009e44 <_Objects_Get_isr_disable>
2007000: 91 ee 22 10 restore %i0, 0x210, %o0
0200e904 <_POSIX_Semaphore_Create_support>:
const char *name,
int pshared,
unsigned int value,
POSIX_Semaphore_Control **the_sem
)
{
200e904: 9d e3 bf 98 save %sp, -104, %sp
200e908: 03 00 80 78 sethi %hi(0x201e000), %g1
200e90c: c4 00 60 40 ld [ %g1 + 0x40 ], %g2 ! 201e040 <_Thread_Dispatch_disable_level>
200e910: 84 00 a0 01 inc %g2
200e914: c4 20 60 40 st %g2, [ %g1 + 0x40 ]
char *name_p = (char *)name;
_Thread_Disable_dispatch();
/* Sharing semaphores among processes is not currently supported */
if (pshared != 0) {
200e918: 80 a6 60 00 cmp %i1, 0
200e91c: 02 80 00 08 be 200e93c <_POSIX_Semaphore_Create_support+0x38>
200e920: 80 a6 20 00 cmp %i0, 0
_Thread_Enable_dispatch();
200e924: 7f ff f0 40 call 200aa24 <_Thread_Enable_dispatch>
200e928: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOSYS );
200e92c: 40 00 08 98 call 2010b8c <__errno>
200e930: 01 00 00 00 nop
200e934: 10 80 00 19 b 200e998 <_POSIX_Semaphore_Create_support+0x94>
200e938: 82 10 20 58 mov 0x58, %g1 ! 58 <PROM_START+0x58>
}
if ( name ) {
200e93c: 02 80 00 0d be 200e970 <_POSIX_Semaphore_Create_support+0x6c>
200e940: 11 00 80 78 sethi %hi(0x201e000), %o0
if( strlen(name) > PATH_MAX ) {
200e944: 40 00 0f 5c call 20126b4 <strlen>
200e948: 90 10 00 18 mov %i0, %o0
200e94c: 80 a2 20 ff cmp %o0, 0xff
200e950: 28 80 00 08 bleu,a 200e970 <_POSIX_Semaphore_Create_support+0x6c><== ALWAYS TAKEN
200e954: 11 00 80 78 sethi %hi(0x201e000), %o0
_Thread_Enable_dispatch();
200e958: 7f ff f0 33 call 200aa24 <_Thread_Enable_dispatch> <== NOT EXECUTED
200e95c: 01 00 00 00 nop <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
200e960: 40 00 08 8b call 2010b8c <__errno> <== NOT EXECUTED
200e964: 01 00 00 00 nop <== NOT EXECUTED
200e968: 10 80 00 0c b 200e998 <_POSIX_Semaphore_Create_support+0x94><== NOT EXECUTED
200e96c: 82 10 20 5b mov 0x5b, %g1 ! 5b <PROM_START+0x5b> <== NOT EXECUTED
* _POSIX_Semaphore_Allocate
*/
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void )
{
return (POSIX_Semaphore_Control *)
200e970: 7f ff ec 92 call 2009bb8 <_Objects_Allocate>
200e974: 90 12 23 50 or %o0, 0x350, %o0
}
}
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
200e978: b2 92 20 00 orcc %o0, 0, %i1
200e97c: 12 80 00 0a bne 200e9a4 <_POSIX_Semaphore_Create_support+0xa0>
200e980: 80 a6 20 00 cmp %i0, 0
_Thread_Enable_dispatch();
200e984: 7f ff f0 28 call 200aa24 <_Thread_Enable_dispatch>
200e988: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOSPC );
200e98c: 40 00 08 80 call 2010b8c <__errno>
200e990: 01 00 00 00 nop
200e994: 82 10 20 1c mov 0x1c, %g1 ! 1c <PROM_START+0x1c>
200e998: c2 22 00 00 st %g1, [ %o0 ]
200e99c: 81 c7 e0 08 ret
200e9a0: 91 e8 3f ff restore %g0, -1, %o0
}
the_semaphore->process_shared = pshared;
if ( name ) {
200e9a4: 02 80 00 07 be 200e9c0 <_POSIX_Semaphore_Create_support+0xbc>
200e9a8: c0 26 60 10 clr [ %i1 + 0x10 ]
the_semaphore->named = TRUE;
the_semaphore->open_count = 1;
200e9ac: 82 10 20 01 mov 1, %g1
the_semaphore->linked = TRUE;
200e9b0: c2 2e 60 15 stb %g1, [ %i1 + 0x15 ]
the_semaphore->process_shared = pshared;
if ( name ) {
the_semaphore->named = TRUE;
the_semaphore->open_count = 1;
200e9b4: c2 26 60 18 st %g1, [ %i1 + 0x18 ]
}
the_semaphore->process_shared = pshared;
if ( name ) {
the_semaphore->named = TRUE;
200e9b8: 10 80 00 05 b 200e9cc <_POSIX_Semaphore_Create_support+0xc8>
200e9bc: c2 2e 60 14 stb %g1, [ %i1 + 0x14 ]
the_semaphore->open_count = 1;
the_semaphore->linked = TRUE;
} else {
the_semaphore->named = FALSE;
200e9c0: c0 2e 60 14 clrb [ %i1 + 0x14 ]
the_semaphore->open_count = 0;
200e9c4: c0 26 60 18 clr [ %i1 + 0x18 ]
the_semaphore->linked = FALSE;
200e9c8: c0 2e 60 15 clrb [ %i1 + 0x15 ]
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
200e9cc: 82 10 3f ff mov -1, %g1
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
200e9d0: 94 10 00 1a mov %i2, %o2
200e9d4: 90 06 60 1c add %i1, 0x1c, %o0
200e9d8: 92 06 60 5c add %i1, 0x5c, %o1
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
200e9dc: c2 26 60 5c st %g1, [ %i1 + 0x5c ]
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
200e9e0: 7f ff eb 4e call 2009718 <_CORE_semaphore_Initialize>
200e9e4: c0 26 60 60 clr [ %i1 + 0x60 ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200e9e8: c4 06 60 08 ld [ %i1 + 8 ], %g2
200e9ec: 03 00 80 78 sethi %hi(0x201e000), %g1
200e9f0: c6 00 63 6c ld [ %g1 + 0x36c ], %g3 ! 201e36c <_POSIX_Semaphore_Information+0x1c>
200e9f4: 03 00 00 3f sethi %hi(0xfc00), %g1
200e9f8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
200e9fc: 84 08 80 01 and %g2, %g1, %g2
200ea00: 85 28 a0 02 sll %g2, 2, %g2
200ea04: f2 20 c0 02 st %i1, [ %g3 + %g2 ]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string */
the_object->name.name_p = name;
200ea08: f0 26 60 0c st %i0, [ %i1 + 0xc ]
&_POSIX_Semaphore_Information,
&the_semaphore->Object,
name_p
);
*the_sem = the_semaphore;
200ea0c: f2 26 c0 00 st %i1, [ %i3 ]
_Thread_Enable_dispatch();
200ea10: 7f ff f0 05 call 200aa24 <_Thread_Enable_dispatch>
200ea14: b0 10 20 00 clr %i0
return 0;
}
200ea18: 81 c7 e0 08 ret
200ea1c: 81 e8 00 00 restore
0200b000 <_POSIX_Threads_Create_extension>:
bool _POSIX_Threads_Create_extension(
Thread_Control *executing,
Thread_Control *created
)
{
200b000: 9d e3 bf 98 save %sp, -104, %sp
POSIX_API_Control *api;
POSIX_API_Control *executing_api;
api = _Workspace_Allocate( sizeof( POSIX_API_Control ) );
200b004: 90 10 20 e4 mov 0xe4, %o0
200b008: 7f ff f6 ef call 2008bc4 <_Workspace_Allocate>
200b00c: b0 10 20 00 clr %i0
if ( !api )
200b010: a2 92 20 00 orcc %o0, 0, %l1
200b014: 02 80 00 38 be 200b0f4 <_POSIX_Threads_Create_extension+0xf4><== NEVER TAKEN
200b018: 94 10 20 38 mov 0x38, %o2
return false;
created->API_Extensions[ THREAD_API_POSIX ] = api;
200b01c: e2 26 61 6c st %l1, [ %i1 + 0x16c ]
/* XXX check all fields are touched */
api->Attributes = _POSIX_Threads_Default_attributes;
200b020: 21 00 80 58 sethi %hi(0x2016000), %l0
200b024: a0 14 20 88 or %l0, 0x88, %l0 ! 2016088 <_POSIX_Threads_Default_attributes>
200b028: 40 00 0a 0d call 200d85c <memcpy>
200b02c: 92 10 00 10 mov %l0, %o1
api->detachstate = _POSIX_Threads_Default_attributes.detachstate;
200b030: 82 10 20 01 mov 1, %g1
api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy;
api->schedparam = _POSIX_Threads_Default_attributes.schedparam;
200b034: 92 04 20 18 add %l0, 0x18, %o1
created->API_Extensions[ THREAD_API_POSIX ] = api;
/* XXX check all fields are touched */
api->Attributes = _POSIX_Threads_Default_attributes;
api->detachstate = _POSIX_Threads_Default_attributes.detachstate;
api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy;
200b038: c2 24 60 7c st %g1, [ %l1 + 0x7c ]
created->API_Extensions[ THREAD_API_POSIX ] = api;
/* XXX check all fields are touched */
api->Attributes = _POSIX_Threads_Default_attributes;
api->detachstate = _POSIX_Threads_Default_attributes.detachstate;
200b03c: c2 24 60 38 st %g1, [ %l1 + 0x38 ]
api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy;
api->schedparam = _POSIX_Threads_Default_attributes.schedparam;
200b040: 90 04 60 80 add %l1, 0x80, %o0
200b044: 40 00 0a 06 call 200d85c <memcpy>
200b048: 94 10 20 18 mov 0x18, %o2
api->schedparam.sched_priority =
200b04c: c4 06 60 14 ld [ %i1 + 0x14 ], %g2
200b050: 82 10 20 ff mov 0xff, %g1
200b054: 82 20 40 02 sub %g1, %g2, %g1
* If the thread is not a posix thread, then all posix signals are blocked
* by default.
*/
/* XXX use signal constants */
api->signals_pending = 0;
200b058: c0 24 60 c8 clr [ %l1 + 0xc8 ]
/* XXX check all fields are touched */
api->Attributes = _POSIX_Threads_Default_attributes;
api->detachstate = _POSIX_Threads_Default_attributes.detachstate;
api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy;
api->schedparam = _POSIX_Threads_Default_attributes.schedparam;
api->schedparam.sched_priority =
200b05c: c2 24 60 80 st %g1, [ %l1 + 0x80 ]
* by default.
*/
/* XXX use signal constants */
api->signals_pending = 0;
if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API &&
200b060: c6 06 60 08 ld [ %i1 + 8 ], %g3
200b064: 82 04 60 dc add %l1, 0xdc, %g1
_POSIX_Priority_From_core( created->current_priority );
/*
* POSIX 1003.1 1996, 18.2.2.2
*/
api->cancelation_requested = 0;
200b068: c0 24 60 d4 clr [ %l1 + 0xd4 ]
200b06c: c2 24 60 d8 st %g1, [ %l1 + 0xd8 ]
api->cancelability_state = PTHREAD_CANCEL_ENABLE;
200b070: c0 24 60 cc clr [ %l1 + 0xcc ]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
200b074: 82 04 60 d8 add %l1, 0xd8, %g1
api->cancelability_type = PTHREAD_CANCEL_DEFERRED;
200b078: c0 24 60 d0 clr [ %l1 + 0xd0 ]
200b07c: c2 24 60 e0 st %g1, [ %l1 + 0xe0 ]
* by default.
*/
/* XXX use signal constants */
api->signals_pending = 0;
if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API &&
200b080: 83 30 e0 18 srl %g3, 0x18, %g1
200b084: 82 08 60 07 and %g1, 7, %g1
200b088: 80 a0 60 03 cmp %g1, 3
200b08c: 12 80 00 0b bne 200b0b8 <_POSIX_Threads_Create_extension+0xb8>
200b090: c0 24 60 dc clr [ %l1 + 0xdc ]
200b094: 83 30 e0 1b srl %g3, 0x1b, %g1
200b098: 80 a0 60 01 cmp %g1, 1
200b09c: 32 80 00 08 bne,a 200b0bc <_POSIX_Threads_Create_extension+0xbc><== NEVER TAKEN
200b0a0: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED
_Objects_Get_class( created->Object.id ) == 1 ) {
executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
api->signals_blocked = executing_api->signals_blocked;
200b0a4: 03 00 80 5e sethi %hi(0x2017800), %g1
200b0a8: c2 00 60 e4 ld [ %g1 + 0xe4 ], %g1 ! 20178e4 <_Thread_Executing>
200b0ac: c2 00 61 6c ld [ %g1 + 0x16c ], %g1
200b0b0: 10 80 00 03 b 200b0bc <_POSIX_Threads_Create_extension+0xbc>
200b0b4: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1
} else {
api->signals_blocked = 0xffffffff;
200b0b8: 82 10 3f ff mov -1, %g1
200b0bc: c2 24 60 c4 st %g1, [ %l1 + 0xc4 ]
}
_Thread_queue_Initialize(
200b0c0: 90 04 60 3c add %l1, 0x3c, %o0
200b0c4: 92 10 20 00 clr %o1
200b0c8: 15 00 00 04 sethi %hi(0x1000), %o2
200b0cc: 7f ff f3 a2 call 2007f54 <_Thread_queue_Initialize>
200b0d0: 96 10 20 00 clr %o3
THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_JOIN_AT_EXIT,
0
);
_Watchdog_Initialize(
200b0d4: c2 06 60 08 ld [ %i1 + 8 ], %g1
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
200b0d8: f2 24 60 c0 st %i1, [ %l1 + 0xc0 ]
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
200b0dc: c2 24 60 bc st %g1, [ %l1 + 0xbc ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
200b0e0: c0 24 60 a4 clr [ %l1 + 0xa4 ]
the_watchdog->routine = routine;
200b0e4: 03 00 80 2c sethi %hi(0x200b000), %g1
the_watchdog->id = id;
the_watchdog->user_data = user_data;
200b0e8: b0 10 20 01 mov 1, %i0
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
200b0ec: 82 10 61 4c or %g1, 0x14c, %g1
200b0f0: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ]
created->Object.id,
created
);
return true;
}
200b0f4: 81 c7 e0 08 ret
200b0f8: 81 e8 00 00 restore
02006540 <_POSIX_Threads_Initialize_user_threads_body>:
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body( void )
{
2006540: 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;
2006544: 03 00 80 6f sethi %hi(0x201bc00), %g1
2006548: e4 00 62 70 ld [ %g1 + 0x270 ], %l2 ! 201be70 <_POSIX_Threads_User_initialization_threads>
maximum = _POSIX_Threads_Number_of_initialization_threads;
200654c: 03 00 80 6f sethi %hi(0x201bc00), %g1
if ( !user_threads || maximum == 0 )
2006550: 80 a4 a0 00 cmp %l2, 0
2006554: 02 80 00 22 be 20065dc <_POSIX_Threads_Initialize_user_threads_body+0x9c><== NEVER TAKEN
2006558: e8 00 63 28 ld [ %g1 + 0x328 ], %l4
200655c: 80 a5 20 00 cmp %l4, 0
2006560: 02 80 00 1f be 20065dc <_POSIX_Threads_Initialize_user_threads_body+0x9c><== NEVER TAKEN
2006564: a2 10 20 00 clr %l1
return;
2006568: a0 10 20 00 clr %l0
for ( index=0 ; index < maximum ; index++ ) {
/*
* There is no way for these calls to fail in this situation.
*/
(void) pthread_attr_init( &attr );
200656c: a6 07 bf bc add %fp, -68, %l3
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
status = pthread_create(
2006570: 10 80 00 18 b 20065d0 <_POSIX_Threads_Initialize_user_threads_body+0x90>
2006574: aa 07 bf f4 add %fp, -12, %l5
for ( index=0 ; index < maximum ; index++ ) {
/*
* There is no way for these calls to fail in this situation.
*/
(void) pthread_attr_init( &attr );
2006578: 40 00 1b 3b call 200d264 <pthread_attr_init>
200657c: 90 10 00 13 mov %l3, %o0
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
2006580: 92 10 20 02 mov 2, %o1
2006584: 40 00 1b 43 call 200d290 <pthread_attr_setinheritsched>
2006588: 90 10 00 13 mov %l3, %o0
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
200658c: 82 04 80 10 add %l2, %l0, %g1
2006590: d2 00 60 04 ld [ %g1 + 4 ], %o1
2006594: 40 00 1b 4f call 200d2d0 <pthread_attr_setstacksize>
2006598: 90 10 00 13 mov %l3, %o0
status = pthread_create(
200659c: d4 04 80 10 ld [ %l2 + %l0 ], %o2
20065a0: 90 10 00 15 mov %l5, %o0
20065a4: 92 10 00 13 mov %l3, %o1
20065a8: 96 10 20 00 clr %o3
20065ac: 7f ff ff 0f call 20061e8 <pthread_create>
20065b0: a0 04 20 08 add %l0, 8, %l0
&thread_id,
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
20065b4: 80 a2 20 00 cmp %o0, 0
20065b8: 22 80 00 06 be,a 20065d0 <_POSIX_Threads_Initialize_user_threads_body+0x90>
20065bc: a2 04 60 01 inc %l1
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, TRUE, status );
20065c0: 94 10 00 08 mov %o0, %o2
20065c4: 92 10 20 01 mov 1, %o1
20065c8: 40 00 08 89 call 20087ec <_Internal_error_Occurred>
20065cc: 90 10 20 02 mov 2, %o0
*
* Setting the attributes explicitly is critical, since we don't want
* to inherit the idle tasks attributes.
*/
for ( index=0 ; index < maximum ; index++ ) {
20065d0: 80 a4 40 14 cmp %l1, %l4
20065d4: 0a bf ff e9 bcs 2006578 <_POSIX_Threads_Initialize_user_threads_body+0x38>
20065d8: 01 00 00 00 nop
20065dc: 81 c7 e0 08 ret
20065e0: 81 e8 00 00 restore
0200b14c <_POSIX_Threads_Sporadic_budget_TSR>:
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id,
void *argument
)
{
200b14c: 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 ];
200b150: f0 06 61 6c ld [ %i1 + 0x16c ], %i0
ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget );
200b154: 40 00 04 04 call 200c164 <_Timespec_To_ticks>
200b158: 90 06 20 90 add %i0, 0x90, %o0
if ( !ticks )
200b15c: 80 a2 20 00 cmp %o0, 0
200b160: 22 80 00 02 be,a 200b168 <_POSIX_Threads_Sporadic_budget_TSR+0x1c><== NEVER TAKEN
200b164: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
200b168: 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 ||
200b16c: c6 06 60 1c ld [ %i1 + 0x1c ], %g3
200b170: 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;
200b174: d0 26 60 78 st %o0, [ %i1 + 0x78 ]
200b178: 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 ||
200b17c: 80 a0 e0 00 cmp %g3, 0
200b180: 02 80 00 06 be 200b198 <_POSIX_Threads_Sporadic_budget_TSR+0x4c>
200b184: d2 26 60 18 st %o1, [ %i1 + 0x18 ]
200b188: c2 06 60 14 ld [ %i1 + 0x14 ], %g1
200b18c: 80 a0 40 09 cmp %g1, %o1
200b190: 08 80 00 05 bleu 200b1a4 <_POSIX_Threads_Sporadic_budget_TSR+0x58><== NEVER TAKEN
200b194: 01 00 00 00 nop
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, TRUE );
200b198: 90 10 00 19 mov %i1, %o0
200b19c: 7f ff ef d1 call 20070e0 <_Thread_Change_priority>
200b1a0: 94 10 20 01 mov 1, %o2
ticks = _Timespec_To_ticks( &api->schedparam.ss_replenish_period );
200b1a4: 40 00 03 f0 call 200c164 <_Timespec_To_ticks>
200b1a8: 90 06 20 88 add %i0, 0x88, %o0
if ( !ticks )
200b1ac: 80 a2 20 00 cmp %o0, 0
200b1b0: 22 80 00 02 be,a 200b1b8 <_POSIX_Threads_Sporadic_budget_TSR+0x6c><== NEVER TAKEN
200b1b4: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
200b1b8: d0 26 20 a8 st %o0, [ %i0 + 0xa8 ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
200b1bc: b2 06 20 9c add %i0, 0x9c, %i1
200b1c0: 31 00 80 5e sethi %hi(0x2017800), %i0
200b1c4: 7f ff f5 cb call 20088f0 <_Watchdog_Insert>
200b1c8: 91 ee 21 04 restore %i0, 0x104, %o0
0200b0fc <_POSIX_Threads_Sporadic_budget_callout>:
)
{
POSIX_API_Control *api;
uint32_t new_priority;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
200b0fc: c2 02 21 6c ld [ %o0 + 0x16c ], %g1
the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */
new_priority = _POSIX_Priority_To_core( api->schedparam.ss_low_priority );
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
200b100: c6 02 20 1c ld [ %o0 + 0x1c ], %g3
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (255 - priority);
200b104: c4 00 60 84 ld [ %g1 + 0x84 ], %g2
* This will prevent the thread from consuming its entire "budget"
* while at low priority.
*/
the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */
200b108: 82 10 3f ff mov -1, %g1
200b10c: c2 22 20 78 st %g1, [ %o0 + 0x78 ]
200b110: 82 10 20 ff mov 0xff, %g1
200b114: 92 20 40 02 sub %g1, %g2, %o1
new_priority = _POSIX_Priority_To_core( api->schedparam.ss_low_priority );
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
200b118: 80 a0 e0 00 cmp %g3, 0
200b11c: 02 80 00 06 be 200b134 <_POSIX_Threads_Sporadic_budget_callout+0x38><== ALWAYS TAKEN
200b120: d2 22 20 18 st %o1, [ %o0 + 0x18 ]
200b124: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 <== NOT EXECUTED
200b128: 80 a0 40 09 cmp %g1, %o1 <== NOT EXECUTED
200b12c: 08 80 00 06 bleu 200b144 <_POSIX_Threads_Sporadic_budget_callout+0x48><== NOT EXECUTED
200b130: 01 00 00 00 nop <== NOT EXECUTED
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, TRUE );
200b134: 94 10 20 01 mov 1, %o2 ! 1 <PROM_START+0x1>
200b138: 82 13 c0 00 mov %o7, %g1
200b13c: 7f ff ef e9 call 20070e0 <_Thread_Change_priority>
200b140: 9e 10 40 00 mov %g1, %o7
200b144: 81 c3 e0 08 retl <== NOT EXECUTED
0200c728 <_POSIX_Threads_cancel_run>:
#include <rtems/posix/threadsup.h>
void _POSIX_Threads_cancel_run(
Thread_Control *the_thread
)
{
200c728: 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 ];
200c72c: f0 06 21 6c ld [ %i0 + 0x16c ], %i0
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
200c730: 82 10 20 01 mov 1, %g1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
200c734: a2 06 20 dc add %i0, 0xdc, %l1
200c738: 10 80 00 10 b 200c778 <_POSIX_Threads_cancel_run+0x50>
200c73c: c2 26 20 cc st %g1, [ %i0 + 0xcc ]
while ( !_Chain_Is_empty( handler_stack ) ) {
_ISR_Disable( level );
200c740: 7f ff d5 8b call 2001d6c <sparc_disable_interrupts> <== NOT EXECUTED
200c744: 01 00 00 00 nop <== NOT EXECUTED
handler = (POSIX_Cancel_Handler_control *)
200c748: e0 04 60 04 ld [ %l1 + 4 ], %l0 <== NOT EXECUTED
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
200c74c: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED
previous = the_node->previous;
200c750: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED
next->previous = previous;
previous->next = next;
200c754: 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;
200c758: c2 20 a0 04 st %g1, [ %g2 + 4 ] <== NOT EXECUTED
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
200c75c: 7f ff d5 88 call 2001d7c <sparc_enable_interrupts> <== NOT EXECUTED
200c760: 01 00 00 00 nop <== NOT EXECUTED
(*handler->routine)( handler->arg );
200c764: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED
200c768: 9f c0 40 00 call %g1 <== NOT EXECUTED
200c76c: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED
_Workspace_Free( handler );
200c770: 7f ff f1 0e call 2008ba8 <_Workspace_Free> <== NOT EXECUTED
200c774: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
while ( !_Chain_Is_empty( handler_stack ) ) {
200c778: c2 06 20 d8 ld [ %i0 + 0xd8 ], %g1
200c77c: 80 a0 40 11 cmp %g1, %l1
200c780: 12 bf ff f0 bne 200c740 <_POSIX_Threads_cancel_run+0x18> <== NEVER TAKEN
200c784: 01 00 00 00 nop
(*handler->routine)( handler->arg );
_Workspace_Free( handler );
}
}
200c788: 81 c7 e0 08 ret
200c78c: 81 e8 00 00 restore
0200d4f4 <_POSIX_Timer_Insert_helper>:
Watchdog_Interval ticks,
Objects_Id id,
Watchdog_Service_routine_entry TSR,
void *arg
)
{
200d4f4: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
(void) _Watchdog_Remove( timer );
200d4f8: 7f ff f5 38 call 200a9d8 <_Watchdog_Remove>
200d4fc: 90 10 00 18 mov %i0, %o0
_ISR_Disable( level );
200d500: 7f ff d5 13 call 200294c <sparc_disable_interrupts>
200d504: 01 00 00 00 nop
200d508: 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 ) {
200d50c: c2 06 20 08 ld [ %i0 + 8 ], %g1
200d510: 80 a0 60 00 cmp %g1, 0
200d514: 22 80 00 06 be,a 200d52c <_POSIX_Timer_Insert_helper+0x38><== ALWAYS TAKEN
200d518: f6 26 20 1c st %i3, [ %i0 + 0x1c ]
_ISR_Enable( level );
200d51c: 7f ff d5 10 call 200295c <sparc_enable_interrupts> <== NOT EXECUTED
200d520: b0 10 20 00 clr %i0 <== NOT EXECUTED
200d524: 81 c7 e0 08 ret <== NOT EXECUTED
200d528: 81 e8 00 00 restore <== NOT EXECUTED
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
200d52c: f4 26 20 20 st %i2, [ %i0 + 0x20 ]
the_watchdog->user_data = user_data;
200d530: f8 26 20 24 st %i4, [ %i0 + 0x24 ]
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
200d534: f2 26 20 0c st %i1, [ %i0 + 0xc ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
200d538: c0 26 20 08 clr [ %i0 + 8 ]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
200d53c: 92 10 00 18 mov %i0, %o1
200d540: 11 00 80 70 sethi %hi(0x201c000), %o0
200d544: 7f ff f4 cb call 200a870 <_Watchdog_Insert>
200d548: 90 12 23 84 or %o0, 0x384, %o0 ! 201c384 <_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 );
200d54c: b0 10 20 01 mov 1, %i0
200d550: 7f ff d5 03 call 200295c <sparc_enable_interrupts>
200d554: 90 10 00 10 mov %l0, %o0
return true;
}
200d558: 81 c7 e0 08 ret
200d55c: 81 e8 00 00 restore
02006ae4 <_POSIX_Timer_TSR>:
/*
* This is the operation that is run when a timer expires
*/
void _POSIX_Timer_TSR(Objects_Id timer, void *data)
{
2006ae4: 9d e3 bf 98 save %sp, -104, %sp
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
2006ae8: c2 06 60 68 ld [ %i1 + 0x68 ], %g1
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
2006aec: c4 06 60 54 ld [ %i1 + 0x54 ], %g2
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
2006af0: 82 00 60 01 inc %g1
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
2006af4: 80 a0 a0 00 cmp %g2, 0
2006af8: 12 80 00 06 bne 2006b10 <_POSIX_Timer_TSR+0x2c> <== ALWAYS TAKEN
2006afc: c2 26 60 68 st %g1, [ %i1 + 0x68 ]
2006b00: c2 06 60 58 ld [ %i1 + 0x58 ], %g1 <== NOT EXECUTED
2006b04: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2006b08: 02 80 00 0f be 2006b44 <_POSIX_Timer_TSR+0x60> <== NOT EXECUTED
2006b0c: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
activated = _POSIX_Timer_Insert_helper(
2006b10: d2 06 60 64 ld [ %i1 + 0x64 ], %o1
2006b14: d4 06 60 08 ld [ %i1 + 8 ], %o2
2006b18: 90 06 60 10 add %i1, 0x10, %o0
2006b1c: 17 00 80 1a sethi %hi(0x2006800), %o3
2006b20: 98 10 00 19 mov %i1, %o4
2006b24: 40 00 1a 74 call 200d4f4 <_POSIX_Timer_Insert_helper>
2006b28: 96 12 e2 e4 or %o3, 0x2e4, %o3
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
2006b2c: 80 8a 20 ff btst 0xff, %o0
2006b30: 02 80 00 0a be 2006b58 <_POSIX_Timer_TSR+0x74> <== NEVER TAKEN
2006b34: 01 00 00 00 nop
return;
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
2006b38: 40 00 05 e9 call 20082dc <_TOD_Get>
2006b3c: 90 06 60 6c add %i1, 0x6c, %o0
2006b40: 82 10 20 03 mov 3, %g1
/*
* The sending of the signal to the process running the handling function
* specified for that signal is simulated
*/
if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) {
2006b44: d0 06 60 38 ld [ %i1 + 0x38 ], %o0
2006b48: d2 06 60 44 ld [ %i1 + 0x44 ], %o1
2006b4c: 40 00 19 90 call 200d18c <pthread_kill>
2006b50: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ]
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
2006b54: c0 26 60 68 clr [ %i1 + 0x68 ]
2006b58: 81 c7 e0 08 ret
2006b5c: 81 e8 00 00 restore
0200c864 <_POSIX_signals_Check_signal>:
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
200c864: 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,
200c868: 98 10 20 01 mov 1, %o4
200c86c: 96 0e a0 ff and %i2, 0xff, %o3
200c870: a0 07 bf ec add %fp, -20, %l0
200c874: 90 10 00 18 mov %i0, %o0
200c878: 92 10 00 19 mov %i1, %o1
200c87c: 40 00 00 23 call 200c908 <_POSIX_signals_Clear_signals>
200c880: 94 10 00 10 mov %l0, %o2
200c884: 80 8a 20 ff btst 0xff, %o0
200c888: 02 80 00 1e be 200c900 <_POSIX_signals_Check_signal+0x9c>
200c88c: 03 00 80 5f sethi %hi(0x2017c00), %g1
#endif
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
200c890: 85 2e 60 02 sll %i1, 2, %g2
200c894: 9a 10 61 f0 or %g1, 0x1f0, %o5
200c898: 83 2e 60 04 sll %i1, 4, %g1
200c89c: 84 20 40 02 sub %g1, %g2, %g2
200c8a0: 86 03 40 02 add %o5, %g2, %g3
200c8a4: c8 00 e0 08 ld [ %g3 + 8 ], %g4
200c8a8: 80 a1 20 01 cmp %g4, 1
200c8ac: 02 80 00 15 be 200c900 <_POSIX_signals_Check_signal+0x9c> <== NEVER TAKEN
200c8b0: 01 00 00 00 nop
return false;
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
200c8b4: f4 06 20 c4 ld [ %i0 + 0xc4 ], %i2
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
200c8b8: c2 00 e0 04 ld [ %g3 + 4 ], %g1
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
200c8bc: c4 03 40 02 ld [ %o5 + %g2 ], %g2
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
200c8c0: 82 10 40 1a or %g1, %i2, %g1
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
200c8c4: 80 a0 a0 02 cmp %g2, 2
200c8c8: 12 80 00 09 bne 200c8ec <_POSIX_signals_Check_signal+0x88>
200c8cc: c2 26 20 c4 st %g1, [ %i0 + 0xc4 ]
case SA_SIGINFO:
(*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
200c8d0: c2 00 e0 08 ld [ %g3 + 8 ], %g1
200c8d4: 90 10 00 19 mov %i1, %o0
200c8d8: 92 10 00 10 mov %l0, %o1
200c8dc: 9f c0 40 00 call %g1
200c8e0: 94 10 20 00 clr %o2
}
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
200c8e4: 10 80 00 05 b 200c8f8 <_POSIX_signals_Check_signal+0x94>
200c8e8: f4 26 20 c4 st %i2, [ %i0 + 0xc4 ]
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
default:
(*_POSIX_signals_Vectors[ signo ].sa_handler)( signo );
200c8ec: 9f c1 00 00 call %g4
200c8f0: 90 10 00 19 mov %i1, %o0
}
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
200c8f4: f4 26 20 c4 st %i2, [ %i0 + 0xc4 ]
200c8f8: 81 c7 e0 08 ret
200c8fc: 91 e8 20 01 restore %g0, 1, %o0
return true;
}
200c900: 81 c7 e0 08 ret
200c904: 91 e8 20 00 restore %g0, 0, %o0
0200d034 <_POSIX_signals_Clear_process_signals>:
*/
void _POSIX_signals_Clear_process_signals(
sigset_t mask
)
{
200d034: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
_ISR_Disable( level );
200d038: 7f ff d3 4d call 2001d6c <sparc_disable_interrupts>
200d03c: 01 00 00 00 nop
_POSIX_signals_Pending &= ~mask;
200d040: 05 00 80 5f sethi %hi(0x2017c00), %g2
200d044: c2 00 a3 bc ld [ %g2 + 0x3bc ], %g1 ! 2017fbc <_POSIX_signals_Pending>
200d048: b0 28 40 18 andn %g1, %i0, %i0
if ( !_POSIX_signals_Pending )
200d04c: 80 a6 20 00 cmp %i0, 0
200d050: 12 80 00 06 bne 200d068 <_POSIX_signals_Clear_process_signals+0x34><== NEVER TAKEN
200d054: f0 20 a3 bc st %i0, [ %g2 + 0x3bc ]
_Thread_Do_post_task_switch_extension--;
200d058: 05 00 80 5e sethi %hi(0x2017800), %g2
200d05c: c2 00 a0 c8 ld [ %g2 + 0xc8 ], %g1 ! 20178c8 <_Thread_Do_post_task_switch_extension>
200d060: 82 00 7f ff add %g1, -1, %g1
200d064: c2 20 a0 c8 st %g1, [ %g2 + 0xc8 ]
_ISR_Enable( level );
200d068: 7f ff d3 45 call 2001d7c <sparc_enable_interrupts>
200d06c: 91 e8 00 08 restore %g0, %o0, %o0
0200c908 <_POSIX_signals_Clear_signals>:
int signo,
siginfo_t *info,
bool is_global,
bool check_blocked
)
{
200c908: 9d e3 bf 98 save %sp, -104, %sp
sigset_t signals_blocked;
ISR_Level level;
bool do_callout;
POSIX_signals_Siginfo_node *psiginfo;
mask = signo_to_mask( signo );
200c90c: 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 )
200c910: 80 8f 20 ff btst 0xff, %i4
sigset_t signals_blocked;
ISR_Level level;
bool do_callout;
POSIX_signals_Siginfo_node *psiginfo;
mask = signo_to_mask( signo );
200c914: 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 )
200c918: b8 10 3f ff mov -1, %i4
200c91c: 02 80 00 04 be 200c92c <_POSIX_signals_Clear_signals+0x24>
200c920: a1 28 40 02 sll %g1, %g2, %l0
signals_blocked = ~api->signals_blocked;
200c924: c2 06 20 c4 ld [ %i0 + 0xc4 ], %g1
200c928: 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 );
200c92c: 7f ff d5 10 call 2001d6c <sparc_disable_interrupts>
200c930: 01 00 00 00 nop
200c934: a2 10 00 08 mov %o0, %l1
if ( is_global ) {
200c938: 80 8e e0 ff btst 0xff, %i3
200c93c: 22 80 00 35 be,a 200ca10 <_POSIX_signals_Clear_signals+0x108>
200c940: c4 06 20 c8 ld [ %i0 + 0xc8 ], %g2
if ( mask & (_POSIX_signals_Pending & signals_blocked) ) {
200c944: 03 00 80 5f sethi %hi(0x2017c00), %g1
200c948: c2 00 63 bc ld [ %g1 + 0x3bc ], %g1 ! 2017fbc <_POSIX_signals_Pending>
200c94c: 82 0c 00 01 and %l0, %g1, %g1
200c950: 80 88 40 1c btst %g1, %i4
200c954: 02 80 00 35 be 200ca28 <_POSIX_signals_Clear_signals+0x120>
200c958: 83 2e 60 02 sll %i1, 2, %g1
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
200c95c: 85 2e 60 04 sll %i1, 4, %g2
200c960: 84 20 80 01 sub %g2, %g1, %g2
200c964: 03 00 80 5f sethi %hi(0x2017c00), %g1
200c968: 82 10 61 f0 or %g1, 0x1f0, %g1 ! 2017df0 <_POSIX_signals_Vectors>
200c96c: c2 00 40 02 ld [ %g1 + %g2 ], %g1
200c970: 80 a0 60 02 cmp %g1, 2
200c974: 12 80 00 23 bne 200ca00 <_POSIX_signals_Clear_signals+0xf8>
200c978: 03 00 80 5f sethi %hi(0x2017c00), %g1
psiginfo = (POSIX_signals_Siginfo_node *)
200c97c: 88 10 63 c0 or %g1, 0x3c0, %g4 ! 2017fc0 <_POSIX_signals_Siginfo>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
200c980: f8 00 80 04 ld [ %g2 + %g4 ], %i4
200c984: 86 00 80 04 add %g2, %g4, %g3
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
200c988: 9a 00 e0 04 add %g3, 4, %o5
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
200c98c: 80 a7 00 0d cmp %i4, %o5
200c990: 32 80 00 04 bne,a 200c9a0 <_POSIX_signals_Clear_signals+0x98><== ALWAYS TAKEN
200c994: c2 07 00 00 ld [ %i4 ], %g1
200c998: 10 80 00 04 b 200c9a8 <_POSIX_signals_Clear_signals+0xa0> <== NOT EXECUTED
200c99c: b8 10 20 00 clr %i4 <== NOT EXECUTED
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
the_chain->first = new_first;
200c9a0: c2 20 80 04 st %g1, [ %g2 + %g4 ]
new_first->previous = _Chain_Head(the_chain);
200c9a4: c6 20 60 04 st %g3, [ %g1 + 4 ]
_Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] );
if ( _Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
200c9a8: c2 00 80 04 ld [ %g2 + %g4 ], %g1
200c9ac: 80 a0 40 0d cmp %g1, %o5
200c9b0: 12 80 00 05 bne 200c9c4 <_POSIX_signals_Clear_signals+0xbc><== NEVER TAKEN
200c9b4: 80 a7 20 00 cmp %i4, 0
_POSIX_signals_Clear_process_signals( mask );
200c9b8: 40 00 01 9f call 200d034 <_POSIX_signals_Clear_process_signals>
200c9bc: 90 10 00 10 mov %l0, %o0
if ( psiginfo ) {
200c9c0: 80 a7 20 00 cmp %i4, 0
200c9c4: 02 80 00 1a be 200ca2c <_POSIX_signals_Clear_signals+0x124><== NEVER TAKEN
200c9c8: b0 10 20 01 mov 1, %i0
*info = psiginfo->Info;
200c9cc: 90 10 00 1a mov %i2, %o0
200c9d0: 92 07 20 08 add %i4, 8, %o1
200c9d4: 40 00 03 a2 call 200d85c <memcpy>
200c9d8: 94 10 20 0c mov 0xc, %o2
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
200c9dc: 03 00 80 5f sethi %hi(0x2017c00), %g1
200c9e0: 82 10 63 74 or %g1, 0x374, %g1 ! 2017f74 <_POSIX_signals_Inactive_siginfo+0x4>
200c9e4: c2 27 00 00 st %g1, [ %i4 ]
old_last_node = the_chain->last;
200c9e8: 82 00 7f fc add %g1, -4, %g1
200c9ec: c4 00 60 08 ld [ %g1 + 8 ], %g2
the_chain->last = the_node;
200c9f0: f8 20 60 08 st %i4, [ %g1 + 8 ]
old_last_node->next = the_node;
the_node->previous = old_last_node;
200c9f4: c4 27 20 04 st %g2, [ %i4 + 4 ]
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
200c9f8: 10 80 00 04 b 200ca08 <_POSIX_signals_Clear_signals+0x100>
200c9fc: f8 20 80 00 st %i4, [ %g2 ]
&psiginfo->Node
);
} else
do_callout = false;
} else
_POSIX_signals_Clear_process_signals( mask );
200ca00: 40 00 01 8d call 200d034 <_POSIX_signals_Clear_process_signals>
200ca04: 90 10 00 10 mov %l0, %o0
200ca08: 10 80 00 09 b 200ca2c <_POSIX_signals_Clear_signals+0x124>
200ca0c: b0 10 20 01 mov 1, %i0
do_callout = true;
}
} else {
if ( mask & (api->signals_pending & signals_blocked) ) {
200ca10: 82 0c 00 02 and %l0, %g2, %g1
200ca14: 80 88 40 1c btst %g1, %i4
200ca18: 02 80 00 04 be 200ca28 <_POSIX_signals_Clear_signals+0x120>
200ca1c: 82 28 80 10 andn %g2, %l0, %g1
api->signals_pending &= ~mask;
200ca20: 10 bf ff fa b 200ca08 <_POSIX_signals_Clear_signals+0x100>
200ca24: c2 26 20 c8 st %g1, [ %i0 + 0xc8 ]
200ca28: b0 10 20 00 clr %i0
do_callout = true;
}
}
_ISR_Enable( level );
200ca2c: 7f ff d4 d4 call 2001d7c <sparc_enable_interrupts>
200ca30: 90 10 00 11 mov %l1, %o0
return do_callout;
}
200ca34: 81 c7 e0 08 ret
200ca38: 81 e8 00 00 restore
02005f90 <_POSIX_signals_Get_highest>:
#include <rtems/score/isr.h>
int _POSIX_signals_Get_highest(
sigset_t set
)
{
2005f90: 86 10 00 08 mov %o0, %g3
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) )
2005f94: 84 10 20 01 mov 1, %g2
#include <rtems/score/isr.h>
int _POSIX_signals_Get_highest(
sigset_t set
)
{
2005f98: 90 10 20 1b mov 0x1b, %o0
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) )
2005f9c: 82 02 3f ff add %o0, -1, %g1
2005fa0: 83 28 80 01 sll %g2, %g1, %g1
2005fa4: 80 88 40 03 btst %g1, %g3
2005fa8: 12 80 00 12 bne 2005ff0 <_POSIX_signals_Get_highest+0x60> <== NEVER TAKEN
2005fac: 01 00 00 00 nop
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
2005fb0: 90 02 20 01 inc %o0
2005fb4: 80 a2 20 20 cmp %o0, 0x20
2005fb8: 12 bf ff fa bne 2005fa0 <_POSIX_signals_Get_highest+0x10>
2005fbc: 82 02 3f ff add %o0, -1, %g1
2005fc0: 90 10 20 01 mov 1, %o0
}
/* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
if ( set & signo_to_mask( signo ) )
2005fc4: 84 10 20 01 mov 1, %g2
2005fc8: 82 02 3f ff add %o0, -1, %g1
2005fcc: 83 28 80 01 sll %g2, %g1, %g1
2005fd0: 80 88 40 03 btst %g1, %g3
2005fd4: 12 80 00 07 bne 2005ff0 <_POSIX_signals_Get_highest+0x60>
2005fd8: 01 00 00 00 nop
return signo;
}
/* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
2005fdc: 90 02 20 01 inc %o0
2005fe0: 80 a2 20 1b cmp %o0, 0x1b
2005fe4: 12 bf ff fa bne 2005fcc <_POSIX_signals_Get_highest+0x3c> <== ALWAYS TAKEN
2005fe8: 82 02 3f ff add %o0, -1, %g1
2005fec: 90 10 20 00 clr %o0 <== NOT EXECUTED
if ( set & signo_to_mask( signo ) )
return signo;
}
return 0;
}
2005ff0: 81 c3 e0 08 retl
0200adcc <_POSIX_signals_Post_switch_extension>:
*/
void _POSIX_signals_Post_switch_extension(
Thread_Control *the_thread
)
{
200adcc: 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 ];
200add0: e0 06 21 6c ld [ %i0 + 0x16c ], %l0
if ( !api )
200add4: 80 a4 20 00 cmp %l0, 0
200add8: 02 80 00 33 be 200aea4 <_POSIX_signals_Post_switch_extension+0xd8><== NEVER TAKEN
200addc: 03 00 80 5f sethi %hi(0x2017c00), %g1
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
restart:
_ISR_Disable( level );
if ( !(~api->signals_blocked &
200ade0: a2 10 63 bc or %g1, 0x3bc, %l1 ! 2017fbc <_POSIX_signals_Pending>
* The first thing done is to check there are any signals to be
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
restart:
_ISR_Disable( level );
200ade4: 7f ff db e2 call 2001d6c <sparc_disable_interrupts>
200ade8: 01 00 00 00 nop
200adec: b0 10 00 08 mov %o0, %i0
if ( !(~api->signals_blocked &
200adf0: c2 04 40 00 ld [ %l1 ], %g1
200adf4: c4 04 20 c8 ld [ %l0 + 0xc8 ], %g2
200adf8: c6 04 20 c4 ld [ %l0 + 0xc4 ], %g3
200adfc: 82 10 40 02 or %g1, %g2, %g1
200ae00: 80 a8 40 03 andncc %g1, %g3, %g0
200ae04: 12 80 00 04 bne 200ae14 <_POSIX_signals_Post_switch_extension+0x48>
200ae08: 01 00 00 00 nop
(api->signals_pending | _POSIX_signals_Pending)) ) {
_ISR_Enable( level );
200ae0c: 7f ff db dc call 2001d7c <sparc_enable_interrupts>
200ae10: 81 e8 00 00 restore
break;
}
_ISR_Enable( level );
200ae14: 7f ff db da call 2001d7c <sparc_enable_interrupts>
200ae18: b0 10 20 1b mov 0x1b, %i0
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( _POSIX_signals_Check_signal( api, signo, false ) )
200ae1c: 92 10 00 18 mov %i0, %o1
200ae20: 94 10 20 00 clr %o2
200ae24: 40 00 06 90 call 200c864 <_POSIX_signals_Check_signal>
200ae28: 90 10 00 10 mov %l0, %o0
200ae2c: 80 8a 20 ff btst 0xff, %o0
200ae30: 12 bf ff ed bne 200ade4 <_POSIX_signals_Post_switch_extension+0x18><== NEVER TAKEN
200ae34: 92 10 00 18 mov %i0, %o1
goto restart;
if ( _POSIX_signals_Check_signal( api, signo, true ) )
200ae38: 90 10 00 10 mov %l0, %o0
200ae3c: 94 10 20 01 mov 1, %o2
200ae40: 40 00 06 89 call 200c864 <_POSIX_signals_Check_signal>
200ae44: b0 06 20 01 inc %i0
200ae48: 80 8a 20 ff btst 0xff, %o0
200ae4c: 12 bf ff e6 bne 200ade4 <_POSIX_signals_Post_switch_extension+0x18><== NEVER TAKEN
200ae50: 80 a6 20 20 cmp %i0, 0x20
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
200ae54: 12 bf ff f3 bne 200ae20 <_POSIX_signals_Post_switch_extension+0x54>
200ae58: 92 10 00 18 mov %i0, %o1
200ae5c: 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 ) )
200ae60: 92 10 00 18 mov %i0, %o1
200ae64: 94 10 20 00 clr %o2
200ae68: 40 00 06 7f call 200c864 <_POSIX_signals_Check_signal>
200ae6c: 90 10 00 10 mov %l0, %o0
200ae70: 80 8a 20 ff btst 0xff, %o0
200ae74: 12 bf ff dc bne 200ade4 <_POSIX_signals_Post_switch_extension+0x18>
200ae78: 92 10 00 18 mov %i0, %o1
goto restart;
if ( _POSIX_signals_Check_signal( api, signo, true ) )
200ae7c: 90 10 00 10 mov %l0, %o0
200ae80: 94 10 20 01 mov 1, %o2
200ae84: 40 00 06 78 call 200c864 <_POSIX_signals_Check_signal>
200ae88: b0 06 20 01 inc %i0
200ae8c: 80 8a 20 ff btst 0xff, %o0
200ae90: 12 bf ff d5 bne 200ade4 <_POSIX_signals_Post_switch_extension+0x18>
200ae94: 80 a6 20 1b cmp %i0, 0x1b
}
/* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
200ae98: 12 bf ff f3 bne 200ae64 <_POSIX_signals_Post_switch_extension+0x98><== ALWAYS TAKEN
200ae9c: 92 10 00 18 mov %i0, %o1
200aea0: 30 bf ff d1 b,a 200ade4 <_POSIX_signals_Post_switch_extension+0x18><== NOT EXECUTED
200aea4: 81 c7 e0 08 ret <== NOT EXECUTED
200aea8: 81 e8 00 00 restore <== NOT EXECUTED
020189e4 <_POSIX_signals_Unblock_thread>:
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
20189e4: 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 ) ) {
20189e8: c8 06 20 10 ld [ %i0 + 0x10 ], %g4
20189ec: 05 04 00 20 sethi %hi(0x10008000), %g2
sigset_t mask;
siginfo_t *the_info = NULL;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
mask = signo_to_mask( signo );
20189f0: 82 06 7f ff add %i1, -1, %g1
20189f4: 9a 10 20 01 mov 1, %o5
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
20189f8: 92 10 00 1a mov %i2, %o1
sigset_t mask;
siginfo_t *the_info = NULL;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
mask = signo_to_mask( signo );
20189fc: 87 2b 40 01 sll %o5, %g1, %g3
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
2018a00: 82 09 00 02 and %g4, %g2, %g1
2018a04: 80 a0 40 02 cmp %g1, %g2
2018a08: 12 80 00 1a bne 2018a70 <_POSIX_signals_Unblock_thread+0x8c>
2018a0c: c4 06 21 6c ld [ %i0 + 0x16c ], %g2
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
2018a10: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
2018a14: 80 88 c0 01 btst %g3, %g1
2018a18: 12 80 00 06 bne 2018a30 <_POSIX_signals_Unblock_thread+0x4c>
2018a1c: 82 10 20 04 mov 4, %g1
2018a20: c2 00 a0 c4 ld [ %g2 + 0xc4 ], %g1
2018a24: 80 a8 c0 01 andncc %g3, %g1, %g0
2018a28: 02 80 00 38 be 2018b08 <_POSIX_signals_Unblock_thread+0x124><== ALWAYS TAKEN
2018a2c: 82 10 20 04 mov 4, %g1
the_thread->Wait.return_code = EINTR;
2018a30: c2 26 20 34 st %g1, [ %i0 + 0x34 ]
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
2018a34: 80 a2 60 00 cmp %o1, 0
2018a38: 12 80 00 07 bne 2018a54 <_POSIX_signals_Unblock_thread+0x70>
2018a3c: d0 06 20 28 ld [ %i0 + 0x28 ], %o0
the_info->si_signo = signo;
the_info->si_code = SI_USER;
2018a40: 82 10 20 01 mov 1, %g1
the_thread->Wait.return_code = EINTR;
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
2018a44: f2 22 00 00 st %i1, [ %o0 ]
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
2018a48: c0 22 20 08 clr [ %o0 + 8 ]
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
the_info->si_code = SI_USER;
2018a4c: 10 80 00 04 b 2018a5c <_POSIX_signals_Unblock_thread+0x78>
2018a50: c2 22 20 04 st %g1, [ %o0 + 4 ]
the_info->si_value.sival_int = 0;
} else {
*the_info = *info;
2018a54: 7f ff db 0f call 200f690 <memcpy>
2018a58: 94 10 20 0c mov 0xc, %o2
}
_Thread_queue_Extract_with_proxy( the_thread );
2018a5c: 90 10 00 18 mov %i0, %o0
2018a60: 7f ff c3 94 call 20098b0 <_Thread_queue_Extract_with_proxy>
2018a64: b0 10 20 01 mov 1, %i0
2018a68: 81 c7 e0 08 ret
2018a6c: 81 e8 00 00 restore
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
2018a70: c2 00 a0 c4 ld [ %g2 + 0xc4 ], %g1
2018a74: 80 a8 c0 01 andncc %g3, %g1, %g0
2018a78: 02 80 00 24 be 2018b08 <_POSIX_signals_Unblock_thread+0x124>
2018a7c: 03 04 00 00 sethi %hi(0x10000000), %g1
* + Any other combination, do nothing.
*/
the_thread->do_post_task_switch_extension = true;
if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
2018a80: 80 89 00 01 btst %g4, %g1
2018a84: 02 80 00 12 be 2018acc <_POSIX_signals_Unblock_thread+0xe8>
2018a88: da 2e 20 75 stb %o5, [ %i0 + 0x75 ]
the_thread->Wait.return_code = EINTR;
2018a8c: 82 10 20 04 mov 4, %g1
#if 0
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
_Thread_queue_Extract_with_proxy( the_thread );
else
#endif
if ( _States_Is_delaying(the_thread->current_state) ){
2018a90: 80 89 20 08 btst 8, %g4
2018a94: 02 80 00 1d be 2018b08 <_POSIX_signals_Unblock_thread+0x124><== NEVER TAKEN
2018a98: c2 26 20 34 st %g1, [ %i0 + 0x34 ]
if ( _Watchdog_Is_active( &the_thread->Timer ) )
2018a9c: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
2018aa0: 80 a0 60 02 cmp %g1, 2
2018aa4: 12 80 00 05 bne 2018ab8 <_POSIX_signals_Unblock_thread+0xd4><== NEVER TAKEN
2018aa8: 90 10 00 18 mov %i0, %o0
(void) _Watchdog_Remove( &the_thread->Timer );
2018aac: 7f ff c7 ca call 200a9d4 <_Watchdog_Remove>
2018ab0: 90 06 20 48 add %i0, 0x48, %o0
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
2018ab4: 90 10 00 18 mov %i0, %o0
2018ab8: 13 04 00 ff sethi %hi(0x1003fc00), %o1
2018abc: 7f ff c0 57 call 2008c18 <_Thread_Clear_state>
2018ac0: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 <RAM_END+0xdc3fff8>
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_ISR_Signals_to_thread_executing = TRUE;
2018ac4: 81 c7 e0 08 ret
2018ac8: 91 e8 20 00 restore %g0, 0, %o0
if ( _States_Is_delaying(the_thread->current_state) ){
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer );
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
2018acc: 80 a1 20 00 cmp %g4, 0
2018ad0: 12 80 00 0e bne 2018b08 <_POSIX_signals_Unblock_thread+0x124><== NEVER TAKEN
2018ad4: 03 00 80 90 sethi %hi(0x2024000), %g1
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
2018ad8: c2 00 63 00 ld [ %g1 + 0x300 ], %g1 ! 2024300 <_ISR_Nest_level>
2018adc: 80 a0 60 00 cmp %g1, 0
2018ae0: 02 80 00 0a be 2018b08 <_POSIX_signals_Unblock_thread+0x124>
2018ae4: 03 00 80 90 sethi %hi(0x2024000), %g1
2018ae8: c2 00 63 24 ld [ %g1 + 0x324 ], %g1 ! 2024324 <_Thread_Executing>
2018aec: 80 a6 00 01 cmp %i0, %g1
2018af0: 12 bf ff de bne 2018a68 <_POSIX_signals_Unblock_thread+0x84><== NEVER TAKEN
2018af4: b0 10 20 00 clr %i0
_ISR_Signals_to_thread_executing = TRUE;
2018af8: 03 00 80 90 sethi %hi(0x2024000), %g1
2018afc: da 28 63 b8 stb %o5, [ %g1 + 0x3b8 ] ! 20243b8 <_ISR_Signals_to_thread_executing>
2018b00: 81 c7 e0 08 ret
2018b04: 81 e8 00 00 restore
2018b08: b0 10 20 00 clr %i0
}
}
return false;
}
2018b0c: 81 c7 e0 08 ret
2018b10: 81 e8 00 00 restore
020099fc <_Protected_heap_Get_information>:
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
20099fc: 9d e3 bf 98 save %sp, -104, %sp
Heap_Get_information_status status;
if ( !the_heap )
2009a00: 80 a6 20 00 cmp %i0, 0
2009a04: 02 80 00 10 be 2009a44 <_Protected_heap_Get_information+0x48><== NEVER TAKEN
2009a08: 80 a6 60 00 cmp %i1, 0
return false;
if ( !the_info )
2009a0c: 02 80 00 0e be 2009a44 <_Protected_heap_Get_information+0x48><== NEVER TAKEN
2009a10: 23 00 80 76 sethi %hi(0x201d800), %l1
return false;
_RTEMS_Lock_allocator();
2009a14: 7f ff f9 87 call 2008030 <_API_Mutex_Lock>
2009a18: d0 04 60 ec ld [ %l1 + 0xec ], %o0 ! 201d8ec <_RTEMS_Allocator_Mutex>
status = _Heap_Get_information( the_heap, the_info );
2009a1c: 90 10 00 18 mov %i0, %o0
2009a20: 40 00 12 65 call 200e3b4 <_Heap_Get_information>
2009a24: 92 10 00 19 mov %i1, %o1
2009a28: a0 10 00 08 mov %o0, %l0
_RTEMS_Unlock_allocator();
2009a2c: 7f ff f9 97 call 2008088 <_API_Mutex_Unlock>
2009a30: d0 04 60 ec ld [ %l1 + 0xec ], %o0
if ( status == HEAP_GET_INFORMATION_SUCCESSFUL )
2009a34: 80 a0 00 10 cmp %g0, %l0
2009a38: 82 60 3f ff subx %g0, -1, %g1
2009a3c: 81 c7 e0 08 ret
2009a40: 91 e8 00 01 restore %g0, %g1, %o0
return true;
return false;
}
2009a44: 81 c7 e0 08 ret <== NOT EXECUTED
2009a48: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
0200b5d0 <_RTEMS_tasks_Create_extension>:
bool _RTEMS_tasks_Create_extension(
Thread_Control *executing,
Thread_Control *created
)
{
200b5d0: 9d e3 bf 98 save %sp, -104, %sp
/*
* Notepads must be the last entry in the structure and they
* can be left off if disabled in the configuration.
*/
to_allocate = sizeof( RTEMS_API_Control );
if ( !rtems_configuration_get_notepads_enabled() )
200b5d4: 21 00 80 5e sethi %hi(0x2017800), %l0
200b5d8: c2 04 20 bc ld [ %l0 + 0xbc ], %g1 ! 20178bc <_Configuration_Table>
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
if ( !api )
200b5dc: b0 10 20 00 clr %i0
/*
* Notepads must be the last entry in the structure and they
* can be left off if disabled in the configuration.
*/
to_allocate = sizeof( RTEMS_API_Control );
if ( !rtems_configuration_get_notepads_enabled() )
200b5e0: c2 00 60 40 ld [ %g1 + 0x40 ], %g1
200b5e4: c2 08 60 04 ldub [ %g1 + 4 ], %g1
200b5e8: 80 a0 00 01 cmp %g0, %g1
200b5ec: 90 60 20 00 subx %g0, 0, %o0
200b5f0: 90 0a 20 40 and %o0, 0x40, %o0
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
200b5f4: 7f ff f5 74 call 2008bc4 <_Workspace_Allocate>
200b5f8: 90 02 20 20 add %o0, 0x20, %o0
if ( !api )
200b5fc: 80 a2 20 00 cmp %o0, 0
200b600: 02 80 00 17 be 200b65c <_RTEMS_tasks_Create_extension+0x8c><== NEVER TAKEN
200b604: c2 04 20 bc ld [ %l0 + 0xbc ], %g1
created->API_Extensions[ THREAD_API_RTEMS ] = api;
api->pending_events = EVENT_SETS_NONE_PENDING;
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
200b608: c0 26 61 78 clr [ %i1 + 0x178 ]
if ( rtems_configuration_get_notepads_enabled() ) {
200b60c: c4 00 60 40 ld [ %g1 + 0x40 ], %g2
*/
RTEMS_INLINE_ROUTINE void _ASR_Initialize (
ASR_Information *information
)
{
information->is_enabled = true;
200b610: 82 10 20 01 mov 1, %g1
200b614: c2 2a 20 08 stb %g1, [ %o0 + 8 ]
200b618: c2 08 a0 04 ldub [ %g2 + 4 ], %g1
api = _Workspace_Allocate( to_allocate );
if ( !api )
return false;
created->API_Extensions[ THREAD_API_RTEMS ] = api;
200b61c: d0 26 61 68 st %o0, [ %i1 + 0x168 ]
api->pending_events = EVENT_SETS_NONE_PENDING;
200b620: c0 22 00 00 clr [ %o0 ]
information->handler = NULL;
200b624: c0 22 20 0c clr [ %o0 + 0xc ]
information->mode_set = RTEMS_DEFAULT_MODES;
200b628: c0 22 20 10 clr [ %o0 + 0x10 ]
information->signals_posted = 0;
200b62c: c0 22 20 14 clr [ %o0 + 0x14 ]
information->signals_pending = 0;
200b630: c0 22 20 18 clr [ %o0 + 0x18 ]
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
if ( rtems_configuration_get_notepads_enabled() ) {
200b634: 80 a0 60 00 cmp %g1, 0
200b638: 02 80 00 08 be 200b658 <_RTEMS_tasks_Create_extension+0x88>
200b63c: c0 22 20 1c clr [ %o0 + 0x1c ]
200b640: 84 10 20 00 clr %g2
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
200b644: 82 02 00 02 add %o0, %g2, %g1
200b648: 84 00 a0 04 add %g2, 4, %g2
api->pending_events = EVENT_SETS_NONE_PENDING;
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
if ( rtems_configuration_get_notepads_enabled() ) {
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
200b64c: 80 a0 a0 40 cmp %g2, 0x40
200b650: 12 bf ff fd bne 200b644 <_RTEMS_tasks_Create_extension+0x74>
200b654: c0 20 60 20 clr [ %g1 + 0x20 ]
200b658: b0 10 20 01 mov 1, %i0
api->Notepads[i] = 0;
}
return true;
}
200b65c: 81 c7 e0 08 ret
200b660: 81 e8 00 00 restore
02005898 <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
2005898: 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;
200589c: 03 00 80 5e sethi %hi(0x2017800), %g1
20058a0: c2 00 60 bc ld [ %g1 + 0xbc ], %g1 ! 20178bc <_Configuration_Table>
20058a4: c2 00 60 40 ld [ %g1 + 0x40 ], %g1
/*
* NOTE: This is slightly different from the Ada implementation.
*/
user_tasks = api_configuration->User_initialization_tasks_table;
20058a8: d0 00 60 2c ld [ %g1 + 0x2c ], %o0
maximum = api_configuration->number_of_initialization_tasks;
if ( !user_tasks || maximum == 0 )
20058ac: 80 a2 20 00 cmp %o0, 0
20058b0: 02 80 00 20 be 2005930 <_RTEMS_tasks_Initialize_user_tasks_body+0x98><== NEVER TAKEN
20058b4: e4 00 60 28 ld [ %g1 + 0x28 ], %l2
20058b8: 80 a4 a0 00 cmp %l2, 0
20058bc: 02 80 00 1d be 2005930 <_RTEMS_tasks_Initialize_user_tasks_body+0x98><== NEVER TAKEN
20058c0: a0 10 00 08 mov %o0, %l0
return;
20058c4: a2 10 20 00 clr %l1
for ( index=0 ; index < maximum ; index++ ) {
return_value = rtems_task_create(
20058c8: 10 80 00 17 b 2005924 <_RTEMS_tasks_Initialize_user_tasks_body+0x8c>
20058cc: a6 07 bf f4 add %fp, -12, %l3
20058d0: d2 04 20 08 ld [ %l0 + 8 ], %o1
20058d4: d4 04 20 04 ld [ %l0 + 4 ], %o2
20058d8: d6 04 20 14 ld [ %l0 + 0x14 ], %o3
20058dc: d8 04 20 0c ld [ %l0 + 0xc ], %o4
20058e0: 7f ff ff 6a call 2005688 <rtems_task_create>
20058e4: 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 ) )
20058e8: 80 a2 20 00 cmp %o0, 0
20058ec: 12 80 00 0b bne 2005918 <_RTEMS_tasks_Initialize_user_tasks_body+0x80>
20058f0: 94 10 00 08 mov %o0, %o2
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value );
return_value = rtems_task_start(
20058f4: d2 04 20 10 ld [ %l0 + 0x10 ], %o1
20058f8: d4 04 20 18 ld [ %l0 + 0x18 ], %o2
20058fc: d0 07 bf f4 ld [ %fp + -12 ], %o0
2005900: 40 00 00 0e call 2005938 <rtems_task_start>
2005904: a0 04 20 1c add %l0, 0x1c, %l0
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
2005908: 80 a2 20 00 cmp %o0, 0
200590c: 22 80 00 06 be,a 2005924 <_RTEMS_tasks_Initialize_user_tasks_body+0x8c>
2005910: a2 04 60 01 inc %l1
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value );
2005914: 94 10 00 08 mov %o0, %o2
2005918: 92 10 20 01 mov 1, %o1
200591c: 40 00 03 88 call 200673c <_Internal_error_Occurred>
2005920: 90 10 20 01 mov 1, %o0
maximum = api_configuration->number_of_initialization_tasks;
if ( !user_tasks || maximum == 0 )
return;
for ( index=0 ; index < maximum ; index++ ) {
2005924: 80 a4 40 12 cmp %l1, %l2
2005928: 2a bf ff ea bcs,a 20058d0 <_RTEMS_tasks_Initialize_user_tasks_body+0x38>
200592c: d0 04 00 00 ld [ %l0 ], %o0
2005930: 81 c7 e0 08 ret
2005934: 81 e8 00 00 restore
0200b50c <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
200b50c: 9d e3 bf 90 save %sp, -112, %sp
RTEMS_API_Control *api;
ASR_Information *asr;
rtems_signal_set signal_set;
Modes_Control prev_mode;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
200b510: f0 06 21 68 ld [ %i0 + 0x168 ], %i0
if ( !api )
200b514: 80 a6 20 00 cmp %i0, 0
200b518: 02 80 00 1d be 200b58c <_RTEMS_tasks_Post_switch_extension+0x80><== NEVER TAKEN
200b51c: 01 00 00 00 nop
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
200b520: 7f ff da 13 call 2001d6c <sparc_disable_interrupts>
200b524: 01 00 00 00 nop
signal_set = asr->signals_posted;
200b528: e4 06 20 14 ld [ %i0 + 0x14 ], %l2
asr->signals_posted = 0;
200b52c: c0 26 20 14 clr [ %i0 + 0x14 ]
_ISR_Enable( level );
200b530: 7f ff da 13 call 2001d7c <sparc_enable_interrupts>
200b534: 01 00 00 00 nop
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
200b538: 80 a4 a0 00 cmp %l2, 0
200b53c: 02 80 00 14 be 200b58c <_RTEMS_tasks_Post_switch_extension+0x80>
200b540: a2 07 bf f4 add %fp, -12, %l1
return;
asr->nest_level += 1;
200b544: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
200b548: d0 06 20 10 ld [ %i0 + 0x10 ], %o0
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
200b54c: 82 00 60 01 inc %g1
200b550: c2 26 20 1c st %g1, [ %i0 + 0x1c ]
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
200b554: 94 10 00 11 mov %l1, %o2
200b558: 21 00 00 3f sethi %hi(0xfc00), %l0
200b55c: 40 00 05 57 call 200cab8 <rtems_task_mode>
200b560: 92 14 23 ff or %l0, 0x3ff, %o1 ! ffff <PROM_START+0xffff>
(*asr->handler)( signal_set );
200b564: c2 06 20 0c ld [ %i0 + 0xc ], %g1
200b568: 9f c0 40 00 call %g1
200b56c: 90 10 00 12 mov %l2, %o0
asr->nest_level -= 1;
200b570: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
200b574: d0 07 bf f4 ld [ %fp + -12 ], %o0
asr->nest_level += 1;
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
(*asr->handler)( signal_set );
asr->nest_level -= 1;
200b578: 82 00 7f ff add %g1, -1, %g1
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
200b57c: 92 14 23 ff or %l0, 0x3ff, %o1
asr->nest_level += 1;
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
(*asr->handler)( signal_set );
asr->nest_level -= 1;
200b580: c2 26 20 1c st %g1, [ %i0 + 0x1c ]
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
200b584: 40 00 05 4d call 200cab8 <rtems_task_mode>
200b588: 94 10 00 11 mov %l1, %o2
200b58c: 81 c7 e0 08 ret
200b590: 81 e8 00 00 restore
02006b38 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
2006b38: 9d e3 bf 90 save %sp, -112, %sp
2006b3c: 11 00 80 71 sethi %hi(0x201c400), %o0
2006b40: 92 10 00 18 mov %i0, %o1
2006b44: 90 12 22 cc or %o0, 0x2cc, %o0
2006b48: 40 00 07 c3 call 2008a54 <_Objects_Get>
2006b4c: 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 ) {
2006b50: c2 07 bf f4 ld [ %fp + -12 ], %g1
2006b54: 80 a0 60 00 cmp %g1, 0
2006b58: 12 80 00 26 bne 2006bf0 <_Rate_monotonic_Timeout+0xb8> <== NEVER TAKEN
2006b5c: b0 10 00 08 mov %o0, %i0
case OBJECTS_LOCAL:
the_thread = the_period->owner;
2006b60: d0 02 20 50 ld [ %o0 + 0x50 ], %o0
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
2006b64: 03 00 00 10 sethi %hi(0x4000), %g1
2006b68: c4 02 20 10 ld [ %o0 + 0x10 ], %g2
2006b6c: 80 88 80 01 btst %g2, %g1
2006b70: 22 80 00 0c be,a 2006ba0 <_Rate_monotonic_Timeout+0x68>
2006b74: c2 06 20 38 ld [ %i0 + 0x38 ], %g1
2006b78: c4 02 20 20 ld [ %o0 + 0x20 ], %g2
2006b7c: c2 06 20 08 ld [ %i0 + 8 ], %g1
2006b80: 80 a0 80 01 cmp %g2, %g1
2006b84: 32 80 00 07 bne,a 2006ba0 <_Rate_monotonic_Timeout+0x68> <== NEVER TAKEN
2006b88: 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 );
2006b8c: 13 04 00 ff sethi %hi(0x1003fc00), %o1
2006b90: 40 00 09 09 call 2008fb4 <_Thread_Clear_state>
2006b94: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 <RAM_END+0xdc3fff8>
the_thread->Wait.id == the_period->Object.id ) {
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
2006b98: 10 80 00 08 b 2006bb8 <_Rate_monotonic_Timeout+0x80>
2006b9c: 90 10 00 18 mov %i0, %o0
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
2006ba0: 80 a0 60 01 cmp %g1, 1
2006ba4: 12 80 00 0e bne 2006bdc <_Rate_monotonic_Timeout+0xa4> <== ALWAYS TAKEN
2006ba8: 82 10 20 04 mov 4, %g1
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
2006bac: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED
_Rate_monotonic_Initiate_statistics( the_period );
2006bb0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
2006bb4: c2 26 20 38 st %g1, [ %i0 + 0x38 ] <== NOT EXECUTED
_Rate_monotonic_Initiate_statistics( the_period );
2006bb8: 7f ff fe 4a call 20064e0 <_Rate_monotonic_Initiate_statistics>
2006bbc: 01 00 00 00 nop
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2006bc0: c2 06 20 4c ld [ %i0 + 0x4c ], %g1
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2006bc4: 92 06 20 10 add %i0, 0x10, %o1
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2006bc8: c2 26 20 1c st %g1, [ %i0 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2006bcc: 11 00 80 72 sethi %hi(0x201c800), %o0
2006bd0: 40 00 0f 68 call 200a970 <_Watchdog_Insert>
2006bd4: 90 12 21 24 or %o0, 0x124, %o0 ! 201c924 <_Watchdog_Ticks_chain>
2006bd8: 30 80 00 02 b,a 2006be0 <_Rate_monotonic_Timeout+0xa8>
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
2006bdc: 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;
2006be0: 05 00 80 72 sethi %hi(0x201c800), %g2
2006be4: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1 ! 201c840 <_Thread_Dispatch_disable_level>
2006be8: 82 00 7f ff add %g1, -1, %g1
2006bec: c2 20 a0 40 st %g1, [ %g2 + 0x40 ]
2006bf0: 81 c7 e0 08 ret
2006bf4: 81 e8 00 00 restore
02006224 <_TOD_Validate>:
*/
bool _TOD_Validate(
rtems_time_of_day *the_tod
)
{
2006224: 9d e3 bf 98 save %sp, -104, %sp
uint32_t days_in_month;
if ((!the_tod) ||
2006228: 80 a6 20 00 cmp %i0, 0
200622c: 02 80 00 30 be 20062ec <_TOD_Validate+0xc8> <== NEVER TAKEN
2006230: 03 00 80 91 sethi %hi(0x2024400), %g1
2006234: d2 00 60 00 ld [ %g1 ], %o1
2006238: 11 00 03 d0 sethi %hi(0xf4000), %o0
200623c: 40 00 44 63 call 20173c8 <.udiv>
2006240: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 <PROM_START+0xf4240>
2006244: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
2006248: 80 a0 40 08 cmp %g1, %o0
200624c: 1a 80 00 28 bcc 20062ec <_TOD_Validate+0xc8>
2006250: 01 00 00 00 nop
2006254: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
2006258: 80 a0 60 3b cmp %g1, 0x3b
200625c: 18 80 00 24 bgu 20062ec <_TOD_Validate+0xc8>
2006260: 01 00 00 00 nop
2006264: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
2006268: 80 a0 60 3b cmp %g1, 0x3b
200626c: 18 80 00 20 bgu 20062ec <_TOD_Validate+0xc8>
2006270: 01 00 00 00 nop
2006274: c2 06 20 0c ld [ %i0 + 0xc ], %g1
2006278: 80 a0 60 17 cmp %g1, 0x17
200627c: 18 80 00 1c bgu 20062ec <_TOD_Validate+0xc8>
2006280: 01 00 00 00 nop
2006284: c4 06 20 04 ld [ %i0 + 4 ], %g2
2006288: 80 a0 a0 00 cmp %g2, 0
200628c: 02 80 00 18 be 20062ec <_TOD_Validate+0xc8> <== NEVER TAKEN
2006290: 80 a0 a0 0c cmp %g2, 0xc
2006294: 18 80 00 16 bgu 20062ec <_TOD_Validate+0xc8>
2006298: 01 00 00 00 nop
200629c: c2 06 00 00 ld [ %i0 ], %g1
20062a0: 80 a0 67 c3 cmp %g1, 0x7c3
20062a4: 08 80 00 12 bleu 20062ec <_TOD_Validate+0xc8>
20062a8: 01 00 00 00 nop
20062ac: f0 06 20 08 ld [ %i0 + 8 ], %i0
20062b0: 80 a6 20 00 cmp %i0, 0
20062b4: 02 80 00 0e be 20062ec <_TOD_Validate+0xc8> <== NEVER TAKEN
20062b8: 80 88 60 03 btst 3, %g1
20062bc: 03 00 80 67 sethi %hi(0x2019c00), %g1
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
20062c0: 12 80 00 05 bne 20062d4 <_TOD_Validate+0xb0>
20062c4: 86 10 62 48 or %g1, 0x248, %g3 ! 2019e48 <_TOD_Days_per_month>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
20062c8: 82 00 a0 0d add %g2, 0xd, %g1
20062cc: 10 80 00 03 b 20062d8 <_TOD_Validate+0xb4>
20062d0: 83 28 60 02 sll %g1, 2, %g1
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
20062d4: 83 28 a0 02 sll %g2, 2, %g1
20062d8: c2 00 c0 01 ld [ %g3 + %g1 ], %g1
20062dc: 80 a0 40 18 cmp %g1, %i0
20062e0: 82 60 3f ff subx %g0, -1, %g1
20062e4: 81 c7 e0 08 ret
20062e8: 91 e8 00 01 restore %g0, %g1, %o0
if ( the_tod->day > days_in_month )
return false;
return true;
}
20062ec: 81 c7 e0 08 ret
20062f0: 91 e8 20 00 restore %g0, 0, %o0
020070e0 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
20070e0: 9d e3 bf 98 save %sp, -104, %sp
*/
/*
* Save original state
*/
original_state = the_thread->current_state;
20070e4: e2 06 20 10 ld [ %i0 + 0x10 ], %l1
/*
* Set a transient state for the thread so it is pulled off the Ready chains.
* This will prevent it from being scheduled no matter what happens in an
* ISR.
*/
_Thread_Set_transient( the_thread );
20070e8: 40 00 04 62 call 2008270 <_Thread_Set_transient>
20070ec: 90 10 00 18 mov %i0, %o0
/*
* Do not bother recomputing all the priority related information if
* we are not REALLY changing priority.
*/
if ( the_thread->current_priority != new_priority )
20070f0: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
20070f4: a0 10 00 18 mov %i0, %l0
/*
* Do not bother recomputing all the priority related information if
* we are not REALLY changing priority.
*/
if ( the_thread->current_priority != new_priority )
20070f8: 80 a0 40 19 cmp %g1, %i1
20070fc: 02 80 00 04 be 200710c <_Thread_Change_priority+0x2c>
2007100: 92 10 00 19 mov %i1, %o1
_Thread_Set_priority( the_thread, new_priority );
2007104: 40 00 03 df call 2008080 <_Thread_Set_priority>
2007108: 90 10 00 18 mov %i0, %o0
_ISR_Disable( level );
200710c: 7f ff eb 18 call 2001d6c <sparc_disable_interrupts>
2007110: 01 00 00 00 nop
2007114: b0 10 00 08 mov %o0, %i0
/*
* If the thread has more than STATES_TRANSIENT set, then it is blocked,
* If it is blocked on a thread queue, then we need to requeue it.
*/
state = the_thread->current_state;
2007118: f2 04 20 10 ld [ %l0 + 0x10 ], %i1
if ( state != STATES_TRANSIENT ) {
200711c: 80 a6 60 04 cmp %i1, 4
2007120: 02 80 00 10 be 2007160 <_Thread_Change_priority+0x80>
2007124: 82 0c 60 04 and %l1, 4, %g1
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
2007128: 80 a0 60 00 cmp %g1, 0
200712c: 12 80 00 03 bne 2007138 <_Thread_Change_priority+0x58> <== NEVER TAKEN
2007130: 82 0e 7f fb and %i1, -5, %g1
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
2007134: c2 24 20 10 st %g1, [ %l0 + 0x10 ]
_ISR_Enable( level );
2007138: 7f ff eb 11 call 2001d7c <sparc_enable_interrupts>
200713c: 90 10 00 18 mov %i0, %o0
if ( _States_Is_waiting_on_thread_queue( state ) ) {
2007140: 03 00 00 ef sethi %hi(0x3bc00), %g1
2007144: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0>
2007148: 80 8e 40 01 btst %i1, %g1
200714c: 02 80 00 5b be 20072b8 <_Thread_Change_priority+0x1d8>
2007150: 01 00 00 00 nop
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
2007154: f0 04 20 44 ld [ %l0 + 0x44 ], %i0
2007158: 40 00 03 9d call 2007fcc <_Thread_queue_Requeue>
200715c: 93 e8 00 10 restore %g0, %l0, %o1
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
2007160: 80 a0 60 00 cmp %g1, 0
2007164: 12 80 00 1b bne 20071d0 <_Thread_Change_priority+0xf0> <== NEVER TAKEN
2007168: 09 00 80 5e sethi %hi(0x2017800), %g4
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
200716c: c6 04 20 90 ld [ %l0 + 0x90 ], %g3
2007170: c4 14 20 96 lduh [ %l0 + 0x96 ], %g2
2007174: c2 10 c0 00 lduh [ %g3 ], %g1
2007178: 82 10 40 02 or %g1, %g2, %g1
200717c: c2 30 c0 00 sth %g1, [ %g3 ]
_Priority_Major_bit_map |= the_priority_map->ready_major;
2007180: c4 11 20 d8 lduh [ %g4 + 0xd8 ], %g2
2007184: c2 14 20 94 lduh [ %l0 + 0x94 ], %g1
* Interrupts are STILL disabled.
* We now know the thread will be in the READY state when we remove
* the TRANSIENT state. So we have to place it on the appropriate
* Ready Queue with interrupts off.
*/
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
2007188: c0 24 20 10 clr [ %l0 + 0x10 ]
200718c: 82 10 40 02 or %g1, %g2, %g1
2007190: c2 31 20 d8 sth %g1, [ %g4 + 0xd8 ]
_Priority_Add_to_bit_map( &the_thread->Priority_map );
if ( prepend_it )
2007194: 80 8e a0 ff btst 0xff, %i2
2007198: 02 80 00 08 be 20071b8 <_Thread_Change_priority+0xd8>
200719c: c4 04 20 8c ld [ %l0 + 0x8c ], %g2
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
20071a0: c2 00 80 00 ld [ %g2 ], %g1
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
20071a4: c4 24 20 04 st %g2, [ %l0 + 4 ]
before_node = after_node->next;
after_node->next = the_node;
20071a8: e0 20 80 00 st %l0, [ %g2 ]
the_node->next = before_node;
before_node->previous = the_node;
20071ac: e0 20 60 04 st %l0, [ %g1 + 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;
20071b0: 10 80 00 08 b 20071d0 <_Thread_Change_priority+0xf0>
20071b4: c2 24 00 00 st %g1, [ %l0 ]
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
20071b8: 82 00 a0 04 add %g2, 4, %g1
20071bc: c2 24 00 00 st %g1, [ %l0 ]
old_last_node = the_chain->last;
20071c0: c2 00 a0 08 ld [ %g2 + 8 ], %g1
the_chain->last = the_node;
20071c4: e0 20 a0 08 st %l0, [ %g2 + 8 ]
old_last_node->next = the_node;
the_node->previous = old_last_node;
20071c8: 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;
20071cc: e0 20 40 00 st %l0, [ %g1 ]
_Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node );
else
_Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
}
_ISR_Flash( level );
20071d0: 7f ff ea eb call 2001d7c <sparc_enable_interrupts>
20071d4: 90 10 00 18 mov %i0, %o0
20071d8: 7f ff ea e5 call 2001d6c <sparc_disable_interrupts>
20071dc: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void )
{
Priority_Bit_map_control minor;
Priority_Bit_map_control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
20071e0: 03 00 80 5e sethi %hi(0x2017800), %g1
20071e4: c2 10 60 d8 lduh [ %g1 + 0xd8 ], %g1 ! 20178d8 <_Priority_Major_bit_map>
20071e8: 05 00 80 56 sethi %hi(0x2015800), %g2
20071ec: 89 28 60 10 sll %g1, 0x10, %g4
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
20071f0: 03 00 80 5d sethi %hi(0x2017400), %g1
20071f4: da 00 63 74 ld [ %g1 + 0x374 ], %o5 ! 2017774 <_Thread_Ready_chain>
20071f8: 83 31 20 10 srl %g4, 0x10, %g1
20071fc: 80 a0 60 ff cmp %g1, 0xff
2007200: 18 80 00 05 bgu 2007214 <_Thread_Change_priority+0x134>
2007204: 86 10 a2 b0 or %g2, 0x2b0, %g3
2007208: c2 08 c0 01 ldub [ %g3 + %g1 ], %g1
200720c: 10 80 00 04 b 200721c <_Thread_Change_priority+0x13c>
2007210: 88 00 60 08 add %g1, 8, %g4
2007214: 83 31 20 18 srl %g4, 0x18, %g1
2007218: c8 08 c0 01 ldub [ %g3 + %g1 ], %g4
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
200721c: 83 29 20 10 sll %g4, 0x10, %g1
2007220: 05 00 80 5e sethi %hi(0x2017800), %g2
2007224: 83 30 60 0f srl %g1, 0xf, %g1
2007228: 84 10 a1 50 or %g2, 0x150, %g2
200722c: c2 10 80 01 lduh [ %g2 + %g1 ], %g1
2007230: 05 00 80 56 sethi %hi(0x2015800), %g2
2007234: 83 28 60 10 sll %g1, 0x10, %g1
2007238: 86 10 a2 b0 or %g2, 0x2b0, %g3
200723c: 85 30 60 10 srl %g1, 0x10, %g2
2007240: 80 a0 a0 ff cmp %g2, 0xff
2007244: 38 80 00 05 bgu,a 2007258 <_Thread_Change_priority+0x178>
2007248: 83 30 60 18 srl %g1, 0x18, %g1
200724c: c2 08 c0 02 ldub [ %g3 + %g2 ], %g1
2007250: 10 80 00 03 b 200725c <_Thread_Change_priority+0x17c>
2007254: 82 00 60 08 add %g1, 8, %g1
2007258: c2 08 c0 01 ldub [ %g3 + %g1 ], %g1
200725c: 85 29 20 10 sll %g4, 0x10, %g2
2007260: 85 30 a0 0c srl %g2, 0xc, %g2
2007264: 83 28 60 10 sll %g1, 0x10, %g1
2007268: 83 30 60 10 srl %g1, 0x10, %g1
200726c: 82 00 40 02 add %g1, %g2, %g1
2007270: 85 28 60 04 sll %g1, 4, %g2
2007274: 83 28 60 02 sll %g1, 2, %g1
2007278: 84 20 80 01 sub %g2, %g1, %g2
200727c: c4 03 40 02 ld [ %o5 + %g2 ], %g2
* is also the heir thread, and FALSE otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
2007280: 03 00 80 5e sethi %hi(0x2017800), %g1
2007284: c6 00 60 e4 ld [ %g1 + 0xe4 ], %g3 ! 20178e4 <_Thread_Executing>
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
2007288: 03 00 80 5e sethi %hi(0x2017800), %g1
* We altered the set of thread priorities. So let's figure out
* who is the heir and if we need to switch to them.
*/
_Thread_Calculate_heir();
if ( !_Thread_Is_executing_also_the_heir() &&
200728c: 80 a0 c0 02 cmp %g3, %g2
2007290: 02 80 00 08 be 20072b0 <_Thread_Change_priority+0x1d0>
2007294: c4 20 60 b0 st %g2, [ %g1 + 0xb0 ]
2007298: c2 08 e0 76 ldub [ %g3 + 0x76 ], %g1
200729c: 80 a0 60 00 cmp %g1, 0
20072a0: 02 80 00 04 be 20072b0 <_Thread_Change_priority+0x1d0>
20072a4: 84 10 20 01 mov 1, %g2
_Thread_Executing->is_preemptible )
_Context_Switch_necessary = TRUE;
20072a8: 03 00 80 5e sethi %hi(0x2017800), %g1
20072ac: c4 28 60 f4 stb %g2, [ %g1 + 0xf4 ] ! 20178f4 <_Context_Switch_necessary>
_ISR_Enable( level );
20072b0: 7f ff ea b3 call 2001d7c <sparc_enable_interrupts>
20072b4: 81 e8 00 00 restore
20072b8: 81 c7 e0 08 ret
20072bc: 81 e8 00 00 restore
020072c0 <_Thread_Clear_state>:
void _Thread_Clear_state(
Thread_Control *the_thread,
States_Control state
)
{
20072c0: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
20072c4: 7f ff ea aa call 2001d6c <sparc_disable_interrupts>
20072c8: a0 10 00 19 mov %i1, %l0
20072cc: a2 10 00 08 mov %o0, %l1
current_state = the_thread->current_state;
20072d0: f2 06 20 10 ld [ %i0 + 0x10 ], %i1
if ( current_state & state ) {
20072d4: 80 8c 00 19 btst %l0, %i1
20072d8: 02 80 00 2c be 2007388 <_Thread_Clear_state+0xc8>
20072dc: 82 2e 40 10 andn %i1, %l0, %g1
current_state =
the_thread->current_state = _States_Clear( state, current_state );
if ( _States_Is_ready( current_state ) ) {
20072e0: 80 a0 60 00 cmp %g1, 0
20072e4: 12 80 00 29 bne 2007388 <_Thread_Clear_state+0xc8>
20072e8: c2 26 20 10 st %g1, [ %i0 + 0x10 ]
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
20072ec: c8 06 20 90 ld [ %i0 + 0x90 ], %g4
20072f0: c4 16 20 96 lduh [ %i0 + 0x96 ], %g2
20072f4: c2 11 00 00 lduh [ %g4 ], %g1
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
20072f8: c6 06 20 8c ld [ %i0 + 0x8c ], %g3
20072fc: 82 10 40 02 or %g1, %g2, %g1
2007300: c2 31 00 00 sth %g1, [ %g4 ]
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
2007304: 82 00 e0 04 add %g3, 4, %g1
_Priority_Major_bit_map |= the_priority_map->ready_major;
2007308: 1b 00 80 5e sethi %hi(0x2017800), %o5
200730c: c2 26 00 00 st %g1, [ %i0 ]
2007310: c4 16 20 94 lduh [ %i0 + 0x94 ], %g2
old_last_node = the_chain->last;
2007314: c2 00 e0 08 ld [ %g3 + 8 ], %g1
2007318: c8 13 60 d8 lduh [ %o5 + 0xd8 ], %g4
the_chain->last = the_node;
200731c: f0 20 e0 08 st %i0, [ %g3 + 8 ]
2007320: 84 10 80 04 or %g2, %g4, %g2
old_last_node->next = the_node;
the_node->previous = old_last_node;
2007324: c2 26 20 04 st %g1, [ %i0 + 4 ]
2007328: c4 33 60 d8 sth %g2, [ %o5 + 0xd8 ]
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;
200732c: f0 20 40 00 st %i0, [ %g1 ]
_ISR_Flash( level );
2007330: 7f ff ea 93 call 2001d7c <sparc_enable_interrupts>
2007334: 01 00 00 00 nop
2007338: 7f ff ea 8d call 2001d6c <sparc_disable_interrupts>
200733c: 01 00 00 00 nop
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
2007340: 07 00 80 5e sethi %hi(0x2017800), %g3
2007344: c2 00 e0 b0 ld [ %g3 + 0xb0 ], %g1 ! 20178b0 <_Thread_Heir>
2007348: c4 06 20 14 ld [ %i0 + 0x14 ], %g2
200734c: c2 00 60 14 ld [ %g1 + 0x14 ], %g1
2007350: 80 a0 80 01 cmp %g2, %g1
2007354: 1a 80 00 0d bcc 2007388 <_Thread_Clear_state+0xc8>
2007358: 03 00 80 5e sethi %hi(0x2017800), %g1
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
200735c: c2 00 60 e4 ld [ %g1 + 0xe4 ], %g1 ! 20178e4 <_Thread_Executing>
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
2007360: f0 20 e0 b0 st %i0, [ %g3 + 0xb0 ]
if ( _Thread_Executing->is_preemptible ||
2007364: c2 08 60 76 ldub [ %g1 + 0x76 ], %g1
2007368: 80 a0 60 00 cmp %g1, 0
200736c: 32 80 00 05 bne,a 2007380 <_Thread_Clear_state+0xc0>
2007370: 84 10 20 01 mov 1, %g2
2007374: 80 a0 a0 00 cmp %g2, 0
2007378: 12 80 00 04 bne 2007388 <_Thread_Clear_state+0xc8> <== ALWAYS TAKEN
200737c: 84 10 20 01 mov 1, %g2
the_thread->current_priority == 0 )
_Context_Switch_necessary = TRUE;
2007380: 03 00 80 5e sethi %hi(0x2017800), %g1
2007384: c4 28 60 f4 stb %g2, [ %g1 + 0xf4 ] ! 20178f4 <_Context_Switch_necessary>
}
}
}
_ISR_Enable( level );
2007388: 7f ff ea 7d call 2001d7c <sparc_enable_interrupts>
200738c: 91 e8 00 11 restore %g0, %l1, %o0
02007478 <_Thread_Create_idle>:
*
* _Thread_Create_idle
*/
void _Thread_Create_idle( void )
{
2007478: 9d e3 bf 78 save %sp, -136, %sp
* This routine allocates an internal thread.
*/
RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Internal_allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_Thread_Internal_information );
200747c: 11 00 80 5e sethi %hi(0x2017800), %o0
2007480: 7f ff fc de call 20067f8 <_Objects_Allocate>
2007484: 90 12 21 80 or %o0, 0x180, %o0 ! 2017980 <_Thread_Internal_information>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
2007488: 05 00 80 5e sethi %hi(0x2017800), %g2
200748c: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 ! 2017820 <_Thread_Dispatch_disable_level>
/*
* The entire workspace is zeroed during its initialization. Thus, all
* fields not explicitly assigned were explicitly zeroed by
* _Workspace_Initialization.
*/
_Thread_Idle = _Thread_Internal_allocate();
2007490: 07 00 80 5e sethi %hi(0x2017800), %g3
2007494: 82 00 60 01 inc %g1
2007498: d0 20 e1 cc st %o0, [ %g3 + 0x1cc ]
200749c: c2 20 a0 20 st %g1, [ %g2 + 0x20 ]
* that when _Thread_Initialize unnests dispatch that we do not
* do anything stupid.
*/
_Thread_Disable_dispatch();
_Thread_Initialize(
20074a0: 03 00 80 5e sethi %hi(0x2017800), %g1
20074a4: c2 00 60 bc ld [ %g1 + 0xbc ], %g1 ! 20178bc <_Configuration_Table>
20074a8: d2 00 e1 cc ld [ %g3 + 0x1cc ], %o1
20074ac: c4 00 60 18 ld [ %g1 + 0x18 ], %g2
20074b0: 03 00 80 5a sethi %hi(0x2016800), %g1
20074b4: d6 00 61 f0 ld [ %g1 + 0x1f0 ], %o3 ! 20169f0 <rtems_minimum_stack_size>
20074b8: 03 00 80 57 sethi %hi(0x2015c00), %g1
20074bc: 82 10 60 58 or %g1, 0x58, %g1 ! 2015c58 <C.27.3581+0x10>
20074c0: 80 a2 c0 02 cmp %o3, %g2
20074c4: 1a 80 00 03 bcc 20074d0 <_Thread_Create_idle+0x58> <== ALWAYS TAKEN
20074c8: c2 27 bf f4 st %g1, [ %fp + -12 ]
20074cc: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED
20074d0: 03 00 80 5a sethi %hi(0x2016800), %g1
20074d4: da 08 61 f4 ldub [ %g1 + 0x1f4 ], %o5 ! 20169f4 <rtems_maximum_priority>
20074d8: 82 10 20 01 mov 1, %g1
20074dc: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
20074e0: 82 07 bf f4 add %fp, -12, %g1
20074e4: c0 23 a0 60 clr [ %sp + 0x60 ]
20074e8: c0 23 a0 64 clr [ %sp + 0x64 ]
20074ec: c0 23 a0 68 clr [ %sp + 0x68 ]
20074f0: c2 23 a0 6c st %g1, [ %sp + 0x6c ]
20074f4: 94 10 20 00 clr %o2
20074f8: 98 10 20 00 clr %o4
20074fc: 11 00 80 5e sethi %hi(0x2017800), %o0
2007500: 40 00 00 bf call 20077fc <_Thread_Initialize>
2007504: 90 12 21 80 or %o0, 0x180, %o0 ! 2017980 <_Thread_Internal_information>
* MUST be done before _Thread_Start is invoked.
*/
_Thread_Heir =
_Thread_Executing = _Thread_Idle;
_Thread_Start(
2007508: 03 00 80 5e sethi %hi(0x2017800), %g1
200750c: c2 00 60 bc ld [ %g1 + 0xbc ], %g1 ! 20178bc <_Configuration_Table>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
2007510: 07 00 80 5e sethi %hi(0x2017800), %g3
2007514: f4 00 60 14 ld [ %g1 + 0x14 ], %i2
2007518: c2 00 e0 20 ld [ %g3 + 0x20 ], %g1
/*
* WARNING!!! This is necessary to "kick" start the system and
* MUST be done before _Thread_Start is invoked.
*/
_Thread_Heir =
200751c: 05 00 80 5e sethi %hi(0x2017800), %g2
2007520: 82 00 7f ff add %g1, -1, %g1
2007524: c4 00 a1 cc ld [ %g2 + 0x1cc ], %g2
2007528: c2 20 e0 20 st %g1, [ %g3 + 0x20 ]
200752c: 03 00 80 5e sethi %hi(0x2017800), %g1
2007530: c4 20 60 e4 st %g2, [ %g1 + 0xe4 ] ! 20178e4 <_Thread_Executing>
2007534: 03 00 80 5e sethi %hi(0x2017800), %g1
_Thread_Executing = _Thread_Idle;
_Thread_Start(
2007538: b0 10 00 02 mov %g2, %i0
/*
* WARNING!!! This is necessary to "kick" start the system and
* MUST be done before _Thread_Start is invoked.
*/
_Thread_Heir =
200753c: c4 20 60 b0 st %g2, [ %g1 + 0xb0 ]
_Thread_Executing = _Thread_Idle;
_Thread_Start(
2007540: b2 10 20 00 clr %i1
2007544: b6 10 20 00 clr %i3
2007548: 40 00 03 ae call 2008400 <_Thread_Start>
200754c: 99 e8 20 00 restore %g0, 0, %o4
02007554 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored
)
{
2007554: 9d e3 bf 90 save %sp, -112, %sp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
2007558: 90 10 00 18 mov %i0, %o0
200755c: 40 00 00 7c call 200774c <_Thread_Get>
2007560: 92 07 bf f4 add %fp, -12, %o1
switch ( location ) {
2007564: c2 07 bf f4 ld [ %fp + -12 ], %g1
2007568: 80 a0 60 00 cmp %g1, 0
200756c: 12 80 00 08 bne 200758c <_Thread_Delay_ended+0x38> <== NEVER TAKEN
2007570: 13 04 00 ff sethi %hi(0x1003fc00), %o1
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
2007574: 7f ff ff 53 call 20072c0 <_Thread_Clear_state>
2007578: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 <RAM_END+0xdc3fff8>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
200757c: 05 00 80 5e sethi %hi(0x2017800), %g2
2007580: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 ! 2017820 <_Thread_Dispatch_disable_level>
2007584: 82 00 7f ff add %g1, -1, %g1
2007588: c2 20 a0 20 st %g1, [ %g2 + 0x20 ]
200758c: 81 c7 e0 08 ret
2007590: 81 e8 00 00 restore
02007594 <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
2007594: 9d e3 bf 88 save %sp, -120, %sp
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
2007598: 21 00 80 5e sethi %hi(0x2017800), %l0
200759c: e2 04 20 e4 ld [ %l0 + 0xe4 ], %l1 ! 20178e4 <_Thread_Executing>
_ISR_Disable( level );
20075a0: 7f ff e9 f3 call 2001d6c <sparc_disable_interrupts>
20075a4: a0 14 20 e4 or %l0, 0xe4, %l0
while ( _Context_Switch_necessary == TRUE ) {
20075a8: 03 00 80 5e sethi %hi(0x2017800), %g1
20075ac: ac 10 60 f4 or %g1, 0xf4, %l6 ! 20178f4 <_Context_Switch_necessary>
heir = _Thread_Heir;
20075b0: 03 00 80 5e sethi %hi(0x2017800), %g1
20075b4: b0 10 60 b0 or %g1, 0xb0, %i0 ! 20178b0 <_Thread_Heir>
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
20075b8: 03 00 80 5d sethi %hi(0x2017400), %g1
20075bc: b2 10 63 78 or %g1, 0x378, %i1 ! 2017778 <_Thread_Ticks_per_timeslice>
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
{
struct timespec uptime, ran;
_TOD_Get_uptime( &uptime );
_Timespec_Subtract(&_Thread_Time_of_last_context_switch, &uptime, &ran);
20075c0: 03 00 80 5e sethi %hi(0x2017800), %g1
20075c4: a4 10 60 ec or %g1, 0xec, %l2 ! 20178ec <_Thread_Time_of_last_context_switch>
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
20075c8: 03 00 80 5e sethi %hi(0x2017800), %g1
20075cc: 2f 00 80 5e sethi %hi(0x2017800), %l7
20075d0: b4 10 60 ac or %g1, 0xac, %i2
_ISR_Disable( level );
while ( _Context_Switch_necessary == TRUE ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = FALSE;
_Thread_Executing = heir;
20075d4: ba 10 00 10 mov %l0, %i5
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Allocated_fp );
20075d8: 03 00 80 5e sethi %hi(0x2017800), %g1
20075dc: b6 15 e0 20 or %l7, 0x20, %i3
20075e0: aa 10 60 a8 or %g1, 0xa8, %l5
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == TRUE ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
20075e4: b8 10 20 01 mov 1, %i4
_ISR_Enable( level );
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
{
struct timespec uptime, ran;
_TOD_Get_uptime( &uptime );
20075e8: a8 07 bf f0 add %fp, -16, %l4
_Timespec_Subtract(&_Thread_Time_of_last_context_switch, &uptime, &ran);
20075ec: 10 80 00 37 b 20076c8 <_Thread_Dispatch+0x134>
20075f0: a6 07 bf e8 add %fp, -24, %l3
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == TRUE ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
20075f4: f8 26 c0 00 st %i4, [ %i3 ]
_Thread_Executing = heir;
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
20075f8: c2 04 20 7c ld [ %l0 + 0x7c ], %g1
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == TRUE ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = FALSE;
20075fc: c0 2d 80 00 clrb [ %l6 ]
_Thread_Executing = heir;
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
2007600: 80 a0 60 01 cmp %g1, 1
2007604: 12 80 00 04 bne 2007614 <_Thread_Dispatch+0x80>
2007608: e0 27 40 00 st %l0, [ %i5 ]
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
200760c: c2 06 40 00 ld [ %i1 ], %g1
2007610: c2 24 20 78 st %g1, [ %l0 + 0x78 ]
_ISR_Enable( level );
2007614: 7f ff e9 da call 2001d7c <sparc_enable_interrupts>
2007618: 01 00 00 00 nop
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
{
struct timespec uptime, ran;
_TOD_Get_uptime( &uptime );
200761c: 40 00 10 c4 call 200b92c <_TOD_Get_uptime>
2007620: 90 10 00 14 mov %l4, %o0
_Timespec_Subtract(&_Thread_Time_of_last_context_switch, &uptime, &ran);
2007624: 90 10 00 12 mov %l2, %o0
2007628: 92 10 00 14 mov %l4, %o1
200762c: 40 00 03 f3 call 20085f8 <_Timespec_Subtract>
2007630: 94 10 00 13 mov %l3, %o2
_Timespec_Add_to( &executing->cpu_time_used, &ran );
2007634: 90 04 60 84 add %l1, 0x84, %o0
2007638: 40 00 03 d8 call 2008598 <_Timespec_Add_to>
200763c: 92 10 00 13 mov %l3, %o1
_Thread_Time_of_last_context_switch = uptime;
2007640: c2 07 bf f0 ld [ %fp + -16 ], %g1
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
2007644: c4 06 80 00 ld [ %i2 ], %g2
{
struct timespec uptime, ran;
_TOD_Get_uptime( &uptime );
_Timespec_Subtract(&_Thread_Time_of_last_context_switch, &uptime, &ran);
_Timespec_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
2007648: c2 24 80 00 st %g1, [ %l2 ]
200764c: c2 07 bf f4 ld [ %fp + -12 ], %g1
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
2007650: 80 a0 a0 00 cmp %g2, 0
2007654: 02 80 00 06 be 200766c <_Thread_Dispatch+0xd8> <== NEVER TAKEN
2007658: c2 24 a0 04 st %g1, [ %l2 + 4 ]
executing->libc_reent = *_Thread_libc_reent;
200765c: c2 00 80 00 ld [ %g2 ], %g1
2007660: c2 24 61 64 st %g1, [ %l1 + 0x164 ]
*_Thread_libc_reent = heir->libc_reent;
2007664: c2 04 21 64 ld [ %l0 + 0x164 ], %g1
2007668: c2 20 80 00 st %g1, [ %g2 ]
}
_User_extensions_Thread_switch( executing, heir );
200766c: 90 10 00 11 mov %l1, %o0
2007670: 40 00 04 90 call 20088b0 <_User_extensions_Thread_switch>
2007674: 92 10 00 10 mov %l0, %o1
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
2007678: 92 04 20 d8 add %l0, 0xd8, %o1
200767c: 40 00 05 c0 call 2008d7c <_CPU_Context_switch>
2007680: 90 04 60 d8 add %l1, 0xd8, %o0
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
2007684: c2 04 61 60 ld [ %l1 + 0x160 ], %g1
2007688: 80 a0 60 00 cmp %g1, 0
200768c: 02 80 00 0d be 20076c0 <_Thread_Dispatch+0x12c>
2007690: 01 00 00 00 nop
2007694: d0 05 40 00 ld [ %l5 ], %o0
2007698: 80 a4 40 08 cmp %l1, %o0
200769c: 02 80 00 09 be 20076c0 <_Thread_Dispatch+0x12c>
20076a0: 80 a2 20 00 cmp %o0, 0
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
20076a4: 02 80 00 04 be 20076b4 <_Thread_Dispatch+0x120>
20076a8: 01 00 00 00 nop
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
20076ac: 40 00 05 7a call 2008c94 <_CPU_Context_save_fp>
20076b0: 90 02 21 60 add %o0, 0x160, %o0
_Context_Restore_fp( &executing->fp_context );
20076b4: 40 00 05 95 call 2008d08 <_CPU_Context_restore_fp>
20076b8: 90 04 61 60 add %l1, 0x160, %o0
_Thread_Allocated_fp = executing;
20076bc: e2 25 40 00 st %l1, [ %l5 ]
#endif
#endif
executing = _Thread_Executing;
_ISR_Disable( level );
20076c0: 7f ff e9 ab call 2001d6c <sparc_disable_interrupts>
20076c4: e2 07 40 00 ld [ %i5 ], %l1
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == TRUE ) {
20076c8: c2 0d 80 00 ldub [ %l6 ], %g1
20076cc: 80 a0 60 00 cmp %g1, 0
20076d0: 32 bf ff c9 bne,a 20075f4 <_Thread_Dispatch+0x60>
20076d4: e0 06 00 00 ld [ %i0 ], %l0
executing = _Thread_Executing;
_ISR_Disable( level );
}
_Thread_Dispatch_disable_level = 0;
20076d8: c0 25 e0 20 clr [ %l7 + 0x20 ]
_ISR_Enable( level );
20076dc: 7f ff e9 a8 call 2001d7c <sparc_enable_interrupts>
20076e0: 01 00 00 00 nop
if ( _Thread_Do_post_task_switch_extension ||
20076e4: 03 00 80 5e sethi %hi(0x2017800), %g1
20076e8: c2 00 60 c8 ld [ %g1 + 0xc8 ], %g1 ! 20178c8 <_Thread_Do_post_task_switch_extension>
20076ec: 80 a0 60 00 cmp %g1, 0
20076f0: 12 80 00 06 bne 2007708 <_Thread_Dispatch+0x174>
20076f4: 01 00 00 00 nop
20076f8: c2 0c 60 75 ldub [ %l1 + 0x75 ], %g1
20076fc: 80 a0 60 00 cmp %g1, 0
2007700: 02 80 00 04 be 2007710 <_Thread_Dispatch+0x17c>
2007704: 01 00 00 00 nop
executing->do_post_task_switch_extension ) {
executing->do_post_task_switch_extension = false;
_API_extensions_Run_postswitch();
2007708: 7f ff f9 d5 call 2005e5c <_API_extensions_Run_postswitch>
200770c: c0 2c 60 75 clrb [ %l1 + 0x75 ]
2007710: 81 c7 e0 08 ret
2007714: 81 e8 00 00 restore
0200cdd8 <_Thread_Evaluate_mode>:
bool _Thread_Evaluate_mode( void )
{
Thread_Control *executing;
executing = _Thread_Executing;
200cdd8: 03 00 80 5e sethi %hi(0x2017800), %g1
200cddc: c4 00 60 e4 ld [ %g1 + 0xe4 ], %g2 ! 20178e4 <_Thread_Executing>
if ( !_States_Is_ready( executing->current_state ) ||
200cde0: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1
200cde4: 80 a0 60 00 cmp %g1, 0
200cde8: 32 80 00 0b bne,a 200ce14 <_Thread_Evaluate_mode+0x3c> <== NEVER TAKEN
200cdec: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
200cdf0: 03 00 80 5e sethi %hi(0x2017800), %g1
200cdf4: c2 00 60 b0 ld [ %g1 + 0xb0 ], %g1 ! 20178b0 <_Thread_Heir>
200cdf8: 80 a0 80 01 cmp %g2, %g1
200cdfc: 02 80 00 0b be 200ce28 <_Thread_Evaluate_mode+0x50>
200ce00: 01 00 00 00 nop
200ce04: c2 08 a0 76 ldub [ %g2 + 0x76 ], %g1
200ce08: 80 a0 60 00 cmp %g1, 0
200ce0c: 02 80 00 07 be 200ce28 <_Thread_Evaluate_mode+0x50> <== NEVER TAKEN
200ce10: 84 10 20 01 mov 1, %g2
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
_Context_Switch_necessary = TRUE;
200ce14: 03 00 80 5e sethi %hi(0x2017800), %g1
200ce18: 90 10 20 01 mov 1, %o0
200ce1c: c4 28 60 f4 stb %g2, [ %g1 + 0xf4 ]
200ce20: 81 c3 e0 08 retl
200ce24: 01 00 00 00 nop
return TRUE;
}
return FALSE;
}
200ce28: 81 c3 e0 08 retl
200ce2c: 90 10 20 00 clr %o0 ! 0 <PROM_START>
0200774c <_Thread_Get>:
Thread_Control *_Thread_Get (
Objects_Id id,
Objects_Locations *location
)
{
200774c: 88 10 00 08 mov %o0, %g4
uint32_t the_class;
Objects_Information **api_information;
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
2007750: 80 a2 20 00 cmp %o0, 0
2007754: 12 80 00 0a bne 200777c <_Thread_Get+0x30>
2007758: 94 10 00 09 mov %o1, %o2
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
200775c: 03 00 80 5e sethi %hi(0x2017800), %g1
2007760: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 ! 2017820 <_Thread_Dispatch_disable_level>
2007764: 84 00 a0 01 inc %g2
2007768: c4 20 60 20 st %g2, [ %g1 + 0x20 ]
_Thread_Disable_dispatch();
*location = OBJECTS_LOCAL;
tp = _Thread_Executing;
200776c: 03 00 80 5e sethi %hi(0x2017800), %g1
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
_Thread_Disable_dispatch();
*location = OBJECTS_LOCAL;
2007770: c0 22 40 00 clr [ %o1 ]
tp = _Thread_Executing;
2007774: 81 c3 e0 08 retl
2007778: d0 00 60 e4 ld [ %g1 + 0xe4 ], %o0
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
200777c: 83 32 20 18 srl %o0, 0x18, %g1
2007780: 84 08 60 07 and %g1, 7, %g2
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
2007784: 82 00 bf ff add %g2, -1, %g1
2007788: 80 a0 60 03 cmp %g1, 3
200778c: 08 80 00 16 bleu 20077e4 <_Thread_Get+0x98>
2007790: 87 32 20 1b srl %o0, 0x1b, %g3
goto done;
}
the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */
*location = OBJECTS_ERROR;
2007794: 82 10 20 01 mov 1, %g1
2007798: 10 80 00 09 b 20077bc <_Thread_Get+0x70>
200779c: c2 22 80 00 st %g1, [ %o2 ]
goto done;
}
api_information = _Objects_Information_table[ the_api ];
20077a0: 03 00 80 5d sethi %hi(0x2017400), %g1
20077a4: 82 10 63 80 or %g1, 0x380, %g1 ! 2017780 <_Objects_Information_table>
20077a8: c2 00 40 02 ld [ %g1 + %g2 ], %g1
if ( !api_information ) {
20077ac: 80 a0 60 00 cmp %g1, 0
20077b0: 32 80 00 05 bne,a 20077c4 <_Thread_Get+0x78>
20077b4: d0 00 60 04 ld [ %g1 + 4 ], %o0
*location = OBJECTS_ERROR;
20077b8: c6 22 80 00 st %g3, [ %o2 ]
20077bc: 81 c3 e0 08 retl
20077c0: 90 10 20 00 clr %o0
goto done;
}
information = api_information[ the_class ];
if ( !information ) {
20077c4: 80 a2 20 00 cmp %o0, 0
20077c8: 12 80 00 04 bne 20077d8 <_Thread_Get+0x8c> <== ALWAYS TAKEN
20077cc: 92 10 00 04 mov %g4, %o1
*location = OBJECTS_ERROR;
20077d0: 81 c3 e0 08 retl <== NOT EXECUTED
20077d4: c6 22 80 00 st %g3, [ %o2 ] <== NOT EXECUTED
goto done;
}
tp = (Thread_Control *) _Objects_Get( information, id, location );
20077d8: 82 13 c0 00 mov %o7, %g1
20077dc: 7f ff fd 61 call 2006d60 <_Objects_Get>
20077e0: 9e 10 40 00 mov %g1, %o7
*location = OBJECTS_ERROR;
goto done;
}
the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */
20077e4: 80 a0 e0 01 cmp %g3, 1
20077e8: 22 bf ff ee be,a 20077a0 <_Thread_Get+0x54>
20077ec: 85 28 a0 02 sll %g2, 2, %g2
*location = OBJECTS_ERROR;
20077f0: 10 bf ff ea b 2007798 <_Thread_Get+0x4c>
20077f4: 82 10 20 01 mov 1, %g1
0200ce30 <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
200ce30: 9d e3 bf 98 save %sp, -104, %sp
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
200ce34: 03 00 80 5e sethi %hi(0x2017800), %g1
200ce38: e0 00 60 e4 ld [ %g1 + 0xe4 ], %l0 ! 20178e4 <_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();
200ce3c: 3f 00 80 33 sethi %hi(0x200cc00), %i7
200ce40: be 17 e2 30 or %i7, 0x230, %i7 ! 200ce30 <_Thread_Handler>
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
200ce44: d0 04 20 b8 ld [ %l0 + 0xb8 ], %o0
_ISR_Set_level(level);
200ce48: 7f ff d3 cd call 2001d7c <sparc_enable_interrupts>
200ce4c: 91 2a 20 08 sll %o0, 8, %o0
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
doneCons = doneConstructors;
doneConstructors = 1;
200ce50: 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;
200ce54: 05 00 80 5d sethi %hi(0x2017400), %g2
200ce58: e2 08 a1 30 ldub [ %g2 + 0x130 ], %l1 ! 2017530 <doneConstructors.4136>
doneConstructors = 1;
200ce5c: c2 28 a1 30 stb %g1, [ %g2 + 0x130 ]
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) && !_Thread_Is_allocated_fp( executing ) ) {
200ce60: c2 04 21 60 ld [ %l0 + 0x160 ], %g1
200ce64: 80 a0 60 00 cmp %g1, 0
200ce68: 02 80 00 0c be 200ce98 <_Thread_Handler+0x68>
200ce6c: 03 00 80 5e sethi %hi(0x2017800), %g1
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Allocated_fp );
200ce70: d0 00 60 a8 ld [ %g1 + 0xa8 ], %o0 ! 20178a8 <_Thread_Allocated_fp>
200ce74: 80 a4 00 08 cmp %l0, %o0
200ce78: 02 80 00 08 be 200ce98 <_Thread_Handler+0x68>
200ce7c: 80 a2 20 00 cmp %o0, 0
if ( _Thread_Allocated_fp != NULL )
200ce80: 22 80 00 06 be,a 200ce98 <_Thread_Handler+0x68>
200ce84: e0 20 60 a8 st %l0, [ %g1 + 0xa8 ]
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
200ce88: 7f ff ef 83 call 2008c94 <_CPU_Context_save_fp>
200ce8c: 90 02 21 60 add %o0, 0x160, %o0
_Thread_Allocated_fp = executing;
200ce90: 03 00 80 5e sethi %hi(0x2017800), %g1
200ce94: e0 20 60 a8 st %l0, [ %g1 + 0xa8 ] ! 20178a8 <_Thread_Allocated_fp>
* Take care that 'begin' extensions get to complete before
* 'switch' extensions can run. This means must keep dispatch
* disabled until all 'begin' extensions complete.
*/
_User_extensions_Thread_begin( executing );
200ce98: 7f ff ee 13 call 20086e4 <_User_extensions_Thread_begin>
200ce9c: 90 10 00 10 mov %l0, %o0
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
200cea0: 7f ff ea 1e call 2007718 <_Thread_Enable_dispatch>
200cea4: 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) */
200cea8: 83 2c 60 18 sll %l1, 0x18, %g1
200ceac: 80 a0 60 00 cmp %g1, 0
200ceb0: 32 80 00 05 bne,a 200cec4 <_Thread_Handler+0x94>
200ceb4: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1
{
_init ();
200ceb8: 40 00 26 96 call 2016910 <_init>
200cebc: 01 00 00 00 nop
#if defined(__USE__MAIN__)
if (!doneCons && _main)
__main ();
#endif
switch ( executing->Start.prototype ) {
200cec0: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1
200cec4: 80 a0 60 01 cmp %g1, 1
200cec8: 22 80 00 0d be,a 200cefc <_Thread_Handler+0xcc>
200cecc: c2 04 20 9c ld [ %l0 + 0x9c ], %g1
200ced0: 2a 80 00 09 bcs,a 200cef4 <_Thread_Handler+0xc4> <== ALWAYS TAKEN
200ced4: c2 04 20 9c ld [ %l0 + 0x9c ], %g1
200ced8: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED
200cedc: 02 80 00 0d be 200cf10 <_Thread_Handler+0xe0> <== NOT EXECUTED
200cee0: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED
200cee4: 12 80 00 14 bne 200cf34 <_Thread_Handler+0x104> <== NOT EXECUTED
200cee8: 01 00 00 00 nop <== NOT EXECUTED
executing->Start.pointer_argument,
executing->Start.numeric_argument
);
break;
case THREAD_START_BOTH_NUMERIC_FIRST:
executing->Wait.return_argument =
200ceec: 10 80 00 0d b 200cf20 <_Thread_Handler+0xf0> <== NOT EXECUTED
200cef0: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED
__main ();
#endif
switch ( executing->Start.prototype ) {
case THREAD_START_NUMERIC:
executing->Wait.return_argument =
200cef4: 10 80 00 03 b 200cf00 <_Thread_Handler+0xd0>
200cef8: d0 04 20 a8 ld [ %l0 + 0xa8 ], %o0
(*(Thread_Entry_numeric) executing->Start.entry_point)(
executing->Start.numeric_argument
);
break;
case THREAD_START_POINTER:
executing->Wait.return_argument =
200cefc: d0 04 20 a4 ld [ %l0 + 0xa4 ], %o0
200cf00: 9f c0 40 00 call %g1
200cf04: 01 00 00 00 nop
executing->Start.pointer_argument,
executing->Start.numeric_argument
);
break;
case THREAD_START_BOTH_NUMERIC_FIRST:
executing->Wait.return_argument =
200cf08: 10 80 00 0b b 200cf34 <_Thread_Handler+0x104>
200cf0c: d0 24 20 28 st %o0, [ %l0 + 0x28 ]
(*(Thread_Entry_pointer) executing->Start.entry_point)(
executing->Start.pointer_argument
);
break;
case THREAD_START_BOTH_POINTER_FIRST:
executing->Wait.return_argument =
200cf10: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED
200cf14: d0 04 20 a4 ld [ %l0 + 0xa4 ], %o0 <== NOT EXECUTED
200cf18: 10 80 00 04 b 200cf28 <_Thread_Handler+0xf8> <== NOT EXECUTED
200cf1c: d2 04 20 a8 ld [ %l0 + 0xa8 ], %o1 <== NOT EXECUTED
executing->Start.pointer_argument,
executing->Start.numeric_argument
);
break;
case THREAD_START_BOTH_NUMERIC_FIRST:
executing->Wait.return_argument =
200cf20: d0 04 20 a8 ld [ %l0 + 0xa8 ], %o0 <== NOT EXECUTED
200cf24: d2 04 20 a4 ld [ %l0 + 0xa4 ], %o1 <== NOT EXECUTED
200cf28: 9f c0 40 00 call %g1 <== NOT EXECUTED
200cf2c: 01 00 00 00 nop <== NOT EXECUTED
200cf30: d0 24 20 28 st %o0, [ %l0 + 0x28 ] <== NOT EXECUTED
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
200cf34: 7f ff ed fd call 2008728 <_User_extensions_Thread_exitted>
200cf38: 90 10 00 10 mov %l0, %o0
_Internal_error_Occurred(
200cf3c: 90 10 20 00 clr %o0
200cf40: 92 10 20 01 mov 1, %o1
200cf44: 7f ff e5 fe call 200673c <_Internal_error_Occurred>
200cf48: 94 10 20 06 mov 6, %o2
020077fc <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
20077fc: 9d e3 bf 98 save %sp, -104, %sp
2007800: c2 07 a0 6c ld [ %fp + 0x6c ], %g1
/*
* Allocate and Initialize the stack for this thread.
*/
if ( !stack_area ) {
2007804: 80 a6 a0 00 cmp %i2, 0
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
2007808: e2 00 40 00 ld [ %g1 ], %l1
200780c: e4 07 a0 60 ld [ %fp + 0x60 ], %l2
/*
* Allocate and Initialize the stack for this thread.
*/
if ( !stack_area ) {
2007810: 12 80 00 0e bne 2007848 <_Thread_Initialize+0x4c> <== NEVER TAKEN
2007814: e0 0f a0 5f ldub [ %fp + 0x5f ], %l0
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
2007818: 90 10 00 19 mov %i1, %o0
200781c: 40 00 02 ba call 2008304 <_Thread_Stack_Allocate>
2007820: 92 10 00 1b mov %i3, %o1
if ( !actual_stack_size || actual_stack_size < stack_size )
2007824: 80 a2 20 00 cmp %o0, 0
2007828: 02 80 00 2d be 20078dc <_Thread_Initialize+0xe0>
200782c: 80 a2 00 1b cmp %o0, %i3
2007830: 0a 80 00 2b bcs 20078dc <_Thread_Initialize+0xe0> <== NEVER TAKEN
2007834: 01 00 00 00 nop
return FALSE; /* stack allocation failed */
stack = the_thread->Start.stack;
the_thread->Start.core_allocated_stack = TRUE;
2007838: 82 10 20 01 mov 1, %g1 ! 1 <PROM_START+0x1>
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
return FALSE; /* stack allocation failed */
stack = the_thread->Start.stack;
200783c: f4 06 60 d0 ld [ %i1 + 0xd0 ], %i2
the_thread->Start.core_allocated_stack = TRUE;
2007840: 10 80 00 04 b 2007850 <_Thread_Initialize+0x54>
2007844: c2 2e 60 c0 stb %g1, [ %i1 + 0xc0 ]
} else {
stack = stack_area;
actual_stack_size = stack_size;
the_thread->Start.core_allocated_stack = FALSE;
2007848: c0 2e 60 c0 clrb [ %i1 + 0xc0 ] <== NOT EXECUTED
200784c: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
2007850: f4 26 60 c8 st %i2, [ %i1 + 0xc8 ]
the_stack->size = size;
2007854: d0 26 60 c4 st %o0, [ %i1 + 0xc4 ]
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
2007858: 80 8f 20 ff btst 0xff, %i4
200785c: 02 80 00 07 be 2007878 <_Thread_Initialize+0x7c>
2007860: b8 10 20 00 clr %i4
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
2007864: 40 00 04 d8 call 2008bc4 <_Workspace_Allocate>
2007868: 90 10 20 88 mov 0x88, %o0
if ( !fp_area ) {
200786c: b8 92 20 00 orcc %o0, 0, %i4
2007870: 02 80 00 19 be 20078d4 <_Thread_Initialize+0xd8> <== NEVER TAKEN
2007874: 01 00 00 00 nop
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
2007878: 03 00 80 5e sethi %hi(0x2017800), %g1
200787c: d0 00 60 c4 ld [ %g1 + 0xc4 ], %o0 ! 20178c4 <_Thread_Maximum_extensions>
fp_area = _Context_Fp_start( fp_area, 0 );
} else
fp_area = NULL;
the_thread->fp_context = fp_area;
2007880: f8 26 61 60 st %i4, [ %i1 + 0x160 ]
the_thread->Start.fp_context = fp_area;
2007884: f8 26 60 cc st %i4, [ %i1 + 0xcc ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2007888: c0 26 60 50 clr [ %i1 + 0x50 ]
the_watchdog->routine = routine;
200788c: c0 26 60 64 clr [ %i1 + 0x64 ]
the_watchdog->id = id;
2007890: c0 26 60 68 clr [ %i1 + 0x68 ]
the_watchdog->user_data = user_data;
2007894: c0 26 60 6c clr [ %i1 + 0x6c ]
/*
* Clear the libc reent hook.
*/
the_thread->libc_reent = NULL;
2007898: c0 26 61 64 clr [ %i1 + 0x164 ]
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
200789c: 80 a2 20 00 cmp %o0, 0
20078a0: 02 80 00 11 be 20078e4 <_Thread_Initialize+0xe8>
20078a4: b6 10 20 00 clr %i3
extensions_area = _Workspace_Allocate(
20078a8: 90 02 20 01 inc %o0
20078ac: 40 00 04 c6 call 2008bc4 <_Workspace_Allocate>
20078b0: 91 2a 20 02 sll %o0, 2, %o0
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area ) {
20078b4: b6 92 20 00 orcc %o0, 0, %i3
20078b8: 12 80 00 0c bne 20078e8 <_Thread_Initialize+0xec> <== ALWAYS TAKEN
20078bc: 80 a6 e0 00 cmp %i3, 0
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
20078c0: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
20078c4: 02 80 00 04 be 20078d4 <_Thread_Initialize+0xd8> <== NOT EXECUTED
20078c8: 01 00 00 00 nop <== NOT EXECUTED
(void) _Workspace_Free( fp_area );
20078cc: 40 00 04 b7 call 2008ba8 <_Workspace_Free> <== NOT EXECUTED
20078d0: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
#endif
_Thread_Stack_Free( the_thread );
20078d4: 40 00 02 a4 call 2008364 <_Thread_Stack_Free> <== NOT EXECUTED
20078d8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
20078dc: 81 c7 e0 08 ret
20078e0: 91 e8 20 00 restore %g0, 0, %o0
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
20078e4: 80 a6 e0 00 cmp %i3, 0
20078e8: 02 80 00 0e be 2007920 <_Thread_Initialize+0x124>
20078ec: f6 26 61 74 st %i3, [ %i1 + 0x174 ]
uint32_t i;
for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ )
20078f0: 03 00 80 5e sethi %hi(0x2017800), %g1
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
20078f4: 84 10 20 00 clr %g2
uint32_t i;
for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ )
20078f8: 10 80 00 05 b 200790c <_Thread_Initialize+0x110>
20078fc: 88 10 60 c4 or %g1, 0xc4, %g4
the_thread->extensions[i] = NULL;
2007900: c2 06 61 74 ld [ %i1 + 0x174 ], %g1
* call.
*/
if ( the_thread->extensions ) {
uint32_t i;
for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ )
2007904: 84 00 a0 01 inc %g2
the_thread->extensions[i] = NULL;
2007908: c0 20 40 03 clr [ %g1 + %g3 ]
* call.
*/
if ( the_thread->extensions ) {
uint32_t i;
for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ )
200790c: c2 01 00 00 ld [ %g4 ], %g1
2007910: 82 00 60 01 inc %g1
2007914: 80 a0 80 01 cmp %g2, %g1
2007918: 0a bf ff fa bcs 2007900 <_Thread_Initialize+0x104>
200791c: 87 28 a0 02 sll %g2, 2, %g3
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
2007920: c2 07 a0 64 ld [ %fp + 0x64 ], %g1
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
2007924: e0 2e 60 ac stb %l0, [ %i1 + 0xac ]
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
2007928: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ]
switch ( budget_algorithm ) {
200792c: 80 a4 a0 02 cmp %l2, 2
2007930: 12 80 00 05 bne 2007944 <_Thread_Initialize+0x148> <== ALWAYS TAKEN
2007934: e4 26 60 b0 st %l2, [ %i1 + 0xb0 ]
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
break;
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
2007938: 03 00 80 5d sethi %hi(0x2017400), %g1 <== NOT EXECUTED
200793c: c2 00 63 78 ld [ %g1 + 0x378 ], %g1 ! 2017778 <_Thread_Ticks_per_timeslice><== NOT EXECUTED
2007940: c2 26 60 78 st %g1, [ %i1 + 0x78 ] <== NOT EXECUTED
break;
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
}
the_thread->Start.isr_level = isr_level;
2007944: c2 07 a0 68 ld [ %fp + 0x68 ], %g1
the_thread->Wait.queue = NULL;
the_thread->resource_count = 0;
the_thread->suspend_count = 0;
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
2007948: 92 10 00 1d mov %i5, %o1
break;
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
}
the_thread->Start.isr_level = isr_level;
200794c: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ]
the_thread->current_state = STATES_DORMANT;
2007950: 82 10 20 01 mov 1, %g1
the_thread->Wait.queue = NULL;
the_thread->resource_count = 0;
the_thread->suspend_count = 0;
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
2007954: 90 10 00 19 mov %i1, %o0
break;
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
2007958: c2 26 60 10 st %g1, [ %i1 + 0x10 ]
the_thread->Wait.queue = NULL;
200795c: c0 26 60 44 clr [ %i1 + 0x44 ]
the_thread->resource_count = 0;
2007960: c0 26 60 1c clr [ %i1 + 0x1c ]
the_thread->suspend_count = 0;
2007964: c0 26 60 70 clr [ %i1 + 0x70 ]
the_thread->real_priority = priority;
2007968: fa 26 60 18 st %i5, [ %i1 + 0x18 ]
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
200796c: 40 00 01 c5 call 2008080 <_Thread_Set_priority>
2007970: fa 26 60 bc st %i5, [ %i1 + 0xbc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2007974: c4 06 60 08 ld [ %i1 + 8 ], %g2
2007978: c6 06 20 1c ld [ %i0 + 0x1c ], %g3
200797c: 03 00 00 3f sethi %hi(0xfc00), %g1
2007980: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
2007984: 84 08 80 01 and %g2, %g1, %g2
2007988: 85 28 a0 02 sll %g2, 2, %g2
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
200798c: e2 26 60 0c st %l1, [ %i1 + 0xc ]
/*
* Initialize the CPU usage statistics
*/
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
the_thread->cpu_time_used.tv_sec = 0;
2007990: c0 26 60 84 clr [ %i1 + 0x84 ]
the_thread->cpu_time_used.tv_nsec = 0;
2007994: c0 26 60 88 clr [ %i1 + 0x88 ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2007998: f2 20 c0 02 st %i1, [ %g3 + %g2 ]
* enabled when we get here. We want to be able to run the
* user extensions with dispatching enabled. The Allocator
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
200799c: 90 10 00 19 mov %i1, %o0
20079a0: 40 00 03 86 call 20087b8 <_User_extensions_Thread_create>
20079a4: b0 10 20 01 mov 1, %i0
if ( !extension_status ) {
20079a8: 80 8a 20 ff btst 0xff, %o0
20079ac: 12 80 00 0e bne 20079e4 <_Thread_Initialize+0x1e8> <== ALWAYS TAKEN
20079b0: 80 a6 e0 00 cmp %i3, 0
if ( extensions_area )
20079b4: 02 80 00 05 be 20079c8 <_Thread_Initialize+0x1cc> <== NOT EXECUTED
20079b8: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
(void) _Workspace_Free( extensions_area );
20079bc: 40 00 04 7b call 2008ba8 <_Workspace_Free> <== NOT EXECUTED
20079c0: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
20079c4: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
20079c8: 02 80 00 05 be 20079dc <_Thread_Initialize+0x1e0> <== NOT EXECUTED
20079cc: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
(void) _Workspace_Free( fp_area );
20079d0: 40 00 04 76 call 2008ba8 <_Workspace_Free> <== NOT EXECUTED
20079d4: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
#endif
_Thread_Stack_Free( the_thread );
20079d8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
20079dc: 40 00 02 62 call 2008364 <_Thread_Stack_Free> <== NOT EXECUTED
20079e0: b0 10 20 00 clr %i0 <== NOT EXECUTED
return FALSE;
}
return TRUE;
}
20079e4: 81 c7 e0 08 ret
20079e8: 81 e8 00 00 restore
0200ce0c <_Thread_Reset>:
void _Thread_Reset(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
200ce0c: 9d e3 bf 98 save %sp, -104, %sp
the_thread->resource_count = 0;
the_thread->suspend_count = 0;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
200ce10: c4 1e 20 b0 ldd [ %i0 + 0xb0 ], %g2
Thread_Entry_numeric_type numeric_argument
)
{
the_thread->resource_count = 0;
the_thread->suspend_count = 0;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
200ce14: c2 0e 20 ac ldub [ %i0 + 0xac ], %g1
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
200ce18: c4 26 20 7c st %g2, [ %i0 + 0x7c ]
Thread_Entry_numeric_type numeric_argument
)
{
the_thread->resource_count = 0;
the_thread->suspend_count = 0;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
200ce1c: c2 2e 20 76 stb %g1, [ %i0 + 0x76 ]
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
200ce20: c6 26 20 80 st %g3, [ %i0 + 0x80 ]
the_thread->Start.pointer_argument = pointer_argument;
200ce24: f2 26 20 a4 st %i1, [ %i0 + 0xa4 ]
the_thread->Start.numeric_argument = numeric_argument;
200ce28: f4 26 20 a8 st %i2, [ %i0 + 0xa8 ]
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
the_thread->resource_count = 0;
200ce2c: c0 26 20 1c clr [ %i0 + 0x1c ]
the_thread->suspend_count = 0;
200ce30: 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 ) ) {
200ce34: 7f ff ef 27 call 2008ad0 <_Thread_queue_Extract_with_proxy>
200ce38: 90 10 00 18 mov %i0, %o0
200ce3c: 80 8a 20 ff btst 0xff, %o0
200ce40: 32 80 00 09 bne,a 200ce64 <_Thread_Reset+0x58>
200ce44: f2 06 20 bc ld [ %i0 + 0xbc ], %i1
if ( _Watchdog_Is_active( &the_thread->Timer ) )
200ce48: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
200ce4c: 80 a0 60 02 cmp %g1, 2
200ce50: 32 80 00 05 bne,a 200ce64 <_Thread_Reset+0x58> <== ALWAYS TAKEN
200ce54: f2 06 20 bc ld [ %i0 + 0xbc ], %i1
(void) _Watchdog_Remove( &the_thread->Timer );
200ce58: 7f ff f2 2b call 2009704 <_Watchdog_Remove> <== NOT EXECUTED
200ce5c: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
200ce60: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 <== NOT EXECUTED
200ce64: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
200ce68: 80 a0 40 19 cmp %g1, %i1
200ce6c: 02 80 00 05 be 200ce80 <_Thread_Reset+0x74>
200ce70: 01 00 00 00 nop
the_thread->real_priority = the_thread->Start.initial_priority;
200ce74: f2 26 20 18 st %i1, [ %i0 + 0x18 ]
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
200ce78: 7f ff ef 9a call 2008ce0 <_Thread_Set_priority>
200ce7c: 81 e8 00 00 restore
200ce80: 81 c7 e0 08 ret
200ce84: 81 e8 00 00 restore
0200c0cc <_Thread_Reset_timeslice>:
* ready chain
* select heir
*/
void _Thread_Reset_timeslice( void )
{
200c0cc: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
200c0d0: 03 00 80 5e sethi %hi(0x2017800), %g1
200c0d4: e0 00 60 e4 ld [ %g1 + 0xe4 ], %l0 ! 20178e4 <_Thread_Executing>
ready = executing->ready;
_ISR_Disable( level );
200c0d8: 7f ff d7 25 call 2001d6c <sparc_disable_interrupts>
200c0dc: e2 04 20 8c ld [ %l0 + 0x8c ], %l1
200c0e0: b0 10 00 08 mov %o0, %i0
if ( _Chain_Has_only_one_node( ready ) ) {
200c0e4: c4 04 40 00 ld [ %l1 ], %g2
200c0e8: c2 04 60 08 ld [ %l1 + 8 ], %g1
200c0ec: 80 a0 80 01 cmp %g2, %g1
200c0f0: 32 80 00 03 bne,a 200c0fc <_Thread_Reset_timeslice+0x30>
200c0f4: c6 04 00 00 ld [ %l0 ], %g3
_ISR_Enable( level );
200c0f8: 30 80 00 18 b,a 200c158 <_Thread_Reset_timeslice+0x8c>
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
200c0fc: c4 04 20 04 ld [ %l0 + 4 ], %g2
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
200c100: 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;
200c104: c6 20 80 00 st %g3, [ %g2 ]
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
200c108: c2 24 00 00 st %g1, [ %l0 ]
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
200c10c: 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;
200c110: c2 04 60 08 ld [ %l1 + 8 ], %g1
the_chain->last = the_node;
200c114: e0 24 60 08 st %l0, [ %l1 + 8 ]
old_last_node->next = the_node;
the_node->previous = old_last_node;
200c118: 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;
200c11c: e0 20 40 00 st %l0, [ %g1 ]
return;
}
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
200c120: 7f ff d7 17 call 2001d7c <sparc_enable_interrupts>
200c124: 01 00 00 00 nop
200c128: 7f ff d7 11 call 2001d6c <sparc_disable_interrupts>
200c12c: 01 00 00 00 nop
if ( _Thread_Is_heir( executing ) )
200c130: 05 00 80 5e sethi %hi(0x2017800), %g2
200c134: c2 00 a0 b0 ld [ %g2 + 0xb0 ], %g1 ! 20178b0 <_Thread_Heir>
200c138: 80 a4 00 01 cmp %l0, %g1
200c13c: 32 80 00 05 bne,a 200c150 <_Thread_Reset_timeslice+0x84> <== NEVER TAKEN
200c140: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
_Thread_Heir = (Thread_Control *) ready->first;
200c144: c2 04 40 00 ld [ %l1 ], %g1
200c148: c2 20 a0 b0 st %g1, [ %g2 + 0xb0 ]
_Context_Switch_necessary = TRUE;
200c14c: 84 10 20 01 mov 1, %g2
200c150: 03 00 80 5e sethi %hi(0x2017800), %g1
200c154: c4 28 60 f4 stb %g2, [ %g1 + 0xf4 ] ! 20178f4 <_Context_Switch_necessary>
_ISR_Enable( level );
200c158: 7f ff d7 09 call 2001d7c <sparc_enable_interrupts>
200c15c: 81 e8 00 00 restore
02009a30 <_Thread_Resume>:
void _Thread_Resume(
Thread_Control *the_thread,
bool force
)
{
2009a30: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
2009a34: 7f ff e4 41 call 2002b38 <sparc_disable_interrupts>
2009a38: 01 00 00 00 nop
2009a3c: a0 10 00 08 mov %o0, %l0
if ( force == TRUE )
2009a40: 80 8e 60 ff btst 0xff, %i1
2009a44: 22 80 00 04 be,a 2009a54 <_Thread_Resume+0x24> <== NEVER TAKEN
2009a48: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 <== NOT EXECUTED
the_thread->suspend_count = 0;
2009a4c: 10 80 00 04 b 2009a5c <_Thread_Resume+0x2c>
2009a50: c0 26 20 70 clr [ %i0 + 0x70 ]
else
the_thread->suspend_count--;
2009a54: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
2009a58: c2 26 20 70 st %g1, [ %i0 + 0x70 ] <== NOT EXECUTED
if ( the_thread->suspend_count > 0 ) {
2009a5c: c2 06 20 70 ld [ %i0 + 0x70 ], %g1
2009a60: 80 a0 60 00 cmp %g1, 0
2009a64: 22 80 00 03 be,a 2009a70 <_Thread_Resume+0x40> <== ALWAYS TAKEN
2009a68: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
_ISR_Enable( level );
2009a6c: 30 80 00 2e b,a 2009b24 <_Thread_Resume+0xf4> <== NOT EXECUTED
return;
}
current_state = the_thread->current_state;
if ( current_state & STATES_SUSPENDED ) {
2009a70: 80 88 60 02 btst 2, %g1
2009a74: 02 80 00 2c be 2009b24 <_Thread_Resume+0xf4> <== NEVER TAKEN
2009a78: 82 08 7f fd and %g1, -3, %g1
current_state =
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
2009a7c: 80 a0 60 00 cmp %g1, 0
2009a80: 12 80 00 29 bne 2009b24 <_Thread_Resume+0xf4>
2009a84: c2 26 20 10 st %g1, [ %i0 + 0x10 ]
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
2009a88: c8 06 20 90 ld [ %i0 + 0x90 ], %g4
2009a8c: c4 16 20 96 lduh [ %i0 + 0x96 ], %g2
2009a90: c2 11 00 00 lduh [ %g4 ], %g1
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
2009a94: c6 06 20 8c ld [ %i0 + 0x8c ], %g3
2009a98: 82 10 40 02 or %g1, %g2, %g1
2009a9c: c2 31 00 00 sth %g1, [ %g4 ]
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
2009aa0: 82 00 e0 04 add %g3, 4, %g1
_Priority_Major_bit_map |= the_priority_map->ready_major;
2009aa4: 1b 00 80 90 sethi %hi(0x2024000), %o5
2009aa8: c2 26 00 00 st %g1, [ %i0 ]
2009aac: c4 16 20 94 lduh [ %i0 + 0x94 ], %g2
old_last_node = the_chain->last;
2009ab0: c2 00 e0 08 ld [ %g3 + 8 ], %g1
2009ab4: c8 13 63 18 lduh [ %o5 + 0x318 ], %g4
the_chain->last = the_node;
2009ab8: f0 20 e0 08 st %i0, [ %g3 + 8 ]
2009abc: 84 10 80 04 or %g2, %g4, %g2
old_last_node->next = the_node;
the_node->previous = old_last_node;
2009ac0: c2 26 20 04 st %g1, [ %i0 + 4 ]
2009ac4: c4 33 63 18 sth %g2, [ %o5 + 0x318 ]
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;
2009ac8: f0 20 40 00 st %i0, [ %g1 ]
_ISR_Flash( level );
2009acc: 7f ff e4 1f call 2002b48 <sparc_enable_interrupts>
2009ad0: 90 10 00 10 mov %l0, %o0
2009ad4: 7f ff e4 19 call 2002b38 <sparc_disable_interrupts>
2009ad8: 01 00 00 00 nop
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
2009adc: 07 00 80 90 sethi %hi(0x2024000), %g3
2009ae0: c2 00 e2 f0 ld [ %g3 + 0x2f0 ], %g1 ! 20242f0 <_Thread_Heir>
2009ae4: c4 06 20 14 ld [ %i0 + 0x14 ], %g2
2009ae8: c2 00 60 14 ld [ %g1 + 0x14 ], %g1
2009aec: 80 a0 80 01 cmp %g2, %g1
2009af0: 1a 80 00 0d bcc 2009b24 <_Thread_Resume+0xf4>
2009af4: 03 00 80 90 sethi %hi(0x2024000), %g1
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
2009af8: c2 00 63 24 ld [ %g1 + 0x324 ], %g1 ! 2024324 <_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;
2009afc: f0 20 e2 f0 st %i0, [ %g3 + 0x2f0 ]
if ( _Thread_Executing->is_preemptible ||
2009b00: c2 08 60 76 ldub [ %g1 + 0x76 ], %g1
2009b04: 80 a0 60 00 cmp %g1, 0
2009b08: 32 80 00 05 bne,a 2009b1c <_Thread_Resume+0xec>
2009b0c: 84 10 20 01 mov 1, %g2
2009b10: 80 a0 a0 00 cmp %g2, 0
2009b14: 12 80 00 04 bne 2009b24 <_Thread_Resume+0xf4> <== ALWAYS TAKEN
2009b18: 84 10 20 01 mov 1, %g2
the_thread->current_priority == 0 )
_Context_Switch_necessary = TRUE;
2009b1c: 03 00 80 90 sethi %hi(0x2024000), %g1
2009b20: c4 28 63 34 stb %g2, [ %g1 + 0x334 ] ! 2024334 <_Context_Switch_necessary>
}
}
}
_ISR_Enable( level );
2009b24: 7f ff e4 09 call 2002b48 <sparc_enable_interrupts>
2009b28: 91 e8 00 10 restore %g0, %l0, %o0
02008304 <_Thread_Stack_Allocate>:
size_t _Thread_Stack_Allocate(
Thread_Control *the_thread,
size_t stack_size
)
{
2008304: 9d e3 bf 98 save %sp, -104, %sp
2008308: 03 00 80 5a sethi %hi(0x2016800), %g1
200830c: c2 00 61 f0 ld [ %g1 + 0x1f0 ], %g1 ! 20169f0 <rtems_minimum_stack_size>
2008310: 80 a6 40 01 cmp %i1, %g1
2008314: 2a 80 00 02 bcs,a 200831c <_Thread_Stack_Allocate+0x18>
2008318: b2 10 00 01 mov %g1, %i1
* Call ONLY the CPU table stack allocate hook, _or_ the
* the RTEMS workspace allocate. This is so the stack free
* routine can call the correct deallocation routine.
*/
if ( _Configuration_Table->stack_allocate_hook ) {
200831c: 03 00 80 5e sethi %hi(0x2017800), %g1
2008320: c2 00 60 bc ld [ %g1 + 0xbc ], %g1 ! 20178bc <_Configuration_Table>
2008324: c2 00 60 20 ld [ %g1 + 0x20 ], %g1
2008328: 80 a0 60 00 cmp %g1, 0
200832c: 22 80 00 06 be,a 2008344 <_Thread_Stack_Allocate+0x40> <== ALWAYS TAKEN
2008330: b2 06 60 10 add %i1, 0x10, %i1
stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size );
2008334: 9f c0 40 00 call %g1 <== NOT EXECUTED
2008338: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
}
if ( !stack_addr )
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
200833c: 10 80 00 05 b 2008350 <_Thread_Stack_Allocate+0x4c> <== NOT EXECUTED
2008340: d0 26 20 d0 st %o0, [ %i0 + 0xd0 ] <== NOT EXECUTED
* get and keep the stack adjust factor, the stack alignment, and
* the context initialization sequence in sync.
*/
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
2008344: 40 00 02 20 call 2008bc4 <_Workspace_Allocate>
2008348: 90 10 00 19 mov %i1, %o0
}
if ( !stack_addr )
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
200834c: d0 26 20 d0 st %o0, [ %i0 + 0xd0 ]
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
}
if ( !stack_addr )
2008350: 80 a0 00 08 cmp %g0, %o0
2008354: b0 60 20 00 subx %g0, 0, %i0
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
return the_stack_size;
}
2008358: b0 0e 40 18 and %i1, %i0, %i0
200835c: 81 c7 e0 08 ret
2008360: 81 e8 00 00 restore
02008364 <_Thread_Stack_Free>:
*/
void _Thread_Stack_Free(
Thread_Control *the_thread
)
{
2008364: 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 )
2008368: c2 0e 20 c0 ldub [ %i0 + 0xc0 ], %g1
200836c: 80 a0 60 00 cmp %g1, 0
2008370: 02 80 00 09 be 2008394 <_Thread_Stack_Free+0x30> <== NEVER TAKEN
2008374: 03 00 80 5e sethi %hi(0x2017800), %g1
* Call ONLY the CPU table stack free hook, or the
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
if ( _Configuration_Table->stack_free_hook )
2008378: c2 00 60 bc ld [ %g1 + 0xbc ], %g1 ! 20178bc <_Configuration_Table>
200837c: c2 00 60 24 ld [ %g1 + 0x24 ], %g1
2008380: 80 a0 60 00 cmp %g1, 0
2008384: 02 80 00 06 be 200839c <_Thread_Stack_Free+0x38> <== ALWAYS TAKEN
2008388: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0
(*_Configuration_Table->stack_free_hook)(
200838c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2008390: 01 00 00 00 nop <== NOT EXECUTED
2008394: 81 c7 e0 08 ret <== NOT EXECUTED
2008398: 81 e8 00 00 restore <== NOT EXECUTED
the_thread->Start.Initial_stack.area
);
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
200839c: 40 00 02 03 call 2008ba8 <_Workspace_Free>
20083a0: 91 e8 00 08 restore %g0, %o0, %o0
0200844c <_Thread_Tickle_timeslice>:
*
* Output parameters: NONE
*/
void _Thread_Tickle_timeslice( void )
{
200844c: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *executing;
executing = _Thread_Executing;
2008450: 03 00 80 5e sethi %hi(0x2017800), %g1
2008454: e0 00 60 e4 ld [ %g1 + 0xe4 ], %l0 ! 20178e4 <_Thread_Executing>
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
2008458: c2 0c 20 76 ldub [ %l0 + 0x76 ], %g1
200845c: 80 a0 60 00 cmp %g1, 0
2008460: 02 80 00 23 be 20084ec <_Thread_Tickle_timeslice+0xa0>
2008464: 01 00 00 00 nop
return;
if ( !_States_Is_ready( executing->current_state ) )
2008468: c2 04 20 10 ld [ %l0 + 0x10 ], %g1
200846c: 80 a0 60 00 cmp %g1, 0
2008470: 12 80 00 1f bne 20084ec <_Thread_Tickle_timeslice+0xa0>
2008474: 01 00 00 00 nop
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
2008478: c2 04 20 7c ld [ %l0 + 0x7c ], %g1
200847c: 80 a0 60 01 cmp %g1, 1
2008480: 0a 80 00 12 bcs 20084c8 <_Thread_Tickle_timeslice+0x7c>
2008484: 80 a0 60 02 cmp %g1, 2
2008488: 28 80 00 07 bleu,a 20084a4 <_Thread_Tickle_timeslice+0x58>
200848c: c2 04 20 78 ld [ %l0 + 0x78 ], %g1
2008490: 80 a0 60 03 cmp %g1, 3
2008494: 12 80 00 16 bne 20084ec <_Thread_Tickle_timeslice+0xa0> <== NEVER TAKEN
2008498: 01 00 00 00 nop
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
}
break;
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
200849c: 10 80 00 0d b 20084d0 <_Thread_Tickle_timeslice+0x84>
20084a0: c2 04 20 78 ld [ %l0 + 0x78 ], %g1
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
break;
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
if ( (int)(--executing->cpu_time_budget) <= 0 ) {
20084a4: 82 00 7f ff add %g1, -1, %g1
20084a8: 80 a0 60 00 cmp %g1, 0
20084ac: 14 80 00 07 bg 20084c8 <_Thread_Tickle_timeslice+0x7c>
20084b0: c2 24 20 78 st %g1, [ %l0 + 0x78 ]
_Thread_Reset_timeslice();
20084b4: 40 00 0f 06 call 200c0cc <_Thread_Reset_timeslice>
20084b8: 01 00 00 00 nop
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
20084bc: 03 00 80 5d sethi %hi(0x2017400), %g1
20084c0: c2 00 63 78 ld [ %g1 + 0x378 ], %g1 ! 2017778 <_Thread_Ticks_per_timeslice>
20084c4: c2 24 20 78 st %g1, [ %l0 + 0x78 ]
20084c8: 81 c7 e0 08 ret
20084cc: 81 e8 00 00 restore
}
break;
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
20084d0: 82 00 7f ff add %g1, -1, %g1
20084d4: 80 a0 60 00 cmp %g1, 0
20084d8: 12 bf ff fc bne 20084c8 <_Thread_Tickle_timeslice+0x7c>
20084dc: c2 24 20 78 st %g1, [ %l0 + 0x78 ]
(*executing->budget_callout)( executing );
20084e0: c2 04 20 80 ld [ %l0 + 0x80 ], %g1
20084e4: 9f c0 40 00 call %g1
20084e8: 90 10 00 10 mov %l0, %o0
20084ec: 81 c7 e0 08 ret
20084f0: 81 e8 00 00 restore
020084f4 <_Thread_Yield_processor>:
* ready chain
* select heir
*/
void _Thread_Yield_processor( void )
{
20084f4: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
20084f8: 03 00 80 5e sethi %hi(0x2017800), %g1
20084fc: e0 00 60 e4 ld [ %g1 + 0xe4 ], %l0 ! 20178e4 <_Thread_Executing>
ready = executing->ready;
_ISR_Disable( level );
2008500: 7f ff e6 1b call 2001d6c <sparc_disable_interrupts>
2008504: e2 04 20 8c ld [ %l0 + 0x8c ], %l1
2008508: b0 10 00 08 mov %o0, %i0
if ( !_Chain_Has_only_one_node( ready ) ) {
200850c: c4 04 40 00 ld [ %l1 ], %g2
2008510: c2 04 60 08 ld [ %l1 + 8 ], %g1
2008514: 80 a0 80 01 cmp %g2, %g1
2008518: 02 80 00 17 be 2008574 <_Thread_Yield_processor+0x80>
200851c: 25 00 80 5e sethi %hi(0x2017800), %l2
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
2008520: c6 04 00 00 ld [ %l0 ], %g3
previous = the_node->previous;
2008524: c4 04 20 04 ld [ %l0 + 4 ], %g2
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
2008528: 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;
200852c: c6 20 80 00 st %g3, [ %g2 ]
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
2008530: c2 24 00 00 st %g1, [ %l0 ]
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
2008534: 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;
2008538: c2 04 60 08 ld [ %l1 + 8 ], %g1
the_chain->last = the_node;
200853c: e0 24 60 08 st %l0, [ %l1 + 8 ]
old_last_node->next = the_node;
the_node->previous = old_last_node;
2008540: 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;
2008544: e0 20 40 00 st %l0, [ %g1 ]
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
2008548: 7f ff e6 0d call 2001d7c <sparc_enable_interrupts>
200854c: 01 00 00 00 nop
2008550: 7f ff e6 07 call 2001d6c <sparc_disable_interrupts>
2008554: 01 00 00 00 nop
if ( _Thread_Is_heir( executing ) )
2008558: c2 04 a0 b0 ld [ %l2 + 0xb0 ], %g1
200855c: 80 a4 00 01 cmp %l0, %g1
2008560: 12 80 00 09 bne 2008584 <_Thread_Yield_processor+0x90> <== NEVER TAKEN
2008564: 84 10 20 01 mov 1, %g2
_Thread_Heir = (Thread_Control *) ready->first;
2008568: c2 04 40 00 ld [ %l1 ], %g1
200856c: 10 80 00 06 b 2008584 <_Thread_Yield_processor+0x90>
2008570: c2 24 a0 b0 st %g1, [ %l2 + 0xb0 ]
_Context_Switch_necessary = TRUE;
}
else if ( !_Thread_Is_heir( executing ) )
2008574: c2 04 a0 b0 ld [ %l2 + 0xb0 ], %g1
2008578: 80 a4 00 01 cmp %l0, %g1
200857c: 02 80 00 04 be 200858c <_Thread_Yield_processor+0x98> <== ALWAYS TAKEN
2008580: 84 10 20 01 mov 1, %g2
_Context_Switch_necessary = TRUE;
2008584: 03 00 80 5e sethi %hi(0x2017800), %g1
2008588: c4 28 60 f4 stb %g2, [ %g1 + 0xf4 ] ! 20178f4 <_Context_Switch_necessary>
_ISR_Enable( level );
200858c: 7f ff e5 fc call 2001d7c <sparc_enable_interrupts>
2008590: 81 e8 00 00 restore
02007d08 <_Thread_queue_Enqueue_priority>:
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
2007d08: 9d e3 bf 98 save %sp, -104, %sp
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
2007d0c: 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);
2007d10: 82 06 60 3c add %i1, 0x3c, %g1
the_chain->permanent_null = NULL;
2007d14: c0 26 60 3c clr [ %i1 + 0x3c ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
2007d18: c2 26 60 38 st %g1, [ %i1 + 0x38 ]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
2007d1c: 82 06 60 38 add %i1, 0x38, %g1
2007d20: c2 26 60 40 st %g1, [ %i1 + 0x40 ]
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
2007d24: 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);
2007d28: 83 34 a0 06 srl %l2, 6, %g1
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
2007d2c: ec 06 20 38 ld [ %i0 + 0x38 ], %l6
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
2007d30: 85 28 60 04 sll %g1, 4, %g2
2007d34: 83 28 60 02 sll %g1, 2, %g1
2007d38: 84 20 80 01 sub %g2, %g1, %g2
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
2007d3c: 12 80 00 31 bne 2007e00 <_Thread_queue_Enqueue_priority+0xf8>
2007d40: a6 06 00 02 add %i0, %g2, %l3
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
2007d44: a8 04 e0 04 add %l3, 4, %l4
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
2007d48: aa 10 00 02 mov %g2, %l5
if ( _Thread_queue_Is_reverse_search( priority ) )
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
2007d4c: 7f ff e8 08 call 2001d6c <sparc_disable_interrupts>
2007d50: 01 00 00 00 nop
2007d54: a6 10 00 08 mov %o0, %l3
search_thread = (Thread_Control *) header->first;
2007d58: a2 10 3f ff mov -1, %l1
2007d5c: 10 80 00 18 b 2007dbc <_Thread_queue_Enqueue_priority+0xb4>
2007d60: e0 06 00 15 ld [ %i0 + %l5 ], %l0
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
2007d64: 80 a4 80 11 cmp %l2, %l1
2007d68: 28 80 00 19 bleu,a 2007dcc <_Thread_queue_Enqueue_priority+0xc4>
2007d6c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
break;
#if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE )
search_thread = (Thread_Control *) search_thread->Object.Node.next;
2007d70: e0 04 00 00 ld [ %l0 ], %l0
if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) )
2007d74: 80 a4 00 14 cmp %l0, %l4
2007d78: 22 80 00 15 be,a 2007dcc <_Thread_queue_Enqueue_priority+0xc4>
2007d7c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
break;
search_priority = search_thread->current_priority;
2007d80: e2 04 20 14 ld [ %l0 + 0x14 ], %l1
if ( priority <= search_priority )
2007d84: 80 a4 80 11 cmp %l2, %l1
2007d88: 28 80 00 11 bleu,a 2007dcc <_Thread_queue_Enqueue_priority+0xc4>
2007d8c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
break;
#endif
_ISR_Flash( level );
2007d90: 7f ff e7 fb call 2001d7c <sparc_enable_interrupts>
2007d94: 90 10 00 13 mov %l3, %o0
2007d98: 7f ff e7 f5 call 2001d6c <sparc_disable_interrupts>
2007d9c: 01 00 00 00 nop
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
2007da0: c2 04 20 10 ld [ %l0 + 0x10 ], %g1
2007da4: 80 8d 80 01 btst %l6, %g1
2007da8: 32 80 00 05 bne,a 2007dbc <_Thread_queue_Enqueue_priority+0xb4><== ALWAYS TAKEN
2007dac: e0 04 00 00 ld [ %l0 ], %l0
_ISR_Enable( level );
2007db0: 7f ff e7 f3 call 2001d7c <sparc_enable_interrupts> <== NOT EXECUTED
2007db4: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
2007db8: 30 bf ff e5 b,a 2007d4c <_Thread_queue_Enqueue_priority+0x44><== NOT EXECUTED
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
2007dbc: 80 a4 00 14 cmp %l0, %l4
2007dc0: 32 bf ff e9 bne,a 2007d64 <_Thread_queue_Enqueue_priority+0x5c>
2007dc4: e2 04 20 14 ld [ %l0 + 0x14 ], %l1
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
2007dc8: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
2007dcc: 80 a0 60 01 cmp %g1, 1
2007dd0: 12 80 00 48 bne 2007ef0 <_Thread_queue_Enqueue_priority+0x1e8><== NEVER TAKEN
2007dd4: 90 10 00 13 mov %l3, %o0
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
2007dd8: 80 a4 80 11 cmp %l2, %l1
2007ddc: 02 80 00 3a be 2007ec4 <_Thread_queue_Enqueue_priority+0x1bc>
2007de0: c0 26 20 30 clr [ %i0 + 0x30 ]
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
2007de4: c2 04 20 04 ld [ %l0 + 4 ], %g1
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
2007de8: e0 26 40 00 st %l0, [ %i1 ]
the_node->previous = previous_node;
2007dec: 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;
2007df0: f0 26 60 44 st %i0, [ %i1 + 0x44 ]
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
previous_node->next = the_node;
2007df4: f2 20 40 00 st %i1, [ %g1 ]
search_node->previous = the_node;
2007df8: f2 24 20 04 st %i1, [ %l0 + 4 ]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
2007dfc: 30 80 00 39 b,a 2007ee0 <_Thread_queue_Enqueue_priority+0x1d8>
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
2007e00: 03 00 80 5a sethi %hi(0x2016800), %g1
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
2007e04: aa 10 00 13 mov %l3, %l5
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
2007e08: ae 10 61 f4 or %g1, 0x1f4, %l7
2007e0c: c2 0d c0 00 ldub [ %l7 ], %g1
_ISR_Disable( level );
2007e10: 7f ff e7 d7 call 2001d6c <sparc_disable_interrupts>
2007e14: a2 00 60 01 add %g1, 1, %l1
2007e18: a8 10 00 08 mov %o0, %l4
search_thread = (Thread_Control *) header->last;
2007e1c: 10 80 00 19 b 2007e80 <_Thread_queue_Enqueue_priority+0x178>
2007e20: e0 05 60 08 ld [ %l5 + 8 ], %l0
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
2007e24: 80 a4 80 11 cmp %l2, %l1
2007e28: 3a 80 00 1a bcc,a 2007e90 <_Thread_queue_Enqueue_priority+0x188>
2007e2c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
break;
#if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE )
search_thread = (Thread_Control *) search_thread->Object.Node.previous;
2007e30: e0 04 20 04 ld [ %l0 + 4 ], %l0
if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) )
2007e34: 80 a4 00 13 cmp %l0, %l3
2007e38: 22 80 00 16 be,a 2007e90 <_Thread_queue_Enqueue_priority+0x188>
2007e3c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
break;
search_priority = search_thread->current_priority;
2007e40: e2 04 20 14 ld [ %l0 + 0x14 ], %l1
if ( priority >= search_priority )
2007e44: 80 a4 80 11 cmp %l2, %l1
2007e48: 3a 80 00 12 bcc,a 2007e90 <_Thread_queue_Enqueue_priority+0x188>
2007e4c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
break;
#endif
_ISR_Flash( level );
2007e50: 7f ff e7 cb call 2001d7c <sparc_enable_interrupts>
2007e54: 90 10 00 14 mov %l4, %o0
2007e58: 7f ff e7 c5 call 2001d6c <sparc_disable_interrupts>
2007e5c: 01 00 00 00 nop
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
2007e60: c2 04 20 10 ld [ %l0 + 0x10 ], %g1
2007e64: 80 8d 80 01 btst %l6, %g1
2007e68: 32 80 00 06 bne,a 2007e80 <_Thread_queue_Enqueue_priority+0x178><== ALWAYS TAKEN
2007e6c: e0 04 20 04 ld [ %l0 + 4 ], %l0
_ISR_Enable( level );
2007e70: 7f ff e7 c3 call 2001d7c <sparc_enable_interrupts> <== NOT EXECUTED
2007e74: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
2007e78: 10 bf ff e6 b 2007e10 <_Thread_queue_Enqueue_priority+0x108><== NOT EXECUTED
2007e7c: c2 0d c0 00 ldub [ %l7 ], %g1 <== NOT EXECUTED
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
2007e80: 80 a4 00 13 cmp %l0, %l3
2007e84: 32 bf ff e8 bne,a 2007e24 <_Thread_queue_Enqueue_priority+0x11c>
2007e88: e2 04 20 14 ld [ %l0 + 0x14 ], %l1
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
2007e8c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
2007e90: 80 a0 60 01 cmp %g1, 1
2007e94: 12 80 00 17 bne 2007ef0 <_Thread_queue_Enqueue_priority+0x1e8><== NEVER TAKEN
2007e98: 90 10 00 14 mov %l4, %o0
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
2007e9c: 80 a4 80 11 cmp %l2, %l1
2007ea0: 02 80 00 09 be 2007ec4 <_Thread_queue_Enqueue_priority+0x1bc>
2007ea4: c0 26 20 30 clr [ %i0 + 0x30 ]
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
2007ea8: c2 04 00 00 ld [ %l0 ], %g1
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
2007eac: 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;
2007eb0: 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;
2007eb4: f0 26 60 44 st %i0, [ %i1 + 0x44 ]
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
search_node->next = the_node;
next_node->previous = the_node;
2007eb8: f2 20 60 04 st %i1, [ %g1 + 4 ]
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
search_node->next = the_node;
2007ebc: f2 24 00 00 st %i1, [ %l0 ]
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
2007ec0: 30 80 00 08 b,a 2007ee0 <_Thread_queue_Enqueue_priority+0x1d8>
2007ec4: 82 04 20 3c add %l0, 0x3c, %g1
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
previous_node = search_node->previous;
2007ec8: c4 00 60 04 ld [ %g1 + 4 ], %g2
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
2007ecc: c2 26 40 00 st %g1, [ %i1 ]
the_node->previous = previous_node;
2007ed0: 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;
2007ed4: f0 26 60 44 st %i0, [ %i1 + 0x44 ]
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
previous_node->next = the_node;
2007ed8: f2 20 80 00 st %i1, [ %g2 ]
search_node->previous = the_node;
2007edc: f2 20 60 04 st %i1, [ %g1 + 4 ]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
2007ee0: 7f ff e7 a7 call 2001d7c <sparc_enable_interrupts>
2007ee4: b0 10 20 01 mov 1, %i0
2007ee8: 81 c7 e0 08 ret
2007eec: 81 e8 00 00 restore
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
2007ef0: f0 06 20 30 ld [ %i0 + 0x30 ], %i0 <== NOT EXECUTED
* For example, the blocking thread could have been given
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
2007ef4: d0 26 80 00 st %o0, [ %i2 ] <== NOT EXECUTED
return the_thread_queue->sync_state;
}
2007ef8: 81 c7 e0 08 ret <== NOT EXECUTED
2007efc: 81 e8 00 00 restore <== NOT EXECUTED
0200cf50 <_Thread_queue_Extract_fifo>:
void _Thread_queue_Extract_fifo(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
200cf50: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
_ISR_Disable( level );
200cf54: 7f ff d3 86 call 2001d6c <sparc_disable_interrupts>
200cf58: b0 10 00 19 mov %i1, %i0
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
200cf5c: c4 06 60 10 ld [ %i1 + 0x10 ], %g2
200cf60: 03 00 00 ef sethi %hi(0x3bc00), %g1
200cf64: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0>
200cf68: 80 88 80 01 btst %g2, %g1
200cf6c: 32 80 00 04 bne,a 200cf7c <_Thread_queue_Extract_fifo+0x2c><== ALWAYS TAKEN
200cf70: c2 06 40 00 ld [ %i1 ], %g1
_ISR_Enable( level );
200cf74: 7f ff d3 82 call 2001d7c <sparc_enable_interrupts> <== NOT EXECUTED
200cf78: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
200cf7c: 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 ) ) {
200cf80: c6 06 60 50 ld [ %i1 + 0x50 ], %g3
next->previous = previous;
previous->next = next;
200cf84: c2 20 80 00 st %g1, [ %g2 ]
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
200cf88: c4 20 60 04 st %g2, [ %g1 + 4 ]
200cf8c: 80 a0 e0 02 cmp %g3, 2
200cf90: 02 80 00 06 be 200cfa8 <_Thread_queue_Extract_fifo+0x58>
200cf94: c0 26 60 44 clr [ %i1 + 0x44 ]
_ISR_Enable( level );
200cf98: 7f ff d3 79 call 2001d7c <sparc_enable_interrupts>
200cf9c: 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 );
200cfa0: 10 80 00 0a b 200cfc8 <_Thread_queue_Extract_fifo+0x78>
200cfa4: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <RAM_END+0xdc3fff8>
200cfa8: 82 10 20 03 mov 3, %g1
200cfac: c2 26 60 50 st %g1, [ %i1 + 0x50 ]
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
200cfb0: 7f ff d3 73 call 2001d7c <sparc_enable_interrupts>
200cfb4: 01 00 00 00 nop
(void) _Watchdog_Remove( &the_thread->Timer );
200cfb8: 7f ff ee a8 call 2008a58 <_Watchdog_Remove>
200cfbc: 90 06 60 48 add %i1, 0x48, %o0
200cfc0: 33 04 00 ff sethi %hi(0x1003fc00), %i1
200cfc4: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <RAM_END+0xdc3fff8>
200cfc8: 7f ff e8 be call 20072c0 <_Thread_Clear_state>
200cfcc: 81 e8 00 00 restore
0200be48 <_Thread_queue_Extract_priority_helper>:
void _Thread_queue_Extract_priority_helper(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
bool requeuing
)
{
200be48: 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 );
200be4c: 7f ff d7 c8 call 2001d6c <sparc_disable_interrupts>
200be50: b0 10 00 19 mov %i1, %i0
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
200be54: c4 06 60 10 ld [ %i1 + 0x10 ], %g2
200be58: 03 00 00 ef sethi %hi(0x3bc00), %g1
200be5c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0>
200be60: 80 88 80 01 btst %g2, %g1
200be64: 32 80 00 03 bne,a 200be70 <_Thread_queue_Extract_priority_helper+0x28><== ALWAYS TAKEN
200be68: c6 06 60 38 ld [ %i1 + 0x38 ], %g3
_ISR_Enable( level );
200be6c: 30 80 00 1c b,a 200bedc <_Thread_queue_Extract_priority_helper+0x94><== NOT EXECUTED
*/
next_node = the_node->next;
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
200be70: 82 06 60 3c add %i1, 0x3c, %g1
/*
* The thread was actually waiting on a thread queue so let's remove it.
*/
next_node = the_node->next;
200be74: c4 06 40 00 ld [ %i1 ], %g2
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
200be78: 80 a0 c0 01 cmp %g3, %g1
200be7c: 02 80 00 13 be 200bec8 <_Thread_queue_Extract_priority_helper+0x80>
200be80: c2 06 60 04 ld [ %i1 + 4 ], %g1
new_first_node = the_thread->Wait.Block2n.first;
new_first_thread = (Thread_Control *) new_first_node;
last_node = the_thread->Wait.Block2n.last;
200be84: da 06 60 40 ld [ %i1 + 0x40 ], %o5
new_second_node = new_first_node->next;
200be88: c8 00 c0 00 ld [ %g3 ], %g4
previous_node->next = new_first_node;
next_node->previous = new_first_node;
200be8c: 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;
200be90: c6 20 40 00 st %g3, [ %g1 ]
next_node->previous = new_first_node;
new_first_node->next = next_node;
200be94: c4 20 c0 00 st %g2, [ %g3 ]
new_first_node->previous = previous_node;
200be98: c2 20 e0 04 st %g1, [ %g3 + 4 ]
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
200be9c: c4 06 60 38 ld [ %i1 + 0x38 ], %g2
200bea0: c2 06 60 40 ld [ %i1 + 0x40 ], %g1
200bea4: 80 a0 80 01 cmp %g2, %g1
200bea8: 02 80 00 0a be 200bed0 <_Thread_queue_Extract_priority_helper+0x88>
200beac: 82 00 e0 38 add %g3, 0x38, %g1
/* > two threads on 2-n */
new_second_node->previous =
200beb0: c2 21 20 04 st %g1, [ %g4 + 4 ]
_Chain_Head( &new_first_thread->Wait.Block2n );
new_first_thread->Wait.Block2n.first = new_second_node;
200beb4: c8 20 e0 38 st %g4, [ %g3 + 0x38 ]
new_first_thread->Wait.Block2n.last = last_node;
200beb8: da 20 e0 40 st %o5, [ %g3 + 0x40 ]
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
200bebc: 82 00 e0 3c add %g3, 0x3c, %g1
200bec0: 10 80 00 04 b 200bed0 <_Thread_queue_Extract_priority_helper+0x88>
200bec4: c2 23 40 00 st %g1, [ %o5 ]
}
} else {
previous_node->next = next_node;
next_node->previous = previous_node;
200bec8: 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;
200becc: c4 20 40 00 st %g2, [ %g1 ]
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
200bed0: 80 8e a0 ff btst 0xff, %i2
200bed4: 22 80 00 04 be,a 200bee4 <_Thread_queue_Extract_priority_helper+0x9c>
200bed8: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
_ISR_Enable( level );
200bedc: 7f ff d7 a8 call 2001d7c <sparc_enable_interrupts>
200bee0: 91 e8 00 08 restore %g0, %o0, %o0
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
200bee4: 80 a0 60 02 cmp %g1, 2
200bee8: 02 80 00 06 be 200bf00 <_Thread_queue_Extract_priority_helper+0xb8>
200beec: 82 10 20 03 mov 3, %g1
_ISR_Enable( level );
200bef0: 7f ff d7 a3 call 2001d7c <sparc_enable_interrupts>
200bef4: 33 04 00 ff sethi %hi(0x1003fc00), %i1
200bef8: 10 80 00 08 b 200bf18 <_Thread_queue_Extract_priority_helper+0xd0>
200befc: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <RAM_END+0xdc3fff8>
200bf00: c2 26 20 50 st %g1, [ %i0 + 0x50 ]
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
200bf04: 7f ff d7 9e call 2001d7c <sparc_enable_interrupts>
200bf08: 33 04 00 ff sethi %hi(0x1003fc00), %i1
(void) _Watchdog_Remove( &the_thread->Timer );
200bf0c: 7f ff f2 d3 call 2008a58 <_Watchdog_Remove>
200bf10: 90 06 20 48 add %i0, 0x48, %o0
200bf14: b2 16 63 f8 or %i1, 0x3f8, %i1
200bf18: 7f ff ec ea call 20072c0 <_Thread_Clear_state>
200bf1c: 81 e8 00 00 restore
0200bf24 <_Thread_queue_Process_timeout>:
void _Thread_queue_Process_timeout(
Thread_Control *the_thread
)
{
Thread_queue_Control *the_thread_queue = the_thread->Wait.queue;
200bf24: c4 02 20 44 ld [ %o0 + 0x44 ], %g2
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
200bf28: c6 00 a0 30 ld [ %g2 + 0x30 ], %g3
200bf2c: 80 a0 e0 00 cmp %g3, 0
200bf30: 02 80 00 0f be 200bf6c <_Thread_queue_Process_timeout+0x48>
200bf34: 92 10 00 08 mov %o0, %o1
200bf38: 03 00 80 5e sethi %hi(0x2017800), %g1
200bf3c: c2 00 60 e4 ld [ %g1 + 0xe4 ], %g1 ! 20178e4 <_Thread_Executing>
200bf40: 80 a2 00 01 cmp %o0, %g1
200bf44: 32 80 00 0b bne,a 200bf70 <_Thread_queue_Process_timeout+0x4c><== NEVER TAKEN
200bf48: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 <== NOT EXECUTED
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
200bf4c: 80 a0 e0 03 cmp %g3, 3
200bf50: 02 80 00 0d be 200bf84 <_Thread_queue_Process_timeout+0x60><== NEVER TAKEN
200bf54: 01 00 00 00 nop
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
200bf58: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1
200bf5c: c2 22 20 34 st %g1, [ %o0 + 0x34 ]
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
200bf60: 82 10 20 02 mov 2, %g1
200bf64: 81 c3 e0 08 retl
200bf68: c2 20 a0 30 st %g1, [ %g2 + 0x30 ]
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
200bf6c: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
200bf70: d0 02 60 44 ld [ %o1 + 0x44 ], %o0
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
200bf74: c2 22 60 34 st %g1, [ %o1 + 0x34 ]
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
200bf78: 82 13 c0 00 mov %o7, %g1
200bf7c: 7f ff ff a8 call 200be1c <_Thread_queue_Extract>
200bf80: 9e 10 40 00 mov %g1, %o7
200bf84: 81 c3 e0 08 retl <== NOT EXECUTED
02007fcc <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
2007fcc: 9d e3 bf 90 save %sp, -112, %sp
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
2007fd0: 80 a6 20 00 cmp %i0, 0
2007fd4: 02 80 00 19 be 2008038 <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN
2007fd8: 01 00 00 00 nop
/*
* If queueing by FIFO, there is nothing to do. This only applies to
* priority blocking discipline.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
2007fdc: e0 06 20 34 ld [ %i0 + 0x34 ], %l0
2007fe0: 80 a4 20 01 cmp %l0, 1
2007fe4: 12 80 00 15 bne 2008038 <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN
2007fe8: 01 00 00 00 nop
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
2007fec: 7f ff e7 60 call 2001d6c <sparc_disable_interrupts>
2007ff0: 01 00 00 00 nop
2007ff4: a2 10 00 08 mov %o0, %l1
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
2007ff8: c4 06 60 10 ld [ %i1 + 0x10 ], %g2
2007ffc: 03 00 00 ef sethi %hi(0x3bc00), %g1
2008000: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0>
2008004: 80 88 80 01 btst %g2, %g1
2008008: 02 80 00 0a be 2008030 <_Thread_queue_Requeue+0x64> <== NEVER TAKEN
200800c: 94 10 20 01 mov 1, %o2
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, TRUE );
2008010: 90 10 00 18 mov %i0, %o0
2008014: 92 10 00 19 mov %i1, %o1
2008018: 40 00 0f 8c call 200be48 <_Thread_queue_Extract_priority_helper>
200801c: e0 26 20 30 st %l0, [ %i0 + 0x30 ]
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
2008020: 90 10 00 18 mov %i0, %o0
2008024: 92 10 00 19 mov %i1, %o1
2008028: 7f ff ff 38 call 2007d08 <_Thread_queue_Enqueue_priority>
200802c: 94 07 bf f4 add %fp, -12, %o2
}
_ISR_Enable( level );
2008030: 7f ff e7 53 call 2001d7c <sparc_enable_interrupts>
2008034: 90 10 00 11 mov %l1, %o0
2008038: 81 c7 e0 08 ret
200803c: 81 e8 00 00 restore
02008040 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored
)
{
2008040: 9d e3 bf 90 save %sp, -112, %sp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
2008044: 90 10 00 18 mov %i0, %o0
2008048: 7f ff fd c1 call 200774c <_Thread_Get>
200804c: 92 07 bf f4 add %fp, -12, %o1
switch ( location ) {
2008050: c2 07 bf f4 ld [ %fp + -12 ], %g1
2008054: 80 a0 60 00 cmp %g1, 0
2008058: 12 80 00 08 bne 2008078 <_Thread_queue_Timeout+0x38> <== NEVER TAKEN
200805c: 01 00 00 00 nop
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
2008060: 40 00 0f b1 call 200bf24 <_Thread_queue_Process_timeout>
2008064: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
2008068: 05 00 80 5e sethi %hi(0x2017800), %g2
200806c: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 ! 2017820 <_Thread_Dispatch_disable_level>
2008070: 82 00 7f ff add %g1, -1, %g1
2008074: c2 20 a0 20 st %g1, [ %g2 + 0x20 ]
2008078: 81 c7 e0 08 ret
200807c: 81 e8 00 00 restore
02011b2c <_Timer_Server_body>:
* @param[in] ignored is the the task argument that is ignored
*/
Thread _Timer_Server_body(
uint32_t ignored
)
{
2011b2c: 9d e3 bf 88 save %sp, -120, %sp
2011b30: 07 00 80 c6 sethi %hi(0x2031800), %g3
/*
* Initialize the "last time" markers to indicate the timer that
* the server was initiated.
*/
_Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot;
2011b34: 09 00 80 c6 sethi %hi(0x2031800), %g4
2011b38: c4 01 22 64 ld [ %g4 + 0x264 ], %g2 ! 2031a64 <_Watchdog_Ticks_since_boot>
2011b3c: c2 00 e1 10 ld [ %g3 + 0x110 ], %g1
_Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch;
2011b40: 1b 00 80 c6 sethi %hi(0x2031800), %o5
2011b44: d8 03 61 a4 ld [ %o5 + 0x1a4 ], %o4 ! 20319a4 <_TOD_Now>
2011b48: 82 00 60 01 inc %g1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
2011b4c: ac 07 bf ec add %fp, -20, %l6
2011b50: c2 20 e1 10 st %g1, [ %g3 + 0x110 ]
2011b54: b6 07 bf f0 add %fp, -16, %i3
/*
* Initialize the "last time" markers to indicate the timer that
* the server was initiated.
*/
_Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot;
2011b58: 03 00 80 c6 sethi %hi(0x2031800), %g1
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
2011b5c: c0 27 bf f0 clr [ %fp + -16 ]
2011b60: c4 20 60 14 st %g2, [ %g1 + 0x14 ]
the_chain->last = _Chain_Head(the_chain);
2011b64: ec 27 bf f4 st %l6, [ %fp + -12 ]
_Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch;
2011b68: 05 00 80 c6 sethi %hi(0x2031800), %g2
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
2011b6c: f6 27 bf ec st %i3, [ %fp + -20 ]
2011b70: d8 20 a0 10 st %o4, [ %g2 + 0x10 ]
/*
* Initialize the "last time" markers to indicate the timer that
* the server was initiated.
*/
_Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot;
2011b74: 82 10 60 14 or %g1, 0x14, %g1
_Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch;
2011b78: 84 10 a0 10 or %g2, 0x10, %g2
2011b7c: 86 10 e1 10 or %g3, 0x110, %g3
{
Watchdog_Interval snapshot;
Watchdog_Interval ticks;
snapshot = _Watchdog_Ticks_since_boot;
if ( snapshot >= _Timer_Server_ticks_last_time )
2011b80: b8 10 00 01 mov %g1, %i4
2011b84: a4 10 00 03 mov %g3, %l2
/*
* Insert the timers that were inserted before we got to run.
* This should be done with dispatching disabled.
*/
_Thread_Disable_dispatch();
_Timer_Server_process_insertions();
2011b88: 7f ff ff cc call 2011ab8 <_Timer_Server_process_insertions>
2011b8c: ba 10 00 02 mov %g2, %i5
_Thread_Enable_dispatch();
2011b90: 40 00 0b 8e call 20149c8 <_Thread_Enable_dispatch>
2011b94: ae 10 00 16 mov %l6, %l7
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( _Timer_Server, STATES_DELAYING );
2011b98: 03 00 80 c8 sethi %hi(0x2032000), %g1
2011b9c: aa 10 62 c0 or %g1, 0x2c0, %l5 ! 20322c0 <_Timer_Server>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
2011ba0: 03 00 80 c6 sethi %hi(0x2031800), %g1
2011ba4: a8 10 60 04 or %g1, 4, %l4 ! 2031804 <_Timer_Ticks_chain>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2011ba8: 03 00 80 c6 sethi %hi(0x2031800), %g1
2011bac: a2 10 60 18 or %g1, 0x18, %l1 ! 2031818 <_Timer_Seconds_chain>
2011bb0: 03 00 80 c6 sethi %hi(0x2031800), %g1
2011bb4: a6 10 60 30 or %g1, 0x30, %l3 ! 2031830 <_Timer_Seconds_timer>
_Timer_Server_reset_ticks_timer();
2011bb8: b2 05 20 04 add %l4, 4, %i1
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
2011bbc: 03 00 80 c6 sethi %hi(0x2031800), %g1
_Timer_Server_reset_seconds_timer();
2011bc0: b4 04 60 04 add %l1, 4, %i2
2011bc4: b0 10 61 e8 or %g1, 0x1e8, %i0
2011bc8: c2 04 80 00 ld [ %l2 ], %g1
2011bcc: 82 00 60 01 inc %g1
2011bd0: c2 24 80 00 st %g1, [ %l2 ]
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( _Timer_Server, STATES_DELAYING );
2011bd4: d0 05 40 00 ld [ %l5 ], %o0
2011bd8: 40 00 0e 54 call 2015528 <_Thread_Set_state>
2011bdc: 92 10 20 08 mov 8, %o1
2011be0: c2 05 00 00 ld [ %l4 ], %g1
_Timer_Server_reset_ticks_timer();
2011be4: 80 a0 40 19 cmp %g1, %i1
2011be8: 02 80 00 08 be 2011c08 <_Timer_Server_body+0xdc>
2011bec: 11 00 80 c6 sethi %hi(0x2031800), %o0
2011bf0: d2 05 40 00 ld [ %l5 ], %o1
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2011bf4: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
2011bf8: c2 22 60 54 st %g1, [ %o1 + 0x54 ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2011bfc: 90 12 21 f4 or %o0, 0x1f4, %o0
2011c00: 40 00 11 43 call 201610c <_Watchdog_Insert>
2011c04: 92 02 60 48 add %o1, 0x48, %o1
2011c08: c2 04 40 00 ld [ %l1 ], %g1
_Timer_Server_reset_seconds_timer();
2011c0c: 80 a0 40 1a cmp %g1, %i2
2011c10: 02 80 00 07 be 2011c2c <_Timer_Server_body+0x100>
2011c14: 01 00 00 00 nop
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2011c18: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
2011c1c: 90 10 00 18 mov %i0, %o0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2011c20: c2 24 e0 0c st %g1, [ %l3 + 0xc ]
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
2011c24: 40 00 11 3a call 201610c <_Watchdog_Insert>
2011c28: 92 10 00 13 mov %l3, %o1
_Thread_Enable_dispatch();
2011c2c: 40 00 0b 67 call 20149c8 <_Thread_Enable_dispatch>
2011c30: 01 00 00 00 nop
2011c34: c2 04 80 00 ld [ %l2 ], %g1
2011c38: 82 00 60 01 inc %g1
2011c3c: c2 24 80 00 st %g1, [ %l2 ]
/*
* 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();
2011c40: d0 05 40 00 ld [ %l5 ], %o0
2011c44: 40 00 11 8c call 2016274 <_Watchdog_Remove>
2011c48: 90 02 20 48 add %o0, 0x48, %o0
_Timer_Server_stop_seconds_timer();
2011c4c: 40 00 11 8a call 2016274 <_Watchdog_Remove>
2011c50: 90 10 00 13 mov %l3, %o0
{
Watchdog_Interval snapshot;
Watchdog_Interval ticks;
snapshot = _Watchdog_Ticks_since_boot;
if ( snapshot >= _Timer_Server_ticks_last_time )
2011c54: c4 07 00 00 ld [ %i4 ], %g2
)
{
Watchdog_Interval snapshot;
Watchdog_Interval ticks;
snapshot = _Watchdog_Ticks_since_boot;
2011c58: 03 00 80 c6 sethi %hi(0x2031800), %g1
2011c5c: 82 10 62 64 or %g1, 0x264, %g1 ! 2031a64 <_Watchdog_Ticks_since_boot>
2011c60: c6 00 40 00 ld [ %g1 ], %g3
if ( snapshot >= _Timer_Server_ticks_last_time )
ticks = snapshot - _Timer_Server_ticks_last_time;
else
ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot;
2011c64: 82 38 00 02 xnor %g0, %g2, %g1
{
Watchdog_Interval snapshot;
Watchdog_Interval ticks;
snapshot = _Watchdog_Ticks_since_boot;
if ( snapshot >= _Timer_Server_ticks_last_time )
2011c68: 80 a0 c0 02 cmp %g3, %g2
2011c6c: 0a 80 00 03 bcs 2011c78 <_Timer_Server_body+0x14c> <== NEVER TAKEN
2011c70: 92 00 40 03 add %g1, %g3, %o1
ticks = snapshot - _Timer_Server_ticks_last_time;
2011c74: 92 20 c0 02 sub %g3, %g2, %o1
else
ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot;
_Timer_Server_ticks_last_time = snapshot;
_Watchdog_Adjust_to_chain( &_Timer_Ticks_chain, ticks, to_fire );
2011c78: 94 10 00 17 mov %l7, %o2
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;
2011c7c: c6 27 00 00 st %g3, [ %i4 ]
_Watchdog_Adjust_to_chain( &_Timer_Ticks_chain, ticks, to_fire );
2011c80: 40 00 10 ee call 2016038 <_Watchdog_Adjust_to_chain>
2011c84: 90 10 00 14 mov %l4, %o0
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the _Timer_Seconds_chain to indicate this.
*/
snapshot = _TOD_Seconds_since_epoch;
2011c88: 03 00 80 c6 sethi %hi(0x2031800), %g1
if ( snapshot > _Timer_Server_seconds_last_time ) {
2011c8c: d4 07 40 00 ld [ %i5 ], %o2
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the _Timer_Seconds_chain to indicate this.
*/
snapshot = _TOD_Seconds_since_epoch;
2011c90: 82 10 61 a4 or %g1, 0x1a4, %g1
2011c94: e0 00 40 00 ld [ %g1 ], %l0
if ( snapshot > _Timer_Server_seconds_last_time ) {
2011c98: 80 a4 00 0a cmp %l0, %o2
2011c9c: 08 80 00 06 bleu 2011cb4 <_Timer_Server_body+0x188>
2011ca0: 92 24 00 0a sub %l0, %o2, %o1
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
ticks = snapshot - _Timer_Server_seconds_last_time;
_Watchdog_Adjust_to_chain( &_Timer_Seconds_chain, ticks, to_fire );
2011ca4: 90 10 00 11 mov %l1, %o0
2011ca8: 40 00 10 e4 call 2016038 <_Watchdog_Adjust_to_chain>
2011cac: 94 10 00 17 mov %l7, %o2
2011cb0: 30 80 00 06 b,a 2011cc8 <_Timer_Server_body+0x19c>
} else if ( snapshot < _Timer_Server_seconds_last_time ) {
2011cb4: 1a 80 00 05 bcc 2011cc8 <_Timer_Server_body+0x19c>
2011cb8: 94 22 80 10 sub %o2, %l0, %o2
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
ticks = _Timer_Server_seconds_last_time - snapshot;
_Watchdog_Adjust( &_Timer_Seconds_chain, WATCHDOG_BACKWARD, ticks );
2011cbc: 90 10 00 11 mov %l1, %o0
2011cc0: 40 00 10 b7 call 2015f9c <_Watchdog_Adjust>
2011cc4: 92 10 20 01 mov 1, %o1
_Timer_Server_process_seconds_chain( &to_fire );
/*
* Insert the timers that have been requested to be inserted.
*/
_Timer_Server_process_insertions();
2011cc8: 7f ff ff 7c call 2011ab8 <_Timer_Server_process_insertions>
2011ccc: e0 27 40 00 st %l0, [ %i5 ]
/*
* Enable dispatching to process the set that are ready "to fire."
*/
_Thread_Enable_dispatch();
2011cd0: 40 00 0b 3e call 20149c8 <_Thread_Enable_dispatch>
2011cd4: 01 00 00 00 nop
*/
while (1) {
Watchdog_Control *watch;
ISR_Level level;
_ISR_Disable( level );
2011cd8: 7f ff e6 13 call 200b524 <sparc_disable_interrupts>
2011cdc: 01 00 00 00 nop
2011ce0: 84 10 00 08 mov %o0, %g2
2011ce4: e0 07 bf ec ld [ %fp + -20 ], %l0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
2011ce8: 80 a4 00 1b cmp %l0, %i3
2011cec: 02 80 00 06 be 2011d04 <_Timer_Server_body+0x1d8>
2011cf0: 80 a4 20 00 cmp %l0, 0
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
2011cf4: c2 04 00 00 ld [ %l0 ], %g1
the_chain->first = new_first;
2011cf8: c2 27 bf ec st %g1, [ %fp + -20 ]
watch = (Watchdog_Control *) _Chain_Get_unprotected( &to_fire );
if ( watch == NULL ) {
2011cfc: 12 80 00 05 bne 2011d10 <_Timer_Server_body+0x1e4> <== ALWAYS TAKEN
2011d00: ec 20 60 04 st %l6, [ %g1 + 4 ]
_ISR_Enable( level );
2011d04: 7f ff e6 0c call 200b534 <sparc_enable_interrupts>
2011d08: 90 10 00 02 mov %g2, %o0
2011d0c: 30 bf ff af b,a 2011bc8 <_Timer_Server_body+0x9c>
break;
}
watch->state = WATCHDOG_INACTIVE;
2011d10: c0 24 20 08 clr [ %l0 + 8 ]
_ISR_Enable( level );
2011d14: 7f ff e6 08 call 200b534 <sparc_enable_interrupts>
2011d18: 01 00 00 00 nop
(*watch->routine)( watch->id, watch->user_data );
2011d1c: d2 04 20 24 ld [ %l0 + 0x24 ], %o1
2011d20: c2 04 20 1c ld [ %l0 + 0x1c ], %g1
2011d24: 9f c0 40 00 call %g1
2011d28: d0 04 20 20 ld [ %l0 + 0x20 ], %o0
2011d2c: 30 bf ff eb b,a 2011cd8 <_Timer_Server_body+0x1ac>
02011ab8 <_Timer_Server_process_insertions>:
* onto one of the Timer Server chains.
*
* @note It is only to be called from the Timer Server task.
*/
static void _Timer_Server_process_insertions(void)
{
2011ab8: 9d e3 bf 98 save %sp, -104, %sp
Timer_Control *the_timer;
while ( 1 ) {
the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted );
2011abc: 03 00 80 c6 sethi %hi(0x2031800), %g1
2011ac0: a4 10 60 24 or %g1, 0x24, %l2 ! 2031824 <_Timer_To_be_inserted>
break;
if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
_Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker );
2011ac4: 03 00 80 c6 sethi %hi(0x2031800), %g1
2011ac8: a2 10 60 18 or %g1, 0x18, %l1 ! 2031818 <_Timer_Seconds_chain>
the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted );
if ( the_timer == NULL )
break;
if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker );
2011acc: 03 00 80 c6 sethi %hi(0x2031800), %g1
2011ad0: a0 10 60 04 or %g1, 4, %l0 ! 2031804 <_Timer_Ticks_chain>
static void _Timer_Server_process_insertions(void)
{
Timer_Control *the_timer;
while ( 1 ) {
the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted );
2011ad4: 40 00 02 ad call 2012588 <_Chain_Get>
2011ad8: 90 10 00 12 mov %l2, %o0
if ( the_timer == NULL )
2011adc: 80 a2 20 00 cmp %o0, 0
2011ae0: 02 80 00 11 be 2011b24 <_Timer_Server_process_insertions+0x6c>
2011ae4: 01 00 00 00 nop
break;
if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
2011ae8: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
2011aec: 80 a0 60 01 cmp %g1, 1
2011af0: 12 80 00 05 bne 2011b04 <_Timer_Server_process_insertions+0x4c>
2011af4: 80 a0 60 03 cmp %g1, 3
_Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker );
2011af8: 92 02 20 10 add %o0, 0x10, %o1
2011afc: 10 80 00 05 b 2011b10 <_Timer_Server_process_insertions+0x58>
2011b00: 90 10 00 10 mov %l0, %o0
} else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
2011b04: 12 80 00 05 bne 2011b18 <_Timer_Server_process_insertions+0x60><== NEVER TAKEN
2011b08: 92 02 20 10 add %o0, 0x10, %o1
_Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker );
2011b0c: 90 10 00 11 mov %l1, %o0
2011b10: 40 00 11 7f call 201610c <_Watchdog_Insert>
2011b14: 01 00 00 00 nop
}
/*
* Insert the timers that have been requested to be inserted.
*/
_Timer_Server_process_insertions();
2011b18: 7f ff ff e8 call 2011ab8 <_Timer_Server_process_insertions>
2011b1c: 01 00 00 00 nop
2011b20: 30 bf ff ed b,a 2011ad4 <_Timer_Server_process_insertions+0x1c>
2011b24: 81 c7 e0 08 ret
2011b28: 81 e8 00 00 restore
0200a240 <_Timespec_Divide>:
const struct timespec *lhs,
const struct timespec *rhs,
uint32_t *ival_percentage,
uint32_t *fval_percentage
)
{
200a240: 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;
200a244: c2 06 40 00 ld [ %i1 ], %g1
right += rhs->tv_nsec;
200a248: de 06 60 04 ld [ %i1 + 4 ], %o7
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200a24c: 91 38 60 1f sra %g1, 0x1f, %o0
200a250: 92 10 00 01 mov %g1, %o1
200a254: 83 30 60 1d srl %g1, 0x1d, %g1
200a258: 87 2a 60 03 sll %o1, 3, %g3
200a25c: 85 2a 20 03 sll %o0, 3, %g2
200a260: 84 10 40 02 or %g1, %g2, %g2
200a264: 83 30 e0 1b srl %g3, 0x1b, %g1
200a268: 99 28 a0 05 sll %g2, 5, %o4
200a26c: 9b 28 e0 05 sll %g3, 5, %o5
200a270: 98 10 40 0c or %g1, %o4, %o4
200a274: 9a a3 40 03 subcc %o5, %g3, %o5
200a278: 83 33 60 1a srl %o5, 0x1a, %g1
200a27c: 98 63 00 02 subx %o4, %g2, %o4
200a280: 97 2b 60 06 sll %o5, 6, %o3
200a284: 95 2b 20 06 sll %o4, 6, %o2
200a288: 96 a2 c0 0d subcc %o3, %o5, %o3
200a28c: 94 10 40 0a or %g1, %o2, %o2
200a290: 94 62 80 0c subx %o2, %o4, %o2
200a294: 96 82 c0 09 addcc %o3, %o1, %o3
200a298: 94 42 80 08 addx %o2, %o0, %o2
200a29c: 83 32 e0 1e srl %o3, 0x1e, %g1
200a2a0: 85 2a a0 02 sll %o2, 2, %g2
200a2a4: 84 10 40 02 or %g1, %g2, %g2
200a2a8: 87 2a e0 02 sll %o3, 2, %g3
200a2ac: 96 82 c0 03 addcc %o3, %g3, %o3
200a2b0: 94 42 80 02 addx %o2, %g2, %o2
200a2b4: 83 32 e0 1e srl %o3, 0x1e, %g1
200a2b8: 85 2a a0 02 sll %o2, 2, %g2
200a2bc: 84 10 40 02 or %g1, %g2, %g2
200a2c0: 87 2a e0 02 sll %o3, 2, %g3
200a2c4: 96 82 c0 03 addcc %o3, %g3, %o3
200a2c8: 94 42 80 02 addx %o2, %g2, %o2
200a2cc: 83 32 e0 1e srl %o3, 0x1e, %g1
200a2d0: 85 2a a0 02 sll %o2, 2, %g2
200a2d4: 84 10 40 02 or %g1, %g2, %g2
200a2d8: 87 2a e0 02 sll %o3, 2, %g3
200a2dc: 96 82 c0 03 addcc %o3, %g3, %o3
200a2e0: 94 42 80 02 addx %o2, %g2, %o2
200a2e4: 85 32 e0 17 srl %o3, 0x17, %g2
200a2e8: 83 2a a0 09 sll %o2, 9, %g1
200a2ec: 9b 2a e0 09 sll %o3, 9, %o5
200a2f0: 98 10 80 01 or %g2, %g1, %o4
right += rhs->tv_nsec;
200a2f4: 96 83 40 0f addcc %o5, %o7, %o3
200a2f8: 85 3b e0 1f sra %o7, 0x1f, %g2
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
left += lhs->tv_nsec;
200a2fc: e4 06 20 04 ld [ %i0 + 4 ], %l2
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
right += rhs->tv_nsec;
200a300: 94 43 00 02 addx %o4, %g2, %o2
if ( right == 0 ) {
200a304: 80 92 80 0b orcc %o2, %o3, %g0
200a308: 12 80 00 06 bne 200a320 <_Timespec_Divide+0xe0> <== ALWAYS TAKEN
200a30c: d0 06 00 00 ld [ %i0 ], %o0
*ival_percentage = 0;
200a310: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED
*fval_percentage = 0;
200a314: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED
200a318: 81 c7 e0 08 ret <== NOT EXECUTED
200a31c: 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;
200a320: 92 10 00 08 mov %o0, %o1
200a324: 83 32 60 1d srl %o1, 0x1d, %g1
200a328: 9b 2a 60 03 sll %o1, 3, %o5
200a32c: 91 3a 20 1f sra %o0, 0x1f, %o0
200a330: 99 2a 20 03 sll %o0, 3, %o4
200a334: 98 10 40 0c or %g1, %o4, %o4
200a338: 83 33 60 1b srl %o5, 0x1b, %g1
200a33c: 85 2b 20 05 sll %o4, 5, %g2
200a340: 87 2b 60 05 sll %o5, 5, %g3
200a344: 84 10 40 02 or %g1, %g2, %g2
200a348: 86 a0 c0 0d subcc %g3, %o5, %g3
200a34c: 83 30 e0 1a srl %g3, 0x1a, %g1
200a350: 84 60 80 0c subx %g2, %o4, %g2
200a354: 9b 28 e0 06 sll %g3, 6, %o5
200a358: 99 28 a0 06 sll %g2, 6, %o4
200a35c: 9a a3 40 03 subcc %o5, %g3, %o5
200a360: 98 10 40 0c or %g1, %o4, %o4
200a364: 98 63 00 02 subx %o4, %g2, %o4
200a368: 9a 83 40 09 addcc %o5, %o1, %o5
200a36c: 83 33 60 1e srl %o5, 0x1e, %g1
200a370: 98 43 00 08 addx %o4, %o0, %o4
200a374: 87 2b 60 02 sll %o5, 2, %g3
200a378: 85 2b 20 02 sll %o4, 2, %g2
200a37c: 9a 83 40 03 addcc %o5, %g3, %o5
200a380: 84 10 40 02 or %g1, %g2, %g2
200a384: 83 33 60 1e srl %o5, 0x1e, %g1
200a388: 98 43 00 02 addx %o4, %g2, %o4
200a38c: 87 2b 60 02 sll %o5, 2, %g3
200a390: 85 2b 20 02 sll %o4, 2, %g2
200a394: 9a 83 40 03 addcc %o5, %g3, %o5
200a398: 84 10 40 02 or %g1, %g2, %g2
200a39c: 83 33 60 1e srl %o5, 0x1e, %g1
200a3a0: 98 43 00 02 addx %o4, %g2, %o4
200a3a4: 87 2b 60 02 sll %o5, 2, %g3
200a3a8: 85 2b 20 02 sll %o4, 2, %g2
200a3ac: 9a 83 40 03 addcc %o5, %g3, %o5
200a3b0: 84 10 40 02 or %g1, %g2, %g2
200a3b4: 98 43 00 02 addx %o4, %g2, %o4
200a3b8: 83 2b 20 09 sll %o4, 9, %g1
200a3bc: 85 33 60 17 srl %o5, 0x17, %g2
* Put it back in the timespec result.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
200a3c0: a6 10 00 12 mov %l2, %l3
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200a3c4: a0 10 80 01 or %g2, %g1, %l0
200a3c8: a3 2b 60 09 sll %o5, 9, %l1
* Put it back in the timespec result.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
200a3cc: a2 84 40 13 addcc %l1, %l3, %l1
200a3d0: 83 34 60 1e srl %l1, 0x1e, %g1
200a3d4: 87 2c 60 02 sll %l1, 2, %g3
200a3d8: a5 3c a0 1f sra %l2, 0x1f, %l2
200a3dc: a0 44 00 12 addx %l0, %l2, %l0
200a3e0: 85 2c 20 02 sll %l0, 2, %g2
200a3e4: 84 10 40 02 or %g1, %g2, %g2
200a3e8: 83 30 e0 1b srl %g3, 0x1b, %g1
200a3ec: 99 28 a0 05 sll %g2, 5, %o4
200a3f0: 9b 28 e0 05 sll %g3, 5, %o5
200a3f4: 98 10 40 0c or %g1, %o4, %o4
200a3f8: 9a a3 40 03 subcc %o5, %g3, %o5
200a3fc: 98 63 00 02 subx %o4, %g2, %o4
200a400: 9a 83 40 11 addcc %o5, %l1, %o5
200a404: 83 33 60 1e srl %o5, 0x1e, %g1
200a408: 98 43 00 10 addx %o4, %l0, %o4
200a40c: 87 2b 60 02 sll %o5, 2, %g3
200a410: 85 2b 20 02 sll %o4, 2, %g2
200a414: 9a 83 40 03 addcc %o5, %g3, %o5
200a418: 84 10 40 02 or %g1, %g2, %g2
200a41c: 83 33 60 1e srl %o5, 0x1e, %g1
200a420: 87 2b 60 02 sll %o5, 2, %g3
200a424: 98 43 00 02 addx %o4, %g2, %o4
200a428: 9a 83 40 03 addcc %o5, %g3, %o5
200a42c: 85 2b 20 02 sll %o4, 2, %g2
200a430: 84 10 40 02 or %g1, %g2, %g2
200a434: 83 33 60 1b srl %o5, 0x1b, %g1
200a438: 98 43 00 02 addx %o4, %g2, %o4
200a43c: 99 2b 20 05 sll %o4, 5, %o4
200a440: 98 10 40 0c or %g1, %o4, %o4
200a444: 93 2b 60 05 sll %o5, 5, %o1
200a448: 40 00 35 38 call 2017928 <__udivdi3>
200a44c: 90 10 00 0c mov %o4, %o0
*ival_percentage = answer / 1000;
200a450: 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;
200a454: a0 10 00 08 mov %o0, %l0
200a458: a2 10 00 09 mov %o1, %l1
*ival_percentage = answer / 1000;
200a45c: 96 10 23 e8 mov 0x3e8, %o3
200a460: 40 00 35 32 call 2017928 <__udivdi3>
200a464: 90 10 00 10 mov %l0, %o0
*fval_percentage = answer % 1000;
200a468: 90 10 00 10 mov %l0, %o0
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
*ival_percentage = answer / 1000;
200a46c: d2 26 80 00 st %o1, [ %i2 ]
*fval_percentage = answer % 1000;
200a470: 94 10 20 00 clr %o2
200a474: 92 10 00 11 mov %l1, %o1
200a478: 40 00 36 08 call 2017c98 <__umoddi3>
200a47c: 96 10 23 e8 mov 0x3e8, %o3
200a480: d2 26 c0 00 st %o1, [ %i3 ]
200a484: 81 c7 e0 08 ret
200a488: 81 e8 00 00 restore
0200a9bc <_User_extensions_Remove_set>:
*/
void _User_extensions_Remove_set (
User_extensions_Control *the_extension
)
{
200a9bc: 9d e3 bf 98 save %sp, -104, %sp
_Chain_Extract( &the_extension->Node );
200a9c0: 40 00 0c 5e call 200db38 <_Chain_Extract>
200a9c4: 90 10 00 18 mov %i0, %o0
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
200a9c8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
200a9cc: 80 a0 60 00 cmp %g1, 0
200a9d0: 02 80 00 04 be 200a9e0 <_User_extensions_Remove_set+0x24> <== ALWAYS TAKEN
200a9d4: 01 00 00 00 nop
_Chain_Extract( &the_extension->Switch.Node );
200a9d8: 40 00 0c 58 call 200db38 <_Chain_Extract> <== NOT EXECUTED
200a9dc: 91 ee 20 08 restore %i0, 8, %o0 <== NOT EXECUTED
200a9e0: 81 c7 e0 08 ret
200a9e4: 81 e8 00 00 restore
020087b8 <_User_extensions_Thread_create>:
*/
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
20087b8: 9d e3 bf 98 save %sp, -104, %sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
20087bc: 03 00 80 5e sethi %hi(0x2017800), %g1
20087c0: e0 00 62 58 ld [ %g1 + 0x258 ], %l0 ! 2017a58 <_User_extensions_List>
20087c4: 82 10 62 58 or %g1, 0x258, %g1
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
20087c8: a4 00 60 04 add %g1, 4, %l2
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
status = (*the_extension->Callouts.thread_create)(
20087cc: 03 00 80 5e sethi %hi(0x2017800), %g1
20087d0: 10 80 00 0d b 2008804 <_User_extensions_Thread_create+0x4c>
20087d4: a2 10 60 e4 or %g1, 0xe4, %l1 ! 20178e4 <_Thread_Executing>
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
20087d8: 80 a0 60 00 cmp %g1, 0
20087dc: 02 80 00 09 be 2008800 <_User_extensions_Thread_create+0x48>
20087e0: 92 10 00 18 mov %i0, %o1
status = (*the_extension->Callouts.thread_create)(
20087e4: 9f c0 40 00 call %g1
20087e8: d0 04 40 00 ld [ %l1 ], %o0
_Thread_Executing,
the_thread
);
if ( !status )
20087ec: 80 8a 20 ff btst 0xff, %o0
20087f0: 32 80 00 05 bne,a 2008804 <_User_extensions_Thread_create+0x4c><== ALWAYS TAKEN
20087f4: e0 04 00 00 ld [ %l0 ], %l0
20087f8: 81 c7 e0 08 ret <== NOT EXECUTED
20087fc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
2008800: e0 04 00 00 ld [ %l0 ], %l0
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
2008804: 80 a4 00 12 cmp %l0, %l2
2008808: 32 bf ff f4 bne,a 20087d8 <_User_extensions_Thread_create+0x20>
200880c: c2 04 20 14 ld [ %l0 + 0x14 ], %g1
return FALSE;
}
}
return TRUE;
}
2008810: 81 c7 e0 08 ret
2008814: 91 e8 20 01 restore %g0, 1, %o0
0200a7d0 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
200a7d0: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
_ISR_Disable( level );
200a7d4: 7f ff e0 d9 call 2002b38 <sparc_disable_interrupts>
200a7d8: a0 10 00 1a mov %i2, %l0
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
200a7dc: c4 06 00 00 ld [ %i0 ], %g2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
200a7e0: a2 06 20 04 add %i0, 4, %l1
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
200a7e4: 80 a0 80 11 cmp %g2, %l1
200a7e8: 02 80 00 1e be 200a860 <_Watchdog_Adjust+0x90>
200a7ec: 80 a6 60 00 cmp %i1, 0
switch ( direction ) {
200a7f0: 02 80 00 19 be 200a854 <_Watchdog_Adjust+0x84>
200a7f4: a4 10 20 01 mov 1, %l2
200a7f8: 80 a6 60 01 cmp %i1, 1
200a7fc: 12 80 00 19 bne 200a860 <_Watchdog_Adjust+0x90> <== NEVER TAKEN
200a800: 01 00 00 00 nop
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
200a804: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1
200a808: 10 80 00 07 b 200a824 <_Watchdog_Adjust+0x54>
200a80c: 82 00 40 1a add %g1, %i2, %g1
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
200a810: f4 00 a0 10 ld [ %g2 + 0x10 ], %i2
200a814: 80 a4 00 1a cmp %l0, %i2
200a818: 3a 80 00 05 bcc,a 200a82c <_Watchdog_Adjust+0x5c>
200a81c: e4 20 a0 10 st %l2, [ %g2 + 0x10 ]
_Watchdog_First( header )->delta_interval -= units;
200a820: 82 26 80 10 sub %i2, %l0, %g1
200a824: 10 80 00 0f b 200a860 <_Watchdog_Adjust+0x90>
200a828: c2 20 a0 10 st %g1, [ %g2 + 0x10 ]
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
_ISR_Enable( level );
200a82c: 7f ff e0 c7 call 2002b48 <sparc_enable_interrupts>
200a830: 01 00 00 00 nop
_Watchdog_Tickle( header );
200a834: 40 00 00 92 call 200aa7c <_Watchdog_Tickle>
200a838: 90 10 00 18 mov %i0, %o0
_ISR_Disable( level );
200a83c: 7f ff e0 bf call 2002b38 <sparc_disable_interrupts>
200a840: 01 00 00 00 nop
if ( _Chain_Is_empty( header ) )
200a844: c2 06 00 00 ld [ %i0 ], %g1
200a848: 80 a0 40 11 cmp %g1, %l1
200a84c: 02 80 00 05 be 200a860 <_Watchdog_Adjust+0x90>
200a850: a0 24 00 1a sub %l0, %i2, %l0
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
200a854: 80 a4 20 00 cmp %l0, 0
200a858: 32 bf ff ee bne,a 200a810 <_Watchdog_Adjust+0x40> <== ALWAYS TAKEN
200a85c: c4 06 00 00 ld [ %i0 ], %g2
}
break;
}
}
_ISR_Enable( level );
200a860: 7f ff e0 ba call 2002b48 <sparc_enable_interrupts>
200a864: 91 e8 00 08 restore %g0, %o0, %o0
02016038 <_Watchdog_Adjust_to_chain>:
Chain_Control *header,
Watchdog_Interval units_arg,
Chain_Control *to_fire
)
{
2016038: 9d e3 bf 98 save %sp, -104, %sp
Watchdog_Interval units = units_arg;
ISR_Level level;
Chain_Node *node;
if ( !units ) {
201603c: 80 a6 60 00 cmp %i1, 0
2016040: 02 80 00 31 be 2016104 <_Watchdog_Adjust_to_chain+0xcc>
2016044: 01 00 00 00 nop
return;
}
_ISR_Disable( level );
2016048: 7f ff d5 37 call 200b524 <sparc_disable_interrupts>
201604c: 01 00 00 00 nop
2016050: a4 10 00 08 mov %o0, %l2
if ( !_Chain_Is_empty( header ) ) {
2016054: c2 06 00 00 ld [ %i0 ], %g1
2016058: a2 06 20 04 add %i0, 4, %l1
201605c: 80 a0 40 11 cmp %g1, %l1
2016060: 02 80 00 27 be 20160fc <_Watchdog_Adjust_to_chain+0xc4>
2016064: 01 00 00 00 nop
2016068: a6 06 a0 04 add %i2, 4, %l3
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
201606c: c4 06 00 00 ld [ %i0 ], %g2
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
2016070: e0 00 a0 10 ld [ %g2 + 0x10 ], %l0
2016074: 80 a6 40 10 cmp %i1, %l0
2016078: 3a 80 00 05 bcc,a 201608c <_Watchdog_Adjust_to_chain+0x54>
201607c: c0 20 a0 10 clr [ %g2 + 0x10 ]
_Watchdog_First( header )->delta_interval -= units;
2016080: 82 24 00 19 sub %l0, %i1, %g1
2016084: 10 80 00 1e b 20160fc <_Watchdog_Adjust_to_chain+0xc4>
2016088: c2 20 a0 10 st %g1, [ %g2 + 0x10 ]
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
201608c: c4 06 00 00 ld [ %i0 ], %g2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
2016090: 80 a0 80 11 cmp %g2, %l1
2016094: 32 80 00 04 bne,a 20160a4 <_Watchdog_Adjust_to_chain+0x6c><== ALWAYS TAKEN
2016098: c2 00 80 00 ld [ %g2 ], %g1
201609c: 10 80 00 04 b 20160ac <_Watchdog_Adjust_to_chain+0x74> <== NOT EXECUTED
20160a0: 84 10 20 00 clr %g2 <== NOT EXECUTED
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
the_chain->first = new_first;
20160a4: c2 26 00 00 st %g1, [ %i0 ]
new_first->previous = _Chain_Head(the_chain);
20160a8: f0 20 60 04 st %i0, [ %g1 + 4 ]
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
20160ac: e6 20 80 00 st %l3, [ %g2 ]
old_last_node = the_chain->last;
20160b0: c2 06 a0 08 ld [ %i2 + 8 ], %g1
the_chain->last = the_node;
20160b4: c4 26 a0 08 st %g2, [ %i2 + 8 ]
old_last_node->next = the_node;
the_node->previous = old_last_node;
20160b8: c2 20 a0 04 st %g1, [ %g2 + 4 ]
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
20160bc: c4 20 40 00 st %g2, [ %g1 ]
do {
node = _Chain_Get_unprotected( header );
_Chain_Append_unprotected( to_fire, node );
_ISR_Flash( level );
20160c0: 7f ff d5 1d call 200b534 <sparc_enable_interrupts>
20160c4: 90 10 00 12 mov %l2, %o0
20160c8: 7f ff d5 17 call 200b524 <sparc_disable_interrupts>
20160cc: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
20160d0: c2 06 00 00 ld [ %i0 ], %g1
} while ( !_Chain_Is_empty( header ) &&
_Watchdog_First( header )->delta_interval == 0 );
20160d4: 80 a0 40 11 cmp %g1, %l1
20160d8: 02 80 00 09 be 20160fc <_Watchdog_Adjust_to_chain+0xc4>
20160dc: 01 00 00 00 nop
20160e0: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
20160e4: 80 a0 60 00 cmp %g1, 0
20160e8: 22 bf ff ea be,a 2016090 <_Watchdog_Adjust_to_chain+0x58>
20160ec: c4 06 00 00 ld [ %i0 ], %g2
return;
}
_ISR_Disable( level );
if ( !_Chain_Is_empty( header ) ) {
while ( units ) {
20160f0: b2 a6 40 10 subcc %i1, %l0, %i1
20160f4: 32 bf ff df bne,a 2016070 <_Watchdog_Adjust_to_chain+0x38><== NEVER TAKEN
20160f8: c4 06 00 00 ld [ %i0 ], %g2 <== NOT EXECUTED
break;
}
}
}
_ISR_Enable( level );
20160fc: 7f ff d5 0e call 200b534 <sparc_enable_interrupts>
2016100: 91 e8 00 12 restore %g0, %l2, %o0
2016104: 81 c7 e0 08 ret
2016108: 81 e8 00 00 restore
020088f0 <_Watchdog_Insert>:
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
20088f0: 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;
20088f4: 03 00 80 5e sethi %hi(0x2017800), %g1
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
20088f8: aa 10 00 18 mov %i0, %l5
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
20088fc: e6 00 60 c0 ld [ %g1 + 0xc0 ], %l3
_ISR_Disable( level );
2008900: 7f ff e5 1b call 2001d6c <sparc_disable_interrupts>
2008904: 01 00 00 00 nop
2008908: 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 ) {
200890c: c2 06 60 08 ld [ %i1 + 8 ], %g1
2008910: 80 a0 60 00 cmp %g1, 0
2008914: 02 80 00 03 be 2008920 <_Watchdog_Insert+0x30> <== ALWAYS TAKEN
2008918: 07 00 80 5e sethi %hi(0x2017800), %g3
_ISR_Enable( level );
200891c: 30 80 00 39 b,a 2008a00 <_Watchdog_Insert+0x110> <== NOT EXECUTED
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
2008920: c2 00 e1 70 ld [ %g3 + 0x170 ], %g1 ! 2017970 <_Watchdog_Sync_count>
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
2008924: 84 10 20 01 mov 1, %g2
_Watchdog_Sync_count++;
2008928: 82 00 60 01 inc %g1
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
200892c: c4 26 60 08 st %g2, [ %i1 + 8 ]
_Watchdog_Sync_count++;
2008930: c2 20 e1 70 st %g1, [ %g3 + 0x170 ]
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
2008934: 03 00 80 5e sethi %hi(0x2017800), %g1
2008938: a8 10 60 e0 or %g1, 0xe0, %l4 ! 20178e0 <_Watchdog_Sync_level>
200893c: ac 10 00 14 mov %l4, %l6
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
restart:
delta_interval = the_watchdog->initial;
2008940: 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 ;
2008944: e2 05 40 00 ld [ %l5 ], %l1
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
2008948: 80 a4 a0 00 cmp %l2, 0
200894c: 22 80 00 1c be,a 20089bc <_Watchdog_Insert+0xcc>
2008950: c4 04 60 04 ld [ %l1 + 4 ], %g2
2008954: c2 04 40 00 ld [ %l1 ], %g1
2008958: 80 a0 60 00 cmp %g1, 0
200895c: 22 80 00 18 be,a 20089bc <_Watchdog_Insert+0xcc>
2008960: c4 04 60 04 ld [ %l1 + 4 ], %g2
break;
if ( delta_interval < after->delta_interval ) {
2008964: e0 04 60 10 ld [ %l1 + 0x10 ], %l0
2008968: 80 a4 80 10 cmp %l2, %l0
200896c: 1a 80 00 04 bcc 200897c <_Watchdog_Insert+0x8c>
2008970: 82 24 00 12 sub %l0, %l2, %g1
after->delta_interval -= delta_interval;
2008974: 10 80 00 11 b 20089b8 <_Watchdog_Insert+0xc8>
2008978: c2 24 60 10 st %g1, [ %l1 + 0x10 ]
* used around this flash point allowed interrupts to execute
* which violated the design assumptions. The critical section
* mechanism used here WAS redesigned to address this.
*/
_ISR_Flash( level );
200897c: 7f ff e5 00 call 2001d7c <sparc_enable_interrupts>
2008980: 90 10 00 18 mov %i0, %o0
2008984: 7f ff e4 fa call 2001d6c <sparc_disable_interrupts>
2008988: 01 00 00 00 nop
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
200898c: c2 06 60 08 ld [ %i1 + 8 ], %g1
2008990: 80 a0 60 01 cmp %g1, 1
2008994: 12 80 00 15 bne 20089e8 <_Watchdog_Insert+0xf8> <== NEVER TAKEN
2008998: a4 24 80 10 sub %l2, %l0, %l2
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
200899c: c2 05 00 00 ld [ %l4 ], %g1
20089a0: 80 a0 40 13 cmp %g1, %l3
20089a4: 28 bf ff e9 bleu,a 2008948 <_Watchdog_Insert+0x58>
20089a8: e2 04 40 00 ld [ %l1 ], %l1
_Watchdog_Sync_level = insert_isr_nest_level;
20089ac: e6 25 80 00 st %l3, [ %l6 ]
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
restart:
delta_interval = the_watchdog->initial;
20089b0: 10 bf ff e5 b 2008944 <_Watchdog_Insert+0x54>
20089b4: e4 06 60 0c ld [ %i1 + 0xc ], %l2
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
20089b8: c4 04 60 04 ld [ %l1 + 4 ], %g2
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
20089bc: 03 00 80 5e sethi %hi(0x2017800), %g1
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
20089c0: c6 00 80 00 ld [ %g2 ], %g3
20089c4: c2 00 61 74 ld [ %g1 + 0x174 ], %g1
after_node->next = the_node;
20089c8: f2 20 80 00 st %i1, [ %g2 ]
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
20089cc: c4 26 60 04 st %g2, [ %i1 + 4 ]
20089d0: c2 26 60 14 st %g1, [ %i1 + 0x14 ]
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
20089d4: e4 26 60 10 st %l2, [ %i1 + 0x10 ]
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_ACTIVE;
20089d8: 82 10 20 02 mov 2, %g1
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
before_node->previous = the_node;
20089dc: f2 20 e0 04 st %i1, [ %g3 + 4 ]
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
20089e0: c6 26 40 00 st %g3, [ %i1 ]
20089e4: c2 26 60 08 st %g1, [ %i1 + 8 ]
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
20089e8: 03 00 80 5e sethi %hi(0x2017800), %g1
_Watchdog_Sync_count--;
20089ec: 05 00 80 5e sethi %hi(0x2017800), %g2
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
20089f0: e6 20 60 e0 st %l3, [ %g1 + 0xe0 ]
_Watchdog_Sync_count--;
20089f4: c2 00 a1 70 ld [ %g2 + 0x170 ], %g1
20089f8: 82 00 7f ff add %g1, -1, %g1
20089fc: c2 20 a1 70 st %g1, [ %g2 + 0x170 ]
_ISR_Enable( level );
2008a00: 7f ff e4 df call 2001d7c <sparc_enable_interrupts>
2008a04: 81 e8 00 00 restore
02008a58 <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
2008a58: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
2008a5c: 7f ff e4 c4 call 2001d6c <sparc_disable_interrupts>
2008a60: 01 00 00 00 nop
previous_state = the_watchdog->state;
2008a64: e0 06 20 08 ld [ %i0 + 8 ], %l0
switch ( previous_state ) {
2008a68: 80 a4 20 01 cmp %l0, 1
2008a6c: 22 80 00 1e be,a 2008ae4 <_Watchdog_Remove+0x8c> <== NEVER TAKEN
2008a70: c0 26 20 08 clr [ %i0 + 8 ] <== NOT EXECUTED
2008a74: 0a 80 00 1d bcs 2008ae8 <_Watchdog_Remove+0x90>
2008a78: 03 00 80 5e sethi %hi(0x2017800), %g1
2008a7c: 80 a4 20 03 cmp %l0, 3
2008a80: 18 80 00 1a bgu 2008ae8 <_Watchdog_Remove+0x90> <== NEVER TAKEN
2008a84: 01 00 00 00 nop
2008a88: c6 06 00 00 ld [ %i0 ], %g3
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
2008a8c: c0 26 20 08 clr [ %i0 + 8 ]
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
2008a90: c2 00 c0 00 ld [ %g3 ], %g1
2008a94: 80 a0 60 00 cmp %g1, 0
2008a98: 02 80 00 07 be 2008ab4 <_Watchdog_Remove+0x5c>
2008a9c: 03 00 80 5e sethi %hi(0x2017800), %g1
next_watchdog->delta_interval += the_watchdog->delta_interval;
2008aa0: c2 00 e0 10 ld [ %g3 + 0x10 ], %g1
2008aa4: c4 06 20 10 ld [ %i0 + 0x10 ], %g2
2008aa8: 82 00 40 02 add %g1, %g2, %g1
2008aac: c2 20 e0 10 st %g1, [ %g3 + 0x10 ]
if ( _Watchdog_Sync_count )
2008ab0: 03 00 80 5e sethi %hi(0x2017800), %g1
2008ab4: c2 00 61 70 ld [ %g1 + 0x170 ], %g1 ! 2017970 <_Watchdog_Sync_count>
2008ab8: 80 a0 60 00 cmp %g1, 0
2008abc: 22 80 00 07 be,a 2008ad8 <_Watchdog_Remove+0x80> <== ALWAYS TAKEN
2008ac0: c4 06 00 00 ld [ %i0 ], %g2
_Watchdog_Sync_level = _ISR_Nest_level;
2008ac4: 03 00 80 5e sethi %hi(0x2017800), %g1 <== NOT EXECUTED
2008ac8: c4 00 60 c0 ld [ %g1 + 0xc0 ], %g2 ! 20178c0 <_ISR_Nest_level><== NOT EXECUTED
2008acc: 03 00 80 5e sethi %hi(0x2017800), %g1 <== NOT EXECUTED
2008ad0: c4 20 60 e0 st %g2, [ %g1 + 0xe0 ] ! 20178e0 <_Watchdog_Sync_level><== NOT EXECUTED
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
2008ad4: c4 06 00 00 ld [ %i0 ], %g2 <== NOT EXECUTED
previous = the_node->previous;
2008ad8: c2 06 20 04 ld [ %i0 + 4 ], %g1
next->previous = previous;
previous->next = next;
2008adc: c4 20 40 00 st %g2, [ %g1 ]
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
2008ae0: c2 20 a0 04 st %g1, [ %g2 + 4 ]
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
2008ae4: 03 00 80 5e sethi %hi(0x2017800), %g1
2008ae8: c2 00 61 74 ld [ %g1 + 0x174 ], %g1 ! 2017974 <_Watchdog_Ticks_since_boot>
2008aec: c2 26 20 18 st %g1, [ %i0 + 0x18 ]
_ISR_Enable( level );
2008af0: 7f ff e4 a3 call 2001d7c <sparc_enable_interrupts>
2008af4: b0 10 00 10 mov %l0, %i0
return( previous_state );
}
2008af8: 81 c7 e0 08 ret
2008afc: 81 e8 00 00 restore
02008b00 <_Watchdog_Tickle>:
*/
void _Watchdog_Tickle(
Chain_Control *header
)
{
2008b00: 9d e3 bf 98 save %sp, -104, %sp
* See the comment in watchdoginsert.c and watchdogadjust.c
* about why it's safe not to declare header a pointer to
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
2008b04: 7f ff e4 9a call 2001d6c <sparc_disable_interrupts>
2008b08: a4 10 00 18 mov %i0, %l2
2008b0c: b0 10 00 08 mov %o0, %i0
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
2008b10: c4 04 80 00 ld [ %l2 ], %g2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
2008b14: a6 04 a0 04 add %l2, 4, %l3
if ( _Chain_Is_empty( header ) )
2008b18: 80 a0 80 13 cmp %g2, %l3
2008b1c: 02 80 00 20 be 2008b9c <_Watchdog_Tickle+0x9c>
2008b20: 01 00 00 00 nop
* to be inserted has already had its delta_interval adjusted to 0, and
* so is added to the head of the chain with a delta_interval of 0.
*
* Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc)
*/
if (the_watchdog->delta_interval != 0) {
2008b24: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1
2008b28: 80 a0 60 00 cmp %g1, 0
2008b2c: 02 80 00 07 be 2008b48 <_Watchdog_Tickle+0x48> <== NEVER TAKEN
2008b30: a2 10 00 02 mov %g2, %l1
the_watchdog->delta_interval--;
2008b34: 82 00 7f ff add %g1, -1, %g1
2008b38: c2 20 a0 10 st %g1, [ %g2 + 0x10 ]
if ( the_watchdog->delta_interval != 0 )
2008b3c: 80 a0 60 00 cmp %g1, 0
2008b40: 12 80 00 17 bne 2008b9c <_Watchdog_Tickle+0x9c>
2008b44: 01 00 00 00 nop
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
2008b48: 7f ff ff c4 call 2008a58 <_Watchdog_Remove>
2008b4c: 90 10 00 11 mov %l1, %o0
2008b50: a0 10 00 08 mov %o0, %l0
_ISR_Enable( level );
2008b54: 7f ff e4 8a call 2001d7c <sparc_enable_interrupts>
2008b58: 90 10 00 18 mov %i0, %o0
switch( watchdog_state ) {
2008b5c: 80 a4 20 02 cmp %l0, 2
2008b60: 12 80 00 06 bne 2008b78 <_Watchdog_Tickle+0x78> <== NEVER TAKEN
2008b64: 01 00 00 00 nop
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
2008b68: d2 04 60 24 ld [ %l1 + 0x24 ], %o1
2008b6c: c2 04 60 1c ld [ %l1 + 0x1c ], %g1
2008b70: 9f c0 40 00 call %g1
2008b74: d0 04 60 20 ld [ %l1 + 0x20 ], %o0
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
2008b78: 7f ff e4 7d call 2001d6c <sparc_disable_interrupts>
2008b7c: 01 00 00 00 nop
2008b80: b0 10 00 08 mov %o0, %i0
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
2008b84: c2 04 80 00 ld [ %l2 ], %g1
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
2008b88: 80 a0 40 13 cmp %g1, %l3
2008b8c: 02 80 00 04 be 2008b9c <_Watchdog_Tickle+0x9c>
2008b90: a2 10 00 01 mov %g1, %l1
2008b94: 10 bf ff ea b 2008b3c <_Watchdog_Tickle+0x3c>
2008b98: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
leave:
_ISR_Enable(level);
2008b9c: 7f ff e4 78 call 2001d7c <sparc_enable_interrupts>
2008ba0: 81 e8 00 00 restore
02008c10 <_Workspace_Handler_initialization>:
*/
void _Workspace_Handler_initialization(
void *starting_address,
size_t size
)
{
2008c10: 9d e3 bf 98 save %sp, -104, %sp
uint32_t memory_available;
if ( !starting_address || !_Addresses_Is_aligned( starting_address ) )
2008c14: 80 a6 20 00 cmp %i0, 0
2008c18: 02 80 00 04 be 2008c28 <_Workspace_Handler_initialization+0x18>
2008c1c: 80 8e 20 07 btst 7, %i0
2008c20: 02 80 00 06 be 2008c38 <_Workspace_Handler_initialization+0x28><== ALWAYS TAKEN
2008c24: 03 00 80 5e sethi %hi(0x2017800), %g1
_Internal_error_Occurred(
2008c28: 90 10 20 00 clr %o0
2008c2c: 92 10 20 01 mov 1, %o1
2008c30: 10 80 00 15 b 2008c84 <_Workspace_Handler_initialization+0x74>
2008c34: 94 10 20 02 mov 2, %o2
INTERNAL_ERROR_CORE,
TRUE,
INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS
);
if ( _Configuration_Table->do_zero_of_workspace )
2008c38: c2 00 60 bc ld [ %g1 + 0xbc ], %g1
2008c3c: c2 08 60 28 ldub [ %g1 + 0x28 ], %g1
2008c40: 80 a0 60 00 cmp %g1, 0
2008c44: 02 80 00 07 be 2008c60 <_Workspace_Handler_initialization+0x50><== ALWAYS TAKEN
2008c48: 92 10 00 18 mov %i0, %o1
memset( starting_address, 0, size );
2008c4c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2008c50: 92 10 20 00 clr %o1 <== NOT EXECUTED
2008c54: 40 00 13 3b call 200d940 <memset> <== NOT EXECUTED
2008c58: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
memory_available = _Heap_Initialize(
2008c5c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
2008c60: 94 10 00 19 mov %i1, %o2
2008c64: 11 00 80 5e sethi %hi(0x2017800), %o0
2008c68: 96 10 20 08 mov 8, %o3
2008c6c: 7f ff f6 2a call 2006514 <_Heap_Initialize>
2008c70: 90 12 20 44 or %o0, 0x44, %o0
starting_address,
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
2008c74: 80 a2 20 00 cmp %o0, 0
2008c78: 12 80 00 05 bne 2008c8c <_Workspace_Handler_initialization+0x7c><== ALWAYS TAKEN
2008c7c: 92 10 20 01 mov 1, %o1
_Internal_error_Occurred(
2008c80: 94 10 20 03 mov 3, %o2 <== NOT EXECUTED
2008c84: 7f ff f6 ae call 200673c <_Internal_error_Occurred>
2008c88: 01 00 00 00 nop
2008c8c: 81 c7 e0 08 ret
2008c90: 81 e8 00 00 restore
02001f10 <__assert>:
void __assert(
const char *file,
int line,
const char *failedexpr
)
{
2001f10: 96 10 00 0a mov %o2, %o3 <== NOT EXECUTED
__assert_func (file, line, NULL, failedexpr);
2001f14: 94 10 20 00 clr %o2 <== NOT EXECUTED
2001f18: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2001f1c: 7f ff ff eb call 2001ec8 <__assert_func> <== NOT EXECUTED
2001f20: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
02001ec8 <__assert_func>:
const char *file,
int line,
const char *func,
const char *failedexpr
)
{
2001ec8: 9d e3 bf 98 save %sp, -104, %sp
printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n",
2001ecc: 03 00 80 56 sethi %hi(0x2015800), %g1
const char *file,
int line,
const char *func,
const char *failedexpr
)
{
2001ed0: 9a 10 00 1a mov %i2, %o5
2001ed4: 94 10 00 18 mov %i0, %o2
2001ed8: 96 10 00 19 mov %i1, %o3
2001edc: 92 10 00 1b mov %i3, %o1
printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n",
2001ee0: 80 a6 a0 00 cmp %i2, 0
2001ee4: 12 80 00 05 bne 2001ef8 <__assert_func+0x30> <== ALWAYS TAKEN
2001ee8: 98 10 61 f0 or %g1, 0x1f0, %o4
2001eec: 03 00 80 56 sethi %hi(0x2015800), %g1 <== NOT EXECUTED
2001ef0: 9a 10 61 a0 or %g1, 0x1a0, %o5 ! 20159a0 <pollCallbacks.4788+0x2c0><== NOT EXECUTED
2001ef4: 98 10 00 0d mov %o5, %o4 <== NOT EXECUTED
2001ef8: 11 00 80 56 sethi %hi(0x2015800), %o0
2001efc: 40 00 03 98 call 2002d5c <printk>
2001f00: 90 12 22 00 or %o0, 0x200, %o0 ! 2015a00 <pollCallbacks.4788+0x320>
file,
line,
(func) ? ", function: " : "",
(func) ? func : ""
);
rtems_fatal_error_occurred(0);
2001f04: 40 00 0f 30 call 2005bc4 <rtems_fatal_error_occurred>
2001f08: 90 10 20 00 clr %o0
02014b90 <_exit>:
/*
* If the toolset uses init/fini sections, then we need to
* run the global destructors now.
*/
#if defined(__USE_INIT_FINI__)
_fini();
2014b90: 9d e3 bf 98 save %sp, -104, %sp
2014b94: 40 00 07 66 call 201692c <_fini>
2014b98: 01 00 00 00 nop
* We need to do the exit processing on the global reentrancy structure.
* This has already been done on the per task reentrancy structure
* associated with this task.
*/
libc_wrapup();
2014b9c: 7f ff ff e1 call 2014b20 <libc_wrapup>
2014ba0: 01 00 00 00 nop
rtems_shutdown_executive(status);
2014ba4: 40 00 00 4e call 2014cdc <rtems_shutdown_executive>
2014ba8: 90 10 00 18 mov %i0, %o0
2014bac: 30 80 00 00 b,a 2014bac <_exit+0x1c> <== NOT EXECUTED
02003260 <_fcntl_r>:
int fd,
int cmd,
int arg
)
{
return fcntl( fd, cmd, arg );
2003260: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED
2003264: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED
2003268: 94 10 00 0b mov %o3, %o2 <== NOT EXECUTED
200326c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2003270: 7f ff ff 79 call 2003054 <fcntl> <== NOT EXECUTED
2003274: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
020181cc <_getpid_r>:
pid_t _getpid_r(
struct _reent *ptr
)
{
return getpid();
}
20181cc: 81 c3 e0 08 retl <== NOT EXECUTED
20181d0: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
0200a474 <_gettimeofday>:
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
200a474: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
200a478: 7f ff ff e6 call 200a410 <gettimeofday> <== NOT EXECUTED
200a47c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
02003d18 <_link_r>:
struct _reent *ptr,
const char *existing,
const char *new
)
{
return link( existing, new );
2003d18: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED
2003d1c: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED
2003d20: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2003d24: 7f ff ff 65 call 2003ab8 <link> <== NOT EXECUTED
2003d28: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
02014ca8 <_realloc_r>:
struct _reent *ignored,
void *ptr,
size_t size
)
{
return realloc( ptr, size );
2014ca8: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED
2014cac: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED
2014cb0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2014cb4: 40 00 00 17 call 2014d10 <realloc> <== NOT EXECUTED
2014cb8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
02004a30 <_stat_r>:
struct _reent *ptr,
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
2004a30: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED
2004a34: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED
2004a38: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2004a3c: 7f ff ff c4 call 200494c <stat> <== NOT EXECUTED
2004a40: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
0200809c <_unlink_r>:
int _unlink_r(
struct _reent *ptr,
const char *path
)
{
return unlink( path );
200809c: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED
20080a0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
20080a4: 7f ff ff a2 call 2007f2c <unlink> <== NOT EXECUTED
20080a8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
02005144 <adjtime>:
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
2005144: 9d e3 bf 90 save %sp, -112, %sp
long adjustment;
/*
* Simple validations
*/
if ( !delta )
2005148: a4 96 20 00 orcc %i0, 0, %l2
200514c: 02 80 00 08 be 200516c <adjtime+0x28>
2005150: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
2005154: c4 04 a0 04 ld [ %l2 + 4 ], %g2
2005158: 03 00 03 d0 sethi %hi(0xf4000), %g1
200515c: 82 10 62 3f or %g1, 0x23f, %g1 ! f423f <PROM_START+0xf423f>
2005160: 80 a0 80 01 cmp %g2, %g1
2005164: 08 80 00 08 bleu 2005184 <adjtime+0x40>
2005168: 80 a6 60 00 cmp %i1, 0
rtems_set_errno_and_return_minus_one( EINVAL );
200516c: 40 00 22 31 call 200da30 <__errno>
2005170: b0 10 3f ff mov -1, %i0
2005174: 82 10 20 16 mov 0x16, %g1
2005178: c2 22 00 00 st %g1, [ %o0 ]
200517c: 81 c7 e0 08 ret
2005180: 81 e8 00 00 restore
if ( olddelta ) {
2005184: 22 80 00 05 be,a 2005198 <adjtime+0x54>
2005188: c6 04 80 00 ld [ %l2 ], %g3
olddelta->tv_sec = 0;
200518c: c0 26 40 00 clr [ %i1 ]
olddelta->tv_usec = 0;
2005190: c0 26 60 04 clr [ %i1 + 4 ]
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
2005194: c6 04 80 00 ld [ %l2 ], %g3
adjustment += delta->tv_usec;
/* too small to account for */
if ( adjustment < _TOD_Microseconds_per_tick )
2005198: 03 00 80 66 sethi %hi(0x2019800), %g1
200519c: da 04 a0 04 ld [ %l2 + 4 ], %o5
20051a0: c8 00 62 70 ld [ %g1 + 0x270 ], %g4
olddelta->tv_sec = 0;
olddelta->tv_usec = 0;
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
20051a4: 83 28 e0 03 sll %g3, 3, %g1
20051a8: 85 28 e0 08 sll %g3, 8, %g2
20051ac: 84 20 80 01 sub %g2, %g1, %g2
20051b0: 83 28 a0 06 sll %g2, 6, %g1
20051b4: 82 20 40 02 sub %g1, %g2, %g1
20051b8: 82 00 40 03 add %g1, %g3, %g1
20051bc: 83 28 60 06 sll %g1, 6, %g1
adjustment += delta->tv_usec;
/* too small to account for */
if ( adjustment < _TOD_Microseconds_per_tick )
20051c0: 82 00 40 0d add %g1, %o5, %g1
20051c4: 80 a0 40 04 cmp %g1, %g4
20051c8: 0a 80 00 3d bcs 20052bc <adjtime+0x178>
20051cc: 05 00 80 66 sethi %hi(0x2019800), %g2
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
20051d0: c2 00 a0 d0 ld [ %g2 + 0xd0 ], %g1 ! 20198d0 <_Thread_Dispatch_disable_level>
20051d4: 82 00 60 01 inc %g1
20051d8: c2 20 a0 d0 st %g1, [ %g2 + 0xd0 ]
* This prevents context switches while we are adjusting the TOD
*/
_Thread_Disable_dispatch();
_TOD_Get( &ts );
20051dc: 40 00 06 ca call 2006d04 <_TOD_Get>
20051e0: 90 07 bf f0 add %fp, -16, %o0
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
20051e4: c2 04 a0 04 ld [ %l2 + 4 ], %g1
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
20051e8: 23 0e e6 b2 sethi %hi(0x3b9ac800), %l1
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
20051ec: 85 28 60 02 sll %g1, 2, %g2
20051f0: a1 28 60 07 sll %g1, 7, %l0
20051f4: a0 24 00 02 sub %l0, %g2, %l0
20051f8: a0 04 00 01 add %l0, %g1, %l0
20051fc: c2 07 bf f4 ld [ %fp + -12 ], %g1
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
2005200: 92 14 62 00 or %l1, 0x200, %o1
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
2005204: a1 2c 20 03 sll %l0, 3, %l0
2005208: a0 04 00 01 add %l0, %g1, %l0
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
200520c: 40 00 41 98 call 201586c <.udiv>
2005210: 90 10 00 10 mov %l0, %o0
2005214: c4 07 bf f0 ld [ %fp + -16 ], %g2
2005218: c2 04 80 00 ld [ %l2 ], %g1
200521c: a2 14 62 00 or %l1, 0x200, %l1
2005220: 82 00 40 02 add %g1, %g2, %g1
2005224: 86 02 00 01 add %o0, %g1, %g3
2005228: 83 2a 20 03 sll %o0, 3, %g1
200522c: 85 2a 20 08 sll %o0, 8, %g2
2005230: 84 20 80 01 sub %g2, %g1, %g2
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec++;
}
/* if adjustment is too much negative */
while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
2005234: 03 31 19 4d sethi %hi(0xc4653400), %g1
2005238: 88 10 62 00 or %g1, 0x200, %g4 ! c4653600 <RAM_END+0xc2253600>
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
200523c: 83 28 a0 06 sll %g2, 6, %g1
2005240: 82 20 40 02 sub %g1, %g2, %g1
2005244: 82 00 40 08 add %g1, %o0, %g1
2005248: 85 28 60 02 sll %g1, 2, %g2
200524c: 82 00 40 02 add %g1, %g2, %g1
2005250: 85 28 60 02 sll %g1, 2, %g2
2005254: 82 00 40 02 add %g1, %g2, %g1
2005258: 85 28 60 02 sll %g1, 2, %g2
200525c: 82 00 40 02 add %g1, %g2, %g1
2005260: 83 28 60 09 sll %g1, 9, %g1
2005264: 10 80 00 03 b 2005270 <adjtime+0x12c>
2005268: a0 24 00 01 sub %l0, %g1, %l0
200526c: a0 04 00 11 add %l0, %l1, %l0
2005270: 82 10 00 03 mov %g3, %g1
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec++;
}
/* if adjustment is too much negative */
while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
2005274: 80 a4 00 04 cmp %l0, %g4
2005278: 08 bf ff fd bleu 200526c <adjtime+0x128>
200527c: 86 00 ff ff add %g3, -1, %g3
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec--;
}
_TOD_Set( &ts );
2005280: 90 07 bf f0 add %fp, -16, %o0
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec++;
}
/* if adjustment is too much negative */
while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
2005284: c2 27 bf f0 st %g1, [ %fp + -16 ]
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec--;
}
_TOD_Set( &ts );
2005288: 40 00 06 c7 call 2006da4 <_TOD_Set>
200528c: e0 27 bf f4 st %l0, [ %fp + -12 ]
_Thread_Enable_dispatch();
2005290: 40 00 0b 5b call 2007ffc <_Thread_Enable_dispatch>
2005294: 01 00 00 00 nop
/* set the user's output */
if ( olddelta )
2005298: 80 a6 60 00 cmp %i1, 0
200529c: 02 80 00 08 be 20052bc <adjtime+0x178> <== NEVER TAKEN
20052a0: 01 00 00 00 nop
*olddelta = *delta;
20052a4: c2 04 80 00 ld [ %l2 ], %g1
20052a8: c2 26 40 00 st %g1, [ %i1 ]
20052ac: c2 04 a0 04 ld [ %l2 + 4 ], %g1
20052b0: c2 26 60 04 st %g1, [ %i1 + 4 ]
20052b4: 81 c7 e0 08 ret
20052b8: 91 e8 20 00 restore %g0, 0, %o0
return 0;
}
20052bc: 81 c7 e0 08 ret
20052c0: 91 e8 20 00 restore %g0, 0, %o0
02007070 <alarm>:
}
unsigned int alarm(
unsigned int seconds
)
{
2007070: 9d e3 bf 98 save %sp, -104, %sp
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
2007074: 03 00 80 62 sethi %hi(0x2018800), %g1
2007078: a2 10 63 0c or %g1, 0x30c, %l1 ! 2018b0c <_POSIX_signals_Alarm_timer>
200707c: c2 04 60 1c ld [ %l1 + 0x1c ], %g1
2007080: 80 a0 60 00 cmp %g1, 0
2007084: 12 80 00 0a bne 20070ac <alarm+0x3c>
2007088: a4 10 00 18 mov %i0, %l2
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
200708c: 03 00 80 1c sethi %hi(0x2007000), %g1
the_watchdog->id = id;
the_watchdog->user_data = user_data;
2007090: c0 24 60 24 clr [ %l1 + 0x24 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2007094: 82 10 61 18 or %g1, 0x118, %g1
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2007098: c0 24 60 08 clr [ %l1 + 8 ]
the_watchdog->routine = routine;
the_watchdog->id = id;
200709c: c0 24 60 20 clr [ %l1 + 0x20 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
20070a0: c2 24 60 1c st %g1, [ %l1 + 0x1c ]
the_watchdog->id = id;
the_watchdog->user_data = user_data;
20070a4: 10 80 00 15 b 20070f8 <alarm+0x88>
20070a8: b0 10 20 00 clr %i0
_Watchdog_Initialize( the_timer, _POSIX_signals_Alarm_TSR, 0, NULL );
} else {
switch ( _Watchdog_Remove( the_timer ) ) {
20070ac: 40 00 13 d0 call 200bfec <_Watchdog_Remove>
20070b0: 90 10 00 11 mov %l1, %o0
20070b4: 90 02 3f fe add %o0, -2, %o0
20070b8: 80 a2 20 01 cmp %o0, 1
20070bc: 18 80 00 0f bgu 20070f8 <alarm+0x88> <== NEVER TAKEN
20070c0: b0 10 20 00 clr %i0
* The stop_time and start_time fields are snapshots of ticks since
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
remaining = the_timer->initial -
20070c4: 03 00 80 63 sethi %hi(0x2018c00), %g1
20070c8: c4 04 60 14 ld [ %l1 + 0x14 ], %g2
20070cc: d2 00 62 10 ld [ %g1 + 0x210 ], %o1
20070d0: e0 04 60 18 ld [ %l1 + 0x18 ], %l0
20070d4: 11 00 03 d0 sethi %hi(0xf4000), %o0
20070d8: a0 24 00 02 sub %l0, %g2, %l0
20070dc: 40 00 34 fd call 20144d0 <.udiv>
20070e0: 90 12 22 40 or %o0, 0x240, %o0
20070e4: 92 10 00 08 mov %o0, %o1
20070e8: 40 00 34 fa call 20144d0 <.udiv>
20070ec: 90 10 00 10 mov %l0, %o0
20070f0: c2 04 60 0c ld [ %l1 + 0xc ], %g1
20070f4: b0 20 40 08 sub %g1, %o0, %i0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
20070f8: 13 00 80 62 sethi %hi(0x2018800), %o1
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
20070fc: 11 00 80 63 sethi %hi(0x2018c00), %o0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2007100: 92 12 63 0c or %o1, 0x30c, %o1
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
2007104: 90 12 21 48 or %o0, 0x148, %o0
2007108: 40 00 13 5f call 200be84 <_Watchdog_Insert>
200710c: e4 22 60 0c st %l2, [ %o1 + 0xc ]
}
_Watchdog_Insert_seconds( the_timer, seconds );
return remaining;
}
2007110: 81 c7 e0 08 ret
2007114: 81 e8 00 00 restore
020052c4 <alphasort>:
int
alphasort(
const void *d1,
const void *d2 )
{
return(strcmp((*(struct dirent **)d1)->d_name,
20052c4: d0 02 00 00 ld [ %o0 ], %o0 <== NOT EXECUTED
20052c8: d2 02 40 00 ld [ %o1 ], %o1 <== NOT EXECUTED
20052cc: 90 02 20 0c add %o0, 0xc, %o0 <== NOT EXECUTED
20052d0: 92 02 60 0c add %o1, 0xc, %o1 <== NOT EXECUTED
20052d4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
20052d8: 40 00 32 f2 call 2011ea0 <strcmp> <== NOT EXECUTED
20052dc: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
0200a12c <calloc>:
)
{
register char *cptr;
int length;
MSBUMP(calloc_calls, 1);
200a12c: 9d e3 bf 98 save %sp, -104, %sp
200a130: 05 00 80 5d sethi %hi(0x2017400), %g2
200a134: 84 10 a2 a8 or %g2, 0x2a8, %g2 ! 20176a8 <rtems_malloc_statistics>
200a138: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1
length = nelem * elsize;
200a13c: 92 10 00 18 mov %i0, %o1
)
{
register char *cptr;
int length;
MSBUMP(calloc_calls, 1);
200a140: 82 00 60 01 inc %g1
length = nelem * elsize;
200a144: 90 10 00 19 mov %i1, %o0
200a148: 40 00 26 64 call 2013ad8 <.umul>
200a14c: c2 20 a0 14 st %g1, [ %g2 + 0x14 ]
cptr = malloc( length );
200a150: 40 00 01 a9 call 200a7f4 <malloc>
200a154: b2 10 00 08 mov %o0, %i1
if ( cptr )
200a158: b0 92 20 00 orcc %o0, 0, %i0
200a15c: 02 80 00 04 be 200a16c <calloc+0x40> <== NEVER TAKEN
200a160: 94 10 00 19 mov %i1, %o2
memset( cptr, '\0', length );
200a164: 40 00 0d f7 call 200d940 <memset>
200a168: 92 10 20 00 clr %o1
MSBUMP(malloc_calls, -1); /* subtract off the malloc */
200a16c: 05 00 80 5d sethi %hi(0x2017400), %g2
200a170: 84 10 a2 a8 or %g2, 0x2a8, %g2 ! 20176a8 <rtems_malloc_statistics>
200a174: c2 00 a0 04 ld [ %g2 + 4 ], %g1
200a178: 82 00 7f ff add %g1, -1, %g1
200a17c: c2 20 a0 04 st %g1, [ %g2 + 4 ]
return cptr;
}
200a180: 81 c7 e0 08 ret
200a184: 81 e8 00 00 restore
0200b3d8 <chdir>:
#include <rtems/seterr.h>
int chdir(
const char *pathname
)
{
200b3d8: 9d e3 bf 88 save %sp, -120, %sp
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path(
200b3dc: 92 10 20 01 mov 1, %o1
200b3e0: 90 10 00 18 mov %i0, %o0
200b3e4: a0 07 bf e8 add %fp, -24, %l0
200b3e8: 96 10 20 01 mov 1, %o3
200b3ec: 94 10 00 10 mov %l0, %o2
200b3f0: 7f ff dc e3 call 200277c <rtems_filesystem_evaluate_path>
200b3f4: b0 10 3f ff mov -1, %i0
pathname, RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
if ( result != 0 )
200b3f8: 80 a2 20 00 cmp %o0, 0
200b3fc: 12 80 00 37 bne 200b4d8 <chdir+0x100>
200b400: c4 07 bf f0 ld [ %fp + -16 ], %g2
/*
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type_h ) {
200b404: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1
200b408: 80 a0 60 00 cmp %g1, 0
200b40c: 12 80 00 0c bne 200b43c <chdir+0x64> <== ALWAYS TAKEN
200b410: 01 00 00 00 nop
rtems_filesystem_freenode( &loc );
200b414: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED
200b418: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200b41c: 02 80 00 04 be 200b42c <chdir+0x54> <== NOT EXECUTED
200b420: 01 00 00 00 nop <== NOT EXECUTED
200b424: 9f c0 40 00 call %g1 <== NOT EXECUTED
200b428: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
200b42c: 40 00 0d b8 call 200eb0c <__errno> <== NOT EXECUTED
200b430: 01 00 00 00 nop <== NOT EXECUTED
200b434: 10 80 00 14 b 200b484 <chdir+0xac> <== NOT EXECUTED
200b438: 82 10 20 86 mov 0x86, %g1 ! 86 <PROM_START+0x86> <== NOT EXECUTED
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
200b43c: 9f c0 40 00 call %g1
200b440: 90 10 00 10 mov %l0, %o0
200b444: 80 a2 20 01 cmp %o0, 1
200b448: 02 80 00 12 be 200b490 <chdir+0xb8>
200b44c: 03 00 80 54 sethi %hi(0x2015000), %g1
rtems_filesystem_freenode( &loc );
200b450: c2 07 bf f0 ld [ %fp + -16 ], %g1
200b454: 80 a0 60 00 cmp %g1, 0
200b458: 02 80 00 08 be 200b478 <chdir+0xa0> <== NEVER TAKEN
200b45c: 01 00 00 00 nop
200b460: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
200b464: 80 a0 60 00 cmp %g1, 0
200b468: 02 80 00 04 be 200b478 <chdir+0xa0> <== NEVER TAKEN
200b46c: 01 00 00 00 nop
200b470: 9f c0 40 00 call %g1
200b474: 90 10 00 10 mov %l0, %o0
rtems_set_errno_and_return_minus_one( ENOTDIR );
200b478: 40 00 0d a5 call 200eb0c <__errno>
200b47c: 01 00 00 00 nop
200b480: 82 10 20 14 mov 0x14, %g1 ! 14 <PROM_START+0x14>
200b484: c2 22 00 00 st %g1, [ %o0 ]
200b488: 81 c7 e0 08 ret
200b48c: 91 e8 3f ff restore %g0, -1, %o0
}
rtems_filesystem_freenode( &rtems_filesystem_current );
200b490: d0 00 62 ac ld [ %g1 + 0x2ac ], %o0
200b494: c2 02 20 0c ld [ %o0 + 0xc ], %g1
200b498: 80 a0 60 00 cmp %g1, 0
200b49c: 22 80 00 09 be,a 200b4c0 <chdir+0xe8> <== NEVER TAKEN
200b4a0: 03 00 80 54 sethi %hi(0x2015000), %g1 <== NOT EXECUTED
200b4a4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 201501c <libc_global_reent+0x184>
200b4a8: 80 a0 60 00 cmp %g1, 0
200b4ac: 22 80 00 05 be,a 200b4c0 <chdir+0xe8> <== NEVER TAKEN
200b4b0: 03 00 80 54 sethi %hi(0x2015000), %g1 <== NOT EXECUTED
200b4b4: 9f c0 40 00 call %g1
200b4b8: 90 02 20 04 add %o0, 4, %o0
rtems_filesystem_current = loc;
200b4bc: 03 00 80 54 sethi %hi(0x2015000), %g1
200b4c0: d0 00 62 ac ld [ %g1 + 0x2ac ], %o0 ! 20152ac <rtems_current_user_env>
200b4c4: 92 07 bf e8 add %fp, -24, %o1
200b4c8: 90 02 20 04 add %o0, 4, %o0
200b4cc: 94 10 20 10 mov 0x10, %o2
200b4d0: 40 00 0f 9b call 200f33c <memcpy>
200b4d4: b0 10 20 00 clr %i0
return 0;
}
200b4d8: 81 c7 e0 08 ret
200b4dc: 81 e8 00 00 restore
0200431c <chmod>:
int chmod(
const char *path,
mode_t mode
)
{
200431c: 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 );
2004320: 92 10 20 00 clr %o1
2004324: 90 10 00 18 mov %i0, %o0
2004328: a0 07 bf e8 add %fp, -24, %l0
200432c: 96 10 20 01 mov 1, %o3
2004330: 94 10 00 10 mov %l0, %o2
2004334: 40 00 00 91 call 2004578 <rtems_filesystem_evaluate_path>
2004338: b0 10 3f ff mov -1, %i0
if ( status != 0 )
200433c: 80 a2 20 00 cmp %o0, 0
2004340: 12 80 00 24 bne 20043d0 <chmod+0xb4>
2004344: c2 07 bf ec ld [ %fp + -20 ], %g1
return -1;
if ( !loc.handlers ){
2004348: 80 a0 60 00 cmp %g1, 0
200434c: 32 80 00 10 bne,a 200438c <chmod+0x70> <== ALWAYS TAKEN
2004350: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
rtems_filesystem_freenode( &loc );
2004354: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED
2004358: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200435c: 02 80 00 08 be 200437c <chmod+0x60> <== NOT EXECUTED
2004360: 01 00 00 00 nop <== NOT EXECUTED
2004364: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2004368: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200436c: 02 80 00 04 be 200437c <chmod+0x60> <== NOT EXECUTED
2004370: 01 00 00 00 nop <== NOT EXECUTED
2004374: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004378: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EBADF );
200437c: 40 00 34 47 call 2011498 <__errno> <== NOT EXECUTED
2004380: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2004384: 10 80 00 12 b 20043cc <chmod+0xb0> <== NOT EXECUTED
2004388: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED
}
if ( !loc.handlers->fchmod_h ){
200438c: 80 a0 60 00 cmp %g1, 0
2004390: 12 80 00 12 bne 20043d8 <chmod+0xbc> <== ALWAYS TAKEN
2004394: 93 2e 60 10 sll %i1, 0x10, %o1
rtems_filesystem_freenode( &loc );
2004398: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED
200439c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20043a0: 02 80 00 08 be 20043c0 <chmod+0xa4> <== NOT EXECUTED
20043a4: 01 00 00 00 nop <== NOT EXECUTED
20043a8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
20043ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20043b0: 02 80 00 04 be 20043c0 <chmod+0xa4> <== NOT EXECUTED
20043b4: 01 00 00 00 nop <== NOT EXECUTED
20043b8: 9f c0 40 00 call %g1 <== NOT EXECUTED
20043bc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
20043c0: 40 00 34 36 call 2011498 <__errno> <== NOT EXECUTED
20043c4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20043c8: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
20043cc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20043d0: 81 c7 e0 08 ret
20043d4: 81 e8 00 00 restore
}
result = (*loc.handlers->fchmod_h)( &loc, mode );
20043d8: 90 10 00 10 mov %l0, %o0
20043dc: 9f c0 40 00 call %g1
20043e0: 93 32 60 10 srl %o1, 0x10, %o1
rtems_filesystem_freenode( &loc );
20043e4: c2 07 bf f0 ld [ %fp + -16 ], %g1
20043e8: 80 a0 60 00 cmp %g1, 0
20043ec: 02 bf ff f9 be 20043d0 <chmod+0xb4> <== NEVER TAKEN
20043f0: b0 10 00 08 mov %o0, %i0
20043f4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
20043f8: 80 a0 60 00 cmp %g1, 0
20043fc: 02 80 00 04 be 200440c <chmod+0xf0> <== NEVER TAKEN
2004400: 01 00 00 00 nop
2004404: 9f c0 40 00 call %g1
2004408: 90 10 00 10 mov %l0, %o0
return result;
}
200440c: 81 c7 e0 08 ret
2004410: 81 e8 00 00 restore
02004414 <chown>:
int chown(
const char *path,
uid_t owner,
gid_t group
)
{
2004414: 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 ) )
2004418: 92 10 20 00 clr %o1
200441c: 90 10 00 18 mov %i0, %o0
2004420: a0 07 bf e8 add %fp, -24, %l0
2004424: 96 10 20 01 mov 1, %o3
2004428: 94 10 00 10 mov %l0, %o2
200442c: 40 00 00 53 call 2004578 <rtems_filesystem_evaluate_path>
2004430: b0 10 3f ff mov -1, %i0
2004434: 80 a2 20 00 cmp %o0, 0
2004438: 12 80 00 10 bne 2004478 <chown+0x64>
200443c: c2 07 bf f0 ld [ %fp + -16 ], %g1
return -1;
if ( !loc.ops->chown_h ) {
2004440: c4 00 60 18 ld [ %g1 + 0x18 ], %g2
2004444: 80 a0 a0 00 cmp %g2, 0
2004448: 12 80 00 0e bne 2004480 <chown+0x6c> <== ALWAYS TAKEN
200444c: 93 2e 60 10 sll %i1, 0x10, %o1
rtems_filesystem_freenode( &loc );
2004450: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2004454: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004458: 02 80 00 04 be 2004468 <chown+0x54> <== NOT EXECUTED
200445c: 01 00 00 00 nop <== NOT EXECUTED
2004460: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004464: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
2004468: 40 00 34 0c call 2011498 <__errno> <== NOT EXECUTED
200446c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2004470: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2004474: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2004478: 81 c7 e0 08 ret
200447c: 81 e8 00 00 restore
}
result = (*loc.ops->chown_h)( &loc, owner, group );
2004480: 95 2e a0 10 sll %i2, 0x10, %o2
2004484: 93 32 60 10 srl %o1, 0x10, %o1
2004488: 95 32 a0 10 srl %o2, 0x10, %o2
200448c: 9f c0 80 00 call %g2
2004490: 90 10 00 10 mov %l0, %o0
rtems_filesystem_freenode( &loc );
2004494: c2 07 bf f0 ld [ %fp + -16 ], %g1
2004498: 80 a0 60 00 cmp %g1, 0
200449c: 02 bf ff f7 be 2004478 <chown+0x64> <== NEVER TAKEN
20044a0: b0 10 00 08 mov %o0, %i0
20044a4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
20044a8: 80 a0 60 00 cmp %g1, 0
20044ac: 02 80 00 04 be 20044bc <chown+0xa8> <== NEVER TAKEN
20044b0: 01 00 00 00 nop
20044b4: 9f c0 40 00 call %g1
20044b8: 90 10 00 10 mov %l0, %o0
return result;
}
20044bc: 81 c7 e0 08 ret
20044c0: 81 e8 00 00 restore
02002504 <chroot>:
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
2002504: 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) {
2002508: 23 00 80 54 sethi %hi(0x2015000), %l1
200250c: e0 04 62 ac ld [ %l1 + 0x2ac ], %l0 ! 20152ac <rtems_current_user_env>
2002510: 03 00 80 58 sethi %hi(0x2016000), %g1
2002514: 82 10 61 88 or %g1, 0x188, %g1 ! 2016188 <rtems_global_user_env>
2002518: 80 a4 00 01 cmp %l0, %g1
200251c: 12 80 00 0e bne 2002554 <chroot+0x50> <== NEVER TAKEN
2002520: 01 00 00 00 nop
rtems_libio_set_private_env(); /* try to set a new private env*/
2002524: 40 00 05 ba call 2003c0c <rtems_libio_set_private_env>
2002528: 01 00 00 00 nop
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
200252c: c2 04 62 ac ld [ %l1 + 0x2ac ], %g1
2002530: 80 a0 40 10 cmp %g1, %l0
2002534: 12 80 00 08 bne 2002554 <chroot+0x50> <== ALWAYS TAKEN
2002538: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOTSUP );
200253c: 40 00 31 74 call 200eb0c <__errno> <== NOT EXECUTED
2002540: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff> <== NOT EXECUTED
2002544: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2002548: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200254c: 81 c7 e0 08 ret <== NOT EXECUTED
2002550: 81 e8 00 00 restore <== NOT EXECUTED
}
result = chdir(pathname);
2002554: 40 00 23 a1 call 200b3d8 <chdir>
2002558: 90 10 00 18 mov %i0, %o0
if (result) {
200255c: 80 a2 20 00 cmp %o0, 0
2002560: 12 80 00 0b bne 200258c <chroot+0x88> <== NEVER TAKEN
2002564: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( errno );
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) {
2002568: 11 00 80 4f sethi %hi(0x2013c00), %o0
200256c: 92 10 20 00 clr %o1
2002570: 90 12 22 88 or %o0, 0x288, %o0
2002574: 94 07 bf e8 add %fp, -24, %o2
2002578: 40 00 00 81 call 200277c <rtems_filesystem_evaluate_path>
200257c: 96 10 20 00 clr %o3
2002580: 80 a2 20 00 cmp %o0, 0
2002584: 02 80 00 0a be 20025ac <chroot+0xa8> <== ALWAYS TAKEN
2002588: 03 00 80 54 sethi %hi(0x2015000), %g1
/* our cwd has changed, though - but there is no easy way of return :-( */
rtems_set_errno_and_return_minus_one( errno );
200258c: 40 00 31 60 call 200eb0c <__errno> <== NOT EXECUTED
2002590: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2002594: 40 00 31 5e call 200eb0c <__errno> <== NOT EXECUTED
2002598: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
200259c: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED
20025a0: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED
20025a4: 81 c7 e0 08 ret <== NOT EXECUTED
20025a8: 81 e8 00 00 restore <== NOT EXECUTED
}
rtems_filesystem_freenode(&rtems_filesystem_root);
20025ac: d0 00 62 ac ld [ %g1 + 0x2ac ], %o0
20025b0: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
20025b4: 80 a0 60 00 cmp %g1, 0
20025b8: 22 80 00 09 be,a 20025dc <chroot+0xd8> <== NEVER TAKEN
20025bc: 03 00 80 54 sethi %hi(0x2015000), %g1 <== NOT EXECUTED
20025c0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 201501c <libc_global_reent+0x184>
20025c4: 80 a0 60 00 cmp %g1, 0
20025c8: 22 80 00 05 be,a 20025dc <chroot+0xd8> <== NEVER TAKEN
20025cc: 03 00 80 54 sethi %hi(0x2015000), %g1 <== NOT EXECUTED
20025d0: 9f c0 40 00 call %g1
20025d4: 90 02 20 14 add %o0, 0x14, %o0
rtems_filesystem_root = loc;
20025d8: 03 00 80 54 sethi %hi(0x2015000), %g1
20025dc: d0 00 62 ac ld [ %g1 + 0x2ac ], %o0 ! 20152ac <rtems_current_user_env>
20025e0: 92 07 bf e8 add %fp, -24, %o1
20025e4: 94 10 20 10 mov 0x10, %o2
20025e8: 90 02 20 14 add %o0, 0x14, %o0
20025ec: 40 00 33 54 call 200f33c <memcpy>
20025f0: b0 10 20 00 clr %i0
return 0;
}
20025f4: 81 c7 e0 08 ret
20025f8: 81 e8 00 00 restore
02005f68 <clock_gettime>:
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
2005f68: 9d e3 bf 98 save %sp, -104, %sp
if ( !tp )
2005f6c: 90 96 60 00 orcc %i1, 0, %o0
2005f70: 12 80 00 06 bne 2005f88 <clock_gettime+0x20>
2005f74: 80 a6 20 01 cmp %i0, 1
rtems_set_errno_and_return_minus_one( EINVAL );
2005f78: 40 00 23 a0 call 200edf8 <__errno>
2005f7c: 01 00 00 00 nop
2005f80: 10 80 00 15 b 2005fd4 <clock_gettime+0x6c>
2005f84: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
if ( clock_id == CLOCK_REALTIME )
2005f88: 12 80 00 05 bne 2005f9c <clock_gettime+0x34>
2005f8c: 80 a6 20 04 cmp %i0, 4
_TOD_Get(tp);
2005f90: 40 00 09 0a call 20083b8 <_TOD_Get>
2005f94: b0 10 20 00 clr %i0
2005f98: 30 80 00 16 b,a 2005ff0 <clock_gettime+0x88>
#ifdef CLOCK_MONOTONIC
else if ( clock_id == CLOCK_MONOTONIC )
2005f9c: 02 80 00 05 be 2005fb0 <clock_gettime+0x48> <== NEVER TAKEN
2005fa0: 01 00 00 00 nop
_TOD_Get_uptime(tp);
#endif
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME )
2005fa4: 80 a6 20 02 cmp %i0, 2
2005fa8: 12 80 00 06 bne 2005fc0 <clock_gettime+0x58>
2005fac: 80 a6 20 03 cmp %i0, 3
_TOD_Get_uptime(tp);
2005fb0: 40 00 09 1b call 200841c <_TOD_Get_uptime>
2005fb4: b0 10 20 00 clr %i0
2005fb8: 81 c7 e0 08 ret
2005fbc: 81 e8 00 00 restore
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME )
2005fc0: 12 80 00 08 bne 2005fe0 <clock_gettime+0x78>
2005fc4: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOSYS );
2005fc8: 40 00 23 8c call 200edf8 <__errno>
2005fcc: 01 00 00 00 nop
2005fd0: 82 10 20 58 mov 0x58, %g1 ! 58 <PROM_START+0x58>
2005fd4: c2 22 00 00 st %g1, [ %o0 ]
2005fd8: 81 c7 e0 08 ret
2005fdc: 91 e8 3f ff restore %g0, -1, %o0
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
2005fe0: 40 00 23 86 call 200edf8 <__errno>
2005fe4: b0 10 3f ff mov -1, %i0
2005fe8: 82 10 20 16 mov 0x16, %g1
2005fec: c2 22 00 00 st %g1, [ %o0 ]
return 0;
}
2005ff0: 81 c7 e0 08 ret
2005ff4: 81 e8 00 00 restore
02005ff8 <clock_settime>:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
2005ff8: 9d e3 bf 98 save %sp, -104, %sp
if ( !tp )
2005ffc: 90 96 60 00 orcc %i1, 0, %o0
2006000: 02 80 00 0b be 200602c <clock_settime+0x34> <== NEVER TAKEN
2006004: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
2006008: 80 a6 20 01 cmp %i0, 1
200600c: 12 80 00 15 bne 2006060 <clock_settime+0x68>
2006010: 80 a6 20 02 cmp %i0, 2
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
2006014: c4 02 00 00 ld [ %o0 ], %g2
2006018: 03 08 76 b9 sethi %hi(0x21dae400), %g1
200601c: 82 10 60 ff or %g1, 0xff, %g1 ! 21dae4ff <RAM_END+0x1f9ae4ff>
2006020: 80 a0 80 01 cmp %g2, %g1
2006024: 18 80 00 06 bgu 200603c <clock_settime+0x44>
2006028: 05 00 80 6e sethi %hi(0x201b800), %g2
rtems_set_errno_and_return_minus_one( EINVAL );
200602c: 40 00 23 73 call 200edf8 <__errno>
2006030: 01 00 00 00 nop
2006034: 10 80 00 13 b 2006080 <clock_settime+0x88>
2006038: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
200603c: c2 00 a2 20 ld [ %g2 + 0x220 ], %g1
2006040: 82 00 60 01 inc %g1
2006044: c2 20 a2 20 st %g1, [ %g2 + 0x220 ]
_Thread_Disable_dispatch();
_TOD_Set( tp );
2006048: 40 00 09 1d call 20084bc <_TOD_Set>
200604c: b0 10 20 00 clr %i0
_Thread_Enable_dispatch();
2006050: 40 00 0d b1 call 2009714 <_Thread_Enable_dispatch>
2006054: 01 00 00 00 nop
2006058: 81 c7 e0 08 ret
200605c: 81 e8 00 00 restore
}
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME )
2006060: 02 80 00 05 be 2006074 <clock_settime+0x7c>
2006064: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME )
2006068: 80 a6 20 03 cmp %i0, 3
200606c: 12 80 00 08 bne 200608c <clock_settime+0x94>
2006070: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOSYS );
2006074: 40 00 23 61 call 200edf8 <__errno>
2006078: 01 00 00 00 nop
200607c: 82 10 20 58 mov 0x58, %g1 ! 58 <PROM_START+0x58>
2006080: c2 22 00 00 st %g1, [ %o0 ]
2006084: 81 c7 e0 08 ret
2006088: 91 e8 3f ff restore %g0, -1, %o0
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
200608c: 40 00 23 5b call 200edf8 <__errno>
2006090: b0 10 3f ff mov -1, %i0
2006094: 82 10 20 16 mov 0x16, %g1
2006098: c2 22 00 00 st %g1, [ %o0 ]
return 0;
}
200609c: 81 c7 e0 08 ret
20060a0: 81 e8 00 00 restore
0200a188 <close>:
#include <rtems/libio_.h>
int close(
int fd
)
{
200a188: 9d e3 bf 98 save %sp, -104, %sp
rtems_libio_t *iop;
rtems_status_code rc;
rtems_libio_check_fd(fd);
200a18c: 03 00 80 5a sethi %hi(0x2016800), %g1
200a190: c2 00 61 48 ld [ %g1 + 0x148 ], %g1 ! 2016948 <rtems_libio_number_iops>
200a194: 80 a6 00 01 cmp %i0, %g1
200a198: 1a 80 00 0e bcc 200a1d0 <close+0x48>
200a19c: 01 00 00 00 nop
iop = rtems_libio_iop(fd);
200a1a0: 03 00 80 5d sethi %hi(0x2017400), %g1
200a1a4: c6 00 62 44 ld [ %g1 + 0x244 ], %g3 ! 2017644 <rtems_libio_iops>
200a1a8: 85 2e 20 02 sll %i0, 2, %g2
200a1ac: 83 2e 20 04 sll %i0, 4, %g1
200a1b0: 82 20 40 02 sub %g1, %g2, %g1
200a1b4: 82 00 40 18 add %g1, %i0, %g1
200a1b8: 83 28 60 02 sll %g1, 2, %g1
200a1bc: b0 00 c0 01 add %g3, %g1, %i0
rtems_libio_check_is_open(iop);
200a1c0: c2 06 20 0c ld [ %i0 + 0xc ], %g1
200a1c4: 80 88 61 00 btst 0x100, %g1
200a1c8: 32 80 00 08 bne,a 200a1e8 <close+0x60>
200a1cc: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
200a1d0: 40 00 0b b1 call 200d094 <__errno>
200a1d4: 01 00 00 00 nop
200a1d8: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9>
200a1dc: c2 22 00 00 st %g1, [ %o0 ]
200a1e0: 10 80 00 16 b 200a238 <close+0xb0>
200a1e4: 90 10 3f ff mov -1, %o0
rc = RTEMS_SUCCESSFUL;
if ( iop->handlers->close_h )
200a1e8: c2 00 60 04 ld [ %g1 + 4 ], %g1
200a1ec: 80 a0 60 00 cmp %g1, 0
200a1f0: 02 80 00 05 be 200a204 <close+0x7c> <== NEVER TAKEN
200a1f4: a0 10 20 00 clr %l0
rc = (*iop->handlers->close_h)( iop );
200a1f8: 9f c0 40 00 call %g1
200a1fc: 90 10 00 18 mov %i0, %o0
200a200: a0 10 00 08 mov %o0, %l0
rtems_filesystem_freenode( &iop->pathinfo );
200a204: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
200a208: 80 a0 60 00 cmp %g1, 0
200a20c: 02 80 00 08 be 200a22c <close+0xa4> <== NEVER TAKEN
200a210: 01 00 00 00 nop
200a214: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
200a218: 80 a0 60 00 cmp %g1, 0
200a21c: 02 80 00 04 be 200a22c <close+0xa4>
200a220: 01 00 00 00 nop
200a224: 9f c0 40 00 call %g1
200a228: 90 06 20 10 add %i0, 0x10, %o0
rtems_libio_free( iop );
200a22c: 40 00 00 f0 call 200a5ec <rtems_libio_free>
200a230: 90 10 00 18 mov %i0, %o0
return rc;
200a234: 90 10 00 10 mov %l0, %o0
}
200a238: 81 c7 e0 08 ret
200a23c: 91 e8 00 08 restore %g0, %o0, %o0
020032f0 <closedir>:
* close a directory.
*/
int
closedir(
DIR *dirp )
{
20032f0: 9d e3 bf 98 save %sp, -104, %sp
int fd;
if ( !dirp )
20032f4: a0 96 20 00 orcc %i0, 0, %l0
20032f8: 32 80 00 08 bne,a 2003318 <closedir+0x28> <== ALWAYS TAKEN
20032fc: d0 04 20 0c ld [ %l0 + 0xc ], %o0
rtems_set_errno_and_return_minus_one( EBADF );
2003300: 40 00 31 ee call 200fab8 <__errno> <== NOT EXECUTED
2003304: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2003308: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED
200330c: 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));
}
2003310: 81 c7 e0 08 ret <== NOT EXECUTED
2003314: 81 e8 00 00 restore <== NOT EXECUTED
if ( !dirp )
rtems_set_errno_and_return_minus_one( EBADF );
fd = dirp->dd_fd;
dirp->dd_fd = -1;
2003318: 82 10 3f ff mov -1, %g1
int fd;
if ( !dirp )
rtems_set_errno_and_return_minus_one( EBADF );
fd = dirp->dd_fd;
200331c: f0 04 00 00 ld [ %l0 ], %i0
dirp->dd_fd = -1;
dirp->dd_loc = 0;
2003320: c0 24 20 04 clr [ %l0 + 4 ]
(void)free((void *)dirp->dd_buf);
2003324: 40 00 00 b9 call 2003608 <free>
2003328: c2 24 00 00 st %g1, [ %l0 ]
(void)free((void *)dirp);
200332c: 40 00 00 b7 call 2003608 <free>
2003330: 90 10 00 10 mov %l0, %o0
return(close(fd));
2003334: 40 00 00 03 call 2003340 <close>
2003338: 81 e8 00 00 restore
0200c3ac <device_close>:
*/
int device_close(
rtems_libio_t *iop
)
{
200c3ac: 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;
200c3b0: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
args.iop = iop;
200c3b4: f0 27 bf ec st %i0, [ %fp + -20 ]
args.flags = 0;
200c3b8: c0 27 bf f0 clr [ %fp + -16 ]
args.mode = 0;
200c3bc: c0 27 bf f4 clr [ %fp + -12 ]
status = rtems_io_close(
200c3c0: d2 00 60 50 ld [ %g1 + 0x50 ], %o1
200c3c4: d0 00 60 4c ld [ %g1 + 0x4c ], %o0
200c3c8: 94 07 bf ec add %fp, -20, %o2
200c3cc: 40 00 02 15 call 200cc20 <rtems_io_close>
200c3d0: b0 10 20 00 clr %i0
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status ) {
200c3d4: 80 a2 20 00 cmp %o0, 0
200c3d8: 02 80 00 05 be 200c3ec <device_close+0x40> <== ALWAYS TAKEN
200c3dc: 01 00 00 00 nop
return rtems_deviceio_errno(status);
200c3e0: 7f ff ff a3 call 200c26c <rtems_deviceio_errno> <== NOT EXECUTED
200c3e4: 01 00 00 00 nop <== NOT EXECUTED
200c3e8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
}
return 0;
}
200c3ec: 81 c7 e0 08 ret
200c3f0: 81 e8 00 00 restore
0200c2a0 <device_ioctl>:
int device_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
200c2a0: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED
args.iop = iop;
args.command = command;
args.buffer = buffer;
the_jnode = iop->file_info;
200c2a4: 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;
200c2a8: f2 27 bf ec st %i1, [ %fp + -20 ] <== NOT EXECUTED
args.buffer = buffer;
200c2ac: 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;
200c2b0: 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(
200c2b4: d2 00 60 50 ld [ %g1 + 0x50 ], %o1 <== NOT EXECUTED
200c2b8: d0 00 60 4c ld [ %g1 + 0x4c ], %o0 <== NOT EXECUTED
200c2bc: 40 00 02 6f call 200cc78 <rtems_io_control> <== NOT EXECUTED
200c2c0: 94 07 bf e8 add %fp, -24, %o2 <== NOT EXECUTED
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
200c2c4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200c2c8: 22 80 00 06 be,a 200c2e0 <device_ioctl+0x40> <== NOT EXECUTED
200c2cc: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED
return rtems_deviceio_errno(status);
200c2d0: 7f ff ff e7 call 200c26c <rtems_deviceio_errno> <== NOT EXECUTED
200c2d4: 01 00 00 00 nop <== NOT EXECUTED
return args.ioctl_return;
}
200c2d8: 81 c7 e0 08 ret <== NOT EXECUTED
200c2dc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
200c2e0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
200c2e4: 81 c7 e0 08 ret <== NOT EXECUTED
200c2e8: 81 e8 00 00 restore <== NOT EXECUTED
0200c3f4 <device_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
200c3f4: 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;
200c3f8: 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;
200c3fc: c4 06 20 2c ld [ %i0 + 0x2c ], %g2
args.iop = iop;
200c400: f0 27 bf ec st %i0, [ %fp + -20 ]
args.flags = iop->flags;
200c404: c2 27 bf f0 st %g1, [ %fp + -16 ]
args.mode = mode;
200c408: f6 27 bf f4 st %i3, [ %fp + -12 ]
status = rtems_io_open(
200c40c: d2 00 a0 50 ld [ %g2 + 0x50 ], %o1
200c410: d0 00 a0 4c ld [ %g2 + 0x4c ], %o0
200c414: 94 07 bf ec add %fp, -20, %o2
200c418: 40 00 02 2e call 200ccd0 <rtems_io_open>
200c41c: b0 10 20 00 clr %i0
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
200c420: 80 a2 20 00 cmp %o0, 0
200c424: 02 80 00 05 be 200c438 <device_open+0x44> <== ALWAYS TAKEN
200c428: 01 00 00 00 nop
return rtems_deviceio_errno(status);
200c42c: 7f ff ff 90 call 200c26c <rtems_deviceio_errno> <== NOT EXECUTED
200c430: 01 00 00 00 nop <== NOT EXECUTED
200c434: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
return 0;
}
200c438: 81 c7 e0 08 ret
200c43c: 81 e8 00 00 restore
0200c34c <device_read>:
ssize_t device_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
200c34c: 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;
200c350: 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;
200c354: 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;
200c358: c6 06 20 2c ld [ %i0 + 0x2c ], %g3 <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
200c35c: 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;
200c360: c2 27 bf e4 st %g1, [ %fp + -28 ] <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
200c364: f4 27 bf ec st %i2, [ %fp + -20 ] <== NOT EXECUTED
args.flags = iop->flags;
200c368: 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;
200c36c: 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;
200c370: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
status = rtems_io_read(
200c374: d2 00 e0 50 ld [ %g3 + 0x50 ], %o1 <== NOT EXECUTED
200c378: d0 00 e0 4c ld [ %g3 + 0x4c ], %o0 <== NOT EXECUTED
200c37c: 40 00 02 6b call 200cd28 <rtems_io_read> <== NOT EXECUTED
200c380: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
200c384: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200c388: 22 80 00 06 be,a 200c3a0 <device_read+0x54> <== NOT EXECUTED
200c38c: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED
return rtems_deviceio_errno(status);
200c390: 7f ff ff b7 call 200c26c <rtems_deviceio_errno> <== NOT EXECUTED
200c394: 01 00 00 00 nop <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
200c398: 81 c7 e0 08 ret <== NOT EXECUTED
200c39c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
200c3a0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
200c3a4: 81 c7 e0 08 ret <== NOT EXECUTED
200c3a8: 81 e8 00 00 restore <== NOT EXECUTED
0200c2ec <device_write>:
ssize_t device_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
200c2ec: 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;
200c2f0: 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;
200c2f4: 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;
200c2f8: c6 06 20 2c ld [ %i0 + 0x2c ], %g3
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
200c2fc: 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;
200c300: c2 27 bf e4 st %g1, [ %fp + -28 ]
args.buffer = (void *) buffer;
args.count = count;
200c304: f4 27 bf ec st %i2, [ %fp + -20 ]
args.flags = iop->flags;
200c308: 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;
200c30c: 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;
200c310: c0 27 bf f4 clr [ %fp + -12 ]
status = rtems_io_write(
200c314: d2 00 e0 50 ld [ %g3 + 0x50 ], %o1
200c318: d0 00 e0 4c ld [ %g3 + 0x4c ], %o0
200c31c: 40 00 02 99 call 200cd80 <rtems_io_write>
200c320: 94 07 bf e0 add %fp, -32, %o2
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
200c324: 80 a2 20 00 cmp %o0, 0
200c328: 22 80 00 06 be,a 200c340 <device_write+0x54> <== ALWAYS TAKEN
200c32c: d0 07 bf f4 ld [ %fp + -12 ], %o0
return rtems_deviceio_errno(status);
200c330: 7f ff ff cf call 200c26c <rtems_deviceio_errno> <== NOT EXECUTED
200c334: 01 00 00 00 nop <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
200c338: 81 c7 e0 08 ret <== NOT EXECUTED
200c33c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
200c340: b0 10 00 08 mov %o0, %i0
200c344: 81 c7 e0 08 ret
200c348: 81 e8 00 00 restore
02003be8 <drainOutput>:
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
2003be8: 9d e3 bf 98 save %sp, -104, %sp
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
2003bec: c2 06 20 b4 ld [ %i0 + 0xb4 ], %g1
2003bf0: 80 a0 60 00 cmp %g1, 0
2003bf4: 02 80 00 1a be 2003c5c <drainOutput+0x74> <== ALWAYS TAKEN
2003bf8: 01 00 00 00 nop
rtems_interrupt_disable (level);
2003bfc: 7f ff f8 5c call 2001d6c <sparc_disable_interrupts> <== NOT EXECUTED
2003c00: 01 00 00 00 nop <== NOT EXECUTED
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
tty->rawOutBufState = rob_wait;
2003c04: 10 80 00 0f b 2003c40 <drainOutput+0x58> <== NOT EXECUTED
2003c08: a0 10 20 02 mov 2, %l0 ! 2 <PROM_START+0x2> <== NOT EXECUTED
rtems_interrupt_enable (level);
2003c0c: 7f ff f8 5c call 2001d7c <sparc_enable_interrupts> <== NOT EXECUTED
2003c10: 01 00 00 00 nop <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
2003c14: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED
2003c18: 92 10 20 00 clr %o1 <== NOT EXECUTED
2003c1c: 40 00 06 28 call 20054bc <rtems_semaphore_obtain> <== NOT EXECUTED
2003c20: 94 10 20 00 clr %o2 <== NOT EXECUTED
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2003c24: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2003c28: 02 80 00 04 be 2003c38 <drainOutput+0x50> <== NOT EXECUTED
2003c2c: 01 00 00 00 nop <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
2003c30: 40 00 07 e5 call 2005bc4 <rtems_fatal_error_occurred> <== NOT EXECUTED
2003c34: 01 00 00 00 nop <== NOT EXECUTED
rtems_interrupt_disable (level);
2003c38: 7f ff f8 4d call 2001d6c <sparc_disable_interrupts> <== NOT EXECUTED
2003c3c: 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) {
2003c40: c4 06 20 84 ld [ %i0 + 0x84 ], %g2 <== NOT EXECUTED
2003c44: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED
2003c48: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2003c4c: 32 bf ff f0 bne,a 2003c0c <drainOutput+0x24> <== NOT EXECUTED
2003c50: e0 26 20 94 st %l0, [ %i0 + 0x94 ] <== NOT EXECUTED
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
rtems_interrupt_enable (level);
2003c54: 7f ff f8 4a call 2001d7c <sparc_enable_interrupts> <== NOT EXECUTED
2003c58: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
2003c5c: 81 c7 e0 08 ret
2003c60: 81 e8 00 00 restore
02002dbc <dup2>:
int dup2(
int fildes,
int fildes2
)
{
2002dbc: 9d e3 bf 48 save %sp, -184, %sp
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
2002dc0: a0 07 bf a8 add %fp, -88, %l0
2002dc4: 90 10 00 18 mov %i0, %o0
2002dc8: 40 00 01 d4 call 2003518 <fstat>
2002dcc: 92 10 00 10 mov %l0, %o1
if ( status == -1 )
2002dd0: 80 a2 3f ff cmp %o0, -1
2002dd4: 02 80 00 0e be 2002e0c <dup2+0x50> <== NEVER TAKEN
2002dd8: 90 10 3f ff mov -1, %o0
/*
* If fildes2 is not valid, then we should not do anything either.
*/
status = fstat( fildes2, &buf );
2002ddc: 92 10 00 10 mov %l0, %o1
2002de0: 40 00 01 ce call 2003518 <fstat>
2002de4: 90 10 00 19 mov %i1, %o0
if ( status == -1 )
2002de8: 80 a2 3f ff cmp %o0, -1
2002dec: 02 80 00 07 be 2002e08 <dup2+0x4c> <== ALWAYS TAKEN
2002df0: 90 10 00 18 mov %i0, %o0
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
2002df4: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
2002df8: 40 00 00 97 call 2003054 <fcntl> <== NOT EXECUTED
2002dfc: 92 10 20 00 clr %o1 <== NOT EXECUTED
}
2002e00: 81 c7 e0 08 ret <== NOT EXECUTED
2002e04: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
2002e08: 90 10 3f ff mov -1, %o0
}
2002e0c: b0 10 00 08 mov %o0, %i0
2002e10: 81 c7 e0 08 ret
2002e14: 81 e8 00 00 restore
02003654 <echo>:
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
2003654: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
2003658: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED
200365c: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED
2003660: 02 80 00 1b be 20036cc <echo+0x78> <== NOT EXECUTED
2003664: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2003668: 03 00 80 5b sethi %hi(0x2016c00), %g1 <== NOT EXECUTED
200366c: c2 00 62 f8 ld [ %g1 + 0x2f8 ], %g1 ! 2016ef8 <__ctype_ptr><== NOT EXECUTED
2003670: 84 0e 20 ff and %i0, 0xff, %g2 <== NOT EXECUTED
2003674: c2 08 40 02 ldub [ %g1 + %g2 ], %g1 <== NOT EXECUTED
2003678: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
200367c: 22 80 00 15 be,a 20036d0 <echo+0x7c> <== NOT EXECUTED
2003680: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED
2003684: 80 a0 a0 09 cmp %g2, 9 <== NOT EXECUTED
2003688: 02 80 00 11 be 20036cc <echo+0x78> <== NOT EXECUTED
200368c: 80 a0 a0 0a cmp %g2, 0xa <== NOT EXECUTED
2003690: 02 80 00 10 be 20036d0 <echo+0x7c> <== NOT EXECUTED
2003694: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
2003698: 82 1e 20 40 xor %i0, 0x40, %g1 <== NOT EXECUTED
200369c: c2 2f bf f1 stb %g1, [ %fp + -15 ] <== NOT EXECUTED
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
20036a0: 82 10 20 5e mov 0x5e, %g1 <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
20036a4: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
20036a8: c2 2f bf f0 stb %g1, [ %fp + -16 ] <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
20036ac: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
20036b0: 7f ff ff 3b call 200339c <rtems_termios_puts> <== NOT EXECUTED
20036b4: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
tty->column += 2;
20036b8: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED
20036bc: 82 00 60 02 add %g1, 2, %g1 <== NOT EXECUTED
20036c0: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED
20036c4: 81 c7 e0 08 ret <== NOT EXECUTED
20036c8: 81 e8 00 00 restore <== NOT EXECUTED
}
else {
oproc (c, tty);
20036cc: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED
20036d0: 7f ff ff 7f call 20034cc <oproc> <== NOT EXECUTED
20036d4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
20036d8: 81 c7 e0 08 ret <== NOT EXECUTED
20036dc: 81 e8 00 00 restore <== NOT EXECUTED
020036e0 <erase>:
* 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)
{
20036e0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
if (tty->ccount == 0)
20036e4: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 <== NOT EXECUTED
20036e8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20036ec: 02 80 00 0a be 2003714 <erase+0x34> <== NOT EXECUTED
20036f0: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED
return;
if (lineFlag) {
20036f4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
20036f8: 02 80 00 78 be 20038d8 <erase+0x1f8> <== NOT EXECUTED
20036fc: 03 00 80 5b sethi %hi(0x2016c00), %g1 <== NOT EXECUTED
if (!(tty->termios.c_lflag & ECHO)) {
2003700: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED
2003704: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED
2003708: 32 80 00 05 bne,a 200371c <erase+0x3c> <== NOT EXECUTED
200370c: 80 88 60 10 btst 0x10, %g1 <== NOT EXECUTED
tty->ccount = 0;
2003710: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED
2003714: 81 c7 e0 08 ret <== NOT EXECUTED
2003718: 81 e8 00 00 restore <== NOT EXECUTED
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
200371c: 12 80 00 6f bne 20038d8 <erase+0x1f8> <== NOT EXECUTED
2003720: 03 00 80 5b sethi %hi(0x2016c00), %g1 <== NOT EXECUTED
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
2003724: 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;
2003728: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
200372c: 7f ff ff ca call 2003654 <echo> <== NOT EXECUTED
2003730: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
2003734: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED
echo ('\n', tty);
2003738: b2 10 00 18 mov %i0, %i1 <== NOT EXECUTED
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
if (tty->termios.c_lflag & ECHOK)
200373c: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
2003740: 02 bf ff f5 be 2003714 <erase+0x34> <== NOT EXECUTED
2003744: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED
2003748: 30 80 00 0f b,a 2003784 <erase+0xa4> <== NOT EXECUTED
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
if (tty->termios.c_lflag & ECHO) {
200374c: c4 04 20 3c ld [ %l0 + 0x3c ], %g2 <== NOT EXECUTED
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
2003750: 86 00 ff ff add %g3, -1, %g3 <== NOT EXECUTED
2003754: c6 24 20 20 st %g3, [ %l0 + 0x20 ] <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
2003758: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED
200375c: 02 80 00 5a be 20038c4 <erase+0x1e4> <== NOT EXECUTED
2003760: c2 08 40 03 ldub [ %g1 + %g3 ], %g1 <== NOT EXECUTED
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
2003764: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
2003768: 12 80 00 09 bne 200378c <erase+0xac> <== NOT EXECUTED
200376c: b0 08 60 ff and %g1, 0xff, %i0 <== NOT EXECUTED
2003770: 80 88 a0 10 btst 0x10, %g2 <== NOT EXECUTED
2003774: 12 80 00 07 bne 2003790 <erase+0xb0> <== NOT EXECUTED
2003778: 80 a6 20 09 cmp %i0, 9 <== NOT EXECUTED
echo (tty->termios.c_cc[VERASE], tty);
200377c: f0 0c 20 43 ldub [ %l0 + 0x43 ], %i0 <== NOT EXECUTED
2003780: b2 10 00 10 mov %l0, %i1 <== NOT EXECUTED
2003784: 7f ff ff b4 call 2003654 <echo> <== NOT EXECUTED
2003788: 81 e8 00 00 restore <== NOT EXECUTED
}
else if (c == '\t') {
200378c: 80 a6 20 09 cmp %i0, 9 <== NOT EXECUTED
2003790: 32 80 00 29 bne,a 2003834 <erase+0x154> <== NOT EXECUTED
2003794: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
if (tty->termios.c_lflag & ECHOCTL)
2003798: 9a 08 a2 00 and %g2, 0x200, %o5 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
}
else if (c == '\t') {
int col = tty->read_start_column;
200379c: f0 04 20 2c ld [ %l0 + 0x2c ], %i0 <== NOT EXECUTED
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
20037a0: c8 04 40 00 ld [ %l1 ], %g4 <== NOT EXECUTED
20037a4: 10 80 00 12 b 20037ec <erase+0x10c> <== NOT EXECUTED
20037a8: 84 10 20 00 clr %g2 <== NOT EXECUTED
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
20037ac: c2 08 40 02 ldub [ %g1 + %g2 ], %g1 <== NOT EXECUTED
20037b0: 80 a0 60 09 cmp %g1, 9 <== NOT EXECUTED
20037b4: 32 80 00 05 bne,a 20037c8 <erase+0xe8> <== NOT EXECUTED
20037b8: c2 09 00 01 ldub [ %g4 + %g1 ], %g1 <== NOT EXECUTED
col = (col | 7) + 1;
20037bc: 82 16 20 07 or %i0, 7, %g1 <== NOT EXECUTED
20037c0: 10 80 00 0a b 20037e8 <erase+0x108> <== NOT EXECUTED
20037c4: b0 00 60 01 add %g1, 1, %i0 <== NOT EXECUTED
}
else if (iscntrl (c)) {
20037c8: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
20037cc: 22 80 00 07 be,a 20037e8 <erase+0x108> <== NOT EXECUTED
20037d0: b0 06 20 01 inc %i0 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL)
20037d4: 80 a3 60 00 cmp %o5, 0 <== NOT EXECUTED
20037d8: 32 80 00 04 bne,a 20037e8 <erase+0x108> <== NOT EXECUTED
20037dc: b0 06 20 02 add %i0, 2, %i0 <== NOT EXECUTED
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
20037e0: 10 80 00 03 b 20037ec <erase+0x10c> <== NOT EXECUTED
20037e4: 84 00 a0 01 inc %g2 <== NOT EXECUTED
20037e8: 84 00 a0 01 inc %g2 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
20037ec: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED
20037f0: 32 bf ff ef bne,a 20037ac <erase+0xcc> <== NOT EXECUTED
20037f4: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
20037f8: 10 80 00 08 b 2003818 <erase+0x138> <== NOT EXECUTED
20037fc: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
2003800: 7f ff fe e7 call 200339c <rtems_termios_puts> <== NOT EXECUTED
2003804: 01 00 00 00 nop <== NOT EXECUTED
tty->column--;
2003808: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED
200380c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
2003810: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
2003814: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
2003818: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
200381c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
2003820: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED
2003824: 14 bf ff f7 bg 2003800 <erase+0x120> <== NOT EXECUTED
2003828: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
200382c: 10 80 00 27 b 20038c8 <erase+0x1e8> <== NOT EXECUTED
2003830: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
2003834: c2 08 40 18 ldub [ %g1 + %i0 ], %g1 <== NOT EXECUTED
2003838: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
200383c: 22 80 00 10 be,a 200387c <erase+0x19c> <== NOT EXECUTED
2003840: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED
2003844: 80 88 a2 00 btst 0x200, %g2 <== NOT EXECUTED
2003848: 22 80 00 0d be,a 200387c <erase+0x19c> <== NOT EXECUTED
200384c: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
2003850: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
2003854: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED
2003858: 7f ff fe d1 call 200339c <rtems_termios_puts> <== NOT EXECUTED
200385c: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
if (tty->column)
2003860: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED
2003864: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003868: 22 80 00 05 be,a 200387c <erase+0x19c> <== NOT EXECUTED
200386c: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED
tty->column--;
2003870: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
2003874: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
2003878: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED
200387c: c2 08 40 18 ldub [ %g1 + %i0 ], %g1 <== NOT EXECUTED
2003880: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
2003884: 02 80 00 07 be 20038a0 <erase+0x1c0> <== NOT EXECUTED
2003888: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
200388c: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED
2003890: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED
2003894: 02 80 00 0d be 20038c8 <erase+0x1e8> <== NOT EXECUTED
2003898: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
200389c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
20038a0: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED
20038a4: 7f ff fe be call 200339c <rtems_termios_puts> <== NOT EXECUTED
20038a8: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
if (tty->column)
20038ac: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED
20038b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20038b4: 02 80 00 05 be 20038c8 <erase+0x1e8> <== NOT EXECUTED
20038b8: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
tty->column--;
20038bc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
20038c0: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED
}
}
}
if (!lineFlag)
20038c4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
20038c8: 32 80 00 0a bne,a 20038f0 <erase+0x210> <== NOT EXECUTED
20038cc: c6 04 20 20 ld [ %l0 + 0x20 ], %g3 <== NOT EXECUTED
20038d0: 81 c7 e0 08 ret <== NOT EXECUTED
20038d4: 81 e8 00 00 restore <== NOT EXECUTED
20038d8: a2 10 62 f8 or %g1, 0x2f8, %l1 <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
if (tty->column)
tty->column--;
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
20038dc: 03 00 80 56 sethi %hi(0x2015800), %g1 <== NOT EXECUTED
20038e0: a4 10 62 78 or %g1, 0x278, %l2 ! 2015a78 <pollCallbacks.4788+0x398><== NOT EXECUTED
/*
* Back up over the tab
*/
while (tty->column > col) {
rtems_termios_puts ("\b", 1, tty);
20038e4: 03 00 80 56 sethi %hi(0x2015800), %g1 <== NOT EXECUTED
20038e8: a6 10 62 70 or %g1, 0x270, %l3 ! 2015a70 <pollCallbacks.4788+0x390><== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
20038ec: c6 04 20 20 ld [ %l0 + 0x20 ], %g3 <== NOT EXECUTED
20038f0: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED
20038f4: 32 bf ff 96 bne,a 200374c <erase+0x6c> <== NOT EXECUTED
20038f8: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED
20038fc: 81 c7 e0 08 ret <== NOT EXECUTED
2003900: 81 e8 00 00 restore <== NOT EXECUTED
02003054 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
2003054: 9d e3 bf 90 save %sp, -112, %sp
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
2003058: 03 00 80 59 sethi %hi(0x2016400), %g1
200305c: da 00 63 08 ld [ %g1 + 0x308 ], %o5 ! 2016708 <rtems_libio_number_iops>
...
)
{
int ret;
va_list ap;
va_start( ap, cmd );
2003060: 86 07 a0 4c add %fp, 0x4c, %g3
2003064: f4 27 a0 4c st %i2, [ %fp + 0x4c ]
2003068: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
200306c: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
2003070: fa 27 a0 58 st %i5, [ %fp + 0x58 ]
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
2003074: 80 a6 00 0d cmp %i0, %o5
2003078: 1a 80 00 0e bcc 20030b0 <fcntl+0x5c> <== NEVER TAKEN
200307c: c6 27 bf f4 st %g3, [ %fp + -12 ]
iop = rtems_libio_iop( fd );
2003080: 03 00 80 5c sethi %hi(0x2017000), %g1
2003084: c8 00 63 b4 ld [ %g1 + 0x3b4 ], %g4 ! 20173b4 <rtems_libio_iops>
2003088: 85 2e 20 02 sll %i0, 2, %g2
200308c: 83 2e 20 04 sll %i0, 4, %g1
2003090: 82 20 40 02 sub %g1, %g2, %g1
2003094: 82 00 40 18 add %g1, %i0, %g1
2003098: 83 28 60 02 sll %g1, 2, %g1
200309c: b8 01 00 01 add %g4, %g1, %i4
rtems_libio_check_is_open(iop);
20030a0: d0 07 20 0c ld [ %i4 + 0xc ], %o0
20030a4: 80 8a 21 00 btst 0x100, %o0
20030a8: 12 80 00 06 bne 20030c0 <fcntl+0x6c> <== ALWAYS TAKEN
20030ac: 80 a6 60 09 cmp %i1, 9
20030b0: 40 00 31 e3 call 200f83c <__errno> <== NOT EXECUTED
20030b4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20030b8: 10 80 00 55 b 200320c <fcntl+0x1b8> <== NOT EXECUTED
20030bc: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
20030c0: 18 80 00 50 bgu 2003200 <fcntl+0x1ac>
20030c4: 83 2e 60 02 sll %i1, 2, %g1
20030c8: 05 00 80 0c sethi %hi(0x2003000), %g2
20030cc: 84 10 a0 2c or %g2, 0x2c, %g2 ! 200302c <rtems_filesystem_evaluate_path+0x148>
20030d0: c2 00 80 01 ld [ %g2 + %g1 ], %g1
20030d4: 81 c0 40 00 jmp %g1
20030d8: 01 00 00 00 nop
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
20030dc: d0 00 c0 00 ld [ %g3 ], %o0
if ( fd2 )
20030e0: 80 a2 20 00 cmp %o0, 0
20030e4: 02 80 00 0b be 2003110 <fcntl+0xbc> <== ALWAYS TAKEN
20030e8: 80 a2 00 0d cmp %o0, %o5
diop = rtems_libio_iop( fd2 );
20030ec: 1a 80 00 0e bcc 2003124 <fcntl+0xd0> <== NOT EXECUTED
20030f0: ba 10 20 00 clr %i5 <== NOT EXECUTED
20030f4: 85 2a 20 02 sll %o0, 2, %g2 <== NOT EXECUTED
20030f8: 83 2a 20 04 sll %o0, 4, %g1 <== NOT EXECUTED
20030fc: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED
2003100: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED
2003104: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED
2003108: 10 80 00 07 b 2003124 <fcntl+0xd0> <== NOT EXECUTED
200310c: ba 01 00 01 add %g4, %g1, %i5 <== NOT EXECUTED
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
2003110: 40 00 02 21 call 2003994 <rtems_libio_allocate>
2003114: b0 10 3f ff mov -1, %i0
if ( diop == 0 ) {
2003118: ba 92 20 00 orcc %o0, 0, %i5
200311c: 02 80 00 4f be 2003258 <fcntl+0x204> <== NEVER TAKEN
2003120: 01 00 00 00 nop
ret = -1;
break;
}
}
diop->handlers = iop->handlers;
2003124: c2 07 20 30 ld [ %i4 + 0x30 ], %g1
diop->file_info = iop->file_info;
2003128: c4 07 20 2c ld [ %i4 + 0x2c ], %g2
diop->flags = iop->flags;
200312c: c6 07 20 0c ld [ %i4 + 0xc ], %g3
ret = -1;
break;
}
}
diop->handlers = iop->handlers;
2003130: c2 27 60 30 st %g1, [ %i5 + 0x30 ]
diop->file_info = iop->file_info;
2003134: c4 27 60 2c st %g2, [ %i5 + 0x2c ]
diop->flags = iop->flags;
2003138: c6 27 60 0c st %g3, [ %i5 + 0xc ]
diop->pathinfo = iop->pathinfo;
200313c: 90 07 60 10 add %i5, 0x10, %o0
2003140: 92 07 20 10 add %i4, 0x10, %o1
2003144: 40 00 35 e6 call 20108dc <memcpy>
2003148: 94 10 20 10 mov 0x10, %o2
ret = (int) (diop - rtems_libio_iops);
200314c: 03 00 80 5c sethi %hi(0x2017000), %g1
2003150: c6 00 63 b4 ld [ %g1 + 0x3b4 ], %g3 ! 20173b4 <rtems_libio_iops>
2003154: 86 27 40 03 sub %i5, %g3, %g3
2003158: 87 38 e0 02 sra %g3, 2, %g3
200315c: 83 28 e0 02 sll %g3, 2, %g1
2003160: 85 28 e0 06 sll %g3, 6, %g2
2003164: 84 20 80 01 sub %g2, %g1, %g2
2003168: 83 28 a0 06 sll %g2, 6, %g1
200316c: 82 20 40 02 sub %g1, %g2, %g1
2003170: 85 28 60 0c sll %g1, 0xc, %g2
2003174: 82 00 40 02 add %g1, %g2, %g1
2003178: 82 00 40 03 add %g1, %g3, %g1
200317c: 83 28 60 04 sll %g1, 4, %g1
2003180: 82 20 40 03 sub %g1, %g3, %g1
2003184: 83 28 60 02 sll %g1, 2, %g1
2003188: 10 80 00 24 b 2003218 <fcntl+0x1c4>
200318c: b0 20 c0 01 sub %g3, %g1, %i0
break;
case F_GETFD: /* get f_flags */
ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
2003190: 83 32 20 0b srl %o0, 0xb, %g1
2003194: 10 80 00 24 b 2003224 <fcntl+0x1d0>
2003198: b0 08 60 01 and %g1, 1, %i0
* if a new process is exec()'ed. Since RTEMS does not support
* processes, then we can ignore this one except to make
* F_GETFD work.
*/
if ( va_arg( ap, int ) )
200319c: c2 00 c0 00 ld [ %g3 ], %g1
20031a0: 80 a0 60 00 cmp %g1, 0
20031a4: 22 80 00 03 be,a 20031b0 <fcntl+0x15c> <== NEVER TAKEN
20031a8: 82 0a 37 ff and %o0, -2049, %g1 <== NOT EXECUTED
20031ac: 82 12 28 00 or %o0, 0x800, %g1
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
20031b0: c2 27 20 0c st %g1, [ %i4 + 0xc ]
20031b4: 10 80 00 1c b 2003224 <fcntl+0x1d0>
20031b8: b0 10 20 00 clr %i0
break;
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
20031bc: 40 00 01 8a call 20037e4 <rtems_libio_to_fcntl_flags>
20031c0: 01 00 00 00 nop
20031c4: 10 80 00 15 b 2003218 <fcntl+0x1c4>
20031c8: b0 10 00 08 mov %o0, %i0
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
20031cc: d0 00 c0 00 ld [ %g3 ], %o0
20031d0: 40 00 02 27 call 2003a6c <rtems_libio_fcntl_flags>
20031d4: b0 10 20 00 clr %i0
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
20031d8: c2 07 20 0c ld [ %i4 + 0xc ], %g1
20031dc: 90 0a 22 01 and %o0, 0x201, %o0
20031e0: 82 08 7d fe and %g1, -514, %g1
20031e4: 90 12 00 01 or %o0, %g1, %o0
20031e8: 10 80 00 0f b 2003224 <fcntl+0x1d0>
20031ec: d0 27 20 0c st %o0, [ %i4 + 0xc ]
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
20031f0: 40 00 31 93 call 200f83c <__errno>
20031f4: b0 10 3f ff mov -1, %i0
20031f8: 10 80 00 05 b 200320c <fcntl+0x1b8>
20031fc: 82 10 20 86 mov 0x86, %g1
ret = -1;
break;
default:
errno = EINVAL;
2003200: 40 00 31 8f call 200f83c <__errno>
2003204: b0 10 3f ff mov -1, %i0
2003208: 82 10 20 16 mov 0x16, %g1
200320c: c2 22 00 00 st %g1, [ %o0 ]
2003210: 81 c7 e0 08 ret
2003214: 81 e8 00 00 restore
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
2003218: 80 a6 20 00 cmp %i0, 0
200321c: 06 80 00 0f bl 2003258 <fcntl+0x204> <== NEVER TAKEN
2003220: 01 00 00 00 nop
if (iop->handlers->fcntl_h) {
2003224: c2 07 20 30 ld [ %i4 + 0x30 ], %g1
2003228: c2 00 60 30 ld [ %g1 + 0x30 ], %g1
200322c: 80 a0 60 00 cmp %g1, 0
2003230: 02 bf ff f8 be 2003210 <fcntl+0x1bc> <== NEVER TAKEN
2003234: 90 10 00 19 mov %i1, %o0
int err = (*iop->handlers->fcntl_h)( cmd, iop );
2003238: 9f c0 40 00 call %g1
200323c: 92 10 00 1c mov %i4, %o1
if (err) {
2003240: ba 92 20 00 orcc %o0, 0, %i5
2003244: 02 80 00 05 be 2003258 <fcntl+0x204> <== ALWAYS TAKEN
2003248: 01 00 00 00 nop
errno = err;
200324c: 40 00 31 7c call 200f83c <__errno> <== NOT EXECUTED
2003250: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff> <== NOT EXECUTED
2003254: fa 22 00 00 st %i5, [ %o0 ] <== NOT EXECUTED
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
2003258: 81 c7 e0 08 ret
200325c: 81 e8 00 00 restore
0200327c <fdatasync>:
#include <rtems/seterr.h>
int fdatasync(
int fd
)
{
200327c: 9d e3 bf 98 save %sp, -104, %sp
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
2003280: 03 00 80 59 sethi %hi(0x2016400), %g1
2003284: c2 00 63 08 ld [ %g1 + 0x308 ], %g1 ! 2016708 <rtems_libio_number_iops>
2003288: 80 a6 00 01 cmp %i0, %g1
200328c: 1a 80 00 11 bcc 20032d0 <fdatasync+0x54> <== NEVER TAKEN
2003290: 01 00 00 00 nop
iop = rtems_libio_iop( fd );
2003294: 03 00 80 5c sethi %hi(0x2017000), %g1
2003298: c6 00 63 b4 ld [ %g1 + 0x3b4 ], %g3 ! 20173b4 <rtems_libio_iops>
200329c: 85 2e 20 02 sll %i0, 2, %g2
20032a0: 83 2e 20 04 sll %i0, 4, %g1
20032a4: 82 20 40 02 sub %g1, %g2, %g1
20032a8: 82 00 40 18 add %g1, %i0, %g1
20032ac: 83 28 60 02 sll %g1, 2, %g1
20032b0: 90 00 c0 01 add %g3, %g1, %o0
rtems_libio_check_is_open(iop);
20032b4: c2 02 20 0c ld [ %o0 + 0xc ], %g1
20032b8: 80 88 61 00 btst 0x100, %g1
20032bc: 02 80 00 05 be 20032d0 <fdatasync+0x54> <== NEVER TAKEN
20032c0: 01 00 00 00 nop
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
20032c4: 80 88 60 04 btst 4, %g1
20032c8: 32 80 00 06 bne,a 20032e0 <fdatasync+0x64>
20032cc: c2 02 20 30 ld [ %o0 + 0x30 ], %g1
20032d0: 40 00 31 5b call 200f83c <__errno>
20032d4: 01 00 00 00 nop
20032d8: 10 80 00 09 b 20032fc <fdatasync+0x80>
20032dc: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9>
/*
* Now process the fdatasync().
*/
if ( !iop->handlers->fdatasync_h )
20032e0: c2 00 60 2c ld [ %g1 + 0x2c ], %g1
20032e4: 80 a0 60 00 cmp %g1, 0
20032e8: 12 80 00 08 bne 2003308 <fdatasync+0x8c> <== NEVER TAKEN
20032ec: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOTSUP );
20032f0: 40 00 31 53 call 200f83c <__errno>
20032f4: 01 00 00 00 nop
20032f8: 82 10 20 86 mov 0x86, %g1 ! 86 <PROM_START+0x86>
20032fc: c2 22 00 00 st %g1, [ %o0 ]
2003300: 10 80 00 04 b 2003310 <fdatasync+0x94>
2003304: 90 10 3f ff mov -1, %o0
return (*iop->handlers->fdatasync_h)( iop );
2003308: 9f c0 40 00 call %g1 <== NOT EXECUTED
200330c: 01 00 00 00 nop <== NOT EXECUTED
}
2003310: 81 c7 e0 08 ret
2003314: 91 e8 00 08 restore %g0, %o0, %o0
02006dc8 <file_systems_below_this_mountpoint>:
/*
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
2006dc8: 03 00 80 61 sethi %hi(0x2018400), %g1 <== NOT EXECUTED
2006dcc: c6 00 63 98 ld [ %g1 + 0x398 ], %g3 ! 2018798 <rtems_filesystem_mount_table_control><== NOT EXECUTED
2006dd0: 82 10 63 98 or %g1, 0x398, %g1 <== NOT EXECUTED
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
2006dd4: 10 80 00 08 b 2006df4 <file_systems_below_this_mountpoint+0x2c><== NOT EXECUTED
2006dd8: 88 00 60 04 add %g1, 4, %g4 <== NOT EXECUTED
the_node = the_node->next ) {
the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node;
if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) {
2006ddc: c2 02 60 0c ld [ %o1 + 0xc ], %g1 <== NOT EXECUTED
2006de0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2006de4: 32 80 00 04 bne,a 2006df4 <file_systems_below_this_mountpoint+0x2c><== NOT EXECUTED
2006de8: c6 00 c0 00 ld [ %g3 ], %g3 <== NOT EXECUTED
2006dec: 81 c3 e0 08 retl <== NOT EXECUTED
2006df0: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
2006df4: 80 a0 c0 04 cmp %g3, %g4 <== NOT EXECUTED
2006df8: 32 bf ff f9 bne,a 2006ddc <file_systems_below_this_mountpoint+0x14><== NOT EXECUTED
2006dfc: c4 00 e0 14 ld [ %g3 + 0x14 ], %g2 <== NOT EXECUTED
return true;
}
}
return false;
}
2006e00: 81 c3 e0 08 retl <== NOT EXECUTED
2006e04: 90 10 20 00 clr %o0 <== NOT EXECUTED
02003348 <fpathconf>:
long fpathconf(
int fd,
int name
)
{
2003348: 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);
200334c: 03 00 80 59 sethi %hi(0x2016400), %g1
2003350: c2 00 63 08 ld [ %g1 + 0x308 ], %g1 ! 2016708 <rtems_libio_number_iops>
2003354: 80 a6 00 01 cmp %i0, %g1
2003358: 1a 80 00 0e bcc 2003390 <fpathconf+0x48>
200335c: 01 00 00 00 nop
iop = rtems_libio_iop(fd);
2003360: 03 00 80 5c sethi %hi(0x2017000), %g1
2003364: c6 00 63 b4 ld [ %g1 + 0x3b4 ], %g3 ! 20173b4 <rtems_libio_iops>
2003368: 85 2e 20 02 sll %i0, 2, %g2
200336c: 83 2e 20 04 sll %i0, 4, %g1
2003370: 82 20 40 02 sub %g1, %g2, %g1
2003374: 82 00 40 18 add %g1, %i0, %g1
2003378: 83 28 60 02 sll %g1, 2, %g1
200337c: 84 00 c0 01 add %g3, %g1, %g2
rtems_libio_check_is_open(iop);
2003380: c2 00 a0 0c ld [ %g2 + 0xc ], %g1
2003384: 80 88 61 00 btst 0x100, %g1
2003388: 12 80 00 08 bne 20033a8 <fpathconf+0x60> <== ALWAYS TAKEN
200338c: 80 a6 60 0b cmp %i1, 0xb
2003390: 40 00 31 2b call 200f83c <__errno>
2003394: b0 10 3f ff mov -1, %i0
2003398: 82 10 20 09 mov 9, %g1
200339c: c2 22 00 00 st %g1, [ %o0 ]
20033a0: 81 c7 e0 08 ret
20033a4: 81 e8 00 00 restore
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
20033a8: 18 80 00 2c bgu 2003458 <fpathconf+0x110>
20033ac: c6 00 a0 1c ld [ %g2 + 0x1c ], %g3
20033b0: 83 2e 60 02 sll %i1, 2, %g1
20033b4: 05 00 80 0c sethi %hi(0x2003000), %g2
20033b8: 84 10 a3 18 or %g2, 0x318, %g2 ! 2003318 <fdatasync+0x9c>
20033bc: c2 00 80 01 ld [ %g2 + %g1 ], %g1
20033c0: 81 c0 40 00 jmp %g1
20033c4: 01 00 00 00 nop
case _PC_LINK_MAX:
return_value = the_limits->link_max;
20033c8: f0 00 e0 30 ld [ %g3 + 0x30 ], %i0
20033cc: 81 c7 e0 08 ret
20033d0: 81 e8 00 00 restore
break;
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
20033d4: f0 00 e0 34 ld [ %g3 + 0x34 ], %i0
20033d8: 81 c7 e0 08 ret
20033dc: 81 e8 00 00 restore
break;
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
20033e0: f0 00 e0 38 ld [ %g3 + 0x38 ], %i0
20033e4: 81 c7 e0 08 ret
20033e8: 81 e8 00 00 restore
break;
case _PC_NAME_MAX:
return_value = the_limits->name_max;
20033ec: f0 00 e0 3c ld [ %g3 + 0x3c ], %i0
20033f0: 81 c7 e0 08 ret
20033f4: 81 e8 00 00 restore
break;
case _PC_PATH_MAX:
return_value = the_limits->path_max;
20033f8: f0 00 e0 40 ld [ %g3 + 0x40 ], %i0
20033fc: 81 c7 e0 08 ret
2003400: 81 e8 00 00 restore
break;
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
2003404: f0 00 e0 44 ld [ %g3 + 0x44 ], %i0
2003408: 81 c7 e0 08 ret
200340c: 81 e8 00 00 restore
break;
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
2003410: f0 00 e0 4c ld [ %g3 + 0x4c ], %i0
2003414: 81 c7 e0 08 ret
2003418: 81 e8 00 00 restore
break;
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
200341c: f0 00 e0 50 ld [ %g3 + 0x50 ], %i0
2003420: 81 c7 e0 08 ret
2003424: 81 e8 00 00 restore
break;
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
2003428: f0 00 e0 5c ld [ %g3 + 0x5c ], %i0
200342c: 81 c7 e0 08 ret
2003430: 81 e8 00 00 restore
break;
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
2003434: f0 00 e0 48 ld [ %g3 + 0x48 ], %i0
2003438: 81 c7 e0 08 ret
200343c: 81 e8 00 00 restore
break;
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
2003440: f0 00 e0 54 ld [ %g3 + 0x54 ], %i0
2003444: 81 c7 e0 08 ret
2003448: 81 e8 00 00 restore
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
200344c: f0 00 e0 58 ld [ %g3 + 0x58 ], %i0
2003450: 81 c7 e0 08 ret
2003454: 81 e8 00 00 restore
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
2003458: 40 00 30 f9 call 200f83c <__errno>
200345c: b0 10 3f ff mov -1, %i0
2003460: 82 10 20 16 mov 0x16, %g1
2003464: c2 22 00 00 st %g1, [ %o0 ]
break;
}
return return_value;
}
2003468: 81 c7 e0 08 ret
200346c: 81 e8 00 00 restore
0200a254 <free>:
void free(
void *ptr
)
{
MSBUMP(free_calls, 1);
200a254: 9d e3 bf 98 save %sp, -104, %sp
200a258: 05 00 80 5d sethi %hi(0x2017400), %g2
200a25c: 84 10 a2 a8 or %g2, 0x2a8, %g2 ! 20176a8 <rtems_malloc_statistics>
200a260: c2 00 a0 0c ld [ %g2 + 0xc ], %g1
200a264: b2 10 00 18 mov %i0, %i1
200a268: 82 00 60 01 inc %g1
if ( !ptr )
200a26c: 80 a6 20 00 cmp %i0, 0
200a270: 02 80 00 21 be 200a2f4 <free+0xa0>
200a274: c2 20 a0 0c st %g1, [ %g2 + 0xc ]
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
200a278: 03 00 80 5e sethi %hi(0x2017800), %g1
200a27c: c2 00 61 c4 ld [ %g1 + 0x1c4 ], %g1 ! 20179c4 <_System_state_Current>
200a280: 80 a0 60 03 cmp %g1, 3
200a284: 12 80 00 09 bne 200a2a8 <free+0x54> <== NEVER TAKEN
200a288: 03 00 80 5c sethi %hi(0x2017000), %g1
200a28c: 40 00 01 33 call 200a758 <malloc_is_system_state_OK>
200a290: 01 00 00 00 nop
200a294: 80 8a 20 ff btst 0xff, %o0
200a298: 12 80 00 04 bne 200a2a8 <free+0x54> <== ALWAYS TAKEN
200a29c: 03 00 80 5c sethi %hi(0x2017000), %g1
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
200a2a0: 40 00 01 41 call 200a7a4 <malloc_deferred_free> <== NOT EXECUTED
200a2a4: 81 e8 00 00 restore <== NOT EXECUTED
#endif
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
200a2a8: c2 00 63 a4 ld [ %g1 + 0x3a4 ], %g1
200a2ac: 80 a0 60 00 cmp %g1, 0
200a2b0: 02 80 00 06 be 200a2c8 <free+0x74> <== ALWAYS TAKEN
200a2b4: 37 00 80 5d sethi %hi(0x2017400), %i3
(*rtems_malloc_statistics_helpers->at_free)(ptr);
200a2b8: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED
200a2bc: 9f c0 40 00 call %g1 <== NOT EXECUTED
200a2c0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
if ( !_Protected_heap_Free( &RTEMS_Malloc_Heap, ptr ) ) {
200a2c4: 37 00 80 5d sethi %hi(0x2017400), %i3 <== NOT EXECUTED
200a2c8: 92 10 00 19 mov %i1, %o1
200a2cc: 40 00 06 75 call 200bca0 <_Protected_heap_Free>
200a2d0: 90 16 e2 50 or %i3, 0x250, %o0
200a2d4: 80 8a 20 ff btst 0xff, %o0
200a2d8: 12 80 00 07 bne 200a2f4 <free+0xa0> <== ALWAYS TAKEN
200a2dc: 82 16 e2 50 or %i3, 0x250, %g1
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
200a2e0: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 <== NOT EXECUTED
200a2e4: f4 00 60 18 ld [ %g1 + 0x18 ], %i2 <== NOT EXECUTED
200a2e8: 31 00 80 57 sethi %hi(0x2015c00), %i0 <== NOT EXECUTED
200a2ec: 7f ff e2 9c call 2002d5c <printk> <== NOT EXECUTED
200a2f0: 91 ee 22 30 restore %i0, 0x230, %o0 <== NOT EXECUTED
200a2f4: 81 c7 e0 08 ret
200a2f8: 81 e8 00 00 restore
02003adc <free_user_env>:
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
2003adc: 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
2003ae0: 03 00 80 58 sethi %hi(0x2016000), %g1 <== NOT EXECUTED
2003ae4: 82 10 61 88 or %g1, 0x188, %g1 ! 2016188 <rtems_global_user_env><== NOT EXECUTED
2003ae8: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED
2003aec: 02 80 00 18 be 2003b4c <free_user_env+0x70> <== NOT EXECUTED
2003af0: 01 00 00 00 nop <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
2003af4: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED
2003af8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003afc: 22 80 00 09 be,a 2003b20 <free_user_env+0x44> <== NOT EXECUTED
2003b00: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED
2003b04: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2003b08: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003b0c: 22 80 00 05 be,a 2003b20 <free_user_env+0x44> <== NOT EXECUTED
2003b10: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED
2003b14: 9f c0 40 00 call %g1 <== NOT EXECUTED
2003b18: 90 06 20 04 add %i0, 4, %o0 <== NOT EXECUTED
rtems_filesystem_freenode( &env->root_directory);
2003b1c: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED
2003b20: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003b24: 02 80 00 08 be 2003b44 <free_user_env+0x68> <== NOT EXECUTED
2003b28: 01 00 00 00 nop <== NOT EXECUTED
2003b2c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2003b30: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003b34: 02 80 00 04 be 2003b44 <free_user_env+0x68> <== NOT EXECUTED
2003b38: 01 00 00 00 nop <== NOT EXECUTED
2003b3c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2003b40: 90 06 20 14 add %i0, 0x14, %o0 <== NOT EXECUTED
free(env);
2003b44: 7f ff fb 60 call 20028c4 <free> <== NOT EXECUTED
2003b48: 81 e8 00 00 restore <== NOT EXECUTED
2003b4c: 81 c7 e0 08 ret <== NOT EXECUTED
2003b50: 81 e8 00 00 restore <== NOT EXECUTED
020148d8 <fstat>:
int fstat(
int fd,
struct stat *sbuf
)
{
20148d8: 9d e3 bf 98 save %sp, -104, %sp
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
20148dc: 80 a6 60 00 cmp %i1, 0
20148e0: 32 80 00 06 bne,a 20148f8 <fstat+0x20>
20148e4: 03 00 80 5a sethi %hi(0x2016800), %g1
rtems_set_errno_and_return_minus_one( EFAULT );
20148e8: 7f ff e1 eb call 200d094 <__errno>
20148ec: 01 00 00 00 nop
20148f0: 10 80 00 2a b 2014998 <fstat+0xc0>
20148f4: 82 10 20 0e mov 0xe, %g1 ! e <PROM_START+0xe>
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
20148f8: c2 00 61 48 ld [ %g1 + 0x148 ], %g1
20148fc: 80 a6 00 01 cmp %i0, %g1
2014900: 1a 80 00 23 bcc 201498c <fstat+0xb4>
2014904: 03 00 80 5d sethi %hi(0x2017400), %g1
2014908: c6 00 62 44 ld [ %g1 + 0x244 ], %g3 ! 2017644 <rtems_libio_iops>
201490c: 85 2e 20 02 sll %i0, 2, %g2
2014910: 83 2e 20 04 sll %i0, 4, %g1
2014914: 82 20 40 02 sub %g1, %g2, %g1
2014918: 82 00 40 18 add %g1, %i0, %g1
201491c: 83 28 60 02 sll %g1, 2, %g1
2014920: b0 00 c0 01 add %g3, %g1, %i0
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
2014924: c2 06 20 0c ld [ %i0 + 0xc ], %g1
2014928: 80 88 61 00 btst 0x100, %g1
201492c: 02 80 00 18 be 201498c <fstat+0xb4> <== NEVER TAKEN
2014930: 01 00 00 00 nop
if ( !iop->handlers )
2014934: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
2014938: 80 a0 60 00 cmp %g1, 0
201493c: 02 80 00 14 be 201498c <fstat+0xb4> <== NEVER TAKEN
2014940: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fstat_h )
2014944: c2 00 60 18 ld [ %g1 + 0x18 ], %g1
2014948: 80 a0 60 00 cmp %g1, 0
201494c: 12 80 00 06 bne 2014964 <fstat+0x8c> <== ALWAYS TAKEN
2014950: 92 10 20 00 clr %o1
rtems_set_errno_and_return_minus_one( ENOTSUP );
2014954: 7f ff e1 d0 call 200d094 <__errno> <== NOT EXECUTED
2014958: 01 00 00 00 nop <== NOT EXECUTED
201495c: 10 80 00 0f b 2014998 <fstat+0xc0> <== NOT EXECUTED
2014960: 82 10 20 86 mov 0x86, %g1 ! 86 <PROM_START+0x86> <== NOT EXECUTED
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
2014964: 94 10 20 50 mov 0x50, %o2
2014968: 7f ff e3 f6 call 200d940 <memset>
201496c: 90 10 00 19 mov %i1, %o0
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
2014970: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
2014974: 90 06 20 10 add %i0, 0x10, %o0
2014978: c2 00 60 18 ld [ %g1 + 0x18 ], %g1
201497c: 9f c0 40 00 call %g1
2014980: 92 10 00 19 mov %i1, %o1
}
2014984: 81 c7 e0 08 ret
2014988: 91 e8 00 08 restore %g0, %o0, %o0
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
rtems_libio_check_fd( fd );
201498c: 7f ff e1 c2 call 200d094 <__errno>
2014990: 01 00 00 00 nop
2014994: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9>
2014998: c2 22 00 00 st %g1, [ %o0 ]
201499c: 10 bf ff fa b 2014984 <fstat+0xac>
20149a0: 90 10 3f ff mov -1, %o0
020035fc <fsync>:
#include <rtems/seterr.h>
int fsync(
int fd
)
{
20035fc: 9d e3 bf 98 save %sp, -104, %sp
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
2003600: 03 00 80 59 sethi %hi(0x2016400), %g1
2003604: c2 00 63 08 ld [ %g1 + 0x308 ], %g1 ! 2016708 <rtems_libio_number_iops>
2003608: 80 a6 00 01 cmp %i0, %g1
200360c: 1a 80 00 12 bcc 2003654 <fsync+0x58> <== NEVER TAKEN
2003610: 01 00 00 00 nop
iop = rtems_libio_iop( fd );
2003614: 03 00 80 5c sethi %hi(0x2017000), %g1
2003618: c6 00 63 b4 ld [ %g1 + 0x3b4 ], %g3 ! 20173b4 <rtems_libio_iops>
200361c: 85 2e 20 02 sll %i0, 2, %g2
2003620: 83 2e 20 04 sll %i0, 4, %g1
2003624: 82 20 40 02 sub %g1, %g2, %g1
2003628: 82 00 40 18 add %g1, %i0, %g1
200362c: 83 28 60 02 sll %g1, 2, %g1
2003630: 90 00 c0 01 add %g3, %g1, %o0
rtems_libio_check_is_open(iop);
2003634: c2 02 20 0c ld [ %o0 + 0xc ], %g1
2003638: 80 88 61 00 btst 0x100, %g1
200363c: 02 80 00 06 be 2003654 <fsync+0x58> <== NEVER TAKEN
2003640: 01 00 00 00 nop
/*
* Now process the fsync().
*/
if ( !iop->handlers )
2003644: c2 02 20 30 ld [ %o0 + 0x30 ], %g1
2003648: 80 a0 60 00 cmp %g1, 0
200364c: 32 80 00 06 bne,a 2003664 <fsync+0x68> <== ALWAYS TAKEN
2003650: c2 00 60 28 ld [ %g1 + 0x28 ], %g1
rtems_set_errno_and_return_minus_one( EBADF );
2003654: 40 00 30 7a call 200f83c <__errno> <== NOT EXECUTED
2003658: 01 00 00 00 nop <== NOT EXECUTED
200365c: 10 80 00 08 b 200367c <fsync+0x80> <== NOT EXECUTED
2003660: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9> <== NOT EXECUTED
if ( !iop->handlers->fsync_h )
2003664: 80 a0 60 00 cmp %g1, 0
2003668: 12 80 00 08 bne 2003688 <fsync+0x8c>
200366c: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOTSUP );
2003670: 40 00 30 73 call 200f83c <__errno>
2003674: 01 00 00 00 nop
2003678: 82 10 20 86 mov 0x86, %g1 ! 86 <PROM_START+0x86>
200367c: c2 22 00 00 st %g1, [ %o0 ]
2003680: 10 80 00 04 b 2003690 <fsync+0x94>
2003684: 90 10 3f ff mov -1, %o0
return (*iop->handlers->fsync_h)( iop );
2003688: 9f c0 40 00 call %g1
200368c: 01 00 00 00 nop
}
2003690: 81 c7 e0 08 ret
2003694: 91 e8 00 08 restore %g0, %o0, %o0
0200a2fc <ftruncate>:
int ftruncate(
int fd,
off_t length
)
{
200a2fc: 9d e3 bf 88 save %sp, -120, %sp
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
200a300: 03 00 80 5a sethi %hi(0x2016800), %g1
200a304: c2 00 61 48 ld [ %g1 + 0x148 ], %g1 ! 2016948 <rtems_libio_number_iops>
200a308: 80 a6 00 01 cmp %i0, %g1
200a30c: 1a 80 00 0e bcc 200a344 <ftruncate+0x48> <== NEVER TAKEN
200a310: 01 00 00 00 nop
iop = rtems_libio_iop( fd );
200a314: 03 00 80 5d sethi %hi(0x2017400), %g1
200a318: c6 00 62 44 ld [ %g1 + 0x244 ], %g3 ! 2017644 <rtems_libio_iops>
200a31c: 85 2e 20 02 sll %i0, 2, %g2
200a320: 83 2e 20 04 sll %i0, 4, %g1
200a324: 82 20 40 02 sub %g1, %g2, %g1
200a328: 82 00 40 18 add %g1, %i0, %g1
200a32c: 83 28 60 02 sll %g1, 2, %g1
200a330: b0 00 c0 01 add %g3, %g1, %i0
rtems_libio_check_is_open(iop);
200a334: c2 06 20 0c ld [ %i0 + 0xc ], %g1
200a338: 80 88 61 00 btst 0x100, %g1
200a33c: 12 80 00 06 bne 200a354 <ftruncate+0x58> <== ALWAYS TAKEN
200a340: a0 07 bf e8 add %fp, -24, %l0
200a344: 40 00 0b 54 call 200d094 <__errno> <== NOT EXECUTED
200a348: 01 00 00 00 nop <== NOT EXECUTED
200a34c: 10 80 00 22 b 200a3d4 <ftruncate+0xd8> <== NOT EXECUTED
200a350: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9> <== NOT EXECUTED
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
200a354: 92 06 20 10 add %i0, 0x10, %o1
200a358: 90 10 00 10 mov %l0, %o0
200a35c: 40 00 0d 40 call 200d85c <memcpy>
200a360: 94 10 20 10 mov 0x10, %o2
if ( !loc.ops->node_type_h )
200a364: c2 07 bf f0 ld [ %fp + -16 ], %g1
200a368: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
200a36c: 80 a0 60 00 cmp %g1, 0
200a370: 02 80 00 16 be 200a3c8 <ftruncate+0xcc> <== NEVER TAKEN
200a374: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
200a378: 9f c0 40 00 call %g1
200a37c: 90 10 00 10 mov %l0, %o0
200a380: 80 a2 20 01 cmp %o0, 1
200a384: 32 80 00 06 bne,a 200a39c <ftruncate+0xa0>
200a388: c2 06 20 0c ld [ %i0 + 0xc ], %g1
rtems_set_errno_and_return_minus_one( EISDIR );
200a38c: 40 00 0b 42 call 200d094 <__errno>
200a390: 01 00 00 00 nop
200a394: 10 80 00 10 b 200a3d4 <ftruncate+0xd8>
200a398: 82 10 20 15 mov 0x15, %g1 ! 15 <PROM_START+0x15>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
200a39c: 80 88 60 04 btst 4, %g1
200a3a0: 32 80 00 06 bne,a 200a3b8 <ftruncate+0xbc> <== ALWAYS TAKEN
200a3a4: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
200a3a8: 40 00 0b 3b call 200d094 <__errno> <== NOT EXECUTED
200a3ac: 01 00 00 00 nop <== NOT EXECUTED
200a3b0: 10 80 00 09 b 200a3d4 <ftruncate+0xd8> <== NOT EXECUTED
200a3b4: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16> <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h )
200a3b8: c2 00 60 20 ld [ %g1 + 0x20 ], %g1
200a3bc: 80 a0 60 00 cmp %g1, 0
200a3c0: 32 80 00 08 bne,a 200a3e0 <ftruncate+0xe4> <== ALWAYS TAKEN
200a3c4: 90 10 00 18 mov %i0, %o0
rtems_set_errno_and_return_minus_one( ENOTSUP );
200a3c8: 40 00 0b 33 call 200d094 <__errno> <== NOT EXECUTED
200a3cc: 01 00 00 00 nop <== NOT EXECUTED
200a3d0: 82 10 20 86 mov 0x86, %g1 ! 86 <PROM_START+0x86> <== NOT EXECUTED
200a3d4: c2 22 00 00 st %g1, [ %o0 ]
200a3d8: 10 80 00 04 b 200a3e8 <ftruncate+0xec>
200a3dc: 90 10 3f ff mov -1, %o0
return (*iop->handlers->ftruncate_h)( iop, length );
200a3e0: 9f c0 40 00 call %g1
200a3e4: 92 10 00 19 mov %i1, %o1
}
200a3e8: 81 c7 e0 08 ret
200a3ec: 91 e8 00 08 restore %g0, %o0, %o0
0200cab4 <getdents>:
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
200cab4: 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 );
200cab8: 03 00 80 5c sethi %hi(0x2017000), %g1
200cabc: c2 00 63 f8 ld [ %g1 + 0x3f8 ], %g1 ! 20173f8 <rtems_libio_number_iops>
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
200cac0: 88 10 00 18 mov %i0, %g4
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
200cac4: 80 a6 00 01 cmp %i0, %g1
200cac8: 1a 80 00 0a bcc 200caf0 <getdents+0x3c> <== NEVER TAKEN
200cacc: b0 10 20 00 clr %i0
200cad0: 03 00 80 60 sethi %hi(0x2018000), %g1
200cad4: c6 00 61 68 ld [ %g1 + 0x168 ], %g3 ! 2018168 <rtems_libio_iops>
200cad8: 85 29 20 02 sll %g4, 2, %g2
200cadc: 83 29 20 04 sll %g4, 4, %g1
200cae0: 82 20 40 02 sub %g1, %g2, %g1
200cae4: 82 00 40 04 add %g1, %g4, %g1
200cae8: 83 28 60 02 sll %g1, 2, %g1
200caec: b0 00 c0 01 add %g3, %g1, %i0
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
200caf0: a0 07 bf e8 add %fp, -24, %l0
200caf4: 92 06 20 10 add %i0, 0x10, %o1
200caf8: 90 10 00 10 mov %l0, %o0
200cafc: 40 00 10 07 call 2010b18 <memcpy>
200cb00: 94 10 20 10 mov 0x10, %o2
if ( !loc.ops->node_type_h )
200cb04: c2 07 bf f0 ld [ %fp + -16 ], %g1
200cb08: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
200cb0c: 80 a0 60 00 cmp %g1, 0
200cb10: 02 80 00 11 be 200cb54 <getdents+0xa0> <== NEVER TAKEN
200cb14: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
200cb18: 9f c0 40 00 call %g1
200cb1c: 90 10 00 10 mov %l0, %o0
200cb20: 80 a2 20 01 cmp %o0, 1
200cb24: 22 80 00 08 be,a 200cb44 <getdents+0x90>
200cb28: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
rtems_set_errno_and_return_minus_one( ENOTDIR );
200cb2c: 40 00 0d ef call 20102e8 <__errno>
200cb30: 01 00 00 00 nop
200cb34: 82 10 20 14 mov 0x14, %g1 ! 14 <PROM_START+0x14>
200cb38: c2 22 00 00 st %g1, [ %o0 ]
200cb3c: 10 80 00 0d b 200cb70 <getdents+0xbc>
200cb40: 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 )
200cb44: c2 00 60 08 ld [ %g1 + 8 ], %g1
200cb48: 80 a0 60 00 cmp %g1, 0
200cb4c: 32 80 00 06 bne,a 200cb64 <getdents+0xb0> <== ALWAYS TAKEN
200cb50: 90 10 00 18 mov %i0, %o0
rtems_set_errno_and_return_minus_one( ENOTSUP );
200cb54: 40 00 0d e5 call 20102e8 <__errno> <== NOT EXECUTED
200cb58: 01 00 00 00 nop <== NOT EXECUTED
200cb5c: 10 bf ff f7 b 200cb38 <getdents+0x84> <== NOT EXECUTED
200cb60: 82 10 20 86 mov 0x86, %g1 ! 86 <PROM_START+0x86> <== NOT EXECUTED
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
200cb64: 92 10 00 19 mov %i1, %o1
200cb68: 9f c0 40 00 call %g1
200cb6c: 94 10 00 1a mov %i2, %o2
}
200cb70: 81 c7 e0 08 ret
200cb74: 91 e8 00 08 restore %g0, %o0, %o0
0200a410 <gettimeofday>:
int gettimeofday(
struct timeval *tp,
void * __tz
)
{
200a410: 9d e3 bf 90 save %sp, -112, %sp
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp ) {
200a414: 80 a6 20 00 cmp %i0, 0
200a418: 12 80 00 08 bne 200a438 <gettimeofday+0x28> <== ALWAYS TAKEN
200a41c: 01 00 00 00 nop
errno = EFAULT;
200a420: 40 00 0b 1d call 200d094 <__errno> <== NOT EXECUTED
200a424: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff> <== NOT EXECUTED
200a428: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED
200a42c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200a430: 81 c7 e0 08 ret <== NOT EXECUTED
200a434: 81 e8 00 00 restore <== NOT EXECUTED
)
{
ISR_Level level;
struct timespec now;
_ISR_Disable(level);
200a438: 7f ff de 4d call 2001d6c <sparc_disable_interrupts>
200a43c: 01 00 00 00 nop
200a440: a0 10 00 08 mov %o0, %l0
_TOD_Get( &now );
200a444: 7f ff ef ea call 20063ec <_TOD_Get>
200a448: 90 07 bf f0 add %fp, -16, %o0
_ISR_Enable(level);
200a44c: 7f ff de 4c call 2001d7c <sparc_enable_interrupts>
200a450: 90 10 00 10 mov %l0, %o0
time->tv_sec = now.tv_sec;
time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND;
200a454: d0 07 bf f4 ld [ %fp + -12 ], %o0
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
time->tv_sec = now.tv_sec;
200a458: c2 07 bf f0 ld [ %fp + -16 ], %g1
time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND;
200a45c: 92 10 23 e8 mov 0x3e8, %o1
200a460: 40 00 25 d8 call 2013bc0 <.udiv>
200a464: c2 26 00 00 st %g1, [ %i0 ]
200a468: 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;
}
200a46c: 81 c7 e0 08 ret
200a470: 91 e8 20 00 restore %g0, 0, %o0
0200eb38 <imfs_dir_open>:
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->file_info;
if ( the_jnode->type != IMFS_DIRECTORY )
200eb38: c2 02 20 2c ld [ %o0 + 0x2c ], %g1
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
200eb3c: 84 10 00 08 mov %o0, %g2
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->file_info;
if ( the_jnode->type != IMFS_DIRECTORY )
200eb40: c2 00 60 48 ld [ %g1 + 0x48 ], %g1
200eb44: 80 a0 60 01 cmp %g1, 1
200eb48: 12 80 00 04 bne 200eb58 <imfs_dir_open+0x20> <== NEVER TAKEN
200eb4c: 90 10 3f ff mov -1, %o0
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
200eb50: c0 20 a0 08 clr [ %g2 + 8 ]
200eb54: 90 10 20 00 clr %o0
return 0;
}
200eb58: 81 c3 e0 08 retl
0200ec4c <imfs_dir_rmnod>:
*/
int imfs_dir_rmnod(
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
200ec4c: 9d e3 bf 90 save %sp, -112, %sp
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
200ec50: e0 06 00 00 ld [ %i0 ], %l0
/*
* You cannot remove a node that still has children
*/
if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) )
200ec54: c4 04 20 4c ld [ %l0 + 0x4c ], %g2
200ec58: 82 04 20 50 add %l0, 0x50, %g1
200ec5c: 80 a0 80 01 cmp %g2, %g1
200ec60: 22 80 00 06 be,a 200ec78 <imfs_dir_rmnod+0x2c>
200ec64: c2 06 20 0c ld [ %i0 + 0xc ], %g1
rtems_set_errno_and_return_minus_one( ENOTEMPTY );
200ec68: 40 00 02 f5 call 200f83c <__errno>
200ec6c: 01 00 00 00 nop
200ec70: 10 80 00 0d b 200eca4 <imfs_dir_rmnod+0x58>
200ec74: 82 10 20 5a mov 0x5a, %g1 ! 5a <PROM_START+0x5a>
/*
* You cannot remove the file system root node.
*/
if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
200ec78: c2 00 60 18 ld [ %g1 + 0x18 ], %g1
200ec7c: 80 a0 40 10 cmp %g1, %l0
200ec80: 02 80 00 06 be 200ec98 <imfs_dir_rmnod+0x4c>
200ec84: 01 00 00 00 nop
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
200ec88: c2 04 20 58 ld [ %l0 + 0x58 ], %g1
200ec8c: 80 a0 60 00 cmp %g1, 0
200ec90: 22 80 00 08 be,a 200ecb0 <imfs_dir_rmnod+0x64> <== ALWAYS TAKEN
200ec94: c2 04 20 08 ld [ %l0 + 8 ], %g1
rtems_set_errno_and_return_minus_one( EBUSY );
200ec98: 40 00 02 e9 call 200f83c <__errno>
200ec9c: 01 00 00 00 nop
200eca0: 82 10 20 10 mov 0x10, %g1 ! 10 <PROM_START+0x10>
200eca4: c2 22 00 00 st %g1, [ %o0 ]
200eca8: 81 c7 e0 08 ret
200ecac: 91 e8 3f ff restore %g0, -1, %o0
/*
* Take the node out of the parent's chain that contains this node
*/
if ( the_jnode->Parent != NULL ) {
200ecb0: 80 a0 60 00 cmp %g1, 0
200ecb4: 22 80 00 06 be,a 200eccc <imfs_dir_rmnod+0x80>
200ecb8: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1
200ecbc: 7f ff f8 e7 call 200d058 <_Chain_Extract>
200ecc0: 90 10 00 10 mov %l0, %o0
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
200ecc4: c0 24 20 08 clr [ %l0 + 8 ]
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
200ecc8: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1
IMFS_update_ctime( the_jnode );
200eccc: 92 10 20 00 clr %o1
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
200ecd0: 82 00 7f ff add %g1, -1, %g1
IMFS_update_ctime( the_jnode );
200ecd4: 90 07 bf f0 add %fp, -16, %o0
200ecd8: 7f ff d2 70 call 2003698 <gettimeofday>
200ecdc: c2 34 20 30 sth %g1, [ %l0 + 0x30 ]
200ece0: 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) ) {
200ece4: 90 10 00 10 mov %l0, %o0
200ece8: 7f ff d2 d5 call 200383c <rtems_libio_is_file_open>
200ecec: c2 24 20 44 st %g1, [ %l0 + 0x44 ]
200ecf0: 80 a2 20 00 cmp %o0, 0
200ecf4: 12 80 00 11 bne 200ed38 <imfs_dir_rmnod+0xec>
200ecf8: 01 00 00 00 nop
200ecfc: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1
200ed00: 80 a0 60 00 cmp %g1, 0
200ed04: 12 80 00 0d bne 200ed38 <imfs_dir_rmnod+0xec>
200ed08: 03 00 80 5b sethi %hi(0x2016c00), %g1
/*
* Is the rtems_filesystem_current is this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
200ed0c: c6 00 60 24 ld [ %g1 + 0x24 ], %g3 ! 2016c24 <rtems_current_user_env>
200ed10: c4 06 00 00 ld [ %i0 ], %g2
200ed14: c2 00 e0 04 ld [ %g3 + 4 ], %g1
200ed18: 80 a0 40 02 cmp %g1, %g2
200ed1c: 22 80 00 02 be,a 200ed24 <imfs_dir_rmnod+0xd8> <== NEVER TAKEN
200ed20: c0 20 e0 04 clr [ %g3 + 4 ] <== NOT EXECUTED
/*
* Free memory associated with a memory file.
*/
free( the_jnode );
200ed24: 90 10 00 10 mov %l0, %o0
200ed28: 7f ff d1 d2 call 2003470 <free>
200ed2c: b0 10 20 00 clr %i0
200ed30: 81 c7 e0 08 ret
200ed34: 81 e8 00 00 restore
}
return 0;
}
200ed38: 81 c7 e0 08 ret
200ed3c: 91 e8 20 00 restore %g0, 0, %o0
0200dbc0 <ioctl>:
int ioctl(
int fd,
ioctl_command_t command,
...
)
{
200dbc0: 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 );
200dbc4: 03 00 80 79 sethi %hi(0x201e400), %g1
200dbc8: c2 00 62 d8 ld [ %g1 + 0x2d8 ], %g1 ! 201e6d8 <rtems_libio_number_iops>
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
va_start(ap, command);
200dbcc: f4 27 a0 4c st %i2, [ %fp + 0x4c ]
200dbd0: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
200dbd4: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
200dbd8: fa 27 a0 58 st %i5, [ %fp + 0x58 ]
va_list ap;
rtems_status_code rc;
rtems_libio_t *iop;
void *buffer;
rtems_libio_check_fd( fd );
200dbdc: 80 a6 00 01 cmp %i0, %g1
200dbe0: 1a 80 00 14 bcc 200dc30 <ioctl+0x70> <== NEVER TAKEN
200dbe4: 92 10 00 19 mov %i1, %o1
iop = rtems_libio_iop( fd );
200dbe8: 03 00 80 7f sethi %hi(0x201fc00), %g1
200dbec: c6 00 60 04 ld [ %g1 + 4 ], %g3 ! 201fc04 <rtems_libio_iops>
200dbf0: 85 2e 20 02 sll %i0, 2, %g2
200dbf4: 83 2e 20 04 sll %i0, 4, %g1
200dbf8: 82 20 40 02 sub %g1, %g2, %g1
200dbfc: 82 00 40 18 add %g1, %i0, %g1
200dc00: 83 28 60 02 sll %g1, 2, %g1
200dc04: 90 00 c0 01 add %g3, %g1, %o0
rtems_libio_check_is_open(iop);
200dc08: c2 02 20 0c ld [ %o0 + 0xc ], %g1
200dc0c: 80 88 61 00 btst 0x100, %g1
200dc10: 02 80 00 08 be 200dc30 <ioctl+0x70> <== NEVER TAKEN
200dc14: 01 00 00 00 nop
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
200dc18: 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 *);
200dc1c: 82 07 a0 50 add %fp, 0x50, %g1
200dc20: c2 27 bf f4 st %g1, [ %fp + -12 ]
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
200dc24: 80 a0 a0 00 cmp %g2, 0
200dc28: 12 80 00 06 bne 200dc40 <ioctl+0x80> <== ALWAYS TAKEN
200dc2c: d4 07 a0 4c ld [ %fp + 0x4c ], %o2
rtems_set_errno_and_return_minus_one( EBADF );
200dc30: 40 00 0c f8 call 2011010 <__errno> <== NOT EXECUTED
200dc34: 01 00 00 00 nop <== NOT EXECUTED
200dc38: 10 80 00 09 b 200dc5c <ioctl+0x9c> <== NOT EXECUTED
200dc3c: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9> <== NOT EXECUTED
if ( !iop->handlers->ioctl_h )
200dc40: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1
200dc44: 80 a0 60 00 cmp %g1, 0
200dc48: 12 80 00 08 bne 200dc68 <ioctl+0xa8> <== ALWAYS TAKEN
200dc4c: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOTSUP );
200dc50: 40 00 0c f0 call 2011010 <__errno> <== NOT EXECUTED
200dc54: 01 00 00 00 nop <== NOT EXECUTED
200dc58: 82 10 20 86 mov 0x86, %g1 ! 86 <PROM_START+0x86> <== NOT EXECUTED
200dc5c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200dc60: 10 80 00 04 b 200dc70 <ioctl+0xb0> <== NOT EXECUTED
200dc64: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
200dc68: 9f c0 40 00 call %g1
200dc6c: 01 00 00 00 nop
return rc;
}
200dc70: 81 c7 e0 08 ret
200dc74: 91 e8 00 08 restore %g0, %o0, %o0
02003904 <iproc>:
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
2003904: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP)
2003908: c4 06 60 30 ld [ %i1 + 0x30 ], %g2 <== NOT EXECUTED
200390c: 80 88 a0 20 btst 0x20, %g2 <== NOT EXECUTED
2003910: 02 80 00 03 be 200391c <iproc+0x18> <== NOT EXECUTED
2003914: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED
c &= 0x7f;
2003918: a0 0e 20 7f and %i0, 0x7f, %l0 <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
200391c: 80 88 a2 00 btst 0x200, %g2 <== NOT EXECUTED
2003920: 02 80 00 0b be 200394c <iproc+0x48> <== NOT EXECUTED
2003924: 82 0c 20 ff and %l0, 0xff, %g1 <== NOT EXECUTED
c = tolower (c);
2003928: 03 00 80 5b sethi %hi(0x2016c00), %g1 <== NOT EXECUTED
200392c: c2 00 62 f8 ld [ %g1 + 0x2f8 ], %g1 ! 2016ef8 <__ctype_ptr><== NOT EXECUTED
2003930: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED
2003934: c2 08 40 08 ldub [ %g1 + %o0 ], %g1 <== NOT EXECUTED
2003938: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED
200393c: 32 80 00 02 bne,a 2003944 <iproc+0x40> <== NOT EXECUTED
2003940: 90 02 20 20 add %o0, 0x20, %o0 <== NOT EXECUTED
2003944: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
if (c == '\r') {
2003948: 82 0c 20 ff and %l0, 0xff, %g1 <== NOT EXECUTED
200394c: 80 a0 60 0d cmp %g1, 0xd <== NOT EXECUTED
2003950: 12 80 00 09 bne 2003974 <iproc+0x70> <== NOT EXECUTED
2003954: 80 a0 60 0a cmp %g1, 0xa <== NOT EXECUTED
if (tty->termios.c_iflag & IGNCR)
2003958: 80 88 a0 80 btst 0x80, %g2 <== NOT EXECUTED
200395c: 12 80 00 5d bne 2003ad0 <iproc+0x1cc> <== NOT EXECUTED
2003960: 80 88 a1 00 btst 0x100, %g2 <== NOT EXECUTED
return 0;
if (tty->termios.c_iflag & ICRNL)
2003964: 32 80 00 0d bne,a 2003998 <iproc+0x94> <== NOT EXECUTED
2003968: 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)) {
200396c: 10 80 00 0c b 200399c <iproc+0x98> <== NOT EXECUTED
2003970: c6 06 60 3c ld [ %i1 + 0x3c ], %g3 <== NOT EXECUTED
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
}
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
2003974: 12 80 00 07 bne 2003990 <iproc+0x8c> <== NOT EXECUTED
2003978: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200397c: 80 88 a0 40 btst 0x40, %g2 <== NOT EXECUTED
2003980: 32 80 00 06 bne,a 2003998 <iproc+0x94> <== NOT EXECUTED
2003984: a0 10 20 0d mov 0xd, %l0 <== NOT EXECUTED
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
2003988: 10 80 00 05 b 200399c <iproc+0x98> <== NOT EXECUTED
200398c: c6 06 60 3c ld [ %i1 + 0x3c ], %g3 <== NOT EXECUTED
2003990: 02 80 00 3c be 2003a80 <iproc+0x17c> <== NOT EXECUTED
2003994: 03 00 80 5b sethi %hi(0x2016c00), %g1 <== NOT EXECUTED
2003998: c6 06 60 3c ld [ %i1 + 0x3c ], %g3 <== NOT EXECUTED
200399c: 80 88 e0 02 btst 2, %g3 <== NOT EXECUTED
20039a0: 02 80 00 38 be 2003a80 <iproc+0x17c> <== NOT EXECUTED
20039a4: 03 00 80 5b sethi %hi(0x2016c00), %g1 <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
20039a8: c2 0e 60 43 ldub [ %i1 + 0x43 ], %g1 <== NOT EXECUTED
20039ac: 84 0c 20 ff and %l0, 0xff, %g2 <== NOT EXECUTED
erase (tty, 0);
20039b0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
}
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
if (c == tty->termios.c_cc[VERASE]) {
20039b4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
20039b8: 02 80 00 08 be 20039d8 <iproc+0xd4> <== NOT EXECUTED
20039bc: 92 10 20 00 clr %o1 <== NOT EXECUTED
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
20039c0: c2 0e 60 44 ldub [ %i1 + 0x44 ], %g1 <== NOT EXECUTED
20039c4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
20039c8: 32 80 00 07 bne,a 20039e4 <iproc+0xe0> <== NOT EXECUTED
20039cc: c2 0e 60 45 ldub [ %i1 + 0x45 ], %g1 <== NOT EXECUTED
erase (tty, 1);
20039d0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
20039d4: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
20039d8: 7f ff ff 42 call 20036e0 <erase> <== NOT EXECUTED
20039dc: b0 10 20 00 clr %i0 <== NOT EXECUTED
20039e0: 30 80 00 3d b,a 2003ad4 <iproc+0x1d0> <== NOT EXECUTED
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
20039e4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
20039e8: 02 80 00 3b be 2003ad4 <iproc+0x1d0> <== NOT EXECUTED
20039ec: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
return 1;
}
else if (c == '\n') {
20039f0: 80 a0 a0 0a cmp %g2, 0xa <== NOT EXECUTED
20039f4: 32 80 00 0f bne,a 2003a30 <iproc+0x12c> <== NOT EXECUTED
20039f8: c2 0e 60 4c ldub [ %i1 + 0x4c ], %g1 <== NOT EXECUTED
if (tty->termios.c_lflag & (ECHO | ECHONL))
20039fc: 80 88 e0 48 btst 0x48, %g3 <== NOT EXECUTED
2003a00: 22 80 00 06 be,a 2003a18 <iproc+0x114> <== NOT EXECUTED
2003a04: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
echo (c, tty);
2003a08: 90 10 20 0a mov 0xa, %o0 <== NOT EXECUTED
2003a0c: 7f ff ff 12 call 2003654 <echo> <== NOT EXECUTED
2003a10: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
2003a14: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
2003a18: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED
2003a1c: 84 10 20 0a mov 0xa, %g2 <== NOT EXECUTED
2003a20: c4 28 c0 01 stb %g2, [ %g3 + %g1 ] <== NOT EXECUTED
2003a24: 82 00 60 01 inc %g1 <== NOT EXECUTED
2003a28: 10 80 00 14 b 2003a78 <iproc+0x174> <== NOT EXECUTED
2003a2c: c2 26 60 20 st %g1, [ %i1 + 0x20 ] <== NOT EXECUTED
return 1;
}
else if ((c == tty->termios.c_cc[VEOL])
2003a30: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2003a34: 02 80 00 07 be 2003a50 <iproc+0x14c> <== NOT EXECUTED
2003a38: 80 88 e0 08 btst 8, %g3 <== NOT EXECUTED
2003a3c: c2 0e 60 51 ldub [ %i1 + 0x51 ], %g1 <== NOT EXECUTED
2003a40: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2003a44: 12 80 00 0f bne 2003a80 <iproc+0x17c> <== NOT EXECUTED
2003a48: 03 00 80 5b sethi %hi(0x2016c00), %g1 <== NOT EXECUTED
|| (c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
2003a4c: 80 88 e0 08 btst 8, %g3 <== NOT EXECUTED
2003a50: 22 80 00 06 be,a 2003a68 <iproc+0x164> <== NOT EXECUTED
2003a54: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
echo (c, tty);
2003a58: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED
2003a5c: 7f ff fe fe call 2003654 <echo> <== NOT EXECUTED
2003a60: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
2003a64: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
2003a68: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED
2003a6c: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED
2003a70: e0 28 80 01 stb %l0, [ %g2 + %g1 ] <== NOT EXECUTED
2003a74: c6 26 60 20 st %g3, [ %i1 + 0x20 ] <== NOT EXECUTED
2003a78: 81 c7 e0 08 ret <== NOT EXECUTED
2003a7c: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
2003a80: c4 06 60 20 ld [ %i1 + 0x20 ], %g2 <== NOT EXECUTED
2003a84: c2 00 62 54 ld [ %g1 + 0x254 ], %g1 <== NOT EXECUTED
2003a88: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
2003a8c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2003a90: 16 80 00 11 bge 2003ad4 <iproc+0x1d0> <== NOT EXECUTED
2003a94: b0 10 20 00 clr %i0 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
2003a98: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED
2003a9c: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED
2003aa0: 22 80 00 06 be,a 2003ab8 <iproc+0x1b4> <== NOT EXECUTED
2003aa4: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
echo (c, tty);
2003aa8: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED
2003aac: 7f ff fe ea call 2003654 <echo> <== NOT EXECUTED
2003ab0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
2003ab4: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
2003ab8: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED
2003abc: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED
2003ac0: e0 28 80 01 stb %l0, [ %g2 + %g1 ] <== NOT EXECUTED
2003ac4: c6 26 60 20 st %g3, [ %i1 + 0x20 ] <== NOT EXECUTED
2003ac8: 81 c7 e0 08 ret <== NOT EXECUTED
2003acc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
2003ad0: b0 10 20 00 clr %i0 <== NOT EXECUTED
}
return 0;
}
2003ad4: 81 c7 e0 08 ret <== NOT EXECUTED
2003ad8: 81 e8 00 00 restore <== NOT EXECUTED
020149bc <isatty>:
#include <sys/stat.h>
int isatty(
int fd
)
{
20149bc: 9d e3 bf 48 save %sp, -184, %sp
struct stat buf;
if (fstat (fd, &buf) < 0)
20149c0: 90 10 00 18 mov %i0, %o0
20149c4: 92 07 bf a8 add %fp, -88, %o1
20149c8: 7f ff ff c4 call 20148d8 <fstat>
20149cc: b0 10 20 00 clr %i0
20149d0: 80 a2 20 00 cmp %o0, 0
20149d4: 06 80 00 08 bl 20149f4 <isatty+0x38> <== NEVER TAKEN
20149d8: c2 17 bf b4 lduh [ %fp + -76 ], %g1
20149dc: 05 00 00 3c sethi %hi(0xf000), %g2
20149e0: 82 08 40 02 and %g1, %g2, %g1
20149e4: 05 00 00 08 sethi %hi(0x2000), %g2
20149e8: 82 18 40 02 xor %g1, %g2, %g1
20149ec: 80 a0 00 01 cmp %g0, %g1
20149f0: b0 60 3f ff subx %g0, -1, %i0
if (S_ISCHR (buf.st_mode))
return 1;
return 0;
}
20149f4: 81 c7 e0 08 ret
20149f8: 81 e8 00 00 restore
0201869c <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
201869c: 9d e3 bf 88 save %sp, -120, %sp
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
20186a0: 7f ff fe c9 call 20181c4 <getpid>
20186a4: 01 00 00 00 nop
20186a8: 80 a6 00 08 cmp %i0, %o0
20186ac: 02 80 00 06 be 20186c4 <killinfo+0x28> <== ALWAYS TAKEN
20186b0: 80 a6 60 00 cmp %i1, 0
rtems_set_errno_and_return_minus_one( ESRCH );
20186b4: 7f ff d9 d1 call 200edf8 <__errno> <== NOT EXECUTED
20186b8: 01 00 00 00 nop <== NOT EXECUTED
20186bc: 10 80 00 07 b 20186d8 <killinfo+0x3c> <== NOT EXECUTED
20186c0: 82 10 20 03 mov 3, %g1 ! 3 <PROM_START+0x3> <== NOT EXECUTED
/*
* Validate the signal passed.
*/
if ( !sig )
20186c4: 12 80 00 08 bne 20186e4 <killinfo+0x48> <== ALWAYS TAKEN
20186c8: 86 06 7f ff add %i1, -1, %g3
rtems_set_errno_and_return_minus_one( EINVAL );
20186cc: 7f ff d9 cb call 200edf8 <__errno> <== NOT EXECUTED
20186d0: 01 00 00 00 nop <== NOT EXECUTED
20186d4: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16> <== NOT EXECUTED
20186d8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20186dc: 10 80 00 ae b 2018994 <killinfo+0x2f8> <== NOT EXECUTED
20186e0: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
if ( !is_valid_signo(sig) )
20186e4: 80 a0 e0 1f cmp %g3, 0x1f
20186e8: 18 bf ff f9 bgu 20186cc <killinfo+0x30> <== NEVER TAKEN
20186ec: 01 00 00 00 nop
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
20186f0: 83 2e 60 02 sll %i1, 2, %g1
20186f4: 85 2e 60 04 sll %i1, 4, %g2
20186f8: 84 20 80 01 sub %g2, %g1, %g2
20186fc: 03 00 80 92 sethi %hi(0x2024800), %g1
2018700: 82 10 60 78 or %g1, 0x78, %g1 ! 2024878 <_POSIX_signals_Vectors>
2018704: 82 00 40 02 add %g1, %g2, %g1
2018708: c2 00 60 08 ld [ %g1 + 8 ], %g1
201870c: 80 a0 60 01 cmp %g1, 1
2018710: 02 80 00 a1 be 2018994 <killinfo+0x2f8>
2018714: 90 10 20 00 clr %o0
* P1003.1c/Draft 10, p. 33 says that certain signals should always
* be directed to the executing thread such as those caused by hardware
* faults.
*/
if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
2018718: 80 a6 60 08 cmp %i1, 8
201871c: 02 80 00 06 be 2018734 <killinfo+0x98>
2018720: 80 a6 60 04 cmp %i1, 4
2018724: 02 80 00 04 be 2018734 <killinfo+0x98>
2018728: 80 a6 60 0b cmp %i1, 0xb
201872c: 12 80 00 08 bne 201874c <killinfo+0xb0>
2018730: 82 10 20 01 mov 1, %g1
return pthread_kill( pthread_self(), sig );
2018734: 40 00 01 33 call 2018c00 <pthread_self>
2018738: 01 00 00 00 nop
201873c: 40 00 00 f6 call 2018b14 <pthread_kill>
2018740: 92 10 00 19 mov %i1, %o1
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
}
_Thread_Enable_dispatch();
return 0;
}
2018744: 81 c7 e0 08 ret
2018748: 91 e8 00 08 restore %g0, %o0, %o0
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
201874c: f2 27 bf ec st %i1, [ %fp + -20 ]
siginfo->si_code = SI_USER;
2018750: c2 27 bf f0 st %g1, [ %fp + -16 ]
if ( !value ) {
2018754: 80 a6 a0 00 cmp %i2, 0
2018758: 12 80 00 04 bne 2018768 <killinfo+0xcc>
201875c: b1 28 40 03 sll %g1, %g3, %i0
siginfo->si_value.sival_int = 0;
2018760: 10 80 00 04 b 2018770 <killinfo+0xd4>
2018764: c0 27 bf f4 clr [ %fp + -12 ]
} else {
siginfo->si_value = *value;
2018768: c2 06 80 00 ld [ %i2 ], %g1
201876c: c2 27 bf f4 st %g1, [ %fp + -12 ]
2018770: 05 00 80 90 sethi %hi(0x2024000), %g2
2018774: c2 00 a2 60 ld [ %g2 + 0x260 ], %g1 ! 2024260 <_Thread_Dispatch_disable_level>
2018778: 82 00 60 01 inc %g1
201877c: c2 20 a2 60 st %g1, [ %g2 + 0x260 ]
/*
* 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;
2018780: 03 00 80 90 sethi %hi(0x2024000), %g1
2018784: c6 00 63 24 ld [ %g1 + 0x324 ], %g3 ! 2024324 <_Thread_Executing>
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( _POSIX_signals_Is_interested( api, mask ) ) {
2018788: c2 00 e1 6c ld [ %g3 + 0x16c ], %g1
201878c: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1
2018790: 80 ae 00 01 andncc %i0, %g1, %g0
2018794: 12 80 00 58 bne 20188f4 <killinfo+0x258>
2018798: 03 00 80 92 sethi %hi(0x2024800), %g1
goto process_it;
201879c: 88 10 62 04 or %g1, 0x204, %g4 ! 2024a04 <_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 ;
20187a0: 96 01 20 30 add %g4, 0x30, %o3
index++ ) {
the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ];
for ( the_node = the_chain->first ;
20187a4: c4 01 00 00 ld [ %g4 ], %g2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
20187a8: 10 80 00 0b b 20187d4 <killinfo+0x138>
20187ac: 98 01 20 04 add %g4, 4, %o4
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
20187b0: da 00 a1 6c ld [ %g2 + 0x16c ], %o5
if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) {
20187b4: 80 8e 00 01 btst %i0, %g1
20187b8: 12 80 00 4f bne 20188f4 <killinfo+0x258> <== ALWAYS TAKEN
20187bc: 86 10 00 02 mov %g2, %g3
20187c0: c2 03 60 c4 ld [ %o5 + 0xc4 ], %g1 <== NOT EXECUTED
20187c4: 80 ae 00 01 andncc %i0, %g1, %g0 <== NOT EXECUTED
20187c8: 12 80 00 4c bne 20188f8 <killinfo+0x25c> <== NOT EXECUTED
20187cc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ];
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
20187d0: c4 00 80 00 ld [ %g2 ], %g2 <== NOT EXECUTED
index++ ) {
the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ];
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
20187d4: 80 a0 80 0c cmp %g2, %o4
20187d8: 32 bf ff f6 bne,a 20187b0 <killinfo+0x114>
20187dc: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1
20187e0: 88 01 20 0c add %g4, 0xc, %g4
*/
/* XXX violation of visibility -- need to define thread queue support */
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
20187e4: 80 a1 00 0b cmp %g4, %o3
20187e8: 12 bf ff ef bne 20187a4 <killinfo+0x108>
20187ec: 03 00 80 6d sethi %hi(0x201b400), %g1
*
* + rtems internal threads do not receive signals.
*/
interested_thread = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
20187f0: c2 08 62 84 ldub [ %g1 + 0x284 ], %g1 ! 201b684 <rtems_maximum_priority>
20187f4: 90 10 20 00 clr %o0
20187f8: 96 00 60 01 add %g1, 1, %o3
* Now we know both threads are blocked.
* If the interested thread is interruptible, then just use it.
*/
/* XXX need a new states macro */
if ( interested_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL )
20187fc: 1f 04 00 00 sethi %hi(0x10000000), %o7
*
* + rtems internal threads do not receive signals.
*/
interested_thread = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
2018800: 03 00 80 90 sethi %hi(0x2024000), %g1
2018804: 98 10 61 c8 or %g1, 0x1c8, %o4 ! 20241c8 <_Objects_Information_table+0x8>
for ( the_api = OBJECTS_CLASSIC_API;
the_api <= OBJECTS_APIS_LAST;
2018808: b4 03 20 0c add %o4, 0xc, %i2
the_api++ ) {
/*
* Thie can occur when no one is interested and ITRON is not configured.
*/
if ( !_Objects_Information_table[ the_api ] )
201880c: c2 03 00 00 ld [ %o4 ], %g1
2018810: 80 a0 60 00 cmp %g1, 0
2018814: 22 80 00 32 be,a 20188dc <killinfo+0x240>
2018818: 98 03 20 04 add %o4, 4, %o4
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
201881c: c2 00 60 04 ld [ %g1 + 4 ], %g1
/*
* This cannot happen in the current (as of Dec 2007) implementation
* of initialization but at some point, the object information
* structure for a particular manager may not be installed.
*/
if ( !the_info )
2018820: 80 a0 60 00 cmp %g1, 0
2018824: 22 80 00 2e be,a 20188dc <killinfo+0x240> <== NEVER TAKEN
2018828: 98 03 20 04 add %o4, 4, %o4 <== NOT EXECUTED
continue;
maximum = the_info->maximum;
object_table = the_info->local_table;
201882c: d2 00 60 1c ld [ %g1 + 0x1c ], %o1
* structure for a particular manager may not be installed.
*/
if ( !the_info )
continue;
maximum = the_info->maximum;
2018830: d4 10 60 10 lduh [ %g1 + 0x10 ], %o2
object_table = the_info->local_table;
2018834: 10 80 00 26 b 20188cc <killinfo+0x230>
2018838: 9a 10 20 01 mov 1, %o5
for ( index = 1 ; index <= maximum ; index++ ) {
the_thread = (Thread_Control *) object_table[ index ];
201883c: c4 02 40 01 ld [ %o1 + %g1 ], %g2
if ( !the_thread )
2018840: 80 a0 a0 00 cmp %g2, 0
2018844: 02 80 00 20 be 20188c4 <killinfo+0x228>
2018848: 88 10 00 0b mov %o3, %g4
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
201884c: c8 00 a0 14 ld [ %g2 + 0x14 ], %g4
2018850: 80 a1 00 0b cmp %g4, %o3
2018854: 38 80 00 1c bgu,a 20188c4 <killinfo+0x228> <== NEVER TAKEN
2018858: 88 10 00 0b mov %o3, %g4 <== NOT EXECUTED
/*
* If this thread is not interested, then go on to the next thread.
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
201885c: c2 00 a1 6c ld [ %g2 + 0x16c ], %g1
if ( !api || !_POSIX_signals_Is_interested( api, mask ) )
2018860: 80 a0 60 00 cmp %g1, 0
2018864: 22 80 00 18 be,a 20188c4 <killinfo+0x228> <== NEVER TAKEN
2018868: 88 10 00 0b mov %o3, %g4 <== NOT EXECUTED
201886c: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1
2018870: 80 ae 00 01 andncc %i0, %g1, %g0
2018874: 22 80 00 14 be,a 20188c4 <killinfo+0x228>
2018878: 88 10 00 0b mov %o3, %g4
* Now we know the thread under connsideration is interested.
* If the thread under consideration is of higher priority, then
* it becomes the interested thread.
*/
if ( the_thread->current_priority < interested_priority ) {
201887c: 80 a1 00 0b cmp %g4, %o3
2018880: 2a 80 00 11 bcs,a 20188c4 <killinfo+0x228> <== ALWAYS TAKEN
2018884: 90 10 00 02 mov %g2, %o0
* Now the thread and the interested thread have the same priority.
* If the interested thread is ready, then we don't need to send it
* to a blocked thread.
*/
if ( _States_Is_ready( interested_thread->current_state ) )
2018888: c6 02 20 10 ld [ %o0 + 0x10 ], %g3 <== NOT EXECUTED
201888c: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED
2018890: 22 80 00 0d be,a 20188c4 <killinfo+0x228> <== NOT EXECUTED
2018894: 88 10 00 0b mov %o3, %g4 <== NOT EXECUTED
* Now the interested thread is blocked.
* If the thread we are considering is not, the it becomes the
* interested thread.
*/
if ( _States_Is_ready( the_thread->current_state ) ) {
2018898: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED
201889c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20188a0: 22 80 00 09 be,a 20188c4 <killinfo+0x228> <== NOT EXECUTED
20188a4: 90 10 00 02 mov %g2, %o0 <== NOT EXECUTED
* Now we know both threads are blocked.
* If the interested thread is interruptible, then just use it.
*/
/* XXX need a new states macro */
if ( interested_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL )
20188a8: 80 88 c0 0f btst %g3, %o7 <== NOT EXECUTED
20188ac: 32 80 00 06 bne,a 20188c4 <killinfo+0x228> <== NOT EXECUTED
20188b0: 88 10 00 0b mov %o3, %g4 <== NOT EXECUTED
* If the thread under consideration is interruptible by a signal,
* then it becomes the interested thread.
*/
/* XXX need a new states macro */
if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
20188b4: 80 88 40 0f btst %g1, %o7 <== NOT EXECUTED
20188b8: 32 80 00 03 bne,a 20188c4 <killinfo+0x228> <== NOT EXECUTED
20188bc: 90 10 00 02 mov %g2, %o0 <== NOT EXECUTED
20188c0: 88 10 00 0b mov %o3, %g4 <== NOT EXECUTED
continue;
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
20188c4: 9a 03 60 01 inc %o5
20188c8: 96 10 00 04 mov %g4, %o3
20188cc: 80 a3 40 0a cmp %o5, %o2
20188d0: 08 bf ff db bleu 201883c <killinfo+0x1a0>
20188d4: 83 2b 60 02 sll %o5, 2, %g1
20188d8: 98 03 20 04 add %o4, 4, %o4
interested_thread = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
for ( the_api = OBJECTS_CLASSIC_API;
the_api <= OBJECTS_APIS_LAST;
20188dc: 80 a3 00 1a cmp %o4, %i2
20188e0: 32 bf ff cc bne,a 2018810 <killinfo+0x174>
20188e4: c2 03 00 00 ld [ %o4 ], %g1
interested_priority = the_thread->current_priority;
}
}
}
if ( interested_thread ) {
20188e8: 80 a2 20 00 cmp %o0, 0
20188ec: 02 80 00 0b be 2018918 <killinfo+0x27c>
20188f0: 86 10 00 08 mov %o0, %g3
* evaluate the signals pending.
*/
process_it:
the_thread->do_post_task_switch_extension = true;
20188f4: 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 ) ) {
20188f8: 90 10 00 03 mov %g3, %o0
* evaluate the signals pending.
*/
process_it:
the_thread->do_post_task_switch_extension = true;
20188fc: c2 28 e0 75 stb %g1, [ %g3 + 0x75 ]
/*
* Returns TRUE if the signal was synchronously given to a thread
* blocked waiting for the signal.
*/
if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
2018900: 92 10 00 19 mov %i1, %o1
2018904: 40 00 00 38 call 20189e4 <_POSIX_signals_Unblock_thread>
2018908: 94 07 bf ec add %fp, -20, %o2
201890c: 80 8a 20 ff btst 0xff, %o0
2018910: 12 80 00 1e bne 2018988 <killinfo+0x2ec>
2018914: 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 );
2018918: 40 00 00 22 call 20189a0 <_POSIX_signals_Set_process_signals>
201891c: 90 10 00 18 mov %i0, %o0
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
2018920: 83 2e 60 02 sll %i1, 2, %g1
2018924: 85 2e 60 04 sll %i1, 4, %g2
2018928: b2 20 80 01 sub %g2, %g1, %i1
201892c: 03 00 80 92 sethi %hi(0x2024800), %g1
2018930: 82 10 60 78 or %g1, 0x78, %g1 ! 2024878 <_POSIX_signals_Vectors>
2018934: c2 00 40 19 ld [ %g1 + %i1 ], %g1
2018938: 80 a0 60 02 cmp %g1, 2
201893c: 12 80 00 13 bne 2018988 <killinfo+0x2ec>
2018940: 11 00 80 92 sethi %hi(0x2024800), %o0
psiginfo = (POSIX_signals_Siginfo_node *)
2018944: 7f ff d3 92 call 200d78c <_Chain_Get>
2018948: 90 12 21 f8 or %o0, 0x1f8, %o0 ! 20249f8 <_POSIX_signals_Inactive_siginfo>
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
201894c: b4 92 20 00 orcc %o0, 0, %i2
2018950: 12 80 00 06 bne 2018968 <killinfo+0x2cc> <== ALWAYS TAKEN
2018954: 92 07 bf ec add %fp, -20, %o1
rtems_set_errno_and_return_minus_one( EAGAIN );
2018958: 7f ff d9 28 call 200edf8 <__errno> <== NOT EXECUTED
201895c: 01 00 00 00 nop <== NOT EXECUTED
2018960: 10 bf ff 5e b 20186d8 <killinfo+0x3c> <== NOT EXECUTED
2018964: 82 10 20 0b mov 0xb, %g1 ! b <PROM_START+0xb> <== NOT EXECUTED
}
psiginfo->Info = *siginfo;
2018968: 90 06 a0 08 add %i2, 8, %o0
201896c: 7f ff db 49 call 200f690 <memcpy>
2018970: 94 10 20 0c mov 0xc, %o2
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
2018974: 11 00 80 92 sethi %hi(0x2024800), %o0
2018978: 92 10 00 1a mov %i2, %o1
201897c: 90 12 22 48 or %o0, 0x248, %o0
2018980: 7f ff bb 72 call 2007748 <_Chain_Append>
2018984: 90 02 00 19 add %o0, %i1, %o0
}
_Thread_Enable_dispatch();
2018988: 7f ff c1 ba call 2009070 <_Thread_Enable_dispatch>
201898c: 01 00 00 00 nop
2018990: 90 10 20 00 clr %o0 ! 0 <PROM_START>
return 0;
}
2018994: b0 10 00 08 mov %o0, %i0
2018998: 81 c7 e0 08 ret
201899c: 81 e8 00 00 restore
02002508 <libc_create_hook>:
*/
bool libc_create_hook(
rtems_tcb *current_task,
rtems_tcb *creating_task
)
{
2002508: 9d e3 bf 98 save %sp, -104, %sp
ptr = (struct _reent *) calloc(1, sizeof(struct _reent));
#else
/* It is OK to allocate from the workspace because these
* hooks run with thread dispatching disabled.
*/
ptr = (struct _reent *) _Workspace_Allocate(sizeof(struct _reent));
200250c: 90 10 24 00 mov 0x400, %o0
2002510: 40 00 19 ad call 2008bc4 <_Workspace_Allocate>
2002514: b0 10 20 00 clr %i0
#endif
if (ptr) {
2002518: a2 92 20 00 orcc %o0, 0, %l1
200251c: 02 80 00 5a be 2002684 <libc_create_hook+0x17c> <== NEVER TAKEN
2002520: 82 04 63 48 add %l1, 0x348, %g1
_REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */
2002524: c2 24 60 08 st %g1, [ %l1 + 8 ]
2002528: 82 04 63 a4 add %l1, 0x3a4, %g1
200252c: a0 04 62 ec add %l1, 0x2ec, %l0
2002530: 92 10 20 00 clr %o1
2002534: 94 10 20 19 mov 0x19, %o2
2002538: c2 24 60 0c st %g1, [ %l1 + 0xc ]
200253c: c0 24 40 00 clr [ %l1 ]
2002540: c0 24 60 10 clr [ %l1 + 0x10 ]
2002544: e0 24 60 04 st %l0, [ %l1 + 4 ]
2002548: 40 00 2c fe call 200d940 <memset>
200254c: 90 04 60 14 add %l1, 0x14, %o0
2002550: 03 00 80 56 sethi %hi(0x2015800), %g1
2002554: 82 10 62 38 or %g1, 0x238, %g1 ! 2015a38 <pollCallbacks.4788+0x358>
2002558: 92 10 20 00 clr %o1
200255c: 94 10 20 24 mov 0x24, %o2
2002560: c2 24 60 34 st %g1, [ %l1 + 0x34 ]
2002564: c0 24 60 30 clr [ %l1 + 0x30 ]
2002568: c0 24 60 38 clr [ %l1 + 0x38 ]
200256c: c0 24 60 3c clr [ %l1 + 0x3c ]
2002570: c0 24 60 40 clr [ %l1 + 0x40 ]
2002574: c0 24 60 44 clr [ %l1 + 0x44 ]
2002578: c0 24 60 48 clr [ %l1 + 0x48 ]
200257c: c0 24 60 4c clr [ %l1 + 0x4c ]
2002580: c0 24 60 50 clr [ %l1 + 0x50 ]
2002584: c0 24 60 54 clr [ %l1 + 0x54 ]
2002588: c0 24 60 58 clr [ %l1 + 0x58 ]
200258c: c0 24 60 5c clr [ %l1 + 0x5c ]
2002590: c0 2c 60 60 clrb [ %l1 + 0x60 ]
2002594: 40 00 2c eb call 200d940 <memset>
2002598: 90 04 60 7c add %l1, 0x7c, %o0
200259c: 03 00 00 0c sethi %hi(0x3000), %g1
20025a0: 82 10 63 0e or %g1, 0x30e, %g1 ! 330e <PROM_START+0x330e>
20025a4: c2 34 60 b0 sth %g1, [ %l1 + 0xb0 ]
20025a8: 03 3f ff ea sethi %hi(0xffffa800), %g1
20025ac: 82 10 63 cd or %g1, 0x3cd, %g1 ! ffffabcd <RAM_END+0xfdbfabcd>
20025b0: c2 34 60 b2 sth %g1, [ %l1 + 0xb2 ]
20025b4: 03 00 00 04 sethi %hi(0x1000), %g1
20025b8: 82 10 62 34 or %g1, 0x234, %g1 ! 1234 <PROM_START+0x1234>
20025bc: c2 34 60 b4 sth %g1, [ %l1 + 0xb4 ]
20025c0: 03 3f ff f9 sethi %hi(0xffffe400), %g1
20025c4: 82 10 62 6d or %g1, 0x26d, %g1 ! ffffe66d <RAM_END+0xfdbfe66d>
20025c8: c2 34 60 b6 sth %g1, [ %l1 + 0xb6 ]
20025cc: 03 3f ff f7 sethi %hi(0xffffdc00), %g1
20025d0: 82 10 62 ec or %g1, 0x2ec, %g1 ! ffffdeec <RAM_END+0xfdbfdeec>
20025d4: c2 34 60 b8 sth %g1, [ %l1 + 0xb8 ]
20025d8: 82 10 20 05 mov 5, %g1
20025dc: 84 10 20 00 clr %g2
20025e0: 86 10 20 01 mov 1, %g3
20025e4: c2 34 60 ba sth %g1, [ %l1 + 0xba ]
20025e8: c4 3c 60 a8 std %g2, [ %l1 + 0xa8 ]
20025ec: 82 10 20 0b mov 0xb, %g1
20025f0: c0 24 60 a0 clr [ %l1 + 0xa0 ]
20025f4: c2 34 60 bc sth %g1, [ %l1 + 0xbc ]
20025f8: c0 24 60 c0 clr [ %l1 + 0xc0 ]
20025fc: c0 24 60 c4 clr [ %l1 + 0xc4 ]
2002600: c0 24 60 c8 clr [ %l1 + 0xc8 ]
2002604: c0 24 60 cc clr [ %l1 + 0xcc ]
2002608: c0 24 60 d0 clr [ %l1 + 0xd0 ]
200260c: c0 24 60 d4 clr [ %l1 + 0xd4 ]
2002610: c0 24 60 fc clr [ %l1 + 0xfc ]
2002614: c0 24 61 00 clr [ %l1 + 0x100 ]
2002618: c0 24 61 04 clr [ %l1 + 0x104 ]
200261c: c0 24 61 08 clr [ %l1 + 0x108 ]
2002620: c0 24 61 0c clr [ %l1 + 0x10c ]
2002624: c0 24 61 10 clr [ %l1 + 0x110 ]
2002628: c0 24 61 14 clr [ %l1 + 0x114 ]
200262c: c0 24 61 18 clr [ %l1 + 0x118 ]
2002630: c0 24 61 1c clr [ %l1 + 0x11c ]
2002634: c0 24 61 20 clr [ %l1 + 0x120 ]
2002638: c0 2c 60 d8 clrb [ %l1 + 0xd8 ]
200263c: c0 2c 60 e0 clrb [ %l1 + 0xe0 ]
2002640: c0 24 60 f8 clr [ %l1 + 0xf8 ]
2002644: c0 24 61 48 clr [ %l1 + 0x148 ]
2002648: c0 24 61 4c clr [ %l1 + 0x14c ]
200264c: c0 24 61 50 clr [ %l1 + 0x150 ]
2002650: c0 24 61 54 clr [ %l1 + 0x154 ]
2002654: c0 24 62 d4 clr [ %l1 + 0x2d4 ]
2002658: c0 24 61 d4 clr [ %l1 + 0x1d4 ]
200265c: 90 10 00 10 mov %l0, %o0
2002660: c0 24 62 dc clr [ %l1 + 0x2dc ]
2002664: c0 24 62 e0 clr [ %l1 + 0x2e0 ]
2002668: c0 24 62 e4 clr [ %l1 + 0x2e4 ]
200266c: c0 24 62 e8 clr [ %l1 + 0x2e8 ]
2002670: 92 10 20 00 clr %o1
2002674: 94 10 21 14 mov 0x114, %o2
2002678: 40 00 2c b2 call 200d940 <memset>
200267c: b0 10 20 01 mov 1, %i0
creating_task->libc_reent = ptr;
2002680: e2 26 61 64 st %l1, [ %i1 + 0x164 ]
return true;
}
else
return false;
}
2002684: 81 c7 e0 08 ret
2002688: 81 e8 00 00 restore
0200244c <libc_delete_hook>:
rtems_extension libc_delete_hook(
rtems_tcb *current_task,
rtems_tcb *deleted_task
)
{
200244c: 9d e3 bf 98 save %sp, -104, %sp
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
2002450: 80 a6 00 19 cmp %i0, %i1
2002454: 32 80 00 04 bne,a 2002464 <libc_delete_hook+0x18>
2002458: e0 06 61 64 ld [ %i1 + 0x164 ], %l0
ptr = _REENT;
200245c: 03 00 80 5b sethi %hi(0x2016c00), %g1
2002460: e0 00 63 00 ld [ %g1 + 0x300 ], %l0 ! 2016f00 <_impure_ptr>
} else {
ptr = deleted_task->libc_reent;
}
if (ptr && ptr != &libc_global_reent) {
2002464: 80 a4 20 00 cmp %l0, 0
2002468: 02 80 00 0b be 2002494 <libc_delete_hook+0x48> <== NEVER TAKEN
200246c: 03 00 80 5a sethi %hi(0x2016800), %g1
2002470: 82 10 62 50 or %g1, 0x250, %g1 ! 2016a50 <libc_global_reent>
2002474: 80 a4 00 01 cmp %l0, %g1
2002478: 02 80 00 07 be 2002494 <libc_delete_hook+0x48>
200247c: 13 00 80 09 sethi %hi(0x2002400), %o1
_reclaim_reent(ptr);
*/
/*
* Just in case there are some buffers lying around.
*/
_fwalk(ptr, newlib_free_buffers);
2002480: 90 10 00 10 mov %l0, %o0
2002484: 40 00 2c d0 call 200d7c4 <_fwalk>
2002488: 92 12 60 b0 or %o1, 0xb0, %o1
#if REENT_MALLOCED
free(ptr);
#else
_Workspace_Free(ptr);
200248c: 40 00 19 c7 call 2008ba8 <_Workspace_Free>
2002490: 90 10 00 10 mov %l0, %o0
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
2002494: 80 a6 00 19 cmp %i0, %i1
2002498: 12 80 00 04 bne 20024a8 <libc_delete_hook+0x5c>
200249c: c0 26 61 64 clr [ %i1 + 0x164 ]
_REENT = 0;
20024a0: 03 00 80 5b sethi %hi(0x2016c00), %g1
20024a4: c0 20 63 00 clr [ %g1 + 0x300 ] ! 2016f00 <_impure_ptr>
20024a8: 81 c7 e0 08 ret
20024ac: 81 e8 00 00 restore
02014b20 <libc_wrapup>:
extern void _wrapup_reent(struct _reent *);
extern void _reclaim_reent(struct _reent *);
void libc_wrapup(void)
{
2014b20: 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()))
2014b24: 03 00 80 5e sethi %hi(0x2017800), %g1
2014b28: c2 00 61 c4 ld [ %g1 + 0x1c4 ], %g1 ! 20179c4 <_System_state_Current>
2014b2c: 80 a0 60 03 cmp %g1, 3
2014b30: 12 80 00 16 bne 2014b88 <libc_wrapup+0x68> <== NEVER TAKEN
2014b34: 31 00 80 5b sethi %hi(0x2016c00), %i0
/*
* This was already done if the user called exit() directly .
_wrapup_reent(0);
*/
if (_REENT != &libc_global_reent) {
2014b38: c4 06 23 00 ld [ %i0 + 0x300 ], %g2 ! 2016f00 <_impure_ptr>
2014b3c: 03 00 80 5a sethi %hi(0x2016800), %g1
2014b40: a0 10 62 50 or %g1, 0x250, %l0 ! 2016a50 <libc_global_reent>
2014b44: 80 a0 80 10 cmp %g2, %l0
2014b48: 22 80 00 06 be,a 2014b60 <libc_wrapup+0x40>
2014b4c: 21 00 80 5b sethi %hi(0x2016c00), %l0
_wrapup_reent(&libc_global_reent);
2014b50: 40 00 01 c9 call 2015274 <_wrapup_reent>
2014b54: 90 10 00 10 mov %l0, %o0
/* Don't reclaim this one, just in case we do printfs
* on the way out to ROM.
*/
_reclaim_reent(&libc_global_reent);
#endif
_REENT = &libc_global_reent;
2014b58: e0 26 23 00 st %l0, [ %i0 + 0x300 ]
*
* Should this be changed to do *all* file streams?
* _fwalk (_REENT, fclose);
*/
fclose (stdin);
2014b5c: 21 00 80 5b sethi %hi(0x2016c00), %l0
2014b60: c2 04 23 00 ld [ %l0 + 0x300 ], %g1 ! 2016f00 <_impure_ptr>
2014b64: 7f ff e1 a4 call 200d1f4 <fclose>
2014b68: d0 00 60 04 ld [ %g1 + 4 ], %o0
fclose (stdout);
2014b6c: c2 04 23 00 ld [ %l0 + 0x300 ], %g1
2014b70: 7f ff e1 a1 call 200d1f4 <fclose>
2014b74: d0 00 60 08 ld [ %g1 + 8 ], %o0
fclose (stderr);
2014b78: c2 04 23 00 ld [ %l0 + 0x300 ], %g1
2014b7c: f0 00 60 0c ld [ %g1 + 0xc ], %i0
2014b80: 7f ff e1 9d call 200d1f4 <fclose>
2014b84: 81 e8 00 00 restore
2014b88: 81 c7 e0 08 ret <== NOT EXECUTED
2014b8c: 81 e8 00 00 restore <== NOT EXECUTED
02003ab8 <link>:
int link(
const char *existing,
const char *new
)
{
2003ab8: 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 );
2003abc: 92 10 20 00 clr %o1
2003ac0: 90 10 00 18 mov %i0, %o0
2003ac4: 94 07 bf e4 add %fp, -28, %o2
2003ac8: 96 10 20 01 mov 1, %o3
2003acc: 7f ff fe 7d call 20034c0 <rtems_filesystem_evaluate_path>
2003ad0: b0 10 3f ff mov -1, %i0
if ( result != 0 )
2003ad4: 80 a2 20 00 cmp %o0, 0
2003ad8: 12 80 00 8e bne 2003d10 <link+0x258>
2003adc: 01 00 00 00 nop
/*
* Get the parent of the node we are creating.
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
2003ae0: c2 4e 40 00 ldsb [ %i1 ], %g1
2003ae4: 80 a0 60 2f cmp %g1, 0x2f
2003ae8: 02 80 00 06 be 2003b00 <link+0x48>
2003aec: 80 a0 60 5c cmp %g1, 0x5c
2003af0: 02 80 00 04 be 2003b00 <link+0x48> <== NEVER TAKEN
2003af4: 80 a0 60 00 cmp %g1, 0
2003af8: 12 80 00 0a bne 2003b20 <link+0x68> <== ALWAYS TAKEN
2003afc: 03 00 80 5f sethi %hi(0x2017c00), %g1
2003b00: 03 00 80 5f sethi %hi(0x2017c00), %g1
2003b04: d2 00 63 6c ld [ %g1 + 0x36c ], %o1 ! 2017f6c <rtems_current_user_env>
2003b08: 90 07 bf d4 add %fp, -44, %o0
2003b0c: 92 02 60 14 add %o1, 0x14, %o1
2003b10: 40 00 31 f6 call 20102e8 <memcpy>
2003b14: 94 10 20 10 mov 0x10, %o2
2003b18: 10 80 00 08 b 2003b38 <link+0x80>
2003b1c: 84 10 20 01 mov 1, %g2
2003b20: d2 00 63 6c ld [ %g1 + 0x36c ], %o1
2003b24: 90 07 bf d4 add %fp, -44, %o0
2003b28: 92 02 60 04 add %o1, 4, %o1
2003b2c: 40 00 31 ef call 20102e8 <memcpy>
2003b30: 94 10 20 10 mov 0x10, %o2
2003b34: 84 10 20 00 clr %g2
if ( !parent_loc.ops->evalformake_h ) {
2003b38: c2 07 bf dc ld [ %fp + -36 ], %g1
2003b3c: c2 00 60 04 ld [ %g1 + 4 ], %g1
2003b40: 80 a0 60 00 cmp %g1, 0
2003b44: 12 80 00 0b bne 2003b70 <link+0xb8> <== ALWAYS TAKEN
2003b48: 90 06 40 02 add %i1, %g2, %o0
rtems_filesystem_freenode( &existing_loc );
2003b4c: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED
2003b50: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003b54: 02 80 00 51 be 2003c98 <link+0x1e0> <== NOT EXECUTED
2003b58: 01 00 00 00 nop <== NOT EXECUTED
2003b5c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2003b60: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003b64: 12 80 00 4b bne 2003c90 <link+0x1d8> <== NOT EXECUTED
2003b68: 90 07 bf e4 add %fp, -28, %o0 <== NOT EXECUTED
2003b6c: 30 80 00 4b b,a 2003c98 <link+0x1e0> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
2003b70: b0 07 bf d4 add %fp, -44, %i0
2003b74: 94 07 bf f4 add %fp, -12, %o2
2003b78: 9f c0 40 00 call %g1
2003b7c: 92 10 00 18 mov %i0, %o1
if ( result != 0 ) {
2003b80: b2 92 20 00 orcc %o0, 0, %i1
2003b84: 02 80 00 11 be 2003bc8 <link+0x110>
2003b88: c4 07 bf f0 ld [ %fp + -16 ], %g2
rtems_filesystem_freenode( &existing_loc );
2003b8c: c2 07 bf ec ld [ %fp + -20 ], %g1
2003b90: 80 a0 60 00 cmp %g1, 0
2003b94: 02 80 00 08 be 2003bb4 <link+0xfc> <== NEVER TAKEN
2003b98: 01 00 00 00 nop
2003b9c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2003ba0: 80 a0 60 00 cmp %g1, 0
2003ba4: 02 80 00 04 be 2003bb4 <link+0xfc> <== NEVER TAKEN
2003ba8: 01 00 00 00 nop
2003bac: 9f c0 40 00 call %g1
2003bb0: 90 07 bf e4 add %fp, -28, %o0
rtems_set_errno_and_return_minus_one( result );
2003bb4: 40 00 2f c1 call 200fab8 <__errno>
2003bb8: b0 10 3f ff mov -1, %i0
2003bbc: f2 22 00 00 st %i1, [ %o0 ]
2003bc0: 81 c7 e0 08 ret
2003bc4: 81 e8 00 00 restore
/*
* Check to see if the caller is trying to link across file system
* boundaries.
*/
if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
2003bc8: c2 07 bf e0 ld [ %fp + -32 ], %g1
2003bcc: 80 a0 40 02 cmp %g1, %g2
2003bd0: 02 80 00 1a be 2003c38 <link+0x180>
2003bd4: c2 07 bf dc ld [ %fp + -36 ], %g1
rtems_filesystem_freenode( &existing_loc );
2003bd8: c2 07 bf ec ld [ %fp + -20 ], %g1
2003bdc: 80 a0 60 00 cmp %g1, 0
2003be0: 22 80 00 09 be,a 2003c04 <link+0x14c> <== NEVER TAKEN
2003be4: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED
2003be8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2003bec: 80 a0 60 00 cmp %g1, 0
2003bf0: 22 80 00 05 be,a 2003c04 <link+0x14c> <== NEVER TAKEN
2003bf4: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED
2003bf8: 9f c0 40 00 call %g1
2003bfc: 90 07 bf e4 add %fp, -28, %o0
rtems_filesystem_freenode( &parent_loc );
2003c00: c2 07 bf dc ld [ %fp + -36 ], %g1
2003c04: 80 a0 60 00 cmp %g1, 0
2003c08: 02 80 00 08 be 2003c28 <link+0x170> <== NEVER TAKEN
2003c0c: 01 00 00 00 nop
2003c10: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2003c14: 80 a0 60 00 cmp %g1, 0
2003c18: 02 80 00 04 be 2003c28 <link+0x170> <== NEVER TAKEN
2003c1c: 01 00 00 00 nop
2003c20: 9f c0 40 00 call %g1
2003c24: 90 07 bf d4 add %fp, -44, %o0
rtems_set_errno_and_return_minus_one( EXDEV );
2003c28: 40 00 2f a4 call 200fab8 <__errno>
2003c2c: b0 10 3f ff mov -1, %i0
2003c30: 10 80 00 1d b 2003ca4 <link+0x1ec>
2003c34: 82 10 20 12 mov 0x12, %g1
}
if ( !parent_loc.ops->link_h ) {
2003c38: c2 00 60 08 ld [ %g1 + 8 ], %g1
2003c3c: 80 a0 60 00 cmp %g1, 0
2003c40: 12 80 00 1c bne 2003cb0 <link+0x1f8> <== ALWAYS TAKEN
2003c44: d4 07 bf f4 ld [ %fp + -12 ], %o2
rtems_filesystem_freenode( &existing_loc );
2003c48: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED
2003c4c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003c50: 22 80 00 09 be,a 2003c74 <link+0x1bc> <== NOT EXECUTED
2003c54: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED
2003c58: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2003c5c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003c60: 22 80 00 05 be,a 2003c74 <link+0x1bc> <== NOT EXECUTED
2003c64: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED
2003c68: 9f c0 40 00 call %g1 <== NOT EXECUTED
2003c6c: 90 07 bf e4 add %fp, -28, %o0 <== NOT EXECUTED
rtems_filesystem_freenode( &parent_loc );
2003c70: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED
2003c74: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003c78: 02 80 00 08 be 2003c98 <link+0x1e0> <== NOT EXECUTED
2003c7c: 01 00 00 00 nop <== NOT EXECUTED
2003c80: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2003c84: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003c88: 02 80 00 04 be 2003c98 <link+0x1e0> <== NOT EXECUTED
2003c8c: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED
2003c90: 9f c0 40 00 call %g1 <== NOT EXECUTED
2003c94: 01 00 00 00 nop <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
2003c98: 40 00 2f 88 call 200fab8 <__errno> <== NOT EXECUTED
2003c9c: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff> <== NOT EXECUTED
2003ca0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2003ca4: c2 22 00 00 st %g1, [ %o0 ]
2003ca8: 81 c7 e0 08 ret
2003cac: 81 e8 00 00 restore
}
result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start );
2003cb0: 92 10 00 18 mov %i0, %o1
2003cb4: b2 07 bf e4 add %fp, -28, %i1
2003cb8: 9f c0 40 00 call %g1
2003cbc: 90 10 00 19 mov %i1, %o0
rtems_filesystem_freenode( &existing_loc );
2003cc0: c2 07 bf ec ld [ %fp + -20 ], %g1
2003cc4: 80 a0 60 00 cmp %g1, 0
2003cc8: 02 80 00 08 be 2003ce8 <link+0x230> <== NEVER TAKEN
2003ccc: b0 10 00 08 mov %o0, %i0
2003cd0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2003cd4: 80 a0 60 00 cmp %g1, 0
2003cd8: 22 80 00 05 be,a 2003cec <link+0x234> <== NEVER TAKEN
2003cdc: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED
2003ce0: 9f c0 40 00 call %g1
2003ce4: 90 10 00 19 mov %i1, %o0
rtems_filesystem_freenode( &parent_loc );
2003ce8: c2 07 bf dc ld [ %fp + -36 ], %g1
2003cec: 80 a0 60 00 cmp %g1, 0
2003cf0: 02 80 00 08 be 2003d10 <link+0x258> <== NEVER TAKEN
2003cf4: 01 00 00 00 nop
2003cf8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2003cfc: 80 a0 60 00 cmp %g1, 0
2003d00: 02 80 00 04 be 2003d10 <link+0x258> <== NEVER TAKEN
2003d04: 01 00 00 00 nop
2003d08: 9f c0 40 00 call %g1
2003d0c: 90 07 bf d4 add %fp, -44, %o0
return result;
}
2003d10: 81 c7 e0 08 ret
2003d14: 81 e8 00 00 restore
020149fc <lseek>:
off_t lseek(
int fd,
off_t offset,
int whence
)
{
20149fc: 9d e3 bf 98 save %sp, -104, %sp
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
2014a00: 03 00 80 5a sethi %hi(0x2016800), %g1
2014a04: c2 00 61 48 ld [ %g1 + 0x148 ], %g1 ! 2016948 <rtems_libio_number_iops>
off_t lseek(
int fd,
off_t offset,
int whence
)
{
2014a08: 92 10 00 19 mov %i1, %o1
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
2014a0c: 80 a6 00 01 cmp %i0, %g1
2014a10: 1a 80 00 0e bcc 2014a48 <lseek+0x4c> <== NEVER TAKEN
2014a14: 94 10 00 1a mov %i2, %o2
iop = rtems_libio_iop( fd );
2014a18: 03 00 80 5d sethi %hi(0x2017400), %g1
2014a1c: c6 00 62 44 ld [ %g1 + 0x244 ], %g3 ! 2017644 <rtems_libio_iops>
2014a20: 85 2e 20 02 sll %i0, 2, %g2
2014a24: 83 2e 20 04 sll %i0, 4, %g1
2014a28: 82 20 40 02 sub %g1, %g2, %g1
2014a2c: 82 00 40 18 add %g1, %i0, %g1
2014a30: 83 28 60 02 sll %g1, 2, %g1
2014a34: b0 00 c0 01 add %g3, %g1, %i0
rtems_libio_check_is_open(iop);
2014a38: c2 06 20 0c ld [ %i0 + 0xc ], %g1
2014a3c: 80 88 61 00 btst 0x100, %g1
2014a40: 32 80 00 06 bne,a 2014a58 <lseek+0x5c> <== ALWAYS TAKEN
2014a44: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
2014a48: 7f ff e1 93 call 200d094 <__errno> <== NOT EXECUTED
2014a4c: 01 00 00 00 nop <== NOT EXECUTED
2014a50: 10 80 00 1c b 2014ac0 <lseek+0xc4> <== NOT EXECUTED
2014a54: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9> <== NOT EXECUTED
/*
* Check as many errors as possible before touching iop->offset.
*/
if ( !iop->handlers->lseek_h )
2014a58: c2 00 60 14 ld [ %g1 + 0x14 ], %g1
2014a5c: 80 a0 60 00 cmp %g1, 0
2014a60: 12 80 00 06 bne 2014a78 <lseek+0x7c> <== ALWAYS TAKEN
2014a64: 80 a6 a0 01 cmp %i2, 1
rtems_set_errno_and_return_minus_one( ENOTSUP );
2014a68: 7f ff e1 8b call 200d094 <__errno> <== NOT EXECUTED
2014a6c: 01 00 00 00 nop <== NOT EXECUTED
2014a70: 10 80 00 14 b 2014ac0 <lseek+0xc4> <== NOT EXECUTED
2014a74: 82 10 20 86 mov 0x86, %g1 ! 86 <PROM_START+0x86> <== NOT EXECUTED
/*
* Now process the lseek().
*/
old_offset = iop->offset;
switch ( whence ) {
2014a78: 02 80 00 09 be 2014a9c <lseek+0xa0>
2014a7c: f4 06 20 08 ld [ %i0 + 8 ], %i2
2014a80: 80 a2 a0 02 cmp %o2, 2
2014a84: 02 80 00 08 be 2014aa4 <lseek+0xa8>
2014a88: 80 a2 a0 00 cmp %o2, 0
2014a8c: 12 80 00 0a bne 2014ab4 <lseek+0xb8>
2014a90: 01 00 00 00 nop
case SEEK_SET:
iop->offset = offset;
2014a94: 10 80 00 0e b 2014acc <lseek+0xd0>
2014a98: f2 26 20 08 st %i1, [ %i0 + 8 ]
break;
case SEEK_CUR:
iop->offset += offset;
2014a9c: 10 80 00 04 b 2014aac <lseek+0xb0>
2014aa0: 82 06 40 1a add %i1, %i2, %g1
break;
case SEEK_END:
iop->offset = iop->size + offset;
2014aa4: c2 06 20 04 ld [ %i0 + 4 ], %g1
2014aa8: 82 06 40 01 add %i1, %g1, %g1
2014aac: 10 80 00 08 b 2014acc <lseek+0xd0>
2014ab0: c2 26 20 08 st %g1, [ %i0 + 8 ]
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
2014ab4: 7f ff e1 78 call 200d094 <__errno>
2014ab8: 01 00 00 00 nop
2014abc: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
2014ac0: c2 22 00 00 st %g1, [ %o0 ]
2014ac4: 10 80 00 09 b 2014ae8 <lseek+0xec>
2014ac8: 90 10 3f ff mov -1, %o0
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
2014acc: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
2014ad0: c2 00 60 14 ld [ %g1 + 0x14 ], %g1
2014ad4: 9f c0 40 00 call %g1
2014ad8: 90 10 00 18 mov %i0, %o0
if ( status == (off_t) -1 )
2014adc: 80 a2 3f ff cmp %o0, -1
2014ae0: 22 80 00 02 be,a 2014ae8 <lseek+0xec>
2014ae4: f4 26 20 08 st %i2, [ %i0 + 8 ]
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
2014ae8: 81 c7 e0 08 ret
2014aec: 91 e8 00 08 restore %g0, %o0, %o0
0200a7f4 <malloc>:
size_t size
)
{
void *return_this;
MSBUMP(malloc_calls, 1);
200a7f4: 9d e3 bf 98 save %sp, -104, %sp
200a7f8: 05 00 80 5d sethi %hi(0x2017400), %g2
200a7fc: 84 10 a2 a8 or %g2, 0x2a8, %g2 ! 20176a8 <rtems_malloc_statistics>
200a800: c2 00 a0 04 ld [ %g2 + 4 ], %g1
200a804: a0 10 00 18 mov %i0, %l0
200a808: 82 00 60 01 inc %g1
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
200a80c: 7f ff ff ed call 200a7c0 <malloc_deferred_frees_process>
200a810: c2 20 a0 04 st %g1, [ %g2 + 4 ]
/*
* Validate the parameters
*/
if ( !size )
200a814: 80 a6 20 00 cmp %i0, 0
200a818: 02 80 00 33 be 200a8e4 <malloc+0xf0>
200a81c: 03 00 80 5e sethi %hi(0x2017800), %g1
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
200a820: c2 00 61 c4 ld [ %g1 + 0x1c4 ], %g1 ! 20179c4 <_System_state_Current>
200a824: 80 a0 60 03 cmp %g1, 3
200a828: 12 80 00 07 bne 200a844 <malloc+0x50>
200a82c: 11 00 80 5d sethi %hi(0x2017400), %o0
200a830: 7f ff ff ca call 200a758 <malloc_is_system_state_OK>
200a834: 01 00 00 00 nop
200a838: 80 8a 20 ff btst 0xff, %o0
200a83c: 02 80 00 2a be 200a8e4 <malloc+0xf0> <== NEVER TAKEN
200a840: 11 00 80 5d sethi %hi(0x2017400), %o0
* Try to give a segment in the current heap if there is not
* enough space then try to grow the heap.
* If this fails then return a NULL pointer.
*/
return_this = _Protected_heap_Allocate( &RTEMS_Malloc_Heap, size );
200a844: 92 10 00 10 mov %l0, %o1
200a848: 40 00 05 0a call 200bc70 <_Protected_heap_Allocate>
200a84c: 90 12 22 50 or %o0, 0x250, %o0
if ( !return_this ) {
200a850: b0 92 20 00 orcc %o0, 0, %i0
200a854: 12 80 00 14 bne 200a8a4 <malloc+0xb0> <== ALWAYS TAKEN
200a858: 03 00 80 5c sethi %hi(0x2017000), %g1
if (rtems_malloc_sbrk_helpers)
200a85c: 03 00 80 5c sethi %hi(0x2017000), %g1 <== NOT EXECUTED
200a860: c2 00 63 a8 ld [ %g1 + 0x3a8 ], %g1 ! 20173a8 <rtems_malloc_sbrk_helpers><== NOT EXECUTED
200a864: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200a868: 02 80 00 08 be 200a888 <malloc+0x94> <== NOT EXECUTED
200a86c: 01 00 00 00 nop <== NOT EXECUTED
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
200a870: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED
200a874: 9f c0 40 00 call %g1 <== NOT EXECUTED
200a878: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
if ( !return_this ) {
200a87c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200a880: 32 80 00 08 bne,a 200a8a0 <malloc+0xac> <== NOT EXECUTED
200a884: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
errno = ENOMEM;
200a888: 40 00 0a 03 call 200d094 <__errno> <== NOT EXECUTED
200a88c: 01 00 00 00 nop <== NOT EXECUTED
200a890: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc> <== NOT EXECUTED
200a894: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200a898: 81 c7 e0 08 ret <== NOT EXECUTED
200a89c: 81 e8 00 00 restore <== NOT EXECUTED
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
200a8a0: 03 00 80 5c sethi %hi(0x2017000), %g1 <== NOT EXECUTED
200a8a4: c2 00 63 ac ld [ %g1 + 0x3ac ], %g1 ! 20173ac <rtems_malloc_dirty_helper>
200a8a8: 80 a0 60 00 cmp %g1, 0
200a8ac: 02 80 00 04 be 200a8bc <malloc+0xc8> <== ALWAYS TAKEN
200a8b0: 92 10 00 10 mov %l0, %o1
(*rtems_malloc_dirty_helper)( return_this, size );
200a8b4: 9f c0 40 00 call %g1 <== NOT EXECUTED
200a8b8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
200a8bc: 03 00 80 5c sethi %hi(0x2017000), %g1
200a8c0: c2 00 63 a4 ld [ %g1 + 0x3a4 ], %g1 ! 20173a4 <rtems_malloc_statistics_helpers>
200a8c4: 80 a0 60 00 cmp %g1, 0
200a8c8: 02 80 00 08 be 200a8e8 <malloc+0xf4> <== ALWAYS TAKEN
200a8cc: 01 00 00 00 nop
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
200a8d0: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED
200a8d4: 9f c0 40 00 call %g1 <== NOT EXECUTED
200a8d8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
200a8dc: 81 c7 e0 08 ret <== NOT EXECUTED
200a8e0: 81 e8 00 00 restore <== NOT EXECUTED
200a8e4: b0 10 20 00 clr %i0
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
return return_this;
}
200a8e8: 81 c7 e0 08 ret
200a8ec: 81 e8 00 00 restore
0200a7a4 <malloc_deferred_free>:
}
void malloc_deferred_free(
void *pointer
)
{
200a7a4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
200a7a8: 11 00 80 5f sethi %hi(0x2017c00), %o0 <== NOT EXECUTED
200a7ac: 90 12 21 d8 or %o0, 0x1d8, %o0 ! 2017dd8 <RTEMS_Malloc_GC_list><== NOT EXECUTED
200a7b0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
200a7b4: 7f ff ee 02 call 2005fbc <_Chain_Append> <== NOT EXECUTED
200a7b8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
0200a7c0 <malloc_deferred_frees_process>:
{
rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list);
}
void malloc_deferred_frees_process(void)
{
200a7c0: 9d e3 bf 98 save %sp, -104, %sp
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
200a7c4: 03 00 80 5f sethi %hi(0x2017c00), %g1
200a7c8: 10 80 00 04 b 200a7d8 <malloc_deferred_frees_process+0x18>
200a7cc: a0 10 61 d8 or %g1, 0x1d8, %l0 ! 2017dd8 <RTEMS_Malloc_GC_list>
/*
* If some free's have been deferred, then do them now.
*/
while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL)
free(to_be_freed);
200a7d0: 7f ff fe a1 call 200a254 <free> <== NOT EXECUTED
200a7d4: 01 00 00 00 nop <== NOT EXECUTED
200a7d8: 40 00 03 e9 call 200b77c <_Chain_Get>
200a7dc: 90 10 00 10 mov %l0, %o0
rtems_chain_node *to_be_freed;
/*
* If some free's have been deferred, then do them now.
*/
while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL)
200a7e0: 80 a2 20 00 cmp %o0, 0
200a7e4: 12 bf ff fb bne 200a7d0 <malloc_deferred_frees_process+0x10><== NEVER TAKEN
200a7e8: 01 00 00 00 nop
free(to_be_freed);
}
200a7ec: 81 c7 e0 08 ret
200a7f0: 81 e8 00 00 restore
0200a758 <malloc_is_system_state_OK>:
rtems_chain_control RTEMS_Malloc_GC_list;
bool malloc_is_system_state_OK(void)
{
if ( _Thread_Dispatch_disable_level > 0 )
200a758: 03 00 80 5e sethi %hi(0x2017800), %g1
200a75c: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 ! 2017820 <_Thread_Dispatch_disable_level>
200a760: 80 a0 60 00 cmp %g1, 0
200a764: 12 80 00 07 bne 200a780 <malloc_is_system_state_OK+0x28> <== NEVER TAKEN
200a768: 90 10 20 00 clr %o0
return false;
if ( _ISR_Nest_level > 0 )
200a76c: 03 00 80 5e sethi %hi(0x2017800), %g1
200a770: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1 ! 20178c0 <_ISR_Nest_level>
200a774: 80 a0 00 01 cmp %g0, %g1
200a778: 82 60 3f ff subx %g0, -1, %g1
200a77c: 90 10 00 01 mov %g1, %o0
return false;
return true;
}
200a780: 81 c3 e0 08 retl
0200daec <memfile_alloc_block>:
*/
int memfile_blocks_allocated = 0;
void *memfile_alloc_block(void)
{
200daec: 9d e3 bf 98 save %sp, -104, %sp
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
200daf0: 03 00 80 5c sethi %hi(0x2017000), %g1
200daf4: d2 00 61 9c ld [ %g1 + 0x19c ], %o1 ! 201719c <imfs_memfile_bytes_per_block>
200daf8: 7f ff d4 67 call 2002c94 <calloc>
200dafc: 90 10 20 01 mov 1, %o0
if ( memory )
200db00: 80 a2 20 00 cmp %o0, 0
200db04: 02 80 00 05 be 200db18 <memfile_alloc_block+0x2c> <== NEVER TAKEN
200db08: 05 00 80 5c sethi %hi(0x2017000), %g2
memfile_blocks_allocated++;
200db0c: c2 00 a2 a8 ld [ %g2 + 0x2a8 ], %g1 ! 20172a8 <memfile_blocks_allocated>
200db10: 82 00 60 01 inc %g1
200db14: c2 20 a2 a8 st %g1, [ %g2 + 0x2a8 ]
return memory;
}
200db18: 81 c7 e0 08 ret
200db1c: 91 e8 00 08 restore %g0, %o0, %o0
0200dff0 <memfile_check_rmnod>:
return memfile_check_rmnod( the_jnode );
}
int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){
200dff0: 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) ) {
200dff4: 7f ff d6 12 call 200383c <rtems_libio_is_file_open>
200dff8: 90 10 00 18 mov %i0, %o0
200dffc: 80 a2 20 00 cmp %o0, 0
200e000: 12 80 00 13 bne 200e04c <memfile_check_rmnod+0x5c>
200e004: 01 00 00 00 nop
200e008: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1
200e00c: 80 a0 60 00 cmp %g1, 0
200e010: 12 80 00 0f bne 200e04c <memfile_check_rmnod+0x5c> <== NEVER TAKEN
200e014: 03 00 80 5b sethi %hi(0x2016c00), %g1
/*
* Is the rtems_filesystem_current is this node?
*/
if ( rtems_filesystem_current.node_access == the_jnode )
200e018: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 ! 2016c24 <rtems_current_user_env>
200e01c: c2 00 a0 04 ld [ %g2 + 4 ], %g1
200e020: 80 a0 40 18 cmp %g1, %i0
200e024: 22 80 00 02 be,a 200e02c <memfile_check_rmnod+0x3c> <== NEVER TAKEN
200e028: c0 20 a0 04 clr [ %g2 + 4 ] <== NOT EXECUTED
rtems_filesystem_current.node_access = NULL;
/*
* Free memory associated with a memory file.
*/
if (the_jnode->type != IMFS_LINEAR_FILE)
200e02c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
200e030: 80 a0 60 06 cmp %g1, 6
200e034: 02 80 00 04 be 200e044 <memfile_check_rmnod+0x54> <== NEVER TAKEN
200e038: 01 00 00 00 nop
IMFS_memfile_remove( the_jnode );
200e03c: 7f ff ff 8c call 200de6c <IMFS_memfile_remove>
200e040: 90 10 00 18 mov %i0, %o0
free( the_jnode );
200e044: 7f ff d5 0b call 2003470 <free>
200e048: 90 10 00 18 mov %i0, %o0
}
return 0;
}
200e04c: 81 c7 e0 08 ret
200e050: 91 e8 20 00 restore %g0, 0, %o0
0200ddf8 <memfile_free_blocks_in_table>:
void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
200ddf8: 9d e3 bf 98 save %sp, -104, %sp
/*
* Perform internal consistency checks
*/
assert( block_table );
200ddfc: 80 a6 20 00 cmp %i0, 0
200de00: 32 80 00 0a bne,a 200de28 <memfile_free_blocks_in_table+0x30><== ALWAYS TAKEN
200de04: e0 06 00 00 ld [ %i0 ], %l0
200de08: 11 00 80 57 sethi %hi(0x2015c00), %o0 <== NOT EXECUTED
200de0c: 15 00 80 58 sethi %hi(0x2016000), %o2 <== NOT EXECUTED
200de10: 17 00 80 57 sethi %hi(0x2015c00), %o3 <== NOT EXECUTED
200de14: 90 12 23 48 or %o0, 0x348, %o0 <== NOT EXECUTED
200de18: 94 12 a0 e8 or %o2, 0xe8, %o2 <== NOT EXECUTED
200de1c: 96 12 e3 d0 or %o3, 0x3d0, %o3 <== NOT EXECUTED
200de20: 7f ff d3 85 call 2002c34 <__assert_func> <== NOT EXECUTED
200de24: 92 10 21 b1 mov 0x1b1, %o1 <== NOT EXECUTED
200de28: 10 80 00 09 b 200de4c <memfile_free_blocks_in_table+0x54>
200de2c: a2 10 20 00 clr %l1
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
if ( b[i] ) {
200de30: 80 a2 20 00 cmp %o0, 0
200de34: 02 80 00 05 be 200de48 <memfile_free_blocks_in_table+0x50>
200de38: a2 04 60 01 inc %l1
memfile_free_block( b[i] );
200de3c: 7f ff ff 23 call 200dac8 <memfile_free_block>
200de40: 01 00 00 00 nop
b[i] = 0;
200de44: c0 24 00 00 clr [ %l0 ]
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
200de48: a0 04 20 04 add %l0, 4, %l0
200de4c: 80 a4 40 19 cmp %l1, %i1
200de50: 26 bf ff f8 bl,a 200de30 <memfile_free_blocks_in_table+0x38>
200de54: d0 04 00 00 ld [ %l0 ], %o0
/*
* Now that all the blocks in the block table are free, we can
* free the block table itself.
*/
memfile_free_block( *block_table );
200de58: 7f ff ff 1c call 200dac8 <memfile_free_block>
200de5c: d0 06 00 00 ld [ %i0 ], %o0
*block_table = 0;
200de60: c0 26 00 00 clr [ %i0 ]
}
200de64: 81 c7 e0 08 ret
200de68: 81 e8 00 00 restore
0200e2bc <memfile_ftruncate>:
int memfile_ftruncate(
rtems_libio_t *iop,
off_t length
)
{
200e2bc: 9d e3 bf 90 save %sp, -112, %sp
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
200e2c0: 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 )
200e2c4: c2 04 20 4c ld [ %l0 + 0x4c ], %g1
200e2c8: 80 a6 40 01 cmp %i1, %g1
200e2cc: 04 80 00 06 ble 200e2e4 <memfile_ftruncate+0x28> <== ALWAYS TAKEN
200e2d0: 92 10 00 19 mov %i1, %o1
return IMFS_memfile_extend( the_jnode, length );
200e2d4: 7f ff ff a9 call 200e178 <IMFS_memfile_extend> <== NOT EXECUTED
200e2d8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
iop->size = the_jnode->info.file.size;
IMFS_update_atime( the_jnode );
return 0;
}
200e2dc: 81 c7 e0 08 ret <== NOT EXECUTED
200e2e0: 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;
200e2e4: f2 24 20 4c st %i1, [ %l0 + 0x4c ]
iop->size = the_jnode->info.file.size;
200e2e8: f2 26 20 04 st %i1, [ %i0 + 4 ]
IMFS_update_atime( the_jnode );
200e2ec: 90 07 bf f0 add %fp, -16, %o0
200e2f0: 7f ff d4 ea call 2003698 <gettimeofday>
200e2f4: 92 10 20 00 clr %o1
200e2f8: c2 07 bf f0 ld [ %fp + -16 ], %g1
200e2fc: 90 10 20 00 clr %o0
200e300: c2 24 20 3c st %g1, [ %l0 + 0x3c ]
return 0;
}
200e304: b0 10 00 08 mov %o0, %i0
200e308: 81 c7 e0 08 ret
200e30c: 81 e8 00 00 restore
0200e310 <memfile_lseek>:
off_t memfile_lseek(
rtems_libio_t *iop,
off_t offset,
int whence
)
{
200e310: 9d e3 bf 98 save %sp, -104, %sp
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
200e314: e0 06 20 2c ld [ %i0 + 0x2c ], %l0
if (the_jnode->type == IMFS_LINEAR_FILE) {
200e318: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
200e31c: 80 a0 60 06 cmp %g1, 6
200e320: 12 80 00 09 bne 200e344 <memfile_lseek+0x34> <== ALWAYS TAKEN
200e324: d2 06 20 08 ld [ %i0 + 8 ], %o1
if (iop->offset > the_jnode->info.linearfile.size)
200e328: d0 04 20 4c ld [ %l0 + 0x4c ], %o0 <== NOT EXECUTED
200e32c: 80 a2 40 08 cmp %o1, %o0 <== NOT EXECUTED
200e330: 34 80 00 11 bg,a 200e374 <memfile_lseek+0x64> <== NOT EXECUTED
200e334: d0 26 20 08 st %o0, [ %i0 + 8 ] <== NOT EXECUTED
200e338: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED
200e33c: 81 c7 e0 08 ret <== NOT EXECUTED
200e340: 81 e8 00 00 restore <== NOT EXECUTED
iop->offset = the_jnode->info.linearfile.size;
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
200e344: 7f ff ff 8d call 200e178 <IMFS_memfile_extend>
200e348: 90 10 00 10 mov %l0, %o0
200e34c: 80 a2 20 00 cmp %o0, 0
200e350: 22 80 00 08 be,a 200e370 <memfile_lseek+0x60> <== ALWAYS TAKEN
200e354: c2 04 20 4c ld [ %l0 + 0x4c ], %g1
rtems_set_errno_and_return_minus_one( ENOSPC );
200e358: 40 00 05 39 call 200f83c <__errno> <== NOT EXECUTED
200e35c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200e360: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED
200e364: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200e368: 81 c7 e0 08 ret <== NOT EXECUTED
200e36c: 81 e8 00 00 restore <== NOT EXECUTED
iop->size = the_jnode->info.file.size;
200e370: c2 26 20 04 st %g1, [ %i0 + 4 ]
}
return iop->offset;
200e374: f0 06 20 08 ld [ %i0 + 8 ], %i0
}
200e378: 81 c7 e0 08 ret
200e37c: 81 e8 00 00 restore
0200e618 <memfile_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
200e618: 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))
200e61c: c2 06 20 0c ld [ %i0 + 0xc ], %g1
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
200e620: 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))
200e624: 80 88 62 04 btst 0x204, %g1
200e628: 02 80 00 17 be 200e684 <memfile_open+0x6c>
200e62c: e0 06 20 2c ld [ %i0 + 0x2c ], %l0
200e630: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
200e634: 80 a0 60 06 cmp %g1, 6
200e638: 32 80 00 14 bne,a 200e688 <memfile_open+0x70> <== ALWAYS TAKEN
200e63c: c2 04 60 0c ld [ %l1 + 0xc ], %g1
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
uint32_t count = the_jnode->info.linearfile.size;
200e640: d6 04 20 4c ld [ %l0 + 0x4c ], %o3 <== NOT EXECUTED
const unsigned char *buffer = the_jnode->info.linearfile.direct;
200e644: d4 04 20 50 ld [ %l0 + 0x50 ], %o2 <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
200e648: 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;
200e64c: 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;
200e650: 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;
200e654: 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;
200e658: 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)
200e65c: 80 a2 e0 00 cmp %o3, 0 <== NOT EXECUTED
200e660: 02 80 00 09 be 200e684 <memfile_open+0x6c> <== NOT EXECUTED
200e664: c2 24 20 48 st %g1, [ %l0 + 0x48 ] <== NOT EXECUTED
200e668: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
200e66c: 92 10 20 00 clr %o1 <== NOT EXECUTED
200e670: 7f ff ff 44 call 200e380 <IMFS_memfile_write> <== NOT EXECUTED
200e674: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200e678: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED
200e67c: 02 80 00 0a be 200e6a4 <memfile_open+0x8c> <== NOT EXECUTED
200e680: 01 00 00 00 nop <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
200e684: c2 04 60 0c ld [ %l1 + 0xc ], %g1
200e688: 80 88 62 00 btst 0x200, %g1
200e68c: 02 80 00 04 be 200e69c <memfile_open+0x84>
200e690: c2 04 20 4c ld [ %l0 + 0x4c ], %g1
iop->offset = the_jnode->info.file.size;
200e694: c2 24 60 08 st %g1, [ %l1 + 8 ]
iop->size = the_jnode->info.file.size;
200e698: c2 04 20 4c ld [ %l0 + 0x4c ], %g1
200e69c: b0 10 20 00 clr %i0
200e6a0: c2 24 60 04 st %g1, [ %l1 + 4 ]
return 0;
}
200e6a4: 81 c7 e0 08 ret
200e6a8: 81 e8 00 00 restore
0200e054 <memfile_rmnod>:
*/
int memfile_rmnod(
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
200e054: 9d e3 bf 90 save %sp, -112, %sp
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
200e058: 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 ) {
200e05c: c2 06 20 08 ld [ %i0 + 8 ], %g1
200e060: 80 a0 60 00 cmp %g1, 0
200e064: 22 80 00 06 be,a 200e07c <memfile_rmnod+0x28> <== NEVER TAKEN
200e068: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 <== NOT EXECUTED
200e06c: 7f ff fb fb call 200d058 <_Chain_Extract>
200e070: 90 10 00 18 mov %i0, %o0
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
200e074: c0 26 20 08 clr [ %i0 + 8 ]
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
200e078: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1
IMFS_update_ctime( the_jnode );
200e07c: 92 10 20 00 clr %o1
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
200e080: 82 00 7f ff add %g1, -1, %g1
IMFS_update_ctime( the_jnode );
200e084: 90 07 bf f0 add %fp, -16, %o0
200e088: 7f ff d5 84 call 2003698 <gettimeofday>
200e08c: c2 36 20 30 sth %g1, [ %i0 + 0x30 ]
200e090: c2 07 bf f0 ld [ %fp + -16 ], %g1
return memfile_check_rmnod( the_jnode );
200e094: 90 10 00 18 mov %i0, %o0
200e098: 7f ff ff d6 call 200dff0 <memfile_check_rmnod>
200e09c: c2 26 20 44 st %g1, [ %i0 + 0x44 ]
}
200e0a0: 81 c7 e0 08 ret
200e0a4: 91 e8 00 08 restore %g0, %o0, %o0
0200229c <mknod>:
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
200229c: 9d e3 bf 80 save %sp, -128, %sp
int result;
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & S_IFMT) {
20022a0: 03 00 00 3c sethi %hi(0xf000), %g1
20022a4: b3 2e 60 10 sll %i1, 0x10, %i1
20022a8: b3 36 60 10 srl %i1, 0x10, %i1
20022ac: 84 0e 40 01 and %i1, %g1, %g2
20022b0: 03 00 00 10 sethi %hi(0x4000), %g1
20022b4: 80 a0 80 01 cmp %g2, %g1
20022b8: 02 80 00 15 be 200230c <mknod+0x70>
20022bc: 03 00 00 04 sethi %hi(0x1000), %g1
20022c0: 14 80 00 08 bg 20022e0 <mknod+0x44>
20022c4: 03 00 00 18 sethi %hi(0x6000), %g1
20022c8: 03 00 00 04 sethi %hi(0x1000), %g1
20022cc: 80 a0 80 01 cmp %g2, %g1
20022d0: 02 80 00 0e be 2002308 <mknod+0x6c>
20022d4: 03 00 00 08 sethi %hi(0x2000), %g1
20022d8: 10 80 00 06 b 20022f0 <mknod+0x54>
20022dc: 80 a0 80 01 cmp %g2, %g1
20022e0: 80 a0 80 01 cmp %g2, %g1
20022e4: 02 80 00 09 be 2002308 <mknod+0x6c> <== NEVER TAKEN
20022e8: 03 00 00 20 sethi %hi(0x8000), %g1
20022ec: 80 a0 80 01 cmp %g2, %g1
20022f0: 22 80 00 07 be,a 200230c <mknod+0x70> <== ALWAYS TAKEN
20022f4: 03 00 00 04 sethi %hi(0x1000), %g1
case S_IFBLK:
case S_IFREG:
case S_IFIFO:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
20022f8: 40 00 2b 67 call 200d094 <__errno> <== NOT EXECUTED
20022fc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2002300: 10 80 00 37 b 20023dc <mknod+0x140> <== NOT EXECUTED
2002304: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
}
if ( S_ISFIFO(mode) )
2002308: 03 00 00 04 sethi %hi(0x1000), %g1
200230c: 80 a0 80 01 cmp %g2, %g1
2002310: 02 80 00 30 be 20023d0 <mknod+0x134>
2002314: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOTSUP );
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
2002318: c2 4e 00 00 ldsb [ %i0 ], %g1
200231c: 80 a0 60 2f cmp %g1, 0x2f
2002320: 02 80 00 06 be 2002338 <mknod+0x9c>
2002324: 80 a0 60 5c cmp %g1, 0x5c
2002328: 02 80 00 04 be 2002338 <mknod+0x9c> <== NEVER TAKEN
200232c: 80 a0 60 00 cmp %g1, 0
2002330: 12 80 00 0a bne 2002358 <mknod+0xbc> <== ALWAYS TAKEN
2002334: 03 00 80 5b sethi %hi(0x2016c00), %g1
2002338: 03 00 80 5b sethi %hi(0x2016c00), %g1
200233c: d2 00 62 64 ld [ %g1 + 0x264 ], %o1 ! 2016e64 <rtems_current_user_env>
2002340: 90 07 bf e4 add %fp, -28, %o0
2002344: 92 02 60 14 add %o1, 0x14, %o1
2002348: 40 00 2d 45 call 200d85c <memcpy>
200234c: 94 10 20 10 mov 0x10, %o2
2002350: 10 80 00 08 b 2002370 <mknod+0xd4>
2002354: 84 10 20 01 mov 1, %g2
2002358: d2 00 62 64 ld [ %g1 + 0x264 ], %o1
200235c: 90 07 bf e4 add %fp, -28, %o0
2002360: 92 02 60 04 add %o1, 4, %o1
2002364: 40 00 2d 3e call 200d85c <memcpy>
2002368: 94 10 20 10 mov 0x10, %o2
200236c: 84 10 20 00 clr %g2
if ( !temp_loc.ops->evalformake_h ) {
2002370: c2 07 bf ec ld [ %fp + -20 ], %g1
2002374: c2 00 60 04 ld [ %g1 + 4 ], %g1
2002378: 80 a0 60 00 cmp %g1, 0
200237c: 02 80 00 15 be 20023d0 <mknod+0x134> <== NEVER TAKEN
2002380: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->evalformake_h)(
2002384: 90 06 00 02 add %i0, %g2, %o0
2002388: a0 07 bf e4 add %fp, -28, %l0
200238c: 94 07 bf f4 add %fp, -12, %o2
2002390: 92 10 00 10 mov %l0, %o1
2002394: 9f c0 40 00 call %g1
2002398: b0 10 3f ff mov -1, %i0
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
200239c: 80 a2 20 00 cmp %o0, 0
20023a0: 12 80 00 10 bne 20023e0 <mknod+0x144>
20023a4: c2 07 bf ec ld [ %fp + -20 ], %g1
return -1;
if ( !temp_loc.ops->mknod_h ) {
20023a8: c4 00 60 14 ld [ %g1 + 0x14 ], %g2
20023ac: 80 a0 a0 00 cmp %g2, 0
20023b0: 12 80 00 0e bne 20023e8 <mknod+0x14c> <== ALWAYS TAKEN
20023b4: d0 07 bf f4 ld [ %fp + -12 ], %o0
rtems_filesystem_freenode( &temp_loc );
20023b8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
20023bc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20023c0: 02 80 00 04 be 20023d0 <mknod+0x134> <== NOT EXECUTED
20023c4: 01 00 00 00 nop <== NOT EXECUTED
20023c8: 9f c0 40 00 call %g1 <== NOT EXECUTED
20023cc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
20023d0: 40 00 2b 31 call 200d094 <__errno>
20023d4: b0 10 3f ff mov -1, %i0
20023d8: 82 10 20 86 mov 0x86, %g1
20023dc: c2 22 00 00 st %g1, [ %o0 ]
20023e0: 81 c7 e0 08 ret
20023e4: 81 e8 00 00 restore
}
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
20023e8: 92 10 00 19 mov %i1, %o1
20023ec: 94 10 00 1a mov %i2, %o2
20023f0: 96 10 00 1b mov %i3, %o3
20023f4: 9f c0 80 00 call %g2
20023f8: 98 10 00 10 mov %l0, %o4
rtems_filesystem_freenode( &temp_loc );
20023fc: c2 07 bf ec ld [ %fp + -20 ], %g1
2002400: 80 a0 60 00 cmp %g1, 0
2002404: 02 bf ff f7 be 20023e0 <mknod+0x144> <== NEVER TAKEN
2002408: b0 10 00 08 mov %o0, %i0
200240c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2002410: 80 a0 60 00 cmp %g1, 0
2002414: 02 80 00 04 be 2002424 <mknod+0x188>
2002418: 01 00 00 00 nop
200241c: 9f c0 40 00 call %g1
2002420: 90 10 00 10 mov %l0, %o0
return result;
}
2002424: 81 c7 e0 08 ret
2002428: 81 e8 00 00 restore
0200a938 <mount>:
const rtems_filesystem_operations_table *fs_ops,
rtems_filesystem_options_t options,
const char *device,
const char *mount_point
)
{
200a938: 9d e3 bf 88 save %sp, -120, %sp
/*
* Is there a file system operations table?
*/
if ( fs_ops == NULL ) {
200a93c: 80 a6 60 00 cmp %i1, 0
200a940: 02 80 00 05 be 200a954 <mount+0x1c>
200a944: a4 10 00 18 mov %i0, %l2
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
200a948: 80 a6 a0 01 cmp %i2, 1
200a94c: 28 80 00 06 bleu,a 200a964 <mount+0x2c>
200a950: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
options != RTEMS_FILESYSTEM_READ_WRITE ) {
errno = EINVAL;
200a954: 40 00 09 d0 call 200d094 <__errno>
200a958: 01 00 00 00 nop
200a95c: 10 80 00 15 b 200a9b0 <mount+0x78>
200a960: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
return -1;
}
/* Do they support being mounted at all ? */
if ( !fs_ops->fsmount_me_h ) {
200a964: 80 a0 60 00 cmp %g1, 0
200a968: 12 80 00 05 bne 200a97c <mount+0x44> <== ALWAYS TAKEN
200a96c: 80 a6 e0 00 cmp %i3, 0
errno = ENOTSUP;
200a970: a2 10 20 00 clr %l1 <== NOT EXECUTED
200a974: 10 80 00 47 b 200aa90 <mount+0x158> <== NOT EXECUTED
200a978: b8 10 20 00 clr %i4 <== NOT EXECUTED
/*
* Allocate a mount table entry
*/
size = sizeof(rtems_filesystem_mount_table_entry_t);
if ( device )
200a97c: 02 80 00 05 be 200a990 <mount+0x58> <== ALWAYS TAKEN
200a980: 90 10 20 64 mov 0x64, %o0
size += strlen( device ) + 1;
200a984: 40 00 0e e6 call 200e51c <strlen> <== NOT EXECUTED
200a988: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
200a98c: 90 02 20 65 add %o0, 0x65, %o0 <== NOT EXECUTED
temp_mt_entry = malloc( size );
200a990: 7f ff ff 99 call 200a7f4 <malloc>
200a994: 01 00 00 00 nop
if ( !temp_mt_entry ) {
200a998: a0 92 20 00 orcc %o0, 0, %l0
200a99c: 12 80 00 07 bne 200a9b8 <mount+0x80> <== ALWAYS TAKEN
200a9a0: a2 10 00 10 mov %l0, %l1
errno = ENOMEM;
200a9a4: 40 00 09 bc call 200d094 <__errno> <== NOT EXECUTED
200a9a8: 01 00 00 00 nop <== NOT EXECUTED
200a9ac: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc> <== NOT EXECUTED
200a9b0: 10 80 00 74 b 200ab80 <mount+0x248>
200a9b4: c2 22 00 00 st %g1, [ %o0 ]
return -1;
}
temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry;
temp_mt_entry->options = options;
200a9b8: f4 24 20 28 st %i2, [ %l0 + 0x28 ]
if ( device ) {
200a9bc: 80 a6 e0 00 cmp %i3, 0
200a9c0: 02 80 00 08 be 200a9e0 <mount+0xa8> <== ALWAYS TAKEN
200a9c4: e0 24 20 24 st %l0, [ %l0 + 0x24 ]
temp_mt_entry->dev =
200a9c8: 90 04 20 64 add %l0, 0x64, %o0 <== NOT EXECUTED
(char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t );
strcpy( temp_mt_entry->dev, device );
200a9cc: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
200a9d0: 40 00 0e b1 call 200e494 <strcpy> <== NOT EXECUTED
200a9d4: d0 24 20 60 st %o0, [ %l0 + 0x60 ] <== NOT EXECUTED
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( mount_point ) {
200a9d8: 10 80 00 04 b 200a9e8 <mount+0xb0> <== NOT EXECUTED
200a9dc: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
if ( device ) {
temp_mt_entry->dev =
(char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t );
strcpy( temp_mt_entry->dev, device );
} else
temp_mt_entry->dev = 0;
200a9e0: c0 24 20 60 clr [ %l0 + 0x60 ]
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( mount_point ) {
200a9e4: 80 a7 20 00 cmp %i4, 0
200a9e8: 02 80 00 37 be 200aac4 <mount+0x18c>
200a9ec: 90 10 00 1c mov %i4, %o0
if ( rtems_filesystem_evaluate_path(
200a9f0: 92 10 20 07 mov 7, %o1
200a9f4: b8 07 bf e8 add %fp, -24, %i4
200a9f8: 96 10 20 01 mov 1, %o3
200a9fc: 7f ff dd 78 call 2001fdc <rtems_filesystem_evaluate_path>
200aa00: 94 10 00 1c mov %i4, %o2
200aa04: 80 a2 3f ff cmp %o0, -1
200aa08: 02 80 00 4e be 200ab40 <mount+0x208> <== NEVER TAKEN
200aa0c: c2 07 bf f0 ld [ %fp + -16 ], %g1
/*
* Test for node_type_h
*/
if (!loc.ops->node_type_h) {
200aa10: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
200aa14: 80 a0 60 00 cmp %g1, 0
200aa18: 02 80 00 1e be 200aa90 <mount+0x158> <== NEVER TAKEN
200aa1c: 01 00 00 00 nop
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
200aa20: 9f c0 40 00 call %g1
200aa24: 90 10 00 1c mov %i4, %o0
200aa28: 80 a2 20 01 cmp %o0, 1
200aa2c: 02 80 00 07 be 200aa48 <mount+0x110>
200aa30: 03 00 80 5f sethi %hi(0x2017c00), %g1
errno = ENOTDIR;
200aa34: 40 00 09 98 call 200d094 <__errno>
200aa38: 01 00 00 00 nop
200aa3c: 82 10 20 14 mov 0x14, %g1 ! 14 <PROM_START+0x14>
200aa40: 10 80 00 41 b 200ab44 <mount+0x20c>
200aa44: c2 22 00 00 st %g1, [ %o0 ]
for ( the_node = rtems_filesystem_mount_table_control.first;
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
the_node = the_node->next ) {
the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node;
if ( the_mount_entry->mt_fs_root.node_access == loc->node_access )
200aa48: c8 07 bf e8 ld [ %fp + -24 ], %g4
/*
* For each mount table entry
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
200aa4c: c4 00 61 e4 ld [ %g1 + 0x1e4 ], %g2
200aa50: 82 10 61 e4 or %g1, 0x1e4, %g1
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
200aa54: 10 80 00 06 b 200aa6c <mount+0x134>
200aa58: 86 00 60 04 add %g1, 4, %g3
the_node = the_node->next ) {
the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node;
if ( the_mount_entry->mt_fs_root.node_access == loc->node_access )
200aa5c: 80 a0 40 04 cmp %g1, %g4
200aa60: 02 80 00 08 be 200aa80 <mount+0x148>
200aa64: 01 00 00 00 nop
* For each mount table entry
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
the_node = the_node->next ) {
200aa68: c4 00 80 00 ld [ %g2 ], %g2
/*
* For each mount table entry
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
200aa6c: 80 a0 80 03 cmp %g2, %g3
200aa70: 32 bf ff fb bne,a 200aa5c <mount+0x124>
200aa74: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1
* until the system is unmounted. It may be needed to correctly
* traverse the tree.
*/
temp_mt_entry->mt_point_node.node_access = loc.node_access;
temp_mt_entry->mt_point_node.handlers = loc.handlers;
200aa78: 10 80 00 45 b 200ab8c <mount+0x254>
200aa7c: c4 07 bf ec ld [ %fp + -20 ], %g2
/*
* You can only mount one file system onto a single mount point.
*/
if ( Is_node_fs_root( &loc ) ){
errno = EBUSY;
200aa80: 40 00 09 85 call 200d094 <__errno>
200aa84: b8 07 bf e8 add %fp, -24, %i4
200aa88: 10 bf ff ee b 200aa40 <mount+0x108>
200aa8c: 82 10 20 10 mov 0x10, %g1
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( !loc.ops->mount_h ){
errno = ENOTSUP;
200aa90: 40 00 09 81 call 200d094 <__errno> <== NOT EXECUTED
200aa94: 01 00 00 00 nop <== NOT EXECUTED
200aa98: 10 bf ff ea b 200aa40 <mount+0x108> <== NOT EXECUTED
200aa9c: 82 10 20 86 mov 0x86, %g1 ! 86 <PROM_START+0x86> <== NOT EXECUTED
goto cleanup_and_bail;
}
if ( loc.ops->mount_h( temp_mt_entry ) ) {
200aaa0: 9f c0 c0 00 call %g3
200aaa4: 90 10 00 10 mov %l0, %o0
200aaa8: 80 a2 20 00 cmp %o0, 0
200aaac: 02 80 00 04 be 200aabc <mount+0x184> <== ALWAYS TAKEN
200aab0: 90 07 bf e8 add %fp, -24, %o0
200aab4: 10 80 00 24 b 200ab44 <mount+0x20c> <== NOT EXECUTED
200aab8: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED
200aabc: 10 80 00 0a b 200aae4 <mount+0x1ac>
200aac0: b8 10 00 08 mov %o0, %i4
* This is a mount of the base file system --> The
* mt_point_node.node_access will be set to null to indicate that this
* is the root of the entire file system.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
200aac4: c0 24 20 18 clr [ %l0 + 0x18 ]
temp_mt_entry->mt_fs_root.handlers = NULL;
200aac8: c0 24 20 1c clr [ %l0 + 0x1c ]
temp_mt_entry->mt_fs_root.ops = NULL;
200aacc: c0 24 20 20 clr [ %l0 + 0x20 ]
temp_mt_entry->mt_point_node.node_access = NULL;
200aad0: c0 24 20 08 clr [ %l0 + 8 ]
temp_mt_entry->mt_point_node.handlers = NULL;
200aad4: c0 24 20 0c clr [ %l0 + 0xc ]
temp_mt_entry->mt_point_node.ops = NULL;
200aad8: c0 24 20 10 clr [ %l0 + 0x10 ]
temp_mt_entry->mt_point_node.mt_entry = NULL;
200aadc: c0 24 20 14 clr [ %l0 + 0x14 ]
200aae0: b8 10 20 00 clr %i4
}
if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) {
200aae4: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
200aae8: 9f c0 40 00 call %g1
200aaec: 90 10 00 10 mov %l0, %o0
200aaf0: 80 a2 20 00 cmp %o0, 0
200aaf4: 02 80 00 09 be 200ab18 <mount+0x1e0> <== ALWAYS TAKEN
200aaf8: c2 07 bf f0 ld [ %fp + -16 ], %g1
/* try to undo the mount operation */
if ( loc.ops->unmount_h ) {
200aafc: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 <== NOT EXECUTED
200ab00: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200ab04: 02 80 00 10 be 200ab44 <mount+0x20c> <== NOT EXECUTED
200ab08: 01 00 00 00 nop <== NOT EXECUTED
loc.ops->unmount_h( temp_mt_entry );
200ab0c: 9f c0 40 00 call %g1 <== NOT EXECUTED
200ab10: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
200ab14: 30 80 00 0c b,a 200ab44 <mount+0x20c> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
200ab18: 11 00 80 5f sethi %hi(0x2017c00), %o0
200ab1c: 92 10 00 10 mov %l0, %o1
200ab20: 7f ff ed 27 call 2005fbc <_Chain_Append>
200ab24: 90 12 21 e4 or %o0, 0x1e4, %o0
*/
rtems_chain_append( &rtems_filesystem_mount_table_control,
&temp_mt_entry->Node );
if ( mt_entry )
200ab28: 80 a4 a0 00 cmp %l2, 0
200ab2c: 02 80 00 03 be 200ab38 <mount+0x200> <== NEVER TAKEN
200ab30: b0 10 20 00 clr %i0
*mt_entry = temp_mt_entry;
200ab34: e0 24 80 00 st %l0, [ %l2 ]
200ab38: 81 c7 e0 08 ret
200ab3c: 81 e8 00 00 restore
200ab40: b8 10 20 00 clr %i4 <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( temp_mt_entry );
200ab44: 7f ff fd c4 call 200a254 <free>
200ab48: 90 10 00 11 mov %l1, %o0
if ( loc_to_free )
200ab4c: 80 a7 20 00 cmp %i4, 0
200ab50: 02 bf ff fa be 200ab38 <mount+0x200> <== NEVER TAKEN
200ab54: b0 10 3f ff mov -1, %i0
rtems_filesystem_freenode( loc_to_free );
200ab58: c2 07 20 08 ld [ %i4 + 8 ], %g1
200ab5c: 80 a0 60 00 cmp %g1, 0
200ab60: 02 80 00 09 be 200ab84 <mount+0x24c> <== NEVER TAKEN
200ab64: 01 00 00 00 nop
200ab68: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
200ab6c: 80 a0 60 00 cmp %g1, 0
200ab70: 02 80 00 05 be 200ab84 <mount+0x24c> <== NEVER TAKEN
200ab74: 01 00 00 00 nop
200ab78: 9f c0 40 00 call %g1
200ab7c: 90 10 00 1c mov %i4, %o0
200ab80: b0 10 3f ff mov -1, %i0
return -1;
}
200ab84: 81 c7 e0 08 ret
200ab88: 81 e8 00 00 restore
* traverse the tree.
*/
temp_mt_entry->mt_point_node.node_access = loc.node_access;
temp_mt_entry->mt_point_node.handlers = loc.handlers;
temp_mt_entry->mt_point_node.ops = loc.ops;
200ab8c: c2 07 bf f0 ld [ %fp + -16 ], %g1
* until the system is unmounted. It may be needed to correctly
* traverse the tree.
*/
temp_mt_entry->mt_point_node.node_access = loc.node_access;
temp_mt_entry->mt_point_node.handlers = loc.handlers;
200ab90: c4 24 20 0c st %g2, [ %l0 + 0xc ]
temp_mt_entry->mt_point_node.ops = loc.ops;
temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry;
200ab94: c4 07 bf f4 ld [ %fp + -12 ], %g2
/*
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( !loc.ops->mount_h ){
200ab98: c6 00 60 20 ld [ %g1 + 0x20 ], %g3
* may have been allocated in loc should not be sent to freenode
* until the system is unmounted. It may be needed to correctly
* traverse the tree.
*/
temp_mt_entry->mt_point_node.node_access = loc.node_access;
200ab9c: c8 24 20 08 st %g4, [ %l0 + 8 ]
temp_mt_entry->mt_point_node.handlers = loc.handlers;
temp_mt_entry->mt_point_node.ops = loc.ops;
temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry;
200aba0: c4 24 20 14 st %g2, [ %l0 + 0x14 ]
/*
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( !loc.ops->mount_h ){
200aba4: 80 a0 e0 00 cmp %g3, 0
200aba8: 12 bf ff be bne 200aaa0 <mount+0x168> <== ALWAYS TAKEN
200abac: c2 24 20 10 st %g1, [ %l0 + 0x10 ]
errno = ENOTSUP;
200abb0: 10 bf ff b8 b 200aa90 <mount+0x158> <== NOT EXECUTED
200abb4: b8 07 bf e8 add %fp, -24, %i4 <== NOT EXECUTED
0200a2cc <mq_timedreceive>:
char *msg_ptr,
size_t msg_len,
unsigned int *msg_prio,
const struct timespec *abstime
)
{
200a2cc: 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 ) ) {
200a2d0: 90 10 00 1c mov %i4, %o0
200a2d4: 40 00 00 4f call 200a410 <_POSIX_Absolute_timeout_to_ticks>
200a2d8: 92 07 bf f4 add %fp, -12, %o1
200a2dc: 80 a2 20 02 cmp %o0, 2
200a2e0: 18 80 00 03 bgu 200a2ec <mq_timedreceive+0x20> <== ALWAYS TAKEN
200a2e4: 98 10 20 01 mov 1, %o4
200a2e8: 98 10 20 00 clr %o4 <== NOT EXECUTED
default: /* only to silence warnings */
do_wait = TRUE;
break;
}
return _POSIX_Message_queue_Receive_support(
200a2ec: da 07 bf f4 ld [ %fp + -12 ], %o5
200a2f0: 90 10 00 18 mov %i0, %o0
200a2f4: 92 10 00 19 mov %i1, %o1
200a2f8: 94 10 00 1a mov %i2, %o2
200a2fc: 96 10 00 1b mov %i3, %o3
200a300: 7f ff ff 37 call 2009fdc <_POSIX_Message_queue_Receive_support>
200a304: 98 0b 20 01 and %o4, 1, %o4
msg_len,
msg_prio,
do_wait,
ticks
);
}
200a308: 81 c7 e0 08 ret
200a30c: 91 e8 00 08 restore %g0, %o0, %o0
0200a310 <mq_timedsend>:
const char *msg_ptr,
size_t msg_len,
unsigned int msg_prio,
const struct timespec *abstime
)
{
200a310: 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 ) ) {
200a314: 90 10 00 1c mov %i4, %o0
200a318: 40 00 00 3e call 200a410 <_POSIX_Absolute_timeout_to_ticks>
200a31c: 92 07 bf f4 add %fp, -12, %o1
200a320: 80 a2 20 02 cmp %o0, 2
200a324: 18 80 00 03 bgu 200a330 <mq_timedsend+0x20> <== ALWAYS TAKEN
200a328: 98 10 20 01 mov 1, %o4
200a32c: 98 10 20 00 clr %o4 <== NOT EXECUTED
default: /* only to silence warnings */
do_wait = TRUE;
break;
}
return _POSIX_Message_queue_Send_support(
200a330: da 07 bf f4 ld [ %fp + -12 ], %o5
200a334: 90 10 00 18 mov %i0, %o0
200a338: 92 10 00 19 mov %i1, %o1
200a33c: 94 10 00 1a mov %i2, %o2
200a340: 96 10 00 1b mov %i3, %o3
200a344: 7f ff ff 76 call 200a11c <_POSIX_Message_queue_Send_support>
200a348: 98 0b 20 01 and %o4, 1, %o4
msg_len,
msg_prio,
do_wait,
ticks
);
}
200a34c: 81 c7 e0 08 ret
200a350: 91 e8 00 08 restore %g0, %o0, %o0
0200a368 <mq_unlink>:
*/
int mq_unlink(
const char *name
)
{
200a368: 9d e3 bf 90 save %sp, -112, %sp
200a36c: 03 00 80 89 sethi %hi(0x2022400), %g1
200a370: c4 00 62 b0 ld [ %g1 + 0x2b0 ], %g2 ! 20226b0 <_Thread_Dispatch_disable_level>
200a374: 90 10 00 18 mov %i0, %o0
200a378: 84 00 a0 01 inc %g2
200a37c: c4 20 62 b0 st %g2, [ %g1 + 0x2b0 ]
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 );
200a380: 40 00 1c e9 call 2011724 <_POSIX_Message_queue_Name_to_id>
200a384: 92 07 bf f4 add %fp, -12, %o1
if ( status != 0 ) {
200a388: b0 92 20 00 orcc %o0, 0, %i0
200a38c: 02 80 00 09 be 200a3b0 <mq_unlink+0x48>
200a390: 03 00 80 8a sethi %hi(0x2022800), %g1
_Thread_Enable_dispatch();
200a394: 40 00 0e b8 call 200de74 <_Thread_Enable_dispatch>
200a398: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( status );
200a39c: 40 00 26 ed call 2013f50 <__errno>
200a3a0: 01 00 00 00 nop
200a3a4: f0 22 00 00 st %i0, [ %o0 ]
200a3a8: 81 c7 e0 08 ret
200a3ac: 91 e8 3f ff restore %g0, -1, %o0
RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object(
Objects_Information *information,
uint16_t index
)
{
if ( index > information->maximum )
200a3b0: c4 07 bf f4 ld [ %fp + -12 ], %g2
200a3b4: 88 10 62 40 or %g1, 0x240, %g4
200a3b8: c6 11 20 10 lduh [ %g4 + 0x10 ], %g3
}
the_mq = (POSIX_Message_queue_Control *) _Objects_Get_local_object(
200a3bc: 03 00 00 3f sethi %hi(0xfc00), %g1
200a3c0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
200a3c4: 82 08 80 01 and %g2, %g1, %g1
200a3c8: 80 a0 40 03 cmp %g1, %g3
200a3cc: 18 80 00 05 bgu 200a3e0 <mq_unlink+0x78> <== NEVER TAKEN
200a3d0: b0 10 20 00 clr %i0
return NULL;
return information->local_table[ index ];
200a3d4: c4 01 20 1c ld [ %g4 + 0x1c ], %g2
200a3d8: 83 28 60 02 sll %g1, 2, %g1
200a3dc: f0 00 80 01 ld [ %g2 + %g1 ], %i0
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Namespace_remove (
POSIX_Message_queue_Control *the_mq
)
{
_Objects_Namespace_remove(
200a3e0: 92 10 00 18 mov %i0, %o1
&_POSIX_Message_queue_Information,
_Objects_Get_index( the_mq_id )
);
the_mq->linked = FALSE;
200a3e4: c0 2e 20 15 clrb [ %i0 + 0x15 ]
200a3e8: 11 00 80 8a sethi %hi(0x2022800), %o0
200a3ec: 40 00 0c 86 call 200d604 <_Objects_Namespace_remove>
200a3f0: 90 12 22 40 or %o0, 0x240, %o0 ! 2022a40 <_POSIX_Message_queue_Information>
_POSIX_Message_queue_Namespace_remove( the_mq );
_POSIX_Message_queue_Delete( the_mq );
200a3f4: 90 10 00 18 mov %i0, %o0
200a3f8: 7f ff fe 09 call 2009c1c <_POSIX_Message_queue_Delete>
200a3fc: b0 10 20 00 clr %i0
_Thread_Enable_dispatch();
200a400: 40 00 0e 9d call 200de74 <_Thread_Enable_dispatch>
200a404: 01 00 00 00 nop
return 0;
}
200a408: 81 c7 e0 08 ret
200a40c: 81 e8 00 00 restore
0200b168 <nanosleep>:
int nanosleep(
const struct timespec *rqtp,
struct timespec *rmtp
)
{
200b168: 9d e3 bf 98 save %sp, -104, %sp
Watchdog_Interval ticks;
if ( !_Timespec_Is_valid( rqtp ) )
200b16c: 40 00 05 7a call 200c754 <_Timespec_Is_valid>
200b170: 90 10 00 18 mov %i0, %o0
200b174: 80 8a 20 ff btst 0xff, %o0
200b178: 02 80 00 0a be 200b1a0 <nanosleep+0x38>
200b17c: 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 )
200b180: c2 06 00 00 ld [ %i0 ], %g1
200b184: 80 a0 60 00 cmp %g1, 0
200b188: 06 80 00 06 bl 200b1a0 <nanosleep+0x38> <== NEVER TAKEN
200b18c: 01 00 00 00 nop
200b190: c2 06 20 04 ld [ %i0 + 4 ], %g1
200b194: 80 a0 60 00 cmp %g1, 0
200b198: 16 80 00 06 bge 200b1b0 <nanosleep+0x48> <== ALWAYS TAKEN
200b19c: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
200b1a0: 40 00 09 53 call 200d6ec <__errno>
200b1a4: 01 00 00 00 nop
200b1a8: 10 80 00 3c b 200b298 <nanosleep+0x130>
200b1ac: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
ticks = _Timespec_To_ticks( rqtp );
200b1b0: 40 00 05 7b call 200c79c <_Timespec_To_ticks>
200b1b4: 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 ) {
200b1b8: b0 92 20 00 orcc %o0, 0, %i0
200b1bc: 12 80 00 10 bne 200b1fc <nanosleep+0x94>
200b1c0: 05 00 80 60 sethi %hi(0x2018000), %g2
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
200b1c4: c2 00 a1 50 ld [ %g2 + 0x150 ], %g1 ! 2018150 <_Thread_Dispatch_disable_level>
200b1c8: 82 00 60 01 inc %g1
200b1cc: c2 20 a1 50 st %g1, [ %g2 + 0x150 ]
_Thread_Disable_dispatch();
_Thread_Yield_processor();
200b1d0: 7f ff f5 d1 call 2008914 <_Thread_Yield_processor>
200b1d4: 01 00 00 00 nop
_Thread_Enable_dispatch();
200b1d8: 7f ff f2 58 call 2007b38 <_Thread_Enable_dispatch>
200b1dc: 01 00 00 00 nop
if ( rmtp ) {
200b1e0: 80 a6 60 00 cmp %i1, 0
200b1e4: 02 80 00 30 be 200b2a4 <nanosleep+0x13c> <== NEVER TAKEN
200b1e8: 01 00 00 00 nop
rmtp->tv_sec = 0;
rmtp->tv_nsec = 0;
200b1ec: c0 26 60 04 clr [ %i1 + 4 ]
if ( !ticks ) {
_Thread_Disable_dispatch();
_Thread_Yield_processor();
_Thread_Enable_dispatch();
if ( rmtp ) {
rmtp->tv_sec = 0;
200b1f0: c0 26 40 00 clr [ %i1 ]
200b1f4: 81 c7 e0 08 ret
200b1f8: 81 e8 00 00 restore
200b1fc: c2 00 a1 50 ld [ %g2 + 0x150 ], %g1
200b200: 82 00 60 01 inc %g1
200b204: c2 20 a1 50 st %g1, [ %g2 + 0x150 ]
/*
* Block for the desired amount of time
*/
_Thread_Disable_dispatch();
_Thread_Set_state(
200b208: 21 00 80 60 sethi %hi(0x2018000), %l0
200b20c: d0 04 22 14 ld [ %l0 + 0x214 ], %o0 ! 2018214 <_Thread_Executing>
200b210: 13 04 00 00 sethi %hi(0x10000000), %o1
200b214: 7f ff f4 bd call 2008508 <_Thread_Set_state>
200b218: 92 12 60 08 or %o1, 8, %o1 ! 10000008 <RAM_END+0xdc00008>
_Thread_Executing,
STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Watchdog_Initialize(
200b21c: c4 04 22 14 ld [ %l0 + 0x214 ], %g2
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
200b220: 11 00 80 60 sethi %hi(0x2018000), %o0
200b224: c2 00 a0 08 ld [ %g2 + 8 ], %g1
200b228: 90 12 22 34 or %o0, 0x234, %o0
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
200b22c: c2 20 a0 68 st %g1, [ %g2 + 0x68 ]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
200b230: 92 00 a0 48 add %g2, 0x48, %o1
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
200b234: 03 00 80 1e sethi %hi(0x2007800), %g1
200b238: 82 10 61 74 or %g1, 0x174, %g1 ! 2007974 <_Thread_Delay_ended>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
200b23c: c0 20 a0 50 clr [ %g2 + 0x50 ]
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
200b240: c0 20 a0 6c clr [ %g2 + 0x6c ]
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
200b244: f0 20 a0 54 st %i0, [ %g2 + 0x54 ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
200b248: 7f ff f6 d9 call 2008dac <_Watchdog_Insert>
200b24c: c2 20 a0 64 st %g1, [ %g2 + 0x64 ]
_Thread_Delay_ended,
_Thread_Executing->Object.id,
NULL
);
_Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks );
_Thread_Enable_dispatch();
200b250: 7f ff f2 3a call 2007b38 <_Thread_Enable_dispatch>
200b254: 01 00 00 00 nop
/* calculate time remaining */
if ( rmtp ) {
200b258: 80 a6 60 00 cmp %i1, 0
200b25c: 02 80 00 12 be 200b2a4 <nanosleep+0x13c> <== NEVER TAKEN
200b260: c2 04 22 14 ld [ %l0 + 0x214 ], %g1
ticks -=
_Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time;
_Timespec_From_ticks( ticks, rmtp );
200b264: 92 10 00 19 mov %i1, %o1
_Thread_Enable_dispatch();
/* calculate time remaining */
if ( rmtp ) {
ticks -=
200b268: c4 00 60 60 ld [ %g1 + 0x60 ], %g2
200b26c: e0 00 60 5c ld [ %g1 + 0x5c ], %l0
200b270: a0 24 00 02 sub %l0, %g2, %l0
200b274: a0 04 00 18 add %l0, %i0, %l0
_Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time;
_Timespec_From_ticks( ticks, rmtp );
200b278: 40 00 05 22 call 200c700 <_Timespec_From_ticks>
200b27c: 90 10 00 10 mov %l0, %o0
/*
* If there is time remaining, then we were interrupted by a signal.
*/
if ( ticks )
200b280: 80 a4 20 00 cmp %l0, 0
200b284: 02 80 00 08 be 200b2a4 <nanosleep+0x13c>
200b288: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINTR );
200b28c: 40 00 09 18 call 200d6ec <__errno>
200b290: 01 00 00 00 nop
200b294: 82 10 20 04 mov 4, %g1 ! 4 <PROM_START+0x4>
200b298: c2 22 00 00 st %g1, [ %o0 ]
200b29c: 81 c7 e0 08 ret
200b2a0: 91 e8 3f ff restore %g0, -1, %o0
}
return 0;
}
200b2a4: 81 c7 e0 08 ret
200b2a8: 91 e8 20 00 restore %g0, 0, %o0
020024b0 <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
20024b0: 9d e3 bf 98 save %sp, -104, %sp
switch ( fileno(fp) ) {
20024b4: 40 00 2b d9 call 200d418 <fileno>
20024b8: 90 10 00 18 mov %i0, %o0
20024bc: 80 a2 20 02 cmp %o0, 2
20024c0: 18 80 00 0e bgu 20024f8 <newlib_free_buffers+0x48> <== NEVER TAKEN
20024c4: 01 00 00 00 nop
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
20024c8: c2 16 20 0c lduh [ %i0 + 0xc ], %g1
20024cc: 80 88 60 80 btst 0x80, %g1
20024d0: 02 80 00 0c be 2002500 <newlib_free_buffers+0x50>
20024d4: 01 00 00 00 nop
free( fp->_bf._base );
20024d8: 40 00 1f 5f call 200a254 <free>
20024dc: d0 06 20 10 ld [ %i0 + 0x10 ], %o0
fp->_flags &= ~__SMBF;
20024e0: c2 16 20 0c lduh [ %i0 + 0xc ], %g1
fp->_bf._base = fp->_p = (unsigned char *) NULL;
20024e4: c0 26 20 10 clr [ %i0 + 0x10 ]
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
20024e8: 82 08 7f 7f and %g1, -129, %g1
fp->_bf._base = fp->_p = (unsigned char *) NULL;
20024ec: c0 26 00 00 clr [ %i0 ]
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
20024f0: 10 80 00 04 b 2002500 <newlib_free_buffers+0x50>
20024f4: c2 36 20 0c sth %g1, [ %i0 + 0xc ]
fp->_bf._base = fp->_p = (unsigned char *) NULL;
}
break;
default:
fclose(fp);
20024f8: 40 00 2b 3f call 200d1f4 <fclose> <== NOT EXECUTED
20024fc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
}
return 0;
}
2002500: 81 c7 e0 08 ret
2002504: 91 e8 20 00 restore %g0, 0, %o0
02002864 <null_initialize>:
rtems_device_driver null_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *pargp
)
{
2002864: 9d e3 bf 98 save %sp, -104, %sp
rtems_device_driver status;
if ( !initialized ) {
2002868: 05 00 80 6d sethi %hi(0x201b400), %g2
200286c: c2 48 a1 74 ldsb [ %g2 + 0x174 ], %g1 ! 201b574 <initialized>
2002870: 80 a0 60 00 cmp %g1, 0
2002874: 12 80 00 0e bne 20028ac <null_initialize+0x48>
2002878: 82 10 20 01 mov 1, %g1
initialized = 1;
status = rtems_io_register_name(
200287c: 11 00 80 63 sethi %hi(0x2018c00), %o0
)
{
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
2002880: c2 28 a1 74 stb %g1, [ %g2 + 0x174 ]
status = rtems_io_register_name(
2002884: 90 12 21 98 or %o0, 0x198, %o0
2002888: 92 10 00 18 mov %i0, %o1
200288c: 40 00 00 4d call 20029c0 <rtems_io_register_name>
2002890: 94 10 20 00 clr %o2
"/dev/null",
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
2002894: 80 a2 20 00 cmp %o0, 0
2002898: 02 80 00 04 be 20028a8 <null_initialize+0x44> <== ALWAYS TAKEN
200289c: 03 00 80 6d sethi %hi(0x201b400), %g1
rtems_fatal_error_occurred(status);
20028a0: 40 00 10 3b call 200698c <rtems_fatal_error_occurred> <== NOT EXECUTED
20028a4: 01 00 00 00 nop <== NOT EXECUTED
NULL_major = major;
20028a8: f0 20 63 f0 st %i0, [ %g1 + 0x3f0 ]
}
return RTEMS_SUCCESSFUL;
}
20028ac: 81 c7 e0 08 ret
20028b0: 91 e8 20 00 restore %g0, 0, %o0
02002840 <null_write>:
void *pargp
)
{
rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp;
if ( rw_args )
2002840: 80 a2 a0 00 cmp %o2, 0
2002844: 02 80 00 04 be 2002854 <null_write+0x14> <== ALWAYS TAKEN
2002848: 01 00 00 00 nop
rw_args->bytes_moved = rw_args->count;
200284c: c2 02 a0 0c ld [ %o2 + 0xc ], %g1 <== NOT EXECUTED
2002850: c2 22 a0 14 st %g1, [ %o2 + 0x14 ] <== NOT EXECUTED
return NULL_SUCCESSFUL;
}
2002854: 81 c3 e0 08 retl
2002858: 90 10 20 00 clr %o0
02002700 <open>:
int open(
const char *pathname,
int flags,
...
)
{
2002700: 9d e3 bf 80 save %sp, -128, %sp
eval_flags |= RTEMS_LIBIO_PERMS_READ;
if ( ( status & _FWRITE ) == _FWRITE )
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
va_start(ap, flags);
2002704: f4 27 a0 4c st %i2, [ %fp + 0x4c ]
2002708: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
200270c: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
2002710: fa 27 a0 58 st %i5, [ %fp + 0x58 ]
/*
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
2002714: 82 06 60 01 add %i1, 1, %g1
if ( ( status & _FREAD ) == _FREAD )
eval_flags |= RTEMS_LIBIO_PERMS_READ;
if ( ( status & _FWRITE ) == _FWRITE )
2002718: 80 88 60 02 btst 2, %g1
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
if ( ( status & _FREAD ) == _FREAD )
200271c: 82 08 60 01 and %g1, 1, %g1
eval_flags |= RTEMS_LIBIO_PERMS_READ;
if ( ( status & _FWRITE ) == _FWRITE )
2002720: 02 80 00 03 be 200272c <open+0x2c>
2002724: a1 28 60 02 sll %g1, 2, %l0
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
2002728: a0 14 20 02 or %l0, 2, %l0
va_start(ap, flags);
mode = va_arg( ap, int );
200272c: 82 07 a0 50 add %fp, 0x50, %g1
2002730: f4 07 a0 4c ld [ %fp + 0x4c ], %i2
2002734: c2 27 bf f4 st %g1, [ %fp + -12 ]
* code does not require changes here since network file
* descriptors are obtained using socket(), not open().
*/
/* allocate a file control block */
iop = rtems_libio_allocate();
2002738: 40 00 1f c5 call 200a64c <rtems_libio_allocate>
200273c: ba 10 20 17 mov 0x17, %i5
if ( iop == 0 ) {
2002740: b8 92 20 00 orcc %o0, 0, %i4
2002744: 02 80 00 93 be 2002990 <open+0x290>
2002748: 92 10 00 10 mov %l0, %o1
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
200274c: b6 07 bf e4 add %fp, -28, %i3
2002750: 90 10 00 18 mov %i0, %o0
2002754: 94 10 00 1b mov %i3, %o2
2002758: 7f ff fe 21 call 2001fdc <rtems_filesystem_evaluate_path>
200275c: 96 10 20 01 mov 1, %o3
pathname, eval_flags, &loc, true );
if ( status == -1 ) {
2002760: 80 a2 3f ff cmp %o0, -1
2002764: 12 80 00 25 bne 20027f8 <open+0xf8>
2002768: 82 0e 6a 00 and %i1, 0xa00, %g1
if ( errno != ENOENT ) {
200276c: 40 00 2a 4a call 200d094 <__errno>
2002770: 01 00 00 00 nop
2002774: c2 02 00 00 ld [ %o0 ], %g1
2002778: 80 a0 60 02 cmp %g1, 2
200277c: 12 80 00 11 bne 20027c0 <open+0xc0>
2002780: 01 00 00 00 nop
rc = errno;
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
2002784: 80 8e 62 00 btst 0x200, %i1
2002788: ba 10 20 02 mov 2, %i5
200278c: 02 80 00 6f be 2002948 <open+0x248>
2002790: 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 );
2002794: 13 3f ff e0 sethi %hi(0xffff8000), %o1
2002798: 90 10 00 18 mov %i0, %o0
200279c: 92 16 80 09 or %i2, %o1, %o1
20027a0: 94 10 20 00 clr %o2
20027a4: 93 2a 60 10 sll %o1, 0x10, %o1
20027a8: 96 10 20 00 clr %o3
20027ac: 7f ff fe bc call 200229c <mknod>
20027b0: 93 32 60 10 srl %o1, 0x10, %o1
if ( rc ) {
20027b4: 80 a2 20 00 cmp %o0, 0
20027b8: 02 80 00 06 be 20027d0 <open+0xd0> <== ALWAYS TAKEN
20027bc: 94 10 00 1b mov %i3, %o2
rc = errno;
20027c0: 40 00 2a 35 call 200d094 <__errno>
20027c4: 01 00 00 00 nop
20027c8: 10 80 00 5c b 2002938 <open+0x238>
20027cc: fa 02 00 00 ld [ %o0 ], %i5
goto done;
}
/* Sanity check to see if the file name exists after the mknod() */
status = rtems_filesystem_evaluate_path( pathname, 0x0, &loc, true );
20027d0: 90 10 00 18 mov %i0, %o0
20027d4: 92 10 20 00 clr %o1
20027d8: 96 10 20 01 mov 1, %o3
20027dc: 7f ff fe 00 call 2001fdc <rtems_filesystem_evaluate_path>
20027e0: ba 10 20 0d mov 0xd, %i5
if ( status != 0 ) { /* The file did not exist */
20027e4: 80 a2 20 00 cmp %o0, 0
20027e8: 12 80 00 58 bne 2002948 <open+0x248> <== NEVER TAKEN
20027ec: 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;
20027f0: 10 80 00 07 b 200280c <open+0x10c>
20027f4: c2 07 bf e8 ld [ %fp + -24 ], %g1
if ( status != 0 ) { /* The file did not exist */
rc = EACCES;
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
20027f8: a0 10 00 1b mov %i3, %l0
20027fc: 80 a0 6a 00 cmp %g1, 0xa00
2002800: 02 80 00 52 be 2002948 <open+0x248>
2002804: ba 10 20 11 mov 0x11, %i5
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
2002808: c2 07 bf e8 ld [ %fp + -24 ], %g1
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
200280c: e0 07 20 0c ld [ %i4 + 0xc ], %l0
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
2002810: c2 27 20 30 st %g1, [ %i4 + 0x30 ]
iop->file_info = loc.node_access;
2002814: c2 07 bf e4 ld [ %fp + -28 ], %g1
iop->flags |= rtems_libio_fcntl_flags( flags );
2002818: 90 10 00 19 mov %i1, %o0
200281c: 40 00 1f c2 call 200a724 <rtems_libio_fcntl_flags>
2002820: c2 27 20 2c st %g1, [ %i4 + 0x2c ]
2002824: 90 12 00 10 or %o0, %l0, %o0
iop->pathinfo = loc;
2002828: 94 10 20 10 mov 0x10, %o2
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
200282c: d0 27 20 0c st %o0, [ %i4 + 0xc ]
iop->pathinfo = loc;
2002830: a0 07 bf e4 add %fp, -28, %l0
2002834: 90 07 20 10 add %i4, 0x10, %o0
2002838: 40 00 2c 09 call 200d85c <memcpy>
200283c: 92 10 00 10 mov %l0, %o1
if ( !iop->handlers->open_h ) {
2002840: c2 07 20 30 ld [ %i4 + 0x30 ], %g1
2002844: c2 00 40 00 ld [ %g1 ], %g1
2002848: 80 a0 60 00 cmp %g1, 0
200284c: 02 80 00 67 be 20029e8 <open+0x2e8> <== NEVER TAKEN
2002850: 92 10 00 18 mov %i0, %o1
rc = ENOTSUP;
goto done;
}
rc = (*iop->handlers->open_h)( iop, pathname, flags, mode );
2002854: 96 10 00 1a mov %i2, %o3
2002858: 90 10 00 1c mov %i4, %o0
200285c: 9f c0 40 00 call %g1
2002860: 94 10 00 19 mov %i1, %o2
if ( rc )
2002864: ba 92 20 00 orcc %o0, 0, %i5
2002868: 12 80 00 39 bne 200294c <open+0x24c> <== NEVER TAKEN
200286c: 80 a7 20 00 cmp %i4, 0
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
2002870: 80 8e 64 00 btst 0x400, %i1
2002874: 02 80 00 4c be 20029a4 <open+0x2a4>
2002878: 03 00 80 5d sethi %hi(0x2017400), %g1
rc = ftruncate( iop - rtems_libio_iops, 0 );
200287c: c4 00 62 44 ld [ %g1 + 0x244 ], %g2 ! 2017644 <rtems_libio_iops>
2002880: 92 10 20 00 clr %o1
2002884: 84 27 00 02 sub %i4, %g2, %g2
2002888: 85 38 a0 02 sra %g2, 2, %g2
200288c: 87 28 a0 02 sll %g2, 2, %g3
2002890: 83 28 a0 06 sll %g2, 6, %g1
2002894: 82 20 40 03 sub %g1, %g3, %g1
2002898: 91 28 60 06 sll %g1, 6, %o0
200289c: 90 22 00 01 sub %o0, %g1, %o0
20028a0: 83 2a 20 0c sll %o0, 0xc, %g1
20028a4: 90 02 00 01 add %o0, %g1, %o0
20028a8: 90 02 00 02 add %o0, %g2, %o0
20028ac: 91 2a 20 04 sll %o0, 4, %o0
20028b0: 90 22 00 02 sub %o0, %g2, %o0
20028b4: 91 2a 20 02 sll %o0, 2, %o0
20028b8: 40 00 1e 91 call 200a2fc <ftruncate>
20028bc: 90 20 80 08 sub %g2, %o0, %o0
if ( rc ) {
20028c0: ba 92 20 00 orcc %o0, 0, %i5
20028c4: 02 80 00 38 be 20029a4 <open+0x2a4> <== ALWAYS TAKEN
20028c8: 03 00 80 5d sethi %hi(0x2017400), %g1
if(errno) rc = errno;
20028cc: 40 00 29 f2 call 200d094 <__errno> <== NOT EXECUTED
20028d0: 01 00 00 00 nop <== NOT EXECUTED
20028d4: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED
20028d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20028dc: 02 80 00 06 be 20028f4 <open+0x1f4> <== NOT EXECUTED
20028e0: 03 00 80 5d sethi %hi(0x2017400), %g1 <== NOT EXECUTED
20028e4: 40 00 29 ec call 200d094 <__errno> <== NOT EXECUTED
20028e8: 01 00 00 00 nop <== NOT EXECUTED
20028ec: fa 02 00 00 ld [ %o0 ], %i5 <== NOT EXECUTED
close( iop - rtems_libio_iops );
20028f0: 03 00 80 5d sethi %hi(0x2017400), %g1 <== NOT EXECUTED
20028f4: c4 00 62 44 ld [ %g1 + 0x244 ], %g2 ! 2017644 <rtems_libio_iops><== NOT EXECUTED
20028f8: 84 27 00 02 sub %i4, %g2, %g2 <== NOT EXECUTED
20028fc: 85 38 a0 02 sra %g2, 2, %g2 <== NOT EXECUTED
2002900: 87 28 a0 02 sll %g2, 2, %g3 <== NOT EXECUTED
2002904: 83 28 a0 06 sll %g2, 6, %g1 <== NOT EXECUTED
2002908: 82 20 40 03 sub %g1, %g3, %g1 <== NOT EXECUTED
200290c: 91 28 60 06 sll %g1, 6, %o0 <== NOT EXECUTED
2002910: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED
2002914: 83 2a 20 0c sll %o0, 0xc, %g1 <== NOT EXECUTED
2002918: b8 10 20 00 clr %i4 <== NOT EXECUTED
200291c: 90 02 00 01 add %o0, %g1, %o0 <== NOT EXECUTED
2002920: 90 02 00 02 add %o0, %g2, %o0 <== NOT EXECUTED
2002924: 91 2a 20 04 sll %o0, 4, %o0 <== NOT EXECUTED
2002928: 90 22 00 02 sub %o0, %g2, %o0 <== NOT EXECUTED
200292c: 91 2a 20 02 sll %o0, 2, %o0 <== NOT EXECUTED
2002930: 40 00 1e 16 call 200a188 <close> <== NOT EXECUTED
2002934: 90 20 80 08 sub %g2, %o0, %o0 <== NOT EXECUTED
*/
done:
va_end(ap);
if ( rc ) {
2002938: 80 a7 60 00 cmp %i5, 0
200293c: 02 80 00 1a be 20029a4 <open+0x2a4> <== NEVER TAKEN
2002940: 03 00 80 5d sethi %hi(0x2017400), %g1
2002944: a0 10 20 00 clr %l0
if ( iop )
2002948: 80 a7 20 00 cmp %i4, 0
200294c: 02 80 00 05 be 2002960 <open+0x260> <== NEVER TAKEN
2002950: 80 a4 20 00 cmp %l0, 0
rtems_libio_free( iop );
2002954: 40 00 1f 26 call 200a5ec <rtems_libio_free>
2002958: 90 10 00 1c mov %i4, %o0
if ( loc_to_free )
200295c: 80 a4 20 00 cmp %l0, 0
2002960: 02 80 00 0c be 2002990 <open+0x290>
2002964: 01 00 00 00 nop
rtems_filesystem_freenode( loc_to_free );
2002968: c2 04 20 08 ld [ %l0 + 8 ], %g1
200296c: 80 a0 60 00 cmp %g1, 0
2002970: 02 80 00 08 be 2002990 <open+0x290> <== NEVER TAKEN
2002974: 01 00 00 00 nop
2002978: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
200297c: 80 a0 60 00 cmp %g1, 0
2002980: 02 80 00 04 be 2002990 <open+0x290> <== NEVER TAKEN
2002984: 01 00 00 00 nop
2002988: 9f c0 40 00 call %g1
200298c: 90 10 00 10 mov %l0, %o0
rtems_set_errno_and_return_minus_one( rc );
2002990: 40 00 29 c1 call 200d094 <__errno>
2002994: b0 10 3f ff mov -1, %i0
2002998: fa 22 00 00 st %i5, [ %o0 ]
200299c: 81 c7 e0 08 ret
20029a0: 81 e8 00 00 restore
}
return iop - rtems_libio_iops;
20029a4: c6 00 62 44 ld [ %g1 + 0x244 ], %g3
20029a8: 86 27 00 03 sub %i4, %g3, %g3
20029ac: 87 38 e0 02 sra %g3, 2, %g3
20029b0: 83 28 e0 02 sll %g3, 2, %g1
20029b4: 85 28 e0 06 sll %g3, 6, %g2
20029b8: 84 20 80 01 sub %g2, %g1, %g2
20029bc: 83 28 a0 06 sll %g2, 6, %g1
20029c0: 82 20 40 02 sub %g1, %g2, %g1
20029c4: 85 28 60 0c sll %g1, 0xc, %g2
20029c8: 82 00 40 02 add %g1, %g2, %g1
20029cc: 82 00 40 03 add %g1, %g3, %g1
20029d0: 83 28 60 04 sll %g1, 4, %g1
20029d4: 82 20 40 03 sub %g1, %g3, %g1
20029d8: 83 28 60 02 sll %g1, 2, %g1
20029dc: b0 20 c0 01 sub %g3, %g1, %i0
}
20029e0: 81 c7 e0 08 ret
20029e4: 81 e8 00 00 restore
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
20029e8: 10 bf ff d8 b 2002948 <open+0x248> <== NOT EXECUTED
20029ec: ba 10 20 86 mov 0x86, %i5 <== NOT EXECUTED
0200268c <open_dev_console>:
/*
* This is a replaceable stub
*/
void open_dev_console(void)
{
200268c: 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) {
2002690: 21 00 80 55 sethi %hi(0x2015400), %l0
2002694: 92 10 20 00 clr %o1
2002698: 90 14 22 b0 or %l0, 0x2b0, %o0
200269c: 40 00 00 19 call 2002700 <open>
20026a0: 94 10 20 00 clr %o2
20026a4: 80 a2 3f ff cmp %o0, -1
20026a8: 02 80 00 14 be 20026f8 <open_dev_console+0x6c>
20026ac: 90 14 22 b0 or %l0, 0x2b0, %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)
20026b0: 92 10 20 01 mov 1, %o1
20026b4: 40 00 00 13 call 2002700 <open>
20026b8: 94 10 20 00 clr %o2
20026bc: 80 a2 3f ff cmp %o0, -1
20026c0: 32 80 00 05 bne,a 20026d4 <open_dev_console+0x48> <== ALWAYS TAKEN
20026c4: 90 14 22 b0 or %l0, 0x2b0, %o0
rtems_fatal_error_occurred( error_code | '1' );
20026c8: 11 14 d5 11 sethi %hi(0x53544400), %o0 <== NOT EXECUTED
20026cc: 10 80 00 09 b 20026f0 <open_dev_console+0x64> <== NOT EXECUTED
20026d0: 90 12 20 31 or %o0, 0x31, %o0 ! 53544431 <RAM_END+0x51144431><== NOT EXECUTED
if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1)
20026d4: 92 10 20 01 mov 1, %o1
20026d8: 40 00 00 0a call 2002700 <open>
20026dc: 94 10 20 00 clr %o2
20026e0: 80 a2 3f ff cmp %o0, -1
20026e4: 12 80 00 05 bne 20026f8 <open_dev_console+0x6c> <== ALWAYS TAKEN
20026e8: 11 14 d5 11 sethi %hi(0x53544400), %o0
rtems_fatal_error_occurred( error_code | '2' );
20026ec: 90 12 20 32 or %o0, 0x32, %o0 ! 53544432 <RAM_END+0x51144432><== NOT EXECUTED
20026f0: 40 00 0d 35 call 2005bc4 <rtems_fatal_error_occurred> <== NOT EXECUTED
20026f4: 01 00 00 00 nop <== NOT EXECUTED
20026f8: 81 c7 e0 08 ret
20026fc: 81 e8 00 00 restore
020046ac <opendir>:
* open a directory.
*/
DIR *
opendir(
const char *name )
{
20046ac: 9d e3 bf 98 save %sp, -104, %sp
register DIR *dirp;
register int fd;
if ((fd = open(name, 0)) == -1)
20046b0: 92 10 20 00 clr %o1
20046b4: 90 10 00 18 mov %i0, %o0
20046b8: 40 00 00 21 call 200473c <open>
20046bc: b0 10 20 00 clr %i0
20046c0: 80 a2 3f ff cmp %o0, -1
20046c4: 02 80 00 17 be 2004720 <opendir+0x74> <== NEVER TAKEN
20046c8: a0 10 00 08 mov %o0, %l0
return NULL;
if (fcntl(fd, F_SETFD, 1) == -1 ||
20046cc: 92 10 20 02 mov 2, %o1
20046d0: 40 00 1f 83 call 200c4dc <fcntl>
20046d4: 94 10 20 01 mov 1, %o2
20046d8: 80 a2 3f ff cmp %o0, -1
20046dc: 02 80 00 0f be 2004718 <opendir+0x6c> <== NEVER TAKEN
20046e0: 90 10 00 10 mov %l0, %o0
20046e4: 7f ff fd e8 call 2003e84 <malloc>
20046e8: 90 10 20 18 mov 0x18, %o0
20046ec: b0 92 20 00 orcc %o0, 0, %i0
20046f0: 02 80 00 0a be 2004718 <opendir+0x6c> <== NEVER TAKEN
20046f4: 90 10 00 10 mov %l0, %o0
* If CLSIZE is an exact multiple of DIRBLKSIZ, use a CLSIZE
* buffer that it cluster boundary aligned.
* Hopefully this can be a big win someday by allowing page trades
* to user space to be done by getdirentries()
*/
dirp->dd_buf = malloc (512);
20046f8: 7f ff fd e3 call 2003e84 <malloc>
20046fc: 90 10 22 00 mov 0x200, %o0
dirp->dd_len = 512;
2004700: 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);
2004704: d0 26 20 0c st %o0, [ %i0 + 0xc ]
dirp->dd_len = 512;
if (dirp->dd_buf == NULL) {
2004708: 80 a2 20 00 cmp %o0, 0
200470c: 12 80 00 07 bne 2004728 <opendir+0x7c> <== ALWAYS TAKEN
2004710: c2 26 20 10 st %g1, [ %i0 + 0x10 ]
close (fd);
2004714: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2004718: 7f ff fb 0a call 2003340 <close> <== NOT EXECUTED
200471c: b0 10 20 00 clr %i0 <== NOT EXECUTED
2004720: 81 c7 e0 08 ret <== NOT EXECUTED
2004724: 81 e8 00 00 restore <== NOT EXECUTED
return NULL;
}
dirp->dd_fd = fd;
2004728: e0 26 00 00 st %l0, [ %i0 ]
dirp->dd_loc = 0;
200472c: c0 26 20 04 clr [ %i0 + 4 ]
dirp->dd_seek = 0;
2004730: c0 26 20 14 clr [ %i0 + 0x14 ]
/*
* Set up seek point for rewinddir.
*/
return dirp;
}
2004734: 81 c7 e0 08 ret
2004738: 81 e8 00 00 restore
020034cc <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
20034cc: 9d e3 bf 98 save %sp, -104, %sp
int i;
if (tty->termios.c_oflag & OPOST) {
20034d0: c8 06 60 34 ld [ %i1 + 0x34 ], %g4
20034d4: 80 89 20 01 btst 1, %g4
20034d8: 02 80 00 59 be 200363c <oproc+0x170> <== NEVER TAKEN
20034dc: f0 2f a0 44 stb %i0, [ %fp + 0x44 ]
switch (c) {
20034e0: 82 0e 20 ff and %i0, 0xff, %g1
20034e4: 80 a0 60 09 cmp %g1, 9
20034e8: 22 80 00 2b be,a 2003594 <oproc+0xc8>
20034ec: c6 06 60 28 ld [ %i1 + 0x28 ], %g3
20034f0: 18 80 00 07 bgu 200350c <oproc+0x40> <== ALWAYS TAKEN
20034f4: 80 a0 60 0a cmp %g1, 0xa
20034f8: 80 a0 60 08 cmp %g1, 8 <== NOT EXECUTED
20034fc: 12 80 00 3c bne 20035ec <oproc+0x120> <== NOT EXECUTED
2003500: 80 89 20 02 btst 2, %g4 <== NOT EXECUTED
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
2003504: 10 80 00 35 b 20035d8 <oproc+0x10c> <== NOT EXECUTED
2003508: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
200350c: 02 80 00 06 be 2003524 <oproc+0x58>
2003510: 80 a0 60 0d cmp %g1, 0xd
2003514: 32 80 00 36 bne,a 20035ec <oproc+0x120> <== ALWAYS TAKEN
2003518: 80 89 20 02 btst 2, %g4
tty->column = 0;
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
200351c: 10 80 00 10 b 200355c <oproc+0x90> <== NOT EXECUTED
2003520: 80 89 20 10 btst 0x10, %g4 <== NOT EXECUTED
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
case '\n':
if (tty->termios.c_oflag & ONLRET)
2003524: 80 89 20 20 btst 0x20, %g4
2003528: 32 80 00 02 bne,a 2003530 <oproc+0x64> <== NEVER TAKEN
200352c: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED
tty->column = 0;
if (tty->termios.c_oflag & ONLCR) {
2003530: c2 06 60 34 ld [ %i1 + 0x34 ], %g1
2003534: 80 88 60 04 btst 4, %g1
2003538: 02 80 00 42 be 2003640 <oproc+0x174> <== NEVER TAKEN
200353c: 94 10 00 19 mov %i1, %o2
rtems_termios_puts ("\r", 1, tty);
2003540: 11 00 80 56 sethi %hi(0x2015800), %o0
2003544: 92 10 20 01 mov 1, %o1
2003548: 90 12 22 58 or %o0, 0x258, %o0
200354c: 7f ff ff 94 call 200339c <rtems_termios_puts>
2003550: 94 10 00 19 mov %i1, %o2
c = '\n';
if (tty->termios.c_oflag & ONLRET)
tty->column = 0;
break;
}
tty->column = 0;
2003554: 10 80 00 3a b 200363c <oproc+0x170>
2003558: c0 26 60 28 clr [ %i1 + 0x28 ]
tty->column = 0;
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
200355c: 02 80 00 06 be 2003574 <oproc+0xa8> <== NOT EXECUTED
2003560: 80 89 20 08 btst 8, %g4 <== NOT EXECUTED
2003564: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED
2003568: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200356c: 02 80 00 17 be 20035c8 <oproc+0xfc> <== NOT EXECUTED
2003570: 80 89 20 08 btst 8, %g4 <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
2003574: 22 80 00 32 be,a 200363c <oproc+0x170> <== NOT EXECUTED
2003578: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED
c = '\n';
200357c: 82 10 20 0a mov 0xa, %g1 <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
2003580: 80 89 20 20 btst 0x20, %g4 <== NOT EXECUTED
2003584: 02 80 00 2e be 200363c <oproc+0x170> <== NOT EXECUTED
2003588: c2 2f a0 44 stb %g1, [ %fp + 0x44 ] <== NOT EXECUTED
tty->column = 0;
break;
}
tty->column = 0;
200358c: 10 80 00 2c b 200363c <oproc+0x170> <== NOT EXECUTED
2003590: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
2003594: 05 00 00 06 sethi %hi(0x1800), %g2
2003598: 82 09 00 02 and %g4, %g2, %g1
200359c: 80 a0 40 02 cmp %g1, %g2
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
20035a0: 84 08 e0 07 and %g3, 7, %g2
20035a4: 82 10 20 08 mov 8, %g1
20035a8: 92 20 40 02 sub %g1, %g2, %o1
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
20035ac: 12 80 00 09 bne 20035d0 <oproc+0x104> <== NEVER TAKEN
20035b0: 84 02 40 03 add %o1, %g3, %g2
tty->column += i;
20035b4: c4 26 60 28 st %g2, [ %i1 + 0x28 ]
rtems_termios_puts ( " ", i, tty);
20035b8: 94 10 00 19 mov %i1, %o2
20035bc: 11 00 80 56 sethi %hi(0x2015800), %o0
20035c0: 7f ff ff 77 call 200339c <rtems_termios_puts>
20035c4: 90 12 22 60 or %o0, 0x260, %o0 ! 2015a60 <pollCallbacks.4788+0x380>
20035c8: 81 c7 e0 08 ret
20035cc: 81 e8 00 00 restore
return;
}
tty->column += i;
20035d0: 10 80 00 1b b 200363c <oproc+0x170> <== NOT EXECUTED
20035d4: c4 26 60 28 st %g2, [ %i1 + 0x28 ] <== NOT EXECUTED
break;
case '\b':
if (tty->column > 0)
20035d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20035dc: 04 80 00 18 ble 200363c <oproc+0x170> <== NOT EXECUTED
20035e0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
default:
if (tty->termios.c_oflag & OLCUC)
c = toupper(c);
if (!iscntrl(c))
tty->column++;
20035e4: 10 80 00 16 b 200363c <oproc+0x170> <== NOT EXECUTED
20035e8: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED
if (tty->column > 0)
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
20035ec: 02 80 00 0b be 2003618 <oproc+0x14c> <== ALWAYS TAKEN
20035f0: c4 0f a0 44 ldub [ %fp + 0x44 ], %g2
c = toupper(c);
20035f4: 03 00 80 5b sethi %hi(0x2016c00), %g1 <== NOT EXECUTED
20035f8: c2 00 62 f8 ld [ %g1 + 0x2f8 ], %g1 ! 2016ef8 <__ctype_ptr><== NOT EXECUTED
20035fc: b0 0e 20 ff and %i0, 0xff, %i0 <== NOT EXECUTED
2003600: c2 08 40 18 ldub [ %g1 + %i0 ], %g1 <== NOT EXECUTED
2003604: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED
2003608: 32 80 00 02 bne,a 2003610 <oproc+0x144> <== NOT EXECUTED
200360c: b0 06 3f e0 add %i0, -32, %i0 <== NOT EXECUTED
2003610: f0 2f a0 44 stb %i0, [ %fp + 0x44 ] <== NOT EXECUTED
if (!iscntrl(c))
2003614: c4 0f a0 44 ldub [ %fp + 0x44 ], %g2 <== NOT EXECUTED
2003618: 03 00 80 5b sethi %hi(0x2016c00), %g1
200361c: c2 00 62 f8 ld [ %g1 + 0x2f8 ], %g1 ! 2016ef8 <__ctype_ptr>
2003620: c2 08 40 02 ldub [ %g1 + %g2 ], %g1
2003624: 80 88 60 20 btst 0x20, %g1
2003628: 12 80 00 06 bne 2003640 <oproc+0x174> <== NEVER TAKEN
200362c: 94 10 00 19 mov %i1, %o2
tty->column++;
2003630: c2 06 60 28 ld [ %i1 + 0x28 ], %g1
2003634: 82 00 60 01 inc %g1
2003638: c2 26 60 28 st %g1, [ %i1 + 0x28 ]
break;
}
}
rtems_termios_puts (&c, 1, tty);
200363c: 94 10 00 19 mov %i1, %o2
2003640: 90 07 a0 44 add %fp, 0x44, %o0
2003644: 7f ff ff 56 call 200339c <rtems_termios_puts>
2003648: 92 10 20 01 mov 1, %o1
200364c: 81 c7 e0 08 ret
2003650: 81 e8 00 00 restore
0200466c <posix_memalign>:
)
{
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
200466c: 03 00 80 75 sethi %hi(0x201d400), %g1
2004670: 82 10 62 c0 or %g1, 0x2c0, %g1 ! 201d6c0 <rtems_malloc_statistics>
2004674: c4 00 60 08 ld [ %g1 + 8 ], %g2
2004678: 84 00 a0 01 inc %g2
200467c: c4 20 60 08 st %g2, [ %g1 + 8 ]
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
2004680: 82 02 7f ff add %o1, -1, %g1
2004684: 80 88 40 09 btst %g1, %o1
2004688: 12 80 00 04 bne 2004698 <posix_memalign+0x2c> <== NEVER TAKEN
200468c: 80 a2 60 03 cmp %o1, 3
2004690: 18 80 00 04 bgu 20046a0 <posix_memalign+0x34>
2004694: 01 00 00 00 nop
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
}
2004698: 81 c3 e0 08 retl
200469c: 90 10 20 16 mov 0x16, %o0 ! 16 <PROM_START+0x16>
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
20046a0: 82 13 c0 00 mov %o7, %g1
20046a4: 40 00 01 3f call 2004ba0 <rtems_memalign>
20046a8: 9e 10 40 00 mov %g1, %o7
02005648 <pthread_barrier_init>:
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
2005648: 9d e3 bf 88 save %sp, -120, %sp
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
200564c: 80 a6 20 00 cmp %i0, 0
2005650: 02 80 00 31 be 2005714 <pthread_barrier_init+0xcc>
2005654: a0 10 00 19 mov %i1, %l0
return EINVAL;
if ( count == 0 )
2005658: 80 a6 a0 00 cmp %i2, 0
200565c: 02 80 00 2e be 2005714 <pthread_barrier_init+0xcc>
2005660: 80 a6 60 00 cmp %i1, 0
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
2005664: 32 80 00 06 bne,a 200567c <pthread_barrier_init+0x34>
2005668: c2 04 00 00 ld [ %l0 ], %g1
the_attr = attr;
} else {
(void) pthread_barrierattr_init( &my_attr );
200566c: a0 07 bf e8 add %fp, -24, %l0
2005670: 7f ff ff bf call 200556c <pthread_barrierattr_init>
2005674: 90 10 00 10 mov %l0, %o0
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
2005678: c2 04 00 00 ld [ %l0 ], %g1
200567c: 80 a0 60 00 cmp %g1, 0
2005680: 02 80 00 25 be 2005714 <pthread_barrier_init+0xcc>
2005684: 01 00 00 00 nop
return EINVAL;
switch ( the_attr->process_shared ) {
2005688: c2 04 20 04 ld [ %l0 + 4 ], %g1
200568c: 80 a0 60 00 cmp %g1, 0
2005690: 12 80 00 21 bne 2005714 <pthread_barrier_init+0xcc> <== NEVER TAKEN
2005694: 05 00 80 64 sethi %hi(0x2019000), %g2
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
2005698: c2 00 a0 50 ld [ %g2 + 0x50 ], %g1 ! 2019050 <_Thread_Dispatch_disable_level>
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
the_attributes.maximum_count = count;
200569c: f4 27 bf f4 st %i2, [ %fp + -12 ]
20056a0: 82 00 60 01 inc %g1
}
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
20056a4: c0 27 bf f0 clr [ %fp + -16 ]
20056a8: c2 20 a0 50 st %g1, [ %g2 + 0x50 ]
* This function allocates a barrier control block from
* the inactive chain of free barrier control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void )
{
return (POSIX_Barrier_Control *)
20056ac: 35 00 80 65 sethi %hi(0x2019400), %i2
20056b0: 40 00 08 e7 call 2007a4c <_Objects_Allocate>
20056b4: 90 16 a0 60 or %i2, 0x60, %o0 ! 2019460 <_POSIX_Barrier_Information>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
20056b8: a0 92 20 00 orcc %o0, 0, %l0
20056bc: 12 80 00 06 bne 20056d4 <pthread_barrier_init+0x8c>
20056c0: 90 04 20 10 add %l0, 0x10, %o0
_Thread_Enable_dispatch();
20056c4: 40 00 0c 7d call 20088b8 <_Thread_Enable_dispatch>
20056c8: b0 10 20 0b mov 0xb, %i0
20056cc: 81 c7 e0 08 ret
20056d0: 81 e8 00 00 restore
return EAGAIN;
}
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
20056d4: 40 00 06 ab call 2007180 <_CORE_barrier_Initialize>
20056d8: 92 07 bf f0 add %fp, -16, %o1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
20056dc: c4 04 20 08 ld [ %l0 + 8 ], %g2
20056e0: 82 16 a0 60 or %i2, 0x60, %g1
20056e4: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
20056e8: 03 00 00 3f sethi %hi(0xfc00), %g1
20056ec: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
20056f0: 82 08 80 01 and %g2, %g1, %g1
20056f4: 83 28 60 02 sll %g1, 2, %g1
20056f8: e0 20 c0 01 st %l0, [ %g3 + %g1 ]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == FALSE */
the_object->name.name_u32 = name;
20056fc: c0 24 20 0c clr [ %l0 + 0xc ]
);
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
2005700: c4 26 00 00 st %g2, [ %i0 ]
_Thread_Enable_dispatch();
2005704: 40 00 0c 6d call 20088b8 <_Thread_Enable_dispatch>
2005708: b0 10 20 00 clr %i0
200570c: 81 c7 e0 08 ret
2005710: 81 e8 00 00 restore
return 0;
}
2005714: 81 c7 e0 08 ret
2005718: 91 e8 20 16 restore %g0, 0x16, %o0
02004c70 <pthread_cancel>:
*/
int pthread_cancel(
pthread_t thread
)
{
2004c70: 9d e3 bf 90 save %sp, -112, %sp
/*
* Don't even think about deleting a resource from an ISR.
*/
if ( _ISR_Is_in_progress() )
2004c74: 03 00 80 56 sethi %hi(0x2015800), %g1
2004c78: c2 00 62 c0 ld [ %g1 + 0x2c0 ], %g1 ! 2015ac0 <_ISR_Nest_level>
*/
int pthread_cancel(
pthread_t thread
)
{
2004c7c: 90 10 00 18 mov %i0, %o0
/*
* Don't even think about deleting a resource from an ISR.
*/
if ( _ISR_Is_in_progress() )
2004c80: 80 a0 60 00 cmp %g1, 0
2004c84: 12 80 00 1d bne 2004cf8 <pthread_cancel+0x88> <== NEVER TAKEN
2004c88: b0 10 20 47 mov 0x47, %i0
return EPROTO;
the_thread = _Thread_Get( thread, &location );
2004c8c: 40 00 0d 0a call 20080b4 <_Thread_Get>
2004c90: 92 07 bf f4 add %fp, -12, %o1
switch ( location ) {
2004c94: c2 07 bf f4 ld [ %fp + -12 ], %g1
*/
if ( _ISR_Is_in_progress() )
return EPROTO;
the_thread = _Thread_Get( thread, &location );
2004c98: a0 10 00 08 mov %o0, %l0
switch ( location ) {
2004c9c: 80 a0 60 00 cmp %g1, 0
2004ca0: 12 80 00 16 bne 2004cf8 <pthread_cancel+0x88> <== NEVER TAKEN
2004ca4: b0 10 20 16 mov 0x16, %i0
case OBJECTS_LOCAL:
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
2004ca8: c6 02 21 6c ld [ %o0 + 0x16c ], %g3
thread_support->cancelation_requested = 1;
2004cac: 82 10 20 01 mov 1, %g1
if (thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
2004cb0: c4 00 e0 cc ld [ %g3 + 0xcc ], %g2
switch ( location ) {
case OBJECTS_LOCAL:
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
thread_support->cancelation_requested = 1;
2004cb4: c2 20 e0 d4 st %g1, [ %g3 + 0xd4 ]
if (thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
2004cb8: 80 a0 a0 00 cmp %g2, 0
2004cbc: 12 80 00 07 bne 2004cd8 <pthread_cancel+0x68> <== NEVER TAKEN
2004cc0: b0 10 20 00 clr %i0
2004cc4: c2 00 e0 d0 ld [ %g3 + 0xd0 ], %g1
2004cc8: 82 18 60 01 xor %g1, 1, %g1
2004ccc: 80 a0 00 01 cmp %g0, %g1
2004cd0: 82 60 3f ff subx %g0, -1, %g1
2004cd4: b0 10 00 01 mov %g1, %i0
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS)
cancel = true;
_Thread_Enable_dispatch();
2004cd8: 40 00 0c ea call 2008080 <_Thread_Enable_dispatch>
2004cdc: 01 00 00 00 nop
if ( cancel )
2004ce0: 80 8e 20 ff btst 0xff, %i0
2004ce4: 02 80 00 05 be 2004cf8 <pthread_cancel+0x88>
2004ce8: b0 10 20 00 clr %i0
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
2004cec: 90 10 00 10 mov %l0, %o0
2004cf0: 40 00 00 b7 call 2004fcc <_POSIX_Thread_Exit>
2004cf4: 92 10 3f ff mov -1, %o1
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
2004cf8: 81 c7 e0 08 ret
2004cfc: 81 e8 00 00 restore
020051a0 <pthread_cleanup_pop>:
*/
void pthread_cleanup_pop(
int execute
)
{
20051a0: 9d e3 bf 88 save %sp, -120, %sp
POSIX_Cancel_Handler_control tmp_handler;
Chain_Control *handler_stack;
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
20051a4: 03 00 80 59 sethi %hi(0x2016400), %g1
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
20051a8: 07 00 80 59 sethi %hi(0x2016400), %g3
20051ac: c4 00 63 f4 ld [ %g1 + 0x3f4 ], %g2
20051b0: c2 00 e3 30 ld [ %g3 + 0x330 ], %g1
20051b4: e0 00 a1 6c ld [ %g2 + 0x16c ], %l0
20051b8: 82 00 60 01 inc %g1
*/
void pthread_cleanup_pop(
int execute
)
{
20051bc: a4 10 00 18 mov %i0, %l2
20051c0: c2 20 e3 30 st %g1, [ %g3 + 0x330 ]
* ensure that we do not get prempted and deleted while we are holding
* memory that needs to be freed.
*/
_Thread_Disable_dispatch();
_ISR_Disable( level );
20051c4: 7f ff f4 76 call 200239c <sparc_disable_interrupts>
20051c8: 01 00 00 00 nop
20051cc: b0 10 00 08 mov %o0, %i0
if ( _Chain_Is_empty( handler_stack ) ) {
20051d0: c2 04 20 d8 ld [ %l0 + 0xd8 ], %g1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
20051d4: a0 04 20 dc add %l0, 0xdc, %l0
20051d8: 80 a0 40 10 cmp %g1, %l0
20051dc: 32 80 00 06 bne,a 20051f4 <pthread_cleanup_pop+0x54>
20051e0: e0 04 20 04 ld [ %l0 + 4 ], %l0
_Thread_Enable_dispatch();
20051e4: 40 00 0d cb call 2008910 <_Thread_Enable_dispatch>
20051e8: 01 00 00 00 nop
_ISR_Enable( level );
20051ec: 7f ff f4 70 call 20023ac <sparc_enable_interrupts>
20051f0: 81 e8 00 00 restore
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
20051f4: c4 04 00 00 ld [ %l0 ], %g2
previous = the_node->previous;
20051f8: c2 04 20 04 ld [ %l0 + 4 ], %g1
next->previous = previous;
previous->next = next;
20051fc: c4 20 40 00 st %g2, [ %g1 ]
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
2005200: c2 20 a0 04 st %g1, [ %g2 + 4 ]
handler = (POSIX_Cancel_Handler_control *)
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
2005204: 7f ff f4 6a call 20023ac <sparc_enable_interrupts>
2005208: 01 00 00 00 nop
tmp_handler = *handler;
200520c: 92 10 00 10 mov %l0, %o1
2005210: 94 10 20 10 mov 0x10, %o2
2005214: 40 00 26 21 call 200ea98 <memcpy>
2005218: 90 07 bf e8 add %fp, -24, %o0
_Workspace_Free( handler );
200521c: 90 10 00 10 mov %l0, %o0
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
tmp_handler = *handler;
2005220: e2 07 bf f0 ld [ %fp + -16 ], %l1
_Workspace_Free( handler );
2005224: 40 00 13 0a call 2009e4c <_Workspace_Free>
2005228: e0 07 bf f4 ld [ %fp + -12 ], %l0
_Thread_Enable_dispatch();
200522c: 40 00 0d b9 call 2008910 <_Thread_Enable_dispatch>
2005230: 01 00 00 00 nop
if ( execute )
2005234: 80 a4 a0 00 cmp %l2, 0
2005238: 02 80 00 04 be 2005248 <pthread_cleanup_pop+0xa8> <== NEVER TAKEN
200523c: 01 00 00 00 nop
(*tmp_handler.routine)( tmp_handler.arg );
2005240: 9f c4 40 00 call %l1
2005244: 90 10 00 10 mov %l0, %o0
2005248: 81 c7 e0 08 ret
200524c: 81 e8 00 00 restore
02005250 <pthread_cleanup_push>:
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
2005250: 9d e3 bf 98 save %sp, -104, %sp
/*
* The POSIX standard does not address what to do when the routine
* is NULL. It also does not address what happens when we cannot
* allocate memory or anything else bad happens.
*/
if ( !routine )
2005254: 80 a6 20 00 cmp %i0, 0
2005258: 02 80 00 12 be 20052a0 <pthread_cleanup_push+0x50>
200525c: 05 00 80 59 sethi %hi(0x2016400), %g2
2005260: c2 00 a3 30 ld [ %g2 + 0x330 ], %g1 ! 2016730 <_Thread_Dispatch_disable_level>
2005264: 82 00 60 01 inc %g1
2005268: c2 20 a3 30 st %g1, [ %g2 + 0x330 ]
return;
_Thread_Disable_dispatch();
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
200526c: 40 00 12 ff call 2009e68 <_Workspace_Allocate>
2005270: 90 10 20 10 mov 0x10, %o0
if ( handler ) {
2005274: 92 92 20 00 orcc %o0, 0, %o1
2005278: 02 80 00 08 be 2005298 <pthread_cleanup_push+0x48> <== NEVER TAKEN
200527c: 03 00 80 59 sethi %hi(0x2016400), %g1
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
2005280: c2 00 63 f4 ld [ %g1 + 0x3f4 ], %g1 ! 20167f4 <_Thread_Executing>
handler->routine = routine;
2005284: f0 22 60 08 st %i0, [ %o1 + 8 ]
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
if ( handler ) {
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
2005288: d0 00 61 6c ld [ %g1 + 0x16c ], %o0
handler->routine = routine;
handler->arg = arg;
200528c: f2 22 60 0c st %i1, [ %o1 + 0xc ]
_Chain_Append( handler_stack, &handler->Node );
2005290: 40 00 07 f6 call 2007268 <_Chain_Append>
2005294: 90 02 20 d8 add %o0, 0xd8, %o0
}
_Thread_Enable_dispatch();
2005298: 40 00 0d 9e call 2008910 <_Thread_Enable_dispatch>
200529c: 81 e8 00 00 restore
20052a0: 81 c7 e0 08 ret
20052a4: 81 e8 00 00 restore
02005f10 <pthread_cond_init>:
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
2005f10: 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;
2005f14: 03 00 80 53 sethi %hi(0x2014c00), %g1
2005f18: 80 a6 60 00 cmp %i1, 0
2005f1c: 02 80 00 03 be 2005f28 <pthread_cond_init+0x18>
2005f20: a0 10 61 cc or %g1, 0x1cc, %l0
2005f24: a0 10 00 19 mov %i1, %l0
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
2005f28: c2 04 20 04 ld [ %l0 + 4 ], %g1
2005f2c: 80 a0 60 01 cmp %g1, 1
2005f30: 02 80 00 28 be 2005fd0 <pthread_cond_init+0xc0> <== NEVER TAKEN
2005f34: 01 00 00 00 nop
return EINVAL;
if ( !the_attr->is_initialized )
2005f38: c2 04 00 00 ld [ %l0 ], %g1
2005f3c: 80 a0 60 00 cmp %g1, 0
2005f40: 02 80 00 24 be 2005fd0 <pthread_cond_init+0xc0>
2005f44: 05 00 80 5a sethi %hi(0x2016800), %g2
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
2005f48: c2 00 a2 20 ld [ %g2 + 0x220 ], %g1 ! 2016a20 <_Thread_Dispatch_disable_level>
2005f4c: 82 00 60 01 inc %g1
2005f50: c2 20 a2 20 st %g1, [ %g2 + 0x220 ]
*/
RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control
*_POSIX_Condition_variables_Allocate( void )
{
return (POSIX_Condition_variables_Control *)
2005f54: 23 00 80 5b sethi %hi(0x2016c00), %l1
2005f58: 40 00 0a 53 call 20088a4 <_Objects_Allocate>
2005f5c: 90 14 62 b4 or %l1, 0x2b4, %o0 ! 2016eb4 <_POSIX_Condition_variables_Information>
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
2005f60: b2 92 20 00 orcc %o0, 0, %i1
2005f64: 32 80 00 06 bne,a 2005f7c <pthread_cond_init+0x6c>
2005f68: c2 04 20 04 ld [ %l0 + 4 ], %g1
_Thread_Enable_dispatch();
2005f6c: 40 00 0d e9 call 2009710 <_Thread_Enable_dispatch>
2005f70: b0 10 20 0c mov 0xc, %i0
2005f74: 81 c7 e0 08 ret
2005f78: 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(
2005f7c: 90 06 60 18 add %i1, 0x18, %o0
if ( !the_cond ) {
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
2005f80: c2 26 60 10 st %g1, [ %i1 + 0x10 ]
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
/* XXX some more initialization might need to go here */
_Thread_queue_Initialize(
2005f84: 92 10 20 00 clr %o1
2005f88: 94 10 28 00 mov 0x800, %o2
2005f8c: 96 10 20 74 mov 0x74, %o3
2005f90: 40 00 10 0f call 2009fcc <_Thread_queue_Initialize>
2005f94: c0 26 60 14 clr [ %i1 + 0x14 ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2005f98: c4 06 60 08 ld [ %i1 + 8 ], %g2
2005f9c: 82 14 62 b4 or %l1, 0x2b4, %g1
2005fa0: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
2005fa4: 03 00 00 3f sethi %hi(0xfc00), %g1
2005fa8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
2005fac: 82 08 80 01 and %g2, %g1, %g1
2005fb0: 83 28 60 02 sll %g1, 2, %g1
2005fb4: f2 20 c0 01 st %i1, [ %g3 + %g1 ]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == FALSE */
the_object->name.name_u32 = name;
2005fb8: c0 26 60 0c clr [ %i1 + 0xc ]
&_POSIX_Condition_variables_Information,
&the_cond->Object,
0
);
*cond = the_cond->Object.id;
2005fbc: c4 26 00 00 st %g2, [ %i0 ]
_Thread_Enable_dispatch();
2005fc0: 40 00 0d d4 call 2009710 <_Thread_Enable_dispatch>
2005fc4: b0 10 20 00 clr %i0
2005fc8: 81 c7 e0 08 ret
2005fcc: 81 e8 00 00 restore
return 0;
}
2005fd0: 81 c7 e0 08 ret
2005fd4: 91 e8 20 16 restore %g0, 0x16, %o0
02005d88 <pthread_condattr_destroy>:
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
if ( !attr || attr->is_initialized == FALSE )
2005d88: 80 a2 20 00 cmp %o0, 0
2005d8c: 02 80 00 09 be 2005db0 <pthread_condattr_destroy+0x28>
2005d90: 01 00 00 00 nop
2005d94: c2 02 00 00 ld [ %o0 ], %g1
2005d98: 80 a0 60 00 cmp %g1, 0
2005d9c: 02 80 00 05 be 2005db0 <pthread_condattr_destroy+0x28> <== NEVER TAKEN
2005da0: 01 00 00 00 nop
return EINVAL;
attr->is_initialized = FALSE;
2005da4: c0 22 00 00 clr [ %o0 ]
2005da8: 81 c3 e0 08 retl
2005dac: 90 10 20 00 clr %o0
return 0;
}
2005db0: 81 c3 e0 08 retl
2005db4: 90 10 20 16 mov 0x16, %o0
020061e8 <pthread_create>:
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
20061e8: 9d e3 bf 60 save %sp, -160, %sp
20061ec: ac 10 00 18 mov %i0, %l6
POSIX_API_Control *api;
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
if ( !start_routine )
20061f0: 80 a6 a0 00 cmp %i2, 0
20061f4: 02 80 00 7b be 20063e0 <pthread_create+0x1f8>
20061f8: b0 10 20 0e mov 0xe, %i0
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
20061fc: 03 00 80 66 sethi %hi(0x2019800), %g1
2006200: 80 a6 60 00 cmp %i1, 0
2006204: 02 80 00 03 be 2006210 <pthread_create+0x28>
2006208: a4 10 63 b0 or %g1, 0x3b0, %l2
200620c: a4 10 00 19 mov %i1, %l2
if ( !the_attr->is_initialized )
2006210: c2 04 80 00 ld [ %l2 ], %g1
2006214: 80 a0 60 00 cmp %g1, 0
2006218: 22 80 00 72 be,a 20063e0 <pthread_create+0x1f8>
200621c: b0 10 20 16 mov 0x16, %i0
* stack space if it is allowed to allocate it itself.
*
* NOTE: If the user provides the stack we will let it drop below
* twice the minimum.
*/
if ( the_attr->stackaddr && !_Stack_Is_enough(the_attr->stacksize) )
2006220: c2 04 a0 04 ld [ %l2 + 4 ], %g1
2006224: 80 a0 60 00 cmp %g1, 0
2006228: 02 80 00 07 be 2006244 <pthread_create+0x5c>
200622c: 03 00 80 6b sethi %hi(0x201ac00), %g1
2006230: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 ! 201ac20 <rtems_minimum_stack_size>
2006234: c2 04 a0 08 ld [ %l2 + 8 ], %g1
2006238: 80 a0 40 02 cmp %g1, %g2
200623c: 2a 80 00 69 bcs,a 20063e0 <pthread_create+0x1f8> <== ALWAYS TAKEN
2006240: b0 10 20 16 mov 0x16, %i0
* inherits scheduling attributes from the creating thread. If it is
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
2006244: c2 04 a0 10 ld [ %l2 + 0x10 ], %g1
2006248: 80 a0 60 01 cmp %g1, 1
200624c: 02 80 00 06 be 2006264 <pthread_create+0x7c>
2006250: 80 a0 60 02 cmp %g1, 2
2006254: 12 80 00 63 bne 20063e0 <pthread_create+0x1f8>
2006258: b0 10 20 16 mov 0x16, %i0
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
200625c: 10 80 00 0a b 2006284 <pthread_create+0x9c>
2006260: e6 04 a0 14 ld [ %l2 + 0x14 ], %l3
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
2006264: 03 00 80 6e sethi %hi(0x201b800), %g1
2006268: c2 00 62 e4 ld [ %g1 + 0x2e4 ], %g1 ! 201bae4 <_Thread_Executing>
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
200626c: 90 07 bf e0 add %fp, -32, %o0
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
2006270: c2 00 61 6c ld [ %g1 + 0x16c ], %g1
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
2006274: 94 10 20 18 mov 0x18, %o2
2006278: 92 00 60 80 add %g1, 0x80, %o1
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
schedpolicy = api->schedpolicy;
200627c: 10 80 00 05 b 2006290 <pthread_create+0xa8>
2006280: e6 00 60 7c ld [ %g1 + 0x7c ], %l3
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
schedparam = the_attr->schedparam;
2006284: 90 07 bf e0 add %fp, -32, %o0
2006288: 92 04 a0 18 add %l2, 0x18, %o1
200628c: 94 10 20 18 mov 0x18, %o2
2006290: 40 00 24 f2 call 200f658 <memcpy>
2006294: b0 10 20 86 mov 0x86, %i0
/*
* Check the contentionscope since rtems only supports PROCESS wide
* contention (i.e. no system wide contention).
*/
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
2006298: c2 04 a0 0c ld [ %l2 + 0xc ], %g1
200629c: 80 a0 60 00 cmp %g1, 0
20062a0: 12 80 00 50 bne 20063e0 <pthread_create+0x1f8>
20062a4: ea 07 bf e0 ld [ %fp + -32 ], %l5
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
20062a8: 82 05 7f ff add %l5, -1, %g1
20062ac: 80 a0 60 fd cmp %g1, 0xfd
20062b0: 18 80 00 7e bgu 20064a8 <pthread_create+0x2c0> <== NEVER TAKEN
20062b4: 80 a4 e0 01 cmp %l3, 1
*/
budget_callout = NULL;
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
switch ( schedpolicy ) {
20062b8: 02 80 00 10 be 20062f8 <pthread_create+0x110>
20062bc: a2 10 20 00 clr %l1
20062c0: 14 80 00 08 bg 20062e0 <pthread_create+0xf8>
20062c4: 80 a4 e0 02 cmp %l3, 2
20062c8: 80 a4 e0 00 cmp %l3, 0
20062cc: a2 10 20 01 mov 1, %l1
20062d0: 02 80 00 1a be 2006338 <pthread_create+0x150>
20062d4: a0 10 20 00 clr %l0
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
20062d8: 81 c7 e0 08 ret
20062dc: 91 e8 20 16 restore %g0, 0x16, %o0
*/
budget_callout = NULL;
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
switch ( schedpolicy ) {
20062e0: 02 80 00 05 be 20062f4 <pthread_create+0x10c> <== NEVER TAKEN
20062e4: 80 a4 e0 03 cmp %l3, 3
20062e8: 12 80 00 3e bne 20063e0 <pthread_create+0x1f8> <== NEVER TAKEN
20062ec: b0 10 20 16 mov 0x16, %i0
20062f0: 30 80 00 04 b,a 2006300 <pthread_create+0x118>
20062f4: a2 10 20 02 mov 2, %l1 <== NOT EXECUTED
20062f8: 10 80 00 10 b 2006338 <pthread_create+0x150>
20062fc: a0 10 20 00 clr %l0
case SCHED_SPORADIC:
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
budget_callout = _POSIX_Threads_Sporadic_budget_callout;
if ( _Timespec_To_ticks( &schedparam.ss_replenish_period ) <
2006300: 40 00 11 0e call 200a738 <_Timespec_To_ticks>
2006304: 90 07 bf e8 add %fp, -24, %o0
2006308: a0 10 00 08 mov %o0, %l0
200630c: 40 00 11 0b call 200a738 <_Timespec_To_ticks>
2006310: 90 07 bf f0 add %fp, -16, %o0
2006314: 80 a4 00 08 cmp %l0, %o0
2006318: 0a 80 00 64 bcs 20064a8 <pthread_create+0x2c0>
200631c: 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 ) )
2006320: 82 00 7f ff add %g1, -1, %g1
2006324: 80 a0 60 fd cmp %g1, 0xfd
2006328: 18 80 00 60 bgu 20064a8 <pthread_create+0x2c0>
200632c: 03 00 80 19 sethi %hi(0x2006400), %g1
2006330: a2 10 20 03 mov 3, %l1
2006334: a0 10 63 f0 or %g1, 0x3f0, %l0
#endif
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
2006338: 29 00 80 6e sethi %hi(0x201b800), %l4
200633c: 40 00 06 f1 call 2007f00 <_API_Mutex_Lock>
2006340: d0 05 22 dc ld [ %l4 + 0x2dc ], %o0 ! 201badc <_RTEMS_Allocator_Mutex>
* _POSIX_Threads_Allocate
*/
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
2006344: 11 00 80 6f sethi %hi(0x201bc00), %o0
2006348: 40 00 09 58 call 20088a8 <_Objects_Allocate>
200634c: 90 12 20 b0 or %o0, 0xb0, %o0 ! 201bcb0 <_POSIX_Threads_Information>
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
2006350: b2 92 20 00 orcc %o0, 0, %i1
2006354: 32 80 00 04 bne,a 2006364 <pthread_create+0x17c>
2006358: c4 04 a0 08 ld [ %l2 + 8 ], %g2
_RTEMS_Unlock_allocator();
200635c: 10 80 00 1f b 20063d8 <pthread_create+0x1f0>
2006360: d0 05 22 dc ld [ %l4 + 0x2dc ], %o0
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
2006364: 03 00 80 6b sethi %hi(0x201ac00), %g1
2006368: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 ! 201ac20 <rtems_minimum_stack_size>
200636c: c0 27 bf dc clr [ %fp + -36 ]
2006370: 97 28 60 01 sll %g1, 1, %o3
2006374: 80 a2 c0 02 cmp %o3, %g2
2006378: 1a 80 00 03 bcc 2006384 <pthread_create+0x19c>
200637c: d4 04 a0 04 ld [ %l2 + 4 ], %o2
2006380: 96 10 00 02 mov %g2, %o3
2006384: 82 07 bf dc add %fp, -36, %g1
2006388: e2 23 a0 60 st %l1, [ %sp + 0x60 ]
200638c: e0 23 a0 64 st %l0, [ %sp + 0x64 ]
2006390: c0 23 a0 68 clr [ %sp + 0x68 ]
2006394: 9a 10 20 ff mov 0xff, %o5
2006398: a2 10 20 01 mov 1, %l1
200639c: 9a 23 40 15 sub %o5, %l5, %o5
20063a0: e2 23 a0 5c st %l1, [ %sp + 0x5c ]
20063a4: c2 23 a0 6c st %g1, [ %sp + 0x6c ]
20063a8: 21 00 80 6f sethi %hi(0x201bc00), %l0
20063ac: 92 10 00 19 mov %i1, %o1
20063b0: 90 14 20 b0 or %l0, 0xb0, %o0
20063b4: 40 00 0d 27 call 2009850 <_Thread_Initialize>
20063b8: 98 10 20 01 mov 1, %o4
budget_callout,
0, /* isr level */
name /* posix threads don't have a name */
);
if ( !status ) {
20063bc: 80 8a 20 ff btst 0xff, %o0
20063c0: 12 80 00 0a bne 20063e8 <pthread_create+0x200>
20063c4: 90 14 20 b0 or %l0, 0xb0, %o0
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
Thread_Control *the_pthread
)
{
_Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
20063c8: 40 00 0a 25 call 2008c5c <_Objects_Free>
20063cc: 92 10 00 19 mov %i1, %o1
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
20063d0: 03 00 80 6e sethi %hi(0x201b800), %g1
20063d4: d0 00 62 dc ld [ %g1 + 0x2dc ], %o0 ! 201badc <_RTEMS_Allocator_Mutex>
20063d8: 40 00 06 e0 call 2007f58 <_API_Mutex_Unlock>
20063dc: b0 10 20 0b mov 0xb, %i0
20063e0: 81 c7 e0 08 ret
20063e4: 81 e8 00 00 restore
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
20063e8: e0 06 61 6c ld [ %i1 + 0x16c ], %l0
api->Attributes = *the_attr;
20063ec: 92 10 00 12 mov %l2, %o1
20063f0: 94 10 20 38 mov 0x38, %o2
20063f4: 40 00 24 99 call 200f658 <memcpy>
20063f8: 90 10 00 10 mov %l0, %o0
api->detachstate = the_attr->detachstate;
20063fc: c2 04 a0 34 ld [ %l2 + 0x34 ], %g1
api->schedpolicy = schedpolicy;
api->schedparam = schedparam;
2006400: 92 07 bf e0 add %fp, -32, %o1
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
2006404: c2 24 20 38 st %g1, [ %l0 + 0x38 ]
api->schedpolicy = schedpolicy;
api->schedparam = schedparam;
2006408: 94 10 20 18 mov 0x18, %o2
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
api->schedpolicy = schedpolicy;
200640c: e6 24 20 7c st %l3, [ %l0 + 0x7c ]
api->schedparam = schedparam;
2006410: 40 00 24 92 call 200f658 <memcpy>
2006414: 90 04 20 80 add %l0, 0x80, %o0
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
2006418: 94 10 00 1a mov %i2, %o2
* first run.
*
* NOTE: Since the thread starts with all unblocked, this is necessary.
*/
the_thread->do_post_task_switch_extension = true;
200641c: e2 2e 60 75 stb %l1, [ %i1 + 0x75 ]
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
2006420: 96 10 00 1b mov %i3, %o3
2006424: 90 10 00 19 mov %i1, %o0
2006428: 92 10 20 01 mov 1, %o1
200642c: 40 00 10 0a call 200a454 <_Thread_Start>
2006430: 98 10 20 00 clr %o4
start_routine,
arg,
0 /* unused */
);
if ( schedpolicy == SCHED_SPORADIC ) {
2006434: 80 a4 e0 03 cmp %l3, 3
2006438: 12 80 00 09 bne 200645c <pthread_create+0x274>
200643c: a2 10 00 08 mov %o0, %l1
_Watchdog_Insert_ticks(
2006440: 40 00 10 be call 200a738 <_Timespec_To_ticks>
2006444: 90 04 20 88 add %l0, 0x88, %o0
2006448: 92 04 20 9c add %l0, 0x9c, %o1
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
200644c: d0 24 20 a8 st %o0, [ %l0 + 0xa8 ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2006450: 11 00 80 6e sethi %hi(0x201b800), %o0
2006454: 40 00 11 b5 call 200ab28 <_Watchdog_Insert>
2006458: 90 12 23 04 or %o0, 0x304, %o0 ! 201bb04 <_Watchdog_Ticks_chain>
*
* NOTE: This can only happen if someone slips in and touches the
* thread while we are creating it.
*/
if ( !status ) {
200645c: 80 8c 60 ff btst 0xff, %l1
2006460: 12 80 00 0b bne 200648c <pthread_create+0x2a4> <== ALWAYS TAKEN
2006464: 21 00 80 6e sethi %hi(0x201b800), %l0
2006468: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200646c: 11 00 80 6f sethi %hi(0x201bc00), %o0 <== NOT EXECUTED
2006470: 40 00 09 fb call 2008c5c <_Objects_Free> <== NOT EXECUTED
2006474: 90 12 20 b0 or %o0, 0xb0, %o0 ! 201bcb0 <_POSIX_Threads_Information><== NOT EXECUTED
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
2006478: d0 04 22 dc ld [ %l0 + 0x2dc ], %o0 <== NOT EXECUTED
200647c: 40 00 06 b7 call 2007f58 <_API_Mutex_Unlock> <== NOT EXECUTED
2006480: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED
2006484: 81 c7 e0 08 ret <== NOT EXECUTED
2006488: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
200648c: c2 06 60 08 ld [ %i1 + 8 ], %g1
_RTEMS_Unlock_allocator();
2006490: d0 04 22 dc ld [ %l0 + 0x2dc ], %o0
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
2006494: c2 25 80 00 st %g1, [ %l6 ]
_RTEMS_Unlock_allocator();
2006498: 40 00 06 b0 call 2007f58 <_API_Mutex_Unlock>
200649c: b0 10 20 00 clr %i0
20064a0: 81 c7 e0 08 ret
20064a4: 81 e8 00 00 restore
return 0;
20064a8: b0 10 20 16 mov 0x16, %i0
}
20064ac: 81 c7 e0 08 ret
20064b0: 81 e8 00 00 restore
020051f8 <pthread_key_create>:
int pthread_key_create(
pthread_key_t *key,
void (*destructor)( void * )
)
{
20051f8: 9d e3 bf 98 save %sp, -104, %sp
20051fc: 03 00 80 56 sethi %hi(0x2015800), %g1
2005200: c4 00 61 80 ld [ %g1 + 0x180 ], %g2 ! 2015980 <_Thread_Dispatch_disable_level>
2005204: 84 00 a0 01 inc %g2
2005208: c4 20 61 80 st %g2, [ %g1 + 0x180 ]
* _POSIX_Keys_Allocate
*/
RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void )
{
return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information );
200520c: 11 00 80 57 sethi %hi(0x2015c00), %o0
2005210: 40 00 09 6e call 20077c8 <_Objects_Allocate>
2005214: 90 12 21 d4 or %o0, 0x1d4, %o0 ! 2015dd4 <_POSIX_Keys_Information>
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
2005218: a0 92 20 00 orcc %o0, 0, %l0
200521c: 32 80 00 06 bne,a 2005234 <pthread_key_create+0x3c>
2005220: f2 24 20 14 st %i1, [ %l0 + 0x14 ]
_Thread_Enable_dispatch();
2005224: 40 00 0d 04 call 2008634 <_Thread_Enable_dispatch>
2005228: b0 10 20 0b mov 0xb, %i0
200522c: 81 c7 e0 08 ret
2005230: 81 e8 00 00 restore
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
if ( _Objects_Information_table[ the_api ] ) {
2005234: 03 00 80 56 sethi %hi(0x2015800), %g1
if ( !the_key ) {
_Thread_Enable_dispatch();
return EAGAIN;
}
the_key->destructor = destructor;
2005238: a2 10 00 10 mov %l0, %l1
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
if ( _Objects_Information_table[ the_api ] ) {
200523c: a6 10 60 e0 or %g1, 0xe0, %l3
if ( !the_key ) {
_Thread_Enable_dispatch();
return EAGAIN;
}
the_key->destructor = destructor;
2005240: b2 10 20 01 mov 1, %i1
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
if ( _Objects_Information_table[ the_api ] ) {
2005244: 83 2e 60 02 sll %i1, 2, %g1
2005248: c2 04 c0 01 ld [ %l3 + %g1 ], %g1
200524c: 80 a0 60 00 cmp %g1, 0
2005250: 22 80 00 24 be,a 20052e0 <pthread_key_create+0xe8>
2005254: c0 24 60 1c clr [ %l1 + 0x1c ]
INTERNAL_ERROR_CORE,
TRUE,
INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY
);
#endif
bytes_to_allocate = sizeof( void * ) *
2005258: c2 00 60 04 ld [ %g1 + 4 ], %g1
200525c: c2 10 60 10 lduh [ %g1 + 0x10 ], %g1
2005260: 82 00 60 01 inc %g1
2005264: a5 28 60 02 sll %g1, 2, %l2
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
2005268: 40 00 12 70 call 2009c28 <_Workspace_Allocate>
200526c: 90 10 00 12 mov %l2, %o0
if ( !table ) {
2005270: 82 92 20 00 orcc %o0, 0, %g1
2005274: 32 80 00 16 bne,a 20052cc <pthread_key_create+0xd4>
2005278: c2 24 60 1c st %g1, [ %l1 + 0x1c ]
for ( --the_api;
200527c: 82 06 60 05 add %i1, 5, %g1
2005280: b2 06 7f ff add %i1, -1, %i1
2005284: 83 28 60 02 sll %g1, 2, %g1
2005288: 10 80 00 05 b 200529c <pthread_key_create+0xa4>
200528c: b0 04 00 01 add %l0, %g1, %i0
the_api >= 1;
the_api-- )
2005290: b2 06 7f ff add %i1, -1, %i1 <== NOT EXECUTED
_Workspace_Free( the_key->Values[ the_api ] );
2005294: 40 00 12 5e call 2009c0c <_Workspace_Free> <== NOT EXECUTED
2005298: b0 06 3f fc add %i0, -4, %i0 <== NOT EXECUTED
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
if ( !table ) {
for ( --the_api;
the_api >= 1;
200529c: 80 a6 60 00 cmp %i1, 0
20052a0: 32 bf ff fc bne,a 2005290 <pthread_key_create+0x98> <== NEVER TAKEN
20052a4: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
POSIX_Keys_Control *the_key
)
{
_Objects_Free( &_POSIX_Keys_Information, &the_key->Object );
20052a8: 92 10 00 10 mov %l0, %o1
20052ac: 11 00 80 57 sethi %hi(0x2015c00), %o0
20052b0: 90 12 21 d4 or %o0, 0x1d4, %o0 ! 2015dd4 <_POSIX_Keys_Information>
20052b4: 40 00 0a 32 call 2007b7c <_Objects_Free>
20052b8: b0 10 20 0c mov 0xc, %i0
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
20052bc: 40 00 0c de call 2008634 <_Thread_Enable_dispatch>
20052c0: 01 00 00 00 nop
20052c4: 81 c7 e0 08 ret
20052c8: 81 e8 00 00 restore
return ENOMEM;
}
the_key->Values[ the_api ] = table;
memset( table, '\0', bytes_to_allocate );
20052cc: 94 10 00 12 mov %l2, %o2
20052d0: 40 00 25 71 call 200e894 <memset>
20052d4: 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++ ) {
20052d8: 10 80 00 03 b 20052e4 <pthread_key_create+0xec>
20052dc: b2 06 60 01 inc %i1
20052e0: b2 06 60 01 inc %i1
* APIs are optional. Thus there may be no ITRON tasks to have keys
* for. [NOTE: Currently RTEMS Classic API tasks are always enabled.]
*/
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
20052e4: 80 a6 60 05 cmp %i1, 5
20052e8: 12 bf ff d7 bne 2005244 <pthread_key_create+0x4c>
20052ec: a2 04 60 04 add %l1, 4, %l1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
20052f0: c6 04 20 08 ld [ %l0 + 8 ], %g3
20052f4: 03 00 80 57 sethi %hi(0x2015c00), %g1
20052f8: c4 00 61 f0 ld [ %g1 + 0x1f0 ], %g2 ! 2015df0 <_POSIX_Keys_Information+0x1c>
20052fc: 03 00 00 3f sethi %hi(0xfc00), %g1
2005300: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
2005304: 82 08 c0 01 and %g3, %g1, %g1
2005308: 83 28 60 02 sll %g1, 2, %g1
200530c: e0 20 80 01 st %l0, [ %g2 + %g1 ]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == FALSE */
the_object->name.name_u32 = name;
2005310: c0 24 20 0c clr [ %l0 + 0xc ]
}
}
the_key->is_active = TRUE;
2005314: 82 10 20 01 mov 1, %g1
_Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 );
*key = the_key->Object.id;
2005318: c6 26 00 00 st %g3, [ %i0 ]
}
}
the_key->is_active = TRUE;
200531c: c2 2c 20 10 stb %g1, [ %l0 + 0x10 ]
_Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 );
*key = the_key->Object.id;
_Thread_Enable_dispatch();
2005320: 40 00 0c c5 call 2008634 <_Thread_Enable_dispatch>
2005324: b0 10 20 00 clr %i0
return 0;
}
2005328: 81 c7 e0 08 ret
200532c: 81 e8 00 00 restore
02005330 <pthread_key_delete>:
*/
int pthread_key_delete(
pthread_key_t key
)
{
2005330: 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 *)
2005334: 23 00 80 57 sethi %hi(0x2015c00), %l1
2005338: 92 10 00 18 mov %i0, %o1
200533c: 94 07 bf f4 add %fp, -12, %o2
2005340: 40 00 0a 7c call 2007d30 <_Objects_Get>
2005344: 90 14 61 d4 or %l1, 0x1d4, %o0
register POSIX_Keys_Control *the_key;
Objects_Locations location;
uint32_t the_api;
the_key = _POSIX_Keys_Get( key, &location );
switch ( location ) {
2005348: c2 07 bf f4 ld [ %fp + -12 ], %g1
200534c: a0 10 00 08 mov %o0, %l0
2005350: 80 a0 60 00 cmp %g1, 0
2005354: 12 80 00 24 bne 20053e4 <pthread_key_delete+0xb4>
2005358: b0 10 20 16 mov 0x16, %i0
case OBJECTS_LOCAL:
_Objects_Close( &_POSIX_Keys_Information, &the_key->Object );
200535c: 90 14 61 d4 or %l1, 0x1d4, %o0
2005360: 40 00 09 44 call 2007870 <_Objects_Close>
2005364: 92 10 00 10 mov %l0, %o1
the_key->is_active = FALSE;
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ )
if ( the_key->Values[ the_api ] )
2005368: d0 04 20 1c ld [ %l0 + 0x1c ], %o0
200536c: 80 a2 20 00 cmp %o0, 0
2005370: 02 80 00 04 be 2005380 <pthread_key_delete+0x50> <== NEVER TAKEN
2005374: c0 2c 20 10 clrb [ %l0 + 0x10 ]
_Workspace_Free( the_key->Values[ the_api ] );
2005378: 40 00 12 25 call 2009c0c <_Workspace_Free>
200537c: 01 00 00 00 nop
the_key->is_active = FALSE;
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ )
if ( the_key->Values[ the_api ] )
2005380: d0 04 20 20 ld [ %l0 + 0x20 ], %o0
2005384: 80 a2 20 00 cmp %o0, 0
2005388: 22 80 00 05 be,a 200539c <pthread_key_delete+0x6c> <== NEVER TAKEN
200538c: d0 04 20 24 ld [ %l0 + 0x24 ], %o0 <== NOT EXECUTED
_Workspace_Free( the_key->Values[ the_api ] );
2005390: 40 00 12 1f call 2009c0c <_Workspace_Free>
2005394: 01 00 00 00 nop
the_key->is_active = FALSE;
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ )
if ( the_key->Values[ the_api ] )
2005398: d0 04 20 24 ld [ %l0 + 0x24 ], %o0
200539c: 80 a2 20 00 cmp %o0, 0
20053a0: 22 80 00 05 be,a 20053b4 <pthread_key_delete+0x84> <== NEVER TAKEN
20053a4: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED
_Workspace_Free( the_key->Values[ the_api ] );
20053a8: 40 00 12 19 call 2009c0c <_Workspace_Free>
20053ac: 01 00 00 00 nop
the_key->is_active = FALSE;
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ )
if ( the_key->Values[ the_api ] )
20053b0: d0 04 20 28 ld [ %l0 + 0x28 ], %o0
20053b4: 80 a2 20 00 cmp %o0, 0
20053b8: 02 80 00 05 be 20053cc <pthread_key_delete+0x9c> <== ALWAYS TAKEN
20053bc: 92 10 00 10 mov %l0, %o1
_Workspace_Free( the_key->Values[ the_api ] );
20053c0: 40 00 12 13 call 2009c0c <_Workspace_Free> <== NOT EXECUTED
20053c4: 01 00 00 00 nop <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
POSIX_Keys_Control *the_key
)
{
_Objects_Free( &_POSIX_Keys_Information, &the_key->Object );
20053c8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
20053cc: 11 00 80 57 sethi %hi(0x2015c00), %o0
20053d0: 90 12 21 d4 or %o0, 0x1d4, %o0 ! 2015dd4 <_POSIX_Keys_Information>
20053d4: 40 00 09 ea call 2007b7c <_Objects_Free>
20053d8: b0 10 20 00 clr %i0
* NOTE: The destructor is not called and it is the responsibility
* of the application to free the memory.
*/
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
20053dc: 40 00 0c 96 call 2008634 <_Thread_Enable_dispatch>
20053e0: 01 00 00 00 nop
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
20053e4: 81 c7 e0 08 ret
20053e8: 81 e8 00 00 restore
02018b14 <pthread_kill>:
int pthread_kill(
pthread_t thread,
int sig
)
{
2018b14: 9d e3 bf 90 save %sp, -112, %sp
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
2018b18: 80 a6 60 00 cmp %i1, 0
2018b1c: 02 80 00 06 be 2018b34 <pthread_kill+0x20> <== NEVER TAKEN
2018b20: 90 10 00 18 mov %i0, %o0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
2018b24: a0 06 7f ff add %i1, -1, %l0
2018b28: 80 a4 20 1f cmp %l0, 0x1f
2018b2c: 08 80 00 08 bleu 2018b4c <pthread_kill+0x38>
2018b30: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
2018b34: 7f ff d8 b1 call 200edf8 <__errno>
2018b38: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff>
2018b3c: 82 10 20 16 mov 0x16, %g1
2018b40: c2 22 00 00 st %g1, [ %o0 ]
2018b44: 81 c7 e0 08 ret
2018b48: 81 e8 00 00 restore
the_thread = _Thread_Get( thread, &location );
2018b4c: 7f ff c1 6c call 20090fc <_Thread_Get>
2018b50: 92 07 bf f4 add %fp, -12, %o1
switch ( location ) {
2018b54: c2 07 bf f4 ld [ %fp + -12 ], %g1
2018b58: 80 a0 60 00 cmp %g1, 0
2018b5c: 12 80 00 23 bne 2018be8 <pthread_kill+0xd4> <== NEVER TAKEN
2018b60: b0 10 00 08 mov %o0, %i0
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
2018b64: 83 2e 60 02 sll %i1, 2, %g1
2018b68: 85 2e 60 04 sll %i1, 4, %g2
2018b6c: 84 20 80 01 sub %g2, %g1, %g2
2018b70: 03 00 80 92 sethi %hi(0x2024800), %g1
2018b74: 82 10 60 78 or %g1, 0x78, %g1 ! 2024878 <_POSIX_signals_Vectors>
2018b78: 82 00 40 02 add %g1, %g2, %g1
2018b7c: c2 00 60 08 ld [ %g1 + 8 ], %g1
2018b80: 80 a0 60 01 cmp %g1, 1
2018b84: 02 80 00 15 be 2018bd8 <pthread_kill+0xc4> <== NEVER TAKEN
2018b88: c6 02 21 6c ld [ %o0 + 0x16c ], %g3
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
2018b8c: c4 00 e0 c8 ld [ %g3 + 0xc8 ], %g2
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
2018b90: 92 10 00 19 mov %i1, %o1
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
2018b94: b2 10 20 01 mov 1, %i1
2018b98: 83 2e 40 10 sll %i1, %l0, %g1
2018b9c: 84 10 80 01 or %g2, %g1, %g2
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
2018ba0: 94 10 20 00 clr %o2
2018ba4: 7f ff ff 90 call 20189e4 <_POSIX_signals_Unblock_thread>
2018ba8: c4 20 e0 c8 st %g2, [ %g3 + 0xc8 ]
the_thread->do_post_task_switch_extension = true;
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
2018bac: 03 00 80 90 sethi %hi(0x2024000), %g1
2018bb0: c2 00 63 00 ld [ %g1 + 0x300 ], %g1 ! 2024300 <_ISR_Nest_level>
2018bb4: 80 a0 60 00 cmp %g1, 0
2018bb8: 02 80 00 08 be 2018bd8 <pthread_kill+0xc4>
2018bbc: f2 2e 20 75 stb %i1, [ %i0 + 0x75 ]
2018bc0: 03 00 80 90 sethi %hi(0x2024000), %g1
2018bc4: c2 00 63 24 ld [ %g1 + 0x324 ], %g1 ! 2024324 <_Thread_Executing>
2018bc8: 80 a6 00 01 cmp %i0, %g1
2018bcc: 12 80 00 03 bne 2018bd8 <pthread_kill+0xc4> <== ALWAYS TAKEN
2018bd0: 03 00 80 90 sethi %hi(0x2024000), %g1
_ISR_Signals_to_thread_executing = TRUE;
2018bd4: f2 28 63 b8 stb %i1, [ %g1 + 0x3b8 ] ! 20243b8 <_ISR_Signals_to_thread_executing><== NOT EXECUTED
}
_Thread_Enable_dispatch();
2018bd8: 7f ff c1 26 call 2009070 <_Thread_Enable_dispatch>
2018bdc: b0 10 20 00 clr %i0
2018be0: 81 c7 e0 08 ret
2018be4: 81 e8 00 00 restore
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
2018be8: 7f ff d8 84 call 200edf8 <__errno> <== NOT EXECUTED
2018bec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2018bf0: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED
2018bf4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
}
2018bf8: 81 c7 e0 08 ret <== NOT EXECUTED
2018bfc: 81 e8 00 00 restore <== NOT EXECUTED
020070ac <pthread_mutex_init>:
int pthread_mutex_init(
pthread_mutex_t *mutex,
const pthread_mutexattr_t *attr
)
{
20070ac: 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;
20070b0: 03 00 80 5b sethi %hi(0x2016c00), %g1
20070b4: 80 a6 60 00 cmp %i1, 0
20070b8: 02 80 00 03 be 20070c4 <pthread_mutex_init+0x18>
20070bc: a0 10 61 9c or %g1, 0x19c, %l0
20070c0: a0 10 00 19 mov %i1, %l0
else the_attr = &_POSIX_Mutex_Default_attributes;
/* Check for NULL mutex */
if ( !mutex )
20070c4: 80 a6 20 00 cmp %i0, 0
20070c8: 22 80 00 2f be,a 2007184 <pthread_mutex_init+0xd8>
20070cc: b0 10 20 16 mov 0x16, %i0
break;
}
}
#endif
if ( !the_attr->is_initialized )
20070d0: c2 04 00 00 ld [ %l0 ], %g1
20070d4: 80 a0 60 00 cmp %g1, 0
20070d8: 22 80 00 2b be,a 2007184 <pthread_mutex_init+0xd8>
20070dc: b0 10 20 16 mov 0x16, %i0
/*
* XXX: Be careful about attributes when global!!!
*/
assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE );
20070e0: c2 04 20 04 ld [ %l0 + 4 ], %g1
20070e4: 80 a0 60 00 cmp %g1, 0
20070e8: 22 80 00 0a be,a 2007110 <pthread_mutex_init+0x64> <== ALWAYS TAKEN
20070ec: c2 04 20 0c ld [ %l0 + 0xc ], %g1
20070f0: 11 00 80 5b sethi %hi(0x2016c00), %o0 <== NOT EXECUTED
20070f4: 15 00 80 5b sethi %hi(0x2016c00), %o2 <== NOT EXECUTED
20070f8: 17 00 80 5b sethi %hi(0x2016c00), %o3 <== NOT EXECUTED
20070fc: 90 12 21 b0 or %o0, 0x1b0, %o0 <== NOT EXECUTED
2007100: 94 12 a2 38 or %o2, 0x238, %o2 <== NOT EXECUTED
2007104: 96 12 e2 00 or %o3, 0x200, %o3 <== NOT EXECUTED
2007108: 7f ff f3 a1 call 2003f8c <__assert_func> <== NOT EXECUTED
200710c: 92 10 20 68 mov 0x68, %o1 <== NOT EXECUTED
/*
* Determine the discipline of the mutex
*/
switch ( the_attr->protocol ) {
2007110: 80 a0 60 01 cmp %g1, 1
2007114: 02 80 00 08 be 2007134 <pthread_mutex_init+0x88>
2007118: 80 a0 60 02 cmp %g1, 2
200711c: 02 80 00 08 be 200713c <pthread_mutex_init+0x90>
2007120: 80 a0 60 00 cmp %g1, 0
2007124: 02 80 00 07 be 2007140 <pthread_mutex_init+0x94>
2007128: a2 10 20 00 clr %l1
_Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 );
*mutex = the_mutex->Object.id;
_Thread_Enable_dispatch();
return 0;
200712c: 81 c7 e0 08 ret
2007130: 91 e8 20 16 restore %g0, 0x16, %o0
/*
* Determine the discipline of the mutex
*/
switch ( the_attr->protocol ) {
2007134: 10 80 00 03 b 2007140 <pthread_mutex_init+0x94>
2007138: a2 10 20 02 mov 2, %l1
200713c: a2 10 20 03 mov 3, %l1
break;
default:
return EINVAL;
}
if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) )
2007140: c2 04 20 08 ld [ %l0 + 8 ], %g1
2007144: 82 00 7f ff add %g1, -1, %g1
2007148: 80 a0 60 fd cmp %g1, 0xfd
200714c: 38 80 00 0e bgu,a 2007184 <pthread_mutex_init+0xd8>
2007150: b0 10 20 16 mov 0x16, %i0
2007154: 03 00 80 62 sethi %hi(0x2018800), %g1
2007158: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 2018a40 <_Thread_Dispatch_disable_level>
200715c: 84 00 a0 01 inc %g2
2007160: c4 20 62 40 st %g2, [ %g1 + 0x240 ]
* _POSIX_Mutex_Allocate
*/
RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void )
{
return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information );
2007164: 11 00 80 63 sethi %hi(0x2018c00), %o0
2007168: 40 00 09 fb call 2009954 <_Objects_Allocate>
200716c: 90 12 22 10 or %o0, 0x210, %o0 ! 2018e10 <_POSIX_Mutex_Information>
_Thread_Disable_dispatch();
the_mutex = _POSIX_Mutex_Allocate();
if ( !the_mutex ) {
2007170: b2 92 20 00 orcc %o0, 0, %i1
2007174: 32 80 00 06 bne,a 200718c <pthread_mutex_init+0xe0>
2007178: c2 04 20 04 ld [ %l0 + 4 ], %g1
_Thread_Enable_dispatch();
200717c: 40 00 0d 91 call 200a7c0 <_Thread_Enable_dispatch>
2007180: b0 10 20 0b mov 0xb, %i0
2007184: 81 c7 e0 08 ret
2007188: 81 e8 00 00 restore
return EAGAIN;
}
the_mutex->process_shared = the_attr->process_shared;
200718c: c2 26 60 10 st %g1, [ %i1 + 0x10 ]
the_mutex_attr = &the_mutex->Mutex.Attributes;
if ( the_attr->recursive )
2007190: c2 04 20 10 ld [ %l0 + 0x10 ], %g1
2007194: 80 a0 60 00 cmp %g1, 0
2007198: 02 80 00 04 be 20071a8 <pthread_mutex_init+0xfc> <== ALWAYS TAKEN
200719c: 82 10 20 01 mov 1, %g1
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
20071a0: 10 80 00 03 b 20071ac <pthread_mutex_init+0x100> <== NOT EXECUTED
20071a4: c0 26 60 54 clr [ %i1 + 0x54 ] <== NOT EXECUTED
else
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR;
20071a8: c2 26 60 54 st %g1, [ %i1 + 0x54 ]
the_mutex_attr->only_owner_release = TRUE;
the_mutex_attr->priority_ceiling =
20071ac: c4 04 20 08 ld [ %l0 + 8 ], %g2
if ( the_attr->recursive )
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
else
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR;
the_mutex_attr->only_owner_release = TRUE;
20071b0: 82 10 20 01 mov 1, %g1
20071b4: c2 2e 60 58 stb %g1, [ %i1 + 0x58 ]
the_mutex_attr->priority_ceiling =
20071b8: 82 10 20 ff mov 0xff, %g1
20071bc: 82 20 40 02 sub %g1, %g2, %g1
/*
* Must be initialized to unlocked.
*/
_CORE_mutex_Initialize(
20071c0: 92 06 60 54 add %i1, 0x54, %o1
20071c4: 94 10 20 01 mov 1, %o2
if ( the_attr->recursive )
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
else
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR;
the_mutex_attr->only_owner_release = TRUE;
the_mutex_attr->priority_ceiling =
20071c8: c2 26 60 60 st %g1, [ %i1 + 0x60 ]
_POSIX_Priority_To_core( the_attr->prio_ceiling );
the_mutex_attr->discipline = the_discipline;
20071cc: e2 26 60 5c st %l1, [ %i1 + 0x5c ]
/*
* Must be initialized to unlocked.
*/
_CORE_mutex_Initialize(
20071d0: 40 00 07 c2 call 20090d8 <_CORE_mutex_Initialize>
20071d4: 90 06 60 14 add %i1, 0x14, %o0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
20071d8: c6 06 60 08 ld [ %i1 + 8 ], %g3
20071dc: 03 00 80 63 sethi %hi(0x2018c00), %g1
20071e0: c4 00 62 2c ld [ %g1 + 0x22c ], %g2 ! 2018e2c <_POSIX_Mutex_Information+0x1c>
20071e4: 03 00 00 3f sethi %hi(0xfc00), %g1
20071e8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
20071ec: 82 08 c0 01 and %g3, %g1, %g1
20071f0: 83 28 60 02 sll %g1, 2, %g1
20071f4: f2 20 80 01 st %i1, [ %g2 + %g1 ]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == FALSE */
the_object->name.name_u32 = name;
20071f8: c0 26 60 0c clr [ %i1 + 0xc ]
CORE_MUTEX_UNLOCKED
);
_Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 );
*mutex = the_mutex->Object.id;
20071fc: c6 26 00 00 st %g3, [ %i0 ]
_Thread_Enable_dispatch();
2007200: 40 00 0d 70 call 200a7c0 <_Thread_Enable_dispatch>
2007204: b0 10 20 00 clr %i0
2007208: 81 c7 e0 08 ret
200720c: 81 e8 00 00 restore
02007280 <pthread_mutex_setprioceiling>:
int pthread_mutex_setprioceiling(
pthread_mutex_t *mutex,
int prioceiling,
int *old_ceiling
)
{
2007280: 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 )
2007284: 80 a6 a0 00 cmp %i2, 0
2007288: 02 80 00 1f be 2007304 <pthread_mutex_setprioceiling+0x84>
200728c: a0 10 00 18 mov %i0, %l0
return EINVAL;
if ( !_POSIX_Priority_Is_valid( prioceiling ) )
2007290: 82 06 7f ff add %i1, -1, %g1
2007294: 80 a0 60 fd cmp %g1, 0xfd
2007298: 38 80 00 19 bgu,a 20072fc <pthread_mutex_setprioceiling+0x7c>
200729c: b0 10 20 16 mov 0x16, %i0
/*
* Must acquire the mutex before we can change it's ceiling
*/
status = pthread_mutex_lock( mutex );
20072a0: 7f ff ff dc call 2007210 <pthread_mutex_lock>
20072a4: 90 10 00 18 mov %i0, %o0
if ( status )
20072a8: b0 92 20 00 orcc %o0, 0, %i0
20072ac: 12 80 00 14 bne 20072fc <pthread_mutex_setprioceiling+0x7c>
20072b0: 90 10 00 10 mov %l0, %o0
return status;
the_mutex = _POSIX_Mutex_Get( mutex, &location );
20072b4: 7f ff ff 55 call 2007008 <_POSIX_Mutex_Get>
20072b8: 92 07 bf f4 add %fp, -12, %o1
switch ( location ) {
20072bc: c2 07 bf f4 ld [ %fp + -12 ], %g1
20072c0: 80 a0 60 00 cmp %g1, 0
20072c4: 32 80 00 0e bne,a 20072fc <pthread_mutex_setprioceiling+0x7c><== NEVER TAKEN
20072c8: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED
case OBJECTS_LOCAL:
*old_ceiling = _POSIX_Priority_From_core(
20072cc: c2 02 20 60 ld [ %o0 + 0x60 ], %g1
the_mutex->Mutex.Attributes.priority_ceiling
);
the_mutex->Mutex.Attributes.priority_ceiling = the_priority;
_CORE_mutex_Surrender(
20072d0: d2 02 20 08 ld [ %o0 + 8 ], %o1
the_mutex = _POSIX_Mutex_Get( mutex, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*old_ceiling = _POSIX_Priority_From_core(
20072d4: 84 10 20 ff mov 0xff, %g2
the_mutex->Mutex.Attributes.priority_ceiling
);
the_mutex->Mutex.Attributes.priority_ceiling = the_priority;
20072d8: 86 20 80 19 sub %g2, %i1, %g3
the_mutex = _POSIX_Mutex_Get( mutex, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*old_ceiling = _POSIX_Priority_From_core(
20072dc: 84 20 80 01 sub %g2, %g1, %g2
the_mutex->Mutex.Attributes.priority_ceiling
);
the_mutex->Mutex.Attributes.priority_ceiling = the_priority;
20072e0: c6 22 20 60 st %g3, [ %o0 + 0x60 ]
the_mutex = _POSIX_Mutex_Get( mutex, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*old_ceiling = _POSIX_Priority_From_core(
20072e4: c4 26 80 00 st %g2, [ %i2 ]
the_mutex->Mutex.Attributes.priority_ceiling
);
the_mutex->Mutex.Attributes.priority_ceiling = the_priority;
_CORE_mutex_Surrender(
20072e8: 94 10 20 00 clr %o2
20072ec: 40 00 07 f1 call 20092b0 <_CORE_mutex_Surrender>
20072f0: 90 02 20 14 add %o0, 0x14, %o0
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
20072f4: 40 00 0d 33 call 200a7c0 <_Thread_Enable_dispatch>
20072f8: 01 00 00 00 nop
20072fc: 81 c7 e0 08 ret
2007300: 81 e8 00 00 restore
return 0;
2007304: b0 10 20 16 mov 0x16, %i0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
2007308: 81 c7 e0 08 ret
200730c: 81 e8 00 00 restore
02007310 <pthread_mutex_timedlock>:
int pthread_mutex_timedlock(
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
2007310: 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 );
2007314: 92 07 bf f4 add %fp, -12, %o1
2007318: 40 00 00 2c call 20073c8 <_POSIX_Absolute_timeout_to_ticks>
200731c: 90 10 00 19 mov %i1, %o0
switch ( status ) {
2007320: 80 a2 20 02 cmp %o0, 2
2007324: 08 80 00 05 bleu 2007338 <pthread_mutex_timedlock+0x28> <== NEVER TAKEN
2007328: 92 10 20 00 clr %o1
200732c: 80 a2 20 03 cmp %o0, 3
2007330: 22 80 00 02 be,a 2007338 <pthread_mutex_timedlock+0x28> <== ALWAYS TAKEN
2007334: 92 10 20 01 mov 1, %o1
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
do_wait = TRUE;
break;
}
lock_status = _POSIX_Mutex_Lock_support(
2007338: d4 07 bf f4 ld [ %fp + -12 ], %o2
200733c: 90 10 00 18 mov %i0, %o0
2007340: 7f ff ff ba call 2007228 <_POSIX_Mutex_Lock_support>
2007344: 92 0a 60 01 and %o1, 1, %o1
break;
}
}
return lock_status;
}
2007348: 81 c7 e0 08 ret
200734c: 91 e8 00 08 restore %g0, %o0, %o0
02006ef0 <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
if ( !attr || !attr->is_initialized )
2006ef0: 80 a2 20 00 cmp %o0, 0
2006ef4: 02 80 00 0b be 2006f20 <pthread_mutexattr_setpshared+0x30>
2006ef8: 01 00 00 00 nop
2006efc: c2 02 00 00 ld [ %o0 ], %g1
2006f00: 80 a0 60 00 cmp %g1, 0
2006f04: 02 80 00 07 be 2006f20 <pthread_mutexattr_setpshared+0x30>
2006f08: 80 a2 60 01 cmp %o1, 1
return EINVAL;
switch ( pshared ) {
2006f0c: 18 80 00 05 bgu 2006f20 <pthread_mutexattr_setpshared+0x30><== NEVER TAKEN
2006f10: 01 00 00 00 nop
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
2006f14: d2 22 20 04 st %o1, [ %o0 + 4 ]
2006f18: 81 c3 e0 08 retl
2006f1c: 90 10 20 00 clr %o0
return 0;
default:
return EINVAL;
}
}
2006f20: 81 c3 e0 08 retl
2006f24: 90 10 20 16 mov 0x16, %o0
020068c4 <pthread_once>:
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
20068c4: 9d e3 bf 90 save %sp, -112, %sp
if ( !once_control || !init_routine )
20068c8: a0 96 20 00 orcc %i0, 0, %l0
20068cc: 02 80 00 04 be 20068dc <pthread_once+0x18>
20068d0: 80 a6 60 00 cmp %i1, 0
20068d4: 32 80 00 04 bne,a 20068e4 <pthread_once+0x20>
20068d8: c2 04 20 04 ld [ %l0 + 4 ], %g1
20068dc: 81 c7 e0 08 ret
20068e0: 91 e8 20 16 restore %g0, 0x16, %o0
return EINVAL;
if ( !once_control->init_executed ) {
20068e4: 80 a0 60 00 cmp %g1, 0
20068e8: 12 80 00 13 bne 2006934 <pthread_once+0x70>
20068ec: b0 10 20 00 clr %i0
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
20068f0: 90 10 21 00 mov 0x100, %o0
20068f4: 92 10 21 00 mov 0x100, %o1
20068f8: 40 00 03 a9 call 200779c <rtems_task_mode>
20068fc: 94 07 bf f4 add %fp, -12, %o2
if ( !once_control->init_executed ) {
2006900: c2 04 20 04 ld [ %l0 + 4 ], %g1
2006904: 80 a0 60 00 cmp %g1, 0
2006908: 12 80 00 07 bne 2006924 <pthread_once+0x60> <== NEVER TAKEN
200690c: d0 07 bf f4 ld [ %fp + -12 ], %o0
once_control->is_initialized = TRUE;
2006910: 82 10 20 01 mov 1, %g1
once_control->init_executed = TRUE;
2006914: c2 24 20 04 st %g1, [ %l0 + 4 ]
(*init_routine)();
2006918: 9f c6 40 00 call %i1
200691c: c2 24 00 00 st %g1, [ %l0 ]
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
2006920: d0 07 bf f4 ld [ %fp + -12 ], %o0
2006924: 92 10 21 00 mov 0x100, %o1
2006928: 94 07 bf f4 add %fp, -12, %o2
200692c: 40 00 03 9c call 200779c <rtems_task_mode>
2006930: b0 10 20 00 clr %i0
}
return 0;
}
2006934: 81 c7 e0 08 ret
2006938: 81 e8 00 00 restore
02005d30 <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
2005d30: 9d e3 bf 88 save %sp, -120, %sp
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
2005d34: 80 a6 20 00 cmp %i0, 0
2005d38: 02 80 00 2d be 2005dec <pthread_rwlock_init+0xbc>
2005d3c: a0 10 00 19 mov %i1, %l0
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
2005d40: 80 a6 60 00 cmp %i1, 0
2005d44: 32 80 00 06 bne,a 2005d5c <pthread_rwlock_init+0x2c> <== ALWAYS TAKEN
2005d48: c2 04 00 00 ld [ %l0 ], %g1
the_attr = attr;
} else {
(void) pthread_rwlockattr_init( &default_attr );
2005d4c: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED
2005d50: 40 00 02 b0 call 2006810 <pthread_rwlockattr_init> <== NOT EXECUTED
2005d54: 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 )
2005d58: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED
2005d5c: 80 a0 60 00 cmp %g1, 0
2005d60: 02 80 00 23 be 2005dec <pthread_rwlock_init+0xbc> <== NEVER TAKEN
2005d64: 01 00 00 00 nop
return EINVAL;
switch ( the_attr->process_shared ) {
2005d68: c2 04 20 04 ld [ %l0 + 4 ], %g1
2005d6c: 80 a0 60 00 cmp %g1, 0
2005d70: 12 80 00 1f bne 2005dec <pthread_rwlock_init+0xbc> <== NEVER TAKEN
2005d74: 05 00 80 68 sethi %hi(0x201a000), %g2
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
2005d78: c2 00 a2 c0 ld [ %g2 + 0x2c0 ], %g1 ! 201a2c0 <_Thread_Dispatch_disable_level>
2005d7c: 82 00 60 01 inc %g1
2005d80: c2 20 a2 c0 st %g1, [ %g2 + 0x2c0 ]
* 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 *)
2005d84: 33 00 80 69 sethi %hi(0x201a400), %i1
2005d88: 40 00 0a 95 call 20087dc <_Objects_Allocate>
2005d8c: 90 16 61 10 or %i1, 0x110, %o0 ! 201a510 <_POSIX_RWLock_Information>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
2005d90: a0 92 20 00 orcc %o0, 0, %l0
2005d94: 12 80 00 06 bne 2005dac <pthread_rwlock_init+0x7c>
2005d98: 90 04 20 10 add %l0, 0x10, %o0
_Thread_Enable_dispatch();
2005d9c: 40 00 0e 2b call 2009648 <_Thread_Enable_dispatch>
2005da0: b0 10 20 0b mov 0xb, %i0
2005da4: 81 c7 e0 08 ret
2005da8: 81 e8 00 00 restore
return EAGAIN;
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
2005dac: 40 00 08 97 call 2008008 <_CORE_RWLock_Initialize>
2005db0: 92 07 bf f4 add %fp, -12, %o1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2005db4: c4 04 20 08 ld [ %l0 + 8 ], %g2
2005db8: 82 16 61 10 or %i1, 0x110, %g1
2005dbc: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
2005dc0: 03 00 00 3f sethi %hi(0xfc00), %g1
2005dc4: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
2005dc8: 82 08 80 01 and %g2, %g1, %g1
2005dcc: 83 28 60 02 sll %g1, 2, %g1
2005dd0: e0 20 c0 01 st %l0, [ %g3 + %g1 ]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == FALSE */
the_object->name.name_u32 = name;
2005dd4: c0 24 20 0c clr [ %l0 + 0xc ]
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
2005dd8: c4 26 00 00 st %g2, [ %i0 ]
_Thread_Enable_dispatch();
2005ddc: 40 00 0e 1b call 2009648 <_Thread_Enable_dispatch>
2005de0: b0 10 20 00 clr %i0
2005de4: 81 c7 e0 08 ret
2005de8: 81 e8 00 00 restore
return 0;
}
2005dec: 81 c7 e0 08 ret
2005df0: 91 e8 20 16 restore %g0, 0x16, %o0
02005e6c <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
2005e6c: 9d e3 bf 90 save %sp, -112, %sp
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
2005e70: 80 a6 20 00 cmp %i0, 0
2005e74: 02 80 00 31 be 2005f38 <pthread_rwlock_timedrdlock+0xcc>
2005e78: 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 );
2005e7c: 92 07 bf f0 add %fp, -16, %o1
2005e80: 40 00 1c ab call 200d12c <_POSIX_Absolute_timeout_to_ticks>
2005e84: a0 10 20 00 clr %l0
switch (status) {
2005e88: 80 a2 20 02 cmp %o0, 2
2005e8c: 08 80 00 05 bleu 2005ea0 <pthread_rwlock_timedrdlock+0x34>
2005e90: b2 10 00 08 mov %o0, %i1
2005e94: 80 a2 20 03 cmp %o0, 3
2005e98: 22 80 00 02 be,a 2005ea0 <pthread_rwlock_timedrdlock+0x34><== ALWAYS TAKEN
2005e9c: a0 10 20 01 mov 1, %l0
2005ea0: d2 06 00 00 ld [ %i0 ], %o1
2005ea4: 11 00 80 69 sethi %hi(0x201a400), %o0
2005ea8: 94 07 bf f4 add %fp, -12, %o2
2005eac: 40 00 0b a6 call 2008d44 <_Objects_Get>
2005eb0: 90 12 21 10 or %o0, 0x110, %o0
do_wait = TRUE;
break;
}
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
2005eb4: c2 07 bf f4 ld [ %fp + -12 ], %g1
2005eb8: 80 a0 60 00 cmp %g1, 0
2005ebc: 32 80 00 20 bne,a 2005f3c <pthread_rwlock_timedrdlock+0xd0>
2005ec0: 90 10 20 16 mov 0x16, %o0
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
2005ec4: d2 06 00 00 ld [ %i0 ], %o1
2005ec8: d6 07 bf f0 ld [ %fp + -16 ], %o3
2005ecc: a0 0c 20 ff and %l0, 0xff, %l0
2005ed0: 90 02 20 10 add %o0, 0x10, %o0
2005ed4: 94 10 00 10 mov %l0, %o2
2005ed8: 40 00 08 57 call 2008034 <_CORE_RWLock_Obtain_for_reading>
2005edc: 98 10 20 00 clr %o4
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
2005ee0: 40 00 0d da call 2009648 <_Thread_Enable_dispatch>
2005ee4: 01 00 00 00 nop
if ( !do_wait &&
2005ee8: 80 a4 20 00 cmp %l0, 0
2005eec: 12 80 00 0d bne 2005f20 <pthread_rwlock_timedrdlock+0xb4> <== ALWAYS TAKEN
2005ef0: 03 00 80 68 sethi %hi(0x201a000), %g1
2005ef4: c2 00 63 84 ld [ %g1 + 0x384 ], %g1 ! 201a384 <_Thread_Executing><== NOT EXECUTED
2005ef8: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 <== NOT EXECUTED
2005efc: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED
2005f00: 32 80 00 09 bne,a 2005f24 <pthread_rwlock_timedrdlock+0xb8><== NOT EXECUTED
2005f04: 03 00 80 68 sethi %hi(0x201a000), %g1 <== NOT EXECUTED
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
switch (status) {
2005f08: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
2005f0c: 02 80 00 0c be 2005f3c <pthread_rwlock_timedrdlock+0xd0> <== NOT EXECUTED
2005f10: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED
2005f14: 80 a6 60 02 cmp %i1, 2 <== NOT EXECUTED
2005f18: 08 80 00 09 bleu 2005f3c <pthread_rwlock_timedrdlock+0xd0><== NOT EXECUTED
2005f1c: 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(
2005f20: 03 00 80 68 sethi %hi(0x201a000), %g1
2005f24: c2 00 63 84 ld [ %g1 + 0x384 ], %g1 ! 201a384 <_Thread_Executing>
2005f28: 40 00 00 3f call 2006024 <_POSIX_RWLock_Translate_core_RWLock_return_code>
2005f2c: d0 00 60 34 ld [ %g1 + 0x34 ], %o0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
2005f30: 81 c7 e0 08 ret
2005f34: 91 e8 00 08 restore %g0, %o0, %o0
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
2005f38: 90 10 20 16 mov 0x16, %o0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
2005f3c: b0 10 00 08 mov %o0, %i0
2005f40: 81 c7 e0 08 ret
2005f44: 81 e8 00 00 restore
02005f48 <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
2005f48: 9d e3 bf 90 save %sp, -112, %sp
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
2005f4c: 80 a6 20 00 cmp %i0, 0
2005f50: 02 80 00 31 be 2006014 <pthread_rwlock_timedwrlock+0xcc>
2005f54: 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 );
2005f58: 92 07 bf f0 add %fp, -16, %o1
2005f5c: 40 00 1c 74 call 200d12c <_POSIX_Absolute_timeout_to_ticks>
2005f60: a0 10 20 00 clr %l0
switch (status) {
2005f64: 80 a2 20 02 cmp %o0, 2
2005f68: 08 80 00 05 bleu 2005f7c <pthread_rwlock_timedwrlock+0x34>
2005f6c: b2 10 00 08 mov %o0, %i1
2005f70: 80 a2 20 03 cmp %o0, 3
2005f74: 22 80 00 02 be,a 2005f7c <pthread_rwlock_timedwrlock+0x34><== ALWAYS TAKEN
2005f78: a0 10 20 01 mov 1, %l0
2005f7c: d2 06 00 00 ld [ %i0 ], %o1
2005f80: 11 00 80 69 sethi %hi(0x201a400), %o0
2005f84: 94 07 bf f4 add %fp, -12, %o2
2005f88: 40 00 0b 6f call 2008d44 <_Objects_Get>
2005f8c: 90 12 21 10 or %o0, 0x110, %o0
do_wait = TRUE;
break;
}
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
2005f90: c2 07 bf f4 ld [ %fp + -12 ], %g1
2005f94: 80 a0 60 00 cmp %g1, 0
2005f98: 32 80 00 20 bne,a 2006018 <pthread_rwlock_timedwrlock+0xd0>
2005f9c: 90 10 20 16 mov 0x16, %o0
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
2005fa0: d2 06 00 00 ld [ %i0 ], %o1
2005fa4: d6 07 bf f0 ld [ %fp + -16 ], %o3
2005fa8: a0 0c 20 ff and %l0, 0xff, %l0
2005fac: 90 02 20 10 add %o0, 0x10, %o0
2005fb0: 94 10 00 10 mov %l0, %o2
2005fb4: 40 00 08 54 call 2008104 <_CORE_RWLock_Obtain_for_writing>
2005fb8: 98 10 20 00 clr %o4
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
2005fbc: 40 00 0d a3 call 2009648 <_Thread_Enable_dispatch>
2005fc0: 01 00 00 00 nop
if ( !do_wait &&
2005fc4: 80 a4 20 00 cmp %l0, 0
2005fc8: 12 80 00 0d bne 2005ffc <pthread_rwlock_timedwrlock+0xb4> <== ALWAYS TAKEN
2005fcc: 03 00 80 68 sethi %hi(0x201a000), %g1
2005fd0: c2 00 63 84 ld [ %g1 + 0x384 ], %g1 ! 201a384 <_Thread_Executing><== NOT EXECUTED
2005fd4: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 <== NOT EXECUTED
2005fd8: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED
2005fdc: 32 80 00 09 bne,a 2006000 <pthread_rwlock_timedwrlock+0xb8><== NOT EXECUTED
2005fe0: 03 00 80 68 sethi %hi(0x201a000), %g1 <== NOT EXECUTED
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
switch (status) {
2005fe4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
2005fe8: 02 80 00 0c be 2006018 <pthread_rwlock_timedwrlock+0xd0> <== NOT EXECUTED
2005fec: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED
2005ff0: 80 a6 60 02 cmp %i1, 2 <== NOT EXECUTED
2005ff4: 08 80 00 09 bleu 2006018 <pthread_rwlock_timedwrlock+0xd0><== NOT EXECUTED
2005ff8: 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(
2005ffc: 03 00 80 68 sethi %hi(0x201a000), %g1
2006000: c2 00 63 84 ld [ %g1 + 0x384 ], %g1 ! 201a384 <_Thread_Executing>
2006004: 40 00 00 08 call 2006024 <_POSIX_RWLock_Translate_core_RWLock_return_code>
2006008: d0 00 60 34 ld [ %g1 + 0x34 ], %o0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
200600c: 81 c7 e0 08 ret
2006010: 91 e8 00 08 restore %g0, %o0, %o0
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
2006014: 90 10 20 16 mov 0x16, %o0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
2006018: b0 10 00 08 mov %o0, %i0
200601c: 81 c7 e0 08 ret
2006020: 81 e8 00 00 restore
02006834 <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
if ( !attr )
2006834: 80 a2 20 00 cmp %o0, 0
2006838: 02 80 00 0b be 2006864 <pthread_rwlockattr_setpshared+0x30>
200683c: 01 00 00 00 nop
return EINVAL;
if ( !attr->is_initialized )
2006840: c2 02 00 00 ld [ %o0 ], %g1
2006844: 80 a0 60 00 cmp %g1, 0
2006848: 02 80 00 07 be 2006864 <pthread_rwlockattr_setpshared+0x30>
200684c: 80 a2 60 01 cmp %o1, 1
return EINVAL;
switch ( pshared ) {
2006850: 18 80 00 05 bgu 2006864 <pthread_rwlockattr_setpshared+0x30><== NEVER TAKEN
2006854: 01 00 00 00 nop
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
2006858: d2 22 20 04 st %o1, [ %o0 + 4 ]
200685c: 81 c3 e0 08 retl
2006860: 90 10 20 00 clr %o0
return 0;
default:
return EINVAL;
}
}
2006864: 81 c3 e0 08 retl
2006868: 90 10 20 16 mov 0x16, %o0
020053d0 <pthread_setcancelstate>:
int pthread_setcancelstate(
int state,
int *oldstate
)
{
20053d0: 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() )
20053d4: 03 00 80 56 sethi %hi(0x2015800), %g1
20053d8: c2 00 62 c0 ld [ %g1 + 0x2c0 ], %g1 ! 2015ac0 <_ISR_Nest_level>
int pthread_setcancelstate(
int state,
int *oldstate
)
{
20053dc: 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() )
20053e0: 80 a0 60 00 cmp %g1, 0
20053e4: 12 80 00 26 bne 200547c <pthread_setcancelstate+0xac> <== NEVER TAKEN
20053e8: b0 10 20 47 mov 0x47, %i0
return EPROTO;
if ( !oldstate )
20053ec: 80 a6 60 00 cmp %i1, 0
20053f0: 02 80 00 25 be 2005484 <pthread_setcancelstate+0xb4> <== NEVER TAKEN
20053f4: 80 a1 20 01 cmp %g4, 1
return EINVAL;
if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE )
20053f8: 38 80 00 21 bgu,a 200547c <pthread_setcancelstate+0xac> <== NEVER TAKEN
20053fc: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
2005400: 03 00 80 56 sethi %hi(0x2015800), %g1
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
2005404: 07 00 80 56 sethi %hi(0x2015800), %g3
2005408: c4 00 62 e4 ld [ %g1 + 0x2e4 ], %g2
200540c: c2 00 e2 20 ld [ %g3 + 0x220 ], %g1
2005410: c4 00 a1 6c ld [ %g2 + 0x16c ], %g2
2005414: 82 00 60 01 inc %g1
2005418: c2 20 e2 20 st %g1, [ %g3 + 0x220 ]
_Thread_Disable_dispatch();
*oldstate = thread_support->cancelability_state;
200541c: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1
thread_support->cancelability_state = state;
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
2005420: 80 a1 20 00 cmp %g4, 0
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
_Thread_Disable_dispatch();
*oldstate = thread_support->cancelability_state;
2005424: c2 26 40 00 st %g1, [ %i1 ]
thread_support->cancelability_state = state;
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
2005428: 12 80 00 0b bne 2005454 <pthread_setcancelstate+0x84> <== NEVER TAKEN
200542c: c8 20 a0 cc st %g4, [ %g2 + 0xcc ]
2005430: c2 00 a0 d0 ld [ %g2 + 0xd0 ], %g1
2005434: 80 a0 60 01 cmp %g1, 1
2005438: 32 80 00 08 bne,a 2005458 <pthread_setcancelstate+0x88> <== ALWAYS TAKEN
200543c: b2 10 20 00 clr %i1
2005440: c2 00 a0 d4 ld [ %g2 + 0xd4 ], %g1 <== NOT EXECUTED
2005444: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED
2005448: 82 40 20 00 addx %g0, 0, %g1 <== NOT EXECUTED
200544c: 10 80 00 03 b 2005458 <pthread_setcancelstate+0x88> <== NOT EXECUTED
2005450: b2 10 00 01 mov %g1, %i1 <== NOT EXECUTED
2005454: b2 10 20 00 clr %i1 <== NOT EXECUTED
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
2005458: 40 00 0b 0a call 2008080 <_Thread_Enable_dispatch>
200545c: b0 10 20 00 clr %i0
if ( cancel )
2005460: 80 8e 60 ff btst 0xff, %i1
2005464: 02 80 00 06 be 200547c <pthread_setcancelstate+0xac> <== ALWAYS TAKEN
2005468: 03 00 80 56 sethi %hi(0x2015800), %g1
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
200546c: d0 00 62 e4 ld [ %g1 + 0x2e4 ], %o0 ! 2015ae4 <_Thread_Executing><== NOT EXECUTED
2005470: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED
2005474: 7f ff fe d6 call 2004fcc <_POSIX_Thread_Exit> <== NOT EXECUTED
2005478: b0 10 20 00 clr %i0 <== NOT EXECUTED
200547c: 81 c7 e0 08 ret
2005480: 81 e8 00 00 restore
2005484: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED
return 0;
}
2005488: 81 c7 e0 08 ret <== NOT EXECUTED
200548c: 81 e8 00 00 restore <== NOT EXECUTED
02005490 <pthread_setcanceltype>:
int pthread_setcanceltype(
int type,
int *oldtype
)
{
2005490: 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() )
2005494: 03 00 80 56 sethi %hi(0x2015800), %g1
2005498: c2 00 62 c0 ld [ %g1 + 0x2c0 ], %g1 ! 2015ac0 <_ISR_Nest_level>
int pthread_setcanceltype(
int type,
int *oldtype
)
{
200549c: 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() )
20054a0: 80 a0 60 00 cmp %g1, 0
20054a4: 12 80 00 26 bne 200553c <pthread_setcanceltype+0xac> <== NEVER TAKEN
20054a8: b0 10 20 47 mov 0x47, %i0
return EPROTO;
if ( !oldtype )
20054ac: 80 a6 60 00 cmp %i1, 0
20054b0: 02 80 00 25 be 2005544 <pthread_setcanceltype+0xb4> <== NEVER TAKEN
20054b4: 80 a1 20 01 cmp %g4, 1
return EINVAL;
if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS )
20054b8: 38 80 00 21 bgu,a 200553c <pthread_setcanceltype+0xac> <== NEVER TAKEN
20054bc: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
20054c0: 03 00 80 56 sethi %hi(0x2015800), %g1
20054c4: 07 00 80 56 sethi %hi(0x2015800), %g3
20054c8: c4 00 62 e4 ld [ %g1 + 0x2e4 ], %g2
20054cc: c2 00 e2 20 ld [ %g3 + 0x220 ], %g1
20054d0: c4 00 a1 6c ld [ %g2 + 0x16c ], %g2
20054d4: 82 00 60 01 inc %g1
20054d8: c2 20 e2 20 st %g1, [ %g3 + 0x220 ]
_Thread_Disable_dispatch();
*oldtype = thread_support->cancelability_type;
20054dc: c2 00 a0 d0 ld [ %g2 + 0xd0 ], %g1
20054e0: c2 26 40 00 st %g1, [ %i1 ]
thread_support->cancelability_type = type;
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
20054e4: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1
20054e8: 80 a0 60 00 cmp %g1, 0
20054ec: 12 80 00 0a bne 2005514 <pthread_setcanceltype+0x84> <== NEVER TAKEN
20054f0: c8 20 a0 d0 st %g4, [ %g2 + 0xd0 ]
20054f4: 80 a1 20 01 cmp %g4, 1
20054f8: 32 80 00 08 bne,a 2005518 <pthread_setcanceltype+0x88>
20054fc: b2 10 20 00 clr %i1
2005500: c2 00 a0 d4 ld [ %g2 + 0xd4 ], %g1
2005504: 80 a0 00 01 cmp %g0, %g1
2005508: 82 40 20 00 addx %g0, 0, %g1
200550c: 10 80 00 03 b 2005518 <pthread_setcanceltype+0x88>
2005510: b2 10 00 01 mov %g1, %i1
2005514: b2 10 20 00 clr %i1 <== NOT EXECUTED
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
2005518: 40 00 0a da call 2008080 <_Thread_Enable_dispatch>
200551c: b0 10 20 00 clr %i0
if ( cancel )
2005520: 80 8e 60 ff btst 0xff, %i1
2005524: 02 80 00 06 be 200553c <pthread_setcanceltype+0xac> <== ALWAYS TAKEN
2005528: 03 00 80 56 sethi %hi(0x2015800), %g1
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
200552c: d0 00 62 e4 ld [ %g1 + 0x2e4 ], %o0 ! 2015ae4 <_Thread_Executing><== NOT EXECUTED
2005530: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED
2005534: 7f ff fe a6 call 2004fcc <_POSIX_Thread_Exit> <== NOT EXECUTED
2005538: b0 10 20 00 clr %i0 <== NOT EXECUTED
200553c: 81 c7 e0 08 ret
2005540: 81 e8 00 00 restore
2005544: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED
return 0;
}
2005548: 81 c7 e0 08 ret <== NOT EXECUTED
200554c: 81 e8 00 00 restore <== NOT EXECUTED
02007b98 <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
2007b98: 9d e3 bf 90 save %sp, -112, %sp
/*
* Check all the parameters
*/
if ( !param )
2007b9c: 80 a6 a0 00 cmp %i2, 0
2007ba0: 22 80 00 5d be,a 2007d14 <pthread_setschedparam+0x17c>
2007ba4: b0 10 20 16 mov 0x16, %i0
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
2007ba8: c2 06 80 00 ld [ %i2 ], %g1
2007bac: 82 00 7f ff add %g1, -1, %g1
2007bb0: 80 a0 60 fd cmp %g1, 0xfd
2007bb4: 18 80 00 5a bgu 2007d1c <pthread_setschedparam+0x184> <== NEVER TAKEN
2007bb8: 80 a6 60 01 cmp %i1, 1
return EINVAL;
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
budget_callout = NULL;
switch ( policy ) {
2007bbc: 02 80 00 10 be 2007bfc <pthread_setschedparam+0x64>
2007bc0: a6 10 20 00 clr %l3
2007bc4: 14 80 00 08 bg 2007be4 <pthread_setschedparam+0x4c>
2007bc8: 80 a6 60 02 cmp %i1, 2
2007bcc: 80 a6 60 00 cmp %i1, 0
2007bd0: a6 10 20 01 mov 1, %l3
2007bd4: 02 80 00 1b be 2007c40 <pthread_setschedparam+0xa8>
2007bd8: a4 10 20 00 clr %l2
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
break;
}
_Thread_Enable_dispatch();
return 0;
2007bdc: 81 c7 e0 08 ret
2007be0: 91 e8 20 16 restore %g0, 0x16, %o0
return EINVAL;
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
budget_callout = NULL;
switch ( policy ) {
2007be4: 02 80 00 05 be 2007bf8 <pthread_setschedparam+0x60>
2007be8: 80 a6 60 03 cmp %i1, 3
2007bec: 32 80 00 4a bne,a 2007d14 <pthread_setschedparam+0x17c> <== NEVER TAKEN
2007bf0: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED
2007bf4: 30 80 00 04 b,a 2007c04 <pthread_setschedparam+0x6c>
2007bf8: a6 10 20 02 mov 2, %l3
2007bfc: 10 80 00 11 b 2007c40 <pthread_setschedparam+0xa8>
2007c00: a4 10 20 00 clr %l2
case SCHED_SPORADIC:
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
budget_callout = _POSIX_Threads_Sporadic_budget_callout;
if ( _Timespec_To_ticks( ¶m->ss_replenish_period ) <
2007c04: 40 00 0e de call 200b77c <_Timespec_To_ticks>
2007c08: 90 06 a0 08 add %i2, 8, %o0
2007c0c: a0 10 00 08 mov %o0, %l0
2007c10: 40 00 0e db call 200b77c <_Timespec_To_ticks>
2007c14: 90 06 a0 10 add %i2, 0x10, %o0
2007c18: 80 a4 00 08 cmp %l0, %o0
2007c1c: 2a 80 00 3e bcs,a 2007d14 <pthread_setschedparam+0x17c> <== NEVER TAKEN
2007c20: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED
_Timespec_To_ticks( ¶m->ss_initial_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) )
2007c24: c2 06 a0 04 ld [ %i2 + 4 ], %g1
2007c28: 82 00 7f ff add %g1, -1, %g1
2007c2c: 80 a0 60 fd cmp %g1, 0xfd
2007c30: 18 80 00 3b bgu 2007d1c <pthread_setschedparam+0x184>
2007c34: 03 00 80 1e sethi %hi(0x2007800), %g1
2007c38: a6 10 20 03 mov 3, %l3
2007c3c: a4 10 62 b4 or %g1, 0x2b4, %l2
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get (
pthread_t id,
Objects_Locations *location
)
{
return (Thread_Control *)
2007c40: 92 10 00 18 mov %i0, %o1
2007c44: 11 00 80 63 sethi %hi(0x2018c00), %o0
2007c48: 94 07 bf f4 add %fp, -12, %o2
2007c4c: 40 00 08 9c call 2009ebc <_Objects_Get>
2007c50: 90 12 20 d0 or %o0, 0xd0, %o0
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
2007c54: c2 07 bf f4 ld [ %fp + -12 ], %g1
2007c58: a2 10 00 08 mov %o0, %l1
2007c5c: 80 a0 60 00 cmp %g1, 0
2007c60: 12 80 00 2d bne 2007d14 <pthread_setschedparam+0x17c>
2007c64: b0 10 20 03 mov 3, %i0
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
2007c68: e0 02 21 6c ld [ %o0 + 0x16c ], %l0
if ( api->schedpolicy == SCHED_SPORADIC )
2007c6c: c2 04 20 7c ld [ %l0 + 0x7c ], %g1
2007c70: 80 a0 60 03 cmp %g1, 3
2007c74: 32 80 00 05 bne,a 2007c88 <pthread_setschedparam+0xf0>
2007c78: f2 24 20 7c st %i1, [ %l0 + 0x7c ]
(void) _Watchdog_Remove( &api->Sporadic_timer );
2007c7c: 40 00 10 16 call 200bcd4 <_Watchdog_Remove>
2007c80: 90 04 20 9c add %l0, 0x9c, %o0
api->schedpolicy = policy;
2007c84: f2 24 20 7c st %i1, [ %l0 + 0x7c ]
api->schedparam = *param;
2007c88: 92 10 00 1a mov %i2, %o1
2007c8c: 90 04 20 80 add %l0, 0x80, %o0
2007c90: 40 00 23 19 call 20108f4 <memcpy>
2007c94: 94 10 20 18 mov 0x18, %o2
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
2007c98: c2 04 20 7c ld [ %l0 + 0x7c ], %g1
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
the_thread->budget_algorithm = budget_algorithm;
2007c9c: e6 24 60 7c st %l3, [ %l1 + 0x7c ]
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
2007ca0: 80 a0 60 00 cmp %g1, 0
2007ca4: 06 80 00 1a bl 2007d0c <pthread_setschedparam+0x174> <== NEVER TAKEN
2007ca8: e4 24 60 80 st %l2, [ %l1 + 0x80 ]
2007cac: 80 a0 60 02 cmp %g1, 2
2007cb0: 24 80 00 07 ble,a 2007ccc <pthread_setschedparam+0x134>
2007cb4: c4 04 20 80 ld [ %l0 + 0x80 ], %g2
2007cb8: 80 a0 60 03 cmp %g1, 3
2007cbc: 12 80 00 14 bne 2007d0c <pthread_setschedparam+0x174> <== NEVER TAKEN
2007cc0: 01 00 00 00 nop
TRUE
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
2007cc4: 10 80 00 0c b 2007cf4 <pthread_setschedparam+0x15c>
2007cc8: c2 04 20 80 ld [ %l0 + 0x80 ], %g1
switch ( api->schedpolicy ) {
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
2007ccc: 03 00 80 62 sethi %hi(0x2018800), %g1
2007cd0: c2 00 61 98 ld [ %g1 + 0x198 ], %g1 ! 2018998 <_Thread_Ticks_per_timeslice>
the_thread->real_priority =
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
2007cd4: 90 10 00 11 mov %l1, %o0
switch ( api->schedpolicy ) {
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
2007cd8: c2 24 60 78 st %g1, [ %l1 + 0x78 ]
2007cdc: 92 10 20 ff mov 0xff, %o1
the_thread->real_priority =
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
2007ce0: 94 10 20 01 mov 1, %o2
2007ce4: 92 22 40 02 sub %o1, %g2, %o1
2007ce8: 40 00 09 28 call 200a188 <_Thread_Change_priority>
2007cec: d2 24 60 18 st %o1, [ %l1 + 0x18 ]
2007cf0: 30 80 00 07 b,a 2007d0c <pthread_setschedparam+0x174>
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
_Watchdog_Remove( &api->Sporadic_timer );
2007cf4: 90 04 20 9c add %l0, 0x9c, %o0
2007cf8: 40 00 0f f7 call 200bcd4 <_Watchdog_Remove>
2007cfc: c2 24 20 98 st %g1, [ %l0 + 0x98 ]
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
2007d00: 92 10 00 11 mov %l1, %o1
2007d04: 7f ff ff 80 call 2007b04 <_POSIX_Threads_Sporadic_budget_TSR>
2007d08: 90 10 20 00 clr %o0
break;
}
_Thread_Enable_dispatch();
2007d0c: 40 00 0a ad call 200a7c0 <_Thread_Enable_dispatch>
2007d10: b0 10 20 00 clr %i0
2007d14: 81 c7 e0 08 ret
2007d18: 81 e8 00 00 restore
return 0;
2007d1c: b0 10 20 16 mov 0x16, %i0
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
2007d20: 81 c7 e0 08 ret
2007d24: 81 e8 00 00 restore
02005574 <pthread_testcancel>:
*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
2005574: 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() )
2005578: 03 00 80 56 sethi %hi(0x2015800), %g1
200557c: c2 00 62 c0 ld [ %g1 + 0x2c0 ], %g1 ! 2015ac0 <_ISR_Nest_level>
2005580: 80 a0 60 00 cmp %g1, 0
2005584: 12 80 00 18 bne 20055e4 <pthread_testcancel+0x70> <== NEVER TAKEN
2005588: 03 00 80 56 sethi %hi(0x2015800), %g1
200558c: 07 00 80 56 sethi %hi(0x2015800), %g3
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
2005590: c4 00 62 e4 ld [ %g1 + 0x2e4 ], %g2
2005594: c2 00 e2 20 ld [ %g3 + 0x220 ], %g1
2005598: c4 00 a1 6c ld [ %g2 + 0x16c ], %g2
200559c: 82 00 60 01 inc %g1
20055a0: c2 20 e2 20 st %g1, [ %g3 + 0x220 ]
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
20055a4: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1
20055a8: 80 a0 60 00 cmp %g1, 0
20055ac: 12 80 00 06 bne 20055c4 <pthread_testcancel+0x50> <== NEVER TAKEN
20055b0: b2 10 20 00 clr %i1
20055b4: c2 00 a0 d4 ld [ %g2 + 0xd4 ], %g1
20055b8: 80 a0 00 01 cmp %g0, %g1
20055bc: 82 40 20 00 addx %g0, 0, %g1
20055c0: b2 10 00 01 mov %g1, %i1
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
20055c4: 40 00 0a af call 2008080 <_Thread_Enable_dispatch>
20055c8: 01 00 00 00 nop
if ( cancel )
20055cc: 80 8e 60 ff btst 0xff, %i1
20055d0: 02 80 00 05 be 20055e4 <pthread_testcancel+0x70>
20055d4: 03 00 80 56 sethi %hi(0x2015800), %g1
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
20055d8: f0 00 62 e4 ld [ %g1 + 0x2e4 ], %i0 ! 2015ae4 <_Thread_Executing>
20055dc: 7f ff fe 7c call 2004fcc <_POSIX_Thread_Exit>
20055e0: 93 e8 3f ff restore %g0, -1, %o1
20055e4: 81 c7 e0 08 ret
20055e8: 81 e8 00 00 restore
02014bb0 <read>:
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
2014bb0: 9d e3 bf 98 save %sp, -104, %sp
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
2014bb4: 03 00 80 5a sethi %hi(0x2016800), %g1
2014bb8: c2 00 61 48 ld [ %g1 + 0x148 ], %g1 ! 2016948 <rtems_libio_number_iops>
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
2014bbc: 92 10 00 19 mov %i1, %o1
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
2014bc0: 80 a6 00 01 cmp %i0, %g1
2014bc4: 1a 80 00 1a bcc 2014c2c <read+0x7c> <== NEVER TAKEN
2014bc8: 94 10 00 1a mov %i2, %o2
iop = rtems_libio_iop( fd );
2014bcc: 03 00 80 5d sethi %hi(0x2017400), %g1
2014bd0: c6 00 62 44 ld [ %g1 + 0x244 ], %g3 ! 2017644 <rtems_libio_iops>
2014bd4: 85 2e 20 02 sll %i0, 2, %g2
2014bd8: 83 2e 20 04 sll %i0, 4, %g1
2014bdc: 82 20 40 02 sub %g1, %g2, %g1
2014be0: 82 00 40 18 add %g1, %i0, %g1
2014be4: 83 28 60 02 sll %g1, 2, %g1
2014be8: b0 00 c0 01 add %g3, %g1, %i0
rtems_libio_check_is_open( iop );
2014bec: c2 06 20 0c ld [ %i0 + 0xc ], %g1
2014bf0: 80 88 61 00 btst 0x100, %g1
2014bf4: 02 80 00 0e be 2014c2c <read+0x7c> <== NEVER TAKEN
2014bf8: 01 00 00 00 nop
rtems_libio_check_buffer( buffer );
2014bfc: 80 a6 60 00 cmp %i1, 0
2014c00: 12 80 00 06 bne 2014c18 <read+0x68> <== ALWAYS TAKEN
2014c04: 80 a6 a0 00 cmp %i2, 0
2014c08: 7f ff e1 23 call 200d094 <__errno> <== NOT EXECUTED
2014c0c: 01 00 00 00 nop <== NOT EXECUTED
2014c10: 10 80 00 12 b 2014c58 <read+0xa8> <== NOT EXECUTED
2014c14: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16> <== NOT EXECUTED
rtems_libio_check_count( count );
2014c18: 02 80 00 1b be 2014c84 <read+0xd4> <== NEVER TAKEN
2014c1c: 90 10 20 00 clr %o0
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
2014c20: 80 88 60 02 btst 2, %g1
2014c24: 32 80 00 06 bne,a 2014c3c <read+0x8c> <== ALWAYS TAKEN
2014c28: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
2014c2c: 7f ff e1 1a call 200d094 <__errno> <== NOT EXECUTED
2014c30: 01 00 00 00 nop <== NOT EXECUTED
2014c34: 10 80 00 09 b 2014c58 <read+0xa8> <== NOT EXECUTED
2014c38: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9> <== NOT EXECUTED
/*
* Now process the read().
*/
if ( !iop->handlers->read_h )
2014c3c: c2 00 60 08 ld [ %g1 + 8 ], %g1
2014c40: 80 a0 60 00 cmp %g1, 0
2014c44: 12 80 00 08 bne 2014c64 <read+0xb4> <== ALWAYS TAKEN
2014c48: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOTSUP );
2014c4c: 7f ff e1 12 call 200d094 <__errno> <== NOT EXECUTED
2014c50: 01 00 00 00 nop <== NOT EXECUTED
2014c54: 82 10 20 86 mov 0x86, %g1 ! 86 <PROM_START+0x86> <== NOT EXECUTED
2014c58: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2014c5c: 10 80 00 0a b 2014c84 <read+0xd4> <== NOT EXECUTED
2014c60: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
rc = (*iop->handlers->read_h)( iop, buffer, count );
2014c64: 9f c0 40 00 call %g1
2014c68: 90 10 00 18 mov %i0, %o0
if ( rc > 0 )
2014c6c: 80 a2 20 00 cmp %o0, 0
2014c70: 04 80 00 05 ble 2014c84 <read+0xd4>
2014c74: 01 00 00 00 nop
iop->offset += rc;
2014c78: c2 06 20 08 ld [ %i0 + 8 ], %g1
2014c7c: 82 00 40 08 add %g1, %o0, %g1
2014c80: c2 26 20 08 st %g1, [ %i0 + 8 ]
return rc;
}
2014c84: 81 c7 e0 08 ret
2014c88: 91 e8 00 08 restore %g0, %o0, %o0
02005080 <readdir>:
/*
* get next entry in a directory.
*/
struct dirent *
readdir( DIR *dirp )
{
2005080: 9d e3 bf 98 save %sp, -104, %sp
register struct dirent *dp;
if ( !dirp )
2005084: 80 a6 20 00 cmp %i0, 0
2005088: 02 80 00 2a be 2005130 <readdir+0xb0> <== NEVER TAKEN
200508c: 88 10 20 00 clr %g4
return NULL;
for (;;) {
if (dirp->dd_loc == 0) {
2005090: c2 06 20 04 ld [ %i0 + 4 ], %g1
2005094: 80 a0 60 00 cmp %g1, 0
2005098: 32 80 00 0a bne,a 20050c0 <readdir+0x40>
200509c: c6 06 20 04 ld [ %i0 + 4 ], %g3
dirp->dd_size = getdents (dirp->dd_fd,
20050a0: d0 06 00 00 ld [ %i0 ], %o0
20050a4: d2 06 20 0c ld [ %i0 + 0xc ], %o1
20050a8: 40 00 1e 83 call 200cab4 <getdents>
20050ac: d4 06 20 10 ld [ %i0 + 0x10 ], %o2
dirp->dd_buf,
dirp->dd_len);
if (dirp->dd_size <= 0)
20050b0: 80 a2 20 00 cmp %o0, 0
20050b4: 04 80 00 1e ble 200512c <readdir+0xac>
20050b8: d0 26 20 08 st %o0, [ %i0 + 8 ]
return NULL;
}
if (dirp->dd_loc >= dirp->dd_size) {
20050bc: c6 06 20 04 ld [ %i0 + 4 ], %g3
20050c0: c2 06 20 08 ld [ %i0 + 8 ], %g1
20050c4: 80 a0 c0 01 cmp %g3, %g1
20050c8: 26 80 00 04 bl,a 20050d8 <readdir+0x58>
20050cc: d8 06 20 0c ld [ %i0 + 0xc ], %o4
dirp->dd_loc = 0;
20050d0: 10 bf ff f0 b 2005090 <readdir+0x10>
20050d4: c0 26 20 04 clr [ %i0 + 4 ]
continue;
}
dp = (struct dirent *)(dirp->dd_buf + dirp->dd_loc);
20050d8: 88 03 00 03 add %o4, %g3, %g4
if ((intptr_t)dp & 03) /* bogus pointer check */
20050dc: 80 89 20 03 btst 3, %g4
20050e0: 32 80 00 14 bne,a 2005130 <readdir+0xb0> <== NEVER TAKEN
20050e4: 88 10 20 00 clr %g4 <== NOT EXECUTED
return NULL;
if (dp->d_reclen <= 0 ||
20050e8: c4 11 20 08 lduh [ %g4 + 8 ], %g2
20050ec: 80 a0 a0 00 cmp %g2, 0
20050f0: 02 80 00 0f be 200512c <readdir+0xac> <== NEVER TAKEN
20050f4: 9a 00 80 03 add %g2, %g3, %o5
20050f8: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
20050fc: 82 00 60 01 inc %g1
2005100: 82 20 40 03 sub %g1, %g3, %g1
2005104: 80 a0 80 01 cmp %g2, %g1
2005108: 34 80 00 0a bg,a 2005130 <readdir+0xb0> <== NEVER TAKEN
200510c: 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;
2005110: da 26 20 04 st %o5, [ %i0 + 4 ]
if (dp->d_ino == 0)
2005114: c2 03 00 03 ld [ %o4 + %g3 ], %g1
2005118: 80 a0 60 00 cmp %g1, 0
200511c: 22 bf ff de be,a 2005094 <readdir+0x14> <== NEVER TAKEN
2005120: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED
continue;
return (dp);
}
}
2005124: 81 c7 e0 08 ret
2005128: 91 e8 00 04 restore %g0, %g4, %o0
return NULL;
if (dp->d_reclen <= 0 ||
dp->d_reclen > dirp->dd_len + 1 - dirp->dd_loc)
return NULL;
dirp->dd_loc += dp->d_reclen;
if (dp->d_ino == 0)
200512c: 88 10 20 00 clr %g4
continue;
return (dp);
}
}
2005130: b0 10 00 04 mov %g4, %i0
2005134: 81 c7 e0 08 ret
2005138: 81 e8 00 00 restore
02005c38 <readlink>:
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
2005c38: 9d e3 bf 88 save %sp, -120, %sp
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
2005c3c: 80 a6 60 00 cmp %i1, 0
2005c40: 12 80 00 06 bne 2005c58 <readlink+0x20> <== ALWAYS TAKEN
2005c44: 90 10 00 18 mov %i0, %o0
rtems_set_errno_and_return_minus_one( EFAULT );
2005c48: 40 00 2e 14 call 2011498 <__errno> <== NOT EXECUTED
2005c4c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2005c50: 10 80 00 30 b 2005d10 <readlink+0xd8> <== NOT EXECUTED
2005c54: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED
result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false );
2005c58: a0 07 bf e8 add %fp, -24, %l0
2005c5c: 92 10 20 00 clr %o1
2005c60: 94 10 00 10 mov %l0, %o2
2005c64: 96 10 20 00 clr %o3
2005c68: 7f ff fa 44 call 2004578 <rtems_filesystem_evaluate_path>
2005c6c: b0 10 3f ff mov -1, %i0
if ( result != 0 )
2005c70: 80 a2 20 00 cmp %o0, 0
2005c74: 12 80 00 28 bne 2005d14 <readlink+0xdc> <== NEVER TAKEN
2005c78: c4 07 bf f0 ld [ %fp + -16 ], %g2
return -1;
if ( !loc.ops->node_type_h ){
2005c7c: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1
2005c80: 80 a0 60 00 cmp %g1, 0
2005c84: 12 80 00 04 bne 2005c94 <readlink+0x5c> <== ALWAYS TAKEN
2005c88: 01 00 00 00 nop
rtems_filesystem_freenode( &loc );
2005c8c: 10 80 00 19 b 2005cf0 <readlink+0xb8> <== NOT EXECUTED
2005c90: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
2005c94: 9f c0 40 00 call %g1
2005c98: 90 10 00 10 mov %l0, %o0
2005c9c: 80 a2 20 04 cmp %o0, 4
2005ca0: 02 80 00 0f be 2005cdc <readlink+0xa4>
2005ca4: c2 07 bf f0 ld [ %fp + -16 ], %g1
rtems_filesystem_freenode( &loc );
2005ca8: 80 a0 60 00 cmp %g1, 0
2005cac: 02 80 00 08 be 2005ccc <readlink+0x94> <== NEVER TAKEN
2005cb0: 01 00 00 00 nop
2005cb4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2005cb8: 80 a0 60 00 cmp %g1, 0
2005cbc: 02 80 00 04 be 2005ccc <readlink+0x94> <== NEVER TAKEN
2005cc0: 01 00 00 00 nop
2005cc4: 9f c0 40 00 call %g1
2005cc8: 90 10 00 10 mov %l0, %o0
rtems_set_errno_and_return_minus_one( EINVAL );
2005ccc: 40 00 2d f3 call 2011498 <__errno>
2005cd0: b0 10 3f ff mov -1, %i0
2005cd4: 10 80 00 0f b 2005d10 <readlink+0xd8>
2005cd8: 82 10 20 16 mov 0x16, %g1
}
if ( !loc.ops->readlink_h ){
2005cdc: c4 00 60 3c ld [ %g1 + 0x3c ], %g2
2005ce0: 80 a0 a0 00 cmp %g2, 0
2005ce4: 12 80 00 0e bne 2005d1c <readlink+0xe4> <== ALWAYS TAKEN
2005ce8: 92 10 00 19 mov %i1, %o1
rtems_filesystem_freenode( &loc );
2005cec: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2005cf0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2005cf4: 02 80 00 04 be 2005d04 <readlink+0xcc> <== NOT EXECUTED
2005cf8: 01 00 00 00 nop <== NOT EXECUTED
2005cfc: 9f c0 40 00 call %g1 <== NOT EXECUTED
2005d00: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
2005d04: 40 00 2d e5 call 2011498 <__errno> <== NOT EXECUTED
2005d08: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2005d0c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2005d10: c2 22 00 00 st %g1, [ %o0 ]
2005d14: 81 c7 e0 08 ret
2005d18: 81 e8 00 00 restore
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
2005d1c: 94 10 00 1a mov %i2, %o2
2005d20: 9f c0 80 00 call %g2
2005d24: 90 10 00 10 mov %l0, %o0
rtems_filesystem_freenode( &loc );
2005d28: c2 07 bf f0 ld [ %fp + -16 ], %g1
2005d2c: 80 a0 60 00 cmp %g1, 0
2005d30: 02 bf ff f9 be 2005d14 <readlink+0xdc> <== NEVER TAKEN
2005d34: b0 10 00 08 mov %o0, %i0
2005d38: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2005d3c: 80 a0 60 00 cmp %g1, 0
2005d40: 02 80 00 04 be 2005d50 <readlink+0x118> <== NEVER TAKEN
2005d44: 01 00 00 00 nop
2005d48: 9f c0 40 00 call %g1
2005d4c: 90 10 00 10 mov %l0, %o0
return result;
}
2005d50: 81 c7 e0 08 ret
2005d54: 81 e8 00 00 restore
02014d10 <realloc>:
{
size_t old_size;
char *new_area;
size_t resize;
MSBUMP(realloc_calls, 1);
2014d10: 9d e3 bf 90 save %sp, -112, %sp
2014d14: 07 00 80 5d sethi %hi(0x2017400), %g3
2014d18: 86 10 e2 a8 or %g3, 0x2a8, %g3 ! 20176a8 <rtems_malloc_statistics>
2014d1c: c2 00 e0 10 ld [ %g3 + 0x10 ], %g1
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
2014d20: 05 00 80 5e sethi %hi(0x2017800), %g2
2014d24: c4 00 a1 c4 ld [ %g2 + 0x1c4 ], %g2 ! 20179c4 <_System_state_Current>
{
size_t old_size;
char *new_area;
size_t resize;
MSBUMP(realloc_calls, 1);
2014d28: 82 00 60 01 inc %g1
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
2014d2c: 80 a0 a0 03 cmp %g2, 3
2014d30: 12 80 00 0c bne 2014d60 <realloc+0x50> <== NEVER TAKEN
2014d34: c2 20 e0 10 st %g1, [ %g3 + 0x10 ]
if (_Thread_Dispatch_disable_level > 0)
2014d38: 03 00 80 5e sethi %hi(0x2017800), %g1
2014d3c: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 ! 2017820 <_Thread_Dispatch_disable_level>
2014d40: 80 a0 60 00 cmp %g1, 0
2014d44: 32 80 00 13 bne,a 2014d90 <realloc+0x80> <== NEVER TAKEN
2014d48: b0 10 20 00 clr %i0 <== NOT EXECUTED
return (void *) 0;
if (_ISR_Nest_level > 0)
2014d4c: 03 00 80 5e sethi %hi(0x2017800), %g1
2014d50: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1 ! 20178c0 <_ISR_Nest_level>
2014d54: 80 a0 60 00 cmp %g1, 0
2014d58: 32 80 00 0e bne,a 2014d90 <realloc+0x80> <== NEVER TAKEN
2014d5c: b0 10 20 00 clr %i0 <== NOT EXECUTED
}
/*
* Continue with realloc().
*/
if ( !ptr )
2014d60: 80 a6 20 00 cmp %i0, 0
2014d64: 12 80 00 06 bne 2014d7c <realloc+0x6c> <== ALWAYS TAKEN
2014d68: 80 a6 60 00 cmp %i1, 0
return malloc( size );
2014d6c: 7f ff d6 a2 call 200a7f4 <malloc> <== NOT EXECUTED
2014d70: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2014d74: 81 c7 e0 08 ret <== NOT EXECUTED
2014d78: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
if ( !size ) {
2014d7c: 12 80 00 07 bne 2014d98 <realloc+0x88> <== ALWAYS TAKEN
2014d80: 21 00 80 5d sethi %hi(0x2017400), %l0
free( ptr );
2014d84: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2014d88: 7f ff d5 33 call 200a254 <free> <== NOT EXECUTED
2014d8c: b0 10 20 00 clr %i0 <== NOT EXECUTED
2014d90: 81 c7 e0 08 ret <== NOT EXECUTED
2014d94: 81 e8 00 00 restore <== NOT EXECUTED
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, ptr, &old_size) ) {
2014d98: 92 10 00 18 mov %i0, %o1
2014d9c: 90 14 22 50 or %l0, 0x250, %o0
2014da0: 40 00 00 63 call 2014f2c <_Protected_heap_Get_block_size>
2014da4: 94 07 bf f4 add %fp, -12, %o2
2014da8: 80 8a 20 ff btst 0xff, %o0
2014dac: 12 80 00 08 bne 2014dcc <realloc+0xbc>
2014db0: 90 14 22 50 or %l0, 0x250, %o0
errno = EINVAL;
2014db4: 7f ff e0 b8 call 200d094 <__errno>
2014db8: b0 10 20 00 clr %i0
2014dbc: 82 10 20 16 mov 0x16, %g1
2014dc0: c2 22 00 00 st %g1, [ %o0 ]
2014dc4: 81 c7 e0 08 ret
2014dc8: 81 e8 00 00 restore
#if defined(RTEMS_MALLOC_BOUNDARY_HELPERS)
if (rtems_malloc_boundary_helpers)
resize += (*rtems_malloc_boundary_helpers->overhead)();
#endif
if ( _Protected_heap_Resize_block( &RTEMS_Malloc_Heap, ptr, resize ) ) {
2014dcc: 92 10 00 18 mov %i0, %o1
2014dd0: 40 00 00 64 call 2014f60 <_Protected_heap_Resize_block>
2014dd4: 94 10 00 19 mov %i1, %o2
2014dd8: 80 8a 20 ff btst 0xff, %o0
2014ddc: 12 80 00 1b bne 2014e48 <realloc+0x138>
2014de0: 01 00 00 00 nop
* There used to be a free on this error case but it is wrong to
* free the memory per OpenGroup Single UNIX Specification V2
* and the C Standard.
*/
new_area = malloc( size );
2014de4: 7f ff d6 84 call 200a7f4 <malloc>
2014de8: 90 10 00 19 mov %i1, %o0
MSBUMP(malloc_calls, -1); /* subtract off the malloc */
2014dec: 05 00 80 5d sethi %hi(0x2017400), %g2
2014df0: 84 10 a2 a8 or %g2, 0x2a8, %g2 ! 20176a8 <rtems_malloc_statistics>
2014df4: c2 00 a0 04 ld [ %g2 + 4 ], %g1
* There used to be a free on this error case but it is wrong to
* free the memory per OpenGroup Single UNIX Specification V2
* and the C Standard.
*/
new_area = malloc( size );
2014df8: a0 10 00 08 mov %o0, %l0
MSBUMP(malloc_calls, -1); /* subtract off the malloc */
2014dfc: 82 00 7f ff add %g1, -1, %g1
if ( !new_area ) {
2014e00: 80 a2 20 00 cmp %o0, 0
2014e04: 02 80 00 10 be 2014e44 <realloc+0x134> <== NEVER TAKEN
2014e08: c2 20 a0 04 st %g1, [ %g2 + 4 ]
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
2014e0c: c2 07 bf f4 ld [ %fp + -12 ], %g1
2014e10: 80 a6 40 01 cmp %i1, %g1
2014e14: 08 80 00 03 bleu 2014e20 <realloc+0x110> <== NEVER TAKEN
2014e18: 90 10 00 19 mov %i1, %o0
2014e1c: 90 10 00 01 mov %g1, %o0
2014e20: 94 10 00 08 mov %o0, %o2
2014e24: 92 10 00 18 mov %i0, %o1
2014e28: 7f ff e2 8d call 200d85c <memcpy>
2014e2c: 90 10 00 10 mov %l0, %o0
free( ptr );
2014e30: 90 10 00 18 mov %i0, %o0
2014e34: 7f ff d5 08 call 200a254 <free>
2014e38: b0 10 00 10 mov %l0, %i0
2014e3c: 81 c7 e0 08 ret
2014e40: 81 e8 00 00 restore
return new_area;
2014e44: b0 10 20 00 clr %i0 <== NOT EXECUTED
}
2014e48: 81 c7 e0 08 ret
2014e4c: 81 e8 00 00 restore
0200513c <rewinddir>:
#include <unistd.h>
void rewinddir(
DIR *dirp
)
{
200513c: 9d e3 bf 98 save %sp, -104, %sp
off_t status;
if ( !dirp )
2005140: 80 a6 20 00 cmp %i0, 0
2005144: 02 80 00 08 be 2005164 <rewinddir+0x28>
2005148: 92 10 20 00 clr %o1
return;
status = lseek( dirp->dd_fd, 0, SEEK_SET );
200514c: d0 06 00 00 ld [ %i0 ], %o0
2005150: 7f ff fb 62 call 2003ed8 <lseek>
2005154: 94 10 20 00 clr %o2
if( status == -1 )
2005158: 80 a2 3f ff cmp %o0, -1
200515c: 32 80 00 02 bne,a 2005164 <rewinddir+0x28> <== ALWAYS TAKEN
2005160: c0 26 20 04 clr [ %i0 + 4 ]
2005164: 81 c7 e0 08 ret
2005168: 81 e8 00 00 restore
02005e9c <rmdir>:
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
2005e9c: 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 );
2005ea0: 92 10 20 00 clr %o1
2005ea4: 90 10 00 18 mov %i0, %o0
2005ea8: a0 07 bf e8 add %fp, -24, %l0
2005eac: 96 10 20 00 clr %o3
2005eb0: 7f ff f9 ef call 200466c <rtems_filesystem_evaluate_path>
2005eb4: 94 10 00 10 mov %l0, %o2
if ( result != 0 )
2005eb8: 80 a2 20 00 cmp %o0, 0
2005ebc: 32 80 00 11 bne,a 2005f00 <rmdir+0x64>
2005ec0: b0 10 3f ff mov -1, %i0
return -1;
result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc );
2005ec4: 90 10 20 02 mov 2, %o0
2005ec8: 7f ff f9 bc call 20045b8 <rtems_filesystem_evaluate_parent>
2005ecc: 92 10 00 10 mov %l0, %o1
if (result != 0) {
2005ed0: 80 a2 20 00 cmp %o0, 0
2005ed4: 02 80 00 0d be 2005f08 <rmdir+0x6c> <== ALWAYS TAKEN
2005ed8: c2 07 bf f0 ld [ %fp + -16 ], %g1
rtems_filesystem_freenode( &loc );
2005edc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2005ee0: 02 80 00 08 be 2005f00 <rmdir+0x64> <== NOT EXECUTED
2005ee4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2005ee8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2005eec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2005ef0: 02 80 00 04 be 2005f00 <rmdir+0x64> <== NOT EXECUTED
2005ef4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2005ef8: 9f c0 40 00 call %g1 <== NOT EXECUTED
2005efc: 01 00 00 00 nop <== NOT EXECUTED
2005f00: 81 c7 e0 08 ret
2005f04: 81 e8 00 00 restore
/*
* Verify you can remove this node as a directory.
*/
if ( !loc.ops->node_type_h ){
2005f08: c4 00 60 10 ld [ %g1 + 0x10 ], %g2
2005f0c: 80 a0 a0 00 cmp %g2, 0
2005f10: 22 80 00 1e be,a 2005f88 <rmdir+0xec> <== NEVER TAKEN
2005f14: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
2005f18: 9f c0 80 00 call %g2
2005f1c: 90 10 00 10 mov %l0, %o0
2005f20: 80 a2 20 01 cmp %o0, 1
2005f24: 02 80 00 10 be 2005f64 <rmdir+0xc8>
2005f28: c2 07 bf ec ld [ %fp + -20 ], %g1
rtems_filesystem_freenode( &loc );
2005f2c: c2 07 bf f0 ld [ %fp + -16 ], %g1
2005f30: 80 a0 60 00 cmp %g1, 0
2005f34: 02 80 00 08 be 2005f54 <rmdir+0xb8> <== NEVER TAKEN
2005f38: 01 00 00 00 nop
2005f3c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2005f40: 80 a0 60 00 cmp %g1, 0
2005f44: 02 80 00 04 be 2005f54 <rmdir+0xb8> <== NEVER TAKEN
2005f48: 01 00 00 00 nop
2005f4c: 9f c0 40 00 call %g1
2005f50: 90 10 00 10 mov %l0, %o0
rtems_set_errno_and_return_minus_one( ENOTDIR );
2005f54: 40 00 2c 2f call 2011010 <__errno>
2005f58: b0 10 3f ff mov -1, %i0
2005f5c: 10 80 00 13 b 2005fa8 <rmdir+0x10c>
2005f60: 82 10 20 14 mov 0x14, %g1
/*
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod_h ){
2005f64: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
2005f68: 80 a0 60 00 cmp %g1, 0
2005f6c: 12 80 00 12 bne 2005fb4 <rmdir+0x118> <== ALWAYS TAKEN
2005f70: 01 00 00 00 nop
rtems_filesystem_freenode( &loc );
2005f74: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED
2005f78: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2005f7c: 02 80 00 08 be 2005f9c <rmdir+0x100> <== NOT EXECUTED
2005f80: 01 00 00 00 nop <== NOT EXECUTED
2005f84: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2005f88: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2005f8c: 02 80 00 04 be 2005f9c <rmdir+0x100> <== NOT EXECUTED
2005f90: 01 00 00 00 nop <== NOT EXECUTED
2005f94: 9f c0 40 00 call %g1 <== NOT EXECUTED
2005f98: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
2005f9c: 40 00 2c 1d call 2011010 <__errno> <== NOT EXECUTED
2005fa0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2005fa4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2005fa8: c2 22 00 00 st %g1, [ %o0 ]
2005fac: 81 c7 e0 08 ret
2005fb0: 81 e8 00 00 restore
}
result = (*loc.handlers->rmnod_h)( &loc );
2005fb4: 9f c0 40 00 call %g1
2005fb8: 90 10 00 10 mov %l0, %o0
rtems_filesystem_freenode( &loc );
2005fbc: c2 07 bf f0 ld [ %fp + -16 ], %g1
2005fc0: 80 a0 60 00 cmp %g1, 0
2005fc4: 02 bf ff cf be 2005f00 <rmdir+0x64> <== NEVER TAKEN
2005fc8: b0 10 00 08 mov %o0, %i0
2005fcc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2005fd0: 80 a0 60 00 cmp %g1, 0
2005fd4: 02 80 00 06 be 2005fec <rmdir+0x150> <== NEVER TAKEN
2005fd8: 01 00 00 00 nop
2005fdc: 9f c0 40 00 call %g1
2005fe0: 90 10 00 10 mov %l0, %o0
2005fe4: 81 c7 e0 08 ret
2005fe8: 81 e8 00 00 restore
return result;
}
2005fec: 81 c7 e0 08 ret <== NOT EXECUTED
2005ff0: 81 e8 00 00 restore <== NOT EXECUTED
0200e600 <rtems_assoc_name_bad>:
const char *
rtems_assoc_name_bad(
uint32_t bad_value
)
{
200e600: 11 00 80 6e sethi %hi(0x201b800), %o0 <== NOT EXECUTED
sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value);
#else
static char bad_buffer[40] = "<assocnamebad.c: : BAD NAME>";
#endif
return bad_buffer;
}
200e604: 81 c3 e0 08 retl <== NOT EXECUTED
200e608: 90 12 23 a8 or %o0, 0x3a8, %o0 ! 201bba8 <bad_buffer.5040><== NOT EXECUTED
0200bfa0 <rtems_assoc_name_by_local>:
const char *rtems_assoc_name_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
200bfa0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
200bfa4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
200bfa8: 40 00 00 0b call 200bfd4 <rtems_assoc_ptr_by_local> <== NOT EXECUTED
200bfac: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
if (nap)
200bfb0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200bfb4: 02 80 00 05 be 200bfc8 <rtems_assoc_name_by_local+0x28> <== NOT EXECUTED
200bfb8: 01 00 00 00 nop <== NOT EXECUTED
return nap->name;
return rtems_assoc_name_bad(local_value);
}
200bfbc: f0 02 00 00 ld [ %o0 ], %i0 <== NOT EXECUTED
200bfc0: 81 c7 e0 08 ret <== NOT EXECUTED
200bfc4: 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);
200bfc8: 40 00 09 8e call 200e600 <rtems_assoc_name_bad> <== NOT EXECUTED
200bfcc: 91 e8 00 19 restore %g0, %i1, %o0 <== NOT EXECUTED
0200cfd4 <rtems_assoc_ptr_by_local>:
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
200cfd4: 9d e3 bf 98 save %sp, -104, %sp
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
200cfd8: d0 06 00 00 ld [ %i0 ], %o0
200cfdc: 80 a2 20 00 cmp %o0, 0
200cfe0: 02 80 00 0e be 200d018 <rtems_assoc_ptr_by_local+0x44> <== NEVER TAKEN
200cfe4: 84 10 20 00 clr %g2
200cfe8: 13 00 80 58 sethi %hi(0x2016000), %o1
200cfec: 40 00 04 fa call 200e3d4 <strcmp>
200cff0: 92 12 62 68 or %o1, 0x268, %o1 ! 2016268 <__func__.5619+0x18>
200cff4: 80 a2 20 00 cmp %o0, 0
200cff8: 02 80 00 07 be 200d014 <rtems_assoc_ptr_by_local+0x40> <== NEVER TAKEN
200cffc: 84 10 00 18 mov %i0, %g2
default_ap = ap++;
200d000: 10 80 00 06 b 200d018 <rtems_assoc_ptr_by_local+0x44>
200d004: 84 10 20 00 clr %g2
for ( ; ap->name; ap++)
if (ap->local_value == local_value)
200d008: 80 a0 40 19 cmp %g1, %i1
200d00c: 02 80 00 08 be 200d02c <rtems_assoc_ptr_by_local+0x58>
200d010: 01 00 00 00 nop
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
200d014: b0 06 20 0c add %i0, 0xc, %i0
200d018: c2 06 00 00 ld [ %i0 ], %g1
200d01c: 80 a0 60 00 cmp %g1, 0
200d020: 32 bf ff fa bne,a 200d008 <rtems_assoc_ptr_by_local+0x34>
200d024: c2 06 20 04 ld [ %i0 + 4 ], %g1
200d028: b0 10 00 02 mov %g2, %i0
if (ap->local_value == local_value)
return ap;
return default_ap;
}
200d02c: 81 c7 e0 08 ret
200d030: 81 e8 00 00 restore
0200c6a0 <rtems_assoc_ptr_by_remote>:
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
200c6a0: 9d e3 bf 98 save %sp, -104, %sp
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
200c6a4: d0 06 00 00 ld [ %i0 ], %o0
200c6a8: 80 a2 20 00 cmp %o0, 0
200c6ac: 02 80 00 0e be 200c6e4 <rtems_assoc_ptr_by_remote+0x44> <== NEVER TAKEN
200c6b0: 84 10 20 00 clr %g2
200c6b4: 13 00 80 58 sethi %hi(0x2016000), %o1
200c6b8: 40 00 07 47 call 200e3d4 <strcmp>
200c6bc: 92 12 62 68 or %o1, 0x268, %o1 ! 2016268 <__func__.5619+0x18>
200c6c0: 80 a2 20 00 cmp %o0, 0
200c6c4: 02 80 00 07 be 200c6e0 <rtems_assoc_ptr_by_remote+0x40> <== NEVER TAKEN
200c6c8: 84 10 00 18 mov %i0, %g2
default_ap = ap++;
200c6cc: 10 80 00 06 b 200c6e4 <rtems_assoc_ptr_by_remote+0x44>
200c6d0: 84 10 20 00 clr %g2
for ( ; ap->name; ap++)
if (ap->remote_value == remote_value)
200c6d4: 80 a0 40 19 cmp %g1, %i1
200c6d8: 02 80 00 08 be 200c6f8 <rtems_assoc_ptr_by_remote+0x58>
200c6dc: 01 00 00 00 nop
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
200c6e0: b0 06 20 0c add %i0, 0xc, %i0
200c6e4: c2 06 00 00 ld [ %i0 ], %g1
200c6e8: 80 a0 60 00 cmp %g1, 0
200c6ec: 32 bf ff fa bne,a 200c6d4 <rtems_assoc_ptr_by_remote+0x34>
200c6f0: c2 06 20 08 ld [ %i0 + 8 ], %g1
200c6f4: b0 10 00 02 mov %g2, %i0
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
200c6f8: 81 c7 e0 08 ret
200c6fc: 81 e8 00 00 restore
0200c700 <rtems_assoc_remote_by_local>:
uint32_t rtems_assoc_remote_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
200c700: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
200c704: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
200c708: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200c70c: 40 00 02 32 call 200cfd4 <rtems_assoc_ptr_by_local> <== NOT EXECUTED
200c710: b0 10 20 00 clr %i0 <== NOT EXECUTED
if (nap)
200c714: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200c718: 32 80 00 02 bne,a 200c720 <rtems_assoc_remote_by_local+0x20><== NOT EXECUTED
200c71c: f0 02 20 08 ld [ %o0 + 8 ], %i0 <== NOT EXECUTED
return nap->remote_value;
return 0;
}
200c720: 81 c7 e0 08 ret <== NOT EXECUTED
200c724: 81 e8 00 00 restore <== NOT EXECUTED
02005ae0 <rtems_barrier_create>:
rtems_name name,
rtems_attribute attribute_set,
uint32_t maximum_waiters,
rtems_id *id
)
{
2005ae0: 9d e3 bf 90 save %sp, -112, %sp
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
2005ae4: a2 96 20 00 orcc %i0, 0, %l1
2005ae8: 02 80 00 1b be 2005b54 <rtems_barrier_create+0x74> <== NEVER TAKEN
2005aec: b0 10 20 03 mov 3, %i0
return RTEMS_INVALID_NAME;
if ( !id )
2005af0: 80 a6 e0 00 cmp %i3, 0
2005af4: 02 80 00 18 be 2005b54 <rtems_barrier_create+0x74> <== NEVER TAKEN
2005af8: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
2005afc: 80 8e 60 10 btst 0x10, %i1
2005b00: 02 80 00 06 be 2005b18 <rtems_barrier_create+0x38>
2005b04: 80 a6 a0 00 cmp %i2, 0
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
2005b08: 02 80 00 13 be 2005b54 <rtems_barrier_create+0x74>
2005b0c: 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;
2005b10: 10 80 00 04 b 2005b20 <rtems_barrier_create+0x40>
2005b14: c0 27 bf f0 clr [ %fp + -16 ]
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
2005b18: 82 10 20 01 mov 1, %g1
2005b1c: c2 27 bf f0 st %g1, [ %fp + -16 ]
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
2005b20: 05 00 80 6e sethi %hi(0x201b800), %g2
2005b24: c2 00 a3 60 ld [ %g2 + 0x360 ], %g1 ! 201bb60 <_Thread_Dispatch_disable_level>
the_attributes.maximum_count = maximum_waiters;
2005b28: f4 27 bf f4 st %i2, [ %fp + -12 ]
2005b2c: 82 00 60 01 inc %g1
2005b30: c2 20 a3 60 st %g1, [ %g2 + 0x360 ]
* 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 );
2005b34: 21 00 80 6e sethi %hi(0x201b800), %l0
2005b38: 40 00 07 c4 call 2007a48 <_Objects_Allocate>
2005b3c: 90 14 21 e4 or %l0, 0x1e4, %o0 ! 201b9e4 <_Barrier_Information>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
2005b40: b4 92 20 00 orcc %o0, 0, %i2
2005b44: 12 80 00 06 bne 2005b5c <rtems_barrier_create+0x7c>
2005b48: 90 06 a0 14 add %i2, 0x14, %o0
_Thread_Enable_dispatch();
2005b4c: 40 00 0b 87 call 2008968 <_Thread_Enable_dispatch>
2005b50: b0 10 20 05 mov 5, %i0
2005b54: 81 c7 e0 08 ret
2005b58: 81 e8 00 00 restore
return RTEMS_TOO_MANY;
}
the_barrier->attribute_set = attribute_set;
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
2005b5c: 92 07 bf f0 add %fp, -16, %o1
2005b60: 40 00 05 7c call 2007150 <_CORE_barrier_Initialize>
2005b64: f2 26 a0 10 st %i1, [ %i2 + 0x10 ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2005b68: c4 06 a0 08 ld [ %i2 + 8 ], %g2
2005b6c: 82 14 21 e4 or %l0, 0x1e4, %g1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
2005b70: e2 26 a0 0c st %l1, [ %i2 + 0xc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2005b74: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
&_Barrier_Information,
&the_barrier->Object,
(Objects_Name) name
);
*id = the_barrier->Object.id;
2005b78: c4 26 c0 00 st %g2, [ %i3 ]
2005b7c: 03 00 00 3f sethi %hi(0xfc00), %g1
2005b80: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
2005b84: 84 08 80 01 and %g2, %g1, %g2
2005b88: 85 28 a0 02 sll %g2, 2, %g2
_Thread_Enable_dispatch();
2005b8c: b0 10 20 00 clr %i0
2005b90: 40 00 0b 76 call 2008968 <_Thread_Enable_dispatch>
2005b94: f4 20 c0 02 st %i2, [ %g3 + %g2 ]
return RTEMS_SUCCESSFUL;
}
2005b98: 81 c7 e0 08 ret
2005b9c: 81 e8 00 00 restore
02005c40 <rtems_barrier_release>:
rtems_status_code rtems_barrier_release(
rtems_id id,
uint32_t *released
)
{
2005c40: 9d e3 bf 90 save %sp, -112, %sp
2005c44: a0 10 00 18 mov %i0, %l0
Barrier_Control *the_barrier;
Objects_Locations location;
if ( !released )
2005c48: 80 a6 60 00 cmp %i1, 0
2005c4c: 02 80 00 12 be 2005c94 <rtems_barrier_release+0x54> <== NEVER TAKEN
2005c50: b0 10 20 09 mov 9, %i0
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Barrier_Control *)
2005c54: 11 00 80 6e sethi %hi(0x201b800), %o0
2005c58: 92 10 00 10 mov %l0, %o1
2005c5c: 90 12 21 e4 or %o0, 0x1e4, %o0
2005c60: 40 00 08 d4 call 2007fb0 <_Objects_Get>
2005c64: 94 07 bf f4 add %fp, -12, %o2
return RTEMS_INVALID_ADDRESS;
the_barrier = _Barrier_Get( id, &location );
switch ( location ) {
2005c68: c2 07 bf f4 ld [ %fp + -12 ], %g1
2005c6c: 80 a0 60 00 cmp %g1, 0
2005c70: 12 80 00 09 bne 2005c94 <rtems_barrier_release+0x54>
2005c74: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
*released = _CORE_barrier_Release( &the_barrier->Barrier, id, NULL );
2005c78: 92 10 00 10 mov %l0, %o1
2005c7c: 94 10 20 00 clr %o2
2005c80: 40 00 05 40 call 2007180 <_CORE_barrier_Release>
2005c84: 90 02 20 14 add %o0, 0x14, %o0
_Thread_Enable_dispatch();
2005c88: b0 10 20 00 clr %i0
2005c8c: 40 00 0b 37 call 2008968 <_Thread_Enable_dispatch>
2005c90: d0 26 40 00 st %o0, [ %i1 ]
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2005c94: 81 c7 e0 08 ret
2005c98: 81 e8 00 00 restore
02004b84 <rtems_clock_get>:
rtems_status_code rtems_clock_get(
rtems_clock_get_options option,
void *time_buffer
)
{
2004b84: 9d e3 bf 98 save %sp, -104, %sp
2004b88: 82 10 00 18 mov %i0, %g1
if ( !time_buffer )
2004b8c: 80 a6 60 00 cmp %i1, 0
2004b90: 02 80 00 1a be 2004bf8 <rtems_clock_get+0x74> <== NEVER TAKEN
2004b94: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
switch ( option ) {
2004b98: 80 a0 60 04 cmp %g1, 4
2004b9c: 18 80 00 17 bgu 2004bf8 <rtems_clock_get+0x74>
2004ba0: b0 10 20 0a mov 0xa, %i0
2004ba4: 83 28 60 02 sll %g1, 2, %g1
2004ba8: 05 00 80 12 sethi %hi(0x2004800), %g2
2004bac: 84 10 a3 70 or %g2, 0x370, %g2 ! 2004b70 <rtems_termios_rxdaemon+0x70>
2004bb0: c2 00 80 01 ld [ %g2 + %g1 ], %g1
2004bb4: 81 c0 40 00 jmp %g1
2004bb8: 01 00 00 00 nop
case RTEMS_CLOCK_GET_TOD:
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
2004bbc: 40 00 00 2b call 2004c68 <rtems_clock_get_tod>
2004bc0: 91 e8 00 19 restore %g0, %i1, %o0
case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH:
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
2004bc4: 40 00 00 0f call 2004c00 <rtems_clock_get_seconds_since_epoch>
2004bc8: 91 e8 00 19 restore %g0, %i1, %o0
case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT: {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_since_boot();
2004bcc: 40 00 00 23 call 2004c58 <rtems_clock_get_ticks_since_boot>
2004bd0: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
}
case RTEMS_CLOCK_GET_TICKS_PER_SECOND: {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_per_second();
2004bd4: 10 80 00 05 b 2004be8 <rtems_clock_get+0x64>
2004bd8: d0 26 40 00 st %o0, [ %i1 ]
2004bdc: 40 00 00 17 call 2004c38 <rtems_clock_get_ticks_per_second>
2004be0: 01 00 00 00 nop
2004be4: d0 26 40 00 st %o0, [ %i1 ]
2004be8: 81 c7 e0 08 ret
2004bec: 91 e8 20 00 restore %g0, 0, %o0
return RTEMS_SUCCESSFUL;
}
case RTEMS_CLOCK_GET_TIME_VALUE:
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
2004bf0: 40 00 00 4d call 2004d24 <rtems_clock_get_tod_timeval>
2004bf4: 91 e8 00 19 restore %g0, %i1, %o0
break;
}
return RTEMS_INVALID_NUMBER;
}
2004bf8: 81 c7 e0 08 ret
2004bfc: 81 e8 00 00 restore
02004c00 <rtems_clock_get_seconds_since_epoch>:
rtems_status_code rtems_clock_get_seconds_since_epoch(
rtems_interval *the_interval
)
{
if ( !the_interval )
2004c00: 84 92 20 00 orcc %o0, 0, %g2
2004c04: 02 80 00 0b be 2004c30 <rtems_clock_get_seconds_since_epoch+0x30><== NEVER TAKEN
2004c08: 90 10 20 09 mov 9, %o0
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
2004c0c: 03 00 80 5e sethi %hi(0x2017800), %g1
2004c10: c2 08 60 34 ldub [ %g1 + 0x34 ], %g1 ! 2017834 <_TOD_Is_set>
2004c14: 80 a0 60 00 cmp %g1, 0
2004c18: 02 80 00 06 be 2004c30 <rtems_clock_get_seconds_since_epoch+0x30>
2004c1c: 90 10 20 0b mov 0xb, %o0
return RTEMS_NOT_DEFINED;
*the_interval = _TOD_Seconds_since_epoch;
2004c20: 03 00 80 5e sethi %hi(0x2017800), %g1
2004c24: c2 00 60 b4 ld [ %g1 + 0xb4 ], %g1 ! 20178b4 <_TOD_Now>
2004c28: 90 10 20 00 clr %o0
2004c2c: c2 20 80 00 st %g1, [ %g2 ]
return RTEMS_SUCCESSFUL;
}
2004c30: 81 c3 e0 08 retl
02004c68 <rtems_clock_get_tod>:
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_tod(
rtems_time_of_day *time_buffer
)
{
2004c68: 9d e3 bf 60 save %sp, -160, %sp
rtems_time_of_day *tmbuf = time_buffer;
struct tm time;
struct timeval now;
if ( !time_buffer )
2004c6c: a2 96 20 00 orcc %i0, 0, %l1
2004c70: 02 80 00 2b be 2004d1c <rtems_clock_get_tod+0xb4> <== NEVER TAKEN
2004c74: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
2004c78: 03 00 80 5e sethi %hi(0x2017800), %g1
2004c7c: c2 08 60 34 ldub [ %g1 + 0x34 ], %g1 ! 2017834 <_TOD_Is_set>
2004c80: 80 a0 60 00 cmp %g1, 0
2004c84: 02 80 00 26 be 2004d1c <rtems_clock_get_tod+0xb4>
2004c88: b0 10 20 0b mov 0xb, %i0
)
{
ISR_Level level;
struct timespec now;
_ISR_Disable(level);
2004c8c: 7f ff f4 38 call 2001d6c <sparc_disable_interrupts>
2004c90: 01 00 00 00 nop
2004c94: a0 10 00 08 mov %o0, %l0
_TOD_Get( &now );
2004c98: 40 00 05 d5 call 20063ec <_TOD_Get>
2004c9c: 90 07 bf e8 add %fp, -24, %o0
_ISR_Enable(level);
2004ca0: 7f ff f4 37 call 2001d7c <sparc_enable_interrupts>
2004ca4: 90 10 00 10 mov %l0, %o0
time->tv_sec = now.tv_sec;
2004ca8: c2 07 bf e8 ld [ %fp + -24 ], %g1
time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND;
2004cac: d0 07 bf ec ld [ %fp + -20 ], %o0
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
time->tv_sec = now.tv_sec;
2004cb0: c2 27 bf f0 st %g1, [ %fp + -16 ]
time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND;
2004cb4: 40 00 3b c3 call 2013bc0 <.udiv>
2004cb8: 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 );
2004cbc: 92 07 bf c4 add %fp, -60, %o1
2004cc0: d0 27 bf f4 st %o0, [ %fp + -12 ]
2004cc4: 40 00 22 e1 call 200d848 <gmtime_r>
2004cc8: 90 07 bf f0 add %fp, -16, %o0
tmbuf->month = time.tm_mon + 1;
tmbuf->day = time.tm_mday;
tmbuf->hour = time.tm_hour;
tmbuf->minute = time.tm_min;
tmbuf->second = time.tm_sec;
tmbuf->ticks = now.tv_usec / _TOD_Microseconds_per_tick;
2004ccc: 03 00 80 5e sethi %hi(0x2017800), %g1
2004cd0: d2 00 61 c0 ld [ %g1 + 0x1c0 ], %o1 ! 20179c0 <_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;
2004cd4: c2 07 bf d0 ld [ %fp + -48 ], %g1
tmbuf->hour = time.tm_hour;
tmbuf->minute = time.tm_min;
tmbuf->second = time.tm_sec;
tmbuf->ticks = now.tv_usec / _TOD_Microseconds_per_tick;
2004cd8: d0 07 bf f4 ld [ %fp + -12 ], %o0
gmtime_r( &now.tv_sec, &time );
/* Now adjust it to the RTEMS format */
tmbuf->year = time.tm_year + 1900;
tmbuf->month = time.tm_mon + 1;
tmbuf->day = time.tm_mday;
2004cdc: c2 24 60 08 st %g1, [ %l1 + 8 ]
tmbuf->hour = time.tm_hour;
2004ce0: c2 07 bf cc ld [ %fp + -52 ], %g1
tmbuf->minute = time.tm_min;
tmbuf->second = time.tm_sec;
tmbuf->ticks = now.tv_usec / _TOD_Microseconds_per_tick;
2004ce4: b0 10 20 00 clr %i0
/* 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;
2004ce8: c2 24 60 0c st %g1, [ %l1 + 0xc ]
tmbuf->minute = time.tm_min;
2004cec: c2 07 bf c8 ld [ %fp + -56 ], %g1
2004cf0: c2 24 60 10 st %g1, [ %l1 + 0x10 ]
tmbuf->second = time.tm_sec;
2004cf4: c2 07 bf c4 ld [ %fp + -60 ], %g1
2004cf8: c2 24 60 14 st %g1, [ %l1 + 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;
2004cfc: c2 07 bf d8 ld [ %fp + -40 ], %g1
2004d00: 82 00 67 6c add %g1, 0x76c, %g1
2004d04: c2 24 40 00 st %g1, [ %l1 ]
tmbuf->month = time.tm_mon + 1;
2004d08: c2 07 bf d4 ld [ %fp + -44 ], %g1
2004d0c: 82 00 60 01 inc %g1
tmbuf->day = time.tm_mday;
tmbuf->hour = time.tm_hour;
tmbuf->minute = time.tm_min;
tmbuf->second = time.tm_sec;
tmbuf->ticks = now.tv_usec / _TOD_Microseconds_per_tick;
2004d10: 40 00 3b ac call 2013bc0 <.udiv>
2004d14: c2 24 60 04 st %g1, [ %l1 + 4 ]
2004d18: d0 24 60 18 st %o0, [ %l1 + 0x18 ]
return RTEMS_SUCCESSFUL;
}
2004d1c: 81 c7 e0 08 ret
2004d20: 81 e8 00 00 restore
02004d24 <rtems_clock_get_tod_timeval>:
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_tod_timeval(
struct timeval *time
)
{
2004d24: 9d e3 bf 90 save %sp, -112, %sp
if ( !time )
2004d28: a2 96 20 00 orcc %i0, 0, %l1
2004d2c: 02 80 00 15 be 2004d80 <rtems_clock_get_tod_timeval+0x5c> <== NEVER TAKEN
2004d30: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
2004d34: 03 00 80 5e sethi %hi(0x2017800), %g1
2004d38: c2 08 60 34 ldub [ %g1 + 0x34 ], %g1 ! 2017834 <_TOD_Is_set>
2004d3c: 80 a0 60 00 cmp %g1, 0
2004d40: 02 80 00 10 be 2004d80 <rtems_clock_get_tod_timeval+0x5c>
2004d44: b0 10 20 0b mov 0xb, %i0
)
{
ISR_Level level;
struct timespec now;
_ISR_Disable(level);
2004d48: 7f ff f4 09 call 2001d6c <sparc_disable_interrupts>
2004d4c: 01 00 00 00 nop
2004d50: a0 10 00 08 mov %o0, %l0
_TOD_Get( &now );
2004d54: 40 00 05 a6 call 20063ec <_TOD_Get>
2004d58: 90 07 bf f0 add %fp, -16, %o0
_ISR_Enable(level);
2004d5c: 7f ff f4 08 call 2001d7c <sparc_enable_interrupts>
2004d60: 90 10 00 10 mov %l0, %o0
time->tv_sec = now.tv_sec;
time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND;
2004d64: d0 07 bf f4 ld [ %fp + -12 ], %o0
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
time->tv_sec = now.tv_sec;
2004d68: c2 07 bf f0 ld [ %fp + -16 ], %g1
time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND;
2004d6c: 92 10 23 e8 mov 0x3e8, %o1
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
time->tv_sec = now.tv_sec;
2004d70: c2 24 40 00 st %g1, [ %l1 ]
time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND;
2004d74: 40 00 3b 93 call 2013bc0 <.udiv>
2004d78: b0 10 20 00 clr %i0
2004d7c: d0 24 60 04 st %o0, [ %l1 + 4 ]
return RTEMS_NOT_DEFINED;
_TOD_Get_timeval( time );
return RTEMS_SUCCESSFUL;
}
2004d80: 81 c7 e0 08 ret
2004d84: 81 e8 00 00 restore
02004f94 <rtems_clock_get_uptime>:
* error code - if unsuccessful
*/
rtems_status_code rtems_clock_get_uptime(
struct timespec *uptime
)
{
2004f94: 9d e3 bf 98 save %sp, -104, %sp
if ( !uptime )
2004f98: 90 96 20 00 orcc %i0, 0, %o0
2004f9c: 02 80 00 04 be 2004fac <rtems_clock_get_uptime+0x18> <== NEVER TAKEN
2004fa0: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
_TOD_Get_uptime( uptime );
2004fa4: 40 00 06 27 call 2006840 <_TOD_Get_uptime>
2004fa8: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
}
2004fac: 81 c7 e0 08 ret
2004fb0: 81 e8 00 00 restore
0200607c <rtems_clock_set>:
*/
rtems_status_code rtems_clock_set(
rtems_time_of_day *time_buffer
)
{
200607c: 9d e3 bf 90 save %sp, -112, %sp
struct timespec newtime;
if ( !time_buffer )
2006080: a0 96 20 00 orcc %i0, 0, %l0
2006084: 02 80 00 1e be 20060fc <rtems_clock_set+0x80> <== NEVER TAKEN
2006088: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
if ( _TOD_Validate( time_buffer ) ) {
200608c: 90 10 00 10 mov %l0, %o0
2006090: 40 00 00 65 call 2006224 <_TOD_Validate>
2006094: b0 10 20 14 mov 0x14, %i0
2006098: 80 8a 20 ff btst 0xff, %o0
200609c: 02 80 00 18 be 20060fc <rtems_clock_set+0x80>
20060a0: 01 00 00 00 nop
newtime.tv_sec = _TOD_To_seconds( time_buffer );
20060a4: 40 00 00 2d call 2006158 <_TOD_To_seconds>
20060a8: 90 10 00 10 mov %l0, %o0
newtime.tv_nsec = time_buffer->ticks *
20060ac: 03 00 80 91 sethi %hi(0x2024400), %g1
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( _TOD_Validate( time_buffer ) ) {
newtime.tv_sec = _TOD_To_seconds( time_buffer );
20060b0: d0 27 bf f0 st %o0, [ %fp + -16 ]
newtime.tv_nsec = time_buffer->ticks *
20060b4: d2 00 60 00 ld [ %g1 ], %o1
20060b8: 40 00 44 8a call 20172e0 <.umul>
20060bc: d0 04 20 18 ld [ %l0 + 0x18 ], %o0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
20060c0: 05 00 80 90 sethi %hi(0x2024000), %g2
20060c4: c2 00 a2 60 ld [ %g2 + 0x260 ], %g1 ! 2024260 <_Thread_Dispatch_disable_level>
20060c8: 87 2a 20 02 sll %o0, 2, %g3
20060cc: 82 00 60 01 inc %g1
20060d0: c2 20 a2 60 st %g1, [ %g2 + 0x260 ]
20060d4: 83 2a 20 07 sll %o0, 7, %g1
20060d8: 82 20 40 03 sub %g1, %g3, %g1
20060dc: 82 00 40 08 add %g1, %o0, %g1
20060e0: 83 28 60 03 sll %g1, 3, %g1
20060e4: c2 27 bf f4 st %g1, [ %fp + -12 ]
(_TOD_Microseconds_per_tick * TOD_NANOSECONDS_PER_MICROSECOND);
_Thread_Disable_dispatch();
_TOD_Set( &newtime );
20060e8: 90 07 bf f0 add %fp, -16, %o0
20060ec: 40 00 06 e4 call 2007c7c <_TOD_Set>
20060f0: b0 10 20 00 clr %i0
_Thread_Enable_dispatch();
20060f4: 40 00 0b df call 2009070 <_Thread_Enable_dispatch>
20060f8: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
}
return RTEMS_INVALID_CLOCK;
}
20060fc: 81 c7 e0 08 ret
2006100: 81 e8 00 00 restore
02004d88 <rtems_clock_set_nanoseconds_extension>:
*/
rtems_status_code rtems_clock_set_nanoseconds_extension(
rtems_nanoseconds_extension_routine routine
)
{
if ( !routine )
2004d88: 84 92 20 00 orcc %o0, 0, %g2
2004d8c: 02 80 00 05 be 2004da0 <rtems_clock_set_nanoseconds_extension+0x18><== NEVER TAKEN
2004d90: 90 10 20 09 mov 9, %o0
return RTEMS_INVALID_ADDRESS;
_Watchdog_Nanoseconds_since_tick_handler = routine;
2004d94: 03 00 80 5e sethi %hi(0x2017800), %g1
2004d98: 90 10 20 00 clr %o0
2004d9c: c4 20 61 c8 st %g2, [ %g1 + 0x1c8 ]
return RTEMS_SUCCESSFUL;
}
2004da0: 81 c3 e0 08 retl
02002b58 <rtems_cpu_usage_report_with_plugin>:
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
2002b58: 9d e3 bf 60 save %sp, -160, %sp
struct timespec uptime, total, ran;
#else
uint32_t total_units = 0;
#endif
if ( !print )
2002b5c: 80 a6 60 00 cmp %i1, 0
2002b60: 02 80 00 66 be 2002cf8 <rtems_cpu_usage_report_with_plugin+0x1a0><== NEVER TAKEN
2002b64: a0 07 bf e8 add %fp, -24, %l0
* When not using nanosecond CPU usage resolution, we have to count
* the number of "ticks" we gave credit for to give the user a rough
* guideline as to what each number means proportionally.
*/
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
_TOD_Get_uptime( &uptime );
2002b68: 40 00 14 1d call 2007bdc <_TOD_Get_uptime>
2002b6c: 90 10 00 10 mov %l0, %o0
_Timespec_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
2002b70: 92 10 00 10 mov %l0, %o1
2002b74: 11 00 80 92 sethi %hi(0x2024800), %o0
2002b78: a0 07 bf e0 add %fp, -32, %l0
2002b7c: 90 12 20 18 or %o0, 0x18, %o0
2002b80: 40 00 1e 43 call 200a48c <_Timespec_Subtract>
2002b84: 94 10 00 10 mov %l0, %o2
}
}
}
#endif
(*print)( context, "CPU Usage by thread\n"
2002b88: 90 10 00 18 mov %i0, %o0
2002b8c: 13 00 80 65 sethi %hi(0x2019400), %o1
2002b90: 9f c6 40 00 call %i1
2002b94: 92 12 63 e8 or %o1, 0x3e8, %o1 ! 20197e8 <pollCallbacks.4788+0x310>
2002b98: 03 00 80 90 sethi %hi(0x2024000), %g1
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
2002b9c: ac 07 bf c0 add %fp, -64, %l6
}
}
}
#endif
(*print)( context, "CPU Usage by thread\n"
2002ba0: a4 10 61 c4 or %g1, 0x1c4, %l2
_Timespec_Subtract(
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timespec_Add_to( &ran, &used );
};
_Timespec_Divide( &ran, &total, &ival, &fval );
2002ba4: aa 07 bf d8 add %fp, -40, %l5
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
struct timespec used;
_Timespec_Subtract(
2002ba8: 03 00 80 90 sethi %hi(0x2024000), %g1
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timespec_Add_to( &ran, &used );
};
_Timespec_Divide( &ran, &total, &ival, &fval );
2002bac: b6 07 bf f4 add %fp, -12, %i3
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
struct timespec used;
_Timespec_Subtract(
2002bb0: b4 10 63 2c or %g1, 0x32c, %i2
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timespec_Add_to( &ran, &used );
};
_Timespec_Divide( &ran, &total, &ival, &fval );
2002bb4: b8 07 bf f0 add %fp, -16, %i4
" ID NAME TICKS PERCENT\n"
#endif
);
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
2002bb8: ba 04 a0 10 add %l2, 0x10, %i5
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
2002bbc: c2 04 80 00 ld [ %l2 ], %g1
2002bc0: 80 a0 60 00 cmp %g1, 0
2002bc4: 22 80 00 41 be,a 2002cc8 <rtems_cpu_usage_report_with_plugin+0x170>
2002bc8: a4 04 a0 04 add %l2, 4, %l2
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
2002bcc: e6 00 60 04 ld [ %g1 + 4 ], %l3
if ( information ) {
2002bd0: 80 a4 e0 00 cmp %l3, 0
2002bd4: 22 80 00 3d be,a 2002cc8 <rtems_cpu_usage_report_with_plugin+0x170><== NEVER TAKEN
2002bd8: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED
2002bdc: a2 10 20 01 mov 1, %l1
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
struct timespec used;
_Timespec_Subtract(
2002be0: ae 07 bf e8 add %fp, -24, %l7
2002be4: 10 80 00 32 b 2002cac <rtems_cpu_usage_report_with_plugin+0x154>
2002be8: a8 07 bf d0 add %fp, -48, %l4
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
2002bec: c2 04 e0 1c ld [ %l3 + 0x1c ], %g1
2002bf0: e0 00 40 02 ld [ %g1 + %g2 ], %l0
if ( !the_thread )
2002bf4: 80 a4 20 00 cmp %l0, 0
2002bf8: 02 80 00 2d be 2002cac <rtems_cpu_usage_report_with_plugin+0x154><== NEVER TAKEN
2002bfc: a2 04 60 01 inc %l1
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
2002c00: 40 00 0e c7 call 200671c <rtems_object_get_name>
2002c04: d0 04 20 08 ld [ %l0 + 8 ], %o0
(*print)(
2002c08: d4 04 20 08 ld [ %l0 + 8 ], %o2
2002c0c: 90 10 00 18 mov %i0, %o0
2002c10: 13 00 80 66 sethi %hi(0x2019800), %o1
2002c14: 96 10 00 16 mov %l6, %o3
2002c18: 9f c6 40 00 call %i1
2002c1c: 92 12 60 30 or %o1, 0x30, %o1
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
2002c20: c2 04 20 84 ld [ %l0 + 0x84 ], %g1
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
2002c24: 07 00 80 90 sethi %hi(0x2024000), %g3
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
2002c28: c2 27 bf d8 st %g1, [ %fp + -40 ]
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
2002c2c: 86 10 e3 24 or %g3, 0x324, %g3
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
2002c30: c2 04 20 88 ld [ %l0 + 0x88 ], %g1
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
2002c34: c4 00 c0 00 ld [ %g3 ], %g2
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
2002c38: c2 27 bf dc st %g1, [ %fp + -36 ]
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
2002c3c: c4 00 a0 08 ld [ %g2 + 8 ], %g2
2002c40: c2 04 20 08 ld [ %l0 + 8 ], %g1
2002c44: 80 a0 80 01 cmp %g2, %g1
2002c48: 12 80 00 0a bne 2002c70 <rtems_cpu_usage_report_with_plugin+0x118>
2002c4c: 94 10 00 1b mov %i3, %o2
struct timespec used;
_Timespec_Subtract(
2002c50: 90 10 00 1a mov %i2, %o0
2002c54: 92 10 00 17 mov %l7, %o1
2002c58: 40 00 1e 0d call 200a48c <_Timespec_Subtract>
2002c5c: 94 10 00 14 mov %l4, %o2
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timespec_Add_to( &ran, &used );
2002c60: 90 10 00 15 mov %l5, %o0
2002c64: 40 00 1d 5f call 200a1e0 <_Timespec_Add_to>
2002c68: 92 10 00 14 mov %l4, %o1
};
_Timespec_Divide( &ran, &total, &ival, &fval );
2002c6c: 94 10 00 1b mov %i3, %o2
2002c70: 96 10 00 1c mov %i4, %o3
2002c74: 90 10 00 15 mov %l5, %o0
2002c78: 40 00 1d 72 call 200a240 <_Timespec_Divide>
2002c7c: 92 07 bf e0 add %fp, -32, %o1
/*
* Print the information
*/
(*print)( context,
2002c80: d0 07 bf dc ld [ %fp + -36 ], %o0
2002c84: 40 00 51 d1 call 20173c8 <.udiv>
2002c88: 92 10 23 e8 mov 0x3e8, %o1
2002c8c: d4 07 bf d8 ld [ %fp + -40 ], %o2
2002c90: d8 07 bf f4 ld [ %fp + -12 ], %o4
2002c94: da 07 bf f0 ld [ %fp + -16 ], %o5
2002c98: 96 10 00 08 mov %o0, %o3
2002c9c: 13 00 80 66 sethi %hi(0x2019800), %o1
2002ca0: 90 10 00 18 mov %i0, %o0
2002ca4: 9f c6 40 00 call %i1
2002ca8: 92 12 60 48 or %o1, 0x48, %o1
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
2002cac: c2 14 e0 10 lduh [ %l3 + 0x10 ], %g1
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
2002cb0: 94 10 00 16 mov %l6, %o2
2002cb4: 92 10 20 0d mov 0xd, %o1
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
2002cb8: 80 a4 40 01 cmp %l1, %g1
2002cbc: 08 bf ff cc bleu 2002bec <rtems_cpu_usage_report_with_plugin+0x94>
2002cc0: 85 2c 60 02 sll %l1, 2, %g2
2002cc4: a4 04 a0 04 add %l2, 4, %l2
" ID NAME TICKS PERCENT\n"
#endif
);
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
2002cc8: 80 a4 80 1d cmp %l2, %i5
2002ccc: 32 bf ff bd bne,a 2002bc0 <rtems_cpu_usage_report_with_plugin+0x68>
2002cd0: c2 04 80 00 ld [ %l2 ], %g1
}
}
}
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
(*print)( context, "Time since last CPU Usage reset %" PRId32
2002cd4: d0 07 bf e4 ld [ %fp + -28 ], %o0
2002cd8: 40 00 51 bc call 20173c8 <.udiv>
2002cdc: 92 10 23 e8 mov 0x3e8, %o1
2002ce0: d4 07 bf e0 ld [ %fp + -32 ], %o2
2002ce4: 96 10 00 08 mov %o0, %o3
2002ce8: 13 00 80 66 sethi %hi(0x2019800), %o1
2002cec: 90 10 00 18 mov %i0, %o0
2002cf0: 9f c6 40 00 call %i1
2002cf4: 92 12 60 60 or %o1, 0x60, %o1
2002cf8: 81 c7 e0 08 ret
2002cfc: 81 e8 00 00 restore
0200c26c <rtems_deviceio_errno>:
{ 0, 0, 0 },
};
static int
rtems_deviceio_errno(rtems_status_code code)
{
200c26c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
int rc;
if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t) code)))
200c270: 11 00 80 58 sethi %hi(0x2016000), %o0 <== NOT EXECUTED
200c274: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
200c278: 40 00 01 22 call 200c700 <rtems_assoc_remote_by_local> <== NOT EXECUTED
200c27c: 90 12 21 4c or %o0, 0x14c, %o0 <== NOT EXECUTED
200c280: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
200c284: 02 80 00 05 be 200c298 <rtems_deviceio_errno+0x2c> <== NOT EXECUTED
200c288: 01 00 00 00 nop <== NOT EXECUTED
{
errno = rc;
200c28c: 40 00 03 82 call 200d094 <__errno> <== NOT EXECUTED
200c290: 01 00 00 00 nop <== NOT EXECUTED
200c294: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED
return -1;
}
return -1;
}
200c298: 81 c7 e0 08 ret <== NOT EXECUTED
200c29c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
0200310c <rtems_error>:
int rtems_error(
int error_flag,
const char *printf_format,
...
)
{
200310c: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED
va_list arglist;
int chars_written;
va_start(arglist, printf_format);
2003110: 94 07 a0 4c add %fp, 0x4c, %o2 <== NOT EXECUTED
2003114: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED
2003118: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED
200311c: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED
2003120: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED
chars_written = rtems_verror(error_flag, printf_format, arglist);
2003124: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2003128: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200312c: 7f ff ff 7c call 2002f1c <rtems_verror> <== NOT EXECUTED
2003130: d4 27 bf f4 st %o2, [ %fp + -12 ] <== NOT EXECUTED
va_end(arglist);
return chars_written;
}
2003134: 81 c7 e0 08 ret <== NOT EXECUTED
2003138: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
02004dfc <rtems_event_receive>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
2004dfc: 9d e3 bf 98 save %sp, -104, %sp
2004e00: 90 10 00 18 mov %i0, %o0
2004e04: 96 10 00 1b mov %i3, %o3
2004e08: 92 10 00 19 mov %i1, %o1
2004e0c: 94 10 00 1a mov %i2, %o2
RTEMS_API_Control *api;
if ( !event_out )
2004e10: 80 a6 e0 00 cmp %i3, 0
2004e14: 02 80 00 15 be 2004e68 <rtems_event_receive+0x6c> <== NEVER TAKEN
2004e18: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
2004e1c: 37 00 80 5e sethi %hi(0x2017800), %i3
2004e20: c2 06 e0 e4 ld [ %i3 + 0xe4 ], %g1 ! 20178e4 <_Thread_Executing>
if ( _Event_sets_Is_empty( event_in ) ) {
2004e24: 80 a2 20 00 cmp %o0, 0
2004e28: 12 80 00 06 bne 2004e40 <rtems_event_receive+0x44>
2004e2c: c2 00 61 68 ld [ %g1 + 0x168 ], %g1
*event_out = api->pending_events;
2004e30: c2 00 40 00 ld [ %g1 ], %g1
2004e34: c2 22 c0 00 st %g1, [ %o3 ]
2004e38: 81 c7 e0 08 ret
2004e3c: 91 e8 20 00 restore %g0, 0, %o0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
2004e40: 03 00 80 5e sethi %hi(0x2017800), %g1
2004e44: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 ! 2017820 <_Thread_Dispatch_disable_level>
2004e48: 84 00 a0 01 inc %g2
2004e4c: c4 20 60 20 st %g2, [ %g1 + 0x20 ]
return RTEMS_SUCCESSFUL;
}
_Thread_Disable_dispatch();
_Event_Seize( event_in, option_set, ticks, event_out );
2004e50: 40 00 00 08 call 2004e70 <_Event_Seize>
2004e54: 01 00 00 00 nop
_Thread_Enable_dispatch();
2004e58: 40 00 0a 30 call 2007718 <_Thread_Enable_dispatch>
2004e5c: 01 00 00 00 nop
return( _Thread_Executing->Wait.return_code );
2004e60: c2 06 e0 e4 ld [ %i3 + 0xe4 ], %g1
2004e64: f0 00 60 34 ld [ %g1 + 0x34 ], %i0
}
2004e68: 81 c7 e0 08 ret
2004e6c: 81 e8 00 00 restore
02001f28 <rtems_filesystem_evaluate_parent>:
int rtems_filesystem_evaluate_parent(
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
2001f28: 9d e3 bf 88 save %sp, -120, %sp
rtems_filesystem_location_info_t parent;
int result;
if ( !pathloc )
2001f2c: 80 a6 60 00 cmp %i1, 0
2001f30: 32 80 00 06 bne,a 2001f48 <rtems_filesystem_evaluate_parent+0x20><== ALWAYS TAKEN
2001f34: c2 06 60 08 ld [ %i1 + 8 ], %g1
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
2001f38: 40 00 2c 57 call 200d094 <__errno> <== NOT EXECUTED
2001f3c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2001f40: 10 80 00 09 b 2001f64 <rtems_filesystem_evaluate_parent+0x3c><== NOT EXECUTED
2001f44: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
if ( !pathloc->ops->evalpath_h )
2001f48: c2 00 40 00 ld [ %g1 ], %g1
2001f4c: 80 a0 60 00 cmp %g1, 0
2001f50: 12 80 00 08 bne 2001f70 <rtems_filesystem_evaluate_parent+0x48><== ALWAYS TAKEN
2001f54: a0 07 bf e8 add %fp, -24, %l0
rtems_set_errno_and_return_minus_one( ENOTSUP );
2001f58: 40 00 2c 4f call 200d094 <__errno> <== NOT EXECUTED
2001f5c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2001f60: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2001f64: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2001f68: 81 c7 e0 08 ret <== NOT EXECUTED
2001f6c: 81 e8 00 00 restore <== NOT EXECUTED
parent = *pathloc;
2001f70: 92 10 00 19 mov %i1, %o1
2001f74: 94 10 20 10 mov 0x10, %o2
2001f78: 40 00 2e 39 call 200d85c <memcpy>
2001f7c: 90 10 00 10 mov %l0, %o0
result = (*pathloc->ops->evalpath_h)( "..", flags, &parent );
2001f80: c2 06 60 08 ld [ %i1 + 8 ], %g1
2001f84: 92 10 00 18 mov %i0, %o1
2001f88: c2 00 40 00 ld [ %g1 ], %g1
2001f8c: 11 00 80 56 sethi %hi(0x2015800), %o0
2001f90: 94 10 00 10 mov %l0, %o2
2001f94: 9f c0 40 00 call %g1
2001f98: 90 12 22 30 or %o0, 0x230, %o0
if (result != 0){
2001f9c: b0 92 20 00 orcc %o0, 0, %i0
2001fa0: 02 80 00 04 be 2001fb0 <rtems_filesystem_evaluate_parent+0x88><== ALWAYS TAKEN
2001fa4: c2 07 bf f0 ld [ %fp + -16 ], %g1
2001fa8: 81 c7 e0 08 ret <== NOT EXECUTED
2001fac: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
return -1;
}
rtems_filesystem_freenode( &parent );
2001fb0: 80 a0 60 00 cmp %g1, 0
2001fb4: 02 80 00 08 be 2001fd4 <rtems_filesystem_evaluate_parent+0xac><== NEVER TAKEN
2001fb8: 01 00 00 00 nop
2001fbc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2001fc0: 80 a0 60 00 cmp %g1, 0
2001fc4: 02 80 00 04 be 2001fd4 <rtems_filesystem_evaluate_parent+0xac><== NEVER TAKEN
2001fc8: 01 00 00 00 nop
2001fcc: 9f c0 40 00 call %g1
2001fd0: 90 10 00 10 mov %l0, %o0
return result;
}
2001fd4: 81 c7 e0 08 ret
2001fd8: 81 e8 00 00 restore
02001fdc <rtems_filesystem_evaluate_path>:
const char *pathname,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
2001fdc: 9d e3 bf 98 save %sp, -104, %sp
/*
* Verify Input parameters.
*/
if ( !pathname )
2001fe0: 80 a6 20 00 cmp %i0, 0
2001fe4: 12 80 00 06 bne 2001ffc <rtems_filesystem_evaluate_path+0x20>
2001fe8: 80 a6 a0 00 cmp %i2, 0
rtems_set_errno_and_return_minus_one( EFAULT );
2001fec: 40 00 2c 2a call 200d094 <__errno>
2001ff0: b0 10 3f ff mov -1, %i0
2001ff4: 10 80 00 44 b 2002104 <rtems_filesystem_evaluate_path+0x128>
2001ff8: 82 10 20 0e mov 0xe, %g1
if ( !pathloc )
2001ffc: 32 80 00 06 bne,a 2002014 <rtems_filesystem_evaluate_path+0x38><== ALWAYS TAKEN
2002000: c2 4e 00 00 ldsb [ %i0 ], %g1
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
2002004: 40 00 2c 24 call 200d094 <__errno> <== NOT EXECUTED
2002008: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200200c: 10 80 00 3e b 2002104 <rtems_filesystem_evaluate_path+0x128><== NOT EXECUTED
2002010: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
/*
* Evaluate the path using the optable evalpath.
*/
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
2002014: 80 a0 60 2f cmp %g1, 0x2f
2002018: 02 80 00 06 be 2002030 <rtems_filesystem_evaluate_path+0x54>
200201c: 80 a0 60 5c cmp %g1, 0x5c
2002020: 02 80 00 04 be 2002030 <rtems_filesystem_evaluate_path+0x54><== NEVER TAKEN
2002024: 80 a0 60 00 cmp %g1, 0
2002028: 12 80 00 0a bne 2002050 <rtems_filesystem_evaluate_path+0x74><== ALWAYS TAKEN
200202c: 03 00 80 5b sethi %hi(0x2016c00), %g1
2002030: 03 00 80 5b sethi %hi(0x2016c00), %g1
2002034: d2 00 62 64 ld [ %g1 + 0x264 ], %o1 ! 2016e64 <rtems_current_user_env>
2002038: 90 10 00 1a mov %i2, %o0
200203c: 92 02 60 14 add %o1, 0x14, %o1
2002040: 40 00 2e 07 call 200d85c <memcpy>
2002044: 94 10 20 10 mov 0x10, %o2
2002048: 10 80 00 08 b 2002068 <rtems_filesystem_evaluate_path+0x8c>
200204c: 84 10 20 01 mov 1, %g2
2002050: d2 00 62 64 ld [ %g1 + 0x264 ], %o1
2002054: 90 10 00 1a mov %i2, %o0
2002058: 92 02 60 04 add %o1, 4, %o1
200205c: 40 00 2e 00 call 200d85c <memcpy>
2002060: 94 10 20 10 mov 0x10, %o2
2002064: 84 10 20 00 clr %g2
if ( !pathloc->ops->evalpath_h )
2002068: c2 06 a0 08 ld [ %i2 + 8 ], %g1
200206c: c2 00 40 00 ld [ %g1 ], %g1
2002070: 80 a0 60 00 cmp %g1, 0
2002074: 02 80 00 21 be 20020f8 <rtems_filesystem_evaluate_path+0x11c><== NEVER TAKEN
2002078: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOTSUP );
result = (*pathloc->ops->evalpath_h)( &pathname[i], flags, pathloc );
200207c: 90 06 00 02 add %i0, %g2, %o0
2002080: 92 10 00 19 mov %i1, %o1
2002084: 9f c0 40 00 call %g1
2002088: 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 ) {
200208c: b0 92 20 00 orcc %o0, 0, %i0
2002090: 12 80 00 1e bne 2002108 <rtems_filesystem_evaluate_path+0x12c>
2002094: 80 a6 e0 00 cmp %i3, 0
2002098: 02 80 00 21 be 200211c <rtems_filesystem_evaluate_path+0x140>
200209c: 01 00 00 00 nop
if ( !pathloc->ops->node_type_h ){
20020a0: c2 06 a0 08 ld [ %i2 + 8 ], %g1
20020a4: c4 00 60 10 ld [ %g1 + 0x10 ], %g2
20020a8: 80 a0 a0 00 cmp %g2, 0
20020ac: 22 80 00 0e be,a 20020e4 <rtems_filesystem_evaluate_path+0x108><== NEVER TAKEN
20020b0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
rtems_filesystem_freenode( pathloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
type = (*pathloc->ops->node_type_h)( pathloc );
20020b4: 9f c0 80 00 call %g2
20020b8: 90 10 00 1a mov %i2, %o0
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
20020bc: 90 02 3f fd add %o0, -3, %o0
20020c0: 80 a2 20 01 cmp %o0, 1
20020c4: 18 80 00 16 bgu 200211c <rtems_filesystem_evaluate_path+0x140>
20020c8: 01 00 00 00 nop
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
if ( !pathloc->ops->eval_link_h ){
20020cc: c2 06 a0 08 ld [ %i2 + 8 ], %g1
20020d0: c4 00 60 34 ld [ %g1 + 0x34 ], %g2
20020d4: 80 a0 a0 00 cmp %g2, 0
20020d8: 12 80 00 0e bne 2002110 <rtems_filesystem_evaluate_path+0x134><== ALWAYS TAKEN
20020dc: 90 10 00 1a mov %i2, %o0
rtems_filesystem_freenode( pathloc );
20020e0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
20020e4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20020e8: 02 80 00 04 be 20020f8 <rtems_filesystem_evaluate_path+0x11c><== NOT EXECUTED
20020ec: 01 00 00 00 nop <== NOT EXECUTED
20020f0: 9f c0 40 00 call %g1 <== NOT EXECUTED
20020f4: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
20020f8: 40 00 2b e7 call 200d094 <__errno> <== NOT EXECUTED
20020fc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2002100: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2002104: c2 22 00 00 st %g1, [ %o0 ]
2002108: 81 c7 e0 08 ret
200210c: 81 e8 00 00 restore
* pathloc will be passed up (and eventually released).
* Hence, the (valid) originial node that we submit to
* eval_link_h() should be released by the handler.
*/
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
2002110: 9f c0 80 00 call %g2
2002114: 92 10 00 19 mov %i1, %o1
2002118: b0 10 00 08 mov %o0, %i0
}
}
return result;
}
200211c: 81 c7 e0 08 ret
2002120: 81 e8 00 00 restore
0200a024 <rtems_filesystem_initialize>:
* configuration is a single instantiation of the IMFS or miniIMFS with
* a single "/dev" directory in it.
*/
void rtems_filesystem_initialize( void )
{
200a024: 9d e3 bf 80 save %sp, -128, %sp
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
200a028: 25 00 80 5b sethi %hi(0x2016c00), %l2
200a02c: c4 04 a2 64 ld [ %l2 + 0x264 ], %g2 ! 2016e64 <rtems_current_user_env>
200a030: 82 10 20 12 mov 0x12, %g1
init_fs_mount_table();
200a034: 40 00 02 39 call 200a918 <init_fs_mount_table>
200a038: c2 30 a0 24 sth %g1, [ %g2 + 0x24 ]
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
200a03c: 03 00 80 55 sethi %hi(0x2015400), %g1
200a040: c2 00 61 6c ld [ %g1 + 0x16c ], %g1 ! 201556c <rtems_filesystem_mount_table_size>
rtems_fatal_error_occurred( 0xABCD0001 );
200a044: 11 2a f3 40 sethi %hi(0xabcd0000), %o0
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
200a048: 80 a0 60 00 cmp %g1, 0
200a04c: 02 80 00 0f be 200a088 <rtems_filesystem_initialize+0x64> <== NEVER TAKEN
200a050: 90 12 20 01 or %o0, 1, %o0
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
200a054: 03 00 80 5a sethi %hi(0x2016800), %g1
200a058: c2 00 61 50 ld [ %g1 + 0x150 ], %g1 ! 2016950 <rtems_filesystem_mount_table>
status = mount(
200a05c: 90 07 bf f4 add %fp, -12, %o0
200a060: d8 00 60 0c ld [ %g1 + 0xc ], %o4
200a064: d2 00 40 00 ld [ %g1 ], %o1
200a068: d4 00 60 04 ld [ %g1 + 4 ], %o2
200a06c: 40 00 02 33 call 200a938 <mount>
200a070: d6 00 60 08 ld [ %g1 + 8 ], %o3
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
if ( status == -1 )
200a074: 80 a2 3f ff cmp %o0, -1
200a078: 32 80 00 06 bne,a 200a090 <rtems_filesystem_initialize+0x6c><== ALWAYS TAKEN
200a07c: d0 04 a2 64 ld [ %l2 + 0x264 ], %o0
rtems_fatal_error_occurred( 0xABCD0002 );
200a080: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED
200a084: 90 12 20 02 or %o0, 2, %o0 ! abcd0002 <RAM_END+0xa98d0002><== NOT EXECUTED
200a088: 7f ff ee cf call 2005bc4 <rtems_fatal_error_occurred> <== NOT EXECUTED
200a08c: 01 00 00 00 nop <== NOT EXECUTED
* set_private_env() - but then: that's
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
rtems_filesystem_root = entry->mt_fs_root;
200a090: d2 07 bf f4 ld [ %fp + -12 ], %o1
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
200a094: c0 32 20 26 clrh [ %o0 + 0x26 ]
* set_private_env() - but then: that's
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
rtems_filesystem_root = entry->mt_fs_root;
200a098: 92 02 60 18 add %o1, 0x18, %o1
200a09c: 94 10 20 10 mov 0x10, %o2
200a0a0: 40 00 0d ef call 200d85c <memcpy>
200a0a4: 90 02 20 14 add %o0, 0x14, %o0
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 0, &loc, 0);
200a0a8: a0 07 bf e4 add %fp, -28, %l0
200a0ac: 96 10 20 00 clr %o3
200a0b0: 23 00 80 57 sethi %hi(0x2015c00), %l1
200a0b4: 92 10 20 00 clr %o1
200a0b8: 94 10 00 10 mov %l0, %o2
200a0bc: 7f ff df c8 call 2001fdc <rtems_filesystem_evaluate_path>
200a0c0: 90 14 62 20 or %l1, 0x220, %o0
rtems_filesystem_root = loc;
200a0c4: d0 04 a2 64 ld [ %l2 + 0x264 ], %o0
200a0c8: 92 10 00 10 mov %l0, %o1
200a0cc: 94 10 20 10 mov 0x10, %o2
200a0d0: 40 00 0d e3 call 200d85c <memcpy>
200a0d4: 90 02 20 14 add %o0, 0x14, %o0
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 0, &loc, 0);
200a0d8: 96 10 20 00 clr %o3
200a0dc: 92 10 20 00 clr %o1
200a0e0: 94 10 00 10 mov %l0, %o2
200a0e4: 7f ff df be call 2001fdc <rtems_filesystem_evaluate_path>
200a0e8: 90 14 62 20 or %l1, 0x220, %o0
rtems_filesystem_current = loc;
200a0ec: d0 04 a2 64 ld [ %l2 + 0x264 ], %o0
200a0f0: 92 10 00 10 mov %l0, %o1
200a0f4: 94 10 20 10 mov 0x10, %o2
200a0f8: 40 00 0d d9 call 200d85c <memcpy>
200a0fc: 90 02 20 04 add %o0, 4, %o0
*
* NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
200a100: 92 10 21 ff mov 0x1ff, %o1
200a104: 11 00 80 57 sethi %hi(0x2015c00), %o0
200a108: 40 00 01 fa call 200a8f0 <mkdir>
200a10c: 90 12 22 28 or %o0, 0x228, %o0 ! 2015e28 <IMFS_link_handlers+0x44>
if ( status != 0 )
200a110: 80 a2 20 00 cmp %o0, 0
200a114: 02 80 00 04 be 200a124 <rtems_filesystem_initialize+0x100><== ALWAYS TAKEN
200a118: 11 2a f3 40 sethi %hi(0xabcd0000), %o0
rtems_fatal_error_occurred( 0xABCD0003 );
200a11c: 10 bf ff db b 200a088 <rtems_filesystem_initialize+0x64> <== NOT EXECUTED
200a120: 90 12 20 03 or %o0, 3, %o0 ! abcd0003 <RAM_END+0xa98d0003><== NOT EXECUTED
200a124: 81 c7 e0 08 ret
200a128: 81 e8 00 00 restore
02006db0 <rtems_filesystem_nodes_equal>:
);
bool rtems_filesystem_nodes_equal(
const rtems_filesystem_location_info_t *loc1,
const rtems_filesystem_location_info_t *loc2
){
2006db0: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED
2006db4: c4 02 40 00 ld [ %o1 ], %g2 <== NOT EXECUTED
2006db8: 82 18 40 02 xor %g1, %g2, %g1 <== NOT EXECUTED
2006dbc: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED
return ( loc1->node_access == loc2->node_access );
}
2006dc0: 81 c3 e0 08 retl <== NOT EXECUTED
2006dc4: 90 60 3f ff subx %g0, -1, %o0 <== NOT EXECUTED
02001d8c <rtems_io_lookup_name>:
rtems_status_code rtems_io_lookup_name(
const char *name,
rtems_driver_name_t *device_info
)
{
2001d8c: 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 );
2001d90: 92 10 20 00 clr %o1 <== NOT EXECUTED
2001d94: a4 07 bf e8 add %fp, -24, %l2 <== NOT EXECUTED
2001d98: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2001d9c: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED
2001da0: 40 00 00 8f call 2001fdc <rtems_filesystem_evaluate_path> <== NOT EXECUTED
2001da4: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
the_jnode = loc.node_access;
if ( !loc.ops->node_type_h ) {
2001da8: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
rtems_filesystem_location_info_t loc;
int result;
rtems_filesystem_node_types_t node_type;
result = rtems_filesystem_evaluate_path( name, 0x00, &loc, true );
2001dac: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
the_jnode = loc.node_access;
if ( !loc.ops->node_type_h ) {
2001db0: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED
2001db4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2001db8: 12 80 00 0e bne 2001df0 <rtems_io_lookup_name+0x64> <== NOT EXECUTED
2001dbc: e2 07 bf e8 ld [ %fp + -24 ], %l1 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
2001dc0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED
2001dc4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2001dc8: 02 80 00 04 be 2001dd8 <rtems_io_lookup_name+0x4c> <== NOT EXECUTED
2001dcc: 01 00 00 00 nop <== NOT EXECUTED
2001dd0: 9f c0 40 00 call %g1 <== NOT EXECUTED
2001dd4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
2001dd8: 40 00 2c af call 200d094 <__errno> <== NOT EXECUTED
2001ddc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2001de0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2001de4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2001de8: 81 c7 e0 08 ret <== NOT EXECUTED
2001dec: 81 e8 00 00 restore <== NOT EXECUTED
}
node_type = (*loc.ops->node_type_h)( &loc );
2001df0: 9f c0 40 00 call %g1 <== NOT EXECUTED
2001df4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
2001df8: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED
2001dfc: 12 80 00 05 bne 2001e10 <rtems_io_lookup_name+0x84> <== NOT EXECUTED
2001e00: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED
2001e04: 80 a2 20 02 cmp %o0, 2 <== NOT EXECUTED
2001e08: 22 80 00 0d be,a 2001e3c <rtems_io_lookup_name+0xb0> <== NOT EXECUTED
2001e0c: f0 26 40 00 st %i0, [ %i1 ] <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
2001e10: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2001e14: 02 80 00 1c be 2001e84 <rtems_io_lookup_name+0xf8> <== NOT EXECUTED
2001e18: 01 00 00 00 nop <== NOT EXECUTED
2001e1c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2001e20: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2001e24: 02 80 00 18 be 2001e84 <rtems_io_lookup_name+0xf8> <== NOT EXECUTED
2001e28: 01 00 00 00 nop <== NOT EXECUTED
2001e2c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2001e30: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED
device_info->device_name = (char *) name;
device_info->device_name_length = strlen( name );
device_info->major = the_jnode->info.device.major;
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
2001e34: 81 c7 e0 08 ret <== NOT EXECUTED
2001e38: 91 e8 20 0d restore %g0, 0xd, %o0 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
device_info->device_name_length = strlen( name );
2001e3c: 40 00 31 b8 call 200e51c <strlen> <== NOT EXECUTED
2001e40: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2001e44: d0 26 60 04 st %o0, [ %i1 + 4 ] <== NOT EXECUTED
device_info->major = the_jnode->info.device.major;
2001e48: c2 04 60 4c ld [ %l1 + 0x4c ], %g1 <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
2001e4c: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== NOT EXECUTED
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
device_info->device_name_length = strlen( name );
device_info->major = the_jnode->info.device.major;
2001e50: c2 26 60 08 st %g1, [ %i1 + 8 ] <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
2001e54: c2 04 60 50 ld [ %l1 + 0x50 ], %g1 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
2001e58: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2001e5c: 02 80 00 0c be 2001e8c <rtems_io_lookup_name+0x100> <== NOT EXECUTED
2001e60: c2 26 60 0c st %g1, [ %i1 + 0xc ] <== NOT EXECUTED
2001e64: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED
2001e68: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2001e6c: 02 80 00 08 be 2001e8c <rtems_io_lookup_name+0x100> <== NOT EXECUTED
2001e70: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
2001e74: 9f c0 40 00 call %g1 <== NOT EXECUTED
2001e78: b0 10 20 00 clr %i0 <== NOT EXECUTED
2001e7c: 81 c7 e0 08 ret <== NOT EXECUTED
2001e80: 81 e8 00 00 restore <== NOT EXECUTED
2001e84: 81 c7 e0 08 ret <== NOT EXECUTED
2001e88: 91 e8 20 0d restore %g0, 0xd, %o0 <== NOT EXECUTED
2001e8c: b0 10 20 00 clr %i0 <== NOT EXECUTED
#endif
return RTEMS_SUCCESSFUL;
}
2001e90: 81 c7 e0 08 ret <== NOT EXECUTED
2001e94: 81 e8 00 00 restore <== NOT EXECUTED
02006c24 <rtems_io_register_driver>:
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
2006c24: 9d e3 bf 98 save %sp, -104, %sp
2006c28: 92 10 00 19 mov %i1, %o1
/*
* Validate the pointer data and contents passed in
*/
if ( !driver_table )
2006c2c: 80 a6 60 00 cmp %i1, 0
2006c30: 02 80 00 3f be 2006d2c <rtems_io_register_driver+0x108>
2006c34: a0 10 00 18 mov %i0, %l0
return RTEMS_INVALID_ADDRESS;
if ( !registered_major )
2006c38: 80 a6 a0 00 cmp %i2, 0
2006c3c: 02 80 00 3c be 2006d2c <rtems_io_register_driver+0x108>
2006c40: 01 00 00 00 nop
return RTEMS_INVALID_ADDRESS;
if ( !driver_table->initialization_entry && !driver_table->open_entry )
2006c44: c2 06 40 00 ld [ %i1 ], %g1
2006c48: 80 a0 60 00 cmp %g1, 0
2006c4c: 32 80 00 07 bne,a 2006c68 <rtems_io_register_driver+0x44>
2006c50: c0 26 80 00 clr [ %i2 ]
2006c54: c2 06 60 04 ld [ %i1 + 4 ], %g1
2006c58: 80 a0 60 00 cmp %g1, 0
2006c5c: 02 80 00 34 be 2006d2c <rtems_io_register_driver+0x108> <== ALWAYS TAKEN
2006c60: 01 00 00 00 nop
return RTEMS_INVALID_ADDRESS;
*registered_major = 0;
2006c64: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED
/*
* The requested major number is higher than what is configured.
*/
if ( major >= _IO_Number_of_drivers )
2006c68: 03 00 80 6f sethi %hi(0x201bc00), %g1
2006c6c: c8 00 60 20 ld [ %g1 + 0x20 ], %g4 ! 201bc20 <_IO_Number_of_drivers>
2006c70: 80 a4 00 04 cmp %l0, %g4
2006c74: 1a 80 00 31 bcc 2006d38 <rtems_io_register_driver+0x114>
2006c78: b0 10 20 0a mov 0xa, %i0
/*
* Test for initialise/open being present to indicate the driver slot is
* in use.
*/
if ( major == 0 ) {
2006c7c: 80 a4 20 00 cmp %l0, 0
2006c80: 12 80 00 18 bne 2006ce0 <rtems_io_register_driver+0xbc>
2006c84: 03 00 80 6f sethi %hi(0x201bc00), %g1
bool found = false;
for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) {
2006c88: c6 00 60 24 ld [ %g1 + 0x24 ], %g3 ! 201bc24 <_IO_Driver_address_table>
2006c8c: 85 29 20 03 sll %g4, 3, %g2
2006c90: 83 29 20 05 sll %g4, 5, %g1
2006c94: a0 01 3f ff add %g4, -1, %l0
2006c98: 82 20 40 02 sub %g1, %g2, %g1
2006c9c: 82 00 7f e8 add %g1, -24, %g1
2006ca0: 10 80 00 0b b 2006ccc <rtems_io_register_driver+0xa8>
2006ca4: 86 00 c0 01 add %g3, %g1, %g3
if ( !_IO_Driver_address_table[major].initialization_entry &&
2006ca8: 80 a0 60 00 cmp %g1, 0
2006cac: 32 80 00 07 bne,a 2006cc8 <rtems_io_register_driver+0xa4>
2006cb0: a0 04 3f ff add %l0, -1, %l0
2006cb4: c2 00 e0 04 ld [ %g3 + 4 ], %g1
2006cb8: 80 a0 60 00 cmp %g1, 0
2006cbc: 02 80 00 09 be 2006ce0 <rtems_io_register_driver+0xbc> <== ALWAYS TAKEN
2006cc0: 03 00 80 6f sethi %hi(0x201bc00), %g1
* in use.
*/
if ( major == 0 ) {
bool found = false;
for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) {
2006cc4: a0 04 3f ff add %l0, -1, %l0 <== NOT EXECUTED
2006cc8: 86 00 ff e8 add %g3, -24, %g3
2006ccc: 80 a4 20 00 cmp %l0, 0
2006cd0: 32 bf ff f6 bne,a 2006ca8 <rtems_io_register_driver+0x84>
2006cd4: c2 00 c0 00 ld [ %g3 ], %g1
2006cd8: 81 c7 e0 08 ret
2006cdc: 91 e8 20 05 restore %g0, 5, %o0
if ( !found )
return RTEMS_TOO_MANY;
}
if ( _IO_Driver_address_table[major].initialization_entry ||
2006ce0: c6 00 60 24 ld [ %g1 + 0x24 ], %g3
2006ce4: 85 2c 20 03 sll %l0, 3, %g2
2006ce8: 83 2c 20 05 sll %l0, 5, %g1
2006cec: 82 20 40 02 sub %g1, %g2, %g1
2006cf0: c4 00 c0 01 ld [ %g3 + %g1 ], %g2
2006cf4: 80 a0 a0 00 cmp %g2, 0
2006cf8: 12 80 00 0f bne 2006d34 <rtems_io_register_driver+0x110>
2006cfc: 90 00 c0 01 add %g3, %g1, %o0
2006d00: c2 02 20 04 ld [ %o0 + 4 ], %g1
2006d04: 80 a0 60 00 cmp %g1, 0
2006d08: 32 80 00 0c bne,a 2006d38 <rtems_io_register_driver+0x114><== NEVER TAKEN
2006d0c: b0 10 20 0c mov 0xc, %i0 <== NOT EXECUTED
_IO_Driver_address_table[major].open_entry )
return RTEMS_RESOURCE_IN_USE;
_IO_Driver_address_table[major] = *driver_table;
2006d10: 40 00 1e bc call 200e800 <memcpy>
2006d14: 94 10 20 18 mov 0x18, %o2
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
2006d18: b0 10 00 10 mov %l0, %i0
_IO_Driver_address_table[major].open_entry )
return RTEMS_RESOURCE_IN_USE;
_IO_Driver_address_table[major] = *driver_table;
*registered_major = major;
2006d1c: e0 26 80 00 st %l0, [ %i2 ]
return rtems_io_initialize( major, 0, NULL );
2006d20: b2 10 20 00 clr %i1
2006d24: 7f ff ff 4f call 2006a60 <rtems_io_initialize>
2006d28: 95 e8 20 00 restore %g0, 0, %o2
2006d2c: 81 c7 e0 08 ret
2006d30: 91 e8 20 09 restore %g0, 9, %o0
2006d34: b0 10 20 0c mov 0xc, %i0
}
2006d38: 81 c7 e0 08 ret
2006d3c: 81 e8 00 00 restore
02006d40 <rtems_io_unregister_driver>:
*/
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
2006d40: 9d e3 bf 98 save %sp, -104, %sp
if ( major < _IO_Number_of_drivers ) {
2006d44: 03 00 80 6f sethi %hi(0x201bc00), %g1
2006d48: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 ! 201bc20 <_IO_Number_of_drivers>
*/
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
2006d4c: 86 10 00 18 mov %i0, %g3
if ( major < _IO_Number_of_drivers ) {
2006d50: 80 a6 00 01 cmp %i0, %g1
2006d54: 1a 80 00 0c bcc 2006d84 <rtems_io_unregister_driver+0x44> <== NEVER TAKEN
2006d58: b0 10 20 0d mov 0xd, %i0
memset(
2006d5c: 03 00 80 6f sethi %hi(0x201bc00), %g1
2006d60: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 ! 201bc24 <_IO_Driver_address_table>
2006d64: 83 28 e0 03 sll %g3, 3, %g1
2006d68: 91 28 e0 05 sll %g3, 5, %o0
2006d6c: 92 10 20 00 clr %o1
2006d70: 90 22 00 01 sub %o0, %g1, %o0
2006d74: 94 10 20 18 mov 0x18, %o2
2006d78: 90 00 80 08 add %g2, %o0, %o0
2006d7c: 40 00 1e da call 200e8e4 <memset>
2006d80: b0 10 20 00 clr %i0
sizeof( rtems_driver_address_table )
);
return RTEMS_SUCCESSFUL;
}
return RTEMS_UNSATISFIED;
}
2006d84: 81 c7 e0 08 ret
2006d88: 81 e8 00 00 restore
02008068 <rtems_iterate_over_all_threads>:
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
{
2008068: 9d e3 bf 98 save %sp, -104, %sp
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
200806c: 80 a6 20 00 cmp %i0, 0
2008070: 02 80 00 1d be 20080e4 <rtems_iterate_over_all_threads+0x7c><== NEVER TAKEN
2008074: 03 00 80 90 sethi %hi(0x2024000), %g1
return;
2008078: a4 10 61 c4 or %g1, 0x1c4, %l2 ! 20241c4 <_Objects_Information_table+0x4>
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
200807c: a6 04 a0 10 add %l2, 0x10, %l3
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
2008080: c2 04 80 00 ld [ %l2 ], %g1
2008084: 80 a0 60 00 cmp %g1, 0
2008088: 22 80 00 14 be,a 20080d8 <rtems_iterate_over_all_threads+0x70>
200808c: a4 04 a0 04 add %l2, 4, %l2
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
2008090: e2 00 60 04 ld [ %g1 + 4 ], %l1
if ( information ) {
2008094: 80 a4 60 00 cmp %l1, 0
2008098: 12 80 00 0b bne 20080c4 <rtems_iterate_over_all_threads+0x5c><== ALWAYS TAKEN
200809c: a0 10 20 01 mov 1, %l0
for ( i=1 ; i <= information->maximum ; i++ ) {
20080a0: 10 80 00 0e b 20080d8 <rtems_iterate_over_all_threads+0x70><== NOT EXECUTED
20080a4: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED
the_thread = (Thread_Control *)information->local_table[ i ];
20080a8: c2 04 60 1c ld [ %l1 + 0x1c ], %g1
20080ac: d0 00 40 08 ld [ %g1 + %o0 ], %o0
if ( !the_thread )
20080b0: 80 a2 20 00 cmp %o0, 0
20080b4: 02 80 00 04 be 20080c4 <rtems_iterate_over_all_threads+0x5c><== NEVER TAKEN
20080b8: a0 04 20 01 inc %l0
continue;
(*routine)(the_thread);
20080bc: 9f c6 00 00 call %i0
20080c0: 01 00 00 00 nop
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
20080c4: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1
20080c8: 80 a4 00 01 cmp %l0, %g1
20080cc: 08 bf ff f7 bleu 20080a8 <rtems_iterate_over_all_threads+0x40>
20080d0: 91 2c 20 02 sll %l0, 2, %o0
20080d4: a4 04 a0 04 add %l2, 4, %l2
if ( !routine )
return;
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
20080d8: 80 a4 80 13 cmp %l2, %l3
20080dc: 32 bf ff ea bne,a 2008084 <rtems_iterate_over_all_threads+0x1c>
20080e0: c2 04 80 00 ld [ %l2 ], %g1
20080e4: 81 c7 e0 08 ret
20080e8: 81 e8 00 00 restore
0200a64c <rtems_libio_allocate>:
* 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 )
{
200a64c: 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 );
200a650: 03 00 80 5d sethi %hi(0x2017400), %g1
200a654: d0 00 62 4c ld [ %g1 + 0x24c ], %o0 ! 201764c <rtems_libio_semaphore>
200a658: 92 10 20 00 clr %o1
200a65c: 7f ff eb 98 call 20054bc <rtems_semaphore_obtain>
200a660: 94 10 20 00 clr %o2
if (rtems_libio_iop_freelist) {
200a664: 23 00 80 5d sethi %hi(0x2017400), %l1
200a668: c4 04 62 48 ld [ %l1 + 0x248 ], %g2 ! 2017648 <rtems_libio_iop_freelist>
200a66c: 80 a0 a0 00 cmp %g2, 0
200a670: 02 80 00 28 be 200a710 <rtems_libio_allocate+0xc4>
200a674: b0 10 20 00 clr %i0
rc = rtems_semaphore_create(
200a678: 03 00 80 5d sethi %hi(0x2017400), %g1
200a67c: c6 00 62 44 ld [ %g1 + 0x244 ], %g3 ! 2017644 <rtems_libio_iops>
200a680: 92 10 20 01 mov 1, %o1
200a684: 86 20 80 03 sub %g2, %g3, %g3
200a688: 87 38 e0 02 sra %g3, 2, %g3
200a68c: 83 28 e0 02 sll %g3, 2, %g1
200a690: 85 28 e0 06 sll %g3, 6, %g2
200a694: 84 20 80 01 sub %g2, %g1, %g2
200a698: 83 28 a0 06 sll %g2, 6, %g1
200a69c: 82 20 40 02 sub %g1, %g2, %g1
200a6a0: 85 28 60 0c sll %g1, 0xc, %g2
200a6a4: 82 00 40 02 add %g1, %g2, %g1
200a6a8: 82 00 40 03 add %g1, %g3, %g1
200a6ac: 83 28 60 04 sll %g1, 4, %g1
200a6b0: 82 20 40 03 sub %g1, %g3, %g1
200a6b4: 83 28 60 02 sll %g1, 2, %g1
200a6b8: 86 20 c0 01 sub %g3, %g1, %g3
200a6bc: 94 10 20 54 mov 0x54, %o2
200a6c0: 96 10 20 00 clr %o3
200a6c4: 11 13 10 92 sethi %hi(0x4c424800), %o0
200a6c8: 98 07 bf f4 add %fp, -12, %o4
200a6cc: 90 12 21 00 or %o0, 0x100, %o0
200a6d0: 7f ff ea d5 call 2005224 <rtems_semaphore_create>
200a6d4: 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)
200a6d8: 80 a2 20 00 cmp %o0, 0
200a6dc: 32 80 00 0d bne,a 200a710 <rtems_libio_allocate+0xc4> <== NEVER TAKEN
200a6e0: b0 10 20 00 clr %i0 <== NOT EXECUTED
goto failed;
iop = rtems_libio_iop_freelist;
200a6e4: f0 04 62 48 ld [ %l1 + 0x248 ], %i0
next = iop->data1;
(void) memset( iop, 0, sizeof(rtems_libio_t) );
200a6e8: 92 10 20 00 clr %o1
&sema
);
if (rc != RTEMS_SUCCESSFUL)
goto failed;
iop = rtems_libio_iop_freelist;
next = iop->data1;
200a6ec: e0 06 20 28 ld [ %i0 + 0x28 ], %l0
(void) memset( iop, 0, sizeof(rtems_libio_t) );
200a6f0: 90 10 00 18 mov %i0, %o0
200a6f4: 40 00 0c 93 call 200d940 <memset>
200a6f8: 94 10 20 34 mov 0x34, %o2
iop->flags = LIBIO_FLAGS_OPEN;
iop->sem = sema;
200a6fc: c2 07 bf f4 ld [ %fp + -12 ], %g1
rtems_libio_iop_freelist = next;
200a700: e0 24 62 48 st %l0, [ %l1 + 0x248 ]
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;
200a704: c2 26 20 20 st %g1, [ %i0 + 0x20 ]
if (rc != RTEMS_SUCCESSFUL)
goto failed;
iop = rtems_libio_iop_freelist;
next = iop->data1;
(void) memset( iop, 0, sizeof(rtems_libio_t) );
iop->flags = LIBIO_FLAGS_OPEN;
200a708: 82 10 21 00 mov 0x100, %g1
200a70c: c2 26 20 0c st %g1, [ %i0 + 0xc ]
failed:
iop = 0;
done:
rtems_semaphore_release( rtems_libio_semaphore );
200a710: 03 00 80 5d sethi %hi(0x2017400), %g1
200a714: 7f ff eb b1 call 20055d8 <rtems_semaphore_release>
200a718: d0 00 62 4c ld [ %g1 + 0x24c ], %o0 ! 201764c <rtems_libio_semaphore>
return iop;
}
200a71c: 81 c7 e0 08 ret
200a720: 81 e8 00 00 restore
0200a5ec <rtems_libio_free>:
*/
void rtems_libio_free(
rtems_libio_t *iop
)
{
200a5ec: 9d e3 bf 98 save %sp, -104, %sp
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
200a5f0: 03 00 80 5d sethi %hi(0x2017400), %g1
200a5f4: d0 00 62 4c ld [ %g1 + 0x24c ], %o0 ! 201764c <rtems_libio_semaphore>
200a5f8: 92 10 20 00 clr %o1
200a5fc: 7f ff eb b0 call 20054bc <rtems_semaphore_obtain>
200a600: 94 10 20 00 clr %o2
if (iop->sem)
200a604: d0 06 20 20 ld [ %i0 + 0x20 ], %o0
200a608: 80 a2 20 00 cmp %o0, 0
200a60c: 02 80 00 04 be 200a61c <rtems_libio_free+0x30> <== NEVER TAKEN
200a610: a0 10 00 18 mov %i0, %l0
rtems_semaphore_delete(iop->sem);
200a614: 7f ff eb 7c call 2005404 <rtems_semaphore_delete>
200a618: 01 00 00 00 nop
iop->flags &= ~LIBIO_FLAGS_OPEN;
200a61c: c4 04 20 0c ld [ %l0 + 0xc ], %g2
iop->data1 = rtems_libio_iop_freelist;
rtems_libio_iop_freelist = iop;
rtems_semaphore_release(rtems_libio_semaphore);
200a620: 03 00 80 5d sethi %hi(0x2017400), %g1
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
iop->data1 = rtems_libio_iop_freelist;
200a624: 07 00 80 5d sethi %hi(0x2017400), %g3
rtems_libio_iop_freelist = iop;
rtems_semaphore_release(rtems_libio_semaphore);
200a628: f0 00 62 4c ld [ %g1 + 0x24c ], %i0
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
iop->data1 = rtems_libio_iop_freelist;
200a62c: c2 00 e2 48 ld [ %g3 + 0x248 ], %g1
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
200a630: 84 08 be ff and %g2, -257, %g2
iop->data1 = rtems_libio_iop_freelist;
rtems_libio_iop_freelist = iop;
200a634: e0 20 e2 48 st %l0, [ %g3 + 0x248 ]
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
iop->data1 = rtems_libio_iop_freelist;
200a638: c2 24 20 28 st %g1, [ %l0 + 0x28 ]
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
200a63c: c4 24 20 0c st %g2, [ %l0 + 0xc ]
iop->data1 = rtems_libio_iop_freelist;
rtems_libio_iop_freelist = iop;
rtems_semaphore_release(rtems_libio_semaphore);
200a640: 7f ff eb e6 call 20055d8 <rtems_semaphore_release>
200a644: 81 e8 00 00 restore
02002124 <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
2002124: 9d e3 bf 98 save %sp, -104, %sp
rtems_status_code rc;
int i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
2002128: 21 00 80 5a sethi %hi(0x2016800), %l0
200212c: d0 04 21 48 ld [ %l0 + 0x148 ], %o0 ! 2016948 <rtems_libio_number_iops>
2002130: 80 a2 20 00 cmp %o0, 0
2002134: 22 80 00 1d be,a 20021a8 <rtems_libio_init+0x84>
2002138: 11 13 10 92 sethi %hi(0x4c424800), %o0
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
200213c: 40 00 1f fc call 200a12c <calloc>
2002140: 92 10 20 34 mov 0x34, %o1
2002144: 03 00 80 5d sethi %hi(0x2017400), %g1
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
2002148: 80 a2 20 00 cmp %o0, 0
200214c: 12 80 00 04 bne 200215c <rtems_libio_init+0x38> <== ALWAYS TAKEN
2002150: d0 20 62 44 st %o0, [ %g1 + 0x244 ]
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
2002154: 10 80 00 1f b 20021d0 <rtems_libio_init+0xac> <== NOT EXECUTED
2002158: 90 10 20 1a mov 0x1a, %o0 <== NOT EXECUTED
iop = rtems_libio_iop_freelist = rtems_libio_iops;
200215c: 03 00 80 5d sethi %hi(0x2017400), %g1
for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++)
2002160: c4 04 21 48 ld [ %l0 + 0x148 ], %g2
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
2002164: d0 20 62 48 st %o0, [ %g1 + 0x248 ]
for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++)
2002168: 86 10 20 00 clr %g3
200216c: 10 80 00 03 b 2002178 <rtems_libio_init+0x54>
2002170: 82 10 00 08 mov %o0, %g1
iop->data1 = iop + 1;
2002174: c2 20 7f f4 st %g1, [ %g1 + -12 ]
2002178: 86 00 e0 01 inc %g3
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++)
200217c: 80 a0 c0 02 cmp %g3, %g2
2002180: 12 bf ff fd bne 2002174 <rtems_libio_init+0x50>
2002184: 82 00 60 34 add %g1, 0x34, %g1
iop->data1 = iop + 1;
iop->data1 = NULL;
2002188: 85 28 e0 02 sll %g3, 2, %g2
200218c: 83 28 e0 04 sll %g3, 4, %g1
2002190: 82 20 40 02 sub %g1, %g2, %g1
2002194: 82 00 40 03 add %g1, %g3, %g1
2002198: 83 28 60 02 sll %g1, 2, %g1
200219c: 82 02 00 01 add %o0, %g1, %g1
20021a0: c0 20 7f f4 clr [ %g1 + -12 ]
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
20021a4: 11 13 10 92 sethi %hi(0x4c424800), %o0
20021a8: 92 10 20 01 mov 1, %o1
20021ac: 90 12 21 4f or %o0, 0x14f, %o0
20021b0: 94 10 20 54 mov 0x54, %o2
20021b4: 96 10 20 00 clr %o3
20021b8: 19 00 80 5d sethi %hi(0x2017400), %o4
20021bc: 40 00 0c 1a call 2005224 <rtems_semaphore_create>
20021c0: 98 13 22 4c or %o4, 0x24c, %o4 ! 201764c <rtems_libio_semaphore>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
20021c4: 80 a2 20 00 cmp %o0, 0
20021c8: 02 80 00 04 be 20021d8 <rtems_libio_init+0xb4> <== ALWAYS TAKEN
20021cc: 01 00 00 00 nop
rtems_fatal_error_occurred( rc );
20021d0: 40 00 0e 7d call 2005bc4 <rtems_fatal_error_occurred> <== NOT EXECUTED
20021d4: 01 00 00 00 nop <== NOT EXECUTED
/*
* Initialize the base file system infrastructure.
*/
rtems_filesystem_initialize();
20021d8: 40 00 1f 93 call 200a024 <rtems_filesystem_initialize>
20021dc: 81 e8 00 00 restore
02003c0c <rtems_libio_set_private_env>:
rtems_filesystem_freenode( &env->root_directory);
free(env);
}
}
rtems_status_code rtems_libio_set_private_env(void) {
2003c0c: 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);
2003c10: 90 10 20 00 clr %o0
2003c14: 92 10 20 00 clr %o1
2003c18: 40 00 0b 12 call 2006860 <rtems_task_ident>
2003c1c: 94 07 bf f4 add %fp, -12, %o2
if (sc != RTEMS_SUCCESSFUL) return sc;
2003c20: b0 92 20 00 orcc %o0, 0, %i0
2003c24: 12 80 00 19 bne 2003c88 <rtems_libio_set_private_env+0x7c><== NEVER TAKEN
2003c28: 23 00 80 54 sethi %hi(0x2015000), %l1
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
2003c2c: c4 04 62 ac ld [ %l1 + 0x2ac ], %g2 ! 20152ac <rtems_current_user_env>
2003c30: 03 00 80 58 sethi %hi(0x2016000), %g1
2003c34: 82 10 61 88 or %g1, 0x188, %g1 ! 2016188 <rtems_global_user_env>
2003c38: 80 a0 80 01 cmp %g2, %g1
2003c3c: 12 80 00 16 bne 2003c94 <rtems_libio_set_private_env+0x88>
2003c40: a4 14 62 ac or %l1, 0x2ac, %l2
rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t));
2003c44: 7f ff fc a1 call 2002ec8 <malloc>
2003c48: 90 10 20 40 mov 0x40, %o0
if (!tmp)
2003c4c: a0 92 20 00 orcc %o0, 0, %l0
2003c50: 12 80 00 04 bne 2003c60 <rtems_libio_set_private_env+0x54><== ALWAYS TAKEN
2003c54: 92 10 00 12 mov %l2, %o1
2003c58: 81 c7 e0 08 ret <== NOT EXECUTED
2003c5c: 91 e8 20 1a restore %g0, 0x1a, %o0 <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT
tmp->refcnt = 1;
#endif
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env);
2003c60: 90 10 20 00 clr %o0
2003c64: 15 00 80 0e sethi %hi(0x2003800), %o2
2003c68: 40 00 0b 59 call 20069cc <rtems_task_variable_add>
2003c6c: 94 12 a2 dc or %o2, 0x2dc, %o2 ! 2003adc <free_user_env>
if (sc != RTEMS_SUCCESSFUL) {
2003c70: 82 92 20 00 orcc %o0, 0, %g1
2003c74: 22 80 00 07 be,a 2003c90 <rtems_libio_set_private_env+0x84><== ALWAYS TAKEN
2003c78: e0 24 62 ac st %l0, [ %l1 + 0x2ac ]
/* don't use free_user_env because the pathlocs are
* not initialized yet
*/
free(tmp);
2003c7c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2003c80: 7f ff fb 11 call 20028c4 <free> <== NOT EXECUTED
2003c84: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED
2003c88: 81 c7 e0 08 ret <== NOT EXECUTED
2003c8c: 81 e8 00 00 restore <== NOT EXECUTED
return sc;
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
2003c90: 23 00 80 54 sethi %hi(0x2015000), %l1
2003c94: d0 04 62 ac ld [ %l1 + 0x2ac ], %o0 ! 20152ac <rtems_current_user_env>
2003c98: 94 10 20 40 mov 0x40, %o2
2003c9c: 13 00 80 58 sethi %hi(0x2016000), %o1
2003ca0: 40 00 2d a7 call 200f33c <memcpy>
2003ca4: 92 12 61 88 or %o1, 0x188, %o1 ! 2016188 <rtems_global_user_env>
rtems_current_user_env->task_id=task_id; /* mark the local values*/
/* get a clean root */
rtems_filesystem_root = THE_ROOT_FS_LOC;
2003ca8: 03 00 80 58 sethi %hi(0x2016000), %g1
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
rtems_current_user_env->task_id=task_id; /* mark the local values*/
2003cac: d0 04 62 ac ld [ %l1 + 0x2ac ], %o0
/* get a clean root */
rtems_filesystem_root = THE_ROOT_FS_LOC;
2003cb0: d2 00 61 c8 ld [ %g1 + 0x1c8 ], %o1
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
rtems_current_user_env->task_id=task_id; /* mark the local values*/
2003cb4: c2 07 bf f4 ld [ %fp + -12 ], %g1
/* get a clean root */
rtems_filesystem_root = THE_ROOT_FS_LOC;
2003cb8: 92 02 60 18 add %o1, 0x18, %o1
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
rtems_current_user_env->task_id=task_id; /* mark the local values*/
2003cbc: c2 22 00 00 st %g1, [ %o0 ]
/* get a clean root */
rtems_filesystem_root = THE_ROOT_FS_LOC;
2003cc0: 94 10 20 10 mov 0x10, %o2
2003cc4: 40 00 2d 9e call 200f33c <memcpy>
2003cc8: 90 02 20 14 add %o0, 0x14, %o0
* code we must _not_ free the original locs because
* what we are trying to do here is forking off
* clones.
*/
rtems_filesystem_evaluate_path("/", 0, &loc, 0);
2003ccc: a0 07 bf e4 add %fp, -28, %l0
2003cd0: 96 10 20 00 clr %o3
2003cd4: 25 00 80 4f sethi %hi(0x2013c00), %l2
2003cd8: 92 10 20 00 clr %o1
2003cdc: 94 10 00 10 mov %l0, %o2
2003ce0: 7f ff fa a7 call 200277c <rtems_filesystem_evaluate_path>
2003ce4: 90 14 a3 90 or %l2, 0x390, %o0
rtems_filesystem_root = loc;
2003ce8: d0 04 62 ac ld [ %l1 + 0x2ac ], %o0
2003cec: 92 10 00 10 mov %l0, %o1
2003cf0: 94 10 20 10 mov 0x10, %o2
2003cf4: 40 00 2d 92 call 200f33c <memcpy>
2003cf8: 90 02 20 14 add %o0, 0x14, %o0
rtems_filesystem_evaluate_path("/", 0, &loc, 0);
2003cfc: 92 10 20 00 clr %o1
2003d00: 94 10 00 10 mov %l0, %o2
2003d04: 90 14 a3 90 or %l2, 0x390, %o0
2003d08: 7f ff fa 9d call 200277c <rtems_filesystem_evaluate_path>
2003d0c: 96 10 20 00 clr %o3
rtems_filesystem_current = loc;
2003d10: d0 04 62 ac ld [ %l1 + 0x2ac ], %o0
2003d14: 92 10 00 10 mov %l0, %o1
2003d18: 90 02 20 04 add %o0, 4, %o0
2003d1c: 40 00 2d 88 call 200f33c <memcpy>
2003d20: 94 10 20 10 mov 0x10, %o2
return RTEMS_SUCCESSFUL;
}
2003d24: 81 c7 e0 08 ret
2003d28: 81 e8 00 00 restore
02003b54 <rtems_libio_share_private_env>:
* 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) {
2003b54: 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);
2003b58: 90 10 20 00 clr %o0 <== NOT EXECUTED
2003b5c: 92 10 20 00 clr %o1 <== NOT EXECUTED
2003b60: 40 00 0b 40 call 2006860 <rtems_task_ident> <== NOT EXECUTED
2003b64: 94 07 bf f0 add %fp, -16, %o2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
2003b68: 86 92 20 00 orcc %o0, 0, %g3 <== NOT EXECUTED
2003b6c: 12 80 00 26 bne 2003c04 <rtems_libio_share_private_env+0xb0><== NOT EXECUTED
2003b70: 03 00 80 54 sethi %hi(0x2015000), %g1 <== NOT EXECUTED
if (rtems_current_user_env->task_id==current_task_id) {
2003b74: e0 00 62 ac ld [ %g1 + 0x2ac ], %l0 ! 20152ac <rtems_current_user_env><== NOT EXECUTED
2003b78: 92 10 62 ac or %g1, 0x2ac, %o1 <== NOT EXECUTED
2003b7c: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED
2003b80: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED
2003b84: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2003b88: 32 80 00 0a bne,a 2003bb0 <rtems_libio_share_private_env+0x5c><== NOT EXECUTED
2003b8c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
/* kill the current user env & task_var*/
rtems_user_env_t *tmp = rtems_current_user_env;
sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env);
2003b90: 40 00 0b bb call 2006a7c <rtems_task_variable_delete> <== NOT EXECUTED
2003b94: 01 00 00 00 nop <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
2003b98: 86 92 20 00 orcc %o0, 0, %g3 <== NOT EXECUTED
2003b9c: 12 80 00 1a bne 2003c04 <rtems_libio_share_private_env+0xb0><== NOT EXECUTED
2003ba0: 01 00 00 00 nop <== NOT EXECUTED
free_user_env(tmp);
2003ba4: 7f ff ff ce call 2003adc <free_user_env> <== NOT EXECUTED
2003ba8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
};
/* AT THIS POINT, rtems_current_user_env is DANGLING */
sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env,
2003bac: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2003bb0: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED
2003bb4: 31 00 80 54 sethi %hi(0x2015000), %i0 <== NOT EXECUTED
2003bb8: a0 16 22 ac or %i0, 0x2ac, %l0 ! 20152ac <rtems_current_user_env><== NOT EXECUTED
2003bbc: 40 00 0b d5 call 2006b10 <rtems_task_variable_get> <== NOT EXECUTED
2003bc0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
(void*)&shared_user_env );
if (sc != RTEMS_SUCCESSFUL)
2003bc4: 86 92 20 00 orcc %o0, 0, %g3 <== NOT EXECUTED
2003bc8: 12 80 00 0c bne 2003bf8 <rtems_libio_share_private_env+0xa4><== NOT EXECUTED
2003bcc: 03 00 80 58 sethi %hi(0x2016000), %g1 <== NOT EXECUTED
goto bailout;
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env);
2003bd0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
2003bd4: 15 00 80 0e sethi %hi(0x2003800), %o2 <== NOT EXECUTED
2003bd8: 40 00 0b 7d call 20069cc <rtems_task_variable_add> <== NOT EXECUTED
2003bdc: 94 12 a2 dc or %o2, 0x2dc, %o2 ! 2003adc <free_user_env> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2003be0: 86 92 20 00 orcc %o0, 0, %g3 <== NOT EXECUTED
2003be4: 12 80 00 05 bne 2003bf8 <rtems_libio_share_private_env+0xa4><== NOT EXECUTED
2003be8: 03 00 80 58 sethi %hi(0x2016000), %g1 <== NOT EXECUTED
goto bailout;
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
2003bec: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED
2003bf0: 10 80 00 05 b 2003c04 <rtems_libio_share_private_env+0xb0><== NOT EXECUTED
2003bf4: c2 26 22 ac st %g1, [ %i0 + 0x2ac ] <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
bailout:
/* fallback to the global env */
rtems_current_user_env = &rtems_global_user_env;
2003bf8: 05 00 80 54 sethi %hi(0x2015000), %g2 <== NOT EXECUTED
2003bfc: 82 10 61 88 or %g1, 0x188, %g1 <== NOT EXECUTED
2003c00: c2 20 a2 ac st %g1, [ %g2 + 0x2ac ] <== NOT EXECUTED
return sc;
}
2003c04: 81 c7 e0 08 ret <== NOT EXECUTED
2003c08: 91 e8 00 03 restore %g0, %g3, %o0 <== NOT EXECUTED
0200a49c <rtems_libio_to_fcntl_flags>:
*/
uint32_t rtems_libio_to_fcntl_flags(
uint32_t flags
)
{
200a49c: 84 10 00 08 mov %o0, %g2
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
200a4a0: 82 08 a0 06 and %g2, 6, %g1
200a4a4: 80 a0 60 06 cmp %g1, 6
200a4a8: 02 80 00 07 be 200a4c4 <rtems_libio_to_fcntl_flags+0x28> <== NEVER TAKEN
200a4ac: 90 10 20 02 mov 2, %o0
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
200a4b0: 83 30 a0 02 srl %g2, 2, %g1
200a4b4: 80 88 a0 02 btst 2, %g2
200a4b8: 02 80 00 03 be 200a4c4 <rtems_libio_to_fcntl_flags+0x28> <== NEVER TAKEN
200a4bc: 90 08 60 01 and %g1, 1, %o0
200a4c0: 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 ) {
200a4c4: 80 88 a0 01 btst 1, %g2
200a4c8: 02 80 00 04 be 200a4d8 <rtems_libio_to_fcntl_flags+0x3c>
200a4cc: 80 88 a2 00 btst 0x200, %g2
fcntl_flags |= O_NONBLOCK;
200a4d0: 03 00 00 10 sethi %hi(0x4000), %g1
200a4d4: 90 12 00 01 or %o0, %g1, %o0
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
200a4d8: 32 80 00 02 bne,a 200a4e0 <rtems_libio_to_fcntl_flags+0x44>
200a4dc: 90 12 20 08 or %o0, 8, %o0
fcntl_flags |= O_APPEND;
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
200a4e0: 80 88 a4 00 btst 0x400, %g2
200a4e4: 32 80 00 02 bne,a 200a4ec <rtems_libio_to_fcntl_flags+0x50>
200a4e8: 90 12 22 00 or %o0, 0x200, %o0
fcntl_flags |= O_CREAT;
}
return fcntl_flags;
}
200a4ec: 81 c3 e0 08 retl
02004ba0 <rtems_memalign>:
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
2004ba0: 9d e3 bf 98 save %sp, -104, %sp
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
2004ba4: a0 96 20 00 orcc %i0, 0, %l0
2004ba8: 02 80 00 1f be 2004c24 <rtems_memalign+0x84>
2004bac: 03 00 80 76 sethi %hi(0x201d800), %g1
*pointer = NULL;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
2004bb0: c2 00 61 d4 ld [ %g1 + 0x1d4 ], %g1 ! 201d9d4 <_System_state_Current>
2004bb4: 80 a0 60 03 cmp %g1, 3
2004bb8: 12 80 00 07 bne 2004bd4 <rtems_memalign+0x34> <== NEVER TAKEN
2004bbc: c0 24 00 00 clr [ %l0 ]
2004bc0: 7f ff fb be call 2003ab8 <malloc_is_system_state_OK>
2004bc4: 01 00 00 00 nop
2004bc8: 80 8a 20 ff btst 0xff, %o0
2004bcc: 02 80 00 17 be 2004c28 <rtems_memalign+0x88> <== NEVER TAKEN
2004bd0: b0 10 20 16 mov 0x16, %i0
/*
*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
2004bd4: 7f ff fb d3 call 2003b20 <malloc_deferred_frees_process>
2004bd8: b0 10 20 0c mov 0xc, %i0
/*
* Perform the aligned allocation requested
*/
return_this = _Protected_heap_Allocate_aligned(
2004bdc: 92 10 00 1a mov %i2, %o1
2004be0: 94 10 00 19 mov %i1, %o2
2004be4: 11 00 80 75 sethi %hi(0x201d400), %o0
2004be8: 40 00 13 37 call 20098c4 <_Protected_heap_Allocate_aligned>
2004bec: 90 12 22 68 or %o0, 0x268, %o0 ! 201d668 <RTEMS_Malloc_Heap>
&RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
2004bf0: b4 92 20 00 orcc %o0, 0, %i2
2004bf4: 02 80 00 0d be 2004c28 <rtems_memalign+0x88>
2004bf8: 03 00 80 73 sethi %hi(0x201cc00), %g1
return ENOMEM;
/*
* If configured, update the more involved statistics
*/
if ( rtems_malloc_statistics_helpers )
2004bfc: c2 00 63 24 ld [ %g1 + 0x324 ], %g1 ! 201cf24 <rtems_malloc_statistics_helpers>
2004c00: 80 a0 60 00 cmp %g1, 0
2004c04: 22 80 00 06 be,a 2004c1c <rtems_memalign+0x7c> <== ALWAYS TAKEN
2004c08: f4 24 00 00 st %i2, [ %l0 ]
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
2004c0c: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED
2004c10: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004c14: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
*/
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
*pointer = return_this;
2004c18: f4 24 00 00 st %i2, [ %l0 ] <== NOT EXECUTED
2004c1c: 81 c7 e0 08 ret
2004c20: 91 e8 20 00 restore %g0, 0, %o0
return 0;
2004c24: b0 10 20 16 mov 0x16, %i0
}
2004c28: 81 c7 e0 08 ret
2004c2c: 81 e8 00 00 restore
0200f160 <rtems_message_queue_create>:
uint32_t count,
size_t max_message_size,
rtems_attribute attribute_set,
Objects_Id *id
)
{
200f160: 9d e3 bf 90 save %sp, -112, %sp
CORE_message_queue_Attributes the_msgq_attributes;
#if defined(RTEMS_MULTIPROCESSING)
bool is_global;
#endif
if ( !rtems_is_name_valid( name ) )
200f164: a2 96 20 00 orcc %i0, 0, %l1
200f168: 02 80 00 16 be 200f1c0 <rtems_message_queue_create+0x60>
200f16c: b0 10 20 03 mov 3, %i0
return RTEMS_INVALID_NAME;
if ( !id )
200f170: 80 a7 20 00 cmp %i4, 0
200f174: 02 80 00 13 be 200f1c0 <rtems_message_queue_create+0x60> <== NEVER TAKEN
200f178: 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 )
200f17c: 80 a6 60 00 cmp %i1, 0
200f180: 02 80 00 10 be 200f1c0 <rtems_message_queue_create+0x60> <== NEVER TAKEN
200f184: b0 10 20 0a mov 0xa, %i0
return RTEMS_INVALID_NUMBER;
if ( max_message_size == 0 )
200f188: 80 a6 a0 00 cmp %i2, 0
200f18c: 02 80 00 0d be 200f1c0 <rtems_message_queue_create+0x60> <== NEVER TAKEN
200f190: b0 10 20 08 mov 8, %i0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
200f194: 05 00 80 c6 sethi %hi(0x2031800), %g2
200f198: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 2031910 <_Thread_Dispatch_disable_level>
200f19c: 82 00 60 01 inc %g1
200f1a0: c2 20 a1 10 st %g1, [ %g2 + 0x110 ]
#endif
#endif
_Thread_Disable_dispatch(); /* protects object pointer */
the_message_queue = _Message_queue_Allocate();
200f1a4: 40 00 26 8a call 2018bcc <_Message_queue_Allocate>
200f1a8: 01 00 00 00 nop
if ( !the_message_queue ) {
200f1ac: a0 92 20 00 orcc %o0, 0, %l0
200f1b0: 12 80 00 06 bne 200f1c8 <rtems_message_queue_create+0x68>
200f1b4: 80 8e e0 04 btst 4, %i3
_Thread_Enable_dispatch();
200f1b8: 40 00 16 04 call 20149c8 <_Thread_Enable_dispatch>
200f1bc: b0 10 20 05 mov 5, %i0
200f1c0: 81 c7 e0 08 ret
200f1c4: 81 e8 00 00 restore
}
#endif
the_message_queue->attribute_set = attribute_set;
if (_Attributes_Is_priority( attribute_set ) )
200f1c8: 02 80 00 05 be 200f1dc <rtems_message_queue_create+0x7c>
200f1cc: f6 24 20 10 st %i3, [ %l0 + 0x10 ]
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY;
200f1d0: 82 10 20 01 mov 1, %g1
200f1d4: 10 80 00 03 b 200f1e0 <rtems_message_queue_create+0x80>
200f1d8: c2 27 bf f4 st %g1, [ %fp + -12 ]
else
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
200f1dc: c0 27 bf f4 clr [ %fp + -12 ]
if ( ! _CORE_message_queue_Initialize(
200f1e0: 94 10 00 19 mov %i1, %o2
200f1e4: 96 10 00 1a mov %i2, %o3
200f1e8: 90 04 20 14 add %l0, 0x14, %o0
200f1ec: 40 00 0d 51 call 2012730 <_CORE_message_queue_Initialize>
200f1f0: 92 07 bf f4 add %fp, -12, %o1
200f1f4: 80 8a 20 ff btst 0xff, %o0
200f1f8: 12 80 00 0a bne 200f220 <rtems_message_queue_create+0xc0>
200f1fc: 03 00 80 c8 sethi %hi(0x2032000), %g1
*/
RTEMS_INLINE_ROUTINE void _Message_queue_Free (
Message_queue_Control *the_message_queue
)
{
_Objects_Free( &_Message_queue_Information, &the_message_queue->Object );
200f200: 90 10 62 3c or %g1, 0x23c, %o0 ! 203223c <_Message_queue_Information>
200f204: 92 10 00 10 mov %l0, %o1
200f208: 40 00 13 03 call 2013e14 <_Objects_Free>
200f20c: b0 10 20 0d mov 0xd, %i0
_Objects_MP_Close(
&_Message_queue_Information, the_message_queue->Object.id);
#endif
_Message_queue_Free( the_message_queue );
_Thread_Enable_dispatch();
200f210: 40 00 15 ee call 20149c8 <_Thread_Enable_dispatch>
200f214: 01 00 00 00 nop
200f218: 81 c7 e0 08 ret
200f21c: 81 e8 00 00 restore
200f220: c4 04 20 08 ld [ %l0 + 8 ], %g2
200f224: 82 10 62 3c or %g1, 0x23c, %g1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
200f228: e2 24 20 0c st %l1, [ %l0 + 0xc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200f22c: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
&_Message_queue_Information,
&the_message_queue->Object,
(Objects_Name) name
);
*id = the_message_queue->Object.id;
200f230: c4 27 00 00 st %g2, [ %i4 ]
200f234: 03 00 00 3f sethi %hi(0xfc00), %g1
200f238: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
200f23c: 84 08 80 01 and %g2, %g1, %g2
200f240: 85 28 a0 02 sll %g2, 2, %g2
name,
0
);
#endif
_Thread_Enable_dispatch();
200f244: b0 10 20 00 clr %i0
200f248: 40 00 15 e0 call 20149c8 <_Thread_Enable_dispatch>
200f24c: e0 20 c0 02 st %l0, [ %g3 + %g2 ]
return RTEMS_SUCCESSFUL;
}
200f250: 81 c7 e0 08 ret
200f254: 81 e8 00 00 restore
0200f2c0 <rtems_message_queue_flush>:
rtems_status_code rtems_message_queue_flush(
Objects_Id id,
uint32_t *count
)
{
200f2c0: 9d e3 bf 90 save %sp, -112, %sp
200f2c4: 92 10 00 18 mov %i0, %o1
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
200f2c8: 80 a6 60 00 cmp %i1, 0
200f2cc: 02 80 00 0f be 200f308 <rtems_message_queue_flush+0x48> <== NEVER TAKEN
200f2d0: 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 *)
200f2d4: 11 00 80 c8 sethi %hi(0x2032000), %o0
200f2d8: 94 07 bf f4 add %fp, -12, %o2
200f2dc: 40 00 13 4d call 2014010 <_Objects_Get>
200f2e0: 90 12 22 3c or %o0, 0x23c, %o0
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
200f2e4: c2 07 bf f4 ld [ %fp + -12 ], %g1
200f2e8: 80 a0 60 00 cmp %g1, 0
200f2ec: 12 80 00 07 bne 200f308 <rtems_message_queue_flush+0x48>
200f2f0: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
*count = _CORE_message_queue_Flush( &the_message_queue->message_queue );
200f2f4: 40 00 0c ef call 20126b0 <_CORE_message_queue_Flush>
200f2f8: 90 02 20 14 add %o0, 0x14, %o0
_Thread_Enable_dispatch();
200f2fc: b0 10 20 00 clr %i0
200f300: 40 00 15 b2 call 20149c8 <_Thread_Enable_dispatch>
200f304: d0 26 40 00 st %o0, [ %i1 ]
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200f308: 81 c7 e0 08 ret
200f30c: 81 e8 00 00 restore
0200f310 <rtems_message_queue_get_number_pending>:
rtems_status_code rtems_message_queue_get_number_pending(
Objects_Id id,
uint32_t *count
)
{
200f310: 9d e3 bf 90 save %sp, -112, %sp
200f314: 92 10 00 18 mov %i0, %o1
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
200f318: 80 a6 60 00 cmp %i1, 0
200f31c: 02 80 00 0e be 200f354 <rtems_message_queue_get_number_pending+0x44><== NEVER TAKEN
200f320: b0 10 20 09 mov 9, %i0
200f324: 11 00 80 c8 sethi %hi(0x2032000), %o0
200f328: 94 07 bf f4 add %fp, -12, %o2
200f32c: 40 00 13 39 call 2014010 <_Objects_Get>
200f330: 90 12 22 3c or %o0, 0x23c, %o0
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
200f334: c2 07 bf f4 ld [ %fp + -12 ], %g1
200f338: 80 a0 60 00 cmp %g1, 0
200f33c: 12 80 00 06 bne 200f354 <rtems_message_queue_get_number_pending+0x44>
200f340: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
*count = the_message_queue->message_queue.number_of_pending_messages;
200f344: c2 02 20 5c ld [ %o0 + 0x5c ], %g1
_Thread_Enable_dispatch();
200f348: b0 10 20 00 clr %i0
200f34c: 40 00 15 9f call 20149c8 <_Thread_Enable_dispatch>
200f350: c2 26 40 00 st %g1, [ %i1 ]
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200f354: 81 c7 e0 08 ret
200f358: 81 e8 00 00 restore
0200f41c <rtems_message_queue_send>:
rtems_status_code rtems_message_queue_send(
Objects_Id id,
const void *buffer,
size_t size
)
{
200f41c: 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 )
200f420: 80 a6 60 00 cmp %i1, 0
200f424: 02 80 00 1a be 200f48c <rtems_message_queue_send+0x70> <== NEVER TAKEN
200f428: 90 10 20 09 mov 9, %o0
200f42c: 11 00 80 c8 sethi %hi(0x2032000), %o0
200f430: 92 10 00 18 mov %i0, %o1
200f434: 90 12 22 3c or %o0, 0x23c, %o0
200f438: 40 00 12 f6 call 2014010 <_Objects_Get>
200f43c: 94 07 bf f4 add %fp, -12, %o2
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
200f440: c2 07 bf f4 ld [ %fp + -12 ], %g1
200f444: 84 10 00 08 mov %o0, %g2
200f448: 80 a0 60 00 cmp %g1, 0
200f44c: 12 80 00 10 bne 200f48c <rtems_message_queue_send+0x70>
200f450: 90 10 20 04 mov 4, %o0
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
bool wait,
Watchdog_Interval timeout
)
{
return _CORE_message_queue_Submit(
200f454: 92 10 00 19 mov %i1, %o1
200f458: 94 10 00 1a mov %i2, %o2
200f45c: 96 10 00 18 mov %i0, %o3
200f460: 90 00 a0 14 add %g2, 0x14, %o0
200f464: 98 10 20 00 clr %o4
200f468: c0 23 a0 5c clr [ %sp + 0x5c ]
200f46c: c0 23 a0 60 clr [ %sp + 0x60 ]
200f470: 1b 1f ff ff sethi %hi(0x7ffffc00), %o5
200f474: 40 00 0d 25 call 2012908 <_CORE_message_queue_Submit>
200f478: 9a 13 63 ff or %o5, 0x3ff, %o5 ! 7fffffff <RAM_END+0x7dbfffff>
MESSAGE_QUEUE_MP_HANDLER,
FALSE, /* sender does not block */
0 /* no timeout */
);
_Thread_Enable_dispatch();
200f47c: 40 00 15 53 call 20149c8 <_Thread_Enable_dispatch>
200f480: a0 10 00 08 mov %o0, %l0
/*
* 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);
200f484: 40 00 00 04 call 200f494 <_Message_queue_Translate_core_message_queue_return_code>
200f488: 90 10 00 10 mov %l0, %o0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200f48c: 81 c7 e0 08 ret
200f490: 91 e8 00 08 restore %g0, %o0, %o0
0200f4a8 <rtems_message_queue_urgent>:
rtems_status_code rtems_message_queue_urgent(
Objects_Id id,
const void *buffer,
size_t size
)
{
200f4a8: 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 )
200f4ac: 80 a6 60 00 cmp %i1, 0
200f4b0: 02 80 00 19 be 200f514 <rtems_message_queue_urgent+0x6c> <== NEVER TAKEN
200f4b4: 90 10 20 09 mov 9, %o0
200f4b8: 11 00 80 c8 sethi %hi(0x2032000), %o0
200f4bc: 92 10 00 18 mov %i0, %o1
200f4c0: 90 12 22 3c or %o0, 0x23c, %o0
200f4c4: 40 00 12 d3 call 2014010 <_Objects_Get>
200f4c8: 94 07 bf f4 add %fp, -12, %o2
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
200f4cc: c2 07 bf f4 ld [ %fp + -12 ], %g1
200f4d0: 84 10 00 08 mov %o0, %g2
200f4d4: 80 a0 60 00 cmp %g1, 0
200f4d8: 12 80 00 0f bne 200f514 <rtems_message_queue_urgent+0x6c>
200f4dc: 90 10 20 04 mov 4, %o0
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
bool wait,
Watchdog_Interval timeout
)
{
return _CORE_message_queue_Submit(
200f4e0: 92 10 00 19 mov %i1, %o1
200f4e4: 94 10 00 1a mov %i2, %o2
200f4e8: 96 10 00 18 mov %i0, %o3
200f4ec: 90 00 a0 14 add %g2, 0x14, %o0
200f4f0: 98 10 20 00 clr %o4
200f4f4: 1b 20 00 00 sethi %hi(0x80000000), %o5
200f4f8: c0 23 a0 5c clr [ %sp + 0x5c ]
200f4fc: 40 00 0d 03 call 2012908 <_CORE_message_queue_Submit>
200f500: c0 23 a0 60 clr [ %sp + 0x60 ]
id,
MESSAGE_QUEUE_MP_HANDLER,
FALSE, /* sender does not block */
0 /* no timeout */
);
_Thread_Enable_dispatch();
200f504: 40 00 15 31 call 20149c8 <_Thread_Enable_dispatch>
200f508: a0 10 00 08 mov %o0, %l0
/*
* 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);
200f50c: 7f ff ff e2 call 200f494 <_Message_queue_Translate_core_message_queue_return_code>
200f510: 90 10 00 10 mov %l0, %o0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200f514: 81 c7 e0 08 ret
200f518: 91 e8 00 08 restore %g0, %o0, %o0
02005838 <rtems_object_set_name>:
*/
rtems_status_code rtems_object_set_name(
rtems_id id,
const char *name
)
{
2005838: 9d e3 bf 90 save %sp, -112, %sp
200583c: 90 10 00 18 mov %i0, %o0
Objects_Information *information;
Objects_Locations location;
Objects_Control *the_object;
Objects_Id tmpId;
if ( !name )
2005840: 80 a6 60 00 cmp %i1, 0
2005844: 02 80 00 18 be 20058a4 <rtems_object_set_name+0x6c> <== NEVER TAKEN
2005848: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
200584c: b0 92 20 00 orcc %o0, 0, %i0
2005850: 12 80 00 04 bne 2005860 <rtems_object_set_name+0x28>
2005854: 03 00 80 6c sethi %hi(0x201b000), %g1
2005858: c2 00 62 f4 ld [ %g1 + 0x2f4 ], %g1 ! 201b2f4 <_Thread_Executing>
200585c: f0 00 60 08 ld [ %g1 + 8 ], %i0
information = _Objects_Get_information_id( tmpId );
2005860: 40 00 06 7d call 2007254 <_Objects_Get_information_id>
2005864: 90 10 00 18 mov %i0, %o0
if ( !information )
2005868: a0 92 20 00 orcc %o0, 0, %l0
200586c: 02 80 00 10 be 20058ac <rtems_object_set_name+0x74>
2005870: 92 10 00 18 mov %i0, %o1
return RTEMS_INVALID_ID;
the_object = _Objects_Get( information, tmpId, &location );
2005874: 40 00 07 07 call 2007490 <_Objects_Get>
2005878: 94 07 bf f4 add %fp, -12, %o2
switch ( location ) {
200587c: c2 07 bf f4 ld [ %fp + -12 ], %g1
2005880: 80 a0 60 00 cmp %g1, 0
2005884: 32 80 00 08 bne,a 20058a4 <rtems_object_set_name+0x6c>
2005888: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
_Objects_Set_name( information, the_object, name );
200588c: 92 10 00 08 mov %o0, %o1
2005890: 94 10 00 19 mov %i1, %o2
2005894: 40 00 07 60 call 2007614 <_Objects_Set_name>
2005898: 90 10 00 10 mov %l0, %o0
_Thread_Enable_dispatch();
200589c: 40 00 09 78 call 2007e7c <_Thread_Enable_dispatch>
20058a0: b0 10 20 00 clr %i0
20058a4: 81 c7 e0 08 ret
20058a8: 81 e8 00 00 restore
return RTEMS_SUCCESSFUL;
20058ac: b0 10 20 04 mov 4, %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
20058b0: 81 c7 e0 08 ret
20058b4: 81 e8 00 00 restore
020030d8 <rtems_panic>:
void rtems_panic(
const char *printf_format,
...
)
{
20030d8: 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);
20030dc: 11 08 00 00 sethi %hi(0x20000000), %o0 <== NOT EXECUTED
...
)
{
va_list arglist;
va_start(arglist, printf_format);
20030e0: 94 07 a0 48 add %fp, 0x48, %o2 <== NOT EXECUTED
20030e4: f2 27 a0 48 st %i1, [ %fp + 0x48 ] <== NOT EXECUTED
20030e8: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED
20030ec: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED
20030f0: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED
20030f4: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
20030f8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
20030fc: 7f ff ff 88 call 2002f1c <rtems_verror> <== NOT EXECUTED
2003100: d4 27 bf f4 st %o2, [ %fp + -12 ] <== NOT EXECUTED
va_end(arglist);
}
2003104: 81 c7 e0 08 ret <== NOT EXECUTED
2003108: 81 e8 00 00 restore <== NOT EXECUTED
0200f51c <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
Objects_Id *id
)
{
200f51c: 9d e3 bf 98 save %sp, -104, %sp
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
200f520: a6 96 20 00 orcc %i0, 0, %l3
200f524: 02 80 00 1e be 200f59c <rtems_partition_create+0x80>
200f528: b0 10 20 03 mov 3, %i0
return RTEMS_INVALID_NAME;
if ( !starting_address )
200f52c: 80 a6 60 00 cmp %i1, 0
200f530: 02 80 00 38 be 200f610 <rtems_partition_create+0xf4> <== NEVER TAKEN
200f534: 80 a7 60 00 cmp %i5, 0
return RTEMS_INVALID_ADDRESS;
if ( !id )
200f538: 02 80 00 36 be 200f610 <rtems_partition_create+0xf4> <== NEVER TAKEN
200f53c: 80 a6 a0 00 cmp %i2, 0
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
200f540: 22 80 00 17 be,a 200f59c <rtems_partition_create+0x80>
200f544: b0 10 20 08 mov 8, %i0
200f548: 80 a6 e0 00 cmp %i3, 0
200f54c: 22 80 00 14 be,a 200f59c <rtems_partition_create+0x80>
200f550: b0 10 20 08 mov 8, %i0
200f554: 80 a6 80 1b cmp %i2, %i3
200f558: 0a 80 00 30 bcs 200f618 <rtems_partition_create+0xfc>
200f55c: 80 8e e0 07 btst 7, %i3
200f560: 12 80 00 2e bne 200f618 <rtems_partition_create+0xfc>
200f564: 80 8e 60 07 btst 7, %i1
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
200f568: 12 80 00 2a bne 200f610 <rtems_partition_create+0xf4>
200f56c: 05 00 80 c6 sethi %hi(0x2031800), %g2
200f570: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 2031910 <_Thread_Dispatch_disable_level>
200f574: 82 00 60 01 inc %g1
200f578: c2 20 a1 10 st %g1, [ %g2 + 0x110 ]
* This function allocates a partition control block from
* the inactive chain of free partition control blocks.
*/
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void )
{
return (Partition_Control *) _Objects_Allocate( &_Partition_Information );
200f57c: 25 00 80 c5 sethi %hi(0x2031400), %l2
200f580: 40 00 11 38 call 2013a60 <_Objects_Allocate>
200f584: 90 14 a2 c4 or %l2, 0x2c4, %o0 ! 20316c4 <_Partition_Information>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
200f588: a2 92 20 00 orcc %o0, 0, %l1
200f58c: 12 80 00 06 bne 200f5a4 <rtems_partition_create+0x88>
200f590: 92 10 00 1b mov %i3, %o1
_Thread_Enable_dispatch();
200f594: 40 00 15 0d call 20149c8 <_Thread_Enable_dispatch>
200f598: b0 10 20 05 mov 5, %i0
200f59c: 81 c7 e0 08 ret
200f5a0: 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;
200f5a4: f8 24 60 1c st %i4, [ %l1 + 0x1c ]
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
200f5a8: f2 24 60 10 st %i1, [ %l1 + 0x10 ]
the_partition->length = length;
200f5ac: f4 24 60 14 st %i2, [ %l1 + 0x14 ]
the_partition->buffer_size = buffer_size;
200f5b0: f6 24 60 18 st %i3, [ %l1 + 0x18 ]
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
200f5b4: c0 24 60 20 clr [ %l1 + 0x20 ]
_Chain_Initialize( &the_partition->Memory, starting_address,
200f5b8: 40 00 4d fa call 2022da0 <.udiv>
200f5bc: 90 10 00 1a mov %i2, %o0
200f5c0: 92 10 00 19 mov %i1, %o1
200f5c4: 94 10 00 08 mov %o0, %o2
200f5c8: 96 10 00 1b mov %i3, %o3
200f5cc: a0 04 60 24 add %l1, 0x24, %l0
200f5d0: 40 00 0b fe call 20125c8 <_Chain_Initialize>
200f5d4: 90 10 00 10 mov %l0, %o0
200f5d8: c4 04 60 08 ld [ %l1 + 8 ], %g2
200f5dc: 82 14 a2 c4 or %l2, 0x2c4, %g1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
200f5e0: e6 24 60 0c st %l3, [ %l1 + 0xc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200f5e4: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
200f5e8: c4 27 40 00 st %g2, [ %i5 ]
200f5ec: 03 00 00 3f sethi %hi(0xfc00), %g1
200f5f0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
200f5f4: 84 08 80 01 and %g2, %g1, %g2
200f5f8: 85 28 a0 02 sll %g2, 2, %g2
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
200f5fc: b0 10 20 00 clr %i0
200f600: 40 00 14 f2 call 20149c8 <_Thread_Enable_dispatch>
200f604: e2 20 c0 02 st %l1, [ %g3 + %g2 ]
200f608: 81 c7 e0 08 ret
200f60c: 81 e8 00 00 restore
return RTEMS_SUCCESSFUL;
200f610: 81 c7 e0 08 ret
200f614: 91 e8 20 09 restore %g0, 9, %o0
200f618: b0 10 20 08 mov 8, %i0
}
200f61c: 81 c7 e0 08 ret
200f620: 81 e8 00 00 restore
0200f698 <rtems_partition_get_buffer>:
rtems_status_code rtems_partition_get_buffer(
Objects_Id id,
void **buffer
)
{
200f698: 9d e3 bf 90 save %sp, -112, %sp
200f69c: 92 10 00 18 mov %i0, %o1
register Partition_Control *the_partition;
Objects_Locations location;
void *the_buffer;
if ( !buffer )
200f6a0: 80 a6 60 00 cmp %i1, 0
200f6a4: 02 80 00 19 be 200f708 <rtems_partition_get_buffer+0x70> <== NEVER TAKEN
200f6a8: b0 10 20 09 mov 9, %i0
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
200f6ac: 11 00 80 c5 sethi %hi(0x2031400), %o0
200f6b0: 94 07 bf f4 add %fp, -12, %o2
200f6b4: 40 00 12 57 call 2014010 <_Objects_Get>
200f6b8: 90 12 22 c4 or %o0, 0x2c4, %o0
return RTEMS_INVALID_ADDRESS;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
200f6bc: c2 07 bf f4 ld [ %fp + -12 ], %g1
200f6c0: a0 10 00 08 mov %o0, %l0
200f6c4: 80 a0 60 00 cmp %g1, 0
200f6c8: 12 80 00 10 bne 200f708 <rtems_partition_get_buffer+0x70>
200f6cc: b0 10 20 04 mov 4, %i0
*/
RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer (
Partition_Control *the_partition
)
{
return _Chain_Get( &the_partition->Memory );
200f6d0: 40 00 0b ae call 2012588 <_Chain_Get>
200f6d4: 90 02 20 24 add %o0, 0x24, %o0
case OBJECTS_LOCAL:
the_buffer = _Partition_Allocate_buffer( the_partition );
if ( the_buffer ) {
200f6d8: b0 92 20 00 orcc %o0, 0, %i0
200f6dc: 02 80 00 09 be 200f700 <rtems_partition_get_buffer+0x68>
200f6e0: 01 00 00 00 nop
the_partition->number_of_used_blocks += 1;
200f6e4: c2 04 20 20 ld [ %l0 + 0x20 ], %g1
200f6e8: 82 00 60 01 inc %g1
_Thread_Enable_dispatch();
200f6ec: 40 00 14 b7 call 20149c8 <_Thread_Enable_dispatch>
200f6f0: c2 24 20 20 st %g1, [ %l0 + 0x20 ]
*buffer = the_buffer;
200f6f4: f0 26 40 00 st %i0, [ %i1 ]
200f6f8: 81 c7 e0 08 ret
200f6fc: 91 e8 20 00 restore %g0, 0, %o0
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
200f700: 40 00 14 b2 call 20149c8 <_Thread_Enable_dispatch>
200f704: b0 10 20 0d mov 0xd, %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200f708: 81 c7 e0 08 ret
200f70c: 81 e8 00 00 restore
0200eaa4 <rtems_port_create>:
void *internal_start,
void *external_start,
uint32_t length,
Objects_Id *id
)
{
200eaa4: 9d e3 bf 98 save %sp, -104, %sp
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name) )
200eaa8: a2 96 20 00 orcc %i0, 0, %l1
200eaac: 02 80 00 14 be 200eafc <rtems_port_create+0x58>
200eab0: b0 10 20 03 mov 3, %i0
return RTEMS_INVALID_NAME;
if ( !id )
200eab4: 80 a7 20 00 cmp %i4, 0
200eab8: 02 80 00 24 be 200eb48 <rtems_port_create+0xa4> <== NEVER TAKEN
200eabc: 82 16 80 19 or %i2, %i1, %g1
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( internal_start ) ||
200eac0: 80 88 60 07 btst 7, %g1
200eac4: 12 80 00 0e bne 200eafc <rtems_port_create+0x58>
200eac8: b0 10 20 09 mov 9, %i0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
200eacc: 05 00 80 c6 sethi %hi(0x2031800), %g2
200ead0: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 2031910 <_Thread_Dispatch_disable_level>
200ead4: 82 00 60 01 inc %g1
200ead8: c2 20 a1 10 st %g1, [ %g2 + 0x110 ]
* of free port control blocks.
*/
RTEMS_INLINE_ROUTINE Dual_ported_memory_Control
*_Dual_ported_memory_Allocate ( void )
{
return (Dual_ported_memory_Control *)
200eadc: 21 00 80 c5 sethi %hi(0x2031400), %l0
200eae0: 40 00 13 e0 call 2013a60 <_Objects_Allocate>
200eae4: 90 14 22 84 or %l0, 0x284, %o0 ! 2031684 <_Dual_ported_memory_Information>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_port = _Dual_ported_memory_Allocate();
if ( !the_port ) {
200eae8: 80 a2 20 00 cmp %o0, 0
200eaec: 32 80 00 06 bne,a 200eb04 <rtems_port_create+0x60>
200eaf0: c4 02 20 08 ld [ %o0 + 8 ], %g2
_Thread_Enable_dispatch();
200eaf4: 40 00 17 b5 call 20149c8 <_Thread_Enable_dispatch>
200eaf8: b0 10 20 05 mov 5, %i0
200eafc: 81 c7 e0 08 ret
200eb00: 81 e8 00 00 restore
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200eb04: 82 14 22 84 or %l0, 0x284, %g1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
200eb08: e2 22 20 0c st %l1, [ %o0 + 0xc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200eb0c: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
return RTEMS_TOO_MANY;
}
the_port->internal_base = internal_start;
the_port->external_base = external_start;
the_port->length = length - 1;
200eb10: 82 06 ff ff add %i3, -1, %g1
200eb14: c2 22 20 18 st %g1, [ %o0 + 0x18 ]
&_Dual_ported_memory_Information,
&the_port->Object,
(Objects_Name) name
);
*id = the_port->Object.id;
200eb18: c4 27 00 00 st %g2, [ %i4 ]
200eb1c: 03 00 00 3f sethi %hi(0xfc00), %g1
200eb20: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
200eb24: 84 08 80 01 and %g2, %g1, %g2
200eb28: 85 28 a0 02 sll %g2, 2, %g2
if ( !the_port ) {
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_port->internal_base = internal_start;
200eb2c: f2 22 20 10 st %i1, [ %o0 + 0x10 ]
the_port->external_base = external_start;
200eb30: f4 22 20 14 st %i2, [ %o0 + 0x14 ]
200eb34: d0 20 c0 02 st %o0, [ %g3 + %g2 ]
&the_port->Object,
(Objects_Name) name
);
*id = the_port->Object.id;
_Thread_Enable_dispatch();
200eb38: 40 00 17 a4 call 20149c8 <_Thread_Enable_dispatch>
200eb3c: b0 10 20 00 clr %i0
200eb40: 81 c7 e0 08 ret
200eb44: 81 e8 00 00 restore
return RTEMS_SUCCESSFUL;
200eb48: b0 10 20 09 mov 9, %i0 <== NOT EXECUTED
}
200eb4c: 81 c7 e0 08 ret <== NOT EXECUTED
200eb50: 81 e8 00 00 restore <== NOT EXECUTED
0200ebac <rtems_port_external_to_internal>:
rtems_status_code rtems_port_external_to_internal(
Objects_Id id,
void *external,
void **internal
)
{
200ebac: 9d e3 bf 90 save %sp, -112, %sp
200ebb0: 92 10 00 18 mov %i0, %o1
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !internal )
200ebb4: 80 a6 a0 00 cmp %i2, 0
200ebb8: 02 80 00 16 be 200ec10 <rtems_port_external_to_internal+0x64><== NEVER TAKEN
200ebbc: b0 10 20 09 mov 9, %i0
RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Dual_ported_memory_Control *)
200ebc0: 11 00 80 c5 sethi %hi(0x2031400), %o0
200ebc4: 94 07 bf f4 add %fp, -12, %o2
200ebc8: 40 00 15 12 call 2014010 <_Objects_Get>
200ebcc: 90 12 22 84 or %o0, 0x284, %o0
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
200ebd0: c2 07 bf f4 ld [ %fp + -12 ], %g1
200ebd4: 80 a0 60 00 cmp %g1, 0
200ebd8: 12 80 00 0e bne 200ec10 <rtems_port_external_to_internal+0x64>
200ebdc: b0 10 20 04 mov 4, %i0
RTEMS_INLINE_ROUTINE uint32_t _Addresses_Subtract (
void *left,
void *right
)
{
return ((char *) left - (char *) right);
200ebe0: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( external, the_port->external_base );
if ( ending > the_port->length )
200ebe4: c4 02 20 18 ld [ %o0 + 0x18 ], %g2
200ebe8: 86 26 40 01 sub %i1, %g1, %g3
200ebec: 80 a0 c0 02 cmp %g3, %g2
200ebf0: 28 80 00 04 bleu,a 200ec00 <rtems_port_external_to_internal+0x54>
200ebf4: c2 02 20 10 ld [ %o0 + 0x10 ], %g1
*internal = external;
200ebf8: 10 80 00 04 b 200ec08 <rtems_port_external_to_internal+0x5c>
200ebfc: f2 26 80 00 st %i1, [ %i2 ]
else
*internal = _Addresses_Add_offset( the_port->internal_base,
200ec00: 82 00 40 03 add %g1, %g3, %g1
200ec04: c2 26 80 00 st %g1, [ %i2 ]
ending );
_Thread_Enable_dispatch();
200ec08: 40 00 17 70 call 20149c8 <_Thread_Enable_dispatch>
200ec0c: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200ec10: 81 c7 e0 08 ret
200ec14: 81 e8 00 00 restore
0200ec4c <rtems_port_internal_to_external>:
rtems_status_code rtems_port_internal_to_external(
Objects_Id id,
void *internal,
void **external
)
{
200ec4c: 9d e3 bf 90 save %sp, -112, %sp
200ec50: 92 10 00 18 mov %i0, %o1
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !external )
200ec54: 80 a6 a0 00 cmp %i2, 0
200ec58: 02 80 00 16 be 200ecb0 <rtems_port_internal_to_external+0x64><== NEVER TAKEN
200ec5c: b0 10 20 09 mov 9, %i0
200ec60: 11 00 80 c5 sethi %hi(0x2031400), %o0
200ec64: 94 07 bf f4 add %fp, -12, %o2
200ec68: 40 00 14 ea call 2014010 <_Objects_Get>
200ec6c: 90 12 22 84 or %o0, 0x284, %o0
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
200ec70: c2 07 bf f4 ld [ %fp + -12 ], %g1
200ec74: 80 a0 60 00 cmp %g1, 0
200ec78: 12 80 00 0e bne 200ecb0 <rtems_port_internal_to_external+0x64>
200ec7c: b0 10 20 04 mov 4, %i0
200ec80: c2 02 20 10 ld [ %o0 + 0x10 ], %g1
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( internal, the_port->internal_base );
if ( ending > the_port->length )
200ec84: c4 02 20 18 ld [ %o0 + 0x18 ], %g2
200ec88: 86 26 40 01 sub %i1, %g1, %g3
200ec8c: 80 a0 c0 02 cmp %g3, %g2
200ec90: 28 80 00 04 bleu,a 200eca0 <rtems_port_internal_to_external+0x54>
200ec94: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
*external = internal;
200ec98: 10 80 00 04 b 200eca8 <rtems_port_internal_to_external+0x5c>
200ec9c: f2 26 80 00 st %i1, [ %i2 ]
else
*external = _Addresses_Add_offset( the_port->external_base,
200eca0: 82 00 40 03 add %g1, %g3, %g1
200eca4: c2 26 80 00 st %g1, [ %i2 ]
ending );
_Thread_Enable_dispatch();
200eca8: 40 00 17 48 call 20149c8 <_Thread_Enable_dispatch>
200ecac: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200ecb0: 81 c7 e0 08 ret
200ecb4: 81 e8 00 00 restore
020063d8 <rtems_rate_monotonic_create>:
rtems_status_code rtems_rate_monotonic_create(
rtems_name name,
Objects_Id *id
)
{
20063d8: 9d e3 bf 98 save %sp, -104, %sp
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
20063dc: a4 96 20 00 orcc %i0, 0, %l2
20063e0: 02 80 00 11 be 2006424 <rtems_rate_monotonic_create+0x4c>
20063e4: b0 10 20 03 mov 3, %i0
return RTEMS_INVALID_NAME;
if ( !id )
20063e8: 80 a6 60 00 cmp %i1, 0
20063ec: 02 80 00 0e be 2006424 <rtems_rate_monotonic_create+0x4c> <== NEVER TAKEN
20063f0: b0 10 20 09 mov 9, %i0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
20063f4: 05 00 80 72 sethi %hi(0x201c800), %g2
20063f8: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1 ! 201c840 <_Thread_Dispatch_disable_level>
20063fc: 82 00 60 01 inc %g1
2006400: c2 20 a0 40 st %g1, [ %g2 + 0x40 ]
* This function allocates a period control block from
* the inactive chain of free period control blocks.
*/
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void )
{
return (Rate_monotonic_Control *)
2006404: 23 00 80 71 sethi %hi(0x201c400), %l1
2006408: 40 00 07 f3 call 20083d4 <_Objects_Allocate>
200640c: 90 14 62 cc or %l1, 0x2cc, %o0 ! 201c6cc <_Rate_monotonic_Information>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_period = _Rate_monotonic_Allocate();
if ( !the_period ) {
2006410: a0 92 20 00 orcc %o0, 0, %l0
2006414: 12 80 00 06 bne 200642c <rtems_rate_monotonic_create+0x54>
2006418: 03 00 80 72 sethi %hi(0x201c800), %g1
_Thread_Enable_dispatch();
200641c: 40 00 0b fc call 200940c <_Thread_Enable_dispatch>
2006420: b0 10 20 05 mov 5, %i0
2006424: 81 c7 e0 08 ret
2006428: 81 e8 00 00 restore
return RTEMS_TOO_MANY;
}
the_period->owner = _Thread_Executing;
200642c: c2 00 61 04 ld [ %g1 + 0x104 ], %g1
the_period->state = RATE_MONOTONIC_INACTIVE;
_Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL );
_Rate_monotonic_Reset_statistics( the_period );
2006430: 92 10 20 00 clr %o1
if ( !the_period ) {
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_period->owner = _Thread_Executing;
2006434: c2 24 20 50 st %g1, [ %l0 + 0x50 ]
the_period->state = RATE_MONOTONIC_INACTIVE;
_Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL );
_Rate_monotonic_Reset_statistics( the_period );
2006438: 94 10 20 38 mov 0x38, %o2
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_period->owner = _Thread_Executing;
the_period->state = RATE_MONOTONIC_INACTIVE;
200643c: c0 24 20 38 clr [ %l0 + 0x38 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2006440: c0 24 20 18 clr [ %l0 + 0x18 ]
the_watchdog->routine = routine;
2006444: c0 24 20 2c clr [ %l0 + 0x2c ]
the_watchdog->id = id;
2006448: c0 24 20 30 clr [ %l0 + 0x30 ]
the_watchdog->user_data = user_data;
200644c: c0 24 20 34 clr [ %l0 + 0x34 ]
_Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL );
_Rate_monotonic_Reset_statistics( the_period );
2006450: 40 00 25 6b call 200f9fc <memset>
2006454: 90 04 20 54 add %l0, 0x54, %o0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2006458: c4 04 20 08 ld [ %l0 + 8 ], %g2
200645c: 82 14 62 cc or %l1, 0x2cc, %g1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
2006460: e4 24 20 0c st %l2, [ %l0 + 0xc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2006464: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
2006468: 03 1f ff ff sethi %hi(0x7ffffc00), %g1
200646c: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff <RAM_END+0x7dbfffff>
2006470: c2 24 20 78 st %g1, [ %l0 + 0x78 ]
2006474: c2 24 20 5c st %g1, [ %l0 + 0x5c ]
2006478: c2 24 20 60 st %g1, [ %l0 + 0x60 ]
200647c: c2 24 20 74 st %g1, [ %l0 + 0x74 ]
&_Rate_monotonic_Information,
&the_period->Object,
(Objects_Name) name
);
*id = the_period->Object.id;
2006480: c4 26 40 00 st %g2, [ %i1 ]
2006484: 03 00 00 3f sethi %hi(0xfc00), %g1
2006488: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
200648c: 84 08 80 01 and %g2, %g1, %g2
2006490: 85 28 a0 02 sll %g2, 2, %g2
_Thread_Enable_dispatch();
2006494: b0 10 20 00 clr %i0
2006498: 40 00 0b dd call 200940c <_Thread_Enable_dispatch>
200649c: e0 20 c0 02 st %l0, [ %g3 + %g2 ]
return RTEMS_SUCCESSFUL;
}
20064a0: 81 c7 e0 08 ret
20064a4: 81 e8 00 00 restore
0200d494 <rtems_rate_monotonic_get_statistics>:
rtems_status_code rtems_rate_monotonic_get_statistics(
Objects_Id id,
rtems_rate_monotonic_period_statistics *statistics
)
{
200d494: 9d e3 bf 90 save %sp, -112, %sp
200d498: 92 10 00 18 mov %i0, %o1
Objects_Locations location;
Rate_monotonic_Control *the_period;
if ( !statistics )
200d49c: 80 a6 60 00 cmp %i1, 0
200d4a0: 02 80 00 10 be 200d4e0 <rtems_rate_monotonic_get_statistics+0x4c><== NEVER TAKEN
200d4a4: b0 10 20 09 mov 9, %i0
200d4a8: 11 00 80 71 sethi %hi(0x201c400), %o0
200d4ac: 94 07 bf f4 add %fp, -12, %o2
200d4b0: 7f ff ed 69 call 2008a54 <_Objects_Get>
200d4b4: 90 12 22 cc or %o0, 0x2cc, %o0
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
200d4b8: c2 07 bf f4 ld [ %fp + -12 ], %g1
200d4bc: 80 a0 60 00 cmp %g1, 0
200d4c0: 12 80 00 08 bne 200d4e0 <rtems_rate_monotonic_get_statistics+0x4c>
200d4c4: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
*statistics = the_period->Statistics;
200d4c8: 92 02 20 54 add %o0, 0x54, %o1
200d4cc: 94 10 20 38 mov 0x38, %o2
200d4d0: 40 00 09 12 call 200f918 <memcpy>
200d4d4: 90 10 00 19 mov %i1, %o0
_Thread_Enable_dispatch();
200d4d8: 7f ff ef cd call 200940c <_Thread_Enable_dispatch>
200d4dc: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200d4e0: 81 c7 e0 08 ret
200d4e4: 81 e8 00 00 restore
0200d4e8 <rtems_rate_monotonic_get_status>:
rtems_status_code rtems_rate_monotonic_get_status(
Objects_Id id,
rtems_rate_monotonic_period_status *status
)
{
200d4e8: 9d e3 bf 88 save %sp, -120, %sp
200d4ec: 92 10 00 18 mov %i0, %o1
Objects_Locations location;
Rate_monotonic_Control *the_period;
if ( !status )
200d4f0: 80 a6 60 00 cmp %i1, 0
200d4f4: 02 80 00 28 be 200d594 <rtems_rate_monotonic_get_status+0xac><== NEVER TAKEN
200d4f8: b0 10 20 09 mov 9, %i0
200d4fc: 11 00 80 71 sethi %hi(0x201c400), %o0
200d500: 94 07 bf f4 add %fp, -12, %o2
200d504: 7f ff ed 54 call 2008a54 <_Objects_Get>
200d508: 90 12 22 cc or %o0, 0x2cc, %o0
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
200d50c: c2 07 bf f4 ld [ %fp + -12 ], %g1
200d510: a2 10 00 08 mov %o0, %l1
200d514: 80 a0 60 00 cmp %g1, 0
200d518: 12 80 00 1f bne 200d594 <rtems_rate_monotonic_get_status+0xac>
200d51c: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0);
200d520: c2 02 20 50 ld [ %o0 + 0x50 ], %g1
200d524: 80 a0 60 00 cmp %g1, 0
200d528: 02 80 00 03 be 200d534 <rtems_rate_monotonic_get_status+0x4c><== NEVER TAKEN
200d52c: 84 10 20 00 clr %g2
200d530: c4 00 60 08 ld [ %g1 + 8 ], %g2
status->state = the_period->state;
200d534: c2 04 60 38 ld [ %l1 + 0x38 ], %g1
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0);
200d538: c4 26 40 00 st %g2, [ %i1 ]
status->state = the_period->state;
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
200d53c: 80 a0 60 00 cmp %g1, 0
200d540: 12 80 00 07 bne 200d55c <rtems_rate_monotonic_get_status+0x74>
200d544: c2 26 60 04 st %g1, [ %i1 + 4 ]
#else
status->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;
200d548: c0 26 60 14 clr [ %i1 + 0x14 ]
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;
200d54c: c0 26 60 08 clr [ %i1 + 8 ]
status->since_last_period.tv_nsec = 0;
200d550: c0 26 60 0c clr [ %i1 + 0xc ]
#else
status->since_last_period = 0;
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
status->executed_since_last_period.tv_sec = 0;
200d554: 10 80 00 0e b 200d58c <rtems_rate_monotonic_get_status+0xa4>
200d558: c0 26 60 10 clr [ %i1 + 0x10 ]
* 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 );
200d55c: a0 07 bf ec add %fp, -20, %l0
200d560: 7f ff ea 9a call 2007fc8 <_TOD_Get_uptime>
200d564: 90 10 00 10 mov %l0, %o0
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
_Timespec_Subtract(
200d568: 90 04 60 44 add %l1, 0x44, %o0
200d56c: 92 10 00 10 mov %l0, %o1
200d570: 7f ff f4 42 call 200a678 <_Timespec_Subtract>
200d574: 94 06 60 08 add %i1, 8, %o2
status->since_last_period =
_Watchdog_Ticks_since_boot - the_period->time_at_period;
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
_Timespec_Subtract(
200d578: 11 00 80 72 sethi %hi(0x201c800), %o0
200d57c: 92 10 00 10 mov %l0, %o1
200d580: 94 06 60 10 add %i1, 0x10, %o2
200d584: 7f ff f4 3d call 200a678 <_Timespec_Subtract>
200d588: 90 12 21 0c or %o0, 0x10c, %o0
the_period->owner->cpu_time_used -
the_period->owner_executed_at_period;
#endif
}
_Thread_Enable_dispatch();
200d58c: 7f ff ef a0 call 200940c <_Thread_Enable_dispatch>
200d590: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200d594: 81 c7 e0 08 ret
200d598: 81 e8 00 00 restore
020066b4 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
Objects_Id id,
rtems_interval length
)
{
20066b4: 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 *)
20066b8: 11 00 80 71 sethi %hi(0x201c400), %o0
20066bc: 92 10 00 18 mov %i0, %o1
20066c0: 90 12 22 cc or %o0, 0x2cc, %o0
20066c4: 40 00 08 e4 call 2008a54 <_Objects_Get>
20066c8: 94 07 bf f4 add %fp, -12, %o2
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
20066cc: c2 07 bf f4 ld [ %fp + -12 ], %g1
20066d0: 80 a0 60 00 cmp %g1, 0
20066d4: 12 80 00 64 bne 2006864 <rtems_rate_monotonic_period+0x1b0>
20066d8: a2 10 00 08 mov %o0, %l1
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
20066dc: 27 00 80 72 sethi %hi(0x201c800), %l3
20066e0: c4 02 20 50 ld [ %o0 + 0x50 ], %g2
20066e4: c2 04 e1 04 ld [ %l3 + 0x104 ], %g1
20066e8: 80 a0 80 01 cmp %g2, %g1
20066ec: 02 80 00 06 be 2006704 <rtems_rate_monotonic_period+0x50>
20066f0: 80 a6 60 00 cmp %i1, 0
_Thread_Enable_dispatch();
20066f4: 40 00 0b 46 call 200940c <_Thread_Enable_dispatch>
20066f8: b0 10 20 17 mov 0x17, %i0
20066fc: 81 c7 e0 08 ret
2006700: 81 e8 00 00 restore
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
2006704: 12 80 00 0c bne 2006734 <rtems_rate_monotonic_period+0x80>
2006708: 01 00 00 00 nop
switch ( the_period->state ) {
200670c: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
2006710: 80 a0 60 00 cmp %g1, 0
2006714: 02 80 00 50 be 2006854 <rtems_rate_monotonic_period+0x1a0>
2006718: b0 10 20 0b mov 0xb, %i0
200671c: 82 00 7f fd add %g1, -3, %g1
2006720: 80 a0 60 01 cmp %g1, 1
2006724: 18 80 00 4c bgu 2006854 <rtems_rate_monotonic_period+0x1a0>
2006728: b0 10 20 00 clr %i0
the_period->state = RATE_MONOTONIC_ACTIVE;
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
200672c: 10 80 00 4a b 2006854 <rtems_rate_monotonic_period+0x1a0>
2006730: b0 10 20 06 mov 6, %i0
}
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
2006734: 7f ff f1 48 call 2002c54 <sparc_disable_interrupts>
2006738: 01 00 00 00 nop
200673c: a0 10 00 08 mov %o0, %l0
switch ( the_period->state ) {
2006740: e4 04 60 38 ld [ %l1 + 0x38 ], %l2
2006744: 80 a4 a0 02 cmp %l2, 2
2006748: 02 80 00 1a be 20067b0 <rtems_rate_monotonic_period+0xfc>
200674c: 80 a4 a0 04 cmp %l2, 4
2006750: 02 80 00 34 be 2006820 <rtems_rate_monotonic_period+0x16c>
2006754: 80 a4 a0 00 cmp %l2, 0
2006758: 12 80 00 43 bne 2006864 <rtems_rate_monotonic_period+0x1b0><== NEVER TAKEN
200675c: 01 00 00 00 nop
case RATE_MONOTONIC_INACTIVE: {
_ISR_Enable( level );
2006760: 7f ff f1 41 call 2002c64 <sparc_enable_interrupts>
2006764: 01 00 00 00 nop
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
2006768: 7f ff ff 5e call 20064e0 <_Rate_monotonic_Initiate_statistics>
200676c: 90 10 00 11 mov %l1, %o0
the_period->state = RATE_MONOTONIC_ACTIVE;
2006770: 82 10 20 02 mov 2, %g1
2006774: c2 24 60 38 st %g1, [ %l1 + 0x38 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2006778: 03 00 80 1a sethi %hi(0x2006800), %g1
200677c: 82 10 63 38 or %g1, 0x338, %g1 ! 2006b38 <_Rate_monotonic_Timeout>
the_watchdog->id = id;
2006780: f0 24 60 30 st %i0, [ %l1 + 0x30 ]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2006784: 92 04 60 10 add %l1, 0x10, %o1
2006788: 11 00 80 72 sethi %hi(0x201c800), %o0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
200678c: f2 24 60 1c st %i1, [ %l1 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2006790: 90 12 21 24 or %o0, 0x124, %o0
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2006794: c0 24 60 18 clr [ %l1 + 0x18 ]
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
2006798: c0 24 60 34 clr [ %l1 + 0x34 ]
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
200679c: f2 24 60 4c st %i1, [ %l1 + 0x4c ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
20067a0: c2 24 60 2c st %g1, [ %l1 + 0x2c ]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
20067a4: 40 00 10 73 call 200a970 <_Watchdog_Insert>
20067a8: b0 10 20 00 clr %i0
20067ac: 30 80 00 2a b,a 2006854 <rtems_rate_monotonic_period+0x1a0>
case RATE_MONOTONIC_ACTIVE:
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
20067b0: 7f ff ff 68 call 2006550 <_Rate_monotonic_Update_statistics>
20067b4: 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;
20067b8: 82 10 20 01 mov 1, %g1
the_period->next_length = length;
20067bc: 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;
20067c0: c2 24 60 38 st %g1, [ %l1 + 0x38 ]
the_period->next_length = length;
_ISR_Enable( level );
20067c4: 7f ff f1 28 call 2002c64 <sparc_enable_interrupts>
20067c8: 90 10 00 10 mov %l0, %o0
_Thread_Executing->Wait.id = the_period->Object.id;
20067cc: c2 04 e1 04 ld [ %l3 + 0x104 ], %g1
20067d0: c4 04 60 08 ld [ %l1 + 8 ], %g2
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
20067d4: 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;
20067d8: c4 20 60 20 st %g2, [ %g1 + 0x20 ]
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
20067dc: 40 00 0d 96 call 2009e34 <_Thread_Set_state>
20067e0: 13 00 00 10 sethi %hi(0x4000), %o1
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
20067e4: 7f ff f1 1c call 2002c54 <sparc_disable_interrupts>
20067e8: 01 00 00 00 nop
local_state = the_period->state;
20067ec: e0 04 60 38 ld [ %l1 + 0x38 ], %l0
the_period->state = RATE_MONOTONIC_ACTIVE;
20067f0: e4 24 60 38 st %l2, [ %l1 + 0x38 ]
_ISR_Enable( level );
20067f4: 7f ff f1 1c call 2002c64 <sparc_enable_interrupts>
20067f8: 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 )
20067fc: 80 a4 20 03 cmp %l0, 3
2006800: 12 80 00 04 bne 2006810 <rtems_rate_monotonic_period+0x15c><== ALWAYS TAKEN
2006804: d0 04 e1 04 ld [ %l3 + 0x104 ], %o0
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
2006808: 40 00 09 eb call 2008fb4 <_Thread_Clear_state> <== NOT EXECUTED
200680c: 13 00 00 10 sethi %hi(0x4000), %o1 <== NOT EXECUTED
_Thread_Enable_dispatch();
2006810: 40 00 0a ff call 200940c <_Thread_Enable_dispatch>
2006814: b0 10 20 00 clr %i0
2006818: 81 c7 e0 08 ret
200681c: 81 e8 00 00 restore
case RATE_MONOTONIC_EXPIRED:
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
2006820: 7f ff ff 4c call 2006550 <_Rate_monotonic_Update_statistics>
2006824: 90 10 00 11 mov %l1, %o0
_ISR_Enable( level );
2006828: 7f ff f1 0f call 2002c64 <sparc_enable_interrupts>
200682c: 90 10 00 10 mov %l0, %o0
the_period->state = RATE_MONOTONIC_ACTIVE;
2006830: 82 10 20 02 mov 2, %g1
2006834: 11 00 80 72 sethi %hi(0x201c800), %o0
2006838: 92 04 60 10 add %l1, 0x10, %o1
200683c: 90 12 21 24 or %o0, 0x124, %o0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2006840: f2 24 60 1c st %i1, [ %l1 + 0x1c ]
the_period->next_length = length;
2006844: f2 24 60 4c st %i1, [ %l1 + 0x4c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2006848: 40 00 10 4a call 200a970 <_Watchdog_Insert>
200684c: c2 24 60 38 st %g1, [ %l1 + 0x38 ]
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
2006850: b0 10 20 06 mov 6, %i0
2006854: 40 00 0a ee call 200940c <_Thread_Enable_dispatch>
2006858: 01 00 00 00 nop
200685c: 81 c7 e0 08 ret
2006860: 81 e8 00 00 restore
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2006864: 81 c7 e0 08 ret
2006868: 91 e8 20 04 restore %g0, 4, %o0
0200686c <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
200686c: 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 )
2006870: 80 a6 60 00 cmp %i1, 0
2006874: 02 80 00 7c be 2006a64 <rtems_rate_monotonic_report_statistics_with_plugin+0x1f8><== NEVER TAKEN
2006878: 90 10 00 18 mov %i0, %o0
return;
(*print)( context, "Period information by period\n" );
200687c: 13 00 80 67 sethi %hi(0x2019c00), %o1
2006880: 9f c6 40 00 call %i1
2006884: 92 12 63 d0 or %o1, 0x3d0, %o1 ! 2019fd0 <rtems_status_assoc+0x1b8>
#if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
(*print)( context, "--- CPU times are in seconds ---\n" );
2006888: 90 10 00 18 mov %i0, %o0
200688c: 13 00 80 67 sethi %hi(0x2019c00), %o1
2006890: 9f c6 40 00 call %i1
2006894: 92 12 63 f0 or %o1, 0x3f0, %o1 ! 2019ff0 <rtems_status_assoc+0x1d8>
#endif
#if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS)
(*print)( context, "--- Wall times are in seconds ---\n" );
2006898: 90 10 00 18 mov %i0, %o0
200689c: 13 00 80 68 sethi %hi(0x201a000), %o1
20068a0: 9f c6 40 00 call %i1
20068a4: 92 12 60 18 or %o1, 0x18, %o1 ! 201a018 <rtems_status_assoc+0x200>
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
20068a8: 90 10 00 18 mov %i0, %o0
20068ac: 13 00 80 68 sethi %hi(0x201a000), %o1
20068b0: 9f c6 40 00 call %i1
20068b4: 92 12 60 40 or %o1, 0x40, %o1 ! 201a040 <rtems_status_assoc+0x228>
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
20068b8: 90 10 00 18 mov %i0, %o0
20068bc: 13 00 80 68 sethi %hi(0x201a000), %o1
20068c0: 9f c6 40 00 call %i1
20068c4: 92 12 60 90 or %o1, 0x90, %o1 ! 201a090 <rtems_status_assoc+0x278>
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
20068c8: 03 00 80 68 sethi %hi(0x201a000), %g1
20068cc: b4 10 60 e0 or %g1, 0xe0, %i2 ! 201a0e0 <rtems_status_assoc+0x2c8>
_Timespec_Divide_by_integer(
&the_stats.total_cpu_time,
the_stats.count,
&cpu_average
);
(*print)( context,
20068d0: 03 00 80 68 sethi %hi(0x201a000), %g1
20068d4: b6 10 60 f8 or %g1, 0xf8, %i3 ! 201a0f8 <rtems_status_assoc+0x2e0>
_Timespec_Divide_by_integer(
&the_stats.total_wall_time,
the_stats.count,
&wall_average
);
(*print)( context,
20068d8: 03 00 80 68 sethi %hi(0x201a000), %g1
/*
* 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 ;
20068dc: 05 00 80 71 sethi %hi(0x201c400), %g2
_Timespec_Divide_by_integer(
&the_stats.total_wall_time,
the_stats.count,
&wall_average
);
(*print)( context,
20068e0: b8 10 61 18 or %g1, 0x118, %i4
/*
* 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 ;
20068e4: 84 10 a2 cc or %g2, 0x2cc, %g2
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
20068e8: 03 00 80 68 sethi %hi(0x201a000), %g1
/*
* 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 ;
20068ec: e4 00 a0 08 ld [ %g2 + 8 ], %l2
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
20068f0: ba 10 60 10 or %g1, 0x10, %i5
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 );
20068f4: ae 07 bf d0 add %fp, -48, %l7
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
20068f8: a8 07 bf f0 add %fp, -16, %l4
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
struct timespec cpu_average;
_Timespec_Divide_by_integer(
20068fc: ac 07 bf b0 add %fp, -80, %l6
2006900: a6 07 bf e8 add %fp, -24, %l3
* print Wall time part of statistics
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
struct timespec wall_average;
_Timespec_Divide_by_integer(
2006904: 10 80 00 52 b 2006a4c <rtems_rate_monotonic_report_statistics_with_plugin+0x1e0>
2006908: aa 07 bf c8 add %fp, -56, %l5
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
200690c: 40 00 1a e2 call 200d494 <rtems_rate_monotonic_get_statistics>
2006910: 92 07 bf 98 add %fp, -104, %o1
if ( status != RTEMS_SUCCESSFUL )
2006914: 80 a2 20 00 cmp %o0, 0
2006918: 32 80 00 4d bne,a 2006a4c <rtems_rate_monotonic_report_statistics_with_plugin+0x1e0>
200691c: a4 04 a0 01 inc %l2
continue;
/* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status );
2006920: 92 10 00 17 mov %l7, %o1
2006924: 40 00 1a f1 call 200d4e8 <rtems_rate_monotonic_get_status>
2006928: 90 10 00 12 mov %l2, %o0
continue;
#endif
name[ 0 ] = '\0';
if ( the_status.owner ) {
200692c: d0 07 bf d0 ld [ %fp + -48 ], %o0
2006930: 80 a2 20 00 cmp %o0, 0
2006934: 02 80 00 05 be 2006948 <rtems_rate_monotonic_report_statistics_with_plugin+0xdc><== NEVER TAKEN
2006938: c0 2f bf f0 clrb [ %fp + -16 ]
rtems_object_get_name( the_status.owner, sizeof(name), name );
200693c: 94 10 00 14 mov %l4, %o2
2006940: 40 00 00 ae call 2006bf8 <rtems_object_get_name>
2006944: 92 10 20 05 mov 5, %o1
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
2006948: d8 1f bf 98 ldd [ %fp + -104 ], %o4
200694c: 94 10 00 12 mov %l2, %o2
2006950: 92 10 00 1a mov %i2, %o1
2006954: 96 10 00 14 mov %l4, %o3
2006958: 9f c6 40 00 call %i1
200695c: 90 10 00 18 mov %i0, %o0
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
2006960: c2 07 bf 98 ld [ %fp + -104 ], %g1
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
struct timespec cpu_average;
_Timespec_Divide_by_integer(
2006964: 94 10 00 13 mov %l3, %o2
2006968: 90 10 00 16 mov %l6, %o0
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
200696c: 80 a0 60 00 cmp %g1, 0
2006970: 12 80 00 06 bne 2006988 <rtems_rate_monotonic_report_statistics_with_plugin+0x11c>
2006974: 92 10 00 1d mov %i5, %o1
(*print)( context, "\n" );
2006978: 9f c6 40 00 call %i1
200697c: 90 10 00 18 mov %i0, %o0
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
2006980: 10 80 00 33 b 2006a4c <rtems_rate_monotonic_report_statistics_with_plugin+0x1e0>
2006984: a4 04 a0 01 inc %l2
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
struct timespec cpu_average;
_Timespec_Divide_by_integer(
2006988: 40 00 0e d5 call 200a4dc <_Timespec_Divide_by_integer>
200698c: 92 10 00 01 mov %g1, %o1
&the_stats.total_cpu_time,
the_stats.count,
&cpu_average
);
(*print)( context,
2006990: d0 07 bf a4 ld [ %fp + -92 ], %o0
2006994: 40 00 43 31 call 2017658 <.div>
2006998: 92 10 23 e8 mov 0x3e8, %o1
200699c: a2 10 00 08 mov %o0, %l1
20069a0: d0 07 bf ac ld [ %fp + -84 ], %o0
20069a4: 40 00 43 2d call 2017658 <.div>
20069a8: 92 10 23 e8 mov 0x3e8, %o1
20069ac: c2 07 bf e8 ld [ %fp + -24 ], %g1
20069b0: a0 10 00 08 mov %o0, %l0
20069b4: d0 07 bf ec ld [ %fp + -20 ], %o0
20069b8: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
20069bc: 40 00 43 27 call 2017658 <.div>
20069c0: 92 10 23 e8 mov 0x3e8, %o1
20069c4: d8 07 bf a8 ld [ %fp + -88 ], %o4
20069c8: d4 07 bf a0 ld [ %fp + -96 ], %o2
20069cc: 96 10 00 11 mov %l1, %o3
20069d0: 9a 10 00 10 mov %l0, %o5
20069d4: d0 23 a0 60 st %o0, [ %sp + 0x60 ]
20069d8: 92 10 00 1b mov %i3, %o1
20069dc: 9f c6 40 00 call %i1
20069e0: 90 10 00 18 mov %i0, %o0
* print Wall time part of statistics
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
struct timespec wall_average;
_Timespec_Divide_by_integer(
20069e4: d2 07 bf 98 ld [ %fp + -104 ], %o1
20069e8: 94 10 00 13 mov %l3, %o2
20069ec: 40 00 0e bc call 200a4dc <_Timespec_Divide_by_integer>
20069f0: 90 10 00 15 mov %l5, %o0
&the_stats.total_wall_time,
the_stats.count,
&wall_average
);
(*print)( context,
20069f4: d0 07 bf bc ld [ %fp + -68 ], %o0
20069f8: 40 00 43 18 call 2017658 <.div>
20069fc: 92 10 23 e8 mov 0x3e8, %o1
2006a00: a2 10 00 08 mov %o0, %l1
2006a04: d0 07 bf c4 ld [ %fp + -60 ], %o0
2006a08: 40 00 43 14 call 2017658 <.div>
2006a0c: 92 10 23 e8 mov 0x3e8, %o1
2006a10: c2 07 bf e8 ld [ %fp + -24 ], %g1
2006a14: a0 10 00 08 mov %o0, %l0
2006a18: d0 07 bf ec ld [ %fp + -20 ], %o0
2006a1c: 92 10 23 e8 mov 0x3e8, %o1
2006a20: 40 00 43 0e call 2017658 <.div>
2006a24: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
2006a28: d4 07 bf b8 ld [ %fp + -72 ], %o2
2006a2c: d8 07 bf c0 ld [ %fp + -64 ], %o4
2006a30: d0 23 a0 60 st %o0, [ %sp + 0x60 ]
2006a34: 96 10 00 11 mov %l1, %o3
2006a38: 9a 10 00 10 mov %l0, %o5
2006a3c: 90 10 00 18 mov %i0, %o0
2006a40: 9f c6 40 00 call %i1
2006a44: 92 10 00 1c mov %i4, %o1
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
2006a48: 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 ;
2006a4c: 05 00 80 71 sethi %hi(0x201c400), %g2
2006a50: 84 10 a2 cc or %g2, 0x2cc, %g2 ! 201c6cc <_Rate_monotonic_Information>
2006a54: c2 00 a0 0c ld [ %g2 + 0xc ], %g1
2006a58: 80 a4 80 01 cmp %l2, %g1
2006a5c: 08 bf ff ac bleu 200690c <rtems_rate_monotonic_report_statistics_with_plugin+0xa0>
2006a60: 90 10 00 12 mov %l2, %o0
2006a64: 81 c7 e0 08 ret
2006a68: 81 e8 00 00 restore
0201004c <rtems_region_extend>:
rtems_status_code rtems_region_extend(
Objects_Id id,
void *starting_address,
uint32_t length
)
{
201004c: 9d e3 bf 90 save %sp, -112, %sp
2010050: a0 10 00 18 mov %i0, %l0
Heap_Extend_status heap_status;
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
Region_Control *the_region;
if ( !starting_address )
2010054: 80 a6 60 00 cmp %i1, 0
2010058: 02 80 00 2c be 2010108 <rtems_region_extend+0xbc> <== NEVER TAKEN
201005c: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
2010060: 03 00 80 c6 sethi %hi(0x2031800), %g1
2010064: 40 00 09 1b call 20124d0 <_API_Mutex_Lock>
2010068: d0 00 61 cc ld [ %g1 + 0x1cc ], %o0 ! 20319cc <_RTEMS_Allocator_Mutex>
RTEMS_INLINE_ROUTINE Region_Control *_Region_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
201006c: 92 10 00 10 mov %l0, %o1
2010070: 11 00 80 c5 sethi %hi(0x2031400), %o0
2010074: 94 07 bf f0 add %fp, -16, %o2
2010078: 40 00 0f d4 call 2013fc8 <_Objects_Get_no_protection>
201007c: 90 12 23 44 or %o0, 0x344, %o0
the_region = _Region_Get( id, &location );
switch ( location ) {
2010080: c2 07 bf f0 ld [ %fp + -16 ], %g1
2010084: 80 a0 60 00 cmp %g1, 0
2010088: 02 80 00 05 be 201009c <rtems_region_extend+0x50>
201008c: a0 10 00 08 mov %o0, %l0
2010090: 80 a0 60 01 cmp %g1, 1
2010094: 10 80 00 0f b 20100d0 <rtems_region_extend+0x84>
2010098: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
heap_status = _Heap_Extend(
201009c: 92 10 00 19 mov %i1, %o1
20100a0: 94 10 00 1a mov %i2, %o2
20100a4: 90 02 20 68 add %o0, 0x68, %o0
20100a8: 96 07 bf f4 add %fp, -12, %o3
20100ac: 40 00 0c 0a call 20130d4 <_Heap_Extend>
20100b0: b0 10 20 09 mov 9, %i0
starting_address,
length,
&amount_extended
);
switch ( heap_status ) {
20100b4: 80 a2 20 01 cmp %o0, 1
20100b8: 02 80 00 12 be 2010100 <rtems_region_extend+0xb4>
20100bc: 03 00 80 c6 sethi %hi(0x2031800), %g1
20100c0: 0a 80 00 08 bcs 20100e0 <rtems_region_extend+0x94>
20100c4: c6 07 bf f4 ld [ %fp + -12 ], %g3
20100c8: 80 a2 20 02 cmp %o0, 2
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
break;
20100cc: b0 10 20 18 mov 0x18, %i0
starting_address,
length,
&amount_extended
);
switch ( heap_status ) {
20100d0: 32 80 00 0b bne,a 20100fc <rtems_region_extend+0xb0> <== NEVER TAKEN
20100d4: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
20100d8: 10 80 00 0a b 2010100 <rtems_region_extend+0xb4>
20100dc: 03 00 80 c6 sethi %hi(0x2031800), %g1
&amount_extended
);
switch ( heap_status ) {
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
20100e0: c4 04 20 54 ld [ %l0 + 0x54 ], %g2
the_region->maximum_segment_size += amount_extended;
20100e4: c2 04 20 5c ld [ %l0 + 0x5c ], %g1
&amount_extended
);
switch ( heap_status ) {
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
20100e8: 84 00 80 03 add %g2, %g3, %g2
the_region->maximum_segment_size += amount_extended;
20100ec: 82 00 40 03 add %g1, %g3, %g1
&amount_extended
);
switch ( heap_status ) {
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
20100f0: c4 24 20 54 st %g2, [ %l0 + 0x54 ]
the_region->maximum_segment_size += amount_extended;
20100f4: c2 24 20 5c st %g1, [ %l0 + 0x5c ]
20100f8: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
20100fc: 03 00 80 c6 sethi %hi(0x2031800), %g1
2010100: 40 00 09 0a call 2012528 <_API_Mutex_Unlock>
2010104: d0 00 61 cc ld [ %g1 + 0x1cc ], %o0 ! 20319cc <_RTEMS_Allocator_Mutex>
return return_status;
}
2010108: 81 c7 e0 08 ret
201010c: 81 e8 00 00 restore
0201021c <rtems_region_get_segment>:
uint32_t size,
rtems_option option_set,
rtems_interval timeout,
void **segment
)
{
201021c: 9d e3 bf 90 save %sp, -112, %sp
2010220: a6 10 00 18 mov %i0, %l3
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
register Region_Control *the_region;
void *the_segment;
if ( !segment )
2010224: 80 a7 20 00 cmp %i4, 0
2010228: 02 80 00 41 be 201032c <rtems_region_get_segment+0x110> <== NEVER TAKEN
201022c: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
*segment = NULL;
2010230: c0 27 00 00 clr [ %i4 ]
if ( size == 0 )
2010234: 80 a6 60 00 cmp %i1, 0
2010238: 02 80 00 3d be 201032c <rtems_region_get_segment+0x110> <== NEVER TAKEN
201023c: b0 10 20 08 mov 8, %i0
return RTEMS_INVALID_SIZE;
_RTEMS_Lock_allocator();
2010240: 25 00 80 c6 sethi %hi(0x2031800), %l2
2010244: 40 00 08 a3 call 20124d0 <_API_Mutex_Lock>
2010248: d0 04 a1 cc ld [ %l2 + 0x1cc ], %o0 ! 20319cc <_RTEMS_Allocator_Mutex>
executing = _Thread_Executing;
201024c: 03 00 80 c6 sethi %hi(0x2031800), %g1
2010250: 92 10 00 13 mov %l3, %o1
2010254: e2 00 61 d4 ld [ %g1 + 0x1d4 ], %l1
2010258: 11 00 80 c5 sethi %hi(0x2031400), %o0
201025c: 94 07 bf f4 add %fp, -12, %o2
2010260: 40 00 0f 5a call 2013fc8 <_Objects_Get_no_protection>
2010264: 90 12 23 44 or %o0, 0x344, %o0
the_region = _Region_Get( id, &location );
switch ( location ) {
2010268: c2 07 bf f4 ld [ %fp + -12 ], %g1
201026c: 80 a0 60 00 cmp %g1, 0
2010270: 02 80 00 08 be 2010290 <rtems_region_get_segment+0x74>
2010274: a0 10 00 08 mov %o0, %l0
2010278: 82 18 60 01 xor %g1, 1, %g1
201027c: 80 a0 00 01 cmp %g0, %g1
2010280: 82 40 3f ff addx %g0, -1, %g1
2010284: b0 08 7f eb and %g1, -21, %i0
2010288: 10 80 00 2b b 2010334 <rtems_region_get_segment+0x118>
201028c: b0 06 20 19 add %i0, 0x19, %i0
case OBJECTS_LOCAL:
if ( size > the_region->maximum_segment_size )
2010290: c2 02 20 5c ld [ %o0 + 0x5c ], %g1
2010294: 80 a6 40 01 cmp %i1, %g1
2010298: 18 80 00 27 bgu 2010334 <rtems_region_get_segment+0x118>
201029c: b0 10 20 08 mov 8, %i0
RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment (
Region_Control *the_region,
uint32_t size
)
{
return _Heap_Allocate( &the_region->Memory, size );
20102a0: 90 02 20 68 add %o0, 0x68, %o0
20102a4: 40 00 0b 65 call 2013038 <_Heap_Allocate>
20102a8: 92 10 00 19 mov %i1, %o1
the_segment = _Region_Allocate_segment( the_region, size );
_Region_Debug_Walk( the_region, 2 );
if ( the_segment ) {
20102ac: 80 a2 20 00 cmp %o0, 0
20102b0: 02 80 00 07 be 20102cc <rtems_region_get_segment+0xb0>
20102b4: b0 10 20 00 clr %i0
the_region->number_of_used_blocks += 1;
20102b8: c2 04 20 64 ld [ %l0 + 0x64 ], %g1
*segment = the_segment;
20102bc: d0 27 00 00 st %o0, [ %i4 ]
the_segment = _Region_Allocate_segment( the_region, size );
_Region_Debug_Walk( the_region, 2 );
if ( the_segment ) {
the_region->number_of_used_blocks += 1;
20102c0: 82 00 60 01 inc %g1
20102c4: 10 80 00 1c b 2010334 <rtems_region_get_segment+0x118>
20102c8: c2 24 20 64 st %g1, [ %l0 + 0x64 ]
*segment = the_segment;
return_status = RTEMS_SUCCESSFUL;
}
else if ( _Options_Is_no_wait( option_set ) ) {
20102cc: 80 8e a0 01 btst 1, %i2
20102d0: 12 80 00 19 bne 2010334 <rtems_region_get_segment+0x118>
20102d4: b0 10 20 0d mov 0xd, %i0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
20102d8: 05 00 80 c6 sethi %hi(0x2031800), %g2
20102dc: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 2031910 <_Thread_Dispatch_disable_level>
20102e0: 82 00 60 01 inc %g1
20102e4: c2 20 a1 10 st %g1, [ %g2 + 0x110 ]
* Switch from using the memory allocation mutex to using a
* dispatching disabled critical section. We have to do this
* because this thread is going to block.
*/
_Thread_Disable_dispatch();
_RTEMS_Unlock_allocator();
20102e8: 40 00 08 90 call 2012528 <_API_Mutex_Unlock>
20102ec: d0 04 a1 cc ld [ %l2 + 0x1cc ], %o0
executing->Wait.queue = &the_region->Wait_queue;
20102f0: 82 04 20 10 add %l0, 0x10, %g1
executing->Wait.count = size;
executing->Wait.return_argument = segment;
_Thread_queue_Enter_critical_section( &the_region->Wait_queue );
_Thread_queue_Enqueue( &the_region->Wait_queue, timeout );
20102f4: 92 10 00 1b mov %i3, %o1
20102f8: 90 10 00 01 mov %g1, %o0
* because this thread is going to block.
*/
_Thread_Disable_dispatch();
_RTEMS_Unlock_allocator();
executing->Wait.queue = &the_region->Wait_queue;
20102fc: c2 24 60 44 st %g1, [ %l1 + 0x44 ]
executing->Wait.count = size;
executing->Wait.return_argument = segment;
_Thread_queue_Enter_critical_section( &the_region->Wait_queue );
_Thread_queue_Enqueue( &the_region->Wait_queue, timeout );
2010300: 15 00 80 54 sethi %hi(0x2015000), %o2
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
2010304: 82 10 20 01 mov 1, %g1
2010308: 94 12 a2 f0 or %o2, 0x2f0, %o2
201030c: c2 24 20 40 st %g1, [ %l0 + 0x40 ]
*/
_Thread_Disable_dispatch();
_RTEMS_Unlock_allocator();
executing->Wait.queue = &the_region->Wait_queue;
executing->Wait.id = id;
2010310: e6 24 60 20 st %l3, [ %l1 + 0x20 ]
executing->Wait.count = size;
2010314: f2 24 60 24 st %i1, [ %l1 + 0x24 ]
executing->Wait.return_argument = segment;
_Thread_queue_Enter_critical_section( &the_region->Wait_queue );
_Thread_queue_Enqueue( &the_region->Wait_queue, timeout );
2010318: 40 00 13 03 call 2014f24 <_Thread_queue_Enqueue_with_handler>
201031c: f8 24 60 28 st %i4, [ %l1 + 0x28 ]
_Thread_Enable_dispatch();
2010320: 40 00 11 aa call 20149c8 <_Thread_Enable_dispatch>
2010324: 01 00 00 00 nop
return (rtems_status_code) executing->Wait.return_code;
2010328: f0 04 60 34 ld [ %l1 + 0x34 ], %i0
201032c: 81 c7 e0 08 ret
2010330: 81 e8 00 00 restore
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
2010334: 03 00 80 c6 sethi %hi(0x2031800), %g1
2010338: 40 00 08 7c call 2012528 <_API_Mutex_Unlock>
201033c: d0 00 61 cc ld [ %g1 + 0x1cc ], %o0 ! 20319cc <_RTEMS_Allocator_Mutex>
return return_status;
}
2010340: 81 c7 e0 08 ret
2010344: 81 e8 00 00 restore
02010414 <rtems_region_resize_segment>:
Objects_Id id,
void *segment,
size_t size,
size_t *old_size
)
{
2010414: 9d e3 bf 88 save %sp, -120, %sp
uint32_t osize;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
2010418: 80 a6 e0 00 cmp %i3, 0
201041c: 02 80 00 32 be 20104e4 <rtems_region_resize_segment+0xd0>
2010420: 21 00 80 c6 sethi %hi(0x2031800), %l0
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
2010424: 40 00 08 2b call 20124d0 <_API_Mutex_Lock>
2010428: d0 04 21 cc ld [ %l0 + 0x1cc ], %o0 ! 20319cc <_RTEMS_Allocator_Mutex>
201042c: 92 10 00 18 mov %i0, %o1
2010430: 11 00 80 c5 sethi %hi(0x2031400), %o0
2010434: 94 07 bf f0 add %fp, -16, %o2
2010438: 40 00 0e e4 call 2013fc8 <_Objects_Get_no_protection>
201043c: 90 12 23 44 or %o0, 0x344, %o0
the_region = _Region_Get( id, &location );
switch ( location ) {
2010440: c2 07 bf f0 ld [ %fp + -16 ], %g1
2010444: 80 a0 60 00 cmp %g1, 0
2010448: 02 80 00 0b be 2010474 <rtems_region_resize_segment+0x60>
201044c: b0 10 00 08 mov %o0, %i0
2010450: 82 18 60 01 xor %g1, 1, %g1
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
2010454: d0 04 21 cc ld [ %l0 + 0x1cc ], %o0
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
2010458: 80 a0 00 01 cmp %g0, %g1
201045c: 82 40 3f ff addx %g0, -1, %g1
2010460: b0 08 7f eb and %g1, -21, %i0
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
2010464: 40 00 08 31 call 2012528 <_API_Mutex_Unlock>
2010468: b0 06 20 19 add %i0, 0x19, %i0
201046c: 81 c7 e0 08 ret
2010470: 81 e8 00 00 restore
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 7 );
status = _Heap_Resize_block(
2010474: 94 10 00 1a mov %i2, %o2
2010478: 92 10 00 19 mov %i1, %o1
201047c: 90 02 20 68 add %o0, 0x68, %o0
2010480: 96 07 bf ec add %fp, -20, %o3
2010484: 40 00 0c 94 call 20136d4 <_Heap_Resize_block>
2010488: 98 07 bf f4 add %fp, -12, %o4
segment,
(uint32_t) size,
&osize,
&avail_size
);
*old_size = (uint32_t) osize;
201048c: c2 07 bf ec ld [ %fp + -20 ], %g1
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 )
2010490: b4 92 20 00 orcc %o0, 0, %i2
2010494: 12 80 00 0b bne 20104c0 <rtems_region_resize_segment+0xac><== ALWAYS TAKEN
2010498: c2 26 c0 00 st %g1, [ %i3 ]
201049c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED
20104a0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20104a4: 02 80 00 08 be 20104c4 <rtems_region_resize_segment+0xb0> <== NOT EXECUTED
20104a8: 03 00 80 c6 sethi %hi(0x2031800), %g1 <== NOT EXECUTED
_Region_Process_queue( the_region ); /* unlocks allocator */
20104ac: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20104b0: 40 00 21 f4 call 2018c80 <_Region_Process_queue> <== NOT EXECUTED
20104b4: b0 10 20 00 clr %i0 <== NOT EXECUTED
20104b8: 81 c7 e0 08 ret <== NOT EXECUTED
20104bc: 81 e8 00 00 restore <== NOT EXECUTED
else
_RTEMS_Unlock_allocator();
20104c0: 03 00 80 c6 sethi %hi(0x2031800), %g1
20104c4: d0 00 61 cc ld [ %g1 + 0x1cc ], %o0 ! 20319cc <_RTEMS_Allocator_Mutex>
20104c8: 40 00 08 18 call 2012528 <_API_Mutex_Unlock>
20104cc: b0 10 20 00 clr %i0
return
20104d0: 80 a6 a0 00 cmp %i2, 0
20104d4: 02 bf ff e6 be 201046c <rtems_region_resize_segment+0x58> <== NEVER TAKEN
20104d8: 80 a6 a0 01 cmp %i2, 1
20104dc: 02 bf ff e4 be 201046c <rtems_region_resize_segment+0x58> <== NEVER TAKEN
20104e0: b0 10 20 0d mov 0xd, %i0
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
return return_status;
20104e4: b0 10 20 09 mov 9, %i0
}
20104e8: 81 c7 e0 08 ret
20104ec: 81 e8 00 00 restore
02005224 <rtems_semaphore_create>:
uint32_t count,
rtems_attribute attribute_set,
rtems_task_priority priority_ceiling,
rtems_id *id
)
{
2005224: 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 ) )
2005228: a4 96 20 00 orcc %i0, 0, %l2
200522c: 02 80 00 23 be 20052b8 <rtems_semaphore_create+0x94>
2005230: b0 10 20 03 mov 3, %i0
return RTEMS_INVALID_NAME;
if ( !id )
2005234: 80 a7 20 00 cmp %i4, 0
2005238: 02 80 00 20 be 20052b8 <rtems_semaphore_create+0x94> <== NEVER TAKEN
200523c: b0 10 20 09 mov 9, %i0
return RTEMS_NOT_DEFINED;
} else
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
2005240: 84 8e a0 c0 andcc %i2, 0xc0, %g2
2005244: 02 80 00 0d be 2005278 <rtems_semaphore_create+0x54>
2005248: a2 8e a0 30 andcc %i2, 0x30, %l1
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore(
rtems_attribute attribute_set
)
{
return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE);
200524c: 82 0e a0 30 and %i2, 0x30, %g1
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) ||
2005250: 80 a0 60 10 cmp %g1, 0x10
2005254: 02 80 00 04 be 2005264 <rtems_semaphore_create+0x40>
2005258: 80 a0 60 20 cmp %g1, 0x20
200525c: 32 80 00 17 bne,a 20052b8 <rtems_semaphore_create+0x94>
2005260: b0 10 20 0b mov 0xb, %i0
2005264: 80 8e a0 04 btst 4, %i2
2005268: 02 80 00 64 be 20053f8 <rtems_semaphore_create+0x1d4>
200526c: 80 a0 a0 c0 cmp %g2, 0xc0
_Attributes_Is_priority( attribute_set ) ) )
return RTEMS_NOT_DEFINED;
}
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
2005270: 02 80 00 62 be 20053f8 <rtems_semaphore_create+0x1d4>
2005274: a2 8e a0 30 andcc %i2, 0x30, %l1
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) )
2005278: 02 80 00 04 be 2005288 <rtems_semaphore_create+0x64>
200527c: 80 a6 60 01 cmp %i1, 1
2005280: 18 80 00 0e bgu 20052b8 <rtems_semaphore_create+0x94>
2005284: b0 10 20 0a mov 0xa, %i0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
2005288: 03 00 80 5e sethi %hi(0x2017800), %g1
200528c: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 ! 2017820 <_Thread_Dispatch_disable_level>
2005290: 84 00 a0 01 inc %g2
2005294: c4 20 60 20 st %g2, [ %g1 + 0x20 ]
* This function allocates a semaphore control block from
* the inactive chain of free semaphore control blocks.
*/
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void )
{
return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information );
2005298: 11 00 80 5d sethi %hi(0x2017400), %o0
200529c: 40 00 05 57 call 20067f8 <_Objects_Allocate>
20052a0: 90 12 22 e4 or %o0, 0x2e4, %o0 ! 20176e4 <_Semaphore_Information>
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
20052a4: a0 92 20 00 orcc %o0, 0, %l0
20052a8: 12 80 00 06 bne 20052c0 <rtems_semaphore_create+0x9c>
20052ac: 80 a4 60 00 cmp %l1, 0
_Thread_Enable_dispatch();
20052b0: 40 00 09 1a call 2007718 <_Thread_Enable_dispatch>
20052b4: b0 10 20 05 mov 5, %i0
20052b8: 81 c7 e0 08 ret
20052bc: 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 ) ) {
20052c0: 02 80 00 33 be 200538c <rtems_semaphore_create+0x168>
20052c4: f4 24 20 10 st %i2, [ %l0 + 0x10 ]
CORE_mutex_Status mutex_status;
if ( _Attributes_Is_inherit_priority( attribute_set ) )
20052c8: 80 8e a0 40 btst 0x40, %i2
20052cc: 12 80 00 06 bne 20052e4 <rtems_semaphore_create+0xc0>
20052d0: 82 10 20 02 mov 2, %g1
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
else if ( _Attributes_Is_priority_ceiling( attribute_set ) )
20052d4: 80 8e a0 80 btst 0x80, %i2
20052d8: 02 80 00 05 be 20052ec <rtems_semaphore_create+0xc8>
20052dc: 80 8e a0 04 btst 4, %i2
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
20052e0: 82 10 20 03 mov 3, %g1
20052e4: 10 80 00 05 b 20052f8 <rtems_semaphore_create+0xd4>
20052e8: c2 27 bf e8 st %g1, [ %fp + -24 ]
else if ( _Attributes_Is_priority( attribute_set ) )
20052ec: 12 bf ff fe bne 20052e4 <rtems_semaphore_create+0xc0>
20052f0: 82 10 20 01 mov 1, %g1
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
else
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
20052f4: c0 27 bf e8 clr [ %fp + -24 ]
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
20052f8: 80 a4 60 10 cmp %l1, 0x10
20052fc: 12 80 00 0f bne 2005338 <rtems_semaphore_create+0x114>
2005300: 82 10 20 02 mov 2, %g1
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
switch ( the_mutex_attributes.discipline ) {
2005304: c2 07 bf e8 ld [ %fp + -24 ], %g1
2005308: 80 a0 60 01 cmp %g1, 1
200530c: 08 80 00 07 bleu 2005328 <rtems_semaphore_create+0x104>
2005310: c0 27 bf e0 clr [ %fp + -32 ]
2005314: 80 a0 60 03 cmp %g1, 3
2005318: 38 80 00 0b bgu,a 2005344 <rtems_semaphore_create+0x120> <== NEVER TAKEN
200531c: 82 1e 60 01 xor %i1, 1, %g1 <== NOT EXECUTED
case CORE_MUTEX_DISCIPLINES_PRIORITY:
the_mutex_attributes.only_owner_release = FALSE;
break;
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
the_mutex_attributes.only_owner_release = TRUE;
2005320: 10 80 00 04 b 2005330 <rtems_semaphore_create+0x10c>
2005324: 82 10 20 01 mov 1, %g1
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
switch ( the_mutex_attributes.discipline ) {
case CORE_MUTEX_DISCIPLINES_FIFO:
case CORE_MUTEX_DISCIPLINES_PRIORITY:
the_mutex_attributes.only_owner_release = FALSE;
2005328: 10 80 00 06 b 2005340 <rtems_semaphore_create+0x11c>
200532c: c0 2f bf e4 clrb [ %fp + -28 ]
break;
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
the_mutex_attributes.only_owner_release = TRUE;
2005330: 10 80 00 04 b 2005340 <rtems_semaphore_create+0x11c>
2005334: c2 2f bf e4 stb %g1, [ %fp + -28 ]
break;
}
} else {
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
the_mutex_attributes.only_owner_release = FALSE;
2005338: c0 2f bf e4 clrb [ %fp + -28 ]
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
the_mutex_attributes.only_owner_release = TRUE;
break;
}
} else {
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
200533c: c2 27 bf e0 st %g1, [ %fp + -32 ]
the_mutex_attributes.only_owner_release = FALSE;
}
the_mutex_attributes.priority_ceiling = priority_ceiling;
mutex_status = _CORE_mutex_Initialize(
2005340: 82 1e 60 01 xor %i1, 1, %g1
2005344: 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;
2005348: f6 27 bf ec st %i3, [ %fp + -20 ]
mutex_status = _CORE_mutex_Initialize(
200534c: 94 60 3f ff subx %g0, -1, %o2
2005350: 90 04 20 14 add %l0, 0x14, %o0
2005354: 40 00 03 2a call 2005ffc <_CORE_mutex_Initialize>
2005358: 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 ) {
200535c: 80 a2 20 06 cmp %o0, 6
2005360: 32 80 00 19 bne,a 20053c4 <rtems_semaphore_create+0x1a0> <== ALWAYS TAKEN
2005364: c4 04 20 08 ld [ %l0 + 8 ], %g2
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
2005368: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
200536c: 11 00 80 5d sethi %hi(0x2017400), %o0 <== NOT EXECUTED
2005370: 90 12 22 e4 or %o0, 0x2e4, %o0 ! 20176e4 <_Semaphore_Information><== NOT EXECUTED
2005374: 40 00 06 0e call 2006bac <_Objects_Free> <== NOT EXECUTED
2005378: b0 10 20 13 mov 0x13, %i0 <== NOT EXECUTED
_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
200537c: 40 00 08 e7 call 2007718 <_Thread_Enable_dispatch> <== NOT EXECUTED
2005380: 01 00 00 00 nop <== NOT EXECUTED
2005384: 81 c7 e0 08 ret <== NOT EXECUTED
2005388: 81 e8 00 00 restore <== NOT EXECUTED
return RTEMS_INVALID_PRIORITY;
}
} else {
if ( _Attributes_Is_priority( attribute_set ) )
200538c: 80 8e a0 04 btst 4, %i2
2005390: 22 80 00 04 be,a 20053a0 <rtems_semaphore_create+0x17c>
2005394: c0 27 bf f4 clr [ %fp + -12 ]
the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
2005398: 82 10 20 01 mov 1, %g1
200539c: c2 27 bf f4 st %g1, [ %fp + -12 ]
/*
* This effectively disables limit checking.
*/
the_semaphore_attributes.maximum_count = 0xFFFFFFFF;
20053a0: 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;
20053a4: c0 27 bf e0 clr [ %fp + -32 ]
the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM;
20053a8: c0 27 bf ec clr [ %fp + -20 ]
_CORE_semaphore_Initialize(
20053ac: 94 10 00 19 mov %i1, %o2
/*
* This effectively disables limit checking.
*/
the_semaphore_attributes.maximum_count = 0xFFFFFFFF;
20053b0: 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(
20053b4: 90 04 20 14 add %l0, 0x14, %o0
20053b8: 40 00 03 e8 call 2006358 <_CORE_semaphore_Initialize>
20053bc: 92 07 bf f0 add %fp, -16, %o1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
20053c0: c4 04 20 08 ld [ %l0 + 8 ], %g2
20053c4: 03 00 80 5d sethi %hi(0x2017400), %g1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
20053c8: e4 24 20 0c st %l2, [ %l0 + 0xc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
20053cc: c6 00 63 00 ld [ %g1 + 0x300 ], %g3
&_Semaphore_Information,
&the_semaphore->Object,
(Objects_Name) name
);
*id = the_semaphore->Object.id;
20053d0: c4 27 00 00 st %g2, [ %i4 ]
20053d4: 03 00 00 3f sethi %hi(0xfc00), %g1
20053d8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
20053dc: 84 08 80 01 and %g2, %g1, %g2
20053e0: 85 28 a0 02 sll %g2, 2, %g2
the_semaphore->Object.id,
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
20053e4: b0 10 20 00 clr %i0
20053e8: 40 00 08 cc call 2007718 <_Thread_Enable_dispatch>
20053ec: e0 20 c0 02 st %l0, [ %g3 + %g2 ]
20053f0: 81 c7 e0 08 ret
20053f4: 81 e8 00 00 restore
return RTEMS_SUCCESSFUL;
20053f8: b0 10 20 0b mov 0xb, %i0
}
20053fc: 81 c7 e0 08 ret
2005400: 81 e8 00 00 restore
02010824 <rtems_semaphore_flush>:
#endif
rtems_status_code rtems_semaphore_flush(
rtems_id id
)
{
2010824: 9d e3 bf 90 save %sp, -112, %sp
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
2010828: 11 00 80 c5 sethi %hi(0x2031400), %o0
201082c: 92 10 00 18 mov %i0, %o1
2010830: 90 12 23 84 or %o0, 0x384, %o0
2010834: 40 00 0d f7 call 2014010 <_Objects_Get>
2010838: 94 07 bf f4 add %fp, -12, %o2
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
201083c: c2 07 bf f4 ld [ %fp + -12 ], %g1
2010840: 80 a0 60 00 cmp %g1, 0
2010844: 12 80 00 0f bne 2010880 <rtems_semaphore_flush+0x5c>
2010848: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
201084c: c2 02 20 10 ld [ %o0 + 0x10 ], %g1
2010850: 80 88 60 30 btst 0x30, %g1
2010854: 02 80 00 06 be 201086c <rtems_semaphore_flush+0x48> <== NEVER TAKEN
2010858: 90 02 20 14 add %o0, 0x14, %o0
_CORE_mutex_Flush(
201085c: 92 10 20 00 clr %o1
2010860: 40 00 08 73 call 2012a2c <_CORE_mutex_Flush>
2010864: 94 10 20 01 mov 1, %o2
2010868: 30 80 00 04 b,a 2010878 <rtems_semaphore_flush+0x54>
&the_semaphore->Core_control.mutex,
SEND_OBJECT_WAS_DELETED,
CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT
);
} else {
_CORE_semaphore_Flush(
201086c: 92 10 20 00 clr %o1 <== NOT EXECUTED
2010870: 40 00 09 46 call 2012d88 <_CORE_semaphore_Flush> <== NOT EXECUTED
2010874: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
&the_semaphore->Core_control.semaphore,
SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
);
}
_Thread_Enable_dispatch();
2010878: 40 00 10 54 call 20149c8 <_Thread_Enable_dispatch>
201087c: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2010880: 81 c7 e0 08 ret
2010884: 81 e8 00 00 restore
02014cdc <rtems_shutdown_executive>:
*/
void rtems_shutdown_executive(
uint32_t result
)
{
2014cdc: 9d e3 bf 10 save %sp, -240, %sp
if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) {
2014ce0: 05 00 80 5e sethi %hi(0x2017800), %g2
2014ce4: c2 00 a1 c4 ld [ %g2 + 0x1c4 ], %g1 ! 20179c4 <_System_state_Current>
2014ce8: 80 a0 60 04 cmp %g1, 4
2014cec: 02 80 00 07 be 2014d08 <rtems_shutdown_executive+0x2c> <== NEVER TAKEN
2014cf0: 82 10 20 04 mov 4, %g1
Context_Control *context_p = &context_area;
if ( _System_state_Is_up(_System_state_Get ()) )
context_p = &_Thread_Executing->Registers;
_Context_Switch( context_p, &_Thread_BSP_context );
2014cf4: 13 00 80 5d sethi %hi(0x2017400), %o1
2014cf8: c2 20 a1 c4 st %g1, [ %g2 + 0x1c4 ]
2014cfc: 92 12 63 98 or %o1, 0x398, %o1
2014d00: 7f ff d0 1f call 2008d7c <_CPU_Context_switch>
2014d04: 90 07 bf 70 add %fp, -144, %o0
2014d08: 81 c7 e0 08 ret <== NOT EXECUTED
2014d0c: 81 e8 00 00 restore <== NOT EXECUTED
02010a88 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
Objects_Id id,
rtems_signal_set signal_set
)
{
2010a88: 9d e3 bf 90 save %sp, -112, %sp
2010a8c: 90 10 00 18 mov %i0, %o0
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
2010a90: 80 a6 60 00 cmp %i1, 0
2010a94: 02 80 00 2f be 2010b50 <rtems_signal_send+0xc8> <== NEVER TAKEN
2010a98: b0 10 20 0a mov 0xa, %i0
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
2010a9c: 40 00 0f d8 call 20149fc <_Thread_Get>
2010aa0: 92 07 bf f4 add %fp, -12, %o1
switch ( location ) {
2010aa4: c2 07 bf f4 ld [ %fp + -12 ], %g1
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
2010aa8: a0 10 00 08 mov %o0, %l0
switch ( location ) {
2010aac: 80 a0 60 00 cmp %g1, 0
2010ab0: 12 80 00 28 bne 2010b50 <rtems_signal_send+0xc8>
2010ab4: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
2010ab8: f0 02 21 68 ld [ %o0 + 0x168 ], %i0
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
2010abc: c2 06 20 0c ld [ %i0 + 0xc ], %g1
2010ac0: 80 a0 60 00 cmp %g1, 0
2010ac4: 02 80 00 25 be 2010b58 <rtems_signal_send+0xd0>
2010ac8: 01 00 00 00 nop
if ( asr->is_enabled ) {
2010acc: c2 0e 20 08 ldub [ %i0 + 8 ], %g1
2010ad0: 80 a0 60 00 cmp %g1, 0
2010ad4: 02 80 00 16 be 2010b2c <rtems_signal_send+0xa4>
2010ad8: 01 00 00 00 nop
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
2010adc: 7f ff ea 92 call 200b524 <sparc_disable_interrupts>
2010ae0: 01 00 00 00 nop
*signal_set |= signals;
2010ae4: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
2010ae8: 82 10 40 19 or %g1, %i1, %g1
2010aec: c2 26 20 14 st %g1, [ %i0 + 0x14 ]
_ISR_Enable( _level );
2010af0: 7f ff ea 91 call 200b534 <sparc_enable_interrupts>
2010af4: 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 ) )
2010af8: 03 00 80 c6 sethi %hi(0x2031800), %g1
2010afc: c2 00 61 b0 ld [ %g1 + 0x1b0 ], %g1 ! 20319b0 <_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;
2010b00: 84 10 20 01 mov 1, %g2
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
2010b04: 80 a0 60 00 cmp %g1, 0
2010b08: 02 80 00 10 be 2010b48 <rtems_signal_send+0xc0>
2010b0c: c4 2c 20 75 stb %g2, [ %l0 + 0x75 ]
2010b10: 03 00 80 c6 sethi %hi(0x2031800), %g1
2010b14: c2 00 61 d4 ld [ %g1 + 0x1d4 ], %g1 ! 20319d4 <_Thread_Executing>
2010b18: 80 a4 00 01 cmp %l0, %g1
2010b1c: 12 80 00 0b bne 2010b48 <rtems_signal_send+0xc0> <== NEVER TAKEN
2010b20: 03 00 80 c6 sethi %hi(0x2031800), %g1
_ISR_Signals_to_thread_executing = TRUE;
2010b24: 10 80 00 09 b 2010b48 <rtems_signal_send+0xc0>
2010b28: c4 28 62 68 stb %g2, [ %g1 + 0x268 ] ! 2031a68 <_ISR_Signals_to_thread_executing>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
2010b2c: 7f ff ea 7e call 200b524 <sparc_disable_interrupts>
2010b30: 01 00 00 00 nop
*signal_set |= signals;
2010b34: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
2010b38: 82 10 40 19 or %g1, %i1, %g1
2010b3c: c2 26 20 18 st %g1, [ %i0 + 0x18 ]
_ISR_Enable( _level );
2010b40: 7f ff ea 7d call 200b534 <sparc_enable_interrupts>
2010b44: 01 00 00 00 nop
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
2010b48: 40 00 0f a0 call 20149c8 <_Thread_Enable_dispatch>
2010b4c: b0 10 20 00 clr %i0 ! 0 <PROM_START>
2010b50: 81 c7 e0 08 ret
2010b54: 81 e8 00 00 restore
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
2010b58: 40 00 0f 9c call 20149c8 <_Thread_Enable_dispatch>
2010b5c: b0 10 20 0b mov 0xb, %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2010b60: 81 c7 e0 08 ret
2010b64: 81 e8 00 00 restore
02002678 <rtems_stack_checker_begin_extension>:
* rtems_stack_checker_Begin_extension
*/
void rtems_stack_checker_begin_extension(
Thread_Control *the_thread
)
{
2002678: 9d e3 bf 98 save %sp, -104, %sp
Stack_check_Control *the_pattern;
if ( the_thread->Object.id == 0 ) /* skip system tasks */
200267c: c2 06 20 08 ld [ %i0 + 8 ], %g1
2002680: 80 a0 60 00 cmp %g1, 0
2002684: 02 80 00 07 be 20026a0 <rtems_stack_checker_begin_extension+0x28><== NEVER TAKEN
2002688: 13 00 80 6e sethi %hi(0x201b800), %o1
return;
the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack);
*the_pattern = Stack_check_Pattern;
200268c: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0
2002690: 90 02 20 08 add %o0, 8, %o0
2002694: 92 12 62 60 or %o1, 0x260, %o1
2002698: 40 00 32 47 call 200efb4 <memcpy>
200269c: 94 10 20 10 mov 0x10, %o2
20026a0: 81 c7 e0 08 ret
20026a4: 81 e8 00 00 restore
02002ab8 <rtems_stack_checker_create_extension>:
*/
bool rtems_stack_checker_create_extension(
Thread_Control *running,
Thread_Control *the_thread
)
{
2002ab8: 9d e3 bf 98 save %sp, -104, %sp
Stack_check_Initialize();
2002abc: 7f ff ff d6 call 2002a14 <Stack_check_Initialize>
2002ac0: 01 00 00 00 nop
if (the_thread)
2002ac4: 80 a6 60 00 cmp %i1, 0
2002ac8: 02 80 00 06 be 2002ae0 <rtems_stack_checker_create_extension+0x28><== NEVER TAKEN
2002acc: 01 00 00 00 nop
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
2002ad0: d4 06 60 c4 ld [ %i1 + 0xc4 ], %o2
2002ad4: d0 06 60 c8 ld [ %i1 + 0xc8 ], %o0
2002ad8: 40 00 31 70 call 200f098 <memset>
2002adc: 92 10 20 a5 mov 0xa5, %o1
return true;
}
2002ae0: 81 c7 e0 08 ret
2002ae4: 91 e8 20 01 restore %g0, 1, %o0
02002914 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
2002914: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
2002918: 03 00 80 6f sethi %hi(0x201bc00), %g1 <== NOT EXECUTED
200291c: c2 00 61 14 ld [ %g1 + 0x114 ], %g1 ! 201bd14 <_Thread_Executing><== NOT EXECUTED
)
{
void *sp = __builtin_frame_address(0);
#if defined(__GNUC__)
if ( sp < the_stack->area ) {
2002920: d0 00 60 c8 ld [ %g1 + 0xc8 ], %o0 <== NOT EXECUTED
2002924: 80 a7 80 08 cmp %fp, %o0 <== NOT EXECUTED
2002928: 0a 80 00 07 bcs 2002944 <rtems_stack_checker_is_blown+0x30><== NOT EXECUTED
200292c: b0 10 20 00 clr %i0 <== NOT EXECUTED
2002930: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 <== NOT EXECUTED
2002934: 82 02 00 01 add %o0, %g1, %g1 <== NOT EXECUTED
2002938: 80 a0 40 1e cmp %g1, %fp <== NOT EXECUTED
200293c: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED
2002940: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
2002944: 03 00 80 6d sethi %hi(0x201b400), %g1 <== NOT EXECUTED
2002948: c2 00 63 dc ld [ %g1 + 0x3dc ], %g1 ! 201b7dc <Stack_check_Initialized><== NOT EXECUTED
200294c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2002950: 02 80 00 0a be 2002978 <rtems_stack_checker_is_blown+0x64><== NOT EXECUTED
2002954: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
pattern_ok = (!memcmp(
2002958: 90 02 20 08 add %o0, 8, %o0 <== NOT EXECUTED
200295c: 13 00 80 6e sethi %hi(0x201b800), %o1 <== NOT EXECUTED
2002960: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED
2002964: 40 00 31 66 call 200eefc <memcmp> <== NOT EXECUTED
2002968: 92 12 62 60 or %o1, 0x260, %o1 <== NOT EXECUTED
200296c: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED
2002970: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED
2002974: 92 10 00 01 mov %g1, %o1 <== NOT EXECUTED
}
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
if ( sp_ok && pattern_ok )
2002978: 80 8e 20 ff btst 0xff, %i0 <== NOT EXECUTED
200297c: 02 80 00 04 be 200298c <rtems_stack_checker_is_blown+0x78><== NOT EXECUTED
2002980: 80 8a 60 ff btst 0xff, %o1 <== NOT EXECUTED
2002984: 12 80 00 07 bne 20029a0 <rtems_stack_checker_is_blown+0x8c><== NOT EXECUTED
2002988: 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 );
200298c: 03 00 80 6f sethi %hi(0x201bc00), %g1 <== NOT EXECUTED
2002990: d0 00 61 14 ld [ %g1 + 0x114 ], %o0 ! 201bd14 <_Thread_Executing><== NOT EXECUTED
2002994: 92 0a 60 01 and %o1, 1, %o1 <== NOT EXECUTED
2002998: 7f ff ff c6 call 20028b0 <Stack_check_report_blown_task> <== NOT EXECUTED
200299c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
return true;
}
20029a0: 81 c7 e0 08 ret <== NOT EXECUTED
20029a4: 81 e8 00 00 restore <== NOT EXECUTED
02002894 <rtems_stack_checker_report_usage>:
void rtems_stack_checker_report_usage( void )
{
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
2002894: 13 00 80 0f sethi %hi(0x2003c00), %o1 <== NOT EXECUTED
2002898: 90 10 20 00 clr %o0 <== NOT EXECUTED
200289c: 92 12 61 b4 or %o1, 0x1b4, %o1 <== NOT EXECUTED
20028a0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
20028a4: 7f ff ff e6 call 200283c <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
20028a8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
0200283c <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
200283c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
print_context = context;
2002840: 23 00 80 6d sethi %hi(0x201b400), %l1 <== NOT EXECUTED
print_handler = print;
2002844: 21 00 80 6d sethi %hi(0x201b400), %l0 <== NOT EXECUTED
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
print_context = context;
2002848: f0 24 63 e0 st %i0, [ %l1 + 0x3e0 ] <== NOT EXECUTED
print_handler = print;
200284c: f2 24 23 e4 st %i1, [ %l0 + 0x3e4 ] <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
2002850: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2002854: 13 00 80 63 sethi %hi(0x2018c00), %o1 <== NOT EXECUTED
2002858: 9f c6 40 00 call %i1 <== NOT EXECUTED
200285c: 92 12 62 90 or %o1, 0x290, %o1 ! 2018e90 <pollCallbacks.4788+0x368><== NOT EXECUTED
(*print)( context,
2002860: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2002864: 13 00 80 63 sethi %hi(0x2018c00), %o1 <== NOT EXECUTED
2002868: 9f c6 40 00 call %i1 <== NOT EXECUTED
200286c: 92 12 62 a8 or %o1, 0x2a8, %o1 ! 2018ea8 <pollCallbacks.4788+0x380><== NOT EXECUTED
" ID NAME LOW HIGH CURRENT AVAILABLE USED\n"
);
/* iterate over all threads and dump the usage */
rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage );
2002870: 11 00 80 09 sethi %hi(0x2002400), %o0 <== NOT EXECUTED
2002874: 40 00 14 b1 call 2007b38 <rtems_iterate_over_all_threads> <== NOT EXECUTED
2002878: 90 12 22 e8 or %o0, 0x2e8, %o0 ! 20026e8 <Stack_check_Dump_threads_usage><== NOT EXECUTED
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
200287c: 7f ff ff 9b call 20026e8 <Stack_check_Dump_threads_usage> <== NOT EXECUTED
2002880: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
print_context = NULL;
2002884: c0 24 63 e0 clr [ %l1 + 0x3e0 ] <== NOT EXECUTED
print_handler = NULL;
2002888: c0 24 23 e4 clr [ %l0 + 0x3e4 ] <== NOT EXECUTED
}
200288c: 81 c7 e0 08 ret <== NOT EXECUTED
2002890: 81 e8 00 00 restore <== NOT EXECUTED
020029a8 <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running,
Thread_Control *heir
)
{
20029a8: 9d e3 bf 98 save %sp, -104, %sp
Stack_Control *the_stack = &running->Start.Initial_stack;
void *pattern;
bool sp_ok;
bool pattern_ok = true;
pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern;
20029ac: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0
)
{
void *sp = __builtin_frame_address(0);
#if defined(__GNUC__)
if ( sp < the_stack->area ) {
20029b0: 80 a7 80 08 cmp %fp, %o0
20029b4: 0a 80 00 07 bcs 20029d0 <rtems_stack_checker_switch_extension+0x28><== NEVER TAKEN
20029b8: b2 10 20 00 clr %i1
20029bc: c2 06 20 c4 ld [ %i0 + 0xc4 ], %g1
20029c0: 82 02 00 01 add %o0, %g1, %g1
20029c4: 80 a0 40 1e cmp %g1, %fp
20029c8: 82 60 3f ff subx %g0, -1, %g1
20029cc: b2 10 00 01 mov %g1, %i1
/*
* Check for an out of bounds stack pointer or an overwrite
*/
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
20029d0: 90 02 20 08 add %o0, 8, %o0
20029d4: 13 00 80 6e sethi %hi(0x201b800), %o1
20029d8: 94 10 20 10 mov 0x10, %o2
20029dc: 40 00 31 48 call 200eefc <memcmp>
20029e0: 92 12 62 60 or %o1, 0x260, %o1
20029e4: 80 a0 00 08 cmp %g0, %o0
20029e8: 82 60 3f ff subx %g0, -1, %g1
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
20029ec: 80 8e 60 ff btst 0xff, %i1
20029f0: 02 80 00 04 be 2002a00 <rtems_stack_checker_switch_extension+0x58><== NEVER TAKEN
20029f4: 80 a0 60 00 cmp %g1, 0
20029f8: 12 80 00 05 bne 2002a0c <rtems_stack_checker_switch_extension+0x64>
20029fc: 01 00 00 00 nop
Stack_check_report_blown_task( running, pattern_ok );
2002a00: b2 08 60 01 and %g1, 1, %i1
2002a04: 7f ff ff ab call 20028b0 <Stack_check_report_blown_task>
2002a08: 81 e8 00 00 restore
2002a0c: 81 c7 e0 08 ret
2002a10: 81 e8 00 00 restore
02002f00 <rtems_status_text>:
const char *
rtems_status_text(
rtems_status_code status
)
{
2002f00: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
return rtems_assoc_name_by_local(rtems_status_assoc, status);
2002f04: 11 00 80 67 sethi %hi(0x2019c00), %o0 <== NOT EXECUTED
2002f08: 90 12 20 58 or %o0, 0x58, %o0 ! 2019c58 <rtems_status_assoc><== NOT EXECUTED
2002f0c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2002f10: 40 00 24 24 call 200bfa0 <rtems_assoc_name_by_local> <== NOT EXECUTED
2002f14: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
02005688 <rtems_task_create>:
size_t stack_size,
rtems_mode initial_modes,
rtems_attribute attribute_set,
Objects_Id *id
)
{
2005688: 9d e3 bf 78 save %sp, -136, %sp
200568c: a6 10 00 18 mov %i0, %l3
Priority_Control core_priority;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !id )
2005690: 80 a7 60 00 cmp %i5, 0
2005694: 02 80 00 1e be 200570c <rtems_task_create+0x84> <== NEVER TAKEN
2005698: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
if ( !rtems_is_name_valid( name ) )
200569c: 80 a4 e0 00 cmp %l3, 0
20056a0: 02 80 00 1b be 200570c <rtems_task_create+0x84>
20056a4: b0 10 20 03 mov 3, %i0
/*
* Validate the RTEMS API priority and convert it to the core priority range.
*/
if ( !_Attributes_Is_system_task( the_attribute_set ) ) {
20056a8: 03 00 00 20 sethi %hi(0x8000), %g1
20056ac: 80 8f 00 01 btst %i4, %g1
20056b0: 12 80 00 0b bne 20056dc <rtems_task_create+0x54>
20056b4: 80 a6 60 00 cmp %i1, 0
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
20056b8: 02 80 00 06 be 20056d0 <rtems_task_create+0x48>
20056bc: 82 10 20 00 clr %g1
20056c0: 03 00 80 5a sethi %hi(0x2016800), %g1
20056c4: c2 08 61 f4 ldub [ %g1 + 0x1f4 ], %g1 ! 20169f4 <rtems_maximum_priority>
20056c8: 80 a0 40 19 cmp %g1, %i1
20056cc: 82 60 3f ff subx %g0, -1, %g1
if ( !_RTEMS_tasks_Priority_is_valid( initial_priority ) )
20056d0: 80 a0 60 00 cmp %g1, 0
20056d4: 02 80 00 0e be 200570c <rtems_task_create+0x84>
20056d8: b0 10 20 13 mov 0x13, %i0
*/
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
20056dc: 25 00 80 5e sethi %hi(0x2017800), %l2
20056e0: d0 04 a0 dc ld [ %l2 + 0xdc ], %o0 ! 20178dc <_RTEMS_Allocator_Mutex>
20056e4: 40 00 02 14 call 2005f34 <_API_Mutex_Lock>
20056e8: 23 00 80 5d sethi %hi(0x2017400), %l1
* This function allocates a task control block from
* the inactive chain of free task control blocks.
*/
RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information );
20056ec: 40 00 04 43 call 20067f8 <_Objects_Allocate>
20056f0: 90 14 63 24 or %l1, 0x324, %o0 ! 2017724 <_RTEMS_tasks_Information>
* the event of an error.
*/
the_thread = _RTEMS_tasks_Allocate();
if ( !the_thread ) {
20056f4: a0 92 20 00 orcc %o0, 0, %l0
20056f8: 12 80 00 07 bne 2005714 <rtems_task_create+0x8c>
20056fc: 83 36 e0 08 srl %i3, 8, %g1
_RTEMS_Unlock_allocator();
2005700: d0 04 a0 dc ld [ %l2 + 0xdc ], %o0
2005704: 40 00 02 22 call 2005f8c <_API_Mutex_Unlock>
2005708: b0 10 20 05 mov 5, %i0
200570c: 81 c7 e0 08 ret
2005710: 81 e8 00 00 restore
/*
* Initialize the core thread for this task.
*/
status = _Thread_Initialize(
2005714: 82 18 60 01 xor %g1, 1, %g1
2005718: 82 08 60 01 and %g1, 1, %g1
200571c: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
2005720: 83 36 e0 09 srl %i3, 9, %g1
2005724: 82 08 60 01 and %g1, 1, %g1
2005728: c2 23 a0 60 st %g1, [ %sp + 0x60 ]
200572c: 82 0e e0 0f and %i3, 0xf, %g1
2005730: c2 23 a0 68 st %g1, [ %sp + 0x68 ]
2005734: 82 07 bf f4 add %fp, -12, %g1
2005738: e6 27 bf f4 st %l3, [ %fp + -12 ]
200573c: c2 23 a0 6c st %g1, [ %sp + 0x6c ]
2005740: c0 23 a0 64 clr [ %sp + 0x64 ]
2005744: 90 14 63 24 or %l1, 0x324, %o0
2005748: 96 10 00 1a mov %i2, %o3
200574c: 98 0f 20 01 and %i4, 1, %o4
2005750: 9a 10 00 19 mov %i1, %o5
2005754: 92 10 00 10 mov %l0, %o1
2005758: 40 00 08 29 call 20077fc <_Thread_Initialize>
200575c: 94 10 20 00 clr %o2
NULL, /* no budget algorithm callout */
_Modes_Get_interrupt_level(initial_modes),
(Objects_Name) name
);
if ( !status ) {
2005760: 80 8a 20 ff btst 0xff, %o0
2005764: 12 80 00 0b bne 2005790 <rtems_task_create+0x108>
2005768: c2 04 20 08 ld [ %l0 + 8 ], %g1
*/
RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free (
Thread_Control *the_task
)
{
_Objects_Free(
200576c: 40 00 05 34 call 2006c3c <_Objects_Get_information_id>
2005770: 90 10 00 01 mov %g1, %o0
2005774: 40 00 05 0e call 2006bac <_Objects_Free>
2005778: 92 10 00 10 mov %l0, %o1
#if defined(RTEMS_MULTIPROCESSING)
if ( is_global )
_Objects_MP_Free_global_object( the_global_object );
#endif
_RTEMS_tasks_Free( the_thread );
_RTEMS_Unlock_allocator();
200577c: d0 04 a0 dc ld [ %l2 + 0xdc ], %o0
2005780: 40 00 02 03 call 2005f8c <_API_Mutex_Unlock>
2005784: b0 10 20 0d mov 0xd, %i0
2005788: 81 c7 e0 08 ret
200578c: 81 e8 00 00 restore
}
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true;
2005790: c4 04 21 68 ld [ %l0 + 0x168 ], %g2
);
}
#endif
_RTEMS_Unlock_allocator();
2005794: d0 04 a0 dc ld [ %l2 + 0xdc ], %o0
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true;
*id = the_thread->Object.id;
2005798: c2 27 40 00 st %g1, [ %i5 ]
}
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true;
200579c: 83 36 e0 0a srl %i3, 0xa, %g1
20057a0: 82 18 60 01 xor %g1, 1, %g1
20057a4: 82 08 60 01 and %g1, 1, %g1
);
}
#endif
_RTEMS_Unlock_allocator();
20057a8: b0 10 20 00 clr %i0
20057ac: 40 00 01 f8 call 2005f8c <_API_Mutex_Unlock>
20057b0: c2 28 a0 08 stb %g1, [ %g2 + 8 ]
return RTEMS_SUCCESSFUL;
}
20057b4: 81 c7 e0 08 ret
20057b8: 81 e8 00 00 restore
020074e0 <rtems_task_get_note>:
rtems_status_code rtems_task_get_note(
Objects_Id id,
uint32_t notepad,
uint32_t *note
)
{
20074e0: 9d e3 bf 90 save %sp, -112, %sp
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
20074e4: 03 00 80 75 sethi %hi(0x201d400), %g1
20074e8: c2 00 63 ac ld [ %g1 + 0x3ac ], %g1 ! 201d7ac <_Configuration_Table>
rtems_status_code rtems_task_get_note(
Objects_Id id,
uint32_t notepad,
uint32_t *note
)
{
20074ec: 90 10 00 18 mov %i0, %o0
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
20074f0: c2 00 60 40 ld [ %g1 + 0x40 ], %g1
20074f4: c2 08 60 04 ldub [ %g1 + 4 ], %g1
20074f8: 80 a0 60 00 cmp %g1, 0
20074fc: 02 80 00 26 be 2007594 <rtems_task_get_note+0xb4> <== NEVER TAKEN
2007500: b0 10 20 16 mov 0x16, %i0
return RTEMS_NOT_CONFIGURED;
if ( !note )
2007504: 80 a6 a0 00 cmp %i2, 0
2007508: 02 80 00 23 be 2007594 <rtems_task_get_note+0xb4> <== NEVER TAKEN
200750c: 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 )
2007510: 80 a6 60 0f cmp %i1, 0xf
2007514: 18 80 00 20 bgu 2007594 <rtems_task_get_note+0xb4>
2007518: 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 ) ||
200751c: 80 a2 20 00 cmp %o0, 0
2007520: 02 80 00 07 be 200753c <rtems_task_get_note+0x5c>
2007524: 03 00 80 75 sethi %hi(0x201d400), %g1
2007528: c2 00 63 d4 ld [ %g1 + 0x3d4 ], %g1 ! 201d7d4 <_Thread_Executing>
200752c: c2 00 60 08 ld [ %g1 + 8 ], %g1
2007530: 80 a2 00 01 cmp %o0, %g1
2007534: 12 80 00 0b bne 2007560 <rtems_task_get_note+0x80>
2007538: 01 00 00 00 nop
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
200753c: 03 00 80 75 sethi %hi(0x201d400), %g1
2007540: c4 00 63 d4 ld [ %g1 + 0x3d4 ], %g2 ! 201d7d4 <_Thread_Executing>
2007544: 82 06 60 08 add %i1, 8, %g1
2007548: c4 00 a1 68 ld [ %g2 + 0x168 ], %g2
200754c: 83 28 60 02 sll %g1, 2, %g1
2007550: c2 00 80 01 ld [ %g2 + %g1 ], %g1
2007554: c2 26 80 00 st %g1, [ %i2 ]
2007558: 81 c7 e0 08 ret
200755c: 91 e8 20 00 restore %g0, 0, %o0
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
2007560: 40 00 08 94 call 20097b0 <_Thread_Get>
2007564: 92 07 bf f4 add %fp, -12, %o1
switch ( location ) {
2007568: c2 07 bf f4 ld [ %fp + -12 ], %g1
200756c: 80 a0 60 00 cmp %g1, 0
2007570: 12 80 00 09 bne 2007594 <rtems_task_get_note+0xb4>
2007574: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
2007578: c2 02 21 68 ld [ %o0 + 0x168 ], %g1
200757c: 84 06 60 08 add %i1, 8, %g2
2007580: 85 28 a0 02 sll %g2, 2, %g2
2007584: c2 00 40 02 ld [ %g1 + %g2 ], %g1
_Thread_Enable_dispatch();
2007588: b0 10 20 00 clr %i0
200758c: 40 00 08 7c call 200977c <_Thread_Enable_dispatch>
2007590: c2 26 80 00 st %g1, [ %i2 ]
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2007594: 81 c7 e0 08 ret
2007598: 81 e8 00 00 restore
02005838 <rtems_task_ident>:
rtems_status_code rtems_task_ident(
rtems_name name,
uint32_t node,
Objects_Id *id
)
{
2005838: 9d e3 bf 98 save %sp, -104, %sp
200583c: 92 10 00 18 mov %i0, %o1
2005840: 96 10 00 1a mov %i2, %o3
2005844: 94 10 00 19 mov %i1, %o2
Objects_Name_or_id_lookup_errors status;
if ( !id )
2005848: 80 a6 a0 00 cmp %i2, 0
200584c: 02 80 00 11 be 2005890 <rtems_task_ident+0x58> <== NEVER TAKEN
2005850: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
if ( name == OBJECTS_ID_OF_SELF ) {
2005854: 80 a2 60 00 cmp %o1, 0
2005858: 12 80 00 07 bne 2005874 <rtems_task_ident+0x3c>
200585c: 03 00 80 5e sethi %hi(0x2017800), %g1
*id = _Thread_Executing->Object.id;
2005860: c2 00 60 e4 ld [ %g1 + 0xe4 ], %g1 ! 20178e4 <_Thread_Executing>
2005864: c2 00 60 08 ld [ %g1 + 8 ], %g1
2005868: c2 26 80 00 st %g1, [ %i2 ]
200586c: 81 c7 e0 08 ret
2005870: 91 e8 20 00 restore %g0, 0, %o0
return RTEMS_SUCCESSFUL;
}
status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id );
2005874: 11 00 80 5d sethi %hi(0x2017400), %o0
2005878: 40 00 05 99 call 2006edc <_Objects_Name_to_id_u32>
200587c: 90 12 23 24 or %o0, 0x324, %o0 ! 2017724 <_RTEMS_tasks_Information>
return _Status_Object_name_errors_to_status[ status ];
2005880: 03 00 80 57 sethi %hi(0x2015c00), %g1
2005884: 91 2a 20 02 sll %o0, 2, %o0
2005888: 82 10 60 34 or %g1, 0x34, %g1
200588c: f0 00 40 08 ld [ %g1 + %o0 ], %i0
}
2005890: 81 c7 e0 08 ret
2005894: 81 e8 00 00 restore
02005ea0 <rtems_task_is_suspended>:
*/
rtems_status_code rtems_task_is_suspended(
Objects_Id id
)
{
2005ea0: 9d e3 bf 90 save %sp, -112, %sp
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
2005ea4: 90 10 00 18 mov %i0, %o0
2005ea8: 40 00 07 a3 call 2007d34 <_Thread_Get>
2005eac: 92 07 bf f4 add %fp, -12, %o1
switch ( location ) {
2005eb0: c2 07 bf f4 ld [ %fp + -12 ], %g1
2005eb4: 80 a0 60 00 cmp %g1, 0
2005eb8: 12 80 00 08 bne 2005ed8 <rtems_task_is_suspended+0x38> <== NEVER TAKEN
2005ebc: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
2005ec0: c2 02 20 10 ld [ %o0 + 0x10 ], %g1
2005ec4: 80 88 60 02 btst 2, %g1
2005ec8: 12 80 00 06 bne 2005ee0 <rtems_task_is_suspended+0x40>
2005ecc: 01 00 00 00 nop
_Thread_Enable_dispatch();
2005ed0: 40 00 07 8c call 2007d00 <_Thread_Enable_dispatch>
2005ed4: b0 10 20 00 clr %i0 ! 0 <PROM_START>
2005ed8: 81 c7 e0 08 ret
2005edc: 81 e8 00 00 restore
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
2005ee0: 40 00 07 88 call 2007d00 <_Thread_Enable_dispatch>
2005ee4: b0 10 20 0f mov 0xf, %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2005ee8: 81 c7 e0 08 ret
2005eec: 81 e8 00 00 restore
0200cab8 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
200cab8: 9d e3 bf 98 save %sp, -104, %sp
200cabc: a8 10 00 18 mov %i0, %l4
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
200cac0: 80 a6 a0 00 cmp %i2, 0
200cac4: 02 80 00 53 be 200cc10 <rtems_task_mode+0x158> <== NEVER TAKEN
200cac8: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
200cacc: 03 00 80 5e sethi %hi(0x2017800), %g1
200cad0: e6 00 60 e4 ld [ %g1 + 0xe4 ], %l3 ! 20178e4 <_Thread_Executing>
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
200cad4: c2 0c e0 76 ldub [ %l3 + 0x76 ], %g1
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
200cad8: c4 04 e0 7c ld [ %l3 + 0x7c ], %g2
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
200cadc: 80 a0 00 01 cmp %g0, %g1
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
200cae0: e4 04 e1 68 ld [ %l3 + 0x168 ], %l2
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
200cae4: 82 60 3f ff subx %g0, -1, %g1
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
200cae8: 80 a0 a0 00 cmp %g2, 0
200caec: 02 80 00 03 be 200caf8 <rtems_task_mode+0x40>
200caf0: a3 28 60 08 sll %g1, 8, %l1
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
200caf4: a2 14 62 00 or %l1, 0x200, %l1
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
200caf8: c2 0c a0 08 ldub [ %l2 + 8 ], %g1
200cafc: 80 a0 00 01 cmp %g0, %g1
old_mode |= _ISR_Get_level();
200cb00: 7f ff f1 a4 call 2009190 <_CPU_ISR_Get_level>
200cb04: a0 60 3f ff subx %g0, -1, %l0
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
200cb08: a1 2c 20 0a sll %l0, 0xa, %l0
200cb0c: a0 14 00 08 or %l0, %o0, %l0
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
200cb10: a0 14 00 11 or %l0, %l1, %l0
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
200cb14: 80 8e 61 00 btst 0x100, %i1
200cb18: 02 80 00 06 be 200cb30 <rtems_task_mode+0x78>
200cb1c: e0 26 80 00 st %l0, [ %i2 ]
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? TRUE : FALSE;
200cb20: 83 35 20 08 srl %l4, 8, %g1
200cb24: 82 18 60 01 xor %g1, 1, %g1
200cb28: 82 08 60 01 and %g1, 1, %g1
200cb2c: c2 2c e0 76 stb %g1, [ %l3 + 0x76 ]
if ( mask & RTEMS_TIMESLICE_MASK ) {
200cb30: 80 8e 62 00 btst 0x200, %i1
200cb34: 02 80 00 0b be 200cb60 <rtems_task_mode+0xa8>
200cb38: 80 8e 60 0f btst 0xf, %i1
if ( _Modes_Is_timeslice(mode_set) ) {
200cb3c: 80 8d 22 00 btst 0x200, %l4
200cb40: 22 80 00 07 be,a 200cb5c <rtems_task_mode+0xa4>
200cb44: c0 24 e0 7c clr [ %l3 + 0x7c ]
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
200cb48: 03 00 80 5d sethi %hi(0x2017400), %g1
200cb4c: c2 00 63 78 ld [ %g1 + 0x378 ], %g1 ! 2017778 <_Thread_Ticks_per_timeslice>
200cb50: c2 24 e0 78 st %g1, [ %l3 + 0x78 ]
if ( mask & RTEMS_PREEMPT_MASK )
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? TRUE : FALSE;
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
200cb54: 82 10 20 01 mov 1, %g1
200cb58: c2 24 e0 7c st %g1, [ %l3 + 0x7c ]
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
200cb5c: 80 8e 60 0f btst 0xf, %i1
200cb60: 02 80 00 06 be 200cb78 <rtems_task_mode+0xc0>
200cb64: 80 8e 64 00 btst 0x400, %i1
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
200cb68: 90 0d 20 0f and %l4, 0xf, %o0
200cb6c: 7f ff d4 84 call 2001d7c <sparc_enable_interrupts>
200cb70: 91 2a 20 08 sll %o0, 8, %o0
*/
is_asr_enabled = FALSE;
needs_asr_dispatching = FALSE;
if ( mask & RTEMS_ASR_MASK ) {
200cb74: 80 8e 64 00 btst 0x400, %i1
200cb78: 02 80 00 18 be 200cbd8 <rtems_task_mode+0x120>
200cb7c: a0 10 20 00 clr %l0
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
200cb80: c4 0c a0 08 ldub [ %l2 + 8 ], %g2
*/
is_asr_enabled = FALSE;
needs_asr_dispatching = FALSE;
if ( mask & RTEMS_ASR_MASK ) {
200cb84: 83 35 20 0a srl %l4, 0xa, %g1
200cb88: 82 18 60 01 xor %g1, 1, %g1
200cb8c: 82 08 60 01 and %g1, 1, %g1
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
200cb90: 80 a0 40 02 cmp %g1, %g2
200cb94: 22 80 00 12 be,a 200cbdc <rtems_task_mode+0x124>
200cb98: 03 00 80 5e sethi %hi(0x2017800), %g1
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
200cb9c: 7f ff d4 74 call 2001d6c <sparc_disable_interrupts>
200cba0: c2 2c a0 08 stb %g1, [ %l2 + 8 ]
_signals = information->signals_pending;
200cba4: c2 04 a0 18 ld [ %l2 + 0x18 ], %g1
information->signals_pending = information->signals_posted;
200cba8: c4 04 a0 14 ld [ %l2 + 0x14 ], %g2
information->signals_posted = _signals;
200cbac: c2 24 a0 14 st %g1, [ %l2 + 0x14 ]
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
information->signals_pending = information->signals_posted;
200cbb0: c4 24 a0 18 st %g2, [ %l2 + 0x18 ]
information->signals_posted = _signals;
_ISR_Enable( _level );
200cbb4: 7f ff d4 72 call 2001d7c <sparc_enable_interrupts>
200cbb8: 01 00 00 00 nop
asr->is_enabled = is_asr_enabled;
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
200cbbc: c2 04 a0 14 ld [ %l2 + 0x14 ], %g1
200cbc0: 80 a0 60 00 cmp %g1, 0
200cbc4: 22 80 00 05 be,a 200cbd8 <rtems_task_mode+0x120>
200cbc8: a0 10 20 00 clr %l0
needs_asr_dispatching = true;
executing->do_post_task_switch_extension = true;
200cbcc: 82 10 20 01 mov 1, %g1
200cbd0: a0 10 20 01 mov 1, %l0
200cbd4: c2 2c e0 75 stb %g1, [ %l3 + 0x75 ]
}
}
}
if ( _System_state_Is_up(_System_state_Current) )
200cbd8: 03 00 80 5e sethi %hi(0x2017800), %g1
200cbdc: c2 00 61 c4 ld [ %g1 + 0x1c4 ], %g1 ! 20179c4 <_System_state_Current>
200cbe0: 80 a0 60 03 cmp %g1, 3
200cbe4: 12 80 00 0b bne 200cc10 <rtems_task_mode+0x158> <== NEVER TAKEN
200cbe8: b0 10 20 00 clr %i0
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
200cbec: 40 00 00 7b call 200cdd8 <_Thread_Evaluate_mode>
200cbf0: 01 00 00 00 nop
200cbf4: 80 8a 20 ff btst 0xff, %o0
200cbf8: 12 80 00 04 bne 200cc08 <rtems_task_mode+0x150>
200cbfc: 80 8c 20 ff btst 0xff, %l0
200cc00: 02 80 00 06 be 200cc18 <rtems_task_mode+0x160>
200cc04: 01 00 00 00 nop
_Thread_Dispatch();
200cc08: 7f ff ea 63 call 2007594 <_Thread_Dispatch>
200cc0c: b0 10 20 00 clr %i0 ! 0 <PROM_START>
200cc10: 81 c7 e0 08 ret
200cc14: 81 e8 00 00 restore
return RTEMS_SUCCESSFUL;
}
200cc18: 81 c7 e0 08 ret
200cc1c: 81 e8 00 00 restore
020076a4 <rtems_task_set_note>:
rtems_status_code rtems_task_set_note(
Objects_Id id,
uint32_t notepad,
uint32_t note
)
{
20076a4: 9d e3 bf 90 save %sp, -112, %sp
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
20076a8: 03 00 80 75 sethi %hi(0x201d400), %g1
20076ac: c2 00 63 ac ld [ %g1 + 0x3ac ], %g1 ! 201d7ac <_Configuration_Table>
rtems_status_code rtems_task_set_note(
Objects_Id id,
uint32_t notepad,
uint32_t note
)
{
20076b0: 90 10 00 18 mov %i0, %o0
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
20076b4: c2 00 60 40 ld [ %g1 + 0x40 ], %g1
20076b8: c2 08 60 04 ldub [ %g1 + 4 ], %g1
20076bc: 80 a0 60 00 cmp %g1, 0
20076c0: 02 80 00 21 be 2007744 <rtems_task_set_note+0xa0> <== NEVER TAKEN
20076c4: b0 10 20 16 mov 0x16, %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 )
20076c8: 80 a6 60 0f cmp %i1, 0xf
20076cc: 18 80 00 1e bgu 2007744 <rtems_task_set_note+0xa0>
20076d0: 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 ) ||
20076d4: 80 a2 20 00 cmp %o0, 0
20076d8: 02 80 00 07 be 20076f4 <rtems_task_set_note+0x50>
20076dc: 03 00 80 75 sethi %hi(0x201d400), %g1
20076e0: c2 00 63 d4 ld [ %g1 + 0x3d4 ], %g1 ! 201d7d4 <_Thread_Executing>
20076e4: c2 00 60 08 ld [ %g1 + 8 ], %g1
20076e8: 80 a2 00 01 cmp %o0, %g1
20076ec: 12 80 00 0a bne 2007714 <rtems_task_set_note+0x70> <== ALWAYS TAKEN
20076f0: 01 00 00 00 nop
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
20076f4: 03 00 80 75 sethi %hi(0x201d400), %g1
20076f8: c4 00 63 d4 ld [ %g1 + 0x3d4 ], %g2 ! 201d7d4 <_Thread_Executing>
20076fc: c4 00 a1 68 ld [ %g2 + 0x168 ], %g2
2007700: 82 06 60 08 add %i1, 8, %g1
2007704: 83 28 60 02 sll %g1, 2, %g1
2007708: f4 20 80 01 st %i2, [ %g2 + %g1 ]
200770c: 81 c7 e0 08 ret
2007710: 91 e8 20 00 restore %g0, 0, %o0
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
2007714: 40 00 08 27 call 20097b0 <_Thread_Get>
2007718: 92 07 bf f4 add %fp, -12, %o1
switch ( location ) {
200771c: c2 07 bf f4 ld [ %fp + -12 ], %g1
2007720: 80 a0 60 00 cmp %g1, 0
2007724: 12 80 00 08 bne 2007744 <rtems_task_set_note+0xa0>
2007728: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
200772c: c4 02 21 68 ld [ %o0 + 0x168 ], %g2
2007730: 82 06 60 08 add %i1, 8, %g1
2007734: 83 28 60 02 sll %g1, 2, %g1
_Thread_Enable_dispatch();
2007738: b0 10 20 00 clr %i0
200773c: 40 00 08 10 call 200977c <_Thread_Enable_dispatch>
2007740: f4 20 80 01 st %i2, [ %g2 + %g1 ]
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2007744: 81 c7 e0 08 ret
2007748: 81 e8 00 00 restore
02006bfc <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
Objects_Id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
2006bfc: 9d e3 bf 90 save %sp, -112, %sp
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
2006c00: 80 a6 60 00 cmp %i1, 0
2006c04: 02 80 00 07 be 2006c20 <rtems_task_set_priority+0x24>
2006c08: 90 10 00 18 mov %i0, %o0
2006c0c: 03 00 80 6c sethi %hi(0x201b000), %g1
2006c10: c2 08 60 74 ldub [ %g1 + 0x74 ], %g1 ! 201b074 <rtems_maximum_priority>
2006c14: 80 a6 40 01 cmp %i1, %g1
2006c18: 18 80 00 1c bgu 2006c88 <rtems_task_set_priority+0x8c>
2006c1c: b0 10 20 13 mov 0x13, %i0
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
2006c20: 80 a6 a0 00 cmp %i2, 0
2006c24: 02 80 00 19 be 2006c88 <rtems_task_set_priority+0x8c> <== NEVER TAKEN
2006c28: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
2006c2c: 40 00 07 f2 call 2008bf4 <_Thread_Get>
2006c30: 92 07 bf f4 add %fp, -12, %o1
switch ( location ) {
2006c34: c2 07 bf f4 ld [ %fp + -12 ], %g1
2006c38: 80 a0 60 00 cmp %g1, 0
2006c3c: 12 80 00 13 bne 2006c88 <rtems_task_set_priority+0x8c>
2006c40: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
2006c44: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
2006c48: 80 a6 60 00 cmp %i1, 0
2006c4c: 02 80 00 0d be 2006c80 <rtems_task_set_priority+0x84>
2006c50: c2 26 80 00 st %g1, [ %i2 ]
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
2006c54: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
2006c58: 80 a0 60 00 cmp %g1, 0
2006c5c: 02 80 00 06 be 2006c74 <rtems_task_set_priority+0x78>
2006c60: f2 22 20 18 st %i1, [ %o0 + 0x18 ]
2006c64: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
2006c68: 80 a0 40 19 cmp %g1, %i1
2006c6c: 08 80 00 05 bleu 2006c80 <rtems_task_set_priority+0x84> <== ALWAYS TAKEN
2006c70: 01 00 00 00 nop
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, FALSE );
2006c74: 92 10 00 19 mov %i1, %o1
2006c78: 40 00 06 44 call 2008588 <_Thread_Change_priority>
2006c7c: 94 10 20 00 clr %o2
}
_Thread_Enable_dispatch();
2006c80: 40 00 07 d0 call 2008bc0 <_Thread_Enable_dispatch>
2006c84: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2006c88: 81 c7 e0 08 ret
2006c8c: 81 e8 00 00 restore
020069cc <rtems_task_variable_add>:
rtems_status_code rtems_task_variable_add(
rtems_id tid,
void **ptr,
void (*dtor)(void *)
)
{
20069cc: 9d e3 bf 90 save %sp, -112, %sp
20069d0: 90 10 00 18 mov %i0, %o0
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
20069d4: 80 a6 60 00 cmp %i1, 0
20069d8: 02 80 00 11 be 2006a1c <rtems_task_variable_add+0x50> <== NEVER TAKEN
20069dc: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
20069e0: 40 00 07 f2 call 20089a8 <_Thread_Get>
20069e4: 92 07 bf f4 add %fp, -12, %o1
switch (location) {
20069e8: c2 07 bf f4 ld [ %fp + -12 ], %g1
rtems_task_variable_t *tvp, *new;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
20069ec: a0 10 00 08 mov %o0, %l0
switch (location) {
20069f0: 80 a0 60 00 cmp %g1, 0
20069f4: 12 80 00 0a bne 2006a1c <rtems_task_variable_add+0x50> <== NEVER TAKEN
20069f8: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
20069fc: 10 80 00 0a b 2006a24 <rtems_task_variable_add+0x58>
2006a00: c4 02 21 78 ld [ %o0 + 0x178 ], %g2
while (tvp) {
if (tvp->ptr == ptr) {
2006a04: 80 a0 40 19 cmp %g1, %i1
2006a08: 32 80 00 07 bne,a 2006a24 <rtems_task_variable_add+0x58>
2006a0c: c4 00 80 00 ld [ %g2 ], %g2
tvp->dtor = dtor;
2006a10: f4 20 a0 10 st %i2, [ %g2 + 0x10 ]
_Thread_Enable_dispatch();
2006a14: 40 00 07 d8 call 2008974 <_Thread_Enable_dispatch>
2006a18: b0 10 20 00 clr %i0
2006a1c: 81 c7 e0 08 ret
2006a20: 81 e8 00 00 restore
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
2006a24: 80 a0 a0 00 cmp %g2, 0
2006a28: 32 bf ff f7 bne,a 2006a04 <rtems_task_variable_add+0x38>
2006a2c: c2 00 a0 04 ld [ %g2 + 4 ], %g1
}
/*
* Now allocate memory for this task variable.
*/
new = (rtems_task_variable_t *)
2006a30: 40 00 0c a8 call 2009cd0 <_Workspace_Allocate>
2006a34: 90 10 20 14 mov 0x14, %o0
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
2006a38: 80 a2 20 00 cmp %o0, 0
2006a3c: 32 80 00 06 bne,a 2006a54 <rtems_task_variable_add+0x88>
2006a40: c4 04 21 78 ld [ %l0 + 0x178 ], %g2
_Thread_Enable_dispatch();
2006a44: 40 00 07 cc call 2008974 <_Thread_Enable_dispatch>
2006a48: b0 10 20 1a mov 0x1a, %i0
2006a4c: 81 c7 e0 08 ret
2006a50: 81 e8 00 00 restore
return RTEMS_NO_MEMORY;
}
new->gval = *ptr;
2006a54: 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;
2006a58: d0 24 21 78 st %o0, [ %l0 + 0x178 ]
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
_Thread_Enable_dispatch();
return RTEMS_NO_MEMORY;
}
new->gval = *ptr;
2006a5c: c2 22 20 08 st %g1, [ %o0 + 8 ]
new->ptr = ptr;
2006a60: f2 22 20 04 st %i1, [ %o0 + 4 ]
new->dtor = dtor;
2006a64: f4 22 20 10 st %i2, [ %o0 + 0x10 ]
new->next = (struct rtems_task_variable_tt *)the_thread->task_variables;
2006a68: c4 22 00 00 st %g2, [ %o0 ]
the_thread->task_variables = new;
_Thread_Enable_dispatch();
2006a6c: 40 00 07 c2 call 2008974 <_Thread_Enable_dispatch>
2006a70: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2006a74: 81 c7 e0 08 ret
2006a78: 81 e8 00 00 restore
02006a7c <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
2006a7c: 9d e3 bf 90 save %sp, -112, %sp
2006a80: 90 10 00 18 mov %i0, %o0
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
2006a84: 80 a6 60 00 cmp %i1, 0
2006a88: 02 80 00 18 be 2006ae8 <rtems_task_variable_delete+0x6c>
2006a8c: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
2006a90: 40 00 07 c6 call 20089a8 <_Thread_Get>
2006a94: 92 07 bf f4 add %fp, -12, %o1
switch (location) {
2006a98: c2 07 bf f4 ld [ %fp + -12 ], %g1
2006a9c: 80 a0 60 00 cmp %g1, 0
2006aa0: 12 80 00 12 bne 2006ae8 <rtems_task_variable_delete+0x6c> <== NEVER TAKEN
2006aa4: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
2006aa8: d2 02 21 78 ld [ %o0 + 0x178 ], %o1
2006aac: 10 80 00 12 b 2006af4 <rtems_task_variable_delete+0x78>
2006ab0: 84 10 20 00 clr %g2
while (tvp) {
if (tvp->ptr == ptr) {
2006ab4: 80 a0 40 19 cmp %g1, %i1
2006ab8: 32 80 00 0e bne,a 2006af0 <rtems_task_variable_delete+0x74>
2006abc: 84 10 00 09 mov %o1, %g2
if (prev)
2006ac0: 80 a0 a0 00 cmp %g2, 0
2006ac4: 02 80 00 04 be 2006ad4 <rtems_task_variable_delete+0x58>
2006ac8: c2 02 40 00 ld [ %o1 ], %g1
prev->next = tvp->next;
2006acc: 10 80 00 03 b 2006ad8 <rtems_task_variable_delete+0x5c>
2006ad0: c2 20 80 00 st %g1, [ %g2 ]
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
2006ad4: c2 22 21 78 st %g1, [ %o0 + 0x178 ]
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
2006ad8: 40 00 00 30 call 2006b98 <_RTEMS_Tasks_Invoke_task_variable_dtor>
2006adc: b0 10 20 00 clr %i0
_Thread_Enable_dispatch();
2006ae0: 40 00 07 a5 call 2008974 <_Thread_Enable_dispatch>
2006ae4: 01 00 00 00 nop
2006ae8: 81 c7 e0 08 ret
2006aec: 81 e8 00 00 restore
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
2006af0: d2 02 40 00 ld [ %o1 ], %o1
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
2006af4: 80 a2 60 00 cmp %o1, 0
2006af8: 32 bf ff ef bne,a 2006ab4 <rtems_task_variable_delete+0x38>
2006afc: c2 02 60 04 ld [ %o1 + 4 ], %g1
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
2006b00: 40 00 07 9d call 2008974 <_Thread_Enable_dispatch>
2006b04: b0 10 20 09 mov 9, %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2006b08: 81 c7 e0 08 ret
2006b0c: 81 e8 00 00 restore
02006b10 <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
2006b10: 9d e3 bf 90 save %sp, -112, %sp
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
2006b14: 80 a6 60 00 cmp %i1, 0
2006b18: 02 80 00 1d be 2006b8c <rtems_task_variable_get+0x7c>
2006b1c: 90 10 00 18 mov %i0, %o0
return RTEMS_INVALID_ADDRESS;
if ( !result )
2006b20: 80 a6 a0 00 cmp %i2, 0
2006b24: 02 80 00 11 be 2006b68 <rtems_task_variable_get+0x58>
2006b28: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
2006b2c: 40 00 07 9f call 20089a8 <_Thread_Get>
2006b30: 92 07 bf f4 add %fp, -12, %o1
switch (location) {
2006b34: c2 07 bf f4 ld [ %fp + -12 ], %g1
2006b38: 80 a0 60 00 cmp %g1, 0
2006b3c: 12 80 00 0b bne 2006b68 <rtems_task_variable_get+0x58> <== NEVER TAKEN
2006b40: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
2006b44: 10 80 00 0b b 2006b70 <rtems_task_variable_get+0x60>
2006b48: d0 02 21 78 ld [ %o0 + 0x178 ], %o0
while (tvp) {
if (tvp->ptr == ptr) {
2006b4c: 80 a0 40 19 cmp %g1, %i1
2006b50: 32 80 00 08 bne,a 2006b70 <rtems_task_variable_get+0x60>
2006b54: d0 02 00 00 ld [ %o0 ], %o0
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
2006b58: c2 02 20 0c ld [ %o0 + 0xc ], %g1
_Thread_Enable_dispatch();
2006b5c: b0 10 20 00 clr %i0
2006b60: 40 00 07 85 call 2008974 <_Thread_Enable_dispatch>
2006b64: c2 26 80 00 st %g1, [ %i2 ]
2006b68: 81 c7 e0 08 ret
2006b6c: 81 e8 00 00 restore
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
2006b70: 80 a2 20 00 cmp %o0, 0
2006b74: 32 bf ff f6 bne,a 2006b4c <rtems_task_variable_get+0x3c>
2006b78: c2 02 20 04 ld [ %o0 + 4 ], %g1
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
2006b7c: 40 00 07 7e call 2008974 <_Thread_Enable_dispatch>
2006b80: b0 10 20 09 mov 9, %i0
2006b84: 81 c7 e0 08 ret
2006b88: 81 e8 00 00 restore
return RTEMS_INVALID_ADDRESS;
2006b8c: b0 10 20 09 mov 9, %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2006b90: 81 c7 e0 08 ret
2006b94: 81 e8 00 00 restore
02006f04 <rtems_task_wake_when>:
*/
rtems_status_code rtems_task_wake_when(
rtems_time_of_day *time_buffer
)
{
2006f04: 9d e3 bf 98 save %sp, -104, %sp
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
2006f08: 03 00 80 6d sethi %hi(0x201b400), %g1
2006f0c: c2 08 62 54 ldub [ %g1 + 0x254 ], %g1 ! 201b654 <_TOD_Is_set>
*/
rtems_status_code rtems_task_wake_when(
rtems_time_of_day *time_buffer
)
{
2006f10: a0 10 00 18 mov %i0, %l0
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
2006f14: 80 a0 60 00 cmp %g1, 0
2006f18: 02 80 00 2c be 2006fc8 <rtems_task_wake_when+0xc4>
2006f1c: b0 10 20 0b mov 0xb, %i0
return RTEMS_NOT_DEFINED;
if ( !time_buffer )
2006f20: 80 a4 20 00 cmp %l0, 0
2006f24: 02 80 00 29 be 2006fc8 <rtems_task_wake_when+0xc4> <== NEVER TAKEN
2006f28: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
time_buffer->ticks = 0;
2006f2c: c0 24 20 18 clr [ %l0 + 0x18 ]
if ( !_TOD_Validate( time_buffer ) )
2006f30: 7f ff fc d0 call 2006270 <_TOD_Validate>
2006f34: 90 10 00 10 mov %l0, %o0
2006f38: 80 8a 20 ff btst 0xff, %o0
2006f3c: 22 80 00 23 be,a 2006fc8 <rtems_task_wake_when+0xc4>
2006f40: b0 10 20 14 mov 0x14, %i0
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( time_buffer );
2006f44: 7f ff fc 98 call 20061a4 <_TOD_To_seconds>
2006f48: 90 10 00 10 mov %l0, %o0
if ( seconds <= _TOD_Seconds_since_epoch )
2006f4c: 23 00 80 6d sethi %hi(0x201b400), %l1
2006f50: c2 04 62 d4 ld [ %l1 + 0x2d4 ], %g1 ! 201b6d4 <_TOD_Now>
2006f54: 80 a2 00 01 cmp %o0, %g1
2006f58: 08 80 00 1e bleu 2006fd0 <rtems_task_wake_when+0xcc>
2006f5c: b0 10 00 08 mov %o0, %i0
2006f60: 05 00 80 6d sethi %hi(0x201b400), %g2
2006f64: c2 00 a2 40 ld [ %g2 + 0x240 ], %g1 ! 201b640 <_Thread_Dispatch_disable_level>
2006f68: 82 00 60 01 inc %g1
2006f6c: c2 20 a2 40 st %g1, [ %g2 + 0x240 ]
return RTEMS_INVALID_CLOCK;
_Thread_Disable_dispatch();
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME );
2006f70: 21 00 80 6d sethi %hi(0x201b400), %l0
2006f74: d0 04 23 04 ld [ %l0 + 0x304 ], %o0 ! 201b704 <_Thread_Executing>
2006f78: 40 00 09 cb call 20096a4 <_Thread_Set_state>
2006f7c: 92 10 20 10 mov 0x10, %o1
_Watchdog_Initialize(
2006f80: c4 04 23 04 ld [ %l0 + 0x304 ], %g2
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
2006f84: 11 00 80 6d sethi %hi(0x201b400), %o0
2006f88: c2 00 a0 08 ld [ %g2 + 8 ], %g1
2006f8c: 90 12 23 18 or %o0, 0x318, %o0
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
2006f90: c2 20 a0 68 st %g1, [ %g2 + 0x68 ]
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2006f94: c2 04 62 d4 ld [ %l1 + 0x2d4 ], %g1
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
2006f98: 92 00 a0 48 add %g2, 0x48, %o1
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2006f9c: 82 26 00 01 sub %i0, %g1, %g1
2006fa0: c2 20 a0 54 st %g1, [ %g2 + 0x54 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2006fa4: 03 00 80 22 sethi %hi(0x2008800), %g1
2006fa8: 82 10 63 10 or %g1, 0x310, %g1 ! 2008b10 <_Thread_Delay_ended>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2006fac: c0 20 a0 50 clr [ %g2 + 0x50 ]
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
2006fb0: c0 20 a0 6c clr [ %g2 + 0x6c ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2006fb4: c2 20 a0 64 st %g1, [ %g2 + 0x64 ]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
2006fb8: 40 00 0b e4 call 2009f48 <_Watchdog_Insert>
2006fbc: b0 10 20 00 clr %i0
);
_Watchdog_Insert_seconds(
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch
);
_Thread_Enable_dispatch();
2006fc0: 40 00 07 45 call 2008cd4 <_Thread_Enable_dispatch>
2006fc4: 01 00 00 00 nop
2006fc8: 81 c7 e0 08 ret
2006fcc: 81 e8 00 00 restore
return RTEMS_SUCCESSFUL;
2006fd0: b0 10 20 14 mov 0x14, %i0
}
2006fd4: 81 c7 e0 08 ret
2006fd8: 81 e8 00 00 restore
02002dd8 <rtems_termios_bufsize>:
int cbufsize,
int raw_input,
int raw_output
)
{
rtems_termios_cbufsize = cbufsize;
2002dd8: 03 00 80 5b sethi %hi(0x2016c00), %g1 <== NOT EXECUTED
2002ddc: d0 20 62 54 st %o0, [ %g1 + 0x254 ] ! 2016e54 <rtems_termios_cbufsize><== NOT EXECUTED
rtems_termios_raw_input_size = raw_input;
2002de0: 03 00 80 5b sethi %hi(0x2016c00), %g1 <== NOT EXECUTED
rtems_termios_raw_output_size = raw_output;
return RTEMS_SUCCESSFUL;
}
2002de4: 90 10 20 00 clr %o0 <== NOT EXECUTED
int raw_input,
int raw_output
)
{
rtems_termios_cbufsize = cbufsize;
rtems_termios_raw_input_size = raw_input;
2002de8: d2 20 62 58 st %o1, [ %g1 + 0x258 ] <== NOT EXECUTED
rtems_termios_raw_output_size = raw_output;
2002dec: 03 00 80 5b sethi %hi(0x2016c00), %g1 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
2002df0: 81 c3 e0 08 retl <== NOT EXECUTED
2002df4: d4 20 62 5c st %o2, [ %g1 + 0x25c ] ! 2016e5c <rtems_termios_raw_output_size><== NOT EXECUTED
0200446c <rtems_termios_close>:
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
200446c: 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);
2004470: 03 00 80 5d sethi %hi(0x2017400), %g1
2004474: d0 00 62 d8 ld [ %g1 + 0x2d8 ], %o0 ! 20176d8 <rtems_termios_ttyMutex>
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
2004478: c2 06 00 00 ld [ %i0 ], %g1
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
200447c: 92 10 20 00 clr %o1
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
2004480: e0 00 60 28 ld [ %g1 + 0x28 ], %l0
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
2004484: 40 00 04 0e call 20054bc <rtems_semaphore_obtain>
2004488: 94 10 20 00 clr %o2
if (sc != RTEMS_SUCCESSFUL)
200448c: 80 a2 20 00 cmp %o0, 0
2004490: 12 80 00 26 bne 2004528 <rtems_termios_close+0xbc> <== NEVER TAKEN
2004494: 01 00 00 00 nop
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
2004498: c2 04 20 08 ld [ %l0 + 8 ], %g1
200449c: 82 00 7f ff add %g1, -1, %g1
20044a0: 80 a0 60 00 cmp %g1, 0
20044a4: 12 80 00 58 bne 2004604 <rtems_termios_close+0x198>
20044a8: c2 24 20 08 st %g1, [ %l0 + 8 ]
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
20044ac: c4 04 20 cc ld [ %l0 + 0xcc ], %g2
20044b0: 03 00 80 5c sethi %hi(0x2017000), %g1
20044b4: 85 28 a0 05 sll %g2, 5, %g2
20044b8: 82 10 63 ec or %g1, 0x3ec, %g1
20044bc: 82 00 40 02 add %g1, %g2, %g1
20044c0: c2 00 60 04 ld [ %g1 + 4 ], %g1
20044c4: 80 a0 60 00 cmp %g1, 0
20044c8: 02 80 00 06 be 20044e0 <rtems_termios_close+0x74> <== ALWAYS TAKEN
20044cc: 01 00 00 00 nop
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
20044d0: 9f c0 40 00 call %g1 <== NOT EXECUTED
20044d4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
* default: just flush output buffer
*/
drainOutput (tty);
}
if (tty->device.outputUsesInterrupts
20044d8: 10 80 00 05 b 20044ec <rtems_termios_close+0x80> <== NOT EXECUTED
20044dc: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 <== NOT EXECUTED
}
else {
/*
* default: just flush output buffer
*/
drainOutput (tty);
20044e0: 7f ff fd c2 call 2003be8 <drainOutput>
20044e4: 90 10 00 10 mov %l0, %o0
}
if (tty->device.outputUsesInterrupts
20044e8: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1
20044ec: 80 a0 60 02 cmp %g1, 2
20044f0: 32 80 00 10 bne,a 2004530 <rtems_termios_close+0xc4> <== ALWAYS TAKEN
20044f4: c2 04 20 9c ld [ %l0 + 0x9c ], %g1
== TERMIOS_TASK_DRIVEN) {
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send(
20044f8: d0 04 20 c4 ld [ %l0 + 0xc4 ], %o0 <== NOT EXECUTED
20044fc: 40 00 02 a2 call 2004f84 <rtems_event_send> <== NOT EXECUTED
2004500: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
tty->rxTaskId,
TERMIOS_RX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
2004504: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2004508: 12 80 00 08 bne 2004528 <rtems_termios_close+0xbc> <== NOT EXECUTED
200450c: 01 00 00 00 nop <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_event_send(
2004510: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0 <== NOT EXECUTED
2004514: 40 00 02 9c call 2004f84 <rtems_event_send> <== NOT EXECUTED
2004518: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
tty->txTaskId,
TERMIOS_TX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
200451c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2004520: 22 80 00 04 be,a 2004530 <rtems_termios_close+0xc4> <== NOT EXECUTED
2004524: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
2004528: 40 00 05 a7 call 2005bc4 <rtems_fatal_error_occurred> <== NOT EXECUTED
200452c: 01 00 00 00 nop <== NOT EXECUTED
}
if (tty->device.lastClose)
2004530: 80 a0 60 00 cmp %g1, 0
2004534: 22 80 00 07 be,a 2004550 <rtems_termios_close+0xe4> <== ALWAYS TAKEN
2004538: c2 04 00 00 ld [ %l0 ], %g1
(*tty->device.lastClose)(tty->major, tty->minor, arg);
200453c: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED
2004540: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 <== NOT EXECUTED
2004544: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004548: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED
if (tty->forw == NULL) {
200454c: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED
2004550: 80 a0 60 00 cmp %g1, 0
2004554: 12 80 00 08 bne 2004574 <rtems_termios_close+0x108> <== NEVER TAKEN
2004558: c4 04 20 04 ld [ %l0 + 4 ], %g2
rtems_termios_ttyTail = tty->back;
200455c: 03 00 80 5d sethi %hi(0x2017400), %g1
if ( rtems_termios_ttyTail != NULL ) {
2004560: 80 a0 a0 00 cmp %g2, 0
2004564: 02 80 00 05 be 2004578 <rtems_termios_close+0x10c> <== ALWAYS TAKEN
2004568: c4 20 62 dc st %g2, [ %g1 + 0x2dc ]
rtems_termios_ttyTail->forw = NULL;
200456c: 10 80 00 03 b 2004578 <rtems_termios_close+0x10c> <== NOT EXECUTED
2004570: c0 20 80 00 clr [ %g2 ] <== NOT EXECUTED
}
}
else {
tty->forw->back = tty->back;
2004574: c4 20 60 04 st %g2, [ %g1 + 4 ] <== NOT EXECUTED
}
if (tty->back == NULL) {
2004578: c2 04 20 04 ld [ %l0 + 4 ], %g1
200457c: 80 a0 60 00 cmp %g1, 0
2004580: 12 80 00 08 bne 20045a0 <rtems_termios_close+0x134> <== NEVER TAKEN
2004584: c4 04 00 00 ld [ %l0 ], %g2
rtems_termios_ttyHead = tty->forw;
2004588: 03 00 80 5d sethi %hi(0x2017400), %g1
if ( rtems_termios_ttyHead != NULL ) {
200458c: 80 a0 a0 00 cmp %g2, 0
2004590: 02 80 00 05 be 20045a4 <rtems_termios_close+0x138> <== ALWAYS TAKEN
2004594: c4 20 62 e0 st %g2, [ %g1 + 0x2e0 ]
rtems_termios_ttyHead->back = NULL;
2004598: 10 80 00 03 b 20045a4 <rtems_termios_close+0x138> <== NOT EXECUTED
200459c: c0 20 a0 04 clr [ %g2 + 4 ] <== NOT EXECUTED
}
}
else {
tty->back->forw = tty->forw;
20045a0: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED
}
rtems_semaphore_delete (tty->isem);
20045a4: 40 00 03 98 call 2005404 <rtems_semaphore_delete>
20045a8: d0 04 20 14 ld [ %l0 + 0x14 ], %o0
rtems_semaphore_delete (tty->osem);
20045ac: 40 00 03 96 call 2005404 <rtems_semaphore_delete>
20045b0: d0 04 20 18 ld [ %l0 + 0x18 ], %o0
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
20045b4: 40 00 03 94 call 2005404 <rtems_semaphore_delete>
20045b8: d0 04 20 8c ld [ %l0 + 0x8c ], %o0
if ((tty->device.pollRead == NULL) ||
20045bc: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1
20045c0: 80 a0 60 00 cmp %g1, 0
20045c4: 02 80 00 06 be 20045dc <rtems_termios_close+0x170> <== NEVER TAKEN
20045c8: 01 00 00 00 nop
20045cc: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1
20045d0: 80 a0 60 02 cmp %g1, 2
20045d4: 12 80 00 04 bne 20045e4 <rtems_termios_close+0x178> <== ALWAYS TAKEN
20045d8: 01 00 00 00 nop
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
20045dc: 40 00 03 8a call 2005404 <rtems_semaphore_delete> <== NOT EXECUTED
20045e0: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED
free (tty->rawInBuf.theBuf);
20045e4: 40 00 17 1c call 200a254 <free>
20045e8: d0 04 20 58 ld [ %l0 + 0x58 ], %o0
free (tty->rawOutBuf.theBuf);
20045ec: 40 00 17 1a call 200a254 <free>
20045f0: d0 04 20 7c ld [ %l0 + 0x7c ], %o0
free (tty->cbuf);
20045f4: 40 00 17 18 call 200a254 <free>
20045f8: d0 04 20 1c ld [ %l0 + 0x1c ], %o0
free (tty);
20045fc: 40 00 17 16 call 200a254 <free>
2004600: 90 10 00 10 mov %l0, %o0
}
rtems_semaphore_release (rtems_termios_ttyMutex);
2004604: 03 00 80 5d sethi %hi(0x2017400), %g1
2004608: d0 00 62 d8 ld [ %g1 + 0x2d8 ], %o0 ! 20176d8 <rtems_termios_ttyMutex>
200460c: 40 00 03 f3 call 20055d8 <rtems_semaphore_release>
2004610: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
}
2004614: 81 c7 e0 08 ret
2004618: 81 e8 00 00 restore
02003004 <rtems_termios_dequeue_characters>:
* for each transmitted character.
* It returns number of characters left to transmit
*/
int
rtems_termios_dequeue_characters (void *ttyp, int len)
{
2003004: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
2003008: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
200300c: c4 06 20 b4 ld [ %i0 + 0xb4 ], %g2 <== NOT EXECUTED
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
2003010: 82 00 40 19 add %g1, %i1, %g1 <== NOT EXECUTED
2003014: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
2003018: 80 a0 a0 02 cmp %g2, 2 <== NOT EXECUTED
200301c: 12 80 00 0a bne 2003044 <rtems_termios_dequeue_characters+0x40><== NOT EXECUTED
2003020: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId,
2003024: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 <== NOT EXECUTED
2003028: 40 00 07 d7 call 2004f84 <rtems_event_send> <== NOT EXECUTED
200302c: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
TERMIOS_TX_START_EVENT);
if (sc != RTEMS_SUCCESSFUL)
2003030: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2003034: 02 80 00 11 be 2003078 <rtems_termios_dequeue_characters+0x74><== NOT EXECUTED
2003038: b0 10 20 00 clr %i0 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
200303c: 40 00 0a e2 call 2005bc4 <rtems_fatal_error_occurred> <== NOT EXECUTED
2003040: 01 00 00 00 nop <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */
}
else if (tty->t_line == PPPDISC ) {
2003044: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED
2003048: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED
200304c: 12 80 00 09 bne 2003070 <rtems_termios_dequeue_characters+0x6c><== NOT EXECUTED
2003050: 03 00 80 5d sethi %hi(0x2017400), %g1 <== NOT EXECUTED
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
2003054: c2 00 60 a0 ld [ %g1 + 0xa0 ], %g1 ! 20174a0 <rtems_termios_linesw+0xb4><== NOT EXECUTED
2003058: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200305c: 02 80 00 07 be 2003078 <rtems_termios_dequeue_characters+0x74><== NOT EXECUTED
2003060: b0 10 20 00 clr %i0 <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
2003064: 9f c0 40 00 call %g1 <== NOT EXECUTED
2003068: 01 00 00 00 nop <== NOT EXECUTED
200306c: 30 80 00 03 b,a 2003078 <rtems_termios_dequeue_characters+0x74><== NOT EXECUTED
}
return 0; /* nothing to output in IRQ... */
}
else {
return rtems_termios_refill_transmitter(tty);
2003070: 7f ff ff 68 call 2002e10 <rtems_termios_refill_transmitter><== NOT EXECUTED
2003074: 81 e8 00 00 restore <== NOT EXECUTED
}
}
2003078: 81 c7 e0 08 ret <== NOT EXECUTED
200307c: 81 e8 00 00 restore <== NOT EXECUTED
02003080 <rtems_termios_enqueue_raw_characters>:
* 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)
{
2003080: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
char c;
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
2003084: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED
2003088: 05 00 80 5c sethi %hi(0x2017000), %g2 <== NOT EXECUTED
200308c: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED
2003090: 84 10 a3 ec or %g2, 0x3ec, %g2 <== NOT EXECUTED
2003094: 82 00 60 10 add %g1, 0x10, %g1 <== NOT EXECUTED
2003098: c2 00 80 01 ld [ %g2 + %g1 ], %g1 <== NOT EXECUTED
200309c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20030a0: 12 80 00 10 bne 20030e0 <rtems_termios_enqueue_raw_characters+0x60><== NOT EXECUTED
20030a4: a0 10 00 02 mov %g2, %l0 <== NOT EXECUTED
if ((tty->flow_ctrl & FL_OSTOP) ||
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
20030a8: ac 06 20 4a add %i0, 0x4a, %l6 <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
20030ac: aa 06 20 30 add %i0, 0x30, %l5 <== NOT EXECUTED
20030b0: a2 10 20 00 clr %l1 <== NOT EXECUTED
20030b4: 10 80 00 ac b 2003364 <rtems_termios_enqueue_raw_characters+0x2e4><== NOT EXECUTED
20030b8: a4 10 20 00 clr %l2 <== NOT EXECUTED
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
c = *buf++;
20030bc: d0 0e 40 00 ldub [ %i1 ], %o0 <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
20030c0: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED
20030c4: 82 00 60 10 add %g1, 0x10, %g1 <== NOT EXECUTED
20030c8: c2 04 00 01 ld [ %l0 + %g1 ], %g1 <== NOT EXECUTED
20030cc: 91 2a 20 18 sll %o0, 0x18, %o0 <== NOT EXECUTED
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
c = *buf++;
20030d0: b2 06 60 01 inc %i1 <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
20030d4: 91 3a 20 18 sra %o0, 0x18, %o0 <== NOT EXECUTED
20030d8: 9f c0 40 00 call %g1 <== NOT EXECUTED
20030dc: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
20030e0: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED
20030e4: 80 a6 bf ff cmp %i2, -1 <== NOT EXECUTED
20030e8: 32 bf ff f5 bne,a 20030bc <rtems_termios_enqueue_raw_characters+0x3c><== NOT EXECUTED
20030ec: 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 )) {
20030f0: c2 06 20 e4 ld [ %i0 + 0xe4 ], %g1 <== NOT EXECUTED
20030f4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20030f8: 12 80 00 a6 bne 2003390 <rtems_termios_enqueue_raw_characters+0x310><== NOT EXECUTED
20030fc: a2 10 20 00 clr %l1 <== NOT EXECUTED
2003100: c2 06 20 dc ld [ %i0 + 0xdc ], %g1 <== NOT EXECUTED
2003104: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003108: 22 80 00 a3 be,a 2003394 <rtems_termios_enqueue_raw_characters+0x314><== NOT EXECUTED
200310c: b0 10 00 11 mov %l1, %i0 <== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
2003110: d2 06 20 e0 ld [ %i0 + 0xe0 ], %o1 <== NOT EXECUTED
2003114: 9f c0 40 00 call %g1 <== NOT EXECUTED
2003118: 90 06 20 30 add %i0, 0x30, %o0 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
200311c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
2003120: a2 10 20 00 clr %l1 <== NOT EXECUTED
2003124: 10 80 00 9b b 2003390 <rtems_termios_enqueue_raw_characters+0x310><== NOT EXECUTED
2003128: c2 26 20 e4 st %g1, [ %i0 + 0xe4 ] <== NOT EXECUTED
while (len--) {
c = *buf++;
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
200312c: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
2003130: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED
2003134: 02 80 00 1a be 200319c <rtems_termios_enqueue_raw_characters+0x11c><== NOT EXECUTED
2003138: e8 0e 40 00 ldub [ %i1 ], %l4 <== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
200313c: c4 0e 20 4a ldub [ %i0 + 0x4a ], %g2 <== NOT EXECUTED
2003140: 83 2d 20 18 sll %l4, 0x18, %g1 <== NOT EXECUTED
2003144: 87 38 60 18 sra %g1, 0x18, %g3 <== NOT EXECUTED
2003148: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED
200314c: 12 80 00 0c bne 200317c <rtems_termios_enqueue_raw_characters+0xfc><== NOT EXECUTED
2003150: c2 0e 20 49 ldub [ %i0 + 0x49 ], %g1 <== NOT EXECUTED
if (c == tty->termios.c_cc[VSTART]) {
2003154: 82 08 60 ff and %g1, 0xff, %g1 <== NOT EXECUTED
2003158: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED
200315c: 12 80 00 05 bne 2003170 <rtems_termios_enqueue_raw_characters+0xf0><== NOT EXECUTED
2003160: 01 00 00 00 nop <== NOT EXECUTED
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
2003164: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
2003168: 10 80 00 0b b 2003194 <rtems_termios_enqueue_raw_characters+0x114><== NOT EXECUTED
200316c: 82 18 60 10 xor %g1, 0x10, %g1 <== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
2003170: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
2003174: 10 80 00 08 b 2003194 <rtems_termios_enqueue_raw_characters+0x114><== NOT EXECUTED
2003178: 82 10 60 10 or %g1, 0x10, %g1 <== NOT EXECUTED
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
200317c: 82 08 60 ff and %g1, 0xff, %g1 <== NOT EXECUTED
2003180: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED
2003184: 12 80 00 07 bne 20031a0 <rtems_termios_enqueue_raw_characters+0x120><== NOT EXECUTED
2003188: 80 8c a0 ff btst 0xff, %l2 <== NOT EXECUTED
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
200318c: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
2003190: 82 08 7f ef and %g1, -17, %g1 <== NOT EXECUTED
2003194: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED
2003198: 30 80 00 04 b,a 20031a8 <rtems_termios_enqueue_raw_characters+0x128><== NOT EXECUTED
flow_rcv = true;
}
}
if (flow_rcv) {
200319c: 80 8c a0 ff btst 0xff, %l2 <== NOT EXECUTED
20031a0: 02 80 00 1d be 2003214 <rtems_termios_enqueue_raw_characters+0x194><== NOT EXECUTED
20031a4: 01 00 00 00 nop <== NOT EXECUTED
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
20031a8: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
20031ac: 82 08 60 30 and %g1, 0x30, %g1 <== NOT EXECUTED
20031b0: 80 a0 60 20 cmp %g1, 0x20 <== NOT EXECUTED
20031b4: 12 80 00 6b bne 2003360 <rtems_termios_enqueue_raw_characters+0x2e0><== NOT EXECUTED
20031b8: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
20031bc: 7f ff fa ec call 2001d6c <sparc_disable_interrupts> <== NOT EXECUTED
20031c0: 01 00 00 00 nop <== NOT EXECUTED
20031c4: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
20031c8: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
20031cc: 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;
20031d0: 82 08 7f df and %g1, -33, %g1 <== NOT EXECUTED
20031d4: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
20031d8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
20031dc: 02 80 00 09 be 2003200 <rtems_termios_enqueue_raw_characters+0x180><== NOT EXECUTED
20031e0: 01 00 00 00 nop <== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
20031e4: d2 06 20 84 ld [ %i0 + 0x84 ], %o1 <== NOT EXECUTED
20031e8: c2 06 20 7c ld [ %i0 + 0x7c ], %g1 <== NOT EXECUTED
20031ec: c4 06 20 a4 ld [ %i0 + 0xa4 ], %g2 <== NOT EXECUTED
20031f0: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED
20031f4: 92 00 40 09 add %g1, %o1, %o1 <== NOT EXECUTED
20031f8: 9f c0 80 00 call %g2 <== NOT EXECUTED
20031fc: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
2003200: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED
2003204: 7f ff fa de call 2001d7c <sparc_enable_interrupts> <== NOT EXECUTED
2003208: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
200320c: 10 80 00 56 b 2003364 <rtems_termios_enqueue_raw_characters+0x2e4><== NOT EXECUTED
2003210: b2 06 60 01 inc %i1 <== NOT EXECUTED
/* reenable interrupts */
rtems_interrupt_enable(level);
}
}
else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
2003214: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 <== NOT EXECUTED
2003218: d2 06 20 64 ld [ %i0 + 0x64 ], %o1 <== NOT EXECUTED
200321c: 40 00 43 15 call 2013e70 <.urem> <== NOT EXECUTED
2003220: 90 02 20 01 inc %o0 <== NOT EXECUTED
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
2003224: 7f ff fa d2 call 2001d6c <sparc_disable_interrupts> <== NOT EXECUTED
2003228: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
200322c: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
2003230: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED
2003234: d0 06 20 64 ld [ %i0 + 0x64 ], %o0 <== NOT EXECUTED
2003238: d2 06 20 64 ld [ %i0 + 0x64 ], %o1 <== NOT EXECUTED
200323c: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED
2003240: 40 00 43 0c call 2013e70 <.urem> <== NOT EXECUTED
2003244: 90 02 00 10 add %o0, %l0, %o0 <== NOT EXECUTED
2003248: c2 06 20 c0 ld [ %i0 + 0xc0 ], %g1 <== NOT EXECUTED
200324c: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED
2003250: 08 80 00 2d bleu 2003304 <rtems_termios_enqueue_raw_characters+0x284><== NOT EXECUTED
2003254: 01 00 00 00 nop <== NOT EXECUTED
2003258: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
200325c: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED
2003260: 12 80 00 29 bne 2003304 <rtems_termios_enqueue_raw_characters+0x284><== NOT EXECUTED
2003264: 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;
2003268: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
200326c: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED
2003270: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
2003274: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
2003278: 82 08 64 02 and %g1, 0x402, %g1 <== NOT EXECUTED
200327c: 80 a0 64 00 cmp %g1, 0x400 <== NOT EXECUTED
2003280: 12 80 00 13 bne 20032cc <rtems_termios_enqueue_raw_characters+0x24c><== NOT EXECUTED
2003284: 01 00 00 00 nop <== NOT EXECUTED
== (FL_MDXOF ) ){
if ((tty->flow_ctrl & FL_OSTOP) ||
2003288: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
200328c: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
2003290: 12 80 00 06 bne 20032a8 <rtems_termios_enqueue_raw_characters+0x228><== NOT EXECUTED
2003294: 01 00 00 00 nop <== NOT EXECUTED
2003298: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED
200329c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20032a0: 12 80 00 19 bne 2003304 <rtems_termios_enqueue_raw_characters+0x284><== NOT EXECUTED
20032a4: 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;
20032a8: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
20032ac: c4 06 20 a4 ld [ %i0 + 0xa4 ], %g2 <== NOT EXECUTED
20032b0: 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;
20032b4: 82 10 60 02 or %g1, 2, %g1 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
20032b8: 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;
20032bc: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED
(*tty->device.write)(tty->minor,
20032c0: 9f c0 80 00 call %g2 <== NOT EXECUTED
20032c4: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
20032c8: 30 80 00 0f b,a 2003304 <rtems_termios_enqueue_raw_characters+0x284><== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]),
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
20032cc: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
20032d0: 82 08 61 04 and %g1, 0x104, %g1 <== NOT EXECUTED
20032d4: 80 a0 61 00 cmp %g1, 0x100 <== NOT EXECUTED
20032d8: 12 80 00 0b bne 2003304 <rtems_termios_enqueue_raw_characters+0x284><== NOT EXECUTED
20032dc: 01 00 00 00 nop <== NOT EXECUTED
== (FL_MDRTS ) ) {
tty->flow_ctrl |= FL_IRTSOFF;
20032e0: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
20032e4: 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;
20032e8: 82 10 60 04 or %g1, 4, %g1 <== NOT EXECUTED
20032ec: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
20032f0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
20032f4: 02 80 00 04 be 2003304 <rtems_termios_enqueue_raw_characters+0x284><== NOT EXECUTED
20032f8: 01 00 00 00 nop <== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
20032fc: 9f c0 80 00 call %g2 <== NOT EXECUTED
2003300: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED
}
}
}
/* reenable interrupts */
rtems_interrupt_enable(level);
2003304: 7f ff fa 9e call 2001d7c <sparc_enable_interrupts> <== NOT EXECUTED
2003308: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
if (newTail == tty->rawInBuf.Head) {
200330c: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED
2003310: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED
2003314: 32 80 00 04 bne,a 2003324 <rtems_termios_enqueue_raw_characters+0x2a4><== NOT EXECUTED
2003318: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 <== NOT EXECUTED
dropped++;
200331c: 10 80 00 11 b 2003360 <rtems_termios_enqueue_raw_characters+0x2e0><== NOT EXECUTED
2003320: a2 04 60 01 inc %l1 <== NOT EXECUTED
}
else {
tty->rawInBuf.theBuf[newTail] = c;
2003324: e8 28 40 10 stb %l4, [ %g1 + %l0 ] <== NOT EXECUTED
tty->rawInBuf.Tail = newTail;
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
2003328: c2 06 20 e4 ld [ %i0 + 0xe4 ], %g1 <== NOT EXECUTED
if (newTail == tty->rawInBuf.Head) {
dropped++;
}
else {
tty->rawInBuf.theBuf[newTail] = c;
tty->rawInBuf.Tail = newTail;
200332c: 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 )) {
2003330: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003334: 32 80 00 0c bne,a 2003364 <rtems_termios_enqueue_raw_characters+0x2e4><== NOT EXECUTED
2003338: b2 06 60 01 inc %i1 <== NOT EXECUTED
200333c: c2 06 20 dc ld [ %i0 + 0xdc ], %g1 <== NOT EXECUTED
2003340: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003344: 22 80 00 08 be,a 2003364 <rtems_termios_enqueue_raw_characters+0x2e4><== NOT EXECUTED
2003348: b2 06 60 01 inc %i1 <== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
200334c: d2 06 20 e0 ld [ %i0 + 0xe0 ], %o1 <== NOT EXECUTED
2003350: 9f c0 40 00 call %g1 <== NOT EXECUTED
2003354: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
2003358: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
200335c: c2 26 20 e4 st %g1, [ %i0 + 0xe4 ] <== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
2003360: b2 06 60 01 inc %i1 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
2003364: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED
2003368: 80 a6 bf ff cmp %i2, -1 <== NOT EXECUTED
200336c: 12 bf ff 70 bne 200312c <rtems_termios_enqueue_raw_characters+0xac><== NOT EXECUTED
2003370: 01 00 00 00 nop <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
}
}
}
tty->rawInBufDropped += dropped;
2003374: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 <== NOT EXECUTED
rtems_semaphore_release (tty->rawInBuf.Semaphore);
2003378: d0 06 20 68 ld [ %i0 + 0x68 ], %o0 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
}
}
}
tty->rawInBufDropped += dropped;
200337c: 82 00 40 11 add %g1, %l1, %g1 <== NOT EXECUTED
rtems_semaphore_release (tty->rawInBuf.Semaphore);
2003380: 40 00 08 96 call 20055d8 <rtems_semaphore_release> <== NOT EXECUTED
2003384: c2 26 20 78 st %g1, [ %i0 + 0x78 ] <== NOT EXECUTED
return dropped;
}
2003388: 81 c7 e0 08 ret <== NOT EXECUTED
200338c: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED
2003390: b0 10 00 11 mov %l1, %i0 <== NOT EXECUTED
2003394: 81 c7 e0 08 ret <== NOT EXECUTED
2003398: 81 e8 00 00 restore <== NOT EXECUTED
02002d8c <rtems_termios_initialize>:
struct rtems_termios_tty *rtems_termios_ttyTail;
rtems_id rtems_termios_ttyMutex;
void
rtems_termios_initialize (void)
{
2002d8c: 9d e3 bf 98 save %sp, -104, %sp
rtems_status_code sc;
/*
* Create the mutex semaphore for the tty list
*/
if (!rtems_termios_ttyMutex) {
2002d90: 03 00 80 5d sethi %hi(0x2017400), %g1
2002d94: c4 00 62 d8 ld [ %g1 + 0x2d8 ], %g2 ! 20176d8 <rtems_termios_ttyMutex>
2002d98: 80 a0 a0 00 cmp %g2, 0
2002d9c: 12 80 00 0d bne 2002dd0 <rtems_termios_initialize+0x44> <== NEVER TAKEN
2002da0: 98 10 62 d8 or %g1, 0x2d8, %o4
sc = rtems_semaphore_create (
2002da4: 11 15 14 9b sethi %hi(0x54526c00), %o0
2002da8: 92 10 20 01 mov 1, %o1
2002dac: 90 12 21 69 or %o0, 0x169, %o0
2002db0: 94 10 20 54 mov 0x54, %o2
2002db4: 40 00 09 1c call 2005224 <rtems_semaphore_create>
2002db8: 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)
2002dbc: 80 a2 20 00 cmp %o0, 0
2002dc0: 02 80 00 04 be 2002dd0 <rtems_termios_initialize+0x44> <== ALWAYS TAKEN
2002dc4: 01 00 00 00 nop
rtems_fatal_error_occurred (sc);
2002dc8: 40 00 0b 7f call 2005bc4 <rtems_fatal_error_occurred> <== NOT EXECUTED
2002dcc: 01 00 00 00 nop <== NOT EXECUTED
2002dd0: 81 c7 e0 08 ret
2002dd4: 81 e8 00 00 restore
02004060 <rtems_termios_ioctl>:
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
2004060: 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;
2004064: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
2004068: 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;
200406c: e2 00 60 28 ld [ %g1 + 0x28 ], %l1 <== NOT EXECUTED
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
2004070: 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);
2004074: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 <== NOT EXECUTED
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
2004078: 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);
200407c: 92 10 20 00 clr %o1 <== NOT EXECUTED
2004080: 40 00 05 0f call 20054bc <rtems_semaphore_obtain> <== NOT EXECUTED
2004084: 94 10 20 00 clr %o2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
2004088: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
200408c: 22 80 00 05 be,a 20040a0 <rtems_termios_ioctl+0x40> <== NOT EXECUTED
2004090: c4 04 a0 04 ld [ %l2 + 4 ], %g2 <== NOT EXECUTED
args->ioctl_return = sc;
2004094: f0 24 a0 0c st %i0, [ %l2 + 0xc ] <== NOT EXECUTED
2004098: 81 c7 e0 08 ret <== NOT EXECUTED
200409c: 81 e8 00 00 restore <== NOT EXECUTED
return sc;
}
switch (args->command) {
20040a0: 80 a0 a0 04 cmp %g2, 4 <== NOT EXECUTED
20040a4: 22 80 00 bf be,a 20043a0 <rtems_termios_ioctl+0x340> <== NOT EXECUTED
20040a8: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED
20040ac: 18 80 00 0b bgu 20040d8 <rtems_termios_ioctl+0x78> <== NOT EXECUTED
20040b0: 03 10 01 19 sethi %hi(0x40046400), %g1 <== NOT EXECUTED
20040b4: 80 a0 a0 02 cmp %g2, 2 <== NOT EXECUTED
20040b8: 22 80 00 2c be,a 2004168 <rtems_termios_ioctl+0x108> <== NOT EXECUTED
20040bc: d2 04 a0 08 ld [ %l2 + 8 ], %o1 <== NOT EXECUTED
20040c0: 18 80 00 b1 bgu 2004384 <rtems_termios_ioctl+0x324> <== NOT EXECUTED
20040c4: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED
20040c8: 32 80 00 17 bne,a 2004124 <rtems_termios_ioctl+0xc4> <== NOT EXECUTED
20040cc: 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;
20040d0: 10 80 00 22 b 2004158 <rtems_termios_ioctl+0xf8> <== NOT EXECUTED
20040d4: d0 04 a0 08 ld [ %l2 + 8 ], %o0 <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
20040d8: 82 10 62 7f or %g1, 0x27f, %g1 <== NOT EXECUTED
20040dc: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
20040e0: 02 80 00 d1 be 2004424 <rtems_termios_ioctl+0x3c4> <== NOT EXECUTED
20040e4: 01 00 00 00 nop <== NOT EXECUTED
20040e8: 38 80 00 07 bgu,a 2004104 <rtems_termios_ioctl+0xa4> <== NOT EXECUTED
20040ec: 03 10 01 1d sethi %hi(0x40047400), %g1 <== NOT EXECUTED
20040f0: 80 a0 a0 05 cmp %g2, 5 <== NOT EXECUTED
20040f4: 32 80 00 0c bne,a 2004124 <rtems_termios_ioctl+0xc4> <== NOT EXECUTED
20040f8: c4 04 60 cc ld [ %l1 + 0xcc ], %g2 <== NOT EXECUTED
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
break;
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
20040fc: 10 80 00 a5 b 2004390 <rtems_termios_ioctl+0x330> <== NOT EXECUTED
2004100: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
2004104: 82 10 60 1a or %g1, 0x1a, %g1 <== NOT EXECUTED
2004108: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
200410c: 02 80 00 c2 be 2004414 <rtems_termios_ioctl+0x3b4> <== NOT EXECUTED
2004110: 03 20 01 1d sethi %hi(0x80047400), %g1 <== NOT EXECUTED
2004114: 82 10 60 1b or %g1, 0x1b, %g1 ! 8004741b <RAM_END+0x7dc4741b><== NOT EXECUTED
2004118: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
200411c: 02 80 00 a5 be 20043b0 <rtems_termios_ioctl+0x350> <== NOT EXECUTED
2004120: c4 04 60 cc ld [ %l1 + 0xcc ], %g2 <== NOT EXECUTED
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
2004124: 03 00 80 5c sethi %hi(0x2017000), %g1 <== NOT EXECUTED
2004128: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED
200412c: 82 10 63 ec or %g1, 0x3ec, %g1 <== NOT EXECUTED
2004130: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED
2004134: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED
2004138: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200413c: 02 80 00 c7 be 2004458 <rtems_termios_ioctl+0x3f8> <== NOT EXECUTED
2004140: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
2004144: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
2004148: 9f c0 40 00 call %g1 <== NOT EXECUTED
200414c: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
tty->t_sc = NULL; /* ensure that no more valid data */
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
2004150: 10 80 00 c2 b 2004458 <rtems_termios_ioctl+0x3f8> <== NOT EXECUTED
2004154: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
2004158: 92 04 60 30 add %l1, 0x30, %o1 <== NOT EXECUTED
200415c: 40 00 25 c0 call 200d85c <memcpy> <== NOT EXECUTED
2004160: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED
2004164: 30 80 00 bd b,a 2004458 <rtems_termios_ioctl+0x3f8> <== NOT EXECUTED
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
2004168: 90 04 60 30 add %l1, 0x30, %o0 <== NOT EXECUTED
200416c: 40 00 25 bc call 200d85c <memcpy> <== NOT EXECUTED
2004170: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
2004174: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED
2004178: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED
200417c: 02 80 00 20 be 20041fc <rtems_termios_ioctl+0x19c> <== NOT EXECUTED
2004180: 01 00 00 00 nop <== NOT EXECUTED
2004184: c2 04 60 30 ld [ %l1 + 0x30 ], %g1 <== NOT EXECUTED
2004188: 80 88 64 00 btst 0x400, %g1 <== NOT EXECUTED
200418c: 12 80 00 1c bne 20041fc <rtems_termios_ioctl+0x19c> <== NOT EXECUTED
2004190: 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);
2004194: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED
2004198: 82 08 7d ef and %g1, -529, %g1 <== NOT EXECUTED
200419c: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
20041a0: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED
20041a4: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
20041a8: 02 80 00 15 be 20041fc <rtems_termios_ioctl+0x19c> <== NOT EXECUTED
20041ac: 01 00 00 00 nop <== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
20041b0: 7f ff f6 ef call 2001d6c <sparc_disable_interrupts> <== NOT EXECUTED
20041b4: 01 00 00 00 nop <== NOT EXECUTED
20041b8: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
20041bc: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
20041c0: 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;
20041c4: 82 08 7f df and %g1, -33, %g1 <== NOT EXECUTED
20041c8: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
20041cc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
20041d0: 02 80 00 09 be 20041f4 <rtems_termios_ioctl+0x194> <== NOT EXECUTED
20041d4: 01 00 00 00 nop <== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
20041d8: d2 04 60 84 ld [ %l1 + 0x84 ], %o1 <== NOT EXECUTED
20041dc: c2 04 60 7c ld [ %l1 + 0x7c ], %g1 <== NOT EXECUTED
20041e0: c4 04 60 a4 ld [ %l1 + 0xa4 ], %g2 <== NOT EXECUTED
20041e4: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED
20041e8: 92 00 40 09 add %g1, %o1, %o1 <== NOT EXECUTED
20041ec: 9f c0 80 00 call %g2 <== NOT EXECUTED
20041f0: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
20041f4: 7f ff f6 e2 call 2001d7c <sparc_enable_interrupts> <== NOT EXECUTED
20041f8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) &&
20041fc: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED
2004200: 80 88 64 00 btst 0x400, %g1 <== NOT EXECUTED
2004204: 02 80 00 0c be 2004234 <rtems_termios_ioctl+0x1d4> <== NOT EXECUTED
2004208: 03 00 00 04 sethi %hi(0x1000), %g1 <== NOT EXECUTED
200420c: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED
2004210: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED
2004214: 12 80 00 08 bne 2004234 <rtems_termios_ioctl+0x1d4> <== NOT EXECUTED
2004218: 01 00 00 00 nop <== NOT EXECUTED
!(tty->termios.c_iflag & IXOFF)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
200421c: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED
2004220: 82 08 7b ff and %g1, -1025, %g1 <== NOT EXECUTED
2004224: 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);
2004228: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED
200422c: 82 08 7f fd and %g1, -3, %g1 <== NOT EXECUTED
2004230: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) &&
2004234: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED
2004238: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED
200423c: 02 80 00 16 be 2004294 <rtems_termios_ioctl+0x234> <== NOT EXECUTED
2004240: c2 04 60 38 ld [ %l1 + 0x38 ], %g1 <== NOT EXECUTED
2004244: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004248: 06 80 00 14 bl 2004298 <rtems_termios_ioctl+0x238> <== NOT EXECUTED
200424c: 01 00 00 00 nop <== NOT EXECUTED
!(tty->termios.c_cflag & CRTSCTS)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
2004250: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED
2004254: 82 08 7e ff and %g1, -257, %g1 <== NOT EXECUTED
2004258: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) &&
200425c: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED
2004260: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED
2004264: 02 80 00 08 be 2004284 <rtems_termios_ioctl+0x224> <== NOT EXECUTED
2004268: 01 00 00 00 nop <== NOT EXECUTED
200426c: c2 04 60 b0 ld [ %l1 + 0xb0 ], %g1 <== NOT EXECUTED
2004270: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004274: 02 80 00 04 be 2004284 <rtems_termios_ioctl+0x224> <== NOT EXECUTED
2004278: 01 00 00 00 nop <== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) {
tty->device.startRemoteTx(tty->minor);
200427c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004280: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
2004284: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED
2004288: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED
200428c: 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) {
2004290: c2 04 60 38 ld [ %l1 + 0x38 ], %g1 <== NOT EXECUTED
2004294: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004298: 36 80 00 06 bge,a 20042b0 <rtems_termios_ioctl+0x250> <== NOT EXECUTED
200429c: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED
tty->flow_ctrl |= FL_MDRTS;
20042a0: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED
20042a4: 82 10 61 00 or %g1, 0x100, %g1 <== NOT EXECUTED
20042a8: 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) {
20042ac: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED
20042b0: 03 00 00 04 sethi %hi(0x1000), %g1 <== NOT EXECUTED
20042b4: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED
20042b8: 22 80 00 06 be,a 20042d0 <rtems_termios_ioctl+0x270> <== NOT EXECUTED
20042bc: c2 04 60 30 ld [ %l1 + 0x30 ], %g1 <== NOT EXECUTED
tty->flow_ctrl |= FL_MDXOF;
20042c0: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED
20042c4: 82 10 64 00 or %g1, 0x400, %g1 <== NOT EXECUTED
20042c8: 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) {
20042cc: c2 04 60 30 ld [ %l1 + 0x30 ], %g1 <== NOT EXECUTED
20042d0: 80 88 64 00 btst 0x400, %g1 <== NOT EXECUTED
20042d4: 22 80 00 06 be,a 20042ec <rtems_termios_ioctl+0x28c> <== NOT EXECUTED
20042d8: c2 04 60 3c ld [ %l1 + 0x3c ], %g1 <== NOT EXECUTED
tty->flow_ctrl |= FL_MDXON;
20042dc: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED
20042e0: 82 10 62 00 or %g1, 0x200, %g1 <== NOT EXECUTED
20042e4: 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) {
20042e8: c2 04 60 3c ld [ %l1 + 0x3c ], %g1 <== NOT EXECUTED
20042ec: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED
20042f0: 32 80 00 19 bne,a 2004354 <rtems_termios_ioctl+0x2f4> <== NOT EXECUTED
20042f4: c0 24 60 6c clr [ %l1 + 0x6c ] <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
rtems_interval ticksPerSecond;
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond);
20042f8: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED
20042fc: 40 00 02 22 call 2004b84 <rtems_clock_get> <== NOT EXECUTED
2004300: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED
tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10;
2004304: d2 07 bf f4 ld [ %fp + -12 ], %o1 <== NOT EXECUTED
2004308: e0 0c 60 46 ldub [ %l1 + 0x46 ], %l0 <== NOT EXECUTED
200430c: 40 00 3d f3 call 2013ad8 <.umul> <== NOT EXECUTED
2004310: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2004314: 40 00 3e 2b call 2013bc0 <.udiv> <== NOT EXECUTED
2004318: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED
200431c: d0 24 60 54 st %o0, [ %l1 + 0x54 ] <== NOT EXECUTED
if (tty->termios.c_cc[VTIME]) {
2004320: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED
2004324: 02 80 00 08 be 2004344 <rtems_termios_ioctl+0x2e4> <== NOT EXECUTED
2004328: c2 0c 60 47 ldub [ %l1 + 0x47 ], %g1 <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
200432c: c0 24 60 6c clr [ %l1 + 0x6c ] <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
2004330: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004334: 12 80 00 09 bne 2004358 <rtems_termios_ioctl+0x2f8> <== NOT EXECUTED
2004338: d0 24 60 70 st %o0, [ %l1 + 0x70 ] <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
200433c: 10 80 00 0a b 2004364 <rtems_termios_ioctl+0x304> <== NOT EXECUTED
2004340: d0 24 60 74 st %o0, [ %l1 + 0x74 ] <== NOT EXECUTED
}
else {
if (tty->termios.c_cc[VMIN]) {
2004344: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004348: 02 80 00 06 be 2004360 <rtems_termios_ioctl+0x300> <== NOT EXECUTED
200434c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
2004350: c0 24 60 6c clr [ %l1 + 0x6c ] <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
2004354: c0 24 60 70 clr [ %l1 + 0x70 ] <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
2004358: 10 80 00 03 b 2004364 <rtems_termios_ioctl+0x304> <== NOT EXECUTED
200435c: c0 24 60 74 clr [ %l1 + 0x74 ] <== NOT EXECUTED
}
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
2004360: c2 24 60 6c st %g1, [ %l1 + 0x6c ] <== NOT EXECUTED
}
}
}
if (tty->device.setAttributes)
2004364: c2 04 60 a8 ld [ %l1 + 0xa8 ], %g1 <== NOT EXECUTED
2004368: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200436c: 02 80 00 3b be 2004458 <rtems_termios_ioctl+0x3f8> <== NOT EXECUTED
2004370: 01 00 00 00 nop <== NOT EXECUTED
(*tty->device.setAttributes)(tty->minor, &tty->termios);
2004374: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED
2004378: 9f c0 40 00 call %g1 <== NOT EXECUTED
200437c: 92 04 60 30 add %l1, 0x30, %o1 <== NOT EXECUTED
2004380: 30 80 00 36 b,a 2004458 <rtems_termios_ioctl+0x3f8> <== NOT EXECUTED
break;
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
2004384: 7f ff fe 19 call 2003be8 <drainOutput> <== NOT EXECUTED
2004388: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
200438c: 30 80 00 33 b,a 2004458 <rtems_termios_ioctl+0x3f8> <== NOT EXECUTED
break;
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
2004390: c2 24 60 d4 st %g1, [ %l1 + 0xd4 ] <== NOT EXECUTED
2004394: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED
2004398: 10 80 00 30 b 2004458 <rtems_termios_ioctl+0x3f8> <== NOT EXECUTED
200439c: c2 24 60 d8 st %g1, [ %l1 + 0xd8 ] <== NOT EXECUTED
break;
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
20043a0: c2 24 60 dc st %g1, [ %l1 + 0xdc ] <== NOT EXECUTED
20043a4: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED
20043a8: 10 80 00 2c b 2004458 <rtems_termios_ioctl+0x3f8> <== NOT EXECUTED
20043ac: c2 24 60 e0 st %g1, [ %l1 + 0xe0 ] <== NOT EXECUTED
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
20043b0: 03 00 80 5c sethi %hi(0x2017000), %g1 <== NOT EXECUTED
20043b4: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED
20043b8: 82 10 63 ec or %g1, 0x3ec, %g1 <== NOT EXECUTED
20043bc: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED
20043c0: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED
20043c4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20043c8: 22 80 00 06 be,a 20043e0 <rtems_termios_ioctl+0x380> <== NOT EXECUTED
20043cc: c2 04 a0 08 ld [ %l2 + 8 ], %g1 <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
20043d0: 9f c0 40 00 call %g1 <== NOT EXECUTED
20043d4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
20043d8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
}
tty->t_line=*(int*)(args->buffer);
20043dc: c2 04 a0 08 ld [ %l2 + 8 ], %g1 <== NOT EXECUTED
tty->t_sc = NULL; /* ensure that no more valid data */
20043e0: 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);
20043e4: 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) {
20043e8: 03 00 80 5c sethi %hi(0x2017000), %g1 <== NOT EXECUTED
20043ec: 85 28 e0 05 sll %g3, 5, %g2 <== NOT EXECUTED
20043f0: 82 10 63 ec or %g1, 0x3ec, %g1 <== NOT EXECUTED
20043f4: c2 00 40 02 ld [ %g1 + %g2 ], %g1 <== NOT EXECUTED
20043f8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20043fc: 02 80 00 17 be 2004458 <rtems_termios_ioctl+0x3f8> <== NOT EXECUTED
2004400: c6 24 60 cc st %g3, [ %l1 + 0xcc ] <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
2004404: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004408: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
200440c: 10 80 00 13 b 2004458 <rtems_termios_ioctl+0x3f8> <== NOT EXECUTED
2004410: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
2004414: c4 04 a0 08 ld [ %l2 + 8 ], %g2 <== NOT EXECUTED
2004418: c2 04 60 cc ld [ %l1 + 0xcc ], %g1 <== NOT EXECUTED
200441c: 10 80 00 0f b 2004458 <rtems_termios_ioctl+0x3f8> <== NOT EXECUTED
2004420: c2 20 80 00 st %g1, [ %g2 ] <== NOT EXECUTED
break;
#endif
case FIONREAD:
{
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
2004424: c4 04 60 60 ld [ %l1 + 0x60 ], %g2 <== NOT EXECUTED
2004428: c2 04 60 5c ld [ %l1 + 0x5c ], %g1 <== NOT EXECUTED
if ( rawnc < 0 )
200442c: 88 a0 80 01 subcc %g2, %g1, %g4 <== NOT EXECUTED
2004430: 3c 80 00 05 bpos,a 2004444 <rtems_termios_ioctl+0x3e4> <== NOT EXECUTED
2004434: c2 04 60 20 ld [ %l1 + 0x20 ], %g1 <== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
2004438: c2 04 60 64 ld [ %l1 + 0x64 ], %g1 <== NOT EXECUTED
200443c: 88 01 00 01 add %g4, %g1, %g4 <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
2004440: c2 04 60 20 ld [ %l1 + 0x20 ], %g1 <== NOT EXECUTED
2004444: c4 04 60 24 ld [ %l1 + 0x24 ], %g2 <== NOT EXECUTED
2004448: c6 04 a0 08 ld [ %l2 + 8 ], %g3 <== NOT EXECUTED
200444c: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED
2004450: 82 00 40 04 add %g1, %g4, %g1 <== NOT EXECUTED
2004454: c2 20 c0 00 st %g1, [ %g3 ] <== NOT EXECUTED
}
break;
}
rtems_semaphore_release (tty->osem);
2004458: 40 00 04 60 call 20055d8 <rtems_semaphore_release> <== NOT EXECUTED
200445c: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 <== NOT EXECUTED
args->ioctl_return = sc;
2004460: f0 24 a0 0c st %i0, [ %l2 + 0xc ] <== NOT EXECUTED
return sc;
}
2004464: 81 c7 e0 08 ret <== NOT EXECUTED
2004468: 81 e8 00 00 restore <== NOT EXECUTED
0200461c <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
200461c: 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,
2004620: 03 00 80 5d sethi %hi(0x2017400), %g1
2004624: d0 00 62 d8 ld [ %g1 + 0x2d8 ], %o0 ! 20176d8 <rtems_termios_ttyMutex>
2004628: 92 10 20 00 clr %o1
200462c: 40 00 03 a4 call 20054bc <rtems_semaphore_obtain>
2004630: 94 10 20 00 clr %o2
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2004634: a6 92 20 00 orcc %o0, 0, %l3
2004638: 12 80 01 0a bne 2004a60 <rtems_termios_open+0x444> <== NEVER TAKEN
200463c: 03 00 80 5d sethi %hi(0x2017400), %g1
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
2004640: 10 80 00 0a b 2004668 <rtems_termios_open+0x4c>
2004644: e2 00 62 e0 ld [ %g1 + 0x2e0 ], %l1 ! 20176e0 <rtems_termios_ttyHead>
if ((tty->major == major) && (tty->minor == minor))
2004648: 80 a0 40 18 cmp %g1, %i0
200464c: 32 80 00 07 bne,a 2004668 <rtems_termios_open+0x4c> <== NEVER TAKEN
2004650: e2 04 40 00 ld [ %l1 ], %l1 <== NOT EXECUTED
2004654: c2 04 60 10 ld [ %l1 + 0x10 ], %g1
2004658: 80 a0 40 19 cmp %g1, %i1
200465c: 22 80 00 da be,a 20049c4 <rtems_termios_open+0x3a8> <== ALWAYS TAKEN
2004660: c2 04 60 08 ld [ %l1 + 8 ], %g1
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
2004664: e2 04 40 00 ld [ %l1 ], %l1 <== NOT EXECUTED
2004668: 80 a4 60 00 cmp %l1, 0
200466c: 32 bf ff f7 bne,a 2004648 <rtems_termios_open+0x2c>
2004670: c2 04 60 0c ld [ %l1 + 0xc ], %g1
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
2004674: 10 80 00 fd b 2004a68 <rtems_termios_open+0x44c>
2004678: 90 10 20 01 mov 1, %o0
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
200467c: 03 00 80 5b sethi %hi(0x2016c00), %g1
2004680: c2 00 62 58 ld [ %g1 + 0x258 ], %g1 ! 2016e58 <rtems_termios_raw_input_size>
2004684: c2 24 60 64 st %g1, [ %l1 + 0x64 ]
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
2004688: d0 04 60 64 ld [ %l1 + 0x64 ], %o0
200468c: 40 00 18 5a call 200a7f4 <malloc>
2004690: 01 00 00 00 nop
if (tty->rawInBuf.theBuf == NULL) {
2004694: 80 a2 20 00 cmp %o0, 0
2004698: 12 80 00 08 bne 20046b8 <rtems_termios_open+0x9c> <== ALWAYS TAKEN
200469c: d0 24 60 58 st %o0, [ %l1 + 0x58 ]
free(tty);
20046a0: 40 00 16 ed call 200a254 <free> <== NOT EXECUTED
20046a4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
20046a8: 03 00 80 5d sethi %hi(0x2017400), %g1 <== NOT EXECUTED
20046ac: a6 10 20 1a mov 0x1a, %l3 <== NOT EXECUTED
20046b0: 10 80 00 ea b 2004a58 <rtems_termios_open+0x43c> <== NOT EXECUTED
20046b4: d0 00 62 d8 ld [ %g1 + 0x2d8 ], %o0 <== NOT EXECUTED
return RTEMS_NO_MEMORY;
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
20046b8: 03 00 80 5b sethi %hi(0x2016c00), %g1
20046bc: c2 00 62 5c ld [ %g1 + 0x25c ], %g1 ! 2016e5c <rtems_termios_raw_output_size>
20046c0: c2 24 60 88 st %g1, [ %l1 + 0x88 ]
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
20046c4: d0 04 60 88 ld [ %l1 + 0x88 ], %o0
20046c8: 40 00 18 4b call 200a7f4 <malloc>
20046cc: 01 00 00 00 nop
if (tty->rawOutBuf.theBuf == NULL) {
20046d0: 80 a2 20 00 cmp %o0, 0
20046d4: 12 80 00 05 bne 20046e8 <rtems_termios_open+0xcc> <== ALWAYS TAKEN
20046d8: d0 24 60 7c st %o0, [ %l1 + 0x7c ]
free((void *)(tty->rawInBuf.theBuf));
20046dc: d0 04 60 58 ld [ %l1 + 0x58 ], %o0 <== NOT EXECUTED
free(tty);
rtems_semaphore_release (rtems_termios_ttyMutex);
20046e0: 10 80 00 0c b 2004710 <rtems_termios_open+0xf4> <== NOT EXECUTED
20046e4: a6 10 20 1a mov 0x1a, %l3 <== NOT EXECUTED
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
20046e8: 03 00 80 5b sethi %hi(0x2016c00), %g1
20046ec: 40 00 18 42 call 200a7f4 <malloc>
20046f0: d0 00 62 54 ld [ %g1 + 0x254 ], %o0 ! 2016e54 <rtems_termios_cbufsize>
if (tty->cbuf == NULL) {
20046f4: 80 a2 20 00 cmp %o0, 0
20046f8: 12 80 00 0c bne 2004728 <rtems_termios_open+0x10c> <== ALWAYS TAKEN
20046fc: d0 24 60 1c st %o0, [ %l1 + 0x1c ]
free((void *)(tty->rawOutBuf.theBuf));
2004700: d0 04 60 7c ld [ %l1 + 0x7c ], %o0 <== NOT EXECUTED
2004704: 40 00 16 d4 call 200a254 <free> <== NOT EXECUTED
2004708: a6 10 20 1a mov 0x1a, %l3 <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
200470c: d0 04 60 58 ld [ %l1 + 0x58 ], %o0 <== NOT EXECUTED
2004710: 40 00 16 d1 call 200a254 <free> <== NOT EXECUTED
2004714: 01 00 00 00 nop <== NOT EXECUTED
free(tty);
2004718: 40 00 16 cf call 200a254 <free> <== NOT EXECUTED
200471c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
2004720: 10 80 00 cd b 2004a54 <rtems_termios_open+0x438> <== NOT EXECUTED
2004724: 03 00 80 5d sethi %hi(0x2017400), %g1 <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
2004728: 03 00 80 5d sethi %hi(0x2017400), %g1
200472c: c2 00 62 e0 ld [ %g1 + 0x2e0 ], %g1 ! 20176e0 <rtems_termios_ttyHead>
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
2004730: c0 24 60 d4 clr [ %l1 + 0xd4 ]
tty->tty_snd.sw_arg = NULL;
2004734: c0 24 60 d8 clr [ %l1 + 0xd8 ]
tty->tty_rcv.sw_pfn = NULL;
2004738: c0 24 60 dc clr [ %l1 + 0xdc ]
tty->tty_rcv.sw_arg = NULL;
200473c: c0 24 60 e0 clr [ %l1 + 0xe0 ]
tty->tty_rcvwakeup = 0;
2004740: c0 24 60 e4 clr [ %l1 + 0xe4 ]
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
2004744: c2 24 40 00 st %g1, [ %l1 ]
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
2004748: 80 a0 60 00 cmp %g1, 0
200474c: 02 80 00 03 be 2004758 <rtems_termios_open+0x13c> <== ALWAYS TAKEN
2004750: c0 24 60 04 clr [ %l1 + 4 ]
rtems_termios_ttyHead->back = tty;
2004754: e2 20 60 04 st %l1, [ %g1 + 4 ] <== NOT EXECUTED
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
2004758: 07 00 80 5d sethi %hi(0x2017400), %g3
200475c: c4 00 e2 dc ld [ %g3 + 0x2dc ], %g2 ! 20176dc <rtems_termios_ttyTail>
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
2004760: 03 00 80 5d sethi %hi(0x2017400), %g1
if (rtems_termios_ttyTail == NULL)
2004764: 80 a0 a0 00 cmp %g2, 0
2004768: 12 80 00 03 bne 2004774 <rtems_termios_open+0x158> <== NEVER TAKEN
200476c: e0 20 62 e0 st %l0, [ %g1 + 0x2e0 ]
rtems_termios_ttyTail = tty;
2004770: e0 20 e2 dc st %l0, [ %g3 + 0x2dc ]
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
2004774: 25 00 80 5b sethi %hi(0x2016c00), %l2
2004778: c2 4c a2 60 ldsb [ %l2 + 0x260 ], %g1 ! 2016e60 <c.6078>
200477c: 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;
2004780: f2 24 20 10 st %i1, [ %l0 + 0x10 ]
tty->major = major;
2004784: f0 24 20 0c st %i0, [ %l0 + 0xc ]
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
2004788: 90 12 21 00 or %o0, 0x100, %o0
200478c: 92 10 20 01 mov 1, %o1
2004790: 90 10 40 08 or %g1, %o0, %o0
2004794: 94 10 20 54 mov 0x54, %o2
2004798: 96 10 20 00 clr %o3
200479c: 40 00 02 a2 call 2005224 <rtems_semaphore_create>
20047a0: 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)
20047a4: 80 a2 20 00 cmp %o0, 0
20047a8: 12 80 00 a8 bne 2004a48 <rtems_termios_open+0x42c> <== NEVER TAKEN
20047ac: 01 00 00 00 nop
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
20047b0: c2 4c a2 60 ldsb [ %l2 + 0x260 ], %g1
20047b4: 11 15 14 9b sethi %hi(0x54526c00), %o0
20047b8: 92 10 20 01 mov 1, %o1
20047bc: 90 12 23 00 or %o0, 0x300, %o0
20047c0: 94 10 20 54 mov 0x54, %o2
20047c4: 90 10 40 08 or %g1, %o0, %o0
20047c8: 96 10 20 00 clr %o3
20047cc: 40 00 02 96 call 2005224 <rtems_semaphore_create>
20047d0: 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)
20047d4: 80 a2 20 00 cmp %o0, 0
20047d8: 12 80 00 9c bne 2004a48 <rtems_termios_open+0x42c> <== NEVER TAKEN
20047dc: 01 00 00 00 nop
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
20047e0: c2 4c a2 60 ldsb [ %l2 + 0x260 ], %g1
20047e4: 11 15 14 9e sethi %hi(0x54527800), %o0
20047e8: 92 10 20 00 clr %o1
20047ec: 90 10 40 08 or %g1, %o0, %o0
20047f0: 94 10 20 20 mov 0x20, %o2
20047f4: 96 10 20 00 clr %o3
20047f8: 40 00 02 8b call 2005224 <rtems_semaphore_create>
20047fc: 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)
2004800: 80 a2 20 00 cmp %o0, 0
2004804: 12 80 00 91 bne 2004a48 <rtems_termios_open+0x42c> <== NEVER TAKEN
2004808: 01 00 00 00 nop
rtems_fatal_error_occurred (sc);
tty->rawOutBufState = rob_idle;
200480c: c0 24 20 94 clr [ %l0 + 0x94 ]
/*
* Set callbacks
*/
tty->device = *callbacks;
2004810: 92 10 00 1b mov %i3, %o1
2004814: 90 04 20 98 add %l0, 0x98, %o0
2004818: 40 00 24 11 call 200d85c <memcpy>
200481c: 94 10 20 20 mov 0x20, %o2
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
2004820: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1
2004824: 80 a0 60 02 cmp %g1, 2
2004828: 32 80 00 1b bne,a 2004894 <rtems_termios_open+0x278> <== ALWAYS TAKEN
200482c: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1
sc = rtems_task_create (
2004830: c2 4c a2 60 ldsb [ %l2 + 0x260 ], %g1 <== NOT EXECUTED
2004834: 11 15 1e 15 sethi %hi(0x54785400), %o0 <== NOT EXECUTED
2004838: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED
200483c: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED
2004840: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED
2004844: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED
2004848: 98 10 20 00 clr %o4 <== NOT EXECUTED
200484c: 40 00 03 8f call 2005688 <rtems_task_create> <== NOT EXECUTED
2004850: 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)
2004854: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2004858: 12 80 00 7c bne 2004a48 <rtems_termios_open+0x42c> <== NOT EXECUTED
200485c: 01 00 00 00 nop <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
2004860: c2 4c a2 60 ldsb [ %l2 + 0x260 ], %g1 <== NOT EXECUTED
2004864: 11 14 9e 15 sethi %hi(0x52785400), %o0 <== NOT EXECUTED
2004868: 92 10 20 09 mov 9, %o1 <== NOT EXECUTED
200486c: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED
2004870: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED
2004874: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED
2004878: 98 10 20 00 clr %o4 <== NOT EXECUTED
200487c: 40 00 03 83 call 2005688 <rtems_task_create> <== NOT EXECUTED
2004880: 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)
2004884: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2004888: 12 80 00 70 bne 2004a48 <rtems_termios_open+0x42c> <== NOT EXECUTED
200488c: 01 00 00 00 nop <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
2004890: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED
2004894: 80 a0 60 00 cmp %g1, 0
2004898: 02 80 00 07 be 20048b4 <rtems_termios_open+0x298> <== NEVER TAKEN
200489c: 03 00 80 5b sethi %hi(0x2016c00), %g1
20048a0: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1
20048a4: 80 a0 60 02 cmp %g1, 2
20048a8: 12 80 00 0f bne 20048e4 <rtems_termios_open+0x2c8> <== ALWAYS TAKEN
20048ac: 82 10 20 03 mov 3, %g1
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
20048b0: 03 00 80 5b sethi %hi(0x2016c00), %g1 <== NOT EXECUTED
20048b4: c2 48 62 60 ldsb [ %g1 + 0x260 ], %g1 ! 2016e60 <c.6078> <== NOT EXECUTED
20048b8: 11 15 14 9c sethi %hi(0x54527000), %o0 <== NOT EXECUTED
20048bc: 92 10 20 00 clr %o1 <== NOT EXECUTED
20048c0: 90 12 22 00 or %o0, 0x200, %o0 <== NOT EXECUTED
20048c4: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED
20048c8: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED
20048cc: 96 10 20 00 clr %o3 <== NOT EXECUTED
20048d0: 40 00 02 55 call 2005224 <rtems_semaphore_create> <== NOT EXECUTED
20048d4: 98 04 20 68 add %l0, 0x68, %o4 <== NOT EXECUTED
rtems_build_name ('T', 'R', 'r', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->rawInBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
20048d8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20048dc: 12 80 00 5b bne 2004a48 <rtems_termios_open+0x42c> <== NOT EXECUTED
20048e0: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
20048e4: c2 2c 20 41 stb %g1, [ %l0 + 0x41 ]
tty->termios.c_cc[VQUIT] = '\034';
20048e8: 82 10 20 1c mov 0x1c, %g1
20048ec: c2 2c 20 42 stb %g1, [ %l0 + 0x42 ]
tty->termios.c_cc[VERASE] = '\177';
20048f0: 82 10 20 7f mov 0x7f, %g1
20048f4: c2 2c 20 43 stb %g1, [ %l0 + 0x43 ]
tty->termios.c_cc[VKILL] = '\025';
20048f8: 82 10 20 15 mov 0x15, %g1
20048fc: c2 2c 20 44 stb %g1, [ %l0 + 0x44 ]
tty->termios.c_cc[VEOF] = '\004';
2004900: 82 10 20 04 mov 4, %g1
2004904: c2 2c 20 45 stb %g1, [ %l0 + 0x45 ]
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
2004908: 82 10 20 11 mov 0x11, %g1
200490c: c2 2c 20 49 stb %g1, [ %l0 + 0x49 ]
tty->termios.c_cc[VSTOP] = '\023';
2004910: 82 10 20 13 mov 0x13, %g1
2004914: c2 2c 20 4a stb %g1, [ %l0 + 0x4a ]
tty->termios.c_cc[VSUSP] = '\032';
2004918: 82 10 20 1a mov 0x1a, %g1
200491c: c2 2c 20 4b stb %g1, [ %l0 + 0x4b ]
tty->termios.c_cc[VREPRINT] = '\022';
2004920: 82 10 20 12 mov 0x12, %g1
2004924: c2 2c 20 4d stb %g1, [ %l0 + 0x4d ]
tty->termios.c_cc[VDISCARD] = '\017';
2004928: 82 10 20 0f mov 0xf, %g1
200492c: c2 2c 20 4e stb %g1, [ %l0 + 0x4e ]
tty->termios.c_cc[VWERASE] = '\027';
2004930: 82 10 20 17 mov 0x17, %g1
2004934: c2 2c 20 4f stb %g1, [ %l0 + 0x4f ]
tty->termios.c_cc[VLNEXT] = '\026';
2004938: 82 10 20 16 mov 0x16, %g1
200493c: c2 2c 20 50 stb %g1, [ %l0 + 0x50 ]
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
2004940: 03 00 00 09 sethi %hi(0x2400), %g1
2004944: 82 10 61 02 or %g1, 0x102, %g1 ! 2502 <PROM_START+0x2502>
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';
2004948: c0 2c 20 4c clrb [ %l0 + 0x4c ]
tty->termios.c_cc[VEOL2] = '\000';
200494c: c0 2c 20 51 clrb [ %l0 + 0x51 ]
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
2004950: 1b 00 80 5b sethi %hi(0x2016c00), %o5
2004954: c4 0b 62 60 ldub [ %o5 + 0x260 ], %g2 ! 2016e60 <c.6078>
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
2004958: c2 24 20 30 st %g1, [ %l0 + 0x30 ]
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
200495c: 03 00 00 06 sethi %hi(0x1800), %g1
2004960: 82 10 60 05 or %g1, 5, %g1 ! 1805 <PROM_START+0x1805>
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;
2004964: c0 24 20 b8 clr [ %l0 + 0xb8 ]
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
2004968: c2 24 20 34 st %g1, [ %l0 + 0x34 ]
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
200496c: c6 04 20 64 ld [ %l0 + 0x64 ], %g3
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
2004970: 82 10 28 bd mov 0x8bd, %g1
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
2004974: c8 04 20 64 ld [ %l0 + 0x64 ], %g4
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
2004978: c2 24 20 38 st %g1, [ %l0 + 0x38 ]
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
200497c: 03 00 00 20 sethi %hi(0x8000), %g1
2004980: 82 10 62 3b or %g1, 0x23b, %g1 ! 823b <PROM_START+0x823b>
/* 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;
2004984: 87 30 e0 01 srl %g3, 1, %g3
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
2004988: c2 24 20 3c st %g1, [ %l0 + 0x3c ]
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
200498c: c6 24 20 bc st %g3, [ %l0 + 0xbc ]
tty->highwater = tty->rawInBuf.Size * 3/4;
2004990: 83 29 20 01 sll %g4, 1, %g1
2004994: 82 00 40 04 add %g1, %g4, %g1
2004998: 83 30 60 02 srl %g1, 2, %g1
200499c: c2 24 20 c0 st %g1, [ %l0 + 0xc0 ]
/*
* Bump name characer
*/
if (c++ == 'z')
20049a0: 82 00 a0 01 add %g2, 1, %g1
20049a4: 85 28 a0 18 sll %g2, 0x18, %g2
20049a8: 85 38 a0 18 sra %g2, 0x18, %g2
20049ac: 80 a0 a0 7a cmp %g2, 0x7a
20049b0: 12 80 00 04 bne 20049c0 <rtems_termios_open+0x3a4> <== ALWAYS TAKEN
20049b4: c2 2b 62 60 stb %g1, [ %o5 + 0x260 ]
c = 'a';
20049b8: 82 10 20 61 mov 0x61, %g1 <== NOT EXECUTED
20049bc: c2 2b 62 60 stb %g1, [ %o5 + 0x260 ] <== NOT EXECUTED
}
args->iop->data1 = tty;
if (!tty->refcount++) {
20049c0: c2 04 60 08 ld [ %l1 + 8 ], %g1
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
20049c4: c4 06 80 00 ld [ %i2 ], %g2
if (!tty->refcount++) {
20049c8: 86 00 60 01 add %g1, 1, %g3
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
20049cc: e2 20 a0 28 st %l1, [ %g2 + 0x28 ]
if (!tty->refcount++) {
20049d0: 80 a0 60 00 cmp %g1, 0
20049d4: 12 80 00 1f bne 2004a50 <rtems_termios_open+0x434>
20049d8: c6 24 60 08 st %g3, [ %l1 + 8 ]
if (tty->device.firstOpen)
20049dc: c2 04 60 98 ld [ %l1 + 0x98 ], %g1
20049e0: 80 a0 60 00 cmp %g1, 0
20049e4: 02 80 00 05 be 20049f8 <rtems_termios_open+0x3dc> <== ALWAYS TAKEN
20049e8: 90 10 00 18 mov %i0, %o0
(*tty->device.firstOpen)(major, minor, arg);
20049ec: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
20049f0: 9f c0 40 00 call %g1 <== NOT EXECUTED
20049f4: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
20049f8: c2 04 60 b4 ld [ %l1 + 0xb4 ], %g1
20049fc: 80 a0 60 02 cmp %g1, 2
2004a00: 12 80 00 15 bne 2004a54 <rtems_termios_open+0x438> <== ALWAYS TAKEN
2004a04: 03 00 80 5d sethi %hi(0x2017400), %g1
sc = rtems_task_start(tty->rxTaskId,
2004a08: d0 04 60 c4 ld [ %l1 + 0xc4 ], %o0 <== NOT EXECUTED
2004a0c: 13 00 80 12 sethi %hi(0x2004800), %o1 <== NOT EXECUTED
2004a10: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED
2004a14: 40 00 03 c9 call 2005938 <rtems_task_start> <== NOT EXECUTED
2004a18: 92 12 63 00 or %o1, 0x300, %o1 <== NOT EXECUTED
rtems_termios_rxdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
2004a1c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2004a20: 12 80 00 0a bne 2004a48 <rtems_termios_open+0x42c> <== NOT EXECUTED
2004a24: 01 00 00 00 nop <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(tty->txTaskId,
2004a28: d0 04 60 c8 ld [ %l1 + 0xc8 ], %o0 <== NOT EXECUTED
2004a2c: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED
2004a30: 13 00 80 12 sethi %hi(0x2004800), %o1 <== NOT EXECUTED
2004a34: 40 00 03 c1 call 2005938 <rtems_task_start> <== NOT EXECUTED
2004a38: 92 12 62 84 or %o1, 0x284, %o1 ! 2004a84 <rtems_termios_txdaemon><== NOT EXECUTED
rtems_termios_txdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
2004a3c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2004a40: 02 80 00 05 be 2004a54 <rtems_termios_open+0x438> <== NOT EXECUTED
2004a44: 03 00 80 5d sethi %hi(0x2017400), %g1 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
2004a48: 40 00 04 5f call 2005bc4 <rtems_fatal_error_occurred> <== NOT EXECUTED
2004a4c: 01 00 00 00 nop <== NOT EXECUTED
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
2004a50: 03 00 80 5d sethi %hi(0x2017400), %g1
2004a54: d0 00 62 d8 ld [ %g1 + 0x2d8 ], %o0 ! 20176d8 <rtems_termios_ttyMutex>
2004a58: 40 00 02 e0 call 20055d8 <rtems_semaphore_release>
2004a5c: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
}
2004a60: 81 c7 e0 08 ret
2004a64: 91 e8 00 13 restore %g0, %l3, %o0
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
2004a68: 40 00 15 b1 call 200a12c <calloc>
2004a6c: 92 10 20 e8 mov 0xe8, %o1
if (tty == NULL) {
2004a70: a2 92 20 00 orcc %o0, 0, %l1
2004a74: 12 bf ff 02 bne 200467c <rtems_termios_open+0x60> <== ALWAYS TAKEN
2004a78: a0 10 00 11 mov %l1, %l0
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
if (tty->rawInBuf.theBuf == NULL) {
free(tty);
rtems_semaphore_release (rtems_termios_ttyMutex);
2004a7c: 10 bf ff 0c b 20046ac <rtems_termios_open+0x90> <== NOT EXECUTED
2004a80: 03 00 80 5d sethi %hi(0x2017400), %g1 <== NOT EXECUTED
0200339c <rtems_termios_puts>:
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
200339c: 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) {
20033a0: c2 06 a0 b4 ld [ %i2 + 0xb4 ], %g1
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
20033a4: 92 10 00 18 mov %i0, %o1
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
20033a8: 80 a0 60 00 cmp %g1, 0
20033ac: 12 80 00 08 bne 20033cc <rtems_termios_puts+0x30> <== NEVER TAKEN
20033b0: a2 10 00 18 mov %i0, %l1
(*tty->device.write)(tty->minor, (void *)buf, len);
20033b4: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0
20033b8: c2 06 a0 a4 ld [ %i2 + 0xa4 ], %g1
20033bc: 9f c0 40 00 call %g1
20033c0: 94 10 00 19 mov %i1, %o2
20033c4: 81 c7 e0 08 ret
20033c8: 81 e8 00 00 restore
return;
}
newHead = tty->rawOutBuf.Head;
20033cc: e0 06 a0 80 ld [ %i2 + 0x80 ], %l0 <== NOT EXECUTED
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
tty->rawOutBufState = rob_wait;
20033d0: a6 10 20 02 mov 2, %l3 <== NOT EXECUTED
}
else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
}
tty->rawOutBufState = rob_busy;
20033d4: 10 80 00 39 b 20034b8 <rtems_termios_puts+0x11c> <== NOT EXECUTED
20033d8: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
20033dc: d2 06 a0 88 ld [ %i2 + 0x88 ], %o1 <== NOT EXECUTED
20033e0: 40 00 42 a4 call 2013e70 <.urem> <== NOT EXECUTED
20033e4: 90 04 20 01 add %l0, 1, %o0 <== NOT EXECUTED
rtems_interrupt_disable (level);
20033e8: 7f ff fa 61 call 2001d6c <sparc_disable_interrupts> <== NOT EXECUTED
20033ec: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
20033f0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
20033f4: 30 80 00 0f b,a 2003430 <rtems_termios_puts+0x94> <== NOT EXECUTED
while (newHead == tty->rawOutBuf.Tail) {
tty->rawOutBufState = rob_wait;
rtems_interrupt_enable (level);
20033f8: 7f ff fa 61 call 2001d7c <sparc_enable_interrupts> <== NOT EXECUTED
20033fc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
2003400: d0 06 a0 8c ld [ %i2 + 0x8c ], %o0 <== NOT EXECUTED
2003404: 92 10 20 00 clr %o1 <== NOT EXECUTED
2003408: 40 00 08 2d call 20054bc <rtems_semaphore_obtain> <== NOT EXECUTED
200340c: 94 10 20 00 clr %o2 <== NOT EXECUTED
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2003410: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2003414: 02 80 00 04 be 2003424 <rtems_termios_puts+0x88> <== NOT EXECUTED
2003418: 01 00 00 00 nop <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
200341c: 40 00 09 ea call 2005bc4 <rtems_fatal_error_occurred> <== NOT EXECUTED
2003420: 01 00 00 00 nop <== NOT EXECUTED
rtems_interrupt_disable (level);
2003424: 7f ff fa 52 call 2001d6c <sparc_disable_interrupts> <== NOT EXECUTED
2003428: 01 00 00 00 nop <== NOT EXECUTED
200342c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
2003430: c2 06 a0 84 ld [ %i2 + 0x84 ], %g1 <== NOT EXECUTED
2003434: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED
2003438: 22 bf ff f0 be,a 20033f8 <rtems_termios_puts+0x5c> <== NOT EXECUTED
200343c: e6 26 a0 94 st %l3, [ %i2 + 0x94 ] <== NOT EXECUTED
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
2003440: c6 06 a0 80 ld [ %i2 + 0x80 ], %g3 <== NOT EXECUTED
2003444: c4 0c 40 00 ldub [ %l1 ], %g2 <== NOT EXECUTED
2003448: c2 06 a0 7c ld [ %i2 + 0x7c ], %g1 <== NOT EXECUTED
200344c: c4 28 40 03 stb %g2, [ %g1 + %g3 ] <== NOT EXECUTED
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
2003450: c2 06 a0 94 ld [ %i2 + 0x94 ], %g1 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
tty->rawOutBuf.Head = newHead;
2003454: e0 26 a0 80 st %l0, [ %i2 + 0x80 ] <== NOT EXECUTED
if (tty->rawOutBufState == rob_idle) {
2003458: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200345c: 32 80 00 14 bne,a 20034ac <rtems_termios_puts+0x110> <== NOT EXECUTED
2003460: a2 04 60 01 inc %l1 <== NOT EXECUTED
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
2003464: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED
2003468: 80 88 60 10 btst 0x10, %g1 <== NOT EXECUTED
200346c: 12 80 00 0b bne 2003498 <rtems_termios_puts+0xfc> <== NOT EXECUTED
2003470: 01 00 00 00 nop <== NOT EXECUTED
(*tty->device.write)(tty->minor,
2003474: d2 06 a0 84 ld [ %i2 + 0x84 ], %o1 <== NOT EXECUTED
2003478: c2 06 a0 7c ld [ %i2 + 0x7c ], %g1 <== NOT EXECUTED
200347c: c4 06 a0 a4 ld [ %i2 + 0xa4 ], %g2 <== NOT EXECUTED
2003480: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 <== NOT EXECUTED
2003484: 92 00 40 09 add %g1, %o1, %o1 <== NOT EXECUTED
2003488: 9f c0 80 00 call %g2 <== NOT EXECUTED
200348c: 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;
2003490: 10 80 00 06 b 20034a8 <rtems_termios_puts+0x10c> <== NOT EXECUTED
2003494: e4 26 a0 94 st %l2, [ %i2 + 0x94 ] <== NOT EXECUTED
(*tty->device.write)(tty->minor,
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
2003498: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED
200349c: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED
20034a0: c2 26 a0 b8 st %g1, [ %i2 + 0xb8 ] <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy;
20034a4: e4 26 a0 94 st %l2, [ %i2 + 0x94 ] <== NOT EXECUTED
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
20034a8: a2 04 60 01 inc %l1 <== NOT EXECUTED
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
}
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
20034ac: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20034b0: 7f ff fa 33 call 2001d7c <sparc_enable_interrupts> <== NOT EXECUTED
20034b4: b2 06 7f ff add %i1, -1, %i1 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
20034b8: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
20034bc: 12 bf ff c8 bne 20033dc <rtems_termios_puts+0x40> <== NOT EXECUTED
20034c0: 01 00 00 00 nop <== NOT EXECUTED
20034c4: 81 c7 e0 08 ret <== NOT EXECUTED
20034c8: 81 e8 00 00 restore <== NOT EXECUTED
02003c64 <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
2003c64: 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;
2003c68: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED
uint32_t count = args->count;
2003c6c: e6 06 20 0c ld [ %i0 + 0xc ], %l3 <== NOT EXECUTED
rtems_status_code
rtems_termios_read (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
2003c70: e0 00 60 28 ld [ %g1 + 0x28 ], %l0 <== NOT EXECUTED
uint32_t count = args->count;
char *buffer = args->buffer;
2003c74: ea 06 20 08 ld [ %i0 + 8 ], %l5 <== NOT EXECUTED
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
2003c78: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
2003c7c: ac 10 00 18 mov %i0, %l6 <== NOT EXECUTED
struct rtems_termios_tty *tty = args->iop->data1;
uint32_t count = args->count;
char *buffer = args->buffer;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
2003c80: 92 10 20 00 clr %o1 <== NOT EXECUTED
2003c84: 40 00 06 0e call 20054bc <rtems_semaphore_obtain> <== NOT EXECUTED
2003c88: 94 10 20 00 clr %o2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2003c8c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
2003c90: 12 80 00 10 bne 2003cd0 <rtems_termios_read+0x6c> <== NOT EXECUTED
2003c94: 03 00 80 5c sethi %hi(0x2017000), %g1 <== NOT EXECUTED
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
2003c98: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED
2003c9c: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED
2003ca0: 82 10 63 ec or %g1, 0x3ec, %g1 <== NOT EXECUTED
2003ca4: 84 00 a0 08 add %g2, 8, %g2 <== NOT EXECUTED
2003ca8: c2 00 40 02 ld [ %g1 + %g2 ], %g1 <== NOT EXECUTED
2003cac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003cb0: 02 80 00 0a be 2003cd8 <rtems_termios_read+0x74> <== NOT EXECUTED
2003cb4: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
2003cb8: 9f c0 40 00 call %g1 <== NOT EXECUTED
2003cbc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2003cc0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
2003cc4: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED
2003cc8: 40 00 06 44 call 20055d8 <rtems_semaphore_release> <== NOT EXECUTED
2003ccc: c0 24 20 e4 clr [ %l0 + 0xe4 ] <== NOT EXECUTED
2003cd0: 81 c7 e0 08 ret <== NOT EXECUTED
2003cd4: 81 e8 00 00 restore <== NOT EXECUTED
return sc;
}
if (tty->cindex == tty->ccount) {
2003cd8: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED
2003cdc: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED
2003ce0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2003ce4: 12 80 00 d0 bne 2004024 <rtems_termios_read+0x3c0> <== NOT EXECUTED
2003ce8: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
2003cec: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED
if (tty->device.pollRead != NULL
2003cf0: 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;
2003cf4: 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;
2003cf8: c0 24 20 20 clr [ %l0 + 0x20 ] <== NOT EXECUTED
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL
2003cfc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2003d00: 02 80 00 5b be 2003e6c <rtems_termios_read+0x208> <== NOT EXECUTED
2003d04: c0 24 20 24 clr [ %l0 + 0x24 ] <== NOT EXECUTED
2003d08: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 <== NOT EXECUTED
2003d0c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003d10: 12 80 00 58 bne 2003e70 <rtems_termios_read+0x20c> <== NOT EXECUTED
2003d14: 03 00 80 5b sethi %hi(0x2016c00), %g1 <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
2003d18: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED
2003d1c: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED
2003d20: 22 80 00 13 be,a 2003d6c <rtems_termios_read+0x108> <== NOT EXECUTED
2003d24: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
2003d28: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED
2003d2c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2003d30: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED
if (n < 0) {
2003d34: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2003d38: 16 80 00 06 bge 2003d50 <rtems_termios_read+0xec> <== NOT EXECUTED
2003d3c: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED
rtems_task_wake_after (1);
2003d40: 40 00 07 19 call 20059a4 <rtems_task_wake_after> <== NOT EXECUTED
2003d44: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
{
int n;
if (tty->termios.c_lflag & ICANON) {
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
2003d48: 10 bf ff f9 b 2003d2c <rtems_termios_read+0xc8> <== NOT EXECUTED
2003d4c: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED
if (n < 0) {
rtems_task_wake_after (1);
}
else {
if (siproc (n, tty))
2003d50: 7f ff ff 63 call 2003adc <siproc> <== NOT EXECUTED
2003d54: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
2003d58: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2003d5c: 22 bf ff f4 be,a 2003d2c <rtems_termios_read+0xc8> <== NOT EXECUTED
2003d60: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
2003d64: 10 80 00 b0 b 2004024 <rtems_termios_read+0x3c0> <== NOT EXECUTED
2003d68: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
}
}
}
else {
rtems_interval then, now;
if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
2003d6c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003d70: 12 80 00 0a bne 2003d98 <rtems_termios_read+0x134> <== NOT EXECUTED
2003d74: a4 07 bf f4 add %fp, -12, %l2 <== NOT EXECUTED
2003d78: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED
2003d7c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003d80: 02 80 00 07 be 2003d9c <rtems_termios_read+0x138> <== NOT EXECUTED
2003d84: a2 07 bf f0 add %fp, -16, %l1 <== NOT EXECUTED
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then);
2003d88: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED
2003d8c: 40 00 03 7e call 2004b84 <rtems_clock_get> <== NOT EXECUTED
2003d90: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED
else {
siproc (n, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then);
2003d94: a4 07 bf f4 add %fp, -12, %l2 <== NOT EXECUTED
}
}
else {
if (!tty->termios.c_cc[VTIME])
break;
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
2003d98: a2 07 bf f0 add %fp, -16, %l1 <== NOT EXECUTED
else {
rtems_interval then, now;
if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then);
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
2003d9c: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED
2003da0: 9f c0 40 00 call %g1 <== NOT EXECUTED
2003da4: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED
if (n < 0) {
2003da8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2003dac: 36 80 00 1e bge,a 2003e24 <rtems_termios_read+0x1c0> <== NOT EXECUTED
2003db0: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED
if (tty->termios.c_cc[VMIN]) {
2003db4: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED
2003db8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003dbc: 02 80 00 0a be 2003de4 <rtems_termios_read+0x180> <== NOT EXECUTED
2003dc0: c4 0c 20 46 ldub [ %l0 + 0x46 ], %g2 <== NOT EXECUTED
if (tty->termios.c_cc[VTIME] && tty->ccount) {
2003dc4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2003dc8: 02 80 00 13 be 2003e14 <rtems_termios_read+0x1b0> <== NOT EXECUTED
2003dcc: 01 00 00 00 nop <== NOT EXECUTED
2003dd0: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED
2003dd4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003dd8: 02 80 00 0f be 2003e14 <rtems_termios_read+0x1b0> <== NOT EXECUTED
2003ddc: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED
2003de0: 30 80 00 04 b,a 2003df0 <rtems_termios_read+0x18c> <== NOT EXECUTED
break;
}
}
}
else {
if (!tty->termios.c_cc[VTIME])
2003de4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2003de8: 02 80 00 8e be 2004020 <rtems_termios_read+0x3bc> <== NOT EXECUTED
2003dec: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED
break;
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
2003df0: 40 00 03 65 call 2004b84 <rtems_clock_get> <== NOT EXECUTED
2003df4: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
2003df8: c6 04 20 54 ld [ %l0 + 0x54 ], %g3 <== NOT EXECUTED
2003dfc: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED
2003e00: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED
2003e04: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED
2003e08: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED
2003e0c: 18 80 00 86 bgu 2004024 <rtems_termios_read+0x3c0> <== NOT EXECUTED
2003e10: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
break;
}
}
rtems_task_wake_after (1);
2003e14: 40 00 06 e4 call 20059a4 <rtems_task_wake_after> <== NOT EXECUTED
2003e18: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
else {
rtems_interval then, now;
if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then);
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
2003e1c: 10 bf ff e1 b 2003da0 <rtems_termios_read+0x13c> <== NOT EXECUTED
2003e20: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED
}
}
rtems_task_wake_after (1);
}
else {
siproc (n, tty);
2003e24: 7f ff ff 2e call 2003adc <siproc> <== NOT EXECUTED
2003e28: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
2003e2c: c4 0c 20 47 ldub [ %l0 + 0x47 ], %g2 <== NOT EXECUTED
2003e30: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED
2003e34: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2003e38: 16 80 00 7a bge 2004020 <rtems_termios_read+0x3bc> <== NOT EXECUTED
2003e3c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
2003e40: 22 bf ff d8 be,a 2003da0 <rtems_termios_read+0x13c> <== NOT EXECUTED
2003e44: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED
2003e48: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED
2003e4c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003e50: 22 bf ff d4 be,a 2003da0 <rtems_termios_read+0x13c> <== NOT EXECUTED
2003e54: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then);
2003e58: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
2003e5c: 40 00 03 4a call 2004b84 <rtems_clock_get> <== NOT EXECUTED
2003e60: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED
else {
rtems_interval then, now;
if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then);
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
2003e64: 10 bf ff cf b 2003da0 <rtems_termios_read+0x13c> <== NOT EXECUTED
2003e68: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
2003e6c: 03 00 80 5b sethi %hi(0x2016c00), %g1 <== NOT EXECUTED
* Fill the input buffer from the raw input queue
*/
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
2003e70: e4 04 20 74 ld [ %l0 + 0x74 ], %l2 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
2003e74: ba 10 62 54 or %g1, 0x254, %i5 <== NOT EXECUTED
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(tty->minor,
2003e78: ae 04 20 49 add %l0, 0x49, %l7 <== NOT EXECUTED
2003e7c: 10 80 00 60 b 2003ffc <rtems_termios_read+0x398> <== NOT EXECUTED
2003e80: a2 10 20 01 mov 1, %l1 <== NOT EXECUTED
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
2003e84: d0 04 20 5c ld [ %l0 + 0x5c ], %o0 <== NOT EXECUTED
2003e88: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED
2003e8c: 40 00 3f f9 call 2013e70 <.urem> <== NOT EXECUTED
2003e90: 90 02 20 01 inc %o0 <== NOT EXECUTED
c = tty->rawInBuf.theBuf[newHead];
2003e94: 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;
2003e98: 84 10 00 08 mov %o0, %g2 <== NOT EXECUTED
c = tty->rawInBuf.theBuf[newHead];
2003e9c: e2 08 40 08 ldub [ %g1 + %o0 ], %l1 <== NOT EXECUTED
tty->rawInBuf.Head = newHead;
2003ea0: d0 24 20 5c st %o0, [ %l0 + 0x5c ] <== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
2003ea4: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED
2003ea8: d0 04 20 64 ld [ %l0 + 0x64 ], %o0 <== NOT EXECUTED
2003eac: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED
2003eb0: 90 02 00 01 add %o0, %g1, %o0 <== NOT EXECUTED
2003eb4: 40 00 3f ef call 2013e70 <.urem> <== NOT EXECUTED
2003eb8: 90 22 00 02 sub %o0, %g2, %o0 <== NOT EXECUTED
2003ebc: c2 04 20 bc ld [ %l0 + 0xbc ], %g1 <== NOT EXECUTED
2003ec0: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED
2003ec4: 3a 80 00 27 bcc,a 2003f60 <rtems_termios_read+0x2fc> <== NOT EXECUTED
2003ec8: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
2003ecc: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED
2003ed0: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED
2003ed4: 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))
2003ed8: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED
2003edc: 82 08 62 02 and %g1, 0x202, %g1 <== NOT EXECUTED
2003ee0: 80 a0 62 02 cmp %g1, 0x202 <== NOT EXECUTED
2003ee4: 12 80 00 11 bne 2003f28 <rtems_termios_read+0x2c4> <== NOT EXECUTED
2003ee8: 01 00 00 00 nop <== NOT EXECUTED
2003eec: c2 04 20 94 ld [ %l0 + 0x94 ], %g1 <== NOT EXECUTED
2003ef0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003ef4: 22 80 00 07 be,a 2003f10 <rtems_termios_read+0x2ac> <== NOT EXECUTED
2003ef8: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED
2003efc: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED
2003f00: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
2003f04: 02 80 00 09 be 2003f28 <rtems_termios_read+0x2c4> <== NOT EXECUTED
2003f08: 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,
2003f0c: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED
2003f10: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED
2003f14: 92 10 00 17 mov %l7, %o1 <== NOT EXECUTED
2003f18: 9f c0 40 00 call %g1 <== NOT EXECUTED
2003f1c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
2003f20: 10 80 00 10 b 2003f60 <rtems_termios_read+0x2fc> <== NOT EXECUTED
2003f24: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]),
1);
}
else if (tty->flow_ctrl & FL_MDRTS) {
2003f28: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED
2003f2c: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED
2003f30: 22 80 00 0c be,a 2003f60 <rtems_termios_read+0x2fc> <== NOT EXECUTED
2003f34: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_IRTSOFF;
2003f38: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
2003f3c: 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;
2003f40: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED
2003f44: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
2003f48: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2003f4c: 22 80 00 05 be,a 2003f60 <rtems_termios_read+0x2fc> <== NOT EXECUTED
2003f50: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
2003f54: 9f c0 80 00 call %g2 <== NOT EXECUTED
2003f58: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
2003f5c: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED
2003f60: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED
2003f64: 02 80 00 09 be 2003f88 <rtems_termios_read+0x324> <== NOT EXECUTED
2003f68: 90 0c 60 ff and %l1, 0xff, %o0 <== NOT EXECUTED
if (siproc (c, tty))
2003f6c: 7f ff fe dc call 2003adc <siproc> <== NOT EXECUTED
2003f70: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
2003f74: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2003f78: 32 80 00 0c bne,a 2003fa8 <rtems_termios_read+0x344> <== NOT EXECUTED
2003f7c: a8 10 20 00 clr %l4 <== NOT EXECUTED
else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
wait = 0;
}
timeout = tty->rawInBufSemaphoreTimeout;
2003f80: 10 80 00 0b b 2003fac <rtems_termios_read+0x348> <== NOT EXECUTED
2003f84: d4 04 20 70 ld [ %l0 + 0x70 ], %o2 <== NOT EXECUTED
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
wait = 0;
}
else {
siproc (c, tty);
2003f88: 7f ff fe d5 call 2003adc <siproc> <== NOT EXECUTED
2003f8c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
2003f90: c4 0c 20 47 ldub [ %l0 + 0x47 ], %g2 <== NOT EXECUTED
2003f94: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED
2003f98: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2003f9c: 26 80 00 04 bl,a 2003fac <rtems_termios_read+0x348> <== NOT EXECUTED
2003fa0: d4 04 20 70 ld [ %l0 + 0x70 ], %o2 <== NOT EXECUTED
2003fa4: a8 10 20 00 clr %l4 <== NOT EXECUTED
wait = 0;
}
timeout = tty->rawInBufSemaphoreTimeout;
2003fa8: d4 04 20 70 ld [ %l0 + 0x70 ], %o2 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
2003fac: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 <== NOT EXECUTED
2003fb0: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED
2003fb4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2003fb8: 02 80 00 08 be 2003fd8 <rtems_termios_read+0x374> <== NOT EXECUTED
2003fbc: a2 10 00 14 mov %l4, %l1 <== NOT EXECUTED
2003fc0: c2 07 40 00 ld [ %i5 ], %g1 <== NOT EXECUTED
2003fc4: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED
2003fc8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
2003fcc: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2003fd0: 06 bf ff ad bl 2003e84 <rtems_termios_read+0x220> <== NOT EXECUTED
2003fd4: 01 00 00 00 nop <== NOT EXECUTED
}
/*
* Wait for characters
*/
if ( wait ) {
2003fd8: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED
2003fdc: 02 80 00 11 be 2004020 <rtems_termios_read+0x3bc> <== NOT EXECUTED
2003fe0: a4 10 00 0a mov %o2, %l2 <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore,
2003fe4: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED
2003fe8: 40 00 05 35 call 20054bc <rtems_semaphore_obtain> <== NOT EXECUTED
2003fec: d2 04 20 6c ld [ %l0 + 0x6c ], %o1 <== NOT EXECUTED
tty->rawInBufSemaphoreOptions,
timeout);
if (sc != RTEMS_SUCCESSFUL)
2003ff0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2003ff4: 12 80 00 0c bne 2004024 <rtems_termios_read+0x3c0> <== NOT EXECUTED
2003ff8: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
rtems_status_code sc;
int wait = (int)1;
while ( wait ) {
2003ffc: a8 10 00 11 mov %l1, %l4 <== NOT EXECUTED
2004000: 10 bf ff eb b 2003fac <rtems_termios_read+0x348> <== NOT EXECUTED
2004004: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
2004008: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED
count--;
200400c: a6 04 ff ff add %l3, -1, %l3 <== NOT EXECUTED
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
2004010: c2 08 40 02 ldub [ %g1 + %g2 ], %g1 <== NOT EXECUTED
2004014: c2 2d 40 00 stb %g1, [ %l5 ] <== NOT EXECUTED
2004018: c6 24 20 24 st %g3, [ %l0 + 0x24 ] <== NOT EXECUTED
200401c: aa 05 60 01 inc %l5 <== NOT EXECUTED
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
2004020: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
2004024: 22 80 00 08 be,a 2004044 <rtems_termios_read+0x3e0> <== NOT EXECUTED
2004028: c2 05 a0 0c ld [ %l6 + 0xc ], %g1 <== NOT EXECUTED
200402c: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED
2004030: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED
2004034: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2004038: 06 bf ff f4 bl 2004008 <rtems_termios_read+0x3a4> <== NOT EXECUTED
200403c: 86 00 a0 01 add %g2, 1, %g3 <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
2004040: c2 05 a0 0c ld [ %l6 + 0xc ], %g1 <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
2004044: 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;
2004048: 82 20 40 13 sub %g1, %l3, %g1 <== NOT EXECUTED
200404c: c2 25 a0 14 st %g1, [ %l6 + 0x14 ] <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
2004050: 40 00 05 62 call 20055d8 <rtems_semaphore_release> <== NOT EXECUTED
2004054: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED
return sc;
}
2004058: 81 c7 e0 08 ret <== NOT EXECUTED
200405c: 81 e8 00 00 restore <== NOT EXECUTED
02002e10 <rtems_termios_refill_transmitter>:
* 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)
{
2002e10: 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))
2002e14: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
2002e18: 82 08 64 03 and %g1, 0x403, %g1 <== NOT EXECUTED
2002e1c: 80 a0 64 01 cmp %g1, 0x401 <== NOT EXECUTED
2002e20: 12 80 00 10 bne 2002e60 <rtems_termios_refill_transmitter+0x50><== NOT EXECUTED
2002e24: a2 10 00 18 mov %i0, %l1 <== NOT EXECUTED
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor,
2002e28: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED
2002e2c: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED
2002e30: 92 06 20 4a add %i0, 0x4a, %o1 <== NOT EXECUTED
2002e34: 9f c0 40 00 call %g1 <== NOT EXECUTED
2002e38: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
2002e3c: 7f ff fb cc call 2001d6c <sparc_disable_interrupts> <== NOT EXECUTED
2002e40: 01 00 00 00 nop <== NOT EXECUTED
tty->t_dqlen--;
2002e44: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
2002e48: 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--;
2002e4c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
2002e50: 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--;
2002e54: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
2002e58: c4 26 20 b8 st %g2, [ %i0 + 0xb8 ] <== NOT EXECUTED
rtems_interrupt_enable(level);
2002e5c: 30 80 00 12 b,a 2002ea4 <rtems_termios_refill_transmitter+0x94><== NOT EXECUTED
nToSend = 1;
}
else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF))
2002e60: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
2002e64: 82 08 60 03 and %g1, 3, %g1 <== NOT EXECUTED
2002e68: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED
2002e6c: 12 80 00 12 bne 2002eb4 <rtems_termios_refill_transmitter+0xa4><== NOT EXECUTED
2002e70: 92 06 20 49 add %i0, 0x49, %o1 <== NOT EXECUTED
* FIXME: this .write call will generate another
* dequeue callback. This will advance the "Tail" in the data
* buffer, although the corresponding data is not yet out!
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor,
2002e74: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED
2002e78: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED
2002e7c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2002e80: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
2002e84: 7f ff fb ba call 2001d6c <sparc_disable_interrupts> <== NOT EXECUTED
2002e88: 01 00 00 00 nop <== NOT EXECUTED
tty->t_dqlen--;
2002e8c: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
2002e90: 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--;
2002e94: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
2002e98: 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--;
2002e9c: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
2002ea0: c4 26 20 b8 st %g2, [ %i0 + 0xb8 ] <== NOT EXECUTED
rtems_interrupt_enable(level);
2002ea4: 7f ff fb b6 call 2001d7c <sparc_enable_interrupts> <== NOT EXECUTED
2002ea8: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
2002eac: 81 c7 e0 08 ret <== NOT EXECUTED
2002eb0: 81 e8 00 00 restore <== NOT EXECUTED
nToSend = 1;
}
else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
2002eb4: c4 06 20 80 ld [ %i0 + 0x80 ], %g2 <== NOT EXECUTED
2002eb8: c2 06 20 84 ld [ %i0 + 0x84 ], %g1 <== NOT EXECUTED
2002ebc: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2002ec0: 12 80 00 0a bne 2002ee8 <rtems_termios_refill_transmitter+0xd8><== NOT EXECUTED
2002ec4: 01 00 00 00 nop <== NOT EXECUTED
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
2002ec8: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED
2002ecc: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED
2002ed0: 12 bf ff f7 bne 2002eac <rtems_termios_refill_transmitter+0x9c><== NOT EXECUTED
2002ed4: b0 10 20 00 clr %i0 <== NOT EXECUTED
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
2002ed8: 40 00 09 c0 call 20055d8 <rtems_semaphore_release> <== NOT EXECUTED
2002edc: d0 04 60 8c ld [ %l1 + 0x8c ], %o0 <== NOT EXECUTED
2002ee0: 81 c7 e0 08 ret <== NOT EXECUTED
2002ee4: 81 e8 00 00 restore <== NOT EXECUTED
}
return 0;
}
rtems_interrupt_disable(level);
2002ee8: 7f ff fb a1 call 2001d6c <sparc_disable_interrupts> <== NOT EXECUTED
2002eec: 01 00 00 00 nop <== NOT EXECUTED
len = tty->t_dqlen;
2002ef0: e0 06 20 90 ld [ %i0 + 0x90 ], %l0 <== NOT EXECUTED
tty->t_dqlen = 0;
2002ef4: c0 26 20 90 clr [ %i0 + 0x90 ] <== NOT EXECUTED
rtems_interrupt_enable(level);
2002ef8: 7f ff fb a1 call 2001d7c <sparc_enable_interrupts> <== NOT EXECUTED
2002efc: 01 00 00 00 nop <== NOT EXECUTED
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
2002f00: d0 06 20 84 ld [ %i0 + 0x84 ], %o0 <== NOT EXECUTED
2002f04: d2 06 20 88 ld [ %i0 + 0x88 ], %o1 <== NOT EXECUTED
2002f08: 40 00 43 da call 2013e70 <.urem> <== NOT EXECUTED
2002f0c: 90 04 00 08 add %l0, %o0, %o0 <== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
2002f10: 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;
2002f14: d0 24 60 84 st %o0, [ %l1 + 0x84 ] <== NOT EXECUTED
if (tty->rawOutBufState == rob_wait) {
2002f18: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED
2002f1c: 12 80 00 04 bne 2002f2c <rtems_termios_refill_transmitter+0x11c><== NOT EXECUTED
2002f20: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
2002f24: 40 00 09 ad call 20055d8 <rtems_semaphore_release> <== NOT EXECUTED
2002f28: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED
}
if (newTail == tty->rawOutBuf.Head) {
2002f2c: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 <== NOT EXECUTED
2002f30: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED
2002f34: 12 80 00 0c bne 2002f64 <rtems_termios_refill_transmitter+0x154><== NOT EXECUTED
2002f38: 01 00 00 00 nop <== NOT EXECUTED
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
2002f3c: c2 04 60 d4 ld [ %l1 + 0xd4 ], %g1 <== NOT EXECUTED
}
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
2002f40: c0 24 60 94 clr [ %l1 + 0x94 ] <== NOT EXECUTED
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
2002f44: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2002f48: 02 80 00 2c be 2002ff8 <rtems_termios_refill_transmitter+0x1e8><== NOT EXECUTED
2002f4c: b0 10 20 00 clr %i0 <== NOT EXECUTED
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
2002f50: d2 04 60 d8 ld [ %l1 + 0xd8 ], %o1 <== NOT EXECUTED
2002f54: 9f c0 40 00 call %g1 <== NOT EXECUTED
2002f58: 90 04 60 30 add %l1, 0x30, %o0 <== NOT EXECUTED
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
tty->flow_ctrl |= FL_OSTOP;
tty->rawOutBufState = rob_busy; /*apm*/
rtems_interrupt_enable(level);
2002f5c: 10 80 00 27 b 2002ff8 <rtems_termios_refill_transmitter+0x1e8><== NOT EXECUTED
2002f60: b0 10 20 00 clr %i0 <== NOT EXECUTED
if ( tty->tty_snd.sw_pfn != NULL) {
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
}
}
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
2002f64: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED
2002f68: 82 08 62 10 and %g1, 0x210, %g1 <== NOT EXECUTED
2002f6c: 80 a0 62 10 cmp %g1, 0x210 <== NOT EXECUTED
2002f70: 12 80 00 0d bne 2002fa4 <rtems_termios_refill_transmitter+0x194><== NOT EXECUTED
2002f74: 01 00 00 00 nop <== NOT EXECUTED
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
2002f78: 7f ff fb 7d call 2001d6c <sparc_disable_interrupts> <== NOT EXECUTED
2002f7c: 01 00 00 00 nop <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
2002f80: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
2002f84: 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;
2002f88: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
2002f8c: c4 24 60 94 st %g2, [ %l1 + 0x94 ] <== NOT EXECUTED
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
tty->flow_ctrl |= FL_OSTOP;
2002f90: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
rtems_interrupt_enable(level);
2002f94: 7f ff fb 7a call 2001d7c <sparc_enable_interrupts> <== NOT EXECUTED
2002f98: 01 00 00 00 nop <== NOT EXECUTED
2002f9c: 10 80 00 17 b 2002ff8 <rtems_termios_refill_transmitter+0x1e8><== NOT EXECUTED
2002fa0: b0 10 20 00 clr %i0 ! 0 <PROM_START> <== NOT EXECUTED
}
else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
2002fa4: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 <== NOT EXECUTED
2002fa8: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED
2002fac: 08 80 00 05 bleu 2002fc0 <rtems_termios_refill_transmitter+0x1b0><== NOT EXECUTED
2002fb0: 01 00 00 00 nop <== NOT EXECUTED
nToSend = tty->rawOutBuf.Size - newTail;
2002fb4: c2 04 60 88 ld [ %l1 + 0x88 ], %g1 <== NOT EXECUTED
else
nToSend = tty->rawOutBuf.Head - newTail;
2002fb8: 10 80 00 04 b 2002fc8 <rtems_termios_refill_transmitter+0x1b8><== NOT EXECUTED
2002fbc: b0 20 40 10 sub %g1, %l0, %i0 <== NOT EXECUTED
2002fc0: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 <== NOT EXECUTED
2002fc4: b0 20 40 10 sub %g1, %l0, %i0 <== NOT EXECUTED
/* when flow control XON or XOF, don't send blocks of data */
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
2002fc8: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED
2002fcc: 80 88 66 00 btst 0x600, %g1 <== NOT EXECUTED
2002fd0: 32 80 00 02 bne,a 2002fd8 <rtems_termios_refill_transmitter+0x1c8><== NOT EXECUTED
2002fd4: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(tty->minor,
2002fd8: d2 04 60 7c ld [ %l1 + 0x7c ], %o1 <== NOT EXECUTED
2002fdc: c4 04 60 a4 ld [ %l1 + 0xa4 ], %g2 <== NOT EXECUTED
2002fe0: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
2002fe4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
2002fe8: 92 02 40 10 add %o1, %l0, %o1 <== NOT EXECUTED
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
2002fec: c2 24 60 94 st %g1, [ %l1 + 0x94 ] <== NOT EXECUTED
(*tty->device.write)(tty->minor,
2002ff0: 9f c0 80 00 call %g2 <== NOT EXECUTED
2002ff4: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED
&tty->rawOutBuf.theBuf[newTail],
nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
2002ff8: e0 24 60 84 st %l0, [ %l1 + 0x84 ] <== NOT EXECUTED
}
return nToSend;
}
2002ffc: 81 c7 e0 08 ret <== NOT EXECUTED
2003000: 81 e8 00 00 restore <== NOT EXECUTED
02004b00 <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
2004b00: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED
char c_buf;
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_RX_PROC_EVENT |
2004b04: a2 07 bf f0 add %fp, -16, %l1 <== NOT EXECUTED
if (c != EOF) {
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
rtems_termios_enqueue_raw_characters (
2004b08: a0 07 bf f7 add %fp, -9, %l0 <== NOT EXECUTED
char c_buf;
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_RX_PROC_EVENT |
2004b0c: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED
2004b10: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
2004b14: 94 10 20 00 clr %o2 <== NOT EXECUTED
2004b18: 40 00 00 b9 call 2004dfc <rtems_event_receive> <== NOT EXECUTED
2004b1c: 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) {
2004b20: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED
2004b24: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED
2004b28: 22 80 00 07 be,a 2004b44 <rtems_termios_rxdaemon+0x44> <== NOT EXECUTED
2004b2c: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1 <== NOT EXECUTED
tty->rxTaskId = 0;
2004b30: c0 26 20 c4 clr [ %i0 + 0xc4 ] <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
2004b34: 40 00 03 22 call 20057bc <rtems_task_delete> <== NOT EXECUTED
2004b38: 90 10 20 00 clr %o0 <== NOT EXECUTED
char c_buf;
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_RX_PROC_EVENT |
2004b3c: 10 bf ff f5 b 2004b10 <rtems_termios_rxdaemon+0x10> <== NOT EXECUTED
2004b40: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED
}
else {
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
2004b44: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004b48: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED
if (c != EOF) {
2004b4c: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED
2004b50: 02 bf ff ef be 2004b0c <rtems_termios_rxdaemon+0xc> <== NOT EXECUTED
2004b54: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
2004b58: d0 2f bf f7 stb %o0, [ %fp + -9 ] <== NOT EXECUTED
rtems_termios_enqueue_raw_characters (
2004b5c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2004b60: 7f ff f9 48 call 2003080 <rtems_termios_enqueue_raw_characters><== NOT EXECUTED
2004b64: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
char c_buf;
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_RX_PROC_EVENT |
2004b68: 10 bf ff ea b 2004b10 <rtems_termios_rxdaemon+0x10> <== NOT EXECUTED
2004b6c: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED
02002df8 <rtems_termios_rxirq_occured>:
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);
2002df8: d0 02 20 c4 ld [ %o0 + 0xc4 ], %o0 <== NOT EXECUTED
2002dfc: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
2002e00: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2002e04: 40 00 08 60 call 2004f84 <rtems_event_send> <== NOT EXECUTED
2002e08: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
02004a84 <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
2004a84: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED
}
else {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
2004a88: 03 00 80 5c sethi %hi(0x2017000), %g1 <== NOT EXECUTED
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_TX_START_EVENT |
2004a8c: a0 07 bf f4 add %fp, -12, %l0 <== NOT EXECUTED
}
else {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
2004a90: a2 10 63 ec or %g1, 0x3ec, %l1 <== NOT EXECUTED
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_TX_START_EVENT |
2004a94: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
2004a98: 94 10 20 00 clr %o2 <== NOT EXECUTED
2004a9c: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED
2004aa0: 40 00 00 d7 call 2004dfc <rtems_event_receive> <== NOT EXECUTED
2004aa4: 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) {
2004aa8: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED
2004aac: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED
2004ab0: 02 80 00 07 be 2004acc <rtems_termios_txdaemon+0x48> <== NOT EXECUTED
2004ab4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
tty->txTaskId = 0;
2004ab8: c0 26 20 c8 clr [ %i0 + 0xc8 ] <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
2004abc: 40 00 03 40 call 20057bc <rtems_task_delete> <== NOT EXECUTED
2004ac0: 90 10 20 00 clr %o0 <== NOT EXECUTED
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_TX_START_EVENT |
2004ac4: 10 bf ff f5 b 2004a98 <rtems_termios_txdaemon+0x14> <== NOT EXECUTED
2004ac8: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
}
else {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
2004acc: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED
2004ad0: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED
2004ad4: 82 04 40 01 add %l1, %g1, %g1 <== NOT EXECUTED
2004ad8: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED
2004adc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004ae0: 02 80 00 04 be 2004af0 <rtems_termios_txdaemon+0x6c> <== NOT EXECUTED
2004ae4: 01 00 00 00 nop <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
2004ae8: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004aec: 01 00 00 00 nop <== NOT EXECUTED
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
2004af0: 7f ff f8 c8 call 2002e10 <rtems_termios_refill_transmitter><== NOT EXECUTED
2004af4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_TX_START_EVENT |
2004af8: 10 bf ff e8 b 2004a98 <rtems_termios_txdaemon+0x14> <== NOT EXECUTED
2004afc: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
02003b2c <rtems_termios_write>:
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
2003b2c: 9d e3 bf 98 save %sp, -104, %sp
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
2003b30: c2 06 00 00 ld [ %i0 ], %g1
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
2003b34: 92 10 20 00 clr %o1
rtems_status_code
rtems_termios_write (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
2003b38: e4 00 60 28 ld [ %g1 + 0x28 ], %l2
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
2003b3c: 94 10 20 00 clr %o2
2003b40: 40 00 06 5f call 20054bc <rtems_semaphore_obtain>
2003b44: d0 04 a0 18 ld [ %l2 + 0x18 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2003b48: a6 92 20 00 orcc %o0, 0, %l3
2003b4c: 12 80 00 25 bne 2003be0 <rtems_termios_write+0xb4> <== NEVER TAKEN
2003b50: 03 00 80 5c sethi %hi(0x2017000), %g1
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
2003b54: c4 04 a0 cc ld [ %l2 + 0xcc ], %g2
2003b58: 85 28 a0 05 sll %g2, 5, %g2
2003b5c: 82 10 63 ec or %g1, 0x3ec, %g1
2003b60: 82 00 40 02 add %g1, %g2, %g1
2003b64: c2 00 60 0c ld [ %g1 + 0xc ], %g1
2003b68: 80 a0 60 00 cmp %g1, 0
2003b6c: 02 80 00 06 be 2003b84 <rtems_termios_write+0x58> <== ALWAYS TAKEN
2003b70: 92 10 00 18 mov %i0, %o1
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
2003b74: 9f c0 40 00 call %g1 <== NOT EXECUTED
2003b78: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
2003b7c: 10 80 00 17 b 2003bd8 <rtems_termios_write+0xac> <== NOT EXECUTED
2003b80: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
return sc;
}
if (tty->termios.c_oflag & OPOST) {
2003b84: c2 04 a0 34 ld [ %l2 + 0x34 ], %g1
2003b88: d2 06 20 0c ld [ %i0 + 0xc ], %o1
2003b8c: 80 88 60 01 btst 1, %g1
2003b90: 02 80 00 0e be 2003bc8 <rtems_termios_write+0x9c> <== NEVER TAKEN
2003b94: d0 06 20 08 ld [ %i0 + 8 ], %o0
uint32_t count = args->count;
2003b98: a2 10 00 09 mov %o1, %l1
char *buffer = args->buffer;
2003b9c: 10 80 00 06 b 2003bb4 <rtems_termios_write+0x88>
2003ba0: a0 10 00 08 mov %o0, %l0
while (count--)
oproc (*buffer++, tty);
2003ba4: a2 04 7f ff add %l1, -1, %l1
2003ba8: a0 04 20 01 inc %l0
2003bac: 7f ff fe 48 call 20034cc <oproc>
2003bb0: 92 10 00 12 mov %l2, %o1
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
2003bb4: 80 a4 60 00 cmp %l1, 0
2003bb8: 32 bf ff fb bne,a 2003ba4 <rtems_termios_write+0x78>
2003bbc: 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;
2003bc0: 10 80 00 05 b 2003bd4 <rtems_termios_write+0xa8>
2003bc4: c2 06 20 0c ld [ %i0 + 0xc ], %g1
while (count--)
oproc (*buffer++, tty);
args->bytes_moved = args->count;
}
else {
rtems_termios_puts (args->buffer, args->count, tty);
2003bc8: 7f ff fd f5 call 200339c <rtems_termios_puts> <== NOT EXECUTED
2003bcc: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED
args->bytes_moved = args->count;
2003bd0: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED
2003bd4: c2 26 20 14 st %g1, [ %i0 + 0x14 ]
}
rtems_semaphore_release (tty->osem);
2003bd8: 40 00 06 80 call 20055d8 <rtems_semaphore_release>
2003bdc: d0 04 a0 18 ld [ %l2 + 0x18 ], %o0
return sc;
}
2003be0: 81 c7 e0 08 ret
2003be4: 91 e8 00 13 restore %g0, %l3, %o0
020112d8 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
Objects_Id id
)
{
20112d8: 9d e3 bf 90 save %sp, -112, %sp
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
20112dc: 11 00 80 c8 sethi %hi(0x2032000), %o0
20112e0: 92 10 00 18 mov %i0, %o1
20112e4: 90 12 22 7c or %o0, 0x27c, %o0
20112e8: 40 00 0b 4a call 2014010 <_Objects_Get>
20112ec: 94 07 bf f4 add %fp, -12, %o2
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
20112f0: c2 07 bf f4 ld [ %fp + -12 ], %g1
20112f4: 80 a0 60 00 cmp %g1, 0
20112f8: 12 80 00 0a bne 2011320 <rtems_timer_cancel+0x48>
20112fc: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
2011300: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
2011304: 80 a0 60 04 cmp %g1, 4
2011308: 02 80 00 04 be 2011318 <rtems_timer_cancel+0x40> <== NEVER TAKEN
201130c: 01 00 00 00 nop
(void) _Watchdog_Remove( &the_timer->Ticker );
2011310: 40 00 13 d9 call 2016274 <_Watchdog_Remove>
2011314: 90 02 20 10 add %o0, 0x10, %o0
_Thread_Enable_dispatch();
2011318: 40 00 0d ac call 20149c8 <_Thread_Enable_dispatch>
201131c: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2011320: 81 c7 e0 08 ret
2011324: 81 e8 00 00 restore
020065c0 <rtems_timer_create>:
rtems_status_code rtems_timer_create(
rtems_name name,
Objects_Id *id
)
{
20065c0: 9d e3 bf 98 save %sp, -104, %sp
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
20065c4: a2 96 20 00 orcc %i0, 0, %l1
20065c8: 02 80 00 11 be 200660c <rtems_timer_create+0x4c>
20065cc: b0 10 20 03 mov 3, %i0
return RTEMS_INVALID_NAME;
if ( !id )
20065d0: 80 a6 60 00 cmp %i1, 0
20065d4: 02 80 00 0e be 200660c <rtems_timer_create+0x4c> <== NEVER TAKEN
20065d8: b0 10 20 09 mov 9, %i0
20065dc: 05 00 80 59 sethi %hi(0x2016400), %g2
20065e0: c2 00 a0 c0 ld [ %g2 + 0xc0 ], %g1 ! 20164c0 <_Thread_Dispatch_disable_level>
20065e4: 82 00 60 01 inc %g1
20065e8: c2 20 a0 c0 st %g1, [ %g2 + 0xc0 ]
* This function allocates a timer control block from
* the inactive chain of free timer control blocks.
*/
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void )
{
return (Timer_Control *) _Objects_Allocate( &_Timer_Information );
20065ec: 21 00 80 5a sethi %hi(0x2016800), %l0
20065f0: 40 00 03 f0 call 20075b0 <_Objects_Allocate>
20065f4: 90 14 22 94 or %l0, 0x294, %o0 ! 2016a94 <_Timer_Information>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
20065f8: 80 a2 20 00 cmp %o0, 0
20065fc: 32 80 00 06 bne,a 2006614 <rtems_timer_create+0x54>
2006600: c4 02 20 08 ld [ %o0 + 8 ], %g2
_Thread_Enable_dispatch();
2006604: 40 00 07 86 call 200841c <_Thread_Enable_dispatch>
2006608: b0 10 20 05 mov 5, %i0
200660c: 81 c7 e0 08 ret
2006610: 81 e8 00 00 restore
2006614: 82 14 22 94 or %l0, 0x294, %g1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
2006618: e2 22 20 0c st %l1, [ %o0 + 0xc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200661c: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
2006620: c0 22 20 30 clr [ %o0 + 0x30 ]
return RTEMS_TOO_MANY;
}
the_timer->the_class = TIMER_DORMANT;
2006624: 82 10 20 04 mov 4, %g1
&_Timer_Information,
&the_timer->Object,
(Objects_Name) name
);
*id = the_timer->Object.id;
2006628: c4 26 40 00 st %g2, [ %i1 ]
if ( !the_timer ) {
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_timer->the_class = TIMER_DORMANT;
200662c: c2 22 20 38 st %g1, [ %o0 + 0x38 ]
2006630: 03 00 00 3f sethi %hi(0xfc00), %g1
2006634: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
2006638: 84 08 80 01 and %g2, %g1, %g2
200663c: 85 28 a0 02 sll %g2, 2, %g2
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2006640: c0 22 20 18 clr [ %o0 + 0x18 ]
the_watchdog->routine = routine;
2006644: c0 22 20 2c clr [ %o0 + 0x2c ]
the_watchdog->id = id;
the_watchdog->user_data = user_data;
2006648: c0 22 20 34 clr [ %o0 + 0x34 ]
200664c: d0 20 c0 02 st %o0, [ %g3 + %g2 ]
&the_timer->Object,
(Objects_Name) name
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
2006650: 40 00 07 73 call 200841c <_Thread_Enable_dispatch>
2006654: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
}
2006658: 81 c7 e0 08 ret
200665c: 81 e8 00 00 restore
02006660 <rtems_timer_fire_after>:
Objects_Id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
2006660: 9d e3 bf 90 save %sp, -112, %sp
2006664: a4 10 00 18 mov %i0, %l2
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
2006668: 80 a6 60 00 cmp %i1, 0
200666c: 02 80 00 1c be 20066dc <rtems_timer_fire_after+0x7c>
2006670: b0 10 20 0a mov 0xa, %i0
return RTEMS_INVALID_NUMBER;
if ( !routine )
2006674: 80 a6 a0 00 cmp %i2, 0
2006678: 02 80 00 19 be 20066dc <rtems_timer_fire_after+0x7c> <== NEVER TAKEN
200667c: b0 10 20 09 mov 9, %i0
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
2006680: 11 00 80 5a sethi %hi(0x2016800), %o0
2006684: 92 10 00 12 mov %l2, %o1
2006688: 90 12 22 94 or %o0, 0x294, %o0
200668c: 40 00 05 23 call 2007b18 <_Objects_Get>
2006690: 94 07 bf f4 add %fp, -12, %o2
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
2006694: c2 07 bf f4 ld [ %fp + -12 ], %g1
2006698: a0 10 00 08 mov %o0, %l0
200669c: 80 a0 60 00 cmp %g1, 0
20066a0: 12 80 00 0f bne 20066dc <rtems_timer_fire_after+0x7c>
20066a4: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
20066a8: a2 02 20 10 add %o0, 0x10, %l1
20066ac: 40 00 0c 53 call 20097f8 <_Watchdog_Remove>
20066b0: 90 10 00 11 mov %l1, %o0
_ISR_Disable( level );
20066b4: 7f ff ef 6d call 2002468 <sparc_disable_interrupts>
20066b8: 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 ) {
20066bc: c2 04 20 18 ld [ %l0 + 0x18 ], %g1
20066c0: 80 a0 60 00 cmp %g1, 0
20066c4: 22 80 00 08 be,a 20066e4 <rtems_timer_fire_after+0x84> <== ALWAYS TAKEN
20066c8: f4 24 20 2c st %i2, [ %l0 + 0x2c ]
_ISR_Enable( level );
20066cc: 7f ff ef 6b call 2002478 <sparc_enable_interrupts> <== NOT EXECUTED
20066d0: b0 10 20 00 clr %i0 <== NOT EXECUTED
_Thread_Enable_dispatch();
20066d4: 40 00 07 52 call 200841c <_Thread_Enable_dispatch> <== NOT EXECUTED
20066d8: 01 00 00 00 nop <== NOT EXECUTED
20066dc: 81 c7 e0 08 ret
20066e0: 81 e8 00 00 restore
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
20066e4: e4 24 20 30 st %l2, [ %l0 + 0x30 ]
the_watchdog->user_data = user_data;
20066e8: 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;
20066ec: c0 24 20 38 clr [ %l0 + 0x38 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
20066f0: c0 24 20 18 clr [ %l0 + 0x18 ]
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_ISR_Enable( level );
20066f4: 7f ff ef 61 call 2002478 <sparc_enable_interrupts>
20066f8: b0 10 20 00 clr %i0
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
20066fc: 92 10 00 11 mov %l1, %o1
2006700: 11 00 80 59 sethi %hi(0x2016400), %o0
2006704: 90 12 21 a4 or %o0, 0x1a4, %o0 ! 20165a4 <_Watchdog_Ticks_chain>
2006708: 40 00 0b e2 call 2009690 <_Watchdog_Insert>
200670c: f2 24 20 1c st %i1, [ %l0 + 0x1c ]
_Watchdog_Insert_ticks( &the_timer->Ticker, ticks );
_Thread_Enable_dispatch();
2006710: 40 00 07 43 call 200841c <_Thread_Enable_dispatch>
2006714: 01 00 00 00 nop
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2006718: 81 c7 e0 08 ret
200671c: 81 e8 00 00 restore
020114e8 <rtems_timer_fire_when>:
Objects_Id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
20114e8: 9d e3 bf 90 save %sp, -112, %sp
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
20114ec: 03 00 80 c6 sethi %hi(0x2031800), %g1
20114f0: c2 08 61 24 ldub [ %g1 + 0x124 ], %g1 ! 2031924 <_TOD_Is_set>
Objects_Id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
20114f4: a6 10 00 18 mov %i0, %l3
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
20114f8: 80 a0 60 00 cmp %g1, 0
20114fc: 02 80 00 2d be 20115b0 <rtems_timer_fire_when+0xc8>
2011500: b0 10 20 0b mov 0xb, %i0
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
2011504: 7f ff f5 34 call 200e9d4 <_TOD_Validate>
2011508: 90 10 00 19 mov %i1, %o0
201150c: 80 8a 20 ff btst 0xff, %o0
2011510: 02 80 00 2a be 20115b8 <rtems_timer_fire_when+0xd0>
2011514: 80 a6 a0 00 cmp %i2, 0
return RTEMS_INVALID_CLOCK;
if ( !routine )
2011518: 02 80 00 26 be 20115b0 <rtems_timer_fire_when+0xc8> <== NEVER TAKEN
201151c: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
2011520: 7f ff f4 fa call 200e908 <_TOD_To_seconds>
2011524: 90 10 00 19 mov %i1, %o0
if ( seconds <= _TOD_Seconds_since_epoch )
2011528: 25 00 80 c6 sethi %hi(0x2031800), %l2
201152c: c2 04 a1 a4 ld [ %l2 + 0x1a4 ], %g1 ! 20319a4 <_TOD_Now>
2011530: 80 a2 00 01 cmp %o0, %g1
2011534: 08 80 00 21 bleu 20115b8 <rtems_timer_fire_when+0xd0>
2011538: a2 10 00 08 mov %o0, %l1
201153c: 11 00 80 c8 sethi %hi(0x2032000), %o0
2011540: 92 10 00 13 mov %l3, %o1
2011544: 90 12 22 7c or %o0, 0x27c, %o0
2011548: 40 00 0a b2 call 2014010 <_Objects_Get>
201154c: 94 07 bf f4 add %fp, -12, %o2
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
2011550: c2 07 bf f4 ld [ %fp + -12 ], %g1
2011554: b2 10 00 08 mov %o0, %i1
2011558: 80 a0 60 00 cmp %g1, 0
201155c: 12 80 00 15 bne 20115b0 <rtems_timer_fire_when+0xc8>
2011560: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
2011564: a0 02 20 10 add %o0, 0x10, %l0
2011568: 40 00 13 43 call 2016274 <_Watchdog_Remove>
201156c: 90 10 00 10 mov %l0, %o0
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
2011570: e6 26 60 30 st %l3, [ %i1 + 0x30 ]
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2011574: c2 04 a1 a4 ld [ %l2 + 0x1a4 ], %g1
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
2011578: 92 10 00 10 mov %l0, %o1
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
201157c: 82 24 40 01 sub %l1, %g1, %g1
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
2011580: 11 00 80 c6 sethi %hi(0x2031800), %o0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2011584: c2 26 60 1c st %g1, [ %i1 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
2011588: 90 12 21 e8 or %o0, 0x1e8, %o0
the_timer->the_class = TIMER_TIME_OF_DAY;
201158c: 82 10 20 02 mov 2, %g1
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2011590: f4 26 60 2c st %i2, [ %i1 + 0x2c ]
2011594: c2 26 60 38 st %g1, [ %i1 + 0x38 ]
the_watchdog->id = id;
the_watchdog->user_data = user_data;
2011598: f6 26 60 34 st %i3, [ %i1 + 0x34 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
201159c: c0 26 60 18 clr [ %i1 + 0x18 ]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
20115a0: 40 00 12 db call 201610c <_Watchdog_Insert>
20115a4: b0 10 20 00 clr %i0
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_Watchdog_Insert_seconds(
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch
);
_Thread_Enable_dispatch();
20115a8: 40 00 0d 08 call 20149c8 <_Thread_Enable_dispatch>
20115ac: 01 00 00 00 nop
20115b0: 81 c7 e0 08 ret
20115b4: 81 e8 00 00 restore
return RTEMS_SUCCESSFUL;
20115b8: b0 10 20 14 mov 0x14, %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
20115bc: 81 c7 e0 08 ret
20115c0: 81 e8 00 00 restore
020115c4 <rtems_timer_get_information>:
rtems_status_code rtems_timer_get_information(
Objects_Id id,
rtems_timer_information *the_info
)
{
20115c4: 9d e3 bf 90 save %sp, -112, %sp
20115c8: 92 10 00 18 mov %i0, %o1
Timer_Control *the_timer;
Objects_Locations location;
if ( !the_info )
20115cc: 80 a6 60 00 cmp %i1, 0
20115d0: 02 80 00 14 be 2011620 <rtems_timer_get_information+0x5c> <== NEVER TAKEN
20115d4: b0 10 20 09 mov 9, %i0
20115d8: 11 00 80 c8 sethi %hi(0x2032000), %o0
20115dc: 94 07 bf f4 add %fp, -12, %o2
20115e0: 40 00 0a 8c call 2014010 <_Objects_Get>
20115e4: 90 12 22 7c or %o0, 0x27c, %o0
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
20115e8: c2 07 bf f4 ld [ %fp + -12 ], %g1
20115ec: 80 a0 60 00 cmp %g1, 0
20115f0: 12 80 00 0c bne 2011620 <rtems_timer_get_information+0x5c>
20115f4: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
the_info->the_class = the_timer->the_class;
the_info->initial = the_timer->Ticker.initial;
20115f8: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_info->the_class = the_timer->the_class;
20115fc: c4 02 20 38 ld [ %o0 + 0x38 ], %g2
the_info->initial = the_timer->Ticker.initial;
2011600: c2 26 60 04 st %g1, [ %i1 + 4 ]
the_info->start_time = the_timer->Ticker.start_time;
2011604: c2 02 20 24 ld [ %o0 + 0x24 ], %g1
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_info->the_class = the_timer->the_class;
2011608: c4 26 40 00 st %g2, [ %i1 ]
the_info->initial = the_timer->Ticker.initial;
the_info->start_time = the_timer->Ticker.start_time;
201160c: c2 26 60 08 st %g1, [ %i1 + 8 ]
the_info->stop_time = the_timer->Ticker.stop_time;
2011610: c2 02 20 28 ld [ %o0 + 0x28 ], %g1
_Thread_Enable_dispatch();
2011614: b0 10 20 00 clr %i0
2011618: 40 00 0c ec call 20149c8 <_Thread_Enable_dispatch>
201161c: c2 26 60 0c st %g1, [ %i1 + 0xc ]
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2011620: 81 c7 e0 08 ret
2011624: 81 e8 00 00 restore
020118ec <rtems_timer_initiate_server>:
rtems_status_code rtems_timer_initiate_server(
uint32_t priority,
uint32_t stack_size,
rtems_attribute attribute_set
)
{
20118ec: 9d e3 bf 90 save %sp, -112, %sp
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
20118f0: 80 a6 20 00 cmp %i0, 0
20118f4: 02 80 00 06 be 201190c <rtems_timer_initiate_server+0x20>
20118f8: 82 10 20 00 clr %g1
20118fc: 03 00 80 b1 sethi %hi(0x202c400), %g1
2011900: c2 08 63 44 ldub [ %g1 + 0x344 ], %g1 ! 202c744 <rtems_maximum_priority>
2011904: 80 a0 40 18 cmp %g1, %i0
2011908: 82 60 3f ff subx %g0, -1, %g1
* Make sure the requested priority is valid. The if is
* structured so we check it is invalid before looking for
* a specific invalid value as the default.
*/
_priority = priority;
if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) {
201190c: 80 a0 60 00 cmp %g1, 0
2011910: 12 80 00 06 bne 2011928 <rtems_timer_initiate_server+0x3c><== NEVER TAKEN
2011914: a2 10 00 18 mov %i0, %l1
if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY )
2011918: 80 a6 3f ff cmp %i0, -1
201191c: 12 80 00 56 bne 2011a74 <rtems_timer_initiate_server+0x188>
2011920: 90 10 20 13 mov 0x13, %o0
2011924: a2 10 20 00 clr %l1
2011928: 05 00 80 c6 sethi %hi(0x2031800), %g2
201192c: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 2031910 <_Thread_Dispatch_disable_level>
2011930: 82 00 60 01 inc %g1
2011934: c2 20 a1 10 st %g1, [ %g2 + 0x110 ]
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
2011938: 31 00 80 b4 sethi %hi(0x202d000), %i0
initialized = true;
201193c: 82 10 20 01 mov 1, %g1
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
2011940: e0 0e 22 8c ldub [ %i0 + 0x28c ], %l0
initialized = true;
_Thread_Enable_dispatch();
2011944: 40 00 0c 21 call 20149c8 <_Thread_Enable_dispatch>
2011948: c2 2e 22 8c stb %g1, [ %i0 + 0x28c ]
if ( tmpInitialized )
201194c: 80 a4 20 00 cmp %l0, 0
2011950: 12 80 00 49 bne 2011a74 <rtems_timer_initiate_server+0x188>
2011954: 90 10 20 0e mov 0xe, %o0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
2011958: 05 00 80 c6 sethi %hi(0x2031800), %g2
201195c: 82 10 a0 24 or %g2, 0x24, %g1 ! 2031824 <_Timer_To_be_inserted>
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
2011960: c2 20 60 08 st %g1, [ %g1 + 8 ]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
2011964: 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);
2011968: 82 00 60 04 add %g1, 4, %g1
* other library rules. For example, if using a TSR written in Ada the
* Server should run at the same priority as the priority Ada task.
* Otherwise, the priority ceiling for the mutex used to protect the
* GNAT run-time is violated.
*/
status = rtems_task_create(
201196c: 92 10 00 11 mov %l1, %o1
2011970: 94 10 00 19 mov %i1, %o2
2011974: 19 00 00 20 sethi %hi(0x8000), %o4
2011978: c2 20 a0 24 st %g1, [ %g2 + 0x24 ]
201197c: 98 16 80 0c or %i2, %o4, %o4
2011980: 11 15 12 53 sethi %hi(0x54494c00), %o0
2011984: 96 10 21 00 mov 0x100, %o3
2011988: 90 12 21 45 or %o0, 0x145, %o0
201198c: 7f ff fc 77 call 2010b68 <rtems_task_create>
2011990: 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) {
2011994: 80 a2 20 00 cmp %o0, 0
2011998: 02 80 00 04 be 20119a8 <rtems_timer_initiate_server+0xbc>
201199c: 03 00 80 c5 sethi %hi(0x2031400), %g1
initialized = false;
20119a0: 10 80 00 35 b 2011a74 <rtems_timer_initiate_server+0x188>
20119a4: c0 2e 22 8c clrb [ %i0 + 0x28c ]
* to a TCB pointer from here out.
*
* NOTE: Setting the pointer to the Timer Server TCB to a value other than
* NULL indicates that task-based timer support is initialized.
*/
_Timer_Server = (Thread_Control *)_Objects_Get_local_object(
20119a8: d6 07 bf f4 ld [ %fp + -12 ], %o3
RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object(
Objects_Information *information,
uint16_t index
)
{
if ( index > information->maximum )
20119ac: 86 10 63 c4 or %g1, 0x3c4, %g3
20119b0: c4 10 e0 10 lduh [ %g3 + 0x10 ], %g2
20119b4: 03 00 00 3f sethi %hi(0xfc00), %g1
20119b8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
20119bc: 82 0a c0 01 and %o3, %g1, %g1
20119c0: 80 a0 40 02 cmp %g1, %g2
20119c4: 18 80 00 05 bgu 20119d8 <rtems_timer_initiate_server+0xec><== NEVER TAKEN
20119c8: 98 10 20 00 clr %o4
return NULL;
return information->local_table[ index ];
20119cc: c4 00 e0 1c ld [ %g3 + 0x1c ], %g2
20119d0: 83 28 60 02 sll %g1, 2, %g1
20119d4: d8 00 80 01 ld [ %g2 + %g1 ], %o4
20119d8: 1b 00 80 c6 sethi %hi(0x2031800), %o5
20119dc: 82 13 60 18 or %o5, 0x18, %g1 ! 2031818 <_Timer_Seconds_chain>
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
20119e0: c2 20 60 08 st %g1, [ %g1 + 8 ]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
20119e4: 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);
20119e8: 82 00 60 04 add %g1, 4, %g1
20119ec: c2 23 60 18 st %g1, [ %o5 + 0x18 ]
20119f0: 03 00 80 c8 sethi %hi(0x2032000), %g1
20119f4: 09 00 80 c6 sethi %hi(0x2031800), %g4
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
20119f8: c0 23 20 6c clr [ %o4 + 0x6c ]
20119fc: 84 11 20 04 or %g4, 4, %g2
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2011a00: c0 23 20 50 clr [ %o4 + 0x50 ]
the_watchdog->routine = routine;
the_watchdog->id = id;
2011a04: d6 23 20 68 st %o3, [ %o4 + 0x68 ]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
2011a08: 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;
2011a0c: c0 20 a0 04 clr [ %g2 + 4 ]
2011a10: d8 20 62 c0 st %o4, [ %g1 + 0x2c0 ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
2011a14: 84 00 a0 04 add %g2, 4, %g2
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2011a18: 07 00 80 52 sethi %hi(0x2014800), %g3
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2011a1c: 03 00 80 c6 sethi %hi(0x2031800), %g1
the_watchdog->routine = routine;
2011a20: 86 10 e0 04 or %g3, 4, %g3
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2011a24: 82 10 60 30 or %g1, 0x30, %g1
the_watchdog->routine = routine;
2011a28: c6 23 20 64 st %g3, [ %o4 + 0x64 ]
2011a2c: c4 21 20 04 st %g2, [ %g4 + 4 ]
2011a30: c6 20 60 1c st %g3, [ %g1 + 0x1c ]
the_watchdog->id = id;
the_watchdog->user_data = user_data;
2011a34: c0 20 60 24 clr [ %g1 + 0x24 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2011a38: c0 20 60 08 clr [ %g1 + 8 ]
the_watchdog->routine = routine;
the_watchdog->id = id;
2011a3c: d6 20 60 20 st %o3, [ %g1 + 0x20 ]
/*
* Initialize the pointer to the timer reset method so applications
* that do not use the Timer Server do not have to pull it in.
*/
_Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method;
2011a40: 05 00 80 c8 sethi %hi(0x2032000), %g2
2011a44: 03 00 80 46 sethi %hi(0x2011800), %g1
2011a48: 82 10 62 7c or %g1, 0x27c, %g1 ! 2011a7c <_Timer_Server_schedule_operation_method>
/*
* Start the timer server
*/
status = rtems_task_start(
2011a4c: 90 10 00 0b mov %o3, %o0
/*
* Initialize the pointer to the timer reset method so applications
* that do not use the Timer Server do not have to pull it in.
*/
_Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method;
2011a50: c2 20 a2 bc st %g1, [ %g2 + 0x2bc ]
/*
* Start the timer server
*/
status = rtems_task_start(
2011a54: 13 00 80 46 sethi %hi(0x2011800), %o1
2011a58: 94 10 20 00 clr %o2
2011a5c: 7f ff fd 99 call 20110c0 <rtems_task_start>
2011a60: 92 12 63 2c or %o1, 0x32c, %o1
id, /* the id from create */
(rtems_task_entry) _Timer_Server_body, /* the timer server entry point */
0 /* there is no argument */
);
if (status) {
2011a64: 80 a2 20 00 cmp %o0, 0
2011a68: 02 80 00 03 be 2011a74 <rtems_timer_initiate_server+0x188><== ALWAYS TAKEN
2011a6c: 03 00 80 b4 sethi %hi(0x202d000), %g1
* but there is actually no way (in normal circumstances) that the
* start can fail. The id and starting address are known to be
* be good. If this service fails, something is weirdly wrong on the
* target such as a stray write in an ISR or incorrect memory layout.
*/
initialized = false;
2011a70: c0 28 62 8c clrb [ %g1 + 0x28c ] ! 202d28c <initialized.4143><== NOT EXECUTED
}
return status;
}
2011a74: 81 c7 e0 08 ret
2011a78: 91 e8 00 08 restore %g0, %o0, %o0
02011660 <rtems_timer_reset>:
*/
rtems_status_code rtems_timer_reset(
Objects_Id id
)
{
2011660: 9d e3 bf 90 save %sp, -112, %sp
2011664: 11 00 80 c8 sethi %hi(0x2032000), %o0
2011668: 92 10 00 18 mov %i0, %o1
201166c: 90 12 22 7c or %o0, 0x27c, %o0
2011670: 40 00 0a 68 call 2014010 <_Objects_Get>
2011674: 94 07 bf f4 add %fp, -12, %o2
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
2011678: c2 07 bf f4 ld [ %fp + -12 ], %g1
201167c: a0 10 00 08 mov %o0, %l0
2011680: 80 a0 60 00 cmp %g1, 0
2011684: 12 80 00 19 bne 20116e8 <rtems_timer_reset+0x88>
2011688: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
switch ( the_timer->the_class ) {
201168c: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
2011690: 80 a0 60 01 cmp %g1, 1
2011694: 22 80 00 0f be,a 20116d0 <rtems_timer_reset+0x70>
2011698: 31 00 80 c8 sethi %hi(0x2032000), %i0
201169c: 2a 80 00 06 bcs,a 20116b4 <rtems_timer_reset+0x54>
20116a0: a0 02 20 10 add %o0, 0x10, %l0
20116a4: 80 a0 60 04 cmp %g1, 4
20116a8: 18 80 00 1c bgu 2011718 <rtems_timer_reset+0xb8> <== NEVER TAKEN
20116ac: 01 00 00 00 nop
20116b0: 30 80 00 16 b,a 2011708 <rtems_timer_reset+0xa8>
case TIMER_INTERVAL:
_Watchdog_Remove( &the_timer->Ticker );
20116b4: 40 00 12 f0 call 2016274 <_Watchdog_Remove>
20116b8: 90 10 00 10 mov %l0, %o0
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
20116bc: 92 10 00 10 mov %l0, %o1
20116c0: 11 00 80 c6 sethi %hi(0x2031800), %o0
20116c4: 40 00 12 92 call 201610c <_Watchdog_Insert>
20116c8: 90 12 21 f4 or %o0, 0x1f4, %o0 ! 20319f4 <_Watchdog_Ticks_chain>
20116cc: 30 80 00 13 b,a 2011718 <rtems_timer_reset+0xb8>
break;
case TIMER_INTERVAL_ON_TASK:
if ( !_Timer_Server_schedule_operation ) {
20116d0: c2 06 22 bc ld [ %i0 + 0x2bc ], %g1
20116d4: 80 a0 60 00 cmp %g1, 0
20116d8: 12 80 00 06 bne 20116f0 <rtems_timer_reset+0x90> <== ALWAYS TAKEN
20116dc: 01 00 00 00 nop
_Thread_Enable_dispatch();
20116e0: 40 00 0c ba call 20149c8 <_Thread_Enable_dispatch> <== NOT EXECUTED
20116e4: b0 10 20 0e mov 0xe, %i0 ! e <PROM_START+0xe> <== NOT EXECUTED
20116e8: 81 c7 e0 08 ret
20116ec: 81 e8 00 00 restore
return RTEMS_INCORRECT_STATE;
}
_Watchdog_Remove( &the_timer->Ticker );
20116f0: 40 00 12 e1 call 2016274 <_Watchdog_Remove>
20116f4: 90 02 20 10 add %o0, 0x10, %o0
(*_Timer_Server_schedule_operation)( the_timer );
20116f8: c2 06 22 bc ld [ %i0 + 0x2bc ], %g1
20116fc: 9f c0 40 00 call %g1
2011700: 90 10 00 10 mov %l0, %o0
2011704: 30 80 00 05 b,a 2011718 <rtems_timer_reset+0xb8>
break;
case TIMER_TIME_OF_DAY:
case TIMER_TIME_OF_DAY_ON_TASK:
case TIMER_DORMANT:
_Thread_Enable_dispatch();
2011708: 40 00 0c b0 call 20149c8 <_Thread_Enable_dispatch>
201170c: b0 10 20 0b mov 0xb, %i0
2011710: 81 c7 e0 08 ret
2011714: 81 e8 00 00 restore
return RTEMS_NOT_DEFINED;
}
_Thread_Enable_dispatch();
2011718: 40 00 0c ac call 20149c8 <_Thread_Enable_dispatch>
201171c: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2011720: 81 c7 e0 08 ret
2011724: 81 e8 00 00 restore
02011728 <rtems_timer_server_fire_after>:
Objects_Id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
2011728: 9d e3 bf 90 save %sp, -112, %sp
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( !_Timer_Server )
201172c: 03 00 80 c8 sethi %hi(0x2032000), %g1
2011730: c2 00 62 c0 ld [ %g1 + 0x2c0 ], %g1 ! 20322c0 <_Timer_Server>
Objects_Id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
2011734: a2 10 00 18 mov %i0, %l1
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( !_Timer_Server )
2011738: 80 a0 60 00 cmp %g1, 0
201173c: 02 80 00 1e be 20117b4 <rtems_timer_server_fire_after+0x8c>
2011740: b0 10 20 0e mov 0xe, %i0
return RTEMS_INCORRECT_STATE;
if ( !routine )
2011744: 80 a6 a0 00 cmp %i2, 0
2011748: 02 80 00 1b be 20117b4 <rtems_timer_server_fire_after+0x8c><== NEVER TAKEN
201174c: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
2011750: 80 a6 60 00 cmp %i1, 0
2011754: 02 80 00 18 be 20117b4 <rtems_timer_server_fire_after+0x8c>
2011758: b0 10 20 0a mov 0xa, %i0
201175c: 11 00 80 c8 sethi %hi(0x2032000), %o0
2011760: 92 10 00 11 mov %l1, %o1
2011764: 90 12 22 7c or %o0, 0x27c, %o0
2011768: 40 00 0a 2a call 2014010 <_Objects_Get>
201176c: 94 07 bf f4 add %fp, -12, %o2
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
2011770: c2 07 bf f4 ld [ %fp + -12 ], %g1
2011774: a0 10 00 08 mov %o0, %l0
2011778: 80 a0 60 00 cmp %g1, 0
201177c: 12 80 00 0e bne 20117b4 <rtems_timer_server_fire_after+0x8c>
2011780: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
2011784: 40 00 12 bc call 2016274 <_Watchdog_Remove>
2011788: 90 02 20 10 add %o0, 0x10, %o0
_ISR_Disable( level );
201178c: 7f ff e7 66 call 200b524 <sparc_disable_interrupts>
2011790: 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 ) {
2011794: c2 04 20 18 ld [ %l0 + 0x18 ], %g1
2011798: 80 a0 60 00 cmp %g1, 0
201179c: 02 80 00 08 be 20117bc <rtems_timer_server_fire_after+0x94><== ALWAYS TAKEN
20117a0: 82 10 20 01 mov 1, %g1
_ISR_Enable( level );
20117a4: 7f ff e7 64 call 200b534 <sparc_enable_interrupts> <== NOT EXECUTED
20117a8: b0 10 20 00 clr %i0 <== NOT EXECUTED
_Thread_Enable_dispatch();
20117ac: 40 00 0c 87 call 20149c8 <_Thread_Enable_dispatch> <== NOT EXECUTED
20117b0: 01 00 00 00 nop <== NOT EXECUTED
20117b4: 81 c7 e0 08 ret
20117b8: 81 e8 00 00 restore
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
20117bc: f4 24 20 2c st %i2, [ %l0 + 0x2c ]
the_watchdog->id = id;
20117c0: e2 24 20 30 st %l1, [ %l0 + 0x30 ]
the_watchdog->user_data = user_data;
20117c4: f6 24 20 34 st %i3, [ %l0 + 0x34 ]
* so we can atomically initialize it as in use.
*/
the_timer->the_class = TIMER_INTERVAL_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = ticks;
20117c8: f2 24 20 1c st %i1, [ %l0 + 0x1c ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
20117cc: 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;
20117d0: 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 );
20117d4: 7f ff e7 58 call 200b534 <sparc_enable_interrupts>
20117d8: b0 10 20 00 clr %i0
/*
* _Timer_Server_schedule_operation != NULL because we checked that
* _Timer_Server was != NULL above. Both are set at the same time.
*/
(*_Timer_Server_schedule_operation)( the_timer );
20117dc: 03 00 80 c8 sethi %hi(0x2032000), %g1
20117e0: c2 00 62 bc ld [ %g1 + 0x2bc ], %g1 ! 20322bc <_Timer_Server_schedule_operation>
20117e4: 9f c0 40 00 call %g1
20117e8: 90 10 00 10 mov %l0, %o0
_Thread_Enable_dispatch();
20117ec: 40 00 0c 77 call 20149c8 <_Thread_Enable_dispatch>
20117f0: 01 00 00 00 nop
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
20117f4: 81 c7 e0 08 ret
20117f8: 81 e8 00 00 restore
020117fc <rtems_timer_server_fire_when>:
Objects_Id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
20117fc: 9d e3 bf 90 save %sp, -112, %sp
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_Timer_Server )
2011800: 03 00 80 c8 sethi %hi(0x2032000), %g1
2011804: c2 00 62 c0 ld [ %g1 + 0x2c0 ], %g1 ! 20322c0 <_Timer_Server>
Objects_Id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
2011808: a4 10 00 18 mov %i0, %l2
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_Timer_Server )
201180c: 80 a0 60 00 cmp %g1, 0
2011810: 02 80 00 32 be 20118d8 <rtems_timer_server_fire_when+0xdc>
2011814: b0 10 20 0e mov 0xe, %i0
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
2011818: 03 00 80 c6 sethi %hi(0x2031800), %g1
201181c: c2 08 61 24 ldub [ %g1 + 0x124 ], %g1 ! 2031924 <_TOD_Is_set>
2011820: 80 a0 60 00 cmp %g1, 0
2011824: 02 80 00 2d be 20118d8 <rtems_timer_server_fire_when+0xdc><== NEVER TAKEN
2011828: b0 10 20 0b mov 0xb, %i0
return RTEMS_NOT_DEFINED;
if ( !routine )
201182c: 80 a6 a0 00 cmp %i2, 0
2011830: 02 80 00 2a be 20118d8 <rtems_timer_server_fire_when+0xdc><== NEVER TAKEN
2011834: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
2011838: 7f ff f4 67 call 200e9d4 <_TOD_Validate>
201183c: 90 10 00 19 mov %i1, %o0
2011840: 80 8a 20 ff btst 0xff, %o0
2011844: 22 80 00 25 be,a 20118d8 <rtems_timer_server_fire_when+0xdc>
2011848: b0 10 20 14 mov 0x14, %i0
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
201184c: 7f ff f4 2f call 200e908 <_TOD_To_seconds>
2011850: 90 10 00 19 mov %i1, %o0
if ( seconds <= _TOD_Seconds_since_epoch )
2011854: 23 00 80 c6 sethi %hi(0x2031800), %l1
2011858: c2 04 61 a4 ld [ %l1 + 0x1a4 ], %g1 ! 20319a4 <_TOD_Now>
201185c: 80 a2 00 01 cmp %o0, %g1
2011860: 08 80 00 20 bleu 20118e0 <rtems_timer_server_fire_when+0xe4>
2011864: a0 10 00 08 mov %o0, %l0
2011868: 11 00 80 c8 sethi %hi(0x2032000), %o0
201186c: 92 10 00 12 mov %l2, %o1
2011870: 90 12 22 7c or %o0, 0x27c, %o0
2011874: 40 00 09 e7 call 2014010 <_Objects_Get>
2011878: 94 07 bf f4 add %fp, -12, %o2
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
201187c: c2 07 bf f4 ld [ %fp + -12 ], %g1
2011880: b2 10 00 08 mov %o0, %i1
2011884: 80 a0 60 00 cmp %g1, 0
2011888: 12 80 00 14 bne 20118d8 <rtems_timer_server_fire_when+0xdc>
201188c: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
2011890: 40 00 12 79 call 2016274 <_Watchdog_Remove>
2011894: 90 02 20 10 add %o0, 0x10, %o0
the_watchdog->routine = routine;
the_watchdog->id = id;
2011898: e4 26 60 30 st %l2, [ %i1 + 0x30 ]
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch;
201189c: c4 04 61 a4 ld [ %l1 + 0x1a4 ], %g2
/*
* _Timer_Server_schedule_operation != NULL because we checked that
* _Timer_Server was != NULL above. Both are set at the same time.
*/
(*_Timer_Server_schedule_operation)( the_timer );
20118a0: 03 00 80 c8 sethi %hi(0x2032000), %g1
20118a4: c6 00 62 bc ld [ %g1 + 0x2bc ], %g3 ! 20322bc <_Timer_Server_schedule_operation>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch;
20118a8: 84 24 00 02 sub %l0, %g2, %g2
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
20118ac: 82 10 20 03 mov 3, %g1
/*
* _Timer_Server_schedule_operation != NULL because we checked that
* _Timer_Server was != NULL above. Both are set at the same time.
*/
(*_Timer_Server_schedule_operation)( the_timer );
20118b0: 90 10 00 19 mov %i1, %o0
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch;
20118b4: c4 26 60 1c st %g2, [ %i1 + 0x1c ]
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
20118b8: c2 26 60 38 st %g1, [ %i1 + 0x38 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
20118bc: f4 26 60 2c st %i2, [ %i1 + 0x2c ]
the_watchdog->id = id;
the_watchdog->user_data = user_data;
20118c0: f6 26 60 34 st %i3, [ %i1 + 0x34 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
20118c4: c0 26 60 18 clr [ %i1 + 0x18 ]
/*
* _Timer_Server_schedule_operation != NULL because we checked that
* _Timer_Server was != NULL above. Both are set at the same time.
*/
(*_Timer_Server_schedule_operation)( the_timer );
20118c8: 9f c0 c0 00 call %g3
20118cc: b0 10 20 00 clr %i0
_Thread_Enable_dispatch();
20118d0: 40 00 0c 3e call 20149c8 <_Thread_Enable_dispatch>
20118d4: 01 00 00 00 nop
20118d8: 81 c7 e0 08 ret
20118dc: 81 e8 00 00 restore
return RTEMS_SUCCESSFUL;
20118e0: b0 10 20 14 mov 0x14, %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
20118e4: 81 c7 e0 08 ret
20118e8: 81 e8 00 00 restore
02002f1c <rtems_verror>:
static int rtems_verror(
uint32_t error_flag,
const char *printf_format,
va_list arglist
)
{
2002f1c: 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)
2002f20: 03 08 00 00 sethi %hi(0x20000000), %g1 <== NOT EXECUTED
2002f24: a8 8e 00 01 andcc %i0, %g1, %l4 <== NOT EXECUTED
2002f28: 02 80 00 11 be 2002f6c <rtems_verror+0x50> <== NOT EXECUTED
2002f2c: a6 10 00 18 mov %i0, %l3 <== NOT EXECUTED
{
if (rtems_panic_in_progress++)
2002f30: 03 00 80 90 sethi %hi(0x2024000), %g1 <== NOT EXECUTED
2002f34: c6 00 60 7c ld [ %g1 + 0x7c ], %g3 ! 202407c <rtems_panic_in_progress><== NOT EXECUTED
2002f38: 84 00 e0 01 add %g3, 1, %g2 <== NOT EXECUTED
2002f3c: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED
2002f40: 02 80 00 07 be 2002f5c <rtems_verror+0x40> <== NOT EXECUTED
2002f44: c4 20 60 7c st %g2, [ %g1 + 0x7c ] <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
2002f48: 05 00 80 90 sethi %hi(0x2024000), %g2 <== NOT EXECUTED
2002f4c: c2 00 a2 60 ld [ %g2 + 0x260 ], %g1 ! 2024260 <_Thread_Dispatch_disable_level><== NOT EXECUTED
2002f50: 82 00 60 01 inc %g1 <== NOT EXECUTED
2002f54: c2 20 a2 60 st %g1, [ %g2 + 0x260 ] <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
2002f58: 03 00 80 90 sethi %hi(0x2024000), %g1 <== NOT EXECUTED
2002f5c: c2 00 60 7c ld [ %g1 + 0x7c ], %g1 ! 202407c <rtems_panic_in_progress><== NOT EXECUTED
2002f60: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED
2002f64: 34 80 00 5b bg,a 20030d0 <rtems_verror+0x1b4> <== NOT EXECUTED
2002f68: b0 10 20 00 clr %i0 <== NOT EXECUTED
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
2002f6c: 03 00 80 6e sethi %hi(0x201b800), %g1 <== NOT EXECUTED
2002f70: c2 00 63 d8 ld [ %g1 + 0x3d8 ], %g1 ! 201bbd8 <_impure_ptr><== NOT EXECUTED
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
2002f74: a4 10 20 00 clr %l2 <== NOT EXECUTED
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
2002f78: 40 00 30 71 call 200f13c <fflush> <== NOT EXECUTED
2002f7c: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED
status = error_flag & ~RTEMS_ERROR_MASK;
2002f80: 03 1c 00 00 sethi %hi(0x70000000), %g1 <== NOT EXECUTED
2002f84: a0 2c c0 01 andn %l3, %g1, %l0 <== NOT EXECUTED
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
2002f88: 03 10 00 00 sethi %hi(0x40000000), %g1 <== NOT EXECUTED
2002f8c: 80 8c c0 01 btst %l3, %g1 <== NOT EXECUTED
2002f90: 02 80 00 05 be 2002fa4 <rtems_verror+0x88> <== NOT EXECUTED
2002f94: 23 00 80 6e sethi %hi(0x201b800), %l1 <== NOT EXECUTED
local_errno = errno;
2002f98: 40 00 2f 98 call 200edf8 <__errno> <== NOT EXECUTED
2002f9c: 01 00 00 00 nop <== NOT EXECUTED
2002fa0: e4 02 00 00 ld [ %o0 ], %l2 <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
2002fa4: c2 04 63 d8 ld [ %l1 + 0x3d8 ], %g1 <== NOT EXECUTED
2002fa8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2002fac: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED
2002fb0: 40 00 44 6e call 2014168 <vfprintf> <== NOT EXECUTED
2002fb4: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
if (status)
2002fb8: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED
2002fbc: 02 80 00 0e be 2002ff4 <rtems_verror+0xd8> <== NOT EXECUTED
2002fc0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
2002fc4: c2 04 63 d8 ld [ %l1 + 0x3d8 ], %g1 <== NOT EXECUTED
const char *
rtems_status_text(
rtems_status_code status
)
{
return rtems_assoc_name_by_local(rtems_status_assoc, status);
2002fc8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
2002fcc: e0 00 60 0c ld [ %g1 + 0xc ], %l0 <== NOT EXECUTED
const char *
rtems_status_text(
rtems_status_code status
)
{
return rtems_assoc_name_by_local(rtems_status_assoc, status);
2002fd0: 11 00 80 67 sethi %hi(0x2019c00), %o0 <== NOT EXECUTED
2002fd4: 40 00 23 f3 call 200bfa0 <rtems_assoc_name_by_local> <== NOT EXECUTED
2002fd8: 90 12 20 58 or %o0, 0x58, %o0 ! 2019c58 <rtems_status_assoc><== NOT EXECUTED
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
2002fdc: 13 00 80 66 sethi %hi(0x2019800), %o1 <== NOT EXECUTED
const char *
rtems_status_text(
rtems_status_code status
)
{
return rtems_assoc_name_by_local(rtems_status_assoc, status);
2002fe0: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
2002fe4: 92 12 60 d8 or %o1, 0xd8, %o1 <== NOT EXECUTED
2002fe8: 40 00 31 48 call 200f508 <fprintf> <== NOT EXECUTED
2002fec: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2002ff0: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED
if (local_errno)
2002ff4: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED
2002ff8: 02 80 00 1c be 2003068 <rtems_verror+0x14c> <== NOT EXECUTED
2002ffc: 23 00 80 6e sethi %hi(0x201b800), %l1 <== NOT EXECUTED
{
if ((local_errno > 0) && *strerror(local_errno))
2003000: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED
2003004: 04 80 00 11 ble 2003048 <rtems_verror+0x12c> <== NOT EXECUTED
2003008: 03 00 80 6e sethi %hi(0x201b800), %g1 <== NOT EXECUTED
200300c: 40 00 35 a0 call 201068c <strerror> <== NOT EXECUTED
2003010: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
2003014: c2 4a 00 00 ldsb [ %o0 ], %g1 <== NOT EXECUTED
2003018: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200301c: 02 80 00 0b be 2003048 <rtems_verror+0x12c> <== NOT EXECUTED
2003020: 03 00 80 6e sethi %hi(0x201b800), %g1 <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
2003024: c2 00 63 d8 ld [ %g1 + 0x3d8 ], %g1 ! 201bbd8 <_impure_ptr><== NOT EXECUTED
2003028: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
200302c: 40 00 35 98 call 201068c <strerror> <== NOT EXECUTED
2003030: e0 00 60 0c ld [ %g1 + 0xc ], %l0 <== NOT EXECUTED
2003034: 13 00 80 66 sethi %hi(0x2019800), %o1 <== NOT EXECUTED
2003038: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
200303c: 92 12 60 e8 or %o1, 0xe8, %o1 <== NOT EXECUTED
2003040: 10 80 00 07 b 200305c <rtems_verror+0x140> <== NOT EXECUTED
2003044: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
2003048: c2 00 63 d8 ld [ %g1 + 0x3d8 ], %g1 <== NOT EXECUTED
200304c: 13 00 80 66 sethi %hi(0x2019800), %o1 <== NOT EXECUTED
2003050: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED
2003054: 92 12 60 f8 or %o1, 0xf8, %o1 <== NOT EXECUTED
2003058: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED
200305c: 40 00 31 2b call 200f508 <fprintf> <== NOT EXECUTED
2003060: 23 00 80 6e sethi %hi(0x201b800), %l1 <== NOT EXECUTED
2003064: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED
}
chars_written += fprintf(stderr, "\n");
2003068: c2 04 63 d8 ld [ %l1 + 0x3d8 ], %g1 <== NOT EXECUTED
200306c: 13 00 80 65 sethi %hi(0x2019400), %o1 <== NOT EXECUTED
2003070: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED
2003074: 40 00 31 25 call 200f508 <fprintf> <== NOT EXECUTED
2003078: 92 12 62 e8 or %o1, 0x2e8, %o1 <== NOT EXECUTED
(void) fflush(stderr);
200307c: c2 04 63 d8 ld [ %l1 + 0x3d8 ], %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");
2003080: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
(void) fflush(stderr);
2003084: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED
2003088: 40 00 30 2d call 200f13c <fflush> <== NOT EXECUTED
200308c: b0 04 00 18 add %l0, %i0, %i0 <== NOT EXECUTED
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
2003090: 03 0c 00 00 sethi %hi(0x30000000), %g1 <== NOT EXECUTED
2003094: 80 8c c0 01 btst %l3, %g1 <== NOT EXECUTED
2003098: 02 80 00 0e be 20030d0 <rtems_verror+0x1b4> <== NOT EXECUTED
200309c: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED
{
if (error_flag & RTEMS_ERROR_PANIC)
20030a0: 02 80 00 07 be 20030bc <rtems_verror+0x1a0> <== NOT EXECUTED
20030a4: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_error(0, "fatal error, exiting");
20030a8: 13 00 80 66 sethi %hi(0x2019800), %o1 <== NOT EXECUTED
20030ac: 40 00 00 18 call 200310c <rtems_error> <== NOT EXECUTED
20030b0: 92 12 61 10 or %o1, 0x110, %o1 ! 2019910 <pollCallbacks.4788+0x438><== NOT EXECUTED
_exit(local_errno);
20030b4: 40 00 01 7f call 20036b0 <_exit> <== NOT EXECUTED
20030b8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
}
else
{
rtems_error(0, "fatal error, aborting");
20030bc: 13 00 80 66 sethi %hi(0x2019800), %o1 <== NOT EXECUTED
20030c0: 40 00 00 13 call 200310c <rtems_error> <== NOT EXECUTED
20030c4: 92 12 61 28 or %o1, 0x128, %o1 ! 2019928 <pollCallbacks.4788+0x450><== NOT EXECUTED
abort();
20030c8: 40 00 2f 3e call 200edc0 <abort> <== NOT EXECUTED
20030cc: 01 00 00 00 nop <== NOT EXECUTED
}
}
return chars_written;
}
20030d0: 81 c7 e0 08 ret <== NOT EXECUTED
20030d4: 81 e8 00 00 restore <== NOT EXECUTED
020062fc <rtems_workspace_allocate>:
*/
bool rtems_workspace_allocate(
uintptr_t bytes,
void **pointer
)
{
20062fc: 9d e3 bf 98 save %sp, -104, %sp
void *ptr;
/*
* check the arguments
*/
if ( !pointer )
2006300: 80 a6 60 00 cmp %i1, 0
2006304: 02 80 00 0d be 2006338 <rtems_workspace_allocate+0x3c> <== NEVER TAKEN
2006308: 92 10 00 18 mov %i0, %o1
return false;
if ( !bytes )
200630c: 80 a6 20 00 cmp %i0, 0
2006310: 02 80 00 0a be 2006338 <rtems_workspace_allocate+0x3c> <== NEVER TAKEN
2006314: 11 00 80 70 sethi %hi(0x201c000), %o0
return false;
/*
* Allocate the memory
*/
ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes );
2006318: 40 00 05 b0 call 20079d8 <_Protected_heap_Allocate>
200631c: 90 12 22 84 or %o0, 0x284, %o0 ! 201c284 <_Workspace_Area>
if (!ptr)
2006320: 80 a2 20 00 cmp %o0, 0
2006324: 02 80 00 05 be 2006338 <rtems_workspace_allocate+0x3c> <== NEVER TAKEN
2006328: 01 00 00 00 nop
return false;
*pointer = ptr;
200632c: d0 26 40 00 st %o0, [ %i1 ]
2006330: 81 c7 e0 08 ret
2006334: 91 e8 20 01 restore %g0, 1, %o0
return true;
}
2006338: 81 c7 e0 08 ret <== NOT EXECUTED
200633c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
020062e0 <rtems_workspace_free>:
* _Workspace_Allocate
*/
bool rtems_workspace_free(
void *pointer
)
{
20062e0: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
return _Protected_heap_Free( &_Workspace_Area, pointer );
20062e4: 11 00 80 70 sethi %hi(0x201c000), %o0 <== NOT EXECUTED
20062e8: 90 12 22 84 or %o0, 0x284, %o0 ! 201c284 <_Workspace_Area><== NOT EXECUTED
20062ec: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
20062f0: 40 00 05 c6 call 2007a08 <_Protected_heap_Free> <== NOT EXECUTED
20062f4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
02006340 <rtems_workspace_get_information>:
bool rtems_workspace_get_information(
Heap_Information_block *the_info
)
{
if ( !the_info )
2006340: 80 a2 20 00 cmp %o0, 0
2006344: 12 80 00 04 bne 2006354 <rtems_workspace_get_information+0x14><== ALWAYS TAKEN
2006348: 92 10 00 08 mov %o0, %o1
return false;
return _Protected_heap_Get_information( &_Workspace_Area, the_info );
}
200634c: 81 c3 e0 08 retl <== NOT EXECUTED
2006350: 01 00 00 00 nop <== NOT EXECUTED
)
{
if ( !the_info )
return false;
return _Protected_heap_Get_information( &_Workspace_Area, the_info );
2006354: 11 00 80 70 sethi %hi(0x201c000), %o0
2006358: 90 12 22 84 or %o0, 0x284, %o0 ! 201c284 <_Workspace_Area>
200635c: 82 13 c0 00 mov %o7, %g1
2006360: 40 00 05 b6 call 2007a38 <_Protected_heap_Get_information>
2006364: 9e 10 40 00 mov %g1, %o7
020052e4 <scandir>:
scandir(
const char *dirname,
struct dirent ***namelist,
int (*select)(struct dirent *),
int (*dcomp)(const struct dirent **, const struct dirent **))
{
20052e4: 9d e3 bf 48 save %sp, -184, %sp
struct stat stb;
long arraysz;
DIR *dirp = NULL;
int i;
if ((dirp = opendir(dirname)) == NULL)
20052e8: 7f ff fd 9f call 2004964 <opendir>
20052ec: 90 10 00 18 mov %i0, %o0
20052f0: a8 92 20 00 orcc %o0, 0, %l4
20052f4: 02 80 00 6a be 200549c <scandir+0x1b8> <== NEVER TAKEN
20052f8: a0 07 bf a8 add %fp, -88, %l0
return(-1);
if (fstat(dirp->dd_fd, &stb) < 0)
20052fc: d0 05 00 00 ld [ %l4 ], %o0
2005300: 40 00 1d 77 call 200c8dc <fstat>
2005304: 92 10 00 10 mov %l0, %o1
2005308: 80 a2 20 00 cmp %o0, 0
200530c: 06 80 00 53 bl 2005458 <scandir+0x174> <== NEVER TAKEN
2005310: 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);
2005314: 40 00 3b 3a call 2013ffc <.div>
2005318: 92 10 20 18 mov 0x18, %o1
/*
* Check to make sure the array has space left and
* realloc the maximum size.
*/
if (++nitems >= arraysz) {
if (fstat(dirp->dd_fd, &stb) < 0)
200531c: aa 10 00 10 mov %l0, %l5
/*
* estimate the array size by taking the size of the directory file
* and dividing it by a multiple of the minimum size entry.
*/
arraysz = (stb.st_size / 24);
2005320: a6 10 00 08 mov %o0, %l3
names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *));
if (names == NULL)
2005324: b0 10 20 00 clr %i0
/*
* estimate the array size by taking the size of the directory file
* and dividing it by a multiple of the minimum size entry.
*/
arraysz = (stb.st_size / 24);
names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *));
2005328: 91 2a 20 02 sll %o0, 2, %o0
200532c: 7f ff fb 84 call 200413c <malloc>
2005330: ac 10 20 01 mov 1, %l6
if (names == NULL)
2005334: 80 a2 20 00 cmp %o0, 0
2005338: 12 80 00 34 bne 2005408 <scandir+0x124>
200533c: a2 10 00 08 mov %o0, %l1
2005340: 10 80 00 48 b 2005460 <scandir+0x17c>
2005344: b0 10 00 08 mov %o0, %i0
goto cleanup_and_bail;
while ((d = readdir(dirp)) != NULL) {
if (select != NULL && !(*select)(d))
2005348: 22 80 00 08 be,a 2005368 <scandir+0x84> <== NEVER TAKEN
200534c: d0 14 20 0a lduh [ %l0 + 0xa ], %o0 <== NOT EXECUTED
2005350: 9f c6 80 00 call %i2
2005354: 01 00 00 00 nop
2005358: 80 a2 20 00 cmp %o0, 0
200535c: 02 80 00 2b be 2005408 <scandir+0x124>
2005360: 01 00 00 00 nop
continue; /* just selected names */
/*
* Make a minimum size copy of the data
*/
p = (struct dirent *)malloc(DIRSIZ(d));
2005364: d0 14 20 0a lduh [ %l0 + 0xa ], %o0
2005368: 90 02 20 04 add %o0, 4, %o0
200536c: 90 0a 3f fc and %o0, -4, %o0
2005370: 7f ff fb 73 call 200413c <malloc>
2005374: 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);
2005378: 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));
200537c: a4 10 00 08 mov %o0, %l2
if (p == NULL)
2005380: 80 a4 a0 00 cmp %l2, 0
2005384: 02 80 00 37 be 2005460 <scandir+0x17c> <== NEVER TAKEN
2005388: 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;
200538c: 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;
2005390: c2 04 00 00 ld [ %l0 ], %g1
p->d_reclen = d->d_reclen;
2005394: 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);
2005398: 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;
200539c: c2 24 80 00 st %g1, [ %l2 ]
p->d_reclen = d->d_reclen;
20053a0: c4 34 a0 08 sth %g2, [ %l2 + 8 ]
p->d_namlen = d->d_namlen;
20053a4: c6 34 a0 0a sth %g3, [ %l2 + 0xa ]
strncpy(p->d_name, d->d_name, p->d_namlen + 1);
20053a8: 95 32 a0 10 srl %o2, 0x10, %o2
20053ac: 40 00 33 44 call 20120bc <strncpy>
20053b0: 94 02 a0 01 inc %o2
/*
* Check to make sure the array has space left and
* realloc the maximum size.
*/
if (++nitems >= arraysz) {
20053b4: b0 06 20 01 inc %i0
20053b8: 80 a6 00 13 cmp %i0, %l3
20053bc: 0a 80 00 11 bcs 2005400 <scandir+0x11c> <== ALWAYS TAKEN
20053c0: 82 26 00 16 sub %i0, %l6, %g1
if (fstat(dirp->dd_fd, &stb) < 0)
20053c4: d0 05 00 00 ld [ %l4 ], %o0 <== NOT EXECUTED
20053c8: 40 00 1d 45 call 200c8dc <fstat> <== NOT EXECUTED
20053cc: 92 10 00 15 mov %l5, %o1 <== NOT EXECUTED
20053d0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20053d4: 06 80 00 23 bl 2005460 <scandir+0x17c> <== NOT EXECUTED
20053d8: 92 10 20 0c mov 0xc, %o1 <== NOT EXECUTED
goto cleanup_and_bail; /* just might have grown */
arraysz = stb.st_size / 12;
20053dc: 40 00 3b 08 call 2013ffc <.div> <== NOT EXECUTED
20053e0: d0 07 bf c8 ld [ %fp + -56 ], %o0 <== NOT EXECUTED
20053e4: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED
names = (struct dirent **)realloc((char *)names,
20053e8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
20053ec: 40 00 1d eb call 200cb98 <realloc> <== NOT EXECUTED
20053f0: 93 2c e0 02 sll %l3, 2, %o1 <== NOT EXECUTED
arraysz * sizeof(struct dirent *));
if (names == NULL)
20053f4: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED
20053f8: 02 80 00 1a be 2005460 <scandir+0x17c> <== NOT EXECUTED
20053fc: 82 26 00 16 sub %i0, %l6, %g1 <== NOT EXECUTED
goto cleanup_and_bail;
}
names[nitems-1] = p;
2005400: 83 28 60 02 sll %g1, 2, %g1
2005404: e4 24 40 01 st %l2, [ %l1 + %g1 ]
arraysz = (stb.st_size / 24);
names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *));
if (names == NULL)
goto cleanup_and_bail;
while ((d = readdir(dirp)) != NULL) {
2005408: 7f ff ff 1e call 2005080 <readdir>
200540c: 90 10 00 14 mov %l4, %o0
2005410: a0 92 20 00 orcc %o0, 0, %l0
2005414: 12 bf ff cd bne 2005348 <scandir+0x64>
2005418: 80 a6 a0 00 cmp %i2, 0
if (names == NULL)
goto cleanup_and_bail;
}
names[nitems-1] = p;
}
closedir(dirp);
200541c: 7f ff f8 29 call 20034c0 <closedir>
2005420: 90 10 00 14 mov %l4, %o0
if (nitems && dcomp != NULL){
2005424: 80 a6 20 00 cmp %i0, 0
2005428: 22 80 00 0a be,a 2005450 <scandir+0x16c> <== NEVER TAKEN
200542c: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED
2005430: 80 a6 e0 00 cmp %i3, 0
2005434: 02 80 00 06 be 200544c <scandir+0x168>
2005438: 96 10 00 1b mov %i3, %o3
qsort(names, nitems, sizeof(struct dirent *),
200543c: 90 10 00 11 mov %l1, %o0
2005440: 92 10 00 18 mov %i0, %o1
2005444: 40 00 30 16 call 201149c <qsort>
2005448: 94 10 20 04 mov 4, %o2
(int (*)(const void *, const void *)) dcomp);
}
*namelist = names;
200544c: e2 26 40 00 st %l1, [ %i1 ]
return(nitems);
2005450: 10 80 00 14 b 20054a0 <scandir+0x1bc>
2005454: 92 10 00 18 mov %i0, %o1
2005458: a2 10 20 00 clr %l1 <== NOT EXECUTED
200545c: b0 10 20 00 clr %i0 <== NOT EXECUTED
cleanup_and_bail:
if ( dirp )
closedir( dirp );
2005460: 7f ff f8 18 call 20034c0 <closedir>
2005464: 90 10 00 14 mov %l4, %o0
if ( names ) {
2005468: 80 a4 60 00 cmp %l1, 0
200546c: 02 80 00 0c be 200549c <scandir+0x1b8> <== ALWAYS TAKEN
2005470: b6 10 20 00 clr %i3
for (i=0; i < nitems; i++ )
free( names[i] );
2005474: 10 80 00 05 b 2005488 <scandir+0x1a4> <== NOT EXECUTED
2005478: 83 2e e0 02 sll %i3, 2, %g1 <== NOT EXECUTED
200547c: 7f ff f9 6b call 2003a28 <free> <== NOT EXECUTED
2005480: b6 06 e0 01 inc %i3 <== NOT EXECUTED
2005484: 83 2e e0 02 sll %i3, 2, %g1 <== NOT EXECUTED
if ( dirp )
closedir( dirp );
if ( names ) {
for (i=0; i < nitems; i++ )
2005488: 80 a6 c0 18 cmp %i3, %i0 <== NOT EXECUTED
200548c: 2a bf ff fc bcs,a 200547c <scandir+0x198> <== NOT EXECUTED
2005490: d0 04 40 01 ld [ %l1 + %g1 ], %o0 <== NOT EXECUTED
free( names[i] );
free( names );
2005494: 7f ff f9 65 call 2003a28 <free> <== NOT EXECUTED
2005498: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
200549c: 92 10 3f ff mov -1, %o1
}
return(-1);
}
20054a0: 81 c7 e0 08 ret
20054a4: 91 e8 00 09 restore %g0, %o1, %o0
0200699c <sched_rr_get_interval>:
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
200699c: 9d e3 bf 98 save %sp, -104, %sp
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
20069a0: 80 a6 20 00 cmp %i0, 0
20069a4: 02 80 00 0b be 20069d0 <sched_rr_get_interval+0x34> <== NEVER TAKEN
20069a8: 80 a6 60 00 cmp %i1, 0
20069ac: 7f ff f2 92 call 20033f4 <getpid>
20069b0: 01 00 00 00 nop
20069b4: 80 a6 00 08 cmp %i0, %o0
20069b8: 02 80 00 06 be 20069d0 <sched_rr_get_interval+0x34>
20069bc: 80 a6 60 00 cmp %i1, 0
rtems_set_errno_and_return_minus_one( ESRCH );
20069c0: 40 00 21 0e call 200edf8 <__errno>
20069c4: 01 00 00 00 nop
20069c8: 10 80 00 07 b 20069e4 <sched_rr_get_interval+0x48>
20069cc: 82 10 20 03 mov 3, %g1 ! 3 <PROM_START+0x3>
if ( !interval )
20069d0: 12 80 00 08 bne 20069f0 <sched_rr_get_interval+0x54>
20069d4: 03 00 80 6e sethi %hi(0x201b800), %g1
rtems_set_errno_and_return_minus_one( EINVAL );
20069d8: 40 00 21 08 call 200edf8 <__errno>
20069dc: 01 00 00 00 nop
20069e0: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
20069e4: c2 22 00 00 st %g1, [ %o0 ]
20069e8: 81 c7 e0 08 ret
20069ec: 91 e8 3f ff restore %g0, -1, %o0
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
20069f0: d0 00 61 78 ld [ %g1 + 0x178 ], %o0
20069f4: 92 10 00 19 mov %i1, %o1
20069f8: 40 00 0f 15 call 200a64c <_Timespec_From_ticks>
20069fc: b0 10 20 00 clr %i0
return 0;
}
2006a00: 81 c7 e0 08 ret
2006a04: 81 e8 00 00 restore
020054a8 <seekdir>:
void seekdir(
DIR *dirp,
long loc
)
{
20054a8: 9d e3 bf 98 save %sp, -104, %sp
off_t status;
if ( !dirp )
20054ac: 80 a6 20 00 cmp %i0, 0
20054b0: 02 80 00 08 be 20054d0 <seekdir+0x28>
20054b4: 92 10 00 19 mov %i1, %o1
return;
status = lseek( dirp->dd_fd, loc, SEEK_SET );
20054b8: d0 06 00 00 ld [ %i0 ], %o0
20054bc: 7f ff fa 87 call 2003ed8 <lseek>
20054c0: 94 10 20 00 clr %o2
/*
* This is not a nice way to error out, but we have no choice here.
*/
if ( status == -1 )
20054c4: 80 a2 3f ff cmp %o0, -1
20054c8: 32 80 00 02 bne,a 20054d0 <seekdir+0x28> <== ALWAYS TAKEN
20054cc: c0 26 20 04 clr [ %i0 + 4 ]
20054d0: 81 c7 e0 08 ret
20054d4: 81 e8 00 00 restore
02007c74 <sem_destroy>:
*/
int sem_destroy(
sem_t *sem
)
{
2007c74: 9d e3 bf 90 save %sp, -112, %sp
2007c78: d2 06 00 00 ld [ %i0 ], %o1
2007c7c: 11 00 80 78 sethi %hi(0x201e000), %o0
2007c80: 94 07 bf f4 add %fp, -12, %o2
2007c84: 40 00 09 27 call 200a120 <_Objects_Get>
2007c88: 90 12 23 50 or %o0, 0x350, %o0
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
2007c8c: c2 07 bf f4 ld [ %fp + -12 ], %g1
2007c90: 80 a0 60 00 cmp %g1, 0
2007c94: 12 80 00 14 bne 2007ce4 <sem_destroy+0x70>
2007c98: 01 00 00 00 nop
case OBJECTS_LOCAL:
/*
* Undefined operation on a named semaphore.
*/
if ( the_semaphore->named == TRUE ) {
2007c9c: c2 0a 20 14 ldub [ %o0 + 0x14 ], %g1
2007ca0: 80 a0 60 00 cmp %g1, 0
2007ca4: 02 80 00 0a be 2007ccc <sem_destroy+0x58> <== ALWAYS TAKEN
2007ca8: 01 00 00 00 nop
_Thread_Enable_dispatch();
2007cac: 40 00 0b 5e call 200aa24 <_Thread_Enable_dispatch> <== NOT EXECUTED
2007cb0: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
2007cb4: 40 00 23 b6 call 2010b8c <__errno> <== NOT EXECUTED
2007cb8: 01 00 00 00 nop <== NOT EXECUTED
2007cbc: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16> <== NOT EXECUTED
2007cc0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2007cc4: 81 c7 e0 08 ret <== NOT EXECUTED
2007cc8: 81 e8 00 00 restore <== NOT EXECUTED
}
_POSIX_Semaphore_Delete( the_semaphore );
2007ccc: 40 00 1b 55 call 200ea20 <_POSIX_Semaphore_Delete>
2007cd0: b0 10 20 00 clr %i0
_Thread_Enable_dispatch();
2007cd4: 40 00 0b 54 call 200aa24 <_Thread_Enable_dispatch>
2007cd8: 01 00 00 00 nop
2007cdc: 81 c7 e0 08 ret
2007ce0: 81 e8 00 00 restore
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
2007ce4: 40 00 23 aa call 2010b8c <__errno>
2007ce8: b0 10 3f ff mov -1, %i0
2007cec: 82 10 20 16 mov 0x16, %g1
2007cf0: c2 22 00 00 st %g1, [ %o0 ]
}
2007cf4: 81 c7 e0 08 ret
2007cf8: 81 e8 00 00 restore
02007d54 <sem_init>:
int sem_init(
sem_t *sem,
int pshared,
unsigned int value
)
{
2007d54: 9d e3 bf 90 save %sp, -112, %sp
2007d58: 92 10 00 19 mov %i1, %o1
int status;
POSIX_Semaphore_Control *the_semaphore;
if ( !sem )
2007d5c: 80 a6 20 00 cmp %i0, 0
2007d60: 12 80 00 08 bne 2007d80 <sem_init+0x2c> <== ALWAYS TAKEN
2007d64: 94 10 00 1a mov %i2, %o2
rtems_set_errno_and_return_minus_one( EINVAL );
2007d68: 40 00 23 89 call 2010b8c <__errno> <== NOT EXECUTED
2007d6c: 01 00 00 00 nop <== NOT EXECUTED
2007d70: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16> <== NOT EXECUTED
2007d74: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2007d78: 10 80 00 0a b 2007da0 <sem_init+0x4c> <== NOT EXECUTED
2007d7c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
status = _POSIX_Semaphore_Create_support(
2007d80: 90 10 20 00 clr %o0
2007d84: 40 00 1a e0 call 200e904 <_POSIX_Semaphore_Create_support>
2007d88: 96 07 bf f4 add %fp, -12, %o3
pshared,
value,
&the_semaphore
);
if ( status != -1 )
2007d8c: 80 a2 3f ff cmp %o0, -1
2007d90: 02 80 00 04 be 2007da0 <sem_init+0x4c>
2007d94: c2 07 bf f4 ld [ %fp + -12 ], %g1
*sem = the_semaphore->Object.id;
2007d98: c2 00 60 08 ld [ %g1 + 8 ], %g1
2007d9c: c2 26 00 00 st %g1, [ %i0 ]
return status;
}
2007da0: 81 c7 e0 08 ret
2007da4: 91 e8 00 08 restore %g0, %o0, %o0
02007da8 <sem_open>:
int oflag,
...
/* mode_t mode, */
/* unsigned int value */
)
{
2007da8: 9d e3 bf 88 save %sp, -120, %sp
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
2007dac: 05 00 80 78 sethi %hi(0x201e000), %g2
2007db0: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1 ! 201e040 <_Thread_Dispatch_disable_level>
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
va_start(arg, oflag);
2007db4: f4 27 a0 4c st %i2, [ %fp + 0x4c ]
2007db8: 82 00 60 01 inc %g1
2007dbc: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
2007dc0: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
2007dc4: fa 27 a0 58 st %i5, [ %fp + 0x58 ]
2007dc8: c2 20 a0 40 st %g1, [ %g2 + 0x40 ]
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
2007dcc: b8 8e 62 00 andcc %i1, 0x200, %i4
2007dd0: 02 80 00 05 be 2007de4 <sem_open+0x3c>
2007dd4: ba 10 20 00 clr %i5
va_start(arg, oflag);
mode = (mode_t) va_arg( arg, unsigned int );
value = va_arg( arg, unsigned int );
2007dd8: fa 07 a0 50 ld [ %fp + 0x50 ], %i5
2007ddc: 82 07 a0 54 add %fp, 0x54, %g1
2007de0: c2 27 bf f4 st %g1, [ %fp + -12 ]
va_end(arg);
}
status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id );
2007de4: 90 10 00 18 mov %i0, %o0
2007de8: 40 00 1b 23 call 200ea74 <_POSIX_Semaphore_Name_to_id>
2007dec: 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 ) {
2007df0: a0 92 20 00 orcc %o0, 0, %l0
2007df4: 02 80 00 0e be 2007e2c <sem_open+0x84>
2007df8: 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) ) ) {
2007dfc: 80 a4 20 02 cmp %l0, 2
2007e00: 12 80 00 04 bne 2007e10 <sem_open+0x68> <== NEVER TAKEN
2007e04: 80 a7 20 00 cmp %i4, 0
2007e08: 12 80 00 22 bne 2007e90 <sem_open+0xe8>
2007e0c: 94 10 00 1d mov %i5, %o2
_Thread_Enable_dispatch();
2007e10: 40 00 0b 05 call 200aa24 <_Thread_Enable_dispatch>
2007e14: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
2007e18: 40 00 23 5d call 2010b8c <__errno>
2007e1c: 01 00 00 00 nop
2007e20: e0 22 00 00 st %l0, [ %o0 ]
2007e24: 81 c7 e0 08 ret
2007e28: 81 e8 00 00 restore
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
2007e2c: 80 a0 6a 00 cmp %g1, 0xa00
2007e30: 12 80 00 0a bne 2007e58 <sem_open+0xb0>
2007e34: d2 07 bf f0 ld [ %fp + -16 ], %o1
_Thread_Enable_dispatch();
2007e38: 40 00 0a fb call 200aa24 <_Thread_Enable_dispatch>
2007e3c: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
2007e40: 40 00 23 53 call 2010b8c <__errno>
2007e44: 01 00 00 00 nop
2007e48: 82 10 20 11 mov 0x11, %g1 ! 11 <PROM_START+0x11>
2007e4c: c2 22 00 00 st %g1, [ %o0 ]
2007e50: 81 c7 e0 08 ret
2007e54: 81 e8 00 00 restore
2007e58: 94 07 bf e8 add %fp, -24, %o2
2007e5c: 11 00 80 78 sethi %hi(0x201e000), %o0
2007e60: 40 00 08 b0 call 200a120 <_Objects_Get>
2007e64: 90 12 23 50 or %o0, 0x350, %o0 ! 201e350 <_POSIX_Semaphore_Information>
}
the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
the_semaphore->open_count += 1;
2007e68: c2 02 20 18 ld [ %o0 + 0x18 ], %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 );
2007e6c: d0 27 bf ec st %o0, [ %fp + -20 ]
the_semaphore->open_count += 1;
2007e70: 82 00 60 01 inc %g1
_Thread_Enable_dispatch();
2007e74: 40 00 0a ec call 200aa24 <_Thread_Enable_dispatch>
2007e78: c2 22 20 18 st %g1, [ %o0 + 0x18 ]
_Thread_Enable_dispatch();
2007e7c: 40 00 0a ea call 200aa24 <_Thread_Enable_dispatch>
2007e80: 01 00 00 00 nop
id = &the_semaphore->Object.id;
return (sem_t *)id;
2007e84: c2 07 bf ec ld [ %fp + -20 ], %g1
2007e88: 81 c7 e0 08 ret
2007e8c: 91 e8 60 08 restore %g1, 8, %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(
2007e90: 90 10 00 18 mov %i0, %o0
2007e94: 92 10 20 00 clr %o1
2007e98: 40 00 1a 9b call 200e904 <_POSIX_Semaphore_Create_support>
2007e9c: 96 07 bf ec add %fp, -20, %o3
/*
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
2007ea0: 40 00 0a e1 call 200aa24 <_Thread_Enable_dispatch>
2007ea4: a0 10 00 08 mov %o0, %l0
if ( status == -1 )
2007ea8: 80 a4 3f ff cmp %l0, -1
2007eac: 02 bf ff e9 be 2007e50 <sem_open+0xa8> <== NEVER TAKEN
2007eb0: b0 10 3f ff mov -1, %i0
return SEM_FAILED;
id = &the_semaphore->Object.id;
return (sem_t *)id;
2007eb4: c2 07 bf ec ld [ %fp + -20 ], %g1
2007eb8: b0 00 60 08 add %g1, 8, %i0
}
2007ebc: 81 c7 e0 08 ret
2007ec0: 81 e8 00 00 restore
02007f20 <sem_timedwait>:
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
2007f20: 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 );
2007f24: 92 07 bf f4 add %fp, -12, %o1
2007f28: 40 00 18 31 call 200dfec <_POSIX_Absolute_timeout_to_ticks>
2007f2c: 90 10 00 19 mov %i1, %o0
switch ( status ) {
2007f30: 80 a2 20 02 cmp %o0, 2
2007f34: 18 80 00 03 bgu 2007f40 <sem_timedwait+0x20> <== ALWAYS TAKEN
2007f38: 92 10 20 01 mov 1, %o1
2007f3c: 92 10 20 00 clr %o1 <== NOT EXECUTED
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
do_wait = true;
break;
}
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
2007f40: d4 07 bf f4 ld [ %fp + -12 ], %o2
2007f44: 90 10 00 18 mov %i0, %o0
2007f48: 40 00 1a e9 call 200eaec <_POSIX_Semaphore_Wait_support>
2007f4c: 92 0a 60 01 and %o1, 1, %o1
break;
}
}
return lock_status;
}
2007f50: 81 c7 e0 08 ret
2007f54: 91 e8 00 08 restore %g0, %o0, %o0
02007f70 <sem_unlink>:
*/
int sem_unlink(
const char *name
)
{
2007f70: 9d e3 bf 90 save %sp, -112, %sp
2007f74: 03 00 80 78 sethi %hi(0x201e000), %g1
2007f78: c4 00 60 40 ld [ %g1 + 0x40 ], %g2 ! 201e040 <_Thread_Dispatch_disable_level>
2007f7c: 90 10 00 18 mov %i0, %o0
2007f80: 84 00 a0 01 inc %g2
2007f84: c4 20 60 40 st %g2, [ %g1 + 0x40 ]
register POSIX_Semaphore_Control *the_semaphore;
sem_t the_semaphore_id;
_Thread_Disable_dispatch();
status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id );
2007f88: 40 00 1a bb call 200ea74 <_POSIX_Semaphore_Name_to_id>
2007f8c: 92 07 bf f4 add %fp, -12, %o1
if ( status != 0 ) {
2007f90: b0 92 20 00 orcc %o0, 0, %i0
2007f94: 02 80 00 09 be 2007fb8 <sem_unlink+0x48>
2007f98: 03 00 80 78 sethi %hi(0x201e000), %g1
_Thread_Enable_dispatch();
2007f9c: 40 00 0a a2 call 200aa24 <_Thread_Enable_dispatch>
2007fa0: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( status );
2007fa4: 40 00 22 fa call 2010b8c <__errno>
2007fa8: 01 00 00 00 nop
2007fac: f0 22 00 00 st %i0, [ %o0 ]
2007fb0: 81 c7 e0 08 ret
2007fb4: 91 e8 3f ff restore %g0, -1, %o0
RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object(
Objects_Information *information,
uint16_t index
)
{
if ( index > information->maximum )
2007fb8: c4 07 bf f4 ld [ %fp + -12 ], %g2
2007fbc: 88 10 63 50 or %g1, 0x350, %g4
2007fc0: c6 11 20 10 lduh [ %g4 + 0x10 ], %g3
}
the_semaphore = (POSIX_Semaphore_Control *) _Objects_Get_local_object(
2007fc4: 03 00 00 3f sethi %hi(0xfc00), %g1
2007fc8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
2007fcc: 82 08 80 01 and %g2, %g1, %g1
2007fd0: 80 a0 40 03 cmp %g1, %g3
2007fd4: 18 80 00 05 bgu 2007fe8 <sem_unlink+0x78> <== NEVER TAKEN
2007fd8: b0 10 20 00 clr %i0
return NULL;
return information->local_table[ index ];
2007fdc: c4 01 20 1c ld [ %g4 + 0x1c ], %g2
2007fe0: 83 28 60 02 sll %g1, 2, %g1
2007fe4: f0 00 80 01 ld [ %g2 + %g1 ], %i0
RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Namespace_remove (
POSIX_Semaphore_Control *the_semaphore
)
{
_Objects_Namespace_remove(
2007fe8: 92 10 00 18 mov %i0, %o1
&_POSIX_Semaphore_Information,
_Objects_Get_index( the_semaphore_id )
);
the_semaphore->linked = FALSE;
2007fec: c0 2e 20 15 clrb [ %i0 + 0x15 ]
2007ff0: 11 00 80 78 sethi %hi(0x201e000), %o0
2007ff4: 40 00 08 9c call 200a264 <_Objects_Namespace_remove>
2007ff8: 90 12 23 50 or %o0, 0x350, %o0 ! 201e350 <_POSIX_Semaphore_Information>
_POSIX_Semaphore_Namespace_remove( the_semaphore );
_POSIX_Semaphore_Delete( the_semaphore );
2007ffc: 90 10 00 18 mov %i0, %o0
2008000: 40 00 1a 88 call 200ea20 <_POSIX_Semaphore_Delete>
2008004: b0 10 20 00 clr %i0
_Thread_Enable_dispatch();
2008008: 40 00 0a 87 call 200aa24 <_Thread_Enable_dispatch>
200800c: 01 00 00 00 nop
return 0;
}
2008010: 81 c7 e0 08 ret
2008014: 81 e8 00 00 restore
02005b78 <sigaction>:
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
2005b78: 9d e3 bf 98 save %sp, -104, %sp
2005b7c: 90 10 00 1a mov %i2, %o0
ISR_Level level;
if ( oact )
2005b80: 80 a6 a0 00 cmp %i2, 0
2005b84: 02 80 00 0a be 2005bac <sigaction+0x34>
2005b88: a0 10 00 18 mov %i0, %l0
*oact = _POSIX_signals_Vectors[ sig ];
2005b8c: 85 2e 20 02 sll %i0, 2, %g2
2005b90: 83 2e 20 04 sll %i0, 4, %g1
2005b94: 82 20 40 02 sub %g1, %g2, %g1
2005b98: 13 00 80 6b sethi %hi(0x201ac00), %o1
2005b9c: 94 10 20 0c mov 0xc, %o2
2005ba0: 92 12 60 d0 or %o1, 0xd0, %o1
2005ba4: 40 00 23 c3 call 200eab0 <memcpy>
2005ba8: 92 02 40 01 add %o1, %g1, %o1
if ( !sig )
2005bac: 80 a4 20 00 cmp %l0, 0
2005bb0: 02 80 00 09 be 2005bd4 <sigaction+0x5c>
2005bb4: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
2005bb8: a2 04 3f ff add %l0, -1, %l1
2005bbc: 80 a4 60 1f cmp %l1, 0x1f
2005bc0: 18 80 00 05 bgu 2005bd4 <sigaction+0x5c>
2005bc4: 01 00 00 00 nop
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
2005bc8: 80 a4 20 09 cmp %l0, 9
2005bcc: 12 80 00 08 bne 2005bec <sigaction+0x74>
2005bd0: 80 a6 60 00 cmp %i1, 0
rtems_set_errno_and_return_minus_one( EINVAL );
2005bd4: 40 00 21 a6 call 200e26c <__errno>
2005bd8: b0 10 3f ff mov -1, %i0
2005bdc: 82 10 20 16 mov 0x16, %g1
2005be0: c2 22 00 00 st %g1, [ %o0 ]
2005be4: 81 c7 e0 08 ret
2005be8: 81 e8 00 00 restore
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
2005bec: 02 bf ff fe be 2005be4 <sigaction+0x6c> <== NEVER TAKEN
2005bf0: b0 10 20 00 clr %i0
/*
* Unless the user is installing the default signal actions, then
* we can just copy the provided sigaction structure into the vectors.
*/
_ISR_Disable( level );
2005bf4: 7f ff f1 ed call 20023a8 <sparc_disable_interrupts>
2005bf8: 01 00 00 00 nop
2005bfc: a6 10 00 08 mov %o0, %l3
if ( act->sa_handler == SIG_DFL ) {
2005c00: c2 06 60 08 ld [ %i1 + 8 ], %g1
2005c04: b5 2c 20 04 sll %l0, 4, %i2
2005c08: 80 a0 60 00 cmp %g1, 0
2005c0c: b1 2c 20 02 sll %l0, 2, %i0
2005c10: 03 00 80 6b sethi %hi(0x201ac00), %g1
2005c14: 12 80 00 08 bne 2005c34 <sigaction+0xbc>
2005c18: a4 10 60 d0 or %g1, 0xd0, %l2 ! 201acd0 <_POSIX_signals_Vectors>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
2005c1c: 82 26 80 18 sub %i2, %i0, %g1
2005c20: 13 00 80 63 sethi %hi(0x2018c00), %o1
2005c24: 90 04 80 01 add %l2, %g1, %o0
2005c28: 92 12 61 38 or %o1, 0x138, %o1
2005c2c: 10 80 00 08 b 2005c4c <sigaction+0xd4>
2005c30: 92 02 40 01 add %o1, %g1, %o1
} else {
_POSIX_signals_Clear_process_signals( signo_to_mask(sig) );
2005c34: 90 10 20 01 mov 1, %o0
2005c38: 40 00 19 4c call 200c168 <_POSIX_signals_Clear_process_signals>
2005c3c: 91 2a 00 11 sll %o0, %l1, %o0
_POSIX_signals_Vectors[ sig ] = *act;
2005c40: 90 26 80 18 sub %i2, %i0, %o0
2005c44: 92 10 00 19 mov %i1, %o1
2005c48: 90 04 80 08 add %l2, %o0, %o0
2005c4c: 40 00 23 99 call 200eab0 <memcpy>
2005c50: 94 10 20 0c mov 0xc, %o2
}
_ISR_Enable( level );
2005c54: b0 10 20 00 clr %i0
2005c58: 7f ff f1 d8 call 20023b8 <sparc_enable_interrupts>
2005c5c: 90 10 00 13 mov %l3, %o0
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
}
2005c60: 81 c7 e0 08 ret
2005c64: 81 e8 00 00 restore
02007da8 <sigsuspend>:
#include <rtems/seterr.h>
int sigsuspend(
const sigset_t *sigmask
)
{
2007da8: 9d e3 bf 90 save %sp, -112, %sp
int status;
POSIX_API_Control *api;
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked );
2007dac: 90 10 20 01 mov 1, %o0
2007db0: 92 10 00 18 mov %i0, %o1
2007db4: a0 07 bf f4 add %fp, -12, %l0
2007db8: 7f ff ff f1 call 2007d7c <sigprocmask>
2007dbc: 94 10 00 10 mov %l0, %o2
(void) sigfillset( &all_signals );
2007dc0: a2 07 bf f0 add %fp, -16, %l1
2007dc4: 7f ff ff b6 call 2007c9c <sigfillset>
2007dc8: 90 10 00 11 mov %l1, %o0
status = sigtimedwait( &all_signals, NULL, NULL );
2007dcc: 90 10 00 11 mov %l1, %o0
2007dd0: 92 10 20 00 clr %o1
2007dd4: 40 00 00 2a call 2007e7c <sigtimedwait>
2007dd8: 94 10 20 00 clr %o2
(void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL );
2007ddc: 92 10 00 10 mov %l0, %o1
status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked );
(void) sigfillset( &all_signals );
status = sigtimedwait( &all_signals, NULL, NULL );
2007de0: a2 10 00 08 mov %o0, %l1
(void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL );
2007de4: 94 10 20 00 clr %o2
2007de8: 7f ff ff e5 call 2007d7c <sigprocmask>
2007dec: 90 10 20 00 clr %o0
/*
* sigtimedwait() returns the signal number while sigsuspend()
* is supposed to return -1 and EINTR when a signal is caught.
*/
if ( status != -1 )
2007df0: 80 a4 7f ff cmp %l1, -1
2007df4: 02 80 00 06 be 2007e0c <sigsuspend+0x64> <== NEVER TAKEN
2007df8: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINTR );
2007dfc: 40 00 22 ad call 20108b0 <__errno>
2007e00: 01 00 00 00 nop
2007e04: 82 10 20 04 mov 4, %g1 ! 4 <PROM_START+0x4>
2007e08: c2 22 00 00 st %g1, [ %o0 ]
return status;
}
2007e0c: 81 c7 e0 08 ret
2007e10: 91 e8 3f ff restore %g0, -1, %o0
02005ff8 <sigtimedwait>:
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
const struct timespec *timeout
)
{
2005ff8: 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 ) {
2005ffc: 80 a6 a0 00 cmp %i2, 0
2006000: 02 80 00 12 be 2006048 <sigtimedwait+0x50>
2006004: a4 10 20 00 clr %l2
if ( !_Timespec_Is_valid( timeout ) )
2006008: 40 00 0e d5 call 2009b5c <_Timespec_Is_valid>
200600c: 90 10 00 1a mov %i2, %o0
2006010: 80 8a 20 ff btst 0xff, %o0
2006014: 02 80 00 07 be 2006030 <sigtimedwait+0x38>
2006018: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
200601c: 40 00 0e f6 call 2009bf4 <_Timespec_To_ticks>
2006020: 90 10 00 1a mov %i2, %o0
if ( !interval )
2006024: a4 92 20 00 orcc %o0, 0, %l2
2006028: 12 80 00 09 bne 200604c <sigtimedwait+0x54> <== ALWAYS TAKEN
200602c: 80 a6 60 00 cmp %i1, 0
rtems_set_errno_and_return_minus_one( EINVAL );
2006030: 40 00 22 39 call 200e914 <__errno>
2006034: b0 10 3f ff mov -1, %i0
2006038: 82 10 20 16 mov 0x16, %g1
200603c: c2 22 00 00 st %g1, [ %o0 ]
2006040: 81 c7 e0 08 ret
2006044: 81 e8 00 00 restore
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
2006048: 80 a6 60 00 cmp %i1, 0
200604c: 02 80 00 03 be 2006058 <sigtimedwait+0x60>
2006050: b4 07 bf ec add %fp, -20, %i2
2006054: b4 10 00 19 mov %i1, %i2
the_thread = _Thread_Executing;
2006058: 27 00 80 6b sethi %hi(0x201ac00), %l3
200605c: f2 04 e3 94 ld [ %l3 + 0x394 ], %i1 ! 201af94 <_Thread_Executing>
* What if they are already pending?
*/
/* API signals pending? */
_ISR_Disable( level );
2006060: 7f ff f1 9e call 20026d8 <sparc_disable_interrupts>
2006064: e2 06 61 6c ld [ %i1 + 0x16c ], %l1
2006068: a0 10 00 08 mov %o0, %l0
if ( *set & api->signals_pending ) {
200606c: c4 06 00 00 ld [ %i0 ], %g2
2006070: c2 04 60 c8 ld [ %l1 + 0xc8 ], %g1
2006074: 80 88 80 01 btst %g2, %g1
2006078: 22 80 00 10 be,a 20060b8 <sigtimedwait+0xc0>
200607c: 03 00 80 6d sethi %hi(0x201b400), %g1
/* XXX real info later */
the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending );
2006080: 7f ff ff c4 call 2005f90 <_POSIX_signals_Get_highest>
2006084: 90 10 00 01 mov %g1, %o0
_POSIX_signals_Clear_signals(
2006088: 94 10 00 1a mov %i2, %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 );
200608c: 92 10 00 08 mov %o0, %o1
_POSIX_signals_Clear_signals(
2006090: 96 10 20 00 clr %o3
2006094: 90 10 00 11 mov %l1, %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 );
2006098: d2 26 80 00 st %o1, [ %i2 ]
_POSIX_signals_Clear_signals(
200609c: 40 00 19 fb call 200c888 <_POSIX_signals_Clear_signals>
20060a0: 98 10 20 00 clr %o4
the_info->si_signo,
the_info,
false,
false
);
_ISR_Enable( level );
20060a4: 7f ff f1 91 call 20026e8 <sparc_enable_interrupts>
20060a8: 90 10 00 10 mov %l0, %o0
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
20060ac: c0 26 a0 08 clr [ %i2 + 8 ]
return the_info->si_signo;
20060b0: 10 80 00 13 b 20060fc <sigtimedwait+0x104>
20060b4: f0 06 80 00 ld [ %i2 ], %i0
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
20060b8: c2 00 62 6c ld [ %g1 + 0x26c ], %g1
20060bc: 80 88 80 01 btst %g2, %g1
20060c0: 02 80 00 13 be 200610c <sigtimedwait+0x114>
20060c4: 07 00 80 6b sethi %hi(0x201ac00), %g3
signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending );
20060c8: 7f ff ff b2 call 2005f90 <_POSIX_signals_Get_highest>
20060cc: 90 10 00 01 mov %g1, %o0
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
20060d0: 94 10 00 1a mov %i2, %o2
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending );
20060d4: b0 10 00 08 mov %o0, %i0
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
20060d8: 96 10 20 01 mov 1, %o3
20060dc: 90 10 00 11 mov %l1, %o0
20060e0: 92 10 00 18 mov %i0, %o1
20060e4: 40 00 19 e9 call 200c888 <_POSIX_signals_Clear_signals>
20060e8: 98 10 20 00 clr %o4
_ISR_Enable( level );
20060ec: 7f ff f1 7f call 20026e8 <sparc_enable_interrupts>
20060f0: 90 10 00 10 mov %l0, %o0
the_info->si_signo = signo;
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
20060f4: c0 26 a0 08 clr [ %i2 + 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;
20060f8: f0 26 80 00 st %i0, [ %i2 ]
the_info->si_code = SI_USER;
20060fc: 82 10 20 01 mov 1, %g1
2006100: c2 26 a0 04 st %g1, [ %i2 + 4 ]
2006104: 81 c7 e0 08 ret
2006108: 81 e8 00 00 restore
200610c: c2 00 e2 d0 ld [ %g3 + 0x2d0 ], %g1
the_info->si_value.sival_int = 0;
return signo;
}
the_info->si_signo = -1;
2006110: 84 10 3f ff mov -1, %g2
2006114: 82 00 60 01 inc %g1
2006118: c4 26 80 00 st %g2, [ %i2 ]
200611c: c2 20 e2 d0 st %g1, [ %g3 + 0x2d0 ]
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
the_thread->Wait.return_code = EINTR;
2006120: 82 10 20 04 mov 4, %g1
2006124: c2 26 60 34 st %g1, [ %i1 + 0x34 ]
the_thread->Wait.option = *set;
2006128: c2 06 00 00 ld [ %i0 ], %g1
the_thread->Wait.return_argument = the_info;
200612c: f4 26 60 28 st %i2, [ %i1 + 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;
2006130: c2 26 60 30 st %g1, [ %i1 + 0x30 ]
}
the_info->si_signo = -1;
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
2006134: 21 00 80 6d sethi %hi(0x201b400), %l0
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
2006138: 82 10 20 01 mov 1, %g1
200613c: a0 14 22 2c or %l0, 0x22c, %l0
2006140: e0 26 60 44 st %l0, [ %i1 + 0x44 ]
2006144: 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 );
2006148: 7f ff f1 68 call 20026e8 <sparc_enable_interrupts>
200614c: 01 00 00 00 nop
_Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval );
2006150: 90 10 00 10 mov %l0, %o0
2006154: 92 10 00 12 mov %l2, %o1
2006158: 15 00 80 25 sethi %hi(0x2009400), %o2
200615c: 40 00 0c 1f call 20091d8 <_Thread_queue_Enqueue_with_handler>
2006160: 94 12 a1 a4 or %o2, 0x1a4, %o2 ! 20095a4 <_Thread_queue_Timeout>
_Thread_Enable_dispatch();
2006164: 40 00 0a c6 call 2008c7c <_Thread_Enable_dispatch>
2006168: 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 );
200616c: d2 06 80 00 ld [ %i2 ], %o1
2006170: 94 10 00 1a mov %i2, %o2
2006174: 96 10 20 00 clr %o3
2006178: 98 10 20 00 clr %o4
200617c: 40 00 19 c3 call 200c888 <_POSIX_signals_Clear_signals>
2006180: 90 10 00 11 mov %l1, %o0
errno = _Thread_Executing->Wait.return_code;
2006184: 40 00 21 e4 call 200e914 <__errno>
2006188: 01 00 00 00 nop
200618c: c2 04 e3 94 ld [ %l3 + 0x394 ], %g1
2006190: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
2006194: c2 22 00 00 st %g1, [ %o0 ]
return the_info->si_signo;
2006198: f0 06 80 00 ld [ %i2 ], %i0
}
200619c: 81 c7 e0 08 ret
20061a0: 81 e8 00 00 restore
0200803c <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
200803c: 9d e3 bf 98 save %sp, -104, %sp
int status;
status = sigtimedwait( set, NULL, NULL );
2008040: 92 10 20 00 clr %o1
2008044: 90 10 00 18 mov %i0, %o0
2008048: 7f ff ff 8d call 2007e7c <sigtimedwait>
200804c: 94 10 20 00 clr %o2
if ( status != -1 ) {
2008050: 80 a2 3f ff cmp %o0, -1
2008054: 02 80 00 07 be 2008070 <sigwait+0x34> <== NEVER TAKEN
2008058: 80 a6 60 00 cmp %i1, 0
if ( sig )
200805c: 02 80 00 03 be 2008068 <sigwait+0x2c> <== NEVER TAKEN
2008060: b0 10 20 00 clr %i0
*sig = status;
2008064: d0 26 40 00 st %o0, [ %i1 ]
2008068: 81 c7 e0 08 ret
200806c: 81 e8 00 00 restore
return 0;
}
return errno;
2008070: 40 00 22 10 call 20108b0 <__errno> <== NOT EXECUTED
2008074: 01 00 00 00 nop <== NOT EXECUTED
2008078: f0 02 00 00 ld [ %o0 ], %i0 <== NOT EXECUTED
}
200807c: 81 c7 e0 08 ret <== NOT EXECUTED
2008080: 81 e8 00 00 restore <== NOT EXECUTED
02003adc <siproc>:
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
2003adc: 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)) {
2003ae0: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED
2003ae4: 80 88 6e 78 btst 0xe78, %g1 <== NOT EXECUTED
2003ae8: 02 80 00 0e be 2003b20 <siproc+0x44> <== NOT EXECUTED
2003aec: b0 0e 20 ff and %i0, 0xff, %i0 <== NOT EXECUTED
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
2003af0: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== NOT EXECUTED
2003af4: 94 10 20 00 clr %o2 <== NOT EXECUTED
2003af8: 40 00 06 71 call 20054bc <rtems_semaphore_obtain> <== NOT EXECUTED
2003afc: 92 10 20 00 clr %o1 <== NOT EXECUTED
i = iproc (c, tty);
2003b00: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2003b04: 7f ff ff 80 call 2003904 <iproc> <== NOT EXECUTED
2003b08: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2003b0c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
2003b10: 40 00 06 b2 call 20055d8 <rtems_semaphore_release> <== NOT EXECUTED
2003b14: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== NOT EXECUTED
}
else {
i = iproc (c, tty);
}
return i;
}
2003b18: 81 c7 e0 08 ret <== NOT EXECUTED
2003b1c: 81 e8 00 00 restore <== NOT EXECUTED
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
rtems_semaphore_release (tty->osem);
}
else {
i = iproc (c, tty);
2003b20: 7f ff ff 79 call 2003904 <iproc> <== NOT EXECUTED
2003b24: 81 e8 00 00 restore <== NOT EXECUTED
0200494c <stat>:
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
200494c: 9d e3 bf 88 save %sp, -120, %sp
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
2004950: 80 a6 60 00 cmp %i1, 0
2004954: 12 80 00 06 bne 200496c <stat+0x20>
2004958: 90 10 00 18 mov %i0, %o0
rtems_set_errno_and_return_minus_one( EFAULT );
200495c: 40 00 2b b8 call 200f83c <__errno>
2004960: b0 10 3f ff mov -1, %i0
2004964: 10 80 00 1c b 20049d4 <stat+0x88>
2004968: 82 10 20 0e mov 0xe, %g1
status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS );
200496c: a0 07 bf e8 add %fp, -24, %l0
2004970: 92 10 20 00 clr %o1
2004974: 94 10 00 10 mov %l0, %o2
2004978: 96 10 20 01 mov 1, %o3
200497c: 7f ff f9 5a call 2002ee4 <rtems_filesystem_evaluate_path>
2004980: b0 10 3f ff mov -1, %i0
if ( status != 0 )
2004984: 80 a2 20 00 cmp %o0, 0
2004988: 12 80 00 14 bne 20049d8 <stat+0x8c>
200498c: c2 07 bf ec ld [ %fp + -20 ], %g1
return -1;
if ( !loc.handlers->fstat_h ){
2004990: c2 00 60 18 ld [ %g1 + 0x18 ], %g1
2004994: 80 a0 60 00 cmp %g1, 0
2004998: 12 80 00 12 bne 20049e0 <stat+0x94> <== ALWAYS TAKEN
200499c: 92 10 20 00 clr %o1
rtems_filesystem_freenode( &loc );
20049a0: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED
20049a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20049a8: 02 80 00 08 be 20049c8 <stat+0x7c> <== NOT EXECUTED
20049ac: 01 00 00 00 nop <== NOT EXECUTED
20049b0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
20049b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20049b8: 02 80 00 04 be 20049c8 <stat+0x7c> <== NOT EXECUTED
20049bc: 01 00 00 00 nop <== NOT EXECUTED
20049c0: 9f c0 40 00 call %g1 <== NOT EXECUTED
20049c4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
20049c8: 40 00 2b 9d call 200f83c <__errno> <== NOT EXECUTED
20049cc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20049d0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
20049d4: c2 22 00 00 st %g1, [ %o0 ]
20049d8: 81 c7 e0 08 ret
20049dc: 81 e8 00 00 restore
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
20049e0: 94 10 20 50 mov 0x50, %o2
20049e4: 40 00 2f f7 call 20109c0 <memset>
20049e8: 90 10 00 19 mov %i1, %o0
status = (*loc.handlers->fstat_h)( &loc, buf );
20049ec: c2 07 bf ec ld [ %fp + -20 ], %g1
20049f0: 92 10 00 19 mov %i1, %o1
20049f4: c2 00 60 18 ld [ %g1 + 0x18 ], %g1
20049f8: 9f c0 40 00 call %g1
20049fc: 90 10 00 10 mov %l0, %o0
rtems_filesystem_freenode( &loc );
2004a00: c2 07 bf f0 ld [ %fp + -16 ], %g1
2004a04: 80 a0 60 00 cmp %g1, 0
2004a08: 02 bf ff f4 be 20049d8 <stat+0x8c> <== NEVER TAKEN
2004a0c: b0 10 00 08 mov %o0, %i0
2004a10: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2004a14: 80 a0 60 00 cmp %g1, 0
2004a18: 02 80 00 04 be 2004a28 <stat+0xdc> <== NEVER TAKEN
2004a1c: 01 00 00 00 nop
2004a20: 9f c0 40 00 call %g1
2004a24: 90 10 00 10 mov %l0, %o0
return status;
}
2004a28: 81 c7 e0 08 ret
2004a2c: 81 e8 00 00 restore
02004ec4 <symlink>:
int symlink(
const char *actualpath,
const char *sympath
)
{
2004ec4: 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 );
2004ec8: c2 4e 40 00 ldsb [ %i1 ], %g1
2004ecc: 80 a0 60 2f cmp %g1, 0x2f
2004ed0: 02 80 00 07 be 2004eec <symlink+0x28>
2004ed4: a0 10 00 18 mov %i0, %l0
2004ed8: 80 a0 60 5c cmp %g1, 0x5c
2004edc: 02 80 00 04 be 2004eec <symlink+0x28> <== NEVER TAKEN
2004ee0: 80 a0 60 00 cmp %g1, 0
2004ee4: 32 80 00 0a bne,a 2004f0c <symlink+0x48> <== ALWAYS TAKEN
2004ee8: 03 00 80 5f sethi %hi(0x2017c00), %g1
2004eec: 03 00 80 5f sethi %hi(0x2017c00), %g1
2004ef0: d2 00 63 6c ld [ %g1 + 0x36c ], %o1 ! 2017f6c <rtems_current_user_env>
2004ef4: 90 07 bf e4 add %fp, -28, %o0
2004ef8: 92 02 60 14 add %o1, 0x14, %o1
2004efc: 40 00 2c fb call 20102e8 <memcpy>
2004f00: 94 10 20 10 mov 0x10, %o2
2004f04: 10 80 00 08 b 2004f24 <symlink+0x60>
2004f08: 82 10 20 01 mov 1, %g1
2004f0c: d2 00 63 6c ld [ %g1 + 0x36c ], %o1
2004f10: 90 07 bf e4 add %fp, -28, %o0
2004f14: 92 02 60 04 add %o1, 4, %o1
2004f18: 40 00 2c f4 call 20102e8 <memcpy>
2004f1c: 94 10 20 10 mov 0x10, %o2
2004f20: 82 10 20 00 clr %g1
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
2004f24: 90 06 40 01 add %i1, %g1, %o0
2004f28: c2 07 bf ec ld [ %fp + -20 ], %g1
2004f2c: b2 07 bf e4 add %fp, -28, %i1
2004f30: c2 00 60 04 ld [ %g1 + 4 ], %g1
2004f34: 94 07 bf f4 add %fp, -12, %o2
2004f38: 92 10 00 19 mov %i1, %o1
2004f3c: 9f c0 40 00 call %g1
2004f40: b0 10 3f ff mov -1, %i0
if ( result != 0 )
2004f44: 80 a2 20 00 cmp %o0, 0
2004f48: 12 80 00 10 bne 2004f88 <symlink+0xc4>
2004f4c: c2 07 bf ec ld [ %fp + -20 ], %g1
return -1;
if ( !loc.ops->symlink_h ) {
2004f50: c4 00 60 38 ld [ %g1 + 0x38 ], %g2
2004f54: 80 a0 a0 00 cmp %g2, 0
2004f58: 12 80 00 0e bne 2004f90 <symlink+0xcc> <== ALWAYS TAKEN
2004f5c: d4 07 bf f4 ld [ %fp + -12 ], %o2
rtems_filesystem_freenode( &loc );
2004f60: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2004f64: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004f68: 02 80 00 04 be 2004f78 <symlink+0xb4> <== NOT EXECUTED
2004f6c: 01 00 00 00 nop <== NOT EXECUTED
2004f70: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004f74: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
2004f78: 40 00 2a d0 call 200fab8 <__errno> <== NOT EXECUTED
2004f7c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2004f80: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2004f84: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2004f88: 81 c7 e0 08 ret
2004f8c: 81 e8 00 00 restore
}
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
2004f90: 92 10 00 10 mov %l0, %o1
2004f94: 9f c0 80 00 call %g2
2004f98: 90 10 00 19 mov %i1, %o0
rtems_filesystem_freenode( &loc );
2004f9c: c2 07 bf ec ld [ %fp + -20 ], %g1
2004fa0: 80 a0 60 00 cmp %g1, 0
2004fa4: 02 bf ff f9 be 2004f88 <symlink+0xc4> <== NEVER TAKEN
2004fa8: b0 10 00 08 mov %o0, %i0
2004fac: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2004fb0: 80 a0 60 00 cmp %g1, 0
2004fb4: 02 80 00 04 be 2004fc4 <symlink+0x100> <== NEVER TAKEN
2004fb8: 01 00 00 00 nop
2004fbc: 9f c0 40 00 call %g1
2004fc0: 90 10 00 19 mov %i1, %o0
return result;
}
2004fc4: 81 c7 e0 08 ret
2004fc8: 81 e8 00 00 restore
02004a48 <sync_per_thread>:
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
2004a48: 9d e3 bf 98 save %sp, -104, %sp
/*
* The sync_wrapper() function will operate on the current thread's
* reent structure so we will temporarily use that.
*/
this_reent = t->libc_reent;
2004a4c: c4 06 21 64 ld [ %i0 + 0x164 ], %g2
if ( this_reent ) {
2004a50: 80 a0 a0 00 cmp %g2, 0
2004a54: 02 80 00 0b be 2004a80 <sync_per_thread+0x38> <== NEVER TAKEN
2004a58: 21 00 80 5d sethi %hi(0x2017400), %l0
current_reent = _Thread_Executing->libc_reent;
2004a5c: c2 04 22 64 ld [ %l0 + 0x264 ], %g1 ! 2017664 <_Thread_Executing>
_Thread_Executing->libc_reent = this_reent;
_fwalk (t->libc_reent, sync_wrapper);
2004a60: 13 00 80 12 sethi %hi(0x2004800), %o1
* The sync_wrapper() function will operate on the current thread's
* reent structure so we will temporarily use that.
*/
this_reent = t->libc_reent;
if ( this_reent ) {
current_reent = _Thread_Executing->libc_reent;
2004a64: e2 00 61 64 ld [ %g1 + 0x164 ], %l1
_Thread_Executing->libc_reent = this_reent;
2004a68: c4 20 61 64 st %g2, [ %g1 + 0x164 ]
_fwalk (t->libc_reent, sync_wrapper);
2004a6c: d0 06 21 64 ld [ %i0 + 0x164 ], %o0
2004a70: 40 00 2e ee call 2010628 <_fwalk>
2004a74: 92 12 62 b0 or %o1, 0x2b0, %o1
_Thread_Executing->libc_reent = current_reent;
2004a78: c2 04 22 64 ld [ %l0 + 0x264 ], %g1
2004a7c: e2 20 61 64 st %l1, [ %g1 + 0x164 ]
2004a80: 81 c7 e0 08 ret
2004a84: 81 e8 00 00 restore
02004df0 <sysconf>:
*/
long sysconf(
int name
)
{
2004df0: 9d e3 bf 98 save %sp, -104, %sp
switch (name) {
2004df4: 80 a6 20 08 cmp %i0, 8
2004df8: 02 80 00 1f be 2004e74 <sysconf+0x84>
2004dfc: 11 00 00 04 sethi %hi(0x1000), %o0
2004e00: 80 a6 20 08 cmp %i0, 8
2004e04: 14 80 00 09 bg 2004e28 <sysconf+0x38>
2004e08: 80 a6 20 33 cmp %i0, 0x33
2004e0c: 80 a6 20 02 cmp %i0, 2
2004e10: 02 80 00 0d be 2004e44 <sysconf+0x54>
2004e14: 80 a6 20 04 cmp %i0, 4
2004e18: 12 80 00 12 bne 2004e60 <sysconf+0x70>
2004e1c: 03 00 80 51 sethi %hi(0x2014400), %g1
2004e20: 10 80 00 15 b 2004e74 <sysconf+0x84>
2004e24: d0 00 61 28 ld [ %g1 + 0x128 ], %o0 ! 2014528 <rtems_libio_number_iops>
2004e28: 02 80 00 13 be 2004e74 <sysconf+0x84>
2004e2c: 90 10 24 00 mov 0x400, %o0
2004e30: 80 a6 22 03 cmp %i0, 0x203
2004e34: 12 80 00 0b bne 2004e60 <sysconf+0x70> <== ALWAYS TAKEN
2004e38: 90 10 20 00 clr %o0
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
2004e3c: 81 c7 e0 08 ret <== NOT EXECUTED
2004e40: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
)
{
switch (name) {
case _SC_CLK_TCK:
return (TOD_MICROSECONDS_PER_SECOND / _TOD_Microseconds_per_tick);
2004e44: 03 00 80 55 sethi %hi(0x2015400), %g1
2004e48: d2 00 61 70 ld [ %g1 + 0x170 ], %o1 ! 2015570 <_TOD_Microseconds_per_tick>
2004e4c: 11 00 03 d0 sethi %hi(0xf4000), %o0
2004e50: 40 00 30 8d call 2011084 <.udiv>
2004e54: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 <PROM_START+0xf4240>
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
2004e58: 81 c7 e0 08 ret
2004e5c: 91 e8 00 08 restore %g0, %o0, %o0
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
2004e60: 40 00 21 c3 call 200d56c <__errno>
2004e64: 01 00 00 00 nop
2004e68: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
2004e6c: c2 22 00 00 st %g1, [ %o0 ]
2004e70: 90 10 3f ff mov -1, %o0
}
2004e74: b0 10 00 08 mov %o0, %i0
2004e78: 81 c7 e0 08 ret
2004e7c: 81 e8 00 00 restore
020055d4 <telldir>:
#include <rtems/seterr.h>
long telldir(
DIR *dirp
)
{
20055d4: 9d e3 bf 98 save %sp, -104, %sp
rtems_libio_t *iop;
if ( !dirp )
20055d8: 80 a6 20 00 cmp %i0, 0
20055dc: 32 80 00 08 bne,a 20055fc <telldir+0x28> <== ALWAYS TAKEN
20055e0: f0 06 00 00 ld [ %i0 ], %i0
rtems_set_errno_and_return_minus_one( EBADF );
20055e4: 40 00 2b 41 call 20102e8 <__errno> <== NOT EXECUTED
20055e8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20055ec: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED
20055f0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20055f4: 81 c7 e0 08 ret
20055f8: 81 e8 00 00 restore
/*
* Get the file control block structure associated with the
* file descriptor
*/
iop = rtems_libio_iop( dirp->dd_fd );
20055fc: 03 00 80 5c sethi %hi(0x2017000), %g1
2005600: c2 00 63 f8 ld [ %g1 + 0x3f8 ], %g1 ! 20173f8 <rtems_libio_number_iops>
2005604: 80 a6 00 01 cmp %i0, %g1
2005608: 1a 80 00 0d bcc 200563c <telldir+0x68> <== NEVER TAKEN
200560c: 11 00 80 59 sethi %hi(0x2016400), %o0
2005610: 03 00 80 60 sethi %hi(0x2018000), %g1
2005614: c6 00 61 68 ld [ %g1 + 0x168 ], %g3 ! 2018168 <rtems_libio_iops>
2005618: 85 2e 20 02 sll %i0, 2, %g2
200561c: 83 2e 20 04 sll %i0, 4, %g1
2005620: 82 20 40 02 sub %g1, %g2, %g1
2005624: 82 00 40 18 add %g1, %i0, %g1
2005628: 83 28 60 02 sll %g1, 2, %g1
if (iop == NULL)
200562c: 86 80 c0 01 addcc %g3, %g1, %g3
2005630: 32 bf ff f1 bne,a 20055f4 <telldir+0x20> <== ALWAYS TAKEN
2005634: f0 00 e0 08 ld [ %g3 + 8 ], %i0
assert(0);
2005638: 11 00 80 59 sethi %hi(0x2016400), %o0 <== NOT EXECUTED
200563c: 15 00 80 59 sethi %hi(0x2016400), %o2 <== NOT EXECUTED
2005640: 17 00 80 59 sethi %hi(0x2016400), %o3 <== NOT EXECUTED
2005644: 90 12 21 98 or %o0, 0x198, %o0 <== NOT EXECUTED
2005648: 94 12 a1 f0 or %o2, 0x1f0, %o2 <== NOT EXECUTED
200564c: 96 12 e1 e8 or %o3, 0x1e8, %o3 <== NOT EXECUTED
2005650: 7f ff f7 2b call 20032fc <__assert_func> <== NOT EXECUTED
2005654: 92 10 20 2c mov 0x2c, %o1 <== NOT EXECUTED
0200aed4 <timer_create>:
int timer_create(
clockid_t clock_id,
struct sigevent *evp,
timer_t *timerid
)
{
200aed4: 9d e3 bf 98 save %sp, -104, %sp
POSIX_Timer_Control *ptimer;
if ( clock_id != CLOCK_REALTIME )
200aed8: 80 a6 20 01 cmp %i0, 1
200aedc: 12 80 00 15 bne 200af30 <timer_create+0x5c>
200aee0: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !timerid )
200aee4: 80 a6 a0 00 cmp %i2, 0
200aee8: 02 80 00 12 be 200af30 <timer_create+0x5c>
200aeec: 01 00 00 00 nop
/*
* The data of the structure evp are checked in order to verify if they
* are coherent.
*/
if (evp != NULL) {
200aef0: 80 a6 60 00 cmp %i1, 0
200aef4: 02 80 00 13 be 200af40 <timer_create+0x6c>
200aef8: 03 00 80 89 sethi %hi(0x2022400), %g1
/* The structure has data */
if ( ( evp->sigev_notify != SIGEV_NONE ) &&
200aefc: c2 06 40 00 ld [ %i1 ], %g1
200af00: 82 00 7f ff add %g1, -1, %g1
200af04: 80 a0 60 01 cmp %g1, 1
200af08: 18 80 00 0a bgu 200af30 <timer_create+0x5c> <== NEVER TAKEN
200af0c: 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 )
200af10: c2 06 60 04 ld [ %i1 + 4 ], %g1
200af14: 80 a0 60 00 cmp %g1, 0
200af18: 02 80 00 06 be 200af30 <timer_create+0x5c> <== NEVER TAKEN
200af1c: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(evp->sigev_signo) )
200af20: 82 00 7f ff add %g1, -1, %g1
200af24: 80 a0 60 1f cmp %g1, 0x1f
200af28: 28 80 00 06 bleu,a 200af40 <timer_create+0x6c> <== ALWAYS TAKEN
200af2c: 03 00 80 89 sethi %hi(0x2022400), %g1
rtems_set_errno_and_return_minus_one( EINVAL );
200af30: 40 00 24 08 call 2013f50 <__errno>
200af34: 01 00 00 00 nop
200af38: 10 80 00 10 b 200af78 <timer_create+0xa4>
200af3c: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
200af40: c4 00 62 b0 ld [ %g1 + 0x2b0 ], %g2
200af44: 84 00 a0 01 inc %g2
200af48: c4 20 62 b0 st %g2, [ %g1 + 0x2b0 ]
* 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 );
200af4c: 11 00 80 8a sethi %hi(0x2022800), %o0
200af50: 40 00 08 02 call 200cf58 <_Objects_Allocate>
200af54: 90 12 22 00 or %o0, 0x200, %o0 ! 2022a00 <_POSIX_Timer_Information>
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
200af58: 80 a2 20 00 cmp %o0, 0
200af5c: 12 80 00 0a bne 200af84 <timer_create+0xb0>
200af60: 82 10 20 02 mov 2, %g1
_Thread_Enable_dispatch();
200af64: 40 00 0b c4 call 200de74 <_Thread_Enable_dispatch>
200af68: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EAGAIN );
200af6c: 40 00 23 f9 call 2013f50 <__errno>
200af70: 01 00 00 00 nop
200af74: 82 10 20 0b mov 0xb, %g1 ! b <PROM_START+0xb>
200af78: c2 22 00 00 st %g1, [ %o0 ]
200af7c: 81 c7 e0 08 ret
200af80: 91 e8 3f ff restore %g0, -1, %o0
}
/* The data of the created timer are stored to use them later */
ptimer->state = POSIX_TIMER_STATE_CREATE_NEW;
200af84: c2 2a 20 3c stb %g1, [ %o0 + 0x3c ]
ptimer->thread_id = _Thread_Executing->Object.id;
200af88: 03 00 80 89 sethi %hi(0x2022400), %g1
200af8c: c2 00 63 74 ld [ %g1 + 0x374 ], %g1 ! 2022774 <_Thread_Executing>
if ( evp != NULL ) {
200af90: 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;
200af94: c2 00 60 08 ld [ %g1 + 8 ], %g1
if ( evp != NULL ) {
200af98: 02 80 00 08 be 200afb8 <timer_create+0xe4>
200af9c: 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;
200afa0: 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;
200afa4: c4 06 40 00 ld [ %i1 ], %g2
ptimer->inf.sigev_signo = evp->sigev_signo;
200afa8: 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;
200afac: c4 22 20 40 st %g2, [ %o0 + 0x40 ]
ptimer->inf.sigev_signo = evp->sigev_signo;
200afb0: c6 22 20 44 st %g3, [ %o0 + 0x44 ]
ptimer->inf.sigev_value = evp->sigev_value;
200afb4: c2 22 20 48 st %g1, [ %o0 + 0x48 ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200afb8: c6 02 20 08 ld [ %o0 + 8 ], %g3
200afbc: 03 00 80 8a sethi %hi(0x2022800), %g1
200afc0: c4 00 62 1c ld [ %g1 + 0x21c ], %g2 ! 2022a1c <_POSIX_Timer_Information+0x1c>
200afc4: 03 00 00 3f sethi %hi(0xfc00), %g1
200afc8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
200afcc: 82 08 c0 01 and %g3, %g1, %g1
200afd0: 83 28 60 02 sll %g1, 2, %g1
200afd4: d0 20 80 01 st %o0, [ %g2 + %g1 ]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == FALSE */
the_object->name.name_u32 = name;
200afd8: c0 22 20 0c clr [ %o0 + 0xc ]
}
ptimer->overrun = 0;
200afdc: c0 22 20 68 clr [ %o0 + 0x68 ]
ptimer->timer_data.it_value.tv_sec = 0;
200afe0: c0 22 20 5c clr [ %o0 + 0x5c ]
ptimer->timer_data.it_value.tv_nsec = 0;
200afe4: c0 22 20 60 clr [ %o0 + 0x60 ]
ptimer->timer_data.it_interval.tv_sec = 0;
200afe8: c0 22 20 54 clr [ %o0 + 0x54 ]
ptimer->timer_data.it_interval.tv_nsec = 0;
200afec: c0 22 20 58 clr [ %o0 + 0x58 ]
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
200aff0: c0 22 20 30 clr [ %o0 + 0x30 ]
_Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL );
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0);
*timerid = ptimer->Object.id;
200aff4: c6 26 80 00 st %g3, [ %i2 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
200aff8: c0 22 20 18 clr [ %o0 + 0x18 ]
the_watchdog->routine = routine;
200affc: c0 22 20 2c clr [ %o0 + 0x2c ]
the_watchdog->id = id;
the_watchdog->user_data = user_data;
200b000: c0 22 20 34 clr [ %o0 + 0x34 ]
_Thread_Enable_dispatch();
200b004: 40 00 0b 9c call 200de74 <_Thread_Enable_dispatch>
200b008: b0 10 20 00 clr %i0
return 0;
}
200b00c: 81 c7 e0 08 ret
200b010: 81 e8 00 00 restore
02006918 <timer_settime>:
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
2006918: 9d e3 bf 80 save %sp, -128, %sp
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
200691c: 80 a6 a0 00 cmp %i2, 0
2006920: 02 80 00 22 be 20069a8 <timer_settime+0x90> <== NEVER TAKEN
2006924: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
/* First, it verifies if the structure "value" is correct */
if ( ( value->it_value.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) ||
2006928: c4 06 a0 0c ld [ %i2 + 0xc ], %g2
200692c: 03 0e e6 b2 sethi %hi(0x3b9ac800), %g1
2006930: 82 10 61 ff or %g1, 0x1ff, %g1 ! 3b9ac9ff <RAM_END+0x395ac9ff>
2006934: 80 a0 80 01 cmp %g2, %g1
2006938: 18 80 00 1c bgu 20069a8 <timer_settime+0x90>
200693c: 01 00 00 00 nop
2006940: c4 06 a0 04 ld [ %i2 + 4 ], %g2
2006944: 80 a0 80 01 cmp %g2, %g1
2006948: 18 80 00 18 bgu 20069a8 <timer_settime+0x90> <== NEVER TAKEN
200694c: 80 a0 a0 00 cmp %g2, 0
2006950: 06 80 00 16 bl 20069a8 <timer_settime+0x90> <== NEVER TAKEN
2006954: 01 00 00 00 nop
( value->it_interval.tv_nsec < 0 )) {
/* The number of nanoseconds is not correct */
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
2006958: 80 a6 60 04 cmp %i1, 4
200695c: 02 80 00 04 be 200696c <timer_settime+0x54>
2006960: 80 a6 60 00 cmp %i1, 0
2006964: 12 80 00 11 bne 20069a8 <timer_settime+0x90>
2006968: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
200696c: 90 07 bf e4 add %fp, -28, %o0
2006970: 92 10 00 1a mov %i2, %o1
2006974: 40 00 24 69 call 200fb18 <memcpy>
2006978: 94 10 20 10 mov 0x10, %o2
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
200697c: 80 a6 60 04 cmp %i1, 4
2006980: 12 80 00 14 bne 20069d0 <timer_settime+0xb8>
2006984: 92 10 00 18 mov %i0, %o1
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &_TOD_Now, &normalize.it_value ) )
2006988: b2 07 bf ec add %fp, -20, %i1
200698c: 21 00 80 70 sethi %hi(0x201c000), %l0
2006990: 92 10 00 19 mov %i1, %o1
2006994: 40 00 0e bd call 200a488 <_Timespec_Greater_than>
2006998: 90 14 23 34 or %l0, 0x334, %o0
200699c: 80 8a 20 ff btst 0xff, %o0
20069a0: 02 80 00 08 be 20069c0 <timer_settime+0xa8>
20069a4: 92 10 00 19 mov %i1, %o1
rtems_set_errno_and_return_minus_one( EINVAL );
20069a8: 40 00 22 44 call 200f2b8 <__errno>
20069ac: b0 10 3f ff mov -1, %i0
20069b0: 82 10 20 16 mov 0x16, %g1
20069b4: c2 22 00 00 st %g1, [ %o0 ]
20069b8: 81 c7 e0 08 ret
20069bc: 81 e8 00 00 restore
_Timespec_Subtract( &_TOD_Now, &normalize.it_value, &normalize.it_value );
20069c0: 90 14 23 34 or %l0, 0x334, %o0
20069c4: 40 00 0e c2 call 200a4cc <_Timespec_Subtract>
20069c8: 94 10 00 19 mov %i1, %o2
20069cc: 92 10 00 18 mov %i0, %o1
20069d0: 11 00 80 71 sethi %hi(0x201c400), %o0
20069d4: 94 07 bf f4 add %fp, -12, %o2
20069d8: 40 00 08 9e call 2008c50 <_Objects_Get>
20069dc: 90 12 21 f0 or %o0, 0x1f0, %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 ) {
20069e0: c2 07 bf f4 ld [ %fp + -12 ], %g1
20069e4: 80 a0 60 00 cmp %g1, 0
20069e8: 12 80 00 39 bne 2006acc <timer_settime+0x1b4> <== NEVER TAKEN
20069ec: b2 10 00 08 mov %o0, %i1
case OBJECTS_LOCAL:
/* First, it verifies if the timer must be stopped */
if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) {
20069f0: c2 07 bf ec ld [ %fp + -20 ], %g1
20069f4: 80 a0 60 00 cmp %g1, 0
20069f8: 12 80 00 14 bne 2006a48 <timer_settime+0x130>
20069fc: c2 07 bf f0 ld [ %fp + -16 ], %g1
2006a00: 80 a0 60 00 cmp %g1, 0
2006a04: 12 80 00 11 bne 2006a48 <timer_settime+0x130> <== NEVER TAKEN
2006a08: 01 00 00 00 nop
/* Stop the timer */
(void) _Watchdog_Remove( &ptimer->Timer );
2006a0c: 40 00 0f f3 call 200a9d8 <_Watchdog_Remove>
2006a10: 90 02 20 10 add %o0, 0x10, %o0
/* The old data of the timer are returned */
if ( ovalue )
2006a14: 80 a6 e0 00 cmp %i3, 0
2006a18: 02 80 00 05 be 2006a2c <timer_settime+0x114> <== ALWAYS TAKEN
2006a1c: 90 10 00 1b mov %i3, %o0
*ovalue = ptimer->timer_data;
2006a20: 92 06 60 54 add %i1, 0x54, %o1 <== NOT EXECUTED
2006a24: 40 00 24 3d call 200fb18 <memcpy> <== NOT EXECUTED
2006a28: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED
/* The new data are set */
ptimer->timer_data = normalize;
2006a2c: 92 07 bf e4 add %fp, -28, %o1
2006a30: 94 10 20 10 mov 0x10, %o2
2006a34: 40 00 24 39 call 200fb18 <memcpy>
2006a38: 90 06 60 54 add %i1, 0x54, %o0
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
2006a3c: 82 10 20 04 mov 4, %g1
2006a40: 10 80 00 1f b 2006abc <timer_settime+0x1a4>
2006a44: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ]
_Thread_Enable_dispatch();
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
2006a48: 40 00 0e b5 call 200a51c <_Timespec_To_ticks>
2006a4c: 90 10 00 1a mov %i2, %o0
2006a50: d0 26 60 64 st %o0, [ %i1 + 0x64 ]
initial_period = _Timespec_To_ticks( &normalize.it_value );
2006a54: 40 00 0e b2 call 200a51c <_Timespec_To_ticks>
2006a58: 90 07 bf ec add %fp, -20, %o0
activated = _POSIX_Timer_Insert_helper(
2006a5c: d4 06 60 08 ld [ %i1 + 8 ], %o2
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
initial_period = _Timespec_To_ticks( &normalize.it_value );
2006a60: 92 10 00 08 mov %o0, %o1
activated = _POSIX_Timer_Insert_helper(
2006a64: 17 00 80 1a sethi %hi(0x2006800), %o3
2006a68: 90 06 60 10 add %i1, 0x10, %o0
2006a6c: 96 12 e2 e4 or %o3, 0x2e4, %o3
2006a70: 40 00 1a a1 call 200d4f4 <_POSIX_Timer_Insert_helper>
2006a74: 98 10 00 19 mov %i1, %o4
initial_period,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
2006a78: 80 8a 20 ff btst 0xff, %o0
2006a7c: 02 80 00 10 be 2006abc <timer_settime+0x1a4> <== NEVER TAKEN
2006a80: 01 00 00 00 nop
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
2006a84: 80 a6 e0 00 cmp %i3, 0
2006a88: 02 80 00 05 be 2006a9c <timer_settime+0x184>
2006a8c: 90 10 00 1b mov %i3, %o0
*ovalue = ptimer->timer_data;
2006a90: 92 06 60 54 add %i1, 0x54, %o1
2006a94: 40 00 24 21 call 200fb18 <memcpy>
2006a98: 94 10 20 10 mov 0x10, %o2
ptimer->timer_data = normalize;
2006a9c: 92 07 bf e4 add %fp, -28, %o1
2006aa0: 94 10 20 10 mov 0x10, %o2
2006aa4: 40 00 24 1d call 200fb18 <memcpy>
2006aa8: 90 06 60 54 add %i1, 0x54, %o0
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
2006aac: 82 10 20 03 mov 3, %g1
_TOD_Get( &ptimer->time );
2006ab0: 90 06 60 6c add %i1, 0x6c, %o0
2006ab4: 40 00 06 0a call 20082dc <_TOD_Get>
2006ab8: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ]
_Thread_Enable_dispatch();
2006abc: 40 00 0a a6 call 2009554 <_Thread_Enable_dispatch>
2006ac0: b0 10 20 00 clr %i0
2006ac4: 81 c7 e0 08 ret
2006ac8: 81 e8 00 00 restore
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
2006acc: 40 00 21 fb call 200f2b8 <__errno> <== NOT EXECUTED
2006ad0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2006ad4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2006ad8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
}
2006adc: 81 c7 e0 08 ret <== NOT EXECUTED
2006ae0: 81 e8 00 00 restore <== NOT EXECUTED
020050d4 <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
20050d4: 9d e3 bf 90 save %sp, -112, %sp
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
20050d8: 03 00 80 56 sethi %hi(0x2015800), %g1
20050dc: a0 10 60 04 or %g1, 4, %l0 ! 2015804 <_POSIX_signals_Ualarm_timer>
20050e0: c2 04 20 1c ld [ %l0 + 0x1c ], %g1
20050e4: 80 a0 60 00 cmp %g1, 0
20050e8: 12 80 00 0a bne 2005110 <ualarm+0x3c>
20050ec: a2 10 00 18 mov %i0, %l1
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
20050f0: 03 00 80 14 sethi %hi(0x2005000), %g1
the_watchdog->id = id;
the_watchdog->user_data = user_data;
20050f4: c0 24 20 24 clr [ %l0 + 0x24 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
20050f8: 82 10 61 e8 or %g1, 0x1e8, %g1
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
20050fc: c0 24 20 08 clr [ %l0 + 8 ]
the_watchdog->routine = routine;
the_watchdog->id = id;
2005100: c0 24 20 20 clr [ %l0 + 0x20 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2005104: c2 24 20 1c st %g1, [ %l0 + 0x1c ]
the_watchdog->id = id;
the_watchdog->user_data = user_data;
2005108: 10 80 00 1b b 2005174 <ualarm+0xa0>
200510c: b0 10 20 00 clr %i0
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
switch ( _Watchdog_Remove( the_timer ) ) {
2005110: 40 00 10 07 call 200912c <_Watchdog_Remove>
2005114: 90 10 00 10 mov %l0, %o0
2005118: 90 02 3f fe add %o0, -2, %o0
200511c: 80 a2 20 01 cmp %o0, 1
2005120: 18 80 00 15 bgu 2005174 <ualarm+0xa0> <== NEVER TAKEN
2005124: b0 10 20 00 clr %i0
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
2005128: c4 04 20 18 ld [ %l0 + 0x18 ], %g2
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
200512c: c2 04 20 0c ld [ %l0 + 0xc ], %g1
2005130: d0 04 20 14 ld [ %l0 + 0x14 ], %o0
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
2005134: 92 07 bf f0 add %fp, -16, %o1
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
2005138: 90 02 00 01 add %o0, %g1, %o0
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
200513c: 40 00 0e 8c call 2008b6c <_Timespec_From_ticks>
2005140: 90 22 00 02 sub %o0, %g2, %o0
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
2005144: c4 07 bf f0 ld [ %fp + -16 ], %g2
remaining += tp.tv_nsec / 1000;
2005148: d0 07 bf f4 ld [ %fp + -12 ], %o0
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
200514c: 87 28 a0 03 sll %g2, 3, %g3
2005150: 83 28 a0 08 sll %g2, 8, %g1
2005154: 82 20 40 03 sub %g1, %g3, %g1
remaining += tp.tv_nsec / 1000;
2005158: 92 10 23 e8 mov 0x3e8, %o1
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
200515c: a1 28 60 06 sll %g1, 6, %l0
2005160: a0 24 00 01 sub %l0, %g1, %l0
remaining += tp.tv_nsec / 1000;
2005164: 40 00 33 36 call 2011e3c <.div>
2005168: a0 04 00 02 add %l0, %g2, %l0
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
200516c: a1 2c 20 06 sll %l0, 6, %l0
remaining += tp.tv_nsec / 1000;
2005170: b0 02 00 10 add %o0, %l0, %i0
/*
* If useconds is non-zero, then the caller wants to schedule
* the alarm repeatedly at that interval. If the interval is
* less than a single clock tick, then fudge it to a clock tick.
*/
if ( useconds ) {
2005174: 80 a4 60 00 cmp %l1, 0
2005178: 02 80 00 1a be 20051e0 <ualarm+0x10c>
200517c: 21 00 03 d0 sethi %hi(0xf4000), %l0
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
2005180: 90 10 00 11 mov %l1, %o0
2005184: 40 00 33 2c call 2011e34 <.udiv>
2005188: 92 14 22 40 or %l0, 0x240, %o1
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
200518c: 92 14 22 40 or %l0, 0x240, %o1
* less than a single clock tick, then fudge it to a clock tick.
*/
if ( useconds ) {
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
2005190: d0 27 bf f0 st %o0, [ %fp + -16 ]
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
2005194: 40 00 33 d4 call 20120e4 <.urem>
2005198: 90 10 00 11 mov %l1, %o0
200519c: 85 2a 20 02 sll %o0, 2, %g2
20051a0: 83 2a 20 07 sll %o0, 7, %g1
20051a4: 82 20 40 02 sub %g1, %g2, %g1
20051a8: 82 00 40 08 add %g1, %o0, %g1
20051ac: 83 28 60 03 sll %g1, 3, %g1
ticks = _Timespec_To_ticks( &tp );
20051b0: a0 07 bf f0 add %fp, -16, %l0
*/
if ( useconds ) {
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
20051b4: c2 27 bf f4 st %g1, [ %fp + -12 ]
ticks = _Timespec_To_ticks( &tp );
20051b8: 40 00 0e 96 call 2008c10 <_Timespec_To_ticks>
20051bc: 90 10 00 10 mov %l0, %o0
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
20051c0: 40 00 0e 94 call 2008c10 <_Timespec_To_ticks>
20051c4: 90 10 00 10 mov %l0, %o0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
20051c8: 13 00 80 56 sethi %hi(0x2015800), %o1
20051cc: 92 12 60 04 or %o1, 4, %o1 ! 2015804 <_POSIX_signals_Ualarm_timer>
20051d0: d0 22 60 0c st %o0, [ %o1 + 0xc ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
20051d4: 11 00 80 56 sethi %hi(0x2015800), %o0
20051d8: 40 00 0f 7b call 2008fc4 <_Watchdog_Insert>
20051dc: 90 12 22 44 or %o0, 0x244, %o0 ! 2015a44 <_Watchdog_Ticks_chain>
}
return remaining;
}
20051e0: 81 c7 e0 08 ret
20051e4: 81 e8 00 00 restore
02007f2c <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
2007f2c: 9d e3 bf 88 save %sp, -120, %sp
/*
* Get the node to be unlinked.
*/
result = rtems_filesystem_evaluate_path( path, 0, &loc, false );
2007f30: 92 10 20 00 clr %o1
2007f34: 90 10 00 18 mov %i0, %o0
2007f38: a0 07 bf e8 add %fp, -24, %l0
2007f3c: 96 10 20 00 clr %o3
2007f40: 7f ff f1 cb call 200466c <rtems_filesystem_evaluate_path>
2007f44: 94 10 00 10 mov %l0, %o2
if ( result != 0 )
2007f48: 80 a2 20 00 cmp %o0, 0
2007f4c: 32 80 00 17 bne,a 2007fa8 <unlink+0x7c>
2007f50: b0 10 3f ff mov -1, %i0
return -1;
result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc );
2007f54: 90 10 20 02 mov 2, %o0
2007f58: 7f ff f1 98 call 20045b8 <rtems_filesystem_evaluate_parent>
2007f5c: 92 10 00 10 mov %l0, %o1
if (result != 0 && errno != ENOTSUP) {
2007f60: 80 a2 20 00 cmp %o0, 0
2007f64: 02 80 00 13 be 2007fb0 <unlink+0x84> <== ALWAYS TAKEN
2007f68: c2 07 bf f0 ld [ %fp + -16 ], %g1
2007f6c: 40 00 24 29 call 2011010 <__errno> <== NOT EXECUTED
2007f70: 01 00 00 00 nop <== NOT EXECUTED
2007f74: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED
2007f78: 80 a0 60 86 cmp %g1, 0x86 <== NOT EXECUTED
2007f7c: 02 80 00 0d be 2007fb0 <unlink+0x84> <== NOT EXECUTED
2007f80: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
2007f84: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2007f88: 02 80 00 08 be 2007fa8 <unlink+0x7c> <== NOT EXECUTED
2007f8c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2007f90: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2007f94: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2007f98: 02 80 00 04 be 2007fa8 <unlink+0x7c> <== NOT EXECUTED
2007f9c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2007fa0: 9f c0 40 00 call %g1 <== NOT EXECUTED
2007fa4: 01 00 00 00 nop <== NOT EXECUTED
2007fa8: 81 c7 e0 08 ret
2007fac: 81 e8 00 00 restore
return -1;
}
if ( !loc.ops->node_type_h ) {
2007fb0: c4 00 60 10 ld [ %g1 + 0x10 ], %g2
2007fb4: 80 a0 a0 00 cmp %g2, 0
2007fb8: 12 80 00 07 bne 2007fd4 <unlink+0xa8> <== ALWAYS TAKEN
2007fbc: a0 07 bf e8 add %fp, -24, %l0
rtems_filesystem_freenode( &loc );
2007fc0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2007fc4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2007fc8: 12 80 00 1d bne 200803c <unlink+0x110> <== NOT EXECUTED
2007fcc: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED
2007fd0: 30 80 00 1d b,a 2008044 <unlink+0x118> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
2007fd4: 9f c0 80 00 call %g2
2007fd8: 90 10 00 10 mov %l0, %o0
2007fdc: 80 a2 20 01 cmp %o0, 1
2007fe0: 12 80 00 0f bne 200801c <unlink+0xf0>
2007fe4: c2 07 bf f0 ld [ %fp + -16 ], %g1
rtems_filesystem_freenode( &loc );
2007fe8: 80 a0 60 00 cmp %g1, 0
2007fec: 02 80 00 08 be 200800c <unlink+0xe0> <== NEVER TAKEN
2007ff0: 01 00 00 00 nop
2007ff4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2007ff8: 80 a0 60 00 cmp %g1, 0
2007ffc: 02 80 00 04 be 200800c <unlink+0xe0> <== NEVER TAKEN
2008000: 01 00 00 00 nop
2008004: 9f c0 40 00 call %g1
2008008: 90 10 00 10 mov %l0, %o0
rtems_set_errno_and_return_minus_one( EISDIR );
200800c: 40 00 24 01 call 2011010 <__errno>
2008010: b0 10 3f ff mov -1, %i0
2008014: 10 80 00 0f b 2008050 <unlink+0x124>
2008018: 82 10 20 15 mov 0x15, %g1
}
if ( !loc.ops->unlink_h ) {
200801c: c4 00 60 0c ld [ %g1 + 0xc ], %g2
2008020: 80 a0 a0 00 cmp %g2, 0
2008024: 12 80 00 0e bne 200805c <unlink+0x130> <== ALWAYS TAKEN
2008028: 01 00 00 00 nop
rtems_filesystem_freenode( &loc );
200802c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2008030: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2008034: 02 80 00 04 be 2008044 <unlink+0x118> <== NOT EXECUTED
2008038: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
200803c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2008040: 01 00 00 00 nop <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
2008044: 40 00 23 f3 call 2011010 <__errno> <== NOT EXECUTED
2008048: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff> <== NOT EXECUTED
200804c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2008050: c2 22 00 00 st %g1, [ %o0 ]
2008054: 81 c7 e0 08 ret
2008058: 81 e8 00 00 restore
}
result = (*loc.ops->unlink_h)( &loc );
200805c: 9f c0 80 00 call %g2
2008060: 90 10 00 10 mov %l0, %o0
rtems_filesystem_freenode( &loc );
2008064: c2 07 bf f0 ld [ %fp + -16 ], %g1
2008068: 80 a0 60 00 cmp %g1, 0
200806c: 02 bf ff cf be 2007fa8 <unlink+0x7c> <== NEVER TAKEN
2008070: b0 10 00 08 mov %o0, %i0
2008074: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2008078: 80 a0 60 00 cmp %g1, 0
200807c: 02 80 00 06 be 2008094 <unlink+0x168> <== NEVER TAKEN
2008080: 01 00 00 00 nop
2008084: 9f c0 40 00 call %g1
2008088: 90 10 00 10 mov %l0, %o0
200808c: 81 c7 e0 08 ret
2008090: 81 e8 00 00 restore
return result;
}
2008094: 81 c7 e0 08 ret <== NOT EXECUTED
2008098: 81 e8 00 00 restore <== NOT EXECUTED
02006e08 <unmount>:
*/
int unmount(
const char *path
)
{
2006e08: 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 ) )
2006e0c: 92 10 20 00 clr %o1
2006e10: 90 10 00 18 mov %i0, %o0
2006e14: a0 07 bf e8 add %fp, -24, %l0
2006e18: 96 10 20 01 mov 1, %o3
2006e1c: 7f ff f1 a9 call 20034c0 <rtems_filesystem_evaluate_path>
2006e20: 94 10 00 10 mov %l0, %o2
2006e24: 80 a2 20 00 cmp %o0, 0
2006e28: 12 80 00 6a bne 2006fd0 <unmount+0x1c8>
2006e2c: c2 07 bf e8 ld [ %fp + -24 ], %g1
return -1;
mt_entry = loc.mt_entry;
2006e30: f0 07 bf f4 ld [ %fp + -12 ], %i0
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){
2006e34: c4 06 20 18 ld [ %i0 + 0x18 ], %g2
2006e38: 80 a0 80 01 cmp %g2, %g1
2006e3c: 02 80 00 0f be 2006e78 <unmount+0x70>
2006e40: c6 07 bf f0 ld [ %fp + -16 ], %g3
rtems_filesystem_freenode( &loc );
2006e44: 80 a0 e0 00 cmp %g3, 0
2006e48: 02 80 00 08 be 2006e68 <unmount+0x60> <== NEVER TAKEN
2006e4c: 01 00 00 00 nop
2006e50: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1
2006e54: 80 a0 60 00 cmp %g1, 0
2006e58: 02 80 00 04 be 2006e68 <unmount+0x60> <== NEVER TAKEN
2006e5c: 01 00 00 00 nop
2006e60: 9f c0 40 00 call %g1
2006e64: 90 10 00 10 mov %l0, %o0
rtems_set_errno_and_return_minus_one( EACCES );
2006e68: 40 00 23 14 call 200fab8 <__errno>
2006e6c: 01 00 00 00 nop
2006e70: 10 80 00 21 b 2006ef4 <unmount+0xec>
2006e74: 82 10 20 0d mov 0xd, %g1 ! d <PROM_START+0xd>
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
2006e78: 80 a0 e0 00 cmp %g3, 0
2006e7c: 22 80 00 09 be,a 2006ea0 <unmount+0x98> <== NEVER TAKEN
2006e80: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED
2006e84: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1
2006e88: 80 a0 60 00 cmp %g1, 0
2006e8c: 22 80 00 05 be,a 2006ea0 <unmount+0x98> <== NEVER TAKEN
2006e90: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED
2006e94: 9f c0 40 00 call %g1
2006e98: 90 10 00 10 mov %l0, %o0
/*
* Verify Unmount is supported by both filesystems.
*/
if ( !fs_mount_loc->ops->unmount_h )
2006e9c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
2006ea0: c2 00 60 28 ld [ %g1 + 0x28 ], %g1
2006ea4: 80 a0 60 00 cmp %g1, 0
2006ea8: 02 80 00 07 be 2006ec4 <unmount+0xbc> <== NEVER TAKEN
2006eac: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( !fs_root_loc->ops->fsunmount_me_h )
2006eb0: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
2006eb4: c2 00 60 2c ld [ %g1 + 0x2c ], %g1
2006eb8: 80 a0 60 00 cmp %g1, 0
2006ebc: 32 80 00 06 bne,a 2006ed4 <unmount+0xcc> <== ALWAYS TAKEN
2006ec0: 03 00 80 5f sethi %hi(0x2017c00), %g1
rtems_set_errno_and_return_minus_one( ENOTSUP );
2006ec4: 40 00 22 fd call 200fab8 <__errno> <== NOT EXECUTED
2006ec8: 01 00 00 00 nop <== NOT EXECUTED
2006ecc: 10 80 00 0a b 2006ef4 <unmount+0xec> <== NOT EXECUTED
2006ed0: 82 10 20 86 mov 0x86, %g1 ! 86 <PROM_START+0x86> <== NOT EXECUTED
* that made the current node thread based instead
* of system based? I thought it was but it doesn't
* look like it in this version.
*/
if ( rtems_filesystem_current.mt_entry == mt_entry )
2006ed4: c2 00 63 6c ld [ %g1 + 0x36c ], %g1
2006ed8: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
2006edc: 80 a0 40 18 cmp %g1, %i0
2006ee0: 12 80 00 08 bne 2006f00 <unmount+0xf8>
2006ee4: 03 00 80 61 sethi %hi(0x2018400), %g1
rtems_set_errno_and_return_minus_one( EBUSY );
2006ee8: 40 00 22 f4 call 200fab8 <__errno>
2006eec: 01 00 00 00 nop
2006ef0: 82 10 20 10 mov 0x10, %g1 ! 10 <PROM_START+0x10>
2006ef4: c2 22 00 00 st %g1, [ %o0 ]
2006ef8: 81 c7 e0 08 ret
2006efc: 91 e8 3f ff restore %g0, -1, %o0
/*
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
2006f00: c6 00 63 98 ld [ %g1 + 0x398 ], %g3
2006f04: 82 10 63 98 or %g1, 0x398, %g1
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
2006f08: 10 80 00 07 b 2006f24 <unmount+0x11c>
2006f0c: 88 00 60 04 add %g1, 4, %g4
the_node = the_node->next ) {
the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node;
if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) {
2006f10: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
2006f14: 80 a0 80 01 cmp %g2, %g1
2006f18: 02 bf ff f4 be 2006ee8 <unmount+0xe0>
2006f1c: 01 00 00 00 nop
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
the_node = the_node->next ) {
2006f20: c6 00 c0 00 ld [ %g3 ], %g3
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
2006f24: 80 a0 c0 04 cmp %g3, %g4
2006f28: 32 bf ff fa bne,a 2006f10 <unmount+0x108>
2006f2c: c4 00 e0 14 ld [ %g3 + 0x14 ], %g2
2006f30: 30 80 00 2a b,a 2006fd8 <unmount+0x1d0>
* 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 )
2006f34: c2 00 60 28 ld [ %g1 + 0x28 ], %g1
2006f38: 9f c0 40 00 call %g1
2006f3c: 90 10 00 18 mov %i0, %o0
2006f40: 80 a2 20 00 cmp %o0, 0
2006f44: 12 80 00 23 bne 2006fd0 <unmount+0x1c8> <== NEVER TAKEN
2006f48: 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){
2006f4c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
2006f50: c2 00 60 2c ld [ %g1 + 0x2c ], %g1
2006f54: 9f c0 40 00 call %g1
2006f58: 90 10 00 18 mov %i0, %o0
2006f5c: 80 a2 20 00 cmp %o0, 0
2006f60: 02 80 00 0b be 2006f8c <unmount+0x184> <== ALWAYS TAKEN
2006f64: 01 00 00 00 nop
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
2006f68: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED
2006f6c: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 <== NOT EXECUTED
2006f70: 9f c0 40 00 call %g1 <== NOT EXECUTED
2006f74: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2006f78: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2006f7c: 02 80 00 15 be 2006fd0 <unmount+0x1c8> <== NOT EXECUTED
2006f80: 01 00 00 00 nop <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
2006f84: 40 00 03 fb call 2007f70 <rtems_fatal_error_occurred> <== NOT EXECUTED
2006f88: 90 10 20 00 clr %o0 ! 0 <PROM_START> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
2006f8c: 40 00 05 03 call 2008398 <_Chain_Extract>
2006f90: 90 10 00 18 mov %i0, %o0
/*
* Free the memory node that was allocated in mount
* Free the memory associated with the extracted mount table entry.
*/
rtems_filesystem_freenode( fs_mount_loc );
2006f94: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
2006f98: 80 a0 60 00 cmp %g1, 0
2006f9c: 02 80 00 09 be 2006fc0 <unmount+0x1b8> <== NEVER TAKEN
2006fa0: 90 10 00 18 mov %i0, %o0
2006fa4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2006fa8: 80 a0 60 00 cmp %g1, 0
2006fac: 02 80 00 05 be 2006fc0 <unmount+0x1b8> <== NEVER TAKEN
2006fb0: 01 00 00 00 nop
2006fb4: 9f c0 40 00 call %g1
2006fb8: 90 06 20 08 add %i0, 8, %o0
free( mt_entry );
2006fbc: 90 10 00 18 mov %i0, %o0
2006fc0: 7f ff f1 92 call 2003608 <free>
2006fc4: b0 10 20 00 clr %i0
2006fc8: 81 c7 e0 08 ret
2006fcc: 81 e8 00 00 restore
return 0;
}
2006fd0: 81 c7 e0 08 ret
2006fd4: 91 e8 3f ff restore %g0, -1, %o0
* Run the file descriptor table to determine if there are any file
* descriptors that are currently active and reference nodes in the
* file system that we are trying to unmount
*/
if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 )
2006fd8: 7f ff f2 3e call 20038d0 <rtems_libio_is_open_files_in_fs>
2006fdc: 90 10 00 18 mov %i0, %o0
2006fe0: 80 a2 20 01 cmp %o0, 1
2006fe4: 32 bf ff d4 bne,a 2006f34 <unmount+0x12c>
2006fe8: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
2006fec: 30 bf ff bf b,a 2006ee8 <unmount+0xe0>
020068cc <utime>:
int utime(
const char *path,
const struct utimbuf *times
)
{
20068cc: 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 ) )
20068d0: 92 10 20 00 clr %o1
20068d4: 90 10 00 18 mov %i0, %o0
20068d8: a0 07 bf e8 add %fp, -24, %l0
20068dc: 96 10 20 01 mov 1, %o3
20068e0: 94 10 00 10 mov %l0, %o2
20068e4: 7f ff f1 80 call 2002ee4 <rtems_filesystem_evaluate_path>
20068e8: b0 10 3f ff mov -1, %i0
20068ec: 80 a2 20 00 cmp %o0, 0
20068f0: 12 80 00 10 bne 2006930 <utime+0x64>
20068f4: c2 07 bf f0 ld [ %fp + -16 ], %g1
return -1;
if ( !temp_loc.ops->utime_h ){
20068f8: c4 00 60 30 ld [ %g1 + 0x30 ], %g2
20068fc: 80 a0 a0 00 cmp %g2, 0
2006900: 32 80 00 0e bne,a 2006938 <utime+0x6c> <== ALWAYS TAKEN
2006904: d4 06 60 04 ld [ %i1 + 4 ], %o2
rtems_filesystem_freenode( &temp_loc );
2006908: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
200690c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2006910: 02 80 00 04 be 2006920 <utime+0x54> <== NOT EXECUTED
2006914: 01 00 00 00 nop <== NOT EXECUTED
2006918: 9f c0 40 00 call %g1 <== NOT EXECUTED
200691c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
2006920: 40 00 23 c7 call 200f83c <__errno> <== NOT EXECUTED
2006924: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2006928: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
200692c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2006930: 81 c7 e0 08 ret
2006934: 81 e8 00 00 restore
}
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
2006938: d2 06 40 00 ld [ %i1 ], %o1
200693c: 9f c0 80 00 call %g2
2006940: 90 10 00 10 mov %l0, %o0
rtems_filesystem_freenode( &temp_loc );
2006944: c2 07 bf f0 ld [ %fp + -16 ], %g1
2006948: 80 a0 60 00 cmp %g1, 0
200694c: 02 bf ff f9 be 2006930 <utime+0x64> <== NEVER TAKEN
2006950: b0 10 00 08 mov %o0, %i0
2006954: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2006958: 80 a0 60 00 cmp %g1, 0
200695c: 02 80 00 04 be 200696c <utime+0xa0> <== NEVER TAKEN
2006960: 01 00 00 00 nop
2006964: 9f c0 40 00 call %g1
2006968: 90 10 00 10 mov %l0, %o0
return result;
}
200696c: 81 c7 e0 08 ret
2006970: 81 e8 00 00 restore
02002a0c <vprintk>:
*/
void vprintk(
const char *fmt,
va_list ap
)
{
2002a0c: 9d e3 bf 80 save %sp, -128, %sp
if (base)
printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int),
base, sign, width, lead);
} else {
BSP_output_char(*fmt);
2002a10: 03 00 80 5a sethi %hi(0x2016800), %g1
if (maxwidth) maxwidth--;
}
count = 0;
while ((n = num / base) > 0) {
toPrint[count++] = (num - (n*base));
2002a14: b8 07 bf e0 add %fp, -32, %i4
if (base)
printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int),
base, sign, width, lead);
} else {
BSP_output_char(*fmt);
2002a18: ac 10 62 4c or %g1, 0x24c, %l6
count = 0;
while ((n = num / base) > 0) {
toPrint[count++] = (num - (n*base));
num = n;
}
toPrint[count++] = num;
2002a1c: ba 07 bf f8 add %fp, -8, %i5
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
2002a20: 03 00 80 56 sethi %hi(0x2015800), %g1
2002a24: 10 80 00 c8 b 2002d44 <vprintk+0x338>
2002a28: b6 10 62 40 or %g1, 0x240, %i3 ! 2015a40 <pollCallbacks.4788+0x360>
base = 0;
sign = 0;
width = 0;
minus = 0;
lead = ' ';
if (*fmt == '%') {
2002a2c: 32 80 00 c4 bne,a 2002d3c <vprintk+0x330>
2002a30: c2 05 80 00 ld [ %l6 ], %g1
fmt++;
2002a34: b0 06 20 01 inc %i0
if (*fmt == '0' ) {
2002a38: c2 4e 00 00 ldsb [ %i0 ], %g1
2002a3c: 80 a0 60 30 cmp %g1, 0x30
2002a40: 12 80 00 05 bne 2002a54 <vprintk+0x48>
2002a44: ae 10 20 20 mov 0x20, %l7
lead = '0';
fmt++;
2002a48: b0 06 20 01 inc %i0
2002a4c: ae 10 20 30 mov 0x30, %l7
}
if (*fmt == '-' ) {
2002a50: c2 4e 00 00 ldsb [ %i0 ], %g1
2002a54: 80 a0 60 2d cmp %g1, 0x2d
2002a58: 12 80 00 04 bne 2002a68 <vprintk+0x5c>
2002a5c: a6 10 20 00 clr %l3
minus = 1;
fmt++;
2002a60: b0 06 20 01 inc %i0
2002a64: a6 10 20 01 mov 1, %l3
2002a68: 10 80 00 08 b 2002a88 <vprintk+0x7c>
2002a6c: a8 10 20 00 clr %l4
}
while (*fmt >= '0' && *fmt <= '9' ) {
width *= 10;
width += (*fmt - '0');
2002a70: 85 38 60 18 sra %g1, 0x18, %g2
fmt++;
2002a74: b0 06 20 01 inc %i0
if (*fmt == '-' ) {
minus = 1;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
width *= 10;
2002a78: 83 2d 20 01 sll %l4, 1, %g1
width += (*fmt - '0');
2002a7c: 84 00 bf d0 add %g2, -48, %g2
if (*fmt == '-' ) {
minus = 1;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
width *= 10;
2002a80: 82 00 40 03 add %g1, %g3, %g1
width += (*fmt - '0');
2002a84: a8 00 80 01 add %g2, %g1, %l4
}
if (*fmt == '-' ) {
minus = 1;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
2002a88: d0 0e 00 00 ldub [ %i0 ], %o0
width *= 10;
2002a8c: 87 2d 20 03 sll %l4, 3, %g3
}
if (*fmt == '-' ) {
minus = 1;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
2002a90: 82 02 3f d0 add %o0, -48, %g1
2002a94: 82 08 60 ff and %g1, 0xff, %g1
2002a98: 80 a0 60 09 cmp %g1, 9
2002a9c: 08 bf ff f5 bleu 2002a70 <vprintk+0x64>
2002aa0: 83 2a 20 18 sll %o0, 0x18, %g1
width *= 10;
width += (*fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
2002aa4: 83 38 60 18 sra %g1, 0x18, %g1
2002aa8: 80 a0 60 6c cmp %g1, 0x6c
2002aac: 12 80 00 05 bne 2002ac0 <vprintk+0xb4>
2002ab0: 83 2a 20 18 sll %o0, 0x18, %g1
lflag = 1;
c = *++fmt;
2002ab4: b0 06 20 01 inc %i0
2002ab8: d0 0e 00 00 ldub [ %i0 ], %o0
}
switch (c) {
2002abc: 83 2a 20 18 sll %o0, 0x18, %g1
2002ac0: 83 38 60 18 sra %g1, 0x18, %g1
2002ac4: 80 a0 60 64 cmp %g1, 0x64
2002ac8: 02 80 00 2c be 2002b78 <vprintk+0x16c>
2002acc: aa 10 20 0a mov 0xa, %l5
2002ad0: 14 80 00 16 bg 2002b28 <vprintk+0x11c>
2002ad4: 80 a0 60 70 cmp %g1, 0x70
2002ad8: 80 a0 60 4f cmp %g1, 0x4f
2002adc: 02 80 00 60 be 2002c5c <vprintk+0x250> <== NEVER TAKEN
2002ae0: aa 10 20 08 mov 8, %l5
2002ae4: 14 80 00 09 bg 2002b08 <vprintk+0xfc> <== NEVER TAKEN
2002ae8: 80 a0 60 58 cmp %g1, 0x58
2002aec: 80 a0 60 44 cmp %g1, 0x44
2002af0: 02 80 00 21 be 2002b74 <vprintk+0x168> <== NEVER TAKEN
2002af4: 80 a0 60 49 cmp %g1, 0x49
2002af8: 32 80 00 55 bne,a 2002c4c <vprintk+0x240> <== ALWAYS TAKEN
2002afc: 91 2a 20 18 sll %o0, 0x18, %o0
2002b00: 10 80 00 1e b 2002b78 <vprintk+0x16c> <== NOT EXECUTED
2002b04: aa 10 20 0a mov 0xa, %l5 <== NOT EXECUTED
2002b08: 02 80 00 54 be 2002c58 <vprintk+0x24c> <== NOT EXECUTED
2002b0c: 80 a0 60 63 cmp %g1, 0x63 <== NOT EXECUTED
2002b10: 02 80 00 4b be 2002c3c <vprintk+0x230> <== NOT EXECUTED
2002b14: 80 a0 60 55 cmp %g1, 0x55 <== NOT EXECUTED
2002b18: 32 80 00 4d bne,a 2002c4c <vprintk+0x240> <== NOT EXECUTED
2002b1c: 91 2a 20 18 sll %o0, 0x18, %o0 <== NOT EXECUTED
2002b20: 10 80 00 4f b 2002c5c <vprintk+0x250> <== NOT EXECUTED
2002b24: aa 10 20 0a mov 0xa, %l5 <== NOT EXECUTED
2002b28: 02 80 00 4c be 2002c58 <vprintk+0x24c>
2002b2c: 80 a0 60 70 cmp %g1, 0x70
2002b30: 14 80 00 09 bg 2002b54 <vprintk+0x148> <== ALWAYS TAKEN
2002b34: 80 a0 60 75 cmp %g1, 0x75
2002b38: 80 a0 60 69 cmp %g1, 0x69 <== NOT EXECUTED
2002b3c: 02 80 00 0e be 2002b74 <vprintk+0x168> <== NOT EXECUTED
2002b40: 80 a0 60 6f cmp %g1, 0x6f <== NOT EXECUTED
2002b44: 32 80 00 42 bne,a 2002c4c <vprintk+0x240> <== NOT EXECUTED
2002b48: 91 2a 20 18 sll %o0, 0x18, %o0 <== NOT EXECUTED
break;
case 'c':
BSP_output_char(va_arg(ap, int));
break;
default:
BSP_output_char(c);
2002b4c: 10 80 00 44 b 2002c5c <vprintk+0x250> <== NOT EXECUTED
2002b50: aa 10 20 08 mov 8, %l5 <== NOT EXECUTED
if ((c = *fmt) == 'l') {
lflag = 1;
c = *++fmt;
}
switch (c) {
2002b54: 02 80 00 0b be 2002b80 <vprintk+0x174>
2002b58: 80 a0 60 78 cmp %g1, 0x78
2002b5c: 02 80 00 3f be 2002c58 <vprintk+0x24c>
2002b60: 80 a0 60 73 cmp %g1, 0x73
2002b64: 32 80 00 3a bne,a 2002c4c <vprintk+0x240> <== NEVER TAKEN
2002b68: 91 2a 20 18 sll %o0, 0x18, %o0 <== NOT EXECUTED
case 'p': base = 16; sign = 0; break;
case 's':
{ int i, len;
char *s;
str = va_arg(ap, char *);
2002b6c: 10 80 00 07 b 2002b88 <vprintk+0x17c>
2002b70: e4 06 40 00 ld [ %i1 ], %l2
if ((c = *fmt) == 'l') {
lflag = 1;
c = *++fmt;
}
switch (c) {
2002b74: aa 10 20 0a mov 0xa, %l5 <== NOT EXECUTED
2002b78: 10 80 00 3a b 2002c60 <vprintk+0x254>
2002b7c: 82 10 20 01 mov 1, %g1
2002b80: 10 80 00 37 b 2002c5c <vprintk+0x250>
2002b84: aa 10 20 0a mov 0xa, %l5
case 'p': base = 16; sign = 0; break;
case 's':
{ int i, len;
char *s;
str = va_arg(ap, char *);
2002b88: a2 10 20 00 clr %l1
2002b8c: b2 06 60 04 add %i1, 4, %i1
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
2002b90: c2 4c 80 11 ldsb [ %l2 + %l1 ], %g1
2002b94: 80 a0 60 00 cmp %g1, 0
2002b98: 32 bf ff fe bne,a 2002b90 <vprintk+0x184>
2002b9c: a2 04 60 01 inc %l1
;
/* leading spaces */
if ( !minus )
2002ba0: 80 a4 e0 00 cmp %l3, 0
2002ba4: 02 80 00 07 be 2002bc0 <vprintk+0x1b4>
2002ba8: a0 10 00 11 mov %l1, %l0
for ( i=len ; i<width ; i++ )
BSP_output_char(' ');
/* no width option */
if (width == 0) {
2002bac: 10 80 00 09 b 2002bd0 <vprintk+0x1c4>
2002bb0: 80 a5 20 00 cmp %l4, 0
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
2002bb4: a0 04 20 01 inc %l0 <== NOT EXECUTED
BSP_output_char(' ');
2002bb8: 9f c0 40 00 call %g1 <== NOT EXECUTED
2002bbc: 90 10 20 20 mov 0x20, %o0 <== NOT EXECUTED
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
2002bc0: 80 a4 00 14 cmp %l0, %l4
2002bc4: 26 bf ff fc bl,a 2002bb4 <vprintk+0x1a8> <== NEVER TAKEN
2002bc8: c2 05 80 00 ld [ %l6 ], %g1 <== NOT EXECUTED
BSP_output_char(' ');
/* no width option */
if (width == 0) {
2002bcc: 80 a5 20 00 cmp %l4, 0
2002bd0: 22 80 00 02 be,a 2002bd8 <vprintk+0x1cc>
2002bd4: a8 10 00 11 mov %l1, %l4
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
2002bd8: 80 a5 20 00 cmp %l4, 0
2002bdc: 04 80 00 0c ble 2002c0c <vprintk+0x200> <== NEVER TAKEN
2002be0: 80 a4 e0 00 cmp %l3, 0
2002be4: 10 80 00 06 b 2002bfc <vprintk+0x1f0>
2002be8: d0 4c 80 00 ldsb [ %l2 ], %o0
BSP_output_char(*str);
2002bec: c2 05 80 00 ld [ %l6 ], %g1
2002bf0: 9f c0 40 00 call %g1
2002bf4: 01 00 00 00 nop
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
2002bf8: d0 4c 80 00 ldsb [ %l2 ], %o0
2002bfc: 80 a2 20 00 cmp %o0, 0
2002c00: 12 bf ff fb bne 2002bec <vprintk+0x1e0>
2002c04: a4 04 a0 01 inc %l2
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
2002c08: 80 a4 e0 00 cmp %l3, 0
2002c0c: 12 80 00 07 bne 2002c28 <vprintk+0x21c>
2002c10: a0 10 00 11 mov %l1, %l0
)
{
char c, *str;
int lflag, base, sign, width, lead, minus;
for (; *fmt != '\0'; fmt++) {
2002c14: 10 80 00 4c b 2002d44 <vprintk+0x338>
2002c18: b0 06 20 01 inc %i0
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
2002c1c: a0 04 20 01 inc %l0
BSP_output_char(' ');
2002c20: 9f c0 40 00 call %g1
2002c24: 90 10 20 20 mov 0x20, %o0
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
2002c28: 80 a4 00 14 cmp %l0, %l4
2002c2c: 26 bf ff fc bl,a 2002c1c <vprintk+0x210>
2002c30: c2 05 80 00 ld [ %l6 ], %g1
)
{
char c, *str;
int lflag, base, sign, width, lead, minus;
for (; *fmt != '\0'; fmt++) {
2002c34: 10 80 00 44 b 2002d44 <vprintk+0x338>
2002c38: b0 06 20 01 inc %i0
for ( i=len ; i<width ; i++ )
BSP_output_char(' ');
}
break;
case 'c':
BSP_output_char(va_arg(ap, int));
2002c3c: d0 4e 60 03 ldsb [ %i1 + 3 ], %o0 <== NOT EXECUTED
2002c40: c2 05 80 00 ld [ %l6 ], %g1 <== NOT EXECUTED
2002c44: 10 80 00 3e b 2002d3c <vprintk+0x330> <== NOT EXECUTED
2002c48: b2 06 60 04 add %i1, 4, %i1 <== NOT EXECUTED
break;
default:
BSP_output_char(c);
2002c4c: c2 05 80 00 ld [ %l6 ], %g1
2002c50: 10 80 00 3b b 2002d3c <vprintk+0x330>
2002c54: 91 3a 20 18 sra %o0, 0x18, %o0
2002c58: aa 10 20 10 mov 0x10, %l5
2002c5c: 82 10 20 00 clr %g1
2002c60: 84 06 60 04 add %i1, 4, %g2
break;
} /* switch*/
if (base)
printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int),
2002c64: e2 06 40 00 ld [ %i1 ], %l1
{
long unsigned int n;
int count;
char toPrint[20];
if ( (sign == 1) && ((long)num < 0) ) {
2002c68: 80 a0 60 01 cmp %g1, 1
2002c6c: 12 80 00 0d bne 2002ca0 <vprintk+0x294>
2002c70: b2 10 00 02 mov %g2, %i1
2002c74: 80 a4 60 00 cmp %l1, 0
2002c78: 36 80 00 12 bge,a 2002cc0 <vprintk+0x2b4> <== ALWAYS TAKEN
2002c7c: a4 10 20 00 clr %l2
BSP_output_char('-');
2002c80: c2 05 80 00 ld [ %l6 ], %g1 <== NOT EXECUTED
2002c84: 9f c0 40 00 call %g1 <== NOT EXECUTED
2002c88: 90 10 20 2d mov 0x2d, %o0 <== NOT EXECUTED
num = -num;
if (maxwidth) maxwidth--;
2002c8c: 82 1d 20 00 xor %l4, 0, %g1 <== NOT EXECUTED
int count;
char toPrint[20];
if ( (sign == 1) && ((long)num < 0) ) {
BSP_output_char('-');
num = -num;
2002c90: a2 20 00 11 neg %l1 <== NOT EXECUTED
if (maxwidth) maxwidth--;
2002c94: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED
2002c98: 82 40 20 00 addx %g0, 0, %g1 <== NOT EXECUTED
2002c9c: a8 25 00 01 sub %l4, %g1, %l4 <== NOT EXECUTED
2002ca0: 10 80 00 08 b 2002cc0 <vprintk+0x2b4>
2002ca4: a4 10 20 00 clr %l2
}
count = 0;
while ((n = num / base) > 0) {
toPrint[count++] = (num - (n*base));
2002ca8: 40 00 43 8c call 2013ad8 <.umul>
2002cac: 92 10 00 15 mov %l5, %o1
2002cb0: 90 24 40 08 sub %l1, %o0, %o0
2002cb4: a2 10 00 10 mov %l0, %l1
2002cb8: d0 2f 00 12 stb %o0, [ %i4 + %l2 ]
2002cbc: a4 10 00 13 mov %l3, %l2
num = -num;
if (maxwidth) maxwidth--;
}
count = 0;
while ((n = num / base) > 0) {
2002cc0: 90 10 00 11 mov %l1, %o0
2002cc4: 92 10 00 15 mov %l5, %o1
2002cc8: 40 00 43 be call 2013bc0 <.udiv>
2002ccc: a6 04 a0 01 add %l2, 1, %l3
2002cd0: a0 92 20 00 orcc %o0, 0, %l0
2002cd4: 32 bf ff f5 bne,a 2002ca8 <vprintk+0x29c>
2002cd8: 90 10 00 10 mov %l0, %o0
toPrint[count++] = (num - (n*base));
num = n;
}
toPrint[count++] = num;
2002cdc: 82 07 40 12 add %i5, %l2, %g1
for (n=maxwidth ; n > count; n-- )
2002ce0: a0 10 00 14 mov %l4, %l0
count = 0;
while ((n = num / base) > 0) {
toPrint[count++] = (num - (n*base));
num = n;
}
toPrint[count++] = num;
2002ce4: e2 28 7f e8 stb %l1, [ %g1 + -24 ]
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
2002ce8: 10 80 00 05 b 2002cfc <vprintk+0x2f0>
2002cec: a2 10 00 17 mov %l7, %l1
toPrint[count++] = (num - (n*base));
num = n;
}
toPrint[count++] = num;
for (n=maxwidth ; n > count; n-- )
2002cf0: a0 04 3f ff add %l0, -1, %l0
BSP_output_char(lead);
2002cf4: 9f c0 40 00 call %g1
2002cf8: 90 10 00 11 mov %l1, %o0
toPrint[count++] = (num - (n*base));
num = n;
}
toPrint[count++] = num;
for (n=maxwidth ; n > count; n-- )
2002cfc: 80 a4 00 13 cmp %l0, %l3
2002d00: 38 bf ff fc bgu,a 2002cf0 <vprintk+0x2e4>
2002d04: c2 05 80 00 ld [ %l6 ], %g1
2002d08: a0 10 20 00 clr %l0
BSP_output_char(lead);
for (n = 0; n < count; n++) {
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
2002d0c: 10 80 00 07 b 2002d28 <vprintk+0x31c>
2002d10: a2 07 40 13 add %i5, %l3, %l1
2002d14: c2 48 7f e7 ldsb [ %g1 + -25 ], %g1
2002d18: c4 05 80 00 ld [ %l6 ], %g2
2002d1c: d0 4e c0 01 ldsb [ %i3 + %g1 ], %o0
2002d20: 9f c0 80 00 call %g2
2002d24: a0 04 20 01 inc %l0
toPrint[count++] = num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
2002d28: 80 a4 00 13 cmp %l0, %l3
2002d2c: 0a bf ff fa bcs 2002d14 <vprintk+0x308>
2002d30: 82 24 40 10 sub %l1, %l0, %g1
)
{
char c, *str;
int lflag, base, sign, width, lead, minus;
for (; *fmt != '\0'; fmt++) {
2002d34: 10 80 00 04 b 2002d44 <vprintk+0x338>
2002d38: b0 06 20 01 inc %i0
if (base)
printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int),
base, sign, width, lead);
} else {
BSP_output_char(*fmt);
2002d3c: 9f c0 40 00 call %g1
2002d40: b0 06 20 01 inc %i0
)
{
char c, *str;
int lflag, base, sign, width, lead, minus;
for (; *fmt != '\0'; fmt++) {
2002d44: d0 4e 00 00 ldsb [ %i0 ], %o0
2002d48: 80 a2 20 00 cmp %o0, 0
2002d4c: 12 bf ff 38 bne 2002a2c <vprintk+0x20>
2002d50: 80 a2 20 25 cmp %o0, 0x25
base, sign, width, lead);
} else {
BSP_output_char(*fmt);
}
}
}
2002d54: 81 c7 e0 08 ret
2002d58: 81 e8 00 00 restore
02014e50 <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
2014e50: 9d e3 bf 98 save %sp, -104, %sp
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
2014e54: 03 00 80 5a sethi %hi(0x2016800), %g1
2014e58: c2 00 61 48 ld [ %g1 + 0x148 ], %g1 ! 2016948 <rtems_libio_number_iops>
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
2014e5c: 92 10 00 19 mov %i1, %o1
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
2014e60: 80 a6 00 01 cmp %i0, %g1
2014e64: 1a 80 00 1a bcc 2014ecc <write+0x7c> <== NEVER TAKEN
2014e68: 94 10 00 1a mov %i2, %o2
iop = rtems_libio_iop( fd );
2014e6c: 03 00 80 5d sethi %hi(0x2017400), %g1
2014e70: c6 00 62 44 ld [ %g1 + 0x244 ], %g3 ! 2017644 <rtems_libio_iops>
2014e74: 85 2e 20 02 sll %i0, 2, %g2
2014e78: 83 2e 20 04 sll %i0, 4, %g1
2014e7c: 82 20 40 02 sub %g1, %g2, %g1
2014e80: 82 00 40 18 add %g1, %i0, %g1
2014e84: 83 28 60 02 sll %g1, 2, %g1
2014e88: b0 00 c0 01 add %g3, %g1, %i0
rtems_libio_check_is_open( iop );
2014e8c: c2 06 20 0c ld [ %i0 + 0xc ], %g1
2014e90: 80 88 61 00 btst 0x100, %g1
2014e94: 02 80 00 0e be 2014ecc <write+0x7c> <== NEVER TAKEN
2014e98: 01 00 00 00 nop
rtems_libio_check_buffer( buffer );
2014e9c: 80 a6 60 00 cmp %i1, 0
2014ea0: 12 80 00 06 bne 2014eb8 <write+0x68> <== ALWAYS TAKEN
2014ea4: 80 a6 a0 00 cmp %i2, 0
2014ea8: 7f ff e0 7b call 200d094 <__errno> <== NOT EXECUTED
2014eac: 01 00 00 00 nop <== NOT EXECUTED
2014eb0: 10 80 00 12 b 2014ef8 <write+0xa8> <== NOT EXECUTED
2014eb4: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16> <== NOT EXECUTED
rtems_libio_check_count( count );
2014eb8: 02 80 00 1b be 2014f24 <write+0xd4>
2014ebc: 90 10 20 00 clr %o0
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
2014ec0: 80 88 60 04 btst 4, %g1
2014ec4: 32 80 00 06 bne,a 2014edc <write+0x8c> <== ALWAYS TAKEN
2014ec8: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
2014ecc: 7f ff e0 72 call 200d094 <__errno> <== NOT EXECUTED
2014ed0: 01 00 00 00 nop <== NOT EXECUTED
2014ed4: 10 80 00 09 b 2014ef8 <write+0xa8> <== NOT EXECUTED
2014ed8: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9> <== NOT EXECUTED
/*
* Now process the write() request.
*/
if ( !iop->handlers->write_h )
2014edc: c2 00 60 0c ld [ %g1 + 0xc ], %g1
2014ee0: 80 a0 60 00 cmp %g1, 0
2014ee4: 12 80 00 08 bne 2014f04 <write+0xb4> <== ALWAYS TAKEN
2014ee8: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOTSUP );
2014eec: 7f ff e0 6a call 200d094 <__errno> <== NOT EXECUTED
2014ef0: 01 00 00 00 nop <== NOT EXECUTED
2014ef4: 82 10 20 86 mov 0x86, %g1 ! 86 <PROM_START+0x86> <== NOT EXECUTED
2014ef8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2014efc: 10 80 00 0a b 2014f24 <write+0xd4> <== NOT EXECUTED
2014f00: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
rc = (*iop->handlers->write_h)( iop, buffer, count );
2014f04: 9f c0 40 00 call %g1
2014f08: 90 10 00 18 mov %i0, %o0
if ( rc > 0 )
2014f0c: 80 a2 20 00 cmp %o0, 0
2014f10: 04 80 00 05 ble 2014f24 <write+0xd4> <== NEVER TAKEN
2014f14: 01 00 00 00 nop
iop->offset += rc;
2014f18: c2 06 20 08 ld [ %i0 + 8 ], %g1
2014f1c: 82 00 40 08 add %g1, %o0, %g1
2014f20: c2 26 20 08 st %g1, [ %i0 + 8 ]
return rc;
}
2014f24: 81 c7 e0 08 ret
2014f28: 91 e8 00 08 restore %g0, %o0, %o0